// ==UserScript== // @name DoubanFlix - 在豆瓣页面获取添加资源链接(网盘,磁力,在线),支持电影,游戏,音乐,书籍 // @namespace http://tampermonkey.net/ // @version 1.2.2 // @description 在豆瓣页面获取添加资源链接(网盘,磁力,在线),支持电影,游戏,音乐,书籍 // @updatenote 1. 修复油猴无法安装问题 // @author Moz // @match https://movie.douban.com/subject/* // @match https://www.douban.com/game/* // @match https://music.douban.com/subject/* // @match https://book.douban.com/subject/* // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @connect scriptcat.org // @connect lanzoum.com // @connect baidu.com // @connect weiyun.com // @connect aliyundrive.com // @connect cloud.189.cn // @connect 123pan.com // @connect quark.cn // @connect xunlei.com // @connect cowtransfer.com // @connect wenshushu.cn // @connect 115cdn.com // @connect bilibili.com // @license MIT // @icon https://cdn.zerror.cc/images/%E8%B1%86%E7%93%A3%E7%BD%91.png // @downloadURL https://update.greasyfork.icu/scripts/550853/DoubanFlix%20-%20%E5%9C%A8%E8%B1%86%E7%93%A3%E9%A1%B5%E9%9D%A2%E8%8E%B7%E5%8F%96%E6%B7%BB%E5%8A%A0%E8%B5%84%E6%BA%90%E9%93%BE%E6%8E%A5%EF%BC%88%E7%BD%91%E7%9B%98%EF%BC%8C%E7%A3%81%E5%8A%9B%EF%BC%8C%E5%9C%A8%E7%BA%BF%EF%BC%89%EF%BC%8C%E6%94%AF%E6%8C%81%E7%94%B5%E5%BD%B1%EF%BC%8C%E6%B8%B8%E6%88%8F%EF%BC%8C%E9%9F%B3%E4%B9%90%EF%BC%8C%E4%B9%A6%E7%B1%8D.user.js // @updateURL https://update.greasyfork.icu/scripts/550853/DoubanFlix%20-%20%E5%9C%A8%E8%B1%86%E7%93%A3%E9%A1%B5%E9%9D%A2%E8%8E%B7%E5%8F%96%E6%B7%BB%E5%8A%A0%E8%B5%84%E6%BA%90%E9%93%BE%E6%8E%A5%EF%BC%88%E7%BD%91%E7%9B%98%EF%BC%8C%E7%A3%81%E5%8A%9B%EF%BC%8C%E5%9C%A8%E7%BA%BF%EF%BC%89%EF%BC%8C%E6%94%AF%E6%8C%81%E7%94%B5%E5%BD%B1%EF%BC%8C%E6%B8%B8%E6%88%8F%EF%BC%8C%E9%9F%B3%E4%B9%90%EF%BC%8C%E4%B9%A6%E7%B1%8D.meta.js // ==/UserScript== // 注入CSS样式 (function() { const style = document.createElement('style'); style.textContent = ` .custom-select[data-v-3b2cba4f] { position: relative; width: 100%; font-size: 14px; } .select-trigger[data-v-3b2cba4f] { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; border: 1px solid #ddd; border-radius: 8px; background-color: #ffffff; cursor: pointer; transition: all 0.2s ease; color: #333; } .select-trigger[data-v-3b2cba4f]:hover { } .select-trigger[data-v-3b2cba4f]:focus { outline: none; } .selected-text[data-v-3b2cba4f] { flex: 1; text-align: left; color: #333; } .arrow[data-v-3b2cba4f] { width: 16px !important; height: 16px !important; transition: transform 0.2s ease; color: #666 !important; background: none !important; background-image: none !important; border: none !important; transform-origin: center !important; display: inline-block !important; } .arrow-up[data-v-3b2cba4f] { transform: rotate(180deg); padding-left: 0px; } .select-dropdown[data-v-3b2cba4f] { position: absolute; top: 110%; left: 0; right: 0; /* 跟随父元素宽度 */ background: #ffffff; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 400px; overflow-y: auto; } .select-option[data-v-3b2cba4f] { padding: 4px 12px; cursor: pointer; transition: all 0.2s ease; color: #666666; /* 深灰色文字 */ background-color: #ffffff; border-radius: 6px; margin: 2px; } .select-option[data-v-3b2cba4f]:hover { background-color: #f5f5f5 !important; /* 浅灰色背景 */ color: #333333 !important; /* 深色文字 */ } .select-option.selected[data-v-3b2cba4f] { background-color: #e3f2fd; color: #1976d2; font-weight: 500; } .select-option.selected[data-v-3b2cba4f]:hover { background-color: #bbdefb !important; color: #1565c0 !important; } /* 深色模式适配 */ @media (prefers-color-scheme: dark) { .select-trigger[data-v-3b2cba4f] { background-color: #2d3748; border-color: #4a5568; color: #e2e8f0; } .select-trigger[data-v-3b2cba4f]:hover { } .selected-text[data-v-3b2cba4f] { color: #e2e8f0; } .arrow[data-v-3b2cba4f] { color: #a0aec0; } .select-dropdown[data-v-3b2cba4f] { border-radius: 4px; background-color: #2d3748; border-color: #4a5568; } .select-option[data-v-3b2cba4f] { color: #a0a0a0; background-color: #2d3748; } .select-option[data-v-3b2cba4f]:hover { background-color: #718096 !important; /* 更浅的灰色背景 */ color: #f7fafc !important; /* 更亮的文字 */ } .select-option.selected[data-v-3b2cba4f] { background-color: #2b6cb0; color: #90cdf4; } .select-option.selected[data-v-3b2cba4f]:hover { background-color: #2c5282 !important; color: #bee3f8 !important; } } .loading-container[data-v-da15572b] { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; text-align: center; } .spinner[data-v-da15572b] { width: 32px; height: 32px; border: 3px solid #e0e0e0; border-top: 3px solid #00a1d6; border-radius: 50%; animation: spin-da15572b 1s linear infinite; margin-bottom: 12px; } .loading-text[data-v-da15572b] { color: #666; font-size: 14px; font-weight: 500; } /* 不同尺寸的spinner */ .loading-container.small .spinner[data-v-da15572b] { width: 20px; height: 20px; border-width: 2px; margin-bottom: 8px; } .loading-container.small .loading-text[data-v-da15572b] { font-size: 12px; } .loading-container.large .spinner[data-v-da15572b] { width: 48px; height: 48px; border-width: 4px; margin-bottom: 16px; } .loading-container.large .loading-text[data-v-da15572b] { font-size: 16px; } /* 旋转动画 */ @keyframes spin-da15572b { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 响应式设计 */ @media (max-width: 480px) { .loading-container[data-v-da15572b] { padding: 20px 15px; } .spinner[data-v-da15572b] { width: 28px; height: 28px; border-width: 2px; } .loading-text[data-v-da15572b] { font-size: 13px; } } .link-item.skeleton[data-v-115afd35] { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 16px; margin-bottom: 12px; } .skeleton-element[data-v-115afd35] { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton-loading-115afd35 1.5s infinite; border-radius: 4px; } @keyframes skeleton-loading-115afd35 { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } .link-header[data-v-115afd35] { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .platform-badge[data-v-115afd35] { display: flex; align-items: center; gap: 6px; } .skeleton-icon[data-v-115afd35] { width: 20px; height: 20px; border-radius: 50%; } .link-meta[data-v-115afd35] { display: flex; flex-direction: column; gap: 6px; } .skeleton-language[data-v-115afd35] { width: 40px; height: 16px; } .feature-tags[data-v-115afd35] { display: flex; gap: 6px; } .skeleton-tag[data-v-115afd35] { width: 30px; height: 14px; } .link-title-row[data-v-115afd35] { display: flex; align-items: center; justify-content: space-between; } .skeleton-title[data-v-115afd35] { width: 70%; height: 20px; } .skeleton-arrow[data-v-115afd35] { width: 16px; height: 16px; border-radius: 2px; } .ios-checkbox[data-v-150f8c13] { --checkbox-size: 28px; --checkbox-color: #3b82f6; --checkbox-bg: #dbeafe; --checkbox-border: #93c5fd; position: relative; display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; vertical-align: middle; } .ios-checkbox input[data-v-150f8c13] { display: none; } .checkbox-wrapper[data-v-150f8c13] { position: relative; width: var(--checkbox-size); height: var(--checkbox-size); border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; } .checkbox-bg[data-v-150f8c13] { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 8px; border: 1px solid #d5d5d5; background: white; transition: all 0.2s ease; } .checkbox-icon[data-v-150f8c13] { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 16px; height: 16px; color: white; transition: all 0.2s ease; } .check-path[data-v-150f8c13] { stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset 0.3s ease 0.1s; } .checkbox-label[data-v-150f8c13] { font-size: 14px; color: #374151; font-weight: 500; line-height: 28px; height: 28px; display: flex; align-items: center; } /* Checked State */ .ios-checkbox input:checked + .checkbox-wrapper .checkbox-bg[data-v-150f8c13] { background: var(--checkbox-color); border-color: var(--checkbox-color); } .ios-checkbox input:checked + .checkbox-wrapper .checkbox-icon[data-v-150f8c13] { transform: translate(-50%, -50%) scale(1); } .ios-checkbox input:checked + .checkbox-wrapper .check-path[data-v-150f8c13] { stroke-dashoffset: 0; } /* Hover Effects */ .ios-checkbox:hover .checkbox-wrapper[data-v-150f8c13] { transform: scale(1.05); } /* Active Animation */ .ios-checkbox:active .checkbox-wrapper[data-v-150f8c13] { transform: scale(0.95); } /* Focus Styles */ .ios-checkbox input:focus + .checkbox-wrapper .checkbox-bg[data-v-150f8c13] { box-shadow: 0 0 0 4px var(--checkbox-bg); } /* Color Themes */ .ios-checkbox.blue[data-v-150f8c13] { --checkbox-color: #3b82f6; --checkbox-bg: #dbeafe; --checkbox-border: #93c5fd; } .ios-checkbox.green[data-v-150f8c13] { --checkbox-color: #10b981; --checkbox-bg: #d1fae5; --checkbox-border: #6ee7b7; } .ios-checkbox.purple[data-v-150f8c13] { --checkbox-color: #8b5cf6; --checkbox-bg: #ede9fe; --checkbox-border: #c4b5fd; } .ios-checkbox.red[data-v-150f8c13] { --checkbox-color: #ef4444; --checkbox-bg: #fee2e2; --checkbox-border: #fca5a5; } /* Animation */ @keyframes bounce-150f8c13 { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } } .ios-checkbox input:checked + .checkbox-wrapper[data-v-150f8c13] { animation: bounce-150f8c13 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .copy-item[data-v-aaaa00e5] { position: relative; display: inline-block; cursor: pointer; color: #007bff; text-decoration: none; transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); word-break: break-all; } .copy-item[data-v-aaaa00e5]:hover { text-decoration: underline; background-color: transparent; } .copy-item.copied[data-v-aaaa00e5] { } .tooltip[data-v-aaaa00e5] { position: absolute; top: -35px; left: 50%; transform: translateX(-50%); padding: 6px 12px; background: #333333d1; color: white; border-radius: 4px; font-size: 12px; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: all 0.3s ease; z-index: 1000; } .tooltip[data-v-aaaa00e5]::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #333333d1; } .copy-item:hover .tooltip[data-v-aaaa00e5] { opacity: 1; visibility: visible; top: -40px; } .extract-code[data-v-aaaa00e5] { position: relative; display: inline-block; background: #f8f9fa; padding: 2px 6px; border-radius: 3px; font-family: monospace; color: #e83e8c; cursor: pointer; transition: all 0.3s ease; } .extract-code[data-v-aaaa00e5]:hover { background: #e9ecef; } .extract-code.copied[data-v-aaaa00e5] { } .extract-code:hover .tooltip[data-v-aaaa00e5] { opacity: 1; visibility: visible; top: -40px; } .toast-container[data-v-52e28bd4] { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; pointer-events: none; } .toast[data-v-52e28bd4] { background: white; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); display: flex; align-items: center; justify-content: space-between; min-width: 300px; max-width: 500px; pointer-events: auto; cursor: pointer; animation: slideDown-52e28bd4 0.3s ease-out; transition: all 0.3s ease; } .toast[data-v-52e28bd4]:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); } .error-toast[data-v-52e28bd4] { background: #fff5f5; } .error-toast span[data-v-52e28bd4] { color: #721c24; } .success-toast[data-v-52e28bd4] { background: #f0fff4; } .success-toast span[data-v-52e28bd4] { color: #155724; } .toast-close[data-v-52e28bd4] { background: none; border: none; font-size: 18px; font-weight: bold; color: #999; cursor: pointer; margin-left: 12px; padding: 0; line-height: 1; } .toast-close[data-v-52e28bd4]:hover { color: #666; } @keyframes slideDown-52e28bd4 { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .url-input-container[data-v-dc5500ab] { position: relative; width: 100%; } .input-wrapper[data-v-dc5500ab] { position: relative; width: 100%; border: 1px solid #ddd; border-radius: 6px; background: #fff; transition: border-color 0.2s ease; } .input-wrapper.focused[data-v-dc5500ab] { border-color: #007bff; box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); } .editable-input[data-v-dc5500ab] { padding: 8px 12px; min-height: 20px; font-size: 14px; line-height: 20px; outline: none; border: none; background: transparent; cursor: text; word-break: break-all; white-space: pre-wrap; } .editable-input[data-v-dc5500ab]:empty:before { content: attr(data-placeholder); color: #999; pointer-events: none; } .normal-text { color: #999; } .recognized-text { color: #000; } .link-manager[data-v-b1cf4f4c] { max-width: 1000px; margin: 0 auto; } .link-stats[data-v-b1cf4f4c] { display: flex; gap: 20px; margin-bottom: 20px; padding: 15px; background: #f5f5f5; border-radius: 8px; } .stat-item[data-v-b1cf4f4c] { display: flex; flex-direction: column; align-items: center; } .stat-label[data-v-b1cf4f4c] { font-size: 12px; color: #666; margin-bottom: 4px; } .stat-value[data-v-b1cf4f4c] { font-size: 18px; font-weight: bold; color: #333; } .add-link-section[data-v-b1cf4f4c] { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; } .add-link-btn[data-v-b1cf4f4c] { padding: 10px 20px; background: #007bff; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; } .add-link-btn[data-v-b1cf4f4c]:hover:not(:disabled) { background: #0056b3; } .add-link-btn[data-v-b1cf4f4c]:disabled { background: #ccc; cursor: not-allowed; } .auth-hint[data-v-b1cf4f4c] { color: #666; font-size: 12px; } .add-form[data-v-b1cf4f4c] { background: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 20px; } .add-form h4[data-v-b1cf4f4c] { margin: 0 0 15px 0; color: #333; } .form-row[data-v-b1cf4f4c] { display: flex; gap: 15px; } .form-group[data-v-b1cf4f4c] { flex: 1; display: flex; align-items: center; gap: 10px; margin-bottom: 24px; } .form-group label[data-v-b1cf4f4c] { margin-bottom: 0; font-weight: 540; color: #333; font-size: 13px; white-space: nowrap; min-width: 80px; text-align: right; } .checkbox-group[data-v-b1cf4f4c] { display: flex; flex-wrap: wrap; gap: 15px; } .form-group input[data-v-b1cf4f4c], .form-group select[data-v-b1cf4f4c] { width: 95%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; } .form-group select[data-v-b1cf4f4c]:focus { outline: none; } .input-wrapper[data-v-b1cf4f4c] { width: 100%; border: 1px solid #ddd; border-radius: 6px; } .input-wrapper input[data-v-b1cf4f4c] { width: 95%; border: none; outline: none; font-size: 14px; background: transparent; } .input-wrapper[data-v-b1cf4f4c]:focus-within {} .form-actions[data-v-b1cf4f4c] { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; } .form-actions button[data-v-b1cf4f4c] { font-weight: 300; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; } .form-actions button[type="submit"][data-v-b1cf4f4c] { background: #beecc859; color: #2e8339; } .form-actions button[type="submit"][data-v-b1cf4f4c]:hover:not(:disabled) { background: #beecc870; } .form-actions button[type="submit"][data-v-b1cf4f4c]:disabled { background: #b1efbf; cursor: not-allowed; } .form-actions button[type="button"][data-v-b1cf4f4c] { background: #f1f1f1; color: rgb(130, 130, 130); } .form-actions button[type="button"][data-v-b1cf4f4c]:hover { background: #ececec; } .filter-bar[data-v-b1cf4f4c] { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; border-radius: 6px; } .filter-controls[data-v-b1cf4f4c] { display: flex; gap: 10px; } .filter-bar .custom-select[data-v-b1cf4f4c] { width: auto; min-width: 100px; } .add-link-btn-compact[data-v-b1cf4f4c] { width: 32px; height: 32px; background: #e6f3ff; color: #007bff; border: none; border-radius: 4px; cursor: pointer; font-size: 18px; font-weight: bold; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; flex-shrink: 0; line-height: 1; padding: 0; } .add-link-btn-compact[data-v-b1cf4f4c]:hover:not(:disabled) { background: #dae9f7; transform: scale(1); } .add-link-btn-compact[data-v-b1cf4f4c]:disabled { color: #b2b2b2; background: #f5f4f4; cursor: not-allowed; transform: none; } .filter-bar select[data-v-b1cf4f4c] { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; } .links-list[data-v-b1cf4f4c] { display: flex; flex-direction: column; gap: 15px; } .link-item[data-v-b1cf4f4c] { background: #ffffff; border: 1px solid rgba(239, 239, 239, 1); border-radius: 8px; padding: 15px; box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.05); transition: box-shadow 0.3s ease; cursor: pointer; } .link-item[data-v-b1cf4f4c]:hover { /* box-shadow: 0 4px 8px rgba(0,0,0,0.15); */ } .link-header[data-v-b1cf4f4c] { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .link-type-badge[data-v-b1cf4f4c] { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; color: white; } .link-type-badge.netdisk[data-v-b1cf4f4c] { background: #28a745; } .link-type-badge.bt[data-v-b1cf4f4c] { background: #dc3545; } .link-type-badge.online[data-v-b1cf4f4c] { background: #007bff; } .platform-badge[data-v-b1cf4f4c] { padding: 4px 4px; background: #ffffff; color: white; border-radius: 4px; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid #e9ecef; } .platform-icon[data-v-b1cf4f4c] { width: 16px; height: 16px; object-fit: contain; } .link-meta[data-v-b1cf4f4c] { display: flex; justify-content: space-between; align-items: center; width: 100%; } .file-size[data-v-b1cf4f4c] { padding: 2px 5px; border-radius: 3px; font-size: 10px; background: #e3f2fd !important; color: #1976d2 !important; font-weight: 500; } .feature-tags[data-v-b1cf4f4c] { display: flex; gap: 3px; flex-wrap: wrap; margin-left: auto; } .feature-tag[data-v-b1cf4f4c] { padding: 2px 5px; background: #007bff; color: white; border-radius: 3px; font-size: 10px; font-weight: bold; } .feature-tag.feature-4k[data-v-b1cf4f4c] { border: 1px solid #eff524; background: #f6ff00; color: #232323; } /* 4K - 黑底金字 */ .feature-tag.feature-hdr[data-v-b1cf4f4c] { background: #ffe55a; color: #232323; } /* HDR - 金底黑字 */ .feature-tag.feature-dolby[data-v-b1cf4f4c] { background: #eaeaea; color: #121212; font-weight: 300; } /* 杜比全景声 - 灰底黑字 */ .feature-tag.feature-subtitle[data-v-b1cf4f4c] { background: #cee2e8; color: #003366; font-weight: 300; } /* 软字幕 - 浅蓝底深蓝字 */ /* FLAC无损 - 蓝底白字 */ .feature-tag.feature-flac[data-v-b1cf4f4c] { background: #ededed; color: #383838; font-weight: 500; } /* WAV无损 - 深蓝底白字 */ .feature-tag.feature-wav[data-v-b1cf4f4c] { background: #ffe3b3; color: #ce7f0d; font-weight: 500; } .link-content[data-v-b1cf4f4c] { margin-bottom: 15px; } .link-title-row[data-v-b1cf4f4c] { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; margin-bottom: 8px; border-radius: 4px; transition: background-color 0.2s ease; } .link-title-row[data-v-b1cf4f4c]:hover { /* background-color: #f8f9fa; */ } .link-title[data-v-b1cf4f4c] { font-weight: 500; color: #333; flex: 1; overflow: hidden; position: relative; padding-right: 10px; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; max-height: 2.8em; word-break: break-all; overflow-wrap: break-word; } .link-title.expanded[data-v-b1cf4f4c] { display: block; -webkit-line-clamp: unset; max-height: none; white-space: normal; padding-right: 10px; word-break: break-all; overflow-wrap: break-word; } .link-title[data-v-b1cf4f4c]::after { content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100%; background: linear-gradient(to right, transparent, #ffffff 85%); pointer-events: none; transition: opacity 0.3s ease; } .link-title.expanded[data-v-b1cf4f4c]::after { opacity: 0; } .expand-arrow[data-v-b1cf4f4c] { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: #666; transition: transform 0.3s ease, color 0.2s ease; } .expand-arrow[data-v-b1cf4f4c]:hover { color: #333; } .expand-arrow.expanded[data-v-b1cf4f4c] { transform: rotate(180deg); } .link-details[data-v-b1cf4f4c] { margin-top: 10px; animation: slideDown-b1cf4f4c 0.3s ease forwards; } /* 链接状态样式 */ .link-status[data-v-b1cf4f4c] { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px; border-left: 3px solid #dee2e6; } .status-label[data-v-b1cf4f4c] { font-size: 13px; color: #666; font-weight: 500; } .status-badge[data-v-b1cf4f4c] { font-size: 13px; font-weight: 500; padding: 2px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.05); } .status-badge.success[data-v-b1cf4f4c] { background: rgba(82, 196, 26, 0.1); border: 1px solid rgba(82, 196, 26, 0.2); } .status-badge.warning[data-v-b1cf4f4c] { background: rgba(250, 173, 20, 0.1); border: 1px solid rgba(250, 173, 20, 0.2); } .status-badge.error[data-v-b1cf4f4c] { background: rgba(255, 77, 79, 0.1); border: 1px solid rgba(255, 77, 79, 0.2); } .status-badge.loading[data-v-b1cf4f4c] { background: rgba(24, 144, 255, 0.1); border: 1px solid rgba(24, 144, 255, 0.2); } .status-badge.partial[data-v-b1cf4f4c] { background: rgba(250, 140, 22, 0.1); border: 1px solid rgba(250, 140, 22, 0.2); } @keyframes slideDown-b1cf4f4c { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .link-url[data-v-b1cf4f4c] { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; cursor: pointer; } .link-url a[data-v-b1cf4f4c] { color: #007bff; text-decoration: none; flex: 1; word-break: break-all; } .link-url span[data-v-b1cf4f4c]:hover { text-decoration: none; background-color: transparent; } /* 参考test.js的链接状态样式 */ /* 默认不显示::before伪元素,只有在有检测状态时才显示 */ .link-url[data-v-b1cf4f4c]::before { content: ''; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; box-sizing: border-box; width: 0; height: 0; margin: 0; flex-shrink: 0; display: none; } /* 只有在有检测状态时才显示::before伪元素 */ .link-url.one-pan-tip-success[data-v-b1cf4f4c]::before, .link-url.one-pan-tip-error[data-v-b1cf4f4c]::before, .link-url.one-pan-tip-partial[data-v-b1cf4f4c]::before, .link-url.one-pan-tip-other[data-v-b1cf4f4c]::before, .link-url.one-pan-tip-lock[data-v-b1cf4f4c]::before { width: 1em; height: 1em; margin: 0 1px 0 1px; display: inline-block; } .link-url.one-pan-tip-success[data-v-b1cf4f4c]::before { content: ''; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAACrUlEQVR4Xt2Yu2sUQRzHV/BFxNzMXhEQkRAEJbd763+gnYIWVjYitrYBC8FaSzttFBs7LQQLMdnZ3SSKWFhoYWFvOl+IoImJ5283Znf2O7PPmz3QL3zIcff9PZidnUcs63/V4Nm07QTskhvaC8PAvuoIfu7Y0tQh9E1EjmD3qIn1YWiP6G8xESHsNYw3qtlodv9wmavFa+Kt9keu35vDvGNpGPAnWKgtruDrmL+V3IBvYfKxoSkwEPYZrFVPI2uXt6JJahAn4texbKW6bmoHJ+xdwNqFooBNTNAlWF8rmlMPMLBzoorm5h9ae5WgSSHYXewnFb3K5t/AuoQlo6aYTRLvEhU7BW1nt7EnGi32CI0GebVThz5/0fye4C1rRo1W9w00GkGw93KdOZ/3FI+E7E1UNcxtoDn7Dus4Pj+LvlyMzxYydwdvIzW1khXY1syidaDGAGSnEc+3T2sMKiG/QWvOYTrKqL9JUFNvpX5Soa+A71mAYJc1hhx0EPSlGhTDP6En8QX8jeyLlYyUxlvARhroBPyKxgDwO1KtRPR9rjk3YEvoqfn4ZDbTYFoqzmsMeQoWQGr487aHp0uCLCVPBW5g/0iD531+BA1FSDVT0ZwL8LuGjy+FpsLHXCI0FFK14VqtHl+Gz0QuWXJxQFMRFc0p/gaciqzdmOwDmkrRzLm2j08GcyZCUyXSyLnPe7z145OQ+0nlrarGOnhNpkEJg5fTNvaUKL73oXlSxIOC/eSEAZPi6FNrH/aiyMRcaYIn2GPsQSs3ZCcxuDOEvYX1S0Ur8DUliWHiuyvWrSU34hcxmUF+Y73GMj3n6BSS33bGEe3698dt8MSL/iheiDG3EVGDt+LbDBYtg+brz+PiYB9zdSa6B96kwmvEN+LX3xGN/+/xNTmfvbb2YMw/rz8ZKxg+Um5CmgAAAABJRU5ErkJggg=="); } .link-url.one-pan-tip-error[data-v-b1cf4f4c] { text-decoration: line-through; } .link-url.one-pan-tip-error[data-v-b1cf4f4c]::before { content: ''; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAACm0lEQVR4Xu2Xv47TQBDGfSf+iGQdCSS4gpKr4I6TvQl0lLwEb0HFS9BQ09JR8wQ0UNDQIihAoCsgdhJfOHF3ZsaSrfG36/U6cVIgPumnKPbM7Hh2Z70Ogv/aotI4fJPqcDrXYT4fE/S7oN+ZDpczrb4u9PAx+mxEeRDspFH4jgbO0w7kD0b5/L66hfF6URqpV10TQrii9HCXMPbK4oA4yHqoFzhGJ2XjQWQG7YdEhz9xPC9lR4OIpu4CA/ZJEodfcNxWYZBNQQ//FsduVP9ryk1+GFzHHAzNYvUaHTcNdzvmURPd3UWnPvCZgUQPn2E+lWgnf48OSKKv3ilsPRtDVsO1D/4eO6rmcsRBWGcT00ZyAoPRa+o72kjm++qmtK+Ehg1cSJ+m5DApujZFGxM1lT6Fklh9NA3tnE+wEvX7WFm6lmIMG5ltOunGDA1dcKWkPyfL17FSSce40reQT+dYqE0rnyLkf2qmXxYfJ9K/EJ+n0MgHrFyp1GtNmWCcVStWkD+ESml1ijbe3BvdkLFWTmxpW7BBc7e2gXH4KTM0asPsPnVW/++3CUukfxnkBxq5wEqV3YdrjhsCfV1I30LTSD1CoyYwqdRc6F6bMPJnUl+rldDQhjl99s0TK5d6TOs0Gj6VPpXanowbRNq3bZ74hjhtiU/GO9K+0uJguIfGElmt1Jy+Jqppben8T6WdVXz8sDhVcHL0Xv2G111wTP4QxusSzMNQroPL6LQF/M79tHZeWpw3Aq87HN+pZIUNtysL3TGpUvRhcozB+oKTyu8GV3BMb/FHKQZdF+f5vouyw4FuaXVvaIl8wPhri7aK53z8xcE8+YzxetfJ0bXb9OTLtr3pnF/g8egJzdsuxtiajg+CPTrk7dvfKf+Q/gIqVFE2PCWqFwAAAABJRU5ErkJggg=="); } .link-url.one-pan-tip-partial[data-v-b1cf4f4c]::before { content: ''; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAADYAAAAAQAAANgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAADCgAwAEAAAAAQAAADAAAAAAVrtQ3wAAAAlwSFlzAAAhOAAAITgBRZYxYAAABb9JREFUaAXtWd9vG0UQ3t3z2aljN0nlNKVSlLaEuCEQUfIACIQET5UQBSRStS8IIfHGW976lH8g/wBIiCd+KEhAEVKfICCkgsBUBBwnURuIUpGmTohaO45j+27Z75xDe3t79jnEiIic5NzM7OzMN3t7ezMTQg6vwxX4f6+AsZ/hT05OskzmzjEWT/XFjFR/pCM1aMZS/TEz1W10puJHzJRx5cpbOzMzM3y//NJ/amhsbMz8ZbHwICE0TWySJpzHG9qktEQYWSCELzw6lLyVyWSqDfWbDO45AADPLm4/adu1ZwgnsSZ+9MOU7DAW+XZk6Mh3ew2k5QA457Sz8+FzFrWe45wk9chak1JKCgY3vtramrtBKW1pe7UUwMjISHRpufqKZZPh1iCG0zYYnTszEPk0m81Wws0QGzesYk/PWFepWrzMbX4iYA5nhK5Qg85zxldNmxf6+uwCdNfWWLLKaJLa9AFu8bM24f1CrPVNGb0TNxMfbG5m7gX48Yi1RjwagnHAV7be5NxOqGMCR41S9v3ROLuez2eL/nG/pLd3JHG/ZD8l7D0hXuaIqiHsFePRznfCBNH0GMW2Wfuz/JrY+8dURwYjuXg0+X7x/uxcqZQP/diha1XXl44mTv1s80q3eJd6vbZ5tMarp88+dGI2n89b3jEvx7ysl8MLiz2v2zaMGV9uFxc/Clql8fFxI5ZMp/ED7bVc5zAXNmBLHYfPpeXay8Cgjsl8w8F4fPjxGrEuyBNAR5nxcbGY+1WVuzwAf/7F7Ou7e10c+3TlxRdG35ueng5czURi+JGKbb3q2nDvEWJcLZVyP7m8eteuDJRwzq9tlC8J0nPGY7VKxdwPqiGZv7ViDYmVe9qViXOxa3Hp7h9WZWPDlan3SmX9rhk7bot5p+UxTvnJx0ZP/bi6umrLcpcO3EL4SKnnPPZ8uZj7xp0cdDcs//dBJ1PnwzZ8yHJgABZZJtPaALD6zhdW1hSnTYeZvOYRtYGp+6A12TSwAJMsc2ltAE5uo6QHOCqDXljX2H7c4QO+PLYElnq+5ZE6jDYAJzHz6nKc815R+7hdX0pKIZJFzeULACmxk1VKyjhFwn6kpGl7JuELPj0GRKbrYPMIiTjhlGtq6sMeNSVGeqCotZ31+RRpuoNN8ewLoGr4TxDkNsq8trM6nzpsvgCMqj8AJGZtR6w40PnUYfMFYDN/AG5WqfhoK6vzqcPmC6CtqNpg3BcAs4lvuyCfb8V3jRnbqr5OpurIvM6nDpsvAMv0B4BiRDbejD7e3bWEMtHVAw2Zy4e563zqsPmKCdMihR3FAyopIfpNEQeyt29f306l0m8Xy3QMSokOnoEscIJmgNrkpCoGtrIi9D2BiYlLmwStD+lCGSixocj19YVCuTg/gx/oUJMkJW6JFo18CUwONlkmaG09EE2mXyIWPyfp8q5Oc+rf+hqj5Ly3VZ3w4DPojUph4TMJk0P6nkBdgYvGk+eiqGE9kiZMmIosyMSuL2VxfZic6doA0DETz8bzKqAAR3Ef5FSWuxWZ2HqX8UN1FlRWyvNAw0e92JdGBBYHkyRySW1FhurH7OijwtAZV1HcGQrwWmUjK8m05F4qMtcQjSRFHUz6XB53ZkS+Xvl9VnuIaJ8AJqHdJx+FkKGh1ZEYfhZ0Oy7YVptmwAAsQf4CA0CvEu0+daJtW8+jAFflMn/h/OhNOR0GDZmso9KwCduqHBga9U2VF8U7HS2NeDJ9UV0VaKG4b1QfY89fvTY7CF2Ab9SRwMprwYtWY6kwP92oX9owADhHY+vmcu0NXW8IBThq2L2Wmnhhy9XCed0CocU4OBB5t1mftGkACOK/3FoMFcDfQRzU5i4CwNX+9jrJnRkwP2m2bepo6n9DPwF3El7sA/sPDjcI3A/sv5jkINxADuQ/+dRAwKNvg9YHugcowN0aFpUUihHk80iJhZ62UauzeSg7XIHDFWi8An8B0+Xbcz5Btc4AAAAASUVORK5CYII="); } .link-url.one-pan-tip-other[data-v-b1cf4f4c]::before { content: ''; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAD5UlEQVR4Xr2YT2jTUBzHMxR0wmDaNXndxIk6EA9TEPQo/rns5MHtJjK2JrHrhhcRBP/cRHYTFMXDQBAVdhVBBGEHDx48iHhQEQ8DFYS5Jenabd3i71eX9uXbpE3S6gce697vb977vT+JoiTAVZSOwlhPr2WIT+v5jLt8UbgONdsUboH+rk5k3JUJ4Vq6pv8a6+lC+7Zjm+nhNQrKCcRpnLxjimfor2VKo+kBJyBg3MY+LFN7i/4TUcrVB8BgPJW2ITbo/zX+zdOJemhTzHf3Y6xIcB1xraBTbpv9s4uGuh/tZGxTm+JpRPta0x6iTUPcEWVL0NQVc/y06mHUb8b8yO7OyqgG+LQN7T3qhxKUFDl4hXpxoQfuDJpmx1BfoG4dQUPv6OkjqNcKgaOXTZ1CvSo0KnUGPA2o1w7KE/DwlCzXNeopTlbVMKliTt2HemFY+b7UgpHZ40ykhTt1YBvKg1jJ+WdnjZJFnbq6sgxtBnUQ2tnH3Mn6qee2wf165hzaIBj3u9G7oypc1NUzsrBETyLZBkL71rxsw1sI12d9catzaCtjG+pdeKhCVYjOSk32Jzojr3i6/MQoXzZSx2V/KEdw1Lz+DrmTz0LZKAh55aLMgxbSm1ry6m2Uy1immJFzcAwxrfwe7+6XO6nNoiEi6a6jzIPq72otkPYU5TK8WOQcVnkRYK1YRuogGiaBpvub55OOLhPlSFmaBd7nfB1B9ZIEOgOveT65flEeBOl+lQfItwtHddIISuqDHID3R9QJgnTv+RILWxFJKMu3EboGobwRli4uhyZGv8toEBXfGUtXbpQ3g2xyvsTkqawUXUJa9WHr4oYvMfkymLT4HVO7VHWqa09QHgWyfe1LDK85aBAFKvDBJTNznlshmzmK8ihUzlY5D37FkjtorifR6H9QkHLgJBWX3vvkxHhfQ6N/jW3uOuQbHFP8PfhxOt3RvdvBtinuTWUrjfZJ7I8CXp2qpw+/rciCJBttzV77gbJG8HuAHLtuVeNG6w4pkW6hzPKFVF/VjusjBhiXVvgtnwJ1zskKcUeNjyK6viy4Qff2ECy6RDYcLQ/MPlSxDRSyqbNyLG6hNxs335VCZf5qg3qtUtTFCYxDF8ufqOeDFB6gEX+/QL2k0JQ/Rv+Ry4a/e6Fx5fuXod1B3TiQn3X0G7tc6PXtOTqpJGjypyTx6MtQtHdHJ7tzEPcpr0UeKcQZ1057XwqD2ubG/JGSneajzDK1cfp7nabrJZ8g+Pblb9pnjBcLXv7NvpHFaTx1S6PpAYyTmOERZQs5LmGgqI0TohKYRr9thQLdD6sbuVW+1xriHSV1DH004w9PygmOZFyzWwAAAABJRU5ErkJggg=="); } .link-url.one-pan-tip-lock[data-v-b1cf4f4c]::before { content: ''; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAABwUlEQVR4Xu1XvUoDQRA+0EoMub+oJBpv9wQLFSzsbASfwc4nsLMwcffERPEJbH0BQXwG2zQWEmttRIuA2Ch2Ohs4vMzueUncjRDug6/Zmdnvy85m99aycuQYIzi0XnWr9RU8/i/wKLv3aPTlUY4IY4S94HzjcEK+KptR0yH8HNcbgVNlm1g8iy5hj3ge7cCiom1OwC5LwcGcHTTs4kK04YcNyZxDDs/wXNoAe+qzR5DwZ5wTA1q4i83hHD0o7U33CIVHmUIu4afJGmhpC+f8GSBykRQpl5tTOEcF8QOMrhr8/d/jycUewvE0uJRfGTUGAm3YYy1BWL07HE9Dkda24zowpr+VRuCFx93NaoIujTpYry/Asj8ke2yE8/sVrJsJ6O2HNJFmwgW+hnUzMZix7oX8ChygxrQxdATMED4r5aTQqLFChXlSLWE3OE9Fo8Ysa2dCruUM56lo1Jgd8HVc61L2hvNUNGpM0LK2JuM6OOmvcTyNxo1B7m1c5y81FXE1c2MCubH++PPk8sXFL8XVHIEx+PztvhX5Ex7/jSMxNgyHMgbnUQdPpJs2iRaxbib85VpB/YzXQz880f8dnyPHuOIbV69cHR4KWOMAAAAASUVORK5CYII="); } .extract-code-container[data-v-b1cf4f4c] { display: flex; background: #ffffff; align-items: center; gap: 8px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 12px; } .extract-code-container code[data-v-b1cf4f4c] { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; cursor: pointer; background: #eaeaea; padding: 2px 6px; border-radius: 6px; color: #3d3d3d; } .extract-code-container code[data-v-b1cf4f4c]:hover { background: #e6e6e6; } .copy-btn[data-v-b1cf4f4c] { background: none; border: none; cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 3px; } .copy-btn[data-v-b1cf4f4c]:hover { background: #f8f9fa; } .link-actions[data-v-b1cf4f4c] { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; margin-bottom: 10px; } .vote-section[data-v-b1cf4f4c] { display: flex; align-items: center; gap: 10px; } .vote-btn[data-v-b1cf4f4c] { background: transparent; border: none; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; } .vote-icon[data-v-b1cf4f4c] { width: 12px; height: 12px; } .vote-icon.down-icon[data-v-b1cf4f4c] { transform: rotate(180deg); } .vote-btn[data-v-b1cf4f4c]:hover:not(:disabled) { background: #e9ecef; } .vote-btn[data-v-b1cf4f4c]:disabled { opacity: 0.6; cursor: not-allowed; } .vote-btn.active.up[data-v-b1cf4f4c] { /* background: #d4edda; border-color: #c3e6cb; */ color: #155724; } .vote-btn.active.down[data-v-b1cf4f4c] { /* background: #f8d7da; border-color: #f5c6cb; */ color: #721c24; } .vote-btn.pending[data-v-b1cf4f4c] { opacity: 0.7; position: relative; } .pending-indicator[data-v-b1cf4f4c] { font-size: 10px; margin-left: 2px; animation: pulse-b1cf4f4c 1.5s ease-in-out infinite; } @keyframes pulse-b1cf4f4c { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .action-buttons[data-v-b1cf4f4c] { display: flex; gap: 8px; } .action-buttons button[data-v-b1cf4f4c] { padding: 4px 8px; border: none; border-radius: 6px; cursor: pointer; font-size: 12px; } .edit-btn[data-v-b1cf4f4c] { background: #ffc107; color: #212529; } .edit-btn[data-v-b1cf4f4c]:hover { background: #e0a800; } .modify-btn[data-v-b1cf4f4c] { width: 48px; height: 28px; background: #d4ecef66; color: rgb(34, 137, 155); } .modify-btn[data-v-b1cf4f4c]:hover { background: #d4ecef80; } .delete-btn[data-v-b1cf4f4c] { width: 48px; height: 28px; background: #ffccd052; color: rgb(230, 46, 46); } .delete-btn[data-v-b1cf4f4c]:hover { background: #ffccd060; } /* 删除确认弹窗样式 */ .delete-confirmation[data-v-b1cf4f4c] { text-align: center; padding: 20px 0; } .warning-icon[data-v-b1cf4f4c] { font-size: 48px; margin-bottom: 16px; } .delete-confirmation p[data-v-b1cf4f4c] { margin: 8px 0; font-size: 16px; } .warning-text[data-v-b1cf4f4c] { color: #dc3545; font-size: 14px; font-weight: 500; } .delete-confirm-btn[data-v-b1cf4f4c] { background: #f8d7da !important; color: #dc3545 !important; border: 1px solid #f5c6cb !important; padding: 8px 16px; border-radius: 4px; cursor: pointer; margin-right: 8px; font-weight: 500; } .delete-confirm-btn[data-v-b1cf4f4c]:hover:not(:disabled) { background: #f8d7dad2 !important; border: 1px solid #f5c6cb !important; } .delete-confirm-btn[data-v-b1cf4f4c]:disabled { background: #6c757d; cursor: not-allowed; } .report-btn[data-v-b1cf4f4c] { /* width: px; */ height: 28px; background: #ffffff; color: #495057; display: flex; align-items: center; justify-content: center; } .report-btn[data-v-b1cf4f4c]:hover { color: #495057; background: #ededed; } .link-footer[data-v-b1cf4f4c] { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #666; border-top: 1px solid #f0f0f0; padding-top: 10px; } .footer-left[data-v-b1cf4f4c] { display: flex; align-items: center; gap: 8px; } .footer-right[data-v-b1cf4f4c] { display: flex; align-items: center; gap: 12px; } .original-link[data-v-b1cf4f4c] { color: #007bff; text-decoration: none; font-size: 12px; } .original-link[data-v-b1cf4f4c]:hover { background-color: transparent; /* text-decoration: underline; */ } .report-count[data-v-b1cf4f4c] { color: #dc3545; font-weight: bold; } .empty-state[data-v-b1cf4f4c] { text-align: center; padding: 40px; padding-top: 0px; padding-bottom: 0px; color: #666; } .empty-state-icon[data-v-b1cf4f4c] { display: block; margin: 0 auto; width: 40px; height: 40px; } .loading[data-v-b1cf4f4c] { text-align: center; padding: 20px; color: #666; } /* 顶部弹出式提示样式 */ .error-message[data-v-b1cf4f4c] { background: #f8d7da; color: #721c24; padding: 10px 15px; border-radius: 4px; margin: 10px 0; border: 1px solid #f5c6cb; } .success-message[data-v-b1cf4f4c] { background: #d4edda; color: #155724; padding: 10px 15px; border-radius: 4px; margin: 10px 0; border: 1px solid #c3e6cb; } @media (max-width: 768px) { .link-manager[data-v-b1cf4f4c] { padding: 10px; } .form-row[data-v-b1cf4f4c] { flex-direction: column; gap: 10px; } .filter-bar[data-v-b1cf4f4c] { flex-direction: column; gap: 8px; } .link-header[data-v-b1cf4f4c] { flex-wrap: wrap; } .link-meta[data-v-b1cf4f4c] { margin-left: 0; margin-top: 5px; } .link-actions[data-v-b1cf4f4c] { flex-direction: column; gap: 10px; align-items: flex-start; } } /* 模态窗口样式 */ .modal-overlay[data-v-b1cf4f4c] { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; } .modal-content[data-v-b1cf4f4c] { background: white; border-radius: 16px; width: 90%; max-width: 600px; max-height: 90vh; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); } .modal-header[data-v-b1cf4f4c] { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 20px 20px; border-bottom: 1px solid #eee; margin-bottom: 20px; } .modal-header h4[data-v-b1cf4f4c] { margin-left: 10px; margin-bottom: 0px; color: #333; font-size: 18px; } .close-btn[data-v-b1cf4f4c] { background: #f5f5f5; border: none; font-size: 24px; cursor: pointer; color: #999; padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; } .close-btn[data-v-b1cf4f4c]:hover { background: #f5f5f5; color: #333; } .modal-body[data-v-b1cf4f4c] { padding: 0 20px 20px 20px; } .vote-section[data-v-b1cf4f4c] { width: 100%; } /* 反馈表单样式 */ .input-wrapper textarea[data-v-b1cf4f4c] { width: 100%; border: none; outline: none; font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; background: transparent; } .input-wrapper[data-v-b1cf4f4c]:has(textarea):focus-within { border-color: #007bff; box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); } .input-wrapper textarea[data-v-b1cf4f4c]::placeholder { color: #999; } /* 分页样式 */ .pagination[data-v-b1cf4f4c] { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 10px; padding: 10px; background: #ffffff; border-radius: 8px; } .pagination-btn[data-v-b1cf4f4c] { box-shadow: rgba(0, 0, 0, 0.03) 4px 4px 20px 0px; padding: 8px 16px; border: 1px solid rgb(242, 242, 242); background: white; color: #333; border-radius: 9999px; cursor: pointer; font-size: 14px; transition: all 0.2s; } .pagination-btn[data-v-b1cf4f4c]:hover:not(:disabled) { background: #b3d8ff; color: #007bff; border-color: #b3d8ff; } .pagination-btn[data-v-b1cf4f4c]:disabled { background: #f5f5f5; color: #999; cursor: not-allowed; border-color: #ddd; } .pagination-info[data-v-b1cf4f4c] { font-size: 14px; color: #666; font-weight: 500; } /* 登录提示样式 */ .login-prompt[data-v-b1cf4f4c] { display: flex; justify-content: center; align-items: center; min-height: 300px; padding: 40px 20px; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-radius: 12px; border: 2px dashed #dee2e6; margin: 20px 0; } .login-prompt-content[data-v-b1cf4f4c] { text-align: center; max-width: 400px; } .login-icon[data-v-b1cf4f4c] { margin-bottom: 20px; color: #6c757d; opacity: 0.8; } .login-prompt h3[data-v-b1cf4f4c] { font-size: 24px; font-weight: 600; color: #343a40; margin-bottom: 10px; } .login-prompt p[data-v-b1cf4f4c] { color: #6c757d; margin-bottom: 24px; font-size: 16px; } .login-btn[data-v-b1cf4f4c] { background: #007bff; color: white; border: none; padding: 12px 32px; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2); } .login-btn[data-v-b1cf4f4c]:hover { background: #0056b3; transform: translateY(-2px); box-shadow: 0 6px 8px rgba(0, 123, 255, 0.25); } .login-btn[data-v-b1cf4f4c]:active { transform: translateY(0); } /* 求资源相关样式 */ .seek-resource-section[data-v-b1cf4f4c] { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; } .seek-btn[data-v-b1cf4f4c] { padding: 10px 24px; background-color: #e6f2ff; color: #007bff; border: none; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1); position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; } .seek-btn[data-v-b1cf4f4c]:hover:not(:disabled) { background-color: #d0e8ff; transform: translateY(-2px) scale(1.02); box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2); } .seek-btn[data-v-b1cf4f4c]:active:not(:disabled) { transform: translateY(0) scale(0.95); box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1); } .seek-btn.active[data-v-b1cf4f4c] { background-color: #e6ffed; color: #28a745; cursor: default; box-shadow: none; animation: success-pulse-b1cf4f4c 0.6s ease-out; } .seek-btn[data-v-b1cf4f4c]:disabled { opacity: 0.8; cursor: not-allowed; transform: none; } /* Loading Spinner */ .spinner[data-v-b1cf4f4c] { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin-b1cf4f4c 0.8s linear infinite; } @keyframes spin-b1cf4f4c { to { transform: rotate(360deg); } } @keyframes success-pulse-b1cf4f4c { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); } 50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); } } .seek-count[data-v-b1cf4f4c] { font-size: 13px; color: #666; margin: 0; } .seek-confirmation[data-v-b1cf4f4c] { text-align: center; padding: 20px 0; } .seek-confirmation .info-icon[data-v-b1cf4f4c] { font-size: 48px; margin-bottom: 16px; } .seek-confirmation p[data-v-b1cf4f4c] { margin: 8px 0; color: #333; font-size: 16px; } .seek-confirmation .info-text[data-v-b1cf4f4c] { font-size: 14px; color: #666; } .seek-confirm-btn[data-v-b1cf4f4c] { background-color: #007bff; color: white; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background-color 0.2s; } .seek-confirm-btn[data-v-b1cf4f4c]:hover:not(:disabled) { background-color: #0056b3; } .seek-confirm-btn[data-v-b1cf4f4c]:disabled { background-color: #ccc; cursor: not-allowed; } /* URL预览样式 */ .url-preview[data-v-b1cf4f4c] { display: none; margin-top: 8px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px; border-left: 3px solid #007bff; } .url-preview-label[data-v-b1cf4f4c] { display: block; font-size: 11px; color: #666; font-weight: 500; margin-bottom: 4px; } .url-preview-text[data-v-b1cf4f4c] { display: block; font-size: 12px; color: #333; font-family: 'Courier New', monospace; word-break: break-all; line-height: 1.4; } .auth-switch[data-v-d47a81a4] { display: flex; justify-content: center; margin-bottom: 16px; } .switch-container[data-v-d47a81a4] { position: relative; display: flex; background: #f8f9fa; border-radius: 8px; padding: 4px; width: 200px; height: 30px; } .switch-input[data-v-d47a81a4] { position: absolute; opacity: 0; pointer-events: none; } .switch-label[data-v-d47a81a4] { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: #666; cursor: pointer; transition: color 0.3s ease; z-index: 2; position: relative; } .switch-input:checked + .switch-label[data-v-d47a81a4] { color: #007bff; } .slider[data-v-d47a81a4] { position: absolute; top: 4px; left: 0; width: 46%; height: calc(100% - 8px); background: white; border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); transition: left 0.3s ease; z-index: 1; } /* 悬停效果 */ .switch-label[data-v-d47a81a4]:hover { color: #007bff; } /* 激活状态的标签保持蓝色 */ .switch-input:checked + .switch-label[data-v-d47a81a4] { color: #007bff; font-weight: 600; } /* 响应式设计 */ @media (max-width: 480px) { .switch-container[data-v-d47a81a4] { width: 180px; height: 36px; } .switch-label[data-v-d47a81a4] { font-size: 13px; } } .auth-container[data-v-09cfbe3d] { padding: 16px; } /* 用户信息样式 */ .user-info[data-v-09cfbe3d] { text-align: center; } .user-header[data-v-09cfbe3d] { display: flex; align-items: center; margin-bottom: 16px; padding: 12px; background: #f8f9fa; border-radius: 8px; position: relative; } .user-avatar[data-v-09cfbe3d] { width: 40px; height: 40px; border-radius: 50%; background: #007bff; color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; margin-right: 12px; } .user-details[data-v-09cfbe3d] { flex: 1; text-align: left; } .user-display-name[data-v-09cfbe3d] { font-size: 14px; font-weight: 500; color: #333; margin-bottom: 2px; } .user-email[data-v-09cfbe3d] { font-size: 12px; color: #666; margin-bottom: 2px; } .user-status[data-v-09cfbe3d] { font-size: 12px; color: #28a745; } /* 用户统计样式 */ .user-stats[data-v-09cfbe3d] { margin-top: 8px; display: flex; gap: 16px; } .stat-item[data-v-09cfbe3d] { display: flex; align-items: center; font-size: 12px; } .stat-icon[data-v-09cfbe3d] { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; color: #4CAF50; } .stat-icon.down-icon[data-v-09cfbe3d] { color: #868686; transform: rotate(180deg); } .stat-icon svg[data-v-09cfbe3d] { width: 100%; height: 100%; } .stat-label[data-v-09cfbe3d] { color: #666; font-weight: 500; } .stat-value[data-v-09cfbe3d] { color: #333; font-weight: 600; background: #f8f9f0; border-radius: 12px; min-width: 20px; text-align: center; } .edit-nickname-btn[data-v-09cfbe3d] { position: absolute; top: 12px; right: 12px; padding: 4px 8px; background: #e3f2fd; color: #1976d2; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; transition: all 0.2s; } .edit-nickname-btn[data-v-09cfbe3d]:hover { background: #e8f5ff; } /* 昵称编辑表单样式 */ .nickname-edit-form[data-v-09cfbe3d] { margin-bottom: 16px; padding: 12px; background: #fff; border: 1px solid #dee2e6; border-radius: 8px; } .nickname-edit-form .form-group[data-v-09cfbe3d] { flex-direction: column; align-items: flex-start; gap: 4px; } .nickname-edit-form .form-group label[data-v-09cfbe3d] { text-align: left; min-width: auto; margin-bottom: 2px; } .nickname-hint[data-v-09cfbe3d] { font-size: 11px; color: #666; margin-top: 4px; } .nickname-actions[data-v-09cfbe3d] { display: flex; gap: 8px; margin-top: 12px; } .save-nickname-btn[data-v-09cfbe3d] { padding: 6px 12px; background: #beecc859; color: #2e8339; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.2s; } .save-nickname-btn[data-v-09cfbe3d]:hover:not(:disabled) { background: #cef3d6; } .save-nickname-btn[data-v-09cfbe3d]:disabled { background: #cef3d6; cursor: not-allowed; } .cancel-nickname-btn[data-v-09cfbe3d] { padding: 6px 12px; background: #f1f1f1; color: #828282; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.2s; } .cancel-nickname-btn[data-v-09cfbe3d]:hover { background: #e4e4e4; } .sign-out-btn[data-v-09cfbe3d] { width: 100%; padding: 8px 16px; background: #ffe4e6; color: #ff3333; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; transition: background-color 0.2s; } .sign-out-btn[data-v-09cfbe3d]:hover { background: #ffedef; } /* 认证表单样式 */ .auth-forms[data-v-09cfbe3d] { width: 100%; } .auth-form[data-v-09cfbe3d] { display: flex; flex-direction: column; gap: 12px; } /* 默认表单组样式(注册表单使用左右布局) */ .form-group[data-v-09cfbe3d] { display: flex; align-items: center; gap: 6px; } .form-group label[data-v-09cfbe3d] { font-size: 12px; color: #333; margin-bottom: 0; font-weight: 500; white-space: nowrap; min-width: 50px; text-align: right; } /* 登录表单使用上下布局 */ .auth-form[data-mode="login"] .form-group[data-v-09cfbe3d] { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; } .auth-form[data-mode="login"] .form-group label[data-v-09cfbe3d] { text-align: left; min-width: auto; margin-bottom: 2px; } /* 登录表单的input包装器样式 */ .auth-form[data-mode="login"] .input-wrapper[data-v-09cfbe3d] { width: 100%; border: 1px solid #ddd; border-radius: 8px; transition: border-color 0.2s; } .auth-form[data-mode="login"] .input-wrapper[data-v-09cfbe3d]:focus-within { border-color: none; box-shadow: none; } /* 登录表单的input样式 */ .auth-form[data-mode="login"] .form-input[data-v-09cfbe3d] { width: 95%; margin: 8px; padding: 0; border: none; border-radius: 0; font-size: 13px; background: transparent; outline: none; } .auth-form[data-mode="login"] .form-input[data-v-09cfbe3d]:focus { border-color: none; box-shadow: none; } .form-input[data-v-09cfbe3d] { padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; transition: border-color 0.2s; } .form-input[data-v-09cfbe3d]:focus { outline: none; } .auth-submit-btn[data-v-09cfbe3d] { padding: 10px 16px; background: #e9f4ff; color: #00a2ef; border: 1px solid #bfe2ff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; transition: background-color 0.2s; margin-top: 8px; } .auth-submit-btn[data-v-09cfbe3d]:hover:not(:disabled) { background: #cce5ff; } .auth-submit-btn[data-v-09cfbe3d]:disabled { background: #c4e0fe; cursor: not-allowed; } .forgot-password-link[data-v-09cfbe3d] { text-align: center; margin-top: 15px; } .link-btn[data-v-09cfbe3d] { background: none; border: none; color: #007bff; cursor: pointer; text-decoration: underline; font-size: 14px; padding: 0; } .link-btn[data-v-09cfbe3d]:hover { color: #0056b3; } .link-btn[data-v-09cfbe3d]:disabled { color: #6c757d; cursor: not-allowed; text-decoration: none; } .back-button[data-v-09cfbe3d] { margin-bottom: 20px; } .back-btn[data-v-09cfbe3d] { background: none; border: none; color: #6c757d; cursor: pointer; font-size: 14px; padding: 8px 0; display: flex; align-items: center; gap: 5px; } .back-btn[data-v-09cfbe3d]:hover { color: #495057; } .form-title[data-v-09cfbe3d] { font-size: 24px; font-weight: bold; text-align: center; margin-bottom: 10px; color: #333; } .form-description[data-v-09cfbe3d] { font-size: 14px; color: #6c757d; text-align: center; margin-bottom: 25px; line-height: 1.5; } .proof-progress[data-v-09cfbe3d] { margin: 20px 0; } .progress-text[data-v-09cfbe3d] { font-size: 14px; color: #6c757d; text-align: center; margin-bottom: 10px; } .progress-bar[data-v-09cfbe3d] { width: 100%; height: 8px; background-color: #e9ecef; border-radius: 4px; overflow: hidden; } .progress-fill[data-v-09cfbe3d] { height: 100%; background: linear-gradient(90deg, #007bff, #0056b3); transition: width 0.3s ease; border-radius: 4px; } .resend-code[data-v-09cfbe3d] { text-align: center; margin-top: 15px; } /* 消息样式 */ .error-message[data-v-09cfbe3d] { padding: 8px 12px; background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 4px; font-size: 12px; margin-top: 12px; } .success-message[data-v-09cfbe3d] { padding: 8px 12px; background: #d4edda; color: #155724; border: 1px solid #c3e6cb; border-radius: 4px; font-size: 12px; margin-top: 12px; } /* 初始化加载样式 */ .initializing-container[data-v-09cfbe3d] { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; } .initializing-container .loading-spinner[data-v-09cfbe3d] { width: 32px; height: 32px; border: 3px solid #f3f3f3; border-top: 3px solid #007bff; border-radius: 50%; animation: spin-09cfbe3d 1s linear infinite; margin-bottom: 16px; } .initializing-container p[data-v-09cfbe3d] { color: #6c757d; font-size: 14px; margin: 0; } @keyframes spin-09cfbe3d { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 顶部弹出式提示样式 */ .content-wrapper[data-v-842d67d8] { padding: 16px; } .movie-info[data-v-842d67d8] { margin-bottom: 16px; padding: 12px; background: #f8f9fa; border-radius: 6px; border-left: 4px solid #00a1d6; } .movie-title[data-v-842d67d8] { margin: 0 0 8px 0; font-size: 16px; font-weight: 600; color: #333; line-height: 1.3; } .movie-meta[data-v-842d67d8] { display: flex; gap: 12px; align-items: center; } .movie-meta .year[data-v-842d67d8] { background: #6c757d; color: white; padding: 2px 6px; border-radius: 3px; font-size: 12px; font-weight: 500; } .movie-meta .rating[data-v-842d67d8] { color: #ff6b35; font-weight: 600; font-size: 13px; } .navigation-bar[data-v-842d67d8] { display: flex; border-bottom: 1px solid #e0e0e0; margin-bottom: 16px; } .nav-btn[data-v-842d67d8] { flex: 1; padding: 8px 4px; border: none; background: none; cursor: pointer; font-size: 12px; font-weight: 500; color: #666; transition: all 0.2s; border-bottom: 1px solid transparent; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; } .nav-btn[data-v-842d67d8]:hover { /* background-color: #f5f5f5; color: #333; */ } .nav-btn.active[data-v-842d67d8] { color: #00a1d6; border-bottom-color: #00a1d6; /* background-color: #f8fbff; */ } .tab-content[data-v-842d67d8] { min-height: 200px; } .tab-panel[data-v-842d67d8] { padding-top: 16px 0; } .tab-panel h4[data-v-842d67d8] { margin: 0 0 12px 0; color: #333; font-size: 16px; font-weight: 600; } .tab-panel p[data-v-842d67d8] { margin: 0; color: #666; line-height: 1.5; } /* 二级导航样式 */ .sub-nav[data-v-842d67d8] { display: flex; gap: 4px; margin-bottom: 12px; padding: 4px; background: #e9ecef; border-radius: 6px; } .sub-tab[data-v-842d67d8] { flex: 1; padding: 6px 8px; border: none; background: transparent; color: #666; font-size: 12px; border-radius: 4px; cursor: pointer; transition: all 0.2s; text-align: center; } .sub-tab[data-v-842d67d8]:hover { background: #dee2e6; color: #495057; } .sub-tab.active[data-v-842d67d8] { background: #007bff; color: white; font-weight: 500; } .sub-content[data-v-842d67d8] { margin-top: 8px; } .sub-tab-content[data-v-842d67d8] { padding: 8px 0; } .sub-tab-content p[data-v-842d67d8] { margin: 4px 0; color: #666; font-size: 12px; } .no-subject[data-v-842d67d8] { text-align: center; padding: 40px 20px; color: #666; } .no-subject p[data-v-842d67d8] { margin: 8px 0; line-height: 1.5; } .no-subject .hint[data-v-842d67d8] { font-size: 12px; color: #999; font-style: italic; } .hint-list[data-v-842d67d8] { color: #666; font-size: 13px; margin: 4px 0 0 16px; padding: 0; } .hint-list li[data-v-842d67d8] { margin: 2px 0; } .icon-wrapper[data-v-842d67d8] { position: relative; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; } .count-badge[data-v-842d67d8] { border: 1px solid #ffffff; display: inline-block; background-color: #f0f0f0; color: #666; font-size: 10px; padding: 0 3px; border-radius: 8px; line-height: 14px; position: absolute; top: -4px; right: -10px; min-width: 14px; text-align: center; z-index: 1; } .nav-btn.active .count-badge[data-v-842d67d8] { background-color: #e6f7ff; color: #00a1d6; } .icon[data-v-842d67d8] { width: 20px; height: 20px; fill: currentColor; } .count-badge.invisible[data-v-842d67d8] { visibility: hidden; } .debug-panel[data-v-dba5723e] { position: fixed; top: 20px; right: 20px; width: 400px; max-height: 80vh; background: white; border: 2px solid #007bff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); z-index: 10000; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-y: auto; } .debug-header[data-v-dba5723e] { background: #007bff; color: white; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; } .debug-header h3[data-v-dba5723e] { margin: 0; font-size: 16px; } .close-btn[data-v-dba5723e] { background: none; border: none; color: white; font-size: 20px; cursor: pointer; padding: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; } .debug-content[data-v-dba5723e] { padding: 15px; } .debug-section[data-v-dba5723e] { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; } .debug-section[data-v-dba5723e]:last-child { border-bottom: none; margin-bottom: 0; } .debug-section h4[data-v-dba5723e] { margin: 0 0 10px 0; color: #333; font-size: 14px; } .debug-section h5[data-v-dba5723e] { margin: 10px 0 5px 0; color: #666; font-size: 12px; } .status-item[data-v-dba5723e] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; } .label[data-v-dba5723e] { font-weight: bold; color: #555; } .value[data-v-dba5723e] { color: #333; max-width: 200px; word-break: break-all; } .token[data-v-dba5723e] { font-family: monospace; font-size: 10px; } .status[data-v-dba5723e] { padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold; } .status.success[data-v-dba5723e] { background: #d4edda; color: #155724; } .status.error[data-v-dba5723e] { background: #f8d7da; color: #721c24; } .button-group[data-v-dba5723e] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; } .debug-btn[data-v-dba5723e] { padding: 6px 12px; border: 1px solid #007bff; background: white; color: #007bff; border-radius: 4px; cursor: pointer; font-size: 11px; transition: all 0.2s; } .debug-btn[data-v-dba5723e]:hover { background: #007bff; color: white; } .debug-btn.danger[data-v-dba5723e] { border-color: #dc3545; color: #dc3545; } .debug-btn.danger[data-v-dba5723e]:hover { background: #dc3545; color: white; } .test-result[data-v-dba5723e] { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; padding: 10px; margin-top: 10px; } .test-result pre[data-v-dba5723e] { margin: 0; font-size: 10px; white-space: pre-wrap; word-break: break-word; } .headers-preview[data-v-dba5723e] { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; padding: 10px; } .headers-preview code[data-v-dba5723e] { font-size: 10px; white-space: pre-wrap; word-break: break-word; } .update-notification-overlay[data-v-8ddffaa9] { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; backdrop-filter: blur(2px); } .update-notification[data-v-8ddffaa9] { background: #fff; border-radius: 12px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); width: 90%; max-width: 480px; max-height: 90vh; overflow-y: auto; animation: slideIn-8ddffaa9 0.3s ease-out; } @keyframes slideIn-8ddffaa9 { from { opacity: 0; transform: scale(0.9) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } } .notification-header[data-v-8ddffaa9] { display: flex; align-items: flex-start; padding: 24px 24px 16px; border-bottom: 1px solid #f0f0f0; position: relative; } .header-icon[data-v-8ddffaa9] { flex-shrink: 0; width: 40px; height: 40px; background: #e8f5e8; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 16px; } .header-content[data-v-8ddffaa9] { flex: 1; } .notification-title[data-v-8ddffaa9] { font-size: 18px; font-weight: 600; color: #333; margin: 0 0 4px 0; } .notification-subtitle[data-v-8ddffaa9] { font-size: 14px; color: #666; margin: 0; } .close-btn[data-v-8ddffaa9] { position: absolute; top: 20px; right: 20px; width: 32px; height: 32px; border: none; background: #f5f5f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: all 0.2s ease; } .close-btn[data-v-8ddffaa9]:hover { background: #e0e0e0; color: #333; } .version-info[data-v-8ddffaa9] { padding: 16px 24px; background: #f8f9fa; margin: 0 24px; border-radius: 8px; margin-top: 16px; } .version-row[data-v-8ddffaa9] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .version-row[data-v-8ddffaa9]:last-child { margin-bottom: 0; } .version-label[data-v-8ddffaa9] { font-size: 14px; color: #666; font-weight: 500; } .version-current[data-v-8ddffaa9] { font-size: 14px; color: #666; font-family: monospace; background: #e9ecef; padding: 2px 8px; border-radius: 4px; } .version-latest[data-v-8ddffaa9] { font-size: 14px; color: #4CAF50; font-family: monospace; font-weight: 600; background: #e8f5e8; padding: 2px 8px; border-radius: 4px; } .update-description[data-v-8ddffaa9] { padding: 16px 24px; } .description-title[data-v-8ddffaa9] { font-size: 16px; font-weight: 600; color: #333; margin: 0 0 12px 0; display: flex; align-items: center; gap: 8px; } .description-title[data-v-8ddffaa9]::before { content: ''; width: 4px; height: 16px; background: #4CAF50; border-radius: 2px; } .description-content[data-v-8ddffaa9] { font-size: 14px; color: #555; line-height: 1.6; margin: 0; max-height: 120px; overflow-y: auto; padding: 12px; background: #f8f9fa; border-radius: 6px; } .notification-actions[data-v-8ddffaa9] { padding: 16px 24px 24px; } .skip-option[data-v-8ddffaa9] { margin-bottom: 16px; } .skip-checkbox[data-v-8ddffaa9] { display: flex; align-items: center; cursor: pointer; font-size: 14px; color: #666; } .skip-checkbox input[type="checkbox"][data-v-8ddffaa9] { display: none; } .checkmark[data-v-8ddffaa9] { width: 16px; height: 16px; border: 2px solid #ddd; border-radius: 3px; margin-right: 8px; position: relative; transition: all 0.2s ease; } .skip-checkbox input[type="checkbox"]:checked + .checkmark[data-v-8ddffaa9] { background: #4CAF50; border-color: #4CAF50; } .skip-checkbox input[type="checkbox"]:checked + .checkmark[data-v-8ddffaa9]::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); } .skip-text[data-v-8ddffaa9] { user-select: none; } .action-buttons[data-v-8ddffaa9] { display: flex; gap: 12px; justify-content: flex-end; } .btn[data-v-8ddffaa9] { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; min-width: 100px; justify-content: center; } .btn[data-v-8ddffaa9]:disabled { cursor: not-allowed; opacity: 0.6; } .btn-secondary[data-v-8ddffaa9] { background: #f5f5f5; color: #666; } .btn-secondary[data-v-8ddffaa9]:hover:not(:disabled) { background: #e0e0e0; color: #333; } .btn-primary[data-v-8ddffaa9] { background: #4CAF50; color: white; } .btn-primary[data-v-8ddffaa9]:hover:not(:disabled) { background: #45a049; } .loading-spinner[data-v-8ddffaa9] { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.3); border-top: 2px solid white; border-radius: 50%; animation: spin-8ddffaa9 1s linear infinite; } @keyframes spin-8ddffaa9 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .update-note[data-v-8ddffaa9] { padding: 0 24px 24px; border-top: 1px solid #f0f0f0; margin-top: 16px; padding-top: 16px; } .note-text[data-v-8ddffaa9] { font-size: 12px; color: #666; margin: 0; display: flex; align-items: center; gap: 6px; line-height: 1.4; } /* 响应式设计 */ @media (max-width: 480px) { .update-notification[data-v-8ddffaa9] { width: 95%; margin: 20px; } .notification-header[data-v-8ddffaa9] { padding: 20px 20px 16px; } .version-info[data-v-8ddffaa9], .update-description[data-v-8ddffaa9], .notification-actions[data-v-8ddffaa9], .update-note[data-v-8ddffaa9] { padding-left: 20px; padding-right: 20px; } .action-buttons[data-v-8ddffaa9] { flex-direction: column; } .btn[data-v-8ddffaa9] { width: 100%; } } /* 深色模式支持 */ @media (prefers-color-scheme: dark) { .update-notification[data-v-8ddffaa9] { background: #2d3748; color: #e2e8f0; } .notification-header[data-v-8ddffaa9] { border-bottom-color: #4a5568; } .notification-title[data-v-8ddffaa9] { color: #e2e8f0; } .notification-subtitle[data-v-8ddffaa9] { color: #a0aec0; } .close-btn[data-v-8ddffaa9] { background: #4a5568; color: #a0aec0; } .close-btn[data-v-8ddffaa9]:hover { background: #718096; color: #e2e8f0; } .version-info[data-v-8ddffaa9] { background: #4a5568; } .version-current[data-v-8ddffaa9] { background: #718096; color: #e2e8f0; } .version-latest[data-v-8ddffaa9] { background: #2f855a; color: #c6f6d5; } .update-description p[data-v-8ddffaa9] { color: #cbd5e0; } .description-title[data-v-8ddffaa9] { color: #e2e8f0; } .description-content[data-v-8ddffaa9] { color: #cbd5e0; background: #4a5568; } .skip-checkbox[data-v-8ddffaa9] { color: #a0aec0; } .checkmark[data-v-8ddffaa9] { border-color: #718096; } .btn-secondary[data-v-8ddffaa9] { background: #4a5568; color: #a0aec0; } .btn-secondary[data-v-8ddffaa9]:hover:not(:disabled) { background: #718096; color: #e2e8f0; } .update-note[data-v-8ddffaa9] { border-top-color: #4a5568; } .note-text[data-v-8ddffaa9] { color: #a0aec0; } } .custom-window[data-v-e9966e88] { position: relative; width: 100%; max-width: 350px; min-height: 200px; background: white; border: 1px solid rgba(239,239,239,1.00); border-radius: 16px; box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.05); margin-bottom: 15px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .window-header[data-v-e9966e88] { /* background: linear-gradient(90deg, #00a1d6, #0084c7); */ color: rgb(84, 84, 84); padding: 6px 12px; border-radius: 0 0 8px 8px; display: flex; justify-content: space-between; align-items: center; user-select: none; } .window-title[data-v-e9966e88] { font-weight: 300; font-size: 12px; } .close-btn[data-v-e9966e88] { background: none; border: none; color: white; font-size: 16px; cursor: pointer; padding: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; } .close-btn[data-v-e9966e88]:hover { background-color: rgba(255, 255, 255, 0.20); } .window-content[data-v-e9966e88] { padding: 0; } /* 全局样式重置 */ * { } /* 触发按钮样式增强 */ #douban-trigger-btn:hover { background: #005a1a !important; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0, 119, 34, 0.5); } /* 窗口容器样式 */ #douban-custom-window { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } #douban-custom-window ::-webkit-scrollbar { width: 6px; } #douban-custom-window ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; } #douban-custom-window ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; } #douban-custom-window ::-webkit-scrollbar-thumb:hover { background: #a8a8a8; } /* 动画效果 */ @keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } @keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .custom-window { animation: fadeIn 0.3s ease-out; } .window-content > * { animation: slideIn 0.4s ease-out; } /* 响应式设计 */ @media (max-width: 480px) { .custom-window { width: 90vw !important; left: 5vw !important; } .stats-grid { grid-template-columns: 1fr !important; } .action-section { flex-direction: column; } .action-btn { width: 100%; } } /* 深色模式适配 */ @media (prefers-color-scheme: dark) { .custom-window { background: #2d3748; border-color: #4a5568; color: #e2e8f0; } .window-content h3, .window-content h4 { color: #e2e8f0; } .window-content p { color: #cbd5e0; } .feature-section li { background: #4a5568; color: #cbd5e0; } .info-section { background: #4a5568; color: #cbd5e0; } .info-item strong { color: #e2e8f0; } } /* Option 元素美化样式 */ select option { color: #666666; /* 深灰色文字 */ background-color: #ffffff; padding: 8px 12px; /* 与边间距离 */ border-radius: 6px; /* 圆角矩形 */ margin: 2px 0; transition: background-color 0.2s ease; } select option:hover { background-color: #f5f5f5; /* hover时浅灰背景 */ } /* 针对不同浏览器的兼容性 */ select { border-radius: 6px; padding: 8px 12px; } /* 深色模式下的option样式 */ @media (prefers-color-scheme: dark) { select option { color: #a0a0a0; background-color: #2d3748; } select option:hover { background-color: #718096; /* 更浅的灰色背景 */ color: #f7fafc; /* hover时更亮的文字 */ } }`; document.head.appendChild(style); })(); (function() { "use strict"; (function() { "use strict"; /** * @vue/shared v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ function makeMap(str) { const map = /* @__PURE__ */ Object.create(null); for (const key of str.split(",")) map[key] = 1; return (val) => val in map; } const EMPTY_OBJ = {}; const EMPTY_ARR = []; const NOOP = () => { }; const NO = () => false; const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { const i = arr.indexOf(el); if (i > -1) { arr.splice(i, 1); } }; const hasOwnProperty$1 = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; const isMap = (val) => toTypeString(val) === "[object Map]"; const isSet = (val) => toTypeString(val) === "[object Set]"; const isDate = (val) => toTypeString(val) === "[object Date]"; const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { return toTypeString(value).slice(8, -1); }; const isPlainObject = (val) => toTypeString(val) === "[object Object]"; const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; const isReservedProp = /* @__PURE__ */ makeMap( // the leading comma is intentional so empty string "" is also included ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" ); const cacheStringFunction = (fn) => { const cache = /* @__PURE__ */ Object.create(null); return (str) => { const hit = cache[str]; return hit || (cache[str] = fn(str)); }; }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction( (str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); } ); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction( (str) => str.replace(hyphenateRE, "-$1").toLowerCase() ); const capitalize = cacheStringFunction((str) => { return str.charAt(0).toUpperCase() + str.slice(1); }); const toHandlerKey = cacheStringFunction( (str) => { const s = str ? `on${capitalize(str)}` : ``; return s; } ); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, ...arg) => { for (let i = 0; i < fns.length; i++) { fns[i](...arg); } }; const def = (obj, key, value, writable = false) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, writable, value }); }; const looseToNumber = (val) => { const n = parseFloat(val); return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; function normalizeStyle(value) { if (isArray(value)) { const res = {}; for (let i = 0; i < value.length; i++) { const item = value[i]; const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); if (normalized) { for (const key in normalized) { res[key] = normalized[key]; } } } return res; } else if (isString(value) || isObject(value)) { return value; } } const listDelimiterRE = /;(?![^(]*\))/g; const propertyDelimiterRE = /:([^]+)/; const styleCommentRE = /\/\*[^]*?\*\//g; function parseStringStyle(cssText) { const ret = {}; cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { if (item) { const tmp = item.split(propertyDelimiterRE); tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); } }); return ret; } function normalizeClass(value) { let res = ""; if (isString(value)) { res = value; } else if (isArray(value)) { for (let i = 0; i < value.length; i++) { const normalized = normalizeClass(value[i]); if (normalized) { res += normalized + " "; } } } else if (isObject(value)) { for (const name in value) { if (value[name]) { res += name + " "; } } } return res.trim(); } const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); function includeBooleanAttr(value) { return !!value || value === ""; } function looseCompareArrays(a, b) { if (a.length !== b.length) return false; let equal = true; for (let i = 0; equal && i < a.length; i++) { equal = looseEqual(a[i], b[i]); } return equal; } function looseEqual(a, b) { if (a === b) return true; let aValidType = isDate(a); let bValidType = isDate(b); if (aValidType || bValidType) { return aValidType && bValidType ? a.getTime() === b.getTime() : false; } aValidType = isSymbol(a); bValidType = isSymbol(b); if (aValidType || bValidType) { return a === b; } aValidType = isArray(a); bValidType = isArray(b); if (aValidType || bValidType) { return aValidType && bValidType ? looseCompareArrays(a, b) : false; } aValidType = isObject(a); bValidType = isObject(b); if (aValidType || bValidType) { if (!aValidType || !bValidType) { return false; } const aKeysCount = Object.keys(a).length; const bKeysCount = Object.keys(b).length; if (aKeysCount !== bKeysCount) { return false; } for (const key in a) { const aHasKey = a.hasOwnProperty(key); const bHasKey = b.hasOwnProperty(key); if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { return false; } } } return String(a) === String(b); } function looseIndexOf(arr, val) { return arr.findIndex((item) => looseEqual(item, val)); } const isRef$1 = (val) => { return !!(val && val["__v_isRef"] === true); }; const toDisplayString = (val) => { return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); }; const replacer = (_key, val) => { if (isRef$1(val)) { return replacer(_key, val.value); } else if (isMap(val)) { return { [`Map(${val.size})`]: [...val.entries()].reduce( (entries, [key, val2], i) => { entries[stringifySymbol(key, i) + " =>"] = val2; return entries; }, {} ) }; } else if (isSet(val)) { return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) }; } else if (isSymbol(val)) { return stringifySymbol(val); } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { return String(val); } return val; }; const stringifySymbol = (v, i = "") => { var _a; return ( // Symbol.description in es2019+ so we need to cast here to pass // the lib: es2016 check isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v ); }; /** * @vue/reactivity v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ let activeEffectScope; class EffectScope { constructor(detached = false) { this.detached = detached; this._active = true; this._on = 0; this.effects = []; this.cleanups = []; this._isPaused = false; this.parent = activeEffectScope; if (!detached && activeEffectScope) { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( this ) - 1; } } get active() { return this._active; } pause() { if (this._active) { this._isPaused = true; let i, l; if (this.scopes) { for (i = 0, l = this.scopes.length; i < l; i++) { this.scopes[i].pause(); } } for (i = 0, l = this.effects.length; i < l; i++) { this.effects[i].pause(); } } } /** * Resumes the effect scope, including all child scopes and effects. */ resume() { if (this._active) { if (this._isPaused) { this._isPaused = false; let i, l; if (this.scopes) { for (i = 0, l = this.scopes.length; i < l; i++) { this.scopes[i].resume(); } } for (i = 0, l = this.effects.length; i < l; i++) { this.effects[i].resume(); } } } } run(fn) { if (this._active) { const currentEffectScope = activeEffectScope; try { activeEffectScope = this; return fn(); } finally { activeEffectScope = currentEffectScope; } } } /** * This should only be called on non-detached scopes * @internal */ on() { if (++this._on === 1) { this.prevScope = activeEffectScope; activeEffectScope = this; } } /** * This should only be called on non-detached scopes * @internal */ off() { if (this._on > 0 && --this._on === 0) { activeEffectScope = this.prevScope; this.prevScope = void 0; } } stop(fromParent) { if (this._active) { this._active = false; let i, l; for (i = 0, l = this.effects.length; i < l; i++) { this.effects[i].stop(); } this.effects.length = 0; for (i = 0, l = this.cleanups.length; i < l; i++) { this.cleanups[i](); } this.cleanups.length = 0; if (this.scopes) { for (i = 0, l = this.scopes.length; i < l; i++) { this.scopes[i].stop(true); } this.scopes.length = 0; } if (!this.detached && this.parent && !fromParent) { const last = this.parent.scopes.pop(); if (last && last !== this) { this.parent.scopes[this.index] = last; last.index = this.index; } } this.parent = void 0; } } } function getCurrentScope() { return activeEffectScope; } let activeSub; const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); class ReactiveEffect { constructor(fn) { this.fn = fn; this.deps = void 0; this.depsTail = void 0; this.flags = 1 | 4; this.next = void 0; this.cleanup = void 0; this.scheduler = void 0; if (activeEffectScope && activeEffectScope.active) { activeEffectScope.effects.push(this); } } pause() { this.flags |= 64; } resume() { if (this.flags & 64) { this.flags &= -65; if (pausedQueueEffects.has(this)) { pausedQueueEffects.delete(this); this.trigger(); } } } /** * @internal */ notify() { if (this.flags & 2 && !(this.flags & 32)) { return; } if (!(this.flags & 8)) { batch(this); } } run() { if (!(this.flags & 1)) { return this.fn(); } this.flags |= 2; cleanupEffect(this); prepareDeps(this); const prevEffect = activeSub; const prevShouldTrack = shouldTrack; activeSub = this; shouldTrack = true; try { return this.fn(); } finally { cleanupDeps(this); activeSub = prevEffect; shouldTrack = prevShouldTrack; this.flags &= -3; } } stop() { if (this.flags & 1) { for (let link = this.deps; link; link = link.nextDep) { removeSub(link); } this.deps = this.depsTail = void 0; cleanupEffect(this); this.onStop && this.onStop(); this.flags &= -2; } } trigger() { if (this.flags & 64) { pausedQueueEffects.add(this); } else if (this.scheduler) { this.scheduler(); } else { this.runIfDirty(); } } /** * @internal */ runIfDirty() { if (isDirty(this)) { this.run(); } } get dirty() { return isDirty(this); } } let batchDepth = 0; let batchedSub; let batchedComputed; function batch(sub, isComputed = false) { sub.flags |= 8; if (isComputed) { sub.next = batchedComputed; batchedComputed = sub; return; } sub.next = batchedSub; batchedSub = sub; } function startBatch() { batchDepth++; } function endBatch() { if (--batchDepth > 0) { return; } if (batchedComputed) { let e = batchedComputed; batchedComputed = void 0; while (e) { const next = e.next; e.next = void 0; e.flags &= -9; e = next; } } let error2; while (batchedSub) { let e = batchedSub; batchedSub = void 0; while (e) { const next = e.next; e.next = void 0; e.flags &= -9; if (e.flags & 1) { try { ; e.trigger(); } catch (err) { if (!error2) error2 = err; } } e = next; } } if (error2) throw error2; } function prepareDeps(sub) { for (let link = sub.deps; link; link = link.nextDep) { link.version = -1; link.prevActiveLink = link.dep.activeLink; link.dep.activeLink = link; } } function cleanupDeps(sub) { let head; let tail = sub.depsTail; let link = tail; while (link) { const prev = link.prevDep; if (link.version === -1) { if (link === tail) tail = prev; removeSub(link); removeDep(link); } else { head = link; } link.dep.activeLink = link.prevActiveLink; link.prevActiveLink = void 0; link = prev; } sub.deps = head; sub.depsTail = tail; } function isDirty(sub) { for (let link = sub.deps; link; link = link.nextDep) { if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { return true; } } if (sub._dirty) { return true; } return false; } function refreshComputed(computed2) { if (computed2.flags & 4 && !(computed2.flags & 16)) { return; } computed2.flags &= -17; if (computed2.globalVersion === globalVersion) { return; } computed2.globalVersion = globalVersion; if (!computed2.isSSR && computed2.flags & 128 && (!computed2.deps && !computed2._dirty || !isDirty(computed2))) { return; } computed2.flags |= 2; const dep = computed2.dep; const prevSub = activeSub; const prevShouldTrack = shouldTrack; activeSub = computed2; shouldTrack = true; try { prepareDeps(computed2); const value = computed2.fn(computed2._value); if (dep.version === 0 || hasChanged(value, computed2._value)) { computed2.flags |= 128; computed2._value = value; dep.version++; } } catch (err) { dep.version++; throw err; } finally { activeSub = prevSub; shouldTrack = prevShouldTrack; cleanupDeps(computed2); computed2.flags &= -3; } } function removeSub(link, soft = false) { const { dep, prevSub, nextSub } = link; if (prevSub) { prevSub.nextSub = nextSub; link.prevSub = void 0; } if (nextSub) { nextSub.prevSub = prevSub; link.nextSub = void 0; } if (dep.subs === link) { dep.subs = prevSub; if (!prevSub && dep.computed) { dep.computed.flags &= -5; for (let l = dep.computed.deps; l; l = l.nextDep) { removeSub(l, true); } } } if (!soft && !--dep.sc && dep.map) { dep.map.delete(dep.key); } } function removeDep(link) { const { prevDep, nextDep } = link; if (prevDep) { prevDep.nextDep = nextDep; link.prevDep = void 0; } if (nextDep) { nextDep.prevDep = prevDep; link.nextDep = void 0; } } let shouldTrack = true; const trackStack = []; function pauseTracking() { trackStack.push(shouldTrack); shouldTrack = false; } function resetTracking() { const last = trackStack.pop(); shouldTrack = last === void 0 ? true : last; } function cleanupEffect(e) { const { cleanup } = e; e.cleanup = void 0; if (cleanup) { const prevSub = activeSub; activeSub = void 0; try { cleanup(); } finally { activeSub = prevSub; } } } let globalVersion = 0; class Link { constructor(sub, dep) { this.sub = sub; this.dep = dep; this.version = dep.version; this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; } } class Dep { // TODO isolatedDeclarations "__v_skip" constructor(computed2) { this.computed = computed2; 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 = true; } track(debugInfo) { if (!activeSub || !shouldTrack || activeSub === this.computed) { return; } let link = this.activeLink; if (link === void 0 || link.sub !== activeSub) { link = this.activeLink = new Link(activeSub, this); if (!activeSub.deps) { activeSub.deps = activeSub.depsTail = link; } else { link.prevDep = activeSub.depsTail; activeSub.depsTail.nextDep = link; activeSub.depsTail = link; } addSub(link); } else if (link.version === -1) { link.version = this.version; if (link.nextDep) { const next = link.nextDep; next.prevDep = link.prevDep; if (link.prevDep) { link.prevDep.nextDep = next; } link.prevDep = activeSub.depsTail; link.nextDep = void 0; activeSub.depsTail.nextDep = link; activeSub.depsTail = link; if (activeSub.deps === link) { activeSub.deps = next; } } } return link; } trigger(debugInfo) { this.version++; globalVersion++; this.notify(debugInfo); } notify(debugInfo) { startBatch(); try { if (false) ; for (let link = this.subs; link; link = link.prevSub) { if (link.sub.notify()) { ; link.sub.dep.notify(); } } } finally { endBatch(); } } } function addSub(link) { link.dep.sc++; if (link.sub.flags & 4) { const computed2 = link.dep.computed; if (computed2 && !link.dep.subs) { computed2.flags |= 4 | 16; for (let l = computed2.deps; l; l = l.nextDep) { addSub(l); } } const currentTail = link.dep.subs; if (currentTail !== link) { link.prevSub = currentTail; if (currentTail) currentTail.nextSub = link; } link.dep.subs = link; } } const targetMap = /* @__PURE__ */ new WeakMap(); const ITERATE_KEY = Symbol( "" ); const MAP_KEY_ITERATE_KEY = Symbol( "" ); const ARRAY_ITERATE_KEY = Symbol( "" ); function track(target, type, key) { if (shouldTrack && activeSub) { let depsMap = targetMap.get(target); if (!depsMap) { targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); } let dep = depsMap.get(key); if (!dep) { depsMap.set(key, dep = new Dep()); dep.map = depsMap; dep.key = key; } { dep.track(); } } } function trigger(target, type, key, newValue, oldValue, oldTarget) { const depsMap = targetMap.get(target); if (!depsMap) { globalVersion++; return; } const run = (dep) => { if (dep) { { dep.trigger(); } } }; startBatch(); if (type === "clear") { depsMap.forEach(run); } else { const targetIsArray = isArray(target); const isArrayIndex = targetIsArray && isIntegerKey(key); if (targetIsArray && key === "length") { const newLength = Number(newValue); depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { run(dep); } }); } else { if (key !== void 0 || depsMap.has(void 0)) { run(depsMap.get(key)); } if (isArrayIndex) { run(depsMap.get(ARRAY_ITERATE_KEY)); } switch (type) { case "add": if (!targetIsArray) { run(depsMap.get(ITERATE_KEY)); if (isMap(target)) { run(depsMap.get(MAP_KEY_ITERATE_KEY)); } } else if (isArrayIndex) { run(depsMap.get("length")); } break; case "delete": if (!targetIsArray) { run(depsMap.get(ITERATE_KEY)); if (isMap(target)) { run(depsMap.get(MAP_KEY_ITERATE_KEY)); } } break; case "set": if (isMap(target)) { run(depsMap.get(ITERATE_KEY)); } break; } } } endBatch(); } function reactiveReadArray(array) { const raw = toRaw(array); if (raw === array) return raw; track(raw, "iterate", ARRAY_ITERATE_KEY); return isShallow(array) ? raw : raw.map(toReactive); } function shallowReadArray(arr) { track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); return arr; } const arrayInstrumentations = { __proto__: null, [Symbol.iterator]() { return iterator(this, Symbol.iterator, toReactive); }, concat(...args) { return reactiveReadArray(this).concat( ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) ); }, entries() { return iterator(this, "entries", (value) => { value[1] = toReactive(value[1]); return value; }); }, every(fn, thisArg) { return apply(this, "every", fn, thisArg, void 0, arguments); }, filter(fn, thisArg) { return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); }, find(fn, thisArg) { return apply(this, "find", fn, thisArg, toReactive, arguments); }, findIndex(fn, thisArg) { return apply(this, "findIndex", fn, thisArg, void 0, arguments); }, findLast(fn, thisArg) { return apply(this, "findLast", fn, thisArg, toReactive, arguments); }, findLastIndex(fn, thisArg) { return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); }, // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement forEach(fn, thisArg) { return apply(this, "forEach", fn, thisArg, void 0, arguments); }, includes(...args) { return searchProxy(this, "includes", args); }, indexOf(...args) { return searchProxy(this, "indexOf", args); }, join(separator) { return reactiveReadArray(this).join(separator); }, // keys() iterator only reads `length`, no optimisation required lastIndexOf(...args) { return searchProxy(this, "lastIndexOf", args); }, map(fn, thisArg) { return apply(this, "map", fn, thisArg, void 0, arguments); }, pop() { return noTracking(this, "pop"); }, push(...args) { return noTracking(this, "push", args); }, reduce(fn, ...args) { return reduce(this, "reduce", fn, args); }, reduceRight(fn, ...args) { return reduce(this, "reduceRight", fn, args); }, shift() { return noTracking(this, "shift"); }, // slice could use ARRAY_ITERATE but also seems to beg for range tracking some(fn, thisArg) { return apply(this, "some", fn, thisArg, void 0, arguments); }, splice(...args) { return noTracking(this, "splice", args); }, toReversed() { return reactiveReadArray(this).toReversed(); }, toSorted(comparer) { return reactiveReadArray(this).toSorted(comparer); }, toSpliced(...args) { return reactiveReadArray(this).toSpliced(...args); }, unshift(...args) { return noTracking(this, "unshift", args); }, values() { return iterator(this, "values", toReactive); } }; function iterator(self2, method, wrapValue) { const arr = shallowReadArray(self2); const iter = arr[method](); if (arr !== self2 && !isShallow(self2)) { iter._next = iter.next; iter.next = () => { const result = iter._next(); if (result.value) { result.value = wrapValue(result.value); } return result; }; } return iter; } const arrayProto = Array.prototype; function apply(self2, method, fn, thisArg, wrappedRetFn, args) { const arr = shallowReadArray(self2); const needsWrap = arr !== self2 && !isShallow(self2); const methodFn = arr[method]; if (methodFn !== arrayProto[method]) { const result2 = methodFn.apply(self2, args); return needsWrap ? toReactive(result2) : result2; } let wrappedFn = fn; if (arr !== self2) { if (needsWrap) { wrappedFn = function(item, index) { return fn.call(this, toReactive(item), index, self2); }; } else if (fn.length > 2) { wrappedFn = function(item, index) { return fn.call(this, item, index, self2); }; } } const result = methodFn.call(arr, wrappedFn, thisArg); return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; } function reduce(self2, method, fn, args) { const arr = shallowReadArray(self2); let wrappedFn = fn; if (arr !== self2) { if (!isShallow(self2)) { wrappedFn = function(acc, item, index) { return fn.call(this, acc, toReactive(item), index, self2); }; } else if (fn.length > 3) { wrappedFn = function(acc, item, index) { return fn.call(this, acc, item, index, self2); }; } } return arr[method](wrappedFn, ...args); } function searchProxy(self2, method, args) { const arr = toRaw(self2); track(arr, "iterate", ARRAY_ITERATE_KEY); const res = arr[method](...args); if ((res === -1 || res === false) && isProxy(args[0])) { args[0] = toRaw(args[0]); return arr[method](...args); } return res; } function noTracking(self2, method, args = []) { pauseTracking(); startBatch(); const res = toRaw(self2)[method].apply(self2, args); endBatch(); resetTracking(); return res; } const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) ); function hasOwnProperty(key) { if (!isSymbol(key)) key = String(key); const obj = toRaw(this); track(obj, "has", key); return obj.hasOwnProperty(key); } class BaseReactiveHandler { constructor(_isReadonly = false, _isShallow = false) { this._isReadonly = _isReadonly; this._isShallow = _isShallow; } get(target, key, receiver) { if (key === "__v_skip") return target["__v_skip"]; const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_isShallow") { return isShallow2; } else if (key === "__v_raw") { if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype // this means the receiver is a user proxy of the reactive proxy Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { return target; } return; } const targetIsArray = isArray(target); if (!isReadonly2) { let fn; if (targetIsArray && (fn = arrayInstrumentations[key])) { return fn; } if (key === "hasOwnProperty") { return hasOwnProperty; } } const res = Reflect.get( target, key, // if this is a proxy wrapping a ref, return methods using the raw ref // as receiver so that we don't have to call `toRaw` on the ref in all // its class methods isRef(target) ? target : receiver ); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } if (!isReadonly2) { track(target, "get", key); } if (isShallow2) { return res; } if (isRef(res)) { return targetIsArray && isIntegerKey(key) ? res : res.value; } if (isObject(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; } } class MutableReactiveHandler extends BaseReactiveHandler { constructor(isShallow2 = false) { super(false, isShallow2); } set(target, key, value, receiver) { let oldValue = target[key]; if (!this._isShallow) { const isOldValueReadonly = isReadonly(oldValue); if (!isShallow(value) && !isReadonly(value)) { oldValue = toRaw(oldValue); value = toRaw(value); } if (!isArray(target) && isRef(oldValue) && !isRef(value)) { if (isOldValueReadonly) { return false; } else { oldValue.value = value; return true; } } } const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); const result = Reflect.set( target, key, value, isRef(target) ? target : receiver ); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } } return result; } deleteProperty(target, key) { const hadKey = hasOwn(target, key); target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { trigger(target, "delete", key, void 0); } return result; } has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { track(target, "has", key); } return result; } ownKeys(target) { track( target, "iterate", isArray(target) ? "length" : ITERATE_KEY ); return Reflect.ownKeys(target); } } class ReadonlyReactiveHandler extends BaseReactiveHandler { constructor(isShallow2 = false) { super(true, isShallow2); } set(target, key) { return true; } deleteProperty(target, key) { return true; } } const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const targetIsMap = isMap(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track( rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY ); return { // iterator protocol next() { const { value, done } = innerIterator.next(); return done ? { value, done } : { value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), done }; }, // iterable protocol [Symbol.iterator]() { return this; } }; }; } function createReadonlyMethod(type) { return function(...args) { return type === "delete" ? false : type === "clear" ? void 0 : this; }; } function createInstrumentations(readonly2, shallow) { const instrumentations = { get(key) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); if (!readonly2) { if (hasChanged(key, rawKey)) { track(rawTarget, "get", key); } track(rawTarget, "get", rawKey); } const { has } = getProto(rawTarget); const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive; if (has.call(rawTarget, key)) { return wrap(target.get(key)); } else if (has.call(rawTarget, rawKey)) { return wrap(target.get(rawKey)); } else if (target !== rawTarget) { target.get(key); } }, get size() { const target = this["__v_raw"]; !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY); return Reflect.get(target, "size", target); }, has(key) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); if (!readonly2) { if (hasChanged(key, rawKey)) { track(rawTarget, "has", key); } track(rawTarget, "has", rawKey); } return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); }, forEach(callback, thisArg) { const observed = this; const target = observed["__v_raw"]; const rawTarget = toRaw(target); const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive; !readonly2 && track(rawTarget, "iterate", ITERATE_KEY); return target.forEach((value, key) => { return callback.call(thisArg, wrap(value), wrap(key), observed); }); } }; extend( instrumentations, readonly2 ? { add: createReadonlyMethod("add"), set: createReadonlyMethod("set"), delete: createReadonlyMethod("delete"), clear: createReadonlyMethod("clear") } : { add(value) { if (!shallow && !isShallow(value) && !isReadonly(value)) { value = toRaw(value); } const target = toRaw(this); const proto = getProto(target); const hadKey = proto.has.call(target, value); if (!hadKey) { target.add(value); trigger(target, "add", value, value); } return this; }, set(key, value) { if (!shallow && !isShallow(value) && !isReadonly(value)) { value = toRaw(value); } const target = toRaw(this); const { has, get } = getProto(target); let hadKey = has.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has.call(target, key); } const oldValue = get.call(target, key); target.set(key, value); if (!hadKey) { trigger(target, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } return this; }, delete(key) { const target = toRaw(this); const { has, get } = getProto(target); let hadKey = has.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has.call(target, key); } get ? get.call(target, key) : void 0; const result = target.delete(key); if (hadKey) { trigger(target, "delete", key, void 0); } return result; }, clear() { const target = toRaw(this); const hadItems = target.size !== 0; const result = target.clear(); if (hadItems) { trigger( target, "clear", void 0, void 0 ); } return result; } } ); const iteratorMethods = [ "keys", "values", "entries", Symbol.iterator ]; iteratorMethods.forEach((method) => { instrumentations[method] = createIterableMethod(method, readonly2, shallow); }); return instrumentations; } function createInstrumentationGetter(isReadonly2, shallow) { const instrumentations = createInstrumentations(isReadonly2, shallow); return (target, key, receiver) => { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_raw") { return target; } return Reflect.get( hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver ); }; } const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; const reactiveMap = /* @__PURE__ */ new WeakMap(); const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); const readonlyMap = /* @__PURE__ */ new WeakMap(); const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { switch (rawType) { case "Object": case "Array": return 1; case "Map": case "Set": case "WeakMap": case "WeakSet": return 2; default: return 0; } } function getTargetType(value) { return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); } function reactive(target) { if (isReadonly(target)) { return target; } return createReactiveObject( target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap ); } function shallowReactive(target) { return createReactiveObject( target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap ); } function readonly(target) { return createReactiveObject( target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap ); } function shallowReadonly(target) { return createReactiveObject( target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap ); } function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { if (!isObject(target)) { return target; } if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { return target; } const targetType = getTargetType(target); if (targetType === 0) { return target; } const existingProxy = proxyMap.get(target); if (existingProxy) { return existingProxy; } const proxy = new Proxy( target, targetType === 2 ? collectionHandlers : baseHandlers ); proxyMap.set(target, proxy); return proxy; } function isReactive(value) { if (isReadonly(value)) { return isReactive(value["__v_raw"]); } return !!(value && value["__v_isReactive"]); } function isReadonly(value) { return !!(value && value["__v_isReadonly"]); } function isShallow(value) { return !!(value && value["__v_isShallow"]); } function isProxy(value) { return value ? !!value["__v_raw"] : false; } function toRaw(observed) { const raw = observed && observed["__v_raw"]; return raw ? toRaw(raw) : observed; } function markRaw(value) { if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { def(value, "__v_skip", true); } return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; function isRef(r) { return r ? r["__v_isRef"] === true : false; } function ref(value) { return createRef(value, false); } function createRef(rawValue, shallow) { if (isRef(rawValue)) { return rawValue; } return new RefImpl(rawValue, shallow); } class RefImpl { constructor(value, isShallow2) { this.dep = new Dep(); this["__v_isRef"] = true; this["__v_isShallow"] = false; this._rawValue = isShallow2 ? value : toRaw(value); this._value = isShallow2 ? value : toReactive(value); this["__v_isShallow"] = isShallow2; } get value() { { this.dep.track(); } return this._value; } set value(newValue) { const oldValue = this._rawValue; const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); newValue = useDirectValue ? newValue : toRaw(newValue); if (hasChanged(newValue, oldValue)) { this._rawValue = newValue; this._value = useDirectValue ? newValue : toReactive(newValue); { this.dep.trigger(); } } } } function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; } const shallowUnwrapHandlers = { get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), set: (target, key, value, receiver) => { const oldValue = target[key]; if (isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } else { return Reflect.set(target, key, value, receiver); } } }; function proxyRefs(objectWithRefs) { return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); } class ComputedRefImpl { constructor(fn, setter, isSSR) { this.fn = fn; this.setter = setter; this._value = void 0; this.dep = new Dep(this); this.__v_isRef = true; this.deps = void 0; this.depsTail = void 0; this.flags = 16; this.globalVersion = globalVersion - 1; this.next = void 0; this.effect = this; this["__v_isReadonly"] = !setter; this.isSSR = isSSR; } /** * @internal */ notify() { this.flags |= 16; if (!(this.flags & 8) && // avoid infinite self recursion activeSub !== this) { batch(this, true); return true; } } get value() { const link = this.dep.track(); refreshComputed(this); if (link) { link.version = this.dep.version; } return this._value; } set value(newValue) { if (this.setter) { this.setter(newValue); } } } function computed$1(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; if (isFunction(getterOrOptions)) { getter = getterOrOptions; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; } const cRef = new ComputedRefImpl(getter, setter, isSSR); return cRef; } const INITIAL_WATCHER_VALUE = {}; const cleanupMap = /* @__PURE__ */ new WeakMap(); let activeWatcher = void 0; function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { if (owner) { let cleanups = cleanupMap.get(owner); if (!cleanups) cleanupMap.set(owner, cleanups = []); cleanups.push(cleanupFn); } } function watch$1(source, cb, options = EMPTY_OBJ) { const { immediate, deep, once, scheduler, augmentJob, call } = options; const reactiveGetter = (source2) => { if (deep) return source2; if (isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1); return traverse(source2); }; let effect2; let getter; let cleanup; let boundCleanup; let forceTrigger = false; let isMultiSource = false; if (isRef(source)) { getter = () => source.value; forceTrigger = isShallow(source); } else if (isReactive(source)) { getter = () => reactiveGetter(source); forceTrigger = true; } else if (isArray(source)) { isMultiSource = true; forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); getter = () => source.map((s) => { if (isRef(s)) { return s.value; } else if (isReactive(s)) { return reactiveGetter(s); } else if (isFunction(s)) { return call ? call(s, 2) : s(); } else ; }); } else if (isFunction(source)) { if (cb) { getter = call ? () => call(source, 2) : source; } else { getter = () => { if (cleanup) { pauseTracking(); try { cleanup(); } finally { resetTracking(); } } const currentEffect = activeWatcher; activeWatcher = effect2; try { return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); } finally { activeWatcher = currentEffect; } }; } } else { getter = NOOP; } if (cb && deep) { const baseGetter = getter; const depth = deep === true ? Infinity : deep; getter = () => traverse(baseGetter(), depth); } const scope = getCurrentScope(); const watchHandle = () => { effect2.stop(); if (scope && scope.active) { remove(scope.effects, effect2); } }; if (once && cb) { const _cb = cb; cb = (...args) => { _cb(...args); watchHandle(); }; } let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; const job = (immediateFirstRun) => { if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) { return; } if (cb) { const newValue = effect2.run(); if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { if (cleanup) { cleanup(); } const currentWatcher = activeWatcher; activeWatcher = effect2; try { const args = [ newValue, // pass undefined as the old value when it's changed for the first time oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, boundCleanup ]; oldValue = newValue; call ? call(cb, 3, args) : ( // @ts-expect-error cb(...args) ); } finally { activeWatcher = currentWatcher; } } } else { effect2.run(); } }; if (augmentJob) { augmentJob(job); } effect2 = new ReactiveEffect(getter); effect2.scheduler = scheduler ? () => scheduler(job, false) : job; boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2); cleanup = effect2.onStop = () => { const cleanups = cleanupMap.get(effect2); if (cleanups) { if (call) { call(cleanups, 4); } else { for (const cleanup2 of cleanups) cleanup2(); } cleanupMap.delete(effect2); } }; if (cb) { if (immediate) { job(true); } else { oldValue = effect2.run(); } } else if (scheduler) { scheduler(job.bind(null, true), true); } else { effect2.run(); } watchHandle.pause = effect2.pause.bind(effect2); watchHandle.resume = effect2.resume.bind(effect2); watchHandle.stop = watchHandle; return watchHandle; } function traverse(value, depth = Infinity, seen) { if (depth <= 0 || !isObject(value) || value["__v_skip"]) { return value; } seen = seen || /* @__PURE__ */ new Set(); if (seen.has(value)) { return value; } seen.add(value); depth--; if (isRef(value)) { traverse(value.value, depth, seen); } else if (isArray(value)) { for (let i = 0; i < value.length; i++) { traverse(value[i], depth, seen); } } else if (isSet(value) || isMap(value)) { value.forEach((v) => { traverse(v, depth, seen); }); } else if (isPlainObject(value)) { for (const key in value) { traverse(value[key], depth, seen); } for (const key of Object.getOwnPropertySymbols(value)) { if (Object.prototype.propertyIsEnumerable.call(value, key)) { traverse(value[key], depth, seen); } } } return value; } /** * @vue/runtime-core v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ const stack = []; let isWarning = false; function warn$1(msg, ...args) { if (isWarning) return; isWarning = true; pauseTracking(); const instance = stack.length ? stack[stack.length - 1].component : null; const appWarnHandler = instance && instance.appContext.config.warnHandler; const trace = getComponentTrace(); if (appWarnHandler) { callWithErrorHandling( appWarnHandler, instance, 11, [ // eslint-disable-next-line no-restricted-syntax msg + args.map((a) => { var _a, _b; return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); }).join(""), instance && instance.proxy, trace.map( ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` ).join("\n"), trace ] ); } else { const warnArgs = [`[Vue warn]: ${msg}`, ...args]; if (trace.length && // avoid spamming console during tests true) { warnArgs.push(` `, ...formatTrace(trace)); } console.warn(...warnArgs); } resetTracking(); isWarning = false; } function getComponentTrace() { let currentVNode = stack[stack.length - 1]; if (!currentVNode) { return []; } const normalizedStack = []; while (currentVNode) { const last = normalizedStack[0]; if (last && last.vnode === currentVNode) { last.recurseCount++; } else { normalizedStack.push({ vnode: currentVNode, recurseCount: 0 }); } const parentInstance = currentVNode.component && currentVNode.component.parent; currentVNode = parentInstance && parentInstance.vnode; } return normalizedStack; } function formatTrace(trace) { const logs = []; trace.forEach((entry, i) => { logs.push(...i === 0 ? [] : [` `], ...formatTraceEntry(entry)); }); return logs; } function formatTraceEntry({ vnode, recurseCount }) { const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; const isRoot = vnode.component ? vnode.component.parent == null : false; const open = ` at <${formatComponentName( vnode.component, vnode.type, isRoot )}`; const close = `>` + postfix; return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } function formatProps(props) { const res = []; const keys = Object.keys(props); keys.slice(0, 3).forEach((key) => { res.push(...formatProp(key, props[key])); }); if (keys.length > 3) { res.push(` ...`); } return res; } function formatProp(key, value, raw) { if (isString(value)) { value = JSON.stringify(value); return raw ? value : [`${key}=${value}`]; } else if (typeof value === "number" || typeof value === "boolean" || value == null) { return raw ? value : [`${key}=${value}`]; } else if (isRef(value)) { value = formatProp(key, toRaw(value.value), true); return raw ? value : [`${key}=Ref<`, value, `>`]; } else if (isFunction(value)) { return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; } else { value = toRaw(value); return raw ? value : [`${key}=`, value]; } } function callWithErrorHandling(fn, instance, type, args) { try { return args ? fn(...args) : fn(); } catch (err) { handleError(err, instance, type); } } function callWithAsyncErrorHandling(fn, instance, type, args) { if (isFunction(fn)) { const res = callWithErrorHandling(fn, instance, type, args); if (res && isPromise(res)) { res.catch((err) => { handleError(err, instance, type); }); } return res; } if (isArray(fn)) { const values = []; for (let i = 0; i < fn.length; i++) { values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); } return values; } } function handleError(err, instance, type, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`; while (cur) { const errorCapturedHooks = cur.ec; if (errorCapturedHooks) { for (let i = 0; i < errorCapturedHooks.length; i++) { if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; } } } cur = cur.parent; } if (errorHandler) { pauseTracking(); callWithErrorHandling(errorHandler, null, 10, [ err, exposedInstance, errorInfo ]); resetTracking(); return; } } logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); } function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { if (throwInProd) { throw err; } else { console.error(err); } } const queue = []; let flushIndex = -1; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; function nextTick(fn) { const p2 = currentFlushPromise || resolvedPromise; return fn ? p2.then(this ? fn.bind(this) : fn) : p2; } function findInsertionIndex(id) { let start = flushIndex + 1; let end = queue.length; while (start < end) { const middle = start + end >>> 1; const middleJob = queue[middle]; const middleJobId = getId(middleJob); if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { start = middle + 1; } else { end = middle; } } return start; } function queueJob(job) { if (!(job.flags & 1)) { const jobId = getId(job); const lastJob = queue[queue.length - 1]; if (!lastJob || // fast path when the job id is larger than the tail !(job.flags & 2) && jobId >= getId(lastJob)) { queue.push(job); } else { queue.splice(findInsertionIndex(jobId), 0, job); } job.flags |= 1; queueFlush(); } } function queueFlush() { if (!currentFlushPromise) { currentFlushPromise = resolvedPromise.then(flushJobs); } } function queuePostFlushCb(cb) { if (!isArray(cb)) { if (activePostFlushCbs && cb.id === -1) { activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); } else if (!(cb.flags & 1)) { pendingPostFlushCbs.push(cb); cb.flags |= 1; } } else { pendingPostFlushCbs.push(...cb); } queueFlush(); } function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { for (; i < queue.length; i++) { const cb = queue[i]; if (cb && cb.flags & 2) { if (instance && cb.id !== instance.uid) { continue; } queue.splice(i, 1); i--; if (cb.flags & 4) { cb.flags &= -2; } cb(); if (!(cb.flags & 4)) { cb.flags &= -2; } } } } function flushPostFlushCbs(seen) { if (pendingPostFlushCbs.length) { const deduped = [...new Set(pendingPostFlushCbs)].sort( (a, b) => getId(a) - getId(b) ); pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { activePostFlushCbs.push(...deduped); return; } activePostFlushCbs = deduped; for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { const cb = activePostFlushCbs[postFlushIndex]; if (cb.flags & 4) { cb.flags &= -2; } if (!(cb.flags & 8)) cb(); cb.flags &= -2; } activePostFlushCbs = null; postFlushIndex = 0; } } const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; function flushJobs(seen) { try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; if (job && !(job.flags & 8)) { if (false) ; if (job.flags & 4) { job.flags &= ~1; } callWithErrorHandling( job, job.i, job.i ? 15 : 14 ); if (!(job.flags & 4)) { job.flags &= ~1; } } } } finally { for (; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; if (job) { job.flags &= -2; } } flushIndex = -1; queue.length = 0; flushPostFlushCbs(); currentFlushPromise = null; if (queue.length || pendingPostFlushCbs.length) { flushJobs(); } } } let currentRenderingInstance = null; let currentScopeId = null; function setCurrentRenderingInstance(instance) { const prev = currentRenderingInstance; currentRenderingInstance = instance; currentScopeId = instance && instance.type.__scopeId || null; return prev; } function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { if (!ctx) return fn; if (fn._n) { return fn; } const renderFnWithContext = (...args) => { if (renderFnWithContext._d) { setBlockTracking(-1); } const prevInstance = setCurrentRenderingInstance(ctx); let res; try { res = fn(...args); } finally { setCurrentRenderingInstance(prevInstance); if (renderFnWithContext._d) { setBlockTracking(1); } } return res; }; renderFnWithContext._n = true; renderFnWithContext._c = true; renderFnWithContext._d = true; return renderFnWithContext; } function withDirectives(vnode, directives) { if (currentRenderingInstance === null) { return vnode; } const instance = getComponentPublicInstance(currentRenderingInstance); const bindings = vnode.dirs || (vnode.dirs = []); for (let i = 0; i < directives.length; i++) { let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; if (dir) { if (isFunction(dir)) { dir = { mounted: dir, updated: dir }; } if (dir.deep) { traverse(value); } bindings.push({ dir, instance, value, oldValue: void 0, arg, modifiers }); } } return vnode; } function invokeDirectiveHook(vnode, prevVNode, instance, name) { const bindings = vnode.dirs; const oldBindings = prevVNode && prevVNode.dirs; for (let i = 0; i < bindings.length; i++) { const binding = bindings[i]; if (oldBindings) { binding.oldValue = oldBindings[i].value; } let hook = binding.dir[name]; if (hook) { pauseTracking(); callWithAsyncErrorHandling(hook, instance, 8, [ vnode.el, binding, vnode, prevVNode ]); resetTracking(); } } } const TeleportEndKey = Symbol("_vte"); const isTeleport = (type) => type.__isTeleport; function setTransitionHooks(vnode, hooks) { if (vnode.shapeFlag & 6 && vnode.component) { vnode.transition = hooks; setTransitionHooks(vnode.component.subTree, hooks); } else if (vnode.shapeFlag & 128) { vnode.ssContent.transition = hooks.clone(vnode.ssContent); vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); } else { vnode.transition = hooks; } } function markAsyncBoundary(instance) { instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; } function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { if (isArray(rawRef)) { rawRef.forEach( (r, i) => setRef( r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount ) ); return; } if (isAsyncWrapper(vnode) && !isUnmount) { if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); } return; } const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; const value = isUnmount ? null : refValue; const { i: owner, r: ref3 } = rawRef; const oldRef = oldRawRef && oldRawRef.r; const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; const setupState = owner.setupState; const rawSetupState = toRaw(setupState); const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { return hasOwn(rawSetupState, key); }; if (oldRef != null && oldRef !== ref3) { if (isString(oldRef)) { refs[oldRef] = null; if (canSetSetupRef(oldRef)) { setupState[oldRef] = null; } } else if (isRef(oldRef)) { oldRef.value = null; } } if (isFunction(ref3)) { callWithErrorHandling(ref3, owner, 12, [value, refs]); } else { const _isString = isString(ref3); const _isRef = isRef(ref3); if (_isString || _isRef) { const doSet = () => { if (rawRef.f) { const existing = _isString ? canSetSetupRef(ref3) ? setupState[ref3] : refs[ref3] : ref3.value; if (isUnmount) { isArray(existing) && remove(existing, refValue); } else { if (!isArray(existing)) { if (_isString) { refs[ref3] = [refValue]; if (canSetSetupRef(ref3)) { setupState[ref3] = refs[ref3]; } } else { ref3.value = [refValue]; if (rawRef.k) refs[rawRef.k] = ref3.value; } } else if (!existing.includes(refValue)) { existing.push(refValue); } } } else if (_isString) { refs[ref3] = value; if (canSetSetupRef(ref3)) { setupState[ref3] = value; } } else if (_isRef) { ref3.value = value; if (rawRef.k) refs[rawRef.k] = value; } else ; }; if (value) { doSet.id = -1; queuePostRenderEffect(doSet, parentSuspense); } else { doSet(); } } } } getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); const isAsyncWrapper = (i) => !!i.type.__asyncLoader; const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; function onActivated(hook, target) { registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { const wrappedHook = hook.__wdc || (hook.__wdc = () => { let current = target; while (current) { if (current.isDeactivated) { return; } current = current.parent; } return hook(); }); injectHook(type, wrappedHook, target); if (target) { let current = target.parent; while (current && current.parent) { if (isKeepAlive(current.parent.vnode)) { injectToKeepAliveRoot(wrappedHook, type, target, current); } current = current.parent; } } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { const injected = injectHook( type, hook, keepAliveRoot, true /* prepend */ ); onUnmounted(() => { remove(keepAliveRoot[type], injected); }, target); } function injectHook(type, hook, target = currentInstance, prepend = false) { if (target) { const hooks = target[type] || (target[type] = []); const wrappedHook = hook.__weh || (hook.__weh = (...args) => { pauseTracking(); const reset = setCurrentInstance(target); const res = callWithAsyncErrorHandling(hook, target, type, args); reset(); resetTracking(); return res; }); if (prepend) { hooks.unshift(wrappedHook); } else { hooks.push(wrappedHook); } return wrappedHook; } } const createHook = (lifecycle) => (hook, target = currentInstance) => { if (!isInSSRComponentSetup || lifecycle === "sp") { injectHook(lifecycle, (...args) => hook(...args), target); } }; const onBeforeMount = createHook("bm"); const onMounted = createHook("m"); const onBeforeUpdate = createHook( "bu" ); const onUpdated = createHook("u"); const onBeforeUnmount = createHook( "bum" ); const onUnmounted = createHook("um"); const onServerPrefetch = createHook( "sp" ); const onRenderTriggered = createHook("rtg"); const onRenderTracked = createHook("rtc"); function onErrorCaptured(hook, target = currentInstance) { injectHook("ec", hook, target); } const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); function renderList(source, renderItem, cache, index) { let ret; const cached = cache; const sourceIsArray = isArray(source); if (sourceIsArray || isString(source)) { const sourceIsReactiveArray = sourceIsArray && isReactive(source); let needsWrap = false; let isReadonlySource = false; if (sourceIsReactiveArray) { needsWrap = !isShallow(source); isReadonlySource = isReadonly(source); source = shallowReadArray(source); } ret = new Array(source.length); for (let i = 0, l = source.length; i < l; i++) { ret[i] = renderItem( needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached ); } } else if (typeof source === "number") { ret = new Array(source); for (let i = 0; i < source; i++) { ret[i] = renderItem(i + 1, i, void 0, cached); } } else if (isObject(source)) { if (source[Symbol.iterator]) { ret = Array.from( source, (item, i) => renderItem(item, i, void 0, cached) ); } else { const keys = Object.keys(source); ret = new Array(keys.length); for (let i = 0, l = keys.length; i < l; i++) { const key = keys[i]; ret[i] = renderItem(source[key], key, i, cached); } } } else { ret = []; } return ret; } const getPublicInstance = (i) => { if (!i) return null; if (isStatefulComponent(i)) return getComponentPublicInstance(i); return getPublicInstance(i.parent); }; const publicPropertiesMap = ( // Move PURE marker to new line to workaround compiler discarding it // due to type annotation /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { $: (i) => i, $el: (i) => i.vnode.el, $data: (i) => i.data, $props: (i) => i.props, $attrs: (i) => i.attrs, $slots: (i) => i.slots, $refs: (i) => i.refs, $parent: (i) => getPublicInstance(i.parent), $root: (i) => getPublicInstance(i.root), $host: (i) => i.ce, $emit: (i) => i.emit, $options: (i) => resolveMergedOptions(i), $forceUpdate: (i) => i.f || (i.f = () => { queueJob(i.update); }), $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), $watch: (i) => instanceWatch.bind(i) }) ); const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { get({ _: instance }, key) { if (key === "__v_skip") { return true; } const { ctx, setupState, data, props, accessCache, type, appContext } = instance; let normalizedProps; if (key[0] !== "$") { const n = accessCache[key]; if (n !== void 0) { switch (n) { case 1: return setupState[key]; case 2: return data[key]; case 4: return ctx[key]; case 3: return props[key]; } } else if (hasSetupBinding(setupState, key)) { accessCache[key] = 1; return setupState[key]; } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { accessCache[key] = 2; return data[key]; } else if ( // only cache other properties when instance has declared (thus stable) // props (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) ) { accessCache[key] = 3; return props[key]; } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { accessCache[key] = 4; return ctx[key]; } else if (shouldCacheAccess) { accessCache[key] = 0; } } const publicGetter = publicPropertiesMap[key]; let cssModule, globalProperties; if (publicGetter) { if (key === "$attrs") { track(instance.attrs, "get", ""); } return publicGetter(instance); } else if ( // css module (injected by vue-loader) (cssModule = type.__cssModules) && (cssModule = cssModule[key]) ) { return cssModule; } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { accessCache[key] = 4; return ctx[key]; } else if ( // global properties globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) ) { { return globalProperties[key]; } } else ; }, set({ _: instance }, key, value) { const { data, setupState, ctx } = instance; if (hasSetupBinding(setupState, key)) { setupState[key] = value; return true; } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { data[key] = value; return true; } else if (hasOwn(instance.props, key)) { return false; } if (key[0] === "$" && key.slice(1) in instance) { return false; } else { { ctx[key] = value; } } return true; }, has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { let normalizedProps; return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); }, defineProperty(target, key, descriptor) { if (descriptor.get != null) { target._.accessCache[key] = 0; } else if (hasOwn(descriptor, "value")) { this.set(target, key, descriptor.value, null); } return Reflect.defineProperty(target, key, descriptor); } }; function normalizePropsOrEmits(props) { return isArray(props) ? props.reduce( (normalized, p2) => (normalized[p2] = null, normalized), {} ) : props; } let shouldCacheAccess = true; function applyOptions(instance) { const options = resolveMergedOptions(instance); const publicThis = instance.proxy; const ctx = instance.ctx; shouldCacheAccess = false; if (options.beforeCreate) { callHook(options.beforeCreate, instance, "bc"); } const { // state data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, // lifecycle created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, // public API expose, inheritAttrs, // assets components, directives, filters } = options; const checkDuplicateProperties = null; if (injectOptions) { resolveInjections(injectOptions, ctx, checkDuplicateProperties); } if (methods) { for (const key in methods) { const methodHandler = methods[key]; if (isFunction(methodHandler)) { { ctx[key] = methodHandler.bind(publicThis); } } } } if (dataOptions) { const data = dataOptions.call(publicThis, publicThis); if (!isObject(data)) ; else { instance.data = reactive(data); } } shouldCacheAccess = true; if (computedOptions) { for (const key in computedOptions) { const opt = computedOptions[key]; const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; const c = computed({ get, set }); Object.defineProperty(ctx, key, { enumerable: true, configurable: true, get: () => c.value, set: (v) => c.value = v }); } } if (watchOptions) { for (const key in watchOptions) { createWatcher(watchOptions[key], ctx, publicThis, key); } } if (provideOptions) { const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; Reflect.ownKeys(provides).forEach((key) => { provide(key, provides[key]); }); } if (created) { callHook(created, instance, "c"); } function registerLifecycleHook(register, hook) { if (isArray(hook)) { hook.forEach((_hook) => register(_hook.bind(publicThis))); } else if (hook) { register(hook.bind(publicThis)); } } registerLifecycleHook(onBeforeMount, beforeMount); registerLifecycleHook(onMounted, mounted); registerLifecycleHook(onBeforeUpdate, beforeUpdate); registerLifecycleHook(onUpdated, updated); registerLifecycleHook(onActivated, activated); registerLifecycleHook(onDeactivated, deactivated); registerLifecycleHook(onErrorCaptured, errorCaptured); registerLifecycleHook(onRenderTracked, renderTracked); registerLifecycleHook(onRenderTriggered, renderTriggered); registerLifecycleHook(onBeforeUnmount, beforeUnmount); registerLifecycleHook(onUnmounted, unmounted); registerLifecycleHook(onServerPrefetch, serverPrefetch); if (isArray(expose)) { if (expose.length) { const exposed = instance.exposed || (instance.exposed = {}); expose.forEach((key) => { Object.defineProperty(exposed, key, { get: () => publicThis[key], set: (val) => publicThis[key] = val, enumerable: true }); }); } else if (!instance.exposed) { instance.exposed = {}; } } if (render && instance.render === NOOP) { instance.render = render; } if (inheritAttrs != null) { instance.inheritAttrs = inheritAttrs; } if (components) instance.components = components; if (directives) instance.directives = directives; if (serverPrefetch) { markAsyncBoundary(instance); } } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { if (isArray(injectOptions)) { injectOptions = normalizeInject(injectOptions); } for (const key in injectOptions) { const opt = injectOptions[key]; let injected; if (isObject(opt)) { if ("default" in opt) { injected = inject( opt.from || key, opt.default, true ); } else { injected = inject(opt.from || key); } } else { injected = inject(opt); } if (isRef(injected)) { Object.defineProperty(ctx, key, { enumerable: true, configurable: true, get: () => injected.value, set: (v) => injected.value = v }); } else { ctx[key] = injected; } } } function callHook(hook, instance, type) { callWithAsyncErrorHandling( isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type ); } function createWatcher(raw, ctx, publicThis, key) { let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; if (isString(raw)) { const handler = ctx[raw]; if (isFunction(handler)) { { watch(getter, handler); } } } else if (isFunction(raw)) { { watch(getter, raw.bind(publicThis)); } } else if (isObject(raw)) { if (isArray(raw)) { raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); } else { const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; if (isFunction(handler)) { watch(getter, handler, raw); } } } else ; } function resolveMergedOptions(instance) { const base = instance.type; const { mixins, extends: extendsOptions } = base; const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; const cached = cache.get(base); let resolved; if (cached) { resolved = cached; } else if (!globalMixins.length && !mixins && !extendsOptions) { { resolved = base; } } else { resolved = {}; if (globalMixins.length) { globalMixins.forEach( (m) => mergeOptions(resolved, m, optionMergeStrategies, true) ); } mergeOptions(resolved, base, optionMergeStrategies); } if (isObject(base)) { cache.set(base, resolved); } return resolved; } function mergeOptions(to, from, strats, asMixin = false) { const { mixins, extends: extendsOptions } = from; if (extendsOptions) { mergeOptions(to, extendsOptions, strats, true); } if (mixins) { mixins.forEach( (m) => mergeOptions(to, m, strats, true) ); } for (const key in from) { if (asMixin && key === "expose") ; else { const strat = internalOptionMergeStrats[key] || strats && strats[key]; to[key] = strat ? strat(to[key], from[key]) : from[key]; } } return to; } const internalOptionMergeStrats = { data: mergeDataFn, props: mergeEmitsOrPropsOptions, emits: mergeEmitsOrPropsOptions, // objects methods: mergeObjectOptions, computed: mergeObjectOptions, // lifecycle beforeCreate: mergeAsArray, created: mergeAsArray, beforeMount: mergeAsArray, mounted: mergeAsArray, beforeUpdate: mergeAsArray, updated: mergeAsArray, beforeDestroy: mergeAsArray, beforeUnmount: mergeAsArray, destroyed: mergeAsArray, unmounted: mergeAsArray, activated: mergeAsArray, deactivated: mergeAsArray, errorCaptured: mergeAsArray, serverPrefetch: mergeAsArray, // assets components: mergeObjectOptions, directives: mergeObjectOptions, // watch watch: mergeWatchOptions, // provide / inject provide: mergeDataFn, inject: mergeInject }; function mergeDataFn(to, from) { if (!from) { return to; } if (!to) { return from; } return function mergedDataFn() { return extend( isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from ); }; } function mergeInject(to, from) { return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { if (isArray(raw)) { const res = {}; for (let i = 0; i < raw.length; i++) { res[raw[i]] = raw[i]; } return res; } return raw; } function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; } function mergeEmitsOrPropsOptions(to, from) { if (to) { if (isArray(to) && isArray(from)) { return [.../* @__PURE__ */ new Set([...to, ...from])]; } return extend( /* @__PURE__ */ Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from != null ? from : {}) ); } else { return from; } } function mergeWatchOptions(to, from) { if (!to) return from; if (!from) return to; const merged = extend(/* @__PURE__ */ Object.create(null), to); for (const key in from) { merged[key] = mergeAsArray(to[key], from[key]); } return merged; } function createAppContext() { return { app: null, config: { isNativeTag: NO, performance: false, globalProperties: {}, optionMergeStrategies: {}, errorHandler: void 0, warnHandler: void 0, compilerOptions: {} }, mixins: [], components: {}, directives: {}, provides: /* @__PURE__ */ Object.create(null), optionsCache: /* @__PURE__ */ new WeakMap(), propsCache: /* @__PURE__ */ new WeakMap(), emitsCache: /* @__PURE__ */ new WeakMap() }; } let uid$1 = 0; function createAppAPI(render, hydrate) { return function createApp2(rootComponent, rootProps = null) { if (!isFunction(rootComponent)) { rootComponent = extend({}, rootComponent); } if (rootProps != null && !isObject(rootProps)) { rootProps = null; } const context = createAppContext(); const installedPlugins = /* @__PURE__ */ new WeakSet(); const pluginCleanupFns = []; let isMounted = false; const app = context.app = { _uid: uid$1++, _component: rootComponent, _props: rootProps, _container: null, _context: context, _instance: null, version, get config() { return context.config; }, set config(v) { }, use(plugin, ...options) { if (installedPlugins.has(plugin)) ; else if (plugin && isFunction(plugin.install)) { installedPlugins.add(plugin); plugin.install(app, ...options); } else if (isFunction(plugin)) { installedPlugins.add(plugin); plugin(app, ...options); } else ; return app; }, mixin(mixin) { { if (!context.mixins.includes(mixin)) { context.mixins.push(mixin); } } return app; }, component(name, component) { if (!component) { return context.components[name]; } context.components[name] = component; return app; }, directive(name, directive) { if (!directive) { return context.directives[name]; } context.directives[name] = directive; return app; }, mount(rootContainer, isHydrate, namespace) { if (!isMounted) { const vnode = app._ceVNode || createVNode(rootComponent, rootProps); vnode.appContext = context; if (namespace === true) { namespace = "svg"; } else if (namespace === false) { namespace = void 0; } { render(vnode, rootContainer, namespace); } isMounted = true; app._container = rootContainer; rootContainer.__vue_app__ = app; return getComponentPublicInstance(vnode.component); } }, onUnmount(cleanupFn) { pluginCleanupFns.push(cleanupFn); }, unmount() { if (isMounted) { callWithAsyncErrorHandling( pluginCleanupFns, app._instance, 16 ); render(null, app._container); delete app._container.__vue_app__; } }, provide(key, value) { context.provides[key] = value; return app; }, runWithContext(fn) { const lastApp = currentApp; currentApp = app; try { return fn(); } finally { currentApp = lastApp; } } }; return app; }; } let currentApp = null; function provide(key, value) { if (!currentInstance) ; else { let provides = currentInstance.provides; const parentProvides = currentInstance.parent && currentInstance.parent.provides; if (parentProvides === provides) { provides = currentInstance.provides = Object.create(parentProvides); } provides[key] = value; } } function inject(key, defaultValue, treatDefaultAsFactory = false) { const instance = getCurrentInstance(); if (instance || currentApp) { let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; } else ; } } const internalObjectProto = {}; const createInternalObject = () => Object.create(internalObjectProto); const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; function initProps(instance, rawProps, isStateful, isSSR = false) { const props = {}; const attrs = createInternalObject(); instance.propsDefaults = /* @__PURE__ */ Object.create(null); setFullProps(instance, rawProps, props, attrs); for (const key in instance.propsOptions[0]) { if (!(key in props)) { props[key] = void 0; } } if (isStateful) { instance.props = isSSR ? props : shallowReactive(props); } else { if (!instance.type.props) { instance.props = attrs; } else { instance.props = props; } } instance.attrs = attrs; } function updateProps(instance, rawProps, rawPrevProps, optimized) { const { props, attrs, vnode: { patchFlag } } = instance; const rawCurrentProps = toRaw(props); const [options] = instance.propsOptions; let hasAttrsChanged = false; if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component (optimized || patchFlag > 0) && !(patchFlag & 16) ) { if (patchFlag & 8) { const propsToUpdate = instance.vnode.dynamicProps; for (let i = 0; i < propsToUpdate.length; i++) { let key = propsToUpdate[i]; if (isEmitListener(instance.emitsOptions, key)) { continue; } const value = rawProps[key]; if (options) { if (hasOwn(attrs, key)) { if (value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } else { const camelizedKey = camelize(key); props[camelizedKey] = resolvePropValue( options, rawCurrentProps, camelizedKey, value, instance, false ); } } else { if (value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } } } } else { if (setFullProps(instance, rawProps, props, attrs)) { hasAttrsChanged = true; } let kebabKey; for (const key in rawCurrentProps) { if (!rawProps || // for camelCase !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case // and converted to camelCase (#955) ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { if (options) { if (rawPrevProps && // for camelCase (rawPrevProps[key] !== void 0 || // for kebab-case rawPrevProps[kebabKey] !== void 0)) { props[key] = resolvePropValue( options, rawCurrentProps, key, void 0, instance, true ); } } else { delete props[key]; } } } if (attrs !== rawCurrentProps) { for (const key in attrs) { if (!rawProps || !hasOwn(rawProps, key) && true) { delete attrs[key]; hasAttrsChanged = true; } } } } if (hasAttrsChanged) { trigger(instance.attrs, "set", ""); } } function setFullProps(instance, rawProps, props, attrs) { const [options, needCastKeys] = instance.propsOptions; let hasAttrsChanged = false; let rawCastValues; if (rawProps) { for (let key in rawProps) { if (isReservedProp(key)) { continue; } const value = rawProps[key]; let camelKey; if (options && hasOwn(options, camelKey = camelize(key))) { if (!needCastKeys || !needCastKeys.includes(camelKey)) { props[camelKey] = value; } else { (rawCastValues || (rawCastValues = {}))[camelKey] = value; } } else if (!isEmitListener(instance.emitsOptions, key)) { if (!(key in attrs) || value !== attrs[key]) { attrs[key] = value; hasAttrsChanged = true; } } } } if (needCastKeys) { const rawCurrentProps = toRaw(props); const castValues = rawCastValues || EMPTY_OBJ; for (let i = 0; i < needCastKeys.length; i++) { const key = needCastKeys[i]; props[key] = resolvePropValue( options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key) ); } } return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { const opt = options[key]; if (opt != null) { const hasDefault = hasOwn(opt, "default"); if (hasDefault && value === void 0) { const defaultValue = opt.default; if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { const { propsDefaults } = instance; if (key in propsDefaults) { value = propsDefaults[key]; } else { const reset = setCurrentInstance(instance); value = propsDefaults[key] = defaultValue.call( null, props ); reset(); } } else { value = defaultValue; } if (instance.ce) { instance.ce._setProp(key, value); } } if (opt[ 0 /* shouldCast */ ]) { if (isAbsent && !hasDefault) { value = false; } else if (opt[ 1 /* shouldCastTrue */ ] && (value === "" || value === hyphenate(key))) { value = true; } } } return value; } const mixinPropsCache = /* @__PURE__ */ new WeakMap(); function normalizePropsOptions(comp, appContext, asMixin = false) { const cache = asMixin ? mixinPropsCache : appContext.propsCache; const cached = cache.get(comp); if (cached) { return cached; } const raw = comp.props; const normalized = {}; const needCastKeys = []; let hasExtends = false; if (!isFunction(comp)) { const extendProps = (raw2) => { hasExtends = true; const [props, keys] = normalizePropsOptions(raw2, appContext, true); extend(normalized, props); if (keys) needCastKeys.push(...keys); }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendProps); } if (comp.extends) { extendProps(comp.extends); } if (comp.mixins) { comp.mixins.forEach(extendProps); } } if (!raw && !hasExtends) { if (isObject(comp)) { cache.set(comp, EMPTY_ARR); } return EMPTY_ARR; } if (isArray(raw)) { for (let i = 0; i < raw.length; i++) { const normalizedKey = camelize(raw[i]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } } } else if (raw) { for (const key in raw) { const normalizedKey = camelize(key); if (validatePropName(normalizedKey)) { const opt = raw[key]; const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); const propType = prop.type; let shouldCast = false; let shouldCastTrue = true; if (isArray(propType)) { for (let index = 0; index < propType.length; ++index) { const type = propType[index]; const typeName = isFunction(type) && type.name; if (typeName === "Boolean") { shouldCast = true; break; } else if (typeName === "String") { shouldCastTrue = false; } } } else { shouldCast = isFunction(propType) && propType.name === "Boolean"; } prop[ 0 /* shouldCast */ ] = shouldCast; prop[ 1 /* shouldCastTrue */ ] = shouldCastTrue; if (shouldCast || hasOwn(prop, "default")) { needCastKeys.push(normalizedKey); } } } } const res = [normalized, needCastKeys]; if (isObject(comp)) { cache.set(comp, res); } return res; } function validatePropName(key) { if (key[0] !== "$" && !isReservedProp(key)) { return true; } return false; } const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable"; const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { if (rawSlot._n) { return rawSlot; } const normalized = withCtx((...args) => { if (false) ; return normalizeSlotValue(rawSlot(...args)); }, ctx); normalized._c = false; return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { const ctx = rawSlots._ctx; for (const key in rawSlots) { if (isInternalKey(key)) continue; const value = rawSlots[key]; if (isFunction(value)) { slots[key] = normalizeSlot(key, value, ctx); } else if (value != null) { const normalized = normalizeSlotValue(value); slots[key] = () => normalized; } } }; const normalizeVNodeSlots = (instance, children) => { const normalized = normalizeSlotValue(children); instance.slots.default = () => normalized; }; const assignSlots = (slots, children, optimized) => { for (const key in children) { if (optimized || !isInternalKey(key)) { slots[key] = children[key]; } } }; const initSlots = (instance, children, optimized) => { const slots = instance.slots = createInternalObject(); if (instance.vnode.shapeFlag & 32) { const cacheIndexes = children.__; if (cacheIndexes) def(slots, "__", cacheIndexes, true); const type = children._; if (type) { assignSlots(slots, children, optimized); if (optimized) { def(slots, "_", type, true); } } else { normalizeObjectSlots(children, slots); } } else if (children) { normalizeVNodeSlots(instance, children); } }; const updateSlots = (instance, children, optimized) => { const { vnode, slots } = instance; let needDeletionCheck = true; let deletionComparisonTarget = EMPTY_OBJ; if (vnode.shapeFlag & 32) { const type = children._; if (type) { if (optimized && type === 1) { needDeletionCheck = false; } else { assignSlots(slots, children, optimized); } } else { needDeletionCheck = !children.$stable; normalizeObjectSlots(children, slots); } deletionComparisonTarget = children; } else if (children) { normalizeVNodeSlots(instance, children); deletionComparisonTarget = { default: 1 }; } if (needDeletionCheck) { for (const key in slots) { if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { delete slots[key]; } } } }; const queuePostRenderEffect = queueEffectWithSuspense; function createRenderer(options) { return baseCreateRenderer(options); } function baseCreateRenderer(options, createHydrationFns) { const target = getGlobalThis(); target.__VUE__ = true; const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, insertStaticContent: hostInsertStaticContent } = options; const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { if (n1 === n2) { return; } if (n1 && !isSameVNodeType(n1, n2)) { anchor = getNextHostNode(n1); unmount(n1, parentComponent, parentSuspense, true); n1 = null; } if (n2.patchFlag === -2) { optimized = false; n2.dynamicChildren = null; } const { type, ref: ref3, shapeFlag } = n2; switch (type) { case Text: processText(n1, n2, container, anchor); break; case Comment: processCommentNode(n1, n2, container, anchor); break; case Static: if (n1 == null) { mountStaticNode(n2, container, anchor, namespace); } break; case Fragment: processFragment( n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); break; default: if (shapeFlag & 1) { processElement( n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); } else if (shapeFlag & 6) { processComponent( n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); } else if (shapeFlag & 64) { type.process( n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals ); } else if (shapeFlag & 128) { type.process( n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals ); } else ; } if (ref3 != null && parentComponent) { setRef(ref3, n1 && n1.ref, parentSuspense, n2 || n1, !n2); } else if (ref3 == null && n1 && n1.ref != null) { setRef(n1.ref, null, parentSuspense, n1, true); } }; const processText = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert( n2.el = hostCreateText(n2.children), container, anchor ); } else { const el = n2.el = n1.el; if (n2.children !== n1.children) { hostSetText(el, n2.children); } } }; const processCommentNode = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert( n2.el = hostCreateComment(n2.children || ""), container, anchor ); } else { n2.el = n1.el; } }; const mountStaticNode = (n2, container, anchor, namespace) => { [n2.el, n2.anchor] = hostInsertStaticContent( n2.children, container, anchor, namespace, n2.el, n2.anchor ); }; const moveStaticNode = ({ el, anchor }, container, nextSibling) => { let next; while (el && el !== anchor) { next = hostNextSibling(el); hostInsert(el, container, nextSibling); el = next; } hostInsert(anchor, container, nextSibling); }; const removeStaticNode = ({ el, anchor }) => { let next; while (el && el !== anchor) { next = hostNextSibling(el); hostRemove(el); el = next; } hostRemove(anchor); }; const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { if (n2.type === "svg") { namespace = "svg"; } else if (n2.type === "math") { namespace = "mathml"; } if (n1 == null) { mountElement( n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); } else { patchElement( n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); } }; const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { let el; let vnodeHook; const { props, shapeFlag, transition, dirs } = vnode; el = vnode.el = hostCreateElement( vnode.type, namespace, props && props.is, props ); if (shapeFlag & 8) { hostSetElementText(el, vnode.children); } else if (shapeFlag & 16) { mountChildren( vnode.children, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(vnode, namespace), slotScopeIds, optimized ); } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "created"); } setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); if (props) { for (const key in props) { if (key !== "value" && !isReservedProp(key)) { hostPatchProp(el, key, null, props[key], namespace, parentComponent); } } if ("value" in props) { hostPatchProp(el, "value", null, props.value, namespace); } if (vnodeHook = props.onVnodeBeforeMount) { invokeVNodeHook(vnodeHook, parentComponent, vnode); } } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); } const needCallTransitionHooks = needTransition(parentSuspense, transition); if (needCallTransitionHooks) { transition.beforeEnter(el); } hostInsert(el, container, anchor); if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); needCallTransitionHooks && transition.enter(el); dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); }, parentSuspense); } }; const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { if (scopeId) { hostSetScopeId(el, scopeId); } if (slotScopeIds) { for (let i = 0; i < slotScopeIds.length; i++) { hostSetScopeId(el, slotScopeIds[i]); } } if (parentComponent) { let subTree = parentComponent.subTree; if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { const parentVNode = parentComponent.vnode; setScopeId( el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent ); } } }; const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { for (let i = start; i < children.length; i++) { const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); patch( null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); } }; const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { const el = n2.el = n1.el; let { patchFlag, dynamicChildren, dirs } = n2; patchFlag |= n1.patchFlag & 16; const oldProps = n1.props || EMPTY_OBJ; const newProps = n2.props || EMPTY_OBJ; let vnodeHook; parentComponent && toggleRecurse(parentComponent, false); if (vnodeHook = newProps.onVnodeBeforeUpdate) { invokeVNodeHook(vnodeHook, parentComponent, n2, n1); } if (dirs) { invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); } parentComponent && toggleRecurse(parentComponent, true); if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { hostSetElementText(el, ""); } if (dynamicChildren) { patchBlockChildren( n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds ); } else if (!optimized) { patchChildren( n1, n2, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds, false ); } if (patchFlag > 0) { if (patchFlag & 16) { patchProps(el, oldProps, newProps, parentComponent, namespace); } else { if (patchFlag & 2) { if (oldProps.class !== newProps.class) { hostPatchProp(el, "class", null, newProps.class, namespace); } } if (patchFlag & 4) { hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); } if (patchFlag & 8) { const propsToUpdate = n2.dynamicProps; for (let i = 0; i < propsToUpdate.length; i++) { const key = propsToUpdate[i]; const prev = oldProps[key]; const next = newProps[key]; if (next !== prev || key === "value") { hostPatchProp(el, key, prev, next, namespace, parentComponent); } } } } if (patchFlag & 1) { if (n1.children !== n2.children) { hostSetElementText(el, n2.children); } } } else if (!optimized && dynamicChildren == null) { patchProps(el, oldProps, newProps, parentComponent, namespace); } if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); }, parentSuspense); } }; const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { for (let i = 0; i < newChildren.length; i++) { const oldVNode = oldChildren[i]; const newVNode = newChildren[i]; const container = ( // oldVNode may be an errored async setup() component inside Suspense // which will not have a mounted element oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent // of the Fragment itself so it can move its children. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement // which also requires the correct parent container !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : ( // In other cases, the parent container is not actually used so we // just pass the block element here to avoid a DOM parentNode call. fallbackContainer ) ); patch( oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true ); } }; const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { if (oldProps !== newProps) { if (oldProps !== EMPTY_OBJ) { for (const key in oldProps) { if (!isReservedProp(key) && !(key in newProps)) { hostPatchProp( el, key, oldProps[key], null, namespace, parentComponent ); } } } for (const key in newProps) { if (isReservedProp(key)) continue; const next = newProps[key]; const prev = oldProps[key]; if (next !== prev && key !== "value") { hostPatchProp(el, key, prev, next, namespace, parentComponent); } } if ("value" in newProps) { hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); } } }; const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; if (fragmentSlotScopeIds) { slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; } if (n1 == null) { hostInsert(fragmentStartAnchor, container, anchor); hostInsert(fragmentEndAnchor, container, anchor); mountChildren( // #10007 // such fragment like `<>` will be compiled into // a fragment which doesn't have a children. // In this case fallback to an empty array n2.children || [], container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized ); } else { if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result // of renderSlot() with no valid children n1.dynamicChildren) { patchBlockChildren( n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, namespace, slotScopeIds ); if ( // #2080 if the stable fragment has a key, it's a