diff --git a/cmd/evening_detective/static/admin/assets/index-CPTUZASe.css b/cmd/evening_detective/static/admin/assets/index-CwoYUpL_.css similarity index 56% rename from cmd/evening_detective/static/admin/assets/index-CPTUZASe.css rename to cmd/evening_detective/static/admin/assets/index-CwoYUpL_.css index 3d431fb..ac137ba 100644 --- a/cmd/evening_detective/static/admin/assets/index-CPTUZASe.css +++ b/cmd/evening_detective/static/admin/assets/index-CwoYUpL_.css @@ -1 +1 @@ -:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);background:var(--main-back-color);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input-custom{width:100%;box-sizing:border-box;margin-bottom:15px}.button-custom{margin-left:auto;background-color:var(--main-color);font-weight:600;color:#fff}.button-custom-inline{margin:10px;background-color:var(--main-color);font-weight:600;color:#fff;padding:6px 8px;border:1px solid #ddd;border-radius:15px;font-size:14px}.button-custom:hover,.button-custom-inline:hover{background-color:var(--second-color)}.input-custom,.button-custom{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container{display:flex}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}@media (min-width: 1025px){.center-block-custom{width:700px;margin:0 auto}}.qr[data-v-eea3ea34]{text-align:center}.header-block[data-v-5b6894ef]{background-color:var(--main-color);font-size:large;color:#fff;vertical-align:middle;padding:10px 0 10px 16px;font-weight:700}.modal-mask[data-v-f97ce307]{position:fixed;z-index:9999;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table;transition:opacity .3s ease;font-size:20px}.modal-wrapper[data-v-f97ce307]{display:table-cell;vertical-align:middle}.modal-container[data-v-f97ce307]{width:400px;margin:0 auto;padding:20px 30px;background-color:#fff;border-radius:8px;box-shadow:0 2px 8px #00000054;transition:all .3s ease;position:relative}.modal-header[data-v-f97ce307]{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.modal-header h3[data-v-f97ce307]{margin:0;font-size:25px;color:var(--main-color);font-weight:600}.close-btn[data-v-f97ce307]{background:none;border:none;font-size:24px;cursor:pointer;color:#aaa}.close-btn[data-v-f97ce307]:hover{color:#333}.modal-body[data-v-f97ce307]{margin:20px 0;line-height:1.5}.modal-footer[data-v-f97ce307]{text-align:right}.btn-cancel[data-v-f97ce307],.btn-primary[data-v-f97ce307]{padding:12px 20px;border:none;border-radius:4px;cursor:pointer;font-size:20px;margin-left:10px}.btn-cancel[data-v-f97ce307]{background-color:#fff;color:var(--main-color)}.btn-primary[data-v-f97ce307]{background-color:var(--main-color);color:#fff}.btn-primary[data-v-f97ce307]:hover{background-color:var(--second-color)}.modal-enter-from[data-v-f97ce307],.modal-leave-to[data-v-f97ce307]{opacity:0}.modal-enter-from .modal-container[data-v-f97ce307],.modal-leave-to .modal-container[data-v-f97ce307]{transform:scale(.9)}.buttons-block[data-v-3033f565]{padding-top:5px}.button-menu[data-v-3033f565]{margin:5px 10px 5px 0}.url-block[data-v-3033f565]{margin:5px 0}.link-button[data-v-3033f565]{border:none;color:#fff;background-color:var(--main-color);padding:15px;margin:0;font:inherit;cursor:pointer;font-weight:600;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:inherit;text-align:center}.link-button[data-v-3033f565]:hover{color:#ccc;text-decoration:none;background-color:var(--second-color)}.link-button[data-v-3033f565]:active{color:#036}.link-button[data-v-3033f565]:focus{outline:none;text-decoration:none;box-shadow:0 0 0 2px #0066cc4d}a[data-v-3033f565]{color:var(--second-color);text-decoration:none;transition:all .2s ease;cursor:pointer}a[data-v-3033f565]:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}a[data-v-3033f565]:focus-visible{outline:2px solid #3182ce;outline-offset:2px;border-radius:2px}a[disabled][data-v-3033f565]{color:#a0aec0;pointer-events:none;cursor:not-allowed}.button-container[data-v-3033f565]{margin-bottom:30px}.content-block[data-v-3033f565]{padding:10px}.team-header-block[data-v-3033f565]{font-weight:700;font-size:30px}.team-block[data-v-3033f565]{border:solid 1px #003366;border-radius:5px;margin:15px 0}.team-content-block[data-v-3033f565]{padding:10px}.team-name-block[data-v-3033f565]{font-weight:600;font-size:20px}.data-container[data-v-688e2235]{width:100%;height:calc(100vh - 50px);border:1px solid #e0e0e0}.graph-container[data-v-688e2235]{border-radius:8px}.graph-container-disable[data-v-688e2235]{position:absolute;right:10000px}.text-container[data-v-688e2235]{padding:10px}.text-container-disable[data-v-688e2235]{position:absolute;left:10000px}.nodes-container[data-v-688e2235]{position:fixed;left:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px}.edit-node-container[data-v-688e2235]{position:fixed;right:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px;min-width:350px;max-width:400px}.node-select-button[data-v-688e2235]{color:#373737}.node-select-button[data-v-688e2235]:hover{font-weight:700;cursor:pointer}.selected-node[data-v-688e2235]{font-weight:700;color:#960000;cursor:pointer}.node-text-edit-field[data-v-688e2235]{padding:7px;margin:5px 0;width:100%}.editor-button[data-v-688e2235]{padding:3px 7px;margin:5px 5px 5px 0;background-color:#fff;border:1px solid #777777}.editor-button[data-v-688e2235]:hover{background-color:#eee;cursor:pointer}.hr[data-v-688e2235]{width:250px;margin:10px 0}.copy-node-link[data-v-688e2235]{margin-left:5px}.copy-node-link[data-v-688e2235]:hover{font-weight:700;cursor:pointer}.scroll-y[data-v-688e2235]{overflow-y:auto;max-height:calc(100vh - 200px)}.scroll-y-right[data-v-688e2235]{overflow-y:auto;max-height:calc(100vh - 70px)}.scroll-y[data-v-688e2235]::-webkit-scrollbar,.scroll-y-right[data-v-688e2235]::-webkit-scrollbar{display:none}.node-code-edit-field[data-v-688e2235]{width:50px}.node-name-edit-field[data-v-688e2235]{width:220px}.application-add-button[data-v-688e2235]{display:inline;margin-left:5px;width:23px;height:23px}.application-remove-button[data-v-688e2235]{position:absolute;left:-25px;width:23px;height:23px}.messages-block[data-v-688e2235]{height:100%;overflow-y:auto;scrollbar-width:none}@media (min-width: 1025px){.center-block-custom[data-v-688e2235]{width:700px;margin:0 auto}}.message-cloud[data-v-688e2235]{border:1px solid #444444;border-radius:15px;margin:12px 10px;padding:16px;background-color:var(--main-back-item-color)}.message-cloud[data-v-688e2235]:hover{background-color:#eee;cursor:pointer}.selected-message-cloud[data-v-688e2235]{border:2px solid #960000;cursor:pointer}.message-header[data-v-688e2235]{font-size:large;font-weight:200}.selected-message-header[data-v-688e2235]{font-size:large;font-weight:500;color:#960000}.message-content[data-v-688e2235]{font-weight:500;white-space:pre-wrap}.message-footer[data-v-688e2235]{font-weight:400;color:var(--second-color)}.checkbox-green[data-v-688e2235]{display:inline-block;height:20px;line-height:28px;margin-right:10px;position:relative;vertical-align:middle;font-size:14px;-webkit-user-select:none;user-select:none}.checkbox-green .checkbox-green-switch[data-v-688e2235]{display:inline-block;height:20px;width:90px;box-sizing:border-box;position:relative;border-radius:2px;background:#848484;transition:background-color .3s cubic-bezier(0,1,.5,1)}.checkbox-green .checkbox-green-switch[data-v-688e2235]:before{content:attr(data-label-on);display:inline-block;box-sizing:border-box;width:45px;padding:0 8px;position:absolute;top:0;left:45px;text-transform:uppercase;text-align:center;color:#ffffff80;font-size:10px;line-height:20px}.checkbox-green .checkbox-green-switch[data-v-688e2235]:after{content:attr(data-label-off);display:inline-block;box-sizing:border-box;width:44px;border-radius:1px;position:absolute;top:1px;left:1px;z-index:5;text-transform:uppercase;text-align:center;background:#fff;line-height:18px;font-size:10px;color:#444;transition:transform .3s cubic-bezier(0,1,.5,1)}.checkbox-green input[type=checkbox][data-v-688e2235]{display:block;width:0;height:0;position:absolute;z-index:-1;opacity:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-688e2235]{background-color:#777}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-688e2235]:before{content:attr(data-label-off);left:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-688e2235]:after{content:attr(data-label-on);color:#777;transform:translate3d(44px,0,0)}.checkbox-green input[type=checkbox]:not(:disabled)+.checkbox-green-switch[data-v-688e2235]:hover{cursor:pointer}.checkbox-green input[type=checkbox]:disabled+.checkbox-green-switch[data-v-688e2235]{opacity:.6;filter:grayscale(50%)}.checkbox-green.focused .checkbox-green-switch[data-v-688e2235]:after{box-shadow:inset 0 0 4px #ff5623} +:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);background:var(--main-back-color);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input-custom{width:100%;box-sizing:border-box;margin-bottom:15px}.button-custom{margin-left:auto;background-color:var(--main-color);font-weight:600;color:#fff}.button-custom-inline{margin:10px;background-color:var(--main-color);font-weight:600;color:#fff;padding:6px 8px;border:1px solid #ddd;border-radius:15px;font-size:14px}.button-custom:hover,.button-custom-inline:hover{background-color:var(--second-color)}.input-custom,.button-custom{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container{display:flex}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}@media (min-width: 1025px){.center-block-custom{width:700px;margin:0 auto}}.qr[data-v-eea3ea34]{text-align:center}.header-block[data-v-5b6894ef]{background-color:var(--main-color);font-size:large;color:#fff;vertical-align:middle;padding:10px 0 10px 16px;font-weight:700}.modal-mask[data-v-f97ce307]{position:fixed;z-index:9999;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:table;transition:opacity .3s ease;font-size:20px}.modal-wrapper[data-v-f97ce307]{display:table-cell;vertical-align:middle}.modal-container[data-v-f97ce307]{width:400px;margin:0 auto;padding:20px 30px;background-color:#fff;border-radius:8px;box-shadow:0 2px 8px #00000054;transition:all .3s ease;position:relative}.modal-header[data-v-f97ce307]{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.modal-header h3[data-v-f97ce307]{margin:0;font-size:25px;color:var(--main-color);font-weight:600}.close-btn[data-v-f97ce307]{background:none;border:none;font-size:24px;cursor:pointer;color:#aaa}.close-btn[data-v-f97ce307]:hover{color:#333}.modal-body[data-v-f97ce307]{margin:20px 0;line-height:1.5}.modal-footer[data-v-f97ce307]{text-align:right}.btn-cancel[data-v-f97ce307],.btn-primary[data-v-f97ce307]{padding:12px 20px;border:none;border-radius:4px;cursor:pointer;font-size:20px;margin-left:10px}.btn-cancel[data-v-f97ce307]{background-color:#fff;color:var(--main-color)}.btn-primary[data-v-f97ce307]{background-color:var(--main-color);color:#fff}.btn-primary[data-v-f97ce307]:hover{background-color:var(--second-color)}.modal-enter-from[data-v-f97ce307],.modal-leave-to[data-v-f97ce307]{opacity:0}.modal-enter-from .modal-container[data-v-f97ce307],.modal-leave-to .modal-container[data-v-f97ce307]{transform:scale(.9)}.buttons-block[data-v-3033f565]{padding-top:5px}.button-menu[data-v-3033f565]{margin:5px 10px 5px 0}.url-block[data-v-3033f565]{margin:5px 0}.link-button[data-v-3033f565]{border:none;color:#fff;background-color:var(--main-color);padding:15px;margin:0;font:inherit;cursor:pointer;font-weight:600;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:inherit;text-align:center}.link-button[data-v-3033f565]:hover{color:#ccc;text-decoration:none;background-color:var(--second-color)}.link-button[data-v-3033f565]:active{color:#036}.link-button[data-v-3033f565]:focus{outline:none;text-decoration:none;box-shadow:0 0 0 2px #0066cc4d}a[data-v-3033f565]{color:var(--second-color);text-decoration:none;transition:all .2s ease;cursor:pointer}a[data-v-3033f565]:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}a[data-v-3033f565]:focus-visible{outline:2px solid #3182ce;outline-offset:2px;border-radius:2px}a[disabled][data-v-3033f565]{color:#a0aec0;pointer-events:none;cursor:not-allowed}.button-container[data-v-3033f565]{margin-bottom:30px}.content-block[data-v-3033f565]{padding:10px}.team-header-block[data-v-3033f565]{font-weight:700;font-size:30px}.team-block[data-v-3033f565]{border:solid 1px #003366;border-radius:5px;margin:15px 0}.team-content-block[data-v-3033f565]{padding:10px}.team-name-block[data-v-3033f565]{font-weight:600;font-size:20px}.data-container[data-v-f1335d65]{width:100%;height:calc(100vh - 50px);border:1px solid #e0e0e0}.graph-container[data-v-f1335d65]{border-radius:8px}.graph-container-disable[data-v-f1335d65]{position:absolute;right:10000px}.text-container[data-v-f1335d65]{padding:10px}.text-container-disable[data-v-f1335d65]{position:absolute;left:10000px}.nodes-container[data-v-f1335d65]{position:fixed;left:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px}.edit-node-container[data-v-f1335d65]{position:fixed;right:5px;top:55px;height:calc(100vh - 100px);padding:3px 10px;min-width:350px;max-width:400px}.node-select-button[data-v-f1335d65]{color:#373737}.node-select-button[data-v-f1335d65]:hover{font-weight:700;cursor:pointer}.selected-node[data-v-f1335d65]{font-weight:700;color:#960000;cursor:pointer}.node-text-edit-field[data-v-f1335d65]{padding:7px;margin:5px 0;width:100%}.editor-button[data-v-f1335d65]{padding:3px 7px;margin:5px 5px 5px 0;background-color:#fff;border:1px solid #777777}.editor-button[data-v-f1335d65]:hover{background-color:#eee;cursor:pointer}.hr[data-v-f1335d65]{margin:10px 0}.copy-node-link[data-v-f1335d65]{margin-left:5px}.copy-node-link[data-v-f1335d65]:hover{font-weight:700;cursor:pointer}.scroll-y[data-v-f1335d65]{overflow-y:auto;max-height:calc(100vh - 250px)}.scroll-y-right[data-v-f1335d65]{overflow-y:auto;max-height:calc(100vh - 70px)}.scroll-y[data-v-f1335d65]::-webkit-scrollbar,.scroll-y-right[data-v-f1335d65]::-webkit-scrollbar{display:none}.node-code-edit-field[data-v-f1335d65]{width:50px}.node-name-edit-field[data-v-f1335d65]{width:220px}.application-add-button[data-v-f1335d65]{display:inline;margin-left:5px;width:23px;height:23px}.application-remove-button[data-v-f1335d65]{position:absolute;left:-25px;width:23px;height:23px}.messages-block[data-v-f1335d65]{height:100%;overflow-y:auto;scrollbar-width:none}@media (min-width: 1025px){.center-block-custom[data-v-f1335d65]{width:calc(100vw - 750px);margin:0 auto}}.message-cloud[data-v-f1335d65]{border:1px solid #444444;border-radius:15px;margin:12px 10px;padding:16px;background-color:var(--main-back-item-color)}.message-cloud[data-v-f1335d65]:hover{background-color:#eee;cursor:pointer}.selected-message-cloud[data-v-f1335d65]{border:2px solid #960000;cursor:pointer}.message-header[data-v-f1335d65]{font-size:large;font-weight:200}.selected-message-header[data-v-f1335d65]{font-size:large;font-weight:500;color:#960000}.message-content[data-v-f1335d65]{font-weight:500;white-space:pre-wrap}.message-footer[data-v-f1335d65]{font-weight:400;color:var(--second-color)}.checkbox-green[data-v-f1335d65]{display:inline-block;height:20px;line-height:28px;margin-right:10px;position:relative;vertical-align:middle;font-size:14px;-webkit-user-select:none;user-select:none}.checkbox-green .checkbox-green-switch[data-v-f1335d65]{display:inline-block;height:20px;width:90px;box-sizing:border-box;position:relative;border-radius:2px;background:#848484;transition:background-color .3s cubic-bezier(0,1,.5,1)}.checkbox-green .checkbox-green-switch[data-v-f1335d65]:before{content:attr(data-label-on);display:inline-block;box-sizing:border-box;width:45px;padding:0 8px;position:absolute;top:0;left:45px;text-transform:uppercase;text-align:center;color:#ffffff80;font-size:10px;line-height:20px}.checkbox-green .checkbox-green-switch[data-v-f1335d65]:after{content:attr(data-label-off);display:inline-block;box-sizing:border-box;width:44px;border-radius:1px;position:absolute;top:1px;left:1px;z-index:5;text-transform:uppercase;text-align:center;background:#fff;line-height:18px;font-size:10px;color:#444;transition:transform .3s cubic-bezier(0,1,.5,1)}.checkbox-green input[type=checkbox][data-v-f1335d65]{display:block;width:0;height:0;position:absolute;z-index:-1;opacity:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-f1335d65]{background-color:#777}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-f1335d65]:before{content:attr(data-label-off);left:0}.checkbox-green input[type=checkbox]:checked+.checkbox-green-switch[data-v-f1335d65]:after{content:attr(data-label-on);color:#777;transform:translate3d(44px,0,0)}.checkbox-green input[type=checkbox]:not(:disabled)+.checkbox-green-switch[data-v-f1335d65]:hover{cursor:pointer}.checkbox-green input[type=checkbox]:disabled+.checkbox-green-switch[data-v-f1335d65]{opacity:.6;filter:grayscale(50%)}.checkbox-green.focused .checkbox-green-switch[data-v-f1335d65]:after{box-shadow:inset 0 0 4px #ff5623} diff --git a/cmd/evening_detective/static/admin/assets/index-Bs4u8D6y.js b/cmd/evening_detective/static/admin/assets/index-r74wHSLo.js similarity index 99% rename from cmd/evening_detective/static/admin/assets/index-Bs4u8D6y.js rename to cmd/evening_detective/static/admin/assets/index-r74wHSLo.js index 3b27a90..c3f3a58 100644 --- a/cmd/evening_detective/static/admin/assets/index-Bs4u8D6y.js +++ b/cmd/evening_detective/static/admin/assets/index-r74wHSLo.js @@ -112,4 +112,4 @@ Minimum version required to store current data is: `+$+`. `,wt()):fe+=Se,wt();if(Se!='"')throw jt('End of string " expected');wt(),Gt=Lt.IDENTIFIER;return}for(Gt=Lt.UNKNOWN;Se!="";)fe+=Se,wt();throw new SyntaxError('Syntax error in part "'+hH(fe,30)+'"')}function oee(){var r={};if(iee(),Ke(),fe==="strict"&&(r.strict=!0,Ke()),(fe==="graph"||fe==="digraph")&&(r.type=fe,Ke()),Gt===Lt.IDENTIFIER&&(r.id=fe,Ke()),fe!="{")throw jt("Angle bracket { expected");if(Ke(),lH(r),fe!="}")throw jt("Angle bracket } expected");if(Ke(),fe!=="")throw jt("End of file expected");return Ke(),delete r.node,delete r.edge,delete r.graph,r}function lH(r){for(;fe!==""&&fe!="}";)aee(r),fe===";"&&Ke()}function aee(r){var e=cH(r);if(e){dH(r,e);return}var t=uee(r);if(!t){if(Gt!=Lt.IDENTIFIER)throw jt("Identifier expected");var i=fe;if(Ke(),fe==="="){if(Ke(),Gt!=Lt.IDENTIFIER)throw jt("Identifier expected");r[i]=fe,Ke()}else lee(r,i)}}function cH(r){var e=null;if(fe==="subgraph"&&(e={},e.type="subgraph",Ke(),Gt===Lt.IDENTIFIER&&(e.id=fe,Ke())),fe==="{"){if(Ke(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,lH(e),fe!="}")throw jt("Angle bracket } expected");Ke(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function uee(r){return fe==="node"?(Ke(),r.node=Do(),"node"):fe==="edge"?(Ke(),r.edge=Do(),"edge"):fe==="graph"?(Ke(),r.graph=Do(),"graph"):null}function lee(r,e){var t={id:e},i=Do();i&&(t.attr=i),aH(r,t),dH(r,e)}function dH(r,e){for(;fe==="->"||fe==="--";){var t,i=fe;Ke();var n=cH(r);if(n)t=n;else{if(Gt!=Lt.IDENTIFIER)throw jt("Identifier or subgraph expected");t=fe,aH(r,{id:t}),Ke()}var s=Do(),o=uH(r,e,t,i,s);see(r,o),e=t}}function Do(){for(var r,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},i={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,s=new Array;fe==="[";){for(Ke(),e={};fe!==""&&fe!="]";){if(Gt!=Lt.IDENTIFIER)throw jt("Attribute name expected");var o=fe;if(Ke(),fe!="=")throw jt("Equal sign = expected");if(Ke(),Gt!=Lt.IDENTIFIER)throw jt("Attribute value expected");var a=fe;o==="style"&&(a=t[a]);var u;o==="arrowhead"&&(u=i[a],o="arrows",a={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=i[a],o="arrows",a={from:{enabled:!0,type:u}}),n.push({attr:e,name:o,value:a}),s.push(o),Ke(),fe==","&&Ke()}if(fe!="]")throw jt("Bracket ] expected");Ke()}if(Mi(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};ze(n=e.edges).call(n,function(o){var a,u;if(o.from instanceof Object?a=o.from.nodes:a={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;ze(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(cee(a,u,function(d,h){var f=uH(t,d.id,h.id,o.type,o.attr),p=s(f);t.edges.push(p)}),o.to instanceof Object&&o.to.edges){var c;ze(c=o.to.edges).call(c,function(d){var h=s(d);t.edges.push(h)})}})}return e.attr&&(t.options=e.attr),t}function hee(r,e){var t;const i={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(i.nodes.fixed=e.fixed),e.parseColor!=null&&(i.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(i.edges.inheritColor=e.inheritColor));const n=r.edges,s=Ps(n).call(n,a=>{const u={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.type==="Directed"&&(u.arrows="to"),a.color&&i.edges.inheritColor===!1&&(u.color=a.color),u});return{nodes:Ps(t=r.nodes).call(t,a=>{const u={id:a.id,fixed:i.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.size!=null&&(u.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.title!=null&&(u.title=a.title),a.x!=null&&(u.x=a.x),a.y!=null&&(u.y=a.y),a.color!=null&&(i.nodes.parseColor===!0?u.color=a.color:u.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),u}),edges:s}}const fee={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},pee={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},vee={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},gee={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},mee={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},yee={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},bee={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},_ee={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},wee={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},Eee={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},See={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var Oee=Object.freeze({__proto__:null,cn:_ee,cs:See,de:pee,en:fee,es:vee,fr:Eee,it:gee,nl:mee,pt:yee,ru:bee,uk:wee});function Iee(r,e){try{const[i,n]=e.split(/[-_ /]/,2),s=i!=null?i.toLowerCase():null,o=n!=null?n.toUpperCase():null;if(s&&o){const a=s+"-"+o;if(Object.prototype.hasOwnProperty.call(r,a))return a;var t;console.warn(YJ(t="Unknown variant ".concat(o," of language ")).call(t,s,"."))}if(s){const a=s;if(Object.prototype.hasOwnProperty.call(r,a))return a;console.warn("Unknown language ".concat(s))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(i){return console.error(i),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class Tee{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const i=Math.floor(t/2),n=Math.floor(t/4),s=Math.floor(t/8),o=Math.floor(t/16),a=Math.floor(e/2),u=Math.floor(e/4),l=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,a,i],[a,0,u,n],[a,n,l,s],[5*l,n,c,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let i=1;i2){t*=.5;let a=0;for(;t>2&&a=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const u=this.coordinates[a];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,n,s,o)}else e.drawImage(this.image,i,n,s,o)}}class $ee{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=()=>{console.error("Could not load brokenImage:",t)},i.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const i=this.images[e];if(i)return i;const n=new Tee;return this.images[e]=n,n.image.onload=()=>{this._fixImageCoordinates(n.image),n.init(),this._redrawWithImage(n)},n.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,n)},n.image.src=e,n}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var GF={},YF={},Ib={exports:{}},Tb,XF;function Pee(){if(XF)return Tb;XF=1;var r=$e();return Tb=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Tb}var $b,JF;function Ree(){if(JF)return $b;JF=1;var r=$e(),e=Pt(),t=Hr(),i=Pee(),n=Object.isExtensible,s=r(function(){});return $b=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,$b}var Pb,QF;function fH(){if(QF)return Pb;QF=1;var r=$e();return Pb=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),Pb}var ZF;function $l(){if(ZF)return Ib.exports;ZF=1;var r=de(),e=Ce(),t=Ca(),i=Pt(),n=qt(),s=gr().f,o=wl(),a=T0(),u=Ree(),l=pl(),c=fH(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,I){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!I)return"E";p(y)}return y[h].objectID},w=function(y,I){if(!n(y,h)){if(!u(y))return!0;if(!I)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){S.enable=function(){},d=!0;var y=o.f,I=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(T){for(var _=y(T),b=0,E=_.length;b_;_++)if(E=A(f[_]),E&&o(h,E))return E;return new d(!1)}O=a(f,T)}for($=g?f.next:O.next;!(P=e($,O)).done;){try{E=A(P.value)}catch(B){l(O,"throw",B)}if(typeof E=="object"&&E&&o(h,E))return E}return new d(!1)},Ab}var Db,sk;function H0(){if(sk)return Db;sk=1;var r=mt(),e=TypeError;return Db=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},Db}var Mb,ok;function W0(){if(ok)return Mb;ok=1;var r=de(),e=Xe(),t=$l(),i=$e(),n=Xs(),s=Pl(),o=H0(),a=$t(),u=Pt(),l=Ws(),c=Wn(),d=gr().f,h=Ji().forEach,f=lt(),p=Un(),v=p.set,w=p.getterFor;return Mb=function(m,g,S){var y=m.indexOf("Map")!==-1,I=m.indexOf("Weak")!==-1,O=y?"set":"add",T=e[m],_=T&&T.prototype,b={},E;if(!f||!a(T)||!(I||_.forEach&&!i(function(){new T().entries().next()})))E=S.getConstructor(g,m,y,O),t.enable();else{E=g(function(R,A){v(o(R,$),{type:m,collection:new T}),l(A)||s(A,R[O],{that:R,AS_ENTRIES:y})});var $=E.prototype,P=w(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(R){var A=R==="add"||R==="set";R in _&&!(I&&R==="clear")&&n($,R,function(B,Z){var H=P(this).collection;if(!A&&I&&!u(B))return R==="get"?void 0:!1;var te=H[R](B===0?0:B,Z);return A?this:te})}),I||d($,"size",{configurable:!0,get:function(){return P(this).collection.size}})}return c(E,m,!1,!0),b[m]=E,r({global:!0,forced:!0},b),I||S.setStrong(E,m,y),E},Mb}var Nb,ak;function U0(){if(ak)return Nb;ak=1;var r=Da();return Nb=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},Nb}var Fb,uk;function qee(){if(uk)return Fb;uk=1;var r=nr(),e=$0(),t=yt(),i=lt(),n=t("species");return Fb=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},Fb}var kb,lk;function vH(){if(lk)return kb;lk=1;var r=Aa(),e=$0(),t=U0(),i=gl(),n=H0(),s=Ws(),o=Pl(),a=R0(),u=C0(),l=qee(),c=lt(),d=$l().fastKey,h=Un(),f=h.set,p=h.getterFor;return kb={getConstructor:function(v,w,m,g){var S=v(function(_,b){n(_,y),f(_,{type:w,index:r(null),first:null,last:null,size:0}),c||(_.size=0),s(b)||o(b,_[g],{that:_,AS_ENTRIES:m})}),y=S.prototype,I=p(w),O=function(_,b,E){var $=I(_),P=T(_,b),R,A;return P?P.value=E:($.last=P={index:A=d(b,!0),key:b,value:E,previous:R=$.last,next:null,removed:!1},$.first||($.first=P),R&&(R.next=P),c?$.size++:_.size++,A!=="F"&&($.index[A]=P)),_},T=function(_,b){var E=I(_),$=d(b),P;if($!=="F")return E.index[$];for(P=E.first;P;P=P.next)if(P.key===b)return P};return t(y,{clear:function(){for(var b=this,E=I(b),$=E.first;$;)$.removed=!0,$.previous&&($.previous=$.previous.next=null),$=$.next;E.first=E.last=null,E.index=r(null),c?E.size=0:b.size=0},delete:function(_){var b=this,E=I(b),$=T(b,_);if($){var P=$.next,R=$.previous;delete E.index[$.index],$.removed=!0,R&&(R.next=P),P&&(P.previous=R),E.first===$&&(E.first=P),E.last===$&&(E.last=R),c?E.size--:b.size--}return!!$},forEach:function(b){for(var E=I(this),$=i(b,arguments.length>1?arguments[1]:void 0),P;P=P?P.next:E.first;)for($(P.value,P.key,this);P&&P.removed;)P=P.previous},has:function(b){return!!T(this,b)}}),t(y,m?{get:function(b){var E=T(this,b);return E&&E.value},set:function(b,E){return O(this,b===0?0:b,E)}}:{add:function(b){return O(this,b=b===0?0:b,b)}}),c&&e(y,"size",{configurable:!0,get:function(){return I(this).size}}),S},setStrong:function(v,w,m){var g=w+" Iterator",S=p(w),y=p(g);a(v,w,function(I,O){f(this,{type:g,target:I,state:S(I),kind:O,last:null})},function(){for(var I=y(this),O=I.kind,T=I.last;T&&T.removed;)T=T.previous;return!I.target||!(I.last=T=T?T.next:I.state.first)?(I.target=null,u(void 0,!0)):u(O==="keys"?T.key:O==="values"?T.value:[T.key,T.value],!1)},m?"entries":"values",!m,!0),l(w)}},kb}var ck;function Aee(){if(ck)return YF;ck=1;var r=W0(),e=vH();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),YF}var dk;function Dee(){return dk||(dk=1,Aee()),GF}var hk={},Bb,fk;function gH(){return fk||(fk=1,Bb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),Bb}var Lb,pk;function Mee(){if(pk)return Lb;pk=1;var r=nr(),e=gH(),t=r("Map");return Lb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Lb}var vk;function Nee(){if(vk)return hk;vk=1;var r=de(),e=Ce(),t=gi(),i=vi(),n=Pl(),s=Mee(),o=Gs(),a=$e(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,w){i(v),t(w);var m=new u,g=0;return n(v,function(S){var y=w(S,g++);l(m,y)?h(c(m,y),S):d(m,y,[S])}),m}}),hk}var gk={},jb,mk;function Fee(){if(mk)return jb;mk=1;var r=Ce(),e=Js(),t=mr(),i=vi(),n=r("".charAt),s=r("".charCodeAt),o=r("".slice),a=function(u){return function(l,c){var d=t(i(l)),h=e(c),f=d.length,p,v;return h<0||h>=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return jb={codeAt:a(!1),charAt:a(!0)},jb}var yk;function V0(){if(yk)return gk;yk=1;var r=Fee().charAt,e=mr(),t=Un(),i=R0(),n=C0(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),gk}var zb,bk;function kee(){if(bk)return zb;bk=1,to(),Dee(),Nee(),V0();var r=Le();return zb=r.Map,zb}var Hb,_k;function Bee(){if(_k)return Hb;_k=1;var r=kee();return ro(),Hb=r,Hb}var Wb,wk;function Lee(){return wk||(wk=1,Wb=Bee()),Wb}var jee=Lee(),K0=ge(jee);class zee{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},ft(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&ke(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new K0,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const n=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[n]),this._groups.set(e,i)}else{const n=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[n],this._groups.set(e,i)}return i}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var Ek={},Sk;function Hee(){if(Sk)return Ek;Sk=1;var r=de();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),Ek}var Ub,Ok;function Wee(){if(Ok)return Ub;Ok=1,Hee();var r=Le();return Ub=r.Number.isNaN,Ub}var Vb,Ik;function Uee(){if(Ik)return Vb;Ik=1;var r=Wee();return Vb=r,Vb}var Kb,Tk;function Vee(){return Tk||(Tk=1,Kb=Uee()),Kb}var Kee=Vee(),ww=ge(Kee),$k={},Gb,Pk;function Gee(){if(Pk)return Gb;Pk=1;var r=Xe(),e=r.isFinite;return Gb=Number.isFinite||function(i){return typeof i=="number"&&e(i)},Gb}var Rk;function Yee(){if(Rk)return $k;Rk=1;var r=de(),e=Gee();return r({target:"Number",stat:!0},{isFinite:e}),$k}var Yb,Ck;function Xee(){if(Ck)return Yb;Ck=1,Yee();var r=Le();return Yb=r.Number.isFinite,Yb}var Xb,xk;function Jee(){if(xk)return Xb;xk=1;var r=Xee();return Xb=r,Xb}var Jb,qk;function Qee(){return qk||(qk=1,Jb=Jee()),Jb}var Zee=Qee(),fn=ge(Zee),Ak={},Dk;function ete(){if(Dk)return Ak;Dk=1;var r=de(),e=Ji().some,t=io(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),Ak}var Qb,Mk;function tte(){if(Mk)return Qb;Mk=1,ete();var r=At();return Qb=r("Array","some"),Qb}var Zb,Nk;function rte(){if(Nk)return Zb;Nk=1;var r=mt(),e=tte(),t=Array.prototype;return Zb=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},Zb}var e1,Fk;function ite(){if(Fk)return e1;Fk=1;var r=rte();return e1=r,e1}var t1,kk;function nte(){return kk||(kk=1,t1=ite()),t1}var ste=nte(),ote=ge(ste),r1={exports:{}},Bk={},Lk;function ate(){if(Lk)return Bk;Lk=1;var r=de(),e=lt(),t=gr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),Bk}var jk;function ute(){if(jk)return r1.exports;jk=1,ate();var r=Le(),e=r.Object,t=r1.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),r1.exports}var i1,zk;function mH(){if(zk)return i1;zk=1;var r=ute();return i1=r,i1}var n1,Hk;function lte(){if(Hk)return n1;Hk=1;var r=mH();return n1=r,n1}var s1,Wk;function cte(){if(Wk)return s1;Wk=1;var r=lte();return s1=r,s1}var o1,Uk;function dte(){return Uk||(Uk=1,o1=cte()),o1}var hte=dte(),fte=ge(hte),Vk={},Kk;function pte(){if(Kk)return Vk;Kk=1;var r=yt(),e=gr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),Vk}var Gk={},Yk;function vte(){return Yk||(Yk=1,b5()),Gk}var Xk={},Jk;function gte(){return Jk||(Jk=1,_5()),Xk}var Qk={},Zk;function mte(){if(Zk)return Qk;Zk=1;var r=Qe();return r("metadata"),Qk}var a1,e2;function yte(){if(e2)return a1;e2=1;var r=I5();return pte(),vte(),gte(),mte(),a1=r,a1}var t2={},u1,r2;function yH(){if(r2)return u1;r2=1;var r=nr(),e=Ce(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return u1=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},u1}var i2;function bte(){if(i2)return t2;i2=1;var r=de(),e=yH();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),t2}var n2={},l1,s2;function bH(){if(s2)return l1;s2=1;for(var r=Ys(),e=nr(),t=Ce(),i=Ra(),n=yt(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;ch;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),eB}var M1,rB;function gre(){if(rB)return M1;rB=1,vre();var r=Le();return M1=r.Object.getOwnPropertyDescriptors,M1}var N1,iB;function mre(){if(iB)return N1;iB=1;var r=gre();return N1=r,N1}var F1,nB;function yre(){return nB||(nB=1,F1=mre()),F1}var bre=yre(),Hi=ge(bre),k1={exports:{}},sB={},oB;function _re(){if(oB)return sB;oB=1;var r=de(),e=lt(),t=I0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),sB}var aB;function wre(){if(aB)return k1.exports;aB=1,_re();var r=Le(),e=r.Object,t=k1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),k1.exports}var B1,uB;function Ere(){if(uB)return B1;uB=1;var r=wre();return B1=r,B1}var L1,lB;function Sre(){return lB||(lB=1,L1=Ere()),L1}var Ore=Sre(),Rl=ge(Ore),j1,cB;function Ire(){return cB||(cB=1,j1=mH()),j1}var Tre=Ire(),Cl=ge(Tre);function G0(r,e){const t=["node","edge","label"];let i=!0;const n=$i(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(ke(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=$i(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function Ew(r,e,t){if(r.width<=0||r.height<=0)return!1;if(t!==void 0){const s={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*s.x-Math.sin(o)*s.y,y:Math.sin(o)*s.x+Math.cos(o)*s.y}}else e=s}const i=r.x+r.width,n=r.y+r.width;return r.lefte.x&&r.tope.y}function Du(r){return typeof r=="string"&&r!==""}function wH(r,e,t,i){let n=i.x,s=i.y;if(typeof i.distanceToBorder=="function"){const o=i.distanceToBorder(r,e),a=Math.sin(e)*o,u=Math.cos(e)*o;u===o?(n+=o,s=i.y):a===o?(n=i.x,s-=o):(n+=u,s-=a)}else i.shape.width>i.shape.height?(n=i.x+i.shape.width*.5,s=i.y-t):(n=i.x+t,s=i.y-i.shape.height*.5);return{x:n,y:s}}var z1,dB;function $re(){if(dB)return z1;dB=1,to();var r=At();return z1=r("Array","values"),z1}var H1,hB;function Pre(){if(hB)return H1;hB=1;var r=$re();return H1=r,H1}var W1,fB;function Rre(){if(fB)return W1;fB=1,ro();var r=Zs(),e=qt(),t=mt(),i=Pre(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return W1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},W1}var U1,pB;function Cre(){return pB||(pB=1,U1=Rre()),U1}var xre=Cre(),EH=ge(xre);class qre{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let n=t;(t===void 0||t==="")&&(n=" ");const s=this.measureText(n,i),o=ft({},EH(s));o.text=t,o.width=s.width,o.mod=i,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;ee&&(e=n.width),t+=n.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class vB{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[i,n]=this.prepareRegExp(e),s=i.test(this.text.substr(this.position,n));return s&&t&&(this.position+=n-1),s}parseEndTag(e,t,i){let n=this.mod()===e;return e==="mono"?n=n&&this.mono:n=n&&!this.mono,n&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,i;if(e instanceof RegExp)i=e,t=1;else{const n=Are[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class Dre{constructor(e,t,i,n){this.ctx=e,this.parent=t,this.selected=i,this.hover=n;const s=(o,a)=>{if(o===void 0)return 0;const u=this.parent.getFormattingValues(e,i,n,a);let l=0;return o!==""&&(l=this.ctx.measureText(o).width),{width:l,values:u}};this.lines=new qre(s)}process(e){if(!Du(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,` `),e=e.replace(/\r/g,` `);const i=String(e).split(` -`),n=i.length;if(t.multi)for(let s=0;s0)for(let a=0;a0)for(let s=0;s/&/.test(n)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||i(n)||t.add(n),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new vB(e);let i=!0;const n=s=>/\\/.test(s)?(t.positionthis.parent.fontOptions.maxWdt}getLongestFit(e){let t="",i=0;for(;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let n=e.split("\r");for(;n.length>0;){let s=this.getLongestFit(n);if(s===0){const o=n[0],a=this.getLongestFitWord(o);this.lines.newLine(Mr(o).call(o,0,a),t),n[0]=Mr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=Mr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=Mr(n).call(n,o)}}}}const vo=["bold","ital","boldital","mono"];class ws{constructor(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),Du(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Ie(vo,t=>{this.fontOptions[t]={}}),ws.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Ie(e,(t,i)=>{t!=null&&typeof t!="object"&&(this.fontOptions[i]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=$i(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=$i(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=$i(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=$i(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=$i(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=$i(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ve(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=G0("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}addFontOptionsToPile(e,t){for(let i=0;i{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(ke(vo).call(vo,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,i){let n;for(let s=0;s{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,i,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,s,t,i,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,i]=this._setAlignment(e,t,i,n),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=d,c.strokeWidth>0&&e.strokeText(c.text,t+u,i+c.vadjust),e.fillText(c.text,t+u,i+c.vadjust),u+=c.width}i+=a.height}}}_setAlignment(e,t,i,n){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*s):e.textBaseline="middle"}else e.textBaseline=n;return[t,i]}_getColor(e,t,i){let n=e||"#000000",s=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));n=ur(n,o),s=ur(s,o)}return[n,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,i=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,i=-this.size.height*.5;break;case"top":t=s,i=-(this.size.height+2);break;case"bottom":t=s,i=2;break}}return{left:t,top:i,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=n-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,i,n){const s=function(u,l,c){return l==="normal"?c==="mod"?"":u[c]:u[l][c]!==void 0?u[l][c]:u[c]},o={color:s(this.fontOptions,n,"color"),size:s(this.fontOptions,n,"size"),face:s(this.fontOptions,n,"face"),mod:s(this.fontOptions,n,"mod"),vadjust:s(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(n==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,i));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,i,n){return new Dre(e,this,t,i).process(n)}_processLabel(e,t,i){if(this.labelDirty===!1&&!this.differentState(t,i))return;const n=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width0&&n.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),Na(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,i,n,s){i!==void 0&&this.resize(i,n,s),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s)}getDimensionsFromLabel(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);let n=this.textSize.width,s=this.textSize.height;const o=14;return n===0&&(n=o,s=o),{width:n,height:s}}}let Mre=class extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),a5(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}};class Y0 extends Kn{constructor(e,t,i){super(e,t,i),this.labelOffset=0,this.selected=!1}setOptions(e,t,i){this.options=e,t===void 0&&i===void 0||this.setImages(t,i)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=this.options.size*2*i,t=this.options.size*2*n}else{const i=this._getImagePadding();e=this.imageObj.width+i.left+i.right,t=this.imageObj.height+i.top+i.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,i,n){this.initContextForDraw(e,n),E0(e,t,i,n.size),this.performFill(e,n)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let i=1;this.options.shapeProperties.interpolation===!0&&(i=this.imageObj.width/this.width/this.body.view.scale);const n=this._getImagePadding(),s=this.left+n.left,o=this.top+n.top,a=this.width-n.left-n.right,u=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(e,i,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,i,n,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,n,s);u.lineCount>=1&&(o+=u.height/2)}const a=i+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,n,s,"hanging")}}let Nre=class extends Y0{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i),s=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this._drawRawCircle(e,t,i,o),this.updateBoundingBox(t,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,i,n,s)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class Fre extends Y0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){this.switchImages(n),this.resize();let a=t,u=i;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Zi extends Kn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,i)){var s,o;this.labelModule.getTextSize(e,t,i);const a=2*n.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,i,n,s,o,a,u){return this.resize(e,o,a,u),this.left=n-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),ZY(t)(e,n,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,n,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,n,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,n,l,o,a,"hanging")}this.updateBoundingBox(n,s)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function gB(r,e){var t=it(r);if(zi){var i=zi(r);e&&(i=Yt(i).call(i,function(n){return Qi(r,n).enumerable})),t.push.apply(t,i)}return t}function kre(r){for(var e=1;e{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Lre extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){if(this.needsRefresh(t,i)){const s=this.getDimensionsFromLabel(e,t,i).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),u5(e,t-this.width/2,i-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let jre=class extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"diamond",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class zre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"circle",2,t,i,n,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class mB extends Kn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.height=n.height*2,this.width=n.width+n.height,this.radius=.5*this.width}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width*.5,this.top=i-this.height*.5,this.initContextForDraw(e,o),hw(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,t,i,n,s)}distanceToBorder(e,t){e&&this.resize(e);const i=this.width*.5,n=this.height*.5,s=Math.sin(t)*i,o=Math.cos(t)*n;return i*n/Math.sqrt(s*s+o*o)}}class Hre extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){return this.resize(e,n,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=i-this.height/2,this._icon(e,t,i,n,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(t,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,i,n,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:n?"bold":"",(this.options.icon.weight!=null&&n?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,i),this.disableShadow(e,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Wre=class extends Y0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){e.save(),this.switchImages(n),this.resize();let a=t,u=i;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?c:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,d),e.beginPath();let h=n?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=n?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=ur(h,o.opacity),f=ur(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),Na(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Ure extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"square",2,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Vre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"hexagon",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Kre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"star",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Gre extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s),this.disableShadow(e,o),this.updateBoundingBox(t,i,e,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Yre=class extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangle",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Xre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangleDown",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function yB(r,e){var t=it(r);if(zi){var i=zi(r);e&&(i=Yt(i).call(i,function(n){return Qi(r,n).enumerable})),t.push.apply(t,i)}return t}function bB(r){for(var e=1;et[l]!=null);u.push("font"),qu(u,e,a),e.color=mw(e.color)}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(qu(["color","fixed","shadow"],e,t,i),Ye.checkMass(t),e.opacity!==void 0&&(Ye.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ye.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ye.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),ar(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=mw(t.color);tH(e.color,a)}else i===!0&&t.color===null&&(e.color=Fi(n.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=Fi(n.font)),Ye.updateGroupOptions(e,t,s),t.scaling!==void 0&&ar(e.scaling,t.scaling,"label",n.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=ur(e.borderColor,t),e.color=ur(e.color,t),e.shadowColor=ur(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ye.updateGroupOptions(this.options,bB(bB({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Mre(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Nre(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Fre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Bre(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Lre(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new jre(this.options,this.body,this.labelModule);break;case"dot":this.shape=new zre(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new mB(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Hre(this.options,this.body,this.labelModule);break;case"image":this.shape=new Wre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Ure(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Vre(this.options,this.body,this.labelModule);break;case"star":this.shape=new Kre(this.options,this.body,this.labelModule);break;case"text":this.shape=new Gre(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Yre(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Xre(this.options,this.body,this.labelModule);break;default:this.shape=new mB(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.size=this.options.scaling.min+n*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&Ew(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Ew(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.lefte.left&&this.shape.tope.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",sH),e.mass=1}}}class Jre{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=z(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,a,u,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Fi(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Ie(this.nodesListeners,(i,n)=>{this.body.data.nodes&&this.body.data.nodes.off(n,i)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ye.parseOptions(this.options,e),e.opacity!==void 0&&(ww(e.opacity)||!fn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of it(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.nodes;if(Z3("id",e))this.body.data.nodes=e;else if(st(e))this.body.data.nodes=new $u,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new $u;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Ie(this.nodesListeners,function(o,a){n.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i;const n=[];for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:Ye;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ie(this.body.nodes,(t,i)=>{const n=this.body.data.nodes.get(i);n!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(n))})}getPositions(e){const t={};if(e!==void 0){if(st(e)===!0){for(let i=0;i{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var _B={},wB;function Qre(){if(wB)return _B;wB=1;var r=de(),e=Math.hypot,t=Math.abs,i=Math.sqrt,n=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:n},{hypot:function(o,a){for(var u=0,l=0,c=arguments.length,d=0,h,f;l0?(f=h/d,u+=f*f):u+=h;return d===1/0?1/0:d*i(u)}}),_B}var V1,EB;function Zre(){if(EB)return V1;EB=1,Qre();var r=Le();return V1=r.Math.hypot,V1}var K1,SB;function eie(){if(SB)return K1;SB=1;var r=Zre();return K1=r,K1}var G1,OB;function tie(){return OB||(OB=1,G1=eie()),G1}var rie=tie(),iie=ge(rie);class ut{static transform(e,t){st(e)||(e=[e]);const i=t.point.x,n=t.point.y,s=t.angle,o=t.length;for(let a=0;a4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,i,n,s){if(this.from!=this.to)this._line(e,t,i,n,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,i,n,s){e.lineCap="round";const o=st(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)l5(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[i,n]=Mr(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const i=wH(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}_pointOnCircle(e,t,i,n){const s=n*2*Math.PI;return{x:e+i*Math.cos(s),y:t-i*Math.sin(s)}}_findBorderPositionCircle(e,t,i){const n=i.x,s=i.y;let o=i.low,a=i.high;const u=i.direction,l=10,c=this.options.selfReference.size,d=.05;let h,f=(o+a)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));let v=0;do{f=(o+a)*.5,h=this._pointOnCircle(n,s,c,f);const w=Math.atan2(e.y-h.y,e.x-h.x),m=e.distanceToBorder(t,w)+p,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),S=m-g;if(Math.abs(S)0?u>0?o=f:a=f:u>0?a=f:o=f,++v}while(o<=a&&v1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,p=h-o;return Math.sqrt(f*f+p*p)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const p=o.width;t==="from"?(l=this.from,c=this.to,d=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,c=this.from,d=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,c=this.from,d=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const v=15*h+3*p;if(l!=c){const S=iie(l.x-c.x,l.y-c.y),y=v/S;if(t!=="middle")if(this.options.smooth.enabled===!0){const I=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(I.t+y*(t==="from"?1:-1),i);a=Math.atan2(I.y-O.y,I.x-O.x),u=I}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const I=(d?-y:y)/2,O=this.getPoint(.5+I,i),T=this.getPoint(.5-I,i);a=Math.atan2(O.y-T.y,O.x-T.x),u=this.getPoint(.5,i)}}else{const[S,y,I]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:S,y,low:O,high:T,direction:-1});a=_.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=_}else if(t==="to"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:S,y,low:O,high:T,direction:1});a=_.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=_}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(S,y,I,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const w=u.x-v*.9*Math.cos(a),m=u.y-v*.9*Math.sin(a);return{point:u,core:{x:w,y:m},angle:a,length:v,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,SH.draw(e,s)&&(this.enableShadow(e,t),Na(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const i=st(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function $B(r,e){var t=it(r);if(zi){var i=zi(r);e&&(i=Yt(i).call(i,function(n){return Qi(r,n).enumerable})),t.push.apply(t,i)}return t}function PB(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const n=10,s=.2;let o=!1,a=1,u=0,l=this.to,c,d,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{d=(u+a)*.5,c=this.getPoint(d,i);const p=Math.atan2(l.y-c.y,l.x-c.x),v=l.distanceToBorder(t,p)+h,w=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=v-w;if(Math.abs(m)0&&(l=this._getDistanceToLine(p,v,h,f,s,o),u=l{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,i){this._bezierCurve(e,t,i)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[i,n,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:i+s*Math.sin(o),y:n+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToBezierEdge(e,t,i,n,s,o,this.via)}}class CB extends X0{constructor(e,t,i){super(e,t,i)}_line(e,t,i){this._bezierCurve(e,t,i)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let i=Math.abs(this.from.x-this.to.x),n=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;i<=n?s=o=e*n:s=o=e*i,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(i<=n?a=ithis.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return i<=n?this.from.x<=this.to.x?a=this.to.xa?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}_getDistanceToEdge(e,t,i,n,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,n,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,s=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:s}}}class gie extends X0{constructor(e,t,i){super(e,t,i)}_getDistanceToBezierEdge2(e,t,i,n,s,o,a,u){let l=1e9,c=e,d=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const p=.1*f;h[0]=Math.pow(1-p,3),h[1]=3*p*Math.pow(1-p,2),h[2]=3*Math.pow(p,2)*(1-p),h[3]=Math.pow(p,3);const v=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*i,w=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*n;if(f>0){const m=this._getDistanceToLine(c,d,v,w,s,o);l=mMath.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(n=this.from.y,o=this.to.y,i=this.from.x-a*e,s=this.to.x+a*e):(n=this.from.y-a*t,o=this.to.y+a*t,i=this.from.x,s=this.to.x),[{x:i,y:n},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,i,n,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,i,n,s,o,a,u)}getPoint(e){let[t,i]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,s=[Math.pow(1-n,3),3*n*Math.pow(1-n,2),3*Math.pow(n,2)*(1-n),Math.pow(n,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*i.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*i.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class qB extends OH{constructor(e,t,i){super(e,t,i)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let i=this.to,n=this.from;e.id===this.from.id&&(i=this.from,n=this.to);const s=Math.atan2(i.y-n.y,i.x-n.x),o=i.x-n.x,a=i.y-n.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),c=(u-l)/u;return{x:(1-c)*n.x+c*i.x,y:(1-c)*n.y+c*i.y,t:0}}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToLine(e,t,i,n,s,o)}}class ki{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=Fi(n),this.globalOptions=n,this.defaultOptions=s,this.body=t,this.imagelist=i,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new ws(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;ki.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=_H(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=G0("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(so(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(fn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=n.endPointOffset.from!==void 0?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(fn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=n.endPointOffset.to!==void 0?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Du(t.label)?e.label=t.label:Du(e.label)||(e.label=void 0),ar(e,t,"smooth",n),ar(e,t,"shadow",n),ar(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=bn(n.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),ar(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=bn(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=ke(a).call(a,"to")!=-1,e.arrows.middle.enabled=ke(a).call(a,"middle")!=-1,e.arrows.from.enabled=ke(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")ar(e.arrows,t.arrows,"to",n.arrows),ar(e.arrows,t.arrows,"middle",n.arrows),ar(e.arrows,t.arrows,"from",n.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Ma(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=bn(n.arrows));if(t.color!==void 0&&t.color!==null){const a=bs(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ve(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(bs(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else i===!0&&t.color===null&&(e.color=Fi(n.color));i===!0&&t.font===null&&(e.font=Fi(n.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,n=this.options.color.inherit,s={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof RB&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof xB&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof CB&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof qB&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new RB(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new xB(this.options,this.body,this.labelModule):this.edgeType=new CB(this.options,this.body,this.labelModule):this.edgeType=new qB(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.width=this.options.scaling.min+n*s}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=n.from.core),t.fromArrowSrc&&(n.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(n.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(n.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=n.to.core),t.toArrowSrc&&(n.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(n.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(n.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(n.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(n.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(n.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.to)}drawLabel(e,t){if(this.options.label!==void 0){const i=this.from,n=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(i.id!=n.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=wH(e,this.options.selfReference.angle,this.options.selfReference.size,i);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const n=this._getRotation();Ew(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}const i={left:e.x,top:e.y};return this.isOverlappingWith(i)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const i=this.from.x,n=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(i,n,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);const n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return n;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),n.angle=a,n}_pointOnCircle(e,t,i,n){return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class mie{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=z(n=this.create).call(n,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Ve(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n==="dynamic"&&(n="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const c=l.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(n===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:n}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Ie(this.edgesListeners,(n,s)=>{this.body.data.edges&&this.body.data.edges.off(s,n)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){ki.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.edges;if(Z3("id",e))this.body.data.edges=e;else if(st(e))this.body.data.edges=new $u,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new $u;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Ie(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.edges,n=this.body.data.edges;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const i=this.body.edges;Ie(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Ie(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new ki(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const n=i[e];n.from=null,n.to=null,n.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Ie(this.body.edges,(t,i)=>{const n=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];n!==void 0&&n.isCluster===!0||s!==void 0&&s.isCluster===!0||(n===void 0||s===void 0)&&e.push(i)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,i=[];ze(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class IH{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=Tl("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,s=this._formBarnesHutTree(t,i);this.barnesHutTree=s;for(let o=0;o0&&this._getForceContributions(s.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const i=e.centerOfMass.x-t.x,n=e.centerOfMass.y-t.y,s=Math.sqrt(i*i+n*n);s*e.calcSize>this.thetaInversed?this._calculateForces(s,i,n,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,i,n,t,e)}}_calculateForces(e,t,i,n,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));const o=this.options.gravitationalConstant*s.mass*n.options.mass/Math.pow(e,3),a=t*o,u=i*o;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=u}_formBarnesHutTree(e,t){let i;const n=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let w=1;w0&&(ga&&(a=g),Su&&(u=S))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const d=Math.max(1e-5,Math.abs(a-s)),h=.5*d,f=.5*(s+a),p=.5*(o+u),v={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:p-h,maxY:p+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(v.root);for(let w=0;w0&&this._placeInTree(v.root,i);return v}_updateBranchMass(e,t){const i=e.centerOfMass,n=e.mass+t.options.mass,s=1/n;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=s,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=s,e.mass=n;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?n.maxY>t.y?s="NW":s="SW":n.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,i){const n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let i,n,s,o;const a=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:s,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class yie{constructor(e,t,i){this._rng=Tl("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(i)}setOptions(e){this.options=e}solve(){let e,t,i,n,s,o,a,u;const l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,p=4/3;for(let v=0;v0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;n[s.id].x=t*a,n[s.id].y=i*a}}}class Sie{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},ft(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,qu(["stabilization"],this.options,e),ar(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||ww(t.x))&&(t.x=0),(typeof t.y!="number"||ww(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new wie(this.body,this.physicsBody,e),this.edgesSolver=new Y1(this.body,this.physicsBody,e),this.gravitySolver=new Eie(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new yie(this.body,this.physicsBody,e),this.edgesSolver=new Y1(this.body,this.physicsBody,e),this.gravitySolver=new vu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new bie(this.body,this.physicsBody,e),this.edgesSolver=new _ie(this.body,this.physicsBody,e),this.gravitySolver=new vu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new IH(this.body,this.physicsBody,e),this.edgesSolver=new Y1(this.body,this.physicsBody,e),this.gravitySolver=new vu(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=Pu();this.physicsTick(),(Pu()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ni(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,i=0;const n=5;for(let s=0;so&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);const n=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:n.x,vy:n.y},t.options.fixed.x===!1?(n.x=this.calculateComponentVelocity(n.x,i.x,t.options.mass),t.x+=n.x*this.timestep):(i.x=0,n.x=0),t.options.fixed.y===!1?(n.y=this.calculateComponentVelocity(n.y,i.y,t.options.mass),t.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ni(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let i=0;for(;e()&&i"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X1=crypto.getRandomValues.bind(crypto)}return X1(Iie)}const $ie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var AB={randomUUID:$ie};function Pie(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Tie();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Oie(i)}function Mo(r,e,t){return AB.randomUUID?AB.randomUUID():Pie(r)}class Ht{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.shape.boundingBox.left&&(s=a.shape.boundingBox.left),oa.shape.boundingBox.top&&(i=a.shape.boundingBox.top),n1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.x&&(s=a.x),oa.y&&(i=a.y),n{delete this.containedEdges[i.id]}),Ie(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Ie(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Ie(t.edges,i=>{Ie(this.edges,n=>{var s,o;const a=ke(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Ie(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),ii(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class Cie{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ft(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const i=[];for(let n=0;n=e&&i.push(s.id)}for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const i={},n={};Ie(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Ie(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(n[a.id]=a)}))}),this._cluster(i,n,e,t)}clusterByEdgeCount(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const n=[],s={};let o,a,u;for(let l=0;l0&&it(d).length>0&&v===!0){const m=function(){for(let g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var i;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=Ht.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[p.id]=p)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=it(e),h=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&this.clusteredNodes[c]!==void 0&&s.push(c);for(let c=0;cn?a.x:n,s=a.yo?a.y:o;return{x:.5*(i+n),y:.5*(s+o)}}openCluster(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const n=this.body.nodes[e];if(n===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(n.isCluster!==!0||n.containedNodes===void 0||n.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=ke(s).call(s,e)-1;if(o>=0){const c=s[o];this.body.nodes[c]._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}const a=n.containedNodes,u=n.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const c={},d={x:n.x,y:n.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];c[f]={x:p.x,y:p.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];h[f]!==void 0&&(p.x=h[f].x===void 0?n.x:h[f].x,p.y=h[f].y===void 0?n.y:h[f].y)}}else Ie(a,function(c){c.options.fixed.x===!1&&(c.x=n.x),c.options.fixed.y===!1&&(c.y=n.y)});for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=this.body.nodes[c];d.vx=n.vx,d.vy=n.vy,d.setOptions({physics:!0}),delete this.clusteredNodes[c]}const l=[];for(let c=0;c0&&on&&(n=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),i+=1}e=e/i,t=t/i;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>n&&(a=n),a}_createClusteredEdge(e,t,i,n,s){const o=Ht.cloneOptions(i,"edge");Ve(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+Mo(),s!==void 0&&Ve(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[i.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,i,n){if(t instanceof ki){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Ye){const s=e,o={};o[s.id]=s,e=o}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");n===void 0&&(n=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,n);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:i.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}_filter(e,t){const i=[];return Ie(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Ie(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}n(function(u){for(let l=0;l{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(i[u]=u)}),n(function(u){Ie(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Ie(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Ie(d,f=>{const p=this.body.edges[f];p!==void 0&&p.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Ie(i,l=>{delete u.containedEdges[l],Ie(u.edges,(c,d)=>{if(c.id===l){u.edges[d]=null;return}c.clusteringEdgeReplacingIds=this._filter(c.clusteringEdgeReplacingIds,function(h){return!i[h]})}),u.edges=this._filter(u.edges,function(c){return c!==null})})}),Ie(i,u=>{delete this.clusteredEdges[u]}),Ie(i,u=>{delete this.body.edges[u]});const s=it(this.body.edges);Ie(s,u=>{const l=this.body.edges[u],c=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(c!==this._isClusteredEdge(l.id))if(c){const d=this._getClusterNodeForNode(l.fromId);d!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,d);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];n(function(l){const c=it(l.containedNodes).length,d=l.options.allowSingleNodeCluster===!0;(d&&c<1||!d&&c<2)&&u.push(l.id)});for(let l=0;l0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class xie{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},ft(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ni(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&so(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,s),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(i,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,n,s)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let i;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i=t[n],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.nodes,n=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:l.y,left:l.x,bottom:c.y,right:c.x},h=[];for(let w=0;w{for(const w of h)w()}}}_drawEdges(e){const t=this.body.edges,i=this.body.edgeIndices;for(let n=0;n{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&so(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const n=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;n.observe(s),this._cleanupCallbacks.push(()=>{n.unobserve(s)})}else{const n=Mie(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=z(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;ze(e=yn(t=ii(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,n=>{try{n()}catch(s){console.error(s)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;const n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(ke(e).call(e,"%")!==-1||ke(e).call(e,"px")!==-1)return e;if(ke(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new _s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:_s.DIRECTION_ALL}),Mu(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new _s(this.frame),TH(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let i=!1;const n=this.frame.canvas.width,s=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function Fie(r,e){const t=ft({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!st(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class kie{constructor(e,t){var i,n;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",z(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(n=this.releaseNode).call(n,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Fie(e,this.body.nodeIndices);const i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;let s,o;if(i===0||n===0)o=1,s=Ht.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=Ht.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const d=Math.min(i/600,n/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),s=Ht.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,c=Math.abs(s.maxY-s.minY)*1.1,d=i/l,h=n/c;o=d<=h?d:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!fn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!fn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!fn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!fn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var n;this.viewFunction=z(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},n=this.body.view.translation,s={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=VZ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function NB(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,i={},n={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,d){if(n[d][c.keyCode]!==void 0){for(var h=n[d][c.keyCode],f=0;f{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=NB({container:window,preventDefault:!0}):this.keycharm=NB({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,i,n,s,o,a,u,l,c,d,h,f,p,v,w,m,g,S,y,I,O,T,_;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(p=this.keycharm).call(p,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(v=this.keycharm).call(v,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(w=this.keycharm).call(w,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(S=this.keycharm).call(S,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(I=this.keycharm).call(I,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(T=this.keycharm).call(T,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(_=this.keycharm).call(_,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class Lie{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,p,v,w;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new Bie(e,t),this.body.eventListeners.onTap=z(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=z(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=z(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=z(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=z(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=z(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=z(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=z(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=z(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=z(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(w=this.getPointer).call(w,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},ft(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(qu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),ar(this.options,e,"keyboard"),e.tooltip&&(ft(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=mw(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-zZ(this.canvas.frame.canvas),y:e.y-HZ(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const i=function(n,s){const o=[];for(let a=0;a{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+n)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const n=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const i=this.body.selectionBox.position,n={minX:Math.min(i.start.x,i.end.x),minY:Math.min(i.start.y,i.end.y),maxX:Math.max(i.start.x,i.end.x),maxY:Math.max(i.start.y,i.end.y)},s=Yt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=n.minX&&u.x<=n.maxX&&u.y>=n.minY&&u.y<=n.maxY});ze(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const i=this.drag.selection;i&&i.length?(ze(i).call(i,function(n){n.node.options.fixed.x=n.xFixed,n.node.options.fixed.y=n.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const i=this.pinch.scale*e.scale;this.zoom(i,t)}zoom(e,t){if(this.options.zoomView===!0){const i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let n;this.drag!==void 0&&this.drag.dragging===!0&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/i,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},n!=null){const l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),ithis._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:i,right:t,bottom:i},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new eee(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){const n=this.selectionHandler.getNodeAt(e);i=n===void 0?!1:n.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var FB={},kB={},BB;function jie(){if(BB)return kB;BB=1;var r=W0(),e=vH();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),kB}var LB;function zie(){return LB||(LB=1,jie()),FB}var jB={},Z1,zB;function Gn(){if(zB)return Z1;zB=1;var r=Ks(),e=TypeError;return Z1=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},Z1}var e_,HB;function Yn(){if(HB)return e_;HB=1;var r=nr(),e=gH(),t=r("Set"),i=t.prototype;return e_={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},e_}var t_,WB;function Xn(){if(WB)return t_;WB=1;var r=er();return t_=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},t_}var r_,UB;function za(){if(UB)return r_;UB=1;var r=Xn();return r_=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},r_}var i_,VB;function J0(){if(VB)return i_;VB=1;var r=Yn(),e=za(),t=r.Set,i=r.add;return i_=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},i_}var n_,KB;function Ha(){return KB||(KB=1,n_=function(r){return r.size}),n_}var s_,GB;function Hie(){return GB||(GB=1,s_=function(r){return{iterator:r,next:r.next,done:!1}}),s_}var o_,YB;function Jn(){if(YB)return o_;YB=1;var r=gi(),e=Wr(),t=er(),i=Js(),n=Hie(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},o_=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},o_}var a_,XB;function Wie(){if(XB)return a_;XB=1;var r=Gn(),e=Yn(),t=J0(),i=Ha(),n=Jn(),s=za(),o=Xn(),a=e.has,u=e.remove;return a_=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},a_}var u_,JB;function Qn(){return JB||(JB=1,u_=function(){return!1}),u_}var QB;function Uie(){if(QB)return jB;QB=1;var r=de(),e=Wie(),t=$e(),i=Qn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),jB}var ZB={},l_,eL;function Vie(){if(eL)return l_;eL=1;var r=Gn(),e=Yn(),t=Ha(),i=Jn(),n=za(),s=Xn(),o=e.Set,a=e.add,u=e.has;return l_=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},l_}var tL;function Kie(){if(tL)return ZB;tL=1;var r=de(),e=$e(),t=Vie(),i=Qn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),ZB}var rL={},c_,iL;function Gie(){if(iL)return c_;iL=1;var r=Gn(),e=Yn().has,t=Ha(),i=Jn(),n=za(),s=Xn(),o=z0();return c_=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},c_}var nL;function Yie(){if(nL)return rL;nL=1;var r=de(),e=Gie(),t=Qn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),rL}var sL={},d_,oL;function Xie(){if(oL)return d_;oL=1;var r=Gn(),e=Ha(),t=za(),i=Jn();return d_=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},d_}var aL;function Jie(){if(aL)return sL;aL=1;var r=de(),e=Xie(),t=Qn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),sL}var uL={},h_,lL;function Qie(){if(lL)return h_;lL=1;var r=Gn(),e=Yn().has,t=Ha(),i=Jn(),n=Xn(),s=z0();return h_=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};No(this,sn,new CL),No(this,on,new CL),No(this,S_,void 0),Sw(S_,this,e)}get sizeNodes(){return Ue(sn,this).size}get sizeEdges(){return Ue(on,this).size}getNodes(){return Ue(sn,this).getSelection()}getEdges(){return Ue(on,this).getSelection()}addNodes(){Ue(sn,this).add(...arguments)}addEdges(){Ue(on,this).add(...arguments)}deleteNodes(e){Ue(sn,this).delete(e)}deleteEdges(e){Ue(on,this).delete(e)}clear(){Ue(sn,this).clear(),Ue(on,this).clear()}commit(){const e={nodes:Ue(sn,this).commit(),edges:Ue(on,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&so(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}generateClickEvent(e,t,i,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,i);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}n!==void 0&&(o.previousSelection=n),e=="click"&&(o.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ye?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],i=this.body.nodes;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(i);if(n.length>0)return t===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}_getEdgesOverlappingWith(e,t){const i=this.body.edges;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this.canvas.DOMtoCanvas(e);let n=10,s=null;const o=this.body.edges;for(let a=0;a0&&(this.generateClickEvent("deselectEdge",t,e,s),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return Ps(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return Ps(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const i of e.nodes){const n=this.body.nodes[i];if(!n)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(n,t.highlightEdges)}if(e.edges)for(const i of e.edges){const n=this.body.edges[i];if(!n)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(n)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),i=[],n=this.body.nodeIndices,s=this.body.nodes;for(let u=n.length-1;u>=0;u--){const c=s[n[u]].getItemsOnPoint(t);i.push.apply(i,c)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const c=a[o[u]].getItemsOnPoint(t);i.push.apply(i,c)}return i}}var xL={},O_,qL;function yne(){if(qL)return O_;qL=1;var r=Qs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var T="",_,b,E,$;for(_=65;_<76;_++){switch(b=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:E=3;break;case 68:case 71:E=4;break;default:E=2}for($=0;$<47;$++)p.push({k:b+$,v:E})}for(p.sort(function(P,R){return R.v-P.v}),$=0;$o(b)?1:-1}};return r({target:"Array",proto:!0,forced:I},{sort:function(_){_!==void 0&&t(_);var b=i(this);if(y)return _===void 0?v(b):v(b,_);var E=[],$=n(b),P,R;for(R=0;R<$;R++)R in b&&w(E,b[R]);for(u(E,O(_)),P=n(E),R=0;R=0:p>v;v+=w)v in f&&(d=l(d,f[v],v,h));return d}};return q_={left:o(!1),right:o(!0)},q_}var A_,HL;function Rne(){if(HL)return A_;HL=1;var r=P5();return A_=r==="NODE",A_}var WL;function Cne(){if(WL)return jL;WL=1;var r=de(),e=Pne().left,t=io(),i=Pa(),n=Rne(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),jL}var D_,UL;function xne(){if(UL)return D_;UL=1,Cne();var r=At();return D_=r("Array","reduce"),D_}var M_,VL;function qne(){if(VL)return M_;VL=1;var r=mt(),e=xne(),t=Array.prototype;return M_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},M_}var N_,KL;function Ane(){if(KL)return N_;KL=1;var r=qne();return N_=r,N_}var F_,GL;function Dne(){return GL||(GL=1,F_=Ane()),F_}var Mne=Dne(),RH=ge(Mne);class CH{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class Nne extends CH{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){Es(e).call(e,function(t,i){return t.x-i.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class Fne extends CH{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){Es(e).call(e,function(t,i){return t.y-i.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var YL={},XL;function kne(){if(XL)return YL;XL=1;var r=de(),e=Ji().every,t=io(),i=t("every");return r({target:"Array",proto:!0,forced:!i},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),YL}var k_,JL;function Bne(){if(JL)return k_;JL=1,kne();var r=At();return k_=r("Array","every"),k_}var B_,QL;function Lne(){if(QL)return B_;QL=1;var r=mt(),e=Bne(),t=Array.prototype;return B_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},B_}var L_,ZL;function jne(){if(ZL)return L_;ZL=1;var r=Lne();return L_=r,L_}var j_,ej;function zne(){return ej||(ej=1,j_=jne()),j_}var Hne=zne(),xH=ge(Hne);function Wne(r,e){const t=new Ci;return ze(r).call(r,i=>{var n;ze(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),ze(t).call(t,i=>{const n=i.from.id,s=i.to.id;e[n]==null&&(e[n]=0),(e[s]==null||e[n]>=e[s])&&(e[s]=e[n]+1)}),e}function Une(r){return qH(e=>{var t,i;return xH(t=Yt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function Vne(r){return qH(e=>{var t,i;return xH(t=Yt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.from===e)},(e,t)=>td+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[d,h]of i){if(!i.has(d)||!r(h))continue;s[d]=0;const f=[h];let p=0,v;for(;v=f.pop();){var l,c;if(!i.has(d))continue;const w=s[v.id]+u;if(ze(l=Yt(c=v.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==v&&i.has(m.toId)&&i.has(m.fromId))).call(l,m=>{const g=m[a],S=s[g];(S==null||e(w,S))&&(s[g]=w,f.push(m[t]))}),p>o)return Wne(i,s);++p}}return s}class Kne{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},i=n=>{if(t[n]!==void 0)return t[n];let s=this.levels[n];if(this.childrenReference[n]){const o=this.childrenReference[n];if(o.length>0)for(let a=0;as-o);for(const s of n)t.set(s,i++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let i=1e9,n=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];i=Math.min(u.x,i),n=Math.max(u.x,n),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:i,max_x:n,min_y:s,max_y:o}}hasSameParent(e,t){const i=this.parentReference[e.id],n=this.parentReference[t.id];if(i===void 0||n===void 0)return!1;for(let s=0;s{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const i=this.options.hierarchical,n=i.enabled;if(so(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),ar(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return n===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(n===!0)return this.body.emitter.emit("refresh"),Ve(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=Tl(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{const n=e.edges.smooth;n.type!==void 0&&n.type!=="dynamic"&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:n.enabled===void 0?!0:n.enabled,type:n.type===void 0?"dynamic":n.type,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}},e.edges.smooth={enabled:n.enabled===void 0?!0:n.enabled,type:i,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let i=0;is){const u=e.length;for(;e.length>s&&n<=10;){n+=1;const l=e.length;n%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const c=e.length;if(l==c&&n%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*u)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const a=70;for(let u=0;u0){let e,t,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new Kne;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(n===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const i={},n=()=>{const m=o();let g=0;for(let S=0;S{const S=this.hierarchical.trees;for(const y in S)Object.prototype.hasOwnProperty.call(S,y)&&S[y]===m&&this.direction.shift(y,g)},o=()=>{const m=[];for(let g=0;g{if(!g[m.id]&&(g[m.id]=!0,this.hierarchical.childrenReference[m.id])){const S=this.hierarchical.childrenReference[m.id];if(S.length>0)for(let y=0;y1&&arguments[1]!==void 0?arguments[1]:1e9,S=1e9,y=1e9,I=1e9,O=-1e9;for(const T in m)if(Object.prototype.hasOwnProperty.call(m,T)){const _=e.body.nodes[T],b=e.hierarchical.levels[_.id],E=e.direction.getPosition(_),[$,P]=e._getSpaceAroundNode(_,m);S=Math.min($,S),y=Math.min(P,y),b<=g&&(I=Math.min(E,I),O=Math.max(E,O))}return[I,O,S,y]},l=(m,g)=>{const S=this.hierarchical.getMaxLevel(m.id),y=this.hierarchical.getMaxLevel(g.id);return Math.min(S,y)},c=(m,g,S)=>{const y=this.hierarchical;for(let I=0;I1)for(let _=0;_2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),I=e.direction.getPosition(g),O=Math.abs(I-y),T=e.options.hierarchical.nodeSpacing;if(O>T){const _={},b={};a(m,_),a(g,b);const E=l(m,g),$=u(_,E),P=u(b,E),R=$[1],A=P[0],B=P[2];if(Math.abs(R-A)>T){let H=R-A+T;H<-B+T&&(H=-B+T),H<0&&(e._shiftBlock(g.id,H),t=!0,S===!0&&e._centerParent(g))}}},h=(m,g)=>{const S=g.id,y=g.edges,I=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,T={},_=[];for(let B=0;B{let H=0;for(let te=0;te{let H=0;for(let te=0;te{let H=this.direction.getPosition(g);const te={};for(let pe=0;pe{const Z=this.direction.getPosition(g);if(i[g.id]===void 0){const me={};a(g,me),i[g.id]=me}const H=u(i[g.id]),te=H[2],pe=H[3],we=B-Z;let re=0;we>0?re=Math.min(we,pe-this.options.hierarchical.nodeSpacing):we<0&&(re=-Math.min(-we,te-this.options.hierarchical.nodeSpacing)),re!=0&&(this._shiftBlock(g.id,re),t=!0)},R=B=>{const Z=this.direction.getPosition(g),[H,te]=this._getSpaceAroundNode(g),pe=B-Z;let we=Z;pe>0?we=Math.min(Z+(te-this.options.hierarchical.nodeSpacing),B):pe<0&&(we=Math.max(Z-(H-this.options.hierarchical.nodeSpacing),B)),we!==Z&&(this.direction.setPosition(g,we),t=!0)};let A=$(m,_);P(A),A=$(m,y),R(A)},f=m=>{let g=this.hierarchical.getLevels();g=yn(g).call(g);for(let S=0;S{let g=this.hierarchical.getLevels();g=yn(g).call(g);for(let S=0;S{for(const m in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,m)&&this._centerParent(this.body.nodes[m])},w=()=>{let m=this.hierarchical.getLevels();m=yn(m).call(m);for(let g=0;g0&&Math.abs(d)0&&(l=this.direction.getPosition(n[o-1])+u),this.direction.setPosition(a,l,i),this._validatePositionAndContinue(a,i,l),s++}}}}_placeBranchNodes(e,t){var i;const n=this.hierarchical.childrenReference[e];if(n===void 0)return;const s=[];for(let a=0;at&&this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let d;a===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(s[a-1])+c,this.direction.setPosition(u,d,l),this._validatePositionAndContinue(u,l,d)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-n{var n;ke(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Ie(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Ie(e,n=>{i.push(Number(n))}),Es(i).call(i,function(n,s){return s-n}),i}_determineLevelsByHubsize(){const e=(i,n)=>{this.hierarchical.levelDownstream(i,n)},t=this._getHubSizes();for(let i=0;i{const o=this.body.nodes[s];n===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(n,s,o){},i=(n,s,o)=>{let a=this.hierarchical.levels[n.id];a===void 0&&(a=this.hierarchical.levels[n.id]=1e5);const u=t(Ht.cloneOptions(n,"node"),Ht.cloneOptions(s,"node"),Ht.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=RH(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new K0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Vne(t):this.hierarchical.levels=Une(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,i)=>{this.hierarchical.levels[i.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const i={},n=(s,o)=>{if(i[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),i[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l{if(i[s])return;i[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{this._clean()}),this.body.emitter.on("_dataChanged",z(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",z(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ve(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),s=i+n,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):n===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Ve({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,i=>{i!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(i),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,i,n,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",z(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",z(s=this._dragStartEdge).call(s,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,i,n,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",z(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",z(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const c=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=c.from.x,a.y=c.from.y),u.selected===!1&&(u.x=c.to.x,u.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let i;if(e.length>0){for(let n=0;n0&&typeof this.options.deleteEdge=="function"&&(i=this.options.deleteEdge);if(typeof i=="function"){const n={nodes:e,edges:t};if(i.length===2)i(n,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const i=Ve({},this.options.controlNodeStyle);i.id="targetNode"+Mo(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;const n=this.body.functions.createNode(i);return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}_createEditButton(){var e;this._clean(),this.manipulationDOM={},Ti(this.editModeDiv);const t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(Ti(this.editModeDiv),Ti(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of ii(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Ti(this.manipulationDiv),Ti(this.editModeDiv),Ti(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";const n=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=n,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Ma(it(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e{i.destroy()});const n=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",n,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,n.to.id):this._performEditEdge(n.from.id,o.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=ft({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);const s=this.body.functions.createEdge({id:"connectionEdge"+Mo(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(ke(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(ke(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[n]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(n,o.id)),e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:Mo(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,i=>{i!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const i={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(i,n=>{n!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let n=this.options.editEdge;if(typeof n=="object"&&(n=n.editWithoutDrag),typeof n=="function")if(n.length===2)n(i,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[i.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const Y="string",j="boolean",M="number",_o="array",le="object",AH="dom",Xne="any",z_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],H_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:Y,undefined:"undefined"},chosen:{label:{boolean:j,function:"function"},node:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:j},y:{boolean:j},__type__:{object:le,boolean:j}},font:{align:{string:Y},color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},group:{string:Y,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:Y},__type__:{object:le,boolean:j,number:M}},hidden:{boolean:j},icon:{face:{string:Y},code:{string:Y},size:{number:M},color:{string:Y},weight:{string:Y,number:M},__type__:{object:le}},id:{string:Y,number:M},image:{selected:{string:Y,undefined:"undefined"},unselected:{string:Y,undefined:"undefined"},__type__:{object:le,string:Y}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},level:{number:M,undefined:"undefined"},margin:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},mass:{number:M},physics:{boolean:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:j,array:_o},borderRadius:{number:M},interpolation:{boolean:j},useImageSize:{boolean:j},useBorderWithImage:{boolean:j},coordinateOrigin:{string:["center","top-left"]},__type__:{object:le}},size:{number:M},title:{string:Y,dom:AH,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:le,boolean:j,number:M}},x:{number:M},y:{number:M},__type__:{object:le}},Jne={configure:{enabled:{boolean:j},filter:{boolean:j,string:Y,array:_o,function:"function"},container:{dom:AH},showButton:{boolean:j},__type__:{object:le,boolean:j,string:Y,array:_o,function:"function"}},edges:{arrows:{to:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:z_},imageHeight:{number:M},imageWidth:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},middle:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:z_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},from:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:z_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},__type__:{string:["from","to","middle"],object:le}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:le,number:M}},arrowStrikethrough:{boolean:j},background:{enabled:{boolean:j},color:{string:Y},size:{number:M},dashes:{boolean:j,array:_o},__type__:{object:le,boolean:j}},chosen:{label:{boolean:j,function:"function"},edge:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:["from","to","both"],boolean:j},opacity:{number:M},__type__:{object:le,string:Y}},dashes:{boolean:j,array:_o},font:{color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},hidden:{boolean:j},hoverWidth:{function:"function",number:M},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},length:{number:M,undefined:"undefined"},physics:{boolean:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:j},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},smooth:{enabled:{boolean:j},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:j},__type__:{object:le,boolean:j}},title:{string:Y,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:le,boolean:j,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:le}},groups:{useDefaultGroups:{boolean:j},__any__:H_,__type__:{object:le}},interaction:{dragNodes:{boolean:j},dragView:{boolean:j},hideEdgesOnDrag:{boolean:j},hideEdgesOnZoom:{boolean:j},hideNodesOnDrag:{boolean:j},hover:{boolean:j},keyboard:{enabled:{boolean:j},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:le}},bindToWindow:{boolean:j},autoFocus:{boolean:j},__type__:{object:le,boolean:j}},multiselect:{boolean:j},navigationButtons:{boolean:j},selectable:{boolean:j},selectConnectedEdges:{boolean:j},hoverConnectedEdges:{boolean:j},tooltipDelay:{number:M},zoomView:{boolean:j},zoomSpeed:{number:M},__type__:{object:le}},layout:{randomSeed:{undefined:"undefined",number:M,string:Y},improvedLayout:{boolean:j},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:j},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:j},edgeMinimization:{boolean:j},parentCentralization:{boolean:j},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:le,boolean:j}},__type__:{object:le}},manipulation:{enabled:{boolean:j},initiallyActive:{boolean:j},addNode:{boolean:j,function:"function"},addEdge:{boolean:j,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:le,boolean:j,function:"function"}},deleteNode:{boolean:j,function:"function"},deleteEdge:{boolean:j,function:"function"},controlNodeStyle:H_,__type__:{object:le,boolean:j}},nodes:H_,physics:{enabled:{boolean:j},barnesHut:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},forceAtlas2Based:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},repulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},__type__:{object:le}},hierarchicalRepulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},maxVelocity:{number:M},minVelocity:{number:M},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:j},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:j},fit:{boolean:j},__type__:{object:le,boolean:j}},timestep:{number:M},adaptiveTimestep:{boolean:j},wind:{x:{number:M},y:{number:M},__type__:{object:le}},__type__:{object:le,boolean:j}},autoResize:{boolean:j},clickToUse:{boolean:j},locale:{string:Y},locales:{__any__:{any:Xne},__type__:{object:le}},height:{string:Y},width:{string:Y},__type__:{object:le}},DH={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Qne=(r,e,t)=>{var i;return!!(Mi(r).call(r,"physics")&&Mi(i=DH.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class Zne{constructor(){}getDistances(e,t,i){const n={},s=e.edges;for(let a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let c=1e9,d=0,h=0,f=0,p=0,v=0;for(;c>s&&ao&&vthis.body.emitter.emit("_requestRedraw")),this.groups=new zee,this.canvas=new Nie(this.body),this.selectionHandler=new mne(this.body,this.canvas),this.interactionHandler=new Lie(this.body,this.canvas,this.selectionHandler),this.view=new kie(this.body,this.canvas),this.renderer=new xie(this.body,this.canvas),this.physics=new Sie(this.body),this.layoutEngine=new Gne(this.body),this.clustering=new Cie(this.body),this.manipulation=new Yne(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Jre(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new mie(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new ese(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}c5(ue.prototype);ue.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(tee.validate(r,Jne)===!0&&console.error("%cErrors have been found in the supplied options object.",sH),so(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=Iee(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new ZZ(this,this.body.container,DH,this.canvas.pixelRatio,Qne)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ve(i.nodes,this.nodesHandler.options),Ve(i.edges,this.edgesHandler.options),Ve(i.layout,this.layoutEngine.options),Ve(i.interaction,this.selectionHandler.options),Ve(i.interaction,this.renderer.options),Ve(i.interaction,this.interactionHandler.options),Ve(i.manipulation,this.manipulation.options),Ve(i.physics,this.physics.options),Ve(i.global,this.canvas.options),Ve(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new QZ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ue.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t],n=r[i.fromId],s=r[i.toId],o=n!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&o&&n.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(i.id)}};ue.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ue.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=dee(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=hee(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ue.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];Ti(this.body.container)};ue.prototype._updateValueRange=function(r){let e,t,i,n=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),i=i===void 0?s:Math.max(s,i),n+=s)}if(t!==void 0&&i!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,i,n)};ue.prototype.isActive=function(){return!this.activator||this.activator.active};ue.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ue.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ue.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ue.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ue.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ue.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ue.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ue.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ue.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ue.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ue.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ue.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ue.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ue.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ue.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ue.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ue.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ue.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ue.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ue.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ue.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ue.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ue.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ue.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ue.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ue.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ue.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ue.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ue.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ue.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ue.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ue.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ue.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ue.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ue.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ue.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ue.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ue.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ue.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ue.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ue.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ue.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ue.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ue.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ue.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ue.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const tse={class:"data-container text-container"},rse={class:"messages-block",ref:"scrollContainer"},ise={class:"center-block-custom"},nse=["onClick","id"],sse={class:"message-content"},ose={key:0,class:"hr"},ase={class:"nodes-container"},use={class:"checkbox-green"},lse={class:"checkbox-green"},cse={class:"scroll-y"},dse=["onMouseenter"],hse=["onClick"],fse={key:0},pse=["onClick"],vse={class:"edit-node-container"},gse={class:"scroll-y-right"},mse=["onClick"],yse=["onUpdate:modelValue"],bse=["onClick"],_se=fr({__name:"EditorWindow",setup(r){const e=rt(),t=rt({nodes:[],edges:[]}),i={code:"",name:"",text:"",applications:[],id:"",label:"",links:[]},n=rt(""),s=rt({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]}),o=rt({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]});let a={},u={};const l=rt(0),c=rt(0),d=rt(!1),h=rt(!0);async function f(){t.value=await _V(),c.value=t.value.edges.length,h.value&&(t.value.edges=t.value.edges.filter(function(b){return b.type!=="application"})),t.value.edges.map(function(b){b.type=="application"&&(b.color="#aaaaaa")}),t.value.nodes=t.value.nodes.map(function(b){return b.id=b.code,b.label=b.name,b}),l.value=t.value.edges.length,u={nodes:t.value.nodes,edges:t.value.edges.sort(function(b,E){return b.type=="application"?1:E.type=="application"?-1:0})},a.setData(u),console.log(t.value.edges)}oa(async()=>{if(!e.value)return;const b={interaction:{selectable:!0},nodes:{color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#960000",background:"#ff9494"},hover:{border:"#2B7CE9",background:"#D2E5FF"}}}};a=new ue(e.value,u,b),a.on("click",function(E){if(console.log("click graph:",E),E.nodes.length>0){const $=t.value.nodes.find(function(P){return P.code==E.nodes[0]});$!==void 0&&w($)}else E.edges.length>0&&console.log("Clicked edge:",E.edges[0])}),await f(),w(t.value.nodes[0])});function p(){s.value.applications.push({name:""})}function v(b){s.value.applications=s.value.applications.filter(function(E){return E.name!=b})}function w(b){var $;console.log("Select node:",b),n.value=b.code,s.value=b;const E=t.value.edges.filter(function(P){return P.from==b.code}).map(function(P){const R=P.to;return t.value.nodes.filter(function(B){return B.code==R})[0]});s.value.links=E,a.selectNodes([s.value.code]),d.value||($=window.document.getElementById(b.code))==null||$.scrollIntoView({behavior:"smooth",block:"center"})}function m(b){console.log("Focus node:",b.code),o.value=b}function g(b){console.log("Focus node:",b.code),navigator.clipboard.writeText("(["+b.code+"])"),o.value=i}async function S(){console.log("Update node:",s.value),await Kl(n.value,s.value),await f();const b=t.value.nodes.filter(function(E){return E.code==s.value.code});w(b[0])}async function y(){console.log("Delete node:",s.value),s.value.code="",await Kl(n.value,s.value),await f()}async function I(){console.log("Add node:",s.value),s.value.code=n.value,await Kl("",s.value),await f();const b=t.value.nodes.filter(function(E){return E.code==s.value.code});w(b[0])}async function O(){console.log("Clear node"),w(i)}function T(b){return"["+b.code+"] - "+b.name}function _(b){d.value=b,d.value&&f()}return(b,E)=>(Me(),et(nt,null,[at(Uw,null,{default:vn(()=>E[11]||(E[11]=[V("div",null," Редактор сценариев ",-1)])),_:1}),V("div",{class:Pi([d.value?"text-container-disable":""])},[V("div",tse,[V("div",rse,[V("div",ise,[(Me(!0),et(nt,null,un(t.value.nodes,$=>(Me(),et("div",{key:$.id,onClick:P=>w($),id:$.code},[V("div",{class:Pi(["message-cloud",[$.code==s.value.code?"selected-message-cloud":""]])},[V("div",{class:Pi(["message-header",[$.code==s.value.code?"selected-message-header":""]])},tt($.code)+": "+tt($.name),3),E[12]||(E[12]=V("hr",{class:"hr"},null,-1)),V("div",sse,tt($.text),1),$.applications.length?(Me(),et("hr",ose)):$o("",!0),(Me(!0),et(nt,null,un($.applications,P=>(Me(),et("div",{class:"message-footer",key:P.name}," Приложение: "+tt(P.name),1))),128))],2)],8,nse))),128))])],512)])],2),V("div",{class:Pi([d.value?"":"graph-container-disable"])},[V("div",{ref_key:"network",ref:e,class:"data-container graph-container"},null,512)],2),V("div",ase,[E[17]||(E[17]=V("h2",null,"Точки",-1)),V("div",null,"Всего точек: "+tt(t.value.nodes.length),1),V("div",null,[E[14]||(E[14]=Ri(" Отображать граф: ")),V("label",use,[V("input",{type:"checkbox",onClick:E[0]||(E[0]=$=>_(!d.value))}),E[13]||(E[13]=V("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])]),V("div",null,[Ri(" Всего связей: "+tt(c.value)+", показано: "+tt(l.value)+" ",1),V("div",null,[E[16]||(E[16]=Ri(" Показать все связи: ")),V("label",lse,[V("input",{type:"checkbox",onClick:E[1]||(E[1]=$=>(h.value=!h.value,f()))}),E[15]||(E[15]=V("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])])]),E[18]||(E[18]=V("hr",{class:"hr"},null,-1)),V("div",cse,[(Me(!0),et(nt,null,un(t.value.nodes,$=>(Me(),et("div",{key:$.code},[V("span",{onMouseenter:P=>m($),onMouseleave:E[2]||(E[2]=P=>m(i))},[V("span",{class:Pi([[$.code==s.value.code?"selected-node":""],"node-select-button"]),onClick:P=>w($)},tt(T($)),11,hse),$.applications.length>0?(Me(),et("span",fse," ("+tt($.applications.length)+")",1)):$o("",!0),$.code==o.value.code?(Me(),et("span",{key:1,class:"copy-node-link",onClick:P=>g($)}," Ссылка ",8,pse)):$o("",!0)],40,dse)]))),128))])]),V("div",vse,[V("div",gse,[E[23]||(E[23]=V("h2",null,"Редактирование точки",-1)),V("div",null,[go(V("input",{"onUpdate:modelValue":E[3]||(E[3]=$=>n.value=$),type:"text",class:"node-code-edit-field",maxlength:"5"},null,512),[[yo,n.value]]),E[19]||(E[19]=Ri(" - ")),go(V("input",{"onUpdate:modelValue":E[4]||(E[4]=$=>s.value.name=$),type:"text",class:"node-name-edit-field"},null,512),[[yo,s.value.name]])]),V("div",null,[go(V("textarea",{class:"node-text-edit-field",rows:"25","onUpdate:modelValue":E[5]||(E[5]=$=>s.value.text=$)},null,512),[[yo,s.value.text]])]),V("div",null,[V("h3",null,[Ri("Приложения: "+tt(s.value.applications.length)+" ",1),V("button",{class:"editor-button application-add-button",onClick:E[6]||(E[6]=$=>p())},"+")]),(Me(!0),et(nt,null,un(s.value.applications,($,P)=>(Me(),et("div",{key:P},[V("button",{class:"editor-button application-remove-button",onClick:R=>v($.name)},"-",8,mse),go(V("textarea",{class:"node-text-edit-field",rows:"2","onUpdate:modelValue":R=>$.name=R},null,8,yse),[[yo,$.name]])]))),128))]),V("div",null,[V("h3",null,"Ссылки: "+tt(s.value.links.length),1),(Me(!0),et(nt,null,un(s.value.links,$=>(Me(),et("div",{key:$.code},[V("div",{class:"node-select-button",onClick:P=>w($)}," - "+tt(T($)),9,bse)]))),128))]),V("div",null,[E[20]||(E[20]=V("hr",{class:"hr"},null,-1)),V("div",null,[V("button",{class:"editor-button",onClick:E[7]||(E[7]=$=>S())},"Сохранить")]),E[21]||(E[21]=V("hr",{class:"hr"},null,-1)),V("div",null,[V("button",{class:"editor-button",onClick:E[8]||(E[8]=$=>O())},"Очистить"),V("button",{class:"editor-button",onClick:E[9]||(E[9]=$=>I())},"Добавить")]),E[22]||(E[22]=V("hr",{class:"hr"},null,-1)),V("div",null,[V("button",{class:"editor-button",onClick:E[10]||(E[10]=$=>y())},"Удалить")])])])])],64))}}),wse=ua(_se,[["__scopeId","data-v-688e2235"]]),Ese=fr({__name:"EditorView",setup(r){return(e,t)=>(Me(),ui(wse))}}),Sse=fr({__name:"GamesWindow",setup(r){return(e,t)=>(Me(),ui(Uw,null,{default:vn(()=>t[0]||(t[0]=[V("div",null," Каталог игр ",-1)])),_:1}))}}),Ose=fr({__name:"GamesView",setup(r){return(e,t)=>(Me(),ui(Sse))}}),Ow=uV({history:kU("/"),routes:[{path:"/",name:"home",component:lK},{path:"/editor",name:"editor",component:Ese},{path:"/games",name:"games",component:Ose}]}),Q0=iU(cV);Q0.use(aU());Q0.use(Ow);Q0.mount("#app"); +`),n=i.length;if(t.multi)for(let s=0;s0)for(let a=0;a0)for(let s=0;s/&/.test(n)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||i(n)||t.add(n),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new vB(e);let i=!0;const n=s=>/\\/.test(s)?(t.positionthis.parent.fontOptions.maxWdt}getLongestFit(e){let t="",i=0;for(;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let n=e.split("\r");for(;n.length>0;){let s=this.getLongestFit(n);if(s===0){const o=n[0],a=this.getLongestFitWord(o);this.lines.newLine(Mr(o).call(o,0,a),t),n[0]=Mr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=Mr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=Mr(n).call(n,o)}}}}const vo=["bold","ital","boldital","mono"];class ws{constructor(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),Du(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Ie(vo,t=>{this.fontOptions[t]={}}),ws.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Ie(e,(t,i)=>{t!=null&&typeof t!="object"&&(this.fontOptions[i]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=$i(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=$i(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=$i(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=$i(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=$i(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=$i(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ve(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=G0("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}addFontOptionsToPile(e,t){for(let i=0;i{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(ke(vo).call(vo,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,i){let n;for(let s=0;s{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,i,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,s,t,i,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,i]=this._setAlignment(e,t,i,n),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=d,c.strokeWidth>0&&e.strokeText(c.text,t+u,i+c.vadjust),e.fillText(c.text,t+u,i+c.vadjust),u+=c.width}i+=a.height}}}_setAlignment(e,t,i,n){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*s):e.textBaseline="middle"}else e.textBaseline=n;return[t,i]}_getColor(e,t,i){let n=e||"#000000",s=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));n=ur(n,o),s=ur(s,o)}return[n,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,i=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,i=-this.size.height*.5;break;case"top":t=s,i=-(this.size.height+2);break;case"bottom":t=s,i=2;break}}return{left:t,top:i,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=n-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,i,n){const s=function(u,l,c){return l==="normal"?c==="mod"?"":u[c]:u[l][c]!==void 0?u[l][c]:u[c]},o={color:s(this.fontOptions,n,"color"),size:s(this.fontOptions,n,"size"),face:s(this.fontOptions,n,"face"),mod:s(this.fontOptions,n,"mod"),vadjust:s(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(n==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,i));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,i,n){return new Dre(e,this,t,i).process(n)}_processLabel(e,t,i){if(this.labelDirty===!1&&!this.differentState(t,i))return;const n=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width0&&n.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),Na(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,i,n,s){i!==void 0&&this.resize(i,n,s),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s)}getDimensionsFromLabel(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);let n=this.textSize.width,s=this.textSize.height;const o=14;return n===0&&(n=o,s=o),{width:n,height:s}}}let Mre=class extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),a5(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}};class Y0 extends Kn{constructor(e,t,i){super(e,t,i),this.labelOffset=0,this.selected=!1}setOptions(e,t,i){this.options=e,t===void 0&&i===void 0||this.setImages(t,i)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=this.options.size*2*i,t=this.options.size*2*n}else{const i=this._getImagePadding();e=this.imageObj.width+i.left+i.right,t=this.imageObj.height+i.top+i.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,i,n){this.initContextForDraw(e,n),E0(e,t,i,n.size),this.performFill(e,n)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let i=1;this.options.shapeProperties.interpolation===!0&&(i=this.imageObj.width/this.width/this.body.view.scale);const n=this._getImagePadding(),s=this.left+n.left,o=this.top+n.top,a=this.width-n.left-n.right,u=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(e,i,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,i,n,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,n,s);u.lineCount>=1&&(o+=u.height/2)}const a=i+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,n,s,"hanging")}}let Nre=class extends Y0{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i),s=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this._drawRawCircle(e,t,i,o),this.updateBoundingBox(t,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,i,n,s)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class Fre extends Y0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){this.switchImages(n),this.resize();let a=t,u=i;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Zi extends Kn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,i)){var s,o;this.labelModule.getTextSize(e,t,i);const a=2*n.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,i,n,s,o,a,u){return this.resize(e,o,a,u),this.left=n-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),ZY(t)(e,n,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,n,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,n,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,n,l,o,a,"hanging")}this.updateBoundingBox(n,s)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function gB(r,e){var t=it(r);if(zi){var i=zi(r);e&&(i=Yt(i).call(i,function(n){return Qi(r,n).enumerable})),t.push.apply(t,i)}return t}function kre(r){for(var e=1;e{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Lre extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){if(this.needsRefresh(t,i)){const s=this.getDimensionsFromLabel(e,t,i).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),u5(e,t-this.width/2,i-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let jre=class extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"diamond",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class zre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"circle",2,t,i,n,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class mB extends Kn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.height=n.height*2,this.width=n.width+n.height,this.radius=.5*this.width}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width*.5,this.top=i-this.height*.5,this.initContextForDraw(e,o),hw(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,t,i,n,s)}distanceToBorder(e,t){e&&this.resize(e);const i=this.width*.5,n=this.height*.5,s=Math.sin(t)*i,o=Math.cos(t)*n;return i*n/Math.sqrt(s*s+o*o)}}class Hre extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){return this.resize(e,n,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=i-this.height/2,this._icon(e,t,i,n,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(t,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,i,n,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:n?"bold":"",(this.options.icon.weight!=null&&n?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,i),this.disableShadow(e,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Wre=class extends Y0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){e.save(),this.switchImages(n),this.resize();let a=t,u=i;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?c:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,d),e.beginPath();let h=n?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=n?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=ur(h,o.opacity),f=ur(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),Na(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Ure extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"square",2,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Vre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"hexagon",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Kre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"star",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Gre extends Kn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s),this.disableShadow(e,o),this.updateBoundingBox(t,i,e,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Yre=class extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangle",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Xre extends Zi{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangleDown",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function yB(r,e){var t=it(r);if(zi){var i=zi(r);e&&(i=Yt(i).call(i,function(n){return Qi(r,n).enumerable})),t.push.apply(t,i)}return t}function bB(r){for(var e=1;et[l]!=null);u.push("font"),qu(u,e,a),e.color=mw(e.color)}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(qu(["color","fixed","shadow"],e,t,i),Ye.checkMass(t),e.opacity!==void 0&&(Ye.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ye.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ye.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),ar(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=mw(t.color);tH(e.color,a)}else i===!0&&t.color===null&&(e.color=Fi(n.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=Fi(n.font)),Ye.updateGroupOptions(e,t,s),t.scaling!==void 0&&ar(e.scaling,t.scaling,"label",n.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=ur(e.borderColor,t),e.color=ur(e.color,t),e.shadowColor=ur(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ye.updateGroupOptions(this.options,bB(bB({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Mre(this.options,this.body,this.labelModule);break;case"circle":this.shape=new Nre(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Fre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Bre(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Lre(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new jre(this.options,this.body,this.labelModule);break;case"dot":this.shape=new zre(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new mB(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Hre(this.options,this.body,this.labelModule);break;case"image":this.shape=new Wre(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Ure(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Vre(this.options,this.body,this.labelModule);break;case"star":this.shape=new Kre(this.options,this.body,this.labelModule);break;case"text":this.shape=new Gre(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Yre(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Xre(this.options,this.body,this.labelModule);break;default:this.shape=new mB(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.size=this.options.scaling.min+n*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&Ew(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Ew(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.lefte.left&&this.shape.tope.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",sH),e.mass=1}}}class Jre{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=z(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,a,u,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Fi(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Ie(this.nodesListeners,(i,n)=>{this.body.data.nodes&&this.body.data.nodes.off(n,i)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ye.parseOptions(this.options,e),e.opacity!==void 0&&(ww(e.opacity)||!fn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of it(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.nodes;if(Z3("id",e))this.body.data.nodes=e;else if(st(e))this.body.data.nodes=new $u,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new $u;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Ie(this.nodesListeners,function(o,a){n.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i;const n=[];for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:Ye;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ie(this.body.nodes,(t,i)=>{const n=this.body.data.nodes.get(i);n!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(n))})}getPositions(e){const t={};if(e!==void 0){if(st(e)===!0){for(let i=0;i{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var _B={},wB;function Qre(){if(wB)return _B;wB=1;var r=de(),e=Math.hypot,t=Math.abs,i=Math.sqrt,n=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:n},{hypot:function(o,a){for(var u=0,l=0,c=arguments.length,d=0,h,f;l0?(f=h/d,u+=f*f):u+=h;return d===1/0?1/0:d*i(u)}}),_B}var V1,EB;function Zre(){if(EB)return V1;EB=1,Qre();var r=Le();return V1=r.Math.hypot,V1}var K1,SB;function eie(){if(SB)return K1;SB=1;var r=Zre();return K1=r,K1}var G1,OB;function tie(){return OB||(OB=1,G1=eie()),G1}var rie=tie(),iie=ge(rie);class ut{static transform(e,t){st(e)||(e=[e]);const i=t.point.x,n=t.point.y,s=t.angle,o=t.length;for(let a=0;a4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,i,n,s){if(this.from!=this.to)this._line(e,t,i,n,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,i,n,s){e.lineCap="round";const o=st(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)l5(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[i,n]=Mr(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const i=wH(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}_pointOnCircle(e,t,i,n){const s=n*2*Math.PI;return{x:e+i*Math.cos(s),y:t-i*Math.sin(s)}}_findBorderPositionCircle(e,t,i){const n=i.x,s=i.y;let o=i.low,a=i.high;const u=i.direction,l=10,c=this.options.selfReference.size,d=.05;let h,f=(o+a)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));let v=0;do{f=(o+a)*.5,h=this._pointOnCircle(n,s,c,f);const w=Math.atan2(e.y-h.y,e.x-h.x),m=e.distanceToBorder(t,w)+p,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),S=m-g;if(Math.abs(S)0?u>0?o=f:a=f:u>0?a=f:o=f,++v}while(o<=a&&v1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,p=h-o;return Math.sqrt(f*f+p*p)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const p=o.width;t==="from"?(l=this.from,c=this.to,d=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,c=this.from,d=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,c=this.from,d=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const v=15*h+3*p;if(l!=c){const S=iie(l.x-c.x,l.y-c.y),y=v/S;if(t!=="middle")if(this.options.smooth.enabled===!0){const I=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(I.t+y*(t==="from"?1:-1),i);a=Math.atan2(I.y-O.y,I.x-O.x),u=I}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const I=(d?-y:y)/2,O=this.getPoint(.5+I,i),T=this.getPoint(.5-I,i);a=Math.atan2(O.y-T.y,O.x-T.x),u=this.getPoint(.5,i)}}else{const[S,y,I]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:S,y,low:O,high:T,direction:-1});a=_.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=_}else if(t==="to"){const O=this.options.selfReference.angle,T=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:S,y,low:O,high:T,direction:1});a=_.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=_}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(S,y,I,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const w=u.x-v*.9*Math.cos(a),m=u.y-v*.9*Math.sin(a);return{point:u,core:{x:w,y:m},angle:a,length:v,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,SH.draw(e,s)&&(this.enableShadow(e,t),Na(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const i=st(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function $B(r,e){var t=it(r);if(zi){var i=zi(r);e&&(i=Yt(i).call(i,function(n){return Qi(r,n).enumerable})),t.push.apply(t,i)}return t}function PB(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const n=10,s=.2;let o=!1,a=1,u=0,l=this.to,c,d,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{d=(u+a)*.5,c=this.getPoint(d,i);const p=Math.atan2(l.y-c.y,l.x-c.x),v=l.distanceToBorder(t,p)+h,w=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=v-w;if(Math.abs(m)0&&(l=this._getDistanceToLine(p,v,h,f,s,o),u=l{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,i){this._bezierCurve(e,t,i)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[i,n,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:i+s*Math.sin(o),y:n+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToBezierEdge(e,t,i,n,s,o,this.via)}}class CB extends X0{constructor(e,t,i){super(e,t,i)}_line(e,t,i){this._bezierCurve(e,t,i)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let i=Math.abs(this.from.x-this.to.x),n=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;i<=n?s=o=e*n:s=o=e*i,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(i<=n?a=ithis.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return i<=n?this.from.x<=this.to.x?a=this.to.xa?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}_getDistanceToEdge(e,t,i,n,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,n,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,s=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:s}}}class gie extends X0{constructor(e,t,i){super(e,t,i)}_getDistanceToBezierEdge2(e,t,i,n,s,o,a,u){let l=1e9,c=e,d=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const p=.1*f;h[0]=Math.pow(1-p,3),h[1]=3*p*Math.pow(1-p,2),h[2]=3*Math.pow(p,2)*(1-p),h[3]=Math.pow(p,3);const v=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*i,w=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*n;if(f>0){const m=this._getDistanceToLine(c,d,v,w,s,o);l=mMath.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(n=this.from.y,o=this.to.y,i=this.from.x-a*e,s=this.to.x+a*e):(n=this.from.y-a*t,o=this.to.y+a*t,i=this.from.x,s=this.to.x),[{x:i,y:n},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,i,n,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,i,n,s,o,a,u)}getPoint(e){let[t,i]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,s=[Math.pow(1-n,3),3*n*Math.pow(1-n,2),3*Math.pow(n,2)*(1-n),Math.pow(n,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*i.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*i.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class qB extends OH{constructor(e,t,i){super(e,t,i)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let i=this.to,n=this.from;e.id===this.from.id&&(i=this.from,n=this.to);const s=Math.atan2(i.y-n.y,i.x-n.x),o=i.x-n.x,a=i.y-n.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),c=(u-l)/u;return{x:(1-c)*n.x+c*i.x,y:(1-c)*n.y+c*i.y,t:0}}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToLine(e,t,i,n,s,o)}}class ki{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=Fi(n),this.globalOptions=n,this.defaultOptions=s,this.body=t,this.imagelist=i,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new ws(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;ki.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=_H(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=G0("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(so(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(fn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=n.endPointOffset.from!==void 0?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(fn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=n.endPointOffset.to!==void 0?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Du(t.label)?e.label=t.label:Du(e.label)||(e.label=void 0),ar(e,t,"smooth",n),ar(e,t,"shadow",n),ar(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=bn(n.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),ar(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=bn(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=ke(a).call(a,"to")!=-1,e.arrows.middle.enabled=ke(a).call(a,"middle")!=-1,e.arrows.from.enabled=ke(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")ar(e.arrows,t.arrows,"to",n.arrows),ar(e.arrows,t.arrows,"middle",n.arrows),ar(e.arrows,t.arrows,"from",n.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Ma(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=bn(n.arrows));if(t.color!==void 0&&t.color!==null){const a=bs(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ve(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(bs(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else i===!0&&t.color===null&&(e.color=Fi(n.color));i===!0&&t.font===null&&(e.font=Fi(n.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,n=this.options.color.inherit,s={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof RB&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof xB&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof CB&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof qB&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new RB(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new xB(this.options,this.body,this.labelModule):this.edgeType=new CB(this.options,this.body,this.labelModule):this.edgeType=new qB(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.width=this.options.scaling.min+n*s}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=n.from.core),t.fromArrowSrc&&(n.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(n.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(n.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=n.to.core),t.toArrowSrc&&(n.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(n.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(n.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(n.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(n.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(n.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.to)}drawLabel(e,t){if(this.options.label!==void 0){const i=this.from,n=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(i.id!=n.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=wH(e,this.options.selfReference.angle,this.options.selfReference.size,i);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const n=this._getRotation();Ew(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}const i={left:e.x,top:e.y};return this.isOverlappingWith(i)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const i=this.from.x,n=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(i,n,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);const n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return n;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),n.angle=a,n}_pointOnCircle(e,t,i,n){return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class mie{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=z(n=this.create).call(n,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Ve(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n==="dynamic"&&(n="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const c=l.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(n===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:n}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Ie(this.edgesListeners,(n,s)=>{this.body.data.edges&&this.body.data.edges.off(s,n)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){ki.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.edges;if(Z3("id",e))this.body.data.edges=e;else if(st(e))this.body.data.edges=new $u,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new $u;else throw new TypeError("Array or DataSet expected");if(i&&Ie(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Ie(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.edges,n=this.body.data.edges;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const i=this.body.edges;Ie(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Ie(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new ki(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const n=i[e];n.from=null,n.to=null,n.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Ie(this.body.edges,(t,i)=>{const n=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];n!==void 0&&n.isCluster===!0||s!==void 0&&s.isCluster===!0||(n===void 0||s===void 0)&&e.push(i)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,i=[];ze(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class IH{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=Tl("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,s=this._formBarnesHutTree(t,i);this.barnesHutTree=s;for(let o=0;o0&&this._getForceContributions(s.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const i=e.centerOfMass.x-t.x,n=e.centerOfMass.y-t.y,s=Math.sqrt(i*i+n*n);s*e.calcSize>this.thetaInversed?this._calculateForces(s,i,n,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,i,n,t,e)}}_calculateForces(e,t,i,n,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));const o=this.options.gravitationalConstant*s.mass*n.options.mass/Math.pow(e,3),a=t*o,u=i*o;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=u}_formBarnesHutTree(e,t){let i;const n=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let w=1;w0&&(ga&&(a=g),Su&&(u=S))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const d=Math.max(1e-5,Math.abs(a-s)),h=.5*d,f=.5*(s+a),p=.5*(o+u),v={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:p-h,maxY:p+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(v.root);for(let w=0;w0&&this._placeInTree(v.root,i);return v}_updateBranchMass(e,t){const i=e.centerOfMass,n=e.mass+t.options.mass,s=1/n;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=s,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=s,e.mass=n;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?n.maxY>t.y?s="NW":s="SW":n.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,i){const n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let i,n,s,o;const a=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:s,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class yie{constructor(e,t,i){this._rng=Tl("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(i)}setOptions(e){this.options=e}solve(){let e,t,i,n,s,o,a,u;const l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,p=4/3;for(let v=0;v0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;n[s.id].x=t*a,n[s.id].y=i*a}}}class Sie{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},ft(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,qu(["stabilization"],this.options,e),ar(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||ww(t.x))&&(t.x=0),(typeof t.y!="number"||ww(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new wie(this.body,this.physicsBody,e),this.edgesSolver=new Y1(this.body,this.physicsBody,e),this.gravitySolver=new Eie(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new yie(this.body,this.physicsBody,e),this.edgesSolver=new Y1(this.body,this.physicsBody,e),this.gravitySolver=new vu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new bie(this.body,this.physicsBody,e),this.edgesSolver=new _ie(this.body,this.physicsBody,e),this.gravitySolver=new vu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new IH(this.body,this.physicsBody,e),this.edgesSolver=new Y1(this.body,this.physicsBody,e),this.gravitySolver=new vu(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=Pu();this.physicsTick(),(Pu()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ni(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,i=0;const n=5;for(let s=0;so&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);const n=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:n.x,vy:n.y},t.options.fixed.x===!1?(n.x=this.calculateComponentVelocity(n.x,i.x,t.options.mass),t.x+=n.x*this.timestep):(i.x=0,n.x=0),t.options.fixed.y===!1?(n.y=this.calculateComponentVelocity(n.y,i.y,t.options.mass),t.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ni(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let i=0;for(;e()&&i"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X1=crypto.getRandomValues.bind(crypto)}return X1(Iie)}const $ie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var AB={randomUUID:$ie};function Pie(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Tie();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Oie(i)}function Mo(r,e,t){return AB.randomUUID?AB.randomUUID():Pie(r)}class Ht{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.shape.boundingBox.left&&(s=a.shape.boundingBox.left),oa.shape.boundingBox.top&&(i=a.shape.boundingBox.top),n1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.x&&(s=a.x),oa.y&&(i=a.y),n{delete this.containedEdges[i.id]}),Ie(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Ie(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Ie(t.edges,i=>{Ie(this.edges,n=>{var s,o;const a=ke(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Ie(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),ii(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class Cie{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ft(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const i=[];for(let n=0;n=e&&i.push(s.id)}for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const i={},n={};Ie(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Ie(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(n[a.id]=a)}))}),this._cluster(i,n,e,t)}clusterByEdgeCount(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const n=[],s={};let o,a,u;for(let l=0;l0&&it(d).length>0&&v===!0){const m=function(){for(let g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var i;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=Ht.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[p.id]=p)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=it(e),h=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&this.clusteredNodes[c]!==void 0&&s.push(c);for(let c=0;cn?a.x:n,s=a.yo?a.y:o;return{x:.5*(i+n),y:.5*(s+o)}}openCluster(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const n=this.body.nodes[e];if(n===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(n.isCluster!==!0||n.containedNodes===void 0||n.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=ke(s).call(s,e)-1;if(o>=0){const c=s[o];this.body.nodes[c]._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}const a=n.containedNodes,u=n.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const c={},d={x:n.x,y:n.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];c[f]={x:p.x,y:p.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];h[f]!==void 0&&(p.x=h[f].x===void 0?n.x:h[f].x,p.y=h[f].y===void 0?n.y:h[f].y)}}else Ie(a,function(c){c.options.fixed.x===!1&&(c.x=n.x),c.options.fixed.y===!1&&(c.y=n.y)});for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=this.body.nodes[c];d.vx=n.vx,d.vy=n.vy,d.setOptions({physics:!0}),delete this.clusteredNodes[c]}const l=[];for(let c=0;c0&&on&&(n=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),i+=1}e=e/i,t=t/i;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>n&&(a=n),a}_createClusteredEdge(e,t,i,n,s){const o=Ht.cloneOptions(i,"edge");Ve(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+Mo(),s!==void 0&&Ve(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[i.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,i,n){if(t instanceof ki){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Ye){const s=e,o={};o[s.id]=s,e=o}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");n===void 0&&(n=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,n);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:i.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}_filter(e,t){const i=[];return Ie(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Ie(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}n(function(u){for(let l=0;l{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(i[u]=u)}),n(function(u){Ie(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Ie(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Ie(d,f=>{const p=this.body.edges[f];p!==void 0&&p.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Ie(i,l=>{delete u.containedEdges[l],Ie(u.edges,(c,d)=>{if(c.id===l){u.edges[d]=null;return}c.clusteringEdgeReplacingIds=this._filter(c.clusteringEdgeReplacingIds,function(h){return!i[h]})}),u.edges=this._filter(u.edges,function(c){return c!==null})})}),Ie(i,u=>{delete this.clusteredEdges[u]}),Ie(i,u=>{delete this.body.edges[u]});const s=it(this.body.edges);Ie(s,u=>{const l=this.body.edges[u],c=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(c!==this._isClusteredEdge(l.id))if(c){const d=this._getClusterNodeForNode(l.fromId);d!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,d);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];n(function(l){const c=it(l.containedNodes).length,d=l.options.allowSingleNodeCluster===!0;(d&&c<1||!d&&c<2)&&u.push(l.id)});for(let l=0;l0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class xie{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},ft(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ni(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&so(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,s),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(i,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,n,s)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let i;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i=t[n],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.nodes,n=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:l.y,left:l.x,bottom:c.y,right:c.x},h=[];for(let w=0;w{for(const w of h)w()}}}_drawEdges(e){const t=this.body.edges,i=this.body.edgeIndices;for(let n=0;n{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&so(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const n=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;n.observe(s),this._cleanupCallbacks.push(()=>{n.unobserve(s)})}else{const n=Mie(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=z(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;ze(e=yn(t=ii(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,n=>{try{n()}catch(s){console.error(s)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;const n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(ke(e).call(e,"%")!==-1||ke(e).call(e,"px")!==-1)return e;if(ke(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new _s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:_s.DIRECTION_ALL}),Mu(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new _s(this.frame),TH(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let i=!1;const n=this.frame.canvas.width,s=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function Fie(r,e){const t=ft({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!st(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class kie{constructor(e,t){var i,n;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",z(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(n=this.releaseNode).call(n,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Fie(e,this.body.nodeIndices);const i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;let s,o;if(i===0||n===0)o=1,s=Ht.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=Ht.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const d=Math.min(i/600,n/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),s=Ht.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,c=Math.abs(s.maxY-s.minY)*1.1,d=i/l,h=n/c;o=d<=h?d:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!fn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!fn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!fn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!fn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var n;this.viewFunction=z(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},n=this.body.view.translation,s={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=VZ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function NB(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,i={},n={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,d){if(n[d][c.keyCode]!==void 0){for(var h=n[d][c.keyCode],f=0;f{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=NB({container:window,preventDefault:!0}):this.keycharm=NB({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,i,n,s,o,a,u,l,c,d,h,f,p,v,w,m,g,S,y,I,O,T,_;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(p=this.keycharm).call(p,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(v=this.keycharm).call(v,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(w=this.keycharm).call(w,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(S=this.keycharm).call(S,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(I=this.keycharm).call(I,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(T=this.keycharm).call(T,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(_=this.keycharm).call(_,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class Lie{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,p,v,w;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new Bie(e,t),this.body.eventListeners.onTap=z(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=z(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=z(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=z(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=z(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=z(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=z(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=z(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=z(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=z(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(w=this.getPointer).call(w,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},ft(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(qu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),ar(this.options,e,"keyboard"),e.tooltip&&(ft(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=mw(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-zZ(this.canvas.frame.canvas),y:e.y-HZ(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const i=function(n,s){const o=[];for(let a=0;a{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+n)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const n=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const i=this.body.selectionBox.position,n={minX:Math.min(i.start.x,i.end.x),minY:Math.min(i.start.y,i.end.y),maxX:Math.max(i.start.x,i.end.x),maxY:Math.max(i.start.y,i.end.y)},s=Yt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=n.minX&&u.x<=n.maxX&&u.y>=n.minY&&u.y<=n.maxY});ze(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const i=this.drag.selection;i&&i.length?(ze(i).call(i,function(n){n.node.options.fixed.x=n.xFixed,n.node.options.fixed.y=n.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const i=this.pinch.scale*e.scale;this.zoom(i,t)}zoom(e,t){if(this.options.zoomView===!0){const i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let n;this.drag!==void 0&&this.drag.dragging===!0&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/i,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},n!=null){const l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),ithis._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:i,right:t,bottom:i},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new eee(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){const n=this.selectionHandler.getNodeAt(e);i=n===void 0?!1:n.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var FB={},kB={},BB;function jie(){if(BB)return kB;BB=1;var r=W0(),e=vH();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),kB}var LB;function zie(){return LB||(LB=1,jie()),FB}var jB={},Z1,zB;function Gn(){if(zB)return Z1;zB=1;var r=Ks(),e=TypeError;return Z1=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},Z1}var e_,HB;function Yn(){if(HB)return e_;HB=1;var r=nr(),e=gH(),t=r("Set"),i=t.prototype;return e_={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},e_}var t_,WB;function Xn(){if(WB)return t_;WB=1;var r=er();return t_=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},t_}var r_,UB;function za(){if(UB)return r_;UB=1;var r=Xn();return r_=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},r_}var i_,VB;function J0(){if(VB)return i_;VB=1;var r=Yn(),e=za(),t=r.Set,i=r.add;return i_=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},i_}var n_,KB;function Ha(){return KB||(KB=1,n_=function(r){return r.size}),n_}var s_,GB;function Hie(){return GB||(GB=1,s_=function(r){return{iterator:r,next:r.next,done:!1}}),s_}var o_,YB;function Jn(){if(YB)return o_;YB=1;var r=gi(),e=Wr(),t=er(),i=Js(),n=Hie(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},o_=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},o_}var a_,XB;function Wie(){if(XB)return a_;XB=1;var r=Gn(),e=Yn(),t=J0(),i=Ha(),n=Jn(),s=za(),o=Xn(),a=e.has,u=e.remove;return a_=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},a_}var u_,JB;function Qn(){return JB||(JB=1,u_=function(){return!1}),u_}var QB;function Uie(){if(QB)return jB;QB=1;var r=de(),e=Wie(),t=$e(),i=Qn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),jB}var ZB={},l_,eL;function Vie(){if(eL)return l_;eL=1;var r=Gn(),e=Yn(),t=Ha(),i=Jn(),n=za(),s=Xn(),o=e.Set,a=e.add,u=e.has;return l_=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},l_}var tL;function Kie(){if(tL)return ZB;tL=1;var r=de(),e=$e(),t=Vie(),i=Qn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),ZB}var rL={},c_,iL;function Gie(){if(iL)return c_;iL=1;var r=Gn(),e=Yn().has,t=Ha(),i=Jn(),n=za(),s=Xn(),o=z0();return c_=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},c_}var nL;function Yie(){if(nL)return rL;nL=1;var r=de(),e=Gie(),t=Qn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),rL}var sL={},d_,oL;function Xie(){if(oL)return d_;oL=1;var r=Gn(),e=Ha(),t=za(),i=Jn();return d_=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},d_}var aL;function Jie(){if(aL)return sL;aL=1;var r=de(),e=Xie(),t=Qn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),sL}var uL={},h_,lL;function Qie(){if(lL)return h_;lL=1;var r=Gn(),e=Yn().has,t=Ha(),i=Jn(),n=Xn(),s=z0();return h_=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};No(this,sn,new CL),No(this,on,new CL),No(this,S_,void 0),Sw(S_,this,e)}get sizeNodes(){return Ue(sn,this).size}get sizeEdges(){return Ue(on,this).size}getNodes(){return Ue(sn,this).getSelection()}getEdges(){return Ue(on,this).getSelection()}addNodes(){Ue(sn,this).add(...arguments)}addEdges(){Ue(on,this).add(...arguments)}deleteNodes(e){Ue(sn,this).delete(e)}deleteEdges(e){Ue(on,this).delete(e)}clear(){Ue(sn,this).clear(),Ue(on,this).clear()}commit(){const e={nodes:Ue(sn,this).commit(),edges:Ue(on,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&so(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}generateClickEvent(e,t,i,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,i);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}n!==void 0&&(o.previousSelection=n),e=="click"&&(o.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ye?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],i=this.body.nodes;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(i);if(n.length>0)return t===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}_getEdgesOverlappingWith(e,t){const i=this.body.edges;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this.canvas.DOMtoCanvas(e);let n=10,s=null;const o=this.body.edges;for(let a=0;a0&&(this.generateClickEvent("deselectEdge",t,e,s),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return Ps(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return Ps(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const i of e.nodes){const n=this.body.nodes[i];if(!n)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(n,t.highlightEdges)}if(e.edges)for(const i of e.edges){const n=this.body.edges[i];if(!n)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(n)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),i=[],n=this.body.nodeIndices,s=this.body.nodes;for(let u=n.length-1;u>=0;u--){const c=s[n[u]].getItemsOnPoint(t);i.push.apply(i,c)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const c=a[o[u]].getItemsOnPoint(t);i.push.apply(i,c)}return i}}var xL={},O_,qL;function yne(){if(qL)return O_;qL=1;var r=Qs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var T="",_,b,E,$;for(_=65;_<76;_++){switch(b=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:E=3;break;case 68:case 71:E=4;break;default:E=2}for($=0;$<47;$++)p.push({k:b+$,v:E})}for(p.sort(function(P,R){return R.v-P.v}),$=0;$o(b)?1:-1}};return r({target:"Array",proto:!0,forced:I},{sort:function(_){_!==void 0&&t(_);var b=i(this);if(y)return _===void 0?v(b):v(b,_);var E=[],$=n(b),P,R;for(R=0;R<$;R++)R in b&&w(E,b[R]);for(u(E,O(_)),P=n(E),R=0;R=0:p>v;v+=w)v in f&&(d=l(d,f[v],v,h));return d}};return q_={left:o(!1),right:o(!0)},q_}var A_,HL;function Rne(){if(HL)return A_;HL=1;var r=P5();return A_=r==="NODE",A_}var WL;function Cne(){if(WL)return jL;WL=1;var r=de(),e=Pne().left,t=io(),i=Pa(),n=Rne(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),jL}var D_,UL;function xne(){if(UL)return D_;UL=1,Cne();var r=At();return D_=r("Array","reduce"),D_}var M_,VL;function qne(){if(VL)return M_;VL=1;var r=mt(),e=xne(),t=Array.prototype;return M_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},M_}var N_,KL;function Ane(){if(KL)return N_;KL=1;var r=qne();return N_=r,N_}var F_,GL;function Dne(){return GL||(GL=1,F_=Ane()),F_}var Mne=Dne(),RH=ge(Mne);class CH{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class Nne extends CH{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){Es(e).call(e,function(t,i){return t.x-i.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class Fne extends CH{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){Es(e).call(e,function(t,i){return t.y-i.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var YL={},XL;function kne(){if(XL)return YL;XL=1;var r=de(),e=Ji().every,t=io(),i=t("every");return r({target:"Array",proto:!0,forced:!i},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),YL}var k_,JL;function Bne(){if(JL)return k_;JL=1,kne();var r=At();return k_=r("Array","every"),k_}var B_,QL;function Lne(){if(QL)return B_;QL=1;var r=mt(),e=Bne(),t=Array.prototype;return B_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},B_}var L_,ZL;function jne(){if(ZL)return L_;ZL=1;var r=Lne();return L_=r,L_}var j_,ej;function zne(){return ej||(ej=1,j_=jne()),j_}var Hne=zne(),xH=ge(Hne);function Wne(r,e){const t=new Ci;return ze(r).call(r,i=>{var n;ze(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),ze(t).call(t,i=>{const n=i.from.id,s=i.to.id;e[n]==null&&(e[n]=0),(e[s]==null||e[n]>=e[s])&&(e[s]=e[n]+1)}),e}function Une(r){return qH(e=>{var t,i;return xH(t=Yt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function Vne(r){return qH(e=>{var t,i;return xH(t=Yt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.from===e)},(e,t)=>td+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[d,h]of i){if(!i.has(d)||!r(h))continue;s[d]=0;const f=[h];let p=0,v;for(;v=f.pop();){var l,c;if(!i.has(d))continue;const w=s[v.id]+u;if(ze(l=Yt(c=v.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==v&&i.has(m.toId)&&i.has(m.fromId))).call(l,m=>{const g=m[a],S=s[g];(S==null||e(w,S))&&(s[g]=w,f.push(m[t]))}),p>o)return Wne(i,s);++p}}return s}class Kne{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},i=n=>{if(t[n]!==void 0)return t[n];let s=this.levels[n];if(this.childrenReference[n]){const o=this.childrenReference[n];if(o.length>0)for(let a=0;as-o);for(const s of n)t.set(s,i++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let i=1e9,n=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];i=Math.min(u.x,i),n=Math.max(u.x,n),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:i,max_x:n,min_y:s,max_y:o}}hasSameParent(e,t){const i=this.parentReference[e.id],n=this.parentReference[t.id];if(i===void 0||n===void 0)return!1;for(let s=0;s{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const i=this.options.hierarchical,n=i.enabled;if(so(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),ar(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return n===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(n===!0)return this.body.emitter.emit("refresh"),Ve(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=Tl(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{const n=e.edges.smooth;n.type!==void 0&&n.type!=="dynamic"&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:n.enabled===void 0?!0:n.enabled,type:n.type===void 0?"dynamic":n.type,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}},e.edges.smooth={enabled:n.enabled===void 0?!0:n.enabled,type:i,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let i=0;is){const u=e.length;for(;e.length>s&&n<=10;){n+=1;const l=e.length;n%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const c=e.length;if(l==c&&n%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*u)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const a=70;for(let u=0;u0){let e,t,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new Kne;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(n===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const i={},n=()=>{const m=o();let g=0;for(let S=0;S{const S=this.hierarchical.trees;for(const y in S)Object.prototype.hasOwnProperty.call(S,y)&&S[y]===m&&this.direction.shift(y,g)},o=()=>{const m=[];for(let g=0;g{if(!g[m.id]&&(g[m.id]=!0,this.hierarchical.childrenReference[m.id])){const S=this.hierarchical.childrenReference[m.id];if(S.length>0)for(let y=0;y1&&arguments[1]!==void 0?arguments[1]:1e9,S=1e9,y=1e9,I=1e9,O=-1e9;for(const T in m)if(Object.prototype.hasOwnProperty.call(m,T)){const _=e.body.nodes[T],b=e.hierarchical.levels[_.id],E=e.direction.getPosition(_),[$,P]=e._getSpaceAroundNode(_,m);S=Math.min($,S),y=Math.min(P,y),b<=g&&(I=Math.min(E,I),O=Math.max(E,O))}return[I,O,S,y]},l=(m,g)=>{const S=this.hierarchical.getMaxLevel(m.id),y=this.hierarchical.getMaxLevel(g.id);return Math.min(S,y)},c=(m,g,S)=>{const y=this.hierarchical;for(let I=0;I1)for(let _=0;_2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),I=e.direction.getPosition(g),O=Math.abs(I-y),T=e.options.hierarchical.nodeSpacing;if(O>T){const _={},b={};a(m,_),a(g,b);const E=l(m,g),$=u(_,E),P=u(b,E),R=$[1],A=P[0],B=P[2];if(Math.abs(R-A)>T){let H=R-A+T;H<-B+T&&(H=-B+T),H<0&&(e._shiftBlock(g.id,H),t=!0,S===!0&&e._centerParent(g))}}},h=(m,g)=>{const S=g.id,y=g.edges,I=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,T={},_=[];for(let B=0;B{let H=0;for(let te=0;te{let H=0;for(let te=0;te{let H=this.direction.getPosition(g);const te={};for(let pe=0;pe{const Z=this.direction.getPosition(g);if(i[g.id]===void 0){const me={};a(g,me),i[g.id]=me}const H=u(i[g.id]),te=H[2],pe=H[3],we=B-Z;let re=0;we>0?re=Math.min(we,pe-this.options.hierarchical.nodeSpacing):we<0&&(re=-Math.min(-we,te-this.options.hierarchical.nodeSpacing)),re!=0&&(this._shiftBlock(g.id,re),t=!0)},R=B=>{const Z=this.direction.getPosition(g),[H,te]=this._getSpaceAroundNode(g),pe=B-Z;let we=Z;pe>0?we=Math.min(Z+(te-this.options.hierarchical.nodeSpacing),B):pe<0&&(we=Math.max(Z-(H-this.options.hierarchical.nodeSpacing),B)),we!==Z&&(this.direction.setPosition(g,we),t=!0)};let A=$(m,_);P(A),A=$(m,y),R(A)},f=m=>{let g=this.hierarchical.getLevels();g=yn(g).call(g);for(let S=0;S{let g=this.hierarchical.getLevels();g=yn(g).call(g);for(let S=0;S{for(const m in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,m)&&this._centerParent(this.body.nodes[m])},w=()=>{let m=this.hierarchical.getLevels();m=yn(m).call(m);for(let g=0;g0&&Math.abs(d)0&&(l=this.direction.getPosition(n[o-1])+u),this.direction.setPosition(a,l,i),this._validatePositionAndContinue(a,i,l),s++}}}}_placeBranchNodes(e,t){var i;const n=this.hierarchical.childrenReference[e];if(n===void 0)return;const s=[];for(let a=0;at&&this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let d;a===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(s[a-1])+c,this.direction.setPosition(u,d,l),this._validatePositionAndContinue(u,l,d)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-n{var n;ke(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Ie(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Ie(e,n=>{i.push(Number(n))}),Es(i).call(i,function(n,s){return s-n}),i}_determineLevelsByHubsize(){const e=(i,n)=>{this.hierarchical.levelDownstream(i,n)},t=this._getHubSizes();for(let i=0;i{const o=this.body.nodes[s];n===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(n,s,o){},i=(n,s,o)=>{let a=this.hierarchical.levels[n.id];a===void 0&&(a=this.hierarchical.levels[n.id]=1e5);const u=t(Ht.cloneOptions(n,"node"),Ht.cloneOptions(s,"node"),Ht.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=RH(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new K0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Vne(t):this.hierarchical.levels=Une(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,i)=>{this.hierarchical.levels[i.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const i={},n=(s,o)=>{if(i[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),i[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l{if(i[s])return;i[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{this._clean()}),this.body.emitter.on("_dataChanged",z(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",z(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ve(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),s=i+n,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):n===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Ve({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,i=>{i!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(i),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,i,n,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",z(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",z(s=this._dragStartEdge).call(s,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,i,n,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",z(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",z(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const c=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=c.from.x,a.y=c.from.y),u.selected===!1&&(u.x=c.to.x,u.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let i;if(e.length>0){for(let n=0;n0&&typeof this.options.deleteEdge=="function"&&(i=this.options.deleteEdge);if(typeof i=="function"){const n={nodes:e,edges:t};if(i.length===2)i(n,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const i=Ve({},this.options.controlNodeStyle);i.id="targetNode"+Mo(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;const n=this.body.functions.createNode(i);return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}_createEditButton(){var e;this._clean(),this.manipulationDOM={},Ti(this.editModeDiv);const t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(Ti(this.editModeDiv),Ti(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of ii(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Ti(this.manipulationDiv),Ti(this.editModeDiv),Ti(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";const n=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=n,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Ma(it(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e{i.destroy()});const n=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",n,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,n.to.id):this._performEditEdge(n.from.id,o.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=ft({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);const s=this.body.functions.createEdge({id:"connectionEdge"+Mo(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(ke(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(ke(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[n]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(n,o.id)),e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:Mo(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,i=>{i!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const i={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(i,n=>{n!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let n=this.options.editEdge;if(typeof n=="object"&&(n=n.editWithoutDrag),typeof n=="function")if(n.length===2)n(i,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[i.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const Y="string",j="boolean",M="number",_o="array",le="object",AH="dom",Xne="any",z_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],H_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:Y,undefined:"undefined"},chosen:{label:{boolean:j,function:"function"},node:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:j},y:{boolean:j},__type__:{object:le,boolean:j}},font:{align:{string:Y},color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},group:{string:Y,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:Y},__type__:{object:le,boolean:j,number:M}},hidden:{boolean:j},icon:{face:{string:Y},code:{string:Y},size:{number:M},color:{string:Y},weight:{string:Y,number:M},__type__:{object:le}},id:{string:Y,number:M},image:{selected:{string:Y,undefined:"undefined"},unselected:{string:Y,undefined:"undefined"},__type__:{object:le,string:Y}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},level:{number:M,undefined:"undefined"},margin:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:le,number:M}},mass:{number:M},physics:{boolean:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:j,array:_o},borderRadius:{number:M},interpolation:{boolean:j},useImageSize:{boolean:j},useBorderWithImage:{boolean:j},coordinateOrigin:{string:["center","top-left"]},__type__:{object:le}},size:{number:M},title:{string:Y,dom:AH,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:le,boolean:j,number:M}},x:{number:M},y:{number:M},__type__:{object:le}},Jne={configure:{enabled:{boolean:j},filter:{boolean:j,string:Y,array:_o,function:"function"},container:{dom:AH},showButton:{boolean:j},__type__:{object:le,boolean:j,string:Y,array:_o,function:"function"}},edges:{arrows:{to:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:z_},imageHeight:{number:M},imageWidth:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},middle:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:z_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},from:{enabled:{boolean:j},scaleFactor:{number:M},type:{string:z_},imageWidth:{number:M},imageHeight:{number:M},src:{string:Y},__type__:{object:le,boolean:j}},__type__:{string:["from","to","middle"],object:le}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:le,number:M}},arrowStrikethrough:{boolean:j},background:{enabled:{boolean:j},color:{string:Y},size:{number:M},dashes:{boolean:j,array:_o},__type__:{object:le,boolean:j}},chosen:{label:{boolean:j,function:"function"},edge:{boolean:j,function:"function"},__type__:{object:le,boolean:j}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:["from","to","both"],boolean:j},opacity:{number:M},__type__:{object:le,string:Y}},dashes:{boolean:j,array:_o},font:{color:{string:Y},size:{number:M},face:{string:Y},background:{string:Y},strokeWidth:{number:M},strokeColor:{string:Y},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:j,string:Y},bold:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},boldital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},ital:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},mono:{color:{string:Y},size:{number:M},face:{string:Y},mod:{string:Y},vadjust:{number:M},__type__:{object:le,string:Y}},__type__:{object:le,string:Y}},hidden:{boolean:j},hoverWidth:{function:"function",number:M},label:{string:Y,undefined:"undefined"},labelHighlightBold:{boolean:j},length:{number:M,undefined:"undefined"},physics:{boolean:j},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:j},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:le,boolean:j}},customScalingFunction:{function:"function"},__type__:{object:le}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:j},__type__:{object:le}},shadow:{enabled:{boolean:j},color:{string:Y},size:{number:M},x:{number:M},y:{number:M},__type__:{object:le,boolean:j}},smooth:{enabled:{boolean:j},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:j},__type__:{object:le,boolean:j}},title:{string:Y,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:le,boolean:j,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:le}},groups:{useDefaultGroups:{boolean:j},__any__:H_,__type__:{object:le}},interaction:{dragNodes:{boolean:j},dragView:{boolean:j},hideEdgesOnDrag:{boolean:j},hideEdgesOnZoom:{boolean:j},hideNodesOnDrag:{boolean:j},hover:{boolean:j},keyboard:{enabled:{boolean:j},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:le}},bindToWindow:{boolean:j},autoFocus:{boolean:j},__type__:{object:le,boolean:j}},multiselect:{boolean:j},navigationButtons:{boolean:j},selectable:{boolean:j},selectConnectedEdges:{boolean:j},hoverConnectedEdges:{boolean:j},tooltipDelay:{number:M},zoomView:{boolean:j},zoomSpeed:{number:M},__type__:{object:le}},layout:{randomSeed:{undefined:"undefined",number:M,string:Y},improvedLayout:{boolean:j},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:j},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:j},edgeMinimization:{boolean:j},parentCentralization:{boolean:j},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:le,boolean:j}},__type__:{object:le}},manipulation:{enabled:{boolean:j},initiallyActive:{boolean:j},addNode:{boolean:j,function:"function"},addEdge:{boolean:j,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:le,boolean:j,function:"function"}},deleteNode:{boolean:j,function:"function"},deleteEdge:{boolean:j,function:"function"},controlNodeStyle:H_,__type__:{object:le,boolean:j}},nodes:H_,physics:{enabled:{boolean:j},barnesHut:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},forceAtlas2Based:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},repulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},__type__:{object:le}},hierarchicalRepulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:le}},maxVelocity:{number:M},minVelocity:{number:M},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:j},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:j},fit:{boolean:j},__type__:{object:le,boolean:j}},timestep:{number:M},adaptiveTimestep:{boolean:j},wind:{x:{number:M},y:{number:M},__type__:{object:le}},__type__:{object:le,boolean:j}},autoResize:{boolean:j},clickToUse:{boolean:j},locale:{string:Y},locales:{__any__:{any:Xne},__type__:{object:le}},height:{string:Y},width:{string:Y},__type__:{object:le}},DH={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Qne=(r,e,t)=>{var i;return!!(Mi(r).call(r,"physics")&&Mi(i=DH.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class Zne{constructor(){}getDistances(e,t,i){const n={},s=e.edges;for(let a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let c=1e9,d=0,h=0,f=0,p=0,v=0;for(;c>s&&ao&&vthis.body.emitter.emit("_requestRedraw")),this.groups=new zee,this.canvas=new Nie(this.body),this.selectionHandler=new mne(this.body,this.canvas),this.interactionHandler=new Lie(this.body,this.canvas,this.selectionHandler),this.view=new kie(this.body,this.canvas),this.renderer=new xie(this.body,this.canvas),this.physics=new Sie(this.body),this.layoutEngine=new Gne(this.body),this.clustering=new Cie(this.body),this.manipulation=new Yne(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Jre(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new mie(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new ese(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}c5(ue.prototype);ue.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(tee.validate(r,Jne)===!0&&console.error("%cErrors have been found in the supplied options object.",sH),so(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=Iee(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new ZZ(this,this.body.container,DH,this.canvas.pixelRatio,Qne)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ve(i.nodes,this.nodesHandler.options),Ve(i.edges,this.edgesHandler.options),Ve(i.layout,this.layoutEngine.options),Ve(i.interaction,this.selectionHandler.options),Ve(i.interaction,this.renderer.options),Ve(i.interaction,this.interactionHandler.options),Ve(i.manipulation,this.manipulation.options),Ve(i.physics,this.physics.options),Ve(i.global,this.canvas.options),Ve(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new QZ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ue.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t],n=r[i.fromId],s=r[i.toId],o=n!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&o&&n.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(i.id)}};ue.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ue.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=dee(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=hee(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ue.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];Ti(this.body.container)};ue.prototype._updateValueRange=function(r){let e,t,i,n=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),i=i===void 0?s:Math.max(s,i),n+=s)}if(t!==void 0&&i!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,i,n)};ue.prototype.isActive=function(){return!this.activator||this.activator.active};ue.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ue.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ue.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ue.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ue.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ue.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ue.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ue.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ue.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ue.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ue.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ue.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ue.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ue.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ue.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ue.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ue.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ue.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ue.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ue.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ue.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ue.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ue.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ue.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ue.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ue.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ue.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ue.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ue.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ue.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ue.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ue.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ue.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ue.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ue.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ue.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ue.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ue.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ue.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ue.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ue.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ue.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ue.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ue.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ue.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ue.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ue.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ue.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ue.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const tse={class:"data-container text-container"},rse={class:"messages-block",ref:"scrollContainer"},ise={class:"center-block-custom"},nse=["onClick","id"],sse={class:"message-content"},ose={key:0,class:"hr"},ase={class:"nodes-container"},use={class:"checkbox-green"},lse={class:"checkbox-green"},cse={class:"scroll-y"},dse=["onMouseenter"],hse=["onClick"],fse={key:0},pse=["onClick"],vse={class:"edit-node-container"},gse={class:"scroll-y-right"},mse=["onClick"],yse=["onUpdate:modelValue"],bse=["onClick"],_se=fr({__name:"EditorWindow",setup(r){const e=rt(),t=rt({nodes:[],edges:[]}),i={code:"",name:"",text:"",applications:[],id:"",label:"",links:[]},n=rt(""),s=rt({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]}),o=rt({code:"",name:"",text:"",applications:[],id:"",label:"",links:[]});let a={},u={};const l=rt(0),c=rt(0),d=rt(!1),h=rt(!0);async function f(){t.value=await _V(),c.value=t.value.edges.length,h.value&&(t.value.edges=t.value.edges.filter(function(b){return b.type!=="application"})),t.value.edges.map(function(b){b.type=="application"&&(b.color="#aaaaaa")}),t.value.nodes=t.value.nodes.map(function(b){return b.id=b.code,b.label=b.name,b}),l.value=t.value.edges.length,u={nodes:t.value.nodes,edges:t.value.edges.sort(function(b,E){return b.type=="application"?1:E.type=="application"?-1:0})},a.setData(u),console.log(t.value.edges)}oa(async()=>{if(!e.value)return;const b={interaction:{selectable:!0},nodes:{color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#960000",background:"#ff9494"},hover:{border:"#2B7CE9",background:"#D2E5FF"}}}};a=new ue(e.value,u,b),a.on("click",function(E){if(console.log("click graph:",E),E.nodes.length>0){const $=t.value.nodes.find(function(P){return P.code==E.nodes[0]});$!==void 0&&w($)}else E.edges.length>0&&console.log("Clicked edge:",E.edges[0])}),await f(),w(t.value.nodes[0])});function p(){s.value.applications.push({name:""})}function v(b){s.value.applications=s.value.applications.filter(function(E){return E.name!=b})}function w(b){var $;console.log("Select node:",b),n.value=b.code,s.value=b;const E=t.value.edges.filter(function(P){return P.from==b.code}).map(function(P){const R=P.to;return t.value.nodes.filter(function(B){return B.code==R})[0]});s.value.links=E,a.selectNodes([s.value.code]),d.value||($=window.document.getElementById(b.code))==null||$.scrollIntoView({behavior:"smooth",block:"center"})}function m(b){console.log("Focus node:",b.code),o.value=b}function g(b){console.log("Focus node:",b.code),navigator.clipboard.writeText("(["+b.code+"])"),o.value=i}async function S(){console.log("Update node:",s.value),await Kl(n.value,s.value),await f();const b=t.value.nodes.filter(function(E){return E.code==s.value.code});w(b[0])}async function y(){console.log("Delete node:",s.value),s.value.code="",await Kl(n.value,s.value),await f()}async function I(){console.log("Add node:",s.value),s.value.code=n.value,await Kl("",s.value),await f();const b=t.value.nodes.filter(function(E){return E.code==s.value.code});w(b[0])}async function O(){console.log("Clear node"),w(i)}function T(b){return"["+b.code+"] - "+b.name}function _(b){d.value=b,d.value&&f()}return(b,E)=>(Me(),et(nt,null,[at(Uw,null,{default:vn(()=>E[11]||(E[11]=[V("div",null," Редактор сценариев ",-1)])),_:1}),V("div",{class:Pi([d.value?"text-container-disable":""])},[V("div",tse,[V("div",rse,[V("div",ise,[(Me(!0),et(nt,null,un(t.value.nodes,$=>(Me(),et("div",{key:$.id,onClick:P=>w($),id:$.code},[V("div",{class:Pi(["message-cloud",[$.code==s.value.code?"selected-message-cloud":""]])},[V("div",{class:Pi(["message-header",[$.code==s.value.code?"selected-message-header":""]])},tt($.code)+": "+tt($.name),3),E[12]||(E[12]=V("hr",{class:"hr"},null,-1)),V("div",sse,tt($.text),1),$.applications.length?(Me(),et("hr",ose)):$o("",!0),(Me(!0),et(nt,null,un($.applications,P=>(Me(),et("div",{class:"message-footer",key:P.name}," Приложение: "+tt(P.name),1))),128))],2)],8,nse))),128))])],512)])],2),V("div",{class:Pi([d.value?"":"graph-container-disable"])},[V("div",{ref_key:"network",ref:e,class:"data-container graph-container"},null,512)],2),V("div",ase,[E[17]||(E[17]=V("h2",null,"Точки",-1)),V("div",null,"Всего точек: "+tt(t.value.nodes.length),1),V("div",null,[E[14]||(E[14]=Ri(" Отображать граф: ")),V("label",use,[V("input",{type:"checkbox",onClick:E[0]||(E[0]=$=>_(!d.value))}),E[13]||(E[13]=V("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])]),V("div",null,[Ri(" Всего связей: "+tt(c.value)+", показано: "+tt(l.value)+" ",1),V("div",null,[E[16]||(E[16]=Ri(" Показать все связи: ")),V("label",lse,[V("input",{type:"checkbox",onClick:E[1]||(E[1]=$=>(h.value=!h.value,f()))}),E[15]||(E[15]=V("span",{class:"checkbox-green-switch","data-label-on":"Да","data-label-off":"Нет"},null,-1))])])]),E[18]||(E[18]=V("hr",{class:"hr"},null,-1)),V("div",cse,[(Me(!0),et(nt,null,un(t.value.nodes,$=>(Me(),et("div",{key:$.code},[V("span",{onMouseenter:P=>m($),onMouseleave:E[2]||(E[2]=P=>m(i))},[V("span",{class:Pi([[$.code==s.value.code?"selected-node":""],"node-select-button"]),onClick:P=>w($)},tt(T($)),11,hse),$.applications.length>0?(Me(),et("span",fse," ("+tt($.applications.length)+")",1)):$o("",!0),$.code==o.value.code?(Me(),et("span",{key:1,class:"copy-node-link",onClick:P=>g($)}," Ссылка ",8,pse)):$o("",!0)],40,dse)]))),128))])]),V("div",vse,[V("div",gse,[E[23]||(E[23]=V("h2",null,"Редактирование точки",-1)),V("div",null,[go(V("input",{"onUpdate:modelValue":E[3]||(E[3]=$=>n.value=$),type:"text",class:"node-code-edit-field",maxlength:"5"},null,512),[[yo,n.value]]),E[19]||(E[19]=Ri(" - ")),go(V("input",{"onUpdate:modelValue":E[4]||(E[4]=$=>s.value.name=$),type:"text",class:"node-name-edit-field"},null,512),[[yo,s.value.name]])]),V("div",null,[go(V("textarea",{class:"node-text-edit-field",rows:"25","onUpdate:modelValue":E[5]||(E[5]=$=>s.value.text=$)},null,512),[[yo,s.value.text]])]),V("div",null,[V("h3",null,[Ri("Приложения: "+tt(s.value.applications.length)+" ",1),V("button",{class:"editor-button application-add-button",onClick:E[6]||(E[6]=$=>p())},"+")]),(Me(!0),et(nt,null,un(s.value.applications,($,P)=>(Me(),et("div",{key:P},[V("button",{class:"editor-button application-remove-button",onClick:R=>v($.name)},"-",8,mse),go(V("textarea",{class:"node-text-edit-field",rows:"2","onUpdate:modelValue":R=>$.name=R},null,8,yse),[[yo,$.name]])]))),128))]),V("div",null,[V("h3",null,"Ссылки: "+tt(s.value.links.length),1),(Me(!0),et(nt,null,un(s.value.links,$=>(Me(),et("div",{key:$.code},[V("div",{class:"node-select-button",onClick:P=>w($)}," - "+tt(T($)),9,bse)]))),128))]),V("div",null,[E[20]||(E[20]=V("hr",{class:"hr"},null,-1)),V("div",null,[V("button",{class:"editor-button",onClick:E[7]||(E[7]=$=>S())},"Сохранить")]),E[21]||(E[21]=V("hr",{class:"hr"},null,-1)),V("div",null,[V("button",{class:"editor-button",onClick:E[8]||(E[8]=$=>O())},"Очистить"),V("button",{class:"editor-button",onClick:E[9]||(E[9]=$=>I())},"Добавить")]),E[22]||(E[22]=V("hr",{class:"hr"},null,-1)),V("div",null,[V("button",{class:"editor-button",onClick:E[10]||(E[10]=$=>y())},"Удалить")])])])])],64))}}),wse=ua(_se,[["__scopeId","data-v-f1335d65"]]),Ese=fr({__name:"EditorView",setup(r){return(e,t)=>(Me(),ui(wse))}}),Sse=fr({__name:"GamesWindow",setup(r){return(e,t)=>(Me(),ui(Uw,null,{default:vn(()=>t[0]||(t[0]=[V("div",null," Каталог игр ",-1)])),_:1}))}}),Ose=fr({__name:"GamesView",setup(r){return(e,t)=>(Me(),ui(Sse))}}),Ow=uV({history:kU("/"),routes:[{path:"/",name:"home",component:lK},{path:"/editor",name:"editor",component:Ese},{path:"/games",name:"games",component:Ose}]}),Q0=iU(cV);Q0.use(aU());Q0.use(Ow);Q0.mount("#app"); diff --git a/cmd/evening_detective/static/admin/index.html b/cmd/evening_detective/static/admin/index.html index 0b16e49..7a1f94c 100644 --- a/cmd/evening_detective/static/admin/index.html +++ b/cmd/evening_detective/static/admin/index.html @@ -5,8 +5,8 @@ ВД Админка - - + +
diff --git a/cmd/evening_detective/static/user/assets/belt-B9kZnNyz.png b/cmd/evening_detective/static/user/assets/belt-B9kZnNyz.png deleted file mode 100644 index bfed9a4..0000000 Binary files a/cmd/evening_detective/static/user/assets/belt-B9kZnNyz.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/belt-DVqk2_uL.png b/cmd/evening_detective/static/user/assets/belt-DVqk2_uL.png new file mode 100644 index 0000000..381bf77 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/belt-DVqk2_uL.png differ diff --git a/cmd/evening_detective/static/user/assets/belt_mini-CjEl-eRA.png b/cmd/evening_detective/static/user/assets/belt_mini-CjEl-eRA.png new file mode 100644 index 0000000..2f145f0 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/belt_mini-CjEl-eRA.png differ diff --git a/cmd/evening_detective/static/user/assets/belt_mini-DDotyJSU.png b/cmd/evening_detective/static/user/assets/belt_mini-DDotyJSU.png deleted file mode 100644 index 6308042..0000000 Binary files a/cmd/evening_detective/static/user/assets/belt_mini-DDotyJSU.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/collapse-B6YzUtGl.png b/cmd/evening_detective/static/user/assets/collapse-B6YzUtGl.png new file mode 100644 index 0000000..7979a75 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/collapse-B6YzUtGl.png differ diff --git a/cmd/evening_detective/static/user/assets/collapse-DCvTPk_P.png b/cmd/evening_detective/static/user/assets/collapse-DCvTPk_P.png deleted file mode 100644 index 15ced6e..0000000 Binary files a/cmd/evening_detective/static/user/assets/collapse-DCvTPk_P.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/forest-BtC0DC9-.png b/cmd/evening_detective/static/user/assets/forest-BtC0DC9-.png new file mode 100644 index 0000000..4a41cd3 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/forest-BtC0DC9-.png differ diff --git a/cmd/evening_detective/static/user/assets/forest-DGCb0Pbq.png b/cmd/evening_detective/static/user/assets/forest-DGCb0Pbq.png deleted file mode 100644 index 22e0104..0000000 Binary files a/cmd/evening_detective/static/user/assets/forest-DGCb0Pbq.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/index-CBvKsrC1.js b/cmd/evening_detective/static/user/assets/index-DET2zLFP.js similarity index 80% rename from cmd/evening_detective/static/user/assets/index-CBvKsrC1.js rename to cmd/evening_detective/static/user/assets/index-DET2zLFP.js index 0b8a432..6b63c15 100644 --- a/cmd/evening_detective/static/user/assets/index-CBvKsrC1.js +++ b/cmd/evening_detective/static/user/assets/index-DET2zLFP.js @@ -2,31 +2,31 @@ * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function es(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const te={},Dt=[],et=()=>{},Il=()=>!1,Un=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ts=e=>e.startsWith("onUpdate:"),ve=Object.assign,ns=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ml=Object.prototype.hasOwnProperty,oe=(e,t)=>Ml.call(e,t),W=Array.isArray,kt=e=>Vn(e)==="[object Map]",Yo=e=>Vn(e)==="[object Set]",Q=e=>typeof e=="function",pe=e=>typeof e=="string",ct=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",Qo=e=>(he(e)||Q(e))&&Q(e.then)&&Q(e.catch),Xo=Object.prototype.toString,Vn=e=>Xo.call(e),Bl=e=>Vn(e).slice(8,-1),Zo=e=>Vn(e)==="[object Object]",rs=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tn=es(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Nl=/-(\w)/g,lt=Hn(e=>e.replace(Nl,(t,n)=>n?n.toUpperCase():"")),Ol=/\B([A-Z])/g,bt=Hn(e=>e.replace(Ol,"-$1").toLowerCase()),ei=Hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zn=Hn(e=>e?`on${ei(e)}`:""),Ie=(e,t)=>!Object.is(e,t),Rn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Dr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let xs;const jn=()=>xs||(xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ss(e){if(W(e)){const t={};for(let n=0;n{if(n){const r=n.split(Fl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function os(e){let t="";if(pe(e))t=e;else if(W(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Xe=e=>pe(e)?e:e==null?"":W(e)||he(e)&&(e.toString===Xo||!Q(e.toString))?ri(e)?Xe(e.value):JSON.stringify(e,si,2):String(e),si=(e,t)=>ri(t)?si(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[er(r,o)+" =>"]=s,n),{})}:Yo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>er(n))}:ct(t)?er(t):he(t)&&!W(t)&&!Zo(t)?String(t):t,er=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function es(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const te={},Ft=[],et=()=>{},Il=()=>!1,Un=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ts=e=>e.startsWith("onUpdate:"),ve=Object.assign,ns=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ml=Object.prototype.hasOwnProperty,oe=(e,t)=>Ml.call(e,t),W=Array.isArray,kt=e=>Hn(e)==="[object Map]",Yo=e=>Hn(e)==="[object Set]",Q=e=>typeof e=="function",pe=e=>typeof e=="string",ct=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",Qo=e=>(he(e)||Q(e))&&Q(e.then)&&Q(e.catch),Xo=Object.prototype.toString,Hn=e=>Xo.call(e),Bl=e=>Hn(e).slice(8,-1),Zo=e=>Hn(e)==="[object Object]",rs=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tn=es(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Vn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Nl=/-(\w)/g,lt=Vn(e=>e.replace(Nl,(t,n)=>n?n.toUpperCase():"")),Ol=/\B([A-Z])/g,bt=Vn(e=>e.replace(Ol,"-$1").toLowerCase()),ei=Vn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zn=Vn(e=>e?`on${ei(e)}`:""),Ie=(e,t)=>!Object.is(e,t),Rn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Fr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let xs;const jn=()=>xs||(xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ss(e){if(W(e)){const t={};for(let n=0;n{if(n){const r=n.split(Dl);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function os(e){let t="";if(pe(e))t=e;else if(W(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Xe=e=>pe(e)?e:e==null?"":W(e)||he(e)&&(e.toString===Xo||!Q(e.toString))?ri(e)?Xe(e.value):JSON.stringify(e,si,2):String(e),si=(e,t)=>ri(t)?si(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[er(r,o)+" =>"]=s,n),{})}:Yo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>er(n))}:ct(t)?er(t):he(t)&&!W(t)&&!Zo(t)?String(t):t,er=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Le;class oi{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Le,!t&&Le&&(this.index=(Le.scopes||(Le.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(rn){let t=rn;for(rn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;nn;){let t=nn;for(nn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function ui(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ai(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),cs(r),ql(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function kr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===an))return;e.globalVersion=an;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!kr(e)){e.flags&=-3;return}const n=ae,r=je;ae=e,je=!0;try{ui(e);const s=e.fn(e._value);(t.version===0||Ie(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ae=n,je=r,ai(e),e.flags&=-3}}function cs(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)cs(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ql(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let je=!0;const di=[];function wt(){di.push(je),je=!1}function Et(){const e=di.pop();je=e===void 0?!0:e}function Is(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ae;ae=void 0;try{t()}finally{ae=n}}}let an=0;class Kl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ae||!je||ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ae)n=this.activeLink=new Kl(ae,this),ae.deps?(n.prevDep=ae.depsTail,ae.depsTail.nextDep=n,ae.depsTail=n):ae.deps=ae.depsTail=n,hi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=ae.depsTail,n.nextDep=void 0,ae.depsTail.nextDep=n,ae.depsTail=n,ae.deps===n&&(ae.deps=r)}return n}trigger(t){this.version++,an++,this.notify(t)}notify(t){is();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ls()}}}function hi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hi(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ur=new WeakMap,Pt=Symbol(""),Vr=Symbol(""),fn=Symbol("");function be(e,t,n){if(je&&ae){let r=Ur.get(e);r||Ur.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new qn),s.map=r,s.key=n),s.track()}}function ot(e,t,n,r,s,o){const i=Ur.get(e);if(!i){an++;return}const c=l=>{l&&l.trigger()};if(is(),t==="clear")i.forEach(c);else{const l=W(e),a=l&&rs(n);if(l&&n==="length"){const u=Number(r);i.forEach((f,g)=>{(g==="length"||g===fn||!ct(g)&&g>=u)&&c(f)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),a&&c(i.get(fn)),t){case"add":l?a&&c(i.get("length")):(c(i.get(Pt)),kt(e)&&c(i.get(Vr)));break;case"delete":l||(c(i.get(Pt)),kt(e)&&c(i.get(Vr)));break;case"set":kt(e)&&c(i.get(Pt));break}}ls()}function Bt(e){const t=se(e);return t===e?t:(be(t,"iterate",fn),ke(e)?t:t.map(we))}function Kn(e){return be(e=se(e),"iterate",fn),e}const $l={__proto__:null,[Symbol.iterator](){return nr(this,Symbol.iterator,we)},concat(...e){return Bt(this).concat(...e.map(t=>W(t)?Bt(t):t))},entries(){return nr(this,"entries",e=>(e[1]=we(e[1]),e))},every(e,t){return nt(this,"every",e,t,void 0,arguments)},filter(e,t){return nt(this,"filter",e,t,n=>n.map(we),arguments)},find(e,t){return nt(this,"find",e,t,we,arguments)},findIndex(e,t){return nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return nt(this,"findLast",e,t,we,arguments)},findLastIndex(e,t){return nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return rr(this,"includes",e)},indexOf(...e){return rr(this,"indexOf",e)},join(e){return Bt(this).join(e)},lastIndexOf(...e){return rr(this,"lastIndexOf",e)},map(e,t){return nt(this,"map",e,t,void 0,arguments)},pop(){return Wt(this,"pop")},push(...e){return Wt(this,"push",e)},reduce(e,...t){return Ms(this,"reduce",e,t)},reduceRight(e,...t){return Ms(this,"reduceRight",e,t)},shift(){return Wt(this,"shift")},some(e,t){return nt(this,"some",e,t,void 0,arguments)},splice(...e){return Wt(this,"splice",e)},toReversed(){return Bt(this).toReversed()},toSorted(e){return Bt(this).toSorted(e)},toSpliced(...e){return Bt(this).toSpliced(...e)},unshift(...e){return Wt(this,"unshift",e)},values(){return nr(this,"values",we)}};function nr(e,t,n){const r=Kn(e),s=r[t]();return r!==e&&!ke(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.value&&(o.value=n(o.value)),o}),s}const zl=Array.prototype;function nt(e,t,n,r,s,o){const i=Kn(e),c=i!==e&&!ke(e),l=i[t];if(l!==zl[t]){const f=l.apply(e,o);return c?we(f):f}let a=n;i!==e&&(c?a=function(f,g){return n.call(this,we(f),g,e)}:n.length>2&&(a=function(f,g){return n.call(this,f,g,e)}));const u=l.call(i,a,r);return c&&s?s(u):u}function Ms(e,t,n,r){const s=Kn(e);let o=n;return s!==e&&(ke(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,we(c),l,e)}),s[t](o,...r)}function rr(e,t,n){const r=se(e);be(r,"iterate",fn);const s=r[t](...n);return(s===-1||s===!1)&&fs(n[0])?(n[0]=se(n[0]),r[t](...n)):s}function Wt(e,t,n=[]){wt(),is();const r=se(e)[t].apply(e,n);return ls(),Et(),r}const Gl=es("__proto__,__v_isRef,__isVue"),pi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function Wl(e){ct(e)||(e=String(e));const t=se(this);return be(t,"has",e),t.hasOwnProperty(e)}class gi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?sc:vi:o?yi:_i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=W(t);if(!s){let l;if(i&&(l=$l[n]))return l;if(n==="hasOwnProperty")return Wl}const c=Reflect.get(t,n,Se(t)?t:r);return(ct(n)?pi.has(n):Gl(n))||(s||be(t,"get",n),o)?c:Se(c)?i&&rs(n)?c:c.value:he(c)?s?wi(c):$n(c):c}}class mi extends gi{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const l=At(o);if(!ke(r)&&!At(r)&&(o=se(o),r=se(r)),!W(t)&&Se(o)&&!Se(r))return l?!1:(o.value=r,!0)}const i=W(t)&&rs(n)?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Zl(e,t,n){return function(...r){const s=this.__v_raw,o=se(s),i=kt(o),c=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,a=s[e](...r),u=n?Hr:t?jr:we;return!t&&be(o,"iterate",l?Vr:Pt),{next(){const{value:f,done:g}=a.next();return g?{value:f,done:g}:{value:c?[u(f[0]),u(f[1])]:u(f),done:g}},[Symbol.iterator](){return this}}}}function En(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ec(e,t){const n={get(s){const o=this.__v_raw,i=se(o),c=se(s);e||(Ie(s,c)&&be(i,"get",s),be(i,"get",c));const{has:l}=wn(i),a=t?Hr:e?jr:we;if(l.call(i,s))return a(o.get(s));if(l.call(i,c))return a(o.get(c));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&be(se(s),"iterate",Pt),Reflect.get(s,"size",s)},has(s){const o=this.__v_raw,i=se(o),c=se(s);return e||(Ie(s,c)&&be(i,"has",s),be(i,"has",c)),s===c?o.has(s):o.has(s)||o.has(c)},forEach(s,o){const i=this,c=i.__v_raw,l=se(c),a=t?Hr:e?jr:we;return!e&&be(l,"iterate",Pt),c.forEach((u,f)=>s.call(o,a(u),a(f),i))}};return ve(n,e?{add:En("add"),set:En("set"),delete:En("delete"),clear:En("clear")}:{add(s){!t&&!ke(s)&&!At(s)&&(s=se(s));const o=se(this);return wn(o).has.call(o,s)||(o.add(s),ot(o,"add",s,s)),this},set(s,o){!t&&!ke(o)&&!At(o)&&(o=se(o));const i=se(this),{has:c,get:l}=wn(i);let a=c.call(i,s);a||(s=se(s),a=c.call(i,s));const u=l.call(i,s);return i.set(s,o),a?Ie(o,u)&&ot(i,"set",s,o):ot(i,"add",s,o),this},delete(s){const o=se(this),{has:i,get:c}=wn(o);let l=i.call(o,s);l||(s=se(s),l=i.call(o,s)),c&&c.call(o,s);const a=o.delete(s);return l&&ot(o,"delete",s,void 0),a},clear(){const s=se(this),o=s.size!==0,i=s.clear();return o&&ot(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Zl(s,e,t)}),n}function us(e,t){const n=ec(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(oe(n,s)&&s in r?n:r,s,o)}const tc={get:us(!1,!1)},nc={get:us(!1,!0)},rc={get:us(!0,!1)};const _i=new WeakMap,yi=new WeakMap,vi=new WeakMap,sc=new WeakMap;function oc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ic(e){return e.__v_skip||!Object.isExtensible(e)?0:oc(Bl(e))}function $n(e){return At(e)?e:as(e,!1,Yl,tc,_i)}function bi(e){return as(e,!1,Xl,nc,yi)}function wi(e){return as(e,!0,Ql,rc,vi)}function as(e,t,n,r,s){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=ic(e);if(i===0)return e;const c=new Proxy(e,i===2?r:n);return s.set(e,c),c}function Ut(e){return At(e)?Ut(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function fs(e){return e?!!e.__v_raw:!1}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function Ei(e){return!oe(e,"__v_skip")&&Object.isExtensible(e)&&ti(e,"__v_skip",!0),e}const we=e=>he(e)?$n(e):e,jr=e=>he(e)?wi(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function me(e){return Si(e,!1)}function lc(e){return Si(e,!0)}function Si(e,t){return Se(e)?e:new cc(e,t)}class cc{constructor(t,n){this.dep=new qn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:se(t),this._value=n?t:we(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||ke(t)||At(t);t=r?t:se(t),Ie(t,n)&&(this._rawValue=t,this._value=r?t:we(t),this.dep.trigger())}}function _t(e){return Se(e)?e.value:e}const uc={get:(e,t,n)=>t==="__v_raw"?e:_t(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Se(s)&&!Se(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Ci(e){return Ut(e)?e:new Proxy(e,uc)}class ac{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new qn,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function fc(e){return new ac(e)}class dc{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=an-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ae!==this)return ci(this,!0),!0}get value(){const t=this.dep.track();return fi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function hc(e,t,n=!1){let r,s;return Q(e)?r=e:(r=e.get,s=e.set),new dc(r,s,n)}const Sn={},xn=new WeakMap;let Rt;function pc(e,t=!1,n=Rt){if(n){let r=xn.get(n);r||xn.set(n,r=[]),r.push(e)}}function gc(e,t,n=te){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:c,call:l}=n,a=_=>s?_:ke(_)||s===!1||s===0?it(_,1):it(_);let u,f,g,p,b=!1,w=!1;if(Se(e)?(f=()=>e.value,b=ke(e)):Ut(e)?(f=()=>a(e),b=!0):W(e)?(w=!0,b=e.some(_=>Ut(_)||ke(_)),f=()=>e.map(_=>{if(Se(_))return _.value;if(Ut(_))return a(_);if(Q(_))return l?l(_,2):_()})):Q(e)?t?f=l?()=>l(e,2):e:f=()=>{if(g){wt();try{g()}finally{Et()}}const _=Rt;Rt=u;try{return l?l(e,3,[p]):e(p)}finally{Rt=_}}:f=et,t&&s){const _=f,G=s===!0?1/0:s;f=()=>it(_(),G)}const B=jl(),S=()=>{u.stop(),B&&B.active&&ns(B.effects,u)};if(o&&t){const _=t;t=(...G)=>{_(...G),S()}}let R=w?new Array(e.length).fill(Sn):Sn;const P=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const G=u.run();if(s||b||(w?G.some((N,L)=>Ie(N,R[L])):Ie(G,R))){g&&g();const N=Rt;Rt=u;try{const L=[G,R===Sn?void 0:w&&R[0]===Sn?[]:R,p];l?l(t,3,L):t(...L),R=G}finally{Rt=N}}}else u.run()};return c&&c(P),u=new ii(f),u.scheduler=i?()=>i(P,!1):P,p=_=>pc(_,!1,u),g=u.onStop=()=>{const _=xn.get(u);if(_){if(l)l(_,4);else for(const G of _)G();xn.delete(u)}},t?r?P(!0):R=u.run():i?i(P.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function it(e,t=1/0,n){if(t<=0||!he(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Se(e))it(e.value,t,n);else if(W(e))for(let r=0;r{it(r,t,n)});else if(Zo(e)){for(const r in e)it(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&it(e[r],t,n)}return e}/** +**/let Le;class oi{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Le,!t&&Le&&(this.index=(Le.scopes||(Le.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(rn){let t=rn;for(rn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;nn;){let t=nn;for(nn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function ui(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ai(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),cs(r),ql(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function kr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===an))return;e.globalVersion=an;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!kr(e)){e.flags&=-3;return}const n=ae,r=je;ae=e,je=!0;try{ui(e);const s=e.fn(e._value);(t.version===0||Ie(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ae=n,je=r,ai(e),e.flags&=-3}}function cs(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)cs(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ql(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let je=!0;const di=[];function wt(){di.push(je),je=!1}function Et(){const e=di.pop();je=e===void 0?!0:e}function Is(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ae;ae=void 0;try{t()}finally{ae=n}}}let an=0;class $l{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ae||!je||ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ae)n=this.activeLink=new $l(ae,this),ae.deps?(n.prevDep=ae.depsTail,ae.depsTail.nextDep=n,ae.depsTail=n):ae.deps=ae.depsTail=n,hi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=ae.depsTail,n.nextDep=void 0,ae.depsTail.nextDep=n,ae.depsTail=n,ae.deps===n&&(ae.deps=r)}return n}trigger(t){this.version++,an++,this.notify(t)}notify(t){is();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ls()}}}function hi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hi(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ur=new WeakMap,Pt=Symbol(""),Hr=Symbol(""),fn=Symbol("");function be(e,t,n){if(je&&ae){let r=Ur.get(e);r||Ur.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new qn),s.map=r,s.key=n),s.track()}}function ot(e,t,n,r,s,o){const i=Ur.get(e);if(!i){an++;return}const c=l=>{l&&l.trigger()};if(is(),t==="clear")i.forEach(c);else{const l=W(e),a=l&&rs(n);if(l&&n==="length"){const u=Number(r);i.forEach((f,g)=>{(g==="length"||g===fn||!ct(g)&&g>=u)&&c(f)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),a&&c(i.get(fn)),t){case"add":l?a&&c(i.get("length")):(c(i.get(Pt)),kt(e)&&c(i.get(Hr)));break;case"delete":l||(c(i.get(Pt)),kt(e)&&c(i.get(Hr)));break;case"set":kt(e)&&c(i.get(Pt));break}}ls()}function Bt(e){const t=se(e);return t===e?t:(be(t,"iterate",fn),ke(e)?t:t.map(we))}function $n(e){return be(e=se(e),"iterate",fn),e}const Kl={__proto__:null,[Symbol.iterator](){return nr(this,Symbol.iterator,we)},concat(...e){return Bt(this).concat(...e.map(t=>W(t)?Bt(t):t))},entries(){return nr(this,"entries",e=>(e[1]=we(e[1]),e))},every(e,t){return nt(this,"every",e,t,void 0,arguments)},filter(e,t){return nt(this,"filter",e,t,n=>n.map(we),arguments)},find(e,t){return nt(this,"find",e,t,we,arguments)},findIndex(e,t){return nt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return nt(this,"findLast",e,t,we,arguments)},findLastIndex(e,t){return nt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return nt(this,"forEach",e,t,void 0,arguments)},includes(...e){return rr(this,"includes",e)},indexOf(...e){return rr(this,"indexOf",e)},join(e){return Bt(this).join(e)},lastIndexOf(...e){return rr(this,"lastIndexOf",e)},map(e,t){return nt(this,"map",e,t,void 0,arguments)},pop(){return Wt(this,"pop")},push(...e){return Wt(this,"push",e)},reduce(e,...t){return Ms(this,"reduce",e,t)},reduceRight(e,...t){return Ms(this,"reduceRight",e,t)},shift(){return Wt(this,"shift")},some(e,t){return nt(this,"some",e,t,void 0,arguments)},splice(...e){return Wt(this,"splice",e)},toReversed(){return Bt(this).toReversed()},toSorted(e){return Bt(this).toSorted(e)},toSpliced(...e){return Bt(this).toSpliced(...e)},unshift(...e){return Wt(this,"unshift",e)},values(){return nr(this,"values",we)}};function nr(e,t,n){const r=$n(e),s=r[t]();return r!==e&&!ke(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.value&&(o.value=n(o.value)),o}),s}const zl=Array.prototype;function nt(e,t,n,r,s,o){const i=$n(e),c=i!==e&&!ke(e),l=i[t];if(l!==zl[t]){const f=l.apply(e,o);return c?we(f):f}let a=n;i!==e&&(c?a=function(f,g){return n.call(this,we(f),g,e)}:n.length>2&&(a=function(f,g){return n.call(this,f,g,e)}));const u=l.call(i,a,r);return c&&s?s(u):u}function Ms(e,t,n,r){const s=$n(e);let o=n;return s!==e&&(ke(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,we(c),l,e)}),s[t](o,...r)}function rr(e,t,n){const r=se(e);be(r,"iterate",fn);const s=r[t](...n);return(s===-1||s===!1)&&fs(n[0])?(n[0]=se(n[0]),r[t](...n)):s}function Wt(e,t,n=[]){wt(),is();const r=se(e)[t].apply(e,n);return ls(),Et(),r}const Gl=es("__proto__,__v_isRef,__isVue"),pi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function Wl(e){ct(e)||(e=String(e));const t=se(this);return be(t,"has",e),t.hasOwnProperty(e)}class gi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?sc:vi:o?yi:_i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=W(t);if(!s){let l;if(i&&(l=Kl[n]))return l;if(n==="hasOwnProperty")return Wl}const c=Reflect.get(t,n,Se(t)?t:r);return(ct(n)?pi.has(n):Gl(n))||(s||be(t,"get",n),o)?c:Se(c)?i&&rs(n)?c:c.value:he(c)?s?wi(c):Kn(c):c}}class mi extends gi{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const l=At(o);if(!ke(r)&&!At(r)&&(o=se(o),r=se(r)),!W(t)&&Se(o)&&!Se(r))return l?!1:(o.value=r,!0)}const i=W(t)&&rs(n)?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Zl(e,t,n){return function(...r){const s=this.__v_raw,o=se(s),i=kt(o),c=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,a=s[e](...r),u=n?Vr:t?jr:we;return!t&&be(o,"iterate",l?Hr:Pt),{next(){const{value:f,done:g}=a.next();return g?{value:f,done:g}:{value:c?[u(f[0]),u(f[1])]:u(f),done:g}},[Symbol.iterator](){return this}}}}function En(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ec(e,t){const n={get(s){const o=this.__v_raw,i=se(o),c=se(s);e||(Ie(s,c)&&be(i,"get",s),be(i,"get",c));const{has:l}=wn(i),a=t?Vr:e?jr:we;if(l.call(i,s))return a(o.get(s));if(l.call(i,c))return a(o.get(c));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&be(se(s),"iterate",Pt),Reflect.get(s,"size",s)},has(s){const o=this.__v_raw,i=se(o),c=se(s);return e||(Ie(s,c)&&be(i,"has",s),be(i,"has",c)),s===c?o.has(s):o.has(s)||o.has(c)},forEach(s,o){const i=this,c=i.__v_raw,l=se(c),a=t?Vr:e?jr:we;return!e&&be(l,"iterate",Pt),c.forEach((u,f)=>s.call(o,a(u),a(f),i))}};return ve(n,e?{add:En("add"),set:En("set"),delete:En("delete"),clear:En("clear")}:{add(s){!t&&!ke(s)&&!At(s)&&(s=se(s));const o=se(this);return wn(o).has.call(o,s)||(o.add(s),ot(o,"add",s,s)),this},set(s,o){!t&&!ke(o)&&!At(o)&&(o=se(o));const i=se(this),{has:c,get:l}=wn(i);let a=c.call(i,s);a||(s=se(s),a=c.call(i,s));const u=l.call(i,s);return i.set(s,o),a?Ie(o,u)&&ot(i,"set",s,o):ot(i,"add",s,o),this},delete(s){const o=se(this),{has:i,get:c}=wn(o);let l=i.call(o,s);l||(s=se(s),l=i.call(o,s)),c&&c.call(o,s);const a=o.delete(s);return l&&ot(o,"delete",s,void 0),a},clear(){const s=se(this),o=s.size!==0,i=s.clear();return o&&ot(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Zl(s,e,t)}),n}function us(e,t){const n=ec(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(oe(n,s)&&s in r?n:r,s,o)}const tc={get:us(!1,!1)},nc={get:us(!1,!0)},rc={get:us(!0,!1)};const _i=new WeakMap,yi=new WeakMap,vi=new WeakMap,sc=new WeakMap;function oc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ic(e){return e.__v_skip||!Object.isExtensible(e)?0:oc(Bl(e))}function Kn(e){return At(e)?e:as(e,!1,Yl,tc,_i)}function bi(e){return as(e,!1,Xl,nc,yi)}function wi(e){return as(e,!0,Ql,rc,vi)}function as(e,t,n,r,s){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=ic(e);if(i===0)return e;const c=new Proxy(e,i===2?r:n);return s.set(e,c),c}function Ut(e){return At(e)?Ut(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function fs(e){return e?!!e.__v_raw:!1}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function Ei(e){return!oe(e,"__v_skip")&&Object.isExtensible(e)&&ti(e,"__v_skip",!0),e}const we=e=>he(e)?Kn(e):e,jr=e=>he(e)?wi(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function me(e){return Si(e,!1)}function lc(e){return Si(e,!0)}function Si(e,t){return Se(e)?e:new cc(e,t)}class cc{constructor(t,n){this.dep=new qn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:se(t),this._value=n?t:we(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||ke(t)||At(t);t=r?t:se(t),Ie(t,n)&&(this._rawValue=t,this._value=r?t:we(t),this.dep.trigger())}}function _t(e){return Se(e)?e.value:e}const uc={get:(e,t,n)=>t==="__v_raw"?e:_t(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Se(s)&&!Se(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Ci(e){return Ut(e)?e:new Proxy(e,uc)}class ac{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new qn,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function fc(e){return new ac(e)}class dc{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=an-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ae!==this)return ci(this,!0),!0}get value(){const t=this.dep.track();return fi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function hc(e,t,n=!1){let r,s;return Q(e)?r=e:(r=e.get,s=e.set),new dc(r,s,n)}const Sn={},xn=new WeakMap;let Rt;function pc(e,t=!1,n=Rt){if(n){let r=xn.get(n);r||xn.set(n,r=[]),r.push(e)}}function gc(e,t,n=te){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:c,call:l}=n,a=_=>s?_:ke(_)||s===!1||s===0?it(_,1):it(_);let u,f,g,p,b=!1,w=!1;if(Se(e)?(f=()=>e.value,b=ke(e)):Ut(e)?(f=()=>a(e),b=!0):W(e)?(w=!0,b=e.some(_=>Ut(_)||ke(_)),f=()=>e.map(_=>{if(Se(_))return _.value;if(Ut(_))return a(_);if(Q(_))return l?l(_,2):_()})):Q(e)?t?f=l?()=>l(e,2):e:f=()=>{if(g){wt();try{g()}finally{Et()}}const _=Rt;Rt=u;try{return l?l(e,3,[p]):e(p)}finally{Rt=_}}:f=et,t&&s){const _=f,G=s===!0?1/0:s;f=()=>it(_(),G)}const B=jl(),S=()=>{u.stop(),B&&B.active&&ns(B.effects,u)};if(o&&t){const _=t;t=(...G)=>{_(...G),S()}}let R=w?new Array(e.length).fill(Sn):Sn;const P=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const G=u.run();if(s||b||(w?G.some((N,L)=>Ie(N,R[L])):Ie(G,R))){g&&g();const N=Rt;Rt=u;try{const L=[G,R===Sn?void 0:w&&R[0]===Sn?[]:R,p];l?l(t,3,L):t(...L),R=G}finally{Rt=N}}}else u.run()};return c&&c(P),u=new ii(f),u.scheduler=i?()=>i(P,!1):P,p=_=>pc(_,!1,u),g=u.onStop=()=>{const _=xn.get(u);if(_){if(l)l(_,4);else for(const G of _)G();xn.delete(u)}},t?r?P(!0):R=u.run():i?i(P.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function it(e,t=1/0,n){if(t<=0||!he(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Se(e))it(e.value,t,n);else if(W(e))for(let r=0;r{it(r,t,n)});else if(Zo(e)){for(const r in e)it(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&it(e[r],t,n)}return e}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function yn(e,t,n,r){try{return r?e(...r):e()}catch(s){zn(s,t,n)}}function tt(e,t,n,r){if(Q(e)){const s=yn(e,t,n,r);return s&&Qo(s)&&s.catch(o=>{zn(o,t,n)}),s}if(W(e)){const s=[];for(let o=0;o>>1,s=Te[r],o=dn(s);o=dn(n)?Te.push(e):Te.splice(_c(t),0,e),e.flags|=1,Pi()}}function Pi(){In||(In=Ri.then(Ti))}function yc(e){W(e)?Vt.push(...e):pt&&e.id===-1?pt.splice(Ot+1,0,e):e.flags&1||(Vt.push(e),e.flags|=1),Pi()}function Bs(e,t,n=Qe+1){for(;ndn(n)-dn(r));if(Vt.length=0,pt){pt.push(...t);return}for(pt=t,Ot=0;Ote.id==null?e.flags&2?-1:1/0:e.id;function Ti(e){try{for(Qe=0;Qe{r._d&&Vs(-1);const o=Mn(t);let i;try{i=e(...s)}finally{Mn(o),r._d&&Vs(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Bn(e,t){if(ye===null)return e;const n=Yn(ye),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function ps(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ps(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function Me(e,t){return Q(e)?ve({name:e.name},t,{setup:e}):e}function Ii(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Nn(e,t,n,r,s=!1){if(W(e)){e.forEach((b,w)=>Nn(b,t&&(W(t)?t[w]:t),n,r,s));return}if(Ht(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Nn(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Yn(r.component):r.el,i=s?null:o,{i:c,r:l}=e,a=t&&t.r,u=c.refs===te?c.refs={}:c.refs,f=c.setupState,g=se(f),p=f===te?()=>!1:b=>oe(g,b);if(a!=null&&a!==l&&(pe(a)?(u[a]=null,p(a)&&(f[a]=null)):Se(a)&&(a.value=null)),Q(l))yn(l,c,12,[i,u]);else{const b=pe(l),w=Se(l);if(b||w){const B=()=>{if(e.f){const S=b?p(l)?f[l]:u[l]:l.value;s?W(S)&&ns(S,o):W(S)?S.includes(o)||S.push(o):b?(u[l]=[o],p(l)&&(f[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else b?(u[l]=i,p(l)&&(f[l]=i)):w&&(l.value=i,e.k&&(u[e.k]=i))};i?(B.id=-1,Oe(B,n)):B()}}}jn().requestIdleCallback;jn().cancelIdleCallback;const Ht=e=>!!e.type.__asyncLoader,Mi=e=>e.type.__isKeepAlive;function wc(e,t){Bi(e,"a",t)}function Ec(e,t){Bi(e,"da",t)}function Bi(e,t,n=Ee){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Gn(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Mi(s.parent.vnode)&&Sc(r,t,n,s),s=s.parent}}function Sc(e,t,n,r){const s=Gn(t,e,r,!0);Ni(()=>{ns(r[t],s)},n)}function Gn(e,t,n=Ee,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{wt();const c=bn(n),l=tt(t,n,e,i);return c(),Et(),l});return r?s.unshift(o):s.push(o),o}}const ut=e=>(t,n=Ee)=>{(!gn||e==="sp")&&Gn(e,(...r)=>t(...r),n)},Cc=ut("bm"),gs=ut("m"),Rc=ut("bu"),Pc=ut("u"),Ac=ut("bum"),Ni=ut("um"),Tc=ut("sp"),xc=ut("rtg"),Ic=ut("rtc");function Mc(e,t=Ee){Gn("ec",e,t)}const Bc=Symbol.for("v-ndc");function qr(e,t,n,r){let s;const o=n,i=W(e);if(i||pe(e)){const c=i&&Ut(e);let l=!1;c&&(l=!ke(e),e=Kn(e)),s=new Array(e.length);for(let a=0,u=e.length;at(c,l,void 0,o));else{const c=Object.keys(e);s=new Array(c.length);for(let l=0,a=c.length;lpn(t)?!(t.type===vt||t.type===_e&&!Oi(t.children)):!0)?e:null}const Kr=e=>e?rl(e)?Yn(e):Kr(e.parent):null,sn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Kr(e.parent),$root:e=>Kr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Di(e),$forceUpdate:e=>e.f||(e.f=()=>{hs(e.update)}),$nextTick:e=>e.n||(e.n=ds.bind(e.proxy)),$watch:e=>eu.bind(e)}),sr=(e,t)=>e!==te&&!e.__isScriptSetup&&oe(e,t),Nc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:c,appContext:l}=e;let a;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(sr(r,t))return i[t]=1,r[t];if(s!==te&&oe(s,t))return i[t]=2,s[t];if((a=e.propsOptions[0])&&oe(a,t))return i[t]=3,o[t];if(n!==te&&oe(n,t))return i[t]=4,n[t];$r&&(i[t]=0)}}const u=sn[t];let f,g;if(u)return t==="$attrs"&&be(e.attrs,"get",""),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(n!==te&&oe(n,t))return i[t]=4,n[t];if(g=l.config.globalProperties,oe(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return sr(s,t)?(s[t]=n,!0):r!==te&&oe(r,t)?(r[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let c;return!!n[i]||e!==te&&oe(e,i)||sr(t,i)||(c=o[0])&&oe(c,i)||oe(r,i)||oe(sn,i)||oe(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function On(e){return W(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Li(e,t){return!e||!t?e||t:W(e)&&W(t)?e.concat(t):ve({},On(e),On(t))}let $r=!0;function Oc(e){const t=Di(e),n=e.proxy,r=e.ctx;$r=!1,t.beforeCreate&&Ns(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:c,provide:l,inject:a,created:u,beforeMount:f,mounted:g,beforeUpdate:p,updated:b,activated:w,deactivated:B,beforeDestroy:S,beforeUnmount:R,destroyed:P,unmounted:_,render:G,renderTracked:N,renderTriggered:L,errorCaptured:V,serverPrefetch:D,expose:j,inheritAttrs:H,components:q,directives:U,filters:J}=t;if(a&&Lc(a,r,null),i)for(const ne in i){const Z=i[ne];Q(Z)&&(r[ne]=Z.bind(n))}if(s){const ne=s.call(n,n);he(ne)&&(e.data=$n(ne))}if($r=!0,o)for(const ne in o){const Z=o[ne],Ve=Q(Z)?Z.bind(n,n):Q(Z.get)?Z.get.bind(n,n):et,De=!Q(Z)&&Q(Z.set)?Z.set.bind(n):et,Re=He({get:Ve,set:De});Object.defineProperty(r,ne,{enumerable:!0,configurable:!0,get:()=>Re.value,set:ge=>Re.value=ge})}if(c)for(const ne in c)Fi(c[ne],r,n,ne);if(l){const ne=Q(l)?l.call(n):l;Reflect.ownKeys(ne).forEach(Z=>{Pn(Z,ne[Z])})}u&&Ns(u,e,"c");function de(ne,Z){W(Z)?Z.forEach(Ve=>ne(Ve.bind(n))):Z&&ne(Z.bind(n))}if(de(Cc,f),de(gs,g),de(Rc,p),de(Pc,b),de(wc,w),de(Ec,B),de(Mc,V),de(Ic,N),de(xc,L),de(Ac,R),de(Ni,_),de(Tc,D),W(j))if(j.length){const ne=e.exposed||(e.exposed={});j.forEach(Z=>{Object.defineProperty(ne,Z,{get:()=>n[Z],set:Ve=>n[Z]=Ve})})}else e.exposed||(e.exposed={});G&&e.render===et&&(e.render=G),H!=null&&(e.inheritAttrs=H),q&&(e.components=q),U&&(e.directives=U),D&&Ii(e)}function Lc(e,t,n=et){W(e)&&(e=zr(e));for(const r in e){const s=e[r];let o;he(s)?"default"in s?o=qe(s.from||r,s.default,!0):o=qe(s.from||r):o=qe(s),Se(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function Ns(e,t,n){tt(W(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Fi(e,t,n,r){let s=r.includes(".")?Yi(n,r):()=>n[r];if(pe(e)){const o=t[e];Q(o)&&on(s,o)}else if(Q(e))on(s,e.bind(n));else if(he(e))if(W(e))e.forEach(o=>Fi(o,t,n,r));else{const o=Q(e.handler)?e.handler.bind(n):t[e.handler];Q(o)&&on(s,o,e)}}function Di(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let l;return c?l=c:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(a=>Ln(l,a,i,!0)),Ln(l,t,i)),he(t)&&o.set(t,l),l}function Ln(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Ln(e,o,n,!0),s&&s.forEach(i=>Ln(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const c=Fc[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const Fc={data:Os,props:Ls,emits:Ls,methods:Zt,computed:Zt,beforeCreate:Ae,created:Ae,beforeMount:Ae,mounted:Ae,beforeUpdate:Ae,updated:Ae,beforeDestroy:Ae,beforeUnmount:Ae,destroyed:Ae,unmounted:Ae,activated:Ae,deactivated:Ae,errorCaptured:Ae,serverPrefetch:Ae,components:Zt,directives:Zt,watch:kc,provide:Os,inject:Dc};function Os(e,t){return t?e?function(){return ve(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Dc(e,t){return Zt(zr(e),zr(t))}function zr(e){if(W(e)){const t={};for(let n=0;n1)return n&&Q(t)?t.call(r&&r.proxy):t}}const Ui={},Vi=()=>Object.create(Ui),Hi=e=>Object.getPrototypeOf(e)===Ui;function Hc(e,t,n,r=!1){const s={},o=Vi();e.propsDefaults=Object.create(null),ji(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:bi(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function jc(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,c=se(s),[l]=e.propsOptions;let a=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[g,p]=qi(f,t,!0);ve(i,g),p&&c.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return he(e)&&r.set(e,Dt),Dt;if(W(o))for(let u=0;ue[0]==="_"||e==="$stable",ms=e=>W(e)?e.map(Ze):[Ze(e)],Kc=(e,t,n)=>{if(t._n)return t;const r=yt((...s)=>ms(t(...s)),n);return r._c=!1,r},$i=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Ki(s))continue;const o=e[s];if(Q(o))t[s]=Kc(s,o,r);else if(o!=null){const i=ms(o);t[s]=()=>i}}},zi=(e,t)=>{const n=ms(t);e.slots.default=()=>n},Gi=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},$c=(e,t,n)=>{const r=e.slots=Vi();if(e.vnode.shapeFlag&32){const s=t._;s?(Gi(r,t,n),n&&ti(r,"_",s,!0)):$i(t,r)}else t&&zi(e,t)},zc=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=te;if(r.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:Gi(s,t,n):(o=!t.$stable,$i(t,s)),i=t}else t&&(zi(e,t),i={default:1});if(o)for(const c in s)!Ki(c)&&i[c]==null&&delete s[c]},Oe=iu;function Gc(e){return Wc(e)}function Wc(e,t){const n=jn();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:c,createComment:l,setText:a,setElementText:u,parentNode:f,nextSibling:g,setScopeId:p=et,insertStaticContent:b}=e,w=(d,h,m,v=null,C=null,E=null,O=void 0,I=null,T=!!h.dynamicChildren)=>{if(d===h)return;d&&!Jt(d,h)&&(v=y(d),ge(d,C,E,!0),d=null),h.patchFlag===-2&&(T=!1,h.dynamicChildren=null);const{type:A,ref:z,shapeFlag:F}=h;switch(A){case Jn:B(d,h,m,v);break;case vt:S(d,h,m,v);break;case ir:d==null&&R(h,m,v,O);break;case _e:q(d,h,m,v,C,E,O,I,T);break;default:F&1?G(d,h,m,v,C,E,O,I,T):F&6?U(d,h,m,v,C,E,O,I,T):(F&64||F&128)&&A.process(d,h,m,v,C,E,O,I,T,k)}z!=null&&C&&Nn(z,d&&d.ref,E,h||d,!h)},B=(d,h,m,v)=>{if(d==null)r(h.el=c(h.children),m,v);else{const C=h.el=d.el;h.children!==d.children&&a(C,h.children)}},S=(d,h,m,v)=>{d==null?r(h.el=l(h.children||""),m,v):h.el=d.el},R=(d,h,m,v)=>{[d.el,d.anchor]=b(d.children,h,m,v,d.el,d.anchor)},P=({el:d,anchor:h},m,v)=>{let C;for(;d&&d!==h;)C=g(d),r(d,m,v),d=C;r(h,m,v)},_=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=g(d),s(d),d=m;s(h)},G=(d,h,m,v,C,E,O,I,T)=>{h.type==="svg"?O="svg":h.type==="math"&&(O="mathml"),d==null?N(h,m,v,C,E,O,I,T):D(d,h,C,E,O,I,T)},N=(d,h,m,v,C,E,O,I)=>{let T,A;const{props:z,shapeFlag:F,transition:K,dirs:Y}=d;if(T=d.el=i(d.type,E,z&&z.is,z),F&8?u(T,d.children):F&16&&V(d.children,T,null,v,C,or(d,E),O,I),Y&&St(d,null,v,"created"),L(T,d,d.scopeId,O,v),z){for(const ue in z)ue!=="value"&&!tn(ue)&&o(T,ue,null,z[ue],E,v);"value"in z&&o(T,"value",null,z.value,E),(A=z.onVnodeBeforeMount)&&Je(A,v,d)}Y&&St(d,null,v,"beforeMount");const X=Jc(C,K);X&&K.beforeEnter(T),r(T,h,m),((A=z&&z.onVnodeMounted)||X||Y)&&Oe(()=>{A&&Je(A,v,d),X&&K.enter(T),Y&&St(d,null,v,"mounted")},C)},L=(d,h,m,v,C)=>{if(m&&p(d,m),v)for(let E=0;E{for(let A=T;A{const I=h.el=d.el;let{patchFlag:T,dynamicChildren:A,dirs:z}=h;T|=d.patchFlag&16;const F=d.props||te,K=h.props||te;let Y;if(m&&Ct(m,!1),(Y=K.onVnodeBeforeUpdate)&&Je(Y,m,h,d),z&&St(h,d,m,"beforeUpdate"),m&&Ct(m,!0),(F.innerHTML&&K.innerHTML==null||F.textContent&&K.textContent==null)&&u(I,""),A?j(d.dynamicChildren,A,I,m,v,or(h,C),E):O||Z(d,h,I,null,m,v,or(h,C),E,!1),T>0){if(T&16)H(I,F,K,m,C);else if(T&2&&F.class!==K.class&&o(I,"class",null,K.class,C),T&4&&o(I,"style",F.style,K.style,C),T&8){const X=h.dynamicProps;for(let ue=0;ue{Y&&Je(Y,m,h,d),z&&St(h,d,m,"updated")},v)},j=(d,h,m,v,C,E,O)=>{for(let I=0;I{if(h!==m){if(h!==te)for(const E in h)!tn(E)&&!(E in m)&&o(d,E,h[E],null,C,v);for(const E in m){if(tn(E))continue;const O=m[E],I=h[E];O!==I&&E!=="value"&&o(d,E,I,O,C,v)}"value"in m&&o(d,"value",h.value,m.value,C)}},q=(d,h,m,v,C,E,O,I,T)=>{const A=h.el=d?d.el:c(""),z=h.anchor=d?d.anchor:c("");let{patchFlag:F,dynamicChildren:K,slotScopeIds:Y}=h;Y&&(I=I?I.concat(Y):Y),d==null?(r(A,m,v),r(z,m,v),V(h.children||[],m,z,C,E,O,I,T)):F>0&&F&64&&K&&d.dynamicChildren?(j(d.dynamicChildren,K,m,C,E,O,I),(h.key!=null||C&&h===C.subTree)&&Wi(d,h,!0)):Z(d,h,m,z,C,E,O,I,T)},U=(d,h,m,v,C,E,O,I,T)=>{h.slotScopeIds=I,d==null?h.shapeFlag&512?C.ctx.activate(h,m,v,O,T):J(h,m,v,C,E,O,T):Ce(d,h,T)},J=(d,h,m,v,C,E,O)=>{const I=d.component=hu(d,v,C);if(Mi(d)&&(I.ctx.renderer=k),gu(I,!1,O),I.asyncDep){if(C&&C.registerDep(I,de,O),!d.el){const T=I.subTree=ie(vt);S(null,T,h,m)}}else de(I,d,h,m,C,E,O)},Ce=(d,h,m)=>{const v=h.component=d.component;if(su(d,h,m))if(v.asyncDep&&!v.asyncResolved){ne(v,h,m);return}else v.next=h,v.update();else h.el=d.el,v.vnode=h},de=(d,h,m,v,C,E,O)=>{const I=()=>{if(d.isMounted){let{next:F,bu:K,u:Y,parent:X,vnode:ue}=d;{const Ge=Ji(d);if(Ge){F&&(F.el=ue.el,ne(d,F,O)),Ge.asyncDep.then(()=>{d.isUnmounted||I()});return}}let le=F,Be;Ct(d,!1),F?(F.el=ue.el,ne(d,F,O)):F=ue,K&&Rn(K),(Be=F.props&&F.props.onVnodeBeforeUpdate)&&Je(Be,X,F,ue),Ct(d,!0);const xe=ks(d),ze=d.subTree;d.subTree=xe,w(ze,xe,f(ze.el),y(ze),d,C,E),F.el=xe.el,le===null&&ou(d,xe.el),Y&&Oe(Y,C),(Be=F.props&&F.props.onVnodeUpdated)&&Oe(()=>Je(Be,X,F,ue),C)}else{let F;const{el:K,props:Y}=h,{bm:X,m:ue,parent:le,root:Be,type:xe}=d,ze=Ht(h);Ct(d,!1),X&&Rn(X),!ze&&(F=Y&&Y.onVnodeBeforeMount)&&Je(F,le,h),Ct(d,!0);{Be.ce&&Be.ce._injectChildStyle(xe);const Ge=d.subTree=ks(d);w(null,Ge,m,v,d,C,E),h.el=Ge.el}if(ue&&Oe(ue,C),!ze&&(F=Y&&Y.onVnodeMounted)){const Ge=h;Oe(()=>Je(F,le,Ge),C)}(h.shapeFlag&256||le&&Ht(le.vnode)&&le.vnode.shapeFlag&256)&&d.a&&Oe(d.a,C),d.isMounted=!0,h=m=v=null}};d.scope.on();const T=d.effect=new ii(I);d.scope.off();const A=d.update=T.run.bind(T),z=d.job=T.runIfDirty.bind(T);z.i=d,z.id=d.uid,T.scheduler=()=>hs(z),Ct(d,!0),A()},ne=(d,h,m)=>{h.component=d;const v=d.vnode.props;d.vnode=h,d.next=null,jc(d,h.props,v,m),zc(d,h.children,m),wt(),Bs(d),Et()},Z=(d,h,m,v,C,E,O,I,T=!1)=>{const A=d&&d.children,z=d?d.shapeFlag:0,F=h.children,{patchFlag:K,shapeFlag:Y}=h;if(K>0){if(K&128){De(A,F,m,v,C,E,O,I,T);return}else if(K&256){Ve(A,F,m,v,C,E,O,I,T);return}}Y&8?(z&16&&Pe(A,C,E),F!==A&&u(m,F)):z&16?Y&16?De(A,F,m,v,C,E,O,I,T):Pe(A,C,E,!0):(z&8&&u(m,""),Y&16&&V(F,m,v,C,E,O,I,T))},Ve=(d,h,m,v,C,E,O,I,T)=>{d=d||Dt,h=h||Dt;const A=d.length,z=h.length,F=Math.min(A,z);let K;for(K=0;Kz?Pe(d,C,E,!0,!1,F):V(h,m,v,C,E,O,I,T,F)},De=(d,h,m,v,C,E,O,I,T)=>{let A=0;const z=h.length;let F=d.length-1,K=z-1;for(;A<=F&&A<=K;){const Y=d[A],X=h[A]=T?gt(h[A]):Ze(h[A]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,I,T);else break;A++}for(;A<=F&&A<=K;){const Y=d[F],X=h[K]=T?gt(h[K]):Ze(h[K]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,I,T);else break;F--,K--}if(A>F){if(A<=K){const Y=K+1,X=YK)for(;A<=F;)ge(d[A],C,E,!0),A++;else{const Y=A,X=A,ue=new Map;for(A=X;A<=K;A++){const Ne=h[A]=T?gt(h[A]):Ze(h[A]);Ne.key!=null&&ue.set(Ne.key,A)}let le,Be=0;const xe=K-X+1;let ze=!1,Ge=0;const Gt=new Array(xe);for(A=0;A=xe){ge(Ne,C,E,!0);continue}let We;if(Ne.key!=null)We=ue.get(Ne.key);else for(le=X;le<=K;le++)if(Gt[le-X]===0&&Jt(Ne,h[le])){We=le;break}We===void 0?ge(Ne,C,E,!0):(Gt[We-X]=A+1,We>=Ge?Ge=We:ze=!0,w(Ne,h[We],m,null,C,E,O,I,T),Be++)}const As=ze?Yc(Gt):Dt;for(le=As.length-1,A=xe-1;A>=0;A--){const Ne=X+A,We=h[Ne],Ts=Ne+1{const{el:E,type:O,transition:I,children:T,shapeFlag:A}=d;if(A&6){Re(d.component.subTree,h,m,v);return}if(A&128){d.suspense.move(h,m,v);return}if(A&64){O.move(d,h,m,k);return}if(O===_e){r(E,h,m);for(let F=0;FI.enter(E),C);else{const{leave:F,delayLeave:K,afterLeave:Y}=I,X=()=>r(E,h,m),ue=()=>{F(E,()=>{X(),Y&&Y()})};K?K(E,X,ue):ue()}else r(E,h,m)},ge=(d,h,m,v=!1,C=!1)=>{const{type:E,props:O,ref:I,children:T,dynamicChildren:A,shapeFlag:z,patchFlag:F,dirs:K,cacheIndex:Y}=d;if(F===-2&&(C=!1),I!=null&&Nn(I,null,m,d,!0),Y!=null&&(h.renderCache[Y]=void 0),z&256){h.ctx.deactivate(d);return}const X=z&1&&K,ue=!Ht(d);let le;if(ue&&(le=O&&O.onVnodeBeforeUnmount)&&Je(le,h,d),z&6)ft(d.component,m,v);else{if(z&128){d.suspense.unmount(m,v);return}X&&St(d,null,h,"beforeUnmount"),z&64?d.type.remove(d,h,m,k,v):A&&!A.hasOnce&&(E!==_e||F>0&&F&64)?Pe(A,h,m,!1,!0):(E===_e&&F&384||!C&&z&16)&&Pe(T,h,m),v&&$e(d)}(ue&&(le=O&&O.onVnodeUnmounted)||X)&&Oe(()=>{le&&Je(le,h,d),X&&St(d,null,h,"unmounted")},m)},$e=d=>{const{type:h,el:m,anchor:v,transition:C}=d;if(h===_e){at(m,v);return}if(h===ir){_(d);return}const E=()=>{s(m),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(d.shapeFlag&1&&C&&!C.persisted){const{leave:O,delayLeave:I}=C,T=()=>O(m,E);I?I(d.el,E,T):T()}else E()},at=(d,h)=>{let m;for(;d!==h;)m=g(d),s(d),d=m;s(h)},ft=(d,h,m)=>{const{bum:v,scope:C,job:E,subTree:O,um:I,m:T,a:A}=d;Ds(T),Ds(A),v&&Rn(v),C.stop(),E&&(E.flags|=8,ge(O,d,h,m)),I&&Oe(I,h),Oe(()=>{d.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Pe=(d,h,m,v=!1,C=!1,E=0)=>{for(let O=E;O{if(d.shapeFlag&6)return y(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),m=h&&h[vc];return m?g(m):h};let M=!1;const x=(d,h,m)=>{d==null?h._vnode&&ge(h._vnode,null,null,!0):w(h._vnode||null,d,h,null,null,null,m),h._vnode=d,M||(M=!0,Bs(),Ai(),M=!1)},k={p:w,um:ge,m:Re,r:$e,mt:J,mc:V,pc:Z,pbc:j,n:y,o:e};return{render:x,hydrate:void 0,createApp:Vc(x)}}function or({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Jc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wi(e,t,n=!1){const r=e.children,s=t.children;if(W(r)&&W(s))for(let o=0;o>1,e[n[c]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function Ds(e){if(e)for(let t=0;tqe(Qc);function Zc(e,t){return _s(e,null,{flush:"sync"})}function on(e,t,n){return _s(e,t,n)}function _s(e,t,n=te){const{immediate:r,deep:s,flush:o,once:i}=n,c=ve({},n),l=t&&r||!t&&o!=="post";let a;if(gn){if(o==="sync"){const p=Xc();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=et,p.resume=et,p.pause=et,p}}const u=Ee;c.call=(p,b,w)=>tt(p,u,b,w);let f=!1;o==="post"?c.scheduler=p=>{Oe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,c.scheduler=(p,b)=>{b?p():hs(p)}),c.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=gc(e,t,c);return gn&&(a?a.push(g):l&&g()),g}function eu(e,t,n){const r=this.proxy,s=pe(e)?e.includes(".")?Yi(r,e):()=>r[e]:e.bind(r,r);let o;Q(t)?o=t:(o=t.handler,n=t);const i=bn(this),c=_s(s,o.bind(r),n);return i(),c}function Yi(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{let u,f=te,g;return Zc(()=>{const p=e[s];Ie(u,p)&&(u=p,a())}),{get(){return l(),n.get?n.get(u):u},set(p){const b=n.set?n.set(p):p;if(!Ie(b,u)&&!(f!==te&&Ie(p,f)))return;const w=r.vnode.props;w&&(t in w||s in w||o in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${o}`in w)||(u=p,a()),r.emit(`update:${t}`,b),Ie(p,b)&&Ie(p,f)&&!Ie(b,g)&&a(),f=p,g=b}}});return c[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?i||te:c,done:!1}:{done:!0}}}},c}const Xi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${lt(t)}Modifiers`]||e[`${bt(t)}Modifiers`];function tu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||te;let s=n;const o=t.startsWith("update:"),i=o&&Xi(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>pe(u)?u.trim():u)),i.number&&(s=n.map(Dr)));let c,l=r[c=Zn(t)]||r[c=Zn(lt(t))];!l&&o&&(l=r[c=Zn(bt(t))]),l&&tt(l,e,6,s);const a=r[c+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,tt(a,e,6,s)}}function Zi(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},c=!1;if(!Q(e)){const l=a=>{const u=Zi(a,t,!0);u&&(c=!0,ve(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!c?(he(e)&&r.set(e,null),null):(W(o)?o.forEach(l=>i[l]=null):ve(i,o),he(e)&&r.set(e,i),i)}function Wn(e,t){return!e||!Un(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,bt(t))||oe(e,t))}function ks(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:c,emit:l,render:a,renderCache:u,props:f,data:g,setupState:p,ctx:b,inheritAttrs:w}=e,B=Mn(e);let S,R;try{if(n.shapeFlag&4){const _=s||r,G=_;S=Ze(a.call(G,_,u,f,p,g,b)),R=c}else{const _=t;S=Ze(_.length>1?_(f,{attrs:c,slots:i,emit:l}):_(f,null)),R=t.props?c:nu(c)}}catch(_){ln.length=0,zn(_,e,1),S=ie(vt)}let P=S;if(R&&w!==!1){const _=Object.keys(R),{shapeFlag:G}=P;_.length&&G&7&&(o&&_.some(ts)&&(R=ru(R,o)),P=Kt(P,R,!1,!0))}return n.dirs&&(P=Kt(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&ps(P,n.transition),S=P,Mn(B),S}const nu=e=>{let t;for(const n in e)(n==="class"||n==="style"||Un(n))&&((t||(t={}))[n]=e[n]);return t},ru=(e,t)=>{const n={};for(const r in e)(!ts(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function su(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:c,patchFlag:l}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Us(r,i,a):!!i;if(l&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function iu(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):yc(e)}const _e=Symbol.for("v-fgt"),Jn=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),ir=Symbol.for("v-stc"),ln=[];let Fe=null;function ee(e=!1){ln.push(Fe=e?null:[])}function lu(){ln.pop(),Fe=ln[ln.length-1]||null}let hn=1;function Vs(e,t=!1){hn+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function tl(e){return e.dynamicChildren=hn>0?Fe||Dt:null,lu(),hn>0&&Fe&&Fe.push(e),e}function fe(e,t,n,r,s,o){return tl($(e,t,n,r,s,o,!0))}function Tt(e,t,n,r,s){return tl(ie(e,t,n,r,s,!0))}function pn(e){return e?e.__v_isVNode===!0:!1}function Jt(e,t){return e.type===t.type&&e.key===t.key}const nl=({key:e})=>e??null,An=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Se(e)||Q(e)?{i:ye,r:e,k:t,f:!!n}:e:null);function $(e,t=null,n=null,r=0,s=null,o=e===_e?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nl(t),ref:t&&An(t),scopeId:xi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ye};return c?(ys(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=pe(n)?8:16),hn>0&&!i&&Fe&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Fe.push(l),l}const ie=cu;function cu(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Bc)&&(e=vt),pn(e)){const c=Kt(e,t,!0);return n&&ys(c,n),hn>0&&!o&&Fe&&(c.shapeFlag&6?Fe[Fe.indexOf(e)]=c:Fe.push(c)),c.patchFlag=-2,c}if(vu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:c,style:l}=t;c&&!pe(c)&&(t.class=os(c)),he(l)&&(fs(l)&&!W(l)&&(l=ve({},l)),t.style=ss(l))}const i=pe(e)?1:el(e)?128:bc(e)?64:he(e)?4:Q(e)?2:0;return $(e,t,n,r,s,i,o,!0)}function uu(e){return e?fs(e)||Hi(e)?ve({},e):e:null}function Kt(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:c,transition:l}=e,a=t?au(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&nl(a),ref:t&&t.ref?n&&o?W(o)?o.concat(An(t)):[o,An(t)]:An(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kt(e.ssContent),ssFallback:e.ssFallback&&Kt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ps(u,l.clone(u)),u}function qt(e=" ",t=0){return ie(Jn,null,e,t)}function en(e="",t=!1){return t?(ee(),Tt(vt,null,e)):ie(vt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?ie(vt):W(e)?ie(_e,null,e.slice()):pn(e)?gt(e):ie(Jn,null,String(e))}function gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kt(e)}function ys(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(W(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ys(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Hi(t)?t._ctx=ye:s===3&&ye&&(ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),r&64?(n=16,t=[qt(t)]):n=8);e.children=t,e.shapeFlag|=n}function au(...e){const t={};for(let n=0;nEe||ye;let Fn,Wr;{const e=jn(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Fn=t("__VUE_INSTANCE_SETTERS__",n=>Ee=n),Wr=t("__VUE_SSR_SETTERS__",n=>gn=n)}const bn=e=>{const t=Ee;return Fn(e),e.scope.on(),()=>{e.scope.off(),Fn(t)}},Hs=()=>{Ee&&Ee.scope.off(),Fn(null)};function rl(e){return e.vnode.shapeFlag&4}let gn=!1;function gu(e,t=!1,n=!1){t&&Wr(t);const{props:r,children:s}=e.vnode,o=rl(e);Hc(e,r,o,t),$c(e,s,n);const i=o?mu(e,t):void 0;return t&&Wr(!1),i}function mu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nc);const{setup:r}=n;if(r){wt();const s=e.setupContext=r.length>1?yu(e):null,o=bn(e),i=yn(r,e,0,[e.props,s]),c=Qo(i);if(Et(),o(),(c||e.sp)&&!Ht(e)&&Ii(e),c){if(i.then(Hs,Hs),t)return i.then(l=>{js(e,l)}).catch(l=>{zn(l,e,0)});e.asyncDep=i}else js(e,i)}else sl(e)}function js(e,t,n){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Ci(t)),sl(e)}function sl(e,t,n){const r=e.type;e.render||(e.render=r.render||et);{const s=bn(e);wt();try{Oc(e)}finally{Et(),s()}}}const _u={get(e,t){return be(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,_u),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(Ei(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in sn)return sn[n](e)},has(t,n){return n in t||n in sn}})):e.proxy}function vu(e){return Q(e)&&"__vccOpts"in e}const He=(e,t)=>hc(e,t,gn);function vs(e,t,n){const r=arguments.length;return r===2?he(t)&&!W(t)?pn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&pn(n)&&(n=[n]),ie(e,t,n))}const bu="3.5.13";/** +**/function yn(e,t,n,r){try{return r?e(...r):e()}catch(s){zn(s,t,n)}}function tt(e,t,n,r){if(Q(e)){const s=yn(e,t,n,r);return s&&Qo(s)&&s.catch(o=>{zn(o,t,n)}),s}if(W(e)){const s=[];for(let o=0;o>>1,s=Te[r],o=dn(s);o=dn(n)?Te.push(e):Te.splice(_c(t),0,e),e.flags|=1,Pi()}}function Pi(){In||(In=Ri.then(Ti))}function yc(e){W(e)?Ht.push(...e):pt&&e.id===-1?pt.splice(Ot+1,0,e):e.flags&1||(Ht.push(e),e.flags|=1),Pi()}function Bs(e,t,n=Qe+1){for(;ndn(n)-dn(r));if(Ht.length=0,pt){pt.push(...t);return}for(pt=t,Ot=0;Ote.id==null?e.flags&2?-1:1/0:e.id;function Ti(e){try{for(Qe=0;Qe{r._d&&Hs(-1);const o=Mn(t);let i;try{i=e(...s)}finally{Mn(o),r._d&&Hs(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Bn(e,t){if(ye===null)return e;const n=Yn(ye),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function ps(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ps(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function Me(e,t){return Q(e)?ve({name:e.name},t,{setup:e}):e}function Ii(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Nn(e,t,n,r,s=!1){if(W(e)){e.forEach((b,w)=>Nn(b,t&&(W(t)?t[w]:t),n,r,s));return}if(Vt(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Nn(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Yn(r.component):r.el,i=s?null:o,{i:c,r:l}=e,a=t&&t.r,u=c.refs===te?c.refs={}:c.refs,f=c.setupState,g=se(f),p=f===te?()=>!1:b=>oe(g,b);if(a!=null&&a!==l&&(pe(a)?(u[a]=null,p(a)&&(f[a]=null)):Se(a)&&(a.value=null)),Q(l))yn(l,c,12,[i,u]);else{const b=pe(l),w=Se(l);if(b||w){const B=()=>{if(e.f){const S=b?p(l)?f[l]:u[l]:l.value;s?W(S)&&ns(S,o):W(S)?S.includes(o)||S.push(o):b?(u[l]=[o],p(l)&&(f[l]=u[l])):(l.value=[o],e.k&&(u[e.k]=l.value))}else b?(u[l]=i,p(l)&&(f[l]=i)):w&&(l.value=i,e.k&&(u[e.k]=i))};i?(B.id=-1,Oe(B,n)):B()}}}jn().requestIdleCallback;jn().cancelIdleCallback;const Vt=e=>!!e.type.__asyncLoader,Mi=e=>e.type.__isKeepAlive;function wc(e,t){Bi(e,"a",t)}function Ec(e,t){Bi(e,"da",t)}function Bi(e,t,n=Ee){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Gn(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Mi(s.parent.vnode)&&Sc(r,t,n,s),s=s.parent}}function Sc(e,t,n,r){const s=Gn(t,e,r,!0);Ni(()=>{ns(r[t],s)},n)}function Gn(e,t,n=Ee,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{wt();const c=bn(n),l=tt(t,n,e,i);return c(),Et(),l});return r?s.unshift(o):s.push(o),o}}const ut=e=>(t,n=Ee)=>{(!gn||e==="sp")&&Gn(e,(...r)=>t(...r),n)},Cc=ut("bm"),gs=ut("m"),Rc=ut("bu"),Pc=ut("u"),Ac=ut("bum"),Ni=ut("um"),Tc=ut("sp"),xc=ut("rtg"),Ic=ut("rtc");function Mc(e,t=Ee){Gn("ec",e,t)}const Bc=Symbol.for("v-ndc");function qr(e,t,n,r){let s;const o=n,i=W(e);if(i||pe(e)){const c=i&&Ut(e);let l=!1;c&&(l=!ke(e),e=$n(e)),s=new Array(e.length);for(let a=0,u=e.length;at(c,l,void 0,o));else{const c=Object.keys(e);s=new Array(c.length);for(let l=0,a=c.length;lpn(t)?!(t.type===vt||t.type===_e&&!Oi(t.children)):!0)?e:null}const $r=e=>e?rl(e)?Yn(e):$r(e.parent):null,sn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$r(e.parent),$root:e=>$r(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Fi(e),$forceUpdate:e=>e.f||(e.f=()=>{hs(e.update)}),$nextTick:e=>e.n||(e.n=ds.bind(e.proxy)),$watch:e=>eu.bind(e)}),sr=(e,t)=>e!==te&&!e.__isScriptSetup&&oe(e,t),Nc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:c,appContext:l}=e;let a;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(sr(r,t))return i[t]=1,r[t];if(s!==te&&oe(s,t))return i[t]=2,s[t];if((a=e.propsOptions[0])&&oe(a,t))return i[t]=3,o[t];if(n!==te&&oe(n,t))return i[t]=4,n[t];Kr&&(i[t]=0)}}const u=sn[t];let f,g;if(u)return t==="$attrs"&&be(e.attrs,"get",""),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(n!==te&&oe(n,t))return i[t]=4,n[t];if(g=l.config.globalProperties,oe(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return sr(s,t)?(s[t]=n,!0):r!==te&&oe(r,t)?(r[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let c;return!!n[i]||e!==te&&oe(e,i)||sr(t,i)||(c=o[0])&&oe(c,i)||oe(r,i)||oe(sn,i)||oe(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function On(e){return W(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Li(e,t){return!e||!t?e||t:W(e)&&W(t)?e.concat(t):ve({},On(e),On(t))}let Kr=!0;function Oc(e){const t=Fi(e),n=e.proxy,r=e.ctx;Kr=!1,t.beforeCreate&&Ns(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:c,provide:l,inject:a,created:u,beforeMount:f,mounted:g,beforeUpdate:p,updated:b,activated:w,deactivated:B,beforeDestroy:S,beforeUnmount:R,destroyed:P,unmounted:_,render:G,renderTracked:N,renderTriggered:L,errorCaptured:H,serverPrefetch:F,expose:j,inheritAttrs:V,components:q,directives:U,filters:J}=t;if(a&&Lc(a,r,null),i)for(const ne in i){const Z=i[ne];Q(Z)&&(r[ne]=Z.bind(n))}if(s){const ne=s.call(n,n);he(ne)&&(e.data=Kn(ne))}if(Kr=!0,o)for(const ne in o){const Z=o[ne],He=Q(Z)?Z.bind(n,n):Q(Z.get)?Z.get.bind(n,n):et,Fe=!Q(Z)&&Q(Z.set)?Z.set.bind(n):et,Re=Ve({get:He,set:Fe});Object.defineProperty(r,ne,{enumerable:!0,configurable:!0,get:()=>Re.value,set:ge=>Re.value=ge})}if(c)for(const ne in c)Di(c[ne],r,n,ne);if(l){const ne=Q(l)?l.call(n):l;Reflect.ownKeys(ne).forEach(Z=>{Pn(Z,ne[Z])})}u&&Ns(u,e,"c");function de(ne,Z){W(Z)?Z.forEach(He=>ne(He.bind(n))):Z&&ne(Z.bind(n))}if(de(Cc,f),de(gs,g),de(Rc,p),de(Pc,b),de(wc,w),de(Ec,B),de(Mc,H),de(Ic,N),de(xc,L),de(Ac,R),de(Ni,_),de(Tc,F),W(j))if(j.length){const ne=e.exposed||(e.exposed={});j.forEach(Z=>{Object.defineProperty(ne,Z,{get:()=>n[Z],set:He=>n[Z]=He})})}else e.exposed||(e.exposed={});G&&e.render===et&&(e.render=G),V!=null&&(e.inheritAttrs=V),q&&(e.components=q),U&&(e.directives=U),F&&Ii(e)}function Lc(e,t,n=et){W(e)&&(e=zr(e));for(const r in e){const s=e[r];let o;he(s)?"default"in s?o=qe(s.from||r,s.default,!0):o=qe(s.from||r):o=qe(s),Se(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function Ns(e,t,n){tt(W(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Di(e,t,n,r){let s=r.includes(".")?Yi(n,r):()=>n[r];if(pe(e)){const o=t[e];Q(o)&&on(s,o)}else if(Q(e))on(s,e.bind(n));else if(he(e))if(W(e))e.forEach(o=>Di(o,t,n,r));else{const o=Q(e.handler)?e.handler.bind(n):t[e.handler];Q(o)&&on(s,o,e)}}function Fi(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let l;return c?l=c:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(a=>Ln(l,a,i,!0)),Ln(l,t,i)),he(t)&&o.set(t,l),l}function Ln(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&Ln(e,o,n,!0),s&&s.forEach(i=>Ln(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const c=Dc[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const Dc={data:Os,props:Ls,emits:Ls,methods:Zt,computed:Zt,beforeCreate:Ae,created:Ae,beforeMount:Ae,mounted:Ae,beforeUpdate:Ae,updated:Ae,beforeDestroy:Ae,beforeUnmount:Ae,destroyed:Ae,unmounted:Ae,activated:Ae,deactivated:Ae,errorCaptured:Ae,serverPrefetch:Ae,components:Zt,directives:Zt,watch:kc,provide:Os,inject:Fc};function Os(e,t){return t?e?function(){return ve(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Fc(e,t){return Zt(zr(e),zr(t))}function zr(e){if(W(e)){const t={};for(let n=0;n1)return n&&Q(t)?t.call(r&&r.proxy):t}}const Ui={},Hi=()=>Object.create(Ui),Vi=e=>Object.getPrototypeOf(e)===Ui;function Vc(e,t,n,r=!1){const s={},o=Hi();e.propsDefaults=Object.create(null),ji(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:bi(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function jc(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,c=se(s),[l]=e.propsOptions;let a=!1;if((r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[g,p]=qi(f,t,!0);ve(i,g),p&&c.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return he(e)&&r.set(e,Ft),Ft;if(W(o))for(let u=0;ue[0]==="_"||e==="$stable",ms=e=>W(e)?e.map(Ze):[Ze(e)],$c=(e,t,n)=>{if(t._n)return t;const r=yt((...s)=>ms(t(...s)),n);return r._c=!1,r},Ki=(e,t,n)=>{const r=e._ctx;for(const s in e){if($i(s))continue;const o=e[s];if(Q(o))t[s]=$c(s,o,r);else if(o!=null){const i=ms(o);t[s]=()=>i}}},zi=(e,t)=>{const n=ms(t);e.slots.default=()=>n},Gi=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Kc=(e,t,n)=>{const r=e.slots=Hi();if(e.vnode.shapeFlag&32){const s=t._;s?(Gi(r,t,n),n&&ti(r,"_",s,!0)):Ki(t,r)}else t&&zi(e,t)},zc=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=te;if(r.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:Gi(s,t,n):(o=!t.$stable,Ki(t,s)),i=t}else t&&(zi(e,t),i={default:1});if(o)for(const c in s)!$i(c)&&i[c]==null&&delete s[c]},Oe=iu;function Gc(e){return Wc(e)}function Wc(e,t){const n=jn();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:c,createComment:l,setText:a,setElementText:u,parentNode:f,nextSibling:g,setScopeId:p=et,insertStaticContent:b}=e,w=(d,h,m,v=null,C=null,E=null,O=void 0,I=null,T=!!h.dynamicChildren)=>{if(d===h)return;d&&!Jt(d,h)&&(v=y(d),ge(d,C,E,!0),d=null),h.patchFlag===-2&&(T=!1,h.dynamicChildren=null);const{type:A,ref:z,shapeFlag:D}=h;switch(A){case Jn:B(d,h,m,v);break;case vt:S(d,h,m,v);break;case ir:d==null&&R(h,m,v,O);break;case _e:q(d,h,m,v,C,E,O,I,T);break;default:D&1?G(d,h,m,v,C,E,O,I,T):D&6?U(d,h,m,v,C,E,O,I,T):(D&64||D&128)&&A.process(d,h,m,v,C,E,O,I,T,k)}z!=null&&C&&Nn(z,d&&d.ref,E,h||d,!h)},B=(d,h,m,v)=>{if(d==null)r(h.el=c(h.children),m,v);else{const C=h.el=d.el;h.children!==d.children&&a(C,h.children)}},S=(d,h,m,v)=>{d==null?r(h.el=l(h.children||""),m,v):h.el=d.el},R=(d,h,m,v)=>{[d.el,d.anchor]=b(d.children,h,m,v,d.el,d.anchor)},P=({el:d,anchor:h},m,v)=>{let C;for(;d&&d!==h;)C=g(d),r(d,m,v),d=C;r(h,m,v)},_=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=g(d),s(d),d=m;s(h)},G=(d,h,m,v,C,E,O,I,T)=>{h.type==="svg"?O="svg":h.type==="math"&&(O="mathml"),d==null?N(h,m,v,C,E,O,I,T):F(d,h,C,E,O,I,T)},N=(d,h,m,v,C,E,O,I)=>{let T,A;const{props:z,shapeFlag:D,transition:$,dirs:Y}=d;if(T=d.el=i(d.type,E,z&&z.is,z),D&8?u(T,d.children):D&16&&H(d.children,T,null,v,C,or(d,E),O,I),Y&&St(d,null,v,"created"),L(T,d,d.scopeId,O,v),z){for(const ue in z)ue!=="value"&&!tn(ue)&&o(T,ue,null,z[ue],E,v);"value"in z&&o(T,"value",null,z.value,E),(A=z.onVnodeBeforeMount)&&Je(A,v,d)}Y&&St(d,null,v,"beforeMount");const X=Jc(C,$);X&&$.beforeEnter(T),r(T,h,m),((A=z&&z.onVnodeMounted)||X||Y)&&Oe(()=>{A&&Je(A,v,d),X&&$.enter(T),Y&&St(d,null,v,"mounted")},C)},L=(d,h,m,v,C)=>{if(m&&p(d,m),v)for(let E=0;E{for(let A=T;A{const I=h.el=d.el;let{patchFlag:T,dynamicChildren:A,dirs:z}=h;T|=d.patchFlag&16;const D=d.props||te,$=h.props||te;let Y;if(m&&Ct(m,!1),(Y=$.onVnodeBeforeUpdate)&&Je(Y,m,h,d),z&&St(h,d,m,"beforeUpdate"),m&&Ct(m,!0),(D.innerHTML&&$.innerHTML==null||D.textContent&&$.textContent==null)&&u(I,""),A?j(d.dynamicChildren,A,I,m,v,or(h,C),E):O||Z(d,h,I,null,m,v,or(h,C),E,!1),T>0){if(T&16)V(I,D,$,m,C);else if(T&2&&D.class!==$.class&&o(I,"class",null,$.class,C),T&4&&o(I,"style",D.style,$.style,C),T&8){const X=h.dynamicProps;for(let ue=0;ue{Y&&Je(Y,m,h,d),z&&St(h,d,m,"updated")},v)},j=(d,h,m,v,C,E,O)=>{for(let I=0;I{if(h!==m){if(h!==te)for(const E in h)!tn(E)&&!(E in m)&&o(d,E,h[E],null,C,v);for(const E in m){if(tn(E))continue;const O=m[E],I=h[E];O!==I&&E!=="value"&&o(d,E,I,O,C,v)}"value"in m&&o(d,"value",h.value,m.value,C)}},q=(d,h,m,v,C,E,O,I,T)=>{const A=h.el=d?d.el:c(""),z=h.anchor=d?d.anchor:c("");let{patchFlag:D,dynamicChildren:$,slotScopeIds:Y}=h;Y&&(I=I?I.concat(Y):Y),d==null?(r(A,m,v),r(z,m,v),H(h.children||[],m,z,C,E,O,I,T)):D>0&&D&64&&$&&d.dynamicChildren?(j(d.dynamicChildren,$,m,C,E,O,I),(h.key!=null||C&&h===C.subTree)&&Wi(d,h,!0)):Z(d,h,m,z,C,E,O,I,T)},U=(d,h,m,v,C,E,O,I,T)=>{h.slotScopeIds=I,d==null?h.shapeFlag&512?C.ctx.activate(h,m,v,O,T):J(h,m,v,C,E,O,T):Ce(d,h,T)},J=(d,h,m,v,C,E,O)=>{const I=d.component=hu(d,v,C);if(Mi(d)&&(I.ctx.renderer=k),gu(I,!1,O),I.asyncDep){if(C&&C.registerDep(I,de,O),!d.el){const T=I.subTree=ie(vt);S(null,T,h,m)}}else de(I,d,h,m,C,E,O)},Ce=(d,h,m)=>{const v=h.component=d.component;if(su(d,h,m))if(v.asyncDep&&!v.asyncResolved){ne(v,h,m);return}else v.next=h,v.update();else h.el=d.el,v.vnode=h},de=(d,h,m,v,C,E,O)=>{const I=()=>{if(d.isMounted){let{next:D,bu:$,u:Y,parent:X,vnode:ue}=d;{const Ge=Ji(d);if(Ge){D&&(D.el=ue.el,ne(d,D,O)),Ge.asyncDep.then(()=>{d.isUnmounted||I()});return}}let le=D,Be;Ct(d,!1),D?(D.el=ue.el,ne(d,D,O)):D=ue,$&&Rn($),(Be=D.props&&D.props.onVnodeBeforeUpdate)&&Je(Be,X,D,ue),Ct(d,!0);const xe=ks(d),ze=d.subTree;d.subTree=xe,w(ze,xe,f(ze.el),y(ze),d,C,E),D.el=xe.el,le===null&&ou(d,xe.el),Y&&Oe(Y,C),(Be=D.props&&D.props.onVnodeUpdated)&&Oe(()=>Je(Be,X,D,ue),C)}else{let D;const{el:$,props:Y}=h,{bm:X,m:ue,parent:le,root:Be,type:xe}=d,ze=Vt(h);Ct(d,!1),X&&Rn(X),!ze&&(D=Y&&Y.onVnodeBeforeMount)&&Je(D,le,h),Ct(d,!0);{Be.ce&&Be.ce._injectChildStyle(xe);const Ge=d.subTree=ks(d);w(null,Ge,m,v,d,C,E),h.el=Ge.el}if(ue&&Oe(ue,C),!ze&&(D=Y&&Y.onVnodeMounted)){const Ge=h;Oe(()=>Je(D,le,Ge),C)}(h.shapeFlag&256||le&&Vt(le.vnode)&&le.vnode.shapeFlag&256)&&d.a&&Oe(d.a,C),d.isMounted=!0,h=m=v=null}};d.scope.on();const T=d.effect=new ii(I);d.scope.off();const A=d.update=T.run.bind(T),z=d.job=T.runIfDirty.bind(T);z.i=d,z.id=d.uid,T.scheduler=()=>hs(z),Ct(d,!0),A()},ne=(d,h,m)=>{h.component=d;const v=d.vnode.props;d.vnode=h,d.next=null,jc(d,h.props,v,m),zc(d,h.children,m),wt(),Bs(d),Et()},Z=(d,h,m,v,C,E,O,I,T=!1)=>{const A=d&&d.children,z=d?d.shapeFlag:0,D=h.children,{patchFlag:$,shapeFlag:Y}=h;if($>0){if($&128){Fe(A,D,m,v,C,E,O,I,T);return}else if($&256){He(A,D,m,v,C,E,O,I,T);return}}Y&8?(z&16&&Pe(A,C,E),D!==A&&u(m,D)):z&16?Y&16?Fe(A,D,m,v,C,E,O,I,T):Pe(A,C,E,!0):(z&8&&u(m,""),Y&16&&H(D,m,v,C,E,O,I,T))},He=(d,h,m,v,C,E,O,I,T)=>{d=d||Ft,h=h||Ft;const A=d.length,z=h.length,D=Math.min(A,z);let $;for($=0;$z?Pe(d,C,E,!0,!1,D):H(h,m,v,C,E,O,I,T,D)},Fe=(d,h,m,v,C,E,O,I,T)=>{let A=0;const z=h.length;let D=d.length-1,$=z-1;for(;A<=D&&A<=$;){const Y=d[A],X=h[A]=T?gt(h[A]):Ze(h[A]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,I,T);else break;A++}for(;A<=D&&A<=$;){const Y=d[D],X=h[$]=T?gt(h[$]):Ze(h[$]);if(Jt(Y,X))w(Y,X,m,null,C,E,O,I,T);else break;D--,$--}if(A>D){if(A<=$){const Y=$+1,X=Y$)for(;A<=D;)ge(d[A],C,E,!0),A++;else{const Y=A,X=A,ue=new Map;for(A=X;A<=$;A++){const Ne=h[A]=T?gt(h[A]):Ze(h[A]);Ne.key!=null&&ue.set(Ne.key,A)}let le,Be=0;const xe=$-X+1;let ze=!1,Ge=0;const Gt=new Array(xe);for(A=0;A=xe){ge(Ne,C,E,!0);continue}let We;if(Ne.key!=null)We=ue.get(Ne.key);else for(le=X;le<=$;le++)if(Gt[le-X]===0&&Jt(Ne,h[le])){We=le;break}We===void 0?ge(Ne,C,E,!0):(Gt[We-X]=A+1,We>=Ge?Ge=We:ze=!0,w(Ne,h[We],m,null,C,E,O,I,T),Be++)}const As=ze?Yc(Gt):Ft;for(le=As.length-1,A=xe-1;A>=0;A--){const Ne=X+A,We=h[Ne],Ts=Ne+1{const{el:E,type:O,transition:I,children:T,shapeFlag:A}=d;if(A&6){Re(d.component.subTree,h,m,v);return}if(A&128){d.suspense.move(h,m,v);return}if(A&64){O.move(d,h,m,k);return}if(O===_e){r(E,h,m);for(let D=0;DI.enter(E),C);else{const{leave:D,delayLeave:$,afterLeave:Y}=I,X=()=>r(E,h,m),ue=()=>{D(E,()=>{X(),Y&&Y()})};$?$(E,X,ue):ue()}else r(E,h,m)},ge=(d,h,m,v=!1,C=!1)=>{const{type:E,props:O,ref:I,children:T,dynamicChildren:A,shapeFlag:z,patchFlag:D,dirs:$,cacheIndex:Y}=d;if(D===-2&&(C=!1),I!=null&&Nn(I,null,m,d,!0),Y!=null&&(h.renderCache[Y]=void 0),z&256){h.ctx.deactivate(d);return}const X=z&1&&$,ue=!Vt(d);let le;if(ue&&(le=O&&O.onVnodeBeforeUnmount)&&Je(le,h,d),z&6)ft(d.component,m,v);else{if(z&128){d.suspense.unmount(m,v);return}X&&St(d,null,h,"beforeUnmount"),z&64?d.type.remove(d,h,m,k,v):A&&!A.hasOnce&&(E!==_e||D>0&&D&64)?Pe(A,h,m,!1,!0):(E===_e&&D&384||!C&&z&16)&&Pe(T,h,m),v&&Ke(d)}(ue&&(le=O&&O.onVnodeUnmounted)||X)&&Oe(()=>{le&&Je(le,h,d),X&&St(d,null,h,"unmounted")},m)},Ke=d=>{const{type:h,el:m,anchor:v,transition:C}=d;if(h===_e){at(m,v);return}if(h===ir){_(d);return}const E=()=>{s(m),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(d.shapeFlag&1&&C&&!C.persisted){const{leave:O,delayLeave:I}=C,T=()=>O(m,E);I?I(d.el,E,T):T()}else E()},at=(d,h)=>{let m;for(;d!==h;)m=g(d),s(d),d=m;s(h)},ft=(d,h,m)=>{const{bum:v,scope:C,job:E,subTree:O,um:I,m:T,a:A}=d;Fs(T),Fs(A),v&&Rn(v),C.stop(),E&&(E.flags|=8,ge(O,d,h,m)),I&&Oe(I,h),Oe(()=>{d.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Pe=(d,h,m,v=!1,C=!1,E=0)=>{for(let O=E;O{if(d.shapeFlag&6)return y(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),m=h&&h[vc];return m?g(m):h};let M=!1;const x=(d,h,m)=>{d==null?h._vnode&&ge(h._vnode,null,null,!0):w(h._vnode||null,d,h,null,null,null,m),h._vnode=d,M||(M=!0,Bs(),Ai(),M=!1)},k={p:w,um:ge,m:Re,r:Ke,mt:J,mc:H,pc:Z,pbc:j,n:y,o:e};return{render:x,hydrate:void 0,createApp:Hc(x)}}function or({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Jc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wi(e,t,n=!1){const r=e.children,s=t.children;if(W(r)&&W(s))for(let o=0;o>1,e[n[c]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ji(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ji(t)}function Fs(e){if(e)for(let t=0;tqe(Qc);function Zc(e,t){return _s(e,null,{flush:"sync"})}function on(e,t,n){return _s(e,t,n)}function _s(e,t,n=te){const{immediate:r,deep:s,flush:o,once:i}=n,c=ve({},n),l=t&&r||!t&&o!=="post";let a;if(gn){if(o==="sync"){const p=Xc();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=et,p.resume=et,p.pause=et,p}}const u=Ee;c.call=(p,b,w)=>tt(p,u,b,w);let f=!1;o==="post"?c.scheduler=p=>{Oe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,c.scheduler=(p,b)=>{b?p():hs(p)}),c.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=gc(e,t,c);return gn&&(a?a.push(g):l&&g()),g}function eu(e,t,n){const r=this.proxy,s=pe(e)?e.includes(".")?Yi(r,e):()=>r[e]:e.bind(r,r);let o;Q(t)?o=t:(o=t.handler,n=t);const i=bn(this),c=_s(s,o.bind(r),n);return i(),c}function Yi(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{let u,f=te,g;return Zc(()=>{const p=e[s];Ie(u,p)&&(u=p,a())}),{get(){return l(),n.get?n.get(u):u},set(p){const b=n.set?n.set(p):p;if(!Ie(b,u)&&!(f!==te&&Ie(p,f)))return;const w=r.vnode.props;w&&(t in w||s in w||o in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${o}`in w)||(u=p,a()),r.emit(`update:${t}`,b),Ie(p,b)&&Ie(p,f)&&!Ie(b,g)&&a(),f=p,g=b}}});return c[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?i||te:c,done:!1}:{done:!0}}}},c}const Xi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${lt(t)}Modifiers`]||e[`${bt(t)}Modifiers`];function tu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||te;let s=n;const o=t.startsWith("update:"),i=o&&Xi(r,t.slice(7));i&&(i.trim&&(s=n.map(u=>pe(u)?u.trim():u)),i.number&&(s=n.map(Fr)));let c,l=r[c=Zn(t)]||r[c=Zn(lt(t))];!l&&o&&(l=r[c=Zn(bt(t))]),l&&tt(l,e,6,s);const a=r[c+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,tt(a,e,6,s)}}function Zi(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},c=!1;if(!Q(e)){const l=a=>{const u=Zi(a,t,!0);u&&(c=!0,ve(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!c?(he(e)&&r.set(e,null),null):(W(o)?o.forEach(l=>i[l]=null):ve(i,o),he(e)&&r.set(e,i),i)}function Wn(e,t){return!e||!Un(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,bt(t))||oe(e,t))}function ks(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:c,emit:l,render:a,renderCache:u,props:f,data:g,setupState:p,ctx:b,inheritAttrs:w}=e,B=Mn(e);let S,R;try{if(n.shapeFlag&4){const _=s||r,G=_;S=Ze(a.call(G,_,u,f,p,g,b)),R=c}else{const _=t;S=Ze(_.length>1?_(f,{attrs:c,slots:i,emit:l}):_(f,null)),R=t.props?c:nu(c)}}catch(_){ln.length=0,zn(_,e,1),S=ie(vt)}let P=S;if(R&&w!==!1){const _=Object.keys(R),{shapeFlag:G}=P;_.length&&G&7&&(o&&_.some(ts)&&(R=ru(R,o)),P=$t(P,R,!1,!0))}return n.dirs&&(P=$t(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&ps(P,n.transition),S=P,Mn(B),S}const nu=e=>{let t;for(const n in e)(n==="class"||n==="style"||Un(n))&&((t||(t={}))[n]=e[n]);return t},ru=(e,t)=>{const n={};for(const r in e)(!ts(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function su(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:c,patchFlag:l}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Us(r,i,a):!!i;if(l&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function iu(e,t){t&&t.pendingBranch?W(e)?t.effects.push(...e):t.effects.push(e):yc(e)}const _e=Symbol.for("v-fgt"),Jn=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),ir=Symbol.for("v-stc"),ln=[];let De=null;function ee(e=!1){ln.push(De=e?null:[])}function lu(){ln.pop(),De=ln[ln.length-1]||null}let hn=1;function Hs(e,t=!1){hn+=e,e<0&&De&&t&&(De.hasOnce=!0)}function tl(e){return e.dynamicChildren=hn>0?De||Ft:null,lu(),hn>0&&De&&De.push(e),e}function fe(e,t,n,r,s,o){return tl(K(e,t,n,r,s,o,!0))}function Tt(e,t,n,r,s){return tl(ie(e,t,n,r,s,!0))}function pn(e){return e?e.__v_isVNode===!0:!1}function Jt(e,t){return e.type===t.type&&e.key===t.key}const nl=({key:e})=>e??null,An=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Se(e)||Q(e)?{i:ye,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,r=0,s=null,o=e===_e?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nl(t),ref:t&&An(t),scopeId:xi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ye};return c?(ys(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=pe(n)?8:16),hn>0&&!i&&De&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&De.push(l),l}const ie=cu;function cu(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Bc)&&(e=vt),pn(e)){const c=$t(e,t,!0);return n&&ys(c,n),hn>0&&!o&&De&&(c.shapeFlag&6?De[De.indexOf(e)]=c:De.push(c)),c.patchFlag=-2,c}if(vu(e)&&(e=e.__vccOpts),t){t=uu(t);let{class:c,style:l}=t;c&&!pe(c)&&(t.class=os(c)),he(l)&&(fs(l)&&!W(l)&&(l=ve({},l)),t.style=ss(l))}const i=pe(e)?1:el(e)?128:bc(e)?64:he(e)?4:Q(e)?2:0;return K(e,t,n,r,s,i,o,!0)}function uu(e){return e?fs(e)||Vi(e)?ve({},e):e:null}function $t(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:c,transition:l}=e,a=t?au(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&nl(a),ref:t&&t.ref?n&&o?W(o)?o.concat(An(t)):[o,An(t)]:An(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$t(e.ssContent),ssFallback:e.ssFallback&&$t(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ps(u,l.clone(u)),u}function qt(e=" ",t=0){return ie(Jn,null,e,t)}function en(e="",t=!1){return t?(ee(),Tt(vt,null,e)):ie(vt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?ie(vt):W(e)?ie(_e,null,e.slice()):pn(e)?gt(e):ie(Jn,null,String(e))}function gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$t(e)}function ys(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(W(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ys(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Vi(t)?t._ctx=ye:s===3&&ye&&(ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),r&64?(n=16,t=[qt(t)]):n=8);e.children=t,e.shapeFlag|=n}function au(...e){const t={};for(let n=0;nEe||ye;let Dn,Wr;{const e=jn(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Dn=t("__VUE_INSTANCE_SETTERS__",n=>Ee=n),Wr=t("__VUE_SSR_SETTERS__",n=>gn=n)}const bn=e=>{const t=Ee;return Dn(e),e.scope.on(),()=>{e.scope.off(),Dn(t)}},Vs=()=>{Ee&&Ee.scope.off(),Dn(null)};function rl(e){return e.vnode.shapeFlag&4}let gn=!1;function gu(e,t=!1,n=!1){t&&Wr(t);const{props:r,children:s}=e.vnode,o=rl(e);Vc(e,r,o,t),Kc(e,s,n);const i=o?mu(e,t):void 0;return t&&Wr(!1),i}function mu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nc);const{setup:r}=n;if(r){wt();const s=e.setupContext=r.length>1?yu(e):null,o=bn(e),i=yn(r,e,0,[e.props,s]),c=Qo(i);if(Et(),o(),(c||e.sp)&&!Vt(e)&&Ii(e),c){if(i.then(Vs,Vs),t)return i.then(l=>{js(e,l)}).catch(l=>{zn(l,e,0)});e.asyncDep=i}else js(e,i)}else sl(e)}function js(e,t,n){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Ci(t)),sl(e)}function sl(e,t,n){const r=e.type;e.render||(e.render=r.render||et);{const s=bn(e);wt();try{Oc(e)}finally{Et(),s()}}}const _u={get(e,t){return be(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,_u),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(Ei(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in sn)return sn[n](e)},has(t,n){return n in t||n in sn}})):e.proxy}function vu(e){return Q(e)&&"__vccOpts"in e}const Ve=(e,t)=>hc(e,t,gn);function vs(e,t,n){const r=arguments.length;return r===2?he(t)&&!W(t)?pn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&pn(n)&&(n=[n]),ie(e,t,n))}const bu="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Jr;const qs=typeof window<"u"&&window.trustedTypes;if(qs)try{Jr=qs.createPolicy("vue",{createHTML:e=>e})}catch{}const ol=Jr?e=>Jr.createHTML(e):e=>e,wu="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",st=typeof document<"u"?document:null,Ks=st&&st.createElement("template"),Su={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?st.createElementNS(wu,e):t==="mathml"?st.createElementNS(Eu,e):n?st.createElement(e,{is:n}):st.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>st.createTextNode(e),createComment:e=>st.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>st.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{Ks.innerHTML=ol(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const c=Ks.content;if(r==="svg"||r==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Cu=Symbol("_vtc");function Ru(e,t,n){const r=e[Cu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Dn=Symbol("_vod"),il=Symbol("_vsh"),Pu={beforeMount(e,{value:t},{transition:n}){e[Dn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Yt(e,!0),r.enter(e)):r.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Dn]:"none",e[il]=!t}const Au=Symbol(""),Tu=/(^|;)\s*display\s*:/;function xu(e,t,n){const r=e.style,s=pe(n);let o=!1;if(n&&!s){if(t)if(pe(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&Tn(r,c,"")}else for(const i in t)n[i]==null&&Tn(r,i,"");for(const i in n)i==="display"&&(o=!0),Tn(r,i,n[i])}else if(s){if(t!==n){const i=r[Au];i&&(n+=";"+i),r.cssText=n,o=Tu.test(n)}}else t&&e.removeAttribute("style");Dn in e&&(e[Dn]=o?r.display:"",e[il]&&(r.display="none"))}const $s=/\s*!important$/;function Tn(e,t,n){if(W(n))n.forEach(r=>Tn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Iu(e,t);$s.test(n)?e.setProperty(bt(r),n.replace($s,""),"important"):e[r]=n}}const zs=["Webkit","Moz","ms"],lr={};function Iu(e,t){const n=lr[t];if(n)return n;let r=lt(t);if(r!=="filter"&&r in e)return lr[t]=r;r=ei(r);for(let s=0;scr||(Ou.then(()=>cr=0),cr=Date.now());function Fu(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;tt(Du(r,n.value),t,5,[r])};return n.value=e,n.attached=Lu(),n}function Du(e,t){if(W(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ku=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Ru(e,r,i):t==="style"?xu(e,n,r):Un(t)?ts(t)||Bu(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Uu(e,t,r,i))?(Js(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ws(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!pe(r))?Js(e,lt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ws(e,t,r,i))};function Uu(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xs(t)&&Q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Xs(t)&&pe(n)?!1:t in e}const Zs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?n=>Rn(t,n):t};function Vu(e){e.target.composing=!0}function eo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ur=Symbol("_assign"),Yr={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[ur]=Zs(s);const o=r||s.props&&s.props.type==="number";Lt(e,t?"change":"input",i=>{if(i.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=Dr(c)),e[ur](c)}),n&&Lt(e,"change",()=>{e.value=e.value.trim()}),t||(Lt(e,"compositionstart",Vu),Lt(e,"compositionend",eo),Lt(e,"change",eo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[ur]=Zs(i),e.composing)return;const c=(o||e.type==="number")&&!/^0\d/.test(e.value)?Dr(e.value):e.value,l=t??"";c!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},Hu=["ctrl","shift","alt","meta"],ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Hu.some(n=>e[`${n}Key`]&&!t.includes(n))},ll=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const t=Ku().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Gu(r);if(!s)return;const o=t._component;!Q(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,zu(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t};function zu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Gu(e){return pe(e)?document.querySelector(e):e}/*! +**/let Jr;const qs=typeof window<"u"&&window.trustedTypes;if(qs)try{Jr=qs.createPolicy("vue",{createHTML:e=>e})}catch{}const ol=Jr?e=>Jr.createHTML(e):e=>e,wu="http://www.w3.org/2000/svg",Eu="http://www.w3.org/1998/Math/MathML",st=typeof document<"u"?document:null,$s=st&&st.createElement("template"),Su={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?st.createElementNS(wu,e):t==="mathml"?st.createElementNS(Eu,e):n?st.createElement(e,{is:n}):st.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>st.createTextNode(e),createComment:e=>st.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>st.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{$s.innerHTML=ol(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const c=$s.content;if(r==="svg"||r==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Cu=Symbol("_vtc");function Ru(e,t,n){const r=e[Cu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fn=Symbol("_vod"),il=Symbol("_vsh"),Pu={beforeMount(e,{value:t},{transition:n}){e[Fn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Yt(e,!0),r.enter(e)):r.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Fn]:"none",e[il]=!t}const Au=Symbol(""),Tu=/(^|;)\s*display\s*:/;function xu(e,t,n){const r=e.style,s=pe(n);let o=!1;if(n&&!s){if(t)if(pe(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&Tn(r,c,"")}else for(const i in t)n[i]==null&&Tn(r,i,"");for(const i in n)i==="display"&&(o=!0),Tn(r,i,n[i])}else if(s){if(t!==n){const i=r[Au];i&&(n+=";"+i),r.cssText=n,o=Tu.test(n)}}else t&&e.removeAttribute("style");Fn in e&&(e[Fn]=o?r.display:"",e[il]&&(r.display="none"))}const Ks=/\s*!important$/;function Tn(e,t,n){if(W(n))n.forEach(r=>Tn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Iu(e,t);Ks.test(n)?e.setProperty(bt(r),n.replace(Ks,""),"important"):e[r]=n}}const zs=["Webkit","Moz","ms"],lr={};function Iu(e,t){const n=lr[t];if(n)return n;let r=lt(t);if(r!=="filter"&&r in e)return lr[t]=r;r=ei(r);for(let s=0;scr||(Ou.then(()=>cr=0),cr=Date.now());function Du(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;tt(Fu(r,n.value),t,5,[r])};return n.value=e,n.attached=Lu(),n}function Fu(e,t){if(W(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ku=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?Ru(e,r,i):t==="style"?xu(e,n,r):Un(t)?ts(t)||Bu(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Uu(e,t,r,i))?(Js(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ws(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!pe(r))?Js(e,lt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ws(e,t,r,i))};function Uu(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xs(t)&&Q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Xs(t)&&pe(n)?!1:t in e}const Zs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return W(t)?n=>Rn(t,n):t};function Hu(e){e.target.composing=!0}function eo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ur=Symbol("_assign"),Yr={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[ur]=Zs(s);const o=r||s.props&&s.props.type==="number";Lt(e,t?"change":"input",i=>{if(i.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=Fr(c)),e[ur](c)}),n&&Lt(e,"change",()=>{e.value=e.value.trim()}),t||(Lt(e,"compositionstart",Hu),Lt(e,"compositionend",eo),Lt(e,"change",eo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[ur]=Zs(i),e.composing)return;const c=(o||e.type==="number")&&!/^0\d/.test(e.value)?Fr(e.value):e.value,l=t??"";c!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},Vu=["ctrl","shift","alt","meta"],ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vu.some(n=>e[`${n}Key`]&&!t.includes(n))},ll=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const t=$u().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Gu(r);if(!s)return;const o=t._component;!Q(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,zu(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t};function zu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Gu(e){return pe(e)?document.querySelector(e):e}/*! * pinia v3.0.2 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Wu=Symbol();var no;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(no||(no={}));function Ju(){const e=Hl(!0),t=e.run(()=>me({}));let n=[],r=[];const s=Ei({install(o){s._a=o,o.provide(Wu,s),o.config.globalProperties.$pinia=s,r.forEach(i=>n.push(i)),r=[]},use(o){return this._a?n.push(o):r.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}/*! + */const Wu=Symbol();var no;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(no||(no={}));function Ju(){const e=Vl(!0),t=e.run(()=>me({}));let n=[],r=[];const s=Ei({install(o){s._a=o,o.provide(Wu,s),o.config.globalProperties.$pinia=s,r.forEach(i=>n.push(i)),r=[]},use(o){return this._a?n.push(o):r.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Ft=typeof document<"u";function cl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Yu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&cl(e.default)}const re=Object.assign;function ar(e,t){const n={};for(const r in t){const s=t[r];n[r]=Ke(s)?s.map(e):e(s)}return n}const cn=()=>{},Ke=Array.isArray,ul=/#/g,Qu=/&/g,Xu=/\//g,Zu=/=/g,ea=/\?/g,al=/\+/g,ta=/%5B/g,na=/%5D/g,fl=/%5E/g,ra=/%60/g,dl=/%7B/g,sa=/%7C/g,hl=/%7D/g,oa=/%20/g;function bs(e){return encodeURI(""+e).replace(sa,"|").replace(ta,"[").replace(na,"]")}function ia(e){return bs(e).replace(dl,"{").replace(hl,"}").replace(fl,"^")}function Qr(e){return bs(e).replace(al,"%2B").replace(oa,"+").replace(ul,"%23").replace(Qu,"%26").replace(ra,"`").replace(dl,"{").replace(hl,"}").replace(fl,"^")}function la(e){return Qr(e).replace(Zu,"%3D")}function ca(e){return bs(e).replace(ul,"%23").replace(ea,"%3F")}function ua(e){return e==null?"":ca(e).replace(Xu,"%2F")}function mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const aa=/\/$/,fa=e=>e.replace(aa,"");function fr(e,t,n="/"){let r,s={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),s=e(o)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=ga(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:mn(i)}}function da(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ro(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ha(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&$t(t.matched[r],n.matched[s])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function $t(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!pa(e[n],t[n]))return!1;return!0}function pa(e,t){return Ke(e)?so(e,t):Ke(t)?so(t,e):e===t}function so(e,t){return Ke(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ga(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _n;(function(e){e.pop="pop",e.push="push"})(_n||(_n={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={}));function ma(e){if(!e)if(Ft){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fa(e)}const _a=/^[^#]+#/;function ya(e,t){return e.replace(_a,"#")+t}function va(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qn=()=>({left:window.scrollX,top:window.scrollY});function ba(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=va(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oo(e,t){return(history.state?history.state.position-t:-1)+e}const Xr=new Map;function wa(e,t){Xr.set(e,t)}function Ea(e){const t=Xr.get(e);return Xr.delete(e),t}let Sa=()=>location.protocol+"//"+location.host;function gl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let c=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(c);return l[0]!=="/"&&(l="/"+l),ro(l,"")}return ro(n,e)+r+s}function Ca(e,t,n,r){let s=[],o=[],i=null;const c=({state:g})=>{const p=gl(e,location),b=n.value,w=t.value;let B=0;if(g){if(n.value=p,t.value=g,i&&i===b){i=null;return}B=w?g.position-w.position:0}else r(p);s.forEach(S=>{S(n.value,b,{delta:B,type:_n.pop,direction:B?B>0?un.forward:un.back:un.unknown})})};function l(){i=n.value}function a(g){s.push(g);const p=()=>{const b=s.indexOf(g);b>-1&&s.splice(b,1)};return o.push(p),p}function u(){const{history:g}=window;g.state&&g.replaceState(re({},g.state,{scroll:Qn()}),"")}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:a,destroy:f}}function io(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qn():null}}function Ra(e){const{history:t,location:n}=window,r={value:gl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Sa()+e+l;try{t[u?"replaceState":"pushState"](a,"",g),s.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(l,a){const u=re({},t.state,io(s.value.back,l,s.value.forward,!0),a,{position:s.value.position});o(l,u,!0),r.value=l}function c(l,a){const u=re({},s.value,t.state,{forward:l,scroll:Qn()});o(u.current,u,!0);const f=re({},io(r.value,l,null),{position:u.position+1},a);o(l,f,!1),r.value=l}return{location:r,state:s,push:c,replace:i}}function Pa(e){e=ma(e);const t=Ra(e),n=Ca(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=re({location:"",base:e,go:r,createHref:ya.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Aa(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}const _l=Symbol("");var lo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lo||(lo={}));function zt(e,t){return re(new Error,{type:e,[_l]:!0},t)}function rt(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const co="[^/]+?",Ta={sensitive:!1,strict:!1,start:!0,end:!0},xa=/[.+*?^${}()[\]/\\]/g;function Ia(e,t){const n=re({},Ta,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function yl(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Ba={type:0,value:""},Na=/[a-zA-Z0-9_]/;function Oa(e){if(!e)return[[]];if(e==="/")return[[Ba]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let c=0,l,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=l}for(;c{i(P)}:cn}function i(f){if(ml(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function c(){return n}function l(f){const g=Ua(f,n);n.splice(g,0,f),f.record.name&&!ho(f)&&r.set(f.record.name,f)}function a(f,g){let p,b={},w,B;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw zt(1,{location:f});B=p.record.name,b=re(ao(g.params,p.keys.filter(P=>!P.optional).concat(p.parent?p.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),f.params&&ao(f.params,p.keys.map(P=>P.name))),w=p.stringify(b)}else if(f.path!=null)w=f.path,p=n.find(P=>P.re.test(w)),p&&(b=p.parse(w),B=p.record.name);else{if(p=g.name?r.get(g.name):n.find(P=>P.re.test(g.path)),!p)throw zt(1,{location:f,currentLocation:g});B=p.record.name,b=re({},g.params,f.params),w=p.stringify(b)}const S=[];let R=p;for(;R;)S.unshift(R.record),R=R.parent;return{name:B,path:w,params:b,matched:S,meta:ka(S)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:s}}function ao(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Da(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Da(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ho(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ka(e){return e.reduce((t,n)=>re(t,n.meta),{})}function po(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ua(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;yl(e,t[o])<0?r=o:n=o+1}const s=Va(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Va(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ha(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qr(o)):[r&&Qr(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function ja(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ke(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const qa=Symbol(""),mo=Symbol(""),Xn=Symbol(""),ws=Symbol(""),Zr=Symbol("");function Qt(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function mt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,l)=>{const a=g=>{g===!1?l(zt(4,{from:n,to:t})):g instanceof Error?l(g):Aa(g)?l(zt(2,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),c())},u=o(()=>e.call(r&&r.instances[s],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>l(g))})}function dr(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(cl(l)){const u=(l.__vccOpts||l)[t];u&&o.push(mt(u,n,r,i,c,s))}else{let a=l();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const f=Yu(u)?u.default:u;i.mods[c]=u,i.components[c]=f;const p=(f.__vccOpts||f)[t];return p&&mt(p,n,r,i,c,s)()}))}}return o}function _o(e){const t=qe(Xn),n=qe(ws),r=He(()=>{const l=_t(e.to);return t.resolve(l)}),s=He(()=>{const{matched:l}=r.value,{length:a}=l,u=l[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex($t.bind(null,u));if(g>-1)return g;const p=yo(l[a-2]);return a>1&&yo(u)===p&&f[f.length-1].path!==p?f.findIndex($t.bind(null,l[a-2])):g}),o=He(()=>s.value>-1&&Wa(n.params,r.value.params)),i=He(()=>s.value>-1&&s.value===n.matched.length-1&&pl(n.params,r.value.params));function c(l={}){if(Ga(l)){const a=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:r,href:He(()=>r.value.href),isActive:o,isExactActive:i,navigate:c}}function Ka(e){return e.length===1?e[0]:e}const $a=Me({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:_o,setup(e,{slots:t}){const n=$n(_o(e)),{options:r}=qe(Xn),s=He(()=>({[vo(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[vo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Ka(t.default(n));return e.custom?o:vs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),za=$a;function Ga(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wa(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Ke(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function yo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vo=(e,t,n)=>e??t??n,Ja=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qe(Zr),s=He(()=>e.route||r.value),o=qe(mo,0),i=He(()=>{let a=_t(o);const{matched:u}=s.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),c=He(()=>s.value.matched[i.value]);Pn(mo,He(()=>i.value+1)),Pn(qa,c),Pn(Zr,s);const l=me();return on(()=>[l.value,c.value,e.name],([a,u,f],[g,p,b])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!$t(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(w=>w(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,f=c.value,g=f&&f.components[u];if(!g)return bo(n.default,{Component:g,route:a});const p=f.props[u],b=p?p===!0?a.params:typeof p=="function"?p(a):p:null,B=vs(g,re({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bo(n.default,{Component:B,route:a})||B}}});function bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bl=Ja;function Ya(e){const t=Fa(e.routes,e),n=e.parseQuery||Ha,r=e.stringifyQuery||go,s=e.history,o=Qt(),i=Qt(),c=Qt(),l=lc(dt);let a=dt;Ft&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ar.bind(null,y=>""+y),f=ar.bind(null,ua),g=ar.bind(null,mn);function p(y,M){let x,k;return ml(y)?(x=t.getRecordMatcher(y),k=M):k=y,t.addRoute(k,x)}function b(y){const M=t.getRecordMatcher(y);M&&t.removeRoute(M)}function w(){return t.getRoutes().map(y=>y.record)}function B(y){return!!t.getRecordMatcher(y)}function S(y,M){if(M=re({},M||l.value),typeof y=="string"){const m=fr(n,y,M.path),v=t.resolve({path:m.path},M),C=s.createHref(m.fullPath);return re(m,v,{params:g(v.params),hash:mn(m.hash),redirectedFrom:void 0,href:C})}let x;if(y.path!=null)x=re({},y,{path:fr(n,y.path,M.path).path});else{const m=re({},y.params);for(const v in m)m[v]==null&&delete m[v];x=re({},y,{params:f(m)}),M.params=f(M.params)}const k=t.resolve(x,M),ce=y.hash||"";k.params=u(g(k.params));const d=da(r,re({},y,{hash:ia(ce),path:k.path})),h=s.createHref(d);return re({fullPath:d,hash:ce,query:r===go?ja(y.query):y.query||{}},k,{redirectedFrom:void 0,href:h})}function R(y){return typeof y=="string"?fr(n,y,l.value.path):re({},y)}function P(y,M){if(a!==y)return zt(8,{from:M,to:y})}function _(y){return L(y)}function G(y){return _(re(R(y),{replace:!0}))}function N(y){const M=y.matched[y.matched.length-1];if(M&&M.redirect){const{redirect:x}=M;let k=typeof x=="function"?x(y):x;return typeof k=="string"&&(k=k.includes("?")||k.includes("#")?k=R(k):{path:k},k.params={}),re({query:y.query,hash:y.hash,params:k.path!=null?{}:y.params},k)}}function L(y,M){const x=a=S(y),k=l.value,ce=y.state,d=y.force,h=y.replace===!0,m=N(x);if(m)return L(re(R(m),{state:typeof m=="object"?re({},ce,m.state):ce,force:d,replace:h}),M||x);const v=x;v.redirectedFrom=M;let C;return!d&&ha(r,k,x)&&(C=zt(16,{to:v,from:k}),Re(k,k,!0,!1)),(C?Promise.resolve(C):j(v,k)).catch(E=>rt(E)?rt(E,2)?E:De(E):Z(E,v,k)).then(E=>{if(E){if(rt(E,2))return L(re({replace:h},R(E.to),{state:typeof E.to=="object"?re({},ce,E.to.state):ce,force:d}),M||v)}else E=q(v,k,!0,h,ce);return H(v,k,E),E})}function V(y,M){const x=P(y,M);return x?Promise.reject(x):Promise.resolve()}function D(y){const M=at.values().next().value;return M&&typeof M.runWithContext=="function"?M.runWithContext(y):y()}function j(y,M){let x;const[k,ce,d]=Qa(y,M);x=dr(k.reverse(),"beforeRouteLeave",y,M);for(const m of k)m.leaveGuards.forEach(v=>{x.push(mt(v,y,M))});const h=V.bind(null,y,M);return x.push(h),Pe(x).then(()=>{x=[];for(const m of o.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).then(()=>{x=dr(ce,"beforeRouteUpdate",y,M);for(const m of ce)m.updateGuards.forEach(v=>{x.push(mt(v,y,M))});return x.push(h),Pe(x)}).then(()=>{x=[];for(const m of d)if(m.beforeEnter)if(Ke(m.beforeEnter))for(const v of m.beforeEnter)x.push(mt(v,y,M));else x.push(mt(m.beforeEnter,y,M));return x.push(h),Pe(x)}).then(()=>(y.matched.forEach(m=>m.enterCallbacks={}),x=dr(d,"beforeRouteEnter",y,M,D),x.push(h),Pe(x))).then(()=>{x=[];for(const m of i.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).catch(m=>rt(m,8)?m:Promise.reject(m))}function H(y,M,x){c.list().forEach(k=>D(()=>k(y,M,x)))}function q(y,M,x,k,ce){const d=P(y,M);if(d)return d;const h=M===dt,m=Ft?history.state:{};x&&(k||h?s.replace(y.fullPath,re({scroll:h&&m&&m.scroll},ce)):s.push(y.fullPath,ce)),l.value=y,Re(y,M,x,h),De()}let U;function J(){U||(U=s.listen((y,M,x)=>{if(!ft.listening)return;const k=S(y),ce=N(k);if(ce){L(re(ce,{replace:!0,force:!0}),k).catch(cn);return}a=k;const d=l.value;Ft&&wa(oo(d.fullPath,x.delta),Qn()),j(k,d).catch(h=>rt(h,12)?h:rt(h,2)?(L(re(R(h.to),{force:!0}),k).then(m=>{rt(m,20)&&!x.delta&&x.type===_n.pop&&s.go(-1,!1)}).catch(cn),Promise.reject()):(x.delta&&s.go(-x.delta,!1),Z(h,k,d))).then(h=>{h=h||q(k,d,!1),h&&(x.delta&&!rt(h,8)?s.go(-x.delta,!1):x.type===_n.pop&&rt(h,20)&&s.go(-1,!1)),H(k,d,h)}).catch(cn)}))}let Ce=Qt(),de=Qt(),ne;function Z(y,M,x){De(y);const k=de.list();return k.length?k.forEach(ce=>ce(y,M,x)):console.error(y),Promise.reject(y)}function Ve(){return ne&&l.value!==dt?Promise.resolve():new Promise((y,M)=>{Ce.add([y,M])})}function De(y){return ne||(ne=!y,J(),Ce.list().forEach(([M,x])=>y?x(y):M()),Ce.reset()),y}function Re(y,M,x,k){const{scrollBehavior:ce}=e;if(!Ft||!ce)return Promise.resolve();const d=!x&&Ea(oo(y.fullPath,0))||(k||!x)&&history.state&&history.state.scroll||null;return ds().then(()=>ce(y,M,d)).then(h=>h&&ba(h)).catch(h=>Z(h,y,M))}const ge=y=>s.go(y);let $e;const at=new Set,ft={currentRoute:l,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:w,resolve:S,options:e,push:_,replace:G,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:de.add,isReady:Ve,install(y){const M=this;y.component("RouterLink",za),y.component("RouterView",bl),y.config.globalProperties.$router=M,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(l)}),Ft&&!$e&&l.value===dt&&($e=!0,_(s.location).catch(ce=>{}));const x={};for(const ce in dt)Object.defineProperty(x,ce,{get:()=>l.value[ce],enumerable:!0});y.provide(Xn,M),y.provide(ws,bi(x)),y.provide(Zr,l);const k=y.unmount;at.add(y),y.unmount=function(){at.delete(y),at.size<1&&(a=dt,U&&U(),U=null,l.value=dt,$e=!1,ne=!1),k()}}};function Pe(y){return y.reduce((M,x)=>M.then(()=>D(x)),Promise.resolve())}return ft}function Qa(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i$t(a,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(a=>$t(a,l))||s.push(l))}return[n,r,s]}function wl(){return qe(Xn)}function Xa(e){return qe(ws)}const Za=Me({__name:"App",setup(e){return(t,n)=>(ee(),Tt(_t(bl)))}}),Ue=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ef=Ue(Za,[["__scopeId","data-v-913ef6b1"]]),tf="/assets/logo_belt-BKkOxVEN.png",nf={},rf={class:"belt-block"};function sf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=$("div",{class:"shadow"},null,-1)),$("div",rf,[vn(e.$slots,"default",{},void 0)])])}const of=Ue(nf,[["render",sf],["__scopeId","data-v-9903d979"]]),lf={},cf={class:"belt-block"};function uf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=$("div",{class:"shadow shadow-top"},null,-1)),t[1]||(t[1]=$("div",{class:"shadow shadow-bottom"},null,-1)),$("div",cf,[vn(e.$slots,"default",{},void 0)])])}const El=Ue(lf,[["render",uf],["__scopeId","data-v-57312f28"]]),af={class:"text-with-font"},ff=Me({__name:"HeaderText",setup(e){return(t,n)=>(ee(),fe("span",af,[vn(t.$slots,"default",{},void 0)]))}}),Sl=Ue(ff,[["__scopeId","data-v-33b571eb"]]),df={},hf={class:"plate-block"},pf={class:"metal-plate-block"};function gf(e,t){return ee(),fe("div",hf,[$("div",pf,[vn(e.$slots,"default",{},void 0)]),t[0]||(t[0]=$("div",{class:"pin pin-top-left"},null,-1)),t[1]||(t[1]=$("div",{class:"pin pin-top-right"},null,-1)),t[2]||(t[2]=$("div",{class:"pin pin-bottom-right"},null,-1)),t[3]||(t[3]=$("div",{class:"pin pin-bottom-left"},null,-1))])}const kn=Ue(df,[["render",gf],["__scopeId","data-v-24c80f2d"]]),mf={class:"game-header"},_f={class:"center"},yf={class:"position-right-center-block"},vf=Me({__name:"GameHeader",setup(e){return(t,n)=>(ee(),fe("div",mf,[$("div",_f,[ie(kn,{class:"controller-metal controller-metal-left"}),ie(kn,{class:"controller-metal controller-metal-right"}),n[1]||(n[1]=$("img",{alt:"Вечерний детектив",class:"logo",src:tf},null,-1)),ie(of,{class:"belt-mini"}),ie(El,{class:"belt"},{default:yt(()=>[$("div",yf,[ie(Sl,null,{default:yt(()=>n[0]||(n[0]=[qt("Вечерний детектив")])),_:1})])]),_:1})])]))}}),bf=Ue(vf,[["__scopeId","data-v-cb5d784c"]]);class xt extends Error{constructor(t="Пользователь не авторизован (401)"){super(t),this.name="UnauthorizedError",Object.setPrototypeOf(this,xt.prototype)}}const Cl=async(e,t)=>{try{const n=await fetch(Es("/team"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetTeam] error:",n),n}},Rl=async(e,t,n)=>{try{const r=await fetch(Es("/team/actions"),{method:"POST",headers:{"X-Id":Ss(e),"X-Password":t},body:JSON.stringify({place:n})});if(r.status===401)throw new xt("Ошибка авторизации");if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiLetsgo] error:",r),r}},wf=async(e,t)=>{try{const n=await fetch(Es("/game"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetGame] error:",n),n}};function Es(e){return"http://"+window.location.host.split(":")[0]+":8090"+e}function Ss(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16))))}var Nt={},hr,wo;function Ef(){return wo||(wo=1,hr=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),hr}var pr={},ht={},Eo;function It(){if(Eo)return ht;Eo=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ht.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ht.getSymbolTotalCodewords=function(r){return t[r]},ht.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ht.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},ht.isKanjiModeEnabled=function(){return typeof e<"u"},ht.toSJIS=function(r){return e(r)},ht}var gr={},So;function Cs(){return So||(So=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}}(gr)),gr}var mr,Co;function Sf(){if(Co)return mr;Co=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},mr=e,mr}var _r,Ro;function Cf(){if(Ro)return _r;Ro=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,s){const o=t*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},_r=e,_r}var yr={},Po;function Rf(){return Po||(Po=1,function(e){const t=It().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*s-2))*2,c=[o-7];for(let l=1;l=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const o=s.size;let i=0,c=0,l=0,a=null,u=null;for(let f=0;f=5&&(i+=t.N1+(c-5)),a=p,c=1),p=s.get(g,f),p===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=p,l=1)}c>=5&&(i+=t.N1+(c-5)),l>=5&&(i+=t.N1+(l-5))}return i},e.getPenaltyN2=function(s){const o=s.size;let i=0;for(let c=0;c=10&&(c===1488||c===93)&&i++,l=l<<1&2047|s.get(u,a),u>=10&&(l===1488||l===93)&&i++}return i*t.N3},e.getPenaltyN4=function(s){let o=0;const i=s.data.length;for(let l=0;l=0;){const i=o[0];for(let l=0;l0){const c=new Uint8Array(this.degree);return c.set(o,i),c}return o},Er=t,Er}var Sr={},Cr={},Rr={},No;function Al(){return No||(No=1,Rr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Rr}var Ye={},Oo;function Tl(){if(Oo)return Ye;Oo=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r -]))+`;Ye.KANJI=new RegExp(n,"g"),Ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ye.BYTE=new RegExp(r,"g"),Ye.NUMERIC=new RegExp(e,"g"),Ye.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ye.testKanji=function(l){return s.test(l)},Ye.testNumeric=function(l){return o.test(l)},Ye.testAlphanumeric=function(l){return i.test(l)},Ye}var Lo;function Mt(){return Lo||(Lo=1,function(e){const t=Al(),n=Tl();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(o,i){if(e.isValid(o))return o;try{return r(o)}catch{return i}}}(Cr)),Cr}var Fo;function Mf(){return Fo||(Fo=1,function(e){const t=It(),n=Pl(),r=Cs(),s=Mt(),o=Al(),i=7973,c=t.getBCHDigit(i);function l(g,p,b){for(let w=1;w<=40;w++)if(p<=e.getCapacity(w,b,g))return w}function a(g,p){return s.getCharCountIndicator(g,p)+4}function u(g,p){let b=0;return g.forEach(function(w){const B=a(w.mode,p);b+=B+w.getBitsLength()}),b}function f(g,p){for(let b=1;b<=40;b++)if(u(g,b)<=e.getCapacity(b,p,s.MIXED))return b}e.from=function(p,b){return o.isValid(p)?parseInt(p,10):b},e.getCapacity=function(p,b,w){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=s.BYTE);const B=t.getSymbolTotalCodewords(p),S=n.getTotalCodewordsCount(p,b),R=(B-S)*8;if(w===s.MIXED)return R;const P=R-a(w,p);switch(w){case s.NUMERIC:return Math.floor(P/10*3);case s.ALPHANUMERIC:return Math.floor(P/11*2);case s.KANJI:return Math.floor(P/13);case s.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,b){let w;const B=r.from(b,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,B);if(p.length===0)return 1;w=p[0]}else w=p;return l(w.mode,w.getLength(),B)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let b=p<<12;for(;t.getBCHDigit(b)-c>=0;)b^=i<=0;)l^=t<0&&(o=this.data.substr(s),i=parseInt(o,10),r.put(i,c*3+1))},Tr=t,Tr}var xr,Uo;function Of(){if(Uo)return xr;Uo=1;const e=Mt(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let i=t.indexOf(this.data[o])*45;i+=t.indexOf(this.data[o+1]),s.put(i,11)}this.data.length%2&&s.put(t.indexOf(this.data[o]),6)},xr=n,xr}var Ir,Vo;function Lf(){if(Vo)return Ir;Vo=1;const e=Mt();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,s=this.data.length;r=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+` -Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Mr=n,Mr}var Br={exports:{}},jo;function Df(){return jo||(jo=1,function(e){var t={single_source_shortest_paths:function(n,r,s){var o={},i={};i[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var l,a,u,f,g,p,b,w,B;!c.empty();){l=c.pop(),a=l.value,f=l.cost,g=n[a]||{};for(u in g)g.hasOwnProperty(u)&&(p=g[u],b=f+p,w=i[u],B=typeof i[u]>"u",(B||w>b)&&(i[u]=b,c.push(u,b),o[u]=a))}if(typeof s<"u"&&typeof i[s]>"u"){var S=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(S)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Br)),Br.exports}var qo;function kf(){return qo||(qo=1,function(e){const t=Mt(),n=Nf(),r=Of(),s=Lf(),o=Ff(),i=Tl(),c=It(),l=Df();function a(S){return unescape(encodeURIComponent(S)).length}function u(S,R,P){const _=[];let G;for(;(G=S.exec(P))!==null;)_.push({data:G[0],index:G.index,mode:R,length:G[0].length});return _}function f(S){const R=u(i.NUMERIC,t.NUMERIC,S),P=u(i.ALPHANUMERIC,t.ALPHANUMERIC,S);let _,G;return c.isKanjiModeEnabled()?(_=u(i.BYTE,t.BYTE,S),G=u(i.KANJI,t.KANJI,S)):(_=u(i.BYTE_KANJI,t.BYTE,S),G=[]),R.concat(P,_,G).sort(function(L,V){return L.index-V.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function g(S,R){switch(R){case t.NUMERIC:return n.getBitsLength(S);case t.ALPHANUMERIC:return r.getBitsLength(S);case t.KANJI:return o.getBitsLength(S);case t.BYTE:return s.getBitsLength(S)}}function p(S){return S.reduce(function(R,P){const _=R.length-1>=0?R[R.length-1]:null;return _&&_.mode===P.mode?(R[R.length-1].data+=P.data,R):(R.push(P),R)},[])}function b(S){const R=[];for(let P=0;P=0&&U<=6&&(J===0||J===6)||J>=0&&J<=6&&(U===0||U===6)||U>=2&&U<=4&&J>=2&&J<=4?N.set(H+U,q+J,!0,!0):N.set(H+U,q+J,!1,!0))}}function b(N){const L=N.size;for(let V=8;V>U&1)===1,N.set(j,H,q,!0),N.set(H,j,q,!0)}function S(N,L,V){const D=N.size,j=u.getEncodedBits(L,V);let H,q;for(H=0;H<15;H++)q=(j>>H&1)===1,H<6?N.set(H,8,q,!0):H<8?N.set(H+1,8,q,!0):N.set(D-15+H,8,q,!0),H<8?N.set(8,D-H-1,q,!0):H<9?N.set(8,15-H-1+1,q,!0):N.set(8,15-H-1,q,!0);N.set(D-8,8,1,!0)}function R(N,L){const V=N.size;let D=-1,j=V-1,H=7,q=0;for(let U=V-1;U>0;U-=2)for(U===6&&U--;;){for(let J=0;J<2;J++)if(!N.isReserved(j,U-J)){let Ce=!1;q>>H&1)===1),N.set(j,U-J,Ce),H--,H===-1&&(q++,H=7)}if(j+=D,j<0||V<=j){j-=D,D=-D;break}}}function P(N,L,V){const D=new n;V.forEach(function(J){D.put(J.mode.bit,4),D.put(J.getLength(),f.getCharCountIndicator(J.mode,N)),J.write(D)});const j=e.getSymbolTotalCodewords(N),H=c.getTotalCodewordsCount(N,L),q=(j-H)*8;for(D.getLengthInBits()+4<=q&&D.put(0,4);D.getLengthInBits()%8!==0;)D.putBit(0);const U=(q-D.getLengthInBits())/8;for(let J=0;J{},$e=Array.isArray,ul=/#/g,Qu=/&/g,Xu=/\//g,Zu=/=/g,ea=/\?/g,al=/\+/g,ta=/%5B/g,na=/%5D/g,fl=/%5E/g,ra=/%60/g,dl=/%7B/g,sa=/%7C/g,hl=/%7D/g,oa=/%20/g;function bs(e){return encodeURI(""+e).replace(sa,"|").replace(ta,"[").replace(na,"]")}function ia(e){return bs(e).replace(dl,"{").replace(hl,"}").replace(fl,"^")}function Qr(e){return bs(e).replace(al,"%2B").replace(oa,"+").replace(ul,"%23").replace(Qu,"%26").replace(ra,"`").replace(dl,"{").replace(hl,"}").replace(fl,"^")}function la(e){return Qr(e).replace(Zu,"%3D")}function ca(e){return bs(e).replace(ul,"%23").replace(ea,"%3F")}function ua(e){return e==null?"":ca(e).replace(Xu,"%2F")}function mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const aa=/\/$/,fa=e=>e.replace(aa,"");function fr(e,t,n="/"){let r,s={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),s=e(o)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=ga(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:mn(i)}}function da(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ro(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ha(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Kt(t.matched[r],n.matched[s])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!pa(e[n],t[n]))return!1;return!0}function pa(e,t){return $e(e)?so(e,t):$e(t)?so(t,e):e===t}function so(e,t){return $e(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ga(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _n;(function(e){e.pop="pop",e.push="push"})(_n||(_n={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={}));function ma(e){if(!e)if(Dt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fa(e)}const _a=/^[^#]+#/;function ya(e,t){return e.replace(_a,"#")+t}function va(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qn=()=>({left:window.scrollX,top:window.scrollY});function ba(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=va(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oo(e,t){return(history.state?history.state.position-t:-1)+e}const Xr=new Map;function wa(e,t){Xr.set(e,t)}function Ea(e){const t=Xr.get(e);return Xr.delete(e),t}let Sa=()=>location.protocol+"//"+location.host;function gl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let c=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(c);return l[0]!=="/"&&(l="/"+l),ro(l,"")}return ro(n,e)+r+s}function Ca(e,t,n,r){let s=[],o=[],i=null;const c=({state:g})=>{const p=gl(e,location),b=n.value,w=t.value;let B=0;if(g){if(n.value=p,t.value=g,i&&i===b){i=null;return}B=w?g.position-w.position:0}else r(p);s.forEach(S=>{S(n.value,b,{delta:B,type:_n.pop,direction:B?B>0?un.forward:un.back:un.unknown})})};function l(){i=n.value}function a(g){s.push(g);const p=()=>{const b=s.indexOf(g);b>-1&&s.splice(b,1)};return o.push(p),p}function u(){const{history:g}=window;g.state&&g.replaceState(re({},g.state,{scroll:Qn()}),"")}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:a,destroy:f}}function io(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qn():null}}function Ra(e){const{history:t,location:n}=window,r={value:gl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Sa()+e+l;try{t[u?"replaceState":"pushState"](a,"",g),s.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(l,a){const u=re({},t.state,io(s.value.back,l,s.value.forward,!0),a,{position:s.value.position});o(l,u,!0),r.value=l}function c(l,a){const u=re({},s.value,t.state,{forward:l,scroll:Qn()});o(u.current,u,!0);const f=re({},io(r.value,l,null),{position:u.position+1},a);o(l,f,!1),r.value=l}return{location:r,state:s,push:c,replace:i}}function Pa(e){e=ma(e);const t=Ra(e),n=Ca(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=re({location:"",base:e,go:r,createHref:ya.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Aa(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}const _l=Symbol("");var lo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lo||(lo={}));function zt(e,t){return re(new Error,{type:e,[_l]:!0},t)}function rt(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const co="[^/]+?",Ta={sensitive:!1,strict:!1,start:!0,end:!0},xa=/[.+*?^${}()[\]/\\]/g;function Ia(e,t){const n=re({},Ta,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function yl(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Ba={type:0,value:""},Na=/[a-zA-Z0-9_]/;function Oa(e){if(!e)return[[]];if(e==="/")return[[Ba]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let c=0,l,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=l}for(;c{i(P)}:cn}function i(f){if(ml(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function c(){return n}function l(f){const g=Ua(f,n);n.splice(g,0,f),f.record.name&&!ho(f)&&r.set(f.record.name,f)}function a(f,g){let p,b={},w,B;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw zt(1,{location:f});B=p.record.name,b=re(ao(g.params,p.keys.filter(P=>!P.optional).concat(p.parent?p.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),f.params&&ao(f.params,p.keys.map(P=>P.name))),w=p.stringify(b)}else if(f.path!=null)w=f.path,p=n.find(P=>P.re.test(w)),p&&(b=p.parse(w),B=p.record.name);else{if(p=g.name?r.get(g.name):n.find(P=>P.re.test(g.path)),!p)throw zt(1,{location:f,currentLocation:g});B=p.record.name,b=re({},g.params,f.params),w=p.stringify(b)}const S=[];let R=p;for(;R;)S.unshift(R.record),R=R.parent;return{name:B,path:w,params:b,matched:S,meta:ka(S)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:s}}function ao(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Fa(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Fa(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ho(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ka(e){return e.reduce((t,n)=>re(t,n.meta),{})}function po(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ua(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;yl(e,t[o])<0?r=o:n=o+1}const s=Ha(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Ha(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Va(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qr(o)):[r&&Qr(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function ja(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=$e(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const qa=Symbol(""),mo=Symbol(""),Xn=Symbol(""),ws=Symbol(""),Zr=Symbol("");function Qt(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function mt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,l)=>{const a=g=>{g===!1?l(zt(4,{from:n,to:t})):g instanceof Error?l(g):Aa(g)?l(zt(2,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),c())},u=o(()=>e.call(r&&r.instances[s],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>l(g))})}function dr(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(cl(l)){const u=(l.__vccOpts||l)[t];u&&o.push(mt(u,n,r,i,c,s))}else{let a=l();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const f=Yu(u)?u.default:u;i.mods[c]=u,i.components[c]=f;const p=(f.__vccOpts||f)[t];return p&&mt(p,n,r,i,c,s)()}))}}return o}function _o(e){const t=qe(Xn),n=qe(ws),r=Ve(()=>{const l=_t(e.to);return t.resolve(l)}),s=Ve(()=>{const{matched:l}=r.value,{length:a}=l,u=l[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(Kt.bind(null,u));if(g>-1)return g;const p=yo(l[a-2]);return a>1&&yo(u)===p&&f[f.length-1].path!==p?f.findIndex(Kt.bind(null,l[a-2])):g}),o=Ve(()=>s.value>-1&&Wa(n.params,r.value.params)),i=Ve(()=>s.value>-1&&s.value===n.matched.length-1&&pl(n.params,r.value.params));function c(l={}){if(Ga(l)){const a=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:r,href:Ve(()=>r.value.href),isActive:o,isExactActive:i,navigate:c}}function $a(e){return e.length===1?e[0]:e}const Ka=Me({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:_o,setup(e,{slots:t}){const n=Kn(_o(e)),{options:r}=qe(Xn),s=Ve(()=>({[vo(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[vo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&$a(t.default(n));return e.custom?o:vs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),za=Ka;function Ga(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wa(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!$e(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function yo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vo=(e,t,n)=>e??t??n,Ja=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qe(Zr),s=Ve(()=>e.route||r.value),o=qe(mo,0),i=Ve(()=>{let a=_t(o);const{matched:u}=s.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),c=Ve(()=>s.value.matched[i.value]);Pn(mo,Ve(()=>i.value+1)),Pn(qa,c),Pn(Zr,s);const l=me();return on(()=>[l.value,c.value,e.name],([a,u,f],[g,p,b])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!Kt(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(w=>w(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,f=c.value,g=f&&f.components[u];if(!g)return bo(n.default,{Component:g,route:a});const p=f.props[u],b=p?p===!0?a.params:typeof p=="function"?p(a):p:null,B=vs(g,re({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bo(n.default,{Component:B,route:a})||B}}});function bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bl=Ja;function Ya(e){const t=Da(e.routes,e),n=e.parseQuery||Va,r=e.stringifyQuery||go,s=e.history,o=Qt(),i=Qt(),c=Qt(),l=lc(dt);let a=dt;Dt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ar.bind(null,y=>""+y),f=ar.bind(null,ua),g=ar.bind(null,mn);function p(y,M){let x,k;return ml(y)?(x=t.getRecordMatcher(y),k=M):k=y,t.addRoute(k,x)}function b(y){const M=t.getRecordMatcher(y);M&&t.removeRoute(M)}function w(){return t.getRoutes().map(y=>y.record)}function B(y){return!!t.getRecordMatcher(y)}function S(y,M){if(M=re({},M||l.value),typeof y=="string"){const m=fr(n,y,M.path),v=t.resolve({path:m.path},M),C=s.createHref(m.fullPath);return re(m,v,{params:g(v.params),hash:mn(m.hash),redirectedFrom:void 0,href:C})}let x;if(y.path!=null)x=re({},y,{path:fr(n,y.path,M.path).path});else{const m=re({},y.params);for(const v in m)m[v]==null&&delete m[v];x=re({},y,{params:f(m)}),M.params=f(M.params)}const k=t.resolve(x,M),ce=y.hash||"";k.params=u(g(k.params));const d=da(r,re({},y,{hash:ia(ce),path:k.path})),h=s.createHref(d);return re({fullPath:d,hash:ce,query:r===go?ja(y.query):y.query||{}},k,{redirectedFrom:void 0,href:h})}function R(y){return typeof y=="string"?fr(n,y,l.value.path):re({},y)}function P(y,M){if(a!==y)return zt(8,{from:M,to:y})}function _(y){return L(y)}function G(y){return _(re(R(y),{replace:!0}))}function N(y){const M=y.matched[y.matched.length-1];if(M&&M.redirect){const{redirect:x}=M;let k=typeof x=="function"?x(y):x;return typeof k=="string"&&(k=k.includes("?")||k.includes("#")?k=R(k):{path:k},k.params={}),re({query:y.query,hash:y.hash,params:k.path!=null?{}:y.params},k)}}function L(y,M){const x=a=S(y),k=l.value,ce=y.state,d=y.force,h=y.replace===!0,m=N(x);if(m)return L(re(R(m),{state:typeof m=="object"?re({},ce,m.state):ce,force:d,replace:h}),M||x);const v=x;v.redirectedFrom=M;let C;return!d&&ha(r,k,x)&&(C=zt(16,{to:v,from:k}),Re(k,k,!0,!1)),(C?Promise.resolve(C):j(v,k)).catch(E=>rt(E)?rt(E,2)?E:Fe(E):Z(E,v,k)).then(E=>{if(E){if(rt(E,2))return L(re({replace:h},R(E.to),{state:typeof E.to=="object"?re({},ce,E.to.state):ce,force:d}),M||v)}else E=q(v,k,!0,h,ce);return V(v,k,E),E})}function H(y,M){const x=P(y,M);return x?Promise.reject(x):Promise.resolve()}function F(y){const M=at.values().next().value;return M&&typeof M.runWithContext=="function"?M.runWithContext(y):y()}function j(y,M){let x;const[k,ce,d]=Qa(y,M);x=dr(k.reverse(),"beforeRouteLeave",y,M);for(const m of k)m.leaveGuards.forEach(v=>{x.push(mt(v,y,M))});const h=H.bind(null,y,M);return x.push(h),Pe(x).then(()=>{x=[];for(const m of o.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).then(()=>{x=dr(ce,"beforeRouteUpdate",y,M);for(const m of ce)m.updateGuards.forEach(v=>{x.push(mt(v,y,M))});return x.push(h),Pe(x)}).then(()=>{x=[];for(const m of d)if(m.beforeEnter)if($e(m.beforeEnter))for(const v of m.beforeEnter)x.push(mt(v,y,M));else x.push(mt(m.beforeEnter,y,M));return x.push(h),Pe(x)}).then(()=>(y.matched.forEach(m=>m.enterCallbacks={}),x=dr(d,"beforeRouteEnter",y,M,F),x.push(h),Pe(x))).then(()=>{x=[];for(const m of i.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).catch(m=>rt(m,8)?m:Promise.reject(m))}function V(y,M,x){c.list().forEach(k=>F(()=>k(y,M,x)))}function q(y,M,x,k,ce){const d=P(y,M);if(d)return d;const h=M===dt,m=Dt?history.state:{};x&&(k||h?s.replace(y.fullPath,re({scroll:h&&m&&m.scroll},ce)):s.push(y.fullPath,ce)),l.value=y,Re(y,M,x,h),Fe()}let U;function J(){U||(U=s.listen((y,M,x)=>{if(!ft.listening)return;const k=S(y),ce=N(k);if(ce){L(re(ce,{replace:!0,force:!0}),k).catch(cn);return}a=k;const d=l.value;Dt&&wa(oo(d.fullPath,x.delta),Qn()),j(k,d).catch(h=>rt(h,12)?h:rt(h,2)?(L(re(R(h.to),{force:!0}),k).then(m=>{rt(m,20)&&!x.delta&&x.type===_n.pop&&s.go(-1,!1)}).catch(cn),Promise.reject()):(x.delta&&s.go(-x.delta,!1),Z(h,k,d))).then(h=>{h=h||q(k,d,!1),h&&(x.delta&&!rt(h,8)?s.go(-x.delta,!1):x.type===_n.pop&&rt(h,20)&&s.go(-1,!1)),V(k,d,h)}).catch(cn)}))}let Ce=Qt(),de=Qt(),ne;function Z(y,M,x){Fe(y);const k=de.list();return k.length?k.forEach(ce=>ce(y,M,x)):console.error(y),Promise.reject(y)}function He(){return ne&&l.value!==dt?Promise.resolve():new Promise((y,M)=>{Ce.add([y,M])})}function Fe(y){return ne||(ne=!y,J(),Ce.list().forEach(([M,x])=>y?x(y):M()),Ce.reset()),y}function Re(y,M,x,k){const{scrollBehavior:ce}=e;if(!Dt||!ce)return Promise.resolve();const d=!x&&Ea(oo(y.fullPath,0))||(k||!x)&&history.state&&history.state.scroll||null;return ds().then(()=>ce(y,M,d)).then(h=>h&&ba(h)).catch(h=>Z(h,y,M))}const ge=y=>s.go(y);let Ke;const at=new Set,ft={currentRoute:l,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:w,resolve:S,options:e,push:_,replace:G,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:de.add,isReady:He,install(y){const M=this;y.component("RouterLink",za),y.component("RouterView",bl),y.config.globalProperties.$router=M,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(l)}),Dt&&!Ke&&l.value===dt&&(Ke=!0,_(s.location).catch(ce=>{}));const x={};for(const ce in dt)Object.defineProperty(x,ce,{get:()=>l.value[ce],enumerable:!0});y.provide(Xn,M),y.provide(ws,bi(x)),y.provide(Zr,l);const k=y.unmount;at.add(y),y.unmount=function(){at.delete(y),at.size<1&&(a=dt,U&&U(),U=null,l.value=dt,Ke=!1,ne=!1),k()}}};function Pe(y){return y.reduce((M,x)=>M.then(()=>F(x)),Promise.resolve())}return ft}function Qa(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iKt(a,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(a=>Kt(a,l))||s.push(l))}return[n,r,s]}function wl(){return qe(Xn)}function Xa(e){return qe(ws)}const Za=Me({__name:"App",setup(e){return(t,n)=>(ee(),Tt(_t(bl)))}}),Ue=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ef=Ue(Za,[["__scopeId","data-v-913ef6b1"]]),tf="/assets/logo_belt-DPdjjAgZ.png",nf={},rf={class:"belt-block"};function sf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow"},null,-1)),K("div",rf,[vn(e.$slots,"default",{},void 0)])])}const of=Ue(nf,[["render",sf],["__scopeId","data-v-5ed18f32"]]),lf={},cf={class:"belt-block"};function uf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow shadow-top"},null,-1)),t[1]||(t[1]=K("div",{class:"shadow shadow-bottom"},null,-1)),K("div",cf,[vn(e.$slots,"default",{},void 0)])])}const El=Ue(lf,[["render",uf],["__scopeId","data-v-0effe39e"]]),af={class:"text-with-font"},ff=Me({__name:"HeaderText",setup(e){return(t,n)=>(ee(),fe("span",af,[vn(t.$slots,"default",{},void 0)]))}}),Sl=Ue(ff,[["__scopeId","data-v-33b571eb"]]),df={},hf={class:"plate-block"},pf={class:"metal-plate-block"};function gf(e,t){return ee(),fe("div",hf,[K("div",pf,[vn(e.$slots,"default",{},void 0)]),t[0]||(t[0]=K("div",{class:"pin pin-top-left"},null,-1)),t[1]||(t[1]=K("div",{class:"pin pin-top-right"},null,-1)),t[2]||(t[2]=K("div",{class:"pin pin-bottom-right"},null,-1)),t[3]||(t[3]=K("div",{class:"pin pin-bottom-left"},null,-1))])}const kn=Ue(df,[["render",gf],["__scopeId","data-v-34e952c0"]]),mf={class:"game-header"},_f={class:"center"},yf={class:"position-right-center-block"},vf=Me({__name:"GameHeader",setup(e){return(t,n)=>(ee(),fe("div",mf,[K("div",_f,[ie(kn,{class:"controller-metal controller-metal-left"}),ie(kn,{class:"controller-metal controller-metal-right"}),n[1]||(n[1]=K("img",{alt:"Вечерний детектив",class:"logo",src:tf},null,-1)),ie(of,{class:"belt-mini"}),ie(El,{class:"belt"},{default:yt(()=>[K("div",yf,[ie(Sl,null,{default:yt(()=>n[0]||(n[0]=[qt("Вечерний детектив")])),_:1})])]),_:1})])]))}}),bf=Ue(vf,[["__scopeId","data-v-b87f05d7"]]);class xt extends Error{constructor(t="Пользователь не авторизован (401)"){super(t),this.name="UnauthorizedError",Object.setPrototypeOf(this,xt.prototype)}}const Cl=async(e,t)=>{try{const n=await fetch(Es("/team"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetTeam] error:",n),n}},Rl=async(e,t,n)=>{try{const r=await fetch(Es("/team/actions"),{method:"POST",headers:{"X-Id":Ss(e),"X-Password":t},body:JSON.stringify({place:n})});if(r.status===401)throw new xt("Ошибка авторизации");if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiLetsgo] error:",r),r}},wf=async(e,t)=>{try{const n=await fetch(Es("/game"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetGame] error:",n),n}};function Es(e){return"http://"+window.location.host.split(":")[0]+":8090"+e}function Ss(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16))))}var Nt={},hr,wo;function Ef(){return wo||(wo=1,hr=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),hr}var pr={},ht={},Eo;function It(){if(Eo)return ht;Eo=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ht.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ht.getSymbolTotalCodewords=function(r){return t[r]},ht.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ht.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},ht.isKanjiModeEnabled=function(){return typeof e<"u"},ht.toSJIS=function(r){return e(r)},ht}var gr={},So;function Cs(){return So||(So=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}}(gr)),gr}var mr,Co;function Sf(){if(Co)return mr;Co=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},mr=e,mr}var _r,Ro;function Cf(){if(Ro)return _r;Ro=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,s){const o=t*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},_r=e,_r}var yr={},Po;function Rf(){return Po||(Po=1,function(e){const t=It().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*s-2))*2,c=[o-7];for(let l=1;l=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const o=s.size;let i=0,c=0,l=0,a=null,u=null;for(let f=0;f=5&&(i+=t.N1+(c-5)),a=p,c=1),p=s.get(g,f),p===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=p,l=1)}c>=5&&(i+=t.N1+(c-5)),l>=5&&(i+=t.N1+(l-5))}return i},e.getPenaltyN2=function(s){const o=s.size;let i=0;for(let c=0;c=10&&(c===1488||c===93)&&i++,l=l<<1&2047|s.get(u,a),u>=10&&(l===1488||l===93)&&i++}return i*t.N3},e.getPenaltyN4=function(s){let o=0;const i=s.data.length;for(let l=0;l=0;){const i=o[0];for(let l=0;l0){const c=new Uint8Array(this.degree);return c.set(o,i),c}return o},Er=t,Er}var Sr={},Cr={},Rr={},No;function Al(){return No||(No=1,Rr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Rr}var Ye={},Oo;function Tl(){if(Oo)return Ye;Oo=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r +]))+`;Ye.KANJI=new RegExp(n,"g"),Ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ye.BYTE=new RegExp(r,"g"),Ye.NUMERIC=new RegExp(e,"g"),Ye.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ye.testKanji=function(l){return s.test(l)},Ye.testNumeric=function(l){return o.test(l)},Ye.testAlphanumeric=function(l){return i.test(l)},Ye}var Lo;function Mt(){return Lo||(Lo=1,function(e){const t=Al(),n=Tl();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(o,i){if(e.isValid(o))return o;try{return r(o)}catch{return i}}}(Cr)),Cr}var Do;function Mf(){return Do||(Do=1,function(e){const t=It(),n=Pl(),r=Cs(),s=Mt(),o=Al(),i=7973,c=t.getBCHDigit(i);function l(g,p,b){for(let w=1;w<=40;w++)if(p<=e.getCapacity(w,b,g))return w}function a(g,p){return s.getCharCountIndicator(g,p)+4}function u(g,p){let b=0;return g.forEach(function(w){const B=a(w.mode,p);b+=B+w.getBitsLength()}),b}function f(g,p){for(let b=1;b<=40;b++)if(u(g,b)<=e.getCapacity(b,p,s.MIXED))return b}e.from=function(p,b){return o.isValid(p)?parseInt(p,10):b},e.getCapacity=function(p,b,w){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=s.BYTE);const B=t.getSymbolTotalCodewords(p),S=n.getTotalCodewordsCount(p,b),R=(B-S)*8;if(w===s.MIXED)return R;const P=R-a(w,p);switch(w){case s.NUMERIC:return Math.floor(P/10*3);case s.ALPHANUMERIC:return Math.floor(P/11*2);case s.KANJI:return Math.floor(P/13);case s.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,b){let w;const B=r.from(b,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,B);if(p.length===0)return 1;w=p[0]}else w=p;return l(w.mode,w.getLength(),B)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let b=p<<12;for(;t.getBCHDigit(b)-c>=0;)b^=i<=0;)l^=t<0&&(o=this.data.substr(s),i=parseInt(o,10),r.put(i,c*3+1))},Tr=t,Tr}var xr,Uo;function Of(){if(Uo)return xr;Uo=1;const e=Mt(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let i=t.indexOf(this.data[o])*45;i+=t.indexOf(this.data[o+1]),s.put(i,11)}this.data.length%2&&s.put(t.indexOf(this.data[o]),6)},xr=n,xr}var Ir,Ho;function Lf(){if(Ho)return Ir;Ho=1;const e=Mt();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,s=this.data.length;r=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+` +Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Mr=n,Mr}var Br={exports:{}},jo;function Ff(){return jo||(jo=1,function(e){var t={single_source_shortest_paths:function(n,r,s){var o={},i={};i[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var l,a,u,f,g,p,b,w,B;!c.empty();){l=c.pop(),a=l.value,f=l.cost,g=n[a]||{};for(u in g)g.hasOwnProperty(u)&&(p=g[u],b=f+p,w=i[u],B=typeof i[u]>"u",(B||w>b)&&(i[u]=b,c.push(u,b),o[u]=a))}if(typeof s<"u"&&typeof i[s]>"u"){var S=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(S)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Br)),Br.exports}var qo;function kf(){return qo||(qo=1,function(e){const t=Mt(),n=Nf(),r=Of(),s=Lf(),o=Df(),i=Tl(),c=It(),l=Ff();function a(S){return unescape(encodeURIComponent(S)).length}function u(S,R,P){const _=[];let G;for(;(G=S.exec(P))!==null;)_.push({data:G[0],index:G.index,mode:R,length:G[0].length});return _}function f(S){const R=u(i.NUMERIC,t.NUMERIC,S),P=u(i.ALPHANUMERIC,t.ALPHANUMERIC,S);let _,G;return c.isKanjiModeEnabled()?(_=u(i.BYTE,t.BYTE,S),G=u(i.KANJI,t.KANJI,S)):(_=u(i.BYTE_KANJI,t.BYTE,S),G=[]),R.concat(P,_,G).sort(function(L,H){return L.index-H.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function g(S,R){switch(R){case t.NUMERIC:return n.getBitsLength(S);case t.ALPHANUMERIC:return r.getBitsLength(S);case t.KANJI:return o.getBitsLength(S);case t.BYTE:return s.getBitsLength(S)}}function p(S){return S.reduce(function(R,P){const _=R.length-1>=0?R[R.length-1]:null;return _&&_.mode===P.mode?(R[R.length-1].data+=P.data,R):(R.push(P),R)},[])}function b(S){const R=[];for(let P=0;P=0&&U<=6&&(J===0||J===6)||J>=0&&J<=6&&(U===0||U===6)||U>=2&&U<=4&&J>=2&&J<=4?N.set(V+U,q+J,!0,!0):N.set(V+U,q+J,!1,!0))}}function b(N){const L=N.size;for(let H=8;H>U&1)===1,N.set(j,V,q,!0),N.set(V,j,q,!0)}function S(N,L,H){const F=N.size,j=u.getEncodedBits(L,H);let V,q;for(V=0;V<15;V++)q=(j>>V&1)===1,V<6?N.set(V,8,q,!0):V<8?N.set(V+1,8,q,!0):N.set(F-15+V,8,q,!0),V<8?N.set(8,F-V-1,q,!0):V<9?N.set(8,15-V-1+1,q,!0):N.set(8,15-V-1,q,!0);N.set(F-8,8,1,!0)}function R(N,L){const H=N.size;let F=-1,j=H-1,V=7,q=0;for(let U=H-1;U>0;U-=2)for(U===6&&U--;;){for(let J=0;J<2;J++)if(!N.isReserved(j,U-J)){let Ce=!1;q>>V&1)===1),N.set(j,U-J,Ce),V--,V===-1&&(q++,V=7)}if(j+=F,j<0||H<=j){j-=F,F=-F;break}}}function P(N,L,H){const F=new n;H.forEach(function(J){F.put(J.mode.bit,4),F.put(J.getLength(),f.getCharCountIndicator(J.mode,N)),J.write(F)});const j=e.getSymbolTotalCodewords(N),V=c.getTotalCodewordsCount(N,L),q=(j-V)*8;for(F.getLengthInBits()+4<=q&&F.put(0,4);F.getLengthInBits()%8!==0;)F.putBit(0);const U=(q-F.getLengthInBits())/8;for(let J=0;J=7&&B(J,L),R(J,q),isNaN(D)&&(D=i.getBestMask(J,S.bind(null,J,V))),i.applyMask(D,J),S(J,V,D),{modules:J,version:L,errorCorrectionLevel:V,maskPattern:D,segments:j}}return pr.create=function(L,V){if(typeof L>"u"||L==="")throw new Error("No input text");let D=t.M,j,H;return typeof V<"u"&&(D=t.from(V.errorCorrectionLevel,t.M),j=a.from(V.version),H=i.from(V.maskPattern),V.toSJISFunc&&e.setToSJISFunction(V.toSJISFunc)),G(L,j,D,H)},pr}var Nr={},Or={},$o;function xl(){return $o||($o=1,function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:o,scale:o?4:i,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const o=e.getScale(r,s);return Math.floor((r+s.margin*2)*o)},e.qrToImageData=function(r,s,o){const i=s.modules.size,c=s.modules.data,l=e.getScale(i,o),a=Math.floor((i+o.margin*2)*l),u=o.margin*l,f=[o.color.light,o.color.dark];for(let g=0;g=u&&p>=u&&g"u"&&(!i||!i.getContext)&&(l=i,i=void 0),i||(a=r()),l=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),f=a.getContext("2d"),g=f.createImageData(u,u);return t.qrToImageData(g.data,o,l),n(f,a,u),f.putImageData(g,0,0),a},e.renderToDataURL=function(o,i,c){let l=c;typeof l>"u"&&(!i||!i.getContext)&&(l=i,i=void 0),l||(l={});const a=e.render(o,i,l),u=l.type||"image/png",f=l.rendererOpts||{};return a.toDataURL(u,f.quality)}}(Nr)),Nr}var Lr={},Go;function Hf(){if(Go)return Lr;Go=1;const e=xl();function t(s,o){const i=s.a/255,c=o+'="'+s.hex+'"';return i<1?c+" "+o+'-opacity="'+i.toFixed(2).slice(1)+'"':c}function n(s,o,i){let c=s+o;return typeof i<"u"&&(c+=" "+i),c}function r(s,o,i){let c="",l=0,a=!1,u=0;for(let f=0;f0&&g>0&&s[f-1]||(c+=a?n("M",g+i,.5+p+i):n("m",l,0),l=0,a=!1),g+1':"",p="',b='viewBox="0 0 '+f+" "+f+'"',B=''+g+p+` -`;return typeof c=="function"&&c(null,B),B},Lr}var Wo;function jf(){if(Wo)return Nt;Wo=1;const e=Ef(),t=Uf(),n=Vf(),r=Hf();function s(o,i,c,l,a){const u=[].slice.call(arguments,1),f=u.length,g=typeof u[f-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(f<2)throw new Error("Too few arguments provided");f===2?(a=c,c=i,i=l=void 0):f===3&&(i.getContext&&typeof a>"u"?(a=l,l=void 0):(a=l,l=c,c=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(c=i,i=l=void 0):f===2&&!i.getContext&&(l=c,c=i,i=void 0),new Promise(function(p,b){try{const w=t.create(c,l);p(o(w,i,l))}catch(w){b(w)}})}try{const p=t.create(c,l);a(null,o(p,i,l))}catch(p){a(p)}}return Nt.create=t.create,Nt.toCanvas=s.bind(null,n.render),Nt.toDataURL=s.bind(null,n.renderToDataURL),Nt.toString=s.bind(null,function(o,i,c){return r.render(o,c)}),Nt}var Fr=jf();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const Jo="ready";var qf=Me({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[Jo],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),n=()=>{this.$emit(Jo,this.$el)};switch(this.tag){case"canvas":Fr.toCanvas(this.$el,t,e,r=>{if(r)throw r;n()});break;case"img":Fr.toDataURL(t,e,(r,s)=>{if(r)throw r;this.$el.src=s,this.$el.onload=n});break;case"svg":Fr.toString(t,e,(r,s)=>{if(r)throw r;const o=document.createElement("div");o.innerHTML=s;const i=o.querySelector("svg");if(i){const{attributes:c,childNodes:l}=i;Object.keys(c).forEach(a=>{const u=c[Number(a)];this.$el.setAttribute(u.name,u.value)}),Object.keys(l).forEach(a=>{const u=l[Number(a)];this.$el.appendChild(u.cloneNode(!0))}),n()}});break}}},render(){return vs(this.tag,this.$slots.default)}});const Kf={class:"main"},$f={class:"message-cloud"},zf=Me({__name:"MessagePaper",setup(e){return(t,n)=>(ee(),fe("div",Kf,[n[0]||(n[0]=$("div",{class:"message-cloud-3"},null,-1)),n[1]||(n[1]=$("div",{class:"message-cloud-2"},null,-1)),$("div",$f,[vn(t.$slots,"default",{},void 0)])]))}}),Rs=Ue(zf,[["__scopeId","data-v-4f467660"]]),Gf={class:"qr"},Wf={class:"team-name"},Jf=Me({__name:"WelcomeGameBlock",props:{qrurl:{},team:{}},setup(e){const t=me({width:200,margin:1,color:{dark:"#303030",light:"#f0f0f0"}}),n=e;return(r,s)=>(ee(),fe("div",null,[ie(Rs,null,{default:yt(()=>[$("div",Gf,[$("div",Wf,Xe(r.team),1),ie(_t(qf),{value:n.qrurl,options:t.value,tag:"svg",class:"qr-code"},null,8,["value","options"]),s[0]||(s[0]=$("div",{class:"message"}," Пора решать загадку ",-1))])]),_:1})]))}}),Yf=Ue(Jf,[["__scopeId","data-v-7828595e"]]),Qf={class:"message-header"},Xf={class:"message-content"},Zf={key:0},ed={class:"message-image-border"},td=["src"],nd={key:0},rd={key:0,class:"hr"},sd=["onClick","disabled"],od={class:"button-dialog-text"},id={key:1,class:"hr"},ld={class:"application-label"},cd=Me({__name:"MessageCloud",props:Li({action:{},gameState:{},login:{},password:{},index:{},count:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Qi(e,"modelValue");function r(){t.action.isOpen=!t.action.isOpen}async function s(o){n.value=!0,await Rl(t.login,t.password,o)}return(o,i)=>(ee(),Tt(Rs,null,{default:yt(()=>{var c;return[$("div",Qf,[qt(Xe(t.action.place)+": "+Xe(t.action.name)+" ",1),t.action.isOpen?(ee(),fe("span",{key:0,class:"collapse-icon collapse-icon-up",onClick:r})):(ee(),fe("span",{key:1,class:"collapse-icon",onClick:r}))]),Bn($("div",null,[i[0]||(i[0]=$("hr",{class:"hr"},null,-1)),$("div",Xf,[t.action.image.length?(ee(),fe("div",Zf,[$("div",ed,[$("img",{src:t.action.image,class:"message-image"},null,8,td)])])):en("",!0),qt(Xe(t.action.text),1)]),o.index==o.count-1?(ee(),fe("div",nd,[(c=t.action.buttons)!=null&&c.length?(ee(),fe("hr",rd)):en("",!0),(ee(!0),fe(_e,null,qr(t.action.buttons,l=>(ee(),fe("div",{key:l.code,class:"button-dialog",onClick:a=>s(l.code),disabled:o.gameState!=="RUN"||!l.show},[$("div",od,Xe(l.name),1)],8,sd))),128))])):en("",!0),t.action.applications.length?(ee(),fe("hr",id)):en("",!0),(ee(!0),fe(_e,null,qr(t.action.applications,l=>(ee(),fe("div",{class:"message-footer",key:l.name},[qt(" Приложение: "+Xe(l.name)+" ",1),$("div",ld,Xe(l.number),1)]))),128))],512),[[Pu,t.action.isOpen]])]}),_:1}))}}),ud=Ue(cd,[["__scopeId","data-v-b740256b"]]),ad={class:"form-custom"},fd={class:"center-block-custom"},dd={class:"controller"},hd={class:"game-input"},pd=["disabled"],gd=["disabled"],md=Me({__name:"GameInputForm",props:Li({gameState:{},login:{},password:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=me(""),n=e,r=Qi(e,"modelValue");async function s(){r.value=!0;const o=t.value.trim();if(o===""){t.value="";return}await Rl(n.login,n.password,o),t.value=""}return(o,i)=>(ee(),fe("div",ad,[ie(El,{class:"input-form"},{default:yt(()=>[ie(kn,{class:"controller-metal controller-metal-left"}),ie(kn,{class:"controller-metal controller-metal-right"}),$("div",fd,[$("form",{onSubmit:ll(s,["prevent"])},[$("div",dd,[$("div",hd,[Bn($("input",{id:"run",class:"game-input-run","onUpdate:modelValue":i[0]||(i[0]=c=>t.value=c),type:"text",placeholder:"Место назначения",disabled:n.gameState!=="RUN"},null,8,pd),[[Yr,t.value]])]),i[2]||(i[2]=$("div",{class:"game-button-run-shadow"},null,-1)),$("button",{class:"game-button-run",type:"submit",disabled:n.gameState!=="RUN"},[ie(Sl,null,{default:yt(()=>i[1]||(i[1]=[qt("Поехали")])),_:1})],8,gd)])],32)])]),_:1})]))}}),_d=Ue(md,[["__scopeId","data-v-fb9d4e7d"]]),yd={key:0},vd={class:"messages-block center-container"},bd={key:1},wd={class:"center-block-custom"},Ed={key:0,class:"modal-overlay"},Sd=Me({__name:"GameWindow",setup(e){const t=wl(),n=Xa(),r=me(!1),s=me(""),o=me(""),i=me({name:"",actions:[]}),c=me([]),l=me(),a=me("STOP"),u=me(""),f=me("-");async function g(){var P;let B;try{B=await Cl(s.value,o.value)}catch(_){_ instanceof xt?t.push("/login"):console.error("Неизвестная ошибка:",_);return}const S=i.value.actions;i.value=B;const R=(P=i.value)==null?void 0:P.actions;R.forEach(_=>{_.isOpen=!0});for(let _=0;_N.show)}}const p=async(B="smooth")=>{await ds(),l.value&&l.value.scrollTo({top:l.value.scrollHeight,behavior:B})};async function b(){f.value=location.href;const B=await wf(s.value,o.value);a.value=B.state,B.state==="NEW"&&(u.value="Игра ещё не началась"),B.state==="RUN"&&(u.value=""),B.state==="STOP"&&(u.value="Игра остановлена")}on(c,()=>{r.value!==!1&&(p(),r.value=!1)},{deep:!0});let w=0;return gs(()=>{var B,S;s.value=sessionStorage.getItem("teamId")||"",o.value=sessionStorage.getItem("password")||"",s.value==""&&(s.value=((B=n.query.name)==null?void 0:B.toString())||"",o.value=((S=n.query.password)==null?void 0:S.toString())||"",sessionStorage.setItem("teamId",s.value),sessionStorage.setItem("password",o.value)),g(),w=setInterval(()=>{g(),b()},2e3),t.beforeEach((R,P,_)=>{clearInterval(w),_()})}),(B,S)=>(ee(),fe(_e,null,[$("div",null,[ie(bf),ie(_d,{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=R=>r.value=R),gameState:a.value,login:s.value,password:o.value},null,8,["modelValue","gameState","login","password"]),!i.value||!i.value.actions.length?(ee(),fe("div",yd,[$("div",vd,[ie(Yf,{qrurl:f.value,team:i.value.name},null,8,["qrurl","team"])])])):(ee(),fe("div",bd,[$("div",{class:"messages-block",ref_key:"scrollContainer",ref:l},[$("div",wd,[(ee(!0),fe(_e,null,qr(i.value.actions,(R,P)=>(ee(),fe("div",{key:R.id},[ie(ud,{modelValue:r.value,"onUpdate:modelValue":S[1]||(S[1]=_=>r.value=_),action:R,gameState:a.value,login:s.value,password:o.value,index:P,count:i.value.actions.length},null,8,["modelValue","action","gameState","login","password","index","count"])]))),128))])],512)]))]),a.value=="STOP"?(ee(),fe("div",Ed,S[2]||(S[2]=[$("div",{class:"modal-content"},[$("div",{class:"modal-body"})],-1)]))):en("",!0)],64))}}),Cd=Ue(Sd,[["__scopeId","data-v-351cc8f7"]]),Rd=Me({__name:"HomeView",setup(e){return(t,n)=>(ee(),Tt(Cd))}}),Pd={class:"center-message"},Ad={class:"button-container"},Td={class:"button-custom",type:"submit"},xd={class:"error-message"},Id=Me({__name:"LoginWindow",setup(e){const t=wl(),n=me(""),r=me(""),s=me("Вход"),o=me("");async function i(){const c=s.value;s.value="Загрузка...",o.value="";try{await Cl(n.value,r.value)}catch(l){if(l instanceof xt){if(n.value==""&&r.value=="")return;o.value="Не верны название команды или пароль"}else o.value="Сервер не доступен";return}finally{s.value=c}sessionStorage.setItem("teamId",n.value),sessionStorage.setItem("password",r.value),t.push("/")}return gs(()=>{n.value=sessionStorage.getItem("teamId")||"",r.value=sessionStorage.getItem("password")||"",i()}),(c,l)=>(ee(),fe(_e,null,[l[2]||(l[2]=$("div",{class:"header-block"}," Вечерний детектив ",-1)),$("div",Pd,[ie(Rs,null,{default:yt(()=>[$("form",{onSubmit:ll(i,["prevent"])},[$("div",null,[Bn($("input",{class:"input-custom","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"text",placeholder:"Название команды"},null,512),[[Yr,n.value]])]),$("div",null,[Bn($("input",{class:"input-custom","onUpdate:modelValue":l[1]||(l[1]=a=>r.value=a),type:"text",placeholder:"Пароль",autocapitalize:"off"},null,512),[[Yr,r.value]])]),$("div",Ad,[$("button",Td,Xe(s.value),1)]),$("div",xd,Xe(o.value),1)],32)]),_:1})])],64))}}),Md=Ue(Id,[["__scopeId","data-v-7028a494"]]),Bd=Me({__name:"LoginView",setup(e){return(t,n)=>(ee(),Tt(Md))}}),Nd=Ya({history:Pa("/"),routes:[{path:"/",name:"home",component:Rd},{path:"/login",name:"login",component:Bd}]}),Ps=$u(ef);Ps.use(Ju());Ps.use(Nd);Ps.mount("#app"); +Minimum version required to store current data is: `+V+`. +`);const q=P(L,H,j),U=e.getSymbolSize(L),J=new r(U);return p(J,L),b(J),w(J,L),S(J,H,0),L>=7&&B(J,L),R(J,q),isNaN(F)&&(F=i.getBestMask(J,S.bind(null,J,H))),i.applyMask(F,J),S(J,H,F),{modules:J,version:L,errorCorrectionLevel:H,maskPattern:F,segments:j}}return pr.create=function(L,H){if(typeof L>"u"||L==="")throw new Error("No input text");let F=t.M,j,V;return typeof H<"u"&&(F=t.from(H.errorCorrectionLevel,t.M),j=a.from(H.version),V=i.from(H.maskPattern),H.toSJISFunc&&e.setToSJISFunction(H.toSJISFunc)),G(L,j,F,V)},pr}var Nr={},Or={},Ko;function xl(){return Ko||(Ko=1,function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:o,scale:o?4:i,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const o=e.getScale(r,s);return Math.floor((r+s.margin*2)*o)},e.qrToImageData=function(r,s,o){const i=s.modules.size,c=s.modules.data,l=e.getScale(i,o),a=Math.floor((i+o.margin*2)*l),u=o.margin*l,f=[o.color.light,o.color.dark];for(let g=0;g=u&&p>=u&&g"u"&&(!i||!i.getContext)&&(l=i,i=void 0),i||(a=r()),l=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),f=a.getContext("2d"),g=f.createImageData(u,u);return t.qrToImageData(g.data,o,l),n(f,a,u),f.putImageData(g,0,0),a},e.renderToDataURL=function(o,i,c){let l=c;typeof l>"u"&&(!i||!i.getContext)&&(l=i,i=void 0),l||(l={});const a=e.render(o,i,l),u=l.type||"image/png",f=l.rendererOpts||{};return a.toDataURL(u,f.quality)}}(Nr)),Nr}var Lr={},Go;function Vf(){if(Go)return Lr;Go=1;const e=xl();function t(s,o){const i=s.a/255,c=o+'="'+s.hex+'"';return i<1?c+" "+o+'-opacity="'+i.toFixed(2).slice(1)+'"':c}function n(s,o,i){let c=s+o;return typeof i<"u"&&(c+=" "+i),c}function r(s,o,i){let c="",l=0,a=!1,u=0;for(let f=0;f0&&g>0&&s[f-1]||(c+=a?n("M",g+i,.5+p+i):n("m",l,0),l=0,a=!1),g+1':"",p="',b='viewBox="0 0 '+f+" "+f+'"',B=''+g+p+` +`;return typeof c=="function"&&c(null,B),B},Lr}var Wo;function jf(){if(Wo)return Nt;Wo=1;const e=Ef(),t=Uf(),n=Hf(),r=Vf();function s(o,i,c,l,a){const u=[].slice.call(arguments,1),f=u.length,g=typeof u[f-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(f<2)throw new Error("Too few arguments provided");f===2?(a=c,c=i,i=l=void 0):f===3&&(i.getContext&&typeof a>"u"?(a=l,l=void 0):(a=l,l=c,c=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(c=i,i=l=void 0):f===2&&!i.getContext&&(l=c,c=i,i=void 0),new Promise(function(p,b){try{const w=t.create(c,l);p(o(w,i,l))}catch(w){b(w)}})}try{const p=t.create(c,l);a(null,o(p,i,l))}catch(p){a(p)}}return Nt.create=t.create,Nt.toCanvas=s.bind(null,n.render),Nt.toDataURL=s.bind(null,n.renderToDataURL),Nt.toString=s.bind(null,function(o,i,c){return r.render(o,c)}),Nt}var Dr=jf();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const Jo="ready";var qf=Me({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[Jo],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),n=()=>{this.$emit(Jo,this.$el)};switch(this.tag){case"canvas":Dr.toCanvas(this.$el,t,e,r=>{if(r)throw r;n()});break;case"img":Dr.toDataURL(t,e,(r,s)=>{if(r)throw r;this.$el.src=s,this.$el.onload=n});break;case"svg":Dr.toString(t,e,(r,s)=>{if(r)throw r;const o=document.createElement("div");o.innerHTML=s;const i=o.querySelector("svg");if(i){const{attributes:c,childNodes:l}=i;Object.keys(c).forEach(a=>{const u=c[Number(a)];this.$el.setAttribute(u.name,u.value)}),Object.keys(l).forEach(a=>{const u=l[Number(a)];this.$el.appendChild(u.cloneNode(!0))}),n()}});break}}},render(){return vs(this.tag,this.$slots.default)}});const $f={class:"main"},Kf={class:"message-cloud"},zf=Me({__name:"MessagePaper",setup(e){return(t,n)=>(ee(),fe("div",$f,[n[0]||(n[0]=K("div",{class:"message-cloud-3"},null,-1)),n[1]||(n[1]=K("div",{class:"message-cloud-2"},null,-1)),K("div",Kf,[vn(t.$slots,"default",{},void 0)])]))}}),Rs=Ue(zf,[["__scopeId","data-v-d5fe1f79"]]),Gf={class:"qr"},Wf={class:"team-name"},Jf=Me({__name:"WelcomeGameBlock",props:{qrurl:{},team:{}},setup(e){const t=me({width:200,margin:1,color:{dark:"#303030",light:"#f0f0f0"}}),n=e;return(r,s)=>(ee(),fe("div",null,[ie(Rs,null,{default:yt(()=>[K("div",Gf,[K("div",Wf,Xe(r.team),1),ie(_t(qf),{value:n.qrurl,options:t.value,tag:"svg",class:"qr-code"},null,8,["value","options"]),s[0]||(s[0]=K("div",{class:"message"}," Пора решать загадку ",-1))])]),_:1})]))}}),Yf=Ue(Jf,[["__scopeId","data-v-7828595e"]]),Qf={class:"message-header"},Xf={class:"message-content"},Zf={key:0},ed={class:"message-image-border"},td=["src"],nd={key:0},rd={key:0,class:"hr"},sd=["onClick","disabled"],od={class:"button-dialog-text"},id={key:1,class:"hr"},ld={class:"application-label"},cd=Me({__name:"MessageCloud",props:Li({action:{},gameState:{},login:{},password:{},index:{},count:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Qi(e,"modelValue");function r(){t.action.isOpen=!t.action.isOpen}async function s(o){n.value=!0,await Rl(t.login,t.password,o)}return(o,i)=>(ee(),Tt(Rs,null,{default:yt(()=>{var c;return[K("div",Qf,[qt(Xe(t.action.place)+": "+Xe(t.action.name)+" ",1),t.action.isOpen?(ee(),fe("span",{key:0,class:"collapse-icon collapse-icon-up",onClick:r})):(ee(),fe("span",{key:1,class:"collapse-icon",onClick:r}))]),Bn(K("div",null,[i[0]||(i[0]=K("hr",{class:"hr"},null,-1)),K("div",Xf,[t.action.image.length?(ee(),fe("div",Zf,[K("div",ed,[K("img",{src:t.action.image,class:"message-image"},null,8,td)])])):en("",!0),qt(Xe(t.action.text),1)]),o.index==o.count-1?(ee(),fe("div",nd,[(c=t.action.buttons)!=null&&c.length?(ee(),fe("hr",rd)):en("",!0),(ee(!0),fe(_e,null,qr(t.action.buttons,l=>(ee(),fe("div",{key:l.code,class:"button-dialog",onClick:a=>s(l.code),disabled:o.gameState!=="RUN"||!l.show},[K("div",od,Xe(l.name),1)],8,sd))),128))])):en("",!0),t.action.applications.length?(ee(),fe("hr",id)):en("",!0),(ee(!0),fe(_e,null,qr(t.action.applications,l=>(ee(),fe("div",{class:"message-footer",key:l.name},[qt(" Приложение: "+Xe(l.name)+" ",1),K("div",ld,Xe(l.number),1)]))),128))],512),[[Pu,t.action.isOpen]])]}),_:1}))}}),ud=Ue(cd,[["__scopeId","data-v-cffe3743"]]),ad={class:"form-custom"},fd={class:"center-block-custom"},dd={class:"controller"},hd={class:"game-input"},pd=["disabled"],gd=["disabled"],md=Me({__name:"GameInputForm",props:Li({gameState:{},login:{},password:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=me(""),n=e,r=Qi(e,"modelValue");async function s(){r.value=!0;const o=t.value.trim();if(o===""){t.value="";return}await Rl(n.login,n.password,o),t.value=""}return(o,i)=>(ee(),fe("div",ad,[ie(El,{class:"input-form"},{default:yt(()=>[ie(kn,{class:"controller-metal controller-metal-left"}),ie(kn,{class:"controller-metal controller-metal-right"}),K("div",fd,[K("form",{onSubmit:ll(s,["prevent"])},[K("div",dd,[K("div",hd,[Bn(K("input",{id:"run",class:"game-input-run","onUpdate:modelValue":i[0]||(i[0]=c=>t.value=c),type:"text",placeholder:"Место назначения",disabled:n.gameState!=="RUN"},null,8,pd),[[Yr,t.value]])]),i[2]||(i[2]=K("div",{class:"game-button-run-shadow"},null,-1)),K("button",{class:"game-button-run",type:"submit",disabled:n.gameState!=="RUN"},[ie(Sl,null,{default:yt(()=>i[1]||(i[1]=[qt("Поехали")])),_:1})],8,gd)])],32)])]),_:1})]))}}),_d=Ue(md,[["__scopeId","data-v-1272527b"]]),yd={key:0},vd={class:"messages-block center-container"},bd={key:1},wd={class:"center-block-custom"},Ed={key:0,class:"modal-overlay"},Sd=Me({__name:"GameWindow",setup(e){const t=wl(),n=Xa(),r=me(!1),s=me(""),o=me(""),i=me({name:"",actions:[]}),c=me([]),l=me(),a=me("STOP"),u=me(""),f=me("-");async function g(){var P;let B;try{B=await Cl(s.value,o.value)}catch(_){_ instanceof xt?t.push("/login"):console.error("Неизвестная ошибка:",_);return}const S=i.value.actions;i.value=B;const R=(P=i.value)==null?void 0:P.actions;R.forEach(_=>{_.isOpen=!0});for(let _=0;_N.show)}}const p=async(B="smooth")=>{await ds(),l.value&&l.value.scrollTo({top:l.value.scrollHeight,behavior:B})};async function b(){f.value=location.href;const B=await wf(s.value,o.value);a.value=B.state,B.state==="NEW"&&(u.value="Игра ещё не началась"),B.state==="RUN"&&(u.value=""),B.state==="STOP"&&(u.value="Игра остановлена")}on(c,()=>{r.value!==!1&&(p(),r.value=!1)},{deep:!0});let w=0;return gs(()=>{var B,S;s.value=sessionStorage.getItem("teamId")||"",o.value=sessionStorage.getItem("password")||"",s.value==""&&(s.value=((B=n.query.name)==null?void 0:B.toString())||"",o.value=((S=n.query.password)==null?void 0:S.toString())||"",sessionStorage.setItem("teamId",s.value),sessionStorage.setItem("password",o.value)),g(),w=setInterval(()=>{g(),b()},2e3),t.beforeEach((R,P,_)=>{clearInterval(w),_()})}),(B,S)=>(ee(),fe(_e,null,[K("div",null,[ie(bf),ie(_d,{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=R=>r.value=R),gameState:a.value,login:s.value,password:o.value},null,8,["modelValue","gameState","login","password"]),!i.value||!i.value.actions.length?(ee(),fe("div",yd,[K("div",vd,[ie(Yf,{qrurl:f.value,team:i.value.name},null,8,["qrurl","team"])])])):(ee(),fe("div",bd,[K("div",{class:"messages-block",ref_key:"scrollContainer",ref:l},[K("div",wd,[(ee(!0),fe(_e,null,qr(i.value.actions,(R,P)=>(ee(),fe("div",{key:R.id},[ie(ud,{modelValue:r.value,"onUpdate:modelValue":S[1]||(S[1]=_=>r.value=_),action:R,gameState:a.value,login:s.value,password:o.value,index:P,count:i.value.actions.length},null,8,["modelValue","action","gameState","login","password","index","count"])]))),128))])],512)]))]),a.value=="STOP"?(ee(),fe("div",Ed,S[2]||(S[2]=[K("div",{class:"modal-content"},[K("div",{class:"modal-body"})],-1)]))):en("",!0)],64))}}),Cd=Ue(Sd,[["__scopeId","data-v-0bc4d193"]]),Rd=Me({__name:"HomeView",setup(e){return(t,n)=>(ee(),Tt(Cd))}}),Pd={class:"center-message"},Ad={class:"button-container"},Td={class:"button-custom",type:"submit"},xd={class:"error-message"},Id=Me({__name:"LoginWindow",setup(e){const t=wl(),n=me(""),r=me(""),s=me("Вход"),o=me("");async function i(){const c=s.value;s.value="Загрузка...",o.value="";try{await Cl(n.value,r.value)}catch(l){if(l instanceof xt){if(n.value==""&&r.value=="")return;o.value="Не верны название команды или пароль"}else o.value="Сервер не доступен";return}finally{s.value=c}sessionStorage.setItem("teamId",n.value),sessionStorage.setItem("password",r.value),t.push("/")}return gs(()=>{n.value=sessionStorage.getItem("teamId")||"",r.value=sessionStorage.getItem("password")||"",i()}),(c,l)=>(ee(),fe(_e,null,[l[2]||(l[2]=K("div",{class:"header-block"}," Вечерний детектив ",-1)),K("div",Pd,[ie(Rs,null,{default:yt(()=>[K("form",{onSubmit:ll(i,["prevent"])},[K("div",null,[Bn(K("input",{class:"input-custom","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"text",placeholder:"Название команды"},null,512),[[Yr,n.value]])]),K("div",null,[Bn(K("input",{class:"input-custom","onUpdate:modelValue":l[1]||(l[1]=a=>r.value=a),type:"text",placeholder:"Пароль",autocapitalize:"off"},null,512),[[Yr,r.value]])]),K("div",Ad,[K("button",Td,Xe(s.value),1)]),K("div",xd,Xe(o.value),1)],32)]),_:1})])],64))}}),Md=Ue(Id,[["__scopeId","data-v-7028a494"]]),Bd=Me({__name:"LoginView",setup(e){return(t,n)=>(ee(),Tt(Md))}}),Nd=Ya({history:Pa("/"),routes:[{path:"/",name:"home",component:Rd},{path:"/login",name:"login",component:Bd}]}),Ps=Ku(ef);Ps.use(Ju());Ps.use(Nd);Ps.mount("#app"); diff --git a/cmd/evening_detective/static/user/assets/index-BkPf0Nib.css b/cmd/evening_detective/static/user/assets/index-VykonQGy.css similarity index 52% rename from cmd/evening_detective/static/user/assets/index-BkPf0Nib.css rename to cmd/evening_detective/static/user/assets/index-VykonQGy.css index 2448b21..ff04432 100644 --- a/cmd/evening_detective/static/user/assets/index-BkPf0Nib.css +++ b/cmd/evening_detective/static/user/assets/index-VykonQGy.css @@ -1 +1 @@ -:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:url(/assets/forest-DGCb0Pbq.png);background-size:cover}body{overflow:hidden;background-color:#000;scrollbar-width:none}@font-face{font-family:a_OldTyper;src:url(/assets/a_OldTyper-BsgRTrmO.ttf)}@font-face{font-family:main;src:url(/assets/main-28oI6zBg.ttf)}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}@media (min-width: 1025px){.center-block-custom{width:700px;margin:0 auto}}.center-container{display:flex;align-items:center;justify-content:center}.controller-metal{width:30px;height:calc(100% + 2px);position:absolute;top:-1px}.controller-metal-left{left:-15px}.controller-metal-right{right:-15px}header[data-v-913ef6b1]{line-height:1.5;max-height:100vh}.logo[data-v-913ef6b1]{display:block;margin:0 auto 2rem}nav[data-v-913ef6b1]{width:100%;font-size:12px;text-align:center;margin-top:2rem}nav a.router-link-exact-active[data-v-913ef6b1]{color:var(--color-text)}nav a.router-link-exact-active[data-v-913ef6b1]:hover{background-color:transparent}nav a[data-v-913ef6b1]{display:inline-block;padding:0 1rem;border-left:1px solid var(--color-border)}nav a[data-v-913ef6b1]:first-of-type{border:0}@media (min-width: 1024px){header[data-v-913ef6b1]{display:flex;place-items:center;padding-right:calc(var(--section-gap) / 2)}.logo[data-v-913ef6b1]{margin:0 2rem 0 0}header .wrapper[data-v-913ef6b1]{display:flex;place-items:flex-start;flex-wrap:wrap}nav[data-v-913ef6b1]{text-align:left;margin-left:-1rem;font-size:1rem;padding:1rem 0;margin-top:1rem}}.belt-block[data-v-9903d979]{height:100%;background-image:url(/assets/belt_mini-DDotyJSU.png);background-size:cover;position:relative}.shadow[data-v-9903d979]{height:10px;width:100%;position:absolute;bottom:5px;background-color:#000;box-shadow:0 5px 10px #000}.belt-block[data-v-57312f28]{height:100%;background-color:#000;background-image:url(/assets/belt-B9kZnNyz.png);background-size:cover;position:relative}.shadow[data-v-57312f28]{height:10px;width:100%;position:absolute;background-color:#000}.shadow-top[data-v-57312f28]{top:0;box-shadow:0 -5px 10px #000}.shadow-bottom[data-v-57312f28]{bottom:0;box-shadow:0 5px 10px #000}.text-with-font[data-v-33b571eb]{font-family:a_OldTyper;color:#bfa07d;font-weight:600;letter-spacing:2px;line-height:20px;font-size:22px}.plate-block[data-v-24c80f2d]{position:relative;box-shadow:0 0 10px #000}.metal-plate-block[data-v-24c80f2d]{height:100%;background-image:url(/assets/metal-DzSXT9M1.png);background-size:cover;position:relative;border-radius:4px}.pin[data-v-24c80f2d]{width:7px;height:7px;position:absolute;background-image:url(/assets/pin-CJfldk-j.png);background-size:cover}.pin-top-left[data-v-24c80f2d]{top:3px;left:3px}.pin-top-right[data-v-24c80f2d]{top:3px;right:3px}.pin-bottom-right[data-v-24c80f2d]{bottom:3px;right:3px}.pin-bottom-left[data-v-24c80f2d]{bottom:3px;left:3px}.game-header[data-v-cb5d784c]{height:100px;position:fixed;top:5px;left:0;width:100%;z-index:2000}.center[data-v-cb5d784c]{position:relative;max-width:1920px;margin:0 auto}.logo[data-v-cb5d784c]{width:90px;height:88px;float:left;margin:0 10px;position:relative;z-index:20;top:10px}.belt-mini[data-v-cb5d784c]{height:30px;position:relative;z-index:10}.belt[data-v-cb5d784c]{height:60px;position:relative;top:-5px}.position-right-center-block[data-v-cb5d784c]{height:100%;display:flex;align-items:center;justify-content:left}.controller-metal[data-v-cb5d784c]{width:30px;height:calc(100% + 2px);position:absolute;top:-1px;z-index:15}.controller-metal-left[data-v-cb5d784c]{left:-30px}.controller-metal-right[data-v-cb5d784c]{right:-30px}.main[data-v-4f467660]{position:relative}.message-cloud[data-v-4f467660],.message-cloud-2[data-v-4f467660],.message-cloud-3[data-v-4f467660]{background-color:bisque}.message-cloud[data-v-4f467660]{margin:15px 0;padding:16px;font-family:main;color:#000;line-height:20px;font-size:18px;font-weight:900;position:relative}.message-cloud[data-v-4f467660],.message-cloud-2[data-v-4f467660],.message-cloud-3[data-v-4f467660]{border-radius:5px;background-image:url(/assets/paper-Dc-nIYYc.jpg);background-size:cover;display:flow-root;box-shadow:0 0 5px #000}.message-cloud-2[data-v-4f467660],.message-cloud-3[data-v-4f467660]{position:absolute;top:0;left:0}.message-cloud-2[data-v-4f467660]{transform:rotate(-3deg);filter:brightness(50%);height:100%;width:100%}.message-cloud-3[data-v-4f467660]{transform:rotate(2deg);filter:brightness(80%);height:100%;width:100%}.qr[data-v-7828595e]{text-align:center;width:200px}.qr-code[data-v-7828595e]{margin:12px 0;box-shadow:0 3px 15px #626262}.team-name[data-v-7828595e]{margin:10px 0;font-size:20px}.message[data-v-7828595e]{margin:7px 0}.hr[data-v-b740256b]{margin:10px 0;border:dashed 1px;border-color:#000}.message-header[data-v-b740256b]{font-size:20px;padding-right:50px}.collapse-icon[data-v-b740256b]{position:absolute;top:12px;right:12px;width:45px;height:28px;cursor:pointer;background-image:url(/assets/collapse-DCvTPk_P.png);background-size:cover;background-position:center}.collapse-icon-up[data-v-b740256b]{transform:rotate(-180deg)}.message-content[data-v-b740256b]{font-weight:500;white-space:pre-wrap}.message-image-border[data-v-b740256b]{width:40%;float:left;padding:7px;margin-right:15px;background-image:url(/assets/paper_white-C8HN8PnK.jpg);background-size:cover;box-shadow:0 3px 15px #626262;transform:rotate(-3deg)}.message-image[data-v-b740256b]{width:100%}.button-dialog[data-v-b740256b]{display:inline-block;font-weight:600;border-radius:5px;font-size:16px;margin-top:10px;margin-right:10px;background-image:url(/assets/belt-B9kZnNyz.png);background-size:cover;color:#bfa07d}.button-dialog-text[data-v-b740256b]{padding:5px 12px}.message-footer[data-v-b740256b]{padding-right:50px;font-weight:400;color:var(--second-color);position:relative}.application-label[data-v-b740256b]{background-image:url(/assets/label-DjUQJlD7.png);background-size:cover;width:30px;height:52px;text-align:center;padding-top:22px;color:#000;position:absolute;bottom:-10px;right:5px;transform:rotate(9deg);font-size:30px;font-family:sans-serif}.form-custom[data-v-fb9d4e7d]{position:fixed;bottom:0;left:0;width:100%;color:#fff;z-index:1000}.input-form[data-v-fb9d4e7d]{height:76px;position:relative;z-index:1000;margin:0 auto;max-width:1920px}.controller-metal[data-v-fb9d4e7d]{width:30px;height:calc(100% + 2px);position:absolute;top:-1px}.controller-metal-left[data-v-fb9d4e7d]{left:-30px}.controller-metal-right[data-v-fb9d4e7d]{right:-30px}.controller[data-v-fb9d4e7d]{display:flex;position:relative}.game-input[data-v-fb9d4e7d]{position:relative;top:14px;left:15px;height:50px;width:calc(100% - 175px)}.game-input-run[data-v-fb9d4e7d]{height:100%;width:100%;padding-left:27px;background-image:url(/assets/input_center-DZZtEHaZ.png);background-size:cover;border:0;font-size:18px;font-family:a_OldTyper;background-color:transparent}.game-input-run[data-v-fb9d4e7d]::placeholder{color:#333}.game-input-run[data-v-fb9d4e7d]:focus{border:0;outline:none}.game-button-run-shadow[data-v-fb9d4e7d]{position:absolute;right:10px;top:-5px;height:80px;width:150px;box-shadow:-5px 5px 10px #000}.game-button-run[data-v-fb9d4e7d]{background-image:url(/assets/button-DdziMEJE.png);background-size:cover;font-size:1.5em;position:absolute;right:10px;top:-5px;height:80px;width:155px;border:0;background-color:transparent;margin:0;padding:0}.modal-overlay[data-v-351cc8f7]{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000b3;display:flex;justify-content:center;align-items:center;z-index:9999;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.modal-content[data-v-351cc8f7]{position:relative;width:90%;max-width:420px;min-height:250px;background-position:center;background-repeat:no-repeat;overflow:hidden;background-image:url(/assets/stop-Dhh5jN6h.png);background-size:cover}.modal-body[data-v-351cc8f7]{position:relative;z-index:2;padding:30px}.game-input-form-shadow[data-v-351cc8f7]{height:90px;width:120%;left:-10%;top:3px;position:absolute;box-shadow:0 -5px 10px #000;z-index:9;background-color:#000}.messages-block[data-v-351cc8f7]{top:90px;height:calc(100dvh - 166px);overflow-y:auto;scrollbar-width:none;position:relative;padding:15px 10px}.team-name-block[data-v-351cc8f7]{margin-right:10px;width:50px;height:40px;font-family:a_OldTyper}.text-middle-wrapper[data-v-351cc8f7]{position:relative;height:100%}.text-middle-wrapper p[data-v-351cc8f7]{position:absolute;top:50%;left:50%;margin-right:-50%;transform:translate(-50%,-50%)}.text-truncate[data-v-351cc8f7]{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:medium}.input-custom[data-v-7028a494]{width:100%;box-sizing:border-box;margin:10px 0}.error-message[data-v-7028a494]{color:brown;margin:16px 0}.input-custom[data-v-7028a494],.button-custom[data-v-7028a494]{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container[data-v-7028a494]{display:flex} +:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:url(/assets/forest-BtC0DC9-.png);background-size:cover}body{overflow:hidden;background-color:#000;scrollbar-width:none}@font-face{font-family:a_OldTyper;src:url(/assets/a_OldTyper-BsgRTrmO.ttf)}@font-face{font-family:main;src:url(/assets/main-28oI6zBg.ttf)}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}@media (min-width: 1025px){.center-block-custom{width:700px;margin:0 auto}}.center-container{display:flex;align-items:center;justify-content:center}.controller-metal{width:30px;height:calc(100% + 2px);position:absolute;top:-1px}.controller-metal-left{left:-15px}.controller-metal-right{right:-15px}header[data-v-913ef6b1]{line-height:1.5;max-height:100vh}.logo[data-v-913ef6b1]{display:block;margin:0 auto 2rem}nav[data-v-913ef6b1]{width:100%;font-size:12px;text-align:center;margin-top:2rem}nav a.router-link-exact-active[data-v-913ef6b1]{color:var(--color-text)}nav a.router-link-exact-active[data-v-913ef6b1]:hover{background-color:transparent}nav a[data-v-913ef6b1]{display:inline-block;padding:0 1rem;border-left:1px solid var(--color-border)}nav a[data-v-913ef6b1]:first-of-type{border:0}@media (min-width: 1024px){header[data-v-913ef6b1]{display:flex;place-items:center;padding-right:calc(var(--section-gap) / 2)}.logo[data-v-913ef6b1]{margin:0 2rem 0 0}header .wrapper[data-v-913ef6b1]{display:flex;place-items:flex-start;flex-wrap:wrap}nav[data-v-913ef6b1]{text-align:left;margin-left:-1rem;font-size:1rem;padding:1rem 0;margin-top:1rem}}.belt-block[data-v-5ed18f32]{height:100%;background-image:url(/assets/belt_mini-CjEl-eRA.png);background-size:cover;position:relative}.shadow[data-v-5ed18f32]{height:10px;width:100%;position:absolute;bottom:5px;background-color:#000;box-shadow:0 5px 10px #000}.belt-block[data-v-0effe39e]{height:100%;background-color:#000;background-image:url(/assets/belt-DVqk2_uL.png);background-size:cover;position:relative}.shadow[data-v-0effe39e]{height:10px;width:100%;position:absolute;background-color:#000}.shadow-top[data-v-0effe39e]{top:0;box-shadow:0 -5px 10px #000}.shadow-bottom[data-v-0effe39e]{bottom:0;box-shadow:0 5px 10px #000}.text-with-font[data-v-33b571eb]{font-family:a_OldTyper;color:#bfa07d;font-weight:600;letter-spacing:2px;line-height:20px;font-size:22px}.plate-block[data-v-34e952c0]{position:relative;box-shadow:0 0 10px #000}.metal-plate-block[data-v-34e952c0]{height:100%;background-image:url(/assets/metal-BiL2PH1r.png);background-size:cover;position:relative;border-radius:4px}.pin[data-v-34e952c0]{width:7px;height:7px;position:absolute;background-image:url(/assets/pin-CJfldk-j.png);background-size:cover}.pin-top-left[data-v-34e952c0]{top:3px;left:3px}.pin-top-right[data-v-34e952c0]{top:3px;right:3px}.pin-bottom-right[data-v-34e952c0]{bottom:3px;right:3px}.pin-bottom-left[data-v-34e952c0]{bottom:3px;left:3px}.game-header[data-v-b87f05d7]{height:100px;position:fixed;top:5px;left:0;width:100%;z-index:2000}.center[data-v-b87f05d7]{position:relative;max-width:1920px;margin:0 auto}.logo[data-v-b87f05d7]{width:90px;height:88px;float:left;margin:0 10px;position:relative;z-index:20;top:10px}.belt-mini[data-v-b87f05d7]{height:30px;position:relative;z-index:10}.belt[data-v-b87f05d7]{height:60px;position:relative;top:-5px}.position-right-center-block[data-v-b87f05d7]{height:100%;display:flex;align-items:center;justify-content:left}.controller-metal[data-v-b87f05d7]{width:30px;height:calc(100% + 2px);position:absolute;top:-1px;z-index:15}.controller-metal-left[data-v-b87f05d7]{left:-30px}.controller-metal-right[data-v-b87f05d7]{right:-30px}.main[data-v-d5fe1f79]{position:relative}.message-cloud[data-v-d5fe1f79],.message-cloud-2[data-v-d5fe1f79],.message-cloud-3[data-v-d5fe1f79]{background-color:bisque}.message-cloud[data-v-d5fe1f79]{margin:15px 0;padding:16px;font-family:main;color:#000;line-height:20px;font-size:18px;font-weight:900;position:relative}.message-cloud[data-v-d5fe1f79],.message-cloud-2[data-v-d5fe1f79],.message-cloud-3[data-v-d5fe1f79]{border-radius:5px;background-image:url(/assets/paper-CuqvoKhN.jpg);background-size:cover;display:flow-root;box-shadow:0 0 5px #000}.message-cloud-2[data-v-d5fe1f79],.message-cloud-3[data-v-d5fe1f79]{position:absolute;top:0;left:0}.message-cloud-2[data-v-d5fe1f79]{transform:rotate(-3deg);filter:brightness(50%);height:100%;width:100%}.message-cloud-3[data-v-d5fe1f79]{transform:rotate(2deg);filter:brightness(80%);height:100%;width:100%}.qr[data-v-7828595e]{text-align:center;width:200px}.qr-code[data-v-7828595e]{margin:12px 0;box-shadow:0 3px 15px #626262}.team-name[data-v-7828595e]{margin:10px 0;font-size:20px}.message[data-v-7828595e]{margin:7px 0}.hr[data-v-cffe3743]{margin:10px 0;border:dashed 1px;border-color:#000}.message-header[data-v-cffe3743]{font-size:20px;padding-right:50px}.collapse-icon[data-v-cffe3743]{position:absolute;top:12px;right:12px;width:45px;height:28px;cursor:pointer;background-image:url(/assets/collapse-B6YzUtGl.png);background-size:cover;background-position:center}.collapse-icon-up[data-v-cffe3743]{transform:rotate(-180deg)}.message-content[data-v-cffe3743]{font-weight:500;white-space:pre-wrap}.message-image-border[data-v-cffe3743]{width:40%;float:left;padding:7px;margin-right:15px;background-image:url(/assets/paper_white-ZSlTzOTx.jpg);background-size:cover;box-shadow:0 3px 15px #626262;transform:rotate(-3deg)}.message-image[data-v-cffe3743]{width:100%}.button-dialog[data-v-cffe3743]{display:inline-block;font-weight:600;border-radius:5px;font-size:16px;margin-top:10px;margin-right:10px;background-image:url(/assets/belt-DVqk2_uL.png);background-size:cover;color:#bfa07d}.button-dialog-text[data-v-cffe3743]{padding:5px 12px}.message-footer[data-v-cffe3743]{padding-right:50px;font-weight:400;color:var(--second-color);position:relative}.application-label[data-v-cffe3743]{background-image:url(/assets/label-BzqF2n2Z.png);background-size:cover;width:30px;height:52px;text-align:center;padding-top:22px;color:#000;position:absolute;bottom:-10px;right:5px;transform:rotate(9deg);font-size:30px;font-family:sans-serif}.form-custom[data-v-1272527b]{position:fixed;bottom:0;left:0;width:100%;color:#fff;z-index:1000}.input-form[data-v-1272527b]{height:76px;position:relative;z-index:1000;margin:0 auto;max-width:1920px}.controller-metal[data-v-1272527b]{width:30px;height:calc(100% + 2px);position:absolute;top:-1px}.controller-metal-left[data-v-1272527b]{left:-30px}.controller-metal-right[data-v-1272527b]{right:-30px}.controller[data-v-1272527b]{display:flex;position:relative}.game-input[data-v-1272527b]{position:relative;top:14px;left:15px;height:50px;width:calc(100% - 175px)}.game-input-run[data-v-1272527b]{height:100%;width:100%;padding-left:27px;background-image:url(/assets/input_center-DZZtEHaZ.png);background-size:cover;border:0;font-size:18px;font-family:a_OldTyper;background-color:transparent}.game-input-run[data-v-1272527b]::placeholder{color:#333}.game-input-run[data-v-1272527b]:focus{border:0;outline:none}.game-button-run-shadow[data-v-1272527b]{position:absolute;right:10px;top:-5px;height:80px;width:150px;box-shadow:-5px 5px 10px #000}.game-button-run[data-v-1272527b]{background-image:url(/assets/button-DdziMEJE.png);background-size:cover;font-size:1.5em;position:absolute;right:10px;top:-5px;height:80px;width:155px;border:0;background-color:transparent;margin:0;padding:0}.modal-overlay[data-v-0bc4d193]{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000b3;display:flex;justify-content:center;align-items:center;z-index:9999;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.modal-content[data-v-0bc4d193]{position:relative;width:90%;max-width:420px;min-height:250px;background-position:center;background-repeat:no-repeat;overflow:hidden;background-image:url(/assets/stop-DGMqnbBD.png);background-size:cover}.modal-body[data-v-0bc4d193]{position:relative;z-index:2;padding:30px}.game-input-form-shadow[data-v-0bc4d193]{height:90px;width:120%;left:-10%;top:3px;position:absolute;box-shadow:0 -5px 10px #000;z-index:9;background-color:#000}.messages-block[data-v-0bc4d193]{top:90px;height:calc(100dvh - 166px);overflow-y:auto;scrollbar-width:none;position:relative;padding:15px 10px}.team-name-block[data-v-0bc4d193]{margin-right:10px;width:50px;height:40px;font-family:a_OldTyper}.text-middle-wrapper[data-v-0bc4d193]{position:relative;height:100%}.text-middle-wrapper p[data-v-0bc4d193]{position:absolute;top:50%;left:50%;margin-right:-50%;transform:translate(-50%,-50%)}.text-truncate[data-v-0bc4d193]{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:medium}.input-custom[data-v-7028a494]{width:100%;box-sizing:border-box;margin:10px 0}.error-message[data-v-7028a494]{color:brown;margin:16px 0}.input-custom[data-v-7028a494],.button-custom[data-v-7028a494]{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container[data-v-7028a494]{display:flex} diff --git a/cmd/evening_detective/static/user/assets/label-BzqF2n2Z.png b/cmd/evening_detective/static/user/assets/label-BzqF2n2Z.png new file mode 100644 index 0000000..2142263 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/label-BzqF2n2Z.png differ diff --git a/cmd/evening_detective/static/user/assets/label-DjUQJlD7.png b/cmd/evening_detective/static/user/assets/label-DjUQJlD7.png deleted file mode 100644 index 42f6115..0000000 Binary files a/cmd/evening_detective/static/user/assets/label-DjUQJlD7.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/logo_belt-BKkOxVEN.png b/cmd/evening_detective/static/user/assets/logo_belt-BKkOxVEN.png deleted file mode 100644 index 6525373..0000000 Binary files a/cmd/evening_detective/static/user/assets/logo_belt-BKkOxVEN.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/logo_belt-DPdjjAgZ.png b/cmd/evening_detective/static/user/assets/logo_belt-DPdjjAgZ.png new file mode 100644 index 0000000..9712617 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/logo_belt-DPdjjAgZ.png differ diff --git a/cmd/evening_detective/static/user/assets/metal-BiL2PH1r.png b/cmd/evening_detective/static/user/assets/metal-BiL2PH1r.png new file mode 100644 index 0000000..9add6a2 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/metal-BiL2PH1r.png differ diff --git a/cmd/evening_detective/static/user/assets/metal-DzSXT9M1.png b/cmd/evening_detective/static/user/assets/metal-DzSXT9M1.png deleted file mode 100644 index 859053d..0000000 Binary files a/cmd/evening_detective/static/user/assets/metal-DzSXT9M1.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/paper-CuqvoKhN.jpg b/cmd/evening_detective/static/user/assets/paper-CuqvoKhN.jpg new file mode 100644 index 0000000..ec7c0f0 Binary files /dev/null and b/cmd/evening_detective/static/user/assets/paper-CuqvoKhN.jpg differ diff --git a/cmd/evening_detective/static/user/assets/paper-Dc-nIYYc.jpg b/cmd/evening_detective/static/user/assets/paper-Dc-nIYYc.jpg deleted file mode 100644 index 1dc976c..0000000 Binary files a/cmd/evening_detective/static/user/assets/paper-Dc-nIYYc.jpg and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/paper_white-C8HN8PnK.jpg b/cmd/evening_detective/static/user/assets/paper_white-C8HN8PnK.jpg deleted file mode 100644 index f1aaadc..0000000 Binary files a/cmd/evening_detective/static/user/assets/paper_white-C8HN8PnK.jpg and /dev/null differ diff --git a/cmd/evening_detective/static/user/assets/paper_white-ZSlTzOTx.jpg b/cmd/evening_detective/static/user/assets/paper_white-ZSlTzOTx.jpg new file mode 100644 index 0000000..e76af6d Binary files /dev/null and b/cmd/evening_detective/static/user/assets/paper_white-ZSlTzOTx.jpg differ diff --git a/cmd/evening_detective/static/user/assets/stop-DGMqnbBD.png b/cmd/evening_detective/static/user/assets/stop-DGMqnbBD.png new file mode 100644 index 0000000..149996c Binary files /dev/null and b/cmd/evening_detective/static/user/assets/stop-DGMqnbBD.png differ diff --git a/cmd/evening_detective/static/user/assets/stop-Dhh5jN6h.png b/cmd/evening_detective/static/user/assets/stop-Dhh5jN6h.png deleted file mode 100644 index b0550bc..0000000 Binary files a/cmd/evening_detective/static/user/assets/stop-Dhh5jN6h.png and /dev/null differ diff --git a/cmd/evening_detective/static/user/index.html b/cmd/evening_detective/static/user/index.html index 9127ea3..c20cdb9 100644 --- a/cmd/evening_detective/static/user/index.html +++ b/cmd/evening_detective/static/user/index.html @@ -5,8 +5,8 @@ Вечерний детектив - - + +