!function(){"use strict";(a=>{if("undefined"==typeof document)return;const o=window;o.__ROBOTMIA_STYLES__=(o.__ROBOTMIA_STYLES__||"")+a,"function"==typeof o.__ROBOTMIA_INJECT__&&o.__ROBOTMIA_INJECT__(a)})('.robotmia-close-btn[data-v-510d4e3f]{position:absolute;top:0;right:10px;background:transparent;border:none;font-size:20px;cursor:pointer;color:var(--primary-color);transition:.3s}.robotmia-close-btn[data-v-510d4e3f]:hover{color:var(--primary-color)}.robotmia-confirm-overlay[data-v-510d4e3f]{position:absolute;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;justify-content:center;align-items:center;z-index:10000}.robotmia-confirm-box[data-v-510d4e3f]{background:#fff;border-radius:var(--rm-radius-md);box-shadow:0 10px 30px #0000004d;padding:19.2px;text-align:center;width:90%;max-width:min(50vw,360px)}.robotmia-confirm-buttons[data-v-510d4e3f]{display:flex;justify-content:center;gap:8px;margin-top:12.8px}.robotmia-btn.robotmia-secondary[data-v-510d4e3f]{background:#eee;color:var(--primary-color)}.robotmia-star.robotmia-disabled:hover .robotmia-star-icon[data-v-510d4e3f],.robotmia-star:disabled:hover .robotmia-star-icon[data-v-510d4e3f]{fill:inherit!important;stroke:inherit!important;transform:none!important}.robotmia-star.robotmia-disabled[data-v-510d4e3f],.robotmia-star[data-v-510d4e3f]:disabled{pointer-events:none;cursor:not-allowed}.robotmia-overlay[data-v-510d4e3f]{align-items:flex-start;padding-top:10vh;position:absolute;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.robotmia-rating-menu[data-v-510d4e3f]{position:relative;background:#fff;border-radius:var(--rm-radius-lg);padding:clamp(13px,2vw,24px);width:90%;min-width:260px;max-width:100%;text-align:center;box-shadow:0 10px 30px #0003;border-top:5px solid var(--primary-color);transition:all .35s ease;max-height:min(60vh,85vh);overflow-y:auto;display:flex;flex-direction:column}@media (max-width: 768px){.robotmia-rating-menu[data-v-510d4e3f]{width:94%;min-width:280px;max-width:96vw;padding:24px 20px 28px;border-top-width:6px}.robotmia-title[data-v-510d4e3f]{font-size:18px;margin-bottom:16px}.robotmia-description[data-v-510d4e3f]{font-size:18px;line-height:1.4}.robotmia-stars[data-v-510d4e3f]{gap:14px;margin:20px 0 12px}.robotmia-star[data-v-510d4e3f]{width:48px;height:48px}.robotmia-message[data-v-510d4e3f]{font-size:16px}.robotmia-btn[data-v-510d4e3f]{font-size:17px;padding:13.6px 28px}.robotmia-comment-box[data-v-510d4e3f]{font-size:16px;padding:16px}}.robotmia-title[data-v-510d4e3f]{color:var(--primary-color);margin-bottom:16px;font-size:17px;font-weight:700}.robotmia-description[data-v-510d4e3f]{color:var(--primary-color);font-size:clamp(13px,1.8vw,17px);white-space:pre-line}.robotmia-stars[data-v-510d4e3f]{display:flex;justify-content:center;gap:clamp(6px,1.2vw,14px);margin:16px 0 8px}.robotmia-star[data-v-510d4e3f]{background:none;border:none;cursor:pointer;transition:transform .15s ease;padding:0;width:clamp(24px,4.5vw,44px);height:clamp(24px,4.5vw,44px);flex-shrink:0}.robotmia-star-icon[data-v-510d4e3f]{width:100%;height:100%;display:block;transition:all .25s ease;fill:none;stroke:#ccc;stroke-width:1.5}.robotmia-star.robotmia-active .robotmia-star-icon[data-v-510d4e3f]{fill:var(--primary-color);stroke:var(--primary-color)}.robotmia-star:hover .robotmia-star-icon[data-v-510d4e3f]{fill:var(--primary-color);stroke:var(--primary-color);transform:scale(1.15)}.robotmia-comment-area[data-v-510d4e3f]{margin-top:12.8px}.robotmia-comment-box[data-v-510d4e3f]{width:100%;border:2px solid var(--primary-color);border-radius:var(--rm-radius-md);padding:12.8px;resize:none;font-size:16px;transition:box-shadow .2s ease}.robotmia-comment-box[data-v-510d4e3f]:focus{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary-color) 40%,transparent)}.robotmia-btn[data-v-510d4e3f]{border:none;border-radius:var(--rm-radius-sm);padding:11.2px 24px;cursor:pointer;font-weight:600;font-size:15px;transition:.3s ease}.robotmia-btn.robotmia-primary[data-v-510d4e3f]{background:var(--primary-color);color:#fff!important;box-shadow:0 3px 10px color-mix(in srgb,var(--primary-color) 40%,transparent);margin-top:8px}.robotmia-btn.robotmia-primary[data-v-510d4e3f]:disabled{opacity:.6;cursor:not-allowed}.robotmia-message[data-v-510d4e3f]{color:var(--primary-color);margin-bottom:8px;line-height:1.4;font-size:13px}.robotmia-followup[data-v-510d4e3f]{font-weight:600}.robotmia-fade-seq-enter-active[data-v-510d4e3f],.robotmia-fade-seq-leave-active[data-v-510d4e3f]{transition:opacity .55s ease,transform .55s ease}.robotmia-fade-seq-enter-from[data-v-510d4e3f],.robotmia-fade-seq-leave-to[data-v-510d4e3f]{opacity:0;transform:translateY(20px)}.robotmia-fade-seq-enter-to[data-v-510d4e3f],.robotmia-fade-seq-leave-from[data-v-510d4e3f]{opacity:1;transform:translateY(0)}.robotmia-contact-form[data-v-fdb2f525]{position:absolute;top:var(--rm-overlap);right:0;width:100%;height:var(--rm-chat-h);background:#fff;border-radius:0 0 var(--rm-radius-lg) var(--rm-radius-lg);box-shadow:0 12px 40px #00000026;overflow:hidden;transform-origin:top center;padding:15px 20px;z-index:2;overflow-y:auto;box-sizing:border-box;pointer-events:auto}.robotmia-operator-message[data-v-fdb2f525]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:16px;padding-top:25px}.robotmia-message-bubble[data-v-fdb2f525]{color:var(--primary-color);padding:10px 15px;border-radius:var(--rm-radius-md);font-size:15px;line-height:1.4;max-width:85%;word-wrap:break-word;border:1px solid color-mix(in srgb,var(--primary-color),white 70%)}.robotmia-form-fields[data-v-fdb2f525]{display:flex;flex-direction:column;margin-bottom:8px}.robotmia-form-field[data-v-fdb2f525]{position:relative}.robotmia-error-wrapper[data-v-fdb2f525]{height:20px;margin-bottom:8px;display:flex;align-items:center;padding-left:15px}.robotmia-error-message[data-v-fdb2f525]{color:red;font-size:12px}@keyframes fadeOut-fdb2f525{0%{opacity:1}to{opacity:0}}.robotmia-input-wrapper[data-v-fdb2f525]{position:relative;display:flex;align-items:center}.robotmia-input-wrapper input[data-v-fdb2f525]{padding:12px 15px;border:1px solid var(--primary-color);border-radius:var(--rm-radius-md);font-size:16px;color:var(--primary-color);background:#fff;transition:all .2s ease;outline:none;width:100%;box-sizing:border-box}.robotmia-input-wrapper label[data-v-fdb2f525]{position:absolute;top:-10px;left:12px;font-size:16px;color:var(--primary-color);pointer-events:none;background:#fff;padding:0 4px;z-index:1;transform:scale(.9);transition:all .2s ease}.robotmia-form-consent[data-v-fdb2f525]{display:flex;align-items:flex-start;gap:8px}.robotmia-form-consent input[type=checkbox][data-v-fdb2f525]{width:16px;height:16px;border:1px solid color-mix(in srgb,var(--primary-color),white 70%);border-radius:4px;background:#fff;cursor:pointer;margin-top:2px;accent-color:var(--primary-color);transition:border-color .2s ease}.robotmia-form-consent input[type=checkbox][data-v-fdb2f525]:focus{border-color:var(--primary-color);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary-color),white 80%)}.robotmia-form-consent input[type=checkbox][data-v-fdb2f525]:checked{background:var(--primary-color);border-color:var(--primary-color)}.robotmia-form-consent input[type=checkbox][data-v-fdb2f525]:checked:before{content:"✓";color:#fff;font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;height:100%}.robotmia-form-consent label[data-v-fdb2f525]{font-size:14px;color:color-mix(in srgb,var(--primary-color),black 30%);line-height:1.4}.robotmia-form-consent a[data-v-fdb2f525]{color:var(--primary-color);text-decoration:underline;font-weight:500}.robotmia-start-chat-btn[data-v-fdb2f525]{padding:12px 16px;background:var(--primary-color);color:#fff!important;border:none;border-radius:var(--rm-radius-lg);cursor:pointer;font-size:16px;font-weight:500;transition:all .2s ease;width:100%;box-sizing:border-box}.robotmia-start-chat-btn[data-v-fdb2f525]:disabled{color:#fff!important;background:color-mix(in srgb,var(--primary-color),white 70%);cursor:not-allowed;opacity:.7}.robotmia-start-chat-btn[data-v-fdb2f525]:hover:not(:disabled){background:color-mix(in srgb,var(--primary-color),black 10%);transform:translateY(-1px)}.robotmia-start-chat-btn[data-v-fdb2f525]:active:not(:disabled){transform:translateY(0)}.robotmia-menu-item.robotmia-rate-service[data-v-5d4efa07]{width:100%;display:flex;align-items:center;gap:8px;padding:10px 16px;background:none;border:none;cursor:pointer;color:var(--primary-color);font-weight:500;transition:transform .2s ease,color .3s}.robotmia-menu-item.robotmia-rate-service[data-v-5d4efa07]:hover{color:var(--primary-hover);transform:translateY(-2px)}.robotmia-menu-item.robotmia-sound-toggle[data-v-5d4efa07]{width:100%;display:flex;align-items:center;gap:8px;padding:10px 16px;background:none;border:none;cursor:pointer;color:var(--primary-color);font-weight:500;transition:transform .2s ease,color .3s}.robotmia-menu-item.robotmia-sound-toggle[data-v-5d4efa07]:hover{color:var(--primary-hover);transform:translateY(-2px)}.robotmia-menu-item.robotmia-edit-contact[data-v-5d4efa07]{width:100%;display:flex;align-items:center;gap:8px;padding:10px 16px;background:none;border:none;cursor:pointer;color:var(--primary-color);font-weight:500;transition:transform .2s ease,color .3s}.robotmia-menu-item.robotmia-edit-contact[data-v-5d4efa07]:hover{color:var(--primary-hover);transform:translateY(-2px)}.robotmia-menu-item-text[data-v-5d4efa07]{display:flex;flex-direction:column;align-items:flex-start;gap:2px;line-height:1.2}.robotmia-menu-item-text span[data-v-5d4efa07]:first-child{line-height:1.2}.robotmia-full-screen-menu[data-v-5d4efa07]{position:absolute;bottom:0;left:0;right:0;height:auto;max-height:min(35dvh,var(--rm-chat-h));background:#fff;border-radius:var(--rm-radius-lg);box-shadow:0 -8px 20px #00000026;overflow:hidden;display:flex;flex-direction:column;z-index:10000}.robotmia-menu-container[data-v-5d4efa07]{flex:1 1 auto;overflow-y:auto}.robotmia-menu-header[data-v-5d4efa07]{display:flex;align-items:center;justify-content:end;padding:12px 16px;border-bottom:1px solid var(--primary-color);font-weight:600;color:var(--primary-color)}@supports (color: color-mix(in srgb,red,white)){.robotmia-menu-header[data-v-5d4efa07]{border-bottom:1px solid color-mix(in srgb,var(--primary-color),white 90%)}}.robotmia-close-menu-btn[data-v-5d4efa07]{background:transparent;border:none;font-size:20px;cursor:pointer;color:var(--primary-color)}.robotmia-file-errors[data-v-5d4efa07]{display:flex;flex-direction:column;gap:4px;padding:6px 12px;flex-shrink:0}.robotmia-error-message[data-v-5d4efa07]{display:flex;align-items:center;gap:8px;background-color:#ffebee;color:#c62828;padding:8px 12px;border-radius:var(--rm-radius-sm);font-size:13px;line-height:1.3;border:1px solid #ffcdd2}.robotmia-error-icon[data-v-5d4efa07]{flex-shrink:0;display:flex;align-items:center}.robotmia-error-text[data-v-5d4efa07]{flex:1;min-width:0}.robotmia-error-close[data-v-5d4efa07]{flex-shrink:0;background:none;border:none;color:#c62828;font-size:18px;line-height:1;cursor:pointer;padding:0 2px;opacity:.6}.robotmia-error-close[data-v-5d4efa07]:hover{opacity:1}.robotmia-errors-slide-enter-active[data-v-5d4efa07],.robotmia-errors-slide-leave-active[data-v-5d4efa07]{transition:all .25s ease}.robotmia-errors-slide-enter-from[data-v-5d4efa07],.robotmia-errors-slide-leave-to[data-v-5d4efa07]{opacity:0;transform:translateY(8px)}@keyframes fadeIn-5d4efa07{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.robotmia-close-menu-btn[data-v-5d4efa07]:hover{color:var(--primary-color)}@supports (color: color-mix(in srgb,red,black 20%)){.robotmia-close-menu-btn[data-v-5d4efa07]:hover{color:color-mix(in srgb,var(--primary-color),black 20%)}}.robotmia-menu-content[data-v-5d4efa07]{flex:1;padding:16px;overflow-y:auto}.robotmia-menu-item[data-v-5d4efa07]{display:flex;align-items:center;gap:12px;padding:12px;border-radius:var(--rm-radius-sm);background:var(--primary-color);margin-bottom:8px;border:1px solid var(--primary-color);cursor:pointer;transition:background .2s ease}@supports (background: color-mix(in srgb,red,white 95%)){.robotmia-menu-item[data-v-5d4efa07]{background:color-mix(in srgb,var(--primary-color),white 95%)}}.robotmia-menu-item svg[data-v-5d4efa07]{width:24px;height:24px;flex-shrink:0;color:var(--primary-color)}.robotmia-menu-item span[data-v-5d4efa07]{font-size:14px;color:var(--primary-color)}.robotmia-menu-item[data-v-5d4efa07]:hover{background:var(--primary-color)}.robotmia-menu-item:hover span[data-v-5d4efa07]{color:var(--primary-color)}.robotmia-menu-item:hover svg[data-v-5d4efa07]{color:var(--primary-color)}@supports (background: color-mix(in srgb,red,white 50%)){.robotmia-menu-item[data-v-5d4efa07]:hover{background:color-mix(in srgb,var(--primary-color),white 90%)}}.robotmia-menu-item.robotmia-rate-service[data-v-5d4efa07]{justify-content:flex-start}.robotmia-menu-item.robotmia-rate-service span[data-v-5d4efa07]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.robotmia-attachments[data-v-5d4efa07]{display:flex;flex-direction:column;gap:8px;margin-top:8px;max-width:100%}.robotmia-attachment-item[data-v-5d4efa07]{max-width:100%;width:75%;display:flex;align-items:center;background:#fff;border:1px solid #eaeaea;border-radius:var(--rm-radius-md);padding:10px 12px;box-shadow:0 2px 6px #0000000a;transition:box-shadow .2s ease;box-sizing:border-box;min-width:0}.robotmia-attachment-item[data-v-5d4efa07]:has(>img.robotmia-attachment-image),.robotmia-attachment-item[data-v-5d4efa07]:has(>video.robotmia-attachment-video),.robotmia-attachment-item[data-v-5d4efa07]:has(>.robotmia-video-loading){width:fit-content;max-width:100%;padding:0;border:none;box-shadow:none;background:transparent}.robotmia-attachments.robotmia-user[data-v-5d4efa07],.robotmia-attachment-item.robotmia-user[data-v-5d4efa07]{margin-left:auto;margin-right:0}.robotmia-attachments.robotmia-operator[data-v-5d4efa07],.robotmia-attachment-item.robotmia-operator[data-v-5d4efa07]{margin-left:0;margin-right:auto}.robotmia-attachment-icon[data-v-5d4efa07]{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:var(--rm-radius-sm);background:var(--primary-color);margin-right:12px;flex-shrink:0}.robotmia-attachment-icon svg[data-v-5d4efa07]{width:24px;height:24px;color:#fff!important;fill:#fff!important}.robotmia-attachment-content[data-v-5d4efa07]{flex:1;min-width:0}.robotmia-attachment-filename[data-v-5d4efa07]{font-size:14px;font-weight:500;color:#333;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:100%}.robotmia-attachment-link[data-v-5d4efa07]{display:flex;align-items:center;gap:8px;min-width:0;width:100%;max-width:100%}.robotmia-attachment-link .robotmia-attachment-filename[data-v-5d4efa07]{flex:1;min-width:0}@media (max-width: 768px){.robotmia-attachments[data-v-5d4efa07]{width:fit-content;max-width:100%}.robotmia-attachment-item[data-v-5d4efa07]:not(:has(>img.robotmia-attachment-image)):not(:has(>video.robotmia-attachment-video)){max-width:min(85vw,100%);width:100%}}.robotmia-audio-player[data-v-5d4efa07]{display:flex;align-items:center;gap:10px;width:100%;background:#f9f9f9;border-radius:var(--rm-radius-md);padding:8px 10px}.robotmia-audio-icon[data-v-5d4efa07]{flex-shrink:0;opacity:.8}.robotmia-audio-info[data-v-5d4efa07]{flex:1;min-width:0}.robotmia-audio-filename[data-v-5d4efa07]{font-size:13px;font-weight:500;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px}.robotmia-audio-timeline[data-v-5d4efa07]{display:flex;align-items:center;gap:6px;font-size:11px;color:#777}.robotmia-audio-player.robotmia-disabled[data-v-5d4efa07]{opacity:.5;pointer-events:auto}.robotmia-audio-player.robotmia-disabled .robotmia-audio-filename[data-v-5d4efa07]:after{content:" (ошибка загрузки)";color:#ff4d4d;font-size:12px}.robotmia-attachment-image[data-v-5d4efa07]{max-width:100%;height:auto;max-height:220px;width:auto;object-fit:contain;border-radius:var(--rm-radius-sm);display:block}.robotmia-attachment-video[data-v-5d4efa07]{max-width:100%;max-height:280px;border-radius:var(--rm-radius-sm);display:block;background:#000}.robotmia-video-loading[data-v-5d4efa07]{width:200px;height:120px;border-radius:var(--rm-radius-sm);background:#f0f0f0;display:flex;align-items:center;justify-content:center;color:#999}.robotmia-image-popup[data-v-5d4efa07]{position:absolute;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:10000}.robotmia-popup-close-btn[data-v-5d4efa07]{position:absolute;top:40px;right:16px;background:var(--primary-color);color:#fff;border:none;width:44px;height:44px;border-radius:50%;cursor:pointer;z-index:10001;display:flex;align-items:center;justify-content:center;padding:0}.robotmia-popup-close-btn svg[data-v-5d4efa07]{width:24px;height:24px;flex-shrink:0}.robotmia-popup-close-btn svg path[data-v-5d4efa07],.robotmia-popup-close-btn svg[data-v-5d4efa07]{stroke:#fff!important;fill:none!important}.robotmia-popup-download-btn[data-v-5d4efa07]{position:absolute;top:40px;right:68px;background:var(--primary-color);color:#fff;border:none;border-radius:50%;width:44px;height:44px;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:background .2s ease;padding:0}.robotmia-popup-download-btn svg[data-v-5d4efa07]{width:24px;height:24px;flex-shrink:0}.robotmia-popup-download-btn svg[data-v-5d4efa07],.robotmia-popup-download-btn path[data-v-5d4efa07]{fill:#fff!important}.robotmia-popup-image[data-v-5d4efa07]{max-width:16vw;max-height:35vh;border-radius:var(--rm-radius-md);box-shadow:0 8px 20px #0003}@media (max-width: 768px){.robotmia-popup-image[data-v-5d4efa07]{max-width:90vw;max-height:55vh}}.robotmia-fade-enter-active .robotmia-launcher-panel[data-v-5d4efa07],.robotmia-fade-leave-active .robotmia-launcher-panel[data-v-5d4efa07]{transition:transform .35s cubic-bezier(.4,0,.2,1),opacity .35s cubic-bezier(.4,0,.2,1)}.robotmia-fade-enter-from .robotmia-launcher-panel[data-v-5d4efa07],.robotmia-fade-leave-to .robotmia-launcher-panel[data-v-5d4efa07]{transform:translateY(10px) scale(.985);opacity:0}.robotmia-attachment-image[data-v-5d4efa07]{cursor:pointer}.robotmia-progress-container[data-v-5d4efa07]{flex:1;height:4px;background:#e0e0e0;border-radius:2px;cursor:pointer;position:relative}.robotmia-progress-bar[data-v-5d4efa07]{height:100%;background:var(--primary-color);border-radius:2px;width:0;transition:width .1s ease}.robotmia-audio-play-btn[data-v-5d4efa07]{width:28px;height:28px;border-radius:50%;background:var(--primary-color);color:#fff;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}.robotmia-audio-play-btn svg[data-v-5d4efa07]{fill:#fff!important;color:#fff!important}.robotmia-audio-play-btn[data-v-5d4efa07]:hover{opacity:.9}audio[data-v-5d4efa07]{display:none}.robotmia-chat-widget[data-v-5d4efa07]{position:fixed;bottom:var(--rm-gap-bottom);right:var(--rm-side);z-index:9999;pointer-events:none;transition:transform .4s cubic-bezier(.4,0,.2,1),left .4s cubic-bezier(.4,0,.2,1)}.robotmia-chat-widget[data-position=left][data-v-5d4efa07]{left:var(--rm-side);right:auto;transition:left .4s cubic-bezier(.4,0,.2,1)}.robotmia-chat-widget[data-position=left].robotmia-expanded[data-v-5d4efa07]{left:var(--rm-side)}.robotmia-chat-widget[data-position=center][data-v-5d4efa07]{left:50%;right:auto;transform:translate(-50%)}.robotmia-chat-widget[data-position=right][data-v-5d4efa07]{right:var(--rm-side);left:auto}.robotmia-chat-widget[data-position=left] .robotmia-widget[data-v-5d4efa07]{align-items:flex-start}.robotmia-chat-widget[data-position=center] .robotmia-widget[data-v-5d4efa07]{align-items:center}.robotmia-chat-widget[data-position=right] .robotmia-widget[data-v-5d4efa07]{align-items:flex-end}.robotmia-back-btn[data-v-5d4efa07]{position:absolute;top:12px;right:calc(100% + 56px);width:40px;height:40px;border-radius:50%;background:#fff;border:2px solid rgba(0,0,0,.15);box-shadow:0 6px 18px #0000001f;color:var(--primary-color);cursor:pointer;z-index:10000;display:flex;align-items:center;pointer-events:auto;justify-content:center}.robotmia-close-icon[data-v-5d4efa07]{width:20px;height:20px;flex-shrink:0}.robotmia-header-close[data-v-5d4efa07]{flex-shrink:0;width:30px;height:30px;margin-left:4px;border:none;border-radius:50%;background:#ffffff2e;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;overflow:hidden;pointer-events:auto;transition:width var(--rm-dur-lg) var(--rm-ease-out),margin-left var(--rm-dur-lg) var(--rm-ease-out),opacity var(--rm-dur-lg) var(--rm-ease-out),background var(--rm-dur-micro) var(--rm-ease-out)}.robotmia-header-close[data-v-5d4efa07]:hover{background:#ffffff4d}.robotmia-header-close-hidden[data-v-5d4efa07]{width:0;margin-left:0;padding:0;opacity:0;pointer-events:none}.robotmia-oval.robotmia-mobile-closed .robotmia-header-close[data-v-5d4efa07]{display:none}.robotmia-header-close .robotmia-close-icon[data-v-5d4efa07]{width:18px;height:18px}.robotmia-resize-handle[data-v-5d4efa07]{position:absolute;top:-6px;left:0;right:0;height:18px;z-index:5;cursor:ns-resize;pointer-events:auto;touch-action:none}.robotmia-resize-handle[data-v-5d4efa07]:after{content:"";position:absolute;top:7px;left:50%;transform:translate(-50%);width:40px;height:4px;border-radius:2px;background:#fff6;background:color-mix(in srgb,var(--rm-on-primary, #fff),transparent 62%);transition:background var(--rm-dur) var(--rm-ease-out)}.robotmia-resize-handle[data-v-5d4efa07]:hover:after{background:#ffffffbf;background:color-mix(in srgb,var(--rm-on-primary, #fff),transparent 25%)}.robotmia-chat-widget.robotmia-resizing .robotmia-widget[data-v-5d4efa07]{transition:none}@media (max-width: 480px){.robotmia-resize-handle[data-v-5d4efa07]{display:none}.robotmia-header-close[data-v-5d4efa07]{width:38px;height:38px}.robotmia-header-close .robotmia-close-icon[data-v-5d4efa07]{width:20px;height:20px}}.robotmia-widget[data-v-5d4efa07]{width:var(--rm-width);height:var(--rm-launcher-h);display:flex;flex-direction:column;align-items:flex-end;position:relative;pointer-events:none;transition:height .4s cubic-bezier(.4,0,.2,1),transform .4s cubic-bezier(.4,0,.2,1),opacity .35s var(--rm-ease-out)}.robotmia-widget.robotmia-open[data-v-5d4efa07]{height:calc(var(--rm-overlap) + var(--rm-chat-h));pointer-events:auto}.robotmia-widget.robotmia-compact-opening[data-v-5d4efa07]{transition-delay:.3s}.robotmia-widget.robotmia-compact-opening .robotmia-oval[data-v-5d4efa07]{transition-delay:0ms}.robotmia-compact-opening .robotmia-grow-down-enter-active[data-v-5d4efa07]{transition-delay:.3s}.robotmia-widget.robotmia-compact-opening:not(.robotmia-header-revealed) .robotmia-oval[data-v-5d4efa07]{border-bottom-left-radius:var(--rm-radius-window);border-bottom-right-radius:var(--rm-radius-window)}.robotmia-widget.robotmia-compact-opening:not(.robotmia-header-revealed) .robotmia-oval-icon[data-v-5d4efa07]{opacity:0}.robotmia-widget.robotmia-compact-closing[data-v-5d4efa07]{opacity:0;transition:opacity .35s var(--rm-ease-in);pointer-events:none}.robotmia-no-transition[data-v-5d4efa07],.robotmia-no-transition[data-v-5d4efa07] *,.robotmia-no-transition[data-v-5d4efa07] *:before,.robotmia-no-transition[data-v-5d4efa07] *:after{transition:none!important;animation:none!important}.robotmia-widget.robotmia-compact-closing .robotmia-grow-down-leave-from[data-v-5d4efa07],.robotmia-widget.robotmia-compact-closing .robotmia-grow-down-leave-active[data-v-5d4efa07],.robotmia-widget.robotmia-compact-closing .robotmia-grow-down-leave-to[data-v-5d4efa07]{transition:none!important;animation:none!important;transform:none!important;opacity:0!important}.robotmia-oval[data-v-5d4efa07]{width:100%;height:var(--rm-launcher-h);border-radius:var(--rm-radius-window);background:var(--primary-color);box-shadow:var(--rm-shadow-launcher);color:#fff;display:flex;align-items:center;padding:10px 20px;gap:10px;cursor:pointer;position:relative;z-index:3;pointer-events:auto;transition:width .4s cubic-bezier(.4,0,.2,1),height .4s cubic-bezier(.4,0,.2,1),border-bottom-left-radius .4s cubic-bezier(.4,0,.2,1),border-bottom-right-radius .4s cubic-bezier(.4,0,.2,1),padding .4s cubic-bezier(.4,0,.2,1),transform var(--rm-dur) var(--rm-ease-out),box-shadow var(--rm-dur) var(--rm-ease-out);outline:none;-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent}.robotmia-widget.robotmia-header-revealed .robotmia-oval[data-v-5d4efa07]{border-bottom-left-radius:0;border-bottom-right-radius:0;transition:border-bottom-left-radius .3s var(--rm-ease-out) .28s,border-bottom-right-radius .3s var(--rm-ease-out) .28s,transform var(--rm-dur) var(--rm-ease-out),box-shadow var(--rm-dur) var(--rm-ease-out)}.robotmia-widget:not(.robotmia-open) .robotmia-oval[data-v-5d4efa07]:hover{transform:translateY(-2px);box-shadow:0 8px 18px #00000024,0 16px 36px #0003}:host([data-gradient="true"]) .robotmia-oval[data-v-5d4efa07]{background:linear-gradient(90deg,var(--primary-color-gradient-start),var(--primary-color-gradient-end))}.robotmia-oval.robotmia-mobile-closed[data-v-5d4efa07]{width:var(--rm-launcher-h);height:var(--rm-launcher-h);border-radius:50%;background:var(--primary-color);box-shadow:var(--rm-shadow-launcher);padding:0;display:flex;align-items:center;justify-content:center}:host([data-gradient="true"]) .robotmia-oval.robotmia-mobile-closed[data-v-5d4efa07]{background:linear-gradient(90deg,var(--primary-color-gradient-start),var(--primary-color-gradient-end))}.robotmia-oval.robotmia-mobile-closed .robotmia-oval-text[data-v-5d4efa07]{display:none}.robotmia-oval.robotmia-mobile-closed .robotmia-oval-icon[data-v-5d4efa07]{margin:0}.robotmia-oval-text[data-v-5d4efa07]{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}.robotmia-oval-text-lines[data-v-5d4efa07]{display:flex;flex-direction:column;min-width:0;overflow:hidden}.robotmia-title[data-v-5d4efa07]{font-weight:700;font-size:17px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.robotmia-subtitle[data-v-5d4efa07]{font-size:12px;opacity:.9;color:#fff!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.robotmia-role[data-v-5d4efa07]{font-size:13px}.robotmia-oval-icon[data-v-5d4efa07]{width:40px;height:40px;background:#fff;color:var(--primary-color);border-radius:50%;display:flex;align-items:center;justify-content:center;padding:8px;transition:opacity var(--rm-dur) var(--rm-ease-out)}.robotmia-oval-icon.robotmia-has-logo[data-v-5d4efa07]{width:50px;height:50px;background:none;padding:0}.robotmia-logo-svg[data-v-5d4efa07]{border-radius:50%}.robotmia-chat[data-v-5d4efa07]{position:absolute;top:var(--rm-overlap);right:0;width:100%;height:var(--rm-chat-h);background:#fff;border-radius:0 0 var(--rm-radius-window) var(--rm-radius-window);box-shadow:var(--rm-shadow-panel);overflow:hidden;transform-origin:bottom center;z-index:2;display:flex;flex-direction:column;pointer-events:auto}.robotmia-grow-down-enter-active[data-v-5d4efa07]{transition:transform var(--rm-dur-lg) var(--rm-ease-out),opacity var(--rm-dur) var(--rm-ease-out)}.robotmia-grow-down-leave-active[data-v-5d4efa07]{transition:transform var(--rm-dur) var(--rm-ease-in),opacity var(--rm-dur) var(--rm-ease-in)}.robotmia-grow-down-enter-from[data-v-5d4efa07],.robotmia-grow-down-leave-to[data-v-5d4efa07]{transform:scaleY(.9);opacity:0}.robotmia-messages[data-v-5d4efa07]{padding:var(--rm-space-4);flex:1 1 0;min-height:0;overflow-y:auto;margin-top:var(--rm-overlap)}.robotmia-history-loader[data-v-5d4efa07]{display:flex;justify-content:center;align-items:center;padding:6px 0 10px}.robotmia-history-spinner[data-v-5d4efa07]{width:18px;height:18px;border-radius:50%;border:2px solid rgba(127,127,127,.25);border-top-color:var(--primary-color);animation:robotmia-spin-5d4efa07 .7s linear infinite}@keyframes robotmia-spin-5d4efa07{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.robotmia-history-spinner[data-v-5d4efa07]{animation-duration:1.6s}}.robotmia-info[data-v-5d4efa07]{text-align:center;color:var(--primary-color);font-size:13px;margin-bottom:12px;animation:fadeIn-5d4efa07 var(--rm-dur) var(--rm-ease-out) both}.robotmia-message[data-v-5d4efa07]{margin-bottom:10px;max-width:100%;overflow:hidden;animation:fadeIn-5d4efa07 var(--rm-dur) var(--rm-ease-out) both}.robotmia-message.robotmia-user[data-v-5d4efa07]{text-align:right}.robotmia-message.robotmia-user .robotmia-bubble[data-v-5d4efa07]{background:var(--primary-color);color:var(--rm-on-primary);display:inline-block;padding:8px 10px;border-radius:var(--rm-radius-md);font-size:15px}.robotmia-message.robotmia-operator .robotmia-name[data-v-5d4efa07]{font-weight:600;color:var(--primary-color);font-size:13px}@supports (color: color-mix(in srgb,red,black 30%)){.robotmia-message.robotmia-operator .robotmia-name[data-v-5d4efa07]{color:color-mix(in srgb,var(--primary-color),black 30%)}}.robotmia-message.robotmia-operator .robotmia-tag[data-v-5d4efa07]{background:#0000000f;color:var(--primary-color);font-size:11px;padding:2px 5px;border-radius:var(--rm-radius-xs)}@supports (background: color-mix(in srgb,red,white 90%)){.robotmia-message.robotmia-operator .robotmia-tag[data-v-5d4efa07]{background:color-mix(in srgb,var(--primary-color),white 90%)}}.robotmia-message.robotmia-operator .robotmia-bubble.robotmia-outlined[data-v-5d4efa07]{border:1px solid var(--primary-color);border-radius:var(--rm-radius-md);padding:8px 10px;margin-top:4px;display:inline-block;font-size:15px;background:#fff;color:var(--primary-color)}.robotmia-reply[data-v-5d4efa07]{display:flex;flex-direction:column;gap:1px;width:fit-content;max-width:100%;text-align:left;padding:4px 8px;margin-bottom:3px;border-left:3px solid var(--primary-color);border-radius:var(--rm-radius-xs);background:#0000000d;overflow:hidden}.robotmia-message.robotmia-user .robotmia-reply[data-v-5d4efa07]{margin-left:auto}@supports (background: color-mix(in srgb,red,white 90%)){.robotmia-reply[data-v-5d4efa07]{background:color-mix(in srgb,var(--primary-color),white 88%)}}.robotmia-reply-author[data-v-5d4efa07]{font-size:12px;font-weight:600;color:var(--primary-color);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.robotmia-reply-text[data-v-5d4efa07]{font-size:12px;color:#0000008c;line-height:1.3;max-width:220px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.robotmia-message.robotmia-operator .robotmia-bubble.robotmia-outlined.robotmia-keyboard-bubble[data-v-5d4efa07]{width:100%;max-width:100%;text-align:center;margin-left:0;margin-right:0;display:block}.robotmia-widget-keyboard[data-v-5d4efa07]{display:flex;flex-direction:column;gap:8px;width:100%;margin-top:10px}.robotmia-widget-keyboard-row[data-v-5d4efa07]{display:flex;gap:8px;width:100%}.robotmia-widget-keyboard-btn[data-v-5d4efa07]{flex:1 1 0;padding:10px 12px;border-radius:var(--rm-radius-md);border:1px solid var(--primary-color);background:#fff;color:var(--primary-color);font-weight:600;cursor:pointer;transition:transform .12s ease,background-color .12s ease,color .12s ease}.robotmia-widget-keyboard-btn[data-v-5d4efa07]:active{transform:scale(.99)}.robotmia-widget-keyboard-btn[data-v-5d4efa07]:disabled{opacity:.55;cursor:default}@supports (border-color: color-mix(in srgb,red,white 70%)){.robotmia-message.robotmia-operator .robotmia-bubble.robotmia-outlined[data-v-5d4efa07]{border:1px solid color-mix(in srgb,var(--primary-color),white 70%)}}.robotmia-bubble[data-v-5d4efa07]{word-break:break-word;white-space:pre-wrap}.robotmia-bubble a[data-v-5d4efa07]{color:inherit;text-decoration:underline}.robotmia-time[data-v-5d4efa07]{font-size:11px;color:var(--primary-color);margin-left:6px}@supports (color: color-mix(in srgb,red,white 50%)){.robotmia-time[data-v-5d4efa07]{color:color-mix(in srgb,var(--primary-color),black 20%)}}.robotmia-time.robotmia-small[data-v-5d4efa07]{display:block;text-align:right;margin-top:4px}.robotmia-userTime[data-v-5d4efa07]{display:flex!important;align-items:center;justify-content:end}.robotmia-divider[data-v-5d4efa07]{height:1px;background:#f2f2f2;margin:0 12px;flex-shrink:0}@supports (background: color-mix(in srgb,red,white 90%)){.robotmia-divider[data-v-5d4efa07]{background:color-mix(in srgb,var(--primary-color),white 90%)}}.robotmia-chat-footer[data-v-5d4efa07]{flex:0 0 auto;min-height:110px;display:flex;flex-direction:column;justify-content:flex-end;flex-shrink:0;padding-bottom:6px}.robotmia-input-wrapper[data-v-5d4efa07]{position:relative;padding:6px 8px;background:#fff;flex-shrink:0}.robotmia-text-input[data-v-5d4efa07]{width:100%;max-height:100px;min-height:56px;resize:none;padding:8px 70px 0 12px;font-size:16px;color:var(--primary-color);outline:none;border:none;border-radius:var(--rm-radius-lg);overflow-y:auto;box-sizing:border-box;line-height:1.4}.robotmia-char-counter[data-v-5d4efa07]{position:absolute;bottom:12px;right:70px;font-size:11px;line-height:1;pointer-events:none;-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums}.robotmia-text-input[data-v-5d4efa07]:focus,.robotmia-text-input[data-v-5d4efa07]:focus-visible{outline:none}.robotmia-root button[data-v-5d4efa07]:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px;border-radius:var(--rm-radius-sm)}.robotmia-send-btn[data-v-5d4efa07]{position:absolute;right:25px;width:34px;height:34px;border:none;border-radius:50%;background:var(--primary-color);cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;top:15px;transition:background var(--rm-dur-micro) var(--rm-ease-out),transform var(--rm-dur-micro) var(--rm-ease-out)}.robotmia-send-btn[data-v-5d4efa07]:hover:not(:disabled){background:var(--primary-hover)}.robotmia-send-btn[data-v-5d4efa07]:active:not(:disabled){transform:scale(.92)}.robotmia-send-btn[data-v-5d4efa07]:disabled{background:#9e9e9e;opacity:.7;cursor:not-allowed}.robotmia-send-btn:disabled svg path[data-v-5d4efa07]{stroke:#e0e0e0}@media (max-width: 768px){.robotmia-control-btn[data-v-5d4efa07]{width:40px;height:40px;min-width:40px;min-height:40px}.robotmia-send-btn[data-v-5d4efa07]{width:40px;height:40px;top:12px}.robotmia-chip-remove[data-v-5d4efa07]{width:22px;height:22px;font-size:15px}.robotmia-attached-chip-image .robotmia-chip-remove[data-v-5d4efa07]{width:20px;height:20px}}.robotmia-extra-controls[data-v-5d4efa07]{display:flex;align-items:center;justify-content:flex-start;padding:0 12px 10px;flex-wrap:wrap;flex-shrink:0;min-height:44px}.robotmia-control-btn[data-v-5d4efa07]{width:34px;height:34px;min-width:34px;min-height:34px;border:none;border-radius:50%;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;position:relative}.robotmia-control-btn svg[data-v-5d4efa07]{width:20px;height:20px;flex-shrink:0}.robotmia-control-btn[data-v-5d4efa07]:hover{background-color:var(--primary-color)}@supports (background-color: color-mix(in srgb,red,white 95%)){.robotmia-control-btn[data-v-5d4efa07]:hover{background-color:color-mix(in srgb,var(--primary-color),white 95%)}}.robotmia-file-count[data-v-5d4efa07]{position:absolute;bottom:-2px;right:-4px;background:#ff4d4d;color:#fff;font-size:10px;width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;line-height:1}.robotmia-attached-chips[data-v-5d4efa07]{display:flex;gap:8px;align-items:flex-start;overflow-x:auto;padding:10px 12px 2px;flex-shrink:0;scrollbar-width:thin}.robotmia-attached-chip[data-v-5d4efa07]{position:relative;display:flex;align-items:center;gap:6px;flex:0 0 auto;max-width:170px;box-sizing:border-box;padding:6px 10px;border-radius:var(--rm-radius-md);background:#0000000d}.robotmia-attached-chip-image[data-v-5d4efa07]{width:56px;height:56px;padding:0;overflow:hidden;background:#0000000f}.robotmia-chip-thumb[data-v-5d4efa07]{width:100%;height:100%;object-fit:cover;display:block}.robotmia-chip-icon[data-v-5d4efa07]{display:flex;align-items:center;flex-shrink:0;color:var(--primary-color)}.robotmia-chip-name[data-v-5d4efa07]{font-size:12px;line-height:1.3;color:var(--primary-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}.robotmia-chip-remove[data-v-5d4efa07]{flex-shrink:0;width:18px;height:18px;border:none;border-radius:50%;background:#00000073;color:#fff;font-size:13px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:background var(--rm-dur-micro) var(--rm-ease-out)}.robotmia-chip-remove[data-v-5d4efa07]:hover{background:#000000a6}.robotmia-attached-chip-image .robotmia-chip-remove[data-v-5d4efa07]{position:absolute;top:3px;right:3px;width:16px;height:16px;font-size:11px}.robotmia-emoji-panel[data-v-5d4efa07]{position:absolute;bottom:60px;background:#fff;border-radius:var(--rm-radius-sm);padding:6px;box-shadow:0 8px 20px #00000026;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;width:180px;z-index:3}.robotmia-emoji[data-v-5d4efa07]{cursor:pointer;text-align:center;font-size:18px}.robotmia-messenger-panel[data-v-5d4efa07]{position:absolute;bottom:70px;right:0;background:#fff;border-radius:var(--rm-radius-xl);box-shadow:var(--rm-shadow-pop);z-index:1000;padding:10px;width:min(380px,calc(100vw - 2 * var(--rm-side)));max-width:380px;transition:all .3s ease;pointer-events:auto}.robotmia-chat-widget.robotmia-expanded .robotmia-messenger-panel[data-v-5d4efa07]{transition:none!important;opacity:0!important;pointer-events:none!important}.robotmia-chat-widget[data-position=left] .robotmia-messenger-panel[data-v-5d4efa07],.robotmia-chat-widget[data-position=center] .robotmia-messenger-panel[data-v-5d4efa07]{left:0;right:auto}.robotmia-chat-widget[data-position=left] .robotmia-messenger-panel.robotmia-mobile-mode[data-v-5d4efa07],.robotmia-chat-widget[data-position=center] .robotmia-messenger-panel.robotmia-mobile-mode[data-v-5d4efa07]{left:0;right:auto;transform:none}.robotmia-chat-widget[data-position=center] .robotmia-messenger-panel.robotmia-mobile-mode[data-v-5d4efa07]{left:calc(50% - 32.5px)}.robotmia-messenger-panel.robotmia-mobile-mode[data-v-5d4efa07]{display:flex;width:65px;border-radius:var(--rm-radius-xl);flex-direction:column;align-items:center;justify-content:start;padding:8px 0;bottom:calc(var(--rm-launcher-h) + 12px);z-index:1}.robotmia-messenger-panel.robotmia-mobile-mode[data-v-5d4efa07]{transition:height .3s ease}.robotmia-messenger-list[data-v-5d4efa07]{display:flex;flex-direction:column;gap:8px}.robotmia-messenger-panel.robotmia-mobile-mode .robotmia-messenger-list[data-v-5d4efa07]{flex-direction:column;align-items:center;gap:10px}.robotmia-messenger-item[data-v-5d4efa07]{display:flex;align-items:center;padding:10px 15px;border-radius:var(--rm-radius-lg);cursor:pointer;transition:background-color .2s ease;font-size:14px;gap:5%}.robotmia-messenger-item[data-v-5d4efa07]:hover{background-color:var(--primary-color);color:#fff}.robotmia-messenger-item:hover .robotmia-messenger-icon svg[data-v-5d4efa07]{fill:#fff}.robotmia-messenger-icon img[data-v-5d4efa07]{width:100%;height:100%;object-fit:contain}.robotmia-messenger-item:hover .robotmia-messenger-icon img[data-v-5d4efa07]:not([data-icon=max]){filter:brightness(0) invert(1)}.robotmia-messenger-item.robotmia-write-on-site[data-v-5d4efa07]{background-color:var(--primary-color);color:#fff}.robotmia-messenger-item.robotmia-write-on-site[data-v-5d4efa07]:hover{background-color:var(--primary-hover)}.robotmia-messenger-icon[data-v-5d4efa07]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.robotmia-messenger-icon svg[data-v-5d4efa07]{width:100%;height:100%;transition:fill .2s ease}.robotmia-messenger-panel.robotmia-mobile-mode .robotmia-messenger-item[data-v-5d4efa07]{width:44px;height:44px;padding:0;border-radius:50%;justify-content:center;transition:background-color var(--rm-dur-micro) var(--rm-ease-out),transform var(--rm-dur-micro) var(--rm-ease-out)}.robotmia-messenger-panel.robotmia-mobile-mode .robotmia-messenger-item[data-v-5d4efa07]:hover{background-color:#0000000f;color:inherit;transform:scale(1.06)}.robotmia-messenger-panel.robotmia-mobile-mode .robotmia-messenger-item:hover .robotmia-messenger-icon svg[data-v-5d4efa07]{fill:var(--primary-color)}.robotmia-messenger-panel.robotmia-mobile-mode .robotmia-messenger-item:hover .robotmia-messenger-icon img[data-v-5d4efa07]:not([data-icon=max]){filter:none}.robotmia-mobile-start-button[data-v-5d4efa07]{display:none;text-align:center;padding:10px;background:var(--primary-color);color:#fff;border-radius:var(--rm-radius-sm);font-size:14px;cursor:pointer;transition:background .2s ease}.robotmia-messenger-panel.robotmia-mobile-mode .robotmia-mobile-start-button[data-v-5d4efa07]{display:block;width:100%;text-align:center;padding:10px;margin-top:10px;background:var(--primary-color);color:#fff;border-radius:var(--rm-radius-sm);font-size:14px;cursor:pointer;transition:background .2s ease}.robotmia-launcher-overlay[data-v-5d4efa07]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10002;background:transparent;pointer-events:auto}.robotmia-launcher-overlay.robotmia-launcher-overlay-mobile[data-v-5d4efa07]{background:#00000059}.robotmia-launcher-panel[data-v-5d4efa07]{background:#fff;border-radius:var(--rm-radius-lg);box-shadow:0 12px 30px #0000002e;padding:14px;margin:8px}.robotmia-launcher-panel.robotmia-launcher-panel-mobile[data-v-5d4efa07]{position:fixed;top:0;right:0;bottom:0;left:0;margin:0;border-radius:0;padding:18px 14px;box-shadow:none}.robotmia-launcher-header[data-v-5d4efa07]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.robotmia-launcher-title[data-v-5d4efa07]{font-size:14px;font-weight:600;color:#111!important;line-height:1.3}.robotmia-launcher-close[data-v-5d4efa07]{background:none;border:none;cursor:pointer;color:#111!important;padding:0;width:32px;height:32px;border-radius:var(--rm-radius-md);display:flex;align-items:center;justify-content:center;flex-shrink:0}.robotmia-launcher-close[data-v-5d4efa07]:hover{background:#0000000f}.robotmia-launcher-close .robotmia-close-icon[data-v-5d4efa07]{stroke:currentColor}.robotmia-launcher-grid[data-v-5d4efa07]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.robotmia-launcher-panel.robotmia-launcher-panel-mobile .robotmia-launcher-grid[data-v-5d4efa07]{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.robotmia-launcher-list[data-v-5d4efa07]{display:flex;flex-direction:column;gap:0}.robotmia-launcher-row[data-v-5d4efa07]{display:flex;align-items:center;gap:12px;padding:12px 0;cursor:pointer;border-bottom:1px solid rgba(0,0,0,.08);transition:background-color .15s ease}.robotmia-launcher-row[data-v-5d4efa07]:last-of-type{border-bottom:none}.robotmia-launcher-row[data-v-5d4efa07]:hover{background-color:#00000008}.robotmia-launcher-row-icon[data-v-5d4efa07]{width:28px;height:28px;flex-shrink:0;display:flex;align-items:center;justify-content:center}.robotmia-launcher-row-icon img[data-v-5d4efa07]{width:100%;height:100%;object-fit:contain}.robotmia-launcher-row-label[data-v-5d4efa07]{font-size:14px;color:#111!important;font-weight:500}.robotmia-launcher-divider[data-v-5d4efa07]{height:1px;background:#0000001a;margin:8px 0 12px}.robotmia-launcher-primary-btn[data-v-5d4efa07]{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 16px;background:var(--primary-color);color:#fff!important;border:none;border-radius:var(--rm-radius-xl);font-size:15px;font-weight:600;cursor:pointer;transition:background-color .2s ease,transform .1s ease;box-sizing:border-box}.robotmia-launcher-primary-btn[data-v-5d4efa07]:hover{filter:brightness(1.06)}.robotmia-launcher-primary-btn[data-v-5d4efa07]:active{transform:scale(.98)}.robotmia-launcher-chat-icon[data-v-5d4efa07]{width:22px;height:22px;flex-shrink:0}.robotmia-launcher-item[data-v-5d4efa07]{border:1px solid rgba(0,0,0,.12);border-radius:var(--rm-radius-md);padding:12px 10px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:88px;transition:background-color .15s ease,border-color .15s ease}.robotmia-launcher-item[data-v-5d4efa07]:hover{border-color:#0000002e;background:#00000005}.robotmia-launcher-item-primary[data-v-5d4efa07]{border-color:#00000024}.robotmia-launcher-icon[data-v-5d4efa07]{width:34px;height:34px;display:flex;align-items:center;justify-content:center}.robotmia-launcher-icon img[data-v-5d4efa07]{width:100%;height:100%;object-fit:contain}.robotmia-launcher-label[data-v-5d4efa07]{font-size:12px;color:#111!important;text-align:center;line-height:1.2}@media (max-width: 480px){.robotmia-chat-widget.robotmia-expanded[data-v-5d4efa07]:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open){top:0;left:0;right:0;bottom:0;transform:translateY(var(--widget-window-offset-top, 0px));transition:transform .16s var(--rm-ease-out)}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-widget.robotmia-open[data-v-5d4efa07]{width:100vw;width:100dvw;height:100dvh;height:var(--widget-window-height, 100dvh);align-items:stretch;transition:none;animation:robotmia-mobile-fullscreen-in-5d4efa07 .38s var(--rm-ease-out);transform-origin:bottom center;will-change:transform,opacity}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-oval[data-v-5d4efa07]{border-radius:0;box-shadow:none;transition:none}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-widget:not(.robotmia-header-revealed) .robotmia-oval-icon[data-v-5d4efa07]{opacity:0}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-chat[data-v-5d4efa07]{top:var(--rm-launcher-h);left:0;right:0;height:calc(100dvh - var(--rm-launcher-h));height:calc(var(--widget-window-height, 100dvh) - var(--rm-launcher-h));border-radius:0;box-shadow:none}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-grow-down-enter-from[data-v-5d4efa07]{transform:none}.robotmia-chat-widget.robotmia-expanded[data-v-5d4efa07]:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-contact-form{top:var(--rm-launcher-h);left:0;right:0;height:calc(100dvh - var(--rm-launcher-h));height:calc(var(--widget-window-height, 100dvh) - var(--rm-launcher-h));border-radius:0;box-shadow:none}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-messages[data-v-5d4efa07]{margin-top:0}.robotmia-chat-widget.robotmia-expanded:not(.robotmia-separate-window-mobile):not(.robotmia-separate-window-mobile-open) .robotmia-chat-footer[data-v-5d4efa07]{padding-bottom:env(safe-area-inset-bottom,8px)}.robotmia-chat-widget:not(.robotmia-separate-window-mobile) .robotmia-widget[data-v-5d4efa07],.robotmia-chat-widget:not(.robotmia-separate-window-mobile) .robotmia-oval[data-v-5d4efa07]{transition:none}.robotmia-chat.robotmia-grow-down-leave-active[data-v-5d4efa07]{position:fixed;top:var(--rm-launcher-h);left:0;right:0;height:calc(var(--widget-window-height, 100dvh) - var(--rm-launcher-h));border-radius:0;transition:transform .24s var(--rm-ease-in),opacity .24s var(--rm-ease-in);z-index:4}.robotmia-chat.robotmia-grow-down-leave-to[data-v-5d4efa07]{transform:translateY(8%);opacity:0}}@keyframes robotmia-mobile-fullscreen-in-5d4efa07{0%{transform:translateY(6%) scale(.985);opacity:0}60%{opacity:1}to{transform:translateY(0) scale(1);opacity:1}}.robotmia-chat-widget.robotmia-separate-window-mobile-open[data-v-5d4efa07]{top:0;left:0;right:0;bottom:0;transform:translateY(var(--widget-window-offset-top, 0px))!important;transition:transform .16s var(--rm-ease-out)}.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-widget[data-v-5d4efa07]{width:100vw;height:var(--widget-window-height, 100vh);align-items:stretch;transition:none;animation:robotmia-mobile-fullscreen-in-5d4efa07 .38s var(--rm-ease-out);transform-origin:bottom center;will-change:transform,opacity}.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-oval[data-v-5d4efa07]{transition:none}.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-widget.robotmia-open[data-v-5d4efa07]{height:var(--widget-window-height, 100vh)}.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-back-btn[data-v-5d4efa07]{display:flex;top:10px;right:58px;left:auto;background:#fffffff2}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07]{top:0!important;left:0!important;right:0!important;bottom:0!important;width:100vw;height:var(--widget-window-height, 100vh);transform:translateY(var(--widget-window-offset-top, 0px))!important;transition:transform .16s var(--rm-ease-out)}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-widget[data-v-5d4efa07]{width:100vw;height:var(--widget-window-height, 100vh);align-items:stretch}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-widget.robotmia-open[data-v-5d4efa07]{height:var(--widget-window-height, 100vh)}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-oval[data-v-5d4efa07]{height:56px;border-radius:0;box-shadow:none;padding-right:54px;cursor:default}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-oval.robotmia-mobile-closed[data-v-5d4efa07]{width:100%;height:56px;border-radius:0;padding:10px 20px;justify-content:flex-start}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-oval.robotmia-mobile-closed .robotmia-oval-text[data-v-5d4efa07]{display:block}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-chat[data-v-5d4efa07]{top:56px;left:0;right:0;height:calc(var(--widget-window-height, 100vh) - 56px);border-radius:0;box-shadow:none}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-chat-footer[data-v-5d4efa07],.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-chat-footer[data-v-5d4efa07]{padding-bottom:env(safe-area-inset-bottom,8px)}.robotmia-chat-widget.robotmia-separate-window-mobile .robotmia-messages[data-v-5d4efa07],.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-messages[data-v-5d4efa07]{margin-top:0}.robotmia-chat-widget.robotmia-separate-window-mobile-open .robotmia-chat[data-v-5d4efa07]{border-radius:0}.robotmia-oval-mobile-close[data-v-5d4efa07]{position:absolute;right:10px;top:9px;width:38px;height:38px;border-radius:50%;background:#ffffff2e;border:none;color:#fff;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;transition:background var(--rm-dur-micro) var(--rm-ease-out)}.robotmia-oval-mobile-close[data-v-5d4efa07]:hover{background:#ffffff4d}.robotmia-oval-mobile-close .robotmia-close-icon[data-v-5d4efa07]{width:20px;height:20px;stroke:currentColor}.robotmia-mobile-start-button[data-v-5d4efa07]:hover{background:var(--primary-hover)}.robotmia-fade-enter-active[data-v-5d4efa07],.robotmia-fade-leave-active[data-v-5d4efa07]{transition:opacity .3s ease}.robotmia-fade-enter-active[data-v-5d4efa07],.robotmia-fade-leave-active[data-v-5d4efa07]{transition:opacity .2s ease}.robotmia-fade-enter-from[data-v-5d4efa07],.robotmia-fade-leave-to[data-v-5d4efa07]{opacity:0}.robotmia-fade-up-enter-active[data-v-5d4efa07]{transition:transform var(--rm-dur-lg) var(--rm-ease-out),opacity var(--rm-dur) var(--rm-ease-out);transform-origin:bottom left;will-change:transform,opacity}.robotmia-fade-up-leave-active[data-v-5d4efa07]{transition:transform var(--rm-dur) var(--rm-ease-in),opacity var(--rm-dur) var(--rm-ease-in);transform-origin:bottom left;will-change:transform,opacity}.robotmia-fade-up-enter-from[data-v-5d4efa07]{transform:translateY(100%);opacity:0}.robotmia-fade-up-enter-to[data-v-5d4efa07],.robotmia-fade-up-leave-from[data-v-5d4efa07]{transform:translateY(0);opacity:1}.robotmia-fade-up-leave-to[data-v-5d4efa07]{transform:translateY(100%);opacity:0}.robotmia-chat-widget.robotmia-instant .robotmia-widget[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-widget.robotmia-open[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-oval[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-oval-icon[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-header-close[data-v-5d4efa07]{transition:none!important;animation:none!important}.robotmia-chat-widget.robotmia-instant .robotmia-grow-down-enter-active[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-grow-down-leave-active[data-v-5d4efa07]{transition:none!important}.robotmia-chat-widget.robotmia-instant .robotmia-grow-down-enter-from[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-grow-down-leave-to[data-v-5d4efa07]{opacity:1!important;transform:none!important}.robotmia-chat-widget.robotmia-instant .robotmia-oval .robotmia-fade-enter-active[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-oval .robotmia-fade-leave-active[data-v-5d4efa07]{transition:none!important}.robotmia-chat-widget.robotmia-instant .robotmia-oval .robotmia-fade-enter-from[data-v-5d4efa07],.robotmia-chat-widget.robotmia-instant .robotmia-oval .robotmia-fade-leave-to[data-v-5d4efa07]{opacity:1!important}@media (prefers-reduced-motion: reduce){.robotmia-grow-down-enter-active[data-v-5d4efa07],.robotmia-grow-down-leave-active[data-v-5d4efa07],.robotmia-fade-up-enter-active[data-v-5d4efa07],.robotmia-fade-up-leave-active[data-v-5d4efa07],.robotmia-fade-enter-active[data-v-5d4efa07],.robotmia-fade-leave-active[data-v-5d4efa07]{transition-duration:.01ms!important;transition-timing-function:linear!important}.robotmia-grow-down-enter-from[data-v-5d4efa07],.robotmia-grow-down-leave-to[data-v-5d4efa07],.robotmia-fade-up-enter-from[data-v-5d4efa07],.robotmia-fade-up-leave-to[data-v-5d4efa07]{transform:none!important}.robotmia-widget[data-v-5d4efa07]{animation:none!important}.robotmia-resize-handle[data-v-5d4efa07]:after{transition:none!important}.robotmia-message[data-v-5d4efa07],.robotmia-info[data-v-5d4efa07]{animation:none!important}}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-contact-form{position:absolute;top:56px;left:0;right:0;width:100%;height:calc(var(--widget-window-height, 100vh) - 56px);min-height:0;border-radius:0;box-shadow:none;padding:16px 12px 20px;overflow-y:auto;box-sizing:border-box}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-contact-form .robotmia-operator-message{padding-top:8px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-contact-form .robotmia-message-bubble{max-width:100%}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-contact-form .robotmia-form-fields{width:100%}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-contact-form .robotmia-input-wrapper input{width:100%;box-sizing:border-box;font-size:16px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-contact-form .robotmia-start-chat-btn{width:100%;box-sizing:border-box}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-overlay{padding-top:5vh;align-items:flex-start}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-rating-menu{width:calc(100% - 24px);max-width:none;min-width:0;max-height:calc(var(--widget-window-height, 100vh) * .9 - 24px);border-radius:var(--rm-radius-md);padding:24px 20px 28px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-rating-menu .robotmia-title,.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-rating-menu .robotmia-description{font-size:18px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-rating-menu .robotmia-star{width:48px;height:48px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-rating-menu .robotmia-message{font-size:16px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-rating-menu .robotmia-btn{font-size:17px;padding:13.6px 28px}.robotmia-chat-widget.robotmia-separate-window-mobile[data-v-5d4efa07] .robotmia-confirm-box{width:calc(100% - 24px);max-width:none}')}();
var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n);!function(){"use strict";function e(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}const t={},n=[],i=()=>{},o=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith("onUpdate:"),a=Object.assign,l=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},c=Object.prototype.hasOwnProperty,u=(e,t)=>c.call(e,t),d=Array.isArray,h=e=>"[object Map]"===_(e),p=e=>"[object Set]"===_(e),f=e=>"[object Date]"===_(e),m=e=>"function"==typeof e,v=e=>"string"==typeof e,g=e=>"symbol"==typeof e,b=e=>null!==e&&"object"==typeof e,y=e=>(b(e)||m(e))&&m(e.then)&&m(e.catch),w=Object.prototype.toString,_=e=>w.call(e),C=e=>"[object Object]"===_(e),k=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,S=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),x=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},T=/-\w/g,L=x(e=>e.replace(T,e=>e.slice(1).toUpperCase())),E=/\B([A-Z])/g,I=x(e=>e.replace(E,"-$1").toLowerCase()),A=x(e=>e.charAt(0).toUpperCase()+e.slice(1)),P=x(e=>e?`on${A(e)}`:""),O=(e,t)=>!Object.is(e,t),M=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},R=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},D=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let $;const j=()=>$||($="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function U(e){if(d(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],o=v(i)?H(i):U(i);if(o)for(const e in o)t[e]=o[e]}return t}if(v(e)||b(e))return e}const N=/;(?![^(]*\))/g,B=/:([^]+)/,F=/\/\*[^]*?\*\//g;function H(e){const t={};return e.replace(F,"").split(N).forEach(e=>{if(e){const n=e.split(B);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function V(e){let t="";if(v(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){const i=V(e[n]);i&&(t+=i+" ")}else if(b(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const z=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function q(e){return!!e||""===e}function W(e,t){if(e===t)return!0;let n=f(e),i=f(t);if(n||i)return!(!n||!i)&&e.getTime()===t.getTime();if(n=g(e),i=g(t),n||i)return e===t;if(n=d(e),i=d(t),n||i)return!(!n||!i)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=W(e[i],t[i]);return n}(e,t);if(n=b(e),i=b(t),n||i){if(!n||!i)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const i=e.hasOwnProperty(n),o=t.hasOwnProperty(n);if(i&&!o||!i&&o||!W(e[n],t[n]))return!1}}return String(e)===String(t)}function J(e,t){return e.findIndex(e=>W(e,t))}const X=e=>!(!e||!0!==e.__v_isRef),Z=e=>v(e)?e:null==e?"":d(e)||b(e)&&(e.toString===w||!m(e.toString))?X(e)?Z(e.value):JSON.stringify(e,G,2):String(e),G=(e,t)=>X(t)?G(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],i)=>(e[K(t,i)+" =>"]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>K(e))}:g(t)?K(t):!b(t)||d(t)||C(t)?t:String(t),K=(e,t="")=>{var n;return g(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let Q,Y;class ee{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Q,!e&&Q&&(this.index=(Q.scopes||(Q.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=Q;try{return Q=this,e()}finally{Q=t}}}on(){1===++this._on&&(this.prevScope=Q,Q=this)}off(){this._on>0&&0===--this._on&&(Q=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}const te=new WeakSet;class ne{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Q&&Q.active&&Q.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,te.has(this)&&(te.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||se(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,ye(this),ce(this);const e=Y,t=me;Y=this,me=!0;try{return this.fn()}finally{ue(this),Y=e,me=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)pe(e);this.deps=this.depsTail=void 0,ye(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?te.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){de(this)&&this.run()}get dirty(){return de(this)}}let ie,oe,re=0;function se(e,t=!1){if(e.flags|=8,t)return e.next=oe,void(oe=e);e.next=ie,ie=e}function ae(){re++}function le(){if(--re>0)return;if(oe){let e=oe;for(oe=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ie;){let n=ie;for(ie=void 0;n;){const i=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(t){e||(e=t)}n=i}}if(e)throw e}function ce(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ue(e){let t,n=e.depsTail,i=n;for(;i;){const e=i.prevDep;-1===i.version?(i===n&&(n=e),pe(i),fe(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=e}e.deps=t,e.depsTail=n}function de(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(he(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function he(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===we)return;if(e.globalVersion=we,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!de(e)))return;e.flags|=2;const t=e.dep,n=Y,i=me;Y=e,me=!0;try{ce(e);const n=e.fn(e._value);(0===t.version||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(o){throw t.version++,o}finally{Y=n,me=i,ue(e),e.flags&=-3}}function pe(e,t=!1){const{dep:n,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)pe(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function fe(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let me=!0;const ve=[];function ge(){ve.push(me),me=!1}function be(){const e=ve.pop();me=void 0===e||e}function ye(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=Y;Y=void 0;try{t()}finally{Y=e}}}let we=0;class _e{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ce{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Y||!me||Y===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==Y)t=this.activeLink=new _e(Y,this),Y.deps?(t.prevDep=Y.depsTail,Y.depsTail.nextDep=t,Y.depsTail=t):Y.deps=Y.depsTail=t,ke(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Y.depsTail,t.nextDep=void 0,Y.depsTail.nextDep=t,Y.depsTail=t,Y.deps===t&&(Y.deps=e)}return t}trigger(e){this.version++,we++,this.notify(e)}notify(e){ae();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{le()}}}function ke(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ke(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Se=new WeakMap,xe=Symbol(""),Te=Symbol(""),Le=Symbol("");function Ee(e,t,n){if(me&&Y){let t=Se.get(e);t||Se.set(e,t=new Map);let i=t.get(n);i||(t.set(n,i=new Ce),i.map=t,i.key=n),i.track()}}function Ie(e,t,n,i,o,r){const s=Se.get(e);if(!s)return void we++;const a=e=>{e&&e.trigger()};if(ae(),"clear"===t)s.forEach(a);else{const o=d(e),r=o&&k(n);if(o&&"length"===n){const e=Number(i);s.forEach((t,n)=>{("length"===n||n===Le||!g(n)&&n>=e)&&a(t)})}else switch((void 0!==n||s.has(void 0))&&a(s.get(n)),r&&a(s.get(Le)),t){case"add":o?r&&a(s.get("length")):(a(s.get(xe)),h(e)&&a(s.get(Te)));break;case"delete":o||(a(s.get(xe)),h(e)&&a(s.get(Te)));break;case"set":h(e)&&a(s.get(xe))}}le()}function Ae(e){const t=ft(e);return t===e?t:(Ee(t,0,Le),ht(e)?t:t.map(mt))}function Pe(e){return Ee(e=ft(e),0,Le),e}function Oe(e,t){return dt(e)?vt(ut(e)?mt(t):t):mt(t)}const Me={__proto__:null,[Symbol.iterator](){return Re(this,Symbol.iterator,e=>Oe(this,e))},concat(...e){return Ae(this).concat(...e.map(e=>d(e)?Ae(e):e))},entries(){return Re(this,"entries",e=>(e[1]=Oe(this,e[1]),e))},every(e,t){return $e(this,"every",e,t,void 0,arguments)},filter(e,t){return $e(this,"filter",e,t,e=>e.map(e=>Oe(this,e)),arguments)},find(e,t){return $e(this,"find",e,t,e=>Oe(this,e),arguments)},findIndex(e,t){return $e(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return $e(this,"findLast",e,t,e=>Oe(this,e),arguments)},findLastIndex(e,t){return $e(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return $e(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ue(this,"includes",e)},indexOf(...e){return Ue(this,"indexOf",e)},join(e){return Ae(this).join(e)},lastIndexOf(...e){return Ue(this,"lastIndexOf",e)},map(e,t){return $e(this,"map",e,t,void 0,arguments)},pop(){return Ne(this,"pop")},push(...e){return Ne(this,"push",e)},reduce(e,...t){return je(this,"reduce",e,t)},reduceRight(e,...t){return je(this,"reduceRight",e,t)},shift(){return Ne(this,"shift")},some(e,t){return $e(this,"some",e,t,void 0,arguments)},splice(...e){return Ne(this,"splice",e)},toReversed(){return Ae(this).toReversed()},toSorted(e){return Ae(this).toSorted(e)},toSpliced(...e){return Ae(this).toSpliced(...e)},unshift(...e){return Ne(this,"unshift",e)},values(){return Re(this,"values",e=>Oe(this,e))}};function Re(e,t,n){const i=Pe(e),o=i[t]();return i===e||ht(e)||(o._next=o.next,o.next=()=>{const e=o._next();return e.done||(e.value=n(e.value)),e}),o}const De=Array.prototype;function $e(e,t,n,i,o,r){const s=Pe(e),a=s!==e&&!ht(e),l=s[t];if(l!==De[t]){const t=l.apply(e,r);return a?mt(t):t}let c=n;s!==e&&(a?c=function(t,i){return n.call(this,Oe(e,t),i,e)}:n.length>2&&(c=function(t,i){return n.call(this,t,i,e)}));const u=l.call(s,c,i);return a&&o?o(u):u}function je(e,t,n,i){const o=Pe(e);let r=n,s=!1;o!==e&&(o===e||ht(e)?n.length>3&&(r=function(t,i,o){return n.call(this,t,i,o,e)}):(s=0===i.length,r=function(t,i,o){return s&&(s=!1,t=Oe(e,t)),n.call(this,t,Oe(e,i),o,e)}));const a=o[t](r,...i);return s?Oe(e,a):a}function Ue(e,t,n){const i=ft(e);Ee(i,0,Le);const o=i[t](...n);return-1!==o&&!1!==o||!pt(n[0])?o:(n[0]=ft(n[0]),i[t](...n))}function Ne(e,t,n=[]){ge(),ae();const i=ft(e)[t].apply(e,n);return le(),be(),i}const Be=e("__proto__,__v_isRef,__isVue"),Fe=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(g));function He(e){g(e)||(e=String(e));const t=ft(this);return Ee(t,0,e),t.hasOwnProperty(e)}class Ve{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const i=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!i;if("__v_isReadonly"===t)return i;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(i?o?rt:ot:o?it:nt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=d(e);if(!i){let e;if(r&&(e=Me[t]))return e;if("hasOwnProperty"===t)return He}const s=Reflect.get(e,t,gt(e)?e:n);if(g(t)?Fe.has(t):Be(t))return s;if(i||Ee(e,0,t),o)return s;if(gt(s)){const e=r&&k(t)?s:s.value;return i&&b(e)?lt(e):e}return b(s)?i?lt(s):st(s):s}}class ze extends Ve{constructor(e=!1){super(!1,e)}set(e,t,n,i){let o=e[t];const r=d(e)&&k(t);if(!this._isShallow){const e=dt(o);if(ht(n)||dt(n)||(o=ft(o),n=ft(n)),!r&&gt(o)&&!gt(n))return e||(o.value=n),!0}const s=r?Number(t)<e.length:u(e,t),a=Reflect.set(e,t,n,gt(e)?e:i);return e===ft(i)&&(s?O(n,o)&&Ie(e,"set",t,n):Ie(e,"add",t,n)),a}deleteProperty(e,t){const n=u(e,t);e[t];const i=Reflect.deleteProperty(e,t);return i&&n&&Ie(e,"delete",t,void 0),i}has(e,t){const n=Reflect.has(e,t);return g(t)&&Fe.has(t)||Ee(e,0,t),n}ownKeys(e){return Ee(e,0,d(e)?"length":xe),Reflect.ownKeys(e)}}class qe extends Ve{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const We=new ze,Je=new qe,Xe=new ze(!0),Ze=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function Ke(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Qe(e,t){const n=function(e,t){const n={get(n){const i=this.__v_raw,o=ft(i),r=ft(n);e||(O(n,r)&&Ee(o,0,n),Ee(o,0,r));const{has:s}=Ge(o),a=t?Ze:e?vt:mt;return s.call(o,n)?a(i.get(n)):s.call(o,r)?a(i.get(r)):void(i!==o&&i.get(n))},get size(){const t=this.__v_raw;return!e&&Ee(ft(t),0,xe),t.size},has(t){const n=this.__v_raw,i=ft(n),o=ft(t);return e||(O(t,o)&&Ee(i,0,t),Ee(i,0,o)),t===o?n.has(t):n.has(t)||n.has(o)},forEach(n,i){const o=this,r=o.__v_raw,s=t?Ze:e?vt:mt;return!e&&Ee(ft(r),0,xe),r.forEach((e,t)=>n.call(i,s(e),s(t),o))}};return a(n,e?{add:Ke("add"),set:Ke("set"),delete:Ke("delete"),clear:Ke("clear")}:{add(e){const n=ft(this),i=Ge(n),o=ft(e),r=t||ht(e)||dt(e)?e:o;return i.has.call(n,r)||O(e,r)&&i.has.call(n,e)||O(o,r)&&i.has.call(n,o)||(n.add(r),Ie(n,"add",r,r)),this},set(e,n){t||ht(n)||dt(n)||(n=ft(n));const i=ft(this),{has:o,get:r}=Ge(i);let s=o.call(i,e);s||(e=ft(e),s=o.call(i,e));const a=r.call(i,e);return i.set(e,n),s?O(n,a)&&Ie(i,"set",e,n):Ie(i,"add",e,n),this},delete(e){const t=ft(this),{has:n,get:i}=Ge(t);let o=n.call(t,e);o||(e=ft(e),o=n.call(t,e)),i&&i.call(t,e);const r=t.delete(e);return o&&Ie(t,"delete",e,void 0),r},clear(){const e=ft(this),t=0!==e.size,n=e.clear();return t&&Ie(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=function(e,t,n){return function(...i){const o=this.__v_raw,r=ft(o),s=h(r),l="entries"===e||e===Symbol.iterator&&s,c="keys"===e&&s,u=o[e](...i),d=n?Ze:t?vt:mt;return!t&&Ee(r,0,c?Te:xe),a(Object.create(u),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:l?[d(e[0]),d(e[1])]:d(e),done:t}}})}}(i,e,t)}),n}(e,t);return(t,i,o)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(u(n,i)&&i in t?n:t,i,o)}const Ye={get:Qe(!1,!1)},et={get:Qe(!1,!0)},tt={get:Qe(!0,!1)},nt=new WeakMap,it=new WeakMap,ot=new WeakMap,rt=new WeakMap;function st(e){return dt(e)?e:ct(e,!1,We,Ye,nt)}function at(e){return ct(e,!1,Xe,et,it)}function lt(e){return ct(e,!0,Je,tt,ot)}function ct(e,t,n,i,o){if(!b(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=(s=e).__v_skip||!Object.isExtensible(s)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>_(e).slice(8,-1))(s));var s;if(0===r)return e;const a=o.get(e);if(a)return a;const l=new Proxy(e,2===r?i:n);return o.set(e,l),l}function ut(e){return dt(e)?ut(e.__v_raw):!(!e||!e.__v_isReactive)}function dt(e){return!(!e||!e.__v_isReadonly)}function ht(e){return!(!e||!e.__v_isShallow)}function pt(e){return!!e&&!!e.__v_raw}function ft(e){const t=e&&e.__v_raw;return t?ft(t):e}const mt=e=>b(e)?st(e):e,vt=e=>b(e)?lt(e):e;function gt(e){return!!e&&!0===e.__v_isRef}function bt(e){return gt(t=e)?t:new yt(t,!1);var t}class yt{constructor(e,t){this.dep=new Ce,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ft(e),this._value=t?e:mt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||ht(e)||dt(e);O(e=n?e:ft(e),t)&&(this._rawValue=e,this._value=n?e:mt(e),this.dep.trigger())}}function wt(e){return gt(e)?e.value:e}const _t={get:(e,t,n)=>"__v_raw"===t?e:wt(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return gt(o)&&!gt(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function Ct(e){return ut(e)?e:new Proxy(e,_t)}class kt{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ce(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=we-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&Y!==this)return se(this,!0),!0}get value(){const e=this.dep.track();return he(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function St(e,t,n=!1){let i,o;return m(e)?i=e:(i=e.get,o=e.set),new kt(i,o,n)}const xt={},Tt=new WeakMap;let Lt;function Et(e,t=1/0,n){if(t<=0||!b(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,gt(e))Et(e.value,t,n);else if(d(e))for(let i=0;i<e.length;i++)Et(e[i],t,n);else if(p(e)||h(e))e.forEach(e=>{Et(e,t,n)});else if(C(e)){for(const i in e)Et(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Et(e[i],t,n)}return e}function It(e,t,n,i){try{return i?e(...i):e()}catch(o){Pt(o,t,n)}}function At(e,t,n,i){if(m(e)){const o=It(e,t,n,i);return o&&y(o)&&o.catch(e=>{Pt(e,t,n)}),o}if(d(e)){const o=[];for(let r=0;r<e.length;r++)o.push(At(e[r],t,n,i));return o}}function Pt(e,n,i,o=!0){n&&n.vnode;const{errorHandler:r,throwUnhandledErrorInProduction:s}=n&&n.appContext.config||t;if(n){let t=n.parent;const o=n.proxy,s=`https://vuejs.org/error-reference/#runtime-${i}`;for(;t;){const n=t.ec;if(n)for(let t=0;t<n.length;t++)if(!1===n[t](e,o,s))return;t=t.parent}if(r)return ge(),It(r,null,10,[e,o,s]),void be()}!function(e,t,n,i=!0,o=!1){if(o)throw e;console.error(e)}(e,0,0,o,s)}const Ot=[];let Mt=-1;const Rt=[];let Dt=null,$t=0;const jt=Promise.resolve();let Ut=null;function Nt(e){const t=Ut||jt;return e?t.then(this?e.bind(this):e):t}function Bt(e){if(!(1&e.flags)){const t=zt(e),n=Ot[Ot.length-1];!n||!(2&e.flags)&&t>=zt(n)?Ot.push(e):Ot.splice(function(e){let t=Mt+1,n=Ot.length;for(;t<n;){const i=t+n>>>1,o=Ot[i],r=zt(o);r<e||r===e&&2&o.flags?t=i+1:n=i}return t}(t),0,e),e.flags|=1,Ft()}}function Ft(){Ut||(Ut=jt.then(qt))}function Ht(e,t,n=Mt+1){for(;n<Ot.length;n++){const t=Ot[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;Ot.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function Vt(e){if(Rt.length){const e=[...new Set(Rt)].sort((e,t)=>zt(e)-zt(t));if(Rt.length=0,Dt)return void Dt.push(...e);for(Dt=e,$t=0;$t<Dt.length;$t++){const e=Dt[$t];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}Dt=null,$t=0}}const zt=e=>null==e.id?2&e.flags?-1:1/0:e.id;function qt(e){try{for(Mt=0;Mt<Ot.length;Mt++){const e=Ot[Mt];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),It(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;Mt<Ot.length;Mt++){const e=Ot[Mt];e&&(e.flags&=-2)}Mt=-1,Ot.length=0,Vt(),Ut=null,(Ot.length||Rt.length)&&qt()}}let Wt=null,Jt=null;function Xt(e){const t=Wt;return Wt=e,Jt=e&&e.type.__scopeId||null,t}function Zt(e,t=Wt,n){if(!t)return e;if(e._n)return e;const i=(...n)=>{i._d&&Ki(-1);const o=Xt(t);let r;try{r=e(...n)}finally{Xt(o),i._d&&Ki(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Gt(e,n){if(null===Wt)return e;const i=Eo(Wt),o=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[e,s,a,l=t]=n[r];e&&(m(e)&&(e={mounted:e,updated:e}),e.deep&&Et(s),o.push({dir:e,instance:i,value:s,oldValue:void 0,arg:a,modifiers:l}))}return e}function Kt(e,t,n,i){const o=e.dirs,r=t&&t.dirs;for(let s=0;s<o.length;s++){const a=o[s];r&&(a.oldValue=r[s].value);let l=a.dir[i];l&&(ge(),At(l,n,8,[e.el,a,e,t]),be())}}function Qt(e,t,n=!1){const i=bo();if(i||ui){let o=ui?ui._context.provides:i?null==i.parent||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&m(t)?t.call(i&&i.proxy):t}}const Yt=Symbol.for("v-scx");function en(e,t,n){return tn(e,t,n)}function tn(e,n,o=t){const{immediate:r,deep:s,flush:c,once:u}=o,h=a({},o),p=n&&r||!n&&"post"!==c;let f;if(So)if("sync"===c){const e=Qt(Yt);f=e.__watcherHandles||(e.__watcherHandles=[])}else if(!p){const e=()=>{};return e.stop=i,e.resume=i,e.pause=i,e}const v=go;h.call=(e,t,n)=>At(e,v,t,n);let g=!1;"post"===c?h.scheduler=e=>{Ri(e,v&&v.suspense)}:"sync"!==c&&(g=!0,h.scheduler=(e,t)=>{t?e():Bt(e)}),h.augmentJob=e=>{n&&(e.flags|=4),g&&(e.flags|=2,v&&(e.id=v.uid,e.i=v))};const b=function(e,n,o=t){const{immediate:r,deep:s,once:a,scheduler:c,augmentJob:u,call:h}=o,p=e=>s?e:ht(e)||!1===s||0===s?Et(e,1):Et(e);let f,v,g,b,y=!1,w=!1;if(gt(e)?(v=()=>e.value,y=ht(e)):ut(e)?(v=()=>p(e),y=!0):d(e)?(w=!0,y=e.some(e=>ut(e)||ht(e)),v=()=>e.map(e=>gt(e)?e.value:ut(e)?p(e):m(e)?h?h(e,2):e():void 0)):v=m(e)?n?h?()=>h(e,2):e:()=>{if(g){ge();try{g()}finally{be()}}const t=Lt;Lt=f;try{return h?h(e,3,[b]):e(b)}finally{Lt=t}}:i,n&&s){const e=v,t=!0===s?1/0:s;v=()=>Et(e(),t)}const _=Q,C=()=>{f.stop(),_&&_.active&&l(_.effects,f)};if(a&&n){const e=n;n=(...t)=>{e(...t),C()}}let k=w?new Array(e.length).fill(xt):xt;const S=e=>{if(1&f.flags&&(f.dirty||e))if(n){const e=f.run();if(s||y||(w?e.some((e,t)=>O(e,k[t])):O(e,k))){g&&g();const t=Lt;Lt=f;try{const t=[e,k===xt?void 0:w&&k[0]===xt?[]:k,b];k=e,h?h(n,3,t):n(...t)}finally{Lt=t}}}else f.run()};return u&&u(S),f=new ne(v),f.scheduler=c?()=>c(S,!1):S,b=e=>function(e,t=!1,n=Lt){if(n){let t=Tt.get(n);t||Tt.set(n,t=[]),t.push(e)}}(e,!1,f),g=f.onStop=()=>{const e=Tt.get(f);if(e){if(h)h(e,4);else for(const t of e)t();Tt.delete(f)}},n?r?S(!0):k=f.run():c?c(S.bind(null,!0),!0):f.run(),C.pause=f.pause.bind(f),C.resume=f.resume.bind(f),C.stop=C,C}(e,n,h);return So&&(f?f.push(b):p&&b()),b}function nn(e,t,n){const i=this.proxy,o=v(e)?e.includes(".")?on(i,e):()=>i[e]:e.bind(i,i);let r;m(t)?r=t:(r=t.handler,n=t);const s=_o(this),a=tn(o,r.bind(i),n);return s(),a}function on(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const rn=Symbol("_vte"),sn=e=>e.__isTeleport,an=Symbol("_leaveCb"),ln=Symbol("_enterCb"),cn=[Function,Array],un={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cn,onEnter:cn,onAfterEnter:cn,onEnterCancelled:cn,onBeforeLeave:cn,onLeave:cn,onAfterLeave:cn,onLeaveCancelled:cn,onBeforeAppear:cn,onAppear:cn,onAfterAppear:cn,onAppearCancelled:cn},dn=e=>{const t=e.subTree;return t.component?dn(t.component):t};function hn(e){let t=e[0];if(e.length>1)for(const n of e)if(n.type!==qi){t=n;break}return t}const pn={name:"BaseTransition",props:un,setup(e,{slots:t}){const n=bo(),i=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Rn(()=>{e.isMounted=!0}),jn(()=>{e.isUnmounting=!0}),e}();return()=>{const o=t.default&&yn(t.default(),!0);if(!o||!o.length)return;const r=hn(o),s=ft(e),{mode:a}=s;if(i.isLeaving)return vn(r);const l=gn(r);if(!l)return vn(r);let c=mn(l,s,i,n,e=>c=e);l.type!==qi&&bn(l,c);let u=n.subTree&&gn(n.subTree);if(u&&u.type!==qi&&!no(u,l)&&dn(n).type!==qi){let e=mn(u,s,i,n);if(bn(u,e),"out-in"===a&&l.type!==qi)return i.isLeaving=!0,e.afterLeave=()=>{i.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,u=void 0},vn(r);"in-out"===a&&l.type!==qi?e.delayLeave=(e,t,n)=>{fn(i,u)[String(u.key)]=u,e[an]=()=>{t(),e[an]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{n(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function fn(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function mn(e,t,n,i,o){const{appear:r,mode:s,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:p,onLeave:f,onAfterLeave:m,onLeaveCancelled:v,onBeforeAppear:g,onAppear:b,onAfterAppear:y,onAppearCancelled:w}=t,_=String(e.key),C=fn(n,e),k=(e,t)=>{e&&At(e,i,9,t)},S=(e,t)=>{const n=t[1];k(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},x={mode:s,persisted:a,beforeEnter(t){let i=l;if(!n.isMounted){if(!r)return;i=g||l}t[an]&&t[an](!0);const o=C[_];o&&no(e,o)&&o.el[an]&&o.el[an](),k(i,[t])},enter(t){if(C[_]===e)return;let i=c,o=u,s=h;if(!n.isMounted){if(!r)return;i=b||c,o=y||u,s=w||h}let a=!1;t[ln]=e=>{a||(a=!0,k(e?s:o,[t]),x.delayedLeave&&x.delayedLeave(),t[ln]=void 0)};const l=t[ln].bind(null,!1);i?S(i,[t,l]):l()},leave(t,i){const o=String(e.key);if(t[ln]&&t[ln](!0),n.isUnmounting)return i();k(p,[t]);let r=!1;t[an]=n=>{r||(r=!0,i(),k(n?v:m,[t]),t[an]=void 0,C[o]===e&&delete C[o])};const s=t[an].bind(null,!1);C[o]=e,f?S(f,[t,s]):s()},clone(e){const r=mn(e,t,n,i,o);return o&&o(r),r}};return x}function vn(e){if(Tn(e))return(e=ao(e)).children=null,e}function gn(e){if(!Tn(e))return sn(e.type)&&e.children?hn(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&m(n.default))return n.default()}}function bn(e,t){6&e.shapeFlag&&e.component?(e.transition=t,bn(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function yn(e,t=!1,n){let i=[],o=0;for(let r=0;r<e.length;r++){let s=e[r];const a=null==n?s.key:String(n)+String(null!=s.key?s.key:r);s.type===Vi?(128&s.patchFlag&&o++,i=i.concat(yn(s.children,t,a))):(t||s.type!==qi)&&i.push(null!=a?ao(s,{key:a}):s)}if(o>1)for(let r=0;r<i.length;r++)i[r].patchFlag=-2;return i}function wn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function _n(e,t){let n;return!(!(n=Object.getOwnPropertyDescriptor(e,t))||n.configurable)}const Cn=new WeakMap;function kn(e,n,i,r,s=!1){if(d(e))return void e.forEach((e,t)=>kn(e,n&&(d(n)?n[t]:n),i,r,s));if(xn(r)&&!s)return void(512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&kn(e,n,i,r.component.subTree));const a=4&r.shapeFlag?Eo(r.component):r.el,c=s?null:a,{i:h,r:p}=e,f=n&&n.r,g=h.refs===t?h.refs={}:h.refs,b=h.setupState,y=ft(b),w=b===t?o:e=>!_n(g,e)&&u(y,e),_=(e,t)=>!t||!_n(g,t);if(null!=f&&f!==p)if(Sn(n),v(f))g[f]=null,w(f)&&(b[f]=null);else if(gt(f)){const e=n;_(0,e.k)&&(f.value=null),e.k&&(g[e.k]=null)}if(m(p))It(p,h,12,[c,g]);else{const t=v(p),n=gt(p);if(t||n){const o=()=>{if(e.f){const n=t?w(p)?b[p]:g[p]:_()||!e.k?p.value:g[e.k];if(s)d(n)&&l(n,a);else if(d(n))n.includes(a)||n.push(a);else if(t)g[p]=[a],w(p)&&(b[p]=g[p]);else{const t=[a];_(0,e.k)&&(p.value=t),e.k&&(g[e.k]=t)}}else t?(g[p]=c,w(p)&&(b[p]=c)):n&&(_(0,e.k)&&(p.value=c),e.k&&(g[e.k]=c))};if(c){const t=()=>{o(),Cn.delete(e)};t.id=-1,Cn.set(e,t),Ri(t,i)}else Sn(e),o()}}}function Sn(e){const t=Cn.get(e);t&&(t.flags|=8,Cn.delete(e))}j().requestIdleCallback,j().cancelIdleCallback;const xn=e=>!!e.type.__asyncLoader,Tn=e=>e.type.__isKeepAlive;function Ln(e,t){In(e,"a",t)}function En(e,t){In(e,"da",t)}function In(e,t,n=go){const i=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Pn(t,i,n),n){let e=n.parent;for(;e&&e.parent;)Tn(e.parent.vnode)&&An(i,t,n,e),e=e.parent}}function An(e,t,n,i){const o=Pn(t,e,i,!0);Un(()=>{l(i[t],o)},n)}function Pn(e,t,n=go,i=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...i)=>{ge();const o=_o(n),r=At(t,n,e,i);return o(),be(),r});return i?o.unshift(r):o.push(r),r}}const On=e=>(t,n=go)=>{So&&"sp"!==e||Pn(e,(...e)=>t(...e),n)},Mn=On("bm"),Rn=On("m"),Dn=On("bu"),$n=On("u"),jn=On("bum"),Un=On("um"),Nn=On("sp"),Bn=On("rtg"),Fn=On("rtc");function Hn(e,t=go){Pn("ec",e,t)}const Vn=Symbol.for("v-ndc");function zn(e,t,n,i){let o;const r=n,s=d(e);if(s||v(e)){let n=!1,i=!1;s&&ut(e)&&(n=!ht(e),i=dt(e),e=Pe(e)),o=new Array(e.length);for(let s=0,a=e.length;s<a;s++)o[s]=t(n?i?vt(mt(e[s])):mt(e[s]):e[s],s,void 0,r)}else if("number"==typeof e){o=new Array(e);for(let n=0;n<e;n++)o[n]=t(n+1,n,void 0,r)}else if(b(e))if(e[Symbol.iterator])o=Array.from(e,(e,n)=>t(e,n,void 0,r));else{const n=Object.keys(e);o=new Array(n.length);for(let i=0,s=n.length;i<s;i++){const s=n[i];o[i]=t(e[s],s,i,r)}}else o=[];return o}const qn=e=>e?ko(e)?Eo(e):qn(e.parent):null,Wn=a(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=>qn(e.parent),$root:e=>qn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Yn(e),$forceUpdate:e=>e.f||(e.f=()=>{Bt(e.update)}),$nextTick:e=>e.n||(e.n=Nt.bind(e.proxy)),$watch:e=>nn.bind(e)}),Jn=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Xn={get({_:e},n){if("__v_skip"===n)return!0;const{ctx:i,setupState:o,data:r,props:s,accessCache:a,type:l,appContext:c}=e;if("$"!==n[0]){const e=a[n];if(void 0!==e)switch(e){case 1:return o[n];case 2:return r[n];case 4:return i[n];case 3:return s[n]}else{if(Jn(o,n))return a[n]=1,o[n];if(r!==t&&u(r,n))return a[n]=2,r[n];if(u(s,n))return a[n]=3,s[n];if(i!==t&&u(i,n))return a[n]=4,i[n];Gn&&(a[n]=0)}}const d=Wn[n];let h,p;return d?("$attrs"===n&&Ee(e.attrs,0,""),d(e)):(h=l.__cssModules)&&(h=h[n])?h:i!==t&&u(i,n)?(a[n]=4,i[n]):(p=c.config.globalProperties,u(p,n)?p[n]:void 0)},set({_:e},n,i){const{data:o,setupState:r,ctx:s}=e;return Jn(r,n)?(r[n]=i,!0):o!==t&&u(o,n)?(o[n]=i,!0):!(u(e.props,n)||"$"===n[0]&&n.slice(1)in e||(s[n]=i,0))},has({_:{data:e,setupState:n,accessCache:i,ctx:o,appContext:r,props:s,type:a}},l){let c;return!!(i[l]||e!==t&&"$"!==l[0]&&u(e,l)||Jn(n,l)||u(s,l)||u(o,l)||u(Wn,l)||u(r.config.globalProperties,l)||(c=a.__cssModules)&&c[l])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Zn(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let Gn=!0;function Kn(e,t,n){At(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qn(e,t,n,i){let o=i.includes(".")?on(n,i):()=>n[i];if(v(e)){const n=t[e];m(n)&&en(o,n)}else if(m(e))en(o,e.bind(n));else if(b(e))if(d(e))e.forEach(e=>Qn(e,t,n,i));else{const i=m(e.handler)?e.handler.bind(n):t[e.handler];m(i)&&en(o,i,e)}}function Yn(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,a=r.get(t);let l;return a?l=a:o.length||n||i?(l={},o.length&&o.forEach(e=>ei(l,e,s,!0)),ei(l,t,s)):l=t,b(t)&&r.set(t,l),l}function ei(e,t,n,i=!1){const{mixins:o,extends:r}=t;r&&ei(e,r,n,!0),o&&o.forEach(t=>ei(e,t,n,!0));for(const s in t)if(i&&"expose"===s);else{const i=ti[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const ti={data:ni,props:si,emits:si,methods:ri,computed:ri,beforeCreate:oi,created:oi,beforeMount:oi,mounted:oi,beforeUpdate:oi,updated:oi,beforeDestroy:oi,beforeUnmount:oi,destroyed:oi,unmounted:oi,activated:oi,deactivated:oi,errorCaptured:oi,serverPrefetch:oi,components:ri,directives:ri,watch:function(e,t){if(!e)return t;if(!t)return e;const n=a(Object.create(null),e);for(const i in t)n[i]=oi(e[i],t[i]);return n},provide:ni,inject:function(e,t){return ri(ii(e),ii(t))}};function ni(e,t){return t?e?function(){return a(m(e)?e.call(this,this):e,m(t)?t.call(this,this):t)}:t:e}function ii(e){if(d(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function oi(e,t){return e?[...new Set([].concat(e,t))]:t}function ri(e,t){return e?a(Object.create(null),e,t):t}function si(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:a(Object.create(null),Zn(e),Zn(null!=t?t:{})):t}function ai(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let li=0;function ci(e,t){return function(t,n=null){m(t)||(t=a({},t)),null==n||b(n)||(n=null);const i=ai(),o=new WeakSet,r=[];let s=!1;const l=i.app={_uid:li++,_component:t,_props:n,_container:null,_context:i,_instance:null,version:Ao,get config(){return i.config},set config(e){},use:(e,...t)=>(o.has(e)||(e&&m(e.install)?(o.add(e),e.install(l,...t)):m(e)&&(o.add(e),e(l,...t))),l),mixin:e=>(i.mixins.includes(e)||i.mixins.push(e),l),component:(e,t)=>t?(i.components[e]=t,l):i.components[e],directive:(e,t)=>t?(i.directives[e]=t,l):i.directives[e],mount(o,r,a){if(!s){const r=l._ceVNode||so(t,n);return r.appContext=i,!0===a?a="svg":!1===a&&(a=void 0),e(r,o,a),s=!0,l._container=o,o.__vue_app__=l,Eo(r.component)}},onUnmount(e){r.push(e)},unmount(){s&&(At(r,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(i.provides[e]=t,l),runWithContext(e){const t=ui;ui=l;try{return e()}finally{ui=t}}};return l}}let ui=null;function di(e,n,...i){if(e.isUnmounted)return;const o=e.vnode.props||t;let r=i;const s=n.startsWith("update:"),a=s&&((e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${L(t)}Modifiers`]||e[`${I(t)}Modifiers`])(o,n.slice(7));let l;a&&(a.trim&&(r=i.map(e=>v(e)?e.trim():e)),a.number&&(r=i.map(D)));let c=o[l=P(n)]||o[l=P(L(n))];!c&&s&&(c=o[l=P(I(n))]),c&&At(c,e,6,r);const u=o[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,At(u,e,6,r)}}const hi=new WeakMap;function pi(e,t,n=!1){const i=n?hi:t.emitsCache,o=i.get(e);if(void 0!==o)return o;const r=e.emits;let s={},l=!1;if(!m(e)){const i=e=>{const n=pi(e,t,!0);n&&(l=!0,a(s,n))};!n&&t.mixins.length&&t.mixins.forEach(i),e.extends&&i(e.extends),e.mixins&&e.mixins.forEach(i)}return r||l?(d(r)?r.forEach(e=>s[e]=null):a(s,r),b(e)&&i.set(e,s),s):(b(e)&&i.set(e,null),null)}function fi(e,t){return!(!e||!r(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,I(t))||u(e,t))}function mi(e){const{type:t,vnode:n,proxy:i,withProxy:o,propsOptions:[r],slots:a,attrs:l,emit:c,render:u,renderCache:d,props:h,data:p,setupState:f,ctx:m,inheritAttrs:v}=e,g=Xt(e);let b,y;try{if(4&n.shapeFlag){const e=o||i,t=e;b=uo(u.call(t,e,d,h,f,p,m)),y=l}else{const e=t;b=uo(e.length>1?e(h,{attrs:l,slots:a,emit:c}):e(h,null)),y=t.props?l:vi(l)}}catch(_){Ji.length=0,Pt(_,e,1),b=so(qi)}let w=b;if(y&&!1!==v){const e=Object.keys(y),{shapeFlag:t}=w;e.length&&7&t&&(r&&e.some(s)&&(y=gi(y,r)),w=ao(w,y,!1,!0))}return n.dirs&&(w=ao(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&bn(w,n.transition),b=w,Xt(g),b}const vi=e=>{let t;for(const n in e)("class"===n||"style"===n||r(n))&&((t||(t={}))[n]=e[n]);return t},gi=(e,t)=>{const n={};for(const i in e)s(i)&&i.slice(9)in t||(n[i]=e[i]);return n};function bi(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let o=0;o<i.length;o++){const r=i[o];if(yi(t,e,r)&&!fi(n,r))return!0}return!1}function yi(e,t,n){const i=e[n],o=t[n];return"style"===n&&b(i)&&b(o)?!W(i,o):i!==o}const wi={},_i=()=>Object.create(wi),Ci=e=>Object.getPrototypeOf(e)===wi;function ki(e,n,i,o){const[r,s]=e.propsOptions;let a,l=!1;if(n)for(let t in n){if(S(t))continue;const c=n[t];let d;r&&u(r,d=L(t))?s&&s.includes(d)?(a||(a={}))[d]=c:i[d]=c:fi(e.emitsOptions,t)||t in o&&c===o[t]||(o[t]=c,l=!0)}if(s){const n=ft(i),o=a||t;for(let t=0;t<s.length;t++){const a=s[t];i[a]=Si(r,n,a,o[a],e,!u(o,a))}}return l}function Si(e,t,n,i,o,r){const s=e[n];if(null!=s){const e=u(s,"default");if(e&&void 0===i){const e=s.default;if(s.type!==Function&&!s.skipFactory&&m(e)){const{propsDefaults:r}=o;if(n in r)i=r[n];else{const s=_o(o);i=r[n]=e.call(null,t),s()}}else i=e;o.ce&&o.ce._setProp(n,i)}s[0]&&(r&&!e?i=!1:!s[1]||""!==i&&i!==I(n)||(i=!0))}return i}const xi=new WeakMap;function Ti(e,i,o=!1){const r=o?xi:i.propsCache,s=r.get(e);if(s)return s;const l=e.props,c={},h=[];let p=!1;if(!m(e)){const t=e=>{p=!0;const[t,n]=Ti(e,i,!0);a(c,t),n&&h.push(...n)};!o&&i.mixins.length&&i.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!l&&!p)return b(e)&&r.set(e,n),n;if(d(l))for(let n=0;n<l.length;n++){const e=L(l[n]);Li(e)&&(c[e]=t)}else if(l)for(const t in l){const e=L(t);if(Li(e)){const n=l[t],i=c[e]=d(n)||m(n)?{type:n}:a({},n),o=i.type;let r=!1,s=!0;if(d(o))for(let e=0;e<o.length;++e){const t=o[e],n=m(t)&&t.name;if("Boolean"===n){r=!0;break}"String"===n&&(s=!1)}else r=m(o)&&"Boolean"===o.name;i[0]=r,i[1]=s,(r||u(i,"default"))&&h.push(e)}}const f=[c,h];return b(e)&&r.set(e,f),f}function Li(e){return"$"!==e[0]&&!S(e)}const Ei=e=>"_"===e||"_ctx"===e||"$stable"===e,Ii=e=>d(e)?e.map(uo):[uo(e)],Ai=(e,t,n)=>{if(t._n)return t;const i=Zt((...e)=>Ii(t(...e)),n);return i._c=!1,i},Pi=(e,t,n)=>{const i=e._ctx;for(const o in e){if(Ei(o))continue;const n=e[o];if(m(n))t[o]=Ai(0,n,i);else if(null!=n){const e=Ii(n);t[o]=()=>e}}},Oi=(e,t)=>{const n=Ii(t);e.slots.default=()=>n},Mi=(e,t,n)=>{for(const i in t)!n&&Ei(i)||(e[i]=t[i])},Ri=function(e,t){var n;t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):(d(n=e)?Rt.push(...n):Dt&&-1===n.id?Dt.splice($t+1,0,n):1&n.flags||(Rt.push(n),n.flags|=1),Ft())};function Di(e){return function(e){j().__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:a,createText:l,createComment:c,setText:d,setElementText:h,parentNode:p,nextSibling:f,setScopeId:m=i,insertStaticContent:v}=e,g=(e,t,n,i=null,o=null,r=null,s=void 0,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!no(e,t)&&(i=G(e),q(e,o,r,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case zi:b(e,t,n,i);break;case qi:w(e,t,n,i);break;case Wi:null==e&&_(t,n,i,s);break;case Vi:O(e,t,n,i,o,r,s,a,l);break;default:1&d?C(e,t,n,i,o,r,s,a,l):6&d?D(e,t,n,i,o,r,s,a,l):(64&d||128&d)&&c.process(e,t,n,i,o,r,s,a,l,Y)}null!=u&&o?kn(u,e&&e.ref,r,t||e,!t):null==u&&e&&null!=e.ref&&kn(e.ref,null,r,e,!0)},b=(e,t,n,i)=>{if(null==e)o(t.el=l(t.children),n,i);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},w=(e,t,n,i)=>{null==e?o(t.el=c(t.children||""),n,i):t.el=e.el},_=(e,t,n,i)=>{[e.el,e.anchor]=v(e.children,t,n,i,e.el,e.anchor)},C=(e,t,n,i,o,r,s,a,l)=>{if("svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e)k(t,n,i,o,r,s,a,l);else{const n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),E(e,t,o,r,s,a,l)}finally{n&&n._endPatch()}}},k=(e,t,n,i,r,l,c,u)=>{let d,p;const{props:f,shapeFlag:m,transition:v,dirs:g}=e;if(d=e.el=a(e.type,l,f&&f.is,f),8&m?h(d,e.children):16&m&&T(e.children,d,null,i,r,$i(e,l),c,u),g&&Kt(e,null,i,"created"),x(d,e,e.scopeId,c,i),f){for(const e in f)"value"===e||S(e)||s(d,e,null,f[e],l,i);"value"in f&&s(d,"value",null,f.value,l),(p=f.onVnodeBeforeMount)&&fo(p,i,e)}g&&Kt(e,null,i,"beforeMount");const b=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(r,v);b&&v.beforeEnter(d),o(d,t,n),((p=f&&f.onVnodeMounted)||b||g)&&Ri(()=>{try{p&&fo(p,i,e),b&&v.enter(d),g&&Kt(e,null,i,"mounted")}finally{}},r)},x=(e,t,n,i,o)=>{if(n&&m(e,n),i)for(let r=0;r<i.length;r++)m(e,i[r]);if(o){let n=o.subTree;if(t===n||Hi(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=o.vnode;x(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},T=(e,t,n,i,o,r,s,a,l=0)=>{for(let c=l;c<e.length;c++){const l=e[c]=a?ho(e[c]):uo(e[c]);g(null,l,t,n,i,o,r,s,a)}},E=(e,n,i,o,r,a,l)=>{const c=n.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=n;u|=16&e.patchFlag;const f=e.props||t,m=n.props||t;let v;if(i&&ji(i,!1),(v=m.onVnodeBeforeUpdate)&&fo(v,i,n,e),p&&Kt(n,e,i,"beforeUpdate"),i&&ji(i,!0),(f.innerHTML&&null==m.innerHTML||f.textContent&&null==m.textContent)&&h(c,""),d?A(e.dynamicChildren,d,c,i,o,$i(n,r),a):l||F(e,n,c,null,i,o,$i(n,r),a,!1),u>0){if(16&u)P(c,f,m,i,r);else if(2&u&&f.class!==m.class&&s(c,"class",null,m.class,r),4&u&&s(c,"style",f.style,m.style,r),8&u){const e=n.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t],o=f[n],a=m[n];a===o&&"value"!==n||s(c,n,o,a,r,i)}}1&u&&e.children!==n.children&&h(c,n.children)}else l||null!=d||P(c,f,m,i,r);((v=m.onVnodeUpdated)||p)&&Ri(()=>{v&&fo(v,i,n,e),p&&Kt(n,e,i,"updated")},o)},A=(e,t,n,i,o,r,s)=>{for(let a=0;a<t.length;a++){const l=e[a],c=t[a],u=l.el&&(l.type===Vi||!no(l,c)||198&l.shapeFlag)?p(l.el):n;g(l,c,u,null,i,o,r,s,!0)}},P=(e,n,i,o,r)=>{if(n!==i){if(n!==t)for(const t in n)S(t)||t in i||s(e,t,n[t],null,r,o);for(const t in i){if(S(t))continue;const a=i[t],l=n[t];a!==l&&"value"!==t&&s(e,t,l,a,r,o)}"value"in i&&s(e,"value",n.value,i.value,r)}},O=(e,t,n,i,r,s,a,c,u)=>{const d=t.el=e?e.el:l(""),h=t.anchor=e?e.anchor:l("");let{patchFlag:p,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(o(d,n,i),o(h,n,i),T(t.children||[],n,h,r,s,a,c,u)):p>0&&64&p&&f&&e.dynamicChildren&&e.dynamicChildren.length===f.length?(A(e.dynamicChildren,f,n,r,s,a,c),(null!=t.key||r&&t===r.subTree)&&Ui(e,t,!0)):F(e,t,n,h,r,s,a,c,u)},D=(e,t,n,i,o,r,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,n,i,s,l):$(t,n,i,o,r,s,l):U(e,t,l)},$=(e,n,i,o,r,s,a)=>{const l=e.component=function(e,n,i){const o=e.type,r=(n?n.appContext:e.appContext)||mo,s={uid:vo++,vnode:e,type:o,parent:n,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ee(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(r.provides),ids:n?n.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ti(o,r),emitsOptions:pi(o,r),emit:null,emitted:null,propsDefaults:t,inheritAttrs:o.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=n?n.root:s,s.emit=di.bind(null,s),e.ce&&e.ce(s),s}(e,o,r);if(Tn(e)&&(l.ctx.renderer=Y),function(e,t=!1,n=!1){t&&wo(t);const{props:i,children:o}=e.vnode,r=ko(e);(function(e,t,n,i=!1){const o={},r=_i();e.propsDefaults=Object.create(null),ki(e,t,o,r);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=i?o:at(o):e.type.props?e.props=o:e.props=r,e.attrs=r})(e,i,r,t),((e,t,n)=>{const i=e.slots=_i();if(32&e.vnode.shapeFlag){const e=t._;e?(Mi(i,t,n),n&&R(i,"_",e,!0)):Pi(t,i)}else t&&Oi(e,t)})(e,o,n||t);r&&function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xn);const{setup:i}=n;if(i){ge();const n=e.setupContext=i.length>1?function(e){return{attrs:new Proxy(e.attrs,Lo),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}(e):null,o=_o(e),r=It(i,e,0,[e.props,n]),s=y(r);if(be(),o(),!s&&!e.sp||xn(e)||wn(e),s){if(r.then(Co,Co),t)return r.then(t=>{xo(e,t)}).catch(t=>{Pt(t,e,0)});e.asyncDep=r}else xo(e,r)}else To(e)}(e,t);t&&wo(!1)}(l,!1,a),l.asyncDep){if(r&&r.registerDep(l,N,a),!e.el){const t=l.subTree=so(qi);w(null,t,n,i),e.placeholder=t.el}}else N(l,e,n,i,r,s,a)},U=(e,t,n)=>{const i=t.component=e.component;if(function(e,t,n){const{props:i,children:o,component:r}=e,{props:s,children:a,patchFlag:l}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!o&&!a||a&&a.$stable)||i!==s&&(i?!s||bi(i,s,c):!!s);if(1024&l)return!0;if(16&l)return i?bi(i,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(yi(s,i,n)&&!fi(c,n))return!0}}return!1}(e,t,n)){if(i.asyncDep&&!i.asyncResolved)return void B(i,t,n);i.next=t,i.update()}else t.el=e.el,i.vnode=t},N=(e,t,n,i,o,r,s)=>{e.scope.on();const a=e.effect=new ne(()=>{if(e.isMounted){let{next:t,bu:n,u:i,parent:a,vnode:c}=e;{const n=Ni(e);if(n)return t&&(t.el=c.el,B(e,t,s)),void n.asyncDep.then(()=>{Ri(()=>{e.isUnmounted||l()},o)})}let u,d=t;ji(e,!1),t?(t.el=c.el,B(e,t,s)):t=c,n&&M(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&fo(u,a,t,c),ji(e,!0);const h=mi(e),f=e.subTree;e.subTree=h,g(f,h,p(f.el),G(f),e,o,r),t.el=h.el,null===d&&function({vnode:e,parent:t,suspense:n},i){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=i,e=n),n!==e)break;(e=t.vnode).el=i,t=t.parent}n&&n.activeBranch===e&&(n.vnode.el=i)}(e,h.el),i&&Ri(i,o),(u=t.props&&t.props.onVnodeUpdated)&&Ri(()=>fo(u,a,t,c),o)}else{let s;const{el:a,props:l}=t,{bm:c,m:u,parent:d,root:h,type:p}=e,f=xn(t);ji(e,!1),c&&M(c),!f&&(s=l&&l.onVnodeBeforeMount)&&fo(s,d,t),ji(e,!0);{h.ce&&h.ce._hasShadowRoot()&&h.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);const s=e.subTree=mi(e);g(null,s,n,i,e,o,r),t.el=s.el}if(u&&Ri(u,o),!f&&(s=l&&l.onVnodeMounted)){const e=t;Ri(()=>fo(s,d,e),o)}(256&t.shapeFlag||d&&xn(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&Ri(e.a,o),e.isMounted=!0,t=n=i=null}});e.scope.off();const l=e.update=a.run.bind(a),c=e.job=a.runIfDirty.bind(a);c.i=e,c.id=e.uid,a.scheduler=()=>Bt(c),ji(e,!0),l()},B=(e,n,i)=>{n.component=e;const o=e.vnode.props;e.vnode=n,e.next=null,function(e,t,n,i){const{props:o,attrs:r,vnode:{patchFlag:s}}=e,a=ft(o),[l]=e.propsOptions;let c=!1;if(!(i||s>0)||16&s){let i;ki(e,t,o,r)&&(c=!0);for(const r in a)t&&(u(t,r)||(i=I(r))!==r&&u(t,i))||(l?!n||void 0===n[r]&&void 0===n[i]||(o[r]=Si(l,a,r,void 0,e,!0)):delete o[r]);if(r!==a)for(const e in r)t&&u(t,e)||(delete r[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let i=0;i<n.length;i++){let s=n[i];if(fi(e.emitsOptions,s))continue;const d=t[s];if(l)if(u(r,s))d!==r[s]&&(r[s]=d,c=!0);else{const t=L(s);o[t]=Si(l,a,t,d,e,!1)}else d!==r[s]&&(r[s]=d,c=!0)}}c&&Ie(e.attrs,"set","")}(e,n.props,o,i),((e,n,i)=>{const{vnode:o,slots:r}=e;let s=!0,a=t;if(32&o.shapeFlag){const e=n._;e?i&&1===e?s=!1:Mi(r,n,i):(s=!n.$stable,Pi(n,r)),a=n}else n&&(Oi(e,n),a={default:1});if(s)for(const t in r)Ei(t)||null!=a[t]||delete r[t]})(e,n.children,i),ge(),Ht(e),be()},F=(e,t,n,i,o,r,s,a,l=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void V(c,d,n,i,o,r,s,a,l);if(256&p)return void H(c,d,n,i,o,r,s,a,l)}8&f?(16&u&&Z(c,o,r),d!==c&&h(n,d)):16&u?16&f?V(c,d,n,i,o,r,s,a,l):Z(c,o,r,!0):(8&u&&h(n,""),16&f&&T(d,n,i,o,r,s,a,l))},H=(e,t,i,o,r,s,a,l,c)=>{t=t||n;const u=(e=e||n).length,d=t.length,h=Math.min(u,d);let p;for(p=0;p<h;p++){const n=t[p]=c?ho(t[p]):uo(t[p]);g(e[p],n,i,null,r,s,a,l,c)}u>d?Z(e,r,s,!0,!1,h):T(t,i,o,r,s,a,l,c,h)},V=(e,t,i,o,r,s,a,l,c)=>{let u=0;const d=t.length;let h=e.length-1,p=d-1;for(;u<=h&&u<=p;){const n=e[u],o=t[u]=c?ho(t[u]):uo(t[u]);if(!no(n,o))break;g(n,o,i,null,r,s,a,l,c),u++}for(;u<=h&&u<=p;){const n=e[h],o=t[p]=c?ho(t[p]):uo(t[p]);if(!no(n,o))break;g(n,o,i,null,r,s,a,l,c),h--,p--}if(u>h){if(u<=p){const e=p+1,n=e<d?t[e].el:o;for(;u<=p;)g(null,t[u]=c?ho(t[u]):uo(t[u]),i,n,r,s,a,l,c),u++}}else if(u>p)for(;u<=h;)q(e[u],r,s,!0),u++;else{const f=u,m=u,v=new Map;for(u=m;u<=p;u++){const e=t[u]=c?ho(t[u]):uo(t[u]);null!=e.key&&v.set(e.key,u)}let b,y=0;const w=p-m+1;let _=!1,C=0;const k=new Array(w);for(u=0;u<w;u++)k[u]=0;for(u=f;u<=h;u++){const n=e[u];if(y>=w){q(n,r,s,!0);continue}let o;if(null!=n.key)o=v.get(n.key);else for(b=m;b<=p;b++)if(0===k[b-m]&&no(n,t[b])){o=b;break}void 0===o?q(n,r,s,!0):(k[o-m]=u+1,o>=C?C=o:_=!0,g(n,t[o],i,null,r,s,a,l,c),y++)}const S=_?function(e){const t=e.slice(),n=[0];let i,o,r,s,a;const l=e.length;for(i=0;i<l;i++){const l=e[i];if(0!==l){if(o=n[n.length-1],e[o]<l){t[i]=o,n.push(i);continue}for(r=0,s=n.length-1;r<s;)a=r+s>>1,e[n[a]]<l?r=a+1:s=a;l<e[n[r]]&&(r>0&&(t[i]=n[r-1]),n[r]=i)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}(k):n;for(b=S.length-1,u=w-1;u>=0;u--){const e=m+u,n=t[e],h=t[e+1],p=e+1<d?h.el||Fi(h):o;0===k[u]?g(null,n,i,p,r,s,a,l,c):_&&(b<0||u!==S[b]?z(n,i,p,2):b--)}}},z=(e,t,n,i,s=null)=>{const{el:a,type:l,transition:c,children:u,shapeFlag:d}=e;if(6&d)z(e.component.subTree,t,n,i);else if(128&d)e.suspense.move(t,n,i);else if(64&d)l.move(e,t,n,Y);else if(l!==Vi)if(l!==Wi)if(2!==i&&1&d&&c)if(0===i)c.beforeEnter(a),o(a,t,n),Ri(()=>c.enter(a),s);else{const{leave:i,delayLeave:s,afterLeave:l}=c,u=()=>{e.ctx.isUnmounted?r(a):o(a,t,n)},d=()=>{a._isLeaving&&a[an](!0),i(a,()=>{u(),l&&l()})};s?s(a,u,d):d()}else o(a,t,n);else(({el:e,anchor:t},n,i)=>{let r;for(;e&&e!==t;)r=f(e),o(e,n,i),e=r;o(t,n,i)})(e,t,n);else{o(a,t,n);for(let e=0;e<u.length;e++)z(u[e],t,n,i);o(e.anchor,t,n)}},q=(e,t,n,i=!1,o=!1)=>{const{type:r,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:h,cacheIndex:p,memo:f}=e;if(-2===d&&(o=!1),null!=a&&(ge(),kn(a,null,n,e,!0),be()),null!=p&&(t.renderCache[p]=void 0),256&u)return void t.ctx.deactivate(e);const m=1&u&&h,v=!xn(e);let g;if(v&&(g=s&&s.onVnodeBeforeUnmount)&&fo(g,t,e),6&u)X(e.component,n,i);else{if(128&u)return void e.suspense.unmount(n,i);m&&Kt(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,Y,i):c&&!c.hasOnce&&(r!==Vi||d>0&&64&d)?Z(c,t,n,!1,!0):(r===Vi&&384&d||!o&&16&u)&&Z(l,t,n),i&&W(e)}const b=null!=f&&null==p;(v&&(g=s&&s.onVnodeUnmounted)||m||b)&&Ri(()=>{g&&fo(g,t,e),m&&Kt(e,null,t,"unmounted"),b&&(e.el=null)},n)},W=e=>{const{type:t,el:n,anchor:i,transition:o}=e;if(t===Vi)return void J(n,i);if(t===Wi)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),r(e),e=n;r(t)})(e);const s=()=>{r(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:i}=o,r=()=>t(n,s);i?i(e.el,s,r):r()}else s()},J=(e,t)=>{let n;for(;e!==t;)n=f(e),r(e),e=n;r(t)},X=(e,t,n)=>{const{bum:i,scope:o,job:r,subTree:s,um:a,m:l,a:c}=e;Bi(l),Bi(c),i&&M(i),o.stop(),r&&(r.flags|=8,q(s,e,t,n)),a&&Ri(a,t),Ri(()=>{e.isUnmounted=!0},t)},Z=(e,t,n,i=!1,o=!1,r=0)=>{for(let s=r;s<e.length;s++)q(e[s],t,n,i,o)},G=e=>{if(6&e.shapeFlag)return G(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=f(e.anchor||e.el),n=t&&t[rn];return n?f(n):t};let K=!1;const Q=(e,t,n)=>{let i;null==e?t._vnode&&(q(t._vnode,null,null,!0),i=t._vnode.component):g(t._vnode||null,e,t,null,null,null,n),t._vnode=e,K||(K=!0,Ht(i),Vt(),K=!1)},Y={p:g,um:q,m:z,r:W,mt:$,mc:T,pc:F,pbc:A,n:G,o:e};return{render:Q,hydrate:undefined,createApp:ci(Q)}}(e)}function $i({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ji({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ui(e,t,n=!1){const i=e.children,o=t.children;if(d(i)&&d(o))for(let r=0;r<i.length;r++){const e=i[r];let t=o[r];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=o[r]=ho(o[r]),t.el=e.el),n||-2===t.patchFlag||Ui(e,t)),t.type===zi&&(-1===t.patchFlag&&(t=o[r]=ho(t)),t.el=e.el),t.type!==qi||t.el||(t.el=e.el)}}function Ni(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ni(t)}function Bi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Fi(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Fi(t.subTree):null}const Hi=e=>e.__isSuspense,Vi=Symbol.for("v-fgt"),zi=Symbol.for("v-txt"),qi=Symbol.for("v-cmt"),Wi=Symbol.for("v-stc"),Ji=[];let Xi=null;function Zi(e=!1){Ji.push(Xi=e?null:[])}let Gi=1;function Ki(e,t=!1){Gi+=e,e<0&&Xi&&t&&(Xi.hasOnce=!0)}function Qi(e){return e.dynamicChildren=Gi>0?Xi||n:null,Ji.pop(),Xi=Ji[Ji.length-1]||null,Gi>0&&Xi&&Xi.push(e),e}function Yi(e,t,n,i,o,r){return Qi(ro(e,t,n,i,o,r,!0))}function eo(e,t,n,i,o){return Qi(so(e,t,n,i,o,!0))}function to(e){return!!e&&!0===e.__v_isVNode}function no(e,t){return e.type===t.type&&e.key===t.key}const io=({key:e})=>null!=e?e:null,oo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||gt(e)||m(e)?{i:Wt,r:e,k:t,f:!!n}:e:null);function ro(e,t=null,n=null,i=0,o=null,r=(e===Vi?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&io(t),ref:t&&oo(t),scopeId:Jt,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:r,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Wt};return a?(po(l,n),128&r&&e.normalize(l)):n&&(l.shapeFlag|=v(n)?8:16),Gi>0&&!s&&Xi&&(l.patchFlag>0||6&r)&&32!==l.patchFlag&&Xi.push(l),l}const so=function(e,t=null,n=null,i=0,o=null,r=!1){if(e&&e!==Vn||(e=qi),to(e)){const i=ao(e,t,!0);return n&&po(i,n),Gi>0&&!r&&Xi&&(6&i.shapeFlag?Xi[Xi.indexOf(e)]=i:Xi.push(i)),i.patchFlag=-2,i}var s;if(m(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){t=function(e){return e?pt(e)||Ci(e)?a({},e):e:null}(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=V(e)),b(n)&&(pt(n)&&!d(n)&&(n=a({},n)),t.style=U(n))}return ro(e,t,n,i,o,v(e)?1:Hi(e)?128:sn(e)?64:b(e)?4:m(e)?2:0,r,!0)};function ao(e,t,n=!1,i=!1){const{props:o,ref:a,patchFlag:l,children:c,transition:u}=e,h=t?function(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const e in i)if("class"===e)t.class!==i.class&&(t.class=V([t.class,i.class]));else if("style"===e)t.style=U([t.style,i.style]);else if(r(e)){const n=t[e],o=i[e];!o||n===o||d(n)&&n.includes(o)?null!=o||null!=n||s(e)||(t[e]=o):t[e]=n?[].concat(n,o):o}else""!==e&&(t[e]=i[e])}return t}(o||{},t):o,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&io(h),ref:t&&t.ref?n&&a?d(a)?a.concat(oo(t)):[a,oo(t)]:oo(t):a,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!==Vi?-1===l?16:16|l:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ao(e.ssContent),ssFallback:e.ssFallback&&ao(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&i&&bn(p,u.clone(p)),p}function lo(e=" ",t=0){return so(zi,null,e,t)}function co(e="",t=!1){return t?(Zi(),eo(qi,null,e)):so(qi,null,e)}function uo(e){return null==e||"boolean"==typeof e?so(qi):d(e)?so(Vi,null,e.slice()):to(e)?ho(e):so(zi,null,String(e))}function ho(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:ao(e)}function po(e,t){let n=0;const{shapeFlag:i}=e;if(null==t)t=null;else if(d(t))n=16;else if("object"==typeof t){if(65&i){const n=t.default;return void(n&&(n._c&&(n._d=!1),po(e,n()),n._c&&(n._d=!0)))}{n=32;const i=t._;i||Ci(t)?3===i&&Wt&&(1===Wt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Wt}}else m(t)?(t={default:t,_ctx:Wt},n=32):(t=String(t),64&i?(n=16,t=[lo(t)]):n=8);e.children=t,e.shapeFlag|=n}function fo(e,t,n,i=null){At(e,t,7,[n,i])}const mo=ai();let vo=0,go=null;const bo=()=>go||Wt;let yo,wo;{const e=j(),t=(t,n)=>{let i;return(i=e[t])||(i=e[t]=[]),i.push(n),e=>{i.length>1?i.forEach(t=>t(e)):i[0](e)}};yo=t("__VUE_INSTANCE_SETTERS__",e=>go=e),wo=t("__VUE_SSR_SETTERS__",e=>So=e)}const _o=e=>{const t=go;return yo(e),e.scope.on(),()=>{e.scope.off(),yo(t)}},Co=()=>{go&&go.scope.off(),yo(null)};function ko(e){return 4&e.vnode.shapeFlag}let So=!1;function xo(e,t,n){m(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:b(t)&&(e.setupState=Ct(t)),To(e)}function To(e,t,n){const o=e.type;e.render||(e.render=o.render||i);{const t=_o(e);ge();try{!function(e){const t=Yn(e),n=e.proxy,o=e.ctx;Gn=!1,t.beforeCreate&&Kn(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:a,watch:l,provide:c,inject:u,created:h,beforeMount:p,mounted:f,beforeUpdate:v,updated:g,activated:y,deactivated:w,beforeDestroy:_,beforeUnmount:C,destroyed:k,unmounted:S,render:x,renderTracked:T,renderTriggered:L,errorCaptured:E,serverPrefetch:I,expose:A,inheritAttrs:P,components:O,directives:M,filters:R}=t;if(u&&function(e,t){d(e)&&(e=ii(e));for(const n in e){const i=e[n];let o;o=b(i)?"default"in i?Qt(i.from||n,i.default,!0):Qt(i.from||n):Qt(i),gt(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[n]=o}}(u,o),a)for(const i in a){const e=a[i];m(e)&&(o[i]=e.bind(n))}if(r){const t=r.call(n,n);b(t)&&(e.data=st(t))}if(Gn=!0,s)for(const d in s){const e=s[d],t=m(e)?e.bind(n,n):m(e.get)?e.get.bind(n,n):i,r=!m(e)&&m(e.set)?e.set.bind(n):i,a=Io({get:t,set:r});Object.defineProperty(o,d,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(l)for(const i in l)Qn(l[i],o,n,i);if(c){const e=m(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(go){let n=go.provides;const i=go.parent&&go.parent.provides;i===n&&(n=go.provides=Object.create(i)),n[e]=t}}(t,e[t])})}function D(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(h&&Kn(h,e,"c"),D(Mn,p),D(Rn,f),D(Dn,v),D($n,g),D(Ln,y),D(En,w),D(Hn,E),D(Fn,T),D(Bn,L),D(jn,C),D(Un,S),D(Nn,I),d(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===i&&(e.render=x),null!=P&&(e.inheritAttrs=P),O&&(e.components=O),M&&(e.directives=M),I&&wn(e)}(e)}finally{be(),t()}}}const Lo={get:(e,t)=>(Ee(e,0,""),e[t])};function Eo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ct((t=e.exposed,!u(t,"__v_skip")&&Object.isExtensible(t)&&R(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in Wn?Wn[n](e):void 0,has:(e,t)=>t in e||t in Wn})):e.proxy;var t}const Io=(e,t)=>St(e,0,So),Ao="3.5.32";let Po;const Oo="undefined"!=typeof window&&window.trustedTypes;if(Oo)try{Po=Oo.createPolicy("vue",{createHTML:e=>e})}catch(ql){}const Mo=Po?e=>Po.createHTML(e):e=>e,Ro="undefined"!=typeof document?document:null,Do=Ro&&Ro.createElement("template"),$o={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const o="svg"===t?Ro.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Ro.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Ro.createElement(e,{is:n}):Ro.createElement(e);return"select"===e&&i&&null!=i.multiple&&o.setAttribute("multiple",i.multiple),o},createText:e=>Ro.createTextNode(e),createComment:e=>Ro.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ro.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,o,r){const s=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==r&&(o=o.nextSibling););else{Do.innerHTML=Mo("svg"===i?`<svg>${e}</svg>`:"mathml"===i?`<math>${e}</math>`:e);const o=Do.content;if("svg"===i||"mathml"===i){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},jo="transition",Uo="animation",No=Symbol("_vtc"),Bo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fo=a({},un,Bo),Ho=(e=>(e.displayName="Transition",e.props=Fo,e))((e,{slots:t})=>function(e,t,n){try{Ki(-1);const i=arguments.length;return 2===i?b(t)&&!d(t)?to(t)?so(e,null,[t]):so(e,t):so(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):3===i&&to(n)&&(n=[n]),so(e,t,n))}finally{Ki(1)}}(pn,function(e){const t={};for(const a in e)a in Bo||(t[a]=e[a]);if(!1===e.css)return t;const{name:n="v",type:i,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=r,appearActiveClass:u=s,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(b(e))return[qo(e.enter),qo(e.leave)];{const t=qo(e);return[t,t]}}(o),v=m&&m[0],g=m&&m[1],{onBeforeEnter:y,onEnter:w,onEnterCancelled:_,onLeave:C,onLeaveCancelled:k,onBeforeAppear:S=y,onAppear:x=w,onAppearCancelled:T=_}=t,L=(e,t,n,i)=>{e._enterCancelled=i,Jo(e,t?d:l),Jo(e,t?u:s),n&&n()},E=(e,t)=>{e._isLeaving=!1,Jo(e,h),Jo(e,f),Jo(e,p),t&&t()},I=e=>(t,n)=>{const o=e?x:w,s=()=>L(t,e,n);Vo(o,[t,s]),Xo(()=>{Jo(t,e?c:r),Wo(t,e?d:l),zo(o)||Go(t,i,v,s)})};return a(t,{onBeforeEnter(e){Vo(y,[e]),Wo(e,r),Wo(e,s)},onBeforeAppear(e){Vo(S,[e]),Wo(e,c),Wo(e,u)},onEnter:I(!1),onAppear:I(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);Wo(e,h),e._enterCancelled?(Wo(e,p),Yo(e)):(Yo(e),Wo(e,p)),Xo(()=>{e._isLeaving&&(Jo(e,h),Wo(e,f),zo(C)||Go(e,i,g,n))}),Vo(C,[e,n])},onEnterCancelled(e){L(e,!1,void 0,!0),Vo(_,[e])},onAppearCancelled(e){L(e,!0,void 0,!0),Vo(T,[e])},onLeaveCancelled(e){E(e),Vo(k,[e])}})}(e),t)),Vo=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},zo=e=>!!e&&(d(e)?e.some(e=>e.length>1):e.length>1);function qo(e){const t=(e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t})(e);return t}function Wo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[No]||(e[No]=new Set)).add(t)}function Jo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));const n=e[No];n&&(n.delete(t),n.size||(e[No]=void 0))}function Xo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zo=0;function Go(e,t,n,i){const o=e._endId=++Zo,r=()=>{o===e._endId&&i()};if(null!=n)return setTimeout(r,n);const{type:s,timeout:a,propCount:l}=function(e,t){const n=window.getComputedStyle(e),i=e=>(n[e]||"").split(", "),o=i(`${jo}Delay`),r=i(`${jo}Duration`),s=Ko(o,r),a=i(`${Uo}Delay`),l=i(`${Uo}Duration`),c=Ko(a,l);let u=null,d=0,h=0;t===jo?s>0&&(u=jo,d=s,h=r.length):t===Uo?c>0&&(u=Uo,d=c,h=l.length):(d=Math.max(s,c),u=d>0?s>c?jo:Uo:null,h=u?u===jo?r.length:l.length:0);return{type:u,timeout:d,propCount:h,hasTransform:u===jo&&/\b(?:transform|all)(?:,|$)/.test(i(`${jo}Property`).toString())}}(e,t);if(!s)return i();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,h),r()},h=t=>{t.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,h)}function Ko(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Qo(t)+Qo(e[n])))}function Qo(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Yo(e){return(e?e.ownerDocument:document).body.offsetHeight}const er=Symbol("_vod"),tr=Symbol("_vsh"),nr={name:"show",beforeMount(e,{value:t},{transition:n}){e[er]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ir(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),ir(e,!0),i.enter(e)):i.leave(e,()=>{ir(e,!1)}):ir(e,t))},beforeUnmount(e,{value:t}){ir(e,t)}};function ir(e,t){e.style.display=t?e[er]:"none",e[tr]=!t}const or=Symbol(""),rr=/(?:^|;)\s*display\s*:/,sr=/\s*!important$/;function ar(e,t,n){if(d(n))n.forEach(n=>ar(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=function(e,t){const n=cr[t];if(n)return n;let i=L(t);if("filter"!==i&&i in e)return cr[t]=i;i=A(i);for(let o=0;o<lr.length;o++){const n=lr[o]+i;if(n in e)return cr[t]=n}return t}(e,t);sr.test(n)?e.setProperty(I(i),n.replace(sr,""),"important"):e[i]=n}}const lr=["Webkit","Moz","ms"],cr={},ur="http://www.w3.org/1999/xlink";function dr(e,t,n,i,o,r=z(t)){i&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(ur,t.slice(6,t.length)):e.setAttributeNS(ur,t,n):null==n||r&&!q(n)?e.removeAttribute(t):e.setAttribute(t,r?"":g(n)?String(n):n)}function hr(e,t,n,i,o){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Mo(n):n));const r=e.tagName;if("value"===t&&"PROGRESS"!==r&&!r.includes("-")){const i="OPTION"===r?e.getAttribute("value")||"":e.value,o=null==n?"checkbox"===e.type?"on":"":String(n);return i===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let s=!1;if(""===n||null==n){const i=typeof e[t];"boolean"===i?n=q(n):null==n&&"string"===i?(n="",s=!0):"number"===i&&(n=0,s=!0)}try{e[t]=n}catch(ql){}s&&e.removeAttribute(o||t)}function pr(e,t,n,i){e.addEventListener(t,n,i)}const fr=Symbol("_vei");const mr=/(?:Once|Passive|Capture)$/;let vr=0;const gr=Promise.resolve(),br=()=>vr||(gr.then(()=>vr=0),vr=Date.now()),yr=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,wr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return d(t)?e=>M(t,e):t};function _r(e){e.target.composing=!0}function Cr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kr=Symbol("_assign");function Sr(e,t,n){return t&&(e=e.trim()),n&&(e=D(e)),e}const xr={created(e,{modifiers:{lazy:t,trim:n,number:i}},o){e[kr]=wr(o);const r=i||o.props&&"number"===o.props.type;pr(e,t?"change":"input",t=>{t.target.composing||e[kr](Sr(e.value,n,r))}),(n||r)&&pr(e,"change",()=>{e.value=Sr(e.value,n,r)}),t||(pr(e,"compositionstart",_r),pr(e,"compositionend",Cr),pr(e,"change",Cr))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:o,number:r}},s){if(e[kr]=wr(s),e.composing)return;const a=null==t?"":t;if((!r&&"number"!==e.type||/^0\d/.test(e.value)?e.value:D(e.value))===a)return;const l=e.getRootNode();if((l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&"range"!==e.type){if(i&&t===n)return;if(o&&e.value.trim()===a)return}e.value=a}},Tr={deep:!0,created(e,t,n){e[kr]=wr(n),pr(e,"change",()=>{const t=e._modelValue,n=Pr(e),i=e.checked,o=e[kr];if(d(t)){const e=J(t,n),r=-1!==e;if(i&&!r)o(t.concat(n));else if(!i&&r){const n=[...t];n.splice(e,1),o(n)}}else if(p(t)){const e=new Set(t);i?e.add(n):e.delete(n),o(e)}else o(Or(e,i))})},mounted:Lr,beforeUpdate(e,t,n){e[kr]=wr(n),Lr(e,t,n)}};function Lr(e,{value:t,oldValue:n},i){let o;if(e._modelValue=t,d(t))o=J(t,i.props.value)>-1;else if(p(t))o=t.has(i.props.value);else{if(t===n)return;o=W(t,Or(e,!0))}e.checked!==o&&(e.checked=o)}const Er={created(e,{value:t},n){e.checked=W(t,n.props.value),e[kr]=wr(n),pr(e,"change",()=>{e[kr](Pr(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[kr]=wr(i),t!==n&&(e.checked=W(t,i.props.value))}},Ir={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const o=p(t);pr(e,"change",()=>{const t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?D(Pr(e)):Pr(e));e[kr](e.multiple?o?new Set(t):t:t[0]),e._assigning=!0,Nt(()=>{e._assigning=!1})}),e[kr]=wr(i)},mounted(e,{value:t}){Ar(e,t)},beforeUpdate(e,t,n){e[kr]=wr(n)},updated(e,{value:t}){e._assigning||Ar(e,t)}};function Ar(e,t){const n=e.multiple,i=d(t);if(!n||i||p(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=Pr(r);if(n)if(i){const e=typeof s;r.selected="string"===e||"number"===e?t.some(e=>String(e)===String(s)):J(t,s)>-1}else r.selected=t.has(s);else if(W(Pr(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Pr(e){return"_value"in e?e._value:e.value}function Or(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Mr={created(e,t,n){Rr(e,t,n,null,"created")},mounted(e,t,n){Rr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){Rr(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){Rr(e,t,n,i,"updated")}};function Rr(e,t,n,i,o){const r=function(e,t){switch(e){case"SELECT":return Ir;case"TEXTAREA":return xr;default:switch(t){case"checkbox":return Tr;case"radio":return Er;default:return xr}}}(e.tagName,n.props&&n.props.type)[o];r&&r(e,t,n,i)}const Dr=["ctrl","shift","alt","meta"],$r={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&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Dr.some(n=>e[`${n}Key`]&&!t.includes(n))},jr=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(n,...i)=>{for(let e=0;e<t.length;e++){const i=$r[t[e]];if(i&&i(n,t))return}return e(n,...i)})},Ur={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nr=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=n=>{if(!("key"in n))return;const i=I(n.key);return t.some(e=>e===i||Ur[e]===i)?e(n):void 0})},Br=a({patchProp:(e,t,n,i,o,a)=>{const l="svg"===o;"class"===t?function(e,t,n){const i=e[No];i&&(t=(t?[t,...i]:[...i]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,i,l):"style"===t?function(e,t,n){const i=e.style,o=v(n);let r=!1;if(n&&!o){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ar(i,t,"")}else for(const e in t)null==n[e]&&ar(i,e,"");for(const e in n)"display"===e&&(r=!0),ar(i,e,n[e])}else if(o){if(t!==n){const e=i[or];e&&(n+=";"+e),i.cssText=n,r=rr.test(n)}}else t&&e.removeAttribute("style");er in e&&(e[er]=r?i.display:"",e[tr]&&(i.display="none"))}(e,n,i):r(t)?s(t)||function(e,t,n,i,o=null){const r=e[fr]||(e[fr]={}),s=r[t];if(i&&s)s.value=i;else{const[n,a]=function(e){let t;if(mr.test(e)){let n;for(t={};n=e.match(mr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):I(e.slice(2)),t]}(t);if(i){const s=r[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();At(function(e,t){if(d(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=br(),n}(i,o);pr(e,n,s,a)}else s&&(function(e,t,n,i){e.removeEventListener(t,n,i)}(e,n,s,a),r[t]=void 0)}}(e,t,0,i,a):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,i){if(i)return"innerHTML"===t||"textContent"===t||!!(t in e&&yr(t)&&m(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("sandbox"===t&&"IFRAME"===e.tagName)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!yr(t)||!v(n))&&t in e}(e,t,i,l))?(hr(e,t,i),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||dr(e,t,i,l,0,"value"!==t)):e._isVueCE&&(function(e,t){const n=e._def.props;if(!n)return!1;const i=L(t);return Array.isArray(n)?n.some(e=>L(e)===i):Object.keys(n).some(e=>L(e)===i)}(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(i)))?hr(e,L(t),i,0,t):("true-value"===t?e._trueValue=i:"false-value"===t&&(e._falseValue=i),dr(e,t,i,l))}},$o);let Fr;const Hr=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},Vr={class:"robotmia-rating-menu"},zr={class:"robotmia-description"},qr=["disabled","onClick","onMouseenter"],Wr={key:"comment",class:"robotmia-comment-area"},Jr={key:0,class:"robotmia-message"},Xr={key:1,class:"robotmia-message robotmia-followup"},Zr=["placeholder","disabled"],Gr=["disabled"],Kr={key:"result",class:"robotmia-result-step"},Qr={class:"robotmia-message"},Yr={key:0,class:"robotmia-confirm-overlay"},es={class:"robotmia-confirm-box"},ts={class:"robotmia-confirm-buttons"},ns=Hr({__name:"RatingMenu",props:{visible:Boolean,title:{type:String},description:{type:String},range:{type:Array},badRange:{type:Array},badMessage:{type:String},goodMessage:{type:String},commentEnabled:{type:Boolean},badRangeEnabled:{type:Boolean},commentRequired:{type:Boolean},followupQuestion:{type:String,default:""}},emits:["close","rated"],setup(e,{emit:t}){const n=e,i=t,o=bt(0),r=bt(0),s=bt(""),a=bt(""),l=bt(!1),c=bt(!1);function u(e,t){return"number"==typeof e&&"number"==typeof t&&e<=t?Array.from({length:t-e+1},(t,n)=>e+n):[]}function d(){r.value=0}const h=Io(()=>{const e=n.range;if(Array.isArray(e)&&e.length>=2){const[t,n]=e;return u(t,n)}return[1,2,3,4,5]}),p=Io(()=>{if(Array.isArray(n.badRange)&&n.badRange.length>=2){const[e,t]=n.badRange;return u(e,t)}return n.badRange||[]}),f=Io(()=>{const e=h.value.length;return{gap:`${Math.max(2,10-1.5*(e-5))}px`}}),m=Io(()=>!!n.followupQuestion&&n.badRangeEnabled&&p.value.includes(o.value)),v=Io(()=>!!m.value||!!n.commentEnabled&&(n.badRangeEnabled?p.value.includes(o.value):!!o.value)),g=Io(()=>!!o.value&&!v.value);function b(){n.commentRequired&&!s.value.trim()||(c.value=!0,y())}function y(){c.value?_():l.value=!0}function w(){l.value=!1,i("close")}function _(){i("rated",{rating:o.value,comment:s.value}),i("close")}return en(()=>n.visible,e=>{e||(o.value=0,r.value=0,s.value="",a.value="",l.value=!1,c.value=!1)}),(t,i)=>(Zi(),eo(Ho,{name:"robotmia-fade-up"},{default:Zt(()=>[e.visible?(Zi(),Yi("div",{key:0,class:"robotmia-overlay",onClick:jr(y,["self"])},[ro("div",Vr,[ro("button",{class:"robotmia-close-btn",onClick:y},"×"),ro("h2",{class:"robotmia-title",style:U({color:t.primaryColor})},Z(e.title),5),ro("p",zr,Z(e.description),1),ro("div",{class:"robotmia-stars",style:U({gap:f.value.gap,justifyContent:"center",flexWrap:"wrap"}),onMouseleave:d},[(Zi(!0),Yi(Vi,null,zn(h.value,e=>(Zi(),Yi("button",{key:e,class:V(["robotmia-star",{"robotmia-active":e<=(r.value||o.value),"robotmia-disabled":c.value}]),disabled:c.value,onClick:t=>!c.value&&function(e){c.value||(o.value=e,r.value=e,n.badRangeEnabled?p.value.includes(e)?a.value=n.badMessage:(s.value="",a.value=n.goodMessage):a.value=n.goodMessage)}(e),onMouseenter:t=>!c.value&&(r.value=e)},[...i[2]||(i[2]=[ro("svg",{class:"robotmia-star-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[ro("path",{d:"M14.65 8.93274L12.4852 4.30901C12.2923 3.89699 11.7077 3.897 11.5148 4.30902L9.35002 8.93274L4.45559 9.68243C4.02435 9.74848 3.84827 10.2758 4.15292 10.5888L7.71225 14.2461L6.87774 19.3749C6.80571 19.8176 7.27445 20.1487 7.66601 19.9317L12 17.5299L16.334 19.9317C16.7256 20.1487 17.1943 19.8176 17.1223 19.3749L16.2878 14.2461L19.8471 10.5888C20.1517 10.2758 19.9756 9.74848 19.5444 9.68243L14.65 8.93274Z"})],-1)])],42,qr))),128))],36),so(Ho,{name:"robotmia-fade-seq",mode:"out-in"},{default:Zt(()=>[v.value?(Zi(),Yi("div",Wr,[a.value?(Zi(),Yi("p",Jr,Z(a.value),1)):co("",!0),m.value?(Zi(),Yi("p",Xr,Z(e.followupQuestion),1)):co("",!0),Gt(ro("textarea",{"onUpdate:modelValue":i[0]||(i[0]=e=>s.value=e),placeholder:m.value?"Ваш ответ...":"Ваш комментарий...",class:"robotmia-comment-box",disabled:c.value},null,8,Zr),[[xr,s.value]]),c.value?(Zi(),Yi("button",{key:3,class:"robotmia-btn robotmia-primary robotmia-mt-3",onClick:_}," Закрыть ")):(Zi(),Yi("button",{key:2,class:"robotmia-btn robotmia-primary",disabled:e.commentRequired&&!s.value.trim(),onClick:b}," Отправить ",8,Gr))])):g.value?(Zi(),Yi("div",Kr,[ro("p",Qr,Z(a.value),1),ro("button",{class:"robotmia-btn robotmia-primary robotmia-mt-3",onClick:_},"Закрыть")])):co("",!0)]),_:1})]),so(Ho,{name:"robotmia-fade-up"},{default:Zt(()=>[l.value?(Zi(),Yi("div",Yr,[ro("div",es,[i[3]||(i[3]=ro("p",{class:"robotmia-message"}," Вы хотите прекратить сбор обратной связи? Введенная оценка и комментарий не будут отправлены. ",-1)),ro("div",ts,[ro("button",{class:"robotmia-btn robotmia-secondary",onClick:i[1]||(i[1]=e=>l.value=!1)},"Продолжить"),ro("button",{class:"robotmia-btn robotmia-primary",onClick:w},"Выйти")])])])):co("",!0)]),_:1})])):co("",!0)]),_:1}))}},[["__scopeId","data-v-510d4e3f"]]);function is(e){return/^(https?:\/\/|mailto:|tel:)/i.test(String(e??"").trim())}function os(e){return String(e??"").replace(/\\/g,"\\\\").replace(/\[/g,"\\[").replace(/\]/g,"\\]")}function rs(e){return String(e??"").replace(/\\([[\]\\])/g,"$1")}const ss={class:"robotmia-contact-form"},as={class:"robotmia-operator-message"},ls={class:"robotmia-message-bubble"},cs={class:"robotmia-form-fields"},us={class:"robotmia-input-wrapper"},ds=["id","onUpdate:modelValue","type","placeholder","onFocus","onBlur","onInput"],hs=["for"],ps={class:"robotmia-error-wrapper"},fs={key:0,class:"robotmia-error-message"},ms={key:0,class:"robotmia-form-consent"},vs={for:"consent"},gs=["href"],bs=["disabled"],ys=Hr({__name:"ContactForm",props:{fields:{type:Array,required:!0},requireConsent:{type:Boolean,required:!0},consentTemplate:{type:String,default:""},consentUrl:{type:String,default:""},consentText:{type:String,default:""},consentHref:{type:String,default:""},placeholderText:{type:String,default:""},submitLabel:{type:String,default:"Начать диалог"},initialData:{type:Object,default:()=>({})}},emits:["submit"],setup(e,{emit:t}){const n=e,i=Io(()=>function(e){const t=String(e??""),n=[],i=/\[((?:\\.|[^\]\\])*)\]\(([^)\s]+)\)/g;let o,r=0;const s=e=>{if(!e)return;const t=rs(e);t&&n.push({type:"text",text:t})};for(;null!==(o=i.exec(t));){s(t.slice(r,o.index));const e=rs(o[1]),a=o[2];is(a)?n.push({type:"link",text:e,url:a}):n.push({type:"text",text:o[0]}),r=i.lastIndex}return s(t.slice(r)),n}(String(n.consentTemplate??"").trim()||function(e,t,n){const i=String(e??"").trim(),o=String(t??"").trim(),r=String(n??"").trim();if(o&&r){const e=`[${os(o)}](${r})`;return i?`${os(i)} ${e}`:e}return os(i)}(n.consentText,n.consentHref,n.consentUrl))),o=t,r=["name","surname","email","phone"],s=Io(()=>[...n.fields].sort((e,t)=>{const n=r.indexOf(e),i=r.indexOf(t);return-1===n&&-1===i?0:-1===n?1:-1===i?-1:n-i})),a=bt({});en(()=>[n.fields,n.initialData,n.requireConsent],function(){var e;const t=n.fields.reduce((e,t)=>{var i;const o=null==(i=n.initialData)?void 0:i[t];return e[t]="string"==typeof o?o:"",e},{});n.requireConsent&&(t.consent=!0===(null==(e=n.initialData)?void 0:e.consent)),a.value=t},{immediate:!0,deep:!0});const l=bt(null),c=bt({}),u=Io(()=>{const e=n.fields.every(e=>{const t=a.value[e];return!(!t||0===t.trim().length)&&("email"===e?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t):"phone"===e?/^7\d{10}$/.test(t.replace(/\D/g,"")):"name"!==e&&"surname"!==e||/^[A-Za-zА-Яа-яЁё''\-\s]+$/.test(t))}),t=!n.requireConsent||a.value.consent;return e&&t});function d(e){switch(e){case"phone":default:return"text";case"email":return"email"}}function h(e){return{name:"Имя",surname:"Фамилия",phone:"Телефон",email:"Email"}[e]||e.charAt(0).toUpperCase()+e.slice(1)}function p(e){return{name:"Введите ваше имя",surname:"Введите вашу фамилию",phone:"+7 ___ ___-__-__",email:"Введите ваш email"}[e]||""}function f(e){setTimeout(()=>{delete c.value[e]},5e3)}function m(){if(u.value){const e={...a.value};e.phone&&(e.phone=e.phone.replace(/\D/g,"")),o("submit",e)}}return(t,n)=>(Zi(),Yi("div",ss,[ro("div",as,[ro("div",ls,Z(e.placeholderText),1)]),ro("div",cs,[(Zi(!0),Yi(Vi,null,zn(s.value,(e,t)=>(Zi(),Yi("div",{key:`field-${t}`,class:"robotmia-form-field"},[ro("div",us,[Gt(ro("input",{id:e,"onUpdate:modelValue":t=>a.value[e]=t,type:d(e),placeholder:p(e),onFocus:t=>l.value=e,onBlur:t=>function(e){const t=a.value[e];return t&&0!==t.trim().length?"name"!==e&&"surname"!==e||/^[A-Za-zА-Яа-яЁё''\-\s]+$/.test(t)?"email"!==e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?"phone"!==e||/^7\d{10}$/.test(t.replace(/\D/g,""))?void delete c.value[e]:(c.value[e]="Введите корректный номер телефона",void f(e)):(c.value[e]="Введите корректный email",void f(e)):(c.value[e]="Поле содержит недопустимые символы",void f(e)):(c.value[e]="Поле обязательно для заполнения",void f(e))}(e),onInput:t=>function(e){if("phone"!==e)return;let t=a.value.phone.replace(/\D/g,"");t.startsWith("7")||(t="7"+t),t=t.substring(0,11);let n="+7";t.length>1&&(n+=" "+t.substring(1,4)),t.length>4&&(n+=" "+t.substring(4,7)),t.length>7&&(n+="-"+t.substring(7,9)),t.length>9&&(n+="-"+t.substring(9,11)),a.value.phone=n}(e)},null,40,ds),[[Mr,a.value[e]]]),ro("label",{for:e},Z(h(e)),9,hs)]),ro("div",ps,[c.value[e]?(Zi(),Yi("span",fs,Z(c.value[e]),1)):co("",!0)])]))),128)),e.requireConsent?(Zi(),Yi("div",ms,[Gt(ro("input",{id:"consent","onUpdate:modelValue":n[0]||(n[0]=e=>a.value.consent=e),type:"checkbox",onFocus:n[1]||(n[1]=e=>l.value="consent"),onBlur:n[2]||(n[2]=e=>l.value=null)},null,544),[[Tr,a.value.consent]]),ro("label",vs,[(Zi(!0),Yi(Vi,null,zn(i.value,(e,t)=>(Zi(),Yi(Vi,{key:t},["link"===e.type?(Zi(),Yi("a",{key:0,href:e.url,target:"_blank",rel:"noopener nofollow"},Z(e.text),9,gs)):(Zi(),Yi(Vi,{key:1},[lo(Z(e.text),1)],64))],64))),128))])])):co("",!0)]),ro("button",{class:"robotmia-start-chat-btn",disabled:!u.value,onClick:m},Z(e.submitLabel),9,bs)]))}},[["__scopeId","data-v-fdb2f525"]]);class ws{listenForWhisper(e,t){return this.listen(".client-"+e,t)}notification(e){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",e)}stopListeningForWhisper(e,t){return this.stopListening(".client-"+e,t)}}class _s{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}class Cs extends ws{constructor(e,t,n){super(),this.name=t,this.pusher=e,this.options=n,this.eventFormatter=new _s(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,t){return this.on(this.eventFormatter.format(e),t),this}listenToAll(e){return this.subscription.bind_global((t,n)=>{if(t.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),o=t.startsWith(i)?t.substring(i.length+1):"."+t;e(o,n)}),this}stopListening(e,t){return t?this.subscription.unbind(this.eventFormatter.format(e),t):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",t=>{e(t)}),this}on(e,t){return this.subscription.bind(e,t),this}}class ks extends Cs{whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}}class Ss extends Cs{whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}}class xs extends ks{here(e){return this.on("pusher:subscription_succeeded",t=>{e(Object.keys(t.members).map(e=>t.members[e]))}),this}joining(e){return this.on("pusher:member_added",t=>{e(t.info)}),this}whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}leaving(e){return this.on("pusher:member_removed",t=>{e(t.info)}),this}}class Ts extends ws{constructor(e,t,n){super(),this.events={},this.listeners={},this.name=t,this.socket=e,this.options=n,this.eventFormatter=new _s(this.options.namespace),this.subscribe()}subscribe(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}unsubscribe(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}listen(e,t){return this.on(this.eventFormatter.format(e),t),this}stopListening(e,t){return this.unbindEvent(this.eventFormatter.format(e),t),this}subscribed(e){return this.on("connect",t=>{e(t)}),this}error(e){return this}on(e,t){return this.listeners[e]=this.listeners[e]||[],this.events[e]||(this.events[e]=(t,n)=>{this.name===t&&this.listeners[e]&&this.listeners[e].forEach(e=>e(n))},this.socket.on(e,this.events[e])),this.listeners[e].push(t),this}unbind(){Object.keys(this.events).forEach(e=>{this.unbindEvent(e)})}unbindEvent(e,t){this.listeners[e]=this.listeners[e]||[],t&&(this.listeners[e]=this.listeners[e].filter(e=>e!==t)),(!t||0===this.listeners[e].length)&&(this.events[e]&&(this.socket.removeListener(e,this.events[e]),delete this.events[e]),delete this.listeners[e])}}class Ls extends Ts{whisper(e,t){return this.socket.emit("client event",{channel:this.name,event:`client-${e}`,data:t}),this}}class Es extends Ls{here(e){return this.on("presence:subscribed",t=>{e(t.map(e=>e.user_info))}),this}joining(e){return this.on("presence:joining",t=>e(t.user_info)),this}whisper(e,t){return this.socket.emit("client event",{channel:this.name,event:`client-${e}`,data:t}),this}leaving(e){return this.on("presence:leaving",t=>e(t.user_info)),this}}class Is extends ws{subscribe(){}unsubscribe(){}listen(e,t){return this}listenToAll(e){return this}stopListening(e,t){return this}subscribed(e){return this}error(e){return this}on(e,t){return this}}class As extends Is{whisper(e,t){return this}}class Ps extends Is{whisper(e,t){return this}}class Os extends As{here(e){return this}joining(e){return this}whisper(e,t){return this}leaving(e){return this}}const Ms=class e{constructor(e){this.setOptions(e),this.connect()}setOptions(t){this.options={...e._defaultOptions,...t,broadcaster:t.broadcaster};let n=this.csrfToken();n&&(this.options.auth.headers["X-CSRF-TOKEN"]=n,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=n),n=this.options.bearerToken,n&&(this.options.auth.headers.Authorization="Bearer "+n,this.options.userAuthentication.headers.Authorization="Bearer "+n)}csrfToken(){var e,t;return typeof window<"u"&&null!=(e=window.Laravel)&&e.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&"function"==typeof document.querySelector?(null==(t=document.querySelector('meta[name="csrf-token"]'))?void 0:t.getAttribute("content"))??null:null}};Ms._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"};let Rs=Ms;class Ds extends Rs{constructor(){super(...arguments),this.channels={}}connect(){if(typeof this.options.client<"u")this.pusher=this.options.client;else if(this.options.Pusher)this.pusher=new this.options.Pusher(this.options.key,this.options);else{if(!(typeof window<"u"&&typeof window.Pusher<"u"))throw new Error("Pusher client not found. Should be globally available or passed via options.client");this.pusher=new window.Pusher(this.options.key,this.options)}}signin(){this.pusher.signin()}listen(e,t,n){return this.channel(e).listen(t,n)}channel(e){return this.channels[e]||(this.channels[e]=new Cs(this.pusher,e,this.options)),this.channels[e]}privateChannel(e){return this.channels["private-"+e]||(this.channels["private-"+e]=new ks(this.pusher,"private-"+e,this.options)),this.channels["private-"+e]}encryptedPrivateChannel(e){return this.channels["private-encrypted-"+e]||(this.channels["private-encrypted-"+e]=new Ss(this.pusher,"private-encrypted-"+e,this.options)),this.channels["private-encrypted-"+e]}presenceChannel(e){return this.channels["presence-"+e]||(this.channels["presence-"+e]=new xs(this.pusher,"presence-"+e,this.options)),this.channels["presence-"+e]}leave(e){[e,"private-"+e,"private-encrypted-"+e,"presence-"+e].forEach(e=>{this.leaveChannel(e)})}leaveChannel(e){this.channels[e]&&(this.channels[e].unsubscribe(),delete this.channels[e])}socketId(){return this.pusher.connection.socket_id}disconnect(){this.pusher.disconnect()}}class $s extends Rs{constructor(){super(...arguments),this.channels={}}connect(){let e=this.getSocketIO();this.socket=e(this.options.host??void 0,this.options),this.socket.io.on("reconnect",()=>{Object.values(this.channels).forEach(e=>{e.subscribe()})})}getSocketIO(){if(typeof this.options.client<"u")return this.options.client;if(typeof window<"u"&&typeof window.io<"u")return window.io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}listen(e,t,n){return this.channel(e).listen(t,n)}channel(e){return this.channels[e]||(this.channels[e]=new Ts(this.socket,e,this.options)),this.channels[e]}privateChannel(e){return this.channels["private-"+e]||(this.channels["private-"+e]=new Ls(this.socket,"private-"+e,this.options)),this.channels["private-"+e]}presenceChannel(e){return this.channels["presence-"+e]||(this.channels["presence-"+e]=new Es(this.socket,"presence-"+e,this.options)),this.channels["presence-"+e]}leave(e){[e,"private-"+e,"presence-"+e].forEach(e=>{this.leaveChannel(e)})}leaveChannel(e){this.channels[e]&&(this.channels[e].unsubscribe(),delete this.channels[e])}socketId(){return this.socket.id}disconnect(){this.socket.disconnect()}}class js extends Rs{constructor(){super(...arguments),this.channels={}}connect(){}listen(e,t,n){return new Is}channel(e){return new Is}privateChannel(e){return new As}encryptedPrivateChannel(e){return new Ps}presenceChannel(e){return new Os}leave(e){}leaveChannel(e){}socketId(){return"fake-socket-id"}disconnect(){}}class Us{constructor(e){this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}channel(e){return this.connector.channel(e)}connect(){if("reverb"===this.options.broadcaster)this.connector=new Ds({...this.options,cluster:""});else if("pusher"===this.options.broadcaster)this.connector=new Ds(this.options);else if("ably"===this.options.broadcaster)this.connector=new Ds({...this.options,cluster:"",broadcaster:"pusher"});else if("socket.io"===this.options.broadcaster)this.connector=new $s(this.options);else if("null"===this.options.broadcaster)this.connector=new js(this.options);else{if("function"!=typeof this.options.broadcaster||!function(e){try{new e}catch(ql){if(ql instanceof Error&&ql.message.includes("is not a constructor"))return!1}return!0}(this.options.broadcaster))throw new Error(`Broadcaster ${typeof this.options.broadcaster} ${String(this.options.broadcaster)} is not supported.`);this.connector=new this.options.broadcaster(this.options)}}disconnect(){this.connector.disconnect()}join(e){return this.connector.presenceChannel(e)}leave(e){this.connector.leave(e)}leaveChannel(e){this.connector.leaveChannel(e)}leaveAllChannels(){for(const e in this.connector.channels)this.leaveChannel(e)}listen(e,t,n){return this.connector.listen(e,t,n)}private(e){return this.connector.privateChannel(e)}encryptedPrivate(e){if(this.connectorSupportsEncryptedPrivateChannels(this.connector))return this.connector.encryptedPrivateChannel(e);throw new Error(`Broadcaster ${typeof this.options.broadcaster} ${String(this.options.broadcaster)} does not support encrypted private channels.`)}connectorSupportsEncryptedPrivateChannels(e){return e instanceof Ds||e instanceof js}socketId(){return this.connector.socketId()}registerInterceptors(){typeof Vue<"u"&&null!=Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup(),"object"==typeof Turbo&&this.registerTurboRequestInterceptor()}registerVueRequestInterceptor(){Vue.http.interceptors.push((e,t)=>{this.socketId()&&e.headers.set("X-Socket-ID",this.socketId()),t()})}registerAxiosRequestInterceptor(){axios.interceptors.request.use(e=>(this.socketId()&&(e.headers["X-Socket-Id"]=this.socketId()),e))}registerjQueryAjaxSetup(){typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter((e,t,n)=>{this.socketId()&&n.setRequestHeader("X-Socket-Id",this.socketId())})}registerTurboRequestInterceptor(){document.addEventListener("turbo:before-fetch-request",e=>{e.detail.fetchOptions.headers["X-Socket-Id"]=this.socketId()})}}function Ns(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bs,Fs,Hs={exports:{}},Vs=(Bs||(Bs=1,window,Fs=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=256,r=function(){function e(e){void 0===e&&(e="="),this._paddingCharacter=e}return e.prototype.encodedLength=function(e){return this._paddingCharacter?(e+2)/3*4|0:(8*e+5)/6|0},e.prototype.encode=function(e){for(var t="",n=0;n<e.length-2;n+=3){var i=e[n]<<16|e[n+1]<<8|e[n+2];t+=this._encodeByte(i>>>18&63),t+=this._encodeByte(i>>>12&63),t+=this._encodeByte(i>>>6&63),t+=this._encodeByte(i>>>0&63)}var o=e.length-n;return o>0&&(i=e[n]<<16|(2===o?e[n+1]<<8:0),t+=this._encodeByte(i>>>18&63),t+=this._encodeByte(i>>>12&63),t+=2===o?this._encodeByte(i>>>6&63):this._paddingCharacter||"",t+=this._paddingCharacter||""),t},e.prototype.maxDecodedLength=function(e){return this._paddingCharacter?e/4*3|0:(6*e+7)/8|0},e.prototype.decodedLength=function(e){return this.maxDecodedLength(e.length-this._getPaddingLength(e))},e.prototype.decode=function(e){if(0===e.length)return new Uint8Array(0);for(var t=this._getPaddingLength(e),n=e.length-t,i=new Uint8Array(this.maxDecodedLength(n)),r=0,s=0,a=0,l=0,c=0,u=0,d=0;s<n-4;s+=4)l=this._decodeChar(e.charCodeAt(s+0)),c=this._decodeChar(e.charCodeAt(s+1)),u=this._decodeChar(e.charCodeAt(s+2)),d=this._decodeChar(e.charCodeAt(s+3)),i[r++]=l<<2|c>>>4,i[r++]=c<<4|u>>>2,i[r++]=u<<6|d,a|=l&o,a|=c&o,a|=u&o,a|=d&o;if(s<n-1&&(l=this._decodeChar(e.charCodeAt(s)),c=this._decodeChar(e.charCodeAt(s+1)),i[r++]=l<<2|c>>>4,a|=l&o,a|=c&o),s<n-2&&(u=this._decodeChar(e.charCodeAt(s+2)),i[r++]=c<<4|u>>>2,a|=u&o),s<n-3&&(d=this._decodeChar(e.charCodeAt(s+3)),i[r++]=u<<6|d,a|=d&o),0!==a)throw new Error("Base64Coder: incorrect characters for decoding");return i},e.prototype._encodeByte=function(e){var t=e;return t+=65,t+=25-e>>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-15,t+=62-e>>>8&3,String.fromCharCode(t)},e.prototype._decodeChar=function(e){var t=o;return t+=(42-e&e-44)>>>8&-256+e-43+62,t+=(46-e&e-48)>>>8&-256+e-47+63,t+=(47-e&e-58)>>>8&-256+e-48+52,(t+=(64-e&e-91)>>>8&-256+e-65+0)+((96-e&e-123)>>>8&-256+e-97+26)},e.prototype._getPaddingLength=function(e){var t=0;if(this._paddingCharacter){for(var n=e.length-1;n>=0&&e[n]===this._paddingCharacter;n--)t++;if(e.length<4||t>2)throw new Error("Base64Coder: incorrect padding")}return t},e}();t.Coder=r;var s=new r;t.encode=function(e){return s.encode(e)},t.decode=function(e){return s.decode(e)};var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._encodeByte=function(e){var t=e;return t+=65,t+=25-e>>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-13,t+=62-e>>>8&49,String.fromCharCode(t)},t.prototype._decodeChar=function(e){var t=o;return t+=(44-e&e-46)>>>8&-256+e-45+62,t+=(94-e&e-96)>>>8&-256+e-95+63,t+=(47-e&e-58)>>>8&-256+e-48+52,(t+=(64-e&e-91)>>>8&-256+e-65+0)+((96-e&e-123)>>>8&-256+e-97+26)},t}(r);t.URLSafeCoder=a;var l=new a;t.encodeURLSafe=function(e){return l.encode(e)},t.decodeURLSafe=function(e){return l.decode(e)},t.encodedLength=function(e){return s.encodedLength(e)},t.maxDecodedLength=function(e){return s.maxDecodedLength(e)},t.decodedLength=function(e){return s.decodedLength(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i="utf8: invalid string",o="utf8: invalid source encoding";function r(e){for(var t=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);if(o<128)t+=1;else if(o<2048)t+=2;else if(o<55296)t+=3;else{if(!(o<=57343))throw new Error(i);if(n>=e.length-1)throw new Error(i);n++,t+=4}}return t}t.encode=function(e){for(var t=new Uint8Array(r(e)),n=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?t[n++]=o:o<2048?(t[n++]=192|o>>6,t[n++]=128|63&o):o<55296?(t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|63&o):(i++,o=(1023&o)<<10,o|=1023&e.charCodeAt(i),o+=65536,t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|63&o)}return t},t.encodedLength=r,t.decode=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if(128&i){var r=void 0;if(i<224){if(n>=e.length)throw new Error(o);if(128!=(192&(s=e[++n])))throw new Error(o);i=(31&i)<<6|63&s,r=128}else if(i<240){if(n>=e.length-1)throw new Error(o);var s=e[++n],a=e[++n];if(128!=(192&s)||128!=(192&a))throw new Error(o);i=(15&i)<<12|(63&s)<<6|63&a,r=2048}else{if(!(i<248))throw new Error(o);if(n>=e.length-2)throw new Error(o);s=e[++n],a=e[++n];var l=e[++n];if(128!=(192&s)||128!=(192&a)||128!=(192&l))throw new Error(o);i=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&l,r=65536}if(i<r||i>=55296&&i<=57343)throw new Error(o);if(i>=65536){if(i>1114111)throw new Error(o);i-=65536,t.push(String.fromCharCode(55296|i>>10)),i=56320|1023&i}}t.push(String.fromCharCode(i))}return t.join("")}},function(e,t,n){e.exports=n(3).default},function(e,t,n){n.r(t);class i{constructor(e,t){this.lastId=0,this.prefix=e,this.name=t}create(e){this.lastId++;var t=this.lastId,n=this.prefix+t,i=this.name+"["+t+"]",o=!1,r=function(){o||(e.apply(null,arguments),o=!0)};return this[t]=r,{number:t,id:n,name:i,callback:r}}remove(e){delete this[e.number]}}var o=new i("_pusher_script_","Pusher.ScriptReceivers"),r="8.4.0",s=7,a=80,l=443,c="",u="sockjs.pusher.com",d=80,h=443,p="/pusher",f="stats.pusher.com",m="/pusher/auth",v="ajax",g=12e4,b=3e4,y=1e4,w={endpoint:"/pusher/user-auth",transport:"ajax"},_={endpoint:"/pusher/auth",transport:"ajax"},C="http://js.pusher.com",k="https://js.pusher.com",S="",x=new i("_pusher_dependencies","Pusher.DependenciesReceivers"),T=new class{constructor(e){this.options=e,this.receivers=e.receivers||o,this.loading={}}load(e,t,n){var i=this;if(i.loading[e]&&i.loading[e].length>0)i.loading[e].push(n);else{i.loading[e]=[n];var o=xt.createScriptRequest(i.getPath(e,t)),r=i.receivers.create(function(t){if(i.receivers.remove(r),i.loading[e]){var n=i.loading[e];delete i.loading[e];for(var s=function(e){e||o.cleanup()},a=0;a<n.length;a++)n[a](t,s)}});o.send(r)}}getRoot(e){var t=xt.getDocument().location.protocol;return(e&&e.useTLS||"https:"===t?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version}getPath(e,t){return this.getRoot(t)+"/"+e+this.options.suffix+".js"}}({cdn_http:C,cdn_https:k,version:r,suffix:S,receivers:x});const L={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var E,I,A=function(e){const t=L.urls[e];if(!t)return"";let n;return t.fullUrl?n=t.fullUrl:t.path&&(n=L.baseUrl+t.path),n?`See: ${n}`:""};(I=E||(E={})).UserAuthentication="user-authentication",I.ChannelAuthorization="channel-authorization";class P extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class O extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class M extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class D extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class $ extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class j extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class U extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(e,t){super(t),this.status=e,Object.setPrototypeOf(this,new.target.prototype)}}var B=function(e,t,n,i,o){const r=xt.createXHR();for(var s in r.open("POST",n.endpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.headers)r.setRequestHeader(s,n.headers[s]);if(null!=n.headersProvider){let e=n.headersProvider();for(var s in e)r.setRequestHeader(s,e[s])}return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){let e,t=!1;try{e=JSON.parse(r.responseText),t=!0}catch(ql){o(new N(200,`JSON returned from ${i.toString()} endpoint was invalid, yet status code was 200. Data was: ${r.responseText}`),null)}t&&o(null,e)}else{let e="";switch(i){case E.UserAuthentication:e=A("authenticationEndpoint");break;case E.ChannelAuthorization:e=`Clients must be authorized to join private or presence channels. ${A("authorizationEndpoint")}`}o(new N(r.status,`Unable to retrieve auth string from ${i.toString()} endpoint - received status: ${r.status} from ${n.endpoint}. ${e}`),null)}},r.send(t),r},F=String.fromCharCode,H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",V=function(e){var t=e.charCodeAt(0);return t<128?e:t<2048?F(192|t>>>6)+F(128|63&t):F(224|t>>>12&15)+F(128|t>>>6&63)+F(128|63&t)},z=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[H.charAt(n>>>18),H.charAt(n>>>12&63),t>=2?"=":H.charAt(n>>>6&63),t>=1?"=":H.charAt(63&n)].join("")},q=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,z)},W=class{constructor(e,t,n,i){this.clear=t,this.timer=e(()=>{this.timer&&(this.timer=i(this.timer))},n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function J(e){window.clearTimeout(e)}function X(e){window.clearInterval(e)}class Z extends W{constructor(e,t){super(setTimeout,J,e,function(e){return t(),null})}}class G extends W{constructor(e,t){super(setInterval,X,e,function(e){return t(),e})}}var K={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:e=>new Z(0,e),method(e,...t){var n=Array.prototype.slice.call(arguments,1);return function(t){return t[e].apply(t,n.concat(arguments))}}},Q=K;function Y(e,...t){for(var n=0;n<t.length;n++){var i=t[n];for(var o in i)i[o]&&i[o].constructor&&i[o].constructor===Object?e[o]=Y(e[o]||{},i[o]):e[o]=i[o]}return e}function ee(){for(var e=["Pusher"],t=0;t<arguments.length;t++)"string"==typeof arguments[t]?e.push(arguments[t]):e.push(ue(arguments[t]));return e.join(" : ")}function te(e,t){var n=Array.prototype.indexOf;if(null===e)return-1;if(n&&e.indexOf===n)return e.indexOf(t);for(var i=0,o=e.length;i<o;i++)if(e[i]===t)return i;return-1}function ne(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}function ie(e){var t=[];return ne(e,function(e,n){t.push(n)}),t}function oe(e,t,n){for(var i=0;i<e.length;i++)t.call(n||window,e[i],i,e)}function re(e,t){for(var n=[],i=0;i<e.length;i++)n.push(t(e[i],i,e,n));return n}function se(e,t){t=t||function(e){return!!e};for(var n=[],i=0;i<e.length;i++)t(e[i],i,e,n)&&n.push(e[i]);return n}function ae(e,t){var n={};return ne(e,function(i,o){(t&&t(i,o,e,n)||Boolean(i))&&(n[o]=i)}),n}function le(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1}function ce(e){return t=function(e){return"object"==typeof e&&(e=ue(e)),encodeURIComponent((t=e.toString(),q(t.replace(/[^\x00-\x7F]/g,V))));var t},n={},ne(e,function(e,i){n[i]=t(e)}),n;var t,n}function ue(e){try{return JSON.stringify(e)}catch(ql){return JSON.stringify((t=[],n=[],function e(i,o){var r,s,a;switch(typeof i){case"object":if(!i)return null;for(r=0;r<t.length;r+=1)if(t[r]===i)return{$ref:n[r]};if(t.push(i),n.push(o),"[object Array]"===Object.prototype.toString.apply(i))for(a=[],r=0;r<i.length;r+=1)a[r]=e(i[r],o+"["+r+"]");else for(s in a={},i)Object.prototype.hasOwnProperty.call(i,s)&&(a[s]=e(i[s],o+"["+JSON.stringify(s)+"]"));return a;case"number":case"string":case"boolean":return i}}(e,"$")))}var t,n}var de=new class{constructor(){this.globalLog=e=>{window.console&&window.console.log&&window.console.log(e)}}debug(...e){this.log(this.globalLog,e)}warn(...e){this.log(this.globalLogWarn,e)}error(...e){this.log(this.globalLogError,e)}globalLogWarn(e){window.console&&window.console.warn?window.console.warn(e):this.globalLog(e)}globalLogError(e){window.console&&window.console.error?window.console.error(e):this.globalLogWarn(e)}log(e,...t){var n=ee.apply(this,arguments);Ht.log?Ht.log(n):Ht.logToConsole&&e.bind(this)(n)}},he=function(e,t,n,i,o){void 0===n.headers&&null==n.headersProvider||de.warn(`To send headers with the ${i.toString()} request, you must use AJAX, rather than JSONP.`);var r=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var s=e.getDocument(),a=s.createElement("script");e.auth_callbacks[r]=function(e){o(null,e)};var l="Pusher.auth_callbacks['"+r+"']";a.src=n.endpoint+"?callback="+encodeURIComponent(l)+"&"+t;var c=s.getElementsByTagName("head")[0]||s.documentElement;c.insertBefore(a,c.firstChild)};class pe{constructor(e){this.src=e}send(e){var t=this,n="Error loading "+t.src;t.script=document.createElement("script"),t.script.id=e.id,t.script.src=t.src,t.script.type="text/javascript",t.script.charset="UTF-8",t.script.addEventListener?(t.script.onerror=function(){e.callback(n)},t.script.onload=function(){e.callback(null)}):t.script.onreadystatechange=function(){"loaded"!==t.script.readyState&&"complete"!==t.script.readyState||e.callback(null)},void 0===t.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(t.errorScript=document.createElement("script"),t.errorScript.id=e.id+"_error",t.errorScript.text=e.name+"('"+n+"');",t.script.async=t.errorScript.async=!1):t.script.async=!0;var i=document.getElementsByTagName("head")[0];i.insertBefore(t.script,i.firstChild),t.errorScript&&i.insertBefore(t.errorScript,t.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class fe{constructor(e,t){this.url=e,this.data=t}send(e){if(!this.request){var t=(i=this.data,re((o=ce(ae(i,function(e){return void 0!==e})),r=[],ne(o,function(e,t){r.push([t,e])}),r),Q.method("join","=")).join("&")),n=this.url+"/"+e.number+"?"+t;this.request=xt.createScriptRequest(n),this.request.send(e)}var i,o,r}cleanup(){this.request&&this.request.cleanup()}}var me={name:"jsonp",getAgent:function(e,t){return function(n,i){var r="http"+(t?"s":"")+"://"+(e.host||e.options.host)+e.options.path,s=xt.createJSONPRequest(r,n),a=xt.ScriptReceivers.create(function(t,n){o.remove(a),s.cleanup(),n&&n.host&&(e.host=n.host),i&&i(t,n)});s.send(a)}}};function ve(e,t,n){return e+(t.useTLS?"s":"")+"://"+(t.useTLS?t.hostTLS:t.hostNonTLS)+n}function ge(e,t){return"/app/"+e+"?protocol="+s+"&client=js&version="+r+(t?"&"+t:"")}var be={getInitial:function(e,t){return ve("ws",t,(t.httpPath||"")+ge(e,"flash=false"))}},ye={getInitial:function(e,t){return ve("http",t,(t.httpPath||"/pusher")+ge(e))}},we={getInitial:function(e,t){return ve("http",t,t.httpPath||"/pusher")},getPath:function(e,t){return ge(e)}};class _e{constructor(){this._callbacks={}}get(e){return this._callbacks[Ce(e)]}add(e,t,n){var i=Ce(e);this._callbacks[i]=this._callbacks[i]||[],this._callbacks[i].push({fn:t,context:n})}remove(e,t,n){if(e||t||n){var i=e?[Ce(e)]:ie(this._callbacks);t||n?this.removeCallback(i,t,n):this.removeAllCallbacks(i)}else this._callbacks={}}removeCallback(e,t,n){oe(e,function(e){this._callbacks[e]=se(this._callbacks[e]||[],function(e){return t&&t!==e.fn||n&&n!==e.context}),0===this._callbacks[e].length&&delete this._callbacks[e]},this)}removeAllCallbacks(e){oe(e,function(e){delete this._callbacks[e]},this)}}function Ce(e){return"_"+e}class ke{constructor(e){this.callbacks=new _e,this.global_callbacks=[],this.failThrough=e}bind(e,t,n){return this.callbacks.add(e,t,n),this}bind_global(e){return this.global_callbacks.push(e),this}unbind(e,t,n){return this.callbacks.remove(e,t,n),this}unbind_global(e){return e?(this.global_callbacks=se(this.global_callbacks||[],t=>t!==e),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(e,t,n){for(var i=0;i<this.global_callbacks.length;i++)this.global_callbacks[i](e,t);var o=this.callbacks.get(e),r=[];if(n?r.push(t,n):t&&r.push(t),o&&o.length>0)for(i=0;i<o.length;i++)o[i].fn.apply(o[i].context||window,r);else this.failThrough&&this.failThrough(e,t);return this}}class Se extends ke{constructor(e,t,n,i,o){super(),this.initialize=xt.transportConnectionInitializer,this.hooks=e,this.name=t,this.priority=n,this.key=i,this.options=o,this.state="new",this.timeline=o.timeline,this.activityTimeout=o.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return Boolean(this.hooks.handlesActivityChecks)}supportsPing(){return Boolean(this.hooks.supportsPing)}connect(){if(this.socket||"initialized"!==this.state)return!1;var e=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(e,this.options)}catch(ql){return Q.defer(()=>{this.onError(ql),this.changeState("closed")}),!1}return this.bindListeners(),de.debug("Connecting",{transport:this.name,url:e}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(e){return"open"===this.state&&(Q.defer(()=>{this.socket&&this.socket.send(e)}),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(e){this.emit("error",{type:"WebSocketError",error:e}),this.timeline.error(this.buildTimelineMessage({error:e.toString()}))}onClose(e){e?this.changeState("closed",{code:e.code,reason:e.reason,wasClean:e.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(e){this.emit("message",e)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=e=>{this.onError(e)},this.socket.onclose=e=>{this.onClose(e)},this.socket.onmessage=e=>{this.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(e,t){this.state=e,this.timeline.info(this.buildTimelineMessage({state:e,params:t})),this.emit(e,t)}buildTimelineMessage(e){return Y({cid:this.id},e)}}class xe{constructor(e){this.hooks=e}isSupported(e){return this.hooks.isSupported(e)}createConnection(e,t,n,i){return new Se(this.hooks,e,t,n,i)}}var Te=new xe({urls:be,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(xt.getWebSocketAPI())},isSupported:function(){return Boolean(xt.getWebSocketAPI())},getSocket:function(e){return xt.createWebSocket(e)}}),Le={urls:ye,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Ee=Y({getSocket:function(e){return xt.HTTPFactory.createStreamingSocket(e)}},Le),Ie=Y({getSocket:function(e){return xt.HTTPFactory.createPollingSocket(e)}},Le),Ae={isSupported:function(){return xt.isXHRSupported()}},Pe={ws:Te,xhr_streaming:new xe(Y({},Ee,Ae)),xhr_polling:new xe(Y({},Ie,Ae))},Oe=new xe({file:"sockjs",urls:we,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:T.getPath("sockjs",{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),Me={isSupported:function(e){return xt.isXDRSupported(e.useTLS)}},Re=new xe(Y({},Ee,Me)),De=new xe(Y({},Ie,Me));Pe.xdr_streaming=Re,Pe.xdr_polling=De,Pe.sockjs=Oe;var $e=Pe,je=new class extends ke{constructor(){super();var e=this;void 0!==window.addEventListener&&(window.addEventListener("online",function(){e.emit("online")},!1),window.addEventListener("offline",function(){e.emit("offline")},!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Ue{constructor(e,t,n){this.manager=e,this.transport=t,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(e,t,n,i){i=Y({},i,{activityTimeout:this.pingDelay});var o=this.transport.createConnection(e,t,n,i),r=null,s=function(){o.unbind("open",s),o.bind("closed",a),r=Q.now()},a=e=>{if(o.unbind("closed",a),1002===e.code||1003===e.code)this.manager.reportDeath();else if(!e.wasClean&&r){var t=Q.now()-r;t<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(t/2,this.minPingDelay))}};return o.bind("open",s),o}isSupported(e){return this.manager.isAlive()&&this.transport.isSupported(e)}}const Ne={decodeMessage:function(e){try{var t=JSON.parse(e.data),n=t.data;if("string"==typeof n)try{n=JSON.parse(t.data)}catch(ql){}var i={event:t.event,channel:t.channel,data:n};return t.user_id&&(i.user_id=t.user_id),i}catch(ql){throw{type:"MessageParseError",error:ql,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=Ne.decodeMessage(e);if("pusher:connection_established"===t.event){if(!t.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:t.data.socket_id,activityTimeout:1e3*t.data.activity_timeout}}if("pusher:error"===t.event)return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw"Invalid handshake"},getCloseAction:function(e){return e.code<4e3?e.code>=1002&&e.code<=1004?"backoff":null:4e3===e.code?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return 1e3!==e.code&&1001!==e.code?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}};var Be=Ne;class Fe extends ke{constructor(e,t){super(),this.id=e,this.transport=t,this.activityTimeout=t.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(e){return this.transport.send(e)}send_event(e,t,n){var i={event:e,data:t};return n&&(i.channel=n),de.debug("Event sent",i),this.send(Be.encodeMessage(i))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var e={message:e=>{var t;try{t=Be.decodeMessage(e)}catch(ql){this.emit("error",{type:"MessageParseError",error:ql,data:e.data})}if(void 0!==t){switch(de.debug("Event recd",t),t.event){case"pusher:error":this.emit("error",{type:"PusherError",data:t.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",t)}},activity:()=>{this.emit("activity")},error:e=>{this.emit("error",e)},closed:e=>{t(),e&&e.code&&this.handleCloseEvent(e),this.transport=null,this.emit("closed")}},t=()=>{ne(e,(e,t)=>{this.transport.unbind(t,e)})};ne(e,(e,t)=>{this.transport.bind(t,e)})}handleCloseEvent(e){var t=Be.getCloseAction(e),n=Be.getCloseError(e);n&&this.emit("error",n),t&&this.emit(t,{action:t,error:n})}}class He{constructor(e,t){this.transport=e,this.callback=t,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=e=>{var t;this.unbindListeners();try{t=Be.processHandshake(e)}catch(ql){return this.finish("error",{error:ql}),void this.transport.close()}"connected"===t.action?this.finish("connected",{connection:new Fe(t.id,this.transport),activityTimeout:t.activityTimeout}):(this.finish(t.action,{error:t.error}),this.transport.close())},this.onClosed=e=>{this.unbindListeners();var t=Be.getCloseAction(e)||"backoff",n=Be.getCloseError(e);this.finish(t,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(e,t){this.callback(Y({transport:this.transport,action:e},t))}}class Ve{constructor(e,t){this.timeline=e,this.options=t||{}}send(e,t){this.timeline.isEmpty()||this.timeline.send(xt.TimelineTransport.getAgent(this,e),t)}}class ze extends ke{constructor(e,t){super(function(t,n){de.debug("No callbacks on "+e+" for "+t)}),this.name=e,this.pusher=t,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(e,t){return t(null,{auth:""})}trigger(e,t){if(0!==e.indexOf("client-"))throw new P("Event '"+e+"' does not start with 'client-'");if(!this.subscribed){var n=A("triggeringClientEvents");de.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(e,t,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(e){var t=e.event,n=e.data;"pusher_internal:subscription_succeeded"===t?this.handleSubscriptionSucceededEvent(e):"pusher_internal:subscription_count"===t?this.handleSubscriptionCountEvent(e):0!==t.indexOf("pusher_internal:")&&this.emit(t,n,{})}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",e.data)}handleSubscriptionCountEvent(e){e.data.subscription_count&&(this.subscriptionCount=e.data.subscription_count),this.emit("pusher:subscription_count",e.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(e,t)=>{e?(this.subscriptionPending=!1,de.error(e.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:e.message},e instanceof N?{status:e.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:t.auth,channel_data:t.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class qe extends ze{authorize(e,t){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:e},t)}}class We{constructor(){this.reset()}get(e){return Object.prototype.hasOwnProperty.call(this.members,e)?{id:e,info:this.members[e]}:null}each(e){ne(this.members,(t,n)=>{e(this.get(n))})}setMyID(e){this.myID=e}onSubscription(e){this.members=e.presence.hash,this.count=e.presence.count,this.me=this.get(this.myID)}addMember(e){return null===this.get(e.user_id)&&this.count++,this.members[e.user_id]=e.user_info,this.get(e.user_id)}removeMember(e){var t=this.get(e.user_id);return t&&(delete this.members[e.user_id],this.count--),t}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Je extends qe{constructor(e,t){super(e,t),this.members=new We}authorize(e,t){super.authorize(e,(e,n)=>{return i=this,o=void 0,s=function*(){if(!e)if(null!=n.channel_data){var i=JSON.parse(n.channel_data);this.members.setMyID(i.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let e=A("authorizationEndpoint");return de.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`),void t("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}t(e,n)},new((r=void 0)||(r=Promise))(function(e,t){function n(e){try{l(s.next(e))}catch(ql){t(ql)}}function a(e){try{l(s.throw(e))}catch(ql){t(ql)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r(function(e){e(i)})).then(n,a)}l((s=s.apply(i,o||[])).next())});var i,o,r,s})}handleEvent(e){var t=e.event;if(0===t.indexOf("pusher_internal:"))this.handleInternalEvent(e);else{var n=e.data,i={};e.user_id&&(i.user_id=e.user_id),this.emit(t,n,i)}}handleInternalEvent(e){var t=e.event,n=e.data;switch(t){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(e);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(e);break;case"pusher_internal:member_added":var i=this.members.addMember(n);this.emit("pusher:member_added",i);break;case"pusher_internal:member_removed":var o=this.members.removeMember(n);o&&this.emit("pusher:member_removed",o)}}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(e.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Xe=n(1),Ze=n(0);class Ge extends qe{constructor(e,t,n){super(e,t),this.key=null,this.nacl=n}authorize(e,t){super.authorize(e,(e,n)=>{if(e)return void t(e,n);let i=n.shared_secret;i?(this.key=Object(Ze.decode)(i),delete n.shared_secret,t(null,n)):t(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)})}trigger(e,t){throw new $("Client events are not currently supported for encrypted channels")}handleEvent(e){var t=e.event,n=e.data;0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")?this.handleEncryptedEvent(t,n):super.handleEvent(e)}handleEncryptedEvent(e,t){if(!this.key)return void de.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!t.ciphertext||!t.nonce)return void de.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+t);let n=Object(Ze.decode)(t.ciphertext);if(n.length<this.nacl.secretbox.overheadLength)return void de.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);let i=Object(Ze.decode)(t.nonce);if(i.length<this.nacl.secretbox.nonceLength)return void de.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${i.length}`);let o=this.nacl.secretbox.open(n,i,this.key);if(null===o)return de.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,(t,r)=>{t?de.error(`Failed to make a request to the authEndpoint: ${r}. Unable to fetch new key, so dropping encrypted event`):(o=this.nacl.secretbox.open(n,i,this.key),null!==o?this.emit(e,this.getDataToEmit(o)):de.error("Failed to decrypt event with new key. Dropping encrypted event"))});this.emit(e,this.getDataToEmit(o))}getDataToEmit(e){let t=Object(Xe.decode)(e);try{return JSON.parse(t)}catch(n){return t}}}class Ke extends ke{constructor(e,t){super(),this.state="initialized",this.connection=null,this.key=e,this.options=t,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=xt.getNetwork();n.bind("online",()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)}),n.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(e){return!!this.connection&&this.connection.send(e)}send_event(e,t,n){return!!this.connection&&this.connection.send_event(e,t,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var e=(t,n)=>{t?this.runner=this.strategy.connect(0,e):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,e)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(e){this.timeline.info({action:"retry",delay:e}),e>0&&this.emit("connecting_in",Math.round(e/1e3)),this.retryTimer=new Z(e||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new Z(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Z(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Z(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(e){return Y({},e,{message:e=>{this.resetActivityCheck(),this.emit("message",e)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:e=>{this.emit("error",e)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(e){return Y({},e,{connected:e=>{this.activityTimeout=Math.min(this.options.activityTimeout,e.activityTimeout,e.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(e.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let e=e=>t=>{t.error&&this.emit("error",{type:"WebSocketError",error:t.error}),e(t)};return{tls_only:e(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:e(()=>{this.disconnect()}),backoff:e(()=>{this.retryIn(1e3)}),retry:e(()=>{this.retryIn(0)})}}setConnection(e){for(var t in this.connection=e,this.connectionCallbacks)this.connection.bind(t,this.connectionCallbacks[t]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var e in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(e,this.connectionCallbacks[e]);var t=this.connection;return this.connection=null,t}}updateState(e,t){var n=this.state;if(this.state=e,n!==e){var i=e;"connected"===i&&(i+=" with new socket ID "+t.socket_id),de.debug("State changed",n+" -> "+i),this.timeline.info({state:e,params:t}),this.emit("state_change",{previous:n,current:e}),this.emit(e,t)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class Qe{constructor(){this.channels={}}add(e,t){return this.channels[e]||(this.channels[e]=function(e,t){if(0===e.indexOf("private-encrypted-")){if(t.config.nacl)return Ye.createEncryptedChannel(e,t,t.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",i=A("encryptedChannelSupport");throw new $(`${n}. ${i}`)}if(0===e.indexOf("private-"))return Ye.createPrivateChannel(e,t);if(0===e.indexOf("presence-"))return Ye.createPresenceChannel(e,t);if(0===e.indexOf("#"))throw new O('Cannot create a channel with name "'+e+'".');return Ye.createChannel(e,t)}(e,t)),this.channels[e]}all(){return e=this.channels,t=[],ne(e,function(e){t.push(e)}),t;var e,t}find(e){return this.channels[e]}remove(e){var t=this.channels[e];return delete this.channels[e],t}disconnect(){ne(this.channels,function(e){e.disconnect()})}}var Ye={createChannels:()=>new Qe,createConnectionManager:(e,t)=>new Ke(e,t),createChannel:(e,t)=>new ze(e,t),createPrivateChannel:(e,t)=>new qe(e,t),createPresenceChannel:(e,t)=>new Je(e,t),createEncryptedChannel:(e,t,n)=>new Ge(e,t,n),createTimelineSender:(e,t)=>new Ve(e,t),createHandshake:(e,t)=>new He(e,t),createAssistantToTheTransportManager:(e,t,n)=>new Ue(e,t,n)};class et{constructor(e){this.options=e||{},this.livesLeft=this.options.lives||1/0}getAssistant(e){return Ye.createAssistantToTheTransportManager(this,e,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class tt{constructor(e,t){this.strategies=e,this.loop=Boolean(t.loop),this.failFast=Boolean(t.failFast),this.timeout=t.timeout,this.timeoutLimit=t.timeoutLimit}isSupported(){return le(this.strategies,Q.method("isSupported"))}connect(e,t){var n=this.strategies,i=0,o=this.timeout,r=null,s=(a,l)=>{l?t(null,l):(i+=1,this.loop&&(i%=n.length),i<n.length?(o&&(o*=2,this.timeoutLimit&&(o=Math.min(o,this.timeoutLimit))),r=this.tryStrategy(n[i],e,{timeout:o,failFast:this.failFast},s)):t(!0))};return r=this.tryStrategy(n[i],e,{timeout:o,failFast:this.failFast},s),{abort:function(){r.abort()},forceMinPriority:function(t){e=t,r&&r.forceMinPriority(t)}}}tryStrategy(e,t,n,i){var o=null,r=null;return n.timeout>0&&(o=new Z(n.timeout,function(){r.abort(),i(!0)})),r=e.connect(t,function(e,t){e&&o&&o.isRunning()&&!n.failFast||(o&&o.ensureAborted(),i(e,t))}),{abort:function(){o&&o.ensureAborted(),r.abort()},forceMinPriority:function(e){r.forceMinPriority(e)}}}}class nt{constructor(e){this.strategies=e}isSupported(){return le(this.strategies,Q.method("isSupported"))}connect(e,t){return function(e,n){var i=re(e,function(e,i,o,r){return e.connect(n,function(e,n){return function(i,o){n[e].error=i,i?function(e){return function(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0}(e,function(e){return Boolean(e.error)})}(n)&&t(!0):(oe(n,function(e){e.forceMinPriority(o.transport.priority)}),t(null,o))}}(i,r))});return{abort:function(){oe(i,it)},forceMinPriority:function(e){oe(i,function(t){t.forceMinPriority(e)})}}}(this.strategies,e)}}function it(e){e.error||e.aborted||(e.abort(),e.aborted=!0)}class ot{constructor(e,t,n){this.strategy=e,this.transports=t,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.usingTLS,i=function(e){var t=xt.getLocalStorage();if(t)try{var n=t[rt(e)];if(n)return JSON.parse(n)}catch(ql){st(e)}return null}(n),o=i&&i.cacheSkipCount?i.cacheSkipCount:0,r=[this.strategy];if(i&&i.timestamp+this.ttl>=Q.now()){var s=this.transports[i.transport];s&&(["ws","wss"].includes(i.transport)||o>3?(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),r.push(new tt([s],{timeout:2*i.latency+1e3,failFast:!0}))):o++)}var a=Q.now(),l=r.pop().connect(e,function i(s,c){s?(st(n),r.length>0?(a=Q.now(),l=r.pop().connect(e,i)):t(s)):(function(e,t,n,i){var o=xt.getLocalStorage();if(o)try{o[rt(e)]=ue({timestamp:Q.now(),transport:t,latency:n,cacheSkipCount:i})}catch(ql){}}(n,c.transport.name,Q.now()-a,o),t(null,c))});return{abort:function(){l.abort()},forceMinPriority:function(t){e=t,l&&l.forceMinPriority(t)}}}}function rt(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function st(e){var t=xt.getLocalStorage();if(t)try{delete t[rt(e)]}catch(ql){}}class at{constructor(e,{delay:t}){this.strategy=e,this.options={delay:t}}isSupported(){return this.strategy.isSupported()}connect(e,t){var n,i=this.strategy,o=new Z(this.options.delay,function(){n=i.connect(e,t)});return{abort:function(){o.ensureAborted(),n&&n.abort()},forceMinPriority:function(t){e=t,n&&n.forceMinPriority(t)}}}}class lt{constructor(e,t,n){this.test=e,this.trueBranch=t,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(e,t){return(this.test()?this.trueBranch:this.falseBranch).connect(e,t)}}class ct{constructor(e){this.strategy=e}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.strategy.connect(e,function(e,i){i&&n.abort(),t(e,i)});return n}}function ut(e){return function(){return e.isSupported()}}var dt,ht,pt={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new M),e.close()},t.onerror=function(t){e.emit("error",t),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}};class ft extends ke{constructor(e,t,n){super(),this.hooks=e,this.method=t,this.url=n}start(e){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},xt.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(e)}close(){this.unloader&&(xt.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(e,t){for(;;){var n=this.advanceBuffer(t);if(!n)break;this.emit("chunk",{status:e,data:n})}this.isBufferTooLong(t)&&this.emit("buffer_too_long")}advanceBuffer(e){var t=e.slice(this.position),n=t.indexOf("\n");return-1!==n?(this.position+=n+1,t.slice(0,n)):null}isBufferTooLong(e){return this.position===e.length&&e.length>262144}}(ht=dt||(dt={}))[ht.CONNECTING=0]="CONNECTING",ht[ht.OPEN=1]="OPEN",ht[ht.CLOSED=3]="CLOSED";var mt=dt,vt=1;function gt(e){var t=-1===e.indexOf("?")?"?":"&";return e+t+"t="+ +new Date+"&n="+vt++}function bt(e){return xt.randomInt(e)}var yt,wt,_t=class{constructor(e,t){this.hooks=e,this.session=bt(1e3)+"/"+function(){for(var e=[],t=0;t<8;t++)e.push(bt(32).toString(32));return e.join("")}(),this.location=function(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}(t),this.readyState=mt.CONNECTING,this.openStream()}send(e){return this.sendRaw(JSON.stringify([e]))}ping(){this.hooks.sendHeartbeat(this)}close(e,t){this.onClose(e,t,!0)}sendRaw(e){if(this.readyState!==mt.OPEN)return!1;try{return xt.createSocketRequest("POST",gt((t=this.location,n=this.session,t.base+"/"+n+"/xhr_send"))).start(e),!0}catch(ql){return!1}var t,n}reconnect(){this.closeStream(),this.openStream()}onClose(e,t,n){this.closeStream(),this.readyState=mt.CLOSED,this.onclose&&this.onclose({code:e,reason:t,wasClean:n})}onChunk(e){var t;if(200===e.status)switch(this.readyState===mt.OPEN&&this.onActivity(),e.data.slice(0,1)){case"o":t=JSON.parse(e.data.slice(1)||"{}"),this.onOpen(t);break;case"a":t=JSON.parse(e.data.slice(1)||"[]");for(var n=0;n<t.length;n++)this.onEvent(t[n]);break;case"m":t=JSON.parse(e.data.slice(1)||"null"),this.onEvent(t);break;case"h":this.hooks.onHeartbeat(this);break;case"c":t=JSON.parse(e.data.slice(1)||"[]"),this.onClose(t[0],t[1],!0)}}onOpen(e){var t,n,i;this.readyState===mt.CONNECTING?(e&&e.hostname&&(this.location.base=(t=this.location.base,n=e.hostname,(i=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(t))[1]+n+i[3])),this.readyState=mt.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(e){this.readyState===mt.OPEN&&this.onmessage&&this.onmessage({data:e})}onActivity(){this.onactivity&&this.onactivity()}onError(e){this.onerror&&this.onerror(e)}openStream(){this.stream=xt.createSocketRequest("POST",gt(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",e=>{this.onChunk(e)}),this.stream.bind("finished",e=>{this.hooks.onFinished(this,e)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(e){Q.defer(()=>{this.onError(e),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},Ct={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr_streaming"+e.queryString},onHeartbeat:function(e){e.sendRaw("[]")},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){e.onClose(1006,"Connection interrupted ("+t+")",!1)}},kt={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr"+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){200===t?e.reconnect():e.onClose(1006,"Connection interrupted ("+t+")",!1)}},St={getRequest:function(e){var t=new(xt.getXHRAPI());return t.onreadystatechange=t.onprogress=function(){switch(t.readyState){case 3:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText);break;case 4:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText),e.emit("finished",t.status),e.close()}},t},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},xt={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:o,DependenciesReceivers:x,getDefaultStrategy:function(e,t,n){var i={};function o(t,o,r,s,a){var l=n(e,t,o,r,s,a);return i[t]=l,l}var r,s=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),a=Object.assign({},s,{useTLS:!0}),l=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},u=new et({minPingDelay:1e4,maxPingDelay:e.activityTimeout}),d=new et({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),h=o("ws","ws",3,s,u),p=o("wss","ws",3,a,u),f=o("sockjs","sockjs",1,l),m=o("xhr_streaming","xhr_streaming",1,l,d),v=o("xdr_streaming","xdr_streaming",1,l,d),g=o("xhr_polling","xhr_polling",1,l),b=o("xdr_polling","xdr_polling",1,l),y=new tt([h],c),w=new tt([p],c),_=new tt([f],c),C=new tt([new lt(ut(m),m,v)],c),k=new tt([new lt(ut(g),g,b)],c),S=new tt([new lt(ut(C),new nt([C,new at(k,{delay:4e3})]),k)],c),x=new lt(ut(S),S,_);return r=t.useTLS?new nt([y,new at(x,{delay:2e3})]):new nt([y,new at(w,{delay:2e3}),new at(x,{delay:5e3})]),new ot(new ct(new lt(ut(h),r,x)),i,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},Transports:$e,transportConnectionInitializer:function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),T.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()},HTTPFactory:{createStreamingSocket(e){return this.createSocket(Ct,e)},createPollingSocket(e){return this.createSocket(kt,e)},createSocket:(e,t)=>new _t(e,t),createXHR(e,t){return this.createRequest(St,e,t)},createRequest:(e,t,n)=>new ft(e,t,n),createXDR:function(e,t){return this.createRequest(pt,e,t)}},TimelineTransport:me,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(e){window.Pusher=e;var t=()=>{this.onDocumentBody(e.ready)};window.JSON?t():T.load("json2",{},t)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:B,jsonp:he}),onDocumentBody(e){document.body?e():setTimeout(()=>{this.onDocumentBody(e)},0)},createJSONPRequest:(e,t)=>new fe(e,t),createScriptRequest:e=>new pe(e),getLocalStorage(){try{return window.localStorage}catch(ql){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>je,createWebSocket(e){return new(this.getWebSocketAPI())(e)},createSocketRequest(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(0===t.indexOf("https:")))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var e=this.getXHRAPI();return Boolean(e)&&void 0!==(new e).withCredentials},isXDRSupported(e){var t=e?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===t},addUnloadListener(e){void 0!==window.addEventListener?window.addEventListener("unload",e,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",e)},removeUnloadListener(e){void 0!==window.addEventListener?window.removeEventListener("unload",e,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",e)},randomInt:e=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*e)};(wt=yt||(yt={}))[wt.ERROR=3]="ERROR",wt[wt.INFO=6]="INFO",wt[wt.DEBUG=7]="DEBUG";var Tt=yt;class Lt{constructor(e,t,n){this.key=e,this.session=t,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(e,t){e<=this.options.level&&(this.events.push(Y({},t,{timestamp:Q.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(e){this.log(Tt.ERROR,e)}info(e){this.log(Tt.INFO,e)}debug(e){this.log(Tt.DEBUG,e)}isEmpty(){return 0===this.events.length}send(e,t){var n=Y({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],e(n,(e,n)=>{e||this.sent++,t&&t(e,n)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Et{constructor(e,t,n,i){this.name=e,this.priority=t,this.transport=n,this.options=i||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(e,t){if(!this.isSupported())return It(new U,t);if(this.priority<e)return It(new R,t);var n=!1,i=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),o=null,r=function(){i.unbind("initialized",r),i.connect()},s=function(){o=Ye.createHandshake(i,function(e){n=!0,c(),t(null,e)})},a=function(e){c(),t(e)},l=function(){var e;c(),e=ue(i),t(new D(e))},c=function(){i.unbind("initialized",r),i.unbind("open",s),i.unbind("error",a),i.unbind("closed",l)};return i.bind("initialized",r),i.bind("open",s),i.bind("error",a),i.bind("closed",l),i.initialize(),{abort:()=>{n||(c(),o?o.close():i.close())},forceMinPriority:e=>{n||this.priority<e&&(o?o.close():i.close())}}}}function It(e,t){return Q.defer(function(){t(e)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:At}=xt;var Pt=function(e,t,n,i,o,r){var s,a=At[n];if(!a)throw new j(n);return e.enabledTransports&&-1===te(e.enabledTransports,t)||e.disabledTransports&&-1!==te(e.disabledTransports,t)?s=Ot:(o=Object.assign({ignoreNullOrigin:e.ignoreNullOrigin},o),s=new Et(t,i,r?r.getAssistant(a):a,o)),s},Ot={isSupported:function(){return!1},connect:function(e,t){var n=Q.defer(function(){t(new U)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Mt(e){return e.httpHost?e.httpHost:e.cluster?`sockjs-${e.cluster}.pusher.com`:u}function Rt(e){return e.wsHost?e.wsHost:`ws-${e.cluster}.pusher.com`}function Dt(e){return"https:"===xt.getProtocol()||!1!==e.forceTLS}function $t(e){return"enableStats"in e?e.enableStats:"disableStats"in e&&!e.disableStats}function jt(e){const t=Object.assign(Object.assign({},w),e.userAuthentication);return"customHandler"in t&&null!=t.customHandler?t.customHandler:(e=>{if(void 0===xt.getAuthorizers()[e.transport])throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{const i=((e,t)=>{var n="socket_id="+encodeURIComponent(e.socketId);for(var i in t.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t.params[i]);if(null!=t.paramsProvider){let e=t.paramsProvider();for(var i in e)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e[i])}return n})(t,e);xt.getAuthorizers()[e.transport](xt,i,e,E.UserAuthentication,n)}})(t)}function Ut(e,t){const n=function(e,t){let n;return"channelAuthorization"in e?n=Object.assign(Object.assign({},_),e.channelAuthorization):(n={transport:e.authTransport||v,endpoint:e.authEndpoint||m},"auth"in e&&("params"in e.auth&&(n.params=e.auth.params),"headers"in e.auth&&(n.headers=e.auth.headers)),"authorizer"in e&&(n.customHandler=((e,t,n)=>{const i={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return(t,o)=>{const r=e.channel(t.channelName);n(r,i).authorize(t.socketId,o)}})(t,n,e.authorizer))),n}(e,t);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(e=>{if(void 0===xt.getAuthorizers()[e.transport])throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{const i=((e,t)=>{var n="socket_id="+encodeURIComponent(e.socketId);for(var i in n+="&channel_name="+encodeURIComponent(e.channelName),t.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t.params[i]);if(null!=t.paramsProvider){let e=t.paramsProvider();for(var i in e)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e[i])}return n})(t,e);xt.getAuthorizers()[e.transport](xt,i,e,E.ChannelAuthorization,n)}})(n)}class Nt extends ke{constructor(e){super(function(e,t){de.debug(`No callbacks on watchlist events for ${e}`)}),this.pusher=e,this.bindWatchlistInternalEvent()}handleEvent(e){e.data.events.forEach(e=>{this.emit(e.name,e)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",e=>{"pusher_internal:watchlist_events"===e.event&&this.handleEvent(e)})}}class Bt extends ke{constructor(e){super(function(e,t){de.debug("No callbacks on user for "+e)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(e,t)=>{if(e)return de.warn(`Error during signin: ${e}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:t.auth,user_data:t.user_data})},this.pusher=e,this.pusher.connection.bind("state_change",({previous:e,current:t})=>{"connected"!==e&&"connected"===t&&this._signin(),"connected"===e&&"connected"!==t&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new Nt(e),this.pusher.connection.bind("message",e=>{"pusher:signin_success"===e.event&&this._onSigninSuccess(e.data),this.serverToUserChannel&&this.serverToUserChannel.name===e.channel&&this.serverToUserChannel.handleEvent(e)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(e){try{this.user_data=JSON.parse(e.user_data)}catch(ql){return de.error(`Failed parsing user data after signin: ${e.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return de.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new ze(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((e,t)=>{0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")&&this.emit(e,t)}),(e=>{e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.pusher.connection.state||e.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:e,resolve:t}=function(){let e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}();e.done=!1;const n=()=>{e.done=!0};e.then(n).catch(n),this.signinDonePromise=e,this._signinDoneResolve=t}}class Ft{static ready(){Ft.isReady=!0;for(var e=0,t=Ft.instances.length;e<t;e++)Ft.instances[e].connect()}static getClientFeatures(){return ie(ae({ws:xt.Transports.ws},function(e){return e.isSupported({})}))}constructor(e,t){!function(e){if(null==e)throw"You must pass your app key when you instantiate Pusher."}(e),function(e){if(null==e)throw"You must pass an options object";if(null==e.cluster)throw"Options object must provide a cluster";"disableStats"in e&&de.warn("The disableStats option is deprecated in favor of enableStats")}(t),this.key=e,this.config=function(e,t){let n={activityTimeout:e.activityTimeout||g,cluster:e.cluster,httpPath:e.httpPath||p,httpPort:e.httpPort||d,httpsPort:e.httpsPort||h,pongTimeout:e.pongTimeout||b,statsHost:e.statsHost||f,unavailableTimeout:e.unavailableTimeout||y,wsPath:e.wsPath||c,wsPort:e.wsPort||a,wssPort:e.wssPort||l,enableStats:$t(e),httpHost:Mt(e),useTLS:Dt(e),wsHost:Rt(e),userAuthenticator:jt(e),channelAuthorizer:Ut(e,t)};return"disabledTransports"in e&&(n.disabledTransports=e.disabledTransports),"enabledTransports"in e&&(n.enabledTransports=e.enabledTransports),"ignoreNullOrigin"in e&&(n.ignoreNullOrigin=e.ignoreNullOrigin),"timelineParams"in e&&(n.timelineParams=e.timelineParams),"nacl"in e&&(n.nacl=e.nacl),n}(t,this),this.channels=Ye.createChannels(),this.global_emitter=new ke,this.sessionID=xt.randomInt(1e9),this.timeline=new Lt(this.key,this.sessionID,{cluster:this.config.cluster,features:Ft.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Tt.INFO,version:r}),this.config.enableStats&&(this.timelineSender=Ye.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+xt.TimelineTransport.name})),this.connection=Ye.createConnectionManager(this.key,{getStrategy:e=>xt.getDefaultStrategy(this.config,e,Pt),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",e=>{var t=0===e.event.indexOf("pusher_internal:");if(e.channel){var n=this.channel(e.channel);n&&n.handleEvent(e)}t||this.global_emitter.emit(e.event,e.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",e=>{de.warn(e)}),Ft.instances.push(this),this.timeline.info({instances:Ft.instances.length}),this.user=new Bt(this),Ft.isReady&&this.connect()}channel(e){return this.channels.find(e)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var e=this.connection.isUsingTLS(),t=this.timelineSender;this.timelineSenderTimer=new G(6e4,function(){t.send(e)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(e,t,n){return this.global_emitter.bind(e,t,n),this}unbind(e,t,n){return this.global_emitter.unbind(e,t,n),this}bind_global(e){return this.global_emitter.bind_global(e),this}unbind_global(e){return this.global_emitter.unbind_global(e),this}unbind_all(e){return this.global_emitter.unbind_all(),this}subscribeAll(){var e;for(e in this.channels.channels)this.channels.channels.hasOwnProperty(e)&&this.subscribe(e)}subscribe(e){var t=this.channels.add(e,this);return t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.connection.state||t.subscribe(),t}unsubscribe(e){var t=this.channels.find(e);t&&t.subscriptionPending?t.cancelSubscription():(t=this.channels.remove(e))&&t.subscribed&&t.unsubscribe()}send_event(e,t,n){return this.connection.send_event(e,t,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Ft.instances=[],Ft.isReady=!1,Ft.logToConsole=!1,Ft.Runtime=xt,Ft.ScriptReceivers=xt.ScriptReceivers,Ft.DependenciesReceivers=xt.DependenciesReceivers,Ft.auth_callbacks=xt.auth_callbacks;var Ht=t.default=Ft;xt.setup(Ft)}])},Hs.exports=Fs()),Hs.exports);const zs=Ns(Vs);function qs(){if("undefined"==typeof window)return null;const e=window;return e.AudioContext||e.webkitAudioContext||null}class Ws{constructor(e){__publicField(this,"audio",null),__publicField(this,"unlocked",!1),this.audioUrl=e}ensureAudio(){return this.audio||(this.audio=new Audio(this.audioUrl),this.audio.preload="auto"),this.audio}async preload(){this.ensureAudio()}async unlock(){if(this.unlocked)return!0;const e=this.ensureAudio();try{return e.muted=!0,e.volume=0,e.currentTime=0,await e.play(),e.pause(),e.currentTime=0,this.unlocked=!0,!0}catch(t){return e.pause(),e.currentTime=0,!1}finally{e.muted=!1,e.volume=1}}async play(){const e=this.ensureAudio();e.currentTime=0,await e.play()}dispose(){this.audio&&(this.audio.pause(),this.audio.currentTime=0,this.audio.src="",this.audio.load(),this.audio=null),this.unlocked=!1}isUnlocked(){return this.unlocked}}class Js{constructor(e,t){__publicField(this,"audioContext",null),__publicField(this,"encodedSoundData",null),__publicField(this,"encodedSoundPromise",null),__publicField(this,"decodedBuffer",null),__publicField(this,"decodePromise",null),__publicField(this,"disposed",!1),__publicField(this,"unlocked",!1),this.audioUrl=e,this.observer=t}ensureAudioContext(){if(this.audioContext)return this.audioContext;const e=qs();if(!e)throw new Error("AudioContext is not supported.");return this.audioContext=new e,this.audioContext.onstatechange=()=>{var e,t;if(this.disposed||!this.audioContext)return;const n=String(this.audioContext.state);this.unlocked&&function(e){return"suspended"===e||"interrupted"===e}(n)&&(this.unlocked=!1,null==(t=(e=this.observer).onUnlockInvalidated)||t.call(e))},this.audioContext}async ensureEncodedSoundData(){return this.encodedSoundData?this.encodedSoundData:(this.encodedSoundPromise||(this.encodedSoundPromise=async function(e){const t=await fetch(e);if(!t.ok)throw new Error(`Audio fetch failed: ${t.status}`);return t.arrayBuffer()}(this.audioUrl).then(e=>(this.encodedSoundData=e,e))),this.encodedSoundPromise)}async ensureDecodedBuffer(e){return this.decodedBuffer?this.decodedBuffer:(this.decodePromise||(this.decodePromise=(async()=>{const t=await this.ensureEncodedSoundData(),n=await e.decodeAudioData(t.slice(0));if(this.disposed)throw new Error("Notification backend disposed during audio decode.");return this.decodedBuffer=n,n})()),this.decodePromise)}async warmUpGraph(e){const t=e.createBufferSource();t.buffer=e.createBuffer(1,1,e.sampleRate);const n=e.createGain();n.gain.value=0,t.connect(n),n.connect(e.destination),t.start(0),t.stop(e.currentTime+.001),await new Promise(e=>{t.onended=()=>e()})}async preload(){await this.ensureEncodedSoundData()}async unlock(){if(this.unlocked)return!0;const e=this.ensureAudioContext(),t=e.resume(),n=this.ensureDecodedBuffer(e);return await t,"running"===String(e.state)&&(await this.warmUpGraph(e),await n,this.unlocked=!0,!0)}async play(){var e,t;const n=this.ensureAudioContext(),i=String(n.state);if("running"!==i)throw this.unlocked=!1,null==(t=(e=this.observer).onUnlockInvalidated)||t.call(e),new Error(`Safari audio context is not running (${i}).`);const o=await this.ensureDecodedBuffer(n),r=n.createBufferSource();r.buffer=o;const s=n.createGain();s.gain.value=1,r.connect(s),s.connect(n.destination),r.start(0)}dispose(){this.disposed=!0,this.unlocked=!1,this.encodedSoundData=null,this.encodedSoundPromise=null,this.decodedBuffer=null,this.decodePromise=null,this.audioContext&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null)}isUnlocked(){return this.unlocked}}const Xs="attachments";let Zs=null;function Gs(){return function(){try{return"undefined"!=typeof indexedDB&&null!==indexedDB}catch(ql){return!1}}()?Zs?Promise.resolve(Zs):new Promise((e,t)=>{const n=indexedDB.open("chat_attachments_db",1);n.onerror=()=>{t(new Error("Не удалось открыть IndexedDB"))},n.onsuccess=()=>{Zs=n.result,e(Zs)},n.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(Xs)||t.createObjectStore(Xs,{keyPath:"id"}).createIndex("timestamp","timestamp",{unique:!1})}}):Promise.reject(new Error("IndexedDB недоступен в этом браузере"))}async function Ks(e,t,n,i,o,r,s){const a=await Gs(),l=function(e,t,n){return`${e}_${t}_${n}_${Date.now()}`}(e,t,n),c={id:l,base64:i,filename:o,type:r,size:s,timestamp:Date.now()};return new Promise((e,t)=>{const n=a.transaction([Xs],"readwrite").objectStore(Xs).put(c);n.onsuccess=()=>e(l),n.onerror=()=>t(new Error("Не удалось сохранить вложение"))})}async function Qs(e){const t=await Gs();return new Promise((n,i)=>{const o=t.transaction([Xs],"readwrite").objectStore(Xs).delete(e);o.onsuccess=()=>n(),o.onerror=()=>i(new Error("Не удалось удалить вложение"))})}const Ys={class:"robotmia-launcher-list"},ea=["onClick"],ta={class:"robotmia-launcher-row-icon"},na=["src","alt","data-icon"],ia={class:"robotmia-launcher-row-label"},oa={key:1,class:"robotmia-launcher-grid"},ra=["onClick"],sa={class:"robotmia-launcher-icon"},aa=["src","alt","data-icon"],la={class:"robotmia-launcher-label"},ca=["data-position"],ua={class:"robotmia-messenger-list"},da=["onClick"],ha={class:"robotmia-messenger-icon"},pa=["src","alt","data-icon"],fa={key:0},ma={key:0,class:"robotmia-divider"},va={key:0,class:"robotmia-divider"},ga={key:0},ba={key:0,class:"robotmia-oval-text"},ya={class:"robotmia-title"},wa={key:0,class:"robotmia-subtitle"},_a={key:1,class:"robotmia-role"},Ca={key:0,class:"robotmia-logo-svg",xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50"},ka=["href"],Sa={key:1,fill:"currentColor",width:"30px",height:"30px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},xa={key:0,class:"robotmia-chat"},Ta={key:0,class:"robotmia-history-loader","aria-hidden":"true"},La=["data-id"],Ea=["data-id"],Ia={key:0,class:"robotmia-reply robotmia-reply-user"},Aa={class:"robotmia-reply-author"},Pa={class:"robotmia-reply-text"},Oa=["innerHTML"],Ma=["src","onClick","onLoad"],Ra=["onClick","disabled","title"],Da={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},$a={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},ja={class:"robotmia-audio-info"},Ua={class:"robotmia-audio-timeline"},Na={class:"robotmia-current-time"},Ba=["onClick"],Fa=["src","onLoadedmetadata","onTimeupdate","onEnded","onError","onStalled"],Ha=["src"],Va={key:1,class:"robotmia-video-loading"},za={class:"robotmia-attachment-content"},qa=["onClick"],Wa={key:0,class:"robotmia-delivery-status"},Ja={key:0},Xa={key:1},Za={key:2},Ga=["data-id"],Ka={key:0,class:"robotmia-name"},Qa={key:1,class:"robotmia-reply robotmia-reply-operator"},Ya={class:"robotmia-reply-author"},el={class:"robotmia-reply-text"},tl=["innerHTML"],nl={key:3,class:"robotmia-widget-keyboard"},il=["disabled","onClick"],ol={key:4,class:"robotmia-attachments"},rl=["onClick"],sl={class:"robotmia-attachment-filename"},al=["onClick","disabled","title"],ll={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},cl={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},ul={class:"robotmia-audio-info"},dl={class:"robotmia-audio-timeline"},hl={class:"robotmia-current-time"},pl=["onClick"],fl=["src","onLoadedmetadata","onTimeupdate","onEnded","onError","onStalled"],ml=["src"],vl={key:1,class:"robotmia-video-loading"},gl=["src","alt","onClick"],bl={class:"robotmia-time robotmia-small",style:{"text-align":"left"}},yl={key:0,class:"robotmia-image-popup"},wl=["src"],_l={key:0,class:"robotmia-file-errors"},Cl={class:"robotmia-error-text"},kl=["onClick"],Sl={class:"robotmia-chat-footer"},xl={key:0,class:"robotmia-attached-chips"},Tl=["src","alt"],Ll={class:"robotmia-chip-name"},El=["onClick"],Il={class:"robotmia-input-wrapper"},Al=["onKeyup"],Pl=["disabled"],Ol={class:"robotmia-extra-controls"},Ml={key:0,class:"robotmia-file-count"},Rl={key:0,class:"robotmia-emoji-panel"},Dl=["onClick"],$l={key:0,class:"robotmia-full-screen-menu"},jl={class:"robotmia-menu-container"},Ul={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"var(--primary-color)"},Nl={key:1,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"var(--primary-color)"},Bl={class:"robotmia-menu-item-text"},Fl="local-greeting",Hl="robotmia_chat_height",Vl="-choice",zl=Hr({__name:"ChatWidget",setup(e){const t=window.__CHAT_WIDGET_CONFIG__||{},n=t.token,i=t.contactId;function o(e){if("string"!=typeof e)return null;const t=e.trim();return t&&"null"!==t&&"undefined"!==t?t:null}let r=function(e,t){const n=o(t);if(!n)return"";if("undefined"==typeof window||!e)return n;const i=`widget_contact_id_${e}`;try{const e=o(window.localStorage.getItem(i));if(e)return e;window.localStorage.setItem(i,n)}catch(r){return n}return n}(n,i);const s="left"===t.position||"center"===t.position?t.position:"right";let a="chat_messages_"+r,l="operator_"+r,c="chat_oldest_"+r;const u=bt(!0),d=bt(!1),h=bt(null),p=t.mobile||!1,f=!0===t.instantMobile,m=!0===t.isMobileDevice||"undefined"!=typeof window&&!!window.matchMedia&&window.matchMedia("(max-width: 768px)").matches,v=p||m,g=!0===t.chatInSeparateWindow,b=!0===t.sendMessageOnOpen,y="string"==typeof t.openMessageText?t.openMessageText.trim():"",w="string"==typeof t.greetingText?t.greetingText.trim():"",_=Array.isArray(t.methodLinks)?t.methodLinks:[],C=!0===t.desktopShowWidgetInitially,k=g&&!m&&C,S=t.ratingMenuConfig||{},x=t.contactFormConfig||{},T=Array.isArray(x.fields)?x.fields:[],L=!0===x.visible,E=!0===x.requireConsent,I=!0===x.repeatEachVisit,A=t.apiBaseUrl,P=`${A}/api/widget`,O=t.reverb||{},M=t.broadcastAuthEndpoint||`${P}/${encodeURIComponent(n)}/broadcasting/auth`,R=t.imageLogo,D="number"==typeof t.maxMessageLength&&t.maxMessageLength>0?t.maxMessageLength:null,$=bt(S.visible),j=bt(!1),N=bt(!1),B=bt({}),F=bt(null),H=bt(!1),z=bt(!p);let q=null;const W=bt(!1),J=bt(!1),X=bt(!1),G=bt(!1);let K=null,Q=null,Y=null;const ee=bt(!1),te=bt(""),ne=bt(null);function ie(){const e=ne.value;e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)}en(te,()=>{Nt(ie)});const oe=bt(JSON.parse(localStorage.getItem(l)??null)),re=bt(null),se=Io(()=>{var e,t;return[(null==(e=re.value)?void 0:e.description)||S.description,null==(t=re.value)?void 0:t.scale].filter(Boolean).join("\n")}),ae=bt([]),le=bt([]);function ce(){le.value.forEach(e=>{if(e.url)try{URL.revokeObjectURL(e.url)}catch(t){}})}en(ae,e=>{ce(),le.value=(e||[]).map(e=>{const t=!!(e&&e.type&&e.type.startsWith("image/"));return{name:e.name,isImage:t,url:t?URL.createObjectURL(e):null}})});const ue=bt([]),de=Io(()=>ue.value.some(e=>!he(e)));function he(e){return(null==e?void 0:e.id)===Fl}function pe(){return w?[{id:Fl,type:"user",text:w,time:(new Date).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"}),attachments:[],buttons:[],createdAt:Date.now()}]:[]}function fe(e){ue.value.some(he)&&e.append("greeting","1")}let me=`contact_form_submitted_${r}`;const ve=(()=>{try{return I?window.sessionStorage:window.localStorage}catch(e){return window.localStorage}})();function ge(){try{return ve.getItem(me)}catch(e){return null}}if(I)try{window.localStorage.removeItem(me)}catch($i){}const be=bt(ge()),ye=bt(L),we=bt(localStorage.getItem(`lastRatingTime_${r}`)||null),_e=bt(!1),Ce=bt(!1),ke=bt(null),Se=Io(()=>(ue.value||[]).some(e=>!!(e&&e.id?String(e.id):"").startsWith("temp-")&&(null===e.delivered||void 0===e.delivered))),xe=Io(()=>[...te.value].length),Te=Io(()=>null!==D&&xe.value>D),Le=Io(()=>null!==D&&xe.value>=Math.floor(.8*D)),Ee=Io(()=>_e.value||Se.value||Te.value);let Ie=null,Ae=!1,Pe=0;function Oe(){try{const e=In&&In.connector?In.connector.pusher:null;return{echo:!!In,channel:!!An,ws:e&&e.connection&&e.connection.state?e.connection.state:"none"}}catch($i){return{echo:!!In,channel:!!An,ws:"err"}}}function Me(){let e=null;return(ue.value||[]).forEach(t=>{if((t&&t.id?String(t.id):"").startsWith("temp-")&&(null===t.delivered||void 0===t.delivered)){const n=t.sentTimestamp||t.createdAt;n&&(null===e||n<e)&&(e=n)}}),e?Date.now()-e:null}function Re(e,t){if(n&&r)try{const i=JSON.stringify({event:e,realtime:Oe(),isMobileDevice:m,chatInSeparateWindow:g,...t||{}}),o=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/diag`;"undefined"!=typeof navigator&&navigator.sendBeacon?navigator.sendBeacon(o,new Blob([i],{type:"application/json"})):fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:i,keepalive:!0})}catch($i){}}en(Se,e=>{Ie&&(clearTimeout(Ie),Ie=null),e?(Ae=!1,Ie=setTimeout(()=>{if(Se.value&&!Ae&&!gn){Ae=!0;const e=(ue.value||[]).filter(e=>(e&&e.id?String(e.id):"").startsWith("temp-")&&(null===e.delivered||void 0===e.delivered)).length;Re("send_stuck",{pendingMs:Me(),pendingCount:e})}},12e3)):Ae=!1});const De=Io(()=>!p||H.value&&z.value||X.value),$e=Array.isArray(t.transitionLinks)?t.transitionLinks:[],je=!1!==t.panelLabels,Ue=bt(!1),Ne=bt(null),Be=bt(null),Fe=bt(0);let He=0,Ve=null;function ze(){Ve&&(clearTimeout(Ve),Ve=null)}function qe(){ze(),Ue.value&&(Ve=setTimeout(()=>{Ve=null,Ue.value=!1},160))}const We=bt(!1),Je=bt(!g||g&&!m&&C),Xe=bt(!1),Ze=bt(null);let Ge=!1;function Ke(e){if(!g||!m)return;if("undefined"==typeof document)return;if(Ge===e)return;const t=document.getElementById("chat-widget-container");t&&(Ge=e,t.style.backgroundColor=e?"#fff":"transparent")}function Qe(e){if("undefined"==typeof document||!m)return;const t="undefined"!=typeof window&&!!window.matchMedia&&window.matchMedia("(max-width: 480px)").matches;if(g||t)if(e){if(document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",g){document.body.style.height="100%",document.documentElement.style.height="100%";const e=document.querySelector('meta[name="viewport"]');e&&!e.getAttribute("data-widget-original-viewport")&&(e.setAttribute("data-widget-original-viewport",e.getAttribute("content")||""),e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"))}}else{document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.height="",document.documentElement.style.height="";const e=document.querySelector('meta[name="viewport"]');if(e){const t=e.getAttribute("data-widget-original-viewport");null!==t&&(e.setAttribute("content",t),e.removeAttribute("data-widget-original-viewport"))}}}const Ye=Io(()=>{if(!g||!Xe.value)return{};if(m)return{};const e=Ze.value;if(!e)return{position:"fixed",right:"20px",bottom:"90px",width:"380px",maxWidth:"calc(100vw - 16px)"};const t="undefined"!=typeof window?window.innerWidth:0,n="undefined"!=typeof window?window.innerHeight:0;let i=e.left+(e.width||0)/2-190;i=Math.max(8,Math.min(t-380-8,i));let o=e.bottom+8;const r=Math.max(8,n-360);return o=Math.min(o,r),{position:"fixed",left:`${i}px`,top:`${o}px`,width:"380px",maxWidth:"calc(100vw - 16px)"}}),et=!("undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(pointer: coarse)").matches||g),tt=bt(null),nt=bt(!1);if(et&&"undefined"!=typeof localStorage){const e=parseInt(localStorage.getItem(Hl)||"",10);Number.isFinite(e)&&(tt.value=ot(e))}const it=Io(()=>tt.value?{"--rm-chat-h":`${tt.value}px`}:{});function ot(e){const t="undefined"!=typeof window?window.innerHeight:800,n=Math.round(.8*t);return Math.max(380,Math.min(n,Math.round(e)))}let rt=0,st=0;function at(e){tt.value=ot(st+(rt-e.clientY))}function lt(){if("undefined"!=typeof window){nt.value=!1,window.removeEventListener("pointermove",at),window.removeEventListener("pointerup",lt);try{document.body.style.userSelect=""}catch(ql){}if(tt.value&&"undefined"!=typeof localStorage)try{localStorage.setItem(Hl,String(tt.value))}catch(ql){}}}function ct(e){if(et&&"undefined"!=typeof window){nt.value=!0,rt=e.clientY,st=function(){if(tt.value)return tt.value;const e="undefined"!=typeof window?window.innerHeight:800;return Math.min(704,e-64-32)}(),window.addEventListener("pointermove",at),window.addEventListener("pointerup",lt);try{document.body.style.userSelect="none"}catch(t){}e.preventDefault()}}let ut=`chat_sound_enabled_${r}`;const dt=bt("false"!==localStorage.getItem(ut)),ht=bt([]),pt=t.widgetTitle,ft=["😀","😂","🤩","😢","😡","👍","❤️","🙏","🤔","🤯","🎉","🔥"],mt=bt(!1),vt=bt({});function gt(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function yt(e){return gt(e??"").replace(/((?:https?:\/\/|www\.)[^\s<]+)/gi,e=>`<a href="${gt(e.startsWith("www.")?`https://${e}`:e)}" target="_blank" rel="noopener noreferrer">${gt(e)}</a>`)}function _t(e){if("undefined"==typeof document||!document.cookie)return null;const t=document.cookie.match(new RegExp("(?:^|;\\s*)"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}function Ct(){return{ct_site_id:_t("_ct_site_id")||null,ct_session_id:_t("_ct_session_id")||null}}function kt(){const e=t&&t.calltouchModId?String(t.calltouchModId).trim():"";return""!==e?e:null}function St(){return Ct().ct_session_id||null}function xt(){try{const e=kt();if(e&&"undefined"!=typeof window&&"function"==typeof window.ct){const t=window.ct("calltracking_params",e);if(t&&t.sessionId)return String(t.sessionId)}}catch($i){}return null}const Tt=Io(()=>$.value&&oe.value),Lt=bt({visible:!1,src:"",filename:""}),Et=Io(()=>{const e=((null==$e?void 0:$e.length)||0)+1;return 44*e+10*(e-1)+16+"px"}),It=bt(!1),At=async()=>{if(!r)return;u.value=!0;try{const e=localStorage.getItem(c);h.value=e&&parseInt(e,10)||null}catch($i){h.value=null}const e=localStorage.getItem(a);if(e){const t=JSON.parse(e);ue.value=await async function(e,t){const n=[];for(const o of t){if(!o.attachments||!Array.isArray(o.attachments)){n.push(o);continue}const t=[];for(let n=0;n<o.attachments.length;n++){const r=o.attachments[n];if(r.attachmentId)t.push(r);else if(r.base64)try{const i=await Ks(e,o.id||`temp-${Date.now()}`,n,r.base64,r.filename||"file",r.type||"document",r.size||0),{base64:s,...a}=r;t.push({...a,attachmentId:i})}catch(i){console.error("Ошибка миграции вложения:",i),t.push(r)}else t.push(r)}n.push({...o,attachments:t})}return n}(r,t),localStorage.setItem(a,JSON.stringify(ue.value)),await ei()}0===ue.value.length&&(ue.value=pe())};At(),async function(e=18e6){const t=await Gs(),n=Date.now()-e;new Promise((e,i)=>{const o=t.transaction([Xs],"readwrite").objectStore(Xs).index("timestamp").openCursor(IDBKeyRange.upperBound(n));o.onsuccess=t=>{const n=t.target.result;n?(n.delete(),n.continue()):e()},o.onerror=()=>{i(new Error("Не удалось очистить старые вложения"))}})}();const Pt=Io(()=>{var e;return W.value&&(null==(e=oe.value)?void 0:e.name)?oe.value.name:pt}),Ot=Io(()=>W.value?null:de.value?"Продолжить диалог":"Начать диалог");function Mt(){const e=be.value;if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch($i){return null}}const Rt=Io(()=>!!ye.value&&!function(){const e=Mt();return!!e&&!(!T.every(t=>{return"string"==typeof(n=e[t])&&""!==n.trim();var n})||E&&!0!==e.consent)}()),Dt=Io(()=>!(!Ce.value||!ye.value)||Rt.value),$t=Io(()=>ye.value),jt=Io(()=>{const e=Mt()??{};return{...e,consent:!0===e.consent}}),Ut=Io(()=>Rt.value&&!Ce.value?"Дозаполните контактные данные для продолжения диалога":x.startMessage),Bt=Io(()=>de.value?"Продолжить диалог":"Начать диалог"),Ft=bt(null);function Ht(e){if("function"===e.type&&e.functionName){try{const t=function(e){const t=String(e).trim().match(/^([\w$.]+)\s*(?:\((.*)\))?\s*$/s);if(!t)return null;const n=t[1],i=(t[2]??"").trim(),o=n.split(".");let r=window,s=window;for(const l of o){if(null==s)return null;r=s,s=s[l]}if("function"!=typeof s)return null;const a=""!==i?function(e){const t=[];let n="",i=null,o=!1;const r=()=>{t.push({value:n,quoted:o}),n="",o=!1};for(let s=0;s<e.length;s++){const t=e[s];i?"\\"===t&&s+1<e.length?n+=e[++s]:t===i?i=null:n+=t:"'"===t||'"'===t?(i=t,o=!0):","===t?r():n+=t}return r(),t.map(({value:e,quoted:t})=>{if(t)return e;const n=e.trim();return"true"===n||"false"!==n&&("null"===n?null:""===n||Number.isNaN(Number(n))?n:Number(n))})}(i):[];return{fn:s,ctx:r,args:a}}(e.functionName);t&&t.fn.apply(t.ctx,t.args)}catch($i){}return g&&m?(Ke(!1),void Jt()):(Ue.value=!1,Xe.value=!1,void Yt())}!function(e){if(/^https?:\/\//i.test(e)||(e="https://"+e),window.open(e,"_blank"),g&&m)return Ke(!1),void Jt();Ue.value=!1,Xe.value=!1,Yt()}(e.url)}function Vt(){if(xn(),g){if(H.value&&p)return void Jt();if(k){if(Ue.value){if(Date.now()-Fe.value<400)return;return void(Ue.value=!1)}if(H.value)return N.value=!1,ee.value=!1,Ue.value=!1,void ti();if($e.length)return Ue.value=!0,void(Fe.value=Date.now());nn()}}else if(Ue.value){if(Date.now()-Fe.value<400)return;Ue.value=!1}else{if(H.value&&p)return He=Date.now()+500,Ue.value=!1,void ti();if(!H.value)return $e.length&&!H.value?(Ue.value=!0,void(Fe.value=Date.now())):void ti()}}function zt(e){g?H.value&&p&&Jt():p&&(Ue.value||$e.length&&!H.value&&(Ue.value=!0,Fe.value=Date.now(),e.preventDefault()))}function qt(){ze(),g&&m||H.value||$e.length&&(Date.now()<He||(Ue.value=!0,Fe.value=Date.now()))}function Wt(){if(xn(),Ue.value=!1,k)return Je.value=!0,Xe.value=!1,Yt(),void(H.value||ti());ti()}function Jt(){Ue.value=!1,Xe.value=!1,H.value=!1,W.value=!1,J.value=!1,X.value=!1,Qe(!1),z.value=!!k,q&&(clearTimeout(q),q=null),g&&(Je.value=!!k),Ke(!1),Yt()}function Xt(){if(g)return k?(N.value=!1,ee.value=!1,Ue.value=!1,void(H.value&&ti())):void Jt();ti()}function Kt(){g&&m&&$e.length&&(N.value=!1,ee.value=!1,Ue.value=!1,Ke(!0),Je.value=!1,H.value=!1,W.value=!1,J.value=!1,X.value=!1,Qe(!1),z.value=!1,q&&(clearTimeout(q),q=null),on(null))}function Qt(){Xe.value=!1,Ke(!1),Yt()}function Yt(){if(!g||!m)return;if("undefined"==typeof document)return;const e=document.getElementById("chat-widget-container");e&&(e.style.pointerEvents=Je.value||Xe.value?"auto":"none")}function tn(e){try{if(!e)return null;const t=e;if("number"==typeof(null==t?void 0:t.left)&&"number"==typeof(null==t?void 0:t.top)&&"number"==typeof(null==t?void 0:t.right)&&"number"==typeof(null==t?void 0:t.bottom))return t;if("number"==typeof(null==t?void 0:t.clientX)&&"number"==typeof(null==t?void 0:t.clientY)){const e=t.clientX,n=t.clientY;return{left:e,right:e,top:n,bottom:n,width:0,height:0}}if(e instanceof HTMLElement)return e.getBoundingClientRect();const n=e,i=(null==n?void 0:n.currentTarget)instanceof HTMLElement?n.currentTarget:(null==n?void 0:n.target)instanceof HTMLElement?n.target:null;if(i)return i.getBoundingClientRect()}catch($i){}return null}function nn(e=null){xn(),Ke(!1),Je.value=!0,Xe.value=!1,Ue.value=!1,Yt(),H.value||ti(e)}function on(e){Ze.value=tn(e)||tn("undefined"!=typeof document?document.activeElement:null),Xe.value=!0,Yt()}function rn(){xn(),nn()}function sn(e){g&&(We.value=!0,!$e.length||H.value?nn():on(e))}function an(){m&&setTimeout(()=>{ln(!0)},350)}async function ln(e=!1){await Nt(),Ft.value&&Ft.value.scrollTo({top:Ft.value.scrollHeight,behavior:e?"smooth":"auto"})}function cn(e){if(!e)return null;if("number"==typeof e)return e;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function un(e){return{...e,attachments:Array.isArray(e.attachments)?e.attachments:[],buttons:Array.isArray(e.buttons)?e.buttons:[],createdAt:e.createdAt??e.created_at??e.sentTimestamp??e.sent_timestamp??null}}function dn(e){const t=Array.isArray(e)?e:[],n=[];for(const s of t){if(!s)continue;const e=String(s.text??"").trim();if(!e)continue;const t=e.length,i=Math.max(6,Math.min(20,t));n.push({btn:s,unit:i})}if(!n.length)return[];const i=[];let o=[],r=0;for(const s of n)(o.length>=2||r+s.unit>24)&&(o.length&&i.push(o),o=[],r=0),o.push(s.btn),r+=s.unit;return o.length&&i.push(o),i}function hn(e){if(e.id)return`id:${e.id}`;const t=cn(e.createdAt||e.sentTimestamp),n=(e.time||"").toString().trim();let i=(e.text||"").trim();i=i.replace(/\r\n|\r|\n/g," "),i=i.replace(/\s+/g," ");const o=Array.isArray(e.attachments)?e.attachments.length:0;return`auto:${e.type||"unknown"}|${i}|${o}|${null!==t?`ms${t}`:`t${n}`}`}function pn(e){const t=new Set,n=[];return e.forEach(e=>{const i=un(e),o=hn(i);t.has(o)||(t.add(o),n.push(i))}),n}function fn(e,t){var n,i;if(e.id&&t.id&&e.id===t.id)return!0;if(he(e))return!0===t.greeting;if(e.server_message_id&&t.server_message_id&&String(e.server_message_id)===String(t.server_message_id))return!0;const o=hn(e),r=hn(t);if(o&&r&&o===r)return!0;if(!(e.id||"").startsWith("temp-")&&!(t.id||"").startsWith("temp-"))return!1;const s=(e.type||"")===(t.type||""),a=(e.text||"").trim().replace(/\r\n|\r|\n/g," ").replace(/\s+/g," ")===(t.text||"").trim().replace(/\r\n|\r|\n/g," ").replace(/\s+/g," "),l=((null==(n=e.attachments)?void 0:n.length)||0)===((null==(i=t.attachments)?void 0:i.length)||0);if(!s||!a||!l)return!1;const c=(e.time||"").toString().trim(),u=(t.time||"").toString().trim();if(c&&u&&c===u)return!0;const d=cn(e.createdAt||e.sentTimestamp),h=cn(t.createdAt||t.sentTimestamp);return!(!d||!h)&&Math.abs(d-h)<3e5}let mn=!1,vn=!1,gn=!1;const bn=bt(!1),yn=`${A}/api/widget/notification-sound`,wn="undefined"!=typeof window&&"PointerEvent"in window?["pointerdown","keydown"]:["touchstart","mousedown","keydown"],_n=(Cn={audioUrl:yn,onUnlockInvalidated:function(){gn||(bn.value=!1,Tn())}},function(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent||"",t=navigator.vendor||"";return!!/Apple/i.test(t)&&!!/Safari/i.test(e)&&!/(CriOS|FxiOS|EdgiOS|EdgA|OPiOS|OPR|Chrome|Chromium|Android)/i.test(e)}()&&qs()?new Js(Cn.audioUrl,{onUnlockInvalidated:Cn.onUnlockInvalidated}):new Ws(Cn.audioUrl));var Cn;let kn=null,Sn=0;async function xn(){if(!bn.value&&!mn){mn=!0;try{await _n.unlock()&&!gn&&(bn.value=!0,Ln())}catch(e){console.warn("Виджет: не удалось разлочить звук уведомления.",e)}finally{mn=!1}}}function Tn(){bn.value||vn||_n.isUnlocked()||"undefined"==typeof document||(wn.forEach(e=>{document.addEventListener(e,xn)}),vn=!0)}function Ln(){vn&&"undefined"!=typeof document&&(wn.forEach(e=>{document.removeEventListener(e,xn)}),vn=!1)}function En(){xn(),dt.value=!dt.value,localStorage.setItem(ut,dt.value?"true":"false")}let In=null,An=null,Pn=!1,On=null,Mn=0,Dn=!1;function $n(){On&&(clearTimeout(On),On=null)}function jn(){if(gn||On||In)return;if(!n||!r||!A)return;const e=Math.min(1e3*2**Mn,3e4),t=Math.floor(1e3*Math.random());Mn+=1,On=setTimeout(()=>{On=null,Nn()},e+t)}function Nn(){var e,t,i;if(!In&&n&&r&&A){$n();try{In=function(e){var t,n,i,o;window.Pusher=zs;const r=new URL(e.apiBaseUrl,window.location.href),s="https"===String((null==(t=e.reverb)?void 0:t.scheme)||r.protocol.replace(":","")||"https"),a=String((null==(n=e.reverb)?void 0:n.host)||r.hostname).replace(/^https?:\/\//,""),l=null==(i=e.reverb)?void 0:i.port,c="number"==typeof l&&Number.isFinite(l)?l:s?443:8080,u=String((null==(o=e.reverb)?void 0:o.key)||"local");return new Us({broadcaster:"pusher",key:u,wsHost:a,wsPort:c,wssPort:c,forceTLS:s,enableStats:!1,enabledTransports:["ws","wss"],cluster:"mt1",unavailableTimeout:1e4,authEndpoint:e.authEndpoint,auth:{withCredentials:!1,headers:{}},authorizer:t=>({authorize:(n,i)=>{fetch(e.authEndpoint,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({socket_id:n,channel_name:t.name})}).then(e=>{if(429===e.status){const o=parseInt(e.headers.get("Retry-After")||"5",10);return void setTimeout(()=>{t.authorize(n,i)},1e3*o)}if(e.ok)return e.json().then(e=>i(null,e));i(new Error(`Auth failed: ${e.status}`),null)}).catch(e=>i(e,null))}})})}({apiBaseUrl:A,reverb:O,authEndpoint:M});try{const n=null==(e=null==In?void 0:In.connector)?void 0:e.pusher;null==(i=null==(t=null==n?void 0:n.connection)?void 0:t.bind)||i.call(t,"state_change",e=>{const t=null==e?void 0:e.current;if("connected"===t)return $n(),Mn=0,Dn&&Hn(),void(Dn=!0);if("disconnected"===t||"failed"===t){const e=In;In=null,An=null;try{null==e||e.disconnect()}catch($i){}jn()}})}catch($i){}const o=`widget.${n}.contact.${r}`;An=In.join(o);const s=e=>{if(e&&"deleted"===e.action&&null!=e.message_id){const t=String(e.message_id),n=ue.value.length;if(ue.value=(ue.value||[]).filter(e=>String(e.server_message_id??e.id)!==t),ue.value.length!==n)try{localStorage.setItem(a,JSON.stringify(ue.value))}catch($i){}return}It.value?Pn=!0:Hn()};An.listen(".WidgetMessagesUpdated",s),An.listen("WidgetMessagesUpdated",s),"function"==typeof An.error&&An.error(e=>{console.error("Widget websocket channel error",e)})}catch(o){console.error("Widget websocket connect error",o),In=null,An=null,jn()}}}function Bn(){if($n(),Mn=0,Dn=!1,In){try{In.leave(`widget.${n}.contact.${r}`)}catch($i){}try{In.disconnect()}catch($i){}In=null,An=null}}const Fn=`widget_identities_${n}`;async function Hn(){if(!n||!r||It.value)return;It.value=!0;const e=new AbortController,t=setTimeout(()=>e.abort(),15e3);try{const i=!de.value,o=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/messages?limit=30`,s=Intl.DateTimeFormat().resolvedOptions().timeZone,d=await fetch(o,{method:"GET",headers:{Accept:"application/json","X-Timezone":s},signal:e.signal});if(clearTimeout(t),!d.ok)return;const p=await d.json();oe.value=p.operator||null,re.value=p.rating_override||null,localStorage.setItem(l,JSON.stringify(oe.value));const f=Array.isArray(p.messages)?p.messages:[];if("number"==typeof p.oldest_id){h.value=h.value?Math.min(h.value,p.oldest_id):p.oldest_id;try{localStorage.setItem(c,String(h.value))}catch($i){}}i&&(u.value=!0===p.has_more);const m=ue.value.some(e=>(e.id||"").startsWith("temp-"));if(0===f.length){if(m){const e=Date.now(),t=3e5;ue.value=ue.value.map(n=>(n.id||"").startsWith("temp-")&&(null===n.delivered||void 0===n.delivered)&&e-(n.sentTimestamp||n.createdAt||e)>t?{...n,delivered:!1}:n),localStorage.setItem(a,JSON.stringify(ue.value))}else{localStorage.removeItem(a);const e=ue.value.find(he);ue.value=e?[e]:pe()}return}const{merged:v,added:g}=function(e,t){const n=pn(e),i=[];return pn(t).forEach(e=>{const t=un(e),o=n.findIndex(e=>fn(e,t));if(-1!==o){const e=n[o],i=e.attachments||[],r=t.attachments||[],s=e.id&&t.id&&e.id===t.id,a=e.server_message_id&&t.server_message_id&&String(e.server_message_id)===String(t.server_message_id);let l;if(s||a)l=r.length>0?r:[];else{const e=i.map((e,t)=>{const n=r[t];if(n){const t={filename:e.filename||n.filename,type:e.type||n.type,size:e.size||n.size};return e.attachmentId&&(t.attachmentId=e.attachmentId),e.base64&&(t.base64=e.base64),e.url?t.url=e.url:!n.url||e.attachmentId||e.base64||(t.url=n.url),n.id&&(t.id=n.id),t}return e});l=e.length>0?e:r.length>0?r:i}const c=!0===e._widgetKeyboardPending,u=Array.isArray(t.buttons)?t.buttons:[],d=c&&0===u.length;return void(n[o]=c&&!d?{...t,text:e.text,buttons:e.buttons,_buttonsDisabled:!0,_widgetKeyboardPending:!0,delivered:!0,attachments:l}:{...t,id:t.id,delivered:!0,_buttonsDisabled:!!c||!0===t._buttonsDisabled,_widgetKeyboardPending:!1,attachments:l})}const r=function(e){const t=String(e??"");return t.endsWith(Vl)?t.slice(0,-7):null}(t.id);if(null!==r){const e=n.findIndex(e=>String(e.id)===r);if(-1!==e)return n.splice(e+1,0,t),void i.push(t)}n.push(t),i.push(t)}),{merged:n,added:i}}(ue.value,f);!function(e){e.forEach(e=>{if("event"===e.type&&"status_changed"===e.text){const t=e.id;$.value&&t!==we.value&&oe.value&&(we.value=t,localStorage.setItem(`lastRatingTime_${r}`,e.id),setTimeout(()=>{gn||Ei()},3e3))}});const t=e.filter(e=>"user"===e.type);mt.value&&t.length>0&&dt.value&&(Date.now()-Sn<3e3||(kn&&clearTimeout(kn),kn=setTimeout(()=>{kn=null,function(){if(dt.value)try{_n.play().then(()=>{Sn=Date.now()}).catch(e=>{console.warn("Виджет: браузер заблокировал звуковое уведомление.",e)})}catch(e){console.error("Ошибка звукового уведомления:",e)}}()},2e3)))}(g.filter(e=>!0!==e.greeting));const b=!de.value;ue.value=v.filter(e=>!he(e));const y=Date.now(),w=3e5;if(ue.value=ue.value.map(e=>(e.id||"").startsWith("temp-")&&(null===e.delivered||void 0===e.delivered)&&y-(e.sentTimestamp||e.createdAt||y)>w?{...e,delivered:!1}:e),localStorage.setItem(a,JSON.stringify(ue.value)),await ei(),mt.value||(mt.value=!0),b&&v.length>0)await ln();else if(g.length>0){const e=g.find(e=>"user"===e.type);e&&await async function(e,t=!0){await Nt();const n=Ft.value;if(!n||null==e)return;const i="undefined"!=typeof CSS&&CSS.escape?CSS.escape(String(e)):String(e),o=n.querySelector(`[data-id="${i}"]`);if(!o)return void(await ln(t));const r=o.getBoundingClientRect().top-n.getBoundingClientRect().top-8;n.scrollTo({top:n.scrollTop+r,behavior:t?"smooth":"auto"})}(e.id)}}catch(i){console.error("Ошибка загрузки чата:",i)}finally{It.value=!1,Pn&&(Pn=!1,Hn())}}function Vn(){const e=Ft.value;e&&e.scrollTop<=80&&u.value&&!d.value&&async function(){if(d.value||!u.value)return;if(!n||!r)return;const e=h.value??function(){let e=null;for(const t of ue.value){const n=t&&(t.server_message_id??t.id),i="number"==typeof n?n:/^\d+$/.test(String(n??""))?parseInt(n,10):null;null!==i&&(null===e||i<e)&&(e=i)}return e}();if(!e)return void(u.value=!1);d.value=!0;const t=Ft.value,i=t?t.scrollHeight:0,o=t?t.scrollTop:0;try{const s=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/messages?limit=30&before_id=${e}`,l=Intl.DateTimeFormat().resolvedOptions().timeZone,p=await fetch(s,{method:"GET",headers:{Accept:"application/json","X-Timezone":l}});if(!p.ok)return;const f=await p.json();if(u.value=!0===f.has_more,"number"==typeof f.oldest_id){h.value=h.value?Math.min(h.value,f.oldest_id):f.oldest_id;try{localStorage.setItem(c,String(h.value))}catch($i){}}const m=Array.isArray(f.messages)?f.messages:[];if(0===m.length)return;const v=pn(m).filter(e=>!ue.value.some(t=>fn(t,e)));if(0===v.length)return;ue.value=[...v,...ue.value],localStorage.setItem(a,JSON.stringify(ue.value)),await ei(),d.value=!1,await Nt(),t&&(t.scrollTop=o+(t.scrollHeight-i))}catch(s){console.error("Ошибка подгрузки истории:",s)}finally{d.value=!1}}()}const qn=bt({}),Wn=bt({});function Jn(e){return e.attachmentId||e.url||e.id||""}function Xn(e){const t=Jn(e);return t&&Wn.value[t]?Wn.value[t]:""}function Zn(e){return e&&(e.attachmentId&&qn.value[e.attachmentId]||e.base64||e.url)||""}function Gn(e){return e&&(e.url||e.attachmentId||e.id||e.filename)||""}function Kn(e){if(!e)return!1;if("audio"===String(e.type||"").toLowerCase())return!0;const t=String(e.mime||"").toLowerCase(),n=String(e.filename||"").toLowerCase(),i=String(e.url||"").toLowerCase(),o=n.startsWith("voice_")||i.includes("/voice_");return!!t.startsWith("audio/")||"video/webm"===t&&o}async function Qn(e){var t;const i=Jn(e);if(!i||Wn.value[i])return;let o=e.url||e.base64||"";if(!o&&e.attachmentId&&qn.value[e.attachmentId]&&(o=qn.value[e.attachmentId]),o)try{let s;if(o.startsWith("data:")){const[e,n]=o.split(","),i=(null==(t=e.match(/data:(.*?);/))?void 0:t[1])||"video/mp4",r=atob(n),a=new Uint8Array(r.length);for(let t=0;t<r.length;t++)a[t]=r.charCodeAt(t);s=new Blob([a],{type:i})}else{const t=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/download?url=${encodeURIComponent(o)}&filename=${encodeURIComponent(e.filename||"video.mp4")}`,i=await fetch(t);s=await i.blob()}Wn.value={...Wn.value,[i]:URL.createObjectURL(s)}}catch(ql){console.warn("Failed to load video blob",ql)}}async function Yn(e){if(!e||!e.attachmentId)return;if(qn.value[e.attachmentId])return;const t=await async function(e){if(e.base64)return e.base64;if(e.url)return e.url;if(e.attachmentId){if(qn.value[e.attachmentId])return qn.value[e.attachmentId];const t=await async function(e){if(e.base64)return e.base64;if(e.url)return e.url;if(e.attachmentId)try{const t=await async function(e){const t=await Gs();return new Promise((n,i)=>{const o=t.transaction([Xs],"readonly").objectStore(Xs).get(e);o.onsuccess=()=>{n(o.result||null)},o.onerror=()=>{i(new Error("Не удалось получить вложение"))}})}(e.attachmentId);return(null==t?void 0:t.base64)||null}catch(t){return console.error("Ошибка загрузки вложения из IndexedDB:",t),null}return null}(e);return t&&(qn.value={...qn.value,[e.attachmentId]:t}),t}return null}(e);t&&(qn.value={...qn.value,[e.attachmentId]:t})}async function ei(){const e=[],t=[];for(const n of ue.value)if(n.attachments&&Array.isArray(n.attachments))for(const i of n.attachments)if("video"===i.type){const e=Jn(i);e&&!Wn.value[e]&&t.push(i)}else!i.attachmentId||qn.value[i.attachmentId]||i.base64||i.url||e.push(i);for(let n=0;n<e.length;n+=5){const t=e.slice(n,n+5);await Promise.all(t.map(e=>Yn(e)))}for(const n of t)await Qn(n)}function ti(e=null){if(Y)return clearTimeout(Y),Y=null,X.value=!1,void(G.value=!1);const t=!H.value;if(!t&&v&&!m&&!f||(H.value=t),ee.value=!1,Qe(t),Ue.value=!1,t||(He=Date.now()+500),q&&(clearTimeout(q),q=null),K&&(clearTimeout(K),K=null),Q&&(clearTimeout(Q),Q=null),Y&&(clearTimeout(Y),Y=null),f)W.value=t,J.value=!1,X.value=!1,z.value=!!t||!p;else if(t){const e=v&&!m?660:380;v&&!m&&(J.value=!0,Q=setTimeout(()=>{J.value=!1,Q=null},e+600)),K=setTimeout(()=>{K=null,H.value&&(W.value=!0)},e),p?(z.value=!1,q=setTimeout(()=>{q=null,H.value&&(z.value=!0)},e)):z.value=!0}else W.value=!1,J.value=!1,v&&!m?(X.value=!0,Y=setTimeout(async()=>{G.value=!0,await Nt(),H.value=!1,z.value=!p,await Nt(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{G.value=!1,X.value=!1,Y=null})})},350)):z.value=!p;t&&(Nn(),It.value?Pn=!0:Hn(),ue.value.length>0&&ln(),ni(e))}async function ni(e=null){const t="string"==typeof e&&""!==e.trim();if(!b&&!t)return;const i=function(e=null){const t="string"==typeof e?e.trim():"";return""!==t?t:"string"==typeof y?y.trim():""}(e);if(i&&n&&r&&!Dt.value)try{const e=new FormData;e.append("text",i),e.append("visit_data",JSON.stringify(vt.value||{})),e.append("page_url","undefined"!=typeof location?location.href:""),fe(e);const t=ge();t&&e.append("userInfo",t);const o=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/messages`;if(!(await fetch(o,{method:"POST",body:e})).ok)throw new Error("Server error")}catch(o){console.error("Ошибка отправки сообщения при открытии виджета:",o)}}async function ii(){const e=te.value.trim(),t=[...ae.value];if(!e&&0===t.length)return;if(Te.value)return;if(_e.value)return;if(Se.value){const e=Date.now();return void(e-Pe>5e3&&(Pe=e,Re("send_blocked_attempt",{pendingMs:Me()})))}if(xn(),_e.value=!0,0===t.length){const t=(new Date).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"}),i=`temp-${Date.now()}`,o={type:"contact",text:e||null,attachments:[],time:t,id:i,sentTimestamp:Date.now(),createdAt:Date.now(),delivered:null};ue.value.push(o),te.value="",si(),localStorage.setItem(a,JSON.stringify(ue.value)),await ln(!0);const s=new FormData;e&&s.append("text",e),s.append("visit_data",JSON.stringify(vt.value||{})),s.append("page_url","undefined"!=typeof location?location.href:""),fe(s);const l=ge();l&&s.append("userInfo",l);const c=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/messages`;return(async()=>{try{const t=await fetch(c,{method:"POST",body:s});if(429===t.status){const t=ue.value.findIndex(e=>e.id===o.id);return-1!==t&&(ue.value.splice(t,1),localStorage.setItem(a,JSON.stringify(ue.value))),te.value=e,ht.value.push("Слишком много сообщений. Подождите немного и попробуйте снова."),void setTimeout(()=>{ht.value=ht.value.filter(e=>"Слишком много сообщений. Подождите немного и попробуйте снова."!==e)},5e3)}if(!t.ok)throw new Error("Server error");const n=ue.value.findIndex(e=>e.id===o.id);-1===n||null!==ue.value[n].delivered&&void 0!==ue.value[n].delivered||(ue.value[n].delivered=!0,localStorage.setItem(a,JSON.stringify(ue.value))),Hn()}catch(t){console.error("Ошибка отправки:",t);const e=ue.value.findIndex(e=>e.id===o.id);-1!==e&&(ue.value[e].delivered=!1,localStorage.setItem(a,JSON.stringify(ue.value)))}})(),void(_e.value=!1)}const i=(new Date).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"}),o=`temp-${Date.now()}`,s=await Promise.all(t.map(async(e,t)=>{const n=await function(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=e=>n(e),i.readAsDataURL(e)})}(e),i=e.type.startsWith("image/")?"image":e.type.startsWith("video/")?"video":e.type.startsWith("audio/")?"audio":"document",s=await Ks(r,o,t,n,e.name,i,e.size);return qn.value={...qn.value,[s]:n},{filename:e.name,size:e.size,type:i,attachmentId:s,base64:n}})),l={type:"contact",text:e||null,attachments:s.map(({base64:e,...t})=>t),time:i,id:o,sentTimestamp:Date.now(),createdAt:Date.now(),delivered:null};ue.value.push(l),te.value="",si(),localStorage.setItem(a,JSON.stringify(ue.value)),await ln(!0);try{const i=new FormData;e&&i.append("text",e),i.append("visit_data",JSON.stringify(vt.value||{})),i.append("page_url","undefined"!=typeof location?location.href:""),fe(i),t.forEach(e=>i.append("files[]",e));const o=ge();o&&i.append("userInfo",o);const s=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/messages`,c=await fetch(s,{method:"POST",body:i});if(429===c.status){const n=ue.value.findIndex(e=>e.id===l.id);return-1!==n&&(ue.value.splice(n,1),localStorage.setItem(a,JSON.stringify(ue.value))),te.value=e,ae.value=t,ht.value.push("Слишком много сообщений. Подождите немного и попробуйте снова."),void setTimeout(()=>{ht.value=ht.value.filter(e=>"Слишком много сообщений. Подождите немного и попробуйте снова."!==e)},5e3)}if(!c.ok)throw new Error("Server error");const u=ue.value.findIndex(e=>e.id===l.id);-1===u||null!==ue.value[u].delivered&&void 0!==ue.value[u].delivered||(ue.value[u].delivered=!0,localStorage.setItem(a,JSON.stringify(ue.value))),Hn()}catch(c){console.error("Ошибка отправки:",c);const e=ue.value.findIndex(e=>e.id===l.id);-1!==e&&(ue.value[e].delivered=!1,localStorage.setItem(a,JSON.stringify(ue.value)));for(const t of s)if(t.attachmentId)try{await Qs(t.attachmentId),delete qn.value[t.attachmentId]}catch(u){console.error("Ошибка удаления вложения:",u)}ae.value=t}finally{_e.value=!1}}function oi(){F.value.click()}function ri(e){const t=Array.from(e.target.files);if(0===t.length)return;if(ae.value.length+t.length>3)return ht.value.push("Можно загрузить максимум 3 файлов."),void setTimeout(()=>{ht.value=[]},3e3);if(!function(e){ht.value=[];const t=["image/png","image/jpeg","image/jpg","image/gif","image/webp","video/mp4","video/webm","video/quicktime","text/plain","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];return e.length>3&&ht.value.push("Можно загрузить до 3 файлов."),e.forEach(e=>{const n=e.name.length>10?e.name.slice(0,10)+"...":e.name;e.size>20971520&&ht.value.push(`Файл "${n}" превышает допустимый размер (максимум 20 МБ).`),t.includes(e.type)||ht.value.push(`Файл "${n}" имеет недопустимый тип.`)}),ht.value.length>0&&setTimeout(()=>{ht.value=[]},3e3),0===ht.value.length}(t))return;const n=[...ae.value,...t];ae.value=n.slice(0,3),F.value.value=""}function si(){ae.value=[]}function ai(){ee.value=!ee.value}function li(e=null){g&&(We.value=!1,nn(e))}function ci(){if(g)return k?(N.value=!1,ee.value=!1,Ue.value=!1,void(H.value&&ti())):void Jt();N.value=!1,ee.value=!1,Ue.value=!1,H.value&&ti()}function ui(e){var t,n;Ue.value&&(Date.now()-Fe.value<200||(null==(t=Ne.value)?void 0:t.contains(e.target))||(null==(n=Be.value)?void 0:n.contains(e.target))||(Ue.value=!1))}function di(e,t){return("function"==typeof e.composedPath?e.composedPath():[]).some(e=>e&&e.classList&&e.classList.contains(t))}function hi(e){ee.value&&!di(e,"robotmia-emoji-panel")&&(ee.value=!1),N.value&&!di(e,"robotmia-full-screen-menu")&&(N.value=!1)}function pi(){"undefined"!=typeof document&&"visible"===document.visibilityState&&H.value&&(Nn(),Hn())}Rn(()=>{if(gn=!1,function(){const e={};try{e.page_url="undefined"!=typeof location?location.href:"";const t="undefined"!=typeof location?location.search:"";t&&new URLSearchParams(t).forEach((t,n)=>{e[`url_${n}`]=t}),"undefined"!=typeof document&&document.cookie&&document.cookie.split(";").forEach(t=>{const[n,...i]=t.trim().split("=");n&&(e[`cookie_${n}`]=i.join("=").trim())}),"undefined"!=typeof document&&document.referrer&&(e.referrer=document.referrer)}catch($i){}vt.value=e}(),_n.preload().catch(e=>{console.warn("Виджет: не удалось подготовить звук уведомления.",e)}),Tn(),document.addEventListener("click",ui),document.addEventListener("click",hi),document.addEventListener("visibilitychange",pi),"undefined"!=typeof window&&(window.RobotMia=window.RobotMia||{},window.RobotMia.showChatWindow=li,window.RobotMia.showChatWindow2=sn,window.RobotMia.CloseChatWindow=ci),Yt(),_.length>0&&"undefined"!=typeof location)try{const e=new URLSearchParams(location.search).get("method");if(e){const t=location.hostname.toLowerCase(),i=_.find(n=>{if(n.method!==e)return!1;try{return new URL(n.domain.match(/^https?:\/\//)?n.domain:`https://${n.domain}`).hostname.toLowerCase()===t}catch($i){return!1}});if(i){const t=`widget_method_fired_${n}_${e}`,o=!!sessionStorage.getItem(t),r=!o&&i.message?i.message.trim():"";o||(sessionStorage.setItem(t,"1"),ke.value=r||null),setTimeout(()=>{nn(r||null)},300)}}}catch($i){}}),Un(()=>{var e,t,n;gn=!0,ce(),Ie&&(clearTimeout(Ie),Ie=null),Ve&&(clearTimeout(Ve),Ve=null),K&&(clearTimeout(K),K=null),Q&&(clearTimeout(Q),Q=null),Y&&(clearTimeout(Y),Y=null),document.removeEventListener("click",ui),document.removeEventListener("click",hi),document.removeEventListener("visibilitychange",pi),Bn(),Ln(),"undefined"!=typeof window&&(window.removeEventListener("pointermove",at),window.removeEventListener("pointerup",lt)),kn&&(clearTimeout(kn),kn=null),_n.dispose(),bn.value=!1,mn=!1,"undefined"!=typeof window&&((null==(e=window.RobotMia)?void 0:e.showChatWindow)===li&&delete window.RobotMia.showChatWindow,(null==(t=window.RobotMia)?void 0:t.showChatWindow2)===sn&&delete window.RobotMia.showChatWindow2,(null==(n=window.RobotMia)?void 0:n.CloseChatWindow)===ci&&delete window.RobotMia.CloseChatWindow)});const fi=bt({}),mi=bt({}),vi=bt({}),gi=bt({}),bi=bt({});function yi(e){const t=Number.isFinite(e)&&e>=0?e:0,n=Math.floor(t/60),i=Math.floor(t%60);return`${n}:${i<10?"0":""}${i}`}function wi(e){if(!e)return 0;if(Number.isFinite(e.duration)&&e.duration>0)return e.duration;const t=e.seekable;if(t&&t.length>0){const e=t.end(t.length-1);if(Number.isFinite(e)&&e>0)return e}const n=e.buffered;if(n&&n.length>0){const e=n.end(n.length-1);if(Number.isFinite(e)&&e>0)return e}return 0}function _i(e){const t=fi.value[e];t&&(mi.value[e]?t.pause():(Object.keys(fi.value).forEach(t=>{t!==e&&fi.value[t]&&(fi.value[t].pause(),mi.value[t]=!1)}),t.play()),mi.value[e]=!mi.value[e])}function Ci(e){const t=fi.value[e];t&&(gi.value[e]=wi(t))}function ki(e){const t=fi.value[e];if(t){const n=Number.isFinite(t.currentTime)&&t.currentTime>=0?t.currentTime:0,i=wi(t);vi.value[e]=n,gi.value[e]=i,bi.value[e]=i>0?n/i*100:0}}function Si(e){mi.value[e]=!1}function xi(e,t){const n=fi.value[t],i=wi(n);if(!n||i<=0)return;const o=e.currentTarget.parentElement.querySelector(".robotmia-progress-container").getBoundingClientRect(),r=e.clientX-o.left,s=o.width,a=Math.max(0,Math.min(100,r/s*100))/100*i;n.currentTime=a}function Ti(e){B.value[e]=!0,mi.value[e]=!1,bi.value[e]=0,gi.value[e]=0,vi.value[e]=0}function Li(){N.value=!N.value,ee.value=!1}function Ei(){j.value=!0,N.value=!1}function Ii(){ye.value&&(Ce.value=!0,N.value=!1,ee.value=!1)}async function Ai(e){var t;const i=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/csi`,o={operatorId:null==(t=oe.value)?void 0:t.id,rating:e.rating,comment:e.comment};try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!e.ok)throw new Error(`Ошибка при отправке данных: ${e.status}`);console.log("Оценка успешно отправлена")}catch(s){console.error("Ошибка при отправке оценки:",s)}}async function Pi(e){if(I){const t=function(e){const t=function(e){const t=e=>String(e??"").trim().toLowerCase(),n=String((null==e?void 0:e.phone)??"").replace(/\D/g,"");return[t(null==e?void 0:e.name),t(null==e?void 0:e.surname),t(null==e?void 0:e.email),n].join("|")}(e),n=function(){try{const e=window.localStorage.getItem(Fn),t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch($i){return[]}}(),i=n.find(e=>e&&e.fingerprint===t);if(i&&i.contactId)return i.contactId;const o=function(){try{return crypto.randomUUID()}catch($i){return`cid-${Date.now()}-${Math.random().toString(16).slice(2)}`}}();return n.push({contactId:o,fingerprint:t}),function(e){try{window.localStorage.setItem(Fn,JSON.stringify(e))}catch($i){}}(n),o}(e);await async function(e){if(e&&e!==r){Bn(),r=e;try{window.localStorage.setItem(`widget_contact_id_${n}`,e)}catch($i){}a="chat_messages_"+r,l="operator_"+r,c="chat_oldest_"+r,me=`contact_form_submitted_${r}`,ut=`chat_sound_enabled_${r}`,ue.value=[];try{oe.value=JSON.parse(localStorage.getItem(l)??"null")}catch($i){oe.value=null}we.value=localStorage.getItem(`lastRatingTime_${r}`)||null,dt.value="false"!==localStorage.getItem(ut),be.value=ge(),await At(),Nn(),await Hn()}}(t)}const i=me,o=Ct(),s=await function(e=1200,t=100){return new Promise(n=>{const i=xt();if(i)return void n(i);if(!kt()||"undefined"==typeof window||"function"!=typeof window.ct)return void n(St());let o=0;const r=setInterval(()=>{const i=xt();o+=t,(i||o>=e)&&(clearInterval(r),n(i||St()))},t)})}(),u={...e,page_url:"undefined"!=typeof location?location.href:"",visit_data:vt.value,ct_site_id:o.ct_site_id,session_id:s},d=JSON.stringify(u);try{ve.setItem(i,d)}catch($i){}if(be.value=d,n&&r){const e=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/start`;fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({userInfo:u})}).catch(()=>{})}const h=t.yandexMetrikaGoalId,p=function(){try{if("undefined"==typeof window)return null;const e=window.localStorage;if(!e)return null;const t=/^_ym(\d+)_lsid$/;for(let n=0;n<e.length;n++){const i=e.key(n);if(!i)continue;const o=i.match(t);if(o&&o[1])return o[1]}}catch($i){}return null}();if(p&&h&&"function"==typeof ym)try{ym(Number(p),"reachGoal",h,{form:"widget_start_dialog"})}catch($i){}if(Ce.value=!1,H.value){const e=ke.value;ke.value=null,ni(e)}}function Oi(e,t="image.jpg"){Lt.value={visible:!0,src:e,filename:t}}function Mi(){Lt.value={visible:!1,src:"",filename:""}}async function Ri(e,t,i=null,o=null){if(e){o&&(o.preventDefault(),o.stopPropagation());try{let o,s=e;if(i&&i.attachmentId&&(await Yn(i),qn.value[i.attachmentId]&&(s=qn.value[i.attachmentId])),s.startsWith("data:")){const e=await fetch(s);o=await e.blob()}else if(s.startsWith("http://")||s.startsWith("https://"))if(n&&r&&A){const e=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/download?url=${encodeURIComponent(s)}&filename=${encodeURIComponent(t||"file")}`,i=await fetch(e);if(!i.ok)throw new Error("Failed to fetch file via proxy");o=await i.blob()}else o=await new Promise((e,t)=>{const n=new XMLHttpRequest;n.open("GET",s,!0),n.responseType="blob",n.onload=function(){200===n.status||0===n.status?e(n.response):t(new Error(`Failed to fetch file: ${n.status}`))},n.onerror=function(){t(new Error("Network error"))},n.ontimeout=function(){t(new Error("Request timeout"))},n.timeout=3e4,n.send()});else{const e=await fetch(s);o=await e.blob()}if(!(o&&o.size>0))throw new Error("Empty blob");{const e=URL.createObjectURL(o),n=document.createElement("a");n.href=e,n.download=t||"file",n.style.display="none",n.setAttribute("download",t||"file"),document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n),URL.revokeObjectURL(e)},100)}}catch(s){console.error("Ошибка скачивания файла:",s);const n=document.createElement("a");n.href=e,n.download=t||"file",n.setAttribute("download",t||"file"),n.style.display="none",document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n)},100)}}}async function Di(e){e&&(e.preventDefault(),e.stopPropagation()),await Ri(Lt.value.src,Lt.value.filename||"image.jpg")}return(e,t)=>(Zi(),Yi(Vi,null,[so(Ho,{name:"robotmia-fade"},{default:Zt(()=>[g&&Xe.value?(Zi(),Yi("div",{key:0,class:V(["robotmia-launcher-overlay",{"robotmia-launcher-overlay-mobile":wt(m),"robotmia-instant":f}]),onClick:jr(Qt,["self"])},[ro("div",{class:V(["robotmia-launcher-panel",{"robotmia-launcher-panel-mobile":wt(m)}]),style:U(Ye.value)},[ro("div",{class:"robotmia-launcher-header"},[t[3]||(t[3]=ro("div",{class:"robotmia-launcher-title"}," Свяжитесь с нами любым удобным для Вас способом: ",-1)),ro("button",{type:"button",class:"robotmia-launcher-close",onClick:Qt},[...t[2]||(t[2]=[ro("svg",{class:"robotmia-close-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round"},[ro("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])]),g?(Zi(),Yi(Vi,{key:0},[ro("div",Ys,[(Zi(!0),Yi(Vi,null,zn(wt($e),(e,t)=>(Zi(),Yi("div",{key:t,class:"robotmia-launcher-row",onClick:t=>Ht(e)},[ro("div",ta,[ro("img",{src:e.iconSrc,alt:e.title,"data-icon":e.icon},null,8,na)]),ro("span",ia,Z(e.title),1)],8,ea))),128))]),t[5]||(t[5]=ro("div",{class:"robotmia-launcher-divider"},null,-1)),ro("button",{type:"button",class:"robotmia-launcher-primary-btn",onClick:rn},[...t[4]||(t[4]=[ro("svg",{class:"robotmia-launcher-chat-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ro("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1),ro("span",null,"Написать на сайте",-1)])])],64)):(Zi(),Yi("div",oa,[(Zi(!0),Yi(Vi,null,zn(wt($e),(e,t)=>(Zi(),Yi("div",{key:t,class:"robotmia-launcher-item",onClick:t=>Ht(e)},[ro("div",sa,[ro("img",{src:e.iconSrc,alt:e.title,"data-icon":e.icon},null,8,aa)]),ro("div",la,Z(e.title),1)],8,ra))),128)),ro("div",{class:"robotmia-launcher-item robotmia-launcher-item-primary",onClick:rn},[...t[6]||(t[6]=[ro("div",{class:"robotmia-launcher-icon"},[ro("svg",{fill:"black",width:"30px",height:"30px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[ro("path",{d:"M5.7898124,15.0400458 C5.92222516,15.0022135 6.06437918,15.0206689 6.18274191,15.0910584 C7.17821446,15.6830589 8.31529906,16 9.5,16 C13.0898509,16 16,13.0898509 16,9.5 C16,5.91014913 13.0898509,3 9.5,3 C5.91014913,3 3,5.91014913 3,9.5 C3,10.6847009 3.31694108,11.8217855 3.90894164,12.8172581 C3.97933113,12.9356208 3.99778647,13.0777748 3.95995425,13.2101876 L3.22801099,15.771989 L5.7898124,15.0400458 Z M16.6787004,7.32146597 C19.8088582,8.2695726 22,11.1682874 22,14.5 C22,15.791292 21.6727837,17.0357461 21.0596438,18.1387259 L21.980762,21.3626394 C22.0885265,21.7398154 21.7398154,22.0885265 21.3626394,21.980762 L18.1387259,21.0596438 C17.0357461,21.6727837 15.791292,22 14.5,22 C11.1714936,22 8.27116719,19.8126453 7.32145812,16.6786102 C6.81438749,16.5249459 6.32531045,16.3175988 5.86127413,16.0596438 L2.63736056,16.980762 C2.26018462,17.0885265 1.91147347,16.7398154 2.01923803,16.3626394 L2.94035619,13.1387259 C2.32721633,12.0357461 2,10.791292 2,9.5 C2,5.35786438 5.35786438,2 9.5,2 C12.8844665,2 15.7453349,4.24179021 16.6787004,7.32146597 L16.6787004,7.32146597 Z M16.9296994,8.46886327 C16.9760497,8.80594809 17,9.1501771 17,9.5 C17,13.6421356 13.6421356,17 9.5,17 C9.15228938,17 8.8079749,16.9762741 8.46890428,16.9296286 C9.44418788,19.352582 11.8110214,21 14.5,21 C15.6847009,21 16.8217855,20.6830589 17.8172581,20.0910584 C17.9356208,20.0206689 18.0777748,20.0022135 18.2101876,20.0400458 L20.771989,20.771989 L20.0400458,18.2101876 C20.0022135,18.0777748 20.0206689,17.9356208 20.0910584,17.8172581 C20.6830589,16.8217855 21,15.6847009 21,14.5 C21,11.8086534 19.3499538,9.44299439 16.9296994,8.46886327 L16.9296994,8.46886327 Z"})])],-1),ro("div",{class:"robotmia-launcher-label"},"Онлайн чат",-1)])])]))],6)],2)):co("",!0)]),_:1}),Gt(ro("div",{class:V(["robotmia-chat-widget",{"robotmia-expanded":H.value,"robotmia-resizing":nt.value,"robotmia-instant":f,"robotmia-separate-window-mobile":g&&wt(m),"robotmia-separate-window-mobile-open":g&&wt(m)&&H.value}]),"data-position":wt(s),style:U(it.value)},[H.value&&g&&wt(m)&&wt($e).length&&We.value?(Zi(),Yi("button",{key:0,type:"button",class:"robotmia-back-btn",onClick:Kt,"aria-label":"Назад"},[...t[7]||(t[7]=[ro("svg",{class:"robotmia-close-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[ro("path",{d:"M15 18l-6-6 6-6"})],-1)])])):co("",!0),so(Ho,{name:"robotmia-fade"},{default:Zt(()=>[wt($e).length&&Ue.value&&!H.value?(Zi(),Yi("div",{key:0,ref_key:"messengerPanelRef",ref:Be,class:V(["robotmia-messenger-panel",{"robotmia-mobile-mode":!je}]),style:U({height:je?"auto":Et.value}),onMouseenter:ze,onMouseleave:qe},[ro("div",ua,[(Zi(!0),Yi(Vi,null,zn(wt($e),(e,t)=>(Zi(),Yi(Vi,{key:t},[ro("div",{class:"robotmia-messenger-item",onClick:t=>Ht(e)},[ro("div",ha,[ro("img",{src:e.iconSrc,alt:e.title,"data-icon":e.icon},null,8,pa)]),je?(Zi(),Yi("span",fa,Z(e.title),1)):co("",!0)],8,da),je&&t<wt($e).length-1?(Zi(),Yi("div",ma)):co("",!0)],64))),128)),je&&wt($e).length?(Zi(),Yi("div",va)):co("",!0),ro("div",{class:"robotmia-messenger-item",onClick:Wt},[t[8]||(t[8]=ro("div",{class:"robotmia-messenger-icon"},[ro("svg",{fill:"black",width:"30px",height:"30px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[ro("path",{d:"M5.7898124,15.0400458 C5.92222516,15.0022135 6.06437918,15.0206689 6.18274191,15.0910584 C7.17821446,15.6830589 8.31529906,16 9.5,16 C13.0898509,16 16,13.0898509 16,9.5 C16,5.91014913 13.0898509,3 9.5,3 C5.91014913,3 3,5.91014913 3,9.5 C3,10.6847009 3.31694108,11.8217855 3.90894164,12.8172581 C3.97933113,12.9356208 3.99778647,13.0777748 3.95995425,13.2101876 L3.22801099,15.771989 L5.7898124,15.0400458 Z M16.6787004,7.32146597 C19.8088582,8.2695726 22,11.1682874 22,14.5 C22,15.791292 21.6727837,17.0357461 21.0596438,18.1387259 L21.980762,21.3626394 C22.0885265,21.7398154 21.7398154,22.0885265 21.3626394,21.980762 L18.1387259,21.0596438 C17.0357461,21.6727837 15.791292,22 14.5,22 C11.1714936,22 8.27116719,19.8126453 7.32145812,16.6786102 C6.81438749,16.5249459 6.32531045,16.3175988 5.86127413,16.0596438 L2.63736056,16.980762 C2.26018462,17.0885265 1.91147347,16.7398154 2.01923803,16.3626394 L2.94035619,13.1387259 C2.32721633,12.0357461 2,10.791292 2,9.5 C2,5.35786438 5.35786438,2 9.5,2 C12.8844665,2 15.7453349,4.24179021 16.6787004,7.32146597 L16.6787004,7.32146597 Z M16.9296994,8.46886327 C16.9760497,8.80594809 17,9.1501771 17,9.5 C17,13.6421356 13.6421356,17 9.5,17 C9.15228938,17 8.8079749,16.9762741 8.46890428,16.9296286 C9.44418788,19.352582 11.8110214,21 14.5,21 C15.6847009,21 16.8217855,20.6830589 17.8172581,20.0910584 C17.9356208,20.0206689 18.0777748,20.0022135 18.2101876,20.0400458 L20.771989,20.771989 L20.0400458,18.2101876 C20.0022135,18.0777748 20.0206689,17.9356208 20.0910584,17.8172581 C20.6830589,16.8217855 21,15.6847009 21,14.5 C21,11.8086534 19.3499538,9.44299439 16.9296994,8.46886327 L16.9296994,8.46886327 Z"})])],-1)),je?(Zi(),Yi("span",ga,"Написать на сайте")):co("",!0)])])],38)):co("",!0)]),_:1}),ro("div",{class:V(["robotmia-widget",{"robotmia-open":H.value,"robotmia-compact-opening":J.value,"robotmia-compact-closing":X.value,"robotmia-header-revealed":W.value,"robotmia-no-transition":G.value}])},[H.value&&wt(et)?(Zi(),Yi("div",{key:0,class:"robotmia-resize-handle",onPointerdown:ct,"aria-label":"Изменить высоту окна"},null,32)):co("",!0),ro("div",{ref_key:"ovalRef",ref:Ne,class:V(["robotmia-oval",{"robotmia-mobile-closed":wt(v)&&!H.value}]),onClick:Vt,onTouchend:zt,onMouseenter:qt,onMouseleave:qe},[De.value?(Zi(),Yi("div",ba,[so(Ho,{name:"robotmia-fade",mode:"out-in",appear:""},{default:Zt(()=>[(Zi(),Yi("div",{key:W.value?"open":"closed",class:"robotmia-oval-text-lines"},[ro("div",ya,Z(Pt.value),1),Ot.value?(Zi(),Yi("div",wa,Z(Ot.value),1)):co("",!0),W.value&&oe.value?(Zi(),Yi("div",_a,"Оператор")):co("",!0)]))]),_:1})])):co("",!0),g&&wt(m)?(Zi(),Yi("button",{key:1,type:"button",class:"robotmia-oval-mobile-close",onClick:jr(Jt,["stop"])},[...t[9]||(t[9]=[ro("svg",{class:"robotmia-close-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round"},[ro("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])):co("",!0),g&&wt(m)?co("",!0):(Zi(),Yi("div",{key:2,class:V(["robotmia-oval-icon",{"robotmia-has-logo":wt(R)}])},[wt(R)?(Zi(),Yi("svg",Ca,[ro("image",{href:`${wt(R)}`,width:"50",height:"50"},null,8,ka)])):(Zi(),Yi("svg",Sa,[...t[10]||(t[10]=[ro("path",{d:"M5.7898124,15.0400458 C5.92222516,15.0022135 6.06437918,15.0206689 6.18274191,15.0910584 C7.17821446,15.6830589 8.31529906,16 9.5,16 C13.0898509,16 16,13.0898509 16,9.5 C16,5.91014913 13.0898509,3 9.5,3 C5.91014913,3 3,5.91014913 3,9.5 C3,10.6847009 3.31694108,11.8217855 3.90894164,12.8172581 C3.97933113,12.9356208 3.99778647,13.0777748 3.95995425,13.2101876 L3.22801099,15.771989 L5.7898124,15.0400458 Z M16.6787004,7.32146597 C19.8088582,8.2695726 22,11.1682874 22,14.5 C22,15.791292 21.6727837,17.0357461 21.0596438,18.1387259 L21.980762,21.3626394 C22.0885265,21.7398154 21.7398154,22.0885265 21.3626394,21.980762 L18.1387259,21.0596438 C17.0357461,21.6727837 15.791292,22 14.5,22 C11.1714936,22 8.27116719,19.8126453 7.32145812,16.6786102 C6.81438749,16.5249459 6.32531045,16.3175988 5.86127413,16.0596438 L2.63736056,16.980762 C2.26018462,17.0885265 1.91147347,16.7398154 2.01923803,16.3626394 L2.94035619,13.1387259 C2.32721633,12.0357461 2,10.791292 2,9.5 C2,5.35786438 5.35786438,2 9.5,2 C12.8844665,2 15.7453349,4.24179021 16.6787004,7.32146597 L16.6787004,7.32146597 Z M16.9296994,8.46886327 C16.9760497,8.80594809 17,9.1501771 17,9.5 C17,13.6421356 13.6421356,17 9.5,17 C9.15228938,17 8.8079749,16.9762741 8.46890428,16.9296286 C9.44418788,19.352582 11.8110214,21 14.5,21 C15.6847009,21 16.8217855,20.6830589 17.8172581,20.0910584 C17.9356208,20.0206689 18.0777748,20.0022135 18.2101876,20.0400458 L20.771989,20.771989 L20.0400458,18.2101876 C20.0022135,18.0777748 20.0206689,17.9356208 20.0910584,17.8172581 C20.6830589,16.8217855 21,15.6847009 21,14.5 C21,11.8086534 19.3499538,9.44299439 16.9296994,8.46886327 L16.9296994,8.46886327 Z"},null,-1)])]))],2)),g&&wt(m)?co("",!0):(Zi(),Yi("button",{key:3,type:"button",class:V(["robotmia-header-close",{"robotmia-header-close-hidden":!W.value}]),onClick:jr(Xt,["stop"]),"aria-label":"Закрыть чат"},[...t[11]||(t[11]=[ro("svg",{class:"robotmia-close-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round"},[ro("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])],2))],34),so(Ho,{name:"robotmia-grow-down"},{default:Zt(()=>{var e,i,o;return[H.value&&!Dt.value?(Zi(),Yi("div",xa,[ro("div",{class:"robotmia-messages",ref_key:"messagesContainer",ref:Ft,onScrollPassive:Vn},[d.value?(Zi(),Yi("div",Ta,[...t[12]||(t[12]=[ro("span",{class:"robotmia-history-spinner"},null,-1)])])):co("",!0),(Zi(!0),Yi(Vi,null,zn(ue.value,(e,i)=>{var o;return Zi(),Yi(Vi,{key:e.id??i},["system"===e.type?(Zi(),Yi("div",{key:0,class:"robotmia-info","data-id":e.id},Z(e.text),9,La)):"contact"===e.type?(Zi(),Yi("div",{key:1,class:"robotmia-message robotmia-user","data-id":e.id},[e.reply?(Zi(),Yi("div",Ia,[ro("span",Aa,Z(e.reply.author),1),ro("span",Pa,Z(e.reply.text),1)])):co("",!0),e.text?(Zi(),Yi("div",{key:1,class:"robotmia-bubble",innerHTML:yt(e.text)},null,8,Oa)):co("",!0),e.attachments&&e.attachments.length?(Zi(),Yi("div",{key:2,class:V(["robotmia-attachments",{"robotmia-user":"contact"===e.type,"robotmia-operator":"user"===e.type}])},[(Zi(!0),Yi(Vi,null,zn(e.attachments,(n,i)=>(Zi(),Yi("div",{key:i,class:V(["robotmia-attachment-item",{"robotmia-user":"contact"===e.type,"robotmia-operator":"user"===e.type}])},["image"===n.type?(Zi(),Yi("img",{key:0,src:n.attachmentId&&qn.value[n.attachmentId]||n.base64||n.url||"",alt:"Изображение",class:"robotmia-attachment-image",onClick:e=>Oi(n.attachmentId&&qn.value[n.attachmentId]||n.base64||n.url||"",n.filename),onLoad:e=>Yn(n)},null,40,Ma)):Kn(n)?(Zi(),Yi("div",{key:1,class:V(["robotmia-audio-player",{"robotmia-disabled":B.value[Gn(n)]}])},[ro("button",{type:"button",class:"robotmia-audio-play-btn",onClick:e=>!B.value[Gn(n)]&&_i(Gn(n)),disabled:B.value[Gn(n)],title:B.value[Gn(n)]?"Аудио недоступно":"Воспроизвести/Пауза"},[mi.value[Gn(n)]?(Zi(),Yi("svg",$a,[...t[14]||(t[14]=[ro("path",{d:"M14,19H18V5H14M6,19H10V5H6V19Z"},null,-1)])])):(Zi(),Yi("svg",Da,[...t[13]||(t[13]=[ro("path",{d:"M8,5.14V19.14L19,12.14L8,5.14Z"},null,-1)])]))],8,Ra),ro("div",ja,[ro("div",Ua,[ro("span",Na,Z(yi(vi.value[Gn(n)]||0)),1),ro("div",{class:"robotmia-progress-container",onClick:e=>!B.value[Gn(n)]&&xi(e,Gn(n))},[ro("div",{class:"robotmia-progress-bar",style:U({width:(bi.value[Gn(n)]||0)+"%"})},null,4)],8,Ba)])]),ro("audio",{ref_for:!0,ref:e=>fi.value[Gn(n)]=e,src:Zn(n),onLoadedmetadata:e=>Ci(Gn(n)),onTimeupdate:e=>ki(Gn(n)),onEnded:e=>Si(Gn(n)),onError:e=>Ti(Gn(n)),onStalled:e=>Ti(Gn(n))},null,40,Fa)],2)):"video"===n.type?(Zi(),Yi(Vi,{key:2},[Xn(n)?(Zi(),Yi("video",{key:0,src:Xn(n),class:"robotmia-attachment-video",controls:"",preload:"metadata",playsinline:""},null,8,Ha)):(Zi(),Yi("div",Va,[...t[15]||(t[15]=[ro("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",opacity:"0.4"},[ro("path",{d:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z"})],-1)])]))],64)):"document"===n.type?(Zi(),Yi(Vi,{key:3},[t[16]||(t[16]=ro("div",{class:"robotmia-attachment-icon"},[ro("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[ro("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),ro("div",za,[ro("div",{class:"robotmia-attachment-filename",style:{cursor:"pointer"},onClick:jr(e=>Ri(n.attachmentId&&qn.value[n.attachmentId]||n.base64||n.url,n.filename,n,e),["stop","prevent"])},Z(n.filename),9,qa)])],64)):co("",!0)],2))),128))],2)):co("",!0),ro("div",{class:V(["robotmia-time robotmia-small robotmia-userTime",{"robotmia-delivered":!0===e.delivered,"robotmia-notDelivered":!1===e.delivered,"robotmia-sending":null===e.delivered||void 0===e.delivered}])},["contact"===e.type?(Zi(),Yi("span",Wa,[!0===e.delivered?(Zi(),Yi("span",Ja,[...t[17]||(t[17]=[ro("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"var(--primary-color)"},[ro("path",{d:"M1.7494 13.0502C1.5494 12.8502 1.4534 12.6169 1.4614 12.3502C1.4694 12.0836 1.57373 11.8502 1.7744 11.6502C1.9744 11.4669 2.20773 11.3709 2.4744 11.3622C2.74107 11.3536 2.9744 11.4496 3.1744 11.6502L6.7244 15.2002L7.0744 15.5502L7.4244 15.9002C7.6244 16.1002 7.7204 16.3336 7.7124 16.6002C7.7044 16.8669 7.60007 17.1002 7.3994 17.3002C7.1994 17.4836 6.96607 17.5796 6.6994 17.5882C6.43273 17.5969 6.1994 17.5009 5.9994 17.3002L1.7494 13.0502ZM12.3494 15.1752L20.8494 6.67524C21.0494 6.47524 21.2827 6.37957 21.5494 6.38824C21.8161 6.3969 22.0494 6.5009 22.2494 6.70024C22.4327 6.90024 22.5287 7.13357 22.5374 7.40024C22.5461 7.6669 22.4501 7.90024 22.2494 8.10024L13.0494 17.3002C12.8494 17.5002 12.6161 17.6002 12.3494 17.6002C12.0827 17.6002 11.8494 17.5002 11.6494 17.3002L7.3994 13.0502C7.21607 12.8669 7.1244 12.6379 7.1244 12.3632C7.1244 12.0886 7.21607 11.8509 7.3994 11.6502C7.5994 11.4502 7.83707 11.3502 8.1124 11.3502C8.38773 11.3502 8.62507 11.4502 8.8244 11.6502L12.3494 15.1752ZM16.5744 8.12524L13.0494 11.6502C12.8661 11.8336 12.6371 11.9252 12.3624 11.9252C12.0877 11.9252 11.8501 11.8336 11.6494 11.6502C11.4494 11.4502 11.3494 11.2129 11.3494 10.9382C11.3494 10.6636 11.4494 10.4259 11.6494 10.2252L15.1744 6.70024C15.3577 6.5169 15.5871 6.42524 15.8624 6.42524C16.1377 6.42524 16.3751 6.5169 16.5744 6.70024C16.7744 6.90024 16.8744 7.13757 16.8744 7.41224C16.8744 7.6869 16.7744 7.92457 16.5744 8.12524Z"})],-1)])])):!1===e.delivered?(Zi(),Yi("span",Xa,[...t[18]||(t[18]=[ro("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"var(--primary-color)"},[ro("path",{d:"M12 17C12.2833 17 12.521 16.904 12.713 16.712C12.905 16.52 13.0007 16.2827 13 16C12.9993 15.7173 12.9033 15.48 12.712 15.288C12.5207 15.096 12.2833 15 12 15C11.7167 15 11.4793 15.096 11.288 15.288C11.0967 15.48 11.0007 15.7173 11 16C10.9993 16.2827 11.0953 16.5203 11.288 16.713C11.4807 16.9057 11.718 17.0013 12 17ZM11 13H13V7H11V13ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88334 20.6867 5.825 19.9743 4.925 19.075C4.025 18.1757 3.31267 17.1173 2.788 15.9C2.26333 14.6827 2.00067 13.3827 2 12C1.99933 10.6173 2.262 9.31733 2.788 8.1C3.314 6.88267 4.02633 5.82433 4.925 4.925C5.82367 4.02567 6.882 3.31333 8.1 2.788C9.318 2.26267 10.618 2 12 2C13.382 2 14.682 2.26267 15.9 2.788C17.118 3.31333 18.1763 4.02567 19.075 4.925C19.9737 5.82433 20.6863 6.88267 21.213 8.1C21.7397 9.31733 22.002 10.6173 22 12C21.998 13.3827 21.7353 14.6827 21.212 15.9C20.6887 17.1173 19.9763 18.1757 19.075 19.075C18.1737 19.9743 17.1153 20.687 15.9 21.213C14.6847 21.739 13.3847 22.0013 12 22Z"})],-1)])])):(Zi(),Yi("span",Za,[...t[19]||(t[19]=[ro("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"var(--primary-color)"},[ro("path",{d:"M9.55018 15.15L18.0252 6.675C18.2252 6.475 18.4585 6.375 18.7252 6.375C18.9918 6.375 19.2252 6.475 19.4252 6.675C19.6252 6.875 19.7252 7.11267 19.7252 7.388C19.7252 7.66333 19.6252 7.90067 19.4252 8.1L10.2502 17.3C10.0502 17.5 9.81685 17.6 9.55018 17.6C9.28351 17.6 9.05018 17.5 8.85018 17.3L4.55018 13C4.35018 12.8 4.25418 12.5627 4.26218 12.288C4.27018 12.0133 4.37451 11.7757 4.57518 11.575C4.77585 11.3743 5.01351 11.2743 5.28818 11.275C5.56285 11.2757 5.80018 11.3757 6.00018 11.575L9.55018 15.15Z"})],-1)])]))])):co("",!0),lo(" "+Z(e.time),1)],2)],8,Ea)):"user"===e.type?(Zi(),Yi("div",{key:2,class:"robotmia-message robotmia-operator","data-id":e.id},[e.buttons&&e.buttons.length?co("",!0):(Zi(),Yi("div",Ka,[lo(Z((null==(o=e.sender)?void 0:o.name)||"Оператор")+" ",1),t[20]||(t[20]=ro("span",{class:"robotmia-tag"},"Оператор",-1))])),e.reply?(Zi(),Yi("div",Qa,[ro("span",Ya,Z(e.reply.author),1),ro("span",el,Z(e.reply.text),1)])):co("",!0),e.text?(Zi(),Yi("div",{key:2,class:V(["robotmia-bubble robotmia-outlined",{"robotmia-keyboard-bubble":e.buttons&&e.buttons.length}]),innerHTML:yt(e.text)},null,10,tl)):co("",!0),e.buttons&&e.buttons.length?(Zi(),Yi("div",nl,[(Zi(!0),Yi(Vi,null,zn(dn(e.buttons),(t,i)=>(Zi(),Yi("div",{key:i,class:"robotmia-widget-keyboard-row"},[(Zi(!0),Yi(Vi,null,zn(t,(t,i)=>(Zi(),Yi("button",{key:i,type:"button",class:"robotmia-widget-keyboard-btn",disabled:!0===e._buttonsDisabled,onClick:i=>async function(e,t){if(!t||!t.text)return;if(!0===e._buttonsDisabled)return;e._buttonsDisabled=!0,e._widgetKeyboardPending=!0;const i=String(t.text);e.buttons=[],function(e,t){const n=`${e.server_message_id??e.id}${Vl}`,i=ue.value||[];if(i.some(e=>String(e.id)===n))return;let o=i.indexOf(e);-1===o&&(o=i.findIndex(t=>String(t.id)===String(e.id))),-1!==o&&i.splice(o+1,0,{id:n,server_message_id:n,type:e.type,sender:e.sender,text:`Вы выбрали "${t}"`,time:e.time,attachments:[],buttons:[],createdAt:e.createdAt,delivered:!0})}(e,i);try{const o=`${P}/${encodeURIComponent(n)}/contact/${encodeURIComponent(r)}/callback`;await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({message_id:e.server_message_id,callback_data:t.callback_data??i,text:i})})}catch(ql){}finally{setTimeout(()=>Hn(),200)}}(e,t)},Z(t.text),9,il))),128))]))),128))])):co("",!0),e.attachments&&e.attachments.length?(Zi(),Yi("div",ol,[(Zi(!0),Yi(Vi,null,zn(e.attachments,(e,n)=>(Zi(),Yi("div",{key:n,class:"robotmia-attachment-item"},["document"===e.type?(Zi(),Yi("div",{key:0,class:"robotmia-attachment-link",onClick:jr(t=>Ri(e.url,e.filename,e,t),["stop","prevent"]),style:{cursor:"pointer"}},[t[21]||(t[21]=ro("svg",{width:"18",height:"18",fill:"currentColor",viewBox:"0 0 24 24"},[ro("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1)),ro("span",sl,Z(e.filename),1)],8,rl)):Kn(e)?(Zi(),Yi("div",{key:1,class:V(["robotmia-audio-player",{"robotmia-disabled":B.value[Gn(e)]}])},[ro("button",{type:"button",class:"robotmia-audio-play-btn",onClick:t=>!B.value[Gn(e)]&&_i(Gn(e)),disabled:B.value[Gn(e)],title:B.value[Gn(e)]?"Аудио недоступно":"Воспроизвести/Пауза"},[mi.value[Gn(e)]?(Zi(),Yi("svg",cl,[...t[23]||(t[23]=[ro("path",{d:"M14,19H18V5H14M6,19H10V5H6V19Z"},null,-1)])])):(Zi(),Yi("svg",ll,[...t[22]||(t[22]=[ro("path",{d:"M8,5.14V19.14L19,12.14L8,5.14Z"},null,-1)])]))],8,al),ro("div",ul,[ro("div",dl,[ro("span",hl,Z(yi(vi.value[Gn(e)]||0)),1),ro("div",{class:"robotmia-progress-container",onClick:t=>!B.value[Gn(e)]&&xi(t,Gn(e))},[ro("div",{class:"robotmia-progress-bar",style:U({width:(bi.value[Gn(e)]||0)+"%"})},null,4)],8,pl)])]),ro("audio",{ref_for:!0,ref:t=>fi.value[Gn(e)]=t,src:Zn(e),onLoadedmetadata:t=>Ci(Gn(e)),onTimeupdate:t=>ki(Gn(e)),onEnded:t=>Si(Gn(e)),onError:t=>Ti(Gn(e)),onStalled:t=>Ti(Gn(e))},null,40,fl)],2)):"video"===e.type?(Zi(),Yi(Vi,{key:2},[Xn(e)?(Zi(),Yi("video",{key:0,src:Xn(e),class:"robotmia-attachment-video",controls:"",preload:"metadata",playsinline:""},null,8,ml)):(Zi(),Yi("div",vl,[...t[24]||(t[24]=[ro("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",opacity:"0.4"},[ro("path",{d:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z"})],-1)])]))],64)):"image"===e.type?(Zi(),Yi("img",{key:3,src:e.url,alt:e.filename,class:"robotmia-attachment-image",loading:"lazy",onClick:t=>Oi(e.url,e.filename),style:{cursor:"pointer"}},null,8,gl)):co("",!0)]))),128))])):co("",!0),ro("div",bl,Z(e.time),1)],8,Ga)):co("",!0)],64)}),128)),j.value?(Zi(),eo(ns,{key:1,visible:wt(S).visible,title:(null==(e=re.value)?void 0:e.title)||wt(S).title,description:se.value,range:wt(S).range,"bad-range":wt(S).badRange,"bad-message":(null==(i=re.value)?void 0:i.badMessage)||wt(S).badMessage,"good-message":wt(S).goodMessage,"comment-enabled":wt(S).commentEnabled,"bad-range-enabled":wt(S).badRangeEnabled,"comment-required":wt(S).commentRequired,"followup-question":(null==(o=re.value)?void 0:o.followupQuestion)||"",onClose:t[0]||(t[0]=e=>j.value=!1),onRated:Ai},null,8,["visible","title","description","range","bad-range","bad-message","good-message","comment-enabled","bad-range-enabled","comment-required","followup-question"])):co("",!0)],544),so(Ho,{name:"robotmia-fade"},{default:Zt(()=>[Lt.value.visible?(Zi(),Yi("div",yl,[ro("button",{class:"robotmia-popup-close-btn",onClick:Mi,type:"button","aria-label":"Закрыть"},[...t[25]||(t[25]=[ro("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"#fff","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[ro("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])]),ro("button",{class:"robotmia-popup-download-btn",onClick:jr(Di,["prevent"]),type:"button"},[...t[26]||(t[26]=[ro("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ro("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 11.25L6 10.5L9.74999 10.5L9.74999 12L6.75 12L6.75 18L17.25 18L17.25 12L14.25 12L14.25 10.5L18 10.5L18.75 11.25L18.75 18.75L18 19.5L6 19.5L5.25 18.75L5.25 11.25ZM12.75 7.06064L12.75 15L11.25 15L11.25 7.06075L9.53039 8.78037L8.46973 7.71971L12.0001 4.18937L15.5304 7.71971L14.4697 8.78037L12.75 7.06064Z",fill:"#fff"})],-1)])]),ro("img",{src:Lt.value.src,alt:"Просмотр изображения",class:"robotmia-popup-image"},null,8,wl)])):co("",!0)]),_:1}),so(Ho,{name:"robotmia-errors-slide"},{default:Zt(()=>[ht.value.length>0?(Zi(),Yi("div",_l,[(Zi(!0),Yi(Vi,null,zn(ht.value,(e,n)=>(Zi(),Yi("div",{key:n,class:"robotmia-error-message"},[t[27]||(t[27]=ro("span",{class:"robotmia-error-icon"},[ro("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[ro("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})])],-1)),ro("span",Cl,Z(e),1),ro("button",{class:"robotmia-error-close",onClick:e=>ht.value.splice(n,1),type:"button"},"×",8,kl)]))),128))])):co("",!0)]),_:1}),t[37]||(t[37]=ro("div",{class:"robotmia-divider"},null,-1)),ro("div",Sl,[le.value.length?(Zi(),Yi("div",xl,[(Zi(!0),Yi(Vi,null,zn(le.value,(e,n)=>(Zi(),Yi("div",{key:n,class:V(["robotmia-attached-chip",{"robotmia-attached-chip-image":e.isImage}])},[e.isImage?(Zi(),Yi("img",{key:0,src:e.url,alt:e.name,class:"robotmia-chip-thumb"},null,8,Tl)):(Zi(),Yi(Vi,{key:1},[t[28]||(t[28]=ro("span",{class:"robotmia-chip-icon"},[ro("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"16",height:"16"},[ro("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),ro("span",Ll,Z(e.name),1)],64)),ro("button",{type:"button",class:"robotmia-chip-remove",onClick:jr(e=>function(e){ae.value=ae.value.filter((t,n)=>n!==e)}(n),["stop"]),"aria-label":"Удалить вложение"},"×",8,El)],2))),128))])):co("",!0),ro("div",Il,[Gt(ro("textarea",{ref_key:"textInputRef",ref:ne,"onUpdate:modelValue":t[1]||(t[1]=e=>te.value=e),class:"robotmia-text-input",placeholder:"Введите сообщение...",onKeyup:Nr(jr(ii,["exact","prevent"]),["enter"]),onFocus:an,rows:"1"},null,40,Al),[[xr,te.value]]),Le.value?(Zi(),Yi("span",{key:0,class:"robotmia-char-counter",style:U({color:Te.value?"#dc2626":"rgba(0,0,0,0.4)"})},Z(xe.value)+" / "+Z(wt(D)),5)):co("",!0),ro("button",{class:"robotmia-send-btn",disabled:Ee.value,onClick:ii},[...t[29]||(t[29]=[ro("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ro("path",{d:"M12 19V5M12 5L7 10M12 5L17 10",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,Pl)]),ro("div",Ol,[ro("button",{class:"robotmia-control-btn robotmia-menu-btn",onClick:jr(Li,["stop"])},[...t[30]||(t[30]=[ro("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ro("circle",{cx:"12",cy:"5",r:"2",fill:"var(--primary-color)"}),ro("circle",{cx:"12",cy:"12",r:"2",fill:"var(--primary-color)"}),ro("circle",{cx:"12",cy:"19",r:"2",fill:"var(--primary-color)"})],-1)])]),ro("button",{class:"robotmia-control-btn",onClick:jr(ai,["stop"])},[...t[31]||(t[31]=[ro("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ro("circle",{cx:"12",cy:"12",r:"10",fill:"white",stroke:"var(--primary-color)","stroke-width":"2"}),ro("path",{d:"M8 14C8 14 9.5 16 12 16C14.5 16 16 14 16 14",stroke:"var(--primary-color)","stroke-width":"2","stroke-linecap":"round"}),ro("circle",{cx:"8.5",cy:"9.5",r:"1.5",fill:"var(--primary-color)"}),ro("circle",{cx:"15.5",cy:"9.5",r:"1.5",fill:"var(--primary-color)"})],-1)])]),ro("button",{class:"robotmia-control-btn",onClick:jr(oi,["stop"])},[t[32]||(t[32]=ro("svg",{width:"20",height:"20",viewBox:"0 0 32 32",fill:"none",stroke:"var(--primary-color)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ro("path",{d:"M10 9 L10 24 C10 28 13 30 16 30 19 30 22 28 22 24 L22 6 C22 3 20 2 18 2 16 2 14 3 14 6 L14 23 C14 24 15 25 16 25 17 25 18 24 18 23 L18 9"})],-1)),ae.value.length>0?(Zi(),Yi("span",Ml,Z(ae.value.length),1)):co("",!0)])])]),so(Ho,{name:"robotmia-fade"},{default:Zt(()=>[ee.value?(Zi(),Yi("div",Rl,[(Zi(),Yi(Vi,null,zn(ft,e=>ro("span",{key:e,class:"robotmia-emoji",onClick:t=>{return n=e,te.value+=n,void(ee.value=!1);var n}},Z(e),9,Dl)),64))])):co("",!0)]),_:1}),so(Ho,{name:"robotmia-fade-up"},{default:Zt(()=>[N.value?(Zi(),Yi("div",$l,[ro("div",{class:"robotmia-menu-header"},[ro("button",{class:"robotmia-close-menu-btn",onClick:Li}," ✕ ")]),ro("div",jl,[Tt.value?(Zi(),Yi("button",{key:0,class:"robotmia-menu-item robotmia-rate-service",onClick:Ei},[...t[33]||(t[33]=[ro("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"var(--primary-color)"},[ro("path",{d:"M14.65 8.93274L12.4852 4.30901C12.2923 3.89699 11.7077 3.897 11.5148 4.30902L9.35002 8.93274L4.45559 9.68243C4.02435 9.74848 3.84827 10.2758 4.15292 10.5888L7.71225 14.2461L6.87774 19.3749C6.80571 19.8176 7.27445 20.1487 7.66601 19.9317L12 17.5299L16.334 19.9317C16.7256 20.1487 17.1943 19.8176 17.1223 19.3749L16.2878 14.2461L19.8471 10.5888C20.1517 10.2758 19.9756 9.74848 19.5444 9.68243L14.65 8.93274Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})],-1),ro("span",null,"Оценить качество обслуживания",-1)])])):co("",!0),$t.value?(Zi(),Yi("button",{key:1,class:"robotmia-menu-item robotmia-edit-contact",onClick:Ii},[...t[34]||(t[34]=[ro("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"var(--primary-color)"},[ro("path",{d:"M4 20H8L18.5 9.5C18.8978 9.10218 19.1214 8.56261 19.1214 8C19.1214 7.43739 18.8978 6.89782 18.5 6.5C18.1022 6.10218 17.5626 5.87857 17 5.87857C16.4374 5.87857 15.8978 6.10218 15.5 6.5L5 17V20H4Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),ro("path",{d:"M13.5 8.5L16.5 11.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})],-1),ro("div",{class:"robotmia-menu-item-text"},[ro("span",null,"Изменить контактные данные")],-1)])])):co("",!0),ro("button",{class:"robotmia-menu-item robotmia-sound-toggle",onClick:En},[dt.value?(Zi(),Yi("svg",Ul,[...t[35]||(t[35]=[ro("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.47 9.46998C17.6106 9.32953 17.8012 9.25064 18 9.25064C18.1988 9.25064 18.3894 9.32953 18.53 9.46998L20 10.94L21.47 9.46998C21.6122 9.3375 21.8002 9.26538 21.9945 9.26881C22.1888 9.27224 22.3742 9.35095 22.5116 9.48836C22.649 9.62577 22.7277 9.81116 22.7312 10.0055C22.7346 10.1998 22.6625 10.3878 22.53 10.53L21.061 12L22.531 13.47C22.6676 13.6115 22.7431 13.801 22.7413 13.9976C22.7395 14.1943 22.6605 14.3824 22.5214 14.5213C22.3822 14.6603 22.1941 14.7391 21.9975 14.7407C21.8008 14.7424 21.6114 14.6667 21.47 14.53L20 13.06L18.53 14.53C18.3878 14.6625 18.1998 14.7346 18.0055 14.7312C17.8112 14.7277 17.6258 14.649 17.4884 14.5116C17.351 14.3742 17.2723 14.1888 17.2688 13.9945C17.2654 13.8002 17.3375 13.6122 17.47 13.47L18.94 12L17.47 10.53C17.3295 10.3894 17.2507 10.1987 17.2507 9.99998C17.2507 9.80123 17.3295 9.61061 17.47 9.46998ZM13.037 3.39598C14.2 2.62898 15.75 3.46398 15.75 4.85698V19.143C15.75 20.537 14.2 21.371 13.037 20.604L7.037 16.649C6.99641 16.6219 6.94879 16.6073 6.9 16.607H4C3.27065 16.607 2.57118 16.3173 2.05546 15.8015C1.53973 15.2858 1.25 14.5863 1.25 13.857V10.143C1.25 9.41364 1.53973 8.71417 2.05546 8.19844C2.57118 7.68272 3.27065 7.39298 4 7.39298H6.9C6.94903 7.39314 6.99702 7.37889 7.038 7.35198L13.037 3.39598Z"},null,-1)])])):(Zi(),Yi("svg",Nl,[...t[36]||(t[36]=[ro("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.537 3.39598C15.7 2.62898 17.25 3.46398 17.25 4.85698V19.143C17.25 20.537 15.7 21.371 14.537 20.604L8.537 16.649C8.49641 16.6219 8.44879 16.6073 8.4 16.607H5.5C4.77065 16.607 4.07118 16.3173 3.55546 15.8015C3.03973 15.2858 2.75 14.5863 2.75 13.857V10.143C2.75 9.41364 3.03973 8.71417 3.55546 8.19844C4.07118 7.68272 4.77065 7.39298 5.5 7.39298H8.4C8.44902 7.39314 8.49702 7.37889 8.538 7.35198L14.537 3.39598ZM20.5 8.24998C20.6989 8.24998 20.8897 8.329 21.0303 8.46965C21.171 8.61031 21.25 8.80107 21.25 8.99998V15C21.25 15.1989 21.171 15.3897 21.0303 15.5303C20.8897 15.671 20.6989 15.75 20.5 15.75C20.3011 15.75 20.1103 15.671 19.9697 15.5303C19.829 15.3897 19.75 15.1989 19.75 15V8.99998C19.75 8.80107 19.829 8.61031 19.9697 8.46965C20.1103 8.329 20.3011 8.24998 20.5 8.24998Z"},null,-1)])])),ro("div",Bl,[ro("span",null,Z(dt.value?"Выключить":"Включить")+" звуковые уведомления",1)])])])])):co("",!0)]),_:1}),ro("input",{ref_key:"fileInput",ref:F,type:"file",multiple:"",onChange:ri,style:{display:"none"}},null,544)])):co("",!0)]}),_:1}),so(Ho,{name:"robotmia-fade"},{default:Zt(()=>[H.value&&Dt.value?(Zi(),eo(ys,{key:0,"placeholder-text":Ut.value,"submit-label":Bt.value,fields:wt(T),"require-consent":E,"consent-template":wt(x).consentTemplate,"consent-url":wt(x).consentUrl,"consent-text":wt(x).consentText,"consent-href":wt(x).consentHref,"initial-data":jt.value,onSubmit:Pi},null,8,["placeholder-text","submit-label","fields","consent-template","consent-url","consent-text","consent-href","initial-data"])):co("",!0)]),_:1})],2)],14,ca),[[nr,!g||Je.value]])],64))}},[["__scopeId","data-v-5d4efa07"]]);!function(){const e="chat-widget-container";function t(){if(document.getElementById(e))return;const t=window.__CHAT_WIDGET_CONFIG__||{};let i=String(t.apiBaseUrl||"").trim();if(!i)try{const e=document.currentScript,t=(null==e?void 0:e.src)||"";i=t?new URL(t,window.location.href).origin:""}catch(ql){i=""}const o=document.createElement("style");o.setAttribute("data-robotmia-fonts",""),o.textContent=`\n        @font-face {\n            font-family: 'SF UI Display';\n            src: url('${i}/api/widget/font/sf-ui-display-500.woff2') format('woff2');\n            font-weight: 500;\n            font-style: normal;\n            font-display: swap;\n        }\n        @font-face {\n            font-family: 'SF UI Display';\n            src: url('${i}/api/widget/font/sf-ui-display-600.woff2') format('woff2');\n            font-weight: 600;\n            font-style: normal;\n            font-display: swap;\n        }\n        @font-face {\n            font-family: 'SF UI Display';\n            src: url('${i}/api/widget/font/sf-ui-display-700.woff2') format('woff2');\n            font-weight: 700;\n            font-style: normal;\n            font-display: swap;\n        }\n    `,document.head.appendChild(o);const r=document.createElement("div");r.id=e;const s="left"===t.position||"center"===t.position||"right"===t.position?t.position:"right";if(r.setAttribute("data-position",String(s)),!0===t.isMobileDevice||"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(max-width: 768px)").matches){const e="undefined"!=typeof window?window.visualViewport:null;let t=-1,n=-1;const i=()=>{const i=Math.round(e?e.height:window.innerHeight),o=Math.round(e?e.offsetTop:0);i!==t&&(t=i,r.style.setProperty("--widget-window-height",`${i}px`)),o!==n&&(n=o,r.style.setProperty("--widget-window-offset-top",`${o}px`))};let o=0;const s=()=>{o||(o=requestAnimationFrame(()=>{o=0,i()}))};i(),e&&(e.addEventListener("resize",s),e.addEventListener("scroll",s)),window.addEventListener("resize",s),window.addEventListener("orientationchange",s)}if("gradient"===t.colorType&&t.colorStart&&t.colorEnd){const e=String(t.colorStart).trim(),n=String(t.colorEnd).trim();e&&n?(r.style.setProperty("--primary-color",e),r.style.setProperty("--primary-color-gradient-start",e),r.style.setProperty("--primary-color-gradient-end",n),r.setAttribute("data-gradient","true")):(r.style.setProperty("--primary-color",String(t.themeColor||"#2d8ef0")),r.removeAttribute("data-gradient"))}else r.style.setProperty("--primary-color",String(t.themeColor||"#2d8ef0")),r.removeAttribute("data-gradient");const a="undefined"!=typeof HTMLElement&&"popover"in HTMLElement.prototype&&"function"==typeof r.showPopover;if(a)try{r.setAttribute("popover","manual")}catch(ql){}document.body.appendChild(r);const l=r.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=n,l.appendChild(c);const u=document.createElement("style");u.setAttribute("data-robotmia-components",""),u.textContent=window.__ROBOTMIA_STYLES__||"",l.appendChild(u),window.__ROBOTMIA_INJECT__=e=>{u.textContent=(u.textContent||"")+e};const d=document.createElement("div");if(d.className="robotmia-root",l.appendChild(d),((...e)=>{const t=(Fr||(Fr=Di(Br))).createApp(...e),{mount:n}=t;return t.mount=e=>{const i=function(e){return v(e)?document.querySelector(e):e}(e);if(!i)return;const o=t._component;m(o)||o.render||o.template||(o.template=i.innerHTML),1===i.nodeType&&(i.textContent="");const r=n(i,!1,function(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t})(zl).mount(d),a)try{r.showPopover()}catch(ql){}}const n="\n        :host {\n            all: initial;\n            position: static;\n            display: block;\n            pointer-events: none;\n            font-family: 'SF UI Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;\n            line-height: 1.4;\n\n            /* Закаливание границы тени поверх all:initial: единицы и режимы рендеринга,\n               которые all:initial формально сбрасывает, пиним явно, чтобы НИЧЕГО не утекало\n               от хоста. text-size-adjust:100% — против раздувания шрифта на мобильных;\n               color-scheme:light — контролы/скроллбары всегда в светлой схеме виджета;\n               direction:ltr — независимость от dir хоста. */\n            -webkit-text-size-adjust: 100%;\n            text-size-adjust: 100%;\n            color-scheme: light;\n            direction: ltr;\n\n            /* Размерный якорь. ВСЯ геометрия ниже выражена как calc(N * var(--rm-unit)),\n               а НЕ в rem: rem считается от font-size корня сайта-хоста и протекает сквозь\n               Shadow DOM (см. vite.widget.config.ts — там же rem→px для CSS компонентов).\n               Якорь в px → виджет не зависит от html{font-size} клиента; зум масштабирует px. */\n            --rm-unit: 16px;\n\n            /* радиусы */\n            --rm-radius-xs: calc(0.375 * var(--rm-unit));\n            --rm-radius-sm: calc(0.5 * var(--rm-unit));\n            --rm-radius-md: calc(0.75 * var(--rm-unit));\n            --rm-radius-lg: calc(1 * var(--rm-unit));\n            --rm-radius-xl: calc(1.5 * var(--rm-unit));\n            --rm-radius-pill: 999px;\n            /* радиус развёрнутого окна = торец свёрнутой пилюли (высота лаунчера 64px / 2 = 32px):\n               внешние углы в развёрнутом и свёрнутом состоянии совпадают — единое скругление. */\n            --rm-radius-window: calc(2 * var(--rm-unit));\n\n            /* шкала отступов (4/8/12/16/24) — единый ритм вместо магических чисел */\n            --rm-space-1: calc(0.25 * var(--rm-unit));\n            --rm-space-2: calc(0.5 * var(--rm-unit));\n            --rm-space-3: calc(0.75 * var(--rm-unit));\n            --rm-space-4: calc(1 * var(--rm-unit));\n            --rm-space-5: calc(1.5 * var(--rm-unit));\n\n            /* мягкие многослойные тени */\n            --rm-shadow-launcher: 0 4px 12px rgba(0, 0, 0, 0.10), 0 12px 28px rgba(0, 0, 0, 0.16);\n            --rm-shadow-panel: 0 6px 24px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);\n            --rm-shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.14);\n\n            /* геометрия лаунчера/окна */\n            --rm-launcher-h: calc(4 * var(--rm-unit));     /* высота кнопки (64px) */\n            --rm-gap-bottom: calc(2 * var(--rm-unit));     /* отступ снизу (32px) */\n            --rm-side: calc(1.25 * var(--rm-unit));        /* боковой отступ (20px) */\n            /* Ширина окна — фикс ~384px (рыночный стандарт: Intercom 400, Crisp/Tidio 372),\n               но не шире вьюпорта на узких экранах. Якорь в px (24 * 16) → ширина не зависит\n               от font-size хоста; зум масштабирует px синхронно с vw, «дыхание» сохраняется. */\n            --rm-width: min(calc(24 * var(--rm-unit)), calc(100vw - 2 * var(--rm-side)));\n            --rm-overlap: calc(2.1875 * var(--rm-unit));   /* перекрытие окна с кнопкой (35px) */\n            /* Высота окна чата — комфортный потолок 704px (рынок) в пределах доступной высоты.\n               Здесь vh-фолбэк; ниже @supports уточняет его до dvh (корректно при динамической\n               адресной строке на мобильных). */\n            --rm-chat-h: min(704px, calc(100vh - var(--rm-launcher-h) - var(--rm-gap-bottom)));\n\n            /* единая система движения: вход — мягкий ease-out, выход — ускоряющийся ease-in,\n               пружина с лёгким overshoot для мелких всплывающих элементов */\n            --rm-ease-out: cubic-bezier(0.22, 1, 0.36, 1);\n            --rm-ease-in: cubic-bezier(0.4, 0, 1, 1);\n            --rm-spring: cubic-bezier(0.34, 1.56, 0.64, 1);\n            --rm-dur-micro: 140ms;\n            --rm-dur: 220ms;\n            --rm-dur-lg: 320ms;\n\n            /* цвета */\n            --primary-color: #2d8ef0;\n            --rm-on-primary: #ffffff;\n        }\n        /* #mobile-4: когда host поднят в top-layer через Popover API — нейтрализуем UA-стили\n           поповера (position:fixed; inset:0; margin:auto; border; padding; overflow; ::backdrop),\n           превращая host в ПРОЗРАЧНЫЙ full-viewport контейнер, не перехватывающий клики. Внутренний\n           .robotmia-chat-widget (position:fixed) позиционируется от viewport, т.к. у host нет\n           transform; нахождение в top-layer даёт showPopover() и спасает от transform'а предков сайта. */\n        :host([popover]) {\n            position: fixed;\n            inset: 0;\n            width: auto;\n            height: auto;\n            max-width: none;\n            max-height: none;\n            margin: 0;\n            border: 0;\n            padding: 0;\n            background: transparent;\n            overflow: visible;\n            pointer-events: none;\n        }\n        :host([popover])::backdrop {\n            display: none;\n            background: transparent;\n        }\n        /* производный hover-цвет (раньше переменная использовалась, но не задавалась).\n           Fallback объявляем первым, color-mix переопределяет его при поддержке. */\n        :host {\n            --primary-hover: var(--primary-color);\n        }\n        @supports (color: color-mix(in srgb, red, black)) {\n            :host {\n                --primary-hover: color-mix(in srgb, var(--primary-color), black 12%);\n            }\n        }\n        @supports (height: 100dvh) {\n            :host {\n                --rm-chat-h: min(704px, calc(100dvh - var(--rm-launcher-h) - var(--rm-gap-bottom)));\n            }\n        }\n        .robotmia-root,\n        .robotmia-root * {\n            box-sizing: border-box;\n            -webkit-tap-highlight-color: transparent;\n        }\n        .robotmia-root {\n            font-size: var(--rm-unit);\n            color: var(--primary-color);\n        }\n        .robotmia-root input,\n        .robotmia-root textarea {\n            color: var(--primary-color);\n            background-color: #fff;\n            touch-action: manipulation;\n            font-family: inherit;\n            font-size: 16px; /* >=16px — защита от авто-зума полей на iOS */\n        }\n        .robotmia-root input::placeholder,\n        .robotmia-root textarea::placeholder {\n            color: #9e9e9e;\n            opacity: 1;\n        }\n        /* Высокая контрастность (Windows High Contrast / forced-colors): система заменяет\n           фон и цвета системными, и поверхности, державшиеся ТОЛЬКО на фоне (пилюля-лаунчер,\n           окно, панель быстрых ссылок), сливаются с фоном. Возвращаем им видимую форму —\n           явная граница системным цветом CanvasText. Осознанный минимум: не трогаем текст\n           и иконки (они и так перекрашиваются системой), не ломаем обычный режим. */\n        @media (forced-colors: active) {\n            .robotmia-root .robotmia-oval,\n            .robotmia-root .robotmia-widget,\n            .robotmia-root .robotmia-launcher-panel {\n                border: 1px solid CanvasText;\n            }\n        }\n    ";"complete"===document.readyState?t():window.addEventListener("load",t)}()}();
