// ==UserScript== // @name Bilibili-Gate // @namespace https://magicdawn.fun // @version 0.34.10 // @author magicdawn // @description Bilibili 自定义首页 // @license MIT // @icon https://www.bilibili.com/favicon.ico // @homepageURL https://greasyfork.org/zh-CN/scripts/443530-bilibili-gate // @supportURL https://github.com/magicdawn/Bilibili-Gate/issues // @match https://www.bilibili.com/ // @match https://www.bilibili.com/?* // @match https://www.bilibili.com/index.html // @match https://www.bilibili.com/index.html?* // @match https://www.bilibili.com/video/* // @match https://www.bilibili.com/list/watchlater?* // @match https://www.bilibili.com/bangumi/play/* // @match https://space.bilibili.com/* // @match https://search.bilibili.com/* // @require https://registry.npmmirror.com/axios/0.30.2/files/dist/axios.min.js // @require https://registry.npmmirror.com/ua-parser-js/1.0.41/files/dist/ua-parser.min.js // @require https://registry.npmmirror.com/localforage/1.10.0/files/dist/localforage.min.js // @require https://registry.npmmirror.com/pinyin-match/1.2.10/files/dist/main.js // @require https://registry.npmmirror.com/spark-md5/3.0.2/files/spark-md5.min.js // @tag bilibili // @connect app.bilibili.com // @grant GM.deleteValue // @grant GM.getValue // @grant GM.listValues // @grant GM.openInTab // @grant GM.registerMenuCommand // @grant GM.setClipboard // @grant GM.setValue // @grant GM.xmlHttpRequest // @grant GM_addStyle // @grant GM_addValueChangeListener // @grant GM_download // @grant GM_info // @grant unsafeWindow // @run-at document-body // @downloadURL none // ==/UserScript== (async function (gX, Q3, sparkMd5, q4, vX) { 'use strict'; const d=new Set;const pX = async e=>{d.has(e)||(d.add(e),(t=>{typeof GM_addStyle=="function"?GM_addStyle(t):(document.head||document.documentElement).appendChild(document.createElement("style")).append(t);})(e));}; pX(' ._cls--gate-video-grid--divider_h4766_1 .ant-divider-inner-text{display:inline-flex;align-items:center;min-height:30px}._cls--gate-video-grid--divider_h4766_1 .ant-divider-inner-text a{color:var(--ant-color-link)}._cls--gate-video-grid--divider_h4766_1 .ant-divider-inner-text a:hover{color:var(--ant-color-primary)}._cls--gate-video-card--context-menu--root_h4766_13 .ant-dropdown-menu{--ant-dropdown-padding-block: 3px}._cls--gate-video-card--context-menu--root_h4766_13 .ant-dropdown-menu:has(:nth-child(12)){--ant-dropdown-padding-block: 2px}._video-grid_ucv12_1{display:grid;position:relative;width:100%;grid-gap:20px 12px;--bilibili-gate--video-card--border-radius: 15px}._grid-template-columns-using-var-col_ucv12_9{--col: 4;grid-template-columns:repeat(var(--col),minmax(0,1fr))}._grid-template-columns-using-card-min-width_ucv12_14{--card-min-width: 330px;grid-template-columns:repeat(auto-fill,minmax(var(--card-min-width),1fr))}._video-grid-addon-center-empty_ucv12_19:before{content:"";grid-column:3/-3;grid-row:1/span 9999;grid-auto-flow:dense}._video-grid-bili-feed4_ucv12_26{grid-gap:20px 20px}@media(max-width:1399px){._video-grid-bili-feed4_ucv12_26{--col: 4}}@media(min-width:1400px){._video-grid-bili-feed4_ucv12_26{--col: 5}}._video-grid-bili-feed4_ucv12_26 .ant-divider-horizontal.ant-divider-with-text{margin-bottom:-15px;margin-top:-15px}._video-grid-bili-feed4_ucv12_26 .ant-divider-horizontal.ant-divider-with-text:first-of-type{margin-top:0}._video-grid-custom_ucv12_47{--row-gap: clamp(20px, 1.4vw, 40px);column-gap:clamp(15px,1.1cqw,20px);row-gap:0}._video-grid-custom_ucv12_47 .bili-video-card{margin-bottom:var(--row-gap)}._video-grid-custom_ucv12_47 .ant-divider-horizontal.ant-divider-with-text{margin-top:calc(10px - var(--row-gap));margin-bottom:5px}._video-grid-custom_ucv12_47 .ant-divider-horizontal.ant-divider-with-text:first-of-type{margin-top:0}._narrow-mode_ucv12_63{--col: 2 !important}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.icon-only-round-button{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;padding:0}.inline-icon-only-round-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:0}.flex-center{display:flex;align-items:center;justify-content:center}.flex-v-center{display:flex;align-items:center}.inline-flex-center{display:inline-flex;align-items:center;justify-content:center}.\\[refresh\\:scroll\\]{refresh:scroll}.pointer-events-auto{pointer-events:auto}.\\[\\&_svg\\]\\:pointer-events-none svg,.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.fixed{position:fixed}.position-relative,.relative{position:relative}.sticky{position:sticky}.static{position:static}.inset-0{inset:0}.inset-x-0{left:0;right:0}.bottom--6px{bottom:-6px}.bottom-0{bottom:0}.left--2px{left:-2px}.left--30px{left:-30px}.left-0{left:0}.left-2,.left-8px{left:8px}.left-50\\%{left:50%}.right--30px{right:-30px}.right-\\[calc\\(8px\\+28px\\+5px\\)\\]{right:41px}.right-0{right:0}.right-10px{right:10px}.right-8px{right:8px}.top--1px,.top-\\[-1px\\]{top:-1px}.top-\\[-0\\.5px\\]{top:-.5px}.top-0{top:0}.top-0\\.5px{top:.5px}.top-10px{top:10px}.top-4px{top:4px}.top-50\\%{top:50%}.top-8px{top:8px}.hover\\:left-0:hover{left:0}.hover\\:right-0:hover{right:0}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4}.isolate{isolation:isolate}.z-10000{z-index:10000}.z-10004{z-index:10004}.z-10005{z-index:10005}.z-1001{z-index:1001}.z-11000{z-index:11000}.z-11200{z-index:11200}.z-11300{z-index:11300}.z-2{z-index:2}.z-3{z-index:3}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-90000{z-index:90000}.z-9999{z-index:9999}.grid{display:grid}.col-span-full,.grid-col-span-full{grid-column:1/-1}.grid-cols-\\[250px_1fr\\]{grid-template-columns:250px 1fr}.grid-cols-\\[repeat\\(2\\,max-content\\)_1fr\\]{grid-template-columns:repeat(2,max-content) 1fr}.grid-cols-\\[repeat\\(2\\,max-content\\)\\]{grid-template-columns:repeat(2,max-content)}.grid-cols-\\[repeat\\(auto-fill\\,minmax\\(225px\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fill,minmax(225px,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.m10{margin:40px}.m12{margin:48px}.m13{margin:52px}.m14{margin:56px}.m15{margin:60px}.m16{margin:64px}.m16\\.52{margin:66.08px}.m160{margin:640px}.m19{margin:76px}.m19\\.833{margin:79.332px}.m239\\.82{margin:959.28px}.m24{margin:96px}.m27\\.952{margin:111.808px}.m29\\.756{margin:119.024px}.m3{margin:12px}.m33{margin:132px}.m434\\.8{margin:1739.2px}.m5{margin:20px}.m9{margin:36px}.\\[\\&_\\[role\\=\\"separator\\"\\]\\]\\:mx-0 [role=separator],.mx-0{margin-left:0;margin-right:0}.\\[\\&_\\[role\\=\\"separator\\"\\]\\]\\:my-2px [role=separator],.my-2px{margin-top:2px;margin-bottom:2px}.\\[\\&\\.ant-divider-horizontal\\.ant-divider-with-text\\]\\:my-5px.ant-divider-horizontal.ant-divider-with-text,.my-5px{margin-top:5px;margin-bottom:5px}.\\[\\&\\.ant-empty-normal\\]\\:my-1.ant-empty-normal,.my-1{margin-top:4px;margin-bottom:4px}.mx-1,.mx-4px{margin-left:4px;margin-right:4px}.mx-2px{margin-left:2px;margin-right:2px}.mx-5px{margin-left:5px;margin-right:5px}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-7px{margin-top:7px;margin-bottom:7px}.my-auto{margin-top:auto;margin-bottom:auto}.\\[\\&_svg\\]\\:mr-5px svg,.mr-5px{margin-right:5px}.\\[\\&_svg\\]\\:mt--1px svg,.mt--1px{margin-top:-1px}.mb-0{margin-bottom:0}.mb-10px{margin-bottom:10px}.mb-20px{margin-bottom:20px}.mb-2px{margin-bottom:2px}.mb-40px{margin-bottom:40px}.mb-5px{margin-bottom:5px}.ml-0{margin-left:0}.ml-1,.ml-4px{margin-left:4px}.ml-1\\.5,.ml-6px{margin-left:6px}.ml-10px{margin-left:10px}.ml-12px,.ml-3{margin-left:12px}.ml-15px{margin-left:15px}.ml-1px{margin-left:1px}.ml-20px,.ml-xl{margin-left:20px}.ml-25px{margin-left:25px}.ml-2px{margin-left:2px}.ml-30px{margin-left:30px}.ml-5px{margin-left:5px}.ml-8px{margin-left:8px}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\\!{margin-right:0!important}.mr-1,.mr-4px{margin-right:4px}.mr-10px{margin-right:10px}.mr-24px{margin-right:24px}.mr-2px{margin-right:2px}.mr-auto{margin-right:auto}.ms{margin-inline-start:16px}.mt--2px{margin-top:-2px}.mt-0{margin-top:0}.mt-0\\.5em{margin-top:.5em}.mt-1,.mt-4px{margin-top:4px}.mt-10px{margin-top:10px}.mt-15px{margin-top:15px}.mt-2,.mt-8px{margin-top:8px}.mt-20px{margin-top:20px}.mt-2px{margin-top:2px}.mt-3px{margin-top:3px}.mt-6px{margin-top:6px}.first\\:ml-0:first-child{margin-left:0}.first\\:mt-0:first-child,.first\\:mt-0px:first-child{margin-top:0}.box-content{box-sizing:content-box}.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.contents{display:contents}.\\[\\&\\>\\.ant-checkbox-label\\]\\:hidden>.ant-checkbox-label,.hidden{display:none}.aspect-1{aspect-ratio:1}.aspect-16\\/9{aspect-ratio:16/9}.aspect-ratio-10\\/16{aspect-ratio:10/16}.\\[\\&_svg\\]\\:size-16px svg,.size-16px{width:16px;height:16px}.ant-spin .ant-spin-dot.\\[\\.ant-spin_\\.ant-spin-dot\\&\\]\\:size-25px,.size-25px{width:25px;height:25px}.size-1\\.3em{width:1.3em;height:1.3em}.size-12px{width:12px;height:12px}.size-13px{width:13px;height:13px}.size-14px{width:14px;height:14px}.size-15px{width:15px;height:15px}.size-17px{width:17px;height:17px}.size-18px{width:18px;height:18px}.size-1em{width:1em;height:1em}.size-2\\.5{width:10px;height:10px}.size-20px{width:20px;height:20px}.size-24px{width:24px;height:24px}.size-26px{width:26px;height:26px}.size-28px{width:28px;height:28px}.size-30px{width:30px;height:30px}.size-32px{width:32px;height:32px}.size-40px{width:40px;height:40px}.size-full{width:100%;height:100%}.h-\\[calc\\(100vh-30px\\)\\]{height:calc(100vh - 30px)}.h-0{height:0}.h-100\\%,.h-full{height:100%}.h-100vh{height:100vh}.h-14px{height:14px}.h-16px{height:16px}.h-19px{height:19px}.h-22px{height:22px}.h-24px{height:24px}.h-2px{height:2px}.h-34px{height:34px}.h-35px{height:35px}.h-3px{height:3px}.h-auto{height:auto}.h-fit{height:fit-content}.max-h-\\[calc\\(90vh-50px\\)\\]{max-height:calc(90vh - 50px)}.max-h-\\[max\\(362px\\,calc\\(90vh-50px-56px-15px\\)\\)\\]{max-height:max(362px,calc(90vh - 121px))}.max-h-130px{max-height:130px}.max-h-250px{max-height:250px}.max-h-50vh{max-height:50vh}.max-h-full{max-height:100%}.max-h-unset{max-height:unset}.max-w-\\[calc\\(100\\%-6px\\)\\]{max-width:calc(100% - 6px)}.max-w-130px{max-width:130px}.max-w-250px{max-width:250px}.max-w-288px{max-width:288px}.max-w-300px{max-width:300px}.max-w-350px{max-width:350px}.max-w-450px{max-width:450px}.min-h-100px{min-height:100px}.min-h-100vh{min-height:100vh}.min-h-25px{min-height:25px}.min-h-362px{min-height:362px}.min-h-40px{min-height:40px}.min-w-130px{min-width:130px}.min-w-180px{min-width:180px}.min-w-200px{min-width:200px}.min-w-24px{min-width:24px}.min-w-300px{min-width:300px}.min-w-32px{min-width:32px}.min-w-60px{min-width:60px}.min-w-95px{min-width:95px}.w-\\[calc\\(100vw-30px\\)\\]{width:calc(100vw - 30px)}.w-\\[max-content\\],.w-max{width:max-content}.w-0{width:0}.w-100\\%,.w-full{width:100%}.w-114px{width:114px}.w-130px{width:130px}.w-150px{width:150px}.w-160px{width:160px}.w-16px{width:16px}.w-200px{width:200px}.w-34px{width:34px}.w-500px{width:500px}.w-50px{width:50px}.w-55px{width:55px}.w-720px{width:720px}.w-740px{width:740px}.w-75px{width:75px}.flex{display:flex}.\\[\\&_\\.ant-checkbox-label\\]\\:inline-flex .ant-checkbox-label,.\\[\\&_\\.ant-radio-label\\]\\:inline-flex .ant-radio-label,.\\[\\&_\\.ant-radio-wrapper\\]\\:inline-flex .ant-radio-wrapper,.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.flex-shrink-1{flex-shrink:1}.flex-grow-1{flex-grow:1}.flex-basis-100\\%{flex-basis:100%}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.translate-x--50\\%{--un-translate-x:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--50\\%{--un-translate-y:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-100\\%{--un-translate-y:100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-0{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:0deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.hover\\:rotate-90:hover{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:90deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-z-0{--un-rotate:0;--un-rotate-z:0deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-z-180deg{--un-rotate:0;--un-rotate-z:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.hover\\:scale-105\\%:hover{--un-scale-x:1.05;--un-scale-y:1.05;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-\\[edit\\]{cursor:edit}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.\\[\\&\\:disabled\\]\\:cursor-wait:disabled{cursor:wait}.cursor-text{cursor:text}.cursor-move{cursor:move}.cursor-grab{cursor:grab}.\\[\\&_\\.ant-checkbox-label\\]\\:select-none .ant-checkbox-label,.\\[\\&_svg\\]\\:select-none svg,.select-none{-webkit-user-select:none;user-select:none}.resize{resize:both}.list-circle{list-style-type:circle}.list-disc{list-style-type:disc}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.\\[\\&_\\.ant-checkbox-label\\]\\:items-center .ant-checkbox-label,.\\[\\&_\\.ant-radio-label\\]\\:items-center .ant-radio-label,.\\[\\&_\\.ant-radio-wrapper\\]\\:items-center .ant-radio-wrapper,.items-center{align-items:center}.self-start{align-self:flex-start}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-left{justify-content:left}.justify-right{justify-content:right}.gap-0{gap:0}.gap-10px{gap:10px}.gap-15px{gap:15px}.gap-1px{gap:1px}.gap-4px{gap:4px}.gap-x-1,.gap-x-4px{column-gap:4px}.gap-x-10px{column-gap:10px}.gap-x-12px{column-gap:12px}.gap-x-15px{column-gap:15px}.gap-x-2,.gap-x-8px{column-gap:8px}.gap-x-20px{column-gap:20px}.gap-x-25px{column-gap:25px}.gap-x-2px{column-gap:2px}.gap-x-40px{column-gap:40px}.gap-x-50px{column-gap:50px}.gap-x-5px{column-gap:5px}.gap-x-6px{column-gap:6px}.gap-y-0{row-gap:0}.gap-y-0\\.5em{row-gap:.5em}.gap-y-1,.gap-y-4px{row-gap:4px}.gap-y-10px{row-gap:10px}.gap-y-15px{row-gap:15px}.gap-y-2,.gap-y-8px{row-gap:8px}.gap-y-2px{row-gap:2px}.gap-y-3px{row-gap:3px}.gap-y-5px{row-gap:5px}.gap-y-6px{row-gap:6px}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-all{word-break:break-all}.b-1px,.border{border-width:1px}.b-2px{border-width:2px}.b-5px{border-width:5px}.b-b-1px{border-bottom-width:1px}.b-t-1px{border-top-width:1px}.border-b-0{border-bottom-width:0px}.b-\\#444{--un-border-opacity:1;border-color:rgb(68 68 68 / var(--un-border-opacity))}.b-gate-bg-lv-2{border-color:var(--bilibili-gate--bg--lv2)}.b-gate-border,.bilibili-gate-using-dark .dark\\:b-gate-border{border-color:var(--bilibili-gate--border-color)}.b-gate-primary{border-color:var(--bilibili-gate--primary-color)}.b-transparent{border-color:transparent}.b-white\\/20\\%{border-color:#fff3}.b-white\\/33\\%{border-color:#ffffff54}.bilibili-gate-using-light .light\\:hover\\:b-gate-primary:hover,.hover\\:b-gate-primary:hover{border-color:var(--bilibili-gate--primary-color)}.b-b-gate-bg-lv1{border-bottom-color:var(--bilibili-gate--bg--lv1)}.b-b-transparent{border-bottom-color:transparent}.b-t-\\$bilibili-gate--separator-color{border-top-color:var(--bilibili-gate--separator-color)}.rounded,.rounded-4px{border-radius:4px}.rounded-10px{border-radius:10px}.rounded-15px{border-radius:15px}.rounded-18px{border-radius:18px}.rounded-20px{border-radius:20px}.rounded-2px{border-radius:2px}.rounded-5px{border-radius:5px}.rounded-6px,.rounded-md{border-radius:6px}.rounded-8px,.rounded-lg{border-radius:8px}.rounded-9px{border-radius:9px}.rounded-full{border-radius:9999px}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-t-6px{border-top-left-radius:6px;border-top-right-radius:6px}.rounded-t-gate-video-card{border-top-left-radius:var(--bilibili-gate--video-card--border-radius);border-top-right-radius:var(--bilibili-gate--video-card--border-radius)}.b-solid{border-style:solid}.border-none{border-style:none}.b-b-solid{border-bottom-style:solid}.b-t-solid{border-top-style:solid}.\\[\\&\\:has\\(svg\\.peeking\\)\\]\\:bg-transparent:has(svg.peeking),.bg-transparent{background-color:transparent}.bg-\\[rgb\\(33_33_33_\\/_0\\.7\\)\\]{--un-bg-opacity:.7;background-color:rgb(33 33 33 / var(--un-bg-opacity))}.bg-\\$brand_blue{background-color:var(--brand_blue)}.bg-\\$brand_pink{background-color:var(--brand_pink)}.bg-black\\/10{background-color:#0000001a}.bg-black\\/50{background-color:#00000080}.bg-black\\/90\\%{background-color:#000000e6}.bg-gate-bg{background-color:var(--bilibili-gate--bg)}.bg-gate-bg-lv1{background-color:var(--bilibili-gate--bg--lv1)}.bg-gate-primary{background-color:var(--bilibili-gate--primary-color)}.bg-gate-primary-lv-3{background-color:var(--bilibili-gate--primary-color--lv3)}.bg-gate-primary\\!{background-color:var(--bilibili-gate--primary-color)!important}.bg-white\\/14\\%{background-color:#ffffff24}.bg-white\\/50\\%{background-color:#ffffff80}.hover\\:bg-gate-bg-lv-3:hover{background-color:var(--bilibili-gate--bg--lv3)}.hover\\:bg-gate-bg-lv1:hover{background-color:var(--bilibili-gate--bg--lv1)}.hover\\:bg-gate-primary-lv1\\!:hover{background-color:var(--bilibili-gate--primary-color--lv1)!important}.hover\\:bg-gate-primary:hover{background-color:var(--bilibili-gate--primary-color)}.hover\\:bg-white\\/40\\%:hover{background-color:#fff6}.\\[\\&_g\\]\\:fill-inherit g{fill:inherit}.\\[\\&_path\\]\\:fill-gate-primary path,.fill-gate-primary{fill:var(--bilibili-gate--primary-color)}.fill-none{fill:none}.\\[\\&_\\.circle\\]\\:stroke-current .circle{stroke:currentColor}.object-cover{object-fit:cover}.object-contain{object-fit:contain}.p-10px{padding:10px}.p-15px{padding:15px}.p-1px{padding:1px}.p-2,.p-8px{padding:8px}.p-20px{padding:20px}.p-2px{padding:2px}.p-4px{padding:4px}.\\[\\&_\\.ant-radio-button-wrapper\\]\\:px-10px .ant-radio-button-wrapper{padding-left:10px;padding-right:10px}.\\[\\&\\.ant-empty-normal\\]\\:py-5px.ant-empty-normal,.py-5px{padding-top:5px;padding-bottom:5px}.p-x-2,.px-8px{padding-left:8px;padding-right:8px}.p-y-1,.py-4px{padding-top:4px;padding-bottom:4px}.px{padding-left:16px;padding-right:16px}.px-0{padding-left:0;padding-right:0}.px-15px{padding-left:15px;padding-right:15px}.px-24px{padding-left:24px;padding-right:24px}.px-2px{padding-left:2px;padding-right:2px}.px-3{padding-left:12px;padding-right:12px}.px-4px{padding-left:4px;padding-right:4px}.px-5px{padding-left:5px;padding-right:5px}.px-6px{padding-left:6px;padding-right:6px}.py-0{padding-top:0;padding-bottom:0}.py-10px{padding-top:10px;padding-bottom:10px}.py-12px{padding-top:12px;padding-bottom:12px}.py-2px{padding-top:2px;padding-bottom:2px}.py-30px{padding-top:30px;padding-bottom:30px}.py-3px{padding-top:3px;padding-bottom:3px}.py-8px{padding-top:8px;padding-bottom:8px}.\\!\\[\\&_\\.ant-radio-label\\]\\:pl-4px .ant-radio-label{padding-left:4px!important}.pb-15px{padding-bottom:15px}.pb-2px{padding-bottom:2px}.pb1257{padding-bottom:5028px}.pl-10px{padding-left:10px}.pl-16px{padding-left:16px}.pl-20px{padding-left:20px}.pl-2px{padding-left:2px}.pl-4px{padding-left:4px}.pl-6px{padding-left:6px}.pr-0{padding-right:0}.pr-10px{padding-right:10px}.pr-12px{padding-right:12px}.pr-15px{padding-right:15px}.pr-6px{padding-right:6px}.ps{padding-inline-start:16px}.pt-0{padding-top:0}.pt-15px{padding-top:15px}.pt-5px{padding-top:5px}.text-center{text-align:center}.align-top{vertical-align:top}.\\[\\&\\.ant-divider-horizontal\\.ant-divider-with-text\\]\\:text-14px.ant-divider-horizontal.ant-divider-with-text,.text-14px,.text-size-14px{font-size:14px}.text-\\[1\\.5rem\\]{font-size:24px}.text-1\\.25em{font-size:1.25em}.text-1\\.2em{font-size:1.2em}.text-1\\.5em,.text-size-1\\.5em{font-size:1.5em}.text-12px,.text-size-12px{font-size:12px}.text-13px,.text-size-13px{font-size:13px}.text-15px{font-size:15px}.text-16px,.text-size-16px{font-size:16px}.font-size-20px,.text-20px,.text-size-20px{font-size:20px}.text-2em{font-size:2em}.text-size-0{font-size:0}.text-size-1\\.3em{font-size:1.3em}.text-size-120\\%{font-size:120%}.color-gate-primary,.text-gate-primary{color:var(--bilibili-gate--primary-color)}.text-gate-text{color:var(--bilibili-gate--text-color)}.text-red{--un-text-opacity:1;color:rgb(248 113 113 / var(--un-text-opacity))}.color-white,.text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.text-yellow-400{--un-text-opacity:1;color:rgb(250 204 21 / var(--un-text-opacity))}.hover\\:color-gate-primary:hover{color:var(--bilibili-gate--primary-color)}.color-inherit{color:inherit}.font-700{font-weight:700}.\\[\\&_\\.ant-btn-icon\\]\\:line-height-0 .ant-btn-icon,.line-height-\\[0\\]{line-height:0}.line-height-\\[1\\.2\\]{line-height:1.2}.line-height-\\[1\\]{line-height:1}.line-height-\\[unset\\],.line-height-unset{line-height:unset}.line-height-1\\.5{line-height:6px}.line-height-14px{line-height:14px}.line-height-17px{line-height:17px}.line-height-18px{line-height:18px}.line-height-snug{line-height:1.375}.line-height-tight{line-height:1.25}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.italic{font-style:italic}.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.\\[\\&\\:has\\(svg\\.peeking\\)\\]\\:opacity-10:has(svg.peeking){opacity:.1}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.\\[\\&\\.ant-btn\\:not\\(\\:disabled\\)\\:focus-visible\\]\\:outline-0.ant-btn:not(:disabled):focus-visible{outline-width:0px}.outline-none\\!{outline:2px solid transparent!important;outline-offset:2px!important}.ring-1px{--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.ring-gate-border{--un-ring-color:var(--bilibili-gate--border-color) }.ring-gate-primary{--un-ring-color:var(--bilibili-gate--primary-color) }.backdrop-blur-10px{--un-backdrop-blur:blur(10px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-200{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.transition-300{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-duration-150{transition-duration:.15s}.transition-duration-300{transition-duration:.3s}.ease,.ease-in-out,.transition-ease,.transition-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.transition-property-\\[border-color\\]{transition-property:border-color}.transition-property-all{transition-property:all}.transition-property-right\\,left{transition-property:right,left}.transition-property-transform{transition-property:transform}.\\@container,.\\@container-inline-size{container-type:inline-size}@media(min-width:1280px){.xl\\:gap-x-8px{column-gap:8px}}.bilibili-gate-root .bili-video-card__skeleton--cover,.bilibili-gate-root .bili-video-card__skeleton--text,.bilibili-gate-root .bili-video-card__skeleton--light,.bilibili-gate-root .bili-video-card__skeleton--avatar{background:linear-gradient(135deg,#0000000f 25%,#00000026 37%,#0000000f 63%)}.bilibili-gate-root .bili-video-card__skeleton--text.tiny{margin-top:4px;width:15%}html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--cover,html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--text,html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--light,html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--avatar{background-color:#444}._skeleton-active_wlycr_12 .bili-video-card__skeleton--cover,._skeleton-active_wlycr_12 .bili-video-card__skeleton--text,._skeleton-active_wlycr_12 .bili-video-card__skeleton--light,._skeleton-active_wlycr_12 .bili-video-card__skeleton--avatar{background-size:400% 100%;animation-name:_ant-skeleton-loading_wlycr_1;animation-duration:2s;animation-timing-function:ease;animation-iteration-count:infinite}@keyframes _ant-skeleton-loading_wlycr_1{0%{background-position:100% 50%}80%,to{background-position:0 50%}} '); function bX(e,t){for(var n=0;nr[o]});}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const yX='@charset "UTF-8";:root{--bilibili-gate--font: "Alibaba PuHuiTi 3.0", "PingFang SC", "HarmonyOS_Regular", "Helvetica Neue", "Microsoft YaHei", sans-serif}:root{--bilibili-gate--primary-color--lv1: oklch(from var(--bilibili-gate--primary-color) calc(l - .04) c h/alpha);--bilibili-gate--primary-color--lv2: oklch(from var(--bilibili-gate--primary-color) calc(l - .08) c h/alpha);--bilibili-gate--primary-color--lv3: oklch(from var(--bilibili-gate--primary-color) calc(l - .12) c h/alpha);--bilibili-gate--border-color: oklch(from var(--bilibili-gate--bg) calc(l - .05) c h/alpha);--bilibili-gate--bg--lv1: oklch(from var(--bilibili-gate--bg) calc(l - .04) c h/alpha);--bilibili-gate--bg--lv2: oklch(from var(--bilibili-gate--bg) calc(l - .08) c h/alpha);--bilibili-gate--bg--lv3: oklch(from var(--bilibili-gate--bg) calc(l - .12) c h/alpha)}:root.bilibili-gate-using-dark{--bilibili-gate--border-color: oklch(from var(--bilibili-gate--bg) calc(l + .07) c h/alpha);--bilibili-gate--bg--lv1: oklch(from var(--bilibili-gate--bg) calc(l + .03) c h/alpha);--bilibili-gate--bg--lv2: oklch(from var(--bilibili-gate--bg) calc(l + .08) c h/alpha);--bilibili-gate--bg--lv3: oklch(from var(--bilibili-gate--bg) calc(l + .12) c h/alpha)}.bilibili-gate-root{font-family:var(--custom-font-family--options--font-family, var(--bilibili-gate--font))!important;font-size:14px;--back-top-right: 24px}.bilibili-gate-root button,.bilibili-gate-root dd,.bilibili-gate-root dl,.bilibili-gate-root ol,.bilibili-gate-root ul{font-size:inherit}.bilibili-gate-root li{list-style:unset}.bilibili-gate-root .bili-video-card .bili-video-card__info--tit:hover,.bilibili-gate-root .bili-video-card a:not(.disable-hover):hover{color:var(--bilibili-gate--primary-color)!important}.bilibili-gate-root .ant-btn{font-size:13px}.bilibili-gate-root img:-moz-loading{visibility:hidden}@media(max-width:1440px){.bilibili-gate-root{--back-top-right: 16px}}body .ant-tooltip a{color:#1677ff;transition:color .3s}body .ant-tooltip a:visited{color:#1677ff}body .ant-tooltip a:hover{color:#69b1ff}body .ant-tooltip a:active{color:#0958d9}body button:where(.ant-switch):focus,body button:where(.ant-switch):active{background-color:#00000040;outline:unset}body .ant-btn.ant-btn-variant-solid:focus,body .ant-btn.ant-btn-variant-solid:active{color:var(--ant-button-primary-color);background:var(--ant-color-primary)}';pX(yX);const SX="_cls--gate-video-grid--divider_h4766_1",CX="_cls--gate-video-card--context-menu--root_h4766_13",Z3="_video-grid_ucv12_1",hL="_grid-template-columns-using-var-col_ucv12_9",pL="_grid-template-columns-using-card-min-width_ucv12_14",gL="_video-grid-addon-center-empty_ucv12_19",vL="_video-grid-bili-feed4_ucv12_26",bL="_video-grid-custom_ucv12_47",yL="_narrow-mode_ucv12_63",xX={videoGrid:Z3,gridTemplateColumnsUsingVarCol:hL,gridTemplateColumnsUsingCardMinWidth:pL,videoGridAddonCenterEmpty:gL,videoGridBiliFeed4:vL,videoGridCustom:bL,narrowMode:yL},G4=Object.freeze(Object.defineProperty({__proto__:null,default:xX,gridTemplateColumnsUsingCardMinWidth:pL,gridTemplateColumnsUsingVarCol:hL,narrowMode:yL,videoGrid:Z3,videoGridAddonCenterEmpty:gL,videoGridBiliFeed4:vL,videoGridCustom:bL},Symbol.toStringTag,{value:"Module"}));function wX(e,t){const n={};for(let r=0;r!n.has(r))}function $X(e,t){const n={};for(let r=0;rt?n==="asc"?1:-1:0}function bs(e,t,n){return e.slice().sort((r,o)=>{const i=n.length;for(let a=0;aa?n[a]:n[i-1],u=t[a],d=typeof u=="function",m=d?u(r):r[u],p=d?u(o):o[u],g=EX(m,p,c);if(g!==0)return g}return 0})}function MX(e,t){if(t==null&&(t=e,e=0),e>=t)throw new Error("Invalid input: The maximum value must be greater than the minimum value.");return Math.random()*(t-e)+e}function RX(e,t){return Math.floor(MX(e,t))}function pi(e){const t=e.slice();for(let n=t.length-1;n>=1;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]];}return t}function SL(e){return typeof e=="symbol"||e instanceof Symbol}function TX(e){return SL(e)?NaN:Number(e)}function AX(e){return e?(e=TX(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function NX(e){const t=AX(e),n=t%1;return n?t-n:t}function J3(e){return [...new Set(e)]}function Wl(e,t){const n=new Map;for(let r=0;r{i!==null&&(e.apply(o,i),o=void 0,i=null);},d=()=>{c&&u(),b();};let m=null;const p=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,d();},t);},g=()=>{m!==null&&(clearTimeout(m),m=null);},b=()=>{g(),o=void 0,i=null;},y=()=>{u();},S=function(...C){if(n?.aborted)return;o=this,i=C;const w=m==null;p(),a&&w&&u();};return S.schedule=p,S.cancel=b,S.flush=y,n?.addEventListener("abort",b,{once:true}),S}function OX(e){return e}function DX(){}function Ip(e){let t=false,n;return function(...r){return t||(t=true,n=e(...r)),n}}function hn(e,{signal:t}={}){return new Promise((n,r)=>{const o=()=>{r(new PX);},i=()=>{clearTimeout(a),o();};if(t?.aborted)return o();const a=setTimeout(()=>{t?.removeEventListener("abort",i),n();},e);t?.addEventListener("abort",i,{once:true});})}function Kl(e,t,{signal:n,edges:r=["leading","trailing"]}={}){let o=null;const i=IX(function(...c){o=Date.now(),e.apply(this,c);},t,{signal:n,edges:r}),a=function(...c){if(o==null&&(o=Date.now()),Date.now()-o>=t){o=Date.now(),e.apply(this,c),i.cancel(),i.schedule();return}i.apply(this,c);};return a.cancel=i.cancel,a.flush=i.flush,a}function CL(e,t,n=1){if(t==null&&(t=e,e=0),!Number.isInteger(n)||n===0)throw new Error("The step value must be a non-zero integer.");const r=Math.max(Math.ceil((t-e)/n),0),o=new Array(r);for(let i=0;iObject.prototype.propertyIsEnumerable.call(e,t))}function $$(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const $L="[object RegExp]",EL="[object String]",ML="[object Number]",RL="[object Boolean]",E$="[object Arguments]",TL="[object Symbol]",AL="[object Date]",NL="[object Map]",PL="[object Set]",IL="[object Array]",_X="[object Function]",OL="[object ArrayBuffer]",Rb="[object Object]",LX="[object Error]",DL="[object DataView]",_L="[object Uint8Array]",LL="[object Uint8ClampedArray]",BL="[object Uint16Array]",zL="[object Uint32Array]",BX="[object BigUint64Array]",kL="[object Int8Array]",FL="[object Int16Array]",HL="[object Int32Array]",zX="[object BigInt64Array]",VL="[object Float32Array]",jL="[object Float64Array]";function Td(e,t,n,r=new Map,o=void 0){const i=o?.(e,t,n,r);if(i!==void 0)return i;if(xL(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const a=new Array(e.length);r.set(e,a);for(let c=0;cch(p,b,void 0,e,t,n,r));if(g===-1)return !1;d.splice(g,1);}return !0}case IL:case _L:case LL:case BL:case zL:case BX:case kL:case FL:case HL:case zX:case VL:case jL:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return !1;for(let u=0;u=0&&e{const r=e[t];(!(Object.hasOwn(e,t)&&qL(r,n))||n===void 0&&!(t in e))&&(e[t]=n);};function JX(e,t,n,r){if(e==null&&!W4(e))return e;let o;QX(t,e)?o=[t]:Array.isArray(t)?o=t:o=WL(t);const i=n(Mo(e,o));let a=e;for(let c=0;cn,()=>{})}function eQ(e,t){if(e=NX(e),e<1||!Number.isSafeInteger(e))return [];const n=new Array(e);for(let r=0;rnew Proxy(e,t);const M$=Object.getPrototypeOf,R$=new WeakMap,QL=e=>e&&(R$.has(e)?R$.get(e):M$(e)===Object.prototype||M$(e)===Array.prototype),c0=e=>typeof e=="object"&&e!==null,rQ=e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(t=>!t.configurable&&!t.writable),oQ=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(n=>{n.configurable=true;}),Object.create(M$(e),t)},iQ=(e,t)=>{const n={[KL]:t};let r=false;const o=(c,u)=>{if(!r){let d=n[uh].get(e);if(d||(d={},n[uh].set(e,d)),c===xh)d[xh]=true;else {let m=d[c];m||(m=new Set,d[c]=m),m.add(u);}}},i=()=>{r=true,n[uh].delete(e);},a={get(c,u){return u===tM?e:(o(oM,u),ZL(Reflect.get(c,u),n[uh],n[YL],n[XL]))},has(c,u){return u===tQ?(i(),true):(o(nM,u),Reflect.has(c,u))},getOwnPropertyDescriptor(c,u){return o(rM,u),Reflect.getOwnPropertyDescriptor(c,u)},ownKeys(c){return o(xh),Reflect.ownKeys(c)}};return t&&(a.set=a.deleteProperty=()=>false),[a,n]},iM=e=>e[tM]||e,ZL=(e,t,n,r)=>{if(!QL(e))return e;let o=r&&r.get(e);if(!o){const u=iM(e);rQ(u)?o=[u,oQ(u)]:o=[u],r?.set(e,o);}const[i,a]=o;let c=n&&n.get(i);return (!c||c[1][KL]!==!!a)&&(c=iQ(i,!!a),c[1][K4]=nQ(a||i,c[0]),n&&n.set(i,c)),c[1][uh]=t,c[1][YL]=n,c[1][XL]=r,c[1][K4]},aQ=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((o,i)=>o!==r[i])},JL=(e,t,n,r,o=Object.is)=>{if(o(e,t))return false;if(!c0(e)||!c0(t))return true;const i=n.get(iM(e));if(!i)return true;if(r){if(r.get(e)===t)return false;r.set(e,t);}let a=null;for(const c of i[nM]||[])if(a=Reflect.has(e,c)!==Reflect.has(t,c),a)return a;if(i[xh]===true){if(a=aQ(e,t),a)return a}else for(const c of i[rM]||[]){const u=!!Reflect.getOwnPropertyDescriptor(e,c),d=!!Reflect.getOwnPropertyDescriptor(t,c);if(a=u!==d,a)return a}for(const c of i[oM]||[])if(a=JL(e[c],t[c],n,r,o),a)return a;if(a===null)throw new Error("invalid used");return a},sQ=e=>QL(e)&&e[tM]||null,Y4=(e,t=true)=>{R$.set(e,t);},lQ=(e,t,n)=>{const r=[],o=new WeakSet,i=(a,c)=>{var u,d,m;if(o.has(a))return;c0(a)&&o.add(a);const p=c0(a)&&t.get(iM(a));if(p){if((u=p[nM])===null||u===void 0||u.forEach(g=>{const b=`:has(${String(g)})`;r.push(c?[...c,b]:[b]);}),p[xh]===true){const g=":ownKeys";r.push(c?[...c,g]:[g]);}else (d=p[rM])===null||d===void 0||d.forEach(g=>{const b=`:hasOwn(${String(g)})`;r.push(c?[...c,b]:[b]);});(m=p[oM])===null||m===void 0||m.forEach(g=>{"value"in(Object.getOwnPropertyDescriptor(a,g)||{})&&i(a[g],c?[...c,g]:[g]);});}else c&&r.push(c);};return i(e),r},u0={},aM=e=>typeof e=="object"&&e!==null,cQ=e=>aM(e)&&!Dp.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),eB=(e,t)=>{const n=T$.get(e);if(n?.[0]===t)return n[1];const r=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return Y4(r,true),T$.set(e,[t,r]),Reflect.ownKeys(e).forEach(o=>{if(Object.getOwnPropertyDescriptor(r,o))return;const i=Reflect.get(e,o),{enumerable:a}=Reflect.getOwnPropertyDescriptor(e,o),c={value:i,enumerable:a,configurable:true};if(Dp.has(i))Y4(i,false);else if($s.has(i)){const[u,d]=$s.get(i);c.value=eB(u,d());}Object.defineProperty(r,o,c);}),Object.preventExtensions(r)},uQ=(e,t,n,r)=>({deleteProperty(o,i){Reflect.get(o,i),n(i);const a=Reflect.deleteProperty(o,i);return a&&r(void 0),a},set(o,i,a,c){const u=!e()&&Reflect.has(o,i),d=Reflect.get(o,i,c);if(u&&(d0(d,a)||Uh.has(a)&&d0(d,Uh.get(a))))return true;n(i),aM(a)&&(a=sQ(a)||a);const m=!$s.has(a)&&N$(a)?Bn(a):a;return t(i,m),Reflect.set(o,i,m,c),r(void 0),true}}),$s=new WeakMap,Dp=new WeakSet,T$=new WeakMap,Tb=[1],Uh=new WeakMap;let d0=Object.is,A$=(e,t)=>new Proxy(e,t),N$=cQ,P$=eB,I$=uQ;function Bn(e={}){if(!aM(e))throw new Error("object required");const t=Uh.get(e);if(t)return t;let n=Tb[0];const r=new Set,o=(C,w=++Tb[0])=>{n!==w&&(i=n=w,r.forEach($=>$(C,w)));};let i=n;const a=(C=Tb[0])=>(i!==C&&(i=C,u.forEach(([w])=>{const $=w[1](C);$>n&&(n=$);})),n),c=C=>(w,$)=>{let M;w&&(M=[...w],M[1]=[C,...M[1]]),o(M,$);},u=new Map,d=(C,w)=>{const $=!Dp.has(w)&&$s.get(w);if($){if((u0?"production":void 0)!=="production"&&u.has(C))throw new Error("prop listener already exists");if(r.size){const M=$[2](c(C));u.set(C,[$,M]);}else u.set(C,[$]);}},m=C=>{var w;const $=u.get(C);$&&(u.delete(C),(w=$[1])==null||w.call($));},p=C=>(r.add(C),r.size===1&&u.forEach(([$,M],T)=>{if((u0?"production":void 0)!=="production"&&M)throw new Error("remove already exists");const R=$[2](c(T));u.set(T,[$,R]);}),()=>{r.delete(C),r.size===0&&u.forEach(([$,M],T)=>{M&&(M(),u.set(T,[$]));});});let g=true;const b=I$(()=>g,d,m,o),y=A$(e,b);Uh.set(e,y);const S=[e,a,p];return $s.set(y,S),Reflect.ownKeys(e).forEach(C=>{const w=Object.getOwnPropertyDescriptor(e,C);"value"in w&&w.writable&&(y[C]=e[C]);}),g=false,y}function X4(e){const t=$s.get(e);return t?.[1]()}function Wa(e,t,n){const r=$s.get(e);(u0?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let o;const i=[],a=r[2];let c=false;const d=a(m=>{if(m&&i.push(m),n){t(i.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,c&&t(i.splice(0));}));});return c=true,()=>{c=false,d();}}function Jr(e){const t=$s.get(e);(u0?"production":void 0)!=="production"&&!t&&console.warn("Please use proxy object");const[n,r]=t;return P$(n,r())}function tB(e){return Dp.add(e),e}function sM(){return {proxyStateMap:$s,refSet:Dp,snapCache:T$,versionHolder:Tb,proxyCache:Uh}}function dQ(e,t){switch(e){case "objectIs":d0=t(d0);break;case "newProxy":A$=t(A$);break;case "canProxy":N$=t(N$);break;case "createSnapshot":P$=t(P$);break;case "createHandler":I$=t(I$);break;default:throw new Error("unknown function")}}var Vv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fQ(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=false;try{o=this instanceof r;}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype;}else n={};return Object.defineProperty(n,"__esModule",{value:true}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:true,get:function(){return e[r]}});}),n}var JC={exports:{}},jt={};var Q4;function mQ(){if(Q4)return jt;Q4=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function w(D,B,K){this.props=D,this.context=B,this.refs=C,this.updater=K||y;}w.prototype.isReactComponent={},w.prototype.setState=function(D,B){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,B,"setState");},w.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate");};function $(){}$.prototype=w.prototype;function M(D,B,K){this.props=D,this.context=B,this.refs=C,this.updater=K||y;}var T=M.prototype=new $;T.constructor=M,S(T,w.prototype),T.isPureReactComponent=true;var R=Array.isArray;function I(){}var P={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function O(D,B,K){var J=K.ref;return {$$typeof:e,type:D,key:B,ref:J!==void 0?J:null,props:K}}function _(D,B){return O(D.type,B,D.props)}function L(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function H(D){var B={"=":"=0",":":"=2"};return "$"+D.replace(/[=:]/g,function(K){return B[K]})}var U=/\/+/g;function q(D,B){return typeof D=="object"&&D!==null&&D.key!=null?H(""+D.key):B.toString(36)}function V(D){switch(D.status){case "fulfilled":return D.value;case "rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(I,I):(D.status="pending",D.then(function(B){D.status==="pending"&&(D.status="fulfilled",D.value=B);},function(B){D.status==="pending"&&(D.status="rejected",D.reason=B);})),D.status){case "fulfilled":return D.value;case "rejected":throw D.reason}}throw D}function z(D,B,K,J,ee){var te=typeof D;(te==="undefined"||te==="boolean")&&(D=null);var ne=false;if(D===null)ne=true;else switch(te){case "bigint":case "string":case "number":ne=true;break;case "object":switch(D.$$typeof){case e:case t:ne=true;break;case m:return ne=D._init,z(ne(D._payload),B,K,J,ee)}}if(ne)return ee=ee(D),ne=J===""?"."+q(D,0):J,R(ee)?(K="",ne!=null&&(K=ne.replace(U,"$&/")+"/"),z(ee,B,K,"",function(re){return re})):ee!=null&&(L(ee)&&(ee=_(ee,K+(ee.key==null||D&&D.key===ee.key?"":(""+ee.key).replace(U,"$&/")+"/")+ne)),B.push(ee)),1;ne=0;var ae=J===""?".":J+":";if(R(D))for(var oe=0;oe{const n=f.useRef(void 0);f.useEffect(()=>{n.current=lQ(e,t);}),f.useDebugValue(n.current);},gQ=pQ,vQ=new WeakMap;function St(e,t){const n=t?.sync,r=f.useMemo(()=>e&&new WeakMap,[e]),o=f.useRef(void 0),i=f.useRef(false),a=f.useSyncExternalStore(f.useCallback(u=>{i.current=true;const d=Wa(e,u,n);return u(),()=>{d(),i.current=false;}},[e,n]),()=>{const u=Jr(e);try{if(i.current&&o.current&&!JL(o.current,u,r,new WeakMap))return o.current}catch{}return u},()=>Jr(e));f.useLayoutEffect(()=>{o.current=a;}),(hQ?"production":void 0)!=="production"&&gQ(a,r);const c=f.useMemo(()=>new WeakMap,[]);return ZL(a,r,c,vQ)}function bQ(e){return e instanceof Error?e.stack||e.message:e}function yQ(e,t){let n=0;for(let r=0;r=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}let f0="";function nB(e,t){let n,r,o,i;const a=(...c)=>{if(!a.enabled)return;const u=Date.now(),d=u-(n||u);n=u,c[0]=bQ(c[0]),typeof c[0]!="string"&&c.unshift("%O");let m=0;c[0]=c[0].replace(/%([a-z%])/gi,(p,g)=>{if(p==="%%")return "%";m++;const b=t.formatters[g];if(typeof b=="function"){const y=c[m];p=b.call(a,y),c.splice(m,1),m--;}return p}),t.formatArgs.call(a,d,c),a.log(...c);};return a.extend=function(c,u=":"){return nB(this.namespace+u+c,{useColors:this.useColors,color:this.color,formatArgs:this.formatArgs,formatters:this.formatters,inspectOpts:this.inspectOpts,log:this.log,humanize:this.humanize})},Object.assign(a,t),a.namespace=e,Object.defineProperty(a,"enabled",{enumerable:true,configurable:false,get:()=>r??(o!==f0&&(o=f0,i=xQ(e)),i),set:c=>{r=c;}}),a}let D$=[],_$=[];function CQ(e){f0=e,D$=[],_$=[];const t=f0.trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const n of t)n[0]==="-"?_$.push(n.slice(1)):D$.push(n);}function xQ(e){for(const t of _$)if(J4(e,t))return false;for(const t of D$)if(J4(e,t))return true;return false}var wQ={};const $Q=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function EQ(e,t){const{useColors:n}=this;if(t[0]=`${(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")}+${this.humanize(e)}`,!n)return;const r=`color: ${this.color}`;t.splice(1,0,r,"color: inherit");let o=0,i=0;t[0].replace(/%[a-z%]/gi,a=>{a!=="%%"&&(o++,a==="%c"&&(i=o));}),t.splice(i,0,r);}const MQ=console.debug||console.log||(()=>{}),e5=AQ(),RQ={useColors:true,formatArgs:EQ,formatters:{j(e){try{return JSON.stringify(e)}catch(t){return `[UnexpectedJSONParseError]: ${t.message}`}}},inspectOpts:{},humanize:SQ,log:MQ};function TQ(e,t){var n;const r=(n=t)!==null&&n!==void 0?n:yQ($Q,e);return nB(e,Object.assign(RQ,{color:r},t))}function AQ(){try{return localStorage}catch{}}function NQ(){let e;try{e=e5.getItem("debug")||e5.getItem("DEBUG");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=wQ.DEBUG),e||""}CQ(NQ());const Ro="Bilibili-Gate",ro="bilibili-gate",lM="bilibili_gate",t5="bili-gate",oo=TQ(ro),rB="https://api.bilibili.com",oB="https://app.bilibili.com",qh={appkey:"4409e2ce8ffd12b8",appsec:"59b43e04ad6965f34319062b478f83dd"},Ca=`${ro}-root`,PQ=`${ro}-video-grid`,Al=`${ro}-video-card`,iB=`${ro}-video-card-active`,aB=`${ro}-video-card-cover`,sB=`${ro}-tab-bar`,IQ=`${ro}-video-card__recommend-reason`,xf="请求失败, 请重试 !!!",_p="操作失败, 请重试 !!!",jv="bilibili.com";var Ol=(e=>(e[e.Tld=jv]="Tld",e.Main=`www.${jv}`,e.Space=`space.${jv}`,e.Search=`search.${jv}`,e))(Ol||{});const{hostname:Gh,pathname:n5}=location;Gh===Ol.Tld||Gh.endsWith(`.${Ol.Tld}`);const lB=[Ol.Tld,Ol.Main].includes(Gh),OQ=Gh===Ol.Space,DQ=Gh===Ol.Search,Is=lB&&(n5==="/"||n5==="/index.html");function cM(e){return function(...n){const[r,...o]=n,i=`%c${Ro}%c`,a=["padding: 2px 4px; border-radius: 4px; color: #fff; background: #01847f; font-weight: bold;",""];return typeof r=="string"?e(`${i} ${r}`,...a,...o):e(`${i}`,...a,r,...o)}}const _Q=cM(console.log),Go=cM(console.warn),LQ=cM(console.error);var wf=(e=>(e.Pink="#f69",e.Blue="#00aeec",e))(wf||{}),Je=(e=>(e.AppRecommend="app-recommend",e.PcRecommend="pc-recommend",e.KeepFollowOnly="keep-follow-only",e.DynamicFeed="dynamic-feed",e.Watchlater="watchlater",e.Fav="fav",e.Hot="hot",e.Live="live",e.SpaceUpload="space-upload",e.Liked="liked",e))(Je||{}),ur=(e=>(e.PopularGeneral="popular-general",e.PopularWeekly="popular-weekly",e.Rank="ranking",e))(ur||{});const L$=Object.values(Je),BQ=["space-upload"],uM=l0(L$,BQ);var ex={exports:{}},Hm={};var r5;function zQ(){if(r5)return Hm;r5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var c in o)c!=="key"&&(i[c]=o[c]);}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Hm.Fragment=t,Hm.jsx=n,Hm.jsxs=n,Hm}var o5;function kQ(){return o5||(o5=1,ex.exports=zQ()),ex.exports}var Uo=kQ();function FQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Xr($f,--Wo):0,Zd--,br===10&&(Zd=1,Dy--),br}function gi(){return br=Wo2||Kh(br)>3?"":" "}function JQ(e,t){for(;--t&&gi()&&!(br<48||br>102||br>57&&br<65||br>70&&br<97););return Lp(e,Ab()+(t<6&&ka()==32&&gi()==32))}function z$(e){for(;gi();)switch(br){case e:return Wo;case 34:case 39:e!==34&&e!==39&&z$(br);break;case 40:e===41&&z$(e);break;case 92:gi();break}return Wo}function eZ(e,t){for(;gi()&&e+br!==57;)if(e+br===84&&ka()===47)break;return "/*"+Lp(t,Wo-1)+"*"+Oy(e===47?e:gi())}function tZ(e){for(;!Kh(ka());)gi();return Lp(e,Wo)}function nZ(e){return hB(Pb("",null,null,null,[""],e=mB(e),0,[0],e))}function Pb(e,t,n,r,o,i,a,c,u){for(var d=0,m=0,p=a,g=0,b=0,y=0,S=1,C=1,w=1,$=0,M="",T=o,R=i,I=r,P=M;C;)switch(y=$,$=gi()){case 40:if(y!=108&&Xr(P,p-1)==58){B$(P+=xn(Nb($),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:P+=Nb($);break;case 9:case 10:case 13:case 32:P+=ZQ(y);break;case 92:P+=JQ(Ab()-1,7);continue;case 47:switch(ka()){case 42:case 47:Uv(rZ(eZ(gi(),Ab()),t,n),u);break;default:P+="/";}break;case 123*S:c[d++]=Pa(P)*w;case 125*S:case 59:case 0:switch($){case 0:case 125:C=0;case 59+m:w==-1&&(P=xn(P,/\f/g,"")),b>0&&Pa(P)-p&&Uv(b>32?a5(P+";",r,n,p-1):a5(xn(P," ","")+";",r,n,p-2),u);break;case 59:P+=";";default:if(Uv(I=i5(P,t,n,d,m,o,c,M,T=[],R=[],p),i),$===123)if(m===0)Pb(P,t,I,I,T,i,p,c,R);else switch(g===99&&Xr(P,3)===110?100:g){case 100:case 108:case 109:case 115:Pb(e,I,I,r&&Uv(i5(e,I,I,0,0,o,c,M,o,T=[],p),R),o,R,p,c,r?T:R);break;default:Pb(P,I,I,I,[""],R,0,c,R);}}d=m=b=0,S=w=1,M=P="",p=a;break;case 58:p=1+Pa(P),b=y;default:if(S<1){if($==123)--S;else if($==125&&S++==0&&QQ()==125)continue}switch(P+=Oy($),$*S){case 38:w=m>0?1:(P+="\f",-1);break;case 44:c[d++]=(Pa(P)-1)*w,w=1;break;case 64:ka()===45&&(P+=Nb(gi())),g=ka(),m=p=Pa(M=P+=tZ(Ab())),$++;break;case 45:y===45&&Pa(P)==2&&(S=0);}}return i}function i5(e,t,n,r,o,i,a,c,u,d,m){for(var p=o-1,g=o===0?i:[""],b=mM(g),y=0,S=0,C=0;y0?g[w]+" "+$:xn($,/&\f/g,g[w])))&&(u[C++]=M);return _y(e,t,n,o===0?dM:c,u,d,m)}function rZ(e,t,n){return _y(e,t,n,cB,Oy(XQ()),Wh(e,2,-2),0)}function a5(e,t,n,r){return _y(e,t,n,fM,Wh(e,0,r),Wh(e,r+1,-1),r)}function zd(e,t){for(var n="",r=mM(e),o=0;o6)switch(Xr(e,t+1)){case 109:if(Xr(e,t+4)!==45)break;case 102:return xn(e,/(.+:)(.+)-([^]+)/,"$1"+Sn+"$2-$3$1"+m0+(Xr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~B$(e,"stretch")?pB(xn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xr(e,t+1)!==115)break;case 6444:switch(Xr(e,Pa(e)-3-(~B$(e,"!important")&&10))){case 107:return xn(e,":",":"+Sn)+e;case 101:return xn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Sn+(Xr(e,14)===45?"inline-":"")+"box$3$1"+Sn+"$2$3$1"+fo+"$2box$3")+e}break;case 5936:switch(Xr(e,t+11)){case 114:return Sn+e+fo+xn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Sn+e+fo+xn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Sn+e+fo+xn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Sn+e+fo+e+e}return e}var mZ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case fM:t.return=pB(t.value,t.length);break;case uB:return zd([Vm(t,{value:xn(t.value,"@","@"+Sn)})],o);case dM:if(t.length)return YQ(t.props,function(i){switch(KQ(i,/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":return zd([Vm(t,{props:[xn(i,/:(read-\w+)/,":"+m0+"$1")]})],o);case "::placeholder":return zd([Vm(t,{props:[xn(i,/:(plac\w+)/,":"+Sn+"input-$1")]}),Vm(t,{props:[xn(i,/:(plac\w+)/,":"+m0+"$1")]}),Vm(t,{props:[xn(i,/:(plac\w+)/,fo+"input-$1")]})],o)}return ""})}},hZ=[mZ],gB=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var C=S.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""));});}var o=t.stylisPlugins||hZ,i={},a,c=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var C=S.getAttribute("data-emotion").split(" "),w=1;w=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16);}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var SZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},CZ=/[A-Z]|^ms/g,xZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bB=function(t){return t.charCodeAt(1)===45},d5=function(t){return t!=null&&typeof t!="boolean"},rx=sZ(function(e){return bB(e)?e:e.replace(CZ,"-$&").toLowerCase()}),f5=function(t,n){switch(t){case "animation":case "animationName":if(typeof n=="string")return n.replace(xZ,function(r,o,i){return Ia={name:o,styles:i,next:Ia},o})}return SZ[t]!==1&&!bB(t)&&typeof n=="number"&&n!==0?n+"px":n};function Yh(e,t,n){if(n==null)return "";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case "boolean":return "";case "object":{var o=n;if(o.anim===1)return Ia={name:o.name,styles:o.styles,next:Ia},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Ia={name:a.name,styles:a.styles,next:Ia},a=a.next;var c=i.styles+";";return c}return wZ(e,t,n)}case "function":{if(e!==void 0){var u=Ia,d=n(e);return Ia=u,Yh(e,t,d)}break}}var m=n;if(t==null)return m;var p=t[m];return p!==void 0?p:m}function wZ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;otypeof e=="string"||typeof e=="symbol"||typeof e=="number";function cd(e){if(!b0(e))throw new TypeError("`eventName` must be a string, symbol, or number")}function qv(e){if(typeof e!="function")throw new TypeError("listener must be a function")}function ud(e,t){const n=Oc.get(e);if(n.has(t))return n.get(t)}function wh(e,t){const n=b0(t)?t:h0,r=vs.get(e);if(r.has(n))return r.get(n)}function NZ(e,t,n){const r=vs.get(e);if(r.has(t))for(const o of r.get(t))o.enqueue(n);if(r.has(h0)){const o=Promise.all([t,n]);for(const i of r.get(h0))i.enqueue(o);}}function g5(e,t){t=Array.isArray(t)?t:[t];let n=false,r=()=>{},o=[];const i={enqueue(a){o.push(a),r();},finish(){n=true,r();}};for(const a of t){let c=wh(e,a);c||(c=new Set,vs.get(e).set(a,c)),c.add(i);}return {async next(){return o?o.length===0?n?(o=void 0,this.next()):(await new Promise(a=>{r=a;}),this.next()):{done:false,value:await o.shift()}:{done:true}},async return(a){o=void 0;for(const c of t){const u=wh(e,c);u&&(u.delete(i),u.size===0&&vs.get(e).delete(c));}return r(),arguments.length>0?{done:true,value:await a}:{done:true}},[Symbol.asyncIterator](){return this}}}function v5(e){if(e===void 0)return b5;if(!Array.isArray(e))throw new TypeError("`methodNames` must be an array of strings");for(const t of e)if(!b5.includes(t))throw typeof t!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${t} is not Emittery method`);return e}const Ed=e=>e===p0||e===g0;function Gv(e,t,n){if(Ed(t))try{v0=!0,e.emit(t,n);}finally{v0=false;}}class bi{static mixin(t,n){return n=v5(n),r=>{if(typeof r!="function")throw new TypeError("`target` must be function");for(const a of n)if(r.prototype[a]!==void 0)throw new Error(`The property \`${a}\` already exists on \`target\``);function o(){return Object.defineProperty(this,t,{enumerable:false,value:new bi}),this[t]}Object.defineProperty(r.prototype,t,{enumerable:false,get:o});const i=a=>function(...c){return this[t][a](...c)};for(const a of n)Object.defineProperty(r.prototype,a,{enumerable:false,value:i(a)});return r}}static get isDebugEnabled(){if(typeof AZ!="object")return ox;const{env:t}=globalThis.process??{env:{}};return t.DEBUG==="emittery"||t.DEBUG==="*"||ox}static set isDebugEnabled(t){ox=t;}constructor(t={}){ml.set(this,new Set),Oc.set(this,new Map),vs.set(this,new Map),vs.get(this).set(h0,new Set),this.debug=t.debug??{},this.debug.enabled===void 0&&(this.debug.enabled=false),this.debug.logger||(this.debug.logger=(n,r,o,i)=>{try{i=JSON.stringify(i);}catch{i=`Object with the following keys failed to stringify: ${Object.keys(i).join(",")}`;}(typeof o=="symbol"||typeof o=="number")&&(o=o.toString());const a=new Date,c=`${a.getHours()}:${a.getMinutes()}:${a.getSeconds()}.${a.getMilliseconds()}`;console.log(`[${c}][emittery:${n}][${r}] Event Name: ${o} data: ${i}`);});}logIfDebugEnabled(t,n,r){(bi.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,n,r);}on(t,n,{signal:r}={}){qv(n),t=Array.isArray(t)?t:[t];for(const i of t){cd(i);let a=ud(this,i);a||(a=new Set,Oc.get(this).set(i,a)),a.add(n),this.logIfDebugEnabled("subscribe",i,void 0),Ed(i)||Gv(this,p0,{eventName:i,listener:n});}const o=()=>{this.off(t,n),r?.removeEventListener("abort",o);};return r?.addEventListener("abort",o,{once:true}),r?.aborted&&o(),o}off(t,n){qv(n),t=Array.isArray(t)?t:[t];for(const r of t){cd(r);const o=ud(this,r);o&&(o.delete(n),o.size===0&&Oc.get(this).delete(r)),this.logIfDebugEnabled("unsubscribe",r,void 0),Ed(r)||Gv(this,g0,{eventName:r,listener:n});}}once(t,n){if(n!==void 0&&typeof n!="function")throw new TypeError("predicate must be a function");let r;const o=new Promise(i=>{r=this.on(t,a=>{n&&!n(a)||(r(),i(a));});});return o.off=r,o}events(t){t=Array.isArray(t)?t:[t];for(const n of t)cd(n);return g5(this,t)}async emit(t,n){if(cd(t),Ed(t)&&!v0)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,n),NZ(this,t,n);const r=ud(this,t)??new Set,o=ml.get(this),i=[...r],a=Ed(t)?[]:[...o];await p5,await Promise.all([...i.map(async c=>{if(r.has(c))return c(n)}),...a.map(async c=>{if(o.has(c))return c(t,n)})]);}async emitSerial(t,n){if(cd(t),Ed(t)&&!v0)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",t,n);const r=ud(this,t)??new Set,o=ml.get(this),i=[...r],a=[...o];await p5;for(const c of i)r.has(c)&&await c(n);for(const c of a)o.has(c)&&await c(t,n);}onAny(t,{signal:n}={}){qv(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),ml.get(this).add(t),Gv(this,p0,{listener:t});const r=()=>{this.offAny(t),n?.removeEventListener("abort",r);};return n?.addEventListener("abort",r,{once:true}),n?.aborted&&r(),r}anyEvent(){return g5(this)}offAny(t){qv(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),Gv(this,g0,{listener:t}),ml.get(this).delete(t);}clearListeners(t){t=Array.isArray(t)?t:[t];for(const n of t)if(this.logIfDebugEnabled("clear",n,void 0),b0(n)){const r=ud(this,n);r&&r.clear();const o=wh(this,n);if(o){for(const i of o)i.finish();o.clear();}}else {ml.get(this).clear();for(const[r,o]of Oc.get(this).entries())o.clear(),Oc.get(this).delete(r);for(const[r,o]of vs.get(this).entries()){for(const i of o)i.finish();o.clear(),vs.get(this).delete(r);}}}listenerCount(t){t=Array.isArray(t)?t:[t];let n=0;for(const r of t){if(b0(r)){n+=ml.get(this).size+(ud(this,r)?.size??0)+(wh(this,r)?.size??0)+(wh(this)?.size??0);continue}r!==void 0&&cd(r),n+=ml.get(this).size;for(const o of Oc.get(this).values())n+=o.size;for(const o of vs.get(this).values())n+=o.size;}return n}bindMethods(t,n){if(typeof t!="object"||t===null)throw new TypeError("`target` must be an object");n=v5(n);for(const r of n){if(t[r]!==void 0)throw new Error(`The property \`${r}\` already exists on \`target\``);Object.defineProperty(t,r,{enumerable:false,value:this[r].bind(this)});}}}const b5=Object.getOwnPropertyNames(bi.prototype).filter(e=>e!=="constructor");Object.defineProperty(bi,"listenerAdded",{value:p0,writable:false,enumerable:true,configurable:false});Object.defineProperty(bi,"listenerRemoved",{value:g0,writable:false,enumerable:true,configurable:false});function Rt(e){const t=f.useRef(e);return t.current=e,f.useCallback((...r)=>t.current?.(...r),[])}function yi(){return !!(typeof window<"u"&&window.document&&window.document.createElement)}const y5=yi()?f.useLayoutEffect:f.useEffect,Mn=(e,t)=>{const n=f.useRef(true);y5(()=>e(n.current),t),y5(()=>(n.current=false,()=>{n.current=true;}),[]);},Ib=(e,t)=>{Mn(n=>{if(!n)return e()},t);};function y0(e){const t=f.useRef(false),[n,r]=f.useState(e);f.useEffect(()=>(t.current=false,()=>{t.current=true;}),[]);function o(i,a){a&&t.current||r(i);}return [n,o]}function dn(e,t){const[n,r]=f.useState(e),o=t!==void 0?t:n;return Mn(i=>{i||r(t);},[t]),[o,r]}var ix={exports:{}},En={};var S5;function PZ(){if(S5)return En;S5=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function S(C){if(typeof C=="object"&&C!==null){var w=C.$$typeof;switch(w){case e:switch(C=C.type,C){case n:case o:case r:case d:case m:return C;default:switch(C=C&&C.$$typeof,C){case c:case a:case u:case g:case p:case i:return C;default:return w}}case t:return w}}}return En.ContextConsumer=a,En.ContextProvider=i,En.Element=e,En.ForwardRef=u,En.Fragment=n,En.Lazy=g,En.Memo=p,En.Portal=t,En.Profiler=o,En.StrictMode=r,En.Suspense=d,En.SuspenseList=m,En.isAsyncMode=function(){return false},En.isConcurrentMode=function(){return false},En.isContextConsumer=function(C){return S(C)===a},En.isContextProvider=function(C){return S(C)===i},En.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===e},En.isForwardRef=function(C){return S(C)===u},En.isFragment=function(C){return S(C)===n},En.isLazy=function(C){return S(C)===g},En.isMemo=function(C){return S(C)===p},En.isPortal=function(C){return S(C)===t},En.isProfiler=function(C){return S(C)===o},En.isStrictMode=function(C){return S(C)===r},En.isSuspense=function(C){return S(C)===d},En.isSuspenseList=function(C){return S(C)===m},En.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===o||C===r||C===d||C===m||C===b||typeof C=="object"&&C!==null&&(C.$$typeof===g||C.$$typeof===p||C.$$typeof===i||C.$$typeof===a||C.$$typeof===u||C.$$typeof===y||C.getModuleId!==void 0)},En.typeOf=S,En}var C5;function IZ(){return C5||(C5=1,ix.exports=PZ()),ix.exports}var ax=IZ();function Ef(e,t,n){const r=f.useRef({});return (!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}const OZ=Symbol.for("react.element"),DZ=Symbol.for("react.transitional.element"),_Z=Symbol.for("react.fragment");function wB(e){return e&&typeof e=="object"&&(e.$$typeof===OZ||e.$$typeof===DZ)&&e.type===_Z}const LZ=Number(f.version.split(".")[0]),BZ=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t);},Ar=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{BZ(r,n);});}},Xl=(...e)=>Ef(()=>Ar(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),vu=e=>{if(!e)return false;if(bM(e)&&LZ>=19)return true;const t=ax.isMemo(e)?e.type.type:e.type;return !(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==ax.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==ax.ForwardRef)};function bM(e){return f.isValidElement(e)&&!wB(e)}const zZ=e=>bM(e)&&vu(e),Ql=e=>{if(e&&bM(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function aa(e,t){let n=e;for(let r=0;r"u"?Object.keys:Reflect.ownKeys;function EB(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=x5(e[0]);return e.forEach(i=>{function a(c,u){const d=new Set(u),m=aa(i,c),p=Array.isArray(m);if(p||kZ(m)){if(!d.has(m)){d.add(m);const g=aa(o,c);p?o=Li(o,c,r(g,m)):(!g||typeof g!="object")&&(o=Li(o,c,x5(m))),FZ(m).forEach(b=>{Object.getOwnPropertyDescriptor(m,b).enumerable&&a([...c,b],d);});}}else o=Li(o,c,m);}a([]);}),o}function Ad(...e){return EB(e)}let F$={};const HZ=e=>{};function VZ(e,t){}function jZ(e,t){}function UZ(){F$={};}function MB(e,t,n){!t&&!F$[n]&&(e(false,n),F$[n]=true);}function xr(e,t){MB(VZ,e,t);}function qZ(e,t){MB(jZ,e,t);}xr.preMessage=HZ;xr.resetWarned=UZ;xr.noteOnce=qZ;function Ln(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r];}),n}function Ko(e,t={}){let n=[];return W.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Ko(r)):wB(r)&&r.props?n=n.concat(Ko(r.props.children,t)):n.push(r));}),n}const GZ=f.createContext({});function Jd(e){return e instanceof HTMLElement||e instanceof SVGElement}function ef(e){return e&&typeof e=="object"&&Jd(e.nativeElement)?e.nativeElement:Jd(e)?e:null}const H$=f.createContext(null);function WZ({children:e,onBatchResize:t}){const n=f.useRef(0),r=f.useRef([]),o=f.useContext(H$),i=f.useCallback((a,c,u)=>{n.current+=1;const d=n.current;r.current.push({size:a,element:c,data:u}),Promise.resolve().then(()=>{d===n.current&&(t?.(r.current),r.current=[]);}),o?.(a,c,u);},[t,o]);return f.createElement(H$.Provider,{value:i},e)}const $l=new Map;function KZ(e){e.forEach(t=>{const{target:n}=t;$l.get(n)?.forEach(r=>r(n));});}let sx;function RB(){return sx||(sx=new ResizeObserver(KZ)),sx}function YZ(e,t){$l.has(e)||($l.set(e,new Set),RB().observe(e)),$l.get(e).add(t);}function XZ(e,t){$l.has(e)&&($l.get(e).delete(t),$l.get(e).size||(RB().unobserve(e),$l.delete(e)));}function TB(e,t,n,r){const o=f.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Rt(c=>{const{width:u,height:d}=c.getBoundingClientRect(),{offsetWidth:m,offsetHeight:p}=c,g=Math.floor(u),b=Math.floor(d);if(o.current.width!==g||o.current.height!==b||o.current.offsetWidth!==m||o.current.offsetHeight!==p){const y={width:g,height:b,offsetWidth:m,offsetHeight:p};o.current=y;const S=m===Math.round(u)?u:m,C=p===Math.round(d)?d:p,w={...y,offsetWidth:S,offsetHeight:C};r?.(w,c),Promise.resolve().then(()=>{n?.(w,c);});}}),a=typeof t=="function";f.useEffect(()=>{const c=a?t():t;return c&&e&&YZ(c,i),()=>{c&&XZ(c,i);}},[e,a?0:t]);}function QZ(e,t){const{children:n,disabled:r,onResize:o,data:i}=e,a=f.useRef(null),c=f.useContext(H$),u=typeof n=="function",d=u?n(a):n,m=!u&&f.isValidElement(d)&&vu(d),p=m?Ql(d):null,g=Xl(p,a),b=()=>ef(a.current);return f.useImperativeHandle(t,()=>b()),TB(!r,b,o,(y,S)=>{c?.(y,S,i);}),m?f.cloneElement(d,{ref:g}):d}const ZZ=f.forwardRef(QZ);function V$(){return V$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const a=o?.key||`${JZ}-${i}`;return f.createElement(ZZ,V$({},e,{key:a,ref:i===0?t:void 0}),o)})}const da=f.forwardRef(eJ);da.Collection=WZ;function AB(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;te.length)&&(t=e.length);for(var n=0,r=Array(t);n+setTimeout(e,16),PB=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(NB=e=>window.requestAnimationFrame(e),PB=e=>window.cancelAnimationFrame(e));let w5=0;const SM=new Map;function IB(e){SM.delete(e);}const Lt=(e,t=1)=>{w5+=1;const n=w5;function r(o){if(o===0)IB(n),e();else {const i=NB(()=>{r(o-1);});SM.set(n,i);}}return r(t),n};Lt.cancel=e=>{const t=SM.get(e);return IB(e),PB(t)};function oJ(e){let t=null;const n=o=>()=>{t=null,e.apply(void 0,Yt(o));},r=(...o)=>{t===null&&(t=Lt(n(o)));};return r.cancel=()=>{Lt.cancel(t),t=null;},r}const Xh="ant",Ly="anticon",iJ=["outlined","borderless","filled","underlined"],aJ=(e,t)=>t||(e?`${Xh}-${e}`:Xh),xt=f.createContext({getPrefixCls:aJ,iconPrefixCls:Ly}),{Consumer:ZPe}=xt,$5={};function Wt(e){const t=f.useContext(xt),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return {classNames:$5,styles:$5,...a,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}function Qh(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16);}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function U$(e,t){if(!e)return false;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return true;n=n.parentNode;}return false}const E5="data-rc-order",M5="data-rc-priority",sJ="rc-util-key",q$=new Map;function OB({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:sJ}function By(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function lJ(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function CM(e){return Array.from((q$.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function DB(e,t={}){if(!yi())return null;const{csp:n,prepend:r,priority:o=0}=t,i=lJ(r),a=i==="prependQueue",c=document.createElement("style");c.setAttribute(E5,i),a&&o&&c.setAttribute(M5,`${o}`),n?.nonce&&(c.nonce=n?.nonce),c.innerHTML=e;const u=By(t),{firstChild:d}=u;if(r){if(a){const m=(t.styles||CM(u)).filter(p=>{if(!["prepend","prependQueue"].includes(p.getAttribute(E5)))return false;const g=Number(p.getAttribute(M5)||0);return o>=g});if(m.length)return u.insertBefore(c,m[m.length-1].nextSibling),c}u.insertBefore(c,d);}else u.appendChild(c);return c}function _B(e,t={}){let{styles:n}=t;return n||=CM(By(t)),n.find(r=>r.getAttribute(OB(t))===e)}function Zh(e,t={}){const n=_B(e,t);n&&By(t).removeChild(n);}function cJ(e,t){const n=q$.get(e);if(!n||!U$(document,n)){const r=DB("",t),{parentNode:o}=r;q$.set(e,o),e.removeChild(r);}}function Nl(e,t,n={}){const r=By(n),o=CM(r),i={...n,styles:o};cJ(r,i);const a=_B(t,i);if(a)return i.csp?.nonce&&a.nonce!==i.csp?.nonce&&(a.nonce=i.csp?.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const c=DB(e,i);return c.setAttribute(OB(i),t),c}function Dl(e,t,n=false){const r=new Set;function o(i,a,c=1){const u=r.has(i);if(xr(!u,"Warning: There may be circular references"),u)return false;if(i===a)return true;if(n&&c>1)return false;r.add(i);const d=c+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return false;for(let m=0;mo(i[p],a[p],d))}return false}return o(e,t)}const uJ="%";function G$(e){return e.join(uJ)}let R5=0;class dJ{instanceId;constructor(t){this.instanceId=t;}cache=new Map;updateTimes=new Map;extracted=new Set;get(t){return this.opGet(G$(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(G$(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,R5),R5+=1);}}const fJ={},xM="data-token-hash",xs="data-css-hash",Wc="__cssinjs_instance__";function LB(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${xs}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[Wc]||=e,o[Wc]===e&&document.head.insertBefore(o,n);});const r={};Array.from(document.querySelectorAll(`style[${xs}]`)).forEach(o=>{const i=o.getAttribute(xs);r[i]?o[Wc]===e&&o.parentNode?.removeChild(o):r[i]=true;});}return new dJ(e)}const su=f.createContext({hashPriority:"low",cache:LB(),defaultCache:true,autoPrefix:false}),mJ=e=>{const{children:t,...n}=e,r=f.useContext(su),o=Ef(()=>{const i={...r};Object.keys(n).forEach(u=>{const d=n[u];n[u]!==void 0&&(i[u]=d);});const{cache:a,transformers:c=[]}=n;return i.cache=i.cache||LB(),i.defaultCache=!a&&r.defaultCache,c.includes(fJ)&&(i.autoPrefix=true),i},[r,n],(i,a)=>!Dl(i[0],a[0],true)||!Dl(i[1],a[1],true));return f.createElement(su.Provider,{value:o},t)};function hJ(e,t){if(e.length!==t.length)return false;for(let n=0;n{r?r=r?.map?.get(o):r=void 0;}),r?.value&&n&&(r.value[1]=this.cacheCallTimes++),r?.value}get(t){return this.internalGet(t,true)?.[0]}has(t){return !!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>S0.MAX_CACHE_SIZE+S0.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,c]=i;return this.internalGet(a)[1]{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else {const a=r.get(o);a?a.map||(a.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map;}});}deleteByPath(t,n){const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),r.value?.[0];const o=this.deleteByPath(r.map,n.slice(1));return (!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!hJ(n,t)),this.deleteByPath(this.cache,t)}}let T5=0;class BB{derivatives;id;constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=T5,t.length===0&&(t.length>0,void 0),T5+=1;}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const lx=new S0;function C0(e){const t=Array.isArray(e)?e:[e];return lx.has(t)||lx.set(t,new BB(t)),lx.get(t)}const pJ=new WeakMap,cx={};function gJ(e,t){let n=pJ;for(let r=0;r{const r=e[n];t+=n,r instanceof BB?t+=r.id:r&&typeof r=="object"?t+=$h(r):t+=r;}),t=Qh(t),A5.set(e,t)),t}function vJ(e,t){return Qh(`${t}_${$h(e)}`)}const W$=yi();function ie(e){return typeof e=="number"?`${e}px`:e}function zB(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return "";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const bJ=e=>e!=null,Ob=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),yJ=(e,t,n)=>{const{hashCls:r,hashPriority:o="low"}=n||{};return Object.keys(e).length?`${zB({hashCls:r,hashPriority:o})}.${t}${n?.scope?`.${n.scope}`:""}{${Object.entries(e).map(([i,a])=>`${i}:${a};`).join("")}}`:""},kB=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:c,preserve:u}=n||{},d={},m={};return Object.entries(e).forEach(([p,g])=>{if(u?.[p])m[p]=g;else if((typeof g=="string"||typeof g=="number")&&!c?.[p]){const b=Ob(p,i);d[b]=typeof g=="number"&&!a?.[p]?`${g}px`:String(g),m[p]=`var(${b})`;}}),[m,yJ(d,t,{scope:n?.scope,hashCls:r,hashPriority:o})]},Wv=new Map;function wM(e,t,n,r,o){const{cache:i}=f.useContext(su),a=[e,...t],c=G$(a),u=p=>{i.opUpdate(c,g=>{const[b=0,y]=g||[void 0,void 0],C=y||n(),w=[b,C];return p?p(w):w});};f.useMemo(()=>{u();},[c]);const m=i.opGet(c)[1];return f.useInsertionEffect(()=>(u(([p,g])=>[p+1,g]),Wv.has(c)||(o?.(m),Wv.set(c,true),Promise.resolve().then(()=>{Wv.delete(c);})),()=>{i.opUpdate(c,p=>{const[g=0,b]=p||[];return g-1===0?(r?.(b,false),Wv.delete(c),null):[g-1,b]});}),[c]),m}const SJ={},CJ="css",Lc=new Map;function xJ(e){Lc.set(e,(Lc.get(e)||0)+1);}function wJ(e,t){typeof document<"u"&&document.querySelectorAll(`style[${xM}="${e}"]`).forEach(r=>{r[Wc]===t&&r.parentNode?.removeChild(r);});}const $J=-1;function EJ(e,t){Lc.set(e,(Lc.get(e)||0)-1);const n=new Set;Lc.forEach((r,o)=>{r<=0&&n.add(o);}),Lc.size-n.size>$J&&n.forEach(r=>{wJ(r,t),Lc.delete(r);});}const FB=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},MJ="token";function RJ(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=f.useContext(su),{salt:a="",override:c=SJ,formatToken:u,getComputedToken:d,cssVar:m}=n,p=gJ(()=>Object.assign({},...t),t),g=$h(p),b=$h(c),y=$h(m);return wM(MJ,[a,e.id,g,b,y],()=>{const C=d?d(p,c,e):FB(p,c,e,u),w={...C},$=`${a}_${m.prefix}`,M=Qh($),T=`${CJ}-${M}`;w._tokenKey=vJ(w,$);const[R,I]=kB(C,m.key,{prefix:m.prefix,ignore:m.ignore,unitless:m.unitless,preserve:m.preserve,hashPriority:i,hashCls:m.hashed?T:void 0});return R._hashId=M,xJ(m.key),[R,T,w,I,m.key]},([,,,,C])=>{EJ(C,r);},([,,,C,w])=>{if(!C)return;const $=Nl(C,Qh(`css-var-${w}`),{mark:xs,prepend:"queue",attachTo:o,priority:-999});$[Wc]=r,$.setAttribute(xM,w);})}var TJ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Un="-ms-",Eh="-moz-",Cn="-webkit-",HB="comm",$M="rule",EM="decl",AJ="@import",NJ="@namespace",VB="@keyframes",PJ="@layer",jB=Math.abs,MM=String.fromCharCode,K$=Object.assign;function IJ(e,t){return Er(e,0)^45?(((t<<2^Er(e,0))<<2^Er(e,1))<<2^Er(e,2))<<2^Er(e,3):0}function UB(e){return e.trim()}function hs(e,t){return (e=t.exec(e))?e[0]:e}function Qt(e,t,n){return e.replace(t,n)}function Db(e,t,n){return e.indexOf(t,n)}function Er(e,t){return e.charCodeAt(t)|0}function lu(e,t,n){return e.slice(t,n)}function oa(e){return e.length}function qB(e){return e.length}function dh(e,t){return t.push(e),e}function OJ(e,t){return e.map(t).join("")}function N5(e,t){return e.filter(function(n){return !hs(n,t)})}var zy=1,tf=1,GB=0,qi=0,yr=0,Mf="";function ky(e,t,n,r,o,i,a,c){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:zy,column:tf,length:a,return:"",siblings:c}}function gl(e,t){return K$(ky("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function dd(e){for(;e.root;)e=gl(e.root,{children:[e]});dh(e,e.siblings);}function DJ(){return yr}function _J(){return yr=qi>0?Er(Mf,--qi):0,tf--,yr===10&&(tf=1,zy--),yr}function fa(){return yr=qi2||Jh(yr)>3?"":" "}function kJ(e,t){for(;--t&&fa()&&!(yr<48||yr>102||yr>57&&yr<65||yr>70&&yr<97););return Fy(e,_b()+(t<6&&El()==32&&fa()==32))}function Y$(e){for(;fa();)switch(yr){case e:return qi;case 34:case 39:e!==34&&e!==39&&Y$(yr);break;case 40:e===41&&Y$(e);break;case 92:fa();break}return qi}function FJ(e,t){for(;fa()&&e+yr!==57;)if(e+yr===84&&El()===47)break;return "/*"+Fy(t,qi-1)+"*"+MM(e===47?e:fa())}function HJ(e){for(;!Jh(El());)fa();return Fy(e,qi)}function P5(e){return BJ(Lb("",null,null,null,[""],e=LJ(e),0,[0],e))}function Lb(e,t,n,r,o,i,a,c,u){for(var d=0,m=0,p=a,g=0,b=0,y=0,S=1,C=1,w=1,$=0,M="",T=o,R=i,I=r,P=M;C;)switch(y=$,$=fa()){case 40:if(y!=108&&Er(P,p-1)==58){Db(P+=Qt(ux($),"&","&\f"),"&\f",jB(d?c[d-1]:0))!=-1&&(w=-1);break}case 34:case 39:case 91:P+=ux($);break;case 9:case 10:case 13:case 32:P+=zJ(y);break;case 92:P+=kJ(_b()-1,7);continue;case 47:switch(El()){case 42:case 47:dh(VJ(FJ(fa(),_b()),t,n,u),u),(Jh(y||1)==5||Jh(El()||1)==5)&&oa(P)&&lu(P,-1,void 0)!==" "&&(P+=" ");break;default:P+="/";}break;case 123*S:c[d++]=oa(P)*w;case 125*S:case 59:case 0:switch($){case 0:case 125:C=0;case 59+m:w==-1&&(P=Qt(P,/\f/g,"")),b>0&&(oa(P)-p||S===0&&y===47)&&dh(b>32?O5(P+";",r,n,p-1,u):O5(Qt(P," ","")+";",r,n,p-2,u),u);break;case 59:P+=";";default:if(dh(I=I5(P,t,n,d,m,o,c,M,T=[],R=[],p,i),i),$===123)if(m===0)Lb(P,t,I,I,T,i,p,c,R);else {switch(g){case 99:if(Er(P,3)===110)break;case 108:if(Er(P,2)===97)break;default:m=0;case 100:case 109:case 115:}m?Lb(e,I,I,r&&dh(I5(e,I,I,0,0,o,c,M,o,T=[],p,R),R),o,R,p,c,r?T:R):Lb(P,I,I,I,[""],R,0,c,R);}}d=m=b=0,S=w=1,M=P="",p=a;break;case 58:p=1+oa(P),b=y;default:if(S<1){if($==123)--S;else if($==125&&S++==0&&_J()==125)continue}switch(P+=MM($),$*S){case 38:w=m>0?1:(P+="\f",-1);break;case 44:c[d++]=(oa(P)-1)*w,w=1;break;case 64:El()===45&&(P+=ux(fa())),g=El(),m=p=oa(M=P+=HJ(_b())),$++;break;case 45:y===45&&oa(P)==2&&(S=0);}}return i}function I5(e,t,n,r,o,i,a,c,u,d,m,p){for(var g=o-1,b=o===0?i:[""],y=qB(b),S=0,C=0,w=0;S0?b[$]+" "+M:Qt(M,/&\f/g,b[$])))&&(u[w++]=T);return ky(e,t,n,o===0?$M:c,u,d,m,p)}function VJ(e,t,n,r){return ky(e,t,n,HB,MM(DJ()),lu(e,2,-2),0,r)}function O5(e,t,n,r,o){return ky(e,t,n,EM,lu(e,0,r),lu(e,r+1,-1),r,o)}function WB(e,t,n){switch(IJ(e,t)){case 5103:return Cn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Cn+e+e;case 4855:return Cn+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Eh+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Cn+e+Eh+e+Un+e+e;case 5936:switch(Er(e,t+11)){case 114:return Cn+e+Un+Qt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Cn+e+Un+Qt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Cn+e+Un+Qt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Cn+e+Un+e+e;case 6165:return Cn+e+Un+"flex-"+e+e;case 5187:return Cn+e+Qt(e,/(\w+).+(:[^]+)/,Cn+"box-$1$2"+Un+"flex-$1$2")+e;case 5443:return Cn+e+Un+"flex-item-"+Qt(e,/flex-|-self/g,"")+(hs(e,/flex-|baseline/)?"":Un+"grid-row-"+Qt(e,/flex-|-self/g,""))+e;case 4675:return Cn+e+Un+"flex-line-pack"+Qt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Cn+e+Un+Qt(e,"shrink","negative")+e;case 5292:return Cn+e+Un+Qt(e,"basis","preferred-size")+e;case 6060:return Cn+"box-"+Qt(e,"-grow","")+Cn+e+Un+Qt(e,"grow","positive")+e;case 4554:return Cn+Qt(e,/([^-])(transform)/g,"$1"+Cn+"$2")+e;case 6187:return Qt(Qt(Qt(e,/(zoom-|grab)/,Cn+"$1"),/(image-set)/,Cn+"$1"),e,"")+e;case 5495:case 3959:return Qt(e,/(image-set\([^]*)/,Cn+"$1$`$1");case 4968:return Qt(Qt(e,/(.+:)(flex-)?(.*)/,Cn+"box-pack:$3"+Un+"flex-pack:$3"),/space-between/,"justify")+Cn+e+e;case 4200:if(!hs(e,/flex-|baseline/))return Un+"grid-column-align"+lu(e,t)+e;break;case 2592:case 3360:return Un+Qt(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,hs(r.props,/grid-\w+-end/)})?~Db(e+(n=n[t].value),"span",0)?e:Un+Qt(e,"-start","")+e+Un+"grid-row-span:"+(~Db(n,"span",0)?hs(n,/\d+/):+hs(n,/\d+/)-+hs(e,/\d+/))+";":Un+Qt(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return hs(r.props,/grid-\w+-start/)})?e:Un+Qt(Qt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Qt(e,/(.+)-inline(.+)/,Cn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oa(e)-1-t>6)switch(Er(e,t+1)){case 109:if(Er(e,t+4)!==45)break;case 102:return Qt(e,/(.+:)(.+)-([^]+)/,"$1"+Cn+"$2-$3$1"+Eh+(Er(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~Db(e,"stretch",0)?WB(Qt(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Qt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,c,u,d){return Un+o+":"+i+d+(a?Un+o+"-span:"+(c?u:+u-+i)+d:"")+e});case 4949:if(Er(e,t+6)===121)return Qt(e,":",":"+Cn)+e;break;case 6444:switch(Er(e,Er(e,14)===45?18:11)){case 120:return Qt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Cn+(Er(e,14)===45?"inline-":"")+"box$3$1"+Cn+"$2$3$1"+Un+"$2box$3")+e;case 100:return Qt(e,":",":"+Un)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Qt(e,"scroll-","scroll-snap-")+e}return e}function ep(e,t){for(var n="",r=0;r-1&&!e.return)switch(e.type){case EM:e.return=WB(e.value,e.length,n);return;case VB:return ep([gl(e,{value:Qt(e.value,"@","@"+Cn)})],r);case $M:if(e.length)return OJ(n=e.props,function(o){switch(hs(o,r=/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":dd(gl(e,{props:[Qt(o,/:(read-\w+)/,":"+Eh+"$1")]})),dd(gl(e,{props:[o]})),K$(e,{props:N5(n,r)});break;case "::placeholder":dd(gl(e,{props:[Qt(o,/:(plac\w+)/,":"+Cn+"input-$1")]})),dd(gl(e,{props:[Qt(o,/:(plac\w+)/,":"+Eh+"$1")]})),dd(gl(e,{props:[Qt(o,/:(plac\w+)/,Un+"input-$1")]})),dd(gl(e,{props:[o]})),K$(e,{props:N5(n,r)});break}return ""})}}const _5="data-ant-cssinjs-cache-path",KB="_FILE_STYLE__";let Kc,YB=true;function qJ(){if(!Kc&&(Kc={},yi())){const e=document.createElement("div");e.className=_5,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(r=>{const[o,i]=r.split(":");Kc[o]=i;});const n=document.querySelector(`style[${_5}]`);n&&(YB=false,n.parentNode?.removeChild(n)),document.body.removeChild(e);}}function GJ(e){return qJ(),!!Kc[e]}function WJ(e){const t=Kc[e];let n=null;if(t&&yi())if(YB)n=KB;else {const r=document.querySelector(`style[${xs}="${Kc[e]}"]`);r?n=r.innerHTML:delete Kc[e];}return [n,t]}const KJ="_skip_check_",XB="_multi_value_";function dx(e,t){return (t?ep(P5(e),jJ([UJ,D5])):ep(P5(e),D5)).replace(/\{%%%\:[^;];}/g,";")}function YJ(e){return typeof e=="object"&&e&&(KJ in e||XB in e)}function L5(e,t,n="high"){if(!t)return e;const r=zB({hashCls:t,hashPriority:n});return e.split(",").map(i=>{const a=i.trim().split(/\s+/);let c=a[0]||"";const u=c.match(/^\w+/)?.[0]||"";return c=`${u}${r}${c.slice(u.length)}`,[c,...a.slice(1)].join(" ")}).join(",")}const X$=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:true,parentSelectors:[]})=>{const{hashId:i,layer:a,path:c,hashPriority:u,transformers:d=[],linters:m=[]}=t;let p="",g={};function b(C){const w=C.getName(i);if(!g[w]){const[$]=X$(C.style,t,{root:false,parentSelectors:o});g[w]=`@keyframes ${C.getName(i)}${$}`;}}function y(C,w=[]){return C.forEach($=>{Array.isArray($)?y($,w):$&&w.push($);}),w}return y(Array.isArray(e)?e:[e]).forEach(C=>{const w=typeof C=="string"&&!n?{}:C;if(typeof w=="string")p+=`${w} `;else if(w._keyframe)b(w);else {const $=d.reduce((M,T)=>T?.visit?.(M)||M,w);Object.keys($).forEach(M=>{const T=$[M];if(typeof T=="object"&&T&&(M!=="animationName"||!T._keyframe)&&!YJ(T)){let R=false,I=M.trim(),P=false;(n||r)&&i?I.startsWith("@")?R=true:I==="&"?I=L5("",i,u):I=L5(M,i,u):n&&!i&&(I==="&"||I==="")&&(I="",P=true);const[N,O]=X$(T,t,{root:P,injectHash:R,parentSelectors:[...o,I]});g={...g,...O},p+=`${I}${N}`;}else {let R=function(P,N){const O=P.replace(/[A-Z]/g,L=>`-${L.toLowerCase()}`);let _=N;!TJ[P]&&typeof _=="number"&&_!==0&&(_=`${_}px`),P==="animationName"&&N?._keyframe&&(b(N),_=N.getName(i)),p+=`${O}:${_};`;};const I=T?.value??T;typeof T=="object"&&T?.[XB]&&Array.isArray(I)?I.forEach(P=>{R(M,P);}):bJ(I)&&R(M,I);}});}}),n?a&&(p&&(p=`@layer ${a.name} {${p}}`),a.dependencies&&(g[`@layer ${a.name}`]=a.dependencies.map(C=>`@layer ${C}, ${a.name};`).join(` `))):p=`{${p}}`,[p,g]};function QB(e,t){return Qh(`${e.join("%")}${t}`)}const XJ="style";function Q$(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:a,order:c=0}=e,{mock:u,hashPriority:d,container:m,transformers:p,linters:g,cache:b,layer:y,autoPrefix:S}=f.useContext(su),C=[r||""];y&&C.push("layer"),C.push(...n);let w=W$;wM(XJ,C,()=>{const $=C.join("|");if(GJ($)){const[N,O]=WJ($);if(N)return [N,O,{},a,c]}const M=t(),[T,R]=X$(M,{hashId:r,hashPriority:d,layer:y?o:void 0,path:n.join("-"),transformers:p,linters:g}),I=dx(T,S||false),P=QB(C,I);return [I,P,R,a,c]},($,M)=>{const[,T]=$;M&&W$&&Zh(T,{mark:xs,attachTo:m});},$=>{const[M,T,R,,I]=$;if(w&&M!==KB){const P={mark:xs,prepend:y?false:"queue",attachTo:m,priority:I},N=typeof i=="function"?i():i;N&&(P.csp={nonce:N});const O=[],_=[];Object.keys(R).forEach(H=>{H.startsWith("@layer")?O.push(H):_.push(H);}),O.forEach(H=>{Nl(dx(R[H],S||false),`_layer-${H}`,{...P,prepend:true});});const L=Nl(M,T,P);L[Wc]=b.instanceId,_.forEach(H=>{Nl(dx(R[H],S||false),`_effect-${H}`,P);});}});}const QJ="cssVar",ZJ=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:a,hashId:c,scope:u=""}=e,{cache:{instanceId:d},container:m,hashPriority:p}=f.useContext(su),{_tokenKey:g}=a,b=[...e.path,n,u,g];return wM(QJ,b,()=>{const S=t(),[C,w]=kB(S,n,{prefix:r,unitless:o,ignore:i,scope:u,hashPriority:p,hashCls:c}),$=QB(b,w);return [C,w,$,n]},([,,S])=>{W$&&Zh(S,{mark:xs,attachTo:m});},([,S,C])=>{if(!S)return;const w=Nl(S,C,{mark:xs,prepend:"queue",attachTo:m,priority:-999});w[Wc]=d,w.setAttribute(xM,n);})};class Bt{name;style;constructor(t,n){this.name=t,this.style=n;}getName(t=""){return t?`${t}-${this.name}`:this.name}_keyframe=true}function fd(e){return e.notSplit=true,e}fd(["borderTop","borderBottom"]),fd(["borderTop"]),fd(["borderBottom"]),fd(["borderLeft","borderRight"]),fd(["borderLeft"]),fd(["borderRight"]);function Sr(e){"@babel/helpers - typeof";return Sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sr(e)}function JJ(e){if(Array.isArray(e))return e}function eee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,c=[],u=true,d=false;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1;}else for(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(m){d=true,o=m;}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return c}}function tee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RM(e,t){return JJ(e)||eee(e,t)||yM(e,t)||tee()}function nee(e,t){if(Sr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function ZB(e){var t=nee(e,"string");return Sr(t)=="symbol"?t:t+""}function yt(e,t,n){return (t=ZB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function B5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r);}return n}function Jn(e){for(var t=1;t1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>dee&&(n.map.delete(i),n.lastAccessBeat.delete(i));}),this.accessBeat=0;}}}]),e})(),j5=new fee;function mee(e,t){return W.useMemo(function(){var n=j5.get(t);if(n)return n;var r=e();return j5.set(t,r),r},t)}var hee=function(){return {}};function pee(e){var t=e.useCSP,n=t===void 0?hee:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,c=e.getCompUnitless;function u(g,b,y,S){var C=Array.isArray(g)?g[0]:g;function w(N){return "".concat(String(C)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var $=S?.unitless||{},M=typeof c=="function"?c(g):{},T=Jn(Jn({},M),{},yt({},w("zIndexPopup"),true));Object.keys($).forEach(function(N){T[w(N)]=$[N];});var R=Jn(Jn({},S),{},{unitless:T,prefixToken:w}),I=m(g,b,y,R),P=d(C,y,R);return function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,_=I(N,O),L=P(O);return [_,L]}}function d(g,b,y){var S=y.unitless,C=y.prefixToken,w=y.ignore;return function($){var M=r(),T=M.cssVar,R=M.realToken;return ZJ({path:[g],prefix:T.prefix,key:T.key,unitless:S,ignore:w,token:R,scope:$},function(){var I=V5(g,R,b),P=F5(g,R,I,{deprecatedTokens:y?.deprecatedTokens});return I&&Object.keys(I).forEach(function(N){P[C(N)]=P[N],delete P[N];}),P}),T?.key}}function m(g,b,y){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},C=Array.isArray(g)?g:[g,g],w=RM(C,1),$=w[0],M=C.join("-"),T=e.layer||{name:"antd"};return function(R){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,P=r(),N=P.theme,O=P.realToken,_=P.hashId,L=P.token,H=P.cssVar,U=P.zeroRuntime,q=f.useMemo(function(){return U},[]);if(q)return _;var V=o(),z=V.rootPrefixCls,F=V.iconPrefixCls,G=n(),Y="css",Q=mee(function(){var ee=new Set;return Object.keys(S.unitless||{}).forEach(function(te){ee.add(Ob(te,H.prefix)),ee.add(Ob(te,k5($,H.prefix)));}),see(Y,ee)},[Y,$,H?.prefix]),D=uee(),B=D.max,K=D.min,J={theme:N,token:L,hashId:_,nonce:function(){return G.nonce},clientOnly:S.clientOnly,layer:T,order:S.order||-999};return typeof i=="function"&&Q$(Jn(Jn({},J),{},{clientOnly:false,path:["Shared",z]}),function(){return i(L,{prefix:{rootPrefixCls:z,iconPrefixCls:F},csp:G})}),Q$(Jn(Jn({},J),{},{path:[M,R,F]}),function(){if(S.injectStyle===false)return [];var ee=cee(L),te=ee.token,ne=ee.flush,ae=V5($,O,y),oe=".".concat(R),re=F5($,O,ae,{deprecatedTokens:S.deprecatedTokens});ae&&Sr(ae)==="object"&&Object.keys(ae).forEach(function(Re){ae[Re]="var(".concat(Ob(Re,k5($,H.prefix)),")");});var ce=Ht(te,{componentCls:oe,prefixCls:R,iconCls:".".concat(F),antCls:".".concat(z),calc:Q,max:B,min:K},ae),he=b(ce,{hashId:_,prefixCls:R,rootPrefixCls:z,iconPrefixCls:F});ne($,re);var me=typeof a=="function"?a(ce,R,I,S.resetFont):null;return [S.resetStyle===false?null:me,he]}),_}}function p(g,b,y){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},C=m(g,b,y,Jn({resetStyle:false,order:-998},S)),w=function(M){var T=M.prefixCls,R=M.rootCls,I=R===void 0?T:R;return C(T,I),null};return w}return {genStyleHooks:u,genSubStyleComponent:p,genComponentStyleHook:m}}const _l=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Bb(e){return (e+8)/e}function gee(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Bb(n)}))}const vee="6.2.2",AM={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},nf={...AM,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:false,motion:true},bee={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Dr=Math.round;function mx(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const U5=(e,t,n)=>n===0?e:e/100;function jm(e,t){const n=t||255;return e>n?n:e<0?0:e}class ln{isValid=true;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_s;_l;_v;_max;_min;_brightness;constructor(t){function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else {const i=bee[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"));}}else if(t instanceof ln)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=jm(t.r),this.g=jm(t.g),this.b=jm(t.b),this.a=typeof t.a=="number"?jm(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Dr(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax();}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else {const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1));}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=c=>(r[c]-this[c])*o+this[c],a={r:Dr(i("r")),g:Dr(i("g")),b:Dr(i("b")),a:Dr(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Dr((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Dr(this.a*255).toString(16);t+=i.length===2?i:"0"+i;}return t}toHsl(){return {h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Dr(this.getHSLSaturation()*100),r=Dr(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return {h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return {r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=jm(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1);}fromHsl({h:t,s:n,l:r,a:o}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const b=Dr(r*255);this.r=b,this.g=b,this.b=b;return}let a=0,c=0,u=0;const d=i/60,m=(1-Math.abs(2*r-1))*n,p=m*(1-Math.abs(d%2-1));d>=0&&d<1?(a=m,c=p):d>=1&&d<2?(a=p,c=m):d>=2&&d<3?(c=m,u=p):d>=3&&d<4?(c=p,u=m):d>=4&&d<5?(a=p,u=m):d>=5&&d<6&&(a=m,u=p);const g=r-m/2;this.r=Dr((a+g)*255),this.g=Dr((c+g)*255),this.b=Dr((u+g)*255);}fromHsv({h:t,s:n,v:r,a:o}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof o=="number"?o:1;const a=Dr(r*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const c=i/60,u=Math.floor(c),d=c-u,m=Dr(r*(1-n)*255),p=Dr(r*(1-n*d)*255),g=Dr(r*(1-n*(1-d))*255);switch(u){case 0:this.g=g,this.b=m;break;case 1:this.r=p,this.b=m;break;case 2:this.r=m,this.b=g;break;case 3:this.r=m,this.g=p;break;case 4:this.r=g,this.g=m;break;default:this.g=m,this.b=p;break}}fromHsvString(t){const n=mx(t,U5);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]});}fromHslString(t){const n=mx(t,U5);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]});}fromRgbString(t){const n=mx(t,(r,o)=>o.includes("%")?Dr(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3];}}const Kv=2,q5=.16,yee=.05,See=.05,Cee=.15,rz=5,oz=4,xee=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function G5(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Kv*t:Math.round(e.h)+Kv*t:r=n?Math.round(e.h)+Kv*t:Math.round(e.h)-Kv*t,r<0?r+=360:r>=360&&(r-=360),r}function W5(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-q5*t:t===oz?r=e.s+q5:r=e.s+yee*t,r>1&&(r=1),n&&t===rz&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function K5(e,t,n){let r;return n?r=e.v+See*t:r=e.v-Cee*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function zp(e,t={}){const n=[],r=new ln(e),o=r.toHsv();for(let i=rz;i>0;i-=1){const a=new ln({h:G5(o,i,true),s:W5(o,i,true),v:K5(o,i,true)});n.push(a);}n.push(r);for(let i=1;i<=oz;i+=1){const a=new ln({h:G5(o,i),s:W5(o,i),v:K5(o,i)});n.push(a);}return t.theme==="dark"?xee.map(({index:i,amount:a})=>new ln(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const hx={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},J$=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];J$.primary=J$[5];const e2=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];e2.primary=e2[5];const t2=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];t2.primary=t2[5];const n2=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];n2.primary=n2[5];const r2=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];r2.primary=r2[5];const o2=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];o2.primary=o2[5];const i2=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];i2.primary=i2[5];const a2=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];a2.primary=a2[5];const x0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];x0.primary=x0[5];const s2=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];s2.primary=s2[5];const l2=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];l2.primary=l2[5];const c2=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];c2.primary=c2[5];const u2=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];u2.primary=u2[5];const px={red:J$,volcano:e2,orange:t2,gold:n2,yellow:r2,lime:o2,green:i2,cyan:a2,blue:x0,geekblue:s2,purple:l2,magenta:c2,grey:u2};function iz(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,m=t(c),p=t(r),g=t(o),b=t(i),y=t(a),S=n(u,d),C=e.colorLink||e.colorInfo,w=t(C),$=new ln(b[1]).mix(new ln(b[3]),50).toHexString();return {...S,colorPrimaryBg:m[1],colorPrimaryBgHover:m[2],colorPrimaryBorder:m[3],colorPrimaryBorderHover:m[4],colorPrimaryHover:m[5],colorPrimary:m[6],colorPrimaryActive:m[7],colorPrimaryTextHover:m[8],colorPrimaryText:m[9],colorPrimaryTextActive:m[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:b[1],colorErrorBgHover:b[2],colorErrorBgFilledHover:$,colorErrorBgActive:b[3],colorErrorBorder:b[3],colorErrorBorderHover:b[4],colorErrorHover:b[5],colorError:b[6],colorErrorActive:b[7],colorErrorTextHover:b[8],colorErrorText:b[9],colorErrorTextActive:b[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:y[1],colorInfoBgHover:y[2],colorInfoBorder:y[3],colorInfoBorderHover:y[4],colorInfoHover:y[4],colorInfo:y[6],colorInfoActive:y[7],colorInfoTextHover:y[8],colorInfoText:y[9],colorInfoTextActive:y[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],colorBgMask:new ln("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const wee=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function $ee(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return {motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...wee(r)}}const az=e=>{const{controlHeight:t}=e;return {controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},sz=e=>{const t=gee(e),n=t.map(m=>m.size),r=t.map(m=>m.lineHeight),o=n[1],i=n[0],a=n[2],c=r[1],u=r[0],d=r[2];return {fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:c,lineHeightLG:d,lineHeightSM:u,fontHeight:Math.round(c*o),fontHeightLG:Math.round(d*a),fontHeightSM:Math.round(u*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function Eee(e){const{sizeUnit:t,sizeStep:n}=e;return {sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Ii=(e,t)=>new ln(e).setA(t).toRgbString(),md=(e,t)=>new ln(e).darken(t).toHexString(),Mee=e=>{const t=zp(e);return {1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Ree=(e,t)=>{const n=e||"#fff",r=t||"#000";return {colorBgBase:n,colorTextBase:r,colorText:Ii(r,.88),colorTextSecondary:Ii(r,.65),colorTextTertiary:Ii(r,.45),colorTextQuaternary:Ii(r,.25),colorFill:Ii(r,.15),colorFillSecondary:Ii(r,.06),colorFillTertiary:Ii(r,.04),colorFillQuaternary:Ii(r,.02),colorBgSolid:Ii(r,1),colorBgSolidHover:Ii(r,.75),colorBgSolidActive:Ii(r,.95),colorBgLayout:md(n,4),colorBgContainer:md(n,0),colorBgElevated:md(n,0),colorBgSpotlight:Ii(r,.85),colorBgBlur:"transparent",colorBorder:md(n,15),colorBorderDisabled:md(n,15),colorBorderSecondary:md(n,6)}};function Hy(e){hx.pink=hx.magenta,px.pink=px.magenta;const t=Object.keys(AM).map(n=>{const r=e[n]===hx[n]?px[n]:zp(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return {...e,...t,...iz(e,{generateColorPalettes:Mee,generateNeutralColorPalettes:Ree}),...sz(e.fontSize),...Eee(e),...az(e),...$ee(e)}}const NM=C0(Hy),rp={token:nf,override:{override:nf},hashed:true},PM=W.createContext(rp);function gx(e){return e>=0&&e<=255}function fh(e,t){const{r:n,g:r,b:o,a:i}=new ln(e).toRgb();if(i<1)return e;const{r:a,g:c,b:u}=new ln(t).toRgb();for(let d=.01;d<=1;d+=.01){const m=Math.round((n-a*(1-d))/d),p=Math.round((r-c*(1-d))/d),g=Math.round((o-u*(1-d))/d);if(gx(m)&&gx(p)&&gx(g))return new ln({r:m,g:p,b:g,a:Math.round(d*100)/100}).toRgbString()}return new ln({r:n,g:r,b:o,a:1}).toRgbString()}function lz(e){const{override:t,...n}=e,r={...t};Object.keys(nf).forEach(g=>{delete r[g];});const o={...n,...r},i=480,a=576,c=768,u=992,d=1200,m=1600;return o.motion===false&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:fh(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:fh(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:fh(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:fh(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowSecondary:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTertiary:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:m-1,screenXXL:m,screenXXLMin:m,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` 0 1px 2px -2px ${new ln("rgba(0, 0, 0, 0.16)").toRgbString()}, 0 3px 6px 0 ${new ln("rgba(0, 0, 0, 0.12)").toRgbString()}, 0 5px 12px 4px ${new ln("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerLeft:` 6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerUp:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerDown:` 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const cz={lineHeight:true,lineHeightSM:true,lineHeightLG:true,lineHeightHeading1:true,lineHeightHeading2:true,lineHeightHeading3:true,lineHeightHeading4:true,lineHeightHeading5:true,opacityLoading:true,fontWeightStrong:true,zIndexPopupBase:true,zIndexBase:true,opacityImage:true},Tee={motionBase:true,motionUnit:true},Aee={screenXS:true,screenXSMin:true,screenXSMax:true,screenSM:true,screenSMMin:true,screenSMMax:true,screenMD:true,screenMDMin:true,screenMDMax:true,screenLG:true,screenLGMin:true,screenLGMax:true,screenXL:true,screenXLMin:true,screenXLMax:true,screenXXL:true,screenXXLMin:true},uz=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=lz(a),i&&Object.entries(i).forEach(([c,u])=>{const{theme:d,...m}=u;let p=m;d&&(p=uz({...a,...m},{override:m},d)),a[c]=p;}),a};function Hr(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=W.useContext(PM),a={prefix:o?.prefix??"ant",key:o?.key??"css-var-root"},c=`${vee}-${t||""}`,u=n||NM,[d,m,p]=RJ(u,[nf,e],{salt:c,override:r,getComputedToken:uz,cssVar:{...a,unitless:cz,ignore:Tee,preserve:Aee}});return [u,p,t?m:"",d,a,!!i]}const ja={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},cn=(e,t=false)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),bu=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),w0=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Nee=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Pee=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let c={};return r!==false&&(c={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...c,...a,[o]:a}}},ha=(e,t)=>({outline:`${ie(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Si=(e,t)=>({"&:focus-visible":ha(e,t)}),dz=e=>({[`.${e}`]:{...bu(),[`.${e} .${e}-icon`]:{display:"block"}}}),Iee=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Si(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Ut,genComponentStyleHook:Oee,genSubStyleComponent:Rf}=pee({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=f.useContext(xt);return {rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=Hr();return {theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=f.useContext(xt);return e??{}},getResetStyles:(e,t)=>{const n=Nee(e);return [n,{"&":n},dz(t?.prefix.iconPrefixCls??Ly)]},getCommonStyle:Pee,getCompUnitless:()=>cz}),dr=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return [i=>`${n}${i}`,(i,a)=>a?`var(${n}${i}, ${a})`:`var(${n}${i})`]};function Vy(e,t){return _l.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],c=e[`${r}7`];return {...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:c})}},{})}const Dee=(e,t)=>(Hr(),Q$({hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>dz(e)));var _ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const IM=f.createContext({});function fz(e){return e?.getRootNode?.()}function Lee(e){return fz(e)instanceof ShadowRoot}function $0(e){return Lee(e)?fz(e):null}function Bee(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function zee(e,t){xr(e,`[@ant-design/icons] ${t}`);}function Y5(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function X5(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];return n==="class"?(t.className=r,delete t.class):(delete t[n],t[Bee(n)]=r),t},{})}function d2(e,t,n){return n?W.createElement(e.tag,{key:t,...X5(e.attrs),...n},(e.children||[]).map((r,o)=>d2(r,`${t}-${e.tag}-${o}`))):W.createElement(e.tag,{key:t,...X5(e.attrs)},(e.children||[]).map((r,o)=>d2(r,`${t}-${e.tag}-${o}`)))}function mz(e){return zp(e)[0]}function hz(e){return e?Array.isArray(e)?e:[e]:[]}const kee=` .anticon { display: inline-flex; align-items: center; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .anticon > * { line-height: 1; } .anticon svg { display: inline-block; vertical-align: inherit; } .anticon::before { display: none; } .anticon .anticon-icon { display: block; } .anticon[tabindex] { cursor: pointer; } .anticon-spin::before, .anticon-spin { display: inline-block; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; } @-webkit-keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `,Fee=e=>{const{csp:t,prefixCls:n,layer:r}=f.useContext(IM);let o=kee;n&&(o=o.replace(/anticon/g,n)),r&&(o=`@layer ${r} { ${o} }`),f.useEffect(()=>{const i=e.current,a=$0(i);Nl(o,"@ant-design-icons",{prepend:!r,csp:t,attachTo:a});},[]);},Mh={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:false};function Hee({primaryColor:e,secondaryColor:t}){Mh.primaryColor=e,Mh.secondaryColor=t||mz(e),Mh.calculated=!!t;}function Vee(){return {...Mh}}const Tf=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...c}=e,u=f.useRef(null);let d=Mh;if(i&&(d={primaryColor:i,secondaryColor:a||mz(i)}),Fee(u),zee(Y5(t),`icon should be icon definiton, but got ${t}`),!Y5(t))return null;let m=t;return m&&typeof m.icon=="function"&&(m={...m,icon:m.icon(d.primaryColor,d.secondaryColor)}),d2(m.icon,`svg-${m.name}`,{className:n,onClick:r,style:o,"data-icon":m.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...c,ref:u})};Tf.displayName="IconReact";Tf.getTwoToneColors=Vee;Tf.setTwoToneColors=Hee;function pz(e){const[t,n]=hz(e);return Tf.setTwoToneColors({primaryColor:t,secondaryColor:n})}function jee(){const e=Tf.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function f2(){return f2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:c,twoToneColor:u,...d}=e,{prefixCls:m="anticon",rootClassName:p}=f.useContext(IM),g=X(p,m,{[`${m}-${r.name}`]:!!r.name,[`${m}-spin`]:!!o||r.name==="loading"},n);let b=a;b===void 0&&c&&(b=-1);const y=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[S,C]=hz(u);return f.createElement("span",f2({role:"img","aria-label":r.name},d,{ref:t,tabIndex:b,onClick:c,className:g}),f.createElement(Tf,{icon:r,primaryColor:S,secondaryColor:C,style:y}))});Wn.getTwoToneColor=jee;Wn.setTwoToneColor=pz;function m2(){return m2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,m2({},e,{ref:t,icon:_ee})),OM=f.forwardRef(Uee);var qee={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function h2(){return h2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,h2({},e,{ref:t,icon:qee})),kp=f.forwardRef(Gee);var Wee={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,p2({},e,{ref:t,icon:Wee})),Os=f.forwardRef(Kee);var Yee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function g2(){return g2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,g2({},e,{ref:t,icon:Yee})),Fp=f.forwardRef(Xee);var Qee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function v2(){return v2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,v2({},e,{ref:t,icon:Qee})),DM=f.forwardRef(Zee),gz=f.createContext({});function Jee({children:e,...t}){return f.createElement(gz.Provider,{value:t},e)}function ete(e){const[,t]=f.useReducer(i=>i+1,0),n=f.useRef(e),r=Rt(()=>n.current),o=Rt(i=>{n.current=typeof i=="function"?i(n.current):i,t();});return [r,o]}const ps="none",Yv="appear",Xv="enter",Qv="leave",Q5="none",ia="prepare",Nd="start",Pd="active",_M="end",vz="prepared";function Z5(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function tte(e,t){const n={animationend:Z5("Animation","AnimationEnd"),transitionend:Z5("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const nte=tte(yi(),typeof window<"u"?window:{});let bz={};yi()&&({style:bz}=document.createElement("div"));const Zv={};function yz(e){if(Zv[e])return Zv[e];const t=nte[e];if(t){const n=Object.keys(t),r=n.length;for(let o=0;or[1].toUpperCase());return e[n]}return `${e}-${t}`}const ote=(e=>{const t=f.useRef();function n(o){o&&(o.removeEventListener(eI,e),o.removeEventListener(J5,e));}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(eI,e),o.addEventListener(J5,e),t.current=o);}return f.useEffect(()=>()=>{n(t.current),t.current=null;},[]),[r,n]}),xz=yi()?f.useLayoutEffect:f.useEffect,ite=(()=>{const e=f.useRef(null);function t(){Lt.cancel(e.current);}function n(r,o=2){t();const i=Lt(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1);});e.current=i;}return f.useEffect(()=>()=>{t();},[]),[n,t]}),ate=[ia,Nd,Pd,_M],ste=[ia,vz],wz=false,lte=true;function $z(e){return e===Pd||e===_M}const cte=((e,t,n)=>{const[r,o]=y0(Q5),[i,a]=ite();function c(){o(ia,true);}const u=t?ste:ate;return xz(()=>{if(r!==Q5&&r!==_M){const d=u.indexOf(r),m=u[d+1],p=n(r);p===wz?o(m,true):m&&i(g=>{function b(){g.isCanceled()||o(m,true);}p===true?b():Promise.resolve(p).then(b);});}},[e,r]),f.useEffect(()=>()=>{a();},[]),[c,r]});function ute(e,t,n,{motionEnter:r=true,motionAppear:o=true,motionLeave:i=true,motionDeadline:a,motionLeaveImmediately:c,onAppearPrepare:u,onEnterPrepare:d,onLeavePrepare:m,onAppearStart:p,onEnterStart:g,onLeaveStart:b,onAppearActive:y,onEnterActive:S,onLeaveActive:C,onAppearEnd:w,onEnterEnd:$,onLeaveEnd:M,onVisibleChanged:T}){const[R,I]=y0(),[P,N]=ete(ps),[O,_]=y0(null),L=P(),H=f.useRef(false),U=f.useRef(null);function q(){return n()}const V=f.useRef(false);function z(){N(ps),_(null,true);}const F=Rt(ne=>{const ae=P();if(ae===ps)return;const oe=q();if(ne&&!ne.deadline&&ne.target!==oe)return;const re=V.current;let ce;ae===Yv&&re?ce=w?.(oe,ne):ae===Xv&&re?ce=$?.(oe,ne):ae===Qv&&re&&(ce=M?.(oe,ne)),re&&ce!==false&&z();}),[G]=ote(F),Y=ne=>{switch(ne){case Yv:return {[ia]:u,[Nd]:p,[Pd]:y};case Xv:return {[ia]:d,[Nd]:g,[Pd]:S};case Qv:return {[ia]:m,[Nd]:b,[Pd]:C};default:return {}}},Q=f.useMemo(()=>Y(L),[L]),[D,B]=cte(L,!e,ne=>{if(ne===ia){const ae=Q[ia];return ae?ae(q()):wz}return B in Q&&_(Q[B]?.(q(),null)||null),B===Pd&&L!==ps&&(G(q()),a>0&&(clearTimeout(U.current),U.current=setTimeout(()=>{F({deadline:true});},a))),B===vz&&z(),lte}),K=$z(B);V.current=K;const J=f.useRef(null);xz(()=>{if(H.current&&J.current===t)return;I(t);const ne=H.current;H.current=true;let ae;!ne&&t&&o&&(ae=Yv),ne&&t&&r&&(ae=Xv),(ne&&!t&&i||!ne&&c&&!t&&i)&&(ae=Qv);const oe=Y(ae);ae&&(e||oe[ia])?(N(ae),D()):N(ps),J.current=t;},[t]),f.useEffect(()=>{(L===Yv&&!o||L===Xv&&!r||L===Qv&&!i)&&N(ps);},[o,r,i]),f.useEffect(()=>()=>{H.current=false,clearTimeout(U.current);},[]);const ee=f.useRef(false);f.useEffect(()=>{R&&(ee.current=true),R!==void 0&&L===ps&&((ee.current||R)&&T?.(R),ee.current=true);},[R,L]);let te=O;return Q[ia]&&B===Nd&&(te={transition:"none",...te}),[P,B,te,R??t]}function dte(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return !!(o.motionName&&t&&i!==false)}const r=f.forwardRef((o,i)=>{const{visible:a=true,removeOnLeave:c=true,forceRender:u,children:d,motionName:m,leavedClassName:p,eventProps:g}=o,{motion:b}=f.useContext(gz),y=n(o,b),S=f.useRef();function C(){return ef(S.current)}const[w,$,M,T]=ute(y,a,C,o),R=w(),I=f.useRef(T);T&&(I.current=true);const P=f.useMemo(()=>{const _={};return Object.defineProperties(_,{nativeElement:{enumerable:true,get:C},inMotion:{enumerable:true,get:()=>()=>w()!==ps},enableMotion:{enumerable:true,get:()=>()=>y}}),_},[]);f.useImperativeHandle(i,()=>P,[]);let N;const O={...g,visible:a};if(!d)N=null;else if(R===ps)T?N=d({...O},S):!c&&I.current&&p?N=d({...O,className:p},S):u||!c&&!p?N=d({...O,style:{display:"none"}},S):N=null;else {let _;$===ia?_="prepare":$z($)?_="active":$===Nd&&(_="start");const L=tI(m,`${R}-${_}`);N=d({...O,className:X(tI(m,R),{[L]:L&&_,[m]:typeof m=="string"}),style:M},S);}return f.isValidElement(N)&&vu(N)&&(Ql(N)||(N=f.cloneElement(N,{ref:S}))),N});return r.displayName="CSSMotion",r}const vo=dte(rte),b2="add",y2="keep",S2="remove",vx="removed";function fte(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function C2(e=[]){return e.map(fte)}function mte(e=[],t=[]){let n=[],r=0;const o=t.length,i=C2(e),a=C2(t);i.forEach(d=>{let m=false;for(let p=r;p({...b,status:b2}))),r=p),n.push({...g,status:y2}),r+=1,m=true;break}}m||n.push({...d,status:S2});}),r({...d,status:b2}))));const c={};return n.forEach(({key:d})=>{c[d]=(c[d]||0)+1;}),Object.keys(c).filter(d=>c[d]>1).forEach(d=>{n=n.filter(({key:m,status:p})=>m!==d||p!==S2),n.forEach(m=>{m.key===d&&(m.status=y2);});}),n}function x2(){return x2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const d=i.find(({key:m})=>u.key===m);return !(d&&d.status===vx&&u.status===S2)})}}removeKey=o=>{this.setState(i=>({keyEntities:i.keyEntities.map(c=>c.key!==o?c:{...c,status:vx})}),()=>{const{keyEntities:i}=this.state;i.filter(({status:c})=>c!==vx).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved();});};render(){const{keyEntities:o}=this.state,{component:i,children:a,onVisibleChanged:c,onAllRemoved:u,...d}=this.props,m=i||f.Fragment,p={};return hte.forEach(g=>{p[g]=d[g],delete d[g];}),delete d.keys,f.createElement(m,d,o.map(({status:g,...b},y)=>{const S=g===b2||g===y2;return f.createElement(t,x2({},p,{key:b.key,visible:S,eventProps:b,onVisibleChanged:C=>{c?.(C,{key:b.key}),C||this.removeKey(b.key);}}),(C,w)=>a({...C,index:y},w))}))}}return n}const gte=pte(),vte=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name noValidate nonce open optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap`,bte=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,yte=`${vte} ${bte}`.split(/[\s\n]+/),Ste="aria-",Cte="data-";function nI(e,t){return e.indexOf(t)===0}function po(e,t=false){let n;t===false?n={aria:true,data:true,attr:true}:t===true?n={aria:true}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||nI(o,Ste))||n.data&&nI(o,Cte)||n.attr&&yte.includes(o))&&(r[o]=e[o]);}),r}const Ez={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var xte={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true};function op(e){"@babel/helpers - typeof";return op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},op(e)}function rI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r);}return n}function oI(e){for(var t=1;tkb.reduce((e,t)=>({...e,...t}),pa.Modal);function Rte(e){if(e){const t={...e};return kb.push(t),zb=aI(),()=>{kb=kb.filter(n=>n!==t),zb=aI();}}zb={...pa.Modal};}function Rz(){return zb}const LM=f.createContext(void 0),No=(e,t)=>{const n=f.useContext(LM),r=f.useMemo(()=>{const i=t||pa[e],a=n?.[e]??{};return {...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=f.useMemo(()=>{const i=n?.locale;return n?.exist&&!i?pa.locale:i},[n]);return [r,o]},Tte="internalMark",Ate=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;f.useEffect(()=>Rte(t?.Modal),[t]);const o=f.useMemo(()=>({...t,exist:true}),[t]);return f.createElement(LM.Provider,{value:o},n)};function sI(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r]);});}),t}const Qr=e=>e!=null,Ll=e=>{if(!e)return;const{closable:t,closeIcon:n}=e;return {closable:t,closeIcon:n}},Tz={},lI=(e,t)=>{if(!e&&(e===false||t===false||t===null))return false;if(e===void 0&&t===void 0)return null;let n={closeIcon:typeof t!="boolean"&&t!==null?t:void 0};return e&&typeof e=="object"&&(n={...n,...e}),n},Nte=(e,t,n)=>e===false?false:e?sI(n,t,e):t===false?false:t?sI(n,t):n.closable?n:false,Pte=(e,t,n)=>{const{closeIconRender:r}=t,{closeIcon:o,...i}=e;let a=o;const c=po(i,true);return Qr(a)&&(r&&(a=r(a)),a=W.isValidElement(a)?W.cloneElement(a,{"aria-label":n,...a.props,...c}):W.createElement("span",{"aria-label":n,...c},a)),[a,c]},Az=(e,t,n=Tz,r="Close")=>{const o=lI(e?.closable,e?.closeIcon),i=lI(t?.closable,t?.closeIcon),a={closeIcon:W.createElement(Os,null),...n},c=Nte(o,i,a),u=typeof c!="boolean"?!!c?.disabled:false;if(c===false)return [false,null,u,{}];const[d,m]=Pte(c,a,r);return [true,d,u,m]},BM=(e,t,n=Tz)=>{const[r]=No("global",pa.global);return W.useMemo(()=>Az(e,t,{closeIcon:W.createElement(Os,null),...n},r.close),[e,t,n,r.close])},Nz=()=>W.useReducer(e=>e+1,0),cI=e=>e&&typeof e=="object"?e:typeof e=="boolean"?{enabled:e,blur:e}:{},Ite=(e,t,n)=>f.useMemo(()=>{const r=cI(e),i={...cI(t),...r},a=i.blur!==false?`${n}-mask-blur`:void 0;return [i.enabled!==false,{mask:a}]},[e,t,n]),jy=(e,...t)=>{const n=e||{};return t.filter(Boolean).reduce((r,o)=>(Object.keys(o||{}).forEach(i=>{const a=n[i],c=o[i];if(a&&typeof a=="object")if(c&&typeof c=="object")r[i]=jy(a,r[i],c);else {const{_default:u}=a;u&&(r[i]=r[i]||{},r[i][u]=X(r[i][u],c));}else r[i]=X(r[i],c);}),r),{})},Ote=(e,...t)=>f.useMemo(()=>jy.apply(void 0,[e].concat(t)),[e].concat(t)),zM=(...e)=>e.filter(Boolean).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]};}),t),{}),Dte=(...e)=>f.useMemo(()=>zM.apply(void 0,e),[].concat(e)),w2=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{if(r!=="_default"){const o=t[r],i=n[r]||{};n[r]=o?w2(i,o):i;}}),n},Ml=(e,t)=>typeof e=="function"?e(t):e,Xt=(e,t,n,r)=>{const o=e.map(u=>u?Ml(u,n):void 0),i=t.map(u=>u?Ml(u,n):void 0),a=Ote.apply(void 0,[r].concat(Yt(o))),c=Dte.apply(void 0,Yt(i));return f.useMemo(()=>r?[w2(a,r),w2(c,r)]:[a,c],[a,c,r])},uI=e=>{const[t,n]=f.useState(null);return [f.useCallback((o,i,a)=>{const c=t??o,u=Math.min(c||0,o),d=Math.max(c||0,o),m=i.slice(u,d+1).map(e),p=m.some(b=>!a.has(b)),g=[];return m.forEach(b=>{p?(a.has(b)||g.push(b),a.add(b)):(a.delete(b),g.push(b));}),n(p?d:null),g},[t]),n]},dI=e=>e==="horizontal"||e==="vertical",yu=(e,t,n)=>f.useMemo(()=>{const r=dI(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=dI(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),_te=()=>{const[e,t]=f.useState([]),n=f.useCallback(r=>(t(o=>[].concat(Yt(o),[r])),()=>{t(o=>o.filter(i=>i!==r));}),[]);return [e,n]},Uy=W.createContext(void 0),vl=100,Lte=10,kM=vl*Lte,Pz={Modal:vl,Drawer:vl,Popover:vl,Popconfirm:vl,Tooltip:vl,Tour:vl,FloatButton:vl},Bte={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},zte=e=>e in Pz,Su=(e,t)=>{const[,n]=Hr(),r=W.useContext(Uy),o=zte(e);let i;if(t!==void 0)i=[t,t];else {let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Pz[e]:a+=Bte[e],i=[r===void 0?t:a,a];}return i};function $2(e){return Qr(e)&&e===e.window}const Iz=e=>{if(typeof window>"u")return 0;let t=0;return $2(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!$2(e)&&typeof t!="number"&&(t=(e.ownerDocument??e).documentElement?.scrollTop),t};function kte(e,t,n,r){const o=n-t;return e/=r/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function Fte(e,t={}){const{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),a=Iz(i),c=Date.now();let u;const d=()=>{const p=Date.now()-c,g=kte(p>o?o:p,a,e,o);$2(i)?i.scrollTo(window.pageXOffset,g):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=g:i.scrollTop=g,p{Lt.cancel(u);}}const Kn=e=>`${e}-css-var`,Hte=f.createContext(void 0);var bx={exports:{}},lo={};var fI;function Vte(){if(fI)return lo;fI=1;var e=Yl();function t(u){var d="https://react.dev/errors/"+u;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);}catch(t){console.error(t);}}return e(),bx.exports=Vte(),bx.exports}var wo=Oz();const Dz=f.createContext(null);let jte=false;function Ute(e){return jte}const hI=[];function qte(e,t){const[n]=f.useState(()=>yi()?document.createElement("div"):null),r=f.useRef(false),o=f.useContext(Dz),[i,a]=f.useState(hI),c=o||(r.current?void 0:m=>{a(p=>[m,...p]);});function u(){n.parentElement||document.body.appendChild(n),r.current=true;}function d(){n.parentElement?.removeChild(n),r.current=false;}return Mn(()=>(e?o?o(u):u():d(),d),[e]),Mn(()=>{i.length&&(i.forEach(m=>m()),a(hI));},[i]),[n,c]}function Gte(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let o,i;if(e){const u=getComputedStyle(e);r.scrollbarColor=u.scrollbarColor,r.scrollbarWidth=u.scrollbarWidth;const d=getComputedStyle(e,"::-webkit-scrollbar"),m=parseInt(d.width,10),p=parseInt(d.height,10);try{const g=m?`width: ${d.width};`:"",b=p?`height: ${d.height};`:"";Nl(` #${t}::-webkit-scrollbar { ${g} ${b} }`,t);}catch(g){console.error(g),o=m,i=p;}}document.body.appendChild(n);const a=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,c=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Zh(t),{width:a,height:c}}function Wte(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:Gte(e)}function Kte(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const Yte=`rc-util-locker-${Date.now()}`;let pI=0;function Xte(e){const t=!!e,[n]=f.useState(()=>(pI+=1,`${Yte}_${pI}`));Mn(()=>{if(t){const r=Wte(document.body).width,o=Kte();Nl(` html body { overflow-y: hidden; ${o?`width: calc(100% - ${r}px);`:""} }`,n);}else Zh(n);return ()=>{Zh(n);}},[t,n]);}function Qte(){return {...O$}.useId}let gI=0;const vI=Qte(),Zl=vI?(function(t){const n=vI();return t||n}):(function(t){const[n,r]=f.useState("ssr-id");return f.useEffect(()=>{const o=gI;gI+=1,r(`rc_unique_${o}`);},[]),t||n});let kc=[];const Zte=200;let _z=0;const Lz=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-_z=0;r-=1)kc[r].onEsc({top:r===n-1,event:e});}},Bz=()=>{_z=Date.now();};function Jte(){window.addEventListener("keydown",Lz),window.addEventListener("compositionend",Bz);}function ene(){kc.length===0&&(window.removeEventListener("keydown",Lz),window.removeEventListener("compositionend",Bz));}function tne(e,t){const n=Zl(),r=Rt(t),o=()=>{kc.find(a=>a.id===n)||kc.push({id:n,onEsc:r});},i=()=>{kc=kc.filter(a=>a.id!==n);};f.useMemo(()=>{e?o():e||i();},[e]),f.useEffect(()=>{if(e)return o(),Jte(),()=>{i(),ene();}},[e]);}const bI=e=>e===false?false:!yi()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,qy=f.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=true,children:c,onEsc:u}=e,[d,m]=f.useState(n),p=d||n;f.useEffect(()=>{(a||n)&&m(n);},[n,a]);const[g,b]=f.useState(()=>bI(o));f.useEffect(()=>{const R=bI(o);b(()=>R??null);});const[y,S]=qte(p&&!g),C=g??y;Xte(r&&n&&yi()&&(C===y||C===document.body)),tne(n,u);let w=null;c&&vu(c)&&t&&(w=Ql(c));const $=Xl(w,t);if(!p||!yi()||g===void 0)return null;const M=C===false||Ute();let T=c;return t&&(T=f.cloneElement(c,{ref:$})),f.createElement(Dz.Provider,{value:S},M?T:wo.createPortal(T,C))});function nne(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:c}=r||{},{x:u=0,y:d=0}=o,m=f.useRef(null);if(!n||!n.points)return null;const p={position:"absolute"};if(n.autoArrow!==false){const g=n.points[0],b=n.points[1],y=g[0],S=g[1],C=b[0],w=b[1];y===C||!["t","b"].includes(y)?p.top=d:y==="t"?p.top=0:p.bottom=0,S===w||!["l","r"].includes(S)?p.left=u:S==="l"?p.left=0:p.right=0;}return f.createElement("div",{ref:m,className:X(`${t}-arrow`,i),style:{...p,...c}},a)}function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement("div",{style:{zIndex:r},className:X(`${t}-mask`,a&&`${t}-mobile-mask`,c)})):null}const one=f.memo(({children:e})=>e,(e,t)=>t.cache);function zz(e,t,n,r,o,i,a,c){const u="auto",d=e?{}:{left:"-1000vw",top:"-1000vh",right:u,bottom:u};if(!e&&(t||!n)){const{points:m}=r,p=r.dynamicInset||r._experimental?.dynamicInset,g=p&&m[0][1]==="r",b=p&&m[0][0]==="b";g?(d.right=o,d.left=u):(d.left=a,d.right=u),b?(d.bottom=i,d.top=u):(d.top=c,d.bottom=u);}return d}function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{onEsc:n,popup:r,className:o,prefixCls:i,style:a,target:c,onVisibleChanged:u,open:d,keepDom:m,fresh:p,onClick:g,mask:b,arrow:y,arrowPos:S,align:C,motion:w,maskMotion:$,mobile:M,forceRender:T,getPopupContainer:R,autoDestroy:I,portal:P,children:N,zIndex:O,onMouseEnter:_,onMouseLeave:L,onPointerEnter:H,onPointerDownCapture:U,ready:q,offsetX:V,offsetY:z,offsetR:F,offsetB:G,onAlign:Y,onPrepare:Q,onResize:D,stretch:B,targetWidth:K,targetHeight:J}=e,ee=typeof r=="function"?r():r,te=d||m,ne=!!M,[ae,oe,re]=f.useMemo(()=>M?[M.mask,M.maskMotion,M.motion]:[b,$,w],[M,b,$,w]),ce=R?.length>0,[he,me]=f.useState(!R||!ce);Mn(()=>{!he&&ce&&c&&me(true);},[he,ce,c]);const Re=Rt((Se,be)=>{D?.(Se,be),Y();}),se=zz(ne,q,d,C,F,G,V,z);if(!he)return null;const de={};return B&&(B.includes("height")&&J?de.height=J:B.includes("minHeight")&&J&&(de.minHeight=J),B.includes("width")&&K?de.width=K:B.includes("minWidth")&&K&&(de.minWidth=K)),d||(de.pointerEvents="none"),f.createElement(P,{open:T||te,getContainer:R&&(()=>R(c)),autoDestroy:I,onEsc:n},f.createElement(rne,{prefixCls:i,open:d,zIndex:O,mask:ae,motion:oe,mobile:ne}),f.createElement(da,{onResize:Re,disabled:!d},Se=>f.createElement(vo,M2({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,forceRender:T,leavedClassName:`${i}-hidden`},re,{onAppearPrepare:Q,onEnterPrepare:Q,visible:d,onVisibleChanged:be=>{w?.onVisibleChanged?.(be),u(be);}}),({className:be,style:He},Ue)=>{const Pe=X(i,be,o,{[`${i}-mobile`]:ne});return f.createElement("div",{ref:Ar(Se,t,Ue),className:Pe,style:{"--arrow-x":`${S.x||0}px`,"--arrow-y":`${S.y||0}px`,...se,...de,...He,boxSizing:"border-box",zIndex:O,...a},onMouseEnter:_,onMouseLeave:L,onPointerEnter:H,onClick:g,onPointerDownCapture:U},y&&f.createElement(nne,{prefixCls:i,arrow:y,arrowPos:S,align:C}),f.createElement(one,{cache:!d&&!p},ee))})),N)}),E0=f.createContext(null),Fz=f.createContext(null);function yI(e){return e?Array.isArray(e)?e:[e]:[]}function ine(e,t,n){return f.useMemo(()=>{const r=yI(t??e),o=yI(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}const FM=(e=>{if(!e)return false;if(e instanceof Element){if(e.offsetParent)return true;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return true}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return true}}return false});function ane(e=[],t=[],n){const r=(o,i)=>o[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function Hz(e,t,n,r){const{points:o}=n,i=Object.keys(e);for(let a=0;ar.includes(c))&&t.push(n),n=n.parentElement;}return t}function ip(e,t=1){return Number.isNaN(e)?t:e}function Um(e){return ip(parseFloat(e),0)}function SI(e,t){const n={...e};return (t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:c,borderLeftWidth:u,borderRightWidth:d}=Hp(r).getComputedStyle(r),m=r.getBoundingClientRect(),{offsetHeight:p,clientHeight:g,offsetWidth:b,clientWidth:y}=r,S=Um(a),C=Um(c),w=Um(u),$=Um(d),M=ip(Math.round(m.width/b*1e3)/1e3),T=ip(Math.round(m.height/p*1e3)/1e3),R=(b-y-w-$)*M,I=(p-g-S-C)*T,P=S*T,N=C*T,O=w*M,_=$*M;let L=0,H=0;if(o==="clip"){const F=Um(i);L=F*M,H=F*T;}const U=m.x+O-L,q=m.y+P-H,V=U+m.width+2*L-O-_-R,z=q+m.height+2*H-P-N-I;n.left=Math.max(n.left,U),n.top=Math.max(n.top,q),n.right=Math.min(n.right,V),n.bottom=Math.min(n.bottom,z);}),n}function CI(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function xI(e,t){const[n,r]=t||[];return [CI(e.width,n),CI(e.height,r)]}function wI(e=""){return [e[0],e[1]]}function hd(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function hl(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function $I(e){return e.join("")}function Vz(e,t,n,r,o,i,a,c){const[u,d]=f.useState({ready:false,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),m=f.useRef(0),p=f.useMemo(()=>!t||c?[]:R2(t),[t]),g=f.useRef({});e||(g.current={});const y=Rt(()=>{if(t&&n&&e&&!c){let ze=function(kt,Pr,Ir=Re){const $a=U.x+kt,wi=U.y+Pr,Oo=$a+K,jr=wi+B,sc=Math.max($a,Ir.left),Ng=Math.max(wi,Ir.top),lc=Math.min(Oo,Ir.right),Tu=Math.min(jr,Ir.bottom);return Math.max(0,(lc-sc)*(Tu-Ng))},$e=function(){Ae=U.y+_e,Ce=Ae+B,pe=U.x+Xe,Ie=pe+K;};const w=t,$=w.ownerDocument,M=Hp(w),{position:T}=M.getComputedStyle(w),R=w.style.left,I=w.style.top,P=w.style.right,N=w.style.bottom,O=w.style.overflow,_={...o[r],...i},L=$.createElement("div");w.parentElement?.appendChild(L),L.style.left=`${w.offsetLeft}px`,L.style.top=`${w.offsetTop}px`,L.style.position=T,L.style.height=`${w.offsetHeight}px`,L.style.width=`${w.offsetWidth}px`,w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";let H;if(Array.isArray(n))H={x:n[0],y:n[1],width:0,height:0};else {const kt=n.getBoundingClientRect();kt.x=kt.x??kt.left,kt.y=kt.y??kt.top,H={x:kt.x,y:kt.y,width:kt.width,height:kt.height};}const U=w.getBoundingClientRect(),{height:q,width:V}=M.getComputedStyle(w);U.x=U.x??U.left,U.y=U.y??U.top;const{clientWidth:z,clientHeight:F,scrollWidth:G,scrollHeight:Y,scrollTop:Q,scrollLeft:D}=$.documentElement,B=U.height,K=U.width,J=H.height,ee=H.width,te={left:0,top:0,right:z,bottom:F},ne={left:-D,top:-Q,right:G-D,bottom:Y-Q};let{htmlRegion:ae}=_;const oe="visible",re="visibleFirst";ae!=="scroll"&&ae!==re&&(ae=oe);const ce=ae===re,he=SI(ne,p),me=SI(te,p),Re=ae===oe?me:he,se=ce?me:Re;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";const de=w.getBoundingClientRect();w.style.left=R,w.style.top=I,w.style.right=P,w.style.bottom=N,w.style.overflow=O,w.parentElement?.removeChild(L);const Se=ip(Math.round(K/parseFloat(V)*1e3)/1e3),be=ip(Math.round(B/parseFloat(q)*1e3)/1e3);if(Se===0||be===0||Jd(n)&&!FM(n))return;const{offset:He,targetOffset:Ue}=_;let[Pe,ue]=xI(U,He);const[ye,Te]=xI(H,Ue);H.x-=ye,H.y-=Te;const[qe,Ze]=_.points||[],We=wI(Ze),tt=wI(qe),nt=hd(H,We),Ke=hd(U,tt),Oe={..._};let Qe=[tt,We],Xe=nt.x-Ke.x+Pe,_e=nt.y-Ke.y+ue;const ct=ze(Xe,_e),Pt=ze(Xe,_e,me),ut=hd(H,["t","l"]),Dt=hd(U,["t","l"]),wt=hd(H,["b","r"]),Tt=hd(U,["b","r"]),gt=_.overflow||{},{adjustX:ft,adjustY:st,shiftX:Fe,shiftY:Ge}=gt,ve=kt=>typeof kt=="boolean"?kt:kt>=0;let Ae,Ce,pe,Ie;$e();const Le=ve(st),Ye=tt[0]===We[0];if(Le&&tt[0]==="t"&&(Ce>se.bottom||g.current.bt)){let kt=_e;Ye?kt-=B-J:kt=ut.y-Tt.y-ue;const Pr=ze(Xe,kt),Ir=ze(Xe,kt,me);Pr>ct||Pr===ct&&(!ce||Ir>=Pt)?(g.current.bt=true,_e=kt,ue=-ue,Qe=[hl(Qe[0],0),hl(Qe[1],0)]):g.current.bt=false;}if(Le&&tt[0]==="b"&&(Aect||Pr===ct&&(!ce||Ir>=Pt)?(g.current.tb=true,_e=kt,ue=-ue,Qe=[hl(Qe[0],0),hl(Qe[1],0)]):g.current.tb=false;}const it=ve(ft),ht=tt[1]===We[1];if(it&&tt[1]==="l"&&(Ie>se.right||g.current.rl)){let kt=Xe;ht?kt-=K-ee:kt=ut.x-Tt.x-Pe;const Pr=ze(kt,_e),Ir=ze(kt,_e,me);Pr>ct||Pr===ct&&(!ce||Ir>=Pt)?(g.current.rl=true,Xe=kt,Pe=-Pe,Qe=[hl(Qe[0],1),hl(Qe[1],1)]):g.current.rl=false;}if(it&&tt[1]==="r"&&(pect||Pr===ct&&(!ce||Ir>=Pt)?(g.current.lr=true,Xe=kt,Pe=-Pe,Qe=[hl(Qe[0],1),hl(Qe[1],1)]):g.current.lr=false;}Oe.points=[$I(Qe[0]),$I(Qe[1])],$e();const $t=Fe===true?0:Fe;typeof $t=="number"&&(peme.right&&(Xe-=Ie-me.right-Pe,H.x>me.right-$t&&(Xe+=H.x-me.right+$t)));const Mt=Ge===true?0:Ge;typeof Mt=="number"&&(Aeme.bottom&&(_e-=Ce-me.bottom-ue,H.y>me.bottom-Mt&&(_e+=H.y-me.bottom+Mt)));const zt=U.x+Xe,Rn=zt+K,Ot=U.y+_e,Ee=Ot+B,lt=H.x,et=lt+ee,Ct=H.y,_t=Ct+J,fn=Math.max(zt,lt),en=Math.min(Rn,et),Nr=(fn+en)/2-zt,so=Math.max(Ot,Ct),Nn=Math.min(Ee,_t),Vr=(so+Nn)/2-Ot;a?.(t,Oe);let yo=de.right-U.x-(Xe+U.width),Io=de.bottom-U.y-(_e+U.height);Se===1&&(Xe=Math.floor(Xe),yo=Math.floor(yo)),be===1&&(_e=Math.floor(_e),Io=Math.floor(Io));const Zf={ready:true,offsetX:Xe/Se,offsetY:_e/be,offsetR:yo/Se,offsetB:Io/be,arrowX:Nr/Se,arrowY:Vr/be,scaleX:Se,scaleY:be,align:Oe};d(Zf);}}),S=()=>{m.current+=1;const w=m.current;Promise.resolve().then(()=>{m.current===w&&y();});},C=()=>{d(w=>({...w,ready:false}));};return Mn(C,[r]),Mn(()=>{e||C();},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,S]}function jz(){const e=f.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null);},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r();},o*1e3);};return f.useEffect(()=>()=>{t();},[]),n}function sne(e,t,n,r,o){Mn(()=>{if(e&&t&&n){let p=function(){r(),o();};const i=t,a=n,c=R2(i),u=R2(a),d=Hp(a),m=new Set([d,...c,...u]);return m.forEach(g=>{g.addEventListener("scroll",p,{passive:true});}),d.addEventListener("resize",p,{passive:true}),r(),()=>{m.forEach(g=>{g.removeEventListener("scroll",p),d.removeEventListener("resize",p);});}}},[e,t,n]);}function lne(e,t,n,r,o,i,a,c){const u=f.useRef(e);u.current=e;const d=f.useRef(false);f.useEffect(()=>{if(t&&r&&(!o||i)){const p=()=>{d.current=false;},g=S=>{u.current&&!a(S.composedPath?.()?.[0]||S.target)&&!d.current&&c(false);},b=Hp(r);b.addEventListener("pointerdown",p,true),b.addEventListener("mousedown",g,true),b.addEventListener("contextmenu",g,true);const y=$0(n);return y&&(y.addEventListener("mousedown",g,true),y.addEventListener("contextmenu",g,true)),()=>{b.removeEventListener("pointerdown",p,true),b.removeEventListener("mousedown",g,true),b.removeEventListener("contextmenu",g,true),y&&(y.removeEventListener("mousedown",g,true),y.removeEventListener("contextmenu",g,true));}}},[t,n,r,o,i]);function m(){d.current=true;}return m}function cne(){const[e,t]=W.useState(null),[n,r]=W.useState(false),[o,i]=W.useState(false),a=W.useRef(null),c=Rt(d=>{d===false?(a.current=null,r(false)):o&&n?a.current=d:(r(true),t(d),a.current=null,n||i(true));}),u=Rt(d=>{d?(i(false),a.current&&(t(a.current),a.current=null)):(i(false),a.current=null);});return [c,n,e,u]}function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:c,offsetX:u,offsetY:d,arrowPos:m,popupSize:p,motion:g,uniqueContainerClassName:b,uniqueContainerStyle:y}=e,S=`${t}-unique-container`,[C,w]=W.useState(false),$=zz(n,r,o,i,a,c,u,d),M=W.useRef($);r&&(M.current=$);const T={};return p&&(T.width=p.width,T.height=p.height),W.createElement(vo,T2({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,leavedClassName:`${S}-hidden`},g,{visible:o,onVisibleChanged:R=>{w(R);}}),({className:R,style:I})=>{const P=X(S,R,b,{[`${S}-visible`]:C});return W.createElement("div",{className:P,style:{"--arrow-x":`${m?.x||0}px`,"--arrow-y":`${m?.y||0}px`,...M.current,...T,...I,...y}})})},dne=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=cne(),a=f.useMemo(()=>!o||!t?o:t(o),[o,t]),[c,u]=f.useState(null),[d,m]=f.useState(null),p=f.useRef(null),g=Rt(G=>{p.current=G,Jd(G)&&c!==G&&u(G);}),b=f.useRef(null),y=jz(),S=Rt((G,Y)=>{b.current=Y,y(()=>{n(G);},G.delay);}),C=G=>{y(()=>{b.current?.()||n(false);},G);},w=Rt(G=>{i(G);}),[$,M,T,R,I,P,N,,,O,_]=Vz(r,c,a?.target,a?.popupPlacement,a?.builtinPlacements||{},a?.popupAlign,void 0,false),L=f.useMemo(()=>{if(!a)return "";const G=Hz(a.builtinPlacements||{},a.prefixCls||"",O,false);return X(G,a.getPopupClassNameFromAlign?.(O))},[O,a?.getPopupClassNameFromAlign,a?.builtinPlacements,a?.prefixCls]),H=f.useMemo(()=>({show:S,hide:C}),[]);f.useEffect(()=>{_();},[a?.target]);const U=Rt(()=>(_(),Promise.resolve())),q=f.useRef({}),V=f.useContext(E0),z=f.useMemo(()=>({registerSubPopup:(G,Y)=>{q.current[G]=Y,V?.registerSubPopup(G,Y);}}),[V]),F=a?.prefixCls;return f.createElement(Fz.Provider,{value:H},e,a&&f.createElement(E0.Provider,{value:z},f.createElement(kz,{ref:g,portal:qy,onEsc:a.onEsc,prefixCls:F,popup:a.popup,className:X(a.popupClassName,L,`${F}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:true,fresh:true,autoDestroy:false,onVisibleChanged:w,ready:$,offsetX:M,offsetY:T,offsetR:R,offsetB:I,onAlign:_,onPrepare:U,onResize:G=>m({width:G.offsetWidth,height:G.offsetHeight}),arrowPos:{x:P,y:N},align:O,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},f.createElement(une,{prefixCls:F,isMobile:false,ready:$,open:r,align:O,offsetR:R,offsetB:I,offsetX:M,offsetY:T,arrowPos:{x:P,y:N},popupSize:d,motion:a.popupMotion,uniqueContainerClassName:X(a.uniqueContainerClassName,L),uniqueContainerStyle:a.uniqueContainerStyle}))))};function fne(e=qy){return f.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:c,hideAction:u,popupVisible:d,defaultPopupVisible:m,onOpenChange:p,afterOpenChange:g,onPopupVisibleChange:b,afterPopupVisibleChange:y,mouseEnterDelay:S,mouseLeaveDelay:C=.1,focusDelay:w,blurDelay:$,mask:M,maskClosable:T=true,getPopupContainer:R,forceRender:I,autoDestroy:P,popup:N,popupClassName:O,uniqueContainerClassName:_,uniqueContainerStyle:L,popupStyle:H,popupPlacement:U,builtinPlacements:q={},popupAlign:V,zIndex:z,stretch:F,getPopupClassNameFromAlign:G,fresh:Y,unique:Q,alignPoint:D,onPopupClick:B,onPopupAlign:K,arrow:J,popupMotion:ee,maskMotion:te,mobile:ne,...ae}=n,oe=P||false,re=d===void 0,ce=!!ne,he=f.useRef({}),me=f.useContext(E0),Re=f.useMemo(()=>({registerSubPopup:(dt,Vt)=>{he.current[dt]=Vt,me?.registerSubPopup(dt,Vt);}}),[me]),se=f.useContext(Fz),de=Zl(),[Se,be]=f.useState(null),He=f.useRef(null),Ue=Rt(dt=>{He.current=dt,Jd(dt)&&Se!==dt&&be(dt),me?.registerSubPopup(de,dt);}),[Pe,ue]=f.useState(null),ye=f.useRef(null),Te=Rt(dt=>{const Vt=ef(dt);Jd(Vt)&&Pe!==Vt&&(ue(Vt),ye.current=Vt);}),qe={},Ze=Rt(dt=>{const Vt=Pe;return Vt?.contains(dt)||$0(Vt)?.host===dt||dt===Vt||Se?.contains(dt)||$0(Se)?.host===dt||dt===Se||Object.values(he.current).some(Vs=>Vs?.contains(dt)||dt===Vs)}),We=J?{...J!==true?J:{}}:null,[tt,nt]=dn(m||false,d),Ke=tt||false,Oe=f.useMemo(()=>{const dt=typeof i=="function"?i({open:Ke}):i;return f.Children.only(dt)},[i,Ke]),Qe=Oe?.props||{},Xe=Rt(()=>Ke),_e=Rt((dt=0)=>({popup:N,target:Pe,delay:dt,prefixCls:o,popupClassName:O,uniqueContainerClassName:_,uniqueContainerStyle:L,popupStyle:H,popupPlacement:U,builtinPlacements:q,popupAlign:V,zIndex:z,mask:M,maskClosable:T,popupMotion:ee,maskMotion:te,arrow:We,getPopupContainer:R,getPopupClassNameFromAlign:G,id:de,onEsc:Dt}));Mn(()=>{se&&Q&&Pe&&!re&&!me&&(Ke?se.show(_e(S),Xe):se.hide(C));},[Ke,Pe]);const ze=f.useRef(Ke);ze.current=Ke;const ct=Rt(dt=>{wo.flushSync(()=>{Ke!==dt&&(nt(dt),p?.(dt),b?.(dt));});}),Pt=jz(),ut=(dt,Vt=0)=>{if(d!==void 0){Pt(()=>{ct(dt);},Vt);return}if(se&&Q&&re&&!me){dt?se.show(_e(Vt),Xe):se.hide(Vt);return}Pt(()=>{ct(dt);},Vt);};function Dt({top:dt}){dt&&ut(false);}const[wt,Tt]=f.useState(false);Mn(dt=>{(!dt||Ke)&&Tt(true);},[Ke]);const[gt,ft]=f.useState(null),[st,Fe]=f.useState(null),Ge=dt=>{Fe([dt.clientX,dt.clientY]);},[ve,Ae,Ce,pe,Ie,$e,Le,Ye,it,ht,$t]=Vz(Ke,Se,D&&st!==null?st:Pe,U,q,V,K,ce),[Mt,zt]=ine(a,c,u),Rn=Mt.has("click"),Ot=zt.has("click")||zt.has("contextMenu"),Ee=Rt(()=>{wt||$t();});sne(Ke,Pe,Se,Ee,()=>{ze.current&&D&&Ot&&ut(false);}),Mn(()=>{Ee();},[st,U]),Mn(()=>{Ke&&!q?.[U]&&Ee();},[JSON.stringify(V)]);const et=f.useMemo(()=>{const dt=Hz(q,o,ht,D);return X(dt,G?.(ht))},[ht,G,q,o,D]);f.useImperativeHandle(r,()=>({nativeElement:ye.current,popupElement:He.current,forceAlign:Ee}));const[Ct,_t]=f.useState(0),[fn,en]=f.useState(0),Hn=()=>{if(F&&Pe){const dt=Pe.getBoundingClientRect();_t(dt.width),en(dt.height);}},Nr=()=>{Hn(),Ee();},so=dt=>{Tt(false),$t(),g?.(dt),y?.(dt);},Nn=()=>new Promise(dt=>{Hn(),ft(()=>dt);});Mn(()=>{gt&&($t(),gt(),ft(null));},[gt]);function xi(dt,Vt,Vs,Pg,Nu){qe[dt]=(Ya,...Ig)=>{(!Nu||!Nu())&&(Pg?.(Ya),ut(Vt,Vs)),Qe[dt]?.(Ya,...Ig);};}const Vr=Mt.has("touch"),yo=zt.has("touch"),Io=f.useRef(false);(Vr||yo)&&(qe.onTouchStart=(...dt)=>{Io.current=true,ze.current&&yo?ut(false):!ze.current&&Vr&&ut(true),Qe.onTouchStart?.(...dt);}),(Rn||Ot)&&(qe.onClick=(dt,...Vt)=>{ze.current&&Ot?ut(false):!ze.current&&Rn&&(Ge(dt),ut(true)),Qe.onClick?.(dt,...Vt),Io.current=false;});const Zf=lne(Ke,Ot||yo,Pe,Se,M,T,Ze,ut),kt=Mt.has("hover"),Pr=zt.has("hover");let Ir,$a;const wi=()=>Io.current;if(kt){const dt=Vt=>{Ge(Vt);};xi("onMouseEnter",true,S,dt,wi),xi("onPointerEnter",true,S,dt,wi),Ir=Vt=>{(Ke||wt)&&Se?.contains(Vt.target)&&ut(true,S);},D&&(qe.onMouseMove=Vt=>{Qe.onMouseMove?.(Vt);});}Pr&&(xi("onMouseLeave",false,C,void 0,wi),xi("onPointerLeave",false,C,void 0,wi),$a=()=>{ut(false,C);}),Mt.has("focus")&&xi("onFocus",true,w),zt.has("focus")&&xi("onBlur",false,$),Mt.has("contextMenu")&&(qe.onContextMenu=(dt,...Vt)=>{ze.current&&zt.has("contextMenu")?ut(false):(Ge(dt),ut(true)),dt.preventDefault(),Qe.onContextMenu?.(dt,...Vt);});const Oo=f.useRef(false);Oo.current||=I||Ke||wt;const jr={...Qe,...qe},sc={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(dt=>{ae[dt]&&(sc[dt]=(...Vt)=>{jr[dt]?.(...Vt),ae[dt](...Vt);});});const lc={x:$e,y:Le};TB(Ke,Pe,Nr);const Tu=Xl(Te,Ql(Oe)),Au=f.cloneElement(Oe,{...jr,...sc,ref:Tu});return f.createElement(f.Fragment,null,Au,Oo.current&&(!se||!Q)&&f.createElement(E0.Provider,{value:Re},f.createElement(kz,{portal:e,ref:Ue,prefixCls:o,popup:N,className:X(O,!ce&&et),style:H,target:Pe,onMouseEnter:Ir,onMouseLeave:$a,onPointerEnter:Ir,zIndex:z,open:Ke,keepDom:wt,fresh:Y,onClick:B,onPointerDownCapture:Zf,mask:M,motion:ee,maskMotion:te,onVisibleChanged:so,onPrepare:Nn,forceRender:I,autoDestroy:oe,getPopupContainer:R,onEsc:Dt,align:ht,arrow:We,arrowPos:lc,ready:ve,offsetX:Ae,offsetY:Ce,offsetR:pe,offsetB:Ie,onAlign:Ee,stretch:F,targetWidth:Ct/Ye,targetHeight:fn/it,mobile:ne})))})}const Gy=fne(qy);function Uz(e){return e&&W.isValidElement(e)&&e.type===W.Fragment}const qz=(e,t,n)=>W.isValidElement(e)?W.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function kr(e,t){return qz(e,e,t)}const mne=({children:e})=>{const{getPrefixCls:t}=W.useContext(xt),n=t();return W.isValidElement(e)?W.createElement(vo,{visible:true,motionName:`${n}-fade`,motionAppear:true,motionEnter:true,motionLeave:false,removeOnLeave:false},({style:r,className:o})=>kr(e,i=>({className:X(i.className,o),style:{...i.style,...r}}))):e},Jv=[null,null];function hne(e){if(Jv[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:false};}),Jv[0]=e,Jv[1]=t;}return Jv[1]}const Gz=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:o,popup:i}=n,a=typeof i=="function"?i():i,c=hne(o);return {...n,getPopupContainer:null,arrow:false,popup:W.createElement(mne,{key:r},a),builtinPlacements:c}};return W.createElement(dne,{postTriggerProps:t},e)},eo=f.createContext(false),Wz=({children:e,disabled:t})=>{const n=f.useContext(eo);return f.createElement(eo.Provider,{value:t??n},e)},rf=f.createContext(void 0),pne=({children:e,size:t})=>{const n=f.useContext(rf);return f.createElement(rf.Provider,{value:t||n},e)};function gne(){const e=f.useContext(eo),t=f.useContext(rf);return {componentDisabled:e,componentSize:t}}function vne(e,t,n){const r=e||{},o=r.inherit===false||!t?{...rp,hashed:t?.hashed??rp.hashed,cssVar:t?.cssVar}:t,i=f.useId();return Ef(()=>{if(!e)return t;const a={...o.components};Object.keys(e.components||{}).forEach(d=>{a[d]={...a[d],...e.components[d]};});const c=`css-var-${i.replace(/:/g,"")}`,u={prefix:n?.prefixCls,...o.cssVar,...r.cssVar,key:r.cssVar?.key||c};return {...o,...r,token:{...o.token,...r.token},components:a,cssVar:u}},[r,o],(a,c)=>a.some((u,d)=>{const m=c[d];return !Dl(u,m,true)}))}const EI=f.createContext(true);function bne(e){const t=f.useContext(EI),{children:n}=e,[,r]=Hr(),{motion:o}=r,i=f.useRef(false);return i.current||(i.current=t!==o),i.current?f.createElement(EI.Provider,{value:o},f.createElement(Jee,{motion:o},n)):n}const yne=()=>null,Sne=({iconPrefixCls:e,csp:t})=>(Dee(e,t),null),Cne=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let M0,Kz,Yz,Xz;function yx(){return M0||Xh}function xne(){return Kz||Ly}const wne=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(M0=t),n!==void 0&&(Kz=n),"holderRender"in e&&(Xz=o),r&&(Yz=r);},HM=()=>({getPrefixCls:(e,t)=>t||(e?`${yx()}-${e}`:yx()),getIconPrefixCls:xne,getRootPrefixCls:()=>M0||yx(),getTheme:()=>Yz,holderRender:Xz}),$ne=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,form:c,locale:u,componentSize:d,direction:m,space:p,splitter:g,virtual:b,dropdownMatchSelectWidth:y,popupMatchSelectWidth:S,popupOverflow:C,legacyLocale:w,parentContext:$,iconPrefixCls:M,theme:T,componentDisabled:R,segmented:I,statistic:P,spin:N,calendar:O,carousel:_,cascader:L,collapse:H,typography:U,checkbox:q,descriptions:V,divider:z,drawer:F,skeleton:G,steps:Y,image:Q,layout:D,list:B,mentions:K,modal:J,progress:ee,result:te,slider:ne,breadcrumb:ae,masonry:oe,menu:re,pagination:ce,input:he,textArea:me,otp:Re,empty:se,badge:de,radio:Se,rate:be,ribbon:He,switch:Ue,transfer:Pe,avatar:ue,message:ye,tag:Te,table:qe,card:Ze,cardMeta:We,tabs:tt,timeline:nt,timePicker:Ke,upload:Oe,notification:Qe,tree:Xe,colorPicker:_e,datePicker:ze,rangePicker:ct,flex:Pt,wave:ut,dropdown:Dt,warning:wt,tour:Tt,tooltip:gt,popover:ft,popconfirm:st,qrcode:Fe,floatButton:Ge,floatButtonGroup:ve,variant:Ae,inputNumber:Ce,treeSelect:pe,watermark:Ie}=e,$e=f.useCallback((et,Ct)=>{const{prefixCls:_t}=e;if(Ct)return Ct;const fn=_t||$.getPrefixCls("");return et?`${fn}-${et}`:fn},[$.getPrefixCls,e.prefixCls]),Le=M||$.iconPrefixCls||Ly,Ye=n||$.csp,it=vne(T,$.theme,{prefixCls:$e("")}),ht={csp:Ye,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,locale:u||w,direction:m,space:p,splitter:g,virtual:b,popupMatchSelectWidth:S??y,popupOverflow:C,getPrefixCls:$e,iconPrefixCls:Le,theme:it,segmented:I,statistic:P,spin:N,calendar:O,carousel:_,cascader:L,collapse:H,typography:U,checkbox:q,descriptions:V,divider:z,drawer:F,skeleton:G,steps:Y,image:Q,input:he,textArea:me,otp:Re,layout:D,list:B,mentions:K,modal:J,progress:ee,result:te,slider:ne,breadcrumb:ae,masonry:oe,menu:re,pagination:ce,empty:se,badge:de,radio:Se,rate:be,ribbon:He,switch:Ue,transfer:Pe,avatar:ue,message:ye,tag:Te,table:qe,card:Ze,cardMeta:We,tabs:tt,timeline:nt,timePicker:Ke,upload:Oe,notification:Qe,tree:Xe,colorPicker:_e,datePicker:ze,rangePicker:ct,flex:Pt,wave:ut,dropdown:Dt,warning:wt,tour:Tt,tooltip:gt,popover:ft,popconfirm:st,qrcode:Fe,floatButton:Ge,floatButtonGroup:ve,variant:Ae,inputNumber:Ce,treeSelect:pe,watermark:Ie},$t={...$};Object.keys(ht).forEach(et=>{ht[et]!==void 0&&($t[et]=ht[et]);}),Cne.forEach(et=>{const Ct=e[et];Ct&&($t[et]=Ct);}),typeof r<"u"&&($t.button={autoInsertSpace:r,...$t.button});const Mt=Ef(()=>$t,$t,(et,Ct)=>{const _t=Object.keys(et),fn=Object.keys(Ct);return _t.length!==fn.length||_t.some(en=>et[en]!==Ct[en])}),{layer:zt}=f.useContext(su),Rn=f.useMemo(()=>({prefixCls:Le,csp:Ye,layer:zt?"antd":void 0}),[Le,Ye,zt]);let Ot=f.createElement(f.Fragment,null,f.createElement(Sne,{iconPrefixCls:Le,csp:Ye}),f.createElement(yne,{dropdownMatchSelectWidth:y}),t);const Ee=f.useMemo(()=>Ad(pa.Form?.defaultValidateMessages||{},Mt.locale?.Form?.defaultValidateMessages||{},Mt.form?.validateMessages||{},c?.validateMessages||{}),[Mt,c?.validateMessages]);Object.keys(Ee).length>0&&(Ot=f.createElement(Hte.Provider,{value:Ee},Ot)),u&&(Ot=f.createElement(Ate,{locale:u,_ANT_MARK__:Tte},Ot)),Ot=f.createElement(IM.Provider,{value:Rn},Ot),d&&(Ot=f.createElement(pne,{size:d},Ot)),Ot=f.createElement(bne,null,Ot),gt?.unique&&(Ot=f.createElement(Gz,null,Ot));const lt=f.useMemo(()=>{const{algorithm:et,token:Ct,components:_t,cssVar:fn,...en}=it||{},Hn=et&&(!Array.isArray(et)||et.length>0)?C0(et):NM,Nr={};Object.entries(_t||{}).forEach(([Nn,xi])=>{const Vr={...xi};"algorithm"in Vr&&(Vr.algorithm===true?Vr.theme=Hn:(Array.isArray(Vr.algorithm)||typeof Vr.algorithm=="function")&&(Vr.theme=C0(Vr.algorithm)),delete Vr.algorithm),Nr[Nn]=Vr;});const so={...nf,...Ct};return {...en,theme:Hn,token:so,components:Nr,override:{override:so,...Nr},cssVar:fn}},[it]);return T&&(Ot=f.createElement(PM.Provider,{value:lt},Ot)),Mt.warning&&(Ot=f.createElement(GZ.Provider,{value:Mt.warning},Ot)),R!==void 0&&(Ot=f.createElement(Wz,{disabled:R},Ot)),f.createElement(xt.Provider,{value:Mt},Ot)},Po=e=>{const t=f.useContext(xt),n=f.useContext(LM);return f.createElement($ne,{parentContext:t,legacyLocale:n,...e})};Po.ConfigContext=xt;Po.SizeContext=rf;Po.config=wne;Po.useConfig=gne;Object.defineProperty(Po,"SizeContext",{get:()=>rf});const at={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224};function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,style:r,className:o,duration:i=4.5,showProgress:a,pauseOnHover:c=true,eventKey:u,content:d,closable:m,props:p,onClick:g,onNoticeClose:b,times:y,hovering:S}=e,[C,w]=f.useState(false),[$,M]=f.useState(0),[T,R]=f.useState(0),I=S||C,P=typeof i=="number"?i:0,N=P>0&&a,O=()=>{b(u);},_=V=>{(V.key==="Enter"||V.code==="Enter"||V.keyCode===at.ENTER)&&O();};f.useEffect(()=>{if(!I&&P>0){const V=Date.now()-T,z=setTimeout(()=>{O();},P*1e3-T);return ()=>{c&&clearTimeout(z),R(Date.now()-V);}}},[P,I,y]),f.useEffect(()=>{if(!I&&N&&(c||T===0)){const V=performance.now();let z;const F=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(G=>{const Y=G+T-V,Q=Math.min(Y/(P*1e3),1);M(Q*100),Q<1&&F();});};return F(),()=>{c&&cancelAnimationFrame(z);}}},[P,T,I,N,y]);const L=f.useMemo(()=>typeof m=="object"&&m!==null?m:{},[m]),H=po(L,true),U=100-(!$||$<0?0:$>100?100:$),q=`${n}-notice`;return f.createElement("div",R0({},p,{ref:t,className:X(q,o,{[`${q}-closable`]:m}),style:r,onMouseEnter:V=>{w(true),p?.onMouseEnter?.(V);},onMouseLeave:V=>{w(false),p?.onMouseLeave?.(V);},onClick:g}),f.createElement("div",{className:`${q}-content`},d),m&&f.createElement("button",R0({className:`${q}-close`,onKeyDown:_,"aria-label":"Close"},H,{onClick:V=>{V.preventDefault(),V.stopPropagation(),O();}}),L.closeIcon??"x"),N&&f.createElement("progress",{className:`${q}-progress`,max:"100",value:U},U+"%"))}),Qz=W.createContext({}),Zz=({children:e,classNames:t})=>W.createElement(Qz.Provider,{value:{classNames:t}},e),MI=8,RI=3,TI=16,Ene=e=>{const t={offset:MI,threshold:RI,gap:TI};return e&&typeof e=="object"&&(t.offset=e.offset??MI,t.threshold=e.threshold??RI,t.gap=e.gap??TI),[!!e,t]};function T0(){return T0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{configList:t,placement:n,prefixCls:r,className:o,style:i,motion:a,onAllNoticeRemoved:c,onNoticeClose:u,stack:d}=e,{classNames:m}=f.useContext(Qz),p=f.useRef({}),[g,b]=f.useState(null),[y,S]=f.useState([]),C=t.map(P=>({config:P,key:String(P.key)})),[w,{offset:$,threshold:M,gap:T}]=Ene(d),R=w&&(y.length>0||C.length<=M),I=typeof a=="function"?a(n):a;return f.useEffect(()=>{w&&y.length>1&&S(P=>P.filter(N=>C.some(({key:O})=>N===O)));},[y,C,w]),f.useEffect(()=>{w&&p.current[C[C.length-1]?.key]&&b(p.current[C[C.length-1]?.key]);},[C,w]),W.createElement(gte,T0({key:n,className:X(r,`${r}-${n}`,m?.list,o,{[`${r}-stack`]:!!w,[`${r}-stack-expanded`]:R}),style:i,keys:C,motionAppear:true},I,{onAllRemoved:()=>{c(n);}}),({config:P,className:N,style:O,index:_},L)=>{const{key:H,times:U}=P,q=String(H),{className:V,style:z,classNames:F,styles:G,...Y}=P,Q=C.findIndex(B=>B.key===q),D={};if(w){const B=C.length-1-(Q>-1?Q:_-1),K=n==="top"||n==="bottom"?"-50%":"0";if(B>0){D.height=R?p.current[q]?.offsetHeight:g?.offsetHeight;let J=0;for(let ne=0;neS(B=>B.includes(q)?B:[...B,q]),onMouseLeave:()=>S(B=>B.filter(K=>K!==q))},W.createElement(VM,T0({},Y,{ref:B=>{Q>-1?p.current[q]=B:delete p.current[q];},prefixCls:r,classNames:F,styles:G,className:X(V,m?.notice),style:z,times:U,key:H,eventKey:H,onNoticeClose:u,hovering:w&&y.length>0})))})},Rne=f.forwardRef((e,t)=>{const{prefixCls:n="rc-notification",container:r,motion:o,maxCount:i,className:a,style:c,onAllRemoved:u,stack:d,renderNotifications:m}=e,[p,g]=f.useState([]),b=M=>{const T=p.find(N=>N.key===M),R=T?.closable,I=R&&typeof R=="object"?R:{},{onClose:P}=I;P?.(),T?.onClose?.(),g(N=>N.filter(O=>O.key!==M));};f.useImperativeHandle(t,()=>({open:M=>{g(T=>{let R=[...T];const I=R.findIndex(N=>N.key===M.key),P={...M};return I>=0?(P.times=(T[I]?.times||0)+1,R[I]=P):(P.times=0,R.push(P)),i>0&&R.length>i&&(R=R.slice(-i)),R});},close:M=>{b(M);},destroy:()=>{g([]);}}));const[y,S]=f.useState({});f.useEffect(()=>{const M={};p.forEach(T=>{const{placement:R="topRight"}=T;R&&(M[R]=M[R]||[],M[R].push(T));}),Object.keys(y).forEach(T=>{M[T]=M[T]||[];}),S(M);},[p]);const C=M=>{S(T=>{const R={...T};return (R[M]||[]).length||delete R[M],R});},w=f.useRef(false);if(f.useEffect(()=>{Object.keys(y).length>0?w.current=true:w.current&&(u?.(),w.current=false);},[y]),!r)return null;const $=Object.keys(y);return wo.createPortal(f.createElement(f.Fragment,null,$.map(M=>{const T=y[M],R=f.createElement(Mne,{key:M,configList:T,placement:M,prefixCls:n,className:a?.(M),style:c?.(M),motion:o,onNoticeClose:b,onAllNoticeRemoved:C,stack:d});return m?m(R,{prefixCls:n,key:M}):R})),r)}),Tne=()=>document.body;let AI=0;function Ane(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{const o=n[r];o!==void 0&&(t[r]=o);});}),t}function Jz(e={}){const{getContainer:t=Tne,motion:n,prefixCls:r,maxCount:o,className:i,style:a,onAllRemoved:c,stack:u,renderNotifications:d,...m}=e,[p,g]=f.useState(),b=f.useRef(),y=f.createElement(Rne,{container:p,ref:b,prefixCls:r,motion:n,maxCount:o,className:i,style:a,onAllRemoved:c,stack:u,renderNotifications:d}),[S,C]=f.useState([]),w=Rt(M=>{const T=Ane(m,M);(T.key===null||T.key===void 0)&&(T.key=`rc-notification-${AI}`,AI+=1),C(R=>[...R,{type:"open",config:T}]);}),$=f.useMemo(()=>({open:w,close:M=>{C(T=>[...T,{type:"close",key:M}]);},destroy:()=>{C(M=>[...M,{type:"destroy"}]);}}),[]);return f.useEffect(()=>{g(t());}),f.useEffect(()=>{if(b.current&&S.length){S.forEach(R=>{switch(R.type){case "open":b.current.open(R.config);break;case "close":b.current.close(R.key);break;case "destroy":b.current.destroy();break}});let M,T;C(R=>((M!==R||!T)&&(M=R,T=R.filter(I=>!S.includes(I))),T));}},[S]),[$,y]}var Nne={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function A2(){return A2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,A2({},e,{ref:t,icon:Nne})),Wy=f.forwardRef(Pne),Ine=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:a,colorWarning:c,colorInfo:u,fontSizeLG:d,motionEaseInOutCirc:m,motionDurationSlow:p,marginXS:g,paddingXS:b,borderRadiusLG:y,zIndexPopup:S,contentPadding:C,contentBg:w}=e,$=`${t}-notice`,M=new Bt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:b,transform:"translateY(0)",opacity:1}}),T=new Bt("MessageMoveOut",{"0%":{maxHeight:e.height,padding:b,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),R={padding:b,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:g,fontSize:d},[`${$}-content`]:{display:"inline-block",padding:C,background:w,borderRadius:y,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:i},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:c},[`${t}-info > ${n}, ${t}-loading > ${n}`]:{color:u}};return [{[t]:{...cn(e),color:o,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:S,[`${t}-move-up`]:{animationFillMode:"forwards"},[` ${t}-move-up-appear, ${t}-move-up-enter `]:{animationName:M,animationDuration:p,animationPlayState:"paused",animationTimingFunction:m},[` ${t}-move-up-appear${t}-move-up-appear-active, ${t}-move-up-enter${t}-move-up-enter-active `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:T,animationDuration:p,animationPlayState:"paused",animationTimingFunction:m},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}}},{[t]:{[`${$}-wrapper`]:{...R}}},{[`${t}-notice-pure-panel`]:{...R,padding:0,textAlign:"start"}}]},One=e=>({zIndexPopup:e.zIndexPopupBase+kM+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),ek=Ut("Message",e=>{const t=Ht(e,{height:150});return Ine(t)},One),Dne={info:f.createElement(DM,null),success:f.createElement(OM,null),error:f.createElement(kp,null),warning:f.createElement(Fp,null),loading:f.createElement(Wy,null)},tk=e=>{const{prefixCls:t,type:n,icon:r,children:o,classNames:i,styles:a}=e,c=r||n&&Dne[n],u=kr(c,d=>{const m={...d?.style,...a?.icon};return {className:X(d.className,i?.icon),style:m}});return f.createElement("div",{className:X(`${t}-custom-content`,`${t}-${n}`)},u,f.createElement("span",{className:i?.content,style:a?.content},o))},_ne=e=>{const{prefixCls:t,className:n,style:r,type:o,icon:i,content:a,classNames:c,styles:u,...d}=e,{getPrefixCls:m,className:p,style:g,classNames:b,styles:y}=Wt("message"),S=t||m("message"),C=Kn(S),[w,$]=ek(S,C),[M,T]=Xt([b,c],[y,u],{props:e});return f.createElement(VM,{...d,prefixCls:S,className:X(p,M.root,n,w,`${S}-notice-pure-panel`,$,C),style:{...T.root,...g,...r},eventKey:"pure",duration:null,content:f.createElement(tk,{prefixCls:S,type:o,icon:i,classNames:M,styles:T},a)})};function Lne(e,t){return {motionName:t??`${e}-move-up`}}function jM(e){let t;const n=new Promise(o=>{t=e(()=>{o(true);});}),r=()=>{t?.();};return r.then=(o,i)=>n.then(o,i),r.promise=n,r}const Bne=8,zne=3,kne=({children:e,prefixCls:t})=>{const n=Kn(t),[r,o]=ek(t,n);return f.createElement(Zz,{classNames:{list:X(r,o,n)}},e)},Fne=(e,{prefixCls:t,key:n})=>f.createElement(kne,{prefixCls:t,key:n},e),Hne=f.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:o,maxCount:i,duration:a=zne,rtl:c,transitionName:u,onAllRemoved:d,pauseOnHover:m=true}=e,{getPrefixCls:p,direction:g,getPopupContainer:b}=Wt("message"),{message:y}=f.useContext(xt),S=r||p("message"),C=()=>({left:"50%",transform:"translateX(-50%)",top:n??Bne}),w=()=>X({[`${S}-rtl`]:c??g==="rtl"}),$=()=>Lne(S,u),[M,T]=Xt([e?.classNames,y?.classNames],[e?.styles,y?.styles],{props:e}),[R,I]=Jz({prefixCls:S,style:C,className:w,motion:$,closable:false,duration:a,getContainer:()=>o?.()||b?.()||document.body,maxCount:i,onAllRemoved:d,renderNotifications:Fne,pauseOnHover:m});return f.useImperativeHandle(t,()=>({...R,prefixCls:S,message:y,classNames:M,styles:T})),I});let NI=0;function nk(e){const t=f.useRef(null);return [f.useMemo(()=>{const r=u=>{t.current?.close(u);},o=u=>{if(!t.current){const D=()=>{};return D.then=()=>{},D}const{open:d,prefixCls:m,message:p,classNames:g,styles:b}=t.current,y=p?.className||{},S=p?.style||{},C=p?.classNames||{},w=p?.styles||{},$=`${m}-notice`,{content:M,icon:T,type:R,key:I,className:P,style:N,onClose:O,classNames:_={},styles:L={},...H}=u;let U=I;Qr(U)||(NI+=1,U=`antd-message-${NI}`);const q={...e,...u},V=Ml(C,{props:q}),z=Ml(_,{props:q}),F=Ml(w,{props:q}),G=Ml(L,{props:q}),Y=jy(void 0,V,z,g),Q=zM(F,G,b);return jM(D=>(d({...H,key:U,content:f.createElement(tk,{prefixCls:m,type:R,icon:T,classNames:Y,styles:Q},M),placement:"top",className:X({[`${$}-${R}`]:R},P,y,Y.root),style:{...Q.root,...S,...N},onClose:()=>{O?.(),D();}}),()=>{r(U);}))},a={open:o,destroy:u=>{u!==void 0?r(u):t.current?.destroy();}};return ["info","success","warning","error","loading"].forEach(u=>{const d=(m,p,g)=>{let b;m&&typeof m=="object"&&"content"in m?b=m:b={content:m};let y,S;typeof p=="function"?S=p:(y=p,S=g);const C={onClose:S,duration:y,...b,type:u};return o(C)};a[u]=d;}),a},[]),f.createElement(Hne,{key:"message-holder",...e,ref:t})]}function rk(e){return nk(e)}var Sx={exports:{}},qm={},Cx={exports:{}},xx={};var PI;function Vne(){return PI||(PI=1,(function(e){function t(z,F){var G=z.length;z.push(F);e:for(;0>>1,Q=z[Y];if(0>>1;Yo(K,G))Jo(ee,K)?(z[Y]=ee,z[J]=G,Y=J):(z[Y]=K,z[B]=G,Y=B);else if(Jo(ee,G))z[Y]=ee,z[J]=G,Y=J;else break e}}return F}function o(z,F){var G=z.sortIndex-F.sortIndex;return G!==0?G:z.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()};}else {var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c};}var u=[],d=[],m=1,p=null,g=3,b=false,y=false,S=false,C=false,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function T(z){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=z)r(d),F.sortIndex=F.expirationTime,t(u,F);else break;F=n(d);}}function R(z){if(S=false,T(z),!y)if(n(u)!==null)y=true,I||(I=true,H());else {var F=n(d);F!==null&&V(R,F.startTime-z);}}var I=false,P=-1,N=5,O=-1;function _(){return C?true:!(e.unstable_now()-Oz&&_());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,g=p.priorityLevel;var Q=Y(p.expirationTime<=z);if(z=e.unstable_now(),typeof Q=="function"){p.callback=Q,T(z),F=!0;break t}p===n(u)&&r(u),T(z);}else r(u);p=n(u);}if(p!==null)F=!0;else {var D=n(d);D!==null&&V(R,D.startTime-z),F=!1;}}break e}finally{p=null,g=G,b=!1;}F=void 0;}}finally{F?H():I=false;}}}var H;if(typeof M=="function")H=function(){M(L);};else if(typeof MessageChannel<"u"){var U=new MessageChannel,q=U.port2;U.port1.onmessage=L,H=function(){q.postMessage(null);};}else H=function(){w(L,0);};function V(z,F){P=w(function(){z(e.unstable_now());},F);}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null;},e.unstable_forceFrameRate=function(z){0>z||125Y?(z.sortIndex=G,t(d,z),n(u)===null&&z===n(d)&&(S?($(P),P=-1):S=true,V(R,G-Y))):(z.sortIndex=Q,t(u,z),y||b||(y=true,I||(I=true,H()))),z},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(z){var F=g;return function(){var G=g;g=F;try{return z.apply(this,arguments)}finally{g=G;}}};})(xx)),xx}var II;function jne(){return II||(II=1,Cx.exports=Vne()),Cx.exports}var OI;function Une(){if(OI)return qm;OI=1;var e=jne(),t=Yl(),n=Oz();function r(s){var l="https://react.dev/errors/"+s;if(1Q||(s.current=Y[Q],Y[Q]=null,Q--);}function K(s,l){Q++,Y[Q]=s.current,s.current=l;}var J=D(null),ee=D(null),te=D(null),ne=D(null);function ae(s,l){switch(K(te,l),K(ee,s),K(J,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?h4(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=h4(l),s=p4(l,s);else switch(s){case "svg":s=1;break;case "math":s=2;break;default:s=0;}}B(J),K(J,s);}function oe(){B(J),B(ee),B(te);}function re(s){s.memoizedState!==null&&K(ne,s);var l=J.current,h=p4(l,s.type);l!==h&&(K(ee,s),K(J,h));}function ce(s){ee.current===s&&(B(J),B(ee)),ne.current===s&&(B(ne),Lm._currentValue=G);}var he,me;function Re(s){if(he===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);he=l&&l[1]||"",me=-1)":-1E||le[v]!==we[E]){var De=` `+le[v].replace(" at new "," at ");return s.displayName&&De.includes("")&&(De=De.replace("",s.displayName)),De}while(1<=v&&0<=E);break}}}finally{se=false,Error.prepareStackTrace=h;}return (h=s?s.displayName||s.name:"")?Re(h):""}function Se(s,l){switch(s.tag){case 26:case 27:case 5:return Re(s.type);case 16:return Re("Lazy");case 13:return s.child!==l&&l!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return de(s.type,false);case 11:return de(s.type.render,false);case 1:return de(s.type,true);case 31:return Re("Activity");default:return ""}}function be(s){try{var l="",h=null;do l+=Se(s,h),h=s,s=s.return;while(s);return l}catch(v){return ` Error generating stack: `+v.message+` `+v.stack}}var He=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,Pe=e.unstable_cancelCallback,ue=e.unstable_shouldYield,ye=e.unstable_requestPaint,Te=e.unstable_now,qe=e.unstable_getCurrentPriorityLevel,Ze=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,tt=e.unstable_NormalPriority,nt=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,Oe=e.log,Qe=e.unstable_setDisableYieldValue,Xe=null,_e=null;function ze(s){if(typeof Oe=="function"&&Qe(s),_e&&typeof _e.setStrictMode=="function")try{_e.setStrictMode(Xe,s);}catch{}}var ct=Math.clz32?Math.clz32:Dt,Pt=Math.log,ut=Math.LN2;function Dt(s){return s>>>=0,s===0?32:31-(Pt(s)/ut|0)|0}var wt=256,Tt=262144,gt=4194304;function ft(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function st(s,l,h){var v=s.pendingLanes;if(v===0)return 0;var E=0,A=s.suspendedLanes,k=s.pingedLanes;s=s.warmLanes;var Z=v&134217727;return Z!==0?(v=Z&~A,v!==0?E=ft(v):(k&=Z,k!==0?E=ft(k):h||(h=Z&~s,h!==0&&(E=ft(h))))):(Z=v&~A,Z!==0?E=ft(Z):k!==0?E=ft(k):h||(h=v&~s,h!==0&&(E=ft(h)))),E===0?0:l!==0&&l!==E&&(l&A)===0&&(A=E&-E,h=l&-l,A>=h||A===32&&(h&4194048)!==0)?l:E}function Fe(s,l){return (s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Ge(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return -1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return -1;default:return -1}}function ve(){var s=gt;return gt<<=1,(gt&62914560)===0&&(gt=4194304),s}function Ae(s){for(var l=[],h=0;31>h;h++)l.push(s);return l}function Ce(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0);}function pe(s,l,h,v,E,A){var k=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var Z=s.entanglements,le=s.expirationTimes,we=s.hiddenUpdates;for(h=k&~h;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var dt=/[\n"\\]/g;function Vt(s){return s.replace(dt,function(l){return "\\"+l.charCodeAt(0).toString(16)+" "})}function Vs(s,l,h,v,E,A,k,Z){s.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.type=k:s.removeAttribute("type"),l!=null?k==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+jr(l)):s.value!==""+jr(l)&&(s.value=""+jr(l)):k!=="submit"&&k!=="reset"||s.removeAttribute("value"),l!=null?Nu(s,k,jr(l)):h!=null?Nu(s,k,jr(h)):v!=null&&s.removeAttribute("value"),E==null&&A!=null&&(s.defaultChecked=!!A),E!=null&&(s.checked=E&&typeof E!="function"&&typeof E!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?s.name=""+jr(Z):s.removeAttribute("name");}function Pg(s,l,h,v,E,A,k,Z){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(s.type=A),l!=null||h!=null){if(!(A!=="submit"&&A!=="reset"||l!=null)){lc(s);return}h=h!=null?""+jr(h):"",l=l!=null?""+jr(l):h,Z||l===s.value||(s.value=l),s.defaultValue=l;}v=v??E,v=typeof v!="function"&&typeof v!="symbol"&&!!v,s.checked=Z?s.checked:!!v,s.defaultChecked=!!v,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.name=k),lc(s);}function Nu(s,l,h){l==="number"&&Au(s.ownerDocument)===s||s.defaultValue===""+h||(s.defaultValue=""+h);}function Ya(s,l,h,v){if(s=s.options,l){l={};for(var E=0;E"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Z1=false;if(Qa)try{var em={};Object.defineProperty(em,"passive",{get:function(){Z1=!0;}}),window.addEventListener("test",em,em),window.removeEventListener("test",em,em);}catch{Z1=false;}var js=null,J1=null,Dg=null;function p6(){if(Dg)return Dg;var s,l=J1,h=l.length,v,E="value"in js?js.value:js.textContent,A=E.length;for(s=0;s=rm),C6=" ",x6=false;function w6(s,l){switch(s){case "keyup":return BK.indexOf(l.keyCode)!==-1;case "keydown":return l.keyCode!==229;case "keypress":case "mousedown":case "focusout":return true;default:return false}}function $6(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Du=false;function kK(s,l){switch(s){case "compositionend":return $6(l);case "keypress":return l.which!==32?null:(x6=true,C6);case "textInput":return s=l.data,s===C6&&x6?null:s;default:return null}}function FK(s,l){if(Du)return s==="compositionend"||!oS&&w6(s,l)?(s=p6(),Dg=J1=js=null,Du=false,s):null;switch(s){case "paste":return null;case "keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return {node:h,offset:l-s};s=v;}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode;}h=void 0;}h=I6(h);}}function D6(s,l){return s&&l?s===l?true:s&&s.nodeType===3?false:l&&l.nodeType===3?D6(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):false:false}function _6(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Au(s.document);l instanceof s.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string";}catch{h=false;}if(h)s=l.contentWindow;else break;l=Au(s.document);}return l}function sS(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var KK=Qa&&"documentMode"in document&&11>=document.documentMode,_u=null,lS=null,sm=null,cS=false;function L6(s,l,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;cS||_u==null||_u!==Au(v)||(v=_u,"selectionStart"in v&&sS(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),sm&&am(sm,v)||(sm=v,v=Rv(lS,"onSelect"),0>=k,E-=k,Ea=1<<32-ct(l)+E|h<Kt?(on=bt,bt=null):on=bt.sibling;var bn=Me(ge,bt,xe[Kt],ke);if(bn===null){bt===null&&(bt=on);break}s&&bt&&bn.alternate===null&&l(ge,bt),fe=A(bn,fe,Kt),vn===null?Et=bn:vn.sibling=bn,vn=bn,bt=on;}if(Kt===xe.length)return h(ge,bt),un&&Ja(ge,Kt),Et;if(bt===null){for(;KtKt?(on=bt,bt=null):on=bt.sibling;var dl=Me(ge,bt,bn.value,ke);if(dl===null){bt===null&&(bt=on);break}s&&bt&&dl.alternate===null&&l(ge,bt),fe=A(dl,fe,Kt),vn===null?Et=dl:vn.sibling=dl,vn=dl,bt=on;}if(bn.done)return h(ge,bt),un&&Ja(ge,Kt),Et;if(bt===null){for(;!bn.done;Kt++,bn=xe.next())bn=Ve(ge,bn.value,ke),bn!==null&&(fe=A(bn,fe,Kt),vn===null?Et=bn:vn.sibling=bn,vn=bn);return un&&Ja(ge,Kt),Et}for(bt=v(bt);!bn.done;Kt++,bn=xe.next())bn=Ne(bt,ge,Kt,bn.value,ke),bn!==null&&(s&&bn.alternate!==null&&bt.delete(bn.key===null?Kt:bn.key),fe=A(bn,fe,Kt),vn===null?Et=bn:vn.sibling=bn,vn=bn);return s&&bt.forEach(function(hX){return l(ge,hX)}),un&&Ja(ge,Kt),Et}function On(ge,fe,xe,ke){if(typeof xe=="object"&&xe!==null&&xe.type===S&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case b:e:{for(var Et=xe.key;fe!==null;){if(fe.key===Et){if(Et=xe.type,Et===S){if(fe.tag===7){h(ge,fe.sibling),ke=E(fe,xe.props.children),ke.return=ge,ge=ke;break e}}else if(fe.elementType===Et||typeof Et=="object"&&Et!==null&&Et.$$typeof===N&&bc(Et)===fe.type){h(ge,fe.sibling),ke=E(fe,xe.props),mm(ke,xe),ke.return=ge,ge=ke;break e}h(ge,fe);break}else l(ge,fe);fe=fe.sibling;}xe.type===S?(ke=mc(xe.props.children,ge.mode,ke,xe.key),ke.return=ge,ge=ke):(ke=Ug(xe.type,xe.key,xe.props,null,ge.mode,ke),mm(ke,xe),ke.return=ge,ge=ke);}return k(ge);case y:e:{for(Et=xe.key;fe!==null;){if(fe.key===Et)if(fe.tag===4&&fe.stateNode.containerInfo===xe.containerInfo&&fe.stateNode.implementation===xe.implementation){h(ge,fe.sibling),ke=E(fe,xe.children||[]),ke.return=ge,ge=ke;break e}else {h(ge,fe);break}else l(ge,fe);fe=fe.sibling;}ke=gS(xe,ge.mode,ke),ke.return=ge,ge=ke;}return k(ge);case N:return xe=bc(xe),On(ge,fe,xe,ke)}if(V(xe))return pt(ge,fe,xe,ke);if(H(xe)){if(Et=H(xe),typeof Et!="function")throw Error(r(150));return xe=Et.call(xe),At(ge,fe,xe,ke)}if(typeof xe.then=="function")return On(ge,fe,Qg(xe),ke);if(xe.$$typeof===M)return On(ge,fe,Wg(ge,xe),ke);Zg(ge,xe);}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,fe!==null&&fe.tag===6?(h(ge,fe.sibling),ke=E(fe,xe),ke.return=ge,ge=ke):(h(ge,fe),ke=pS(xe,ge.mode,ke),ke.return=ge,ge=ke),k(ge)):h(ge,fe)}return function(ge,fe,xe,ke){try{fm=0;var Et=On(ge,fe,xe,ke);return Gu=null,Et}catch(bt){if(bt===qu||bt===Yg)throw bt;var vn=Zo(29,bt,null,ge.mode);return vn.lanes=ke,vn.return=ge,vn}}}var Sc=iN(true),aN=iN(false),Ks=false;function TS(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null};}function AS(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null});}function Ys(s){return {lane:s,tag:0,payload:null,callback:null,next:null}}function Xs(s,l,h){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(yn&2)!==0){var E=v.pending;return E===null?l.next=l:(l.next=E.next,E.next=l),v.pending=l,l=jg(s),j6(s,null,h),l}return Vg(s,v,l,h),jg(s)}function hm(s,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var v=l.lanes;v&=s.pendingLanes,h|=v,l.lanes=h,$e(s,h);}}function NS(s,l){var h=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var E=null,A=null;if(h=h.firstBaseUpdate,h!==null){do{var k={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};A===null?E=A=k:A=A.next=k,h=h.next;}while(h!==null);A===null?E=A=l:A=A.next=l;}else E=A=l;h={baseState:v.baseState,firstBaseUpdate:E,lastBaseUpdate:A,shared:v.shared,callbacks:v.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=l:s.next=l,h.lastBaseUpdate=l;}var PS=false;function pm(){if(PS){var s=Uu;if(s!==null)throw s}}function gm(s,l,h,v){PS=false;var E=s.updateQueue;Ks=false;var A=E.firstBaseUpdate,k=E.lastBaseUpdate,Z=E.shared.pending;if(Z!==null){E.shared.pending=null;var le=Z,we=le.next;le.next=null,k===null?A=we:k.next=we,k=le;var De=s.alternate;De!==null&&(De=De.updateQueue,Z=De.lastBaseUpdate,Z!==k&&(Z===null?De.firstBaseUpdate=we:Z.next=we,De.lastBaseUpdate=le));}if(A!==null){var Ve=E.baseState;k=0,De=we=le=null,Z=A;do{var Me=Z.lane&-536870913,Ne=Me!==Z.lane;if(Ne?(rn&Me)===Me:(v&Me)===Me){Me!==0&&Me===ju&&(PS=true),De!==null&&(De=De.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var pt=s,At=Z;Me=l;var On=h;switch(At.tag){case 1:if(pt=At.payload,typeof pt=="function"){Ve=pt.call(On,Ve,Me);break e}Ve=pt;break e;case 3:pt.flags=pt.flags&-65537|128;case 0:if(pt=At.payload,Me=typeof pt=="function"?pt.call(On,Ve,Me):pt,Me==null)break e;Ve=p({},Ve,Me);break e;case 2:Ks=true;}}Me=Z.callback,Me!==null&&(s.flags|=64,Ne&&(s.flags|=8192),Ne=E.callbacks,Ne===null?E.callbacks=[Me]:Ne.push(Me));}else Ne={lane:Me,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},De===null?(we=De=Ne,le=Ve):De=De.next=Ne,k|=Me;if(Z=Z.next,Z===null){if(Z=E.shared.pending,Z===null)break;Ne=Z,Z=Ne.next,Ne.next=null,E.lastBaseUpdate=Ne,E.shared.pending=null;}}while(true);De===null&&(le=Ve),E.baseState=le,E.firstBaseUpdate=we,E.lastBaseUpdate=De,A===null&&(E.shared.lanes=0),tl|=k,s.lanes=k,s.memoizedState=Ve;}}function sN(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l);}function lN(s,l){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;sA?A:8;var k=z.T,Z={};z.T=Z,XS(s,false,l,h);try{var le=E(),we=z.S;if(we!==null&&we(Z,le),le!==null&&typeof le=="object"&&typeof le.then=="function"){var De=rY(le,v);ym(s,l,De,ri(s));}else ym(s,l,v,ri(s));}catch(Ve){ym(s,l,{then:function(){},status:"rejected",reason:Ve},ri());}finally{F.p=A,k!==null&&Z.types!==null&&(k.types=Z.types),z.T=k;}}function cY(){}function KS(s,l,h,v){if(s.tag!==5)throw Error(r(476));var E=FN(s).queue;kN(s,E,l,G,h===null?cY:function(){return HN(s),h(v)});}function FN(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:G},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:h},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function HN(s){var l=FN(s);l.next===null&&(l=s.alternate.memoizedState),ym(s,l.next.queue,{},ri());}function YS(){return qr(Lm)}function VN(){return lr().memoizedState}function jN(){return lr().memoizedState}function uY(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var h=ri();s=Ys(h);var v=Xs(l,s,h);v!==null&&(ko(v,l,h),hm(v,l,h)),l={cache:$S()},s.payload=l;return}l=l.return;}}function dY(s,l,h){var v=ri();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:false,eagerState:null,next:null},lv(s)?qN(l,h):(h=mS(s,l,h,v),h!==null&&(ko(h,s,v),GN(h,l,v)));}function UN(s,l,h){var v=ri();ym(s,l,h,v);}function ym(s,l,h,v){var E={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:false,eagerState:null,next:null};if(lv(s))qN(l,E);else {var A=s.alternate;if(s.lanes===0&&(A===null||A.lanes===0)&&(A=l.lastRenderedReducer,A!==null))try{var k=l.lastRenderedState,Z=A(k,h);if(E.hasEagerState=!0,E.eagerState=Z,Qo(Z,k))return Vg(s,l,E,0),zn===null&&Hg(),!1}catch{}if(h=mS(s,l,E,v),h!==null)return ko(h,s,v),GN(h,l,v),true}return false}function XS(s,l,h,v){if(v={lane:2,revertLane:TC(),gesture:null,action:v,hasEagerState:false,eagerState:null,next:null},lv(s)){if(l)throw Error(r(479))}else l=mS(s,h,v,2),l!==null&&ko(l,s,2);}function lv(s){var l=s.alternate;return s===Gt||l!==null&&l===Gt}function qN(s,l){Ku=tv=true;var h=s.pending;h===null?l.next=l:(l.next=h.next,h.next=l),s.pending=l;}function GN(s,l,h){if((h&4194048)!==0){var v=l.lanes;v&=s.pendingLanes,h|=v,l.lanes=h,$e(s,h);}}var Sm={readContext:qr,use:ov,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useLayoutEffect:er,useInsertionEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useSyncExternalStore:er,useId:er,useHostTransitionStatus:er,useFormState:er,useActionState:er,useOptimistic:er,useMemoCache:er,useCacheRefresh:er};Sm.useEffectEvent=er;var WN={readContext:qr,use:ov,useCallback:function(s,l){return So().memoizedState=[s,l===void 0?null:l],s},useContext:qr,useEffect:NN,useImperativeHandle:function(s,l,h){h=h!=null?h.concat([s]):null,av(4194308,4,DN.bind(null,l,s),h);},useLayoutEffect:function(s,l){return av(4194308,4,s,l)},useInsertionEffect:function(s,l){av(4,2,s,l);},useMemo:function(s,l){var h=So();l=l===void 0?null:l;var v=s();if(Cc){ze(true);try{s();}finally{ze(false);}}return h.memoizedState=[v,l],v},useReducer:function(s,l,h){var v=So();if(h!==void 0){var E=h(l);if(Cc){ze(true);try{h(l);}finally{ze(false);}}}else E=l;return v.memoizedState=v.baseState=E,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:E},v.queue=s,s=s.dispatch=dY.bind(null,Gt,s),[v.memoizedState,s]},useRef:function(s){var l=So();return s={current:s},l.memoizedState=s},useState:function(s){s=jS(s);var l=s.queue,h=UN.bind(null,Gt,l);return l.dispatch=h,[s.memoizedState,h]},useDebugValue:GS,useDeferredValue:function(s,l){var h=So();return WS(h,s,l)},useTransition:function(){var s=jS(false);return s=kN.bind(null,Gt,s.queue,true,false),So().memoizedState=s,[false,s]},useSyncExternalStore:function(s,l,h){var v=Gt,E=So();if(un){if(h===void 0)throw Error(r(407));h=h();}else {if(h=l(),zn===null)throw Error(r(349));(rn&127)!==0||hN(v,l,h);}E.memoizedState=h;var A={value:h,getSnapshot:l};return E.queue=A,NN(gN.bind(null,v,A,s),[s]),v.flags|=2048,Xu(9,{destroy:void 0},pN.bind(null,v,A,h,l),null),h},useId:function(){var s=So(),l=zn.identifierPrefix;if(un){var h=Ma,v=Ea;h=(v&~(1<<32-ct(v)-1)).toString(32)+h,l="_"+l+"R_"+h,h=nv++,0<\/script>",A=A.removeChild(A.firstChild);break;case "select":A=typeof v.is=="string"?k.createElement("select",{is:v.is}):k.createElement("select"),v.multiple?A.multiple=true:v.size&&(A.size=v.size);break;default:A=typeof v.is=="string"?k.createElement(E,{is:v.is}):k.createElement(E);}}A[zt]=l,A[Rn]=v;e:for(k=l.child;k!==null;){if(k.tag===5||k.tag===6)A.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===l)break e;for(;k.sibling===null;){if(k.return===null||k.return===l)break e;k=k.return;}k.sibling.return=k.return,k=k.sibling;}l.stateNode=A;e:switch(Wr(A,E,v),E){case "button":case "input":case "select":case "textarea":v=!!v.autoFocus;break e;case "img":v=true;break e;default:v=false;}v&&is(l);}}return jn(l),uC(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,h),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==v&&is(l);else {if(typeof v!="string"&&l.stateNode===null)throw Error(r(166));if(s=te.current,Hu(l)){if(s=l.stateNode,h=l.memoizedProps,v=null,E=Ur,E!==null)switch(E.tag){case 27:case 5:v=E.memoizedProps;}s[zt]=l,s=!!(s.nodeValue===h||v!==null&&v.suppressHydrationWarning===true||f4(s.nodeValue,h)),s||Gs(l,true);}else s=Tv(s).createTextNode(v),s[zt]=l,l.stateNode=s;}return jn(l),null;case 31:if(h=l.memoizedState,s===null||s.memoizedState!==null){if(v=Hu(l),h!==null){if(s===null){if(!v)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[zt]=l;}else hc(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;jn(l),s=false;}else h=SS(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=h),s=true;if(!s)return l.flags&256?(ei(l),l):(ei(l),null);if((l.flags&128)!==0)throw Error(r(558))}return jn(l),null;case 13:if(v=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(E=Hu(l),v!==null&&v.dehydrated!==null){if(s===null){if(!E)throw Error(r(318));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[zt]=l;}else hc(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;jn(l),E=false;}else E=SS(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=E),E=true;if(!E)return l.flags&256?(ei(l),l):(ei(l),null)}return ei(l),(l.flags&128)!==0?(l.lanes=h,l):(h=v!==null,s=s!==null&&s.memoizedState!==null,h&&(v=l.child,E=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(E=v.alternate.memoizedState.cachePool.pool),A=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(A=v.memoizedState.cachePool.pool),A!==E&&(v.flags|=2048)),h!==s&&h&&(l.child.flags|=8192),mv(l,l.updateQueue),jn(l),null);case 4:return oe(),s===null&&IC(l.stateNode.containerInfo),jn(l),null;case 10:return ts(l.type),jn(l),null;case 19:if(B(sr),v=l.memoizedState,v===null)return jn(l),null;if(E=(l.flags&128)!==0,A=v.rendering,A===null)if(E)xm(v,false);else {if(tr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(A=ev(s),A!==null){for(l.flags|=128,xm(v,false),s=A.updateQueue,l.updateQueue=s,mv(l,s),l.subtreeFlags=0,s=h,h=l.child;h!==null;)U6(h,s),h=h.sibling;return K(sr,sr.current&1|2),un&&Ja(l,v.treeForkCount),l.child}s=s.sibling;}v.tail!==null&&Te()>bv&&(l.flags|=128,E=true,xm(v,false),l.lanes=4194304);}else {if(!E)if(s=ev(A),s!==null){if(l.flags|=128,E=true,s=s.updateQueue,l.updateQueue=s,mv(l,s),xm(v,true),v.tail===null&&v.tailMode==="hidden"&&!A.alternate&&!un)return jn(l),null}else 2*Te()-v.renderingStartTime>bv&&h!==536870912&&(l.flags|=128,E=true,xm(v,false),l.lanes=4194304);v.isBackwards?(A.sibling=l.child,l.child=A):(s=v.last,s!==null?s.sibling=A:l.child=A,v.last=A);}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=Te(),s.sibling=null,h=sr.current,K(sr,E?h&1|2:h&1),un&&Ja(l,v.treeForkCount),s):(jn(l),null);case 22:case 23:return ei(l),OS(),v=l.memoizedState!==null,s!==null?s.memoizedState!==null!==v&&(l.flags|=8192):v&&(l.flags|=8192),v?(h&536870912)!==0&&(l.flags&128)===0&&(jn(l),l.subtreeFlags&6&&(l.flags|=8192)):jn(l),h=l.updateQueue,h!==null&&mv(l,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),v=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(v=l.memoizedState.cachePool.pool),v!==h&&(l.flags|=2048),s!==null&&B(vc),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),ts(fr),jn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function gY(s,l){switch(bS(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ts(fr),oe(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return ce(l),null;case 31:if(l.memoizedState!==null){if(ei(l),l.alternate===null)throw Error(r(340));hc();}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(ei(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));hc();}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return B(sr),null;case 4:return oe(),null;case 10:return ts(l.type),null;case 22:case 23:return ei(l),OS(),s!==null&&B(vc),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ts(fr),null;case 25:return null;default:return null}}function vP(s,l){switch(bS(l),l.tag){case 3:ts(fr),oe();break;case 26:case 27:case 5:ce(l);break;case 4:oe();break;case 31:l.memoizedState!==null&&ei(l);break;case 13:ei(l);break;case 19:B(sr);break;case 10:ts(l.type);break;case 22:case 23:ei(l),OS(),s!==null&&B(vc);break;case 24:ts(fr);}}function wm(s,l){try{var h=l.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var E=v.next;h=E;do{if((h.tag&s)===s){v=void 0;var A=h.create,k=h.inst;v=A(),k.destroy=v;}h=h.next;}while(h!==E)}}catch(Z){An(l,l.return,Z);}}function Js(s,l,h){try{var v=l.updateQueue,E=v!==null?v.lastEffect:null;if(E!==null){var A=E.next;v=A;do{if((v.tag&s)===s){var k=v.inst,Z=k.destroy;if(Z!==void 0){k.destroy=void 0,E=l;var le=h,we=Z;try{we();}catch(De){An(E,le,De);}}}v=v.next;}while(v!==A)}}catch(De){An(l,l.return,De);}}function bP(s){var l=s.updateQueue;if(l!==null){var h=s.stateNode;try{lN(l,h);}catch(v){An(s,s.return,v);}}}function yP(s,l,h){h.props=xc(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount();}catch(v){An(s,l,v);}}function $m(s,l){try{var h=s.ref;if(h!==null){switch(s.tag){case 26:case 27:case 5:var v=s.stateNode;break;case 30:v=s.stateNode;break;default:v=s.stateNode;}typeof h=="function"?s.refCleanup=h(v):h.current=v;}}catch(E){An(s,l,E);}}function Ra(s,l){var h=s.ref,v=s.refCleanup;if(h!==null)if(typeof v=="function")try{v();}catch(E){An(s,l,E);}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null);}else if(typeof h=="function")try{h(null);}catch(E){An(s,l,E);}else h.current=null;}function SP(s){var l=s.type,h=s.memoizedProps,v=s.stateNode;try{e:switch(l){case "button":case "input":case "select":case "textarea":h.autoFocus&&v.focus();break e;case "img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet);}}catch(E){An(s,s.return,E);}}function dC(s,l,h){try{var v=s.stateNode;zY(v,s.type,h,l),v[Rn]=l;}catch(E){An(s,s.return,E);}}function CP(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&al(s.type)||s.tag===4}function fC(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||CP(s.return))return null;s=s.return;}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&al(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child;}if(!(s.flags&2))return s.stateNode}}function mC(s,l,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,l?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(s,l):(l=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,l.appendChild(s),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=Xa));else if(v!==4&&(v===27&&al(s.type)&&(h=s.stateNode,l=null),s=s.child,s!==null))for(mC(s,l,h),s=s.sibling;s!==null;)mC(s,l,h),s=s.sibling;}function hv(s,l,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,l?h.insertBefore(s,l):h.appendChild(s);else if(v!==4&&(v===27&&al(s.type)&&(h=s.stateNode),s=s.child,s!==null))for(hv(s,l,h),s=s.sibling;s!==null;)hv(s,l,h),s=s.sibling;}function xP(s){var l=s.stateNode,h=s.memoizedProps;try{for(var v=s.type,E=l.attributes;E.length;)l.removeAttributeNode(E[0]);Wr(l,v,h),l[zt]=s,l[Rn]=h;}catch(A){An(s,s.return,A);}}var as=false,pr=false,hC=false,wP=typeof WeakSet=="function"?WeakSet:Set,Or=null;function vY(s,l){if(s=s.containerInfo,_C=_v,s=_6(s),sS(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var E=v.anchorOffset,A=v.focusNode;v=v.focusOffset;try{h.nodeType,A.nodeType;}catch{h=null;break e}var k=0,Z=-1,le=-1,we=0,De=0,Ve=s,Me=null;t:for(;;){for(var Ne;Ve!==h||E!==0&&Ve.nodeType!==3||(Z=k+E),Ve!==A||v!==0&&Ve.nodeType!==3||(le=k+v),Ve.nodeType===3&&(k+=Ve.nodeValue.length),(Ne=Ve.firstChild)!==null;)Me=Ve,Ve=Ne;for(;;){if(Ve===s)break t;if(Me===h&&++we===E&&(Z=k),Me===A&&++De===v&&(le=k),(Ne=Ve.nextSibling)!==null)break;Ve=Me,Me=Ve.parentNode;}Ve=Ne;}h=Z===-1||le===-1?null:{start:Z,end:le};}else h=null;}h=h||{start:0,end:0};}else h=null;for(LC={focusedElem:s,selectionRange:h},_v=false,Or=l;Or!==null;)if(l=Or,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Or=s;else for(;Or!==null;){switch(l=Or,A=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(h=0;h title"))),Wr(A,v,h),A[zt]=s,Nn(A),v=A;break e;case "link":var k=A4("link","href",E).get(v+(h.href||""));if(k){for(var Z=0;ZOn&&(k=On,On=At,At=k);var ge=O6(Z,At),fe=O6(Z,On);if(ge&&fe&&(Ne.rangeCount!==1||Ne.anchorNode!==ge.node||Ne.anchorOffset!==ge.offset||Ne.focusNode!==fe.node||Ne.focusOffset!==fe.offset)){var xe=Ve.createRange();xe.setStart(ge.node,ge.offset),Ne.removeAllRanges(),At>On?(Ne.addRange(xe),Ne.extend(fe.node,fe.offset)):(xe.setEnd(fe.node,fe.offset),Ne.addRange(xe));}}}}for(Ve=[],Ne=Z;Ne=Ne.parentNode;)Ne.nodeType===1&&Ve.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Zh?32:h,z.T=null,h=CC,CC=null;var A=rl,k=ds;if(wr=0,td=rl=null,ds=0,(yn&6)!==0)throw Error(r(331));var Z=yn;if(yn|=4,DP(A.current),PP(A,A.current,k,h),yn=Z,Nm(0,!1),_e&&typeof _e.onPostCommitFiberRoot=="function")try{_e.onPostCommitFiberRoot(Xe,A);}catch{}return !0}finally{F.p=E,z.T=v,ZP(s,l);}}function e4(s,l,h){l=Ei(h,l),l=eC(s.stateNode,l,2),s=Xs(s,l,2),s!==null&&(Ce(s,2),Ta(s));}function An(s,l,h){if(s.tag===3)e4(s,s,h);else for(;l!==null;){if(l.tag===3){e4(l,s,h);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(nl===null||!nl.has(v))){s=Ei(h,s),h=tP(2),v=Xs(l,h,2),v!==null&&(nP(h,v,l,s),Ce(v,2),Ta(v));break}}l=l.return;}}function EC(s,l,h){var v=s.pingCache;if(v===null){v=s.pingCache=new SY;var E=new Set;v.set(l,E);}else E=v.get(l),E===void 0&&(E=new Set,v.set(l,E));E.has(h)||(vC=true,E.add(h),s=EY.bind(null,s,l,h),l.then(s,s));}function EY(s,l,h){var v=s.pingCache;v!==null&&v.delete(l),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,zn===s&&(rn&h)===h&&(tr===4||tr===3&&(rn&62914560)===rn&&300>Te()-vv?(yn&2)===0&&nd(s,0):bC|=h,ed===rn&&(ed=0)),Ta(s);}function t4(s,l){l===0&&(l=ve()),s=fc(s,l),s!==null&&(Ce(s,l),Ta(s));}function MY(s){var l=s.memoizedState,h=0;l!==null&&(h=l.retryLane),t4(s,h);}function RY(s,l){var h=0;switch(s.tag){case 31:case 13:var v=s.stateNode,E=s.memoizedState;E!==null&&(h=E.retryLane);break;case 19:v=s.stateNode;break;case 22:v=s.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(l),t4(s,h);}function TY(s,l){return Ue(s,l)}var $v=null,od=null,MC=false,Ev=false,RC=false,il=0;function Ta(s){s!==od&&s.next===null&&(od===null?$v=od=s:od=od.next=s),Ev=true,MC||(MC=true,NY());}function Nm(s,l){if(!RC&&Ev){RC=true;do for(var h=false,v=$v;v!==null;){if(s!==0){var E=v.pendingLanes;if(E===0)var A=0;else {var k=v.suspendedLanes,Z=v.pingedLanes;A=(1<<31-ct(42|s)+1)-1,A&=E&~(k&~Z),A=A&201326741?A&201326741|1:A?A|2:0;}A!==0&&(h=true,i4(v,A));}else A=rn,A=st(v,v===zn?A:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(A&3)===0||Fe(v,A)||(h=true,i4(v,A));v=v.next;}while(h);RC=false;}}function AY(){n4();}function n4(){Ev=MC=false;var s=0;il!==0&&FY()&&(s=il);for(var l=Te(),h=null,v=$v;v!==null;){var E=v.next,A=r4(v,l);A===0?(v.next=null,h===null?$v=E:h.next=E,E===null&&(od=h)):(h=v,(s!==0||(A&3)!==0)&&(Ev=true)),v=E;}wr!==0&&wr!==5||Nm(s),il!==0&&(il=0);}function r4(s,l){for(var h=s.suspendedLanes,v=s.pingedLanes,E=s.expirationTimes,A=s.pendingLanes&-62914561;0Z)break;var De=le.transferSize,Ve=le.initiatorType;De&&m4(Ve)&&(le=le.responseEnd,k+=De*(le"u"?null:document;function E4(s,l,h){var v=id;if(v&&typeof l=="string"&&l){var E=Vt(l);E='link[rel="'+s+'"][href="'+E+'"]',typeof h=="string"&&(E+='[crossorigin="'+h+'"]'),$4.has(E)||($4.add(E),s={rel:s,crossOrigin:h,href:l},v.querySelector(E)===null&&(l=v.createElement("link"),Wr(l,"link",s),Nn(l),v.head.appendChild(l)));}}function YY(s){fs.D(s),E4("dns-prefetch",s,null);}function XY(s,l){fs.C(s,l),E4("preconnect",s,l);}function QY(s,l,h){fs.L(s,l,h);var v=id;if(v&&s&&l){var E='link[rel="preload"][as="'+Vt(l)+'"]';l==="image"&&h&&h.imageSrcSet?(E+='[imagesrcset="'+Vt(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(E+='[imagesizes="'+Vt(h.imageSizes)+'"]')):E+='[href="'+Vt(s)+'"]';var A=E;switch(l){case "style":A=ad(s);break;case "script":A=sd(s);}Pi.has(A)||(s=p({rel:"preload",href:l==="image"&&h&&h.imageSrcSet?void 0:s,as:l},h),Pi.set(A,s),v.querySelector(E)!==null||l==="style"&&v.querySelector(Dm(A))||l==="script"&&v.querySelector(_m(A))||(l=v.createElement("link"),Wr(l,"link",s),Nn(l),v.head.appendChild(l)));}}function ZY(s,l){fs.m(s,l);var h=id;if(h&&s){var v=l&&typeof l.as=="string"?l.as:"script",E='link[rel="modulepreload"][as="'+Vt(v)+'"][href="'+Vt(s)+'"]',A=E;switch(v){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":A=sd(s);}if(!Pi.has(A)&&(s=p({rel:"modulepreload",href:s},l),Pi.set(A,s),h.querySelector(E)===null)){switch(v){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":if(h.querySelector(_m(A)))return}v=h.createElement("link"),Wr(v,"link",s),Nn(v),h.head.appendChild(v);}}}function JY(s,l,h){fs.S(s,l,h);var v=id;if(v&&s){var E=so(v).hoistableStyles,A=ad(s);l=l||"default";var k=E.get(A);if(!k){var Z={loading:0,preload:null};if(k=v.querySelector(Dm(A)))Z.loading=5;else {s=p({rel:"stylesheet",href:s,"data-precedence":l},h),(h=Pi.get(A))&&jC(s,h);var le=k=v.createElement("link");Nn(le),Wr(le,"link",s),le._p=new Promise(function(we,De){le.onload=we,le.onerror=De;}),le.addEventListener("load",function(){Z.loading|=1;}),le.addEventListener("error",function(){Z.loading|=2;}),Z.loading|=4,Nv(k,l,v);}k={type:"stylesheet",instance:k,count:1,state:Z},E.set(A,k);}}}function eX(s,l){fs.X(s,l);var h=id;if(h&&s){var v=so(h).hoistableScripts,E=sd(s),A=v.get(E);A||(A=h.querySelector(_m(E)),A||(s=p({src:s,async:true},l),(l=Pi.get(E))&&UC(s,l),A=h.createElement("script"),Nn(A),Wr(A,"link",s),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(E,A));}}function tX(s,l){fs.M(s,l);var h=id;if(h&&s){var v=so(h).hoistableScripts,E=sd(s),A=v.get(E);A||(A=h.querySelector(_m(E)),A||(s=p({src:s,async:true,type:"module"},l),(l=Pi.get(E))&&UC(s,l),A=h.createElement("script"),Nn(A),Wr(A,"link",s),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(E,A));}}function M4(s,l,h,v){var E=(E=te.current)?Av(E):null;if(!E)throw Error(r(446));switch(s){case "meta":case "title":return null;case "style":return typeof h.precedence=="string"&&typeof h.href=="string"?(l=ad(h.href),h=so(E).hoistableStyles,v=h.get(l),v||(v={type:"style",instance:null,count:0,state:null},h.set(l,v)),v):{type:"void",instance:null,count:0,state:null};case "link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){s=ad(h.href);var A=so(E).hoistableStyles,k=A.get(s);if(k||(E=E.ownerDocument||E,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(s,k),(A=E.querySelector(Dm(s)))&&!A._p&&(k.instance=A,k.state.loading=5),Pi.has(s)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Pi.set(s,h),A||nX(E,s,h,k.state))),l&&v===null)throw Error(r(528,""));return k}if(l&&v!==null)throw Error(r(529,""));return null;case "script":return l=h.async,h=h.src,typeof h=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=sd(h),h=so(E).hoistableScripts,v=h.get(l),v||(v={type:"script",instance:null,count:0,state:null},h.set(l,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function ad(s){return 'href="'+Vt(s)+'"'}function Dm(s){return 'link[rel="stylesheet"]['+s+"]"}function R4(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function nX(s,l,h,v){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?v.loading=1:(l=s.createElement("link"),v.preload=l,l.addEventListener("load",function(){return v.loading|=1}),l.addEventListener("error",function(){return v.loading|=2}),Wr(l,"link",h),Nn(l),s.head.appendChild(l));}function sd(s){return '[src="'+Vt(s)+'"]'}function _m(s){return "script[async]"+s}function T4(s,l,h){if(l.count++,l.instance===null)switch(l.type){case "style":var v=s.querySelector('style[data-href~="'+Vt(h.href)+'"]');if(v)return l.instance=v,Nn(v),v;var E=p({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),Nn(v),Wr(v,"style",E),Nv(v,h.precedence,s),l.instance=v;case "stylesheet":E=ad(h.href);var A=s.querySelector(Dm(E));if(A)return l.state.loading|=4,l.instance=A,Nn(A),A;v=R4(h),(E=Pi.get(E))&&jC(v,E),A=(s.ownerDocument||s).createElement("link"),Nn(A);var k=A;return k._p=new Promise(function(Z,le){k.onload=Z,k.onerror=le;}),Wr(A,"link",v),l.state.loading|=4,Nv(A,h.precedence,s),l.instance=A;case "script":return A=sd(h.src),(E=s.querySelector(_m(A)))?(l.instance=E,Nn(E),E):(v=h,(E=Pi.get(A))&&(v=p({},h),UC(v,E)),s=s.ownerDocument||s,E=s.createElement("script"),Nn(E),Wr(E,"link",v),s.head.appendChild(E),l.instance=E);case "void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(v=l.instance,l.state.loading|=4,Nv(v,h.precedence,s));return l.instance}function Nv(s,l,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=v.length?v[v.length-1]:null,A=E,k=0;k title"):null);}function rX(s,l,h){if(h===1||l.itemProp!=null)return false;switch(s){case "meta":case "title":return true;case "style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return true;case "link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(s=l.disabled,typeof l.precedence=="string"&&s==null):true;case "script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return true}return false}function P4(s){return !(s.type==="stylesheet"&&(s.state.loading&3)===0)}function oX(s,l,h,v){if(h.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==false)&&(h.state.loading&4)===0){if(h.instance===null){var E=ad(v.href),A=l.querySelector(Dm(E));if(A){l=A._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Iv.bind(s),l.then(s,s)),h.state.loading|=4,h.instance=A,Nn(A);return}A=l.ownerDocument||l,v=R4(v),(E=Pi.get(E))&&jC(v,E),A=A.createElement("link"),Nn(A);var k=A;k._p=new Promise(function(Z,le){k.onload=Z,k.onerror=le;}),Wr(A,"link",v),h.instance=A;}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(h,l),(l=h.state.preload)&&(h.state.loading&3)===0&&(s.count++,h=Iv.bind(s),l.addEventListener("load",h),l.addEventListener("error",h));}}var qC=0;function iX(s,l){return s.stylesheets&&s.count===0&&Dv(s,s.stylesheets),0qC?50:800)+l);return s.unsuspend=h,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(E);}}:null}function Iv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s();}}}var Ov=null;function Dv(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Ov=new Map,l.forEach(aX,s),Ov=null,Iv.call(s));}function aX(s,l){if(!(l.state.loading&4)){var h=Ov.get(s);if(h)var v=h.get(null);else {h=new Map,Ov.set(s,h);for(var E=s.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);}catch(t){console.error(t);}}return e(),Sx.exports=Une(),Sx.exports}var Ka=qne();const A0="__rc_react_root__";function Ky(e,t){const n=t[A0]||Ka.createRoot(t);n.render(e),t[A0]=n;}async function ok(e){return Promise.resolve().then(()=>{e[A0]?.unmount(),delete e[A0];})}const wx=()=>({height:0,opacity:0}),_I=e=>{const{scrollHeight:t}=e;return {height:t,opacity:1}},Gne=e=>({height:e?e.offsetHeight:0}),$x=(e,t)=>t?.deadline===true||t.propertyName==="height",ik=(e=Xh)=>({motionName:`${e}-motion-collapse`,onAppearStart:wx,onEnterStart:wx,onAppearActive:_I,onEnterActive:_I,onLeaveStart:Gne,onLeaveActive:wx,onAppearEnd:$x,onEnterEnd:$x,onLeaveEnd:$x,motionDeadline:500}),Bl=(e,t,n)=>n!==void 0?n:`${e}-${t}`,Wne=e=>{const{componentCls:t,colorPrimary:n,antCls:r}=e,[,o]=dr(r,"wave");return {[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:o("color",n),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},Kne=Oee("Wave",Wne),Yy=`${Xh}-wave-target`;function LI(e){return e&&typeof e=="string"&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function Yne(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&LI(n[t])?n[t]:[r,o,i].find(LI)??null}function Ex(e){return Number.isNaN(e)?0:e}const Xne=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=f.useRef(null),{getPrefixCls:a}=f.useContext(xt),c=a(),[u]=dr(c,"wave"),[d,m]=f.useState(null),[p,g]=f.useState([]),[b,y]=f.useState(0),[S,C]=f.useState(0),[w,$]=f.useState(0),[M,T]=f.useState(0),[R,I]=f.useState(false),P={left:b,top:S,width:w,height:M,borderRadius:p.map(_=>`${_}px`).join(" ")};d&&(P[u("color")]=d);function N(){const _=getComputedStyle(n);m(Yne(n,o));const L=_.position==="static",{borderLeftWidth:H,borderTopWidth:U}=_;y(L?n.offsetLeft:Ex(-Number.parseFloat(H))),C(L?n.offsetTop:Ex(-Number.parseFloat(U))),$(n.offsetWidth),T(n.offsetHeight);const{borderTopLeftRadius:q,borderTopRightRadius:V,borderBottomLeftRadius:z,borderBottomRightRadius:F}=_;g([q,V,F,z].map(G=>Ex(Number.parseFloat(G))));}if(f.useEffect(()=>{if(n){const _=Lt(()=>{N(),I(true);});let L;return typeof ResizeObserver<"u"&&(L=new ResizeObserver(N),L.observe(n)),()=>{Lt.cancel(_),L?.disconnect();}}},[n]),!R)return null;const O=(r==="Checkbox"||r==="Radio")&&n?.classList.contains(Yy);return f.createElement(vo,{visible:true,motionAppear:true,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(_,L)=>{if(L.deadline||L.propertyName==="opacity"){const H=i.current?.parentElement;ok(H).then(()=>{H?.remove();});}return false}},({className:_},L)=>f.createElement("div",{ref:Ar(i,L),className:X(t,_,{"wave-quick":O}),style:P}))},Qne=(e,t)=>{const{component:n}=t;if(n==="Checkbox"&&!e.querySelector("input")?.checked)return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e?.insertBefore(r,e?.firstChild),Ky(f.createElement(Xne,{...t,target:e}),r);},Zne=(e,t,n,r)=>{const{wave:o}=f.useContext(xt),[,i,a]=Hr(),c=Rt(m=>{const p=e.current;if(o?.disabled||!p)return;const g=p.querySelector(`.${Yy}`)||p,{showEffect:b}=o||{};(b||Qne)(g,{className:t,token:i,component:n,event:m,hashId:a,colorSource:r});}),u=f.useRef(null);return f.useEffect(()=>()=>{Lt.cancel(u.current);},[]),m=>{Lt.cancel(u.current),u.current=Lt(()=>{c(m);});}},Vp=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i}=f.useContext(xt),a=f.useRef(null),c=i("wave"),u=Kne(c),d=Zne(a,X(c,u),r,o);if(W.useEffect(()=>{const p=a.current;if(!p||p.nodeType!==window.Node.ELEMENT_NODE||n)return;const g=b=>{!FM(b.target)||!p.getAttribute||p.getAttribute("disabled")||p.disabled||p.className.includes("disabled")&&!p.className.includes("disabled:")||p.getAttribute("aria-disabled")==="true"||p.className.includes("-leave")||d(b);};return p.addEventListener("click",g,true),()=>{p.removeEventListener("click",g,true);}},[n]),!W.isValidElement(t))return t??null;const m=vu(t)?Ar(Ql(t),a):a;return kr(t,{ref:m})},io=e=>{const t=W.useContext(rf);return W.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},Jne=e=>{const{componentCls:t}=e;return {[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},ere=Ut(["Space","Compact"],e=>[Jne(e)],()=>({}),{resetStyle:false}),Xy=f.createContext(null),Ds=(e,t)=>{const n=f.useContext(Xy),r=f.useMemo(()=>{if(!n)return "";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,c=o==="vertical"?"-vertical-":"-";return X(`${e}-compact${c}item`,{[`${e}-compact${c}first-item`]:i,[`${e}-compact${c}last-item`]:a,[`${e}-compact${c}item-rtl`]:t==="rtl"})},[e,t,n]);return {compactSize:n?.compactSize,compactDirection:n?.compactDirection,compactItemClassnames:r}},tre=e=>{const{children:t}=e;return f.createElement(Xy.Provider,{value:null},t)},nre=e=>{const{children:t,...n}=e;return f.createElement(Xy.Provider,{value:f.useMemo(()=>n,[n])},t)},UM=e=>{const{getPrefixCls:t,direction:n}=f.useContext(xt),{size:r,direction:o,orientation:i,block:a,prefixCls:c,className:u,rootClassName:d,children:m,vertical:p,...g}=e,[b,y]=yu(i,p,o),S=io(I=>r??I),C=t("space-compact",c),[w]=ere(C),$=X(C,w,{[`${C}-rtl`]:n==="rtl",[`${C}-block`]:a,[`${C}-vertical`]:y},u,d),M=f.useContext(Xy),T=Ko(m),R=f.useMemo(()=>T.map((I,P)=>{const N=I?.key||`${C}-item-${P}`;return f.createElement(nre,{key:N,compactSize:S,compactDirection:b,isFirstItem:P===0&&(!M||M?.isFirstItem),isLastItem:P===T.length-1&&(!M||M?.isLastItem)},I)}),[T,M,b,S,C]);return T.length===0?null:f.createElement("div",{className:$,...g},R)},ak=f.createContext(void 0),rre=e=>{const{getPrefixCls:t,direction:n}=f.useContext(xt),{prefixCls:r,size:o,className:i,...a}=e,c=t("btn-group",r),[,,u]=Hr(),d=f.useMemo(()=>{switch(o){case "large":return "lg";case "small":return "sm";default:return ""}},[o]),m=X(c,{[`${c}-${d}`]:d,[`${c}-rtl`]:n==="rtl"},i,u);return f.createElement(ak.Provider,{value:o},f.createElement("div",{...a,className:m}))},BI=/^[\u4E00-\u9FA5]{2}$/,N2=BI.test.bind(BI);function qM(e){return e==="danger"?{danger:true}:{type:e}}function zI(e){return typeof e=="string"}function Mx(e){return e==="text"||e==="link"}function ore(e,t,n,r){if(!Qr(e)||e==="")return;const o=t?" ":"";return typeof e!="string"&&typeof e!="number"&&zI(e.type)&&N2(e.props.children)?kr(e,i=>{const a=X(i.className,r)||void 0,c={...n,...i.style};return {...i,children:i.children.split("").join(o),className:a,style:c}}):zI(e)?W.createElement("span",{className:r,style:n},N2(e)?e.split("").join(o):e):Uz(e)?W.createElement("span",{className:r,style:n},e):kr(e,i=>({...i,className:X(i.className,r)||void 0,style:{...i.style,...n}}))}function ire(e,t,n,r){let o=false;const i=[];return W.Children.forEach(e,a=>{const c=typeof a,u=c==="string"||c==="number";if(o&&u){const d=i.length-1,m=i[d];i[d]=`${m}${a}`;}else i.push(a);o=u;}),W.Children.map(i,a=>ore(a,t,n,r))}["default","primary","danger"].concat(Yt(_l));const sk=f.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=X(`${i}-icon`,n);return W.createElement("span",{ref:t,className:a,style:r},o)}),kI=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=X(`${n}-loading-icon`,r);return W.createElement(sk,{prefixCls:n,className:a,style:o,ref:t},W.createElement(Wy,{className:i}))}),Rx=()=>({width:0,opacity:0,transform:"scale(0)"}),Tx=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),are=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,c=!!n;return r?W.createElement(kI,{prefixCls:t,className:o,style:i}):W.createElement(vo,{visible:c,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:true,onAppearStart:Rx,onAppearActive:Tx,onEnterStart:Rx,onEnterActive:Tx,onLeaveStart:Tx,onLeaveActive:Rx},({className:u,style:d},m)=>{const p={...i,...d};return W.createElement(kI,{prefixCls:t,className:X(o,u),style:p,ref:m})})},FI=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),sre=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return {[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},FI(`${t}-primary`,o),FI(`${t}-danger`,i)]}},Ax=e=>Math.round(Number(e||0)),lre=e=>{if(e instanceof ln)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return {...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class ga extends ln{constructor(t){super(lre(t));}toHsbString(){const t=this.toHsb(),n=Ax(t.s*100),r=Ax(t.b*100),o=Ax(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,c=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:c}toHsb(){const{v:t,...n}=this.toHsv();return {...n,b:t,a:this.a}}}const cre="rc-color-picker",Hd=e=>e instanceof ga?e:new ga(e),ure=Hd("#1677ff"),lk=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:a,height:c}=r.current.getBoundingClientRect(),{width:u,height:d}=n.current.getBoundingClientRect(),m=u/2,p=d/2,g=(t.x+m)/a,b=1-(t.y+p)/c,y=o.toHsb(),S=g,C=(t.x+m)/a*360;if(i)switch(i){case "hue":return Hd({...y,h:C<=0?0:C});case "alpha":return Hd({...y,a:S<=0?0:S})}return Hd({h:y.h,s:g<=0?0:g,b:b>=1?1:b,a:y.a})},ck=(e,t)=>{const n=e.toHsb();switch(t){case "hue":return {x:n.h/360*100,y:50};case "alpha":return {x:e.a*100,y:50};default:return {x:n.s*100,y:(1-n.b)*100}}},WM=({color:e,prefixCls:t,className:n,style:r,onClick:o})=>{const i=`${t}-color-block`;return W.createElement("div",{className:X(i,n),style:r,onClick:o},W.createElement("div",{className:`${i}-inner`,style:{background:e}}))};function dre(e){const t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return {pageX:t.pageX-n,pageY:t.pageY-r}}function uk(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:a,color:c,disabledDrag:u}=e,[d,m]=f.useState({x:0,y:0}),p=f.useRef(null),g=f.useRef(null);f.useEffect(()=>{m(a());},[c]),f.useEffect(()=>()=>{document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",g.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",g.current),p.current=null,g.current=null;},[]);const b=w=>{const{pageX:$,pageY:M}=dre(w),{x:T,y:R,width:I,height:P}=n.current.getBoundingClientRect(),{width:N,height:O}=t.current.getBoundingClientRect(),_=N/2,L=O/2,H=Math.max(0,Math.min($-T,I))-_,U=Math.max(0,Math.min(M-R,P))-L,q={x:H,y:r==="x"?d.y:U};if(N===0&&O===0||N!==O)return false;o?.(q);},y=w=>{w.preventDefault(),b(w);},S=w=>{w.preventDefault(),document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",g.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",g.current),p.current=null,g.current=null,i?.();};return [d,w=>{document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",g.current),!u&&(b(w),document.addEventListener("mousemove",y),document.addEventListener("mouseup",S),document.addEventListener("touchmove",y),document.addEventListener("touchend",S),p.current=y,g.current=S);}]}const dk=({size:e="default",color:t,prefixCls:n})=>W.createElement("div",{className:X(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),fk=({children:e,style:t,prefixCls:n})=>W.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),mk=f.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return W.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),fre=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=f.useRef(),a=f.useRef(),c=f.useRef(e),u=Rt(p=>{const g=lk({offset:p,targetRef:a,containerRef:i,color:e});c.current=g,t(g);}),[d,m]=uk({color:e,containerRef:i,targetRef:a,calculate:()=>ck(e),onDragChange:u,onDragChangeComplete:()=>r?.(c.current),disabledDrag:o});return W.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:m,onTouchStart:m},W.createElement(fk,{prefixCls:n},W.createElement(mk,{x:d.x,y:d.y,ref:a},W.createElement(dk,{color:e.toRgbString(),prefixCls:n})),W.createElement("div",{className:`${n}-saturation`,style:{backgroundColor:`hsl(${e.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},mre=(e,t)=>{const[n,r]=dn(e,t);return [f.useMemo(()=>Hd(n),[n]),r]},hre=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=f.useMemo(()=>e.map((a,c)=>{let u=Hd(a);return r==="alpha"&&c===e.length-1&&(u=new ga(u.setA(1))),u.toRgbString()}).join(","),[e,r]);return W.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},pre=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:a,type:c}=e,u=f.useRef(null),d=f.useRef(null),m=f.useRef(a),p=w=>c==="hue"?w.getHue():w.a*100,g=Rt(w=>{const $=lk({offset:w,targetRef:d,containerRef:u,color:a,type:c});m.current=$,o(p($));}),[b,y]=uk({color:a,targetRef:d,containerRef:u,calculate:()=>ck(a,c),onDragChange:g,onDragChangeComplete(){i(p(m.current));},direction:"x",disabledDrag:r}),S=W.useMemo(()=>{if(c==="hue"){const w=a.toHsb();return w.s=1,w.b=1,w.a=1,new ga(w)}return a},[a,c]),C=W.useMemo(()=>n.map(w=>`${w.color} ${w.percent}%`),[n]);return W.createElement("div",{ref:u,className:X(`${t}-slider`,`${t}-slider-${c}`),onMouseDown:y,onTouchStart:y},W.createElement(fk,{prefixCls:t},W.createElement(mk,{x:b.x,y:b.y,ref:d},W.createElement(dk,{size:"small",color:S.toHexString(),prefixCls:t})),W.createElement(hre,{colors:C,type:c,prefixCls:t})))};function gre(e){return f.useMemo(()=>{const{slider:t}=e||{};return [t||pre]},[e])}function Rh(){return Rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{value:n,defaultValue:r,prefixCls:o=cre,onChange:i,onChangeComplete:a,className:c,style:u,panelRender:d,disabledAlpha:m=false,disabled:p=false,components:g}=e,[b]=gre(g),[y,S]=mre(r||ure,n),C=f.useMemo(()=>y.setA(1).toRgbString(),[y]),w=(L,H)=>{n||S(L),i?.(L,H);},$=L=>new ga(y.setHue(L)),M=L=>new ga(y.setA(L/100)),T=L=>{w($(L),{type:"hue",value:L});},R=L=>{w(M(L),{type:"alpha",value:L});},I=L=>{a&&a($(L));},P=L=>{a&&a(M(L));},N=X(`${o}-panel`,c,{[`${o}-panel-disabled`]:p}),O={prefixCls:o,disabled:p,color:y},_=W.createElement(W.Fragment,null,W.createElement(fre,Rh({onChange:w},O,{onChangeComplete:a})),W.createElement("div",{className:`${o}-slider-container`},W.createElement("div",{className:X(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:m})},W.createElement(b,Rh({},O,{type:"hue",colors:vre,min:0,max:359,value:y.getHue(),onChange:T,onChangeComplete:I})),!m&&W.createElement(b,Rh({},O,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:C}],min:0,max:100,value:y.a*100,onChange:R,onChangeComplete:P}))),W.createElement(WM,{color:y.toRgbString(),prefixCls:o})));return W.createElement("div",{className:N,style:u,ref:t},typeof d=="function"?d(_):_)}),mh=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",yre=(e,t)=>e?mh(e,t):"";let jo=(function(){function e(t){if(Yi(this,e),this.cleared=false,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(r=>({color:new e(r.color),percent:r.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:r,percent:o})=>({color:new e(r),percent:o})),this.metaColor=new ga(this.colors[0].color.metaColor)):this.metaColor=new ga(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=true);}return Xi(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return yre(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return !!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return !n||this.isGradient()!==n.isGradient()?false:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])})();var Sre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,P2({},e,{ref:t,icon:Sre})),of=f.forwardRef(Cre),xre=W.forwardRef((e,t)=>{const{prefixCls:n,forceRender:r,className:o,style:i,children:a,isActive:c,role:u,classNames:d,styles:m}=e,[p,g]=W.useState(c||r);return W.useEffect(()=>{(r||c)&&g(true);},[r,c]),p?W.createElement("div",{ref:t,className:X(`${n}-panel`,{[`${n}-panel-active`]:c,[`${n}-panel-inactive`]:!c},o),style:i,role:u},W.createElement("div",{className:X(`${n}-body`,d?.body),style:m?.body},a)):null}),hk=W.forwardRef((e,t)=>{const{showArrow:n=true,headerClass:r,isActive:o,onItemClick:i,forceRender:a,className:c,classNames:u={},styles:d={},prefixCls:m,collapsible:p,accordion:g,panelKey:b,extra:y,header:S,expandIcon:C,openMotion:w,destroyOnHidden:$,children:M,...T}=e,R=p==="disabled",I=y!=null&&typeof y!="boolean",P={onClick:()=>{i?.(b);},onKeyDown:U=>{(U.key==="Enter"||U.keyCode===at.ENTER||U.which===at.ENTER)&&i?.(b);},role:g?"tab":"button","aria-expanded":o,"aria-disabled":R,tabIndex:R?-1:0},N=typeof C=="function"?C(e):W.createElement("i",{className:"arrow"}),O=N&&W.createElement("div",ir({className:X(`${m}-expand-icon`,u?.icon),style:d?.icon},["header","icon"].includes(p)?P:{}),N),_=X(`${m}-item`,{[`${m}-item-active`]:o,[`${m}-item-disabled`]:R},c),H={className:X(r,`${m}-header`,{[`${m}-collapsible-${p}`]:!!p},u?.header),style:d?.header,...["header","icon"].includes(p)?{}:P};return W.createElement("div",ir({},T,{ref:t,className:_}),W.createElement("div",H,n&&O,W.createElement("span",ir({className:X(`${m}-title`,u?.title),style:d?.title},p==="header"?P:{}),S),I&&W.createElement("div",{className:`${m}-extra`},y)),W.createElement(vo,ir({visible:o,leavedClassName:`${m}-panel-hidden`},w,{forceRender:a,removeOnLeave:$}),({className:U,style:q},V)=>W.createElement(xre,{ref:V,prefixCls:m,className:U,classNames:u,style:q,styles:d,isActive:o,forceRender:a,role:g?"tabpanel":void 0},M)))});function pk(e,t,n){if(!e||!t)return e||t;const r=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),o={};return r.forEach(i=>{o[i]=n(e[i],t[i]);}),o}function wre(e,t){return pk(e,t,(n,r)=>X(n,r))}function $re(e,t){return pk(e,t,(n,r)=>({...n,...r}))}const Ere=(e,t)=>{const{prefixCls:n,accordion:r,collapsible:o,destroyOnHidden:i,onItemClick:a,activeKey:c,openMotion:u,expandIcon:d,classNames:m,styles:p}=t;return e.map((g,b)=>{const{children:y,label:S,key:C,collapsible:w,onItemClick:$,destroyOnHidden:M,classNames:T,styles:R,...I}=g,P=String(C??b),N=w??o,O=M??i,_=H=>{N!=="disabled"&&(a(H),$?.(H));};let L=false;return r?L=c[0]===P:L=c.indexOf(P)>-1,W.createElement(hk,ir({},I,{classNames:wre(m,T),styles:$re(p,R),prefixCls:n,key:P,panelKey:P,isActive:L,accordion:r,openMotion:u,expandIcon:d,header:S,collapsible:N,onItemClick:_,destroyOnHidden:O}),y)})},Mre=(e,t,n)=>{if(!e)return null;const{prefixCls:r,accordion:o,collapsible:i,destroyOnHidden:a,onItemClick:c,activeKey:u,openMotion:d,expandIcon:m,classNames:p,styles:g}=n,b=e.key||String(t),{header:y,headerClass:S,destroyOnHidden:C,collapsible:w,onItemClick:$}=e.props;let M=false;o?M=u[0]===b:M=u.indexOf(b)>-1;const T=w??i,R=P=>{T!=="disabled"&&(c(P),$?.(P));},I={key:b,panelKey:b,header:y,headerClass:S,classNames:p,styles:g,isActive:M,prefixCls:r,destroyOnHidden:C??a,openMotion:d,accordion:o,children:e.props.children,onItemClick:R,expandIcon:m,collapsible:T};return typeof e.type=="string"?e:(Object.keys(I).forEach(P=>{typeof I[P]>"u"&&delete I[P];}),W.cloneElement(e,I))};function Rre(e,t,n){return Array.isArray(e)?Ere(e,n):Ko(t).map((r,o)=>Mre(r,o,n))}function HI(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[];}return t.map(n=>String(n))}const Tre=W.forwardRef((e,t)=>{const{prefixCls:n="rc-collapse",destroyOnHidden:r=false,style:o,accordion:i,className:a,children:c,collapsible:u,openMotion:d,expandIcon:m,activeKey:p,defaultActiveKey:g,onChange:b,items:y,classNames:S,styles:C}=e,w=X(n,a),[$,M]=dn(g,p),T=HI($),R=Rt(N=>{const O=HI(N);M(O),b?.(O);}),I=N=>{R(i?T[0]===N?[]:[N]:T.includes(N)?T.filter(O=>O!==N):[...T,N]);};xr(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");const P=Rre(y,c,{prefixCls:n,accordion:i,openMotion:d,expandIcon:m,collapsible:u,destroyOnHidden:r,onItemClick:I,activeKey:T,classNames:S,styles:C});return W.createElement("div",ir({ref:t,className:w,style:o,role:i?"tablist":void 0},po(e,{aria:true,data:true})),P)}),KM=Object.assign(Tre,{Panel:hk}),{Panel:JPe}=KM,Are=f.forwardRef((e,t)=>{const{getPrefixCls:n}=f.useContext(xt),{prefixCls:r,className:o,showArrow:i=true}=e,a=n("collapse",r),c=X({[`${a}-no-arrow`]:!i},o);return f.createElement(KM.Panel,{ref:t,...e,prefixCls:a,className:c})}),gk=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Nre=e=>({animationDuration:e,animationFillMode:"both"}),Pre=e=>({animationDuration:e,animationFillMode:"both"}),Qy=(e,t,n,r,o=false)=>{const i=o?"&":"";return {[` ${i}${e}-enter, ${i}${e}-appear `]:{...Nre(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Pre(r),animationPlayState:"paused"},[` ${i}${e}-enter${e}-enter-active, ${i}${e}-appear${e}-appear-active `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},Ire=new Bt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Ore=new Bt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),YM=(e,t=false)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return [Qy(r,Ire,Ore,e.motionDurationMid,t),{[` ${o}${r}-enter, ${o}${r}-appear `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},Dre=new Bt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_re=new Bt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Lre=new Bt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Bre=new Bt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),zre=new Bt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),kre=new Bt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Fre=new Bt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Hre=new Bt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Vre={"move-up":{inKeyframes:Fre,outKeyframes:Hre},"move-down":{inKeyframes:Dre,outKeyframes:_re},"move-left":{inKeyframes:Lre,outKeyframes:Bre},"move-right":{inKeyframes:zre,outKeyframes:kre}},N0=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Vre[t];return [Qy(r,o,i,e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},XM=new Bt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),QM=new Bt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ZM=new Bt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),JM=new Bt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),jre=new Bt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Ure=new Bt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),qre=new Bt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Gre=new Bt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Wre={"slide-up":{inKeyframes:XM,outKeyframes:QM},"slide-down":{inKeyframes:ZM,outKeyframes:JM},"slide-left":{inKeyframes:jre,outKeyframes:Ure},"slide-right":{inKeyframes:qre,outKeyframes:Gre}},zl=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Wre[t];return [Qy(r,o,i,e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Kre=new Bt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Yre=new Bt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),VI=new Bt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),jI=new Bt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Xre=new Bt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),Qre=new Bt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Zre=new Bt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Jre=new Bt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),eoe=new Bt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),toe=new Bt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),noe=new Bt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),roe=new Bt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),ooe={zoom:{inKeyframes:Kre,outKeyframes:Yre},"zoom-big":{inKeyframes:VI,outKeyframes:jI},"zoom-big-fast":{inKeyframes:VI,outKeyframes:jI},"zoom-left":{inKeyframes:Zre,outKeyframes:Jre},"zoom-right":{inKeyframes:eoe,outKeyframes:toe},"zoom-up":{inKeyframes:Xre,outKeyframes:Qre},"zoom-down":{inKeyframes:noe,outKeyframes:roe}},jp=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=ooe[t];return [Qy(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},ioe=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:c,collapsePanelBorderRadius:u,lineWidth:d,lineType:m,colorBorder:p,colorText:g,colorTextHeading:b,colorTextDisabled:y,fontSizeLG:S,lineHeight:C,lineHeightLG:w,marginSM:$,paddingSM:M,paddingLG:T,paddingXS:R,motionDurationSlow:I,fontSizeIcon:P,contentPadding:N,fontHeight:O,fontHeightLG:_}=e,L=`${ie(d)} ${m} ${p}`;return {[t]:{...cn(e),backgroundColor:o,border:L,borderRadius:u,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:L,"&:first-child":{[` &, & > ${t}-header`]:{borderRadius:`${ie(u)} ${ie(u)} 0 0`}},"&:last-child":{[` &, & > ${t}-header`]:{borderRadius:`0 0 ${ie(u)} ${ie(u)}`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:b,lineHeight:C,cursor:"pointer",transition:`all ${I}, visibility 0s`,...Si(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:O,display:"flex",alignItems:"center",marginInlineEnd:$},[`${t}-arrow`]:{...bu(),fontSize:P,transition:`transform ${I}`,svg:{transition:`transform ${I}`}},[`${t}-title`]:{marginInlineEnd:"auto"}},[`${t}-collapsible-header`]:{cursor:"default",[`${t}-title`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-panel`]:{color:g,backgroundColor:n,borderTop:L,[`& > ${t}-body`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:R,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(M).sub(R).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:M}}},"&-large":{[`> ${t}-item`]:{fontSize:S,lineHeight:w,[`> ${t}-header`]:{padding:c,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:_,marginInlineStart:e.calc(T).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:T}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${ie(u)} ${ie(u)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:y,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:$}}}}}}},aoe=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return {[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},soe=e=>{const{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:o,colorBorder:i}=e;return {[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${i}`},[` > ${t}-item:last-child, > ${t}-item:last-child ${t}-header `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:o,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},loe=e=>{const{componentCls:t,paddingSM:n}=e;return {[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:"transparent",border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},coe=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:"transparent"}),uoe=Ut("Collapse",e=>{const t=Ht(e,{collapseHeaderPaddingSM:`${ie(e.paddingXS)} ${ie(e.paddingSM)}`,collapseHeaderPaddingLG:`${ie(e.padding)} ${ie(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return [ioe(t),soe(t),loe(t),aoe(t),gk(t)]},coe),doe=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a,classNames:c,styles:u}=Wt("collapse"),{prefixCls:d,className:m,rootClassName:p,style:g,bordered:b=true,ghost:y,size:S,expandIconPlacement:C,expandIconPosition:w,children:$,destroyInactivePanel:M,destroyOnHidden:T,expandIcon:R,classNames:I,styles:P}=e,N=io(B=>S??B??"middle"),O=n("collapse",d),_=n(),[L,H]=uoe(O),U=C??w??"start",q={...e,size:N,bordered:b,expandIconPlacement:U},[V,z]=Xt([c,I],[u,P],{props:q}),F=R??o,G=f.useCallback((B={})=>{const K=typeof F=="function"?F(B):f.createElement(of,{rotate:B.isActive?r==="rtl"?-90:90:void 0,"aria-label":B.isActive?"expanded":"collapsed"});return kr(K,J=>({className:X(J.className,`${O}-arrow`)}))},[F,O,r]),Y=X(`${O}-icon-placement-${U}`,{[`${O}-borderless`]:!b,[`${O}-rtl`]:r==="rtl",[`${O}-ghost`]:!!y,[`${O}-${N}`]:N!=="middle"},i,m,p,L,H,V.root),Q=f.useMemo(()=>({...ik(_),motionAppear:false,leavedClassName:`${O}-panel-hidden`}),[_,O]),D=f.useMemo(()=>$?Ko($).map(B=>B):null,[$]);return f.createElement(KM,{ref:t,openMotion:Q,...Ln(e,["rootClassName"]),expandIcon:G,prefixCls:O,className:Y,style:{...z.root,...a,...g},classNames:V,styles:z,destroyOnHidden:T??M},D)}),vk=Object.assign(doe,{Panel:Are}),to=e=>e instanceof jo?e:new jo(e),Fb=e=>Math.round(Number(e||0)),eR=e=>Fb(e.toHsb().a*100),Hb=(e,t)=>{const n=e.toRgb();if(!n.r&&!n.g&&!n.b){const r=e.toHsb();return r.a=1,to(r)}return n.a=1,to(n)},bk=(e,t)=>{const n=[{percent:0,color:e[0].color}].concat(Yt(e),[{percent:100,color:e[e.length-1].color}]);for(let r=0;re.map(t=>(t.colors=t.colors.map(to),t)),tR=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new ga(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},UI=(e,t)=>`panel-${e.key??t}`,moe=({prefixCls:e,presets:t,value:n,onChange:r})=>{const[o]=No("ColorPicker"),[,i]=Hr(),a=f.useMemo(()=>foe(t),[t]),c=`${e}-presets`,u=f.useMemo(()=>a.reduce((p,g,b)=>{const{defaultOpen:y=true}=g;return y&&p.push(UI(g,b)),p},[]),[a]),d=p=>{r?.(p);},m=a.map((p,g)=>({key:UI(p,g),label:W.createElement("div",{className:`${c}-label`},p?.label),children:W.createElement("div",{className:`${c}-items`},Array.isArray(p?.colors)&&p.colors?.length>0?p.colors.map((b,y)=>{const S=to(b);return W.createElement(WM,{key:`preset-${y}-${b.toHexString()}`,color:S.toCssString(),prefixCls:e,className:X(`${c}-color`,{[`${c}-color-checked`]:b.toCssString()===n?.toCssString(),[`${c}-color-bright`]:tR(b,i.colorBgElevated)}),onClick:()=>d(b)})}):W.createElement("span",{className:`${c}-empty`},o.presetEmpty))}));return W.createElement("div",{className:c},W.createElement(vk,{defaultActiveKey:u,ghost:true,items:m}))},yk=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return Ht(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Sk=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??Bb(t),i=e.contentLineHeightSM??Bb(n),a=e.contentLineHeightLG??Bb(r),c=tR(new jo(e.colorBgSolid),"#fff")?"#000":"#fff",u=_l.reduce((p,g)=>({...p,[`${g}ShadowColor`]:`0 ${ie(e.controlOutlineWidth)} 0 ${fh(e[`${g}1`],e.colorBgContainer)}`}),{}),d=e.colorBgContainerDisabled,m=e.colorBgContainerDisabled;return {...u,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:c,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*a)/2-e.lineWidth,0),defaultBgDisabled:d,dashedBgDisabled:m}},hoe=e=>{const{componentCls:t,antCls:n}=e,[r,o]=dr(n,"btn");return {[t]:[{[r("border-width")]:"1px",[r("border-color")]:"#000",[r("border-color-hover")]:o("border-color"),[r("border-color-active")]:o("border-color"),[r("border-color-disabled")]:o("border-color"),[r("border-style")]:"solid",[r("text-color")]:"#000",[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color"),[r("text-color-disabled")]:o("text-color"),[r("bg-color")]:"#ddd",[r("bg-color-hover")]:o("bg-color"),[r("bg-color-active")]:o("bg-color"),[r("bg-color-disabled")]:e.colorBgContainerDisabled,[r("bg-color-container")]:e.colorBgContainer,[r("shadow")]:"none"},{border:[o("border-width"),o("border-style"),o("border-color")].join(" "),color:o("text-color"),backgroundColor:o("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[o("border-width"),o("border-style"),o("border-color-hover")].join(" "),color:o("text-color-hover"),backgroundColor:o("bg-color-hover")},"&:active":{border:[o("border-width"),o("border-style"),o("border-color-active")].join(" "),color:o("text-color-active"),backgroundColor:o("bg-color-active")}}},{[`&${t}-variant-solid`]:{[r("solid-bg-color")]:o("color-base"),[r("solid-bg-color-hover")]:o("color-hover"),[r("solid-bg-color-active")]:o("color-active"),[r("border-color")]:"transparent",[r("text-color")]:e.colorTextLightSolid,[r("bg-color")]:o("solid-bg-color"),[r("bg-color-hover")]:o("solid-bg-color-hover"),[r("bg-color-active")]:o("solid-bg-color-active"),boxShadow:o("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("border-color")]:o("color-base"),[r("border-color-hover")]:o("color-hover"),[r("border-color-active")]:o("color-active"),[r("bg-color")]:o("bg-color-container"),[r("text-color")]:o("color-base"),[r("text-color-hover")]:o("color-hover"),[r("text-color-active")]:o("color-active"),boxShadow:o("shadow")},[`&${t}-variant-dashed`]:{[r("border-style")]:"dashed",[r("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[r("border-color")]:"transparent",[r("text-color")]:o("color-base"),[r("bg-color")]:o("color-light"),[r("bg-color-hover")]:o("color-light-hover"),[r("bg-color-active")]:o("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[r("border-color")]:"transparent",[r("text-color")]:o("color-base"),[r("text-color-hover")]:o("color-hover"),[r("text-color-active")]:o("color-active"),[r("bg-color")]:"transparent",[r("bg-color-hover")]:"transparent",[r("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[r("bg-color-hover")]:o("color-light"),[r("bg-color-active")]:o("color-light-active")}},{[`&${t}-variant-link`]:{[r("color-base")]:e.colorLink,[r("color-hover")]:e.colorLinkHover,[r("color-active")]:e.colorLinkActive},[`&${t}-color-primary`]:{[r("color-base")]:e.colorPrimary,[r("color-hover")]:e.colorPrimaryHover,[r("color-active")]:e.colorPrimaryActive,[r("color-light")]:e.colorPrimaryBg,[r("color-light-hover")]:e.colorPrimaryBgHover,[r("color-light-active")]:e.colorPrimaryBorder,[r("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.primaryColor,[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color")}},[`&${t}-color-dangerous`]:{[r("color-base")]:e.colorError,[r("color-hover")]:e.colorErrorHover,[r("color-active")]:e.colorErrorActive,[r("color-light")]:e.colorErrorBg,[r("color-light-hover")]:e.colorErrorBgFilledHover,[r("color-light-active")]:e.colorErrorBgActive,[r("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.dangerColor,[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color")}},[`&${t}-color-default`]:{[r("solid-bg-color")]:e.colorBgSolid,[r("solid-bg-color-hover")]:e.colorBgSolidHover,[r("solid-bg-color-active")]:e.colorBgSolidActive,[r("color-base")]:e.defaultBorderColor,[r("color-hover")]:e.defaultHoverBorderColor,[r("color-active")]:e.defaultActiveBorderColor,[r("color-light")]:e.colorFillTertiary,[r("color-light-hover")]:e.colorFillSecondary,[r("color-light-active")]:e.colorFill,[r("text-color")]:e.colorText,[r("text-color-hover")]:e.defaultHoverBorderColor,[r("text-color-active")]:e.defaultActiveBorderColor,[r("shadow")]:e.defaultShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.solidTextColor,[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("bg-color-hover")]:e.defaultHoverBg,[r("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[r("text-color")]:e.textTextColor,[r("text-color-hover")]:e.textTextHoverColor,[r("text-color-active")]:e.textTextActiveColor,[r("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("text-color")]:e.defaultGhostColor,[r("border-color")]:e.defaultGhostBorderColor}}}},_l.map(i=>{const a=e[`${i}6`],c=e[`${i}1`],u=e[`${i}5`],d=e[`${i}2`],m=e[`${i}3`],p=e[`${i}7`],g=e[`${i}ShadowColor`];return {[`&${t}-color-${i}`]:{[r("color-base")]:a,[r("color-hover")]:u,[r("color-active")]:p,[r("color-light")]:c,[r("color-light-hover")]:d,[r("color-light-active")]:m,[r("shadow")]:g}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:o("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[r("bg-color")]:"transparent",[r("shadow")]:"none"}}]}},poe=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:c,calc:u}=e;return {[t]:{outline:"none",position:"relative",display:"inline-flex",gap:c,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation","&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:bu(),"> a":{color:"currentColor"},"&:not(:disabled)":Si(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(d=>`${d} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(c).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(c).mul(-1).equal()}}}}}},goe=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),nR=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:c,buttonPaddingVertical:u,buttonIconOnlyFontSize:d}=e;return [{[t]:{fontSize:o,height:r,padding:`${ie(u)} ${ie(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[c]:{fontSize:d}}}},{[`${n}${n}-circle${t}`]:goe(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},voe=e=>{const t=Ht(e,{fontSize:e.contentFontSize});return nR(t,e.componentCls)},boe=e=>{const t=Ht(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return nR(t,`${e.componentCls}-sm`)},yoe=e=>{const t=Ht(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return nR(t,`${e.componentCls}-lg`)},Soe=e=>{const{componentCls:t}=e;return {[t]:{[`&${t}-block`]:{width:"100%"}}}},Coe=Ut("Button",e=>{const t=yk(e);return [poe(t),voe(t),boe(t),yoe(t),Soe(t),hoe(t),sre(t)]},Sk,{unitless:{fontWeight:true,contentLineHeight:true,contentLineHeightSM:true,contentLineHeightLG:true}});function xoe(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,c=a?"> *":"",u=["hover",i?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${c}`).join(",");return {[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[u]:{zIndex:3},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${c}`]:{zIndex:0}}}}function woe(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return {[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Af(e,t={focus:true}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return {[i]:{...xoe(e,i,t,o),...woe(o,i,t)}}}function $oe(e,t,n){return {[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function Eoe(e,t){return {[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Moe(e){const t=`${e.componentCls}-compact-vertical`;return {[t]:{...$oe(e,t,e.componentCls),...Eoe(e.componentCls,t)}}}const Roe=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:o}=e,i=o(r).mul(-1).equal(),a=c=>{const u=`${t}-compact${c?"-vertical":""}-item`,d=`${u}${t}-primary:not([disabled])`;return {[u]:{transition:"none"},[`${d} + ${d}::before`]:{position:"absolute",top:c?i:0,insetInlineStart:c?0:i,backgroundColor:n,content:'""',width:c?"100%":r,height:c?r:"100%"}}};return {...a(),...a(true)}},Toe=Rf(["Button","compact"],e=>{const t=yk(e);return [Af(t),Moe(t),Roe(t)]},Sk);function Aoe(e){if(typeof e=="object"&&e){let t=e?.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return {loading:!!e,delay:0}}const Noe={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Poe=W.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=false,prefixCls:o,color:i,variant:a,type:c,danger:u=false,shape:d,size:m,disabled:p,className:g,rootClassName:b,children:y,icon:S,iconPosition:C,iconPlacement:w,ghost:$=false,block:M=false,htmlType:T="button",classNames:R,styles:I,style:P,autoInsertSpace:N,autoFocus:O,..._}=e,L=Ko(y),H=c||"default",{button:U}=W.useContext(xt),q=d||U?.shape||"default",[V,z]=f.useMemo(()=>{if(i&&a)return [i,a];if(c||u){const st=Noe[H]||[];return u?["danger",st[1]]:st}return U?.color&&U?.variant?[U.color,U.variant]:["default","outlined"]},[i,a,c,u,U?.color,U?.variant,H]),[F,G]=f.useMemo(()=>$&&z==="solid"?[V,"outlined"]:[V,z],[V,z,$]),Y=F==="danger",Q=Y?"dangerous":F,{getPrefixCls:D,direction:B,autoInsertSpace:K,className:J,style:ee,classNames:te,styles:ne}=Wt("button"),ae=N??K??true,oe=D("btn",o),[re,ce]=Coe(oe),he=f.useContext(eo),me=p??he,Re=f.useContext(ak),se=f.useMemo(()=>Aoe(r),[r]),[de,Se]=f.useState(se.loading),[be,He]=f.useState(false),Ue=f.useRef(null),Pe=Xl(t,Ue),ue=L.length===1&&!S&&!Mx(G),ye=f.useRef(true);W.useEffect(()=>(ye.current=false,()=>{ye.current=true;}),[]),Mn(()=>{let st=null;se.delay>0?st=setTimeout(()=>{st=null,Se(true);},se.delay):Se(se.loading);function Fe(){st&&(clearTimeout(st),st=null);}return Fe},[se.delay,se.loading]),f.useEffect(()=>{if(!Ue.current||!ae)return;const st=Ue.current.textContent||"";ue&&N2(st)?be||He(true):be&&He(false);}),f.useEffect(()=>{O&&Ue.current&&Ue.current.focus();},[]);const Te=W.useCallback(st=>{if(de||me){st.preventDefault();return}e.onClick?.((st));},[e.onClick,de,me]),{compactSize:qe,compactItemClassnames:Ze}=Ds(oe,B),We={large:"lg",small:"sm",middle:void 0},tt=io(st=>m??qe??Re??st),nt=tt?We[tt]??"":"",Ke=de?"loading":S,Oe=w??C??"start",Qe=Ln(_,["navigate"]),Xe={...e,type:H,color:F,variant:G,danger:Y,shape:q,size:tt,disabled:me,loading:de,iconPlacement:Oe},[_e,ze]=Xt([n?void 0:te,R],[n?void 0:ne,I],{props:Xe}),ct=X(oe,re,ce,{[`${oe}-${q}`]:q!=="default"&&q!=="square"&&q,[`${oe}-${H}`]:H,[`${oe}-dangerous`]:u,[`${oe}-color-${Q}`]:Q,[`${oe}-variant-${G}`]:G,[`${oe}-${nt}`]:nt,[`${oe}-icon-only`]:!y&&y!==0&&!!Ke,[`${oe}-background-ghost`]:$&&!Mx(G),[`${oe}-loading`]:de,[`${oe}-two-chinese-chars`]:be&&ae&&!de,[`${oe}-block`]:M,[`${oe}-rtl`]:B==="rtl",[`${oe}-icon-end`]:Oe==="end"},Ze,g,b,J,_e.root),Pt={...ze.root,...ee,...P},ut={className:_e.icon,style:ze.icon},Dt=st=>W.createElement(sk,{prefixCls:oe,...ut},st),wt=W.createElement(are,{existIcon:!!S,prefixCls:oe,loading:de,mount:ye.current,...ut});let Tt;S&&!de?Tt=Dt(S):r&&typeof r=="object"&&r.icon?Tt=Dt(r.icon):Tt=wt;const gt=Qr(y)?ire(y,ue&&ae,ze.content,_e.content):null;if(Qe.href!==void 0)return W.createElement("a",{...Qe,className:X(ct,{[`${oe}-disabled`]:me}),href:me?void 0:Qe.href,style:Pt,onClick:Te,ref:Pe,tabIndex:me?-1:0,"aria-disabled":me},Tt,gt);let ft=W.createElement("button",{..._,type:T,className:ct,style:Pt,onClick:Te,disabled:me,ref:Pe},Tt,gt,Ze&&W.createElement(Toe,{prefixCls:oe}));return Mx(G)||(ft=W.createElement(Vp,{component:"Button",disabled:de},ft)),ft}),mt=Poe;mt.Group=rre;mt.__ANT_BUTTON=true;const Nx=e=>typeof e?.then=="function",rR=e=>{const{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:c,isSilent:u,quitOnNullishReturnValue:d,actionFn:m}=e,p=f.useRef(false),g=f.useRef(null),[b,y]=y0(false),S=(...$)=>{i?.(...$);};f.useEffect(()=>{let $=null;return a&&($=setTimeout(()=>{g.current?.focus({preventScroll:true});})),()=>{$&&clearTimeout($);}},[a]);const C=$=>{Nx($)&&(y(true),$.then((...M)=>{y(false,true),S.apply(void 0,M),p.current=false;},M=>{if(y(false,true),p.current=false,!u?.())return Promise.reject(M)}));},w=$=>{if(p.current)return;if(p.current=true,!m){S();return}let M;if(c){if(M=m($),d&&!Nx(M)){p.current=false,S($);return}}else if(m.length)M=m(i),p.current=false;else if(M=m(),!Nx(M)){S();return}C(M);};return f.createElement(mt,{...qM(t),onClick:w,loading:b,prefixCls:r,...o,ref:g},n)},Up=W.createContext({}),{Provider:Ck}=Up,qI=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:c,onConfirm:u,onClose:d}=f.useContext(Up);return o?W.createElement(rR,{isSilent:r,actionFn:c,close:(...m)=>{a?.(...m),u?.(false),d?.();},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},GI=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:c,onOk:u,onClose:d}=f.useContext(Up);return W.createElement(rR,{isSilent:n,type:a||"primary",actionFn:u,close:(...m)=>{t?.(...m),c?.(true),d?.();},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)},xk=f.createContext({});function WI(e,t,n){let r=t;return !r&&n&&(r=`${e}-${n}`),r}function KI(e,t){let n=e[`page${t?"Y":"X"}Offset`];const r=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const o=e.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r]);}return n}function Ioe(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=KI(o),n.top+=KI(o,true),n}function YI(e,t=false){if(FM(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o);let a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return false}function oR(e,t=false){const n=[...e.querySelectorAll("*")].filter(r=>YI(r,t));return YI(e,t)&&n.unshift(e),n}function iR(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const r=e.value.length;switch(n){case "start":e.setSelectionRange(0,0);break;case "end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r);}}}let Vd=null,yl=[];function wk(){return yl[yl.length-1]}function Ooe(e){const{activeElement:t}=document;return e===t||e.contains(t)}function Px(){const e=wk(),{activeElement:t}=document;if(e&&!Ooe(e)){const n=oR(e);(n.includes(Vd)?Vd:n[0])?.focus();}else Vd=t;}function XI(e){if(e.key==="Tab"){const{activeElement:t}=document,n=wk(),r=oR(n),o=r[r.length-1];e.shiftKey&&t===r[0]?Vd=o:!e.shiftKey&&t===o&&(Vd=r[0]);}}function Doe(e){return e&&(yl=yl.filter(t=>t!==e),yl.push(e),window.addEventListener("focusin",Px),window.addEventListener("keydown",XI,true),Px()),()=>{Vd=null,yl=yl.filter(t=>t!==e),yl.length===0&&(window.removeEventListener("focusin",Px),window.removeEventListener("keydown",XI,true));}}function _oe(e,t){f.useEffect(()=>{if(e){const n=t();if(n)return Doe(n)}},[e]);}const Loe=f.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,className:r,style:o,title:i,ariaId:a,footer:c,closable:u,closeIcon:d,onClose:m,children:p,bodyStyle:g,bodyProps:b,modalRender:y,onMouseDown:S,onMouseUp:C,holderRef:w,visible:$,forceRender:M,width:T,height:R,classNames:I,styles:P,isFixedPos:N,focusTrap:O}=e,{panel:_}=W.useContext(xk),L=f.useRef(null),H=Xl(w,_,L);_oe($&&N&&O!==false,()=>L.current),W.useImperativeHandle(t,()=>({focus:()=>{L.current?.focus({preventScroll:true});}}));const U={};T!==void 0&&(U.width=T),R!==void 0&&(U.height=R);const q=c?W.createElement("div",{className:X(`${n}-footer`,I?.footer),style:{...P?.footer}},c):null,V=i?W.createElement("div",{className:X(`${n}-header`,I?.header),style:{...P?.header}},W.createElement("div",{className:X(`${n}-title`,I?.title),id:a,style:{...P?.title}},i)):null,z=f.useMemo(()=>typeof u=="object"&&u!==null?u:u?{closeIcon:d??W.createElement("span",{className:`${n}-close-x`})}:{},[u,d,n]),F=po(z,true),G=typeof u=="object"&&u.disabled,Y=u?W.createElement("button",P0({type:"button",onClick:m,"aria-label":"Close"},F,{className:`${n}-close`,disabled:G}),z.closeIcon):null,Q=W.createElement("div",{className:X(`${n}-container`,I?.container),style:P?.container},Y,V,W.createElement("div",P0({className:X(`${n}-body`,I?.body),style:{...g,...P?.body}},b),p),q);return W.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:H,style:{...o,...U},className:X(n,r),onMouseDown:S,onMouseUp:C,tabIndex:-1},W.createElement(Loe,{shouldUpdate:$||M},y?y(Q):Q))});function I2(){return I2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,title:r,style:o,className:i,visible:a,forceRender:c,destroyOnHidden:u,motionName:d,ariaId:m,onVisibleChanged:p,mousePosition:g}=e,b=f.useRef(null),y=f.useRef(null);f.useImperativeHandle(t,()=>({...y.current,inMotion:b.current.inMotion,enableMotion:b.current.enableMotion}));const[S,C]=f.useState(),w={};S&&(w.transformOrigin=S);function $(){if(!b.current?.nativeElement)return;const M=Ioe(b.current.nativeElement);C(g&&(g.x||g.y)?`${g.x-M.left}px ${g.y-M.top}px`:"");}return f.createElement(vo,{visible:a,onVisibleChanged:p,onAppearPrepare:$,onEnterPrepare:$,forceRender:c,motionName:d,removeOnLeave:u,ref:b},({className:M,style:T},R)=>f.createElement($k,I2({},e,{ref:y,title:r,ariaId:m,prefixCls:n,holderRef:R,style:{...T,...o,...w},className:X(i,M)})))});function O2(){return O2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,style:n,visible:r,maskProps:o,motionName:i,className:a}=e;return f.createElement(vo,{key:"mask",visible:r,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:c,style:u},d)=>f.createElement("div",O2({ref:d,style:{...u,...n},className:X(`${t}-mask`,c,a)},o)))};function Th(){return Th=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t="rc-dialog",zIndex:n,visible:r=false,focusTriggerAfterClose:o=true,wrapStyle:i,wrapClassName:a,wrapProps:c,onClose:u,afterOpenChange:d,afterClose:m,transitionName:p,animation:g,closable:b=true,mask:y=true,maskTransitionName:S,maskAnimation:C,maskClosable:w=true,maskStyle:$,maskProps:M,rootClassName:T,rootStyle:R,classNames:I,styles:P}=e,N=f.useRef(null),O=f.useRef(null),_=f.useRef(null),[L,H]=f.useState(r),[U,q]=f.useState(false),V=Zl();function z(){U$(O.current,document.activeElement)||(N.current=document.activeElement);}function F(){U$(O.current,document.activeElement)||_.current?.focus();}function G(){if(H(false),y&&N.current&&o){try{N.current.focus({preventScroll:!0});}catch{}N.current=null;}L&&m?.();}function Y(ne){ne?F():G(),d?.(ne);}function Q(ne){u?.(ne);}const D=f.useRef(false),B=f.useRef(null),K=()=>{clearTimeout(B.current),D.current=true;},J=()=>{B.current=setTimeout(()=>{D.current=false;});};let ee=null;w&&(ee=ne=>{D.current?D.current=false:O.current===ne.target&&Q(ne);}),f.useEffect(()=>{if(r){if(H(true),z(),O.current){const ne=getComputedStyle(O.current);q(ne.position==="fixed");}}else L&&_.current.enableMotion()&&!_.current.inMotion()&&G();},[r]),f.useEffect(()=>()=>{clearTimeout(B.current);},[]);const te={zIndex:n,...i,...P?.wrapper,display:L?null:"none"};return f.createElement("div",Th({className:X(`${t}-root`,T),style:R},po(e,{data:true})),f.createElement(zoe,{prefixCls:t,visible:y&&r,motionName:WI(t,S,C),style:{zIndex:n,...$,...P?.mask},maskProps:M,className:I?.mask}),f.createElement("div",Th({className:X(`${t}-wrap`,a,I?.wrapper),ref:O,onClick:ee,style:te},c),f.createElement(Boe,Th({},e,{isFixedPos:U,onMouseDown:K,onMouseUp:J,ref:_,closable:b,ariaId:V,prefixCls:t,visible:r&&L,onClose:Q,onVisibleChanged:Y,motionName:WI(t,p,g)}))))};function D2(){return D2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{visible:t,getContainer:n,forceRender:r,destroyOnHidden:o=false,afterClose:i,closable:a,panelRef:c,keyboard:u=true,onClose:d}=e,[m,p]=f.useState(t),g=f.useMemo(()=>({panel:c}),[c]),b=({top:y,event:S})=>{if(y&&u){S.stopPropagation(),d?.(S);return}};return f.useEffect(()=>{t&&p(true);},[t]),!r&&o&&!m?null:f.createElement(xk.Provider,{value:g},f.createElement(qy,{open:t||r||m,onEsc:b,autoDestroy:false,getContainer:n,autoLock:t||m},f.createElement(koe,D2({},e,{destroyOnHidden:o,afterClose:()=>{const y=a&&typeof a=="object"?a:{},{afterClose:S}=y||{};S?.(),i?.(),p(false);}}))))},Fc="RC_FORM_INTERNAL_HOOKS",Dn=()=>{xr(false,"Can not find FormContext. Please make sure you wrap Field under Form.");},af=f.createContext({getFieldValue:Dn,getFieldsValue:Dn,getFieldError:Dn,getFieldWarning:Dn,getFieldsError:Dn,isFieldsTouched:Dn,isFieldTouched:Dn,isFieldValidating:Dn,isFieldsValidating:Dn,resetFields:Dn,setFields:Dn,setFieldValue:Dn,setFieldsValue:Dn,validateFields:Dn,submit:Dn,getInternalHooks:()=>(Dn(),{dispatch:Dn,initEntityValue:Dn,registerField:Dn,useSubscribe:Dn,setInitialValues:Dn,destroyForm:Dn,setCallbacks:Dn,registerWatch:Dn,getFields:Dn,setValidateMessages:Dn,setPreserve:Dn,getInitialValue:Dn})}),I0=f.createContext(null);function _2(e){return e==null?[]:Array.isArray(e)?e:[e]}function Hoe(e){return e&&!!e._init}function L2(){return {default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var B2=L2();function Voe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function joe(e,t,n){if(TM())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&tp(o,n.prototype),o}function z2(e){var t=typeof Map=="function"?new Map:void 0;return z2=function(r){if(r===null||!Voe(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o);}function o(){return joe(r,arguments,np(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:false,writable:true,configurable:true}}),tp(o,r)},z2(e)}var Uoe=/%[sdj%]/g,qoe=function(){};function k2(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n);}),t}function mi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=i)return c;switch(c){case "%s":return String(n[o++]);case "%d":return Number(n[o++]);case "%j":try{return JSON.stringify(n[o++])}catch{return "[Circular]"}break;default:return c}});return a}return e}function Goe(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function Tr(e,t){return !!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Goe(t)&&typeof e=="string"&&!e)}function Woe(e,t,n){var r=[],o=0,i=e.length;function a(c){r.push.apply(r,Yt(c||[])),o++,o===i&&n(r);}e.forEach(function(c){t(c,a);});}function QI(e,t,n){var r=0,o=e.length;function i(a){if(a&&a.length){n(a);return}var c=r;r=r+1,ct.max?o.push(mi(i.messages[p].max,t.fullField,t.max)):c&&u&&(mt.max)&&o.push(mi(i.messages[p].range,t.fullField,t.min,t.max));},Ek=function(t,n,r,o,i,a){t.required&&(!r.hasOwnProperty(t.field)||Tr(n,a||t.type))&&o.push(mi(i.messages.required,t.fullField));},eb;const tie=(function(){if(eb)return eb;var e="[a-fA-F\\d:]",t=function(I){return I&&I.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),c=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),u=new RegExp("^".concat(n,"$")),d=new RegExp("^".concat(a,"$")),m=function(I){return I&&I.exact?c:new RegExp("(?:".concat(t(I)).concat(n).concat(t(I),")|(?:").concat(t(I)).concat(a).concat(t(I),")"),"g")};m.v4=function(R){return R&&R.exact?u:new RegExp("".concat(t(R)).concat(n).concat(t(R)),"g")},m.v6=function(R){return R&&R.exact?d:new RegExp("".concat(t(R)).concat(a).concat(t(R)),"g")};var p="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",b=m.v4().source,y=m.v6().source,S="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",C="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",w="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",$="(?::\\d{2,5})?",M='(?:[/?#][^\\s"]*)?',T="(?:".concat(p,"|www\\.)").concat(g,"(?:localhost|").concat(b,"|").concat(y,"|").concat(S).concat(C).concat(w,")").concat($).concat(M);return eb=new RegExp("(?:^".concat(T,"$)"),"i"),eb});var Ix={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},hh={integer:function(t){return hh.number(t)&&parseInt(t,10)===t},float:function(t){return hh.number(t)&&!hh.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return true;try{return !!new RegExp(t)}catch{return false}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?false:typeof t=="number"},object:function(t){return Sr(t)==="object"&&!hh.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Ix.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(Ix.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(tie())},hex:function(t){return typeof t=="string"&&!!t.match(Ix.hex)}},nie=function(t,n,r,o,i){if(t.required&&n===void 0){Ek(t,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],c=t.type;a.indexOf(c)>-1?hh[c](n)||o.push(mi(i.messages.types[c],t.fullField,t.type)):c&&Sr(n)!==t.type&&o.push(mi(i.messages.types[c],t.fullField,t.type));},rie=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(mi(i.messages.whitespace,t.fullField));};const an={required:Ek,whitespace:rie,type:nie,range:eie,enum:Zoe,pattern:Joe};var oie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i);}r(a);},iie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(n==null&&!t.required)return r();an.required(t,n,o,a,i,"array"),n!=null&&(an.type(t,n,o,a,i),an.range(t,n,o,a,i));}r(a);},aie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&an.type(t,n,o,a,i);}r(a);},sie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n,"date")&&!t.required)return r();if(an.required(t,n,o,a,i),!Tr(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),an.type(t,u,o,a,i),u&&an.range(t,u.getTime(),o,a,i);}}r(a);},lie="enum",cie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&an[lie](t,n,o,a,i);}r(a);},uie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&(an.type(t,n,o,a,i),an.range(t,n,o,a,i));}r(a);},die=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&(an.type(t,n,o,a,i),an.range(t,n,o,a,i));}r(a);},fie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&an.type(t,n,o,a,i);}r(a);},mie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(n===""&&(n=void 0),Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&(an.type(t,n,o,a,i),an.range(t,n,o,a,i));}r(a);},hie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),n!==void 0&&an.type(t,n,o,a,i);}r(a);},pie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n,"string")&&!t.required)return r();an.required(t,n,o,a,i),Tr(n,"string")||an.pattern(t,n,o,a,i);}r(a);},gie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n)&&!t.required)return r();an.required(t,n,o,a,i),Tr(n)||an.type(t,n,o,a,i);}r(a);},vie=function(t,n,r,o,i){var a=[],c=Array.isArray(n)?"array":Sr(n);an.required(t,n,o,a,i,c),r(a);},bie=function(t,n,r,o,i){var a=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Tr(n,"string")&&!t.required)return r();an.required(t,n,o,a,i,"string"),Tr(n,"string")||(an.type(t,n,o,a,i),an.range(t,n,o,a,i),an.pattern(t,n,o,a,i),t.whitespace===true&&an.whitespace(t,n,o,a,i));}r(a);},tb=function(t,n,r,o,i){var a=t.type,c=[],u=t.required||!t.required&&o.hasOwnProperty(t.field);if(u){if(Tr(n,a)&&!t.required)return r();an.required(t,n,o,c,i,a),Tr(n,a)||an.type(t,n,o,c,i);}r(c);};const Ah={string:bie,method:fie,number:mie,boolean:aie,regexp:gie,integer:die,float:uie,array:iie,object:hie,enum:cie,pattern:pie,date:sie,url:tb,hex:tb,email:tb,tel:tb,required:vie,any:oie};var qp=(function(){function e(t){Yi(this,e),yt(this,"rules",null),yt(this,"_messages",B2),this.define(t);}return Xi(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Sr(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i];});}},{key:"messages",value:function(n){return n&&(this._messages=eO(L2(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,c=o,u=i;if(typeof c=="function"&&(u=c,c={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function d(y){var S=[],C={};function w(M){if(Array.isArray(M)){var T;S=(T=S).concat.apply(T,Yt(M));}else S.push(M);}for(var $=0;$0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(P)?P:[P];!c.suppressWarning&&N.length&&e.warning("async-validator:",N),N.length&&C.message!==void 0&&C.message!==null&&(N=[].concat(C.message));var O=N.map(JI(C,a));if(c.first&&O.length)return b[C.field]=1,S(O);if(!w)S(O);else {if(C.required&&!y.value)return C.message!==void 0?O=[].concat(C.message).map(JI(C,a)):c.error&&(O=[c.error(C,mi(c.messages.required,C.field))]),S(O);var _={};C.defaultField&&Object.keys(y.value).map(function(U){_[U]=C.defaultField;}),_=Jn(Jn({},_),y.rule.fields);var L={};Object.keys(_).forEach(function(U){var q=_[U],V=Array.isArray(q)?q:[q];L[U]=V.map($.bind(null,U));});var H=new e(L);H.messages(c.messages),y.rule.options&&(y.rule.options.messages=c.messages,y.rule.options.error=c.error),H.validate(y.value,y.rule.options||c,function(U){var q=[];O&&O.length&&q.push.apply(q,Yt(O)),U&&U.length&&q.push.apply(q,Yt(U)),S(q.length?q:null);});}}var T;if(C.asyncValidator)T=C.asyncValidator(C,y.value,M,y.source,c);else if(C.validator){try{T=C.validator(C,y.value,M,y.source,c);}catch(P){var R,I;(R=(I=console).error)===null||R===void 0||R.call(I,P),c.suppressValidatorError||setTimeout(function(){throw P},0),M(P.message);}T===true?M():T===false?M(typeof C.message=="function"?C.message(C.fullField||C.field):C.message||"".concat(C.fullField||C.field," fails")):T instanceof Array?M(T):T instanceof Error&&M(T.message);}T&&T.then&&T.then(function(){return M()},function(P){return M(P)});},function(y){d(y);},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Ah.hasOwnProperty(n.type))throw new Error(mi("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?Ah.required:Ah[this.getType(n)]||void 0}}]),e})();yt(qp,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ah[t]=n;});yt(qp,"warning",qoe);yt(qp,"messages",B2);yt(qp,"validators",Ah);const Fo="'${name}' is not a valid ${type}",Mk={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Fo,method:Fo,array:Fo,object:Fo,number:Fo,date:Fo,boolean:Fo,integer:Fo,float:Fo,regexp:Fo,email:Fo,tel:Fo,url:Fo,hex:Fo},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},tO=qp;function yie(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const nO="CODE_LOGIC_ERROR";async function F2(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,tO.warning=()=>{},i.validator){const g=i.validator;i.validator=(...b)=>{try{return g(...b)}catch(y){return console.error(y),Promise.reject(nO)}};}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const c=new tO({[e]:[i]}),u=Ad(Mk,r.validateMessages);c.messages(u);let d=[];try{await Promise.resolve(c.validate({[e]:t},{...r}));}catch(g){g.errors&&(d=g.errors.map(({message:b},y)=>{const S=b===nO?u.default:b;return f.isValidElement(S)?f.cloneElement(S,{key:`error_${y}`}):S}));}if(!d.length&&a&&Array.isArray(t)&&t.length>0)return (await Promise.all(t.map((b,y)=>F2(`${e}.${y}`,b,a,r,o)))).reduce((b,y)=>[...b,...y],[]);const m={...n,name:e,enum:(n.enum||[]).join(", "),...o};return d.map(g=>typeof g=="string"?yie(g,m):g)}function Sie(e,t,n,r,o,i){const a=e.join("."),c=n.map((d,m)=>{const p=d.validator,g={...d,ruleIndex:m};return p&&(g.validator=(b,y,S)=>{let C=false;const $=p(b,y,(...M)=>{Promise.resolve().then(()=>{xr(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||S(...M);});});C=$&&typeof $.then=="function"&&typeof $.catch=="function",xr(C,"`callback` is deprecated. Please return a promise instead."),C&&$.then(()=>{S();}).catch(M=>{S(M||" ");});}),g}).sort(({warningOnly:d,ruleIndex:m},{warningOnly:p,ruleIndex:g})=>!!d==!!p?m-g:d?1:-1);let u;if(o===true)u=new Promise(async(d,m)=>{for(let p=0;pF2(a,t,m,r,i).then(p=>({errors:p,rule:m})));u=(o?xie(d):Cie(d)).then(m=>Promise.reject(m));}return u.catch(d=>d),u}async function Cie(e){return Promise.all(e).then(t=>[].concat(...t))}async function xie(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([]);});});})}function nr(e){return _2(e)}function rO(e,t){let n={};return t.forEach(r=>{const o=aa(e,r);n=Li(n,r,o);}),n}function jd(e,t,n=false){return e&&e.some(r=>O0(t,r,n))}function O0(e,t,n=false){return !e||!t||!n&&e.length!==t.length?false:t.every((r,o)=>e[o]===r)}function wie(e,t){if(e===t)return true;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return false;const n=Object.keys(e),r=Object.keys(t);return [...new Set([...n,...r])].every(i=>{const a=e[i],c=t[i];return typeof a=="function"&&typeof c=="function"?true:a===c})}function $ie(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function oO(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}function H2(){return H2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{preserve:t,isListField:n,name:r}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(n,t,nr(r)),this.cancelRegisterFunc=null;};getNamePath=()=>{const{name:t,fieldContext:n}=this.props,{prefixName:r=[]}=n;return t!==void 0?[...r,...t]:[]};getRules=()=>{const{rules:t=[],fieldContext:n}=this.props;return t.map(r=>typeof r=="function"?r(n):r)};reRender(){this.mounted&&this.forceUpdate();}refresh=()=>{this.mounted&&this.setState(({resetCount:t})=>({resetCount:t+1}));};metaCache=null;triggerMetaEvent=t=>{const{onMetaChange:n}=this.props;if(n){const r={...this.getMeta(),destroy:t};Dl(this.metaCache,r)||n(r),this.metaCache=r;}else this.metaCache=null;};onStoreChange=(t,n,r)=>{const{shouldUpdate:o,dependencies:i=[],onReset:a}=this.props,{store:c}=r,u=this.getNamePath(),d=this.getValue(t),m=this.getValue(c),p=n&&jd(n,u);switch(r.type==="valueUpdate"&&r.source==="external"&&!Dl(d,m)&&(this.touched=true,this.dirty=true,this.validatePromise=null,this.errors=Ec,this.warnings=Gm,this.triggerMetaEvent()),r.type){case "reset":if(!n||p){this.touched=false,this.dirty=false,this.validatePromise=void 0,this.errors=Ec,this.warnings=Gm,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case "remove":{if(o&&Ox(o,t,c,d,m,r)){this.reRender();return}break}case "setField":{const{data:g}=r;if(p){"touched"in g&&(this.touched=g.touched),"validating"in g&&!("originRCField"in g)&&(this.validatePromise=g.validating?Promise.resolve([]):null),"errors"in g&&(this.errors=g.errors||Ec),"warnings"in g&&(this.warnings=g.warnings||Gm),this.dirty=true,this.triggerMetaEvent(),this.reRender();return}else if("value"in g&&jd(n,u,true)){this.reRender();return}if(o&&!u.length&&Ox(o,t,c,d,m,r)){this.reRender();return}break}case "dependenciesUpdate":{if(i.map(nr).some(b=>jd(r.relatedFields,b))){this.reRender();return}break}default:if(p||(!i.length||u.length||o)&&Ox(o,t,c,d,m,r)){this.reRender();return}break}o===true&&this.reRender();};validateRules=t=>{const n=this.getNamePath(),r=this.getValue(),{triggerName:o,validateOnly:i=false}=t||{},a=Promise.resolve().then(async()=>{if(!this.mounted)return [];const{validateFirst:c=false,messageVariables:u,validateDebounce:d}=this.props;let m=this.getRules();if(o&&(m=m.filter(g=>g).filter(g=>{const{validateTrigger:b}=g;return b?_2(b).includes(o):true})),d&&o&&(await new Promise(g=>{setTimeout(g,d);}),this.validatePromise!==a))return [];const p=Sie(n,r,m,t,c,u);return p.catch(g=>g).then((g=Ec)=>{if(this.validatePromise===a){this.validatePromise=null;const b=[],y=[];g.forEach?.(({rule:{warningOnly:S},errors:C=Ec})=>{S?y.push(...C):b.push(...C);}),this.errors=b,this.warnings=y,this.triggerMetaEvent(),this.reRender();}}),p});return i||(this.validatePromise=a,this.dirty=true,this.errors=Ec,this.warnings=Gm,this.triggerMetaEvent(),this.reRender()),a};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return true;const{fieldContext:t}=this.props,{getInitialValue:n}=t.getInternalHooks(Fc);return n(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=t=>{if(typeof t=="function"){const r=this.getMeta();return {...this.getOnlyChild(t(this.getControlled(),r,this.props.fieldContext)),isFunction:true}}const n=Ko(t);return n.length!==1||!f.isValidElement(n[0])?{child:n,isFunction:false}:{child:n[0],isFunction:false}};getValue=t=>{const{getFieldsValue:n}=this.props.fieldContext,r=this.getNamePath();return aa(t||n(true),r)};getControlled=(t={})=>{const{name:n,trigger:r="onChange",validateTrigger:o,getValueFromEvent:i,normalize:a,valuePropName:c="value",getValueProps:u,fieldContext:d}=this.props,m=o!==void 0?o:d.validateTrigger,p=this.getNamePath(),{getInternalHooks:g,getFieldsValue:b}=d,{dispatch:y}=g(Fc),S=this.getValue(),C=u||(R=>({[c]:R})),w=t[r],$=n!==void 0?C(S):{},M={...t,...$};return M[r]=(...R)=>{this.touched=true,this.dirty=true,this.triggerMetaEvent();let I;i?I=i(...R):I=$ie(c,...R),a&&(I=a(I,S,b(true))),I!==S&&y({type:"updateValue",namePath:p,value:I}),w&&w(...R);},_2(m||[]).forEach(R=>{const I=M[R];M[R]=(...P)=>{I&&I(...P);const{rules:N}=this.props;N&&N.length&&y({type:"validateField",namePath:p,triggerName:R});};}),M};render(){const{resetCount:t}=this.state,{children:n}=this.props,{child:r,isFunction:o}=this.getOnlyChild(n);let i;return o?i=r:f.isValidElement(r)?i=f.cloneElement(r,this.getControlled(r.props)):(xr(!r,"`children` of Field is not validate ReactElement."),i=r),f.createElement(f.Fragment,{key:t},i)}}function Rk({name:e,...t}){const n=f.useContext(af),r=f.useContext(I0),o=e!==void 0?nr(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),f.createElement(Eie,H2({key:a,name:o,isListField:i},t,{fieldContext:n}))}function Mie({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=f.useContext(af),c=f.useContext(I0),d=f.useRef({keys:[],id:0}).current,m=f.useMemo(()=>[...nr(a.prefixName)||[],...nr(e)],[a.prefixName,e]),p=f.useMemo(()=>({...a,prefixName:m}),[a,m]),g=f.useMemo(()=>({getKey:y=>{const S=m.length,C=y[S];return [d.keys[C],y.slice(S+1)]}}),[d,m]);if(typeof n!="function")return xr(false,"Form.List only accepts function as children."),null;const b=(y,S,{source:C})=>C==="internal"?false:y!==S;return f.createElement(I0.Provider,{value:g},f.createElement(af.Provider,{value:p},f.createElement(Rk,{name:[],shouldUpdate:b,rules:r,validateTrigger:o,initialValue:t,isList:true,isListField:i??!!c},({value:y=[],onChange:S},C)=>{const{getFieldValue:w}=a,$=()=>w(m||[])||[],M={add:(R,I)=>{const P=$();I>=0&&I<=P.length?(d.keys=[...d.keys.slice(0,I),d.id,...d.keys.slice(I)],S([...P.slice(0,I),R,...P.slice(I)])):(d.keys=[...d.keys,d.id],S([...P,R])),d.id+=1;},remove:R=>{const I=$(),P=new Set(Array.isArray(R)?R:[R]);P.size<=0||(d.keys=d.keys.filter((N,O)=>!P.has(O)),S(I.filter((N,O)=>!P.has(O))));},move(R,I){if(R===I)return;const P=$();R<0||R>=P.length||I<0||I>=P.length||(d.keys=oO(d.keys,R,I),S(oO(P,R,I)));}};let T=y||[];return Array.isArray(T)||(T=[]),n(T.map((R,I)=>{let P=d.keys[I];return P===void 0&&(d.keys[I]=d.id,P=d.keys[I],d.id+=1),{name:I,key:P,isListField:true}}),M,C)})))}function Rie(e){let t=false,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,c)=>{a.catch(u=>(t=true,u)).then(u=>{n-=1,r[c]=u,!(n>0)&&(t&&i(r),o(r));});});}):Promise.resolve([])}const V2="__@field_split__";function nb(e){return e.map(t=>`${typeof t}:${t}`).join(V2)}class gd{kvs=new Map;set(t,n){this.kvs.set(nb(t),n);}get(t){return this.kvs.get(nb(t))}getAsPrefix(t){const n=nb(t),r=n+V2,o=[],i=this.kvs.get(n);return i!==void 0&&o.push(i),this.kvs.forEach((a,c)=>{c.startsWith(r)&&o.push(a);}),o}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t);}delete(t){this.kvs.delete(nb(t));}map(t){return [...this.kvs.entries()].map(([n,r])=>{const o=n.split(V2);return t({key:o.map(i=>{const[,a,c]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(c):c}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}const Tie=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null);};class Aie{namePathList=[];taskId=0;watcherList=new Set;form;constructor(t){this.form=t;}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t);}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!O0(r,n))&&this.namePathList.push(n);}),this.doBatch();}doBatch(){this.taskId+=1;const t=this.taskId;Tie(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),o=n.getFieldsValue(true);this.watcherList.forEach(i=>{i(r,o,this.namePathList);}),this.namePathList=[];}});}}class Nie{formHooked=false;forceRootUpdate;subscribable=true;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new Aie(this);constructor(t){this.forceRootUpdate=t;}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:true,getInternalHooks:this.getInternalHooks});getInternalHooks=t=>t===Fc?(this.formHooked=true,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(xr(false,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=t=>{this.subscribable=t;};prevWithoutPreserves=null;setInitialValues=(t,n)=>{if(this.initialValues=t||{},n){let r=Ad(t,this.store);this.prevWithoutPreserves?.map(({key:o})=>{r=Li(r,o,aa(t,o));}),this.prevWithoutPreserves=null,this.updateStore(r);}};destroyForm=t=>{if(t)this.updateStore({});else {const n=new gd;this.getFieldEntities(true).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),true);}),this.prevWithoutPreserves=n;}};getInitialValue=t=>{const n=aa(this.initialValues,t);return t.length?Ad(n):n};setCallbacks=t=>{this.callbacks=t;};setValidateMessages=t=>{this.validateMessages=t;};setPreserve=t=>{this.preserve=t;};registerWatch=t=>this.watcherCenter.register(t);notifyWatch=(t=[])=>{this.watcherCenter.notify(t);};timeoutId=null;warningUnhooked=()=>{};updateStore=t=>{this.store=t;};getFieldEntities=(t=false)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities;getFieldsMap=(t=false)=>{const n=new gd;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r);}),n};getFieldEntitiesForNamePathList=(t,n=false)=>{if(!t)return this.getFieldEntities(true);const r=this.getFieldsMap(true);return n?t.flatMap(o=>{const i=nr(o),a=r.getAsPrefix(i);return a.length?a:[{INVALIDATE_NAME_PATH:i}]}):t.map(o=>{const i=nr(o);return r.get(i)||{INVALIDATE_NAME_PATH:nr(o)}})};getFieldsValue=(t,n)=>{this.warningUnhooked();let r,o;if(t===true||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===true&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null,true),a=[],c=[];i.forEach(d=>{const m=d.INVALIDATE_NAME_PATH||d.getNamePath();if(d.isList?.()){c.push(m);return}if(!o)a.push(m);else {const p="getMeta"in d?d.getMeta():null;o(p)&&a.push(m);}});let u=rO(this.store,a.map(nr));return c.forEach(d=>{aa(u,d)||(u=Li(u,d,[]));}),u};getFieldValue=t=>{this.warningUnhooked();const n=nr(t);return aa(this.store,n)};getFieldsError=t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:nr(t[o]),errors:[],warnings:[]}));getFieldError=t=>{this.warningUnhooked();const n=nr(t);return this.getFieldsError([n])[0].errors};getFieldWarning=t=>{this.warningUnhooked();const n=nr(t);return this.getFieldsError([n])[0].warnings};isFieldsTouched=(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=false;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(nr),i=false):(o=null,i=n):(o=n.map(nr),i=r);const a=this.getFieldEntities(true),c=p=>p.isFieldTouched();if(!o)return i?a.every(p=>c(p)||p.isList()):a.some(c);const u=new gd;o.forEach(p=>{u.set(p,[]);}),a.forEach(p=>{const g=p.getNamePath();o.forEach(b=>{b.every((y,S)=>g[S]===y)&&u.update(b,y=>[...y,p]);});});const d=p=>p.some(c),m=u.map(({value:p})=>p);return i?m.every(d):m.some(d)};isFieldTouched=t=>(this.warningUnhooked(),this.isFieldsTouched([t]));isFieldsValidating=t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(nr);return n.some(o=>{const i=o.getNamePath();return jd(r,i)&&o.isFieldValidating()})};isFieldValidating=t=>(this.warningUnhooked(),this.isFieldsValidating([t]));resetWithFieldInitialValue=(t={})=>{const n=new gd,r=this.getFieldEntities(true);r.forEach(a=>{const{initialValue:c}=a.props,u=a.getNamePath();if(c!==void 0){const d=n.get(u)||new Set;d.add({entity:a,value:c}),n.set(u,d);}});const o=a=>{a.forEach(c=>{const{initialValue:u}=c.props;if(u!==void 0){const d=c.getNamePath();if(this.getInitialValue(d)!==void 0)xr(false,`Form already set 'initialValues' with path '${d.join(".")}'. Field can not overwrite it.`);else {const p=n.get(d);if(p&&p.size>1)xr(false,`Multiple Field with path '${d.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(p){const g=this.getFieldValue(d);!c.isListField()&&(!t.skipExist||g===void 0)&&this.updateStore(Li(this.store,d,[...p][0].value));}}}});};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const c=n.get(a);c&&i.push(...[...c].map(u=>u.entity));})):i=r,o(i);};resetFields=t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(Ad(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(nr);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(Li(this.store,o,i));}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r);};setFields=t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...a}=o,c=nr(i);r.push(c),"value"in a&&this.updateStore(Li(this.store,c,a.value)),this.notifyObservers(n,[c],{type:"setField",data:o});}),this.notifyWatch(r);};getFields=()=>this.getFieldEntities(true).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:true}),a});initEntityValue=t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();aa(this.store,r)===void 0&&this.updateStore(Li(this.store,r,n));}};isMergedPreserve=t=>(t!==void 0?t:this.preserve)??true;registerField=t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.notifyWatch([n]),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:true}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"});}return (r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(c=>!O0(c.getNamePath(),n))){const c=this.store;this.updateStore(Li(c,n,a,true)),this.notifyObservers(c,[n],{type:"remove"}),this.triggerDependenciesUpdate(c,n);}}this.notifyWatch([n]);}};dispatch=t=>{switch(t.type){case "updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case "validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}};notifyObservers=(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(true)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o);});}else this.forceRootUpdate();};triggerDependenciesUpdate=(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r};updateValue=(t,n)=>{const r=nr(t),o=this.store;this.updateStore(Li(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const c=this.getFieldsMap(true).get(r),u=rO(this.store,[r]),d=this.getFieldsValue(),m=EB([d,u],{prepareArray:p=>c?.isList()?[]:[...p||[]]});a(u,m);}this.triggerOnFieldsChange([r,...i]);};setFieldsValue=t=>{this.warningUnhooked();const n=this.store;if(t){const r=Ad(this.store,t);this.updateStore(r);}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch();};setFieldValue=(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:true}]);};getDependencyChildrenFields=t=>{const n=new Set,r=[],o=new gd;this.getFieldEntities().forEach(a=>{const{dependencies:c}=a.props;(c||[]).forEach(u=>{const d=nr(u);o.update(d,(m=new Set)=>(m.add(a),m));});});const i=a=>{(o.get(a)||new Set).forEach(u=>{if(!n.has(u)){n.add(u);const d=u.getNamePath();u.isFieldDirty()&&d.length&&(r.push(d),i(d));}});};return i(t),r};triggerOnFieldsChange=(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new gd;n.forEach(({name:c,errors:u})=>{a.set(c,u);}),o.forEach(c=>{c.errors=a.get(c.name)||c.errors;});}const i=o.filter(({name:a})=>jd(t,a));i.length&&r(i,o);}};validateFields=(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,a=i?r.map(nr):[],c=[...a],u=[],d=String(Date.now()),m=new Set,{recursive:p,dirty:g}=o||{};this.getFieldEntities(true).forEach(C=>{const w=C.getNamePath();if(i||((!C.isList()||!a.some($=>O0($,w,true)))&&c.push(w),a.push(w)),!(!C.props.rules||!C.props.rules.length)&&!(g&&!C.isFieldDirty())&&(m.add(w.join(d)),!i||jd(a,w,p))){const $=C.validateRules({validateMessages:{...Mk,...this.validateMessages},...o});u.push($.then(()=>({name:w,errors:[],warnings:[]})).catch(M=>{const T=[],R=[];return M.forEach?.(({rule:{warningOnly:I},errors:P})=>{I?R.push(...P):T.push(...P);}),T.length?Promise.reject({name:w,errors:T,warnings:R}):{name:w,errors:T,warnings:R}}));}});const b=Rie(u);this.lastValidatePromise=b,b.catch(C=>C).then(C=>{const w=C.map(({name:$})=>$);this.notifyObservers(this.store,w,{type:"validateFinish"}),this.triggerOnFieldsChange(w,C);});const y=b.then(()=>this.lastValidatePromise===b?Promise.resolve(this.getFieldsValue(c)):Promise.reject([])).catch(C=>{const w=C.filter(M=>M&&M.errors.length),$=w[0]?.errors?.[0];return Promise.reject({message:$,values:this.getFieldsValue(a),errorFields:w,outOfDate:this.lastValidatePromise!==b})});y.catch(C=>C);const S=a.filter(C=>m.has(C.join(d)));return this.triggerOnFieldsChange(S),y};submit=()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t);}catch(r){console.error(r);}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t);});}}function Tk(e){const t=f.useRef(null),[,n]=f.useState({});if(!t.current)if(e)t.current=e;else {const r=()=>{n({});},o=new Nie(r);t.current=o.getForm();}return [t.current]}const j2=f.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),Pie=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=f.useContext(j2),i=f.useRef({});return f.createElement(j2.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,c)=>{t&&t(a,{changedFields:c,forms:i.current}),o.triggerFormChange(a,c);},triggerFormFinish:(a,c)=>{n&&n(a,{values:c,forms:i.current}),o.triggerFormFinish(a,c);},registerForm:(a,c)=>{a&&(i.current={...i.current,[a]:c}),o.registerForm(a,c);},unregisterForm:a=>{const c={...i.current};delete c[a],i.current=c,o.unregisterForm(a);}}},r)};function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const C=f.useRef(null),w=f.useContext(j2),[$]=Tk(r),{useSubscribe:M,setInitialValues:T,setCallbacks:R,setValidateMessages:I,setPreserve:P,destroyForm:N}=$.getInternalHooks(Fc);f.useImperativeHandle(S,()=>({...$,nativeElement:C.current})),f.useEffect(()=>(w.registerForm(e,$),()=>{w.unregisterForm(e);}),[w,$,e]),I({...w.validateMessages,...c}),R({onValuesChange:d,onFieldsChange:(V,...z)=>{w.triggerFormChange(e,V),m&&m(V,...z);},onFinish:V=>{w.triggerFormFinish(e,V),p&&p(V);},onFinishFailed:g}),P(o);const O=f.useRef(null);T(t,!O.current),O.current||(O.current=true),f.useEffect(()=>()=>N(b),[]);let _;const L=typeof i=="function";if(L){const V=$.getFieldsValue(true);_=i(V,$);}else _=i;M(!L);const H=f.useRef(null);f.useEffect(()=>{wie(H.current||[],n||[])||$.setFields(n||[]),H.current=n;},[n,$]);const U=f.useMemo(()=>({...$,validateTrigger:u}),[$,u]),q=f.createElement(I0.Provider,{value:null},f.createElement(af.Provider,{value:U},_));return a===false?q:f.createElement(a,U2({},y,{ref:C,onSubmit:V=>{V.preventDefault(),V.stopPropagation(),$.submit();},onReset:V=>{V.preventDefault(),$.resetFields(),y.onReset?.(V);}}),q)};function Dx(e){try{return JSON.stringify(e)}catch{return Math.random()}}function Oie(...e){const[t,n={}]=e,r=Hoe(n)?{form:n}:n,o=r.form,[i,a]=f.useState(()=>typeof t=="function"?t({}):void 0),c=f.useMemo(()=>Dx(i),[i]),u=f.useRef(c);u.current=c;const d=f.useContext(af),m=o||d,p=m&&m._init,{getFieldsValue:g,getInternalHooks:b}=m,{registerWatch:y}=b(Fc),S=Rt((w,$)=>{const M=r.preserve?$??g(true):w??g(),T=typeof t=="function"?t(M):aa(M,nr(t));Dx(i)!==Dx(T)&&a(T);}),C=typeof t=="function"?t:JSON.stringify(t);return f.useEffect(()=>{p&&S();},[p,C]),f.useEffect(()=>p?y(($,M)=>{S($,M);}):void 0,[p]),i}const Die=f.forwardRef(Iie),Gp=Die;Gp.FormProvider=Pie;Gp.Field=Rk;Gp.List=Mie;Gp.useForm=Tk;Gp.useWatch=Oie;const go=f.createContext({}),_ie=({children:e,status:t,override:n})=>{const r=f.useContext(go),o=f.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return f.createElement(go.Provider,{value:o},e)},Lie=f.createContext(void 0),kl=e=>{const{space:t,form:n,children:r}=e;if(!Qr(r))return null;let o=r;return n&&(o=W.createElement(_ie,{override:true,status:true},o)),t&&(o=W.createElement(tre,null,o)),o},Bie=()=>yi()&&window.document.documentElement;function zie(e,t,n){return f.useMemo(()=>({...{trap:t??true,focusTriggerAfterClose:n??true},...e}),[e,t,n])}const Zy=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,a=X({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),c=X({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),u=f.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return f.createElement("span",{className:X(t,a,c,n),style:{...u,...r}})},kie=new Bt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),aR=e=>({height:e,lineHeight:ie(e)}),Pl=e=>({width:e,...aR(e)}),Fie=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:kie,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),_x=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...aR(e)}),Hie=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return {[t]:{display:"inline-block",verticalAlign:"top",background:n,...Pl(r)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...Pl(o)},[`${t}${t}-sm`]:{...Pl(i)}}},Vie=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:c}=e;return {[r]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:n,..._x(t,c)},[`${r}-lg`]:{..._x(o,c)},[`${r}-sm`]:{..._x(i,c)}}},Ak=e=>{const{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:o}=e;return {display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:n,...Pl(o(r).mul(2).equal())}},jie=e=>({[e.skeletonNodeCls]:{...Ak(e)}}),Uie=e=>{const{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return {[t]:{...Ak(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...Pl(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},Lx=(e,t,n)=>{const{skeletonButtonCls:r}=e;return {[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Bx=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...aR(e)}),qie=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:c}=e;return {[n]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:c(r).mul(2).equal(),minWidth:c(r).mul(2).equal(),...Bx(r,c)},...Lx(e,r,n),[`${n}-lg`]:{...Bx(o,c)},...Lx(e,o,`${n}-lg`),[`${n}-sm`]:{...Bx(i,c)},...Lx(e,i,`${n}-sm`)}},Gie=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonNodeCls:c,skeletonImageCls:u,controlHeight:d,controlHeightLG:m,controlHeightSM:p,gradientFromColor:g,padding:b,marginSM:y,borderRadius:S,titleHeight:C,blockRadius:w,paragraphLiHeight:$,controlHeightXS:M,paragraphMarginTop:T}=e;return {[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[n]:{display:"inline-block",verticalAlign:"top",background:g,...Pl(d)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...Pl(m)},[`${n}-sm`]:{...Pl(p)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:C,background:g,borderRadius:w,[`+ ${o}`]:{marginBlockStart:p}},[o]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:g,borderRadius:w,"+ li":{marginBlockStart:M}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${r}, ${o} > li`]:{borderRadius:S}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:y,[`+ ${o}`]:{marginBlockStart:T}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...qie(e),...Hie(e),...Vie(e),...jie(e),...Uie(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[` ${r}, ${o} > li, ${n}, ${i}, ${a}, ${c}, ${u} `]:{...Fie(e)}}}},Wie=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,o=n;return {color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},Wp=Ut("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=Ht(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return Gie(r)},Wie,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Kie=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,style:a,styles:c,shape:u="circle",size:d="default",...m}=e,{getPrefixCls:p}=f.useContext(xt),g=p("skeleton",t),[b,y]=Wp(g),S=X(g,`${g}-element`,{[`${g}-active`]:i},r?.root,n,o,b,y);return f.createElement("div",{className:S,style:c?.root},f.createElement(Zy,{prefixCls:`${g}-avatar`,className:r?.content,style:{...c?.content,...a},shape:u,size:d,...m}))},Yie=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,active:i,style:a,styles:c,block:u=false,size:d="default",...m}=e,{getPrefixCls:p}=f.useContext(xt),g=p("skeleton",t),[b,y]=Wp(g),S=X(g,`${g}-element`,{[`${g}-active`]:i,[`${g}-block`]:u},o?.root,n,r,b,y);return f.createElement("div",{className:S,style:c?.root},f.createElement(Zy,{prefixCls:`${g}-button`,className:o?.content,style:{...c?.content,...a},size:d,...m}))},Nk=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,internalClassName:i,style:a,styles:c,active:u,children:d}=e,{getPrefixCls:m}=f.useContext(xt),p=m("skeleton",t),[g,b]=Wp(p),y=X(p,`${p}-element`,{[`${p}-active`]:u},g,r?.root,n,o,b);return f.createElement("div",{className:y,style:c?.root},f.createElement("div",{className:X(r?.content,i||`${p}-node`),style:{...c?.content,...a}},d))},Xie=e=>{const{getPrefixCls:t}=f.useContext(xt),n=t("skeleton",e.prefixCls);return f.createElement(Nk,{...e,internalClassName:`${n}-image`},f.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${n}-image-svg`},f.createElement("title",null,"Image placeholder"),f.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${n}-image-path`})))},Qie=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,block:a,style:c,styles:u,size:d="default",...m}=e,{getPrefixCls:p}=f.useContext(xt),g=p("skeleton",t),[b,y]=Wp(g),S=X(g,`${g}-element`,{[`${g}-active`]:i,[`${g}-block`]:a},r?.root,n,o,b,y);return f.createElement("div",{className:S,style:u?.root},f.createElement(Zy,{prefixCls:`${g}-input`,className:r?.content,style:{...u?.content,...c},size:d,...m}))},Zie=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},Jie=e=>{const{prefixCls:t,className:n,style:r,rows:o=0}=e,i=Array.from({length:o}).map((a,c)=>f.createElement("li",{key:c,style:{width:Zie(c,e)}}));return f.createElement("ul",{className:X(t,n),style:r},i)},eae=({prefixCls:e,className:t,width:n,style:r})=>f.createElement("h3",{className:X(e,t),style:{width:n,...r}});function zx(e){return e&&typeof e=="object"?e:{}}function tae(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function nae(e,t){return !e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function rae(e,t){const n={};return (!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const Nf=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:o,classNames:i,style:a,styles:c,children:u,avatar:d=false,title:m=true,paragraph:p=true,active:g,round:b}=e,{getPrefixCls:y,direction:S,className:C,style:w,classNames:$,styles:M}=Wt("skeleton"),T=y("skeleton",t),[R,I]=Wp(T),P={...e,avatar:d,title:m,paragraph:p},[N,O]=Xt([$,i],[M,c],{props:P});if(n||!("loading"in e)){const _=!!d,L=!!m,H=!!p;let U;if(_){const z={className:N.avatar,prefixCls:`${T}-avatar`,...tae(L,H),...zx(d),style:O.avatar};U=f.createElement("div",{className:X(N.header,`${T}-header`),style:O.header},f.createElement(Zy,{...z}));}let q;if(L||H){let z;if(L){const G={className:N.title,prefixCls:`${T}-title`,...nae(_,H),...zx(m),style:O.title};z=f.createElement(eae,{...G});}let F;if(H){const G={className:N.paragraph,prefixCls:`${T}-paragraph`,...rae(_,L),...zx(p),style:O.paragraph};F=f.createElement(Jie,{...G});}q=f.createElement("div",{className:X(N.section,`${T}-section`),style:O.section},z,F);}const V=X(T,{[`${T}-with-avatar`]:_,[`${T}-active`]:g,[`${T}-rtl`]:S==="rtl",[`${T}-round`]:b},N.root,C,r,o,R,I);return f.createElement("div",{className:V,style:{...O.root,...w,...a}},U,q)}return u??null};Nf.Button=Yie;Nf.Avatar=Kie;Nf.Input=Qie;Nf.Image=Xie;Nf.Node=Nk;function iO(){}const oae=f.createContext({add:iO,remove:iO});function iae(e){const t=f.useContext(oae),n=f.useRef(null);return Rt(o=>{if(o){const i=e?o.querySelector(e):o;i&&(t.add(i),n.current=i);}else t.remove(n.current);})}const aO=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=f.useContext(Up);return W.createElement(mt,{onClick:n,...e},t)},sO=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=f.useContext(Up);return W.createElement(mt,{...qM(n),loading:e,onClick:o,...t},r)};function Pk(e,t){return W.createElement("span",{className:`${e}-close-x`},t||W.createElement(Os,{className:`${e}-close-icon`}))}const Ik=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:c,cancelButtonProps:u,footer:d}=e,[m]=No("Modal",Rz()),p=t||m?.okText,g=r||m?.cancelText,b=W.useMemo(()=>({confirmLoading:o,okButtonProps:c,cancelButtonProps:u,okTextLocale:p,cancelTextLocale:g,okType:n,onOk:i,onCancel:a}),[o,c,u,p,g,n,i,a]);let y;return typeof d=="function"||typeof d>"u"?(y=W.createElement(W.Fragment,null,W.createElement(aO,null),W.createElement(sO,null)),typeof d=="function"&&(y=d(y,{OkBtn:sO,CancelBtn:aO})),y=W.createElement(Ck,{value:b},y)):y=d,W.createElement(Wz,{disabled:false},y)},aae=e=>{const{componentCls:t}=e;return {[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},sae=e=>{const{componentCls:t}=e;return {[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},lae=(e,t)=>{const{componentCls:n,gridColumns:r,antCls:o}=e,[i,a]=dr(o,"grid"),[,c]=dr(o,"col"),u={};for(let d=r;d>=0;d--)d===0?(u[`${n}${t}-${d}`]={display:"none"},u[`${n}-push-${d}`]={insetInlineStart:"auto"},u[`${n}-pull-${d}`]={insetInlineEnd:"auto"},u[`${n}${t}-push-${d}`]={insetInlineStart:"auto"},u[`${n}${t}-pull-${d}`]={insetInlineEnd:"auto"},u[`${n}${t}-offset-${d}`]={marginInlineStart:0},u[`${n}${t}-order-${d}`]={order:0}):(u[`${n}${t}-${d}`]=[{[i("display")]:"block",display:"block"},{display:a("display"),flex:`0 0 ${d/r*100}%`,maxWidth:`${d/r*100}%`}],u[`${n}${t}-push-${d}`]={insetInlineStart:`${d/r*100}%`},u[`${n}${t}-pull-${d}`]={insetInlineEnd:`${d/r*100}%`},u[`${n}${t}-offset-${d}`]={marginInlineStart:`${d/r*100}%`},u[`${n}${t}-order-${d}`]={order:d});return u[`${n}${t}-flex`]={flex:c(`${t.replace(/-/,"")}-flex`)},u},q2=(e,t)=>lae(e,t),cae=(e,t,n)=>({[`@media (min-width: ${ie(t)})`]:{...q2(e,n)}}),uae=()=>({}),dae=()=>({});Ut("Grid",aae,uae);const Ok=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});Ut("Grid",e=>{const t=Ht(e,{gridColumns:24}),n=Ok(t);return delete n.xs,[sae(t),q2(t,""),q2(t,"-xs"),Object.keys(n).map(r=>cae(t,n[r],`-${r}`)).reduce((r,o)=>({...r,...o}),{})]},dae);function lO(e){return {position:e,inset:0}}const fae=e=>{const{componentCls:t,antCls:n}=e;return [{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:"none"},[`${t}-mask`]:{...lO("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...lO("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:YM(e)}]},mae=e=>{const{componentCls:t}=e;return [{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${ie(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...cn(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${ie(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto","&:focus-visible":{borderRadius:e.borderRadiusLG,...ha(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-container`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:{position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:ie(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...Si(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${ie(e.borderRadiusLG)} ${ie(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${ie(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}}},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-container, ${t}-body, ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},hae=e=>{const{componentCls:t}=e;return {[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},pae=e=>{const{componentCls:t}=e,n=Ok(e),r={...n};delete r.xs;const o=`--${t.replace(".","")}-`,i=Object.keys(r).map(a=>({[`@media (min-width: ${ie(r[a])})`]:{width:`var(${o}${a}-width)`}}));return {[`${t}-root`]:{[t]:[].concat(Yt(Object.keys(n).map((a,c)=>{const u=Object.keys(n)[c-1];return u?{[`${o}${a}-width`]:`var(${o}${u}-width)`}:null})),[{width:`var(${o}xs-width)`}],Yt(i))}}},Dk=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return Ht(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},_k=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${ie(e.paddingMD)} ${ie(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${ie(e.padding)} ${ie(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${ie(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${ie(e.paddingXS)} ${ie(e.padding)}`:0,footerBorderTop:e.wireframe?`${ie(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${ie(e.borderRadiusLG)} ${ie(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${ie(e.padding*2)} ${ie(e.padding*2)} ${ie(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:true}),Lk=Ut("Modal",e=>{const t=Dk(e);return [mae(t),hae(t),fae(t),jp(t,"zoom"),pae(t)]},_k,{unitless:{titleLineHeight:true}});let G2;const gae=e=>{G2={x:e.pageX,y:e.pageY},setTimeout(()=>{G2=null;},100);};Bie()&&document.documentElement.addEventListener("click",gae,true);const Bk=e=>{const{prefixCls:t,className:n,rootClassName:r,open:o,wrapClassName:i,centered:a,getContainer:c,style:u,width:d=520,footer:m,classNames:p,styles:g,children:b,loading:y,confirmLoading:S,zIndex:C,mousePosition:w,onOk:$,onCancel:M,okButtonProps:T,cancelButtonProps:R,destroyOnHidden:I,destroyOnClose:P,panelRef:N=null,closable:O,mask:_,modalRender:L,focusTriggerAfterClose:H,focusable:U,...q}=e,{getPopupContainer:V,getPrefixCls:z,direction:F,className:G,style:Y,classNames:Q,styles:D,centered:B,cancelButtonProps:K,okButtonProps:J,mask:ee}=Wt("modal"),{modal:te}=f.useContext(xt),[ne,ae]=f.useMemo(()=>typeof O=="boolean"?[void 0,void 0]:[O?.afterClose,O?.onClose],[O]),oe=z("modal",t),re=z(),[ce,he]=Ite(_,ee,oe),me=zie(U,ce,H),Re=ut=>{S||(M?.(ut),ae?.());},se=ut=>{$?.(ut),ae?.();},de=Kn(oe),[Se,be]=Lk(oe,de),He=X(i,{[`${oe}-centered`]:a??B,[`${oe}-wrap-rtl`]:F==="rtl"}),Ue=m!==null&&!y?f.createElement(Ik,{...e,okButtonProps:{...J,...T},onOk:se,cancelButtonProps:{...K,...R},onCancel:Re}):null,[Pe,ue,ye,Te]=BM(Ll(e),Ll(te),{closable:true,closeIcon:f.createElement(Os,{className:`${oe}-close-icon`}),closeIconRender:ut=>Pk(oe,ut)}),qe=Pe?{disabled:ye,closeIcon:ue,afterClose:ne,...Te}:false,Ze=L?ut=>f.createElement("div",{className:`${oe}-render`},L(ut)):void 0,We=`.${oe}-${L?"render":"container"}`,tt=iae(We),nt=Ar(N,tt),[Ke,Oe]=Su("Modal",C),Qe={...e,width:d,panelRef:N,focusTriggerAfterClose:me.focusTriggerAfterClose,focusable:me,mask:ce,zIndex:Ke},[Xe,_e]=Xt([Q,p,he],[D,g],{props:Qe}),[ze,ct]=f.useMemo(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),Pt=f.useMemo(()=>{const ut={};return ct&&Object.keys(ct).forEach(Dt=>{const wt=ct[Dt];wt!==void 0&&(ut[`--${oe}-${Dt}-width`]=typeof wt=="number"?`${wt}px`:wt);}),ut},[oe,ct]);return f.createElement(kl,{form:true,space:true},f.createElement(Uy.Provider,{value:Oe},f.createElement(Foe,{width:ze,...q,zIndex:Ke,getContainer:c===void 0?V:c,prefixCls:oe,rootClassName:X(Se,r,be,de,Xe.root),rootStyle:_e.root,footer:Ue,visible:o,mousePosition:w??G2,onClose:Re,closable:qe,closeIcon:ue,transitionName:Bl(re,"zoom",e.transitionName),maskTransitionName:Bl(re,"fade",e.maskTransitionName),mask:ce,className:X(Se,n,G),style:{...Y,...u,...Pt},classNames:{...Xe,wrapper:X(Xe.wrapper,He)},styles:_e,panelRef:nt,destroyOnHidden:I??P,modalRender:Ze,focusTriggerAfterClose:me.focusTriggerAfterClose,focusTrap:me.trap},y?f.createElement(Nf,{active:true,title:false,paragraph:{rows:4},className:`${oe}-body-skeleton`}):b)))},vae=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:c,fontHeight:u,confirmBodyPadding:d}=e,m=`${t}-confirm`;return {[m]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${m}-body-wrapper`]:{...w0()},[`&${t} ${t}-body`]:{padding:d},[`${m}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(u).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(c).sub(o).equal()).div(2).equal()}},[`${m}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${ie(e.marginSM)})`},[`${e.iconCls} + ${m}-paragraph`]:{maxWidth:`calc(100% - ${ie(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${m}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${m}-container`]:{color:e.colorText,fontSize:i,lineHeight:a},[`${m}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${m}-error ${m}-body > ${e.iconCls}`]:{color:e.colorError},[`${m}-warning ${m}-body > ${e.iconCls}, ${m}-confirm ${m}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${m}-info ${m}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${m}-success ${m}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},bae=Rf(["Modal","confirm"],e=>{const t=Dk(e);return vae(t)},_k,{order:-1e3}),zk=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:c,footer:u,locale:d,autoFocusButton:m,focusable:p,...g}=e;let b=n;if(!n&&n!==null)switch(a){case "info":b=f.createElement(DM,null);break;case "success":b=f.createElement(OM,null);break;case "error":b=f.createElement(kp,null);break;default:b=f.createElement(Fp,null);}const y=c??a==="confirm",S=f.useMemo(()=>{const _=p?.autoFocusButton||m;return _||_===null?_:"ok"},[m,p?.autoFocusButton]),[C]=No("Modal"),w=d||C,$=r||(y?w?.okText:w?.justOkText),M=o||w?.cancelText,{closable:T}=g,{onClose:R}=T&&typeof T=="object"?T:{},I=f.useMemo(()=>({autoFocusButton:S,cancelTextLocale:M,okTextLocale:$,mergedOkCancel:y,onClose:R,...g}),[S,M,$,y,R,g]),P=f.createElement(f.Fragment,null,f.createElement(qI,null),f.createElement(GI,null)),N=e.title!==void 0&&e.title!==null,O=`${i}-body`;return f.createElement("div",{className:`${i}-body-wrapper`},f.createElement("div",{className:X(O,{[`${O}-has-title`]:N})},b,f.createElement("div",{className:`${i}-paragraph`},N&&f.createElement("span",{className:`${i}-title`},e.title),f.createElement("div",{className:`${i}-content`},e.content))),u===void 0||typeof u=="function"?f.createElement(Ck,{value:I},f.createElement("div",{className:`${i}-btns`},typeof u=="function"?u(P,{OkBtn:GI,CancelBtn:qI}):P)):u,f.createElement(bae,{prefixCls:t}))},yae=e=>{const{close:t,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:c,bodyStyle:u,closable:d=false,onConfirm:m,styles:p,title:g,okButtonProps:b,cancelButtonProps:y}=e,{cancelButtonProps:S,okButtonProps:C}=Wt("modal"),w=`${i}-confirm`,$=e.width||416,M=e.style||{},T=X(w,`${w}-${e.type}`,{[`${w}-rtl`]:o==="rtl"},e.className),R=e.maskClosable===void 0?false:e.maskClosable,[,I]=Hr(),P=f.useMemo(()=>n!==void 0?n:I.zIndexPopupBase+kM,[n,I]);return f.createElement(Bk,{...e,className:T,wrapClassName:X({[`${w}-centered`]:!!e.centered},a),onCancel:()=>{t?.({triggerCancel:true}),m?.(false);},title:g,footer:null,transitionName:Bl(c||"","zoom",e.transitionName),maskTransitionName:Bl(c||"","fade",e.maskTransitionName),maskClosable:R,style:M,styles:{body:u,mask:r,...p},width:$,zIndex:P,closable:d},f.createElement(zk,{...e,confirmPrefixCls:w,okButtonProps:{...C,...b},cancelButtonProps:{...S,...y}}))},kk=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return f.createElement(Po,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},f.createElement(yae,{...e}))},Hc=[];let Fk="";function Hk(){return Fk}const Sae=e=>{const{prefixCls:t,getContainer:n,direction:r}=e,o=Rz(),i=f.useContext(xt),a=Hk()||i.getPrefixCls(),c=t||`${a}-modal`;let u=n;return u===false&&(u=void 0),W.createElement(kk,{...e,rootPrefixCls:a,prefixCls:c,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:i.locale?.Modal??o,getContainer:u})};function Kp(e){const t=HM(),n=document.createDocumentFragment();let r={...e,close:c,open:true},o;function i(...d){d.some(p=>p?.triggerCancel)&&e.onCancel?.(()=>{},...d.slice(1));for(let p=0;p{});}const a=d=>{clearTimeout(o),o=setTimeout(()=>{const m=t.getPrefixCls(void 0,Hk()),p=t.getIconPrefixCls(),g=t.getTheme(),b=W.createElement(Sae,{...d});Ky(W.createElement(Po,{prefixCls:m,iconPrefixCls:p,theme:g},typeof t.holderRender=="function"?t.holderRender(b):b),n);});};function c(...d){r={...r,open:false,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),i.apply(this,d);}},a(r);}function u(d){typeof d=="function"?r=d(r):r={...r,...d},a(r);}return a(r),Hc.push(c),{destroy:c,update:u}}function Vk(e){return {...e,type:"warning"}}function jk(e){return {...e,type:"info"}}function Uk(e){return {...e,type:"success"}}function qk(e){return {...e,type:"error"}}function Gk(e){return {...e,type:"confirm"}}function Cae({rootPrefixCls:e}){Fk=e;}const xae=({afterClose:e,config:t,...n},r)=>{const[o,i]=f.useState(true),[a,c]=f.useState(t),{direction:u,getPrefixCls:d}=f.useContext(xt),m=d("modal"),p=d(),g=()=>{e(),a.afterClose?.();},b=(...C)=>{i(false),C.some($=>$?.triggerCancel)&&a.onCancel?.(()=>{},...C.slice(1));};f.useImperativeHandle(r,()=>({destroy:b,update:C=>{c(w=>{const $=typeof C=="function"?C(w):C;return {...w,...$}});}}));const y=a.okCancel??a.type==="confirm",[S]=No("Modal",pa.Modal);return f.createElement(kk,{prefixCls:m,rootPrefixCls:p,...a,close:b,open:o,afterClose:g,okText:a.okText||(y?S?.okText:S?.justOkText),direction:a.direction||u,cancelText:a.cancelText||S?.cancelText,...n})},wae=f.forwardRef(xae);let cO=0;const $ae=f.memo(f.forwardRef((e,t)=>{const[n,r]=_te();return f.useImperativeHandle(t,()=>({patchElement:r}),[r]),f.createElement(f.Fragment,null,n)}));function Wk(){const e=f.useRef(null),[t,n]=f.useState([]);f.useEffect(()=>{t.length&&(Yt(t).forEach(a=>{a();}),n([]));},[t]);const r=f.useCallback(i=>function(c){cO+=1;const u=f.createRef();let d;const m=new Promise(S=>{d=S;});let p=false,g;const b=f.createElement(wae,{key:`modal-${cO}`,config:i(c),ref:u,afterClose:()=>{g?.();},isSilent:()=>p,onConfirm:S=>{d(S);}});return g=e.current?.patchElement(b),g&&Hc.push(g),{destroy:()=>{function S(){u.current?.destroy();}u.current?S():n(C=>[].concat(Yt(C),[S]));},update:S=>{function C(){u.current?.update(S);}u.current?C():n(w=>[].concat(Yt(w),[C]));},then:S=>(p=true,m.then(S))}},[]);return [f.useMemo(()=>({info:r(jk),success:r(Uk),error:r(qk),warning:r(Vk),confirm:r(Gk)}),[r]),f.createElement($ae,{key:"modal-holder",ref:e})]}const Eae=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,o=`${t}-notice`,i=new Bt("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new Bt("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),c=new Bt("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),u=new Bt("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return {[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[o]:{marginInline:"auto auto"}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:c}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:true},marginLeft:{value:n,_skip_check_:true},[o]:{marginInlineEnd:"auto",marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:u}}}}},Mae=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],Rae={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Tae=(e,t)=>{const{componentCls:n}=e;return {[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith("top")?"top":"bottom"]:0,[Rae[t]]:{value:0,_skip_check_:true}}}}},Aae=e=>{const t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return {[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"},...t}},Nae=e=>{const t={};for(let n=1;n{const{componentCls:t}=e;return {[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute",...Aae(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Nae(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}},...Mae.map(n=>Tae(e,n)).reduce((n,r)=>({...n,...r}),{})}},Kk=e=>{const{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:c,colorInfo:u,colorWarning:d,colorError:m,colorTextHeading:p,notificationBg:g,notificationPadding:b,notificationMarginEdge:y,progressBg:S,notificationProgressHeight:C,fontSize:w,lineHeight:$,width:M,notificationIconSize:T,colorText:R,colorSuccessBg:I,colorErrorBg:P,colorInfoBg:N,colorWarningBg:O}=e,_=`${n}-notice`;return {position:"relative",marginBottom:i,marginInlineStart:"auto",background:g,borderRadius:a,boxShadow:r,[_]:{padding:b,width:M,maxWidth:`calc(100vw - ${ie(e.calc(y).mul(2).equal())})`,lineHeight:$,wordWrap:"break-word",borderRadius:a,overflow:"hidden","&-success":I?{background:I}:{},"&-error":P?{background:P}:{},"&-info":N?{background:N}:{},"&-warning":O?{background:O}:{}},[`${_}-title`]:{marginBottom:e.marginXS,color:p,fontSize:o,lineHeight:e.lineHeightLG},[`${_}-description`]:{fontSize:w,color:R,marginTop:e.marginXS},[`${_}-closable ${_}-title`]:{paddingInlineEnd:e.paddingLG},[`${_}-with-icon ${_}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(T).equal(),fontSize:o},[`${_}-with-icon ${_}-description`]:{marginInlineStart:e.calc(e.marginSM).add(T).equal(),fontSize:w},[`${_}-icon`]:{position:"absolute",fontSize:T,lineHeight:1,[`&-success${t}`]:{color:c},[`&-info${t}`]:{color:u},[`&-warning${t}`]:{color:d},[`&-error${t}`]:{color:m}},[`${_}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...Si(e)},[`${_}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${ie(a)} * 2)`,left:{_skip_check_:true,value:a},right:{_skip_check_:true,value:a},bottom:0,blockSize:C,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:S},"&::-webkit-progress-value":{borderRadius:a,background:S}},[`${_}-actions`]:{float:"right",marginTop:e.marginSM}}},Iae=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:o,motionEaseInOut:i}=e,a=`${t}-notice`,c=new Bt("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return [{[t]:{...cn(e),position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:true},[`${t}-hook-holder`]:{position:"relative"},[`${t}-fade-appear-prepare`]:{opacity:"0 !important"},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:i,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${t}-fade-leave`]:{animationTimingFunction:i,animationFillMode:"both",animationDuration:o,animationPlayState:"paused"},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:"running"},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:c,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-actions`]:{float:"left"}}}},{[t]:{[`${a}-wrapper`]:Kk(e)}}]},Yk=e=>({zIndexPopup:e.zIndexPopupBase+kM+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),Xk=e=>{const t=e.paddingMD,n=e.paddingLG;return Ht(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${ie(e.paddingMD)} ${ie(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},Qk=Ut("Notification",e=>{const t=Xk(e);return [Iae(t),Eae(t),Pae(t)]},Yk),Oae=Rf(["Notification","PurePanel"],e=>{const t=`${e.componentCls}-notice`,n=Xk(e);return {[`${t}-pure-panel`]:{...Kk(n),width:n.width,maxWidth:`calc(100vw - ${ie(e.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0}}},Yk);function sR(e,t){return t===null||t===false?null:t||f.createElement(Os,{className:`${e}-close-icon`})}const Dae={success:OM,info:DM,error:kp,warning:Fp},Zk=e=>{const{prefixCls:t,icon:n,type:r,title:o,description:i,actions:a,role:c="alert",styles:u,classNames:d}=e;let m=null;return n?m=f.createElement("span",{className:X(`${t}-icon`,d.icon),style:u.icon},n):r&&(m=f.createElement(Dae[r]||null,{className:X(`${t}-icon`,d.icon,`${t}-icon-${r}`),style:u.icon})),f.createElement("div",{className:X({[`${t}-with-icon`]:m}),role:c},m,f.createElement("div",{className:X(`${t}-title`,d.title),style:u.title},o),i&&f.createElement("div",{className:X(`${t}-description`,d.description),style:u.description},i),a&&f.createElement("div",{className:X(`${t}-actions`,d.actions),style:u.actions},a))},_ae=e=>{const{prefixCls:t,icon:n,type:r,message:o,title:i,description:a,btn:c,actions:u,closeIcon:d,className:m,style:p,styles:g,classNames:b,closable:y,...S}=e,{getPrefixCls:C,className:w,style:$,classNames:M,styles:T}=Wt("notification"),[R,I]=Xt([M,b],[T,g],{props:e}),{notification:P}=f.useContext(xt),N=u??c,O=i??o,_=t||C("notification"),L=`${_}-notice`,H=Kn(_),[U,q]=Qk(_,H),[V,z,,F]=BM(Ll(e),Ll(P),{closable:true,closeIcon:f.createElement(Os,{className:`${_}-close-icon`}),closeIconRender:Y=>sR(_,Y)}),G=V?{onClose:y&&typeof y=="object"?y?.onClose:void 0,closeIcon:z,...F}:false;return f.createElement("div",{className:X(`${L}-pure-panel`,U,m,q,H,R.root),style:I.root},f.createElement(Oae,{prefixCls:_}),f.createElement(VM,{style:{...$,...p},...S,prefixCls:_,eventKey:"pure",duration:null,closable:G,className:X(m,w),content:f.createElement(Zk,{classNames:R,styles:I,prefixCls:L,icon:n,type:r,title:O,description:a,actions:N})}))};function Lae(e,t,n){let r;switch(e){case "top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case "topLeft":r={left:0,top:t,bottom:"auto"};break;case "topRight":r={right:0,top:t,bottom:"auto"};break;case "bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case "bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function Bae(e){return {motionName:`${e}-fade`}}function zae(e,t,n){return typeof e<"u"?e:typeof t?.closeIcon<"u"?t.closeIcon:n?.closeIcon}const uO=24,kae=4.5,Fae="topRight",Hae=({children:e,prefixCls:t})=>{const n=Kn(t),[r,o]=Qk(t,n);return W.createElement(Zz,{classNames:{list:X(r,o,n)}},e)},Vae=(e,{prefixCls:t,key:n})=>W.createElement(Hae,{prefixCls:t,key:n},e),jae=W.forwardRef((e,t)=>{const{top:n,bottom:r,prefixCls:o,getContainer:i,maxCount:a,rtl:c,onAllRemoved:u,stack:d,duration:m=kae,pauseOnHover:p=true,showProgress:g}=e,{getPrefixCls:b,getPopupContainer:y,direction:S}=Wt("notification"),{notification:C}=f.useContext(xt),[,w]=Hr(),$=o||b("notification"),M=f.useMemo(()=>typeof m=="number"&&m>0?m:false,[m]),T=L=>Lae(L,n??uO,r??uO),R=()=>X({[`${$}-rtl`]:c??S==="rtl"}),I=()=>Bae($),[P,N]=Jz({prefixCls:$,style:T,className:R,motion:I,closable:{closeIcon:sR($)},duration:M,getContainer:()=>i?.()||y?.()||document.body,maxCount:a,pauseOnHover:p,showProgress:g,onAllRemoved:u,renderNotifications:Vae,stack:d===false?false:{threshold:typeof d=="object"?d?.threshold:void 0,offset:8,gap:w.margin}}),[O,_]=Xt([C?.classNames,e?.classNames],[C?.styles,e?.styles],{props:e});return W.useImperativeHandle(t,()=>({...P,prefixCls:$,notification:C,classNames:O,styles:_})),N});function Jk(e){const t=W.useRef(null),{notification:n}=W.useContext(xt);return [W.useMemo(()=>{const o=u=>{if(!t.current)return;const{open:d,prefixCls:m,notification:p,classNames:g,styles:b}=t.current,y=p?.className||{},S=p?.style||{},C=`${m}-notice`,{title:w,message:$,description:M,icon:T,type:R,btn:I,actions:P,className:N,style:O,role:_="alert",closeIcon:L,closable:H,classNames:U={},styles:q={},...V}=u,z=w??$,F=P??I,G=sR(C,zae(L,e,p)),[Y,Q,,D]=Az(Ll({...e||{},...u}),Ll(n),{closable:true,closeIcon:G}),B=Y?{onClose:H&&typeof H=="object"?H.onClose:void 0,closeIcon:Q,...D}:false,K=Ml(U,{props:u}),J=Ml(q,{props:u}),ee=jy(void 0,g,K),te=zM(b,J);return d({placement:e?.placement??Fae,...V,content:W.createElement(Zk,{prefixCls:C,icon:T,type:R,title:z,description:M,actions:F,role:_,classNames:ee,styles:te}),className:X({[`${C}-${R}`]:R},N,y,ee.root),style:{...S,...te.root,...O},closable:B})},a={open:o,destroy:u=>{u!==void 0?t.current?.close(u):t.current?.destroy();}};return ["success","info","warning","error"].forEach(u=>{a[u]=d=>o({...d,type:u});}),a},[e,n]),W.createElement(jae,{key:"notification-holder",...e,ref:t})]}function e7(e){return Jk(e)}const D0=W.createContext({}),t7=W.createContext({message:{},notification:{},modal:{}}),Uae=e=>{const{componentCls:t,colorText:n,fontSize:r,lineHeight:o,fontFamily:i}=e;return {[t]:{color:n,fontSize:r,lineHeight:o,fontFamily:i,[`&${t}-rtl`]:{direction:"rtl"}}}},qae=()=>({}),Gae=Ut("App",Uae,qae),Wae=e=>{const{prefixCls:t,children:n,className:r,rootClassName:o,message:i,notification:a,style:c,component:u="div"}=e,{direction:d,getPrefixCls:m}=f.useContext(xt),p=m("app",t),[g,b]=Gae(p),y=X(g,p,r,o,b,{[`${p}-rtl`]:d==="rtl"}),S=f.useContext(D0),C=W.useMemo(()=>({message:{...S.message,...i},notification:{...S.notification,...a}}),[i,a,S.message,S.notification]),[w,$]=rk(C.message),[M,T]=e7(C.notification),[R,I]=Wk(),P=W.useMemo(()=>({message:w,notification:M,modal:R}),[w,M,R]),N=u===false?W.Fragment:u,O={className:y,style:c};return W.createElement(t7.Provider,{value:P},W.createElement(D0.Provider,{value:C},W.createElement(N,{...u===false?void 0:O},I,$,T,n)))},Kae=()=>W.useContext(t7),Yp=Wae;Yp.useApp=Kae;function n7(e){return t=>f.createElement(Po,{theme:{token:{motion:false,zIndexPopupBase:0}}},f.createElement(e,{...t}))}const lR=(e,t,n,r,o)=>n7(a=>{const{prefixCls:c,style:u}=a,d=f.useRef(null),[m,p]=f.useState(0),[g,b]=f.useState(0),[y,S]=dn(false,a.open),{getPrefixCls:C}=f.useContext(xt),w=C(r||"select",c);f.useEffect(()=>{if(S(true),typeof ResizeObserver<"u"){const T=new ResizeObserver(I=>{const P=I[0].target;p(P.offsetHeight+8),b(P.offsetWidth);}),R=setInterval(()=>{const I=o?`.${o(w)}`:`.${w}-dropdown`,P=d.current?.querySelector(I);P&&(clearInterval(R),T.observe(P));},10);return ()=>{clearInterval(R),T.disconnect();}}},[w]);let $={...a,style:{...u,margin:0},open:y,getPopupContainer:()=>d.current};n&&($=n($)),t&&Object.assign($,{[t]:{overflow:{adjustX:false,adjustY:false}}});const M={paddingBottom:m,position:"relative",minWidth:g};return f.createElement("div",{ref:d,style:M},f.createElement(e,{...$}))}),Yae=(e,t,n,r,o=false,i,a)=>{const c=f.useMemo(()=>typeof n=="boolean"?{allowClear:n}:n&&typeof n=="object"?n:{allowClear:false},[n]);return f.useMemo(()=>{const u=!o&&c.allowClear!==false&&(t.length||i)&&!(a==="combobox"&&i==="");return {allowClear:u,clearIcon:u?c.clearIcon||r||"×":null}},[c,r,o,t.length,i,a])},r7=f.createContext(null);function Cu(){return f.useContext(r7)}function Xae(e=250){const t=f.useRef(null),n=f.useRef(null);f.useEffect(()=>()=>{window.clearTimeout(n.current);},[]);function r(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null;},e);}return [()=>t.current,r]}function o7(e,t){return e.filter(n=>n).some(n=>n.contains(t)||n===t)}function Qae(e,t,n,r){const o=Rt(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!o7(e(),a)&&n(false);});f.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o]);}function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=e===true?0:1;return {bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},Jae=(e,t)=>{const{prefixCls:n,disabled:r,visible:o,children:i,popupElement:a,animation:c,transitionName:u,popupStyle:d,popupClassName:m,direction:p="ltr",placement:g,builtinPlacements:b,popupMatchSelectWidth:y,popupRender:S,popupAlign:C,getPopupContainer:w,empty:$,onPopupVisibleChange:M,onPopupMouseEnter:T,onPopupMouseDown:R,onPopupBlur:I,...P}=e,N=`${n}-dropdown`;let O=a;S&&(O=S(a));const _=f.useMemo(()=>b||Zae(y),[b,y]),L=c?`${N}-${c}`:u,H=typeof y=="number",U=f.useMemo(()=>H?null:y===false?"minWidth":"width",[y,H]);let q=d;H&&(q={...d,width:y});const V=f.useRef(null);return f.useImperativeHandle(t,()=>({getPopupElement:()=>V.current?.popupElement})),f.createElement(Gy,W2({},P,{showAction:M?["click"]:[],hideAction:M?["click"]:[],popupPlacement:g||(p==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_,prefixCls:N,popupMotion:{motionName:L},popup:f.createElement("div",{onMouseEnter:T,onMouseDown:R,onBlur:I},O),ref:V,stretch:U,popupAlign:C,popupVisible:o,getPopupContainer:w,popupClassName:X(m,{[`${N}-empty`]:$}),popupStyle:q,onPopupVisibleChange:M}),i)},ese=f.forwardRef(Jae);function dO(e,t){const{key:n}=e;let r;return "value"in e&&({value:r}=e),n??(r!==void 0?r:`rc-index-key-${t}`)}function K2(e){return typeof e<"u"&&!Number.isNaN(e)}function i7(e,t){const{label:n,value:r,options:o,groupLabel:i}=e||{},a=n||(t?"children":"label");return {label:a,value:r||"value",options:o||"options",groupLabel:i||a}}function tse(e,{fieldNames:t,childrenAsData:n}={}){const r=[],{label:o,value:i,options:a,groupLabel:c}=i7(t,false);function u(d,m){Array.isArray(d)&&d.forEach(p=>{if(m||!(a in p)){const g=p[i];r.push({key:dO(p,r.length),groupOption:m,data:p,label:p[o],value:g});}else {let g=p[c];g===void 0&&n&&(g=p.label),r.push({key:dO(p,r.length),group:true,data:p,label:g}),u(p[a],true);}});}return u(e,false),r}function Y2(e){const t={...e};return "props"in t||Object.defineProperty(t,"props",{get(){return xr(false,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const nse=(e,t,n)=>{if(!t||!t.length)return null;let r=false;const o=(a,[c,...u])=>{if(!c)return [a];const d=a.split(c);return r=r||d.length>1,d.reduce((m,p)=>[...m,...o(p,u)],[]).filter(Boolean)},i=o(e,t);return r?typeof n<"u"?i.slice(0,n):i:null};function rse(e){const{visible:t,values:n}=e;if(!t)return null;const r=50;return f.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${n.slice(0,r).map(({label:o,value:i})=>["number","string"].includes(typeof o)?o:i).join(", ")}`,n.length>r?", ...":null)}const ose=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null);},cR=(e,t=1)=>{if(t<=0){e();return}ose(()=>{cR(e,t-1);});};function ise(e,t,n,r){const[o,i]=f.useState(false);f.useEffect(()=>{i(true);},[]);const[a,c]=dn(e,t),d=r(o?a:false),m=f.useRef(0),p=Rt(b=>{n&&d!==b&&n(b),c(b);}),g=Rt((b,y={})=>{const{cancelFun:S}=y;m.current+=1;const C=m.current,w=typeof b=="boolean"?b:!d;function $(){C===m.current&&!S?.()&&p(w);}w?$():cR(()=>{$();});});return [d,g]}function kx(e){const{children:t,...n}=e;return t?f.createElement("div",n,t):null}const a7=f.createContext(null);function Xp(){return f.useContext(a7)}const s7=f.forwardRef((e,t)=>{const{onChange:n,onKeyDown:r,onBlur:o,style:i,syncWidth:a,value:c,className:u,autoComplete:d,...m}=e,{prefixCls:p,mode:g,onSearch:b,onSearchSubmit:y,onInputBlur:S,autoFocus:C,tokenWithEnter:w,placeholder:$,components:{input:M="input"}}=Xp(),{id:T,classNames:R,styles:I,open:P,activeDescendantId:N,role:O,disabled:_}=Cu()||{},L=X(`${p}-input`,R?.input,u),H=f.useRef(false),U=f.useRef(null),q=f.useRef(null);f.useImperativeHandle(t,()=>q.current);const V=ee=>{let{value:te}=ee.target;if(w&&U.current&&/[\r\n]/.test(U.current)){const ne=U.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");te=te.replace(ne,U.current);}U.current=null,b&&b(te,true,H.current),n?.(ee);},z=ee=>{const{key:te}=ee,{value:ne}=ee.currentTarget;te==="Enter"&&g==="tags"&&!H.current&&y&&y(ne),r?.(ee);},F=ee=>{S?.(),o?.(ee);},G=()=>{H.current=true;},Y=ee=>{if(H.current=false,g!=="combobox"){const{value:te}=ee.currentTarget;b?.(te,true,false);}},Q=ee=>{const{clipboardData:te}=ee,ne=te?.getData("text");U.current=ne||"";},[D,B]=f.useState(void 0);Mn(()=>{const ee=q.current;if(a&&ee){ee.style.width="0px";const te=ee.scrollWidth;B(te),ee.style.width="";}},[a,c]);const K={id:T,type:g==="combobox"?"text":"search",...m,ref:q,style:{...I?.input,...i,"--select-input-width":D},autoFocus:C,autoComplete:d||"off",className:L,disabled:_,value:c||"",onChange:V,onKeyDown:z,onBlur:F,onPaste:Q,onCompositionStart:G,onCompositionEnd:Y,role:O||"combobox","aria-expanded":P||false,"aria-haspopup":"listbox","aria-owns":P?`${T}_list`:void 0,"aria-autocomplete":"list","aria-controls":P?`${T}_list`:void 0,"aria-activedescendant":P?N:void 0};if(f.isValidElement(M)){const ee=M.props||{},te={placeholder:e.placeholder||$,...K,...ee};return Object.keys(ee).forEach(ne=>{const ae=ee[ne];typeof ae=="function"&&(te[ne]=(...oe)=>{ae(...oe),K[ne]?.(...oe);});}),te.ref=Ar(M.ref,K.ref),f.cloneElement(M,te)}const J=M;return f.createElement(J,K)});function l7(e){const{prefixCls:t,placeholder:n,displayValues:r}=Xp(),{classNames:o,styles:i}=Cu(),{show:a=true}=e;return r.length?null:f.createElement("div",{className:X(`${t}-placeholder`,o?.placeholder),style:{visibility:a?"visible":"hidden",...i?.placeholder}},n)}const uR=f.createContext(null);function c7(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function ase(e){return e!=null}function sse(e){return !e&&e!==0}function fO(e){return ["string","number"].includes(typeof e)}function X2(e){let t;return e&&(fO(e.title)?t=e.title.toString():fO(e.label)&&(t=e.label.toString())),t}function Q2(){return Q2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,searchValue:r,activeValue:o,displayValues:i,maxLength:a,mode:c}=Xp(),{triggerOpen:u,title:d,showSearch:m,classNames:p,styles:g}=Cu(),b=f.useContext(uR),[y,S]=f.useState(false),C=c==="combobox",w=i[0],$=f.useMemo(()=>C&&o&&!y&&u?o:m?r:"",[C,o,y,u,r,m]),M=f.useMemo(()=>{const T={className:`${n}-content-value`,style:{visibility:$?"hidden":"visible"}};if(w&&b?.flattenOptions){const R=b.flattenOptions.find(I=>I.value===w.value);if(R?.data){const{className:I,style:P}=R.data;Object.assign(T,{title:X2(R.data),className:X(T.className,I),style:{...T.style,...P}});}}return w&&!T.title&&(T.title=X2(w)),d!==void 0&&(T.title=d),T},[w,b?.flattenOptions,n,$,d]);return f.useEffect(()=>{C&&S(false);},[C,o]),f.createElement("div",{className:X(`${n}-content`,p?.content),style:g?.content},w?f.createElement("div",M,w.label):f.createElement(l7,{show:!$}),f.createElement(s7,Q2({ref:t},e,{value:$,maxLength:c==="combobox"?a:void 0,onChange:T=>{S(true),e.onChange?.(T);}})))}),vd=void 0;function cse(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:c,registerSize:u,itemKey:d,className:m,style:p,children:g,display:b,order:y,component:S="div",...C}=e,w=a&&!b;function $(P){u(d,P);}f.useEffect(()=>()=>{$(null);},[]);const M=i&&o!==vd?i(o,{index:y}):g;let T;r||(T={opacity:w?0:1,height:w?0:vd,overflowY:w?"hidden":vd,order:a?y:vd,pointerEvents:w?"none":vd,position:w?"absolute":vd});const R={};w&&(R["aria-hidden"]=true);let I=f.createElement(S,ir({className:X(!r&&n,m),style:{...T,...p}},R,C,{ref:t}),M);return a&&(I=f.createElement(da,{onResize:({offsetWidth:P})=>{$(P);},disabled:c},I)),I}const ph=f.forwardRef(cse);function use(e){if(typeof MessageChannel>"u")Lt(e);else {const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0);}}function dse(){const e=f.useRef(null);return n=>{e.current||(e.current=[],use(()=>{wo.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r();}),e.current=null;});})),e.current.push(n);}}function bd(e,t){const[n,r]=f.useState(t),o=Rt(i=>{e(()=>{r(i);});});return [n,o]}const _0=W.createContext(null),fse=(e,t)=>{const n=f.useContext(_0);if(!n){const{component:c="div",...u}=e;return f.createElement(c,ir({},u,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return f.createElement(_0.Provider,{value:null},f.createElement(ph,ir({ref:t,className:X(r,i)},o,a)))},mse=f.forwardRef(fse),u7="responsive",d7="invalidate";function hse(e){return `+ ${e.length} ...`}function pse(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:c=10,ssr:u,style:d,className:m,maxCount:p,renderRest:g,renderRawRest:b,prefix:y,suffix:S,component:C="div",itemComponent:w,onVisibleChange:$,...M}=e,T=u==="full",R=dse(),[I,P]=bd(R,null),N=I||0,[O,_]=bd(R,new Map),[L,H]=bd(R,0),[U,q]=bd(R,0),[V,z]=bd(R,0),[F,G]=bd(R,0),[Y,Q]=f.useState(null),[D,B]=f.useState(null),K=f.useMemo(()=>D===null&&T?Number.MAX_SAFE_INTEGER:D||0,[D,I]),[J,ee]=f.useState(false),te=`${n}-item`,ne=Math.max(L,U),ae=p===u7,oe=r.length&&ae,re=p===d7,ce=oe||typeof p=="number"&&r.length>p,he=f.useMemo(()=>{let Oe=r;return oe?I===null&&T?Oe=r:Oe=r.slice(0,Math.min(r.length,N/c)):typeof p=="number"&&(Oe=r.slice(0,p)),Oe},[r,c,I,p,oe]),me=f.useMemo(()=>oe?r.slice(K+1):r.slice(he.length),[r,he,oe,K]),Re=f.useCallback((Oe,Qe)=>typeof a=="function"?a(Oe):(a&&Oe?.[a])??Qe,[a]),se=f.useCallback(o||(Oe=>Oe),[o]);function de(Oe,Qe,Xe){D===Oe&&(Qe===void 0||Qe===Y)||(B(Oe),Xe||(ee(Oe{const _e=new Map(Xe);return Qe===null?_e.delete(Oe):_e.set(Oe,Qe),_e});}function He(Oe,Qe){q(Qe),H(U);}function Ue(Oe,Qe){z(Qe);}function Pe(Oe,Qe){G(Qe);}function ue(Oe){return O.get(Re(he[Oe],Oe))}Mn(()=>{if(N&&typeof ne=="number"&&he){let Oe=V+F;const Qe=he.length,Xe=Qe-1;if(!Qe){de(0,null);return}for(let _e=0;_eN){de(_e-1,Oe-ze-F+U);break}}S&&ue(0)+F>N&&Q(null);}},[N,O,U,V,F,Re,he]);const ye=J&&!!me.length;let Te={};Y!==null&&oe&&(Te={position:"absolute",left:Y,top:0});const qe={prefixCls:te,responsive:oe,component:w,invalidate:re},Ze=i?(Oe,Qe)=>{const Xe=Re(Oe,Qe);return f.createElement(_0.Provider,{key:Xe,value:{...qe,order:Qe,item:Oe,itemKey:Xe,registerSize:be,display:Qe<=K}},i(Oe,Qe))}:(Oe,Qe)=>{const Xe=Re(Oe,Qe);return f.createElement(ph,ir({},qe,{order:Qe,key:Xe,item:Oe,renderItem:se,itemKey:Xe,registerSize:be,display:Qe<=K}))},We={order:ye?K:Number.MAX_SAFE_INTEGER,className:`${te}-rest`,registerSize:He,display:ye},tt=g||hse,nt=b?f.createElement(_0.Provider,{value:{...qe,...We}},b(me)):f.createElement(ph,ir({},qe,We),typeof tt=="function"?tt(me):tt),Ke=f.createElement(C,ir({className:X(!re&&n,m),style:d,ref:t},M),y&&f.createElement(ph,ir({},qe,{responsive:ae,responsiveDisabled:!oe,order:-1,className:`${te}-prefix`,registerSize:Ue,display:true}),y),he.map(Ze),ce?nt:null,S&&f.createElement(ph,ir({},qe,{responsive:ae,responsiveDisabled:!oe,order:K,className:`${te}-suffix`,registerSize:Pe,display:true,style:Te}),S));return ae?f.createElement(da,{onResize:Se,disabled:!oe},Ke):Ke}const ws=f.forwardRef(pse);ws.Item=mse;ws.RESPONSIVE=u7;ws.INVALIDATE=d7;const f7=e=>{const{className:t,style:n,customizeIcon:r,customizeIconProps:o,children:i,onMouseDown:a,onClick:c}=e,u=typeof r=="function"?r(o):r;return f.createElement("span",{className:t,onMouseDown:d=>{d.preventDefault(),a?.(d);},style:{userSelect:"none",WebkitUserSelect:"none",...n},unselectable:"on",onClick:c,"aria-hidden":true},u!==void 0?u:f.createElement("span",{className:X(t.split(/\s+/).map(d=>`${d}-icon`))},i))};function Z2(){return Z2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation();},vse=f.forwardRef(function({inputProps:t},n){const{prefixCls:r,displayValues:o,searchValue:i,mode:a,onSelectorRemove:c,removeIcon:u}=Xp(),{disabled:d,showSearch:m,triggerOpen:p,toggleOpen:g,autoClearSearchValue:b,tagRender:y,maxTagPlaceholder:S,maxTagTextLength:C,maxTagCount:w,classNames:$,styles:M}=Cu(),T=`${r}-selection-item`;let R=i;!p&&a==="multiple"&&b!==false&&(R="");const I=m&&R||"",P=m&&!d,N=u??"×",O=S??(F=>`+ ${F.length} ...`),_=y,L=F=>{g(F);},H=F=>{c?.(F);},U=(F,G,Y,Q,D)=>f.createElement("span",{title:X2(F),className:X(T,{[`${T}-disabled`]:Y},$?.item),style:M?.item},f.createElement("span",{className:X(`${T}-content`,$?.itemContent),style:M?.itemContent},G),Q&&f.createElement(f7,{className:X(`${T}-remove`,$?.itemRemove),style:M?.itemRemove,onMouseDown:mO,onClick:D,customizeIcon:N},"×")),q=(F,G,Y,Q,D,B,K)=>{const J=ee=>{mO(ee),L(!p);};return f.createElement("span",{onMouseDown:J},_({label:G,value:F,index:K?.index,disabled:Y,closable:Q,onClose:D,isMaxTag:!!B}))},V=(F,G)=>{const{disabled:Y,label:Q,value:D}=F,B=!d&&!Y;let K=Q;if(typeof C=="number"&&(typeof Q=="string"||typeof Q=="number")){const ee=String(K);ee.length>C&&(K=`${ee.slice(0,C)}...`);}const J=ee=>{ee&&ee.stopPropagation(),H(F);};return typeof _=="function"?q(D,K,Y,B,J,void 0,G):U(F,K,Y,B,J)},z=F=>{if(!o.length)return null;const G=typeof O=="function"?O(F):O;return typeof _=="function"?q(void 0,G,false,false,void 0,true):U({title:G},G,false)};return f.createElement(ws,{prefixCls:`${r}-content`,className:$?.content,style:M?.content,prefix:!o.length&&!I&&f.createElement(l7,null),data:o,renderItem:V,renderRest:z,suffix:f.createElement(s7,Z2({ref:n,disabled:d,readOnly:!P},t,{value:I||"",syncWidth:true})),itemKey:gse,maxCount:w})}),bse=f.forwardRef(function(t,n){const{multiple:r,onInputKeyDown:o,tabIndex:i}=Xp(),a=Cu(),{showSearch:c}=a,d={...po(a,{aria:true}),onKeyDown:o,readOnly:!c,tabIndex:i};return r?f.createElement(vse,{ref:n,inputProps:d}):f.createElement(lse,{ref:n,inputProps:d})});function yse(e){return e&&![at.ESC,at.SHIFT,at.BACKSPACE,at.TAB,at.WIN_KEY,at.ALT,at.META,at.WIN_KEY_RIGHT,at.CTRL,at.SEMICOLON,at.EQUALS,at.CAPS_LOCK,at.CONTEXT_MENU,at.UP,at.LEFT,at.RIGHT,at.F1,at.F2,at.F3,at.F4,at.F5,at.F6,at.F7,at.F8,at.F9,at.F10,at.F11,at.F12].includes(e)}function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{which:ae}=ne,oe=Y.current instanceof HTMLTextAreaElement;if(!oe&&L&&(ae===at.UP||ae===at.DOWN)&&ne.preventDefault(),I&&I(ne),oe&&!L&&~[at.UP,at.DOWN,at.LEFT,at.RIGHT].indexOf(ae))return;!(ne.ctrlKey||ne.altKey||ne.metaKey)&&yse(ae)&&H(true);});f.useImperativeHandle(n,()=>({focus:ne=>{(Y.current||G.current).focus?.(ne);},blur:()=>{(Y.current||G.current).blur?.();},nativeElement:G.current}));const D=Rt(ne=>{if(!q){const ae=ef(Y.current);ne.nativeEvent._ori_target=ae,ae&&ne.target!==ae&&!ae.contains(ne.target)&&ne.preventDefault();const oe=L&&!m&&(b==="combobox"||U);ne.nativeEvent._select_lazy?L&&H(false):(Y.current?.focus(),oe||H());}T?.(ne);}),{root:B}=O,K=Ln(_,Sse),J=po(K,{aria:true}),ee=Object.keys(J),te={...t,onInputKeyDown:Q};return B?f.isValidElement(B)?f.cloneElement(B,{...K,ref:Ar(B.ref,G)}):f.createElement(B,L0({},K,{ref:G})):f.createElement(a7.Provider,{value:te},f.createElement("div",L0({},Ln(K,ee),{ref:G,className:o,style:i,onMouseDown:D}),f.createElement(kx,{className:X(`${r}-prefix`,z?.prefix),style:F?.prefix},a),f.createElement(bse,{ref:Y}),f.createElement(kx,{className:X(`${r}-suffix`,{[`${r}-suffix-loading`]:V},z?.suffix),style:F?.suffix},c),u&&f.createElement(kx,{className:X(`${r}-clear`,z?.clear),style:F?.clear,onMouseDown:ne=>{ne.nativeEvent._select_lazy=true,R?.(ne);}},u),d))});function xse(e,t,n){return f.useMemo(()=>{let{root:r,input:o}=e||{};return n&&(r=n()),t&&(o=t()),{root:r,input:o}},[e,t,n])}function J2(){return J2=Object.assign?Object.assign.bind():function(e){for(var t=1;te==="tags"||e==="multiple",wse=f.forwardRef((e,t)=>{const{id:n,prefixCls:r,className:o,styles:i,classNames:a,showSearch:c,tagRender:u,showScrollBar:d="optional",direction:m,omitDomProps:p,displayValues:g,onDisplayValuesChange:b,emptyOptions:y,notFoundContent:S="Not Found",onClear:C,maxCount:w,placeholder:$,mode:M,disabled:T,loading:R,getInputElement:I,getRawInputElement:P,open:N,defaultOpen:O,onPopupVisibleChange:_,activeValue:L,onActiveValueChange:H,activeDescendantId:U,searchValue:q,autoClearSearchValue:V,onSearch:z,onSearchSplit:F,tokenSeparators:G,allowClear:Y,prefix:Q,suffix:D,suffixIcon:B,clearIcon:K,OptionList:J,animation:ee,transitionName:te,popupStyle:ne,popupClassName:ae,popupMatchSelectWidth:oe,popupRender:re,popupAlign:ce,placement:he,builtinPlacements:me,getPopupContainer:Re,showAction:se=[],onFocus:de,onBlur:Se,onKeyUp:be,onKeyDown:He,onMouseDown:Ue,components:Pe,...ue}=e,ye=eE(M),Te=f.useRef(null),qe=f.useRef(null),Ze=f.useRef(null),[We,tt]=f.useState(false);f.useImperativeHandle(t,()=>({focus:Te.current?.focus,blur:Te.current?.blur,scrollTo:Ee=>Ze.current?.scrollTo(Ee),nativeElement:ef(Te.current)}));const nt=xse(Pe,I,P),Ke=f.useMemo(()=>{if(M!=="combobox")return q;const Ee=g[0]?.value;return typeof Ee=="string"||typeof Ee=="number"?String(Ee):""},[q,M,g]),Oe=M==="combobox"&&typeof I=="function"&&I()||null,Qe=!S&&y,[Xe,_e]=ise(O||false,N,_,Ee=>T||Qe?false:Ee),ze=f.useMemo(()=>(G||[]).some(Ee=>[` `,`\r `].includes(Ee)),[G]),ct=(Ee,lt,et)=>{if(ye&&K2(w)&&g.length>=w)return;let Ct=true,_t=Ee;H?.(null);const fn=nse(Ee,G,K2(w)?w-g.length:void 0),en=et?null:fn;return M!=="combobox"&&en&&(_t="",F?.(en),_e(false),Ct=false),z&&Ke!==_t&&z(_t,{source:lt?"typing":"effect"}),Ee&<&&Ct&&_e(true),Ct},Pt=Ee=>{!Ee||!Ee.trim()||z(Ee,{source:"submit"});};f.useEffect(()=>{!Xe&&!ye&&M!=="combobox"&&ct("",false,false);},[Xe]),f.useEffect(()=>{T&&(_e(false),tt(false));},[T,Xe]);const[ut,Dt]=Xae(),wt=f.useRef(false),Tt=Ee=>{const lt=ut(),{key:et}=Ee,Ct=et==="Enter";if(Ct&&(M!=="combobox"&&Ee.preventDefault(),Xe||_e(true)),Dt(!!Ke),et==="Backspace"&&!lt&&ye&&!Ke&&g.length){const _t=[...g];let fn=null;for(let en=_t.length-1;en>=0;en-=1){const Hn=_t[en];if(!Hn.disabled){_t.splice(en,1),fn=Hn;break}}fn&&b(_t,{type:"remove",values:[fn]});}Xe&&(!Ct||!wt.current)&&(Ct&&(wt.current=true),Ze.current?.onKeyDown(Ee)),He?.(Ee);},gt=(Ee,...lt)=>{Xe&&Ze.current?.onKeyUp(Ee,...lt),Ee.key==="Enter"&&(wt.current=false),be?.(Ee,...lt);},ft=Rt(Ee=>{const lt=g.filter(et=>et!==Ee);b(lt,{type:"remove",values:[Ee]});}),st=()=>{wt.current=false;},Fe=()=>[ef(Te.current),qe.current?.getPopupElement()];Qae(Fe,Xe,_e,!!nt.root);const Ge=f.useRef(false),ve=Ee=>{tt(true),T||(se.includes("focus")&&_e(true),de?.(Ee));},Ae=()=>{Xe&&!Ge.current&&_e(false,{cancelFun:()=>o7(Fe(),document.activeElement)});},Ce=Ee=>{tt(false),Ke&&(M==="tags"?z(Ke,{source:"submit"}):M==="multiple"&&z("",{source:"blur"})),Ae(),T||Se?.(Ee);},pe=(Ee,...lt)=>{const{target:et}=Ee;qe.current?.getPopupElement()?.contains(et)&&_e&&_e(true),Ue?.(Ee,...lt),Ge.current=true,cR(()=>{Ge.current=false;});},[,Ie]=f.useState({});function $e(){Ie({});}let Le;nt.root&&(Le=Ee=>{_e(Ee);});const Ye=f.useMemo(()=>({...e,notFoundContent:S,open:Xe,triggerOpen:Xe,id:n,showSearch:c,multiple:ye,toggleOpen:_e,showScrollBar:d,styles:i,classNames:a}),[e,S,_e,n,c,ye,Xe,d,i,a]),it=f.useMemo(()=>{const Ee=D??B;return typeof Ee=="function"?Ee({searchValue:Ke,open:Xe,focused:We,showSearch:c,loading:R}):Ee},[D,B,Ke,Xe,We,c,R]),ht=()=>{C?.(),Te.current?.focus(),b([],{type:"clear",values:g}),ct("",false,false);},{allowClear:$t,clearIcon:Mt}=Yae(r,g,Y,K,T,Ke,M),zt=f.createElement(J,{ref:Ze}),Rn=X(r,o,{[`${r}-focused`]:We,[`${r}-multiple`]:ye,[`${r}-single`]:!ye,[`${r}-allow-clear`]:$t,[`${r}-show-arrow`]:it!=null,[`${r}-disabled`]:T,[`${r}-loading`]:R,[`${r}-open`]:Xe,[`${r}-customize-input`]:Oe,[`${r}-show-search`]:c});let Ot=f.createElement(Cse,J2({},ue,{ref:Te,prefixCls:r,className:Rn,focused:We,prefix:Q,suffix:it,clearIcon:Mt,multiple:ye,mode:M,displayValues:g,placeholder:$,searchValue:Ke,activeValue:L,onSearch:ct,onSearchSubmit:Pt,onInputBlur:st,onFocus:ve,onBlur:Ce,onClearMouseDown:ht,onKeyDown:Tt,onKeyUp:gt,onSelectorRemove:ft,tokenWithEnter:ze,onMouseDown:pe,components:nt}));return Ot=f.createElement(ese,{ref:qe,disabled:T,prefixCls:r,visible:Xe,popupElement:zt,animation:ee,transitionName:te,popupStyle:ne,popupClassName:ae,direction:m,popupMatchSelectWidth:oe,popupRender:re,popupAlign:ce,placement:he,builtinPlacements:me,getPopupContainer:Re,empty:y,onPopupVisibleChange:Le,onPopupMouseEnter:$e,onPopupMouseDown:pe,onPopupBlur:Ae},Ot),f.createElement(r7.Provider,{value:Ye},f.createElement(rse,{visible:We&&!Xe,values:g}),Ot)}),dR=()=>null;dR.isSelectOptGroup=true;const fR=()=>null;fR.isSelectOption=true;const m7=f.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:o,onInnerResize:i,innerProps:a,rtl:c,extra:u},d)=>{let m={},p={display:"flex",flexDirection:"column"};return t!==void 0&&(m={height:e,position:"relative",overflow:"hidden"},p={...p,transform:`translateY(${t}px)`,[c?"marginRight":"marginLeft"]:-n,position:"absolute",left:0,right:0,top:0}),f.createElement("div",{style:m},f.createElement(da,{onResize:({offsetHeight:g})=>{g&&i&&i();}},f.createElement("div",ir({style:p,className:X({[`${o}-holder-inner`]:o}),ref:d},a),r,u)))});m7.displayName="Filler";function $se({children:e,setRef:t}){const n=f.useCallback(r=>{t(r);},[]);return f.cloneElement(e,{ref:n})}function Ese(e,t,n,r,o,i,a,{getKey:c}){return e.slice(t,n+1).map((u,d)=>{const m=t+d,p=a(u,m,{style:{width:r},offsetX:o}),g=c(u);return f.createElement($se,{key:g,setRef:b=>i(u,b)},p)})}function Mse(e,t,n){const r=e.length,o=t.length;let i,a;if(r===0&&o===0)return null;r{const c=Mse(r||[],e||[],t);c?.index!==void 0&&a(e[c.index]),o(e);},[e]),[i]}const hO=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),h7=((e,t,n,r)=>{const o=f.useRef(false),i=f.useRef(null);function a(){clearTimeout(i.current),o.current=true,i.current=setTimeout(()=>{o.current=false;},50);}const c=f.useRef({top:e,bottom:t,left:n,right:r});return c.current.top=e,c.current.bottom=t,c.current.left=n,c.current.right=r,(u,d,m=false)=>{const p=u?d<0&&c.current.left||d>0&&c.current.right:d<0&&c.current.top||d>0&&c.current.bottom;return m&&p?(clearTimeout(i.current),o.current=false):(!p||o.current)&&a(),!o.current&&p}});function Tse(e,t,n,r,o,i,a){const c=f.useRef(0),u=f.useRef(null),d=f.useRef(null),m=f.useRef(false),p=h7(t,n,r,o);function g($,M){if(Lt.cancel(u.current),p(false,M))return;const T=$;if(!T._virtualHandled)T._virtualHandled=true;else return;c.current+=M,d.current=M,hO||T.preventDefault(),u.current=Lt(()=>{const R=m.current?10:1;a(c.current*R,false),c.current=0;});}function b($,M){a(M,true),hO||$.preventDefault();}const y=f.useRef(null),S=f.useRef(null);function C($){if(!e)return;Lt.cancel(S.current),S.current=Lt(()=>{y.current=null;},2);const{deltaX:M,deltaY:T,shiftKey:R}=$;let I=M,P=T;(y.current==="sx"||!y.current&&R&&T&&!M)&&(I=T,P=0,y.current="sx");const N=Math.abs(I),O=Math.abs(P);y.current===null&&(y.current=i&&N>O?"x":"y"),y.current==="y"?g($,P):b($,I);}function w($){e&&(m.current=$.detail===d.current);}return [C,w]}function Ase(e,t,n,r){const[o,i]=f.useMemo(()=>[new Map,[]],[e,n.id,r]);return (c,u=c)=>{let d=o.get(c),m=o.get(u);if(d===void 0||m===void 0){const p=e.length;for(let g=i.length;g{let b=false;i.current.forEach((y,S)=>{if(y&&y.offsetParent){const{offsetHeight:C}=y,{marginTop:w,marginBottom:$}=getComputedStyle(y),M=pO(w),T=pO($),R=C+M+T;a.current.get(S)!==R&&(a.current.set(S,R),b=true);}}),b&&o(y=>y+1);};if(p)g();else {c.current+=1;const b=c.current;Promise.resolve().then(()=>{b===c.current&&g();});}}function m(p,g){const b=e(p);i.current.get(b),g?(i.current.set(b,g),d()):i.current.delete(b);}return f.useEffect(()=>u,[]),[m,d,a.current,r]}const gO=14/15;function Ise(e,t,n){const r=f.useRef(false),o=f.useRef(0),i=f.useRef(0),a=f.useRef(null),c=f.useRef(null);let u;const d=g=>{if(r.current){const b=Math.ceil(g.touches[0].pageX),y=Math.ceil(g.touches[0].pageY);let S=o.current-b,C=i.current-y;const w=Math.abs(S)>Math.abs(C);w?o.current=b:i.current=y;const $=n(w,w?S:C,false,g);$&&g.preventDefault(),clearInterval(c.current),$&&(c.current=setInterval(()=>{w?S*=gO:C*=gO;const M=Math.floor(w?S:C);(!n(w,M,true)||Math.abs(M)<=.1)&&clearInterval(c.current);},16));}},m=()=>{r.current=false,u();},p=g=>{u(),g.touches.length===1&&!r.current&&(r.current=true,o.current=Math.ceil(g.touches[0].pageX),i.current=Math.ceil(g.touches[0].pageY),a.current=g.target,a.current.addEventListener("touchmove",d,{passive:false}),a.current.addEventListener("touchend",m,{passive:true}));};u=()=>{a.current&&(a.current.removeEventListener("touchmove",d),a.current.removeEventListener("touchend",m));},Mn(()=>(e&&t.current.addEventListener("touchstart",p,{passive:true}),()=>{t.current?.removeEventListener("touchstart",p),u(),clearInterval(c.current);}),[e]);}function vO(e){return Math.floor(e**.5)}function tE(e,t){return ("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function Ose(e,t,n){f.useEffect(()=>{const r=t.current;if(e&&r){let o=false,i,a;const c=()=>{Lt.cancel(i);},u=()=>{c(),i=Lt(()=>{n(a),u();});},d=()=>{o=false,c();},m=g=>{if(g.target.draggable||g.button!==0)return;const b=g;b._virtualHandled||(b._virtualHandled=true,o=true);},p=g=>{if(o){const b=tE(g,false),{top:y,bottom:S}=r.getBoundingClientRect();if(b<=y){const C=y-b;a=-vO(C),u();}else if(b>=S){const C=b-S;a=vO(C),u();}else c();}};return r.addEventListener("mousedown",m),r.ownerDocument.addEventListener("mouseup",d),r.ownerDocument.addEventListener("mousemove",p),r.ownerDocument.addEventListener("dragend",d),()=>{r.removeEventListener("mousedown",m),r.ownerDocument.removeEventListener("mouseup",d),r.ownerDocument.removeEventListener("mousemove",p),r.ownerDocument.removeEventListener("dragend",d),c();}}},[e]);}const Dse=10;function _se(e,t,n,r,o,i,a,c){const u=f.useRef(),[d,m]=f.useState(null);return Mn(()=>{if(d&&d.times({...M}));return}i();const{targetAlign:p,originAlign:g,index:b,offset:y}=d,S=e.current.clientHeight;let C=false,w=p,$=null;if(S){const M=p||g;let T=0,R=0,I=0;const P=Math.min(t.length-1,b);for(let O=0;O<=P;O+=1){const _=o(t[O]);R=T;const L=n.get(_);I=R+(L===void 0?r:L),T=I;}let N=M==="top"?y:S-y;for(let O=P;O>=0;O-=1){const _=o(t[O]),L=n.get(_);if(L===void 0){C=true;break}if(N-=L,N<=0)break}switch(M){case "top":$=R-y;break;case "bottom":$=I-S+y;break;default:{const{scrollTop:O}=e.current,_=O+S;R_&&(w="bottom");}}$!==null&&a($),$!==d.lastTop&&(C=true);}C&&m({...d,times:d.times+1,targetAlign:w,lastTop:$});}},[d,e.current]),p=>{if(p==null){c();return}if(Lt.cancel(u.current),typeof p=="number")a(p);else if(p&&typeof p=="object"){let g;const{align:b}=p;"index"in p?{index:g}=p:g=t.findIndex(S=>o(S)===p.key);const{offset:y=0}=p;m({times:0,index:g,offset:y,originAlign:b});}}}const bO=f.forwardRef((e,t)=>{const{prefixCls:n,rtl:r,scrollOffset:o,scrollRange:i,onStartMove:a,onStopMove:c,onScroll:u,horizontal:d,spinSize:m,containerSize:p,style:g,thumbStyle:b,showScrollBar:y}=e,[S,C]=f.useState(false),[w,$]=f.useState(null),[M,T]=f.useState(null),R=!r,I=f.useRef(),P=f.useRef(),[N,O]=f.useState(y),_=f.useRef(),L=()=>{y===true||y===false||(clearTimeout(_.current),O(true),_.current=setTimeout(()=>{O(false);},3e3));},H=i-p||0,U=p-m||0,q=f.useMemo(()=>o===0||H===0?0:o/H*U,[o,H,U]),V=K=>{K.stopPropagation(),K.preventDefault();},z=f.useRef({top:q,dragging:S,pageY:w,startTop:M});z.current={top:q,dragging:S,pageY:w,startTop:M};const F=K=>{C(true),$(tE(K,d)),T(z.current.top),a(),K.stopPropagation(),K.preventDefault();};f.useEffect(()=>{const K=te=>{te.preventDefault();},J=I.current,ee=P.current;return J.addEventListener("touchstart",K,{passive:false}),ee.addEventListener("touchstart",F,{passive:false}),()=>{J.removeEventListener("touchstart",K),ee.removeEventListener("touchstart",F);}},[]);const G=f.useRef();G.current=H;const Y=f.useRef();Y.current=U,f.useEffect(()=>{if(S){let K;const J=te=>{const{dragging:ne,pageY:ae,startTop:oe}=z.current;Lt.cancel(K);const re=I.current.getBoundingClientRect(),ce=p/(d?re.width:re.height);if(ne){const he=(tE(te,d)-ae)*ce;let me=oe;!R&&d?me-=he:me+=he;const Re=G.current,se=Y.current,de=se?me/se:0;let Se=Math.ceil(de*Re);Se=Math.max(Se,0),Se=Math.min(Se,Re),K=Lt(()=>{u(Se,d);});}},ee=()=>{C(false),c();};return window.addEventListener("mousemove",J,{passive:true}),window.addEventListener("touchmove",J,{passive:true}),window.addEventListener("mouseup",ee,{passive:true}),window.addEventListener("touchend",ee,{passive:true}),()=>{window.removeEventListener("mousemove",J),window.removeEventListener("touchmove",J),window.removeEventListener("mouseup",ee),window.removeEventListener("touchend",ee),Lt.cancel(K);}}},[S]),f.useEffect(()=>(L(),()=>{clearTimeout(_.current);}),[o]),f.useImperativeHandle(t,()=>({delayHidden:L}));const Q=`${n}-scrollbar`,D={position:"absolute",visibility:N?null:"hidden"},B={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(D,{height:8,left:0,right:0,bottom:0}),Object.assign(B,{height:"100%",width:m,[R?"left":"right"]:q})):(Object.assign(D,{width:8,top:0,bottom:0,[R?"right":"left"]:0}),Object.assign(B,{width:"100%",height:m,top:q})),f.createElement("div",{ref:I,className:X(Q,{[`${Q}-horizontal`]:d,[`${Q}-vertical`]:!d,[`${Q}-visible`]:N}),style:{...D,...g},onMouseDown:V,onMouseMove:L},f.createElement("div",{ref:P,className:X(`${Q}-thumb`,{[`${Q}-thumb-moving`]:S}),style:{...B,...b},onMouseDown:F}))}),Lse=20;function yO(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Lse),Math.floor(n)}const Bse=[],zse={overflowY:"auto",overflowAnchor:"none"};function kse(e,t){const{prefixCls:n="rc-virtual-list",className:r,height:o,itemHeight:i,fullHeight:a=true,style:c,data:u,children:d,itemKey:m,virtual:p,direction:g,scrollWidth:b,component:y="div",onScroll:S,onVirtualScroll:C,onVisibleChange:w,innerProps:$,extraRender:M,styles:T,showScrollBar:R="optional",...I}=e,P=f.useCallback(Ce=>typeof m=="function"?m(Ce):Ce?.[m],[m]),[N,O,_,L]=Pse(P),H=!!(p!==false&&o&&i),U=f.useMemo(()=>Object.values(_.maps).reduce((Ce,pe)=>Ce+pe,0),[_.id,_.maps]),q=H&&u&&(Math.max(i*u.length,U)>o||!!b),V=g==="rtl",z=X(n,{[`${n}-rtl`]:V},r),F=u||Bse,G=f.useRef(),Y=f.useRef(),Q=f.useRef(),[D,B]=f.useState(0),[K,J]=f.useState(0),[ee,te]=f.useState(false),ne=()=>{te(true);},ae=()=>{te(false);},oe={getKey:P};function re(Ce){B(pe=>{let Ie;typeof Ce=="function"?Ie=Ce(pe):Ie=Ce;const $e=We(Ie);return G.current.scrollTop=$e,$e});}const ce=f.useRef({start:0,end:F.length}),he=f.useRef(),[me]=Rse(F,P);he.current=me;const{scrollHeight:Re,start:se,end:de,offset:Se}=f.useMemo(()=>{if(!H)return {scrollHeight:void 0,start:0,end:F.length-1,offset:void 0};if(!q)return {scrollHeight:Y.current?.offsetHeight||0,start:0,end:F.length-1,offset:void 0};let Ce=0,pe,Ie,$e;const Le=F.length;for(let Ye=0;Ye=D&&pe===void 0&&(pe=Ye,Ie=Ce),Mt>D+o&&$e===void 0&&($e=Ye),Ce=Mt;}return pe===void 0&&(pe=0,Ie=0,$e=Math.ceil(o/i)),$e===void 0&&($e=F.length-1),$e=Math.min($e+1,F.length-1),{scrollHeight:Ce,start:pe,end:$e,offset:Ie}},[q,H,D,F,L,o]);ce.current.start=se,ce.current.end=de,f.useLayoutEffect(()=>{const Ce=_.getRecord();if(Ce.size===1){const pe=Array.from(Ce.keys())[0],Ie=Ce.get(pe),$e=F[se];if($e&&Ie===void 0&&P($e)===pe){const it=_.get(pe)-i;re(ht=>ht+it);}}_.resetRecord();},[Re]);const[be,He]=f.useState({width:0,height:o}),Ue=Ce=>{He({width:Ce.offsetWidth,height:Ce.offsetHeight});},Pe=f.useRef(),ue=f.useRef(),ye=f.useMemo(()=>yO(be.width,b),[be.width,b]),Te=f.useMemo(()=>yO(be.height,Re),[be.height,Re]),qe=Re-o,Ze=f.useRef(qe);Ze.current=qe;function We(Ce){let pe=Ce;return Number.isNaN(Ze.current)||(pe=Math.min(pe,Ze.current)),pe=Math.max(pe,0),pe}const tt=D<=0,nt=D>=qe,Ke=K<=0,Oe=K>=b,Qe=h7(tt,nt,Ke,Oe),Xe=()=>({x:V?-K:K,y:D}),_e=f.useRef(Xe()),ze=Rt(Ce=>{if(C){const pe={...Xe(),...Ce};(_e.current.x!==pe.x||_e.current.y!==pe.y)&&(C(pe),_e.current=pe);}});function ct(Ce,pe){const Ie=Ce;pe?(wo.flushSync(()=>{J(Ie);}),ze()):re(Ie);}function Pt(Ce){const{scrollTop:pe}=Ce.currentTarget;pe!==D&&re(pe),S?.(Ce),ze();}const ut=Ce=>{let pe=Ce;const Ie=b?b-be.width:0;return pe=Math.max(pe,0),pe=Math.min(pe,Ie),pe},Dt=Rt((Ce,pe)=>{pe?(wo.flushSync(()=>{J(Ie=>{const $e=Ie+(V?-Ce:Ce);return ut($e)});}),ze()):re(Ie=>Ie+Ce);}),[wt,Tt]=Tse(H,tt,nt,Ke,Oe,!!b,Dt);Ise(H,G,(Ce,pe,Ie,$e)=>{const Le=$e;return Qe(Ce,pe,Ie)?false:!Le||!Le._virtualHandled?(Le&&(Le._virtualHandled=true),wt({preventDefault(){},deltaX:Ce?pe:0,deltaY:Ce?0:pe}),true):false}),Ose(q,G,Ce=>{re(pe=>pe+Ce);}),Mn(()=>{function Ce(Ie){const $e=tt&&Ie.detail<0,Le=nt&&Ie.detail>0;H&&!$e&&!Le&&Ie.preventDefault();}const pe=G.current;return pe.addEventListener("wheel",wt,{passive:false}),pe.addEventListener("DOMMouseScroll",Tt,{passive:true}),pe.addEventListener("MozMousePixelScroll",Ce,{passive:false}),()=>{pe.removeEventListener("wheel",wt),pe.removeEventListener("DOMMouseScroll",Tt),pe.removeEventListener("MozMousePixelScroll",Ce);}},[H,tt,nt]),Mn(()=>{if(b){const Ce=ut(K);J(Ce),ze({x:Ce});}},[be.width,b]);const gt=()=>{Pe.current?.delayHidden(),ue.current?.delayHidden();},ft=_se(G,F,_,i,P,()=>O(true),re,gt);f.useImperativeHandle(t,()=>({nativeElement:Q.current,getScrollInfo:Xe,scrollTo:Ce=>{function pe(Ie){return Ie&&typeof Ie=="object"&&("left"in Ie||"top"in Ie)}pe(Ce)?(Ce.left!==void 0&&J(ut(Ce.left)),ft(Ce.top)):ft(Ce);}})),Mn(()=>{if(w){const Ce=F.slice(se,de+1);w(Ce,F);}},[se,de,F]);const st=Ase(F,P,_,i),Fe=M?.({start:se,end:de,virtual:q,offsetX:K,offsetY:Se,rtl:V,getSize:st}),Ge=Ese(F,se,de,b,K,N,d,oe);let ve=null;o&&(ve={[a?"height":"maxHeight"]:o,...zse},H&&(ve.overflowY="hidden",b&&(ve.overflowX="hidden"),ee&&(ve.pointerEvents="none")));const Ae={};return V&&(Ae.dir="rtl"),f.createElement("div",ir({ref:Q,style:{...c,position:"relative"},className:z},Ae,I),f.createElement(da,{onResize:Ue},f.createElement(y,{className:`${n}-holder`,style:ve,ref:G,onScroll:Pt,onMouseEnter:gt},f.createElement(m7,{prefixCls:n,height:Re,offsetX:K,offsetY:Se,scrollWidth:b,onInnerResize:O,ref:Y,innerProps:$,rtl:V,extra:Fe},Ge))),q&&Re>o&&f.createElement(bO,{ref:Pe,prefixCls:n,scrollOffset:D,scrollRange:Re,rtl:V,onScroll:ct,onStartMove:ne,onStopMove:ae,spinSize:Te,containerSize:be.height,style:T?.verticalScrollBar,thumbStyle:T?.verticalScrollBarThumb,showScrollBar:R}),q&&b>be.width&&f.createElement(bO,{ref:ue,prefixCls:n,scrollOffset:K,scrollRange:b,rtl:V,onScroll:ct,onStartMove:ne,onStopMove:ae,spinSize:ye,containerSize:be.width,horizontal:true,style:T?.horizontalScrollBar,thumbStyle:T?.horizontalScrollBarThumb,showScrollBar:R}))}const p7=f.forwardRef(kse);p7.displayName="List";function Fse(){return /(mac\sos|macintosh)/i.test(navigator.appVersion)}function Nh(){return Nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,id:r,open:o,multiple:i,mode:a,searchValue:c,toggleOpen:u,notFoundContent:d,onPopupScroll:m,showScrollBar:p}=Cu(),{maxCount:g,flattenOptions:b,onActiveValue:y,defaultActiveFirstOption:S,onSelect:C,menuItemSelectedIcon:w,rawValues:$,fieldNames:M,virtual:T,direction:R,listHeight:I,listItemHeight:P,optionRender:N,classNames:O,styles:_}=f.useContext(uR),L=`${n}-item`,H=Ef(()=>b,[o,b],(oe,re)=>re[0]&&oe[1]!==re[1]),U=f.useRef(null),q=f.useMemo(()=>i&&K2(g)&&$?.size>=g,[i,g,$?.size]),V=oe=>{oe.preventDefault();},z=oe=>{U.current?.scrollTo(typeof oe=="number"?{index:oe}:oe);},F=f.useCallback(oe=>a==="combobox"?false:$.has(oe),[a,[...$].toString(),$.size]),G=(oe,re=1)=>{const ce=H.length;for(let he=0;heG(0)),D=(oe,re=false)=>{Q(oe);const ce={source:re?"keyboard":"mouse"},he=H[oe];if(!he){y(null,-1,ce);return}y(he.value,oe,ce);};f.useEffect(()=>{D(S!==false?G(0):-1);},[H.length,c]);const B=f.useCallback(oe=>a==="combobox"?String(oe).toLowerCase()===c.toLowerCase():$.has(oe),[a,c,[...$].toString(),$.size]);f.useEffect(()=>{let oe;if(!i&&o&&$.size===1){const re=Array.from($)[0],ce=H.findIndex(({data:he})=>c?String(he.value).startsWith(c):he.value===re);ce!==-1&&(D(ce),oe=setTimeout(()=>{z(ce);}));}return o&&U.current?.scrollTo(void 0),()=>clearTimeout(oe)},[o,c]);const K=oe=>{oe!==void 0&&C(oe,{selected:!$.has(oe)}),i||u(false);};if(f.useImperativeHandle(t,()=>({onKeyDown:oe=>{const{which:re,ctrlKey:ce}=oe;switch(re){case at.N:case at.P:case at.UP:case at.DOWN:{let he=0;if(re===at.UP?he=-1:re===at.DOWN?he=1:Fse()&&ce&&(re===at.N?he=1:re===at.P&&(he=-1)),he!==0){const me=G(Y+he,he);z(me),D(me,true);}break}case at.TAB:case at.ENTER:{const he=H[Y];if(!he||he.data.disabled)return K(void 0);!q||$.has(he.value)?K(he.value):K(void 0),o&&oe.preventDefault();break}case at.ESC:u(false),o&&oe.stopPropagation();}},onKeyUp:()=>{},scrollTo:oe=>{z(oe);}})),H.length===0)return f.createElement("div",{role:"listbox",id:`${r}_list`,className:`${L}-empty`,onMouseDown:V},d);const J=Object.keys(M).map(oe=>M[oe]),ee=oe=>oe.label;function te(oe,re){const{group:ce}=oe;return {role:ce?"presentation":"option",id:`${r}_list_${re}`}}const ne=oe=>{const re=H[oe];if(!re)return null;const ce=re.data||{},{value:he}=ce,{group:me}=re,Re=po(ce,true),se=ee(re);return re?f.createElement("div",Nh({"aria-label":typeof se=="string"&&!me?se:null},Re,{key:oe},te(re,oe),{"aria-selected":B(he)}),he):null},ae={role:"listbox",id:`${r}_list`};return f.createElement(f.Fragment,null,T&&f.createElement("div",Nh({},ae,{style:{height:0,width:0,overflow:"hidden"}}),ne(Y-1),ne(Y),ne(Y+1)),f.createElement(p7,{itemKey:"key",ref:U,data:H,height:I,itemHeight:P,fullHeight:false,onMouseDown:V,onScroll:m,virtual:T,direction:R,innerProps:T?null:ae,showScrollBar:p,className:O?.popup?.list,style:_?.popup?.list},(oe,re)=>{const{group:ce,groupOption:he,data:me,label:Re,value:se}=oe,{key:de}=me;if(ce){const Qe=me.title??(SO(Re)?Re.toString():void 0);return f.createElement("div",{className:X(L,`${L}-group`,me.className),title:Qe},Re!==void 0?Re:de)}const{disabled:Se,title:be,children:He,style:Ue,className:Pe,...ue}=me,ye=Ln(ue,J),Te=F(se),qe=Se||!Te&&q,Ze=`${L}-option`,We=X(L,Ze,Pe,O?.popup?.listItem,{[`${Ze}-grouped`]:he,[`${Ze}-active`]:Y===re&&!qe,[`${Ze}-disabled`]:qe,[`${Ze}-selected`]:Te}),tt=ee(oe),nt=!w||typeof w=="function"||Te,Ke=typeof tt=="number"?tt:tt||se;let Oe=SO(Ke)?Ke.toString():void 0;return be!==void 0&&(Oe=be),f.createElement("div",Nh({},po(ye),T?{}:te(oe,re),{"aria-selected":T?void 0:B(se),className:We,title:Oe,onMouseMove:()=>{Y===re||qe||D(re);},onClick:()=>{qe||K(se);},style:{..._?.popup?.listItem,...Ue}}),f.createElement("div",{className:`${Ze}-content`},typeof N=="function"?N(oe,{index:re}):Ke),f.isValidElement(w)||Te,nt&&f.createElement(f7,{className:`${L}-option-state`,customizeIcon:w,customizeIconProps:{value:se,disabled:qe,isSelected:Te}},Te?"✓":null))}))},Vse=f.forwardRef(Hse),jse=((e,t)=>{const n=f.useRef({values:new Map,options:new Map}),r=f.useMemo(()=>{const{values:i,options:a}=n.current,c=e.map(m=>m.label===void 0?{...m,label:i.get(m.value)?.label}:m),u=new Map,d=new Map;return c.forEach(m=>{u.set(m.value,m),d.set(m.value,t.get(m.value)||a.get(m.value));}),n.current.values=u,n.current.options=d,c},[e,t]),o=f.useCallback(i=>t.get(i)||n.current.options.get(i),[t]);return [r,o]});function Fx(e,t){return c7(e).join("").toUpperCase().includes(t)}const Use=((e,t,n,r,o)=>f.useMemo(()=>{if(!n||r===false)return e;const{options:i,label:a,value:c}=t,u=[],d=typeof r=="function",m=n.toUpperCase(),p=d?r:(b,y)=>o&&o.length?o.some(S=>Fx(y[S],m)):y[i]?Fx(y[a!=="children"?a:"label"],m):Fx(y[c],m),g=d?b=>Y2(b):b=>b;return e.forEach(b=>{if(b[i]){if(p(n,g(b)))u.push(b);else {const S=b[i].filter(C=>p(n,g(C)));S.length&&u.push({...b,[i]:S});}return}p(n,g(b))&&u.push(b);}),u},[e,r,o,n,t]));function qse(e){const{key:t,props:{children:n,value:r,...o}}=e;return {key:t,value:r!==void 0?r:t,children:n,...o}}function g7(e,t=false){return Ko(e).map((n,r)=>{if(!f.isValidElement(n)||!n.type)return null;const{type:{isSelectOptGroup:o},key:i,props:{children:a,...c}}=n;return t||!o?qse(n):{key:`__RC_SELECT_GRP__${i===null?r:i}__`,label:i,...c,options:g7(a)}}).filter(n=>n)}const Gse=(e,t,n,r,o)=>f.useMemo(()=>{let i=e;!e&&(i=g7(t));const c=new Map,u=new Map,d=(p,g,b)=>{b&&typeof b=="string"&&p.set(g[b],g);},m=(p,g=false)=>{for(let b=0;b{d(u,y,S);}),d(u,y,o)):m(y[n.options],true);}};return m(i),{options:i,valueOptions:c,labelOptions:u}},[e,t,n,r,o]);function CO(e){const t=f.useRef();return t.current=e,f.useCallback((...r)=>t.current(...r),[])}function Wse(e,t,n){const{filterOption:r,searchValue:o,optionFilterProp:i,filterSort:a,onSearch:c,autoClearSearchValue:u}=t;return f.useMemo(()=>{const d=typeof e=="object",m={filterOption:r,searchValue:o,optionFilterProp:i,filterSort:a,onSearch:c,autoClearSearchValue:u,...d?e:{}};return [d||n==="combobox"||n==="tags"||n==="multiple"&&e===void 0?true:e,m]},[n,e,r,o,i,a,c,u])}function nE(){return nE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:n,mode:r,prefixCls:o="rc-select",backfill:i,fieldNames:a,showSearch:c,searchValue:u,onSearch:d,autoClearSearchValue:m,filterOption:p,optionFilterProp:g,filterSort:b,onSelect:y,onDeselect:S,onActive:C,popupMatchSelectWidth:w=true,optionLabelProp:$,options:M,optionRender:T,children:R,defaultActiveFirstOption:I,menuItemSelectedIcon:P,virtual:N,direction:O,listHeight:_=200,listItemHeight:L=20,labelRender:H,value:U,defaultValue:q,labelInValue:V,onChange:z,maxCount:F,classNames:G,styles:Y,...Q}=e,D={searchValue:u,onSearch:d,autoClearSearchValue:m,filterOption:p,optionFilterProp:g,filterSort:b},[B,K]=Wse(c,D,r),{filterOption:J,searchValue:ee,optionFilterProp:te,filterSort:ne,onSearch:ae,autoClearSearchValue:oe=true}=K,re=f.useMemo(()=>te?Array.isArray(te)?te:[te]:[],[te]),ce=Zl(n),he=eE(r),me=!!(!M&&R),Re=f.useMemo(()=>J===void 0&&r==="combobox"?false:J,[J,r]),se=f.useMemo(()=>i7(a,me),[JSON.stringify(a),me]),[de,Se]=dn("",ee),be=de||"",He=Gse(M,R,se,re,$),{valueOptions:Ue,labelOptions:Pe,options:ue}=He,ye=f.useCallback($e=>c7($e).map(Ye=>{let it,ht,$t,Mt;Yse(Ye)?it=Ye:(ht=Ye.label,it=Ye.value);const zt=Ue.get(it);return zt&&(ht===void 0&&(ht=zt?.[$||se.label]),$t=zt?.disabled,Mt=zt?.title),{label:ht,value:it,key:it,disabled:$t,title:Mt}}),[se,$,Ue]),[Te,qe]=dn(q,U),Ze=f.useMemo(()=>{const Le=ye(he&&Te===null?[]:Te);return r==="combobox"&&sse(Le[0]?.value)?[]:Le},[Te,ye,r,he]),[We,tt]=jse(Ze,Ue),nt=f.useMemo(()=>{if(!r&&We.length===1){const $e=We[0];if($e.value===null&&($e.label===null||$e.label===void 0))return []}return We.map($e=>({...$e,label:(typeof H=="function"?H($e):$e.label)??$e.value}))},[r,We,H]),Ke=f.useMemo(()=>new Set(We.map($e=>$e.value)),[We]);f.useEffect(()=>{if(r==="combobox"){const $e=We[0]?.value;Se(ase($e)?String($e):"");}},[We]);const Oe=CO(($e,Le)=>{const Ye=Le??$e;return {[se.value]:$e,[se.label]:Ye}}),Qe=f.useMemo(()=>{if(r!=="tags")return ue;const $e=[...ue],Le=Ye=>Ue.has(Ye);return [...We].sort((Ye,it)=>Ye.value{const it=Ye.value;Le(it)||$e.push(Oe(it,Ye.label));}),$e},[Oe,ue,Ue,We,r]),Xe=Use(Qe,se,be,Re,re),_e=f.useMemo(()=>{const $e=Le=>re.length?re.some(Ye=>Le?.[Ye]===be):Le?.value===be;return r!=="tags"||!be||Xe.some(Le=>$e(Le))||Xe.some(Le=>Le[se.value]===be)?Xe:[Oe(be),...Xe]},[Oe,re,r,Xe,be,se]),ze=$e=>[...$e].sort((Ye,it)=>ne(Ye,it,{searchValue:be})).map(Ye=>Array.isArray(Ye.options)?{...Ye,options:Ye.options.length>0?ze(Ye.options):Ye.options}:Ye),ct=f.useMemo(()=>ne?ze(_e):_e,[_e,ne,be]),Pt=f.useMemo(()=>tse(ct,{fieldNames:se,childrenAsData:me}),[ct,se,me]),ut=$e=>{const Le=ye($e);if(qe(Le),z&&(Le.length!==We.length||Le.some((Ye,it)=>We[it]?.value!==Ye?.value))){const Ye=V?Le.map(({label:ht,value:$t})=>({label:ht,value:$t})):Le.map(ht=>ht.value),it=Le.map(ht=>Y2(tt(ht.value)));z(he?Ye:Ye[0],he?it:it[0]);}},[Dt,wt]=f.useState(null),[Tt,gt]=f.useState(0),ft=I!==void 0?I:r!=="combobox",st=f.useRef(),Fe=f.useCallback(($e,Le,{source:Ye="keyboard"}={})=>{gt(Le),i&&r==="combobox"&&$e!==null&&Ye==="keyboard"&&wt(String($e));const it=Promise.resolve().then(()=>{st.current===it&&C?.($e);});st.current=it;},[i,r,C]),Ge=($e,Le,Ye)=>{const it=()=>{const ht=tt($e);return [V?{label:ht?.[se.label],value:$e}:$e,Y2(ht)]};if(Le&&y){const[ht,$t]=it();y(ht,$t);}else if(!Le&&S&&Ye!=="clear"){const[ht,$t]=it();S(ht,$t);}},ve=CO(($e,Le)=>{let Ye;const it=he?Le.selected:true;it?Ye=he?[...We,$e]:[$e]:Ye=We.filter(ht=>ht.value!==$e),ut(Ye),Ge($e,it),r==="combobox"?wt(""):(!eE||oe)&&(Se(""),wt(""));}),Ae=($e,Le)=>{ut($e);const{type:Ye,values:it}=Le;(Ye==="remove"||Ye==="clear")&&it.forEach(ht=>{Ge(ht.value,false,Ye);});},Ce=($e,Le)=>{if(Se($e),wt(null),Le.source==="submit"){const Ye=($e||"").trim();if(Ye){const it=Array.from(new Set([...Ke,Ye]));ut(it),Ge(Ye,true),Se("");}return}Le.source!=="blur"&&(r==="combobox"&&ut($e),ae?.($e));},pe=$e=>{let Le=$e;r!=="tags"&&(Le=$e.map(it=>Pe.get(it)?.value).filter(it=>it!==void 0));const Ye=Array.from(new Set([...Ke,...Le]));ut(Ye),Ye.forEach(it=>{Ge(it,true);});},Ie=f.useMemo(()=>({...He,flattenOptions:Pt,onActiveValue:Fe,defaultActiveFirstOption:ft,onSelect:ve,menuItemSelectedIcon:P,rawValues:Ke,fieldNames:se,virtual:N!==false&&w!==false,direction:O,listHeight:_,listItemHeight:L,childrenAsData:me,maxCount:F,optionRender:T,classNames:G,styles:Y}),[F,He,Pt,Fe,ft,ve,P,Ke,se,N,w,O,_,L,me,T,G,Y]);return f.createElement(uR.Provider,{value:Ie},f.createElement(wse,nE({},Q,{id:ce,prefixCls:o,ref:t,omitDomProps:Kse,mode:r,classNames:G,styles:Y,displayValues:nt,onDisplayValuesChange:Ae,maxCount:F,direction:O,showSearch:B,searchValue:be,onSearch:Ce,autoClearSearchValue:oe,onSearchSplit:pe,popupMatchSelectWidth:w,OptionList:Vse,emptyOptions:!Pt.length,activeValue:Dt,activeDescendantId:`${ce}_list_${Tt}`})))}),mR=Xse;mR.Option=fR;mR.OptGroup=dR;const Fl=(e,t,n)=>X({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),Pf=(e,t)=>t||e,Qse=()=>{const[,e]=Hr(),[t]=No("Empty"),r=new ln(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return f.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},f.createElement("title",null,t?.description||"Empty"),f.createElement("g",{fill:"none",fillRule:"evenodd"},f.createElement("g",{transform:"translate(24 31.7)"},f.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.8",cy:"106.9",rx:"67.8",ry:"12.7"}),f.createElement("path",{fill:"#aeb8c2",d:"M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"}),f.createElement("path",{fill:"#f5f5f7",d:"M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"}),f.createElement("path",{fill:"#dce0e6",d:"M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"})),f.createElement("path",{fill:"#dce0e6",d:"m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"}),f.createElement("g",{fill:"#fff",transform:"translate(149.7 15.4)"},f.createElement("circle",{cx:"20.7",cy:"3.2",r:"2.8"}),f.createElement("path",{d:"M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"}))))},Zse=()=>{const[,e]=Hr(),[t]=No("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:c,contentColor:u}=f.useMemo(()=>({borderColor:new ln(n).onBackground(i).toHexString(),shadowColor:new ln(r).onBackground(i).toHexString(),contentColor:new ln(o).onBackground(i).toHexString()}),[n,r,o,i]);return f.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},f.createElement("title",null,t?.description||"Empty"),f.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},f.createElement("ellipse",{fill:c,cx:"32",cy:"33",rx:"32",ry:"7"}),f.createElement("g",{fillRule:"nonzero",stroke:a},f.createElement("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),f.createElement("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:u}))))},Jse=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return {[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},ele=Ut("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=Ht(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return Jse(o)}),v7=f.createElement(Qse,null),b7=f.createElement(Zse,null),Fi=e=>{const{className:t,rootClassName:n,prefixCls:r,image:o,description:i,children:a,imageStyle:c,style:u,classNames:d,styles:m,...p}=e,{getPrefixCls:g,direction:b,className:y,style:S,classNames:C,styles:w,image:$}=Wt("empty"),M=g("empty",r),[T,R]=ele(M),[I,P]=Xt([C,d],[w,m],{props:e}),[N]=No("Empty"),O=typeof i<"u"?i:N?.description,_=typeof O=="string"?O:"empty",L=o??$??v7;let H=null;return typeof L=="string"?H=f.createElement("img",{draggable:false,alt:_,src:L}):H=L,f.createElement("div",{className:X(T,R,M,y,{[`${M}-normal`]:L===b7,[`${M}-rtl`]:b==="rtl"},t,n,I.root),style:{...P.root,...S,...u},...p},f.createElement("div",{className:X(`${M}-image`,I.image),style:{...c,...P.image}},H),O&&f.createElement("div",{className:X(`${M}-description`,I.description),style:P.description},O),a&&f.createElement("div",{className:X(`${M}-footer`,I.footer),style:P.footer},a))};Fi.PRESENTED_IMAGE_DEFAULT=v7;Fi.PRESENTED_IMAGE_SIMPLE=b7;const y7=e=>{const{componentName:t}=e,{getPrefixCls:n}=f.useContext(xt),r=n("empty");switch(t){case "Table":case "List":return W.createElement(Fi,{image:Fi.PRESENTED_IMAGE_SIMPLE});case "Select":case "TreeSelect":case "Cascader":case "Transfer":case "Mentions":return W.createElement(Fi,{image:Fi.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case "Table.filter":return null;default:return W.createElement(Fi,null)}},Jy=(e,t,n)=>{const{variant:r,[e]:o}=f.useContext(xt),i=f.useContext(Lie),a=o?.variant;let c;typeof t<"u"?c=t:n===false?c="borderless":c=i??a??r??"outlined";const u=iJ.includes(c);return [c,u]},tle=e=>{const n={overflow:{adjustX:true,adjustY:true,shiftY:true},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:true};return {bottomLeft:{...n,points:["tl","bl"],offset:[0,4]},bottomRight:{...n,points:["tr","br"],offset:[0,4]},topLeft:{...n,points:["bl","tl"],offset:[0,-4]},topRight:{...n,points:["br","tr"],offset:[0,-4]}}};function nle(e,t){return e||tle(t)}const xO=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return {position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},rle=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,c=`${n}-dropdown-placement-`,u=`${r}-option-selected`;return [{[`${n}-dropdown`]:{...cn(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` ${o}${c}bottomLeft, ${i}${c}bottomLeft `]:{animationName:XM},[` ${o}${c}topLeft, ${i}${c}topLeft, ${o}${c}topRight, ${i}${c}topRight `]:{animationName:ZM},[`${a}${c}bottomLeft`]:{animationName:QM},[` ${a}${c}topLeft, ${a}${c}topRight `]:{animationName:JM},"&-hidden":{display:"none"},[r]:{...xO(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...ja},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...xO(e),color:e.colorTextDisabled}},[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},zl(e,"slide-up"),zl(e,"slide-down"),N0(e,"move-up"),N0(e,"move-down")]},ole=e=>{const{componentCls:t}=e;return {[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},wO=4,ile=e=>{const{componentCls:t,calc:n,iconCls:r,paddingXS:o,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:a,lineWidth:c,colorIcon:u,colorIconHover:d,inputPaddingHorizontalBase:m,antCls:p}=e,[g,b]=dr(p,"select");return {"&-multiple":{[g("multi-item-background")]:e.multipleItemBg,[g("multi-item-border-color")]:"transparent",[g("multi-item-border-radius")]:e.borderRadiusSM,[g("multi-item-height")]:e.multipleItemHeight,[g("multi-padding-base")]:`calc((${b("height")} - ${b("multi-item-height")}) / 2)`,[g("multi-padding-vertical")]:`calc(${b("multi-padding-base")} - ${a} - ${c})`,[g("multi-item-padding-horizontal")]:`calc(${m} - ${b("multi-padding-vertical")} - ${c} * 2)`,paddingBlock:b("multi-padding-vertical"),paddingInlineStart:`calc(${b("multi-padding-base")} - ${c})`,[`${t}-prefix`]:{marginInlineStart:b("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:b("line-height"),insetInlineStart:b("multi-item-padding-horizontal"),width:`calc(100% - ${b("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:b("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${wO}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, ${t}-content-item-suffix:first-child`]:{marginInlineStart:b("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${b("multi-item-height")} - ${c} * 2)`,border:`${c} solid ${b("multi-item-border-color")}`,display:"flex",marginBlock:a,marginInlineEnd:n(a).mul(2).equal(),background:b("multi-item-background"),borderRadius:b("multi-item-border-radius"),paddingInlineStart:o,paddingInlineEnd:i,transition:["height","line-height","padding"].map(y=>`${y} ${e.motionDurationSlow}`).join(","),"&-content":{...ja,marginInlineEnd:i},"&-remove":{...bu(),display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}}},[`${t}-input`]:{lineHeight:n(a).mul(2).add(b("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:wO,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[g("multi-item-height")]:e.multipleItemHeightSM,[g("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[g("multi-item-height")]:e.multipleItemHeightLG,[g("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[g("multi-item-border-color")]:e.colorSplit,[g("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[g("multi-item-border-color")]:"transparent"}}}}},Hx=(e,t)=>{const{componentCls:n,antCls:r}=e,[o]=dr(r,"select"),{border:i,borderHover:a,borderActive:c,borderOutline:u}=t,d=t.background||e.selectorBg||e.colorBgContainer;return {[o("border-color")]:i,[o("background-color")]:d,[o("color")]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[o("border-color")]:a,[o("background-color")]:t.backgroundHover||d},[`&${n}-focused`]:{[o("border-color")]:c,[o("background-color")]:t.backgroundActive||d,boxShadow:`0 0 0 ${ie(e.controlOutlineWidth)} ${u}`}},[`&${n}-disabled`]:{[o("border-color")]:t.borderDisabled||t.border,[o("background-color")]:t.backgroundDisabled||t.background}}},rb=(e,t,n,r={},o={},i)=>{const{componentCls:a}=e;return {[`&${a}-${t}`]:[Hx(e,n),{[`&${a}-status-error`]:Hx(e,{...n,color:r.color||e.colorError,...r}),[`&${a}-status-warning`]:Hx(e,{...n,color:o.color||e.colorWarning,...o})},i]}},ale=e=>{const{componentCls:t,fontHeight:n,controlHeight:r,iconCls:o,antCls:i,calc:a}=e,[c,u]=dr(i,"select");return {[t]:[{[c("border-radius")]:e.borderRadius,[c("border-color")]:"#000",[c("border-size")]:e.lineWidth,[c("background-color")]:e.colorBgContainer,[c("font-size")]:e.fontSize,[c("line-height")]:e.lineHeight,[c("font-height")]:n,[c("color")]:e.colorText,[c("height")]:r,[c("padding-horizontal")]:a(e.paddingSM).sub(e.lineWidth).equal(),[c("padding-vertical")]:`calc((${u("height")} - ${u("font-height")}) / 2 - ${u("border-size")})`,...cn(e,true),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:u("border-radius"),borderWidth:u("border-size"),borderStyle:e.lineType,borderColor:u("border-color"),background:u("background-color"),fontSize:u("font-size"),lineHeight:u("line-height"),color:u("color"),paddingInline:u("padding-horizontal"),paddingBlock:u("padding-vertical"),[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...ja,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:a(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{...ja,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`&-open ${t}-content-value`]:{color:e.colorTextPlaceholder},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[o]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[c("height")]:e.controlHeightSM,[c("padding-horizontal")]:a(e.paddingXS).sub(e.lineWidth).equal(),[c("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:u("padding-horizontal")}},"&-lg":{[c("height")]:e.controlHeightLG,[c("font-size")]:e.fontSizeLG,[c("line-height")]:e.lineHeightLG,[c("font-height")]:e.fontHeightLG,[c("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",insetInline:0,insetBlock:`calc(${u("padding-vertical")} * -1)`,lineHeight:`calc(${u("font-height")} + ${u("padding-vertical")} * 2)`},[`${t}-content`]:{alignSelf:"center"}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},ile(e),rb(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),rb(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),rb(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),rb(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}),ole(e)]}},sle=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:c,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:m,fontWeightStrong:p,controlItemBgActive:g,controlItemBgHover:b,colorBgContainer:y,colorFillSecondary:S,colorBgContainerDisabled:C,colorTextDisabled:w,colorPrimaryHover:$,colorPrimary:M,controlOutline:T}=e,R=c*2,I=r*2,P=Math.min(o-R,o-I),N=Math.min(i-R,i-I),O=Math.min(a-R,a-I);return {INTERNAL_FIXED_ITEM_MARGIN:Math.floor(c/2),zIndexPopup:d+50,optionSelectedColor:m,optionSelectedFontWeight:p,optionSelectedBg:g,optionActiveBg:b,optionPadding:`${(o-t*n)/2}px ${u}px`,optionFontSize:t,optionLineHeight:n,optionHeight:o,selectorBg:y,clearBg:y,singleItemHeightLG:a,multipleItemBg:S,multipleItemBorderColor:"transparent",multipleItemHeight:P,multipleItemHeightSM:N,multipleItemHeightLG:O,multipleSelectorBgDisabled:C,multipleItemColorDisabled:w,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:$,activeBorderColor:M,activeOutlineColor:T,selectAffixPadding:c}},lle=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return {[n]:{...cn(e),[`${n}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...ja,[`> ${t}-typography`]:{display:"inline"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},cle=e=>{const{componentCls:t}=e;return [{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},lle(e),rle(e),{[`${t}-rtl`]:{direction:"rtl"}},Af(e,{focusElCls:`${t}-focused`})]},ule=Ut("Select",(e,{rootPrefixCls:t})=>{const n=Ht(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return [cle(n),ale(n)]},sle,{unitless:{optionLineHeight:true,optionSelectedFontWeight:true}});var dle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};function rE(){return rE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,rE({},e,{ref:t,icon:dle})),mle=f.forwardRef(fle);var hle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function oE(){return oE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,oE({},e,{ref:t,icon:hle})),hR=f.forwardRef(ple);var gle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function iE(){return iE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,iE({},e,{ref:t,icon:gle})),pR=f.forwardRef(vle);function ble({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:o,multiple:i,hasFeedback:a,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:m}){const p=t??f.createElement(kp,null),g=C=>e===null&&!a&&!d?null:f.createElement(f.Fragment,null,c!==false&&C,a&&u);let b=null;e!==void 0?b=g(e):o?b=g(f.createElement(Wy,{spin:true})):b=({open:C,showSearch:w})=>g(C&&w?f.createElement(pR,null):f.createElement(hR,null));let y=null;n!==void 0?y=n:i?y=f.createElement(mle,null):y=null;let S=null;return r!==void 0?S=r:S=f.createElement(Os,null),{clearIcon:p,suffixIcon:b,itemIcon:y,removeIcon:S}}function yle(e){return W.useMemo(()=>{if(e)return (...t)=>W.createElement(kl,{space:true},e.apply(void 0,t))},[e])}function Sle(e,t){return t!==void 0?t:e!==null}const S7="SECRET_COMBOBOX_MODE_DO_NOT_USE",Cle=(e,t)=>{const{prefixCls:n,bordered:r,className:o,rootClassName:i,getPopupContainer:a,popupClassName:c,dropdownClassName:u,listHeight:d=256,placement:m,listItemHeight:p,size:g,disabled:b,notFoundContent:y,status:S,builtinPlacements:C,dropdownMatchSelectWidth:w,popupMatchSelectWidth:$,direction:M,style:T,allowClear:R,variant:I,popupStyle:P,dropdownStyle:N,transitionName:O,tagRender:_,maxCount:L,prefix:H,dropdownRender:U,popupRender:q,onDropdownVisibleChange:V,onOpenChange:z,styles:F,classNames:G,...Y}=e,{getPopupContainer:Q,getPrefixCls:D,renderEmpty:B,direction:K,virtual:J,popupMatchSelectWidth:ee,popupOverflow:te}=f.useContext(xt),{showSearch:ne,style:ae,styles:oe,className:re,classNames:ce}=Wt("select"),[,he]=Hr(),me=p??he?.controlHeight,Re=D("select",n),se=D(),de=M??K,{compactSize:Se,compactItemClassnames:be}=Ds(Re,de),[He,Ue]=Jy("select",I,r),Pe=Kn(Re),[ue,ye]=ule(Re,Pe),Te=f.useMemo(()=>{const{mode:Le}=e;if(Le!=="combobox")return Le===S7?"combobox":Le},[e.mode]),qe=Te==="multiple"||Te==="tags",Ze=Sle(e.suffixIcon,e.showArrow),We=$??w??ee,tt=yle(q||U),nt=z||V,{status:Ke,hasFeedback:Oe,isFormItemInput:Qe,feedbackIcon:Xe}=f.useContext(go),_e=Pf(Ke,S);let ze;y!==void 0?ze=y:Te==="combobox"?ze=null:ze=B?.("Select")||f.createElement(y7,{componentName:"Select"});const{suffixIcon:ct,itemIcon:Pt,removeIcon:ut,clearIcon:Dt}=ble({...Y,multiple:qe,hasFeedback:Oe,feedbackIcon:Xe,showSuffixIcon:Ze,componentName:"Select"}),wt=R===true?{clearIcon:Dt}:R,Tt=Ln(Y,["suffixIcon","itemIcon"]),gt=io(Le=>g??Se??Le),ft=f.useContext(eo),st=b??ft,Fe={...e,variant:He,status:_e,disabled:st,size:gt},[Ge,ve]=Xt([ce,G],[oe,F],{props:Fe},{popup:{_default:"root"}}),Ae=X(Ge.popup?.root,c,u,{[`${Re}-dropdown-${de}`]:de==="rtl"},i,ye,Pe,ue),Ce={...ve.popup?.root,...P??N},pe=X({[`${Re}-lg`]:gt==="large",[`${Re}-sm`]:gt==="small",[`${Re}-rtl`]:de==="rtl",[`${Re}-${He}`]:Ue,[`${Re}-in-form-item`]:Qe},Fl(Re,_e,Oe),be,re,o,Ge.root,i,ye,Pe,ue),Ie=f.useMemo(()=>m!==void 0?m:de==="rtl"?"bottomRight":"bottomLeft",[m,de]),[$e]=Su("SelectLike",ve.popup?.root?.zIndex??Ce?.zIndex);return f.createElement(mR,{ref:t,virtual:J,classNames:Ge,styles:ve,showSearch:ne,...Tt,style:{...ve.root,...ae,...T},popupMatchSelectWidth:We,transitionName:Bl(se,"slide-up",O),builtinPlacements:nle(C,te),listHeight:d,listItemHeight:me,mode:Te,prefixCls:Re,placement:Ie,direction:de,prefix:H,suffixIcon:ct,menuItemSelectedIcon:Pt,removeIcon:ut,allowClear:wt,notFoundContent:ze,className:pe,getPopupContainer:a||Q,popupClassName:Ae,disabled:st,popupStyle:{...ve.popup?.root,...Ce,zIndex:$e},maxCount:qe?L:void 0,tagRender:qe?_:void 0,popupRender:tt,onPopupVisibleChange:nt})},Jl=f.forwardRef(Cle),xle=lR(Jl,"popupAlign");Jl.SECRET_COMBOBOX_MODE_DO_NOT_USE=S7;Jl.Option=fR;Jl.OptGroup=dR;Jl._InternalPanelDoNotUseOrYouWillBeFired=xle;const C7=["xxl","xl","lg","md","sm","xs"],wle=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),$le=e=>{const t=e,n=[].concat(C7).reverse();return n.forEach((r,o)=>{const i=r.toUpperCase(),a=`screen${i}Min`,c=`screen${i}`;if(!(t[a]<=t[c]))throw new Error(`${a}<=${c} fails : !(${t[a]}<=${t[c]})`);if(o{const[,e]=Hr(),t=wle($le(e));return W.useMemo(()=>{const n=new Map;let r=-1,o={};return {responsiveMap:t,matchHandlers:{},dispatch(i){return o=i,n.forEach(a=>a(o)),n.size>=1},subscribe(i){return n.size||this.register(),r+=1,n.set(r,i),i(o),r},unsubscribe(i){n.delete(i),n.size||this.unregister();},register(){Object.entries(t).forEach(([i,a])=>{const c=({matches:d})=>{this.dispatch({...o,[i]:d});},u=window.matchMedia(a);typeof u?.addEventListener=="function"&&u.addEventListener("change",c),this.matchHandlers[a]={mql:u,listener:c},c(u);});},unregister(){Object.values(t).forEach(i=>{const a=this.matchHandlers[i];typeof a?.mql?.removeEventListener=="function"&&a.mql.removeEventListener("change",a?.listener);}),n.clear();}}},[t])};function x7(e=true,t={}){const n=f.useRef(t),[,r]=Nz(),o=Ele();return Mn(()=>{const i=o.subscribe(a=>{n.current=a,e&&r();});return ()=>o.unsubscribe(i)},[]),n.current}const aE=f.createContext({}),Mle=e=>{const{antCls:t,componentCls:n,iconCls:r,avatarBg:o,avatarColor:i,containerSize:a,containerSizeLG:c,containerSizeSM:u,textFontSize:d,textFontSizeLG:m,textFontSizeSM:p,iconFontSize:g,iconFontSizeLG:b,iconFontSizeSM:y,borderRadius:S,borderRadiusLG:C,borderRadiusSM:w,lineWidth:$,lineType:M}=e,T=(R,I,P,N)=>({width:R,height:R,borderRadius:"50%",fontSize:I,[`&${n}-square`]:{borderRadius:N},[`&${n}-icon`]:{fontSize:P,[`> ${r}`]:{margin:0}}});return {[n]:{...cn(e),position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:`${ie($)} ${M} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"},...T(a,d,g,S),"&-lg":{...T(c,m,b,C)},"&-sm":{...T(u,p,y,w)},"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}}}},Rle=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:o}=e;return {[`${t}-group`]:{display:"inline-flex",[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:o}}}},Tle=e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:o,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:c,marginXS:u,marginXXS:d,colorBorderBg:m}=e;return {containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:o,textFontSizeLG:o,textFontSizeSM:o,iconFontSize:Math.round((i+a)/2),iconFontSizeLG:c,iconFontSizeSM:o,groupSpace:d,groupOverlapping:-u,groupBorderColor:m}},w7=Ut("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=Ht(e,{avatarBg:n,avatarColor:t});return [Mle(r),Rle(r)]},Tle),$7=f.forwardRef((e,t)=>{const{prefixCls:n,shape:r,size:o,src:i,srcSet:a,icon:c,className:u,rootClassName:d,style:m,alt:p,draggable:g,children:b,crossOrigin:y,gap:S=4,onError:C,...w}=e,[$,M]=f.useState(1),[T,R]=f.useState(false),[I,P]=f.useState(true),N=f.useRef(null),O=f.useRef(null),_=Ar(t,N),{getPrefixCls:L,className:H,style:U}=Wt("avatar"),q=f.useContext(aE),V=()=>{if(!O.current||!N.current)return;const ce=O.current.offsetWidth,he=N.current.offsetWidth;ce!==0&&he!==0&&S*2{R(true);},[]),f.useEffect(()=>{P(true),M(1);},[i]),f.useEffect(V,[S]);const z=()=>{C?.()!==false&&P(false);},F=io(ce=>o??q?.size??ce??"default"),G=Object.keys(typeof F=="object"?F||{}:{}).some(ce=>["xs","sm","md","lg","xl","xxl"].includes(ce)),Y=x7(G),Q=f.useMemo(()=>{if(typeof F!="object")return {};const ce=C7.find(me=>Y[me]),he=F[ce];return he?{width:he,height:he,fontSize:he&&(c||b)?he/2:18}:{}},[Y,F,c,b]),D=L("avatar",n),B=Kn(D),[K,J]=w7(D,B),ee=X({[`${D}-lg`]:F==="large",[`${D}-sm`]:F==="small"}),te=f.isValidElement(i),ne=r||q?.shape||"circle",ae=X(D,ee,H,`${D}-${ne}`,{[`${D}-image`]:te||i&&I,[`${D}-icon`]:!!c},J,B,u,d,K),oe=typeof F=="number"?{width:F,height:F,fontSize:c?F/2:18}:{};let re;if(typeof i=="string"&&I)re=f.createElement("img",{src:i,draggable:g,srcSet:a,onError:z,alt:p,crossOrigin:y});else if(te)re=i;else if(c)re=c;else if(T||$!==1){const ce=`scale(${$})`,he={msTransform:ce,WebkitTransform:ce,transform:ce};re=f.createElement(da,{onResize:V},f.createElement("span",{className:`${D}-string`,ref:O,style:he},b));}else re=f.createElement("span",{className:`${D}-string`,style:{opacity:0},ref:O},b);return f.createElement("span",{...w,style:{...oe,...Q,...U,...m},className:ae,ref:_},re)}),sf=e=>e?typeof e=="function"?e():e:null,gR=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:c}=e;return f.createElement("div",{id:r,className:X(`${n}-container`,o?.container,a),style:{...i?.container,...c},role:"tooltip"},typeof t=="function"?t():t)},yd={shiftX:64,adjustY:1},Sd={adjustX:1,shiftY:true},Oi=[0,0],Ale={left:{points:["cr","cl"],overflow:Sd,offset:[-4,0],targetOffset:Oi},right:{points:["cl","cr"],overflow:Sd,offset:[4,0],targetOffset:Oi},top:{points:["bc","tc"],overflow:yd,offset:[0,-4],targetOffset:Oi},bottom:{points:["tc","bc"],overflow:yd,offset:[0,4],targetOffset:Oi},topLeft:{points:["bl","tl"],overflow:yd,offset:[0,-4],targetOffset:Oi},leftTop:{points:["tr","tl"],overflow:Sd,offset:[-4,0],targetOffset:Oi},topRight:{points:["br","tr"],overflow:yd,offset:[0,-4],targetOffset:Oi},rightTop:{points:["tl","tr"],overflow:Sd,offset:[4,0],targetOffset:Oi},bottomRight:{points:["tr","br"],overflow:yd,offset:[0,4],targetOffset:Oi},rightBottom:{points:["bl","br"],overflow:Sd,offset:[4,0],targetOffset:Oi},bottomLeft:{points:["tl","bl"],overflow:yd,offset:[0,4],targetOffset:Oi},leftBottom:{points:["br","bl"],overflow:Sd,offset:[-4,0],targetOffset:Oi}};function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{trigger:n=["hover"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:c,afterVisibleChange:u,motion:d,placement:m="right",align:p={},destroyOnHidden:g=false,defaultVisible:b,getTooltipContainer:y,arrowContent:S,overlay:C,id:w,showArrow:$=true,classNames:M,styles:T,...R}=e,I=Zl(w),P=f.useRef(null);f.useImperativeHandle(t,()=>P.current);const N={...R};"visible"in e&&(N.popupVisible=e.visible);const O=f.useMemo(()=>{if(!$)return false;const L=$===true?{}:$;return {...L,className:X(L.className,M?.arrow),style:{...L.style,...T?.arrow},content:L.content??S}},[$,M?.arrow,T?.arrow,S]),_=({open:L})=>{const H=f.Children.only(a),U={"aria-describedby":C&&L?I:void 0};return f.cloneElement(H,U)};return f.createElement(Gy,sE({popupClassName:M?.root,prefixCls:i,popup:f.createElement(gR,{key:"content",prefixCls:i,id:I,classNames:M,styles:T},C),action:n,builtinPlacements:Ale,popupPlacement:m,ref:P,popupAlign:p,getPopupContainer:y,onOpenChange:c,afterOpenChange:u,popupMotion:d,defaultPopupVisible:b,autoDestroy:g,mouseLeaveDelay:o,popupStyle:T?.root,mouseEnterDelay:r,arrow:O,uniqueContainerClassName:M?.uniqueContainer,uniqueContainerStyle:T?.uniqueContainer},N),_)});function vR(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,c=r*1/Math.sqrt(2),u=o-r*(1-1/Math.sqrt(2)),d=o-n*(1/Math.sqrt(2)),m=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),p=2*o-d,g=m,b=2*o-c,y=u,S=2*o-i,C=a,w=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),M=`polygon(${$}px 100%, 50% ${$}px, ${2*o-$}px 100%, ${$}px 100%)`,T=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${c} ${u} L ${d} ${m} A ${n} ${n} 0 0 1 ${p} ${g} L ${b} ${y} A ${r} ${r} 0 0 0 ${S} ${C} Z')`;return {arrowShadowWidth:w,arrowPath:T,arrowPolygon:M}}const Ple=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:c,calc:u}=e;return {pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:u(r).div(2).equal(),background:t,clipPath:{_multi_value_:true,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:true,value:`0 0 ${ie(c)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},E7=8;function e1(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return {arrowOffsetHorizontal:r,arrowOffsetVertical:n?E7:r}}function ob(e,t){return e?t:{}}const bR=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a,antCls:c}=e,[u]=dr(c,"tooltip"),{arrowDistance:d=0,arrowPlacement:m={left:true,right:true,top:true,bottom:true}}=n||{};return {[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...Ple(e,t,o),"&:before":{background:t}}],...ob(!!m.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:d,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:true,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[u("arrow-offset-horizontal")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:true,value:a}}},"&-placement-topRight":{[u("arrow-offset-horizontal")]:`calc(100% - ${ie(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:true,value:a}}}}),...ob(!!m.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:d,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:true,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[u("arrow-offset-horizontal")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:true,value:a}}},"&-placement-bottomRight":{[u("arrow-offset-horizontal")]:`calc(100% - ${ie(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:true,value:a}}}}),...ob(!!m.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:true,value:d},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:true,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}}),...ob(!!m.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:true,value:d},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:true,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}})}}};function Ile(e,t,n,r){if(r===false)return {adjustX:false,adjustY:false};const o=r&&typeof r=="object"?r:{},i={};switch(e){case "top":case "bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=true,i.adjustY=true;break;case "left":case "right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=true,i.adjustX=true;break}const a={...i,...o};return a.shiftX||(a.adjustX=true),a.shiftY||(a.adjustY=true),a}const $O={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Ole={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Dle=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function M7(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,c=t/2,u={},d=e1({contentRadius:i,limitVerticalRadius:true});return Object.keys($O).forEach(m=>{const g={...r&&Ole[m]||$O[m],offset:[0,0],dynamicInset:true};switch(u[m]=g,Dle.has(m)&&(g.autoArrow=false),m){case "top":case "topLeft":case "topRight":g.offset[1]=-c-o;break;case "bottom":case "bottomLeft":case "bottomRight":g.offset[1]=c+o;break;case "left":case "leftTop":case "leftBottom":g.offset[0]=-c-o;break;case "right":case "rightTop":case "rightBottom":g.offset[0]=c+o;break}if(r)switch(m){case "topLeft":case "bottomLeft":g.offset[0]=-d.arrowOffsetHorizontal-c;break;case "topRight":case "bottomRight":g.offset[0]=d.arrowOffsetHorizontal+c;break;case "leftTop":case "rightTop":g.offset[1]=-d.arrowOffsetHorizontal*2+c;break;case "leftBottom":case "rightBottom":g.offset[1]=d.arrowOffsetHorizontal*2-c;break}g.overflow=Ile(m,d,t,n),a&&(g.htmlRegion="visibleFirst");}),u}const yR=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return W.useMemo(()=>{const r=n(e),o=n(t);return {...o,...r,show:r.show??o.show??true}},[e,t])},EO="50%",_le=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:c,controlHeight:u,boxShadowSecondary:d,paddingSM:m,paddingXS:p,arrowOffsetHorizontal:g,sizePopupArrow:b,antCls:y}=e,[S,C]=dr(y,"tooltip"),w=t(a).add(b).add(g).equal(),M={minWidth:t(a).mul(2).add(b).equal(),minHeight:u,padding:`${ie(e.calc(m).div(2).equal())} ${ie(p)}`,color:C("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:d,boxSizing:"border-box"},T={[S("valid-offset-x")]:C("arrow-offset-horizontal","var(--arrow-x)"),transformOrigin:[C("valid-offset-x",EO),`var(--arrow-y, ${EO})`].join(" ")};return [{[n]:{...cn(e),position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:r,visibility:"visible",...T,"&-hidden":{display:"none"},[S("arrow-background-color")]:i,[`${n}-container`]:[M,YM(e,true)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:w},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,E7)}},[`${n}-content`]:{position:"relative"},...Vy(e,(R,{darkColor:I})=>({[`&${n}-${R}`]:{[`${n}-container`]:{backgroundColor:I},[`${n}-arrow`]:{[S("arrow-background-color")]:I}}})),"&-rtl":{direction:"rtl"}}},bR(e,C("arrow-background-color")),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...M,...T,position:"absolute",zIndex:t(c).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Lle=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...e1({contentRadius:e.borderRadius,limitVerticalRadius:true}),...vR(Ht(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),R7=(e,t,n=true)=>Ut("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:c,maxWidth:u}=o,d=Ht(o,{tooltipMaxWidth:u,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:c});return [_le(d),jp(o,"zoom-big-fast")]},Lle,{resetStyle:false,injectStyle:n})(e,t),Ble=_l.map(e=>`${e}-inverse`),zle=["success","processing","error","default","warning"];function t1(e,t=true){return t?[].concat(Yt(Ble),Yt(_l)).includes(e):_l.includes(e)}function kle(e){return zle.includes(e)}const T7=(e,t,n)=>{const r=t1(n),[o]=dr(e,"tooltip"),i=X({[`${t}-${n}`]:n&&r}),a={},c={},u=to(n).toRgb(),m=(.299*u.r+.587*u.g+.114*u.b)/255<.5?"#FFF":"#000";return n&&!r&&(a.background=n,a[o("overlay-color")]=m,c[o("arrow-background-color")]=n),{className:i,overlayStyle:a,arrowStyle:c}},Fle=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:c,styles:u}=e,{getPrefixCls:d}=f.useContext(xt),m=d("tooltip",t),p=d(),g=Kn(m),[b,y]=R7(m,g),S=T7(p,m,i),C=S.arrowStyle,w=f.useMemo(()=>({container:{...a,...S.overlayStyle}}),[a,S.overlayStyle]),$={...e,placement:r},[M,T]=Xt([c],[w,u],{props:$}),R=X(g,b,y,m,`${m}-pure`,`${m}-placement-${r}`,n,S.className);return f.createElement("div",{className:R,style:C},f.createElement("div",{className:`${m}-arrow`}),f.createElement(gR,{...e,className:b,prefixCls:m,classNames:M,styles:T},o))},Hle=f.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:c,arrow:u,destroyTooltipOnHide:d,destroyOnHidden:m,title:p,overlay:g,trigger:b,builtinPlacements:y,autoAdjustOverflow:S=true,motion:C,getPopupContainer:w,placement:$="top",mouseEnterDelay:M=.1,mouseLeaveDelay:T=.1,rootClassName:R,styles:I,classNames:P,onOpenChange:N,overlayInnerStyle:O,overlayStyle:_,overlayClassName:L,...H}=e,[,U]=Hr(),{getPopupContainer:q,getPrefixCls:V,direction:z,className:F,style:G,classNames:Y,styles:Q,arrow:D,trigger:B}=Wt("tooltip"),K=yR(u,D),J=K.show,ee=b||B||"hover",te=f.useRef(null),ne=()=>{te.current?.forceAlign();};f.useImperativeHandle(t,()=>({forceAlign:ne,nativeElement:te.current?.nativeElement,popupElement:te.current?.popupElement}));const[ae,oe]=dn(e.defaultOpen??false,e.open),re=!p&&!g&&p!==0,ce=ct=>{oe(re?false:ct),!re&&N&&N(ct);},he=f.useMemo(()=>y||M7({arrowPointAtCenter:K?.pointAtCenter??false,autoAdjustOverflow:S,arrowWidth:J?U.sizePopupArrow:0,borderRadius:U.borderRadius,offset:U.marginXXS,visibleFirst:true}),[K,y,U,J,S]),me=f.useMemo(()=>p===0?p:g||p||"",[g,p]),Re=f.createElement(kl,{space:true,form:true},typeof me=="function"?me():me),se={...e,trigger:ee,color:i,placement:$,builtinPlacements:y,openClassName:r,arrow:u,autoAdjustOverflow:S,getPopupContainer:w,children:a,destroyTooltipOnHide:d,destroyOnHidden:m},[de,Se]=Xt([Y,P],[Q,I],{props:se}),be=V("tooltip",n),He=V(),Ue=e["data-popover-inject"];let Pe=ae;!("open"in e)&&re&&(Pe=false);const ue=f.isValidElement(a)&&!Uz(a)?a:f.createElement("span",null,a),ye=ue.props,Te=!ye.className||typeof ye.className=="string"?X(ye.className,r||`${be}-open`):ye.className,qe=Kn(be),[Ze,We]=R7(be,qe,!Ue),tt=T7(He,be,i),nt=tt.arrowStyle,Ke=X(qe,Ze,We),Oe=X(L,{[`${be}-rtl`]:z==="rtl"},tt.className,R,Ke,F,de.root),[Qe,Xe]=Su("Tooltip",H.zIndex),_e={...Se.container,...O,...tt.overlayStyle},ze=f.createElement(Nle,{unique:true,...H,trigger:ee,zIndex:Qe,showArrow:J,placement:$,mouseEnterDelay:M,mouseLeaveDelay:T,prefixCls:be,classNames:{root:Oe,container:de.container,arrow:de.arrow,uniqueContainer:X(Ke,de.container)},styles:{root:{...nt,...Se.root,...G,..._},container:_e,uniqueContainer:_e,arrow:Se.arrow},getTooltipContainer:w||o||q,ref:te,builtinPlacements:he,overlay:Re,visible:Pe,onVisibleChange:ce,afterVisibleChange:c,arrowContent:f.createElement("span",{className:`${be}-arrow-content`}),motion:{motionName:Bl(He,"zoom-big-fast",typeof C?.motionName=="string"?C?.motionName:void 0),motionDeadline:1e3},destroyOnHidden:m??!!d},Pe?kr(ue,{className:Te}):ue);return f.createElement(Uy.Provider,{value:Xe},ze)}),ec=Hle;ec._InternalPanelDoNotUseOrYouWillBeFired=Fle;ec.UniqueProvider=Gz;const MO="50%",Vle=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:m,colorBgElevated:p,popoverBg:g,titleBorderBottom:b,innerContentPadding:y,titlePadding:S,antCls:C}=e,[w,$]=dr(C,"tooltip");return [{[t]:{...cn(e),position:"absolute",top:0,left:{_skip_check_:true,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",[w("valid-offset-x")]:$("arrow-offset-horizontal","var(--arrow-x)"),transformOrigin:[$("valid-offset-x",MO),`var(--arrow-y, ${MO})`].join(" "),[w("arrow-background-color")]:p,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:u,boxShadow:a,padding:i},[`${t}-title`]:{minWidth:r,marginBottom:m,color:c,fontWeight:o,borderBottom:b,padding:S},[`${t}-content`]:{color:n,padding:y}}},bR(e,$("arrow-background-color")),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},jle=e=>{const{componentCls:t,antCls:n}=e,[r]=dr(n,"tooltip");return {[t]:_l.map(o=>{const i=e[`${o}6`];return {[`&${t}-${o}`]:{[r("arrow-background-color")]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:"transparent"}}}})}},Ule=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:c,marginXS:u,lineType:d,colorSplit:m,paddingSM:p}=e,g=n-r,b=g/2,y=g/2-t,S=o;return {titleMinWidth:177,zIndexPopup:a+30,...vR(e),...e1({contentRadius:c,limitVerticalRadius:true}),innerPadding:i?0:12,titleMarginBottom:i?0:u,titlePadding:i?`${b}px ${S}px ${y}px`:0,titleBorderBottom:i?`${t}px ${d} ${m}`:"none",innerContentPadding:i?`${p}px ${S}px`:0}},A7=Ut("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=Ht(e,{popoverBg:t,popoverColor:n});return [Vle(r),jle(r),jp(r,"zoom-big")]},Ule,{resetStyle:false,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),N7=e=>{const{title:t,content:n,prefixCls:r,classNames:o,styles:i}=e;return !t&&!n?null:f.createElement(f.Fragment,null,t&&f.createElement("div",{className:X(`${r}-title`,o?.title),style:i?.title},t),n&&f.createElement("div",{className:X(`${r}-content`,o?.content),style:i?.content},n))},qle=e=>{const{hashId:t,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:c,children:u,classNames:d,styles:m}=e,p=sf(a),g=sf(c),b={...e,placement:i},[y,S]=Xt([d],[m],{props:b}),C=X(t,n,`${n}-pure`,`${n}-placement-${i}`,r);return f.createElement("div",{className:C,style:o},f.createElement("div",{className:`${n}-arrow`}),f.createElement(gR,{...e,className:t,prefixCls:n,classNames:y,styles:S},u||f.createElement(N7,{prefixCls:n,title:p,content:g,classNames:y,styles:S})))},P7=e=>{const{prefixCls:t,className:n,...r}=e,{getPrefixCls:o}=f.useContext(xt),i=o("popover",t),[a,c]=A7(i);return f.createElement(qle,{...r,prefixCls:i,hashId:a,className:X(n,c)})},Gle=f.forwardRef((e,t)=>{const{prefixCls:n,title:r,content:o,overlayClassName:i,placement:a="top",trigger:c,children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:m=.1,onOpenChange:p,overlayStyle:g={},styles:b,classNames:y,motion:S,arrow:C,...w}=e,{getPrefixCls:$,className:M,style:T,classNames:R,styles:I,arrow:P,trigger:N}=Wt("popover"),O=$("popover",n),[_,L]=A7(O),H=$(),U=yR(C,P),q=c||N||"hover",V={...e,placement:a,trigger:q,mouseEnterDelay:d,mouseLeaveDelay:m,overlayStyle:g,styles:b,classNames:y},[z,F]=Xt([R,y],[I,b],{props:V}),G=X(i,_,L,M,z.root),[Y,Q]=dn(e.defaultOpen??false,e.open),D=J=>{Q(J),p?.(J);},B=sf(r),K=sf(o);return f.createElement(ec,{unique:false,arrow:U,placement:a,trigger:q,mouseEnterDelay:d,mouseLeaveDelay:m,...w,prefixCls:O,classNames:{root:G,container:z.container,arrow:z.arrow},styles:{root:{...F.root,...T,...g},container:F.container,arrow:F.arrow},ref:t,open:Y,onOpenChange:D,overlay:B||K?f.createElement(N7,{prefixCls:O,title:B,content:K,classNames:z,styles:F}):null,motion:{motionName:Bl(H,"zoom-big",typeof S?.motionName=="string"?S?.motionName:void 0)},"data-popover-inject":true},u)}),Gi=Gle;Gi._InternalPanelDoNotUseOrYouWillBeFired=P7;const RO=e=>{const{size:t,shape:n}=f.useContext(aE),r=f.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return f.createElement(aE.Provider,{value:r},e.children)},Wle=e=>{const{getPrefixCls:t,direction:n}=f.useContext(xt),{prefixCls:r,className:o,rootClassName:i,style:a,maxCount:c,maxStyle:u,size:d,shape:m,maxPopoverPlacement:p,maxPopoverTrigger:g,children:b,max:y}=e,S=t("avatar",r),C=`${S}-group`,w=Kn(S),[$,M]=w7(S,w),T=X(C,{[`${C}-rtl`]:n==="rtl"},M,w,o,i,$),R=Ko(b).map((N,O)=>kr(N,{key:`avatar-key-${O}`})),I=y?.count||c,P=R.length;if(I&&If.createElement(Wn,lE({},e,{ref:t,icon:Kle})),Xle=f.forwardRef(Yle),TO=e=>{const{prefixCls:t,value:n,current:r,offset:o=0}=e;let i;return o&&(i={position:"absolute",top:`${o}00%`,left:0}),f.createElement("span",{style:i,className:X(`${t}-only-unit`,{current:r})},n)};function Qle(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}const Zle=e=>{const{prefixCls:t,count:n,value:r}=e,o=Number(r),i=Math.abs(n),[a,c]=f.useState(o),[u,d]=f.useState(i),m=()=>{c(o),d(i);};f.useEffect(()=>{const b=setTimeout(m,1e3);return ()=>clearTimeout(b)},[o]);let p,g;if(a===o||Number.isNaN(o)||Number.isNaN(a))p=[f.createElement(TO,{...e,key:o,current:true})],g={transition:"none"};else {p=[];const b=o+10,y=[];for(let $=o;$<=b;$+=1)y.push($);const S=u$%10===a);p=(S<0?y.slice(0,C+1):y.slice(C)).map(($,M)=>{const T=$%10;return f.createElement(TO,{...e,key:$,value:T,offset:S<0?M-C:M,current:M===C})}),g={transform:`translateY(${-Qle(a,o,S)}00%)`};}return f.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:m},p)},Jle=f.forwardRef((e,t)=>{const{prefixCls:n,count:r,className:o,motionClassName:i,style:a,title:c,show:u,component:d="sup",children:m,...p}=e,{getPrefixCls:g}=f.useContext(xt),b=g("scroll-number",n),y={...p,"data-show":u,style:a,className:X(b,o,i),title:c};let S=r;if(r&&Number(r)%1===0){const C=String(r).split("");S=f.createElement("bdi",null,C.map((w,$)=>f.createElement(Zle,{prefixCls:b,count:Number(r),value:w,key:C.length-$})));}return a?.borderColor&&(y.style={...a,boxShadow:`0 0 0 1px ${a.borderColor} inset`}),m?kr(m,C=>({className:X(`${b}-custom-component`,C?.className,i)})):f.createElement(d,{...y,ref:t},S)}),ece=new Bt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),tce=new Bt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),nce=new Bt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),rce=new Bt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),oce=new Bt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),ice=new Bt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),ace=e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,textFontSize:i,textFontSizeSM:a,statusSize:c,dotSize:u,textFontWeight:d,indicatorHeight:m,indicatorHeightSM:p,marginXS:g,calc:b}=e,y=`${r}-scroll-number`,S=Vy(e,(C,{darkColor:w})=>({[`&${t} ${t}-color-${C}`]:{background:w,[`&:not(${t}-count)`]:{color:w},"a:hover &":{background:w}}}));return {[t]:{...cn(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:m,height:m,color:e.badgeTextColor,fontWeight:d,fontSize:i,lineHeight:ie(m),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:b(m).div(2).equal(),boxShadow:`0 0 0 ${ie(o)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:p,height:p,fontSize:a,lineHeight:ie(p),borderRadius:b(p).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${ie(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${ie(o)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${y}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:ice,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:ece,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:g,color:e.colorText,fontSize:e.fontSize}},...S,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:tce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:nce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:rce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:oce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${y}-custom-component, ${t}-count`]:{transform:"none"},[`${y}-custom-component, ${y}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[y]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${y}-only`]:{position:"relative",display:"inline-block",height:m,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${y}-only-unit`]:{height:m,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${y}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${y}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},I7=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e,i=t,a=n,c=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return Ht(e,{badgeFontHeight:i,badgeShadowSize:a,badgeTextColor:c,badgeColor:u,badgeColorHover:d,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},O7=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return {indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},sce=Ut("Badge",e=>{const t=I7(e);return ace(t)},O7),lce=f.forwardRef((e,t)=>{const{prefixCls:n,scrollNumberPrefixCls:r,children:o,status:i,text:a,color:c,count:u=null,overflowCount:d=99,dot:m=false,size:p="default",title:g,offset:b,style:y,className:S,rootClassName:C,classNames:w,styles:$,showZero:M=false,...T}=e,{getPrefixCls:R,direction:I,className:P,style:N,classNames:O,styles:_}=Wt("badge"),L=R("badge",n),[H,U]=sce(L),q={...e,overflowCount:d,size:p,dot:m,showZero:M},[V,z]=Xt([O,w],[_,$],{props:q}),F=u>d?`${d}+`:u,G=F==="0"||F===0||a==="0"||a===0,Y=u===null||G&&!M,Q=(Qr(i)||Qr(c))&&Y,D=Qr(i)||!G,B=m&&!G,K=B?"":F,J=f.useMemo(()=>((!Qr(K)||K==="")&&(!Qr(a)||a==="")||G&&!M)&&!B,[K,G,M,B,a]),ee=f.useRef(u);J||(ee.current=u);const te=ee.current,ne=f.useRef(K);J||(ne.current=K);const ae=ne.current,oe=f.useRef(B);J||(oe.current=B);const re=f.useMemo(()=>{if(!b)return {...N,...y};const He=Number.parseInt(b[0],10);return {...{marginTop:b[1],insetInlineEnd:-He},...N,...y}},[b,y,N]),ce=g??(typeof te=="string"||typeof te=="number"?te:void 0),he=!J&&(a===0?M:!!a&&a!==true),me=he?f.createElement("span",{className:`${L}-status-text`},a):null,Re=!te||typeof te!="object"?void 0:kr(te,He=>({style:{...re,...He.style}})),se=t1(c,false),de=X(V.indicator,{[`${L}-status-dot`]:Q,[`${L}-status-${i}`]:!!i,[`${L}-color-${c}`]:se}),Se={};c&&!se&&(Se.color=c,Se.background=c);const be=X(L,{[`${L}-status`]:Q,[`${L}-not-a-wrapper`]:!o,[`${L}-rtl`]:I==="rtl"},S,C,P,V.root,H,U);if(!o&&Q&&(a||D||!Y)){const He=re.color;return f.createElement("span",{ref:t,...T,className:be,style:{...z.root,...re}},f.createElement("span",{className:de,style:{...z.indicator,...Se}}),he&&f.createElement("span",{style:{color:He},className:`${L}-status-text`},a))}return f.createElement("span",{ref:t,...T,className:be,style:z.root},o,f.createElement(vo,{visible:!J,motionName:`${L}-zoom`,motionAppear:false,motionDeadline:1e3},({className:He})=>{const Ue=R("scroll-number",r),Pe=oe.current,ue=X(V.indicator,{[`${L}-dot`]:Pe,[`${L}-count`]:!Pe,[`${L}-count-sm`]:p==="small",[`${L}-multiple-words`]:!Pe&&ae&&ae.toString().length>1,[`${L}-status-${i}`]:!!i,[`${L}-color-${c}`]:se});let ye={...z.indicator,...re};return c&&!se&&(ye=ye||{},ye.background=c),f.createElement(Jle,{prefixCls:Ue,show:!J,motionClassName:He,className:ue,count:ae,title:ce,style:ye,key:"scrollNumber"},Re)}),me)}),cce=e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:i}=e,a=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,u=Vy(e,(d,{darkColor:m})=>({[`&${a}-color-${d}`]:{background:m,color:m}}));return {[c]:{position:"relative"},[a]:{...cn(e),position:"absolute",top:r,padding:`0 ${ie(e.paddingXS)}`,color:e.colorPrimary,lineHeight:ie(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${a}-content`]:{color:e.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${ie(i(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...u,[`&${a}-placement-end`]:{insetInlineEnd:i(o).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:i(o).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},uce=Ut(["Badge","Ribbon"],e=>{const t=I7(e);return cce(t)},O7),dce=e=>{const{className:t,prefixCls:n,style:r,color:o,children:i,text:a,placement:c="end",rootClassName:u,styles:d,classNames:m}=e,{getPrefixCls:p,direction:g,className:b,style:y,classNames:S,styles:C}=Wt("ribbon"),w=p("ribbon",n),$=`${w}-wrapper`,[M,T]=uce(w,$),R={...e,placement:c},[I,P]=Xt([S,m],[C,d],{props:R}),N=t1(o,false),O=X(w,`${w}-placement-${c}`,{[`${w}-rtl`]:g==="rtl",[`${w}-color-${o}`]:N},t,b,I.indicator),_={},L={};return o&&!N&&(_.background=o,L.color=o),f.createElement("div",{className:X($,u,M,T,I.root),style:P.root},i,f.createElement("div",{className:X(O,M),style:{..._,...P.indicator,...y,...r}},f.createElement("span",{className:X(`${w}-content`,I.content),style:P.content},a),f.createElement("div",{className:`${w}-corner`,style:L})))},n1=lce;n1.Ribbon=dce;var fce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function cE(){return cE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,cE({},e,{ref:t,icon:fce})),ap=f.forwardRef(mce),{ESC:hce,TAB:pce}=at;function gce({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=f.useRef(false),a=()=>{e&&(t.current?.focus?.(),n?.(false));},c=()=>o.current?.focus?(o.current.focus(),i.current=true,true):false,u=d=>{switch(d.keyCode){case hce:a();break;case pce:{let m=false;i.current||(m=c()),m?d.preventDefault():a();break}}};f.useEffect(()=>e?(window.addEventListener("keydown",u),r&&Lt(c,3),()=>{window.removeEventListener("keydown",u),i.current=false;}):()=>{i.current=false;},[e]);}const vce=f.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=f.useMemo(()=>{let c;return typeof n=="function"?c=n():c=n,c},[n]),a=Ar(t,Ql(i));return W.createElement(W.Fragment,null,r&&W.createElement("div",{className:`${o}-arrow`}),W.cloneElement(i,{ref:vu(i)?a:void 0}))}),Cd={adjustX:1,adjustY:1},xd=[0,0],bce={topLeft:{points:["bl","tl"],overflow:Cd,offset:[0,-4],targetOffset:xd},top:{points:["bc","tc"],overflow:Cd,offset:[0,-4],targetOffset:xd},topRight:{points:["br","tr"],overflow:Cd,offset:[0,-4],targetOffset:xd},bottomLeft:{points:["tl","bl"],overflow:Cd,offset:[0,4],targetOffset:xd},bottom:{points:["tc","bc"],overflow:Cd,offset:[0,4],targetOffset:xd},bottomRight:{points:["tr","br"],overflow:Cd,offset:[0,4],targetOffset:xd}};function uE(){return uE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{arrow:n=false,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:c="bottomLeft",placements:u=bce,getPopupContainer:d,showAction:m,hideAction:p,overlayClassName:g,overlayStyle:b,visible:y,trigger:S=["hover"],autoFocus:C,overlay:w,children:$,onVisibleChange:M,...T}=e,[R,I]=W.useState(),P="visible"in e?y:R,N=i?`${r}-${i}`:o,O=W.useRef(null),_=W.useRef(null),L=W.useRef(null);W.useImperativeHandle(t,()=>O.current);const H=Q=>{I(Q),M?.(Q);};gce({visible:P,triggerRef:L,onVisibleChange:H,autoFocus:C,overlayRef:_});const U=Q=>{const{onOverlayClick:D}=e;I(false),D&&D(Q);},q=()=>W.createElement(vce,{ref:_,overlay:w,prefixCls:r,arrow:n}),V=()=>typeof w=="function"?q:q(),z=()=>{const{minOverlayWidthMatchTrigger:Q,alignPoint:D}=e;return "minOverlayWidthMatchTrigger"in e?Q:!D},F=()=>{const{openClassName:Q}=e;return Q!==void 0?Q:`${r}-open`},G=W.cloneElement($,{className:X($.props?.className,P&&F()),ref:vu($)?Ar(L,Ql($)):void 0});let Y=p;return !Y&&S.indexOf("contextMenu")!==-1&&(Y=["click"]),W.createElement(Gy,uE({builtinPlacements:u},T,{prefixCls:r,ref:O,popupClassName:X(g,{[`${r}-show-arrow`]:n}),popupStyle:b,action:S,showAction:m,hideAction:Y,popupPlacement:c,popupAlign:a,popupMotion:{motionName:N},popupVisible:P,stretch:z()?"minWidth":"",popup:V(),onOpenChange:H,onPopupClick:U,getPopupContainer:d}),G)}),yce=e=>typeof e!="object"&&typeof e!="function"||e===null,_7=f.createContext(null);function L7(e,t){return `${e}-${t}`}function B7(e){const t=f.useContext(_7);return L7(t,e)}const va=f.createContext(null);function Sce(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o);}),n}function sp({children:e,locked:t,...n}){const r=f.useContext(va),o=Ef(()=>Sce(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!Dl(i[1],a[1],true)));return f.createElement(va.Provider,{value:o},e)}const Cce=[],z7=f.createContext(null);function r1(){return f.useContext(z7)}const k7=f.createContext(Cce);function If(e){const t=f.useContext(k7);return f.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const F7=f.createContext(null),SR=f.createContext({}),{LEFT:dE,RIGHT:fE,UP:mE,DOWN:Vb,ENTER:jb,ESC:H7,HOME:Wm,END:Km}=at,AO=[mE,Vb,dE,fE];function xce(e,t,n,r){const o="prev",i="next",a="children",c="parent";if(e==="inline"&&r===jb)return {inlineTrigger:true};const u={[mE]:o,[Vb]:i},d={[dE]:n?i:o,[fE]:n?o:i,[Vb]:a,[jb]:a},m={[mE]:o,[Vb]:i,[jb]:a,[H7]:c,[dE]:n?a:c,[fE]:n?c:a};switch({inline:u,horizontal:d,vertical:m,inlineSub:u,horizontalSub:m,verticalSub:m}[`${e}${t?"":"Sub"}`]?.[r]){case o:return {offset:-1,sibling:true};case i:return {offset:1,sibling:true};case c:return {offset:-1,sibling:false};case a:return {offset:1,sibling:false};default:return null}}function wce(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement;}return null}function $ce(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement;}return null}function CR(e,t){return oR(e,true).filter(r=>t.has(r))}function NO(e,t,n,r=1){if(!e)return null;const o=CR(e,t),i=o.length;let a=o.findIndex(c=>n===c);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const B0=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${L7(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a));}),{elements:n,key2element:r,element2key:o}};function Ece(e,t,n,r,o,i,a,c,u,d){const m=f.useRef(),p=f.useRef();p.current=t;const g=()=>{Lt.cancel(m.current);};return f.useEffect(()=>()=>{g();},[]),b=>{const{which:y}=b;if([...AO,jb,H7,Wm,Km].includes(y)){const S=i();let C=B0(S,r);const{elements:w,key2element:$,element2key:M}=C,T=$.get(t),R=$ce(T,w),I=M.get(R),P=xce(e,a(I,true).length===1,n,y);if(!P&&y!==Wm&&y!==Km)return;(AO.includes(y)||[Wm,Km].includes(y))&&b.preventDefault();const N=O=>{if(O){let _=O;const L=O.querySelector("a");L?.getAttribute("href")&&(_=L);const H=M.get(O);c(H),g(),m.current=Lt(()=>{p.current===H&&_.focus();});}};if([Wm,Km].includes(y)||P.sibling||!R){let O;!R||e==="inline"?O=o.current:O=wce(R);let _;const L=CR(O,w);y===Wm?_=L[0]:y===Km?_=L[L.length-1]:_=NO(O,w,R,P.offset),N(_);}else if(P.inlineTrigger)u(I);else if(P.offset>0)u(I,true),g(),m.current=Lt(()=>{C=B0(S,r);const O=R.getAttribute("aria-controls"),_=document.getElementById(O),L=NO(_,C.elements);N(L);},5);else if(P.offset<0){const O=a(I,true),_=O[O.length-2],L=$.get(_);u(_,false),N(L);}}d?.(b);}}function Mce(e){Promise.resolve().then(e);}const xR="__RC_UTIL_PATH_SPLIT__",PO=e=>e.join(xR),Rce=e=>e.split(xR),hE="rc-menu-more";function Tce(){const[,e]=f.useState({}),t=f.useRef(new Map),n=f.useRef(new Map),[r,o]=f.useState([]),i=f.useRef(0),a=f.useRef(false),c=()=>{a.current||e({});},u=f.useCallback((S,C)=>{const w=PO(C);n.current.set(w,S),t.current.set(S,w),i.current+=1;const $=i.current;Mce(()=>{$===i.current&&c();});},[]),d=f.useCallback((S,C)=>{const w=PO(C);n.current.delete(w),t.current.delete(S);},[]),m=f.useCallback(S=>{o(S);},[]),p=f.useCallback((S,C)=>{const w=t.current.get(S)||"",$=Rce(w);return C&&r.includes($[0])&&$.unshift(hE),$},[r]),g=f.useCallback((S,C)=>S.filter(w=>w!==void 0).some(w=>p(w,true).includes(C)),[p]),b=()=>{const S=[...t.current.keys()];return r.length&&S.push(hE),S},y=f.useCallback(S=>{const C=`${t.current.get(S)}${xR}`,w=new Set;return [...n.current.keys()].forEach($=>{$.startsWith(C)&&w.add(n.current.get($));}),w},[]);return f.useEffect(()=>()=>{a.current=true;},[]),{registerPath:u,unregisterPath:d,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:p,getKeys:b,getSubPathKeys:y}}function gh(e){const t=f.useRef(e);t.current=e;const n=f.useCallback((...r)=>t.current?.(...r),[]);return e?n:void 0}function V7(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=f.useContext(va),c={active:o===e};return t||(c.onMouseEnter=u=>{n?.({key:e,domEvent:u}),i(e);},c.onMouseLeave=u=>{r?.({key:e,domEvent:u}),a(e);}),c}function j7(e){const{mode:t,rtl:n,inlineIndent:r}=f.useContext(va);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function U7({icon:e,props:t,children:n}){let r;return e===null||e===false?null:(typeof e=="function"?r=f.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function z0({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(xr(false,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:c,children:u,role:d,onMouseEnter:m,onMouseLeave:p,onClick:g,onKeyDown:b,onFocus:y,...S}=e,C=B7(o),{prefixCls:w,onItemClick:$,disabled:M,overflowDisabled:T,itemIcon:R,selectedKeys:I,onActive:P}=f.useContext(va),{_internalRenderMenuItem:N}=f.useContext(SR),O=`${w}-item`,_=f.useRef(),L=f.useRef(),H=M||a,U=Xl(t,L),q=If(o),V=te=>({key:o,keyPath:[...q].reverse(),item:_.current,domEvent:te}),z=c||R,{active:F,...G}=V7(o,H,m,p),Y=I.includes(o),Q=j7(q.length),D=te=>{if(H)return;const ne=V(te);g?.(z0(ne)),$(ne);},B=te=>{if(b?.(te),te.which===at.ENTER){const ne=V(te);g?.(z0(ne)),$(ne);}},K=te=>{P(o),y?.(te);},J={};e.role==="option"&&(J["aria-selected"]=Y);let ee=f.createElement(Ace,lp({ref:_,elementRef:U,role:d===null?"none":d||"menuitem",tabIndex:a?null:-1,"data-menu-id":T&&C?null:C},Ln(S,["extra"]),G,J,{component:"li","aria-disabled":a,style:{...Q,...n},className:X(O,{[`${O}-active`]:F,[`${O}-selected`]:Y,[`${O}-disabled`]:H},r),onClick:D,onKeyDown:B,onFocus:K}),u,f.createElement(U7,{props:{...e,isSelected:Y},icon:z}));return N&&(ee=N(ee,e,{selected:Y})),ee});function Pce(e,t){const{eventKey:n}=e,r=r1(),o=If(n);return f.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o);}},[o]),r?null:f.createElement(Nce,lp({},e,{ref:t}))}const Qp=f.forwardRef(Pce);function pE(){return pE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:o,mode:i,rtl:a}=f.useContext(va);return f.createElement("ul",pE({className:X(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":true,ref:r}),t)},q7=f.forwardRef(Ice);function wR(e,t){return Ko(e).map((n,r)=>{if(f.isValidElement(n)){const{key:o}=n;let i=n.props?.eventKey??o;i==null&&(i=`tmp_key-${[...t,r].join("-")}`);const c={key:i,eventKey:i};return f.cloneElement(n,c)}return n})}const mo={adjustX:1,adjustY:1},Oce={topLeft:{points:["bl","tl"],overflow:mo},topRight:{points:["br","tr"],overflow:mo},bottomLeft:{points:["tl","bl"],overflow:mo},bottomRight:{points:["tr","br"],overflow:mo},leftTop:{points:["tr","tl"],overflow:mo},leftBottom:{points:["br","bl"],overflow:mo},rightTop:{points:["tl","tr"],overflow:mo},rightBottom:{points:["bl","br"],overflow:mo}},Dce={topLeft:{points:["bl","tl"],overflow:mo},topRight:{points:["br","tr"],overflow:mo},bottomLeft:{points:["tl","bl"],overflow:mo},bottomRight:{points:["tr","br"],overflow:mo},rightTop:{points:["tr","tl"],overflow:mo},rightBottom:{points:["br","bl"],overflow:mo},leftTop:{points:["tl","tr"],overflow:mo},leftBottom:{points:["bl","br"],overflow:mo}};function G7(e,t,n){if(t)return t;if(n)return n[e]||n.other}const _ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Lce({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:c,mode:u,onVisibleChange:d}){const{getPopupContainer:m,rtl:p,subMenuOpenDelay:g,subMenuCloseDelay:b,builtinPlacements:y,triggerSubMenuAction:S,forceSubMenuRender:C,rootClassName:w,motion:$,defaultMotions:M}=f.useContext(va),[T,R]=f.useState(false),I=p?{...Dce,...y}:{...Oce,...y},P=_ce[u],N=G7(u,$,M),O=f.useRef(N);u!=="inline"&&(O.current=N);const _={...O.current,leavedClassName:`${e}-hidden`,removeOnLeave:false,motionAppear:true},L=f.useRef();return f.useEffect(()=>(L.current=Lt(()=>{R(t);}),()=>{Lt.cancel(L.current);}),[t]),f.createElement(Gy,{prefixCls:e,popupClassName:X(`${e}-popup`,{[`${e}-rtl`]:p},i,w),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:I,popupPlacement:P,popupVisible:T,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:c?[]:[S],mouseEnterDelay:g,mouseLeaveDelay:b,onPopupVisibleChange:d,forceRender:C,popupMotion:_,fresh:true},n)}function gE(){return gE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{m.current&&g(false);},[d]);const y={...G7(o,c,u)};n.length>1&&(y.motionAppear=false);const S=y.onVisibleChanged;return y.onVisibleChanged=C=>(!m.current&&!C&&g(true),S?.(C)),p?null:f.createElement(sp,{mode:o,locked:!m.current},f.createElement(vo,gE({visible:b},y,{forceRender:a,removeOnLeave:false,leavedClassName:`${i}-hidden`}),({className:C,style:w})=>f.createElement(q7,{id:e,className:C,style:w},r)))}function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:n,className:r,styles:o,classNames:i,title:a,eventKey:c,warnKey:u,disabled:d,internalPopupClose:m,children:p,itemIcon:g,expandIcon:b,popupClassName:y,popupOffset:S,popupStyle:C,onClick:w,onMouseEnter:$,onMouseLeave:M,onTitleClick:T,onTitleMouseEnter:R,onTitleMouseLeave:I,popupRender:P,...N}=e,O=B7(c),{prefixCls:_,mode:L,openKeys:H,disabled:U,overflowDisabled:q,activeKey:V,selectedKeys:z,itemIcon:F,expandIcon:G,onItemClick:Y,onOpenChange:Q,onActive:D,popupRender:B}=f.useContext(va),{_internalRenderSubMenuItem:K}=f.useContext(SR),{isSubPathKey:J}=f.useContext(F7),ee=If(),te=`${_}-submenu`,ne=U||d,ae=f.useRef(),oe=f.useRef(),re=g??F,ce=b??G,he=H.includes(c),me=!q&&he,Re=J(z,c),{active:se,...de}=V7(c,ne,R,I),[Se,be]=f.useState(false),He=ze=>{ne||be(ze);},Ue=ze=>{He(true),$?.({key:c,domEvent:ze});},Pe=ze=>{He(false),M?.({key:c,domEvent:ze});},ue=f.useMemo(()=>se||(L!=="inline"?Se||J([V],c):false),[L,se,V,Se,c,J]),ye=j7(ee.length),Te=ze=>{ne||(T?.({key:c,domEvent:ze}),L==="inline"&&Q(c,!he));},qe=gh(ze=>{w?.(z0(ze)),Y(ze);}),Ze=ze=>{L!=="inline"&&Q(c,ze);},We=()=>{D(c);},tt=O&&`${O}-popup`,nt=f.useMemo(()=>f.createElement(U7,{icon:L!=="horizontal"?ce:void 0,props:{...e,isOpen:me,isSubMenu:true}},f.createElement("i",{className:`${te}-arrow`})),[L,ce,e,me,te]);let Ke=f.createElement("div",cp({role:"menuitem",style:ye,className:`${te}-title`,tabIndex:ne?null:-1,ref:ae,title:typeof a=="string"?a:null,"data-menu-id":q&&O?null:O,"aria-expanded":me,"aria-haspopup":true,"aria-controls":tt,"aria-disabled":ne,onClick:Te,onFocus:We},de),a,nt);const Oe=f.useRef(L);L!=="inline"&&ee.length>1?Oe.current="vertical":Oe.current=L;const Qe=Oe.current,Xe=f.useMemo(()=>{const ze=f.createElement(sp,{classNames:i,styles:o,mode:Qe==="horizontal"?"vertical":Qe},f.createElement(q7,{id:tt,ref:oe},p)),ct=P||B;return ct?ct(ze,{item:e,keys:ee}):ze},[P,B,ee,tt,p,e,Qe]);if(!q){const ze=Oe.current;Ke=f.createElement(Lce,{mode:ze,prefixCls:te,visible:!m&&me&&L!=="inline",popupClassName:y,popupOffset:S,popupStyle:C,popup:Xe,disabled:ne,onVisibleChange:Ze},Ke);}let _e=f.createElement(ws.Item,cp({ref:t,role:"none"},N,{component:"li",style:n,className:X(te,`${te}-${L}`,r,{[`${te}-open`]:me,[`${te}-active`]:ue,[`${te}-selected`]:Re,[`${te}-disabled`]:ne}),onMouseEnter:Ue,onMouseLeave:Pe}),Ke,!q&&f.createElement(Bce,{id:tt,open:me,keyPath:ee},p));return K&&(_e=K(_e,e,{selected:Re,active:ue,open:me,disabled:ne})),f.createElement(sp,{classNames:i,styles:o,onItemClick:qe,mode:L==="horizontal"?"vertical":L,itemIcon:re,expandIcon:ce},_e)}),o1=f.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=If(n),i=wR(r,o),a=r1();f.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o);}},[o]);let c;return a?c=i:c=f.createElement(zce,cp({ref:t},e),i),f.createElement(k7.Provider,{value:o},c)});function $R({className:e,style:t}){const{prefixCls:n}=f.useContext(va);return r1()?null:f.createElement("li",{role:"separator",className:X(`${n}-item-divider`,e),style:t})}function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:c,classNames:u,styles:d}=f.useContext(va),m=`${c}-item-group`;return f.createElement("li",k0({ref:t,role:"presentation"},a,{onClick:p=>p.stopPropagation(),className:X(m,n)}),f.createElement("div",{role:"presentation",className:X(`${m}-title`,u?.listTitle),style:d?.listTitle,title:typeof r=="string"?r:void 0},r),f.createElement("ul",{role:"group",className:X(`${m}-list`,u?.list),style:d?.list},i))}),ER=f.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=If(n),i=wR(r,o);return r1()?i:f.createElement(kce,k0({ref:t},Ln(e,["warnKey"])),i)});function Id(){return Id=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(c&&typeof c=="object"){const{label:d,children:m,key:p,type:g,extra:b,...y}=c,S=p??`tmp-${u}`;return m||g==="group"?g==="group"?f.createElement(o,Id({key:S},y,{title:d}),vE(m,t,n)):f.createElement(i,Id({key:S},y,{title:d}),vE(m,t,n)):g==="divider"?f.createElement(a,Id({key:S},y)):f.createElement(r,Id({key:S},y,{extra:b}),d,(!!b||b===0)&&f.createElement("span",{className:`${n}-item-extra`},b))}return null}).filter(c=>c)}function IO(e,t,n,r,o){let i=e;const a={divider:$R,item:Qp,group:ER,submenu:o1,...r};return t&&(i=vE(t,a,o)),wR(i,n)}function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:c,tabIndex:u=0,items:d,children:m,direction:p,id:g,mode:b="vertical",inlineCollapsed:y,disabled:S,disabledOverflow:C,subMenuOpenDelay:w=.1,subMenuCloseDelay:$=.1,forceSubMenuRender:M,defaultOpenKeys:T,openKeys:R,activeKey:I,defaultActiveFirst:P,selectable:N=true,multiple:O=false,defaultSelectedKeys:_,selectedKeys:L,onSelect:H,onDeselect:U,inlineIndent:q=24,motion:V,defaultMotions:z,triggerSubMenuAction:F="hover",builtinPlacements:G,itemIcon:Y,expandIcon:Q,overflowedIndicator:D="...",overflowedIndicatorPopupClassName:B,getPopupContainer:K,onClick:J,onOpenChange:ee,onKeyDown:te,openAnimation:ne,openTransitionName:ae,_internalRenderMenuItem:oe,_internalRenderSubMenuItem:re,_internalComponents:ce,popupRender:he,...me}=e,[Re,se]=f.useMemo(()=>[IO(m,d,Mc,ce,n),IO(m,d,Mc,{},n)],[m,d,ce]),[de,Se]=f.useState(false),be=f.useRef(),He=Zl(g?`rc-menu-uuid-${g}`:"rc-menu-uuid"),Ue=p==="rtl",[Pe,ue]=dn(T,R),ye=Pe||Mc,Te=(Ee,lt=false)=>{function et(){ue(Ee),ee?.(Ee);}lt?wo.flushSync(et):et();},[qe,Ze]=f.useState(ye),We=f.useRef(false),[tt,nt]=f.useMemo(()=>(b==="inline"||b==="vertical")&&y?["vertical",y]:[b,false],[b,y]),Ke=tt==="inline",[Oe,Qe]=f.useState(tt),[Xe,_e]=f.useState(nt);f.useEffect(()=>{Qe(tt),_e(nt),We.current&&(Ke?ue(qe):Te(Mc));},[tt,nt]);const[ze,ct]=f.useState(0),Pt=ze>=Re.length-1||Oe!=="horizontal"||C;f.useEffect(()=>{Ke&&Ze(ye);},[ye]),f.useEffect(()=>(We.current=true,()=>{We.current=false;}),[]);const{registerPath:ut,unregisterPath:Dt,refreshOverflowKeys:wt,isSubPathKey:Tt,getKeyPath:gt,getKeys:ft,getSubPathKeys:st}=Tce(),Fe=f.useMemo(()=>({registerPath:ut,unregisterPath:Dt}),[ut,Dt]),Ge=f.useMemo(()=>({isSubPathKey:Tt}),[Tt]);f.useEffect(()=>{wt(Pt?Mc:Re.slice(ze+1).map(Ee=>Ee.key));},[ze,Pt]);const[ve,Ae]=dn(I||P&&Re[0]?.key,I),Ce=gh(Ee=>{Ae(Ee);}),pe=gh(()=>{Ae(void 0);});f.useImperativeHandle(t,()=>({list:be.current,focus:Ee=>{const lt=ft(),{elements:et,key2element:Ct,element2key:_t}=B0(lt,He),fn=CR(be.current,et);let en;ve&<.includes(ve)?en=ve:en=fn[0]?_t.get(fn[0]):Re.find(Nr=>!Nr.props.disabled)?.key;const Hn=Ct.get(en);en&&Hn&&Hn?.focus?.(Ee);},findItem:({key:Ee})=>{const lt=ft(),{key2element:et}=B0(lt,He);return et.get(Ee)||null}}));const[Ie,$e]=dn(_||[],L),Le=f.useMemo(()=>Array.isArray(Ie)?Ie:Ie==null?Mc:[Ie],[Ie]),Ye=Ee=>{if(N){const{key:lt}=Ee,et=Le.includes(lt);let Ct;O?et?Ct=Le.filter(fn=>fn!==lt):Ct=[...Le,lt]:Ct=[lt],$e(Ct);const _t={...Ee,selectedKeys:Ct};et?U?.(_t):H?.(_t);}!O&&ye.length&&Oe!=="inline"&&Te(Mc);},it=gh(Ee=>{J?.(z0(Ee)),Ye(Ee);}),ht=gh((Ee,lt)=>{let et=ye.filter(Ct=>Ct!==Ee);if(lt)et.push(Ee);else if(Oe!=="inline"){const Ct=st(Ee);et=et.filter(_t=>!Ct.has(_t));}Dl(ye,et,true)||Te(et,true);}),Mt=Ece(Oe,ve,Ue,He,be,ft,gt,Ae,(Ee,lt)=>{const et=lt??!ye.includes(Ee);ht(Ee,et);},te);f.useEffect(()=>{Se(true);},[]);const zt=f.useMemo(()=>({_internalRenderMenuItem:oe,_internalRenderSubMenuItem:re}),[oe,re]),Rn=Oe!=="horizontal"||C?Re:Re.map((Ee,lt)=>f.createElement(sp,{key:Ee.key,overflowDisabled:lt>ze,classNames:c,styles:a},Ee)),Ot=f.createElement(ws,bE({id:g,ref:be,prefixCls:`${n}-overflow`,component:"ul",itemComponent:Qp,className:X(n,`${n}-root`,`${n}-${Oe}`,i,{[`${n}-inline-collapsed`]:Xe,[`${n}-rtl`]:Ue},r),dir:p,style:o,role:"menu",tabIndex:u,data:Rn,renderRawItem:Ee=>Ee,renderRawRest:Ee=>{const lt=Ee.length,et=lt?Re.slice(-lt):null;return f.createElement(o1,{eventKey:hE,title:D,disabled:Pt,internalPopupClose:lt===0,popupClassName:B},et)},maxCount:Oe!=="horizontal"||C?ws.INVALIDATE:ws.RESPONSIVE,ssr:"full","data-menu-list":true,onVisibleChange:Ee=>{ct(Ee);},onKeyDown:Mt},me));return f.createElement(SR.Provider,{value:zt},f.createElement(_7.Provider,{value:He},f.createElement(sp,{prefixCls:n,rootClassName:r,classNames:c,styles:a,mode:Oe,openKeys:ye,rtl:Ue,disabled:S,motion:de?V:null,defaultMotions:de?z:null,activeKey:ve,onActive:Ce,onInactive:pe,selectedKeys:Le,inlineIndent:q,subMenuOpenDelay:w,subMenuCloseDelay:$,forceSubMenuRender:M,builtinPlacements:G,triggerSubMenuAction:F,getPopupContainer:K,itemIcon:Y,expandIcon:Q,onItemClick:it,onOpenChange:ht,popupRender:he},f.createElement(F7.Provider,{value:Ge},Ot),f.createElement("div",{style:{display:"none"},"aria-hidden":true},f.createElement(z7.Provider,{value:Fe},se)))))}),Of=Fce;Of.Item=Qp;Of.SubMenu=o1;Of.ItemGroup=ER;Of.Divider=$R;const W7=f.createContext({});var Hce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function yE(){return yE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,yE({},e,{ref:t,icon:Hce})),MR=f.forwardRef(Vce),F0=f.createContext({prefixCls:"",firstLevel:true,inlineCollapsed:false,styles:null,classNames:null}),K7=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=f.useContext(xt),a=i("menu",t),c=X({[`${a}-item-divider-dashed`]:!!r},n);return f.createElement($R,{className:c,...o})},Y7=e=>{const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:c,firstLevel:u,direction:d,disableMenuItemTitleTooltip:m,inlineCollapsed:p,styles:g,classNames:b}=f.useContext(F0),y=T=>{const R=n?.[0],I=f.createElement("span",{className:X(`${c}-title-content`,u?b?.itemContent:b?.subMenu?.itemContent,{[`${c}-title-content-with-extra`]:!!a||a===0}),style:u?g?.itemContent:g?.subMenu?.itemContent},n);return (!r||f.isValidElement(n)&&n.type==="span")&&n&&T&&u&&typeof R=="string"?f.createElement("div",{className:`${c}-inline-collapsed-noicon`},R.charAt(0)):I},{siderCollapsed:S}=f.useContext(W7);let C=o;typeof o>"u"?C=u?n:"":o===false&&(C="");const w={title:C};!S&&!p&&(w.title=null,w.open=false);const $=Ko(n).length;let M=f.createElement(Qp,{...Ln(e,["title","icon","danger"]),className:X(u?b?.item:b?.subMenu?.item,{[`${c}-item-danger`]:i,[`${c}-item-only-child`]:(r?$+1:$)===1},t),style:{...u?g?.item:g?.subMenu?.item,...e.style},title:typeof o=="string"?o:void 0},kr(r,T=>({className:X(`${c}-item-icon`,u?b?.itemIcon:b?.subMenu?.itemIcon,T.className),style:{...u?g?.itemIcon:g?.subMenu?.itemIcon,...T.style}})),y(p));return m||(M=f.createElement(ec,{...w,placement:d==="rtl"?"left":"right",classNames:{root:`${c}-inline-collapsed-tooltip`}},M)),M},H0=f.createContext(null),jce=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.useContext(H0),i=f.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=zZ(n),c=Xl(t,a?Ql(n):null);return f.createElement(H0.Provider,{value:i},f.createElement(kl,{space:true},a?f.cloneElement(n,{ref:c}):n))}),Uce=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:c}=e;return {[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${ie(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:c},[`> ${t}-item:hover, > ${t}-item-active, > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background-color ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},qce=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical, ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ie(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ie(t)})`}}}}),OO=e=>ha(e),DO=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:c,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:m,activeBarWidth:p,activeBarBorderWidth:g,motionDurationSlow:b,motionEaseInOut:y,motionEaseOut:S,itemPaddingInline:C,motionDurationMid:w,itemHoverColor:$,lineType:M,colorSplit:T,itemDisabledColor:R,dangerItemColor:I,dangerItemHoverColor:P,dangerItemSelectedColor:N,dangerItemActiveBg:O,dangerItemSelectedBg:_,popupBg:L,itemHoverBg:H,itemActiveBg:U,menuSubMenuBg:q,horizontalItemSelectedColor:V,horizontalItemSelectedBg:z,horizontalItemBorderRadius:F,horizontalItemHoverBg:G}=e;return {[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:c,[`&${n}-root:focus-visible`]:{...OO(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...OO(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${R} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:$}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:H},"&:active":{backgroundColor:U}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:H},"&:active":{backgroundColor:U}}},[`${n}-item-danger`]:{color:I,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:P}},[`&${n}-item:active`]:{background:O}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:d,[`&${n}-item-danger`]:{backgroundColor:_}},[`&${n}-submenu > ${n}`]:{backgroundColor:q},[`&${n}-popup > ${n}`]:{backgroundColor:L},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:L},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:C,bottom:0,borderBottom:`${ie(m)} solid transparent`,transition:`border-color ${b} ${y}`,content:'""'},"&:hover, &-active, &-open":{background:G,"&::after":{borderBottomWidth:m,borderBottomColor:V}},"&-selected":{color:V,backgroundColor:z,"&:hover":{backgroundColor:z},"&::after":{borderBottomWidth:m,borderBottomColor:V}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${ie(g)} ${M} ${T}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:u},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ie(p)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${w} ${S}`,`opacity ${w} ${S}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${w} ${y}`,`opacity ${w} ${y}`].join(",")}}}}}},_O=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:c,itemWidth:u,itemPaddingInline:d}=e,m=e.calc(i).add(o).add(a).equal();return {[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:ie(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:c,width:u},[`> ${t}-item, > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:ie(n)},[`${t}-item-group-list ${t}-submenu-title, ${t}-submenu-title`]:{paddingInlineEnd:m}}},Gce=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:c,paddingXL:u,itemMarginInline:d,fontSizeLG:m,motionDurationFast:p,motionDurationSlow:g,paddingXS:b,boxShadowSecondary:y,collapsedWidth:S,collapsedIconSize:C}=e,w={height:r,lineHeight:ie(r),listStylePosition:"inside",listStyleType:"disc"};return [{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},..._O(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{..._O(e),boxShadow:y}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${ie(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background-color ${g}`,`padding ${p} ${c}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:S,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:m,textAlign:"center"}}},[`> ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ie(e.calc(C).div(2).equal())} - ${ie(d)})`,textOverflow:"clip",[` ${t}-submenu-arrow, ${t}-submenu-expand-icon `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:C,lineHeight:ie(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...ja,paddingInline:b}}}]},LO=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:c,iconMarginInlineEnd:u}=e;return {[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:c,fontSize:c,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...bu()},[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},BO=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return {[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background-color ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ie(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ie(a)})`}}}}},Wce=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:c,padding:u,colorSplit:d,lineWidth:m,zIndexPopup:p,borderRadiusLG:g,subMenuItemBorderRadius:b,menuArrowSize:y,menuArrowOffset:S,lineType:C,groupTitleLineHeight:w,groupTitleFontSize:$}=e;return [{"":{[n]:{...w0(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...cn(e),...w0(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${ie(c)} ${ie(u)}`,fontSize:$,lineHeight:w,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background-color ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background-color ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background-color ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:C,borderWidth:0,borderTopWidth:m,marginBlock:m,padding:0,"&-dashed":{borderStyle:"dashed"}},...LO(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${ie(e.calc(r).mul(2).equal())} ${ie(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:{borderRadius:g,...LO(e),...BO(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:b},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}}},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}},...BO(e),[`&-inline-collapsed ${n}-submenu-arrow, &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ie(S)})`},"&::after":{transform:`rotate(45deg) translateX(${ie(e.calc(S).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${ie(e.calc(y).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ie(e.calc(S).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ie(S)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Kce=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:c,colorFillAlter:u,colorFillContent:d,lineWidth:m,lineWidthBold:p,controlItemBgActive:g,colorBgTextHover:b,controlHeightLG:y,lineHeight:S,colorBgElevated:C,marginXXS:w,padding:$,fontSize:M,controlHeightSM:T,fontSizeLG:R,colorTextLightSolid:I,colorErrorHover:P}=e,N=e.activeBarWidth??0,O=e.activeBarBorderWidth??m,_=e.itemMarginInline??e.marginXXS,L=new ln(I).setA(.65).toRgbString();return {dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:c,itemBg:c,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:d,itemActiveBg:g,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:m,activeBarBorderWidth:O,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:_,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:S,collapsedWidth:y*2,popupBg:C,itemMarginBlock:w,itemPaddingInline:$,horizontalLineHeight:`${y*1.15}px`,iconSize:M,iconMarginInlineEnd:T-M,collapsedIconSize:R,groupTitleFontSize:M,darkItemDisabledColor:new ln(I).setA(.25).toRgbString(),darkItemColor:L,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:L,darkItemHoverColor:I,darkDangerItemHoverColor:P,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:n,itemWidth:N?`calc(100% + ${O}px)`:`calc(100% - ${_*2}px)`}},Yce=(e,t=e,n=true)=>Ut("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:c,darkItemColor:u,darkDangerItemColor:d,darkItemBg:m,darkSubMenuItemBg:p,darkItemSelectedColor:g,darkItemSelectedBg:b,darkDangerItemSelectedBg:y,darkItemHoverBg:S,darkGroupTitleColor:C,darkItemHoverColor:w,darkItemDisabledColor:$,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:T,darkDangerItemActiveBg:R,popupBg:I,darkPopupBg:P}=o,N=o.calc(c).div(7).mul(5).equal(),O=Ht(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:I}),_=Ht(O,{itemColor:u,itemHoverColor:w,groupTitleColor:C,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:m,popupBg:P,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:b,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:S,itemDisabledColor:$,dangerItemColor:d,dangerItemHoverColor:M,dangerItemSelectedColor:T,dangerItemActiveBg:R,dangerItemSelectedBg:y,menuSubMenuBg:p,horizontalItemSelectedColor:g,horizontalItemSelectedBg:b});return [Wce(O),Uce(O),Gce(O),DO(O,"light"),DO(_,"dark"),qce(O),gk(O),zl(O,"slide-up"),zl(O,"slide-down"),jp(O,"zoom-big")]},Kce,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:true}})(e,t),X7=e=>{const{popupClassName:t,icon:n,title:r,theme:o}=e,i=f.useContext(F0),{prefixCls:a,inlineCollapsed:c,theme:u,classNames:d,styles:m}=i,p=If();let g;if(!n)g=c&&!p.length&&r&&typeof r=="string"?f.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):f.createElement("span",{className:`${a}-title-content`},r);else {const S=f.isValidElement(r)&&r.type==="span";g=f.createElement(f.Fragment,null,kr(n,C=>({className:X(C.className,`${a}-item-icon`,d?.itemIcon),style:{...C.style,...m?.itemIcon}})),S?r:f.createElement("span",{className:`${a}-title-content`},r));}const b=f.useMemo(()=>({...i,firstLevel:false}),[i]),[y]=Su("Menu");return f.createElement(F0.Provider,{value:b},f.createElement(o1,{...Ln(e,["icon"]),title:g,classNames:{list:d?.subMenu?.list,listTitle:d?.subMenu?.itemTitle},styles:{list:m?.subMenu?.list,listTitle:m?.subMenu?.itemTitle},popupClassName:X(a,t,d?.popup?.root,`${a}-${o||u}`),popupStyle:{zIndex:y,...e.popupStyle,...m?.popup?.root}}))};function Vx(e){return e===null||e===false}const Xce={item:Y7,submenu:X7,divider:K7},Qce=f.forwardRef((e,t)=>{const n=f.useContext(H0),r=n||{},{prefixCls:o,className:i,style:a,theme:c="light",expandIcon:u,_internalDisableMenuItemTitleTooltip:d,inlineCollapsed:m,siderCollapsed:p,rootClassName:g,mode:b,selectable:y,onClick:S,overflowedIndicatorPopupClassName:C,classNames:w,styles:$,...M}=e,{menu:T}=f.useContext(xt),{getPrefixCls:R,getPopupContainer:I,direction:P,className:N,style:O,classNames:_,styles:L}=Wt("menu"),H=R(),U=Ln(M,["collapsedWidth"]);r.validator?.({mode:b});const q=Rt((...oe)=>{S?.(...oe),r.onClick?.();}),V=r.mode||b,z=y??r.selectable,F=m??p,G={...e,mode:V,inlineCollapsed:F,selectable:z,theme:c},[Y,Q]=Xt([_,w],[L,$],{props:G},{popup:{_default:"root"},subMenu:{_default:"item"}}),D={horizontal:{motionName:`${H}-slide-up`},inline:ik(H),other:{motionName:`${H}-zoom-big`}},B=R("menu",o||r.prefixCls),K=Kn(B),[J,ee]=Yce(B,K,!n),te=X(`${B}-${c}`,N,i),ne=f.useMemo(()=>{if(typeof u=="function"||Vx(u))return u||null;if(typeof r.expandIcon=="function"||Vx(r.expandIcon))return r.expandIcon||null;if(typeof T?.expandIcon=="function"||Vx(T?.expandIcon))return T?.expandIcon||null;const oe=u??r?.expandIcon??T?.expandIcon;return kr(oe,{className:X(`${B}-submenu-expand-icon`,f.isValidElement(oe)?oe.props?.className:void 0)})},[u,r?.expandIcon,T?.expandIcon,B]),ae=f.useMemo(()=>({prefixCls:B,inlineCollapsed:F||false,direction:P,firstLevel:true,theme:c,mode:V,disableMenuItemTitleTooltip:d,classNames:Y,styles:Q}),[B,F,P,d,c,V,Y,Q]);return f.createElement(H0.Provider,{value:null},f.createElement(F0.Provider,{value:ae},f.createElement(Of,{getPopupContainer:I,overflowedIndicator:f.createElement(MR,null),overflowedIndicatorPopupClassName:X(B,`${B}-${c}`,C),classNames:{list:Y.list,listTitle:Y.itemTitle},styles:{list:Q.list,listTitle:Q.itemTitle},mode:V,selectable:z,onClick:q,...U,inlineCollapsed:F,style:{...Q.root,...O,...a},className:te,prefixCls:B,direction:P,defaultMotions:D,expandIcon:ne,ref:t,rootClassName:X(g,J,r.rootClassName,ee,K,Y.root),_internalComponents:Xce})))}),tc=f.forwardRef((e,t)=>{const n=f.useRef(null),r=f.useContext(W7);return f.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{n.current?.focus(o);}})),f.createElement(Qce,{ref:n,...e,...r})});tc.Item=Y7;tc.SubMenu=X7;tc.Divider=K7;tc.ItemGroup=ER;const Zce=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return {[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},Jce=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:c,motionDurationMid:u,paddingBlock:d,fontSize:m,dropdownEdgeChildPadding:p,colorTextDisabled:g,fontSizeIcon:b,controlPaddingHorizontal:y,colorBgElevated:S}=e;return [{[t]:{position:"absolute",top:-9999,left:{_skip_check_:true,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${c}-down, & > ${a}-btn-icon > ${c}-down`]:{fontSize:b}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${c}-down`]:{fontSize:b},[`${c}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${c}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft, &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft, &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom, &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom, &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight, &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:XM},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft, &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft, &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top, &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top, &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight, &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:ZM},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft, &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom, &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:QM},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft, &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top, &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:JM}}},bR(e,S,{arrowPlacement:{top:true,bottom:true}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...cn(e),[n]:{padding:p,listStyleType:"none",backgroundColor:S,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Si(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${ie(d)} ${ie(y)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:m,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:"flex",margin:0,padding:`${ie(d)} ${ie(y)}`,color:e.colorText,fontWeight:"normal",fontSize:m,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Si(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:S,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ie(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:b,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${ie(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(y).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:S,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[zl(e,"slide-up"),zl(e,"slide-down"),N0(e,"move-up"),N0(e,"move-down"),jp(e,"zoom-big")]]},eue=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...e1({contentRadius:e.borderRadiusLG,limitVerticalRadius:true}),...vR(e)}),tue=Ut("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=Ht(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return [Jce(i),Zce(i)]},eue,{resetStyle:false}),i1=e=>{const{menu:t,arrow:n,prefixCls:r,children:o,trigger:i,disabled:a,dropdownRender:c,popupRender:u,getPopupContainer:d,overlayClassName:m,rootClassName:p,overlayStyle:g,open:b,onOpenChange:y,mouseEnterDelay:S=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:w=true,placement:$="",transitionName:M,classNames:T,styles:R,destroyPopupOnHide:I,destroyOnHidden:P}=e,{getPrefixCls:N,direction:O,getPopupContainer:_,className:L,style:H,classNames:U,styles:q}=Wt("dropdown"),V={...e,mouseEnterDelay:S,mouseLeaveDelay:C,autoAdjustOverflow:w},[z,F]=Xt([U,T],[q,R],{props:V}),G={...H,...g,...F.root},Y=u||c,Q=f.useMemo(()=>{const Pe=N();return M!==void 0?M:$.includes("top")?`${Pe}-slide-down`:`${Pe}-slide-up`},[N,$,M]),D=f.useMemo(()=>$?$.includes("Center")?$.slice(0,$.indexOf("Center")):$:O==="rtl"?"bottomRight":"bottomLeft",[$,O]),B=N("dropdown",r),K=Kn(B),[J,ee]=tue(B,K),[,te]=Hr(),ne=f.Children.only(yce(o)?f.createElement("span",null,o):o),ae=kr(ne,{className:X(`${B}-trigger`,{[`${B}-rtl`]:O==="rtl"},ne.props.className),disabled:ne.props.disabled??a}),oe=a?[]:i,re=!!oe?.includes("contextMenu"),[ce,he]=dn(false,b),me=Rt(Pe=>{y?.(Pe,{source:"trigger"}),he(Pe);}),Re=X(m,p,J,ee,K,L,z.root,{[`${B}-rtl`]:O==="rtl"}),se=M7({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:w,offset:te.marginXXS,arrowWidth:n?te.sizePopupArrow:0,borderRadius:te.borderRadius}),de=Rt(()=>{t?.selectable&&t?.multiple||(y?.(false,{source:"menu"}),he(false));}),Se=()=>{const Pe=Ln(z,["root"]),ue=Ln(F,["root"]);let ye;return t?.items&&(ye=f.createElement(tc,{...t,classNames:{...Pe,subMenu:{...Pe}},styles:{...ue,subMenu:{...ue}}})),Y&&(ye=Y(ye)),ye=f.Children.only(typeof ye=="string"?f.createElement("span",null,ye):ye),f.createElement(jce,{prefixCls:`${B}-menu`,rootClassName:X(ee,K),expandIcon:f.createElement("span",{className:`${B}-menu-submenu-arrow`},O==="rtl"?f.createElement(ap,{className:`${B}-menu-submenu-arrow-icon`}):f.createElement(of,{className:`${B}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:false,onClick:de,validator:({mode:Te})=>{}},ye)},[be,He]=Su("Dropdown",G.zIndex);let Ue=f.createElement(D7,{alignPoint:re,...Ln(e,["rootClassName","onOpenChange"]),mouseEnterDelay:S,mouseLeaveDelay:C,visible:ce,builtinPlacements:se,arrow:!!n,overlayClassName:Re,prefixCls:B,getPopupContainer:d||_,transitionName:Q,trigger:oe,overlay:Se,placement:D,onVisibleChange:me,overlayStyle:{...G,zIndex:be},autoDestroy:P??I},ae);return be&&(Ue=f.createElement(Uy.Provider,{value:He},Ue)),Ue},nue=lR(i1,"align",void 0,"dropdown",e=>e),rue=e=>f.createElement(nue,{...e},f.createElement("span",null));i1._InternalPanelDoNotUseOrYouWillBeFired=rue;var Ub={exports:{}},oue=Ub.exports,zO;function iue(){return zO||(zO=1,(function(e,t){(function(n,r){e.exports=r();})(oue,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",c="minute",u="hour",d="day",m="week",p="month",g="quarter",b="year",y="date",S="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var V=["th","st","nd","rd"],z=q%100;return "["+q+(V[(z-20)%10]||V[z]||V[0])+"]"}},M=function(q,V,z){var F=String(q);return !F||F.length>=V?q:""+Array(V+1-F.length).join(z)+q},T={s:M,z:function(q){var V=-q.utcOffset(),z=Math.abs(V),F=Math.floor(z/60),G=z%60;return (V<=0?"+":"-")+M(F,2,"0")+":"+M(G,2,"0")},m:function q(V,z){if(V.date()1)return q(Q[0])}else {var D=V.name;I[D]=V,G=D;}return !F&&G&&(R=G),G||!F&&R},_=function(q,V){if(N(q))return q.clone();var z=typeof V=="object"?V:{};return z.date=q,z.args=arguments,new H(z)},L=T;L.l=O,L.i=N,L.w=function(q,V){return _(q,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var H=(function(){function q(z){this.$L=O(z.locale,null,true),this.parse(z),this.$x=this.$x||z.x||{},this[P]=true;}var V=q.prototype;return V.parse=function(z){this.$d=(function(F){var G=F.date,Y=F.utc;if(G===null)return new Date(NaN);if(L.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var Q=G.match(C);if(Q){var D=Q[2]-1||0,B=(Q[7]||"0").substring(0,3);return Y?new Date(Date.UTC(Q[1],D,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,B)):new Date(Q[1],D,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,B)}}return new Date(G)})(z),this.init();},V.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds();},V.$utils=function(){return L},V.isValid=function(){return this.$d.toString()!==S},V.isSame=function(z,F){var G=_(z);return this.startOf(F)<=G&&G<=this.endOf(F)},V.isAfter=function(z,F){return _(z){const{prefixCls:n="rc-checkbox",className:r,style:o,checked:i,disabled:a,defaultChecked:c=false,type:u="checkbox",title:d,onChange:m,...p}=e,g=f.useRef(null),b=f.useRef(null),[y,S]=dn(c,i);f.useImperativeHandle(t,()=>({focus:$=>{g.current?.focus($);},blur:()=>{g.current?.blur();},input:g.current,nativeElement:b.current}));const C=X(n,r,{[`${n}-checked`]:y,[`${n}-disabled`]:a}),w=$=>{a||("checked"in e||S($.target.checked),m?.({target:{...e,type:u,checked:$.target.checked},stopPropagation(){$.stopPropagation();},preventDefault(){$.preventDefault();},nativeEvent:$.nativeEvent}));};return f.createElement("span",{className:C,title:d,style:o,ref:b},f.createElement("input",SE({},p,{className:`${n}-input`,ref:g,onChange:w,disabled:a,checked:!!y,type:u})),f.createElement("span",{className:`${n}-inner`}))});function eF(e){const t=W.useRef(null),n=()=>{Lt.cancel(t.current),t.current=null;};return [()=>{n(),t.current=Lt(()=>{t.current=null;});},i=>{t.current&&(i.stopPropagation(),n()),e?.(i);}]}const due=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return {[r]:{...cn(e),display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"},"&-vertical":{display:"flex",flexDirection:"column",rowGap:e.marginXS}}}},fue=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:c,colorBgContainer:u,colorBorder:d,lineWidth:m,colorBgContainerDisabled:p,colorTextDisabled:g,paddingXS:b,dotColorDisabled:y,lineType:S,radioColor:C,radioBgColor:w,calc:$}=e,M=`${t}-inner`,R=$(o).sub($(4).mul(2)),I=$(1).mul(o).equal({unit:true});return {[`${t}-wrapper`]:{...cn(e),display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${ie(m)} ${S} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:{...cn(e),position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"},[`${t}-wrapper:hover &, &:hover ${M}`]:{borderColor:r},[`${t}-input:focus-visible + ${M}`]:ha(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:I,height:I,marginBlockStart:$(1).mul(o).div(-2).equal({unit:true}),marginInlineStart:$(1).mul(o).div(-2).equal({unit:true}),backgroundColor:C,borderBlockStart:0,borderInlineStart:0,borderRadius:I,transform:"scale(0)",opacity:0,transition:`all ${i} ${c}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:I,height:I,backgroundColor:u,borderColor:d,borderStyle:"solid",borderWidth:m,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[M]:{borderColor:r,backgroundColor:w,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${i} ${c}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[M]:{backgroundColor:p,borderColor:d,cursor:"not-allowed","&::after":{backgroundColor:y}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:g,cursor:"not-allowed"},[`&${t}-checked`]:{[M]:{"&::after":{transform:`scale(${$(R).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:b,paddingInlineEnd:b}}}},mue=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationMid:c,buttonPaddingInline:u,fontSize:d,buttonBg:m,fontSizeLG:p,controlHeightLG:g,controlHeightSM:b,paddingXS:y,borderRadius:S,borderRadiusSM:C,borderRadiusLG:w,buttonCheckedBg:$,buttonSolidCheckedColor:M,colorTextDisabled:T,colorBgContainerDisabled:R,buttonCheckedBgDisabled:I,buttonCheckedColorDisabled:P,colorPrimary:N,colorPrimaryHover:O,colorPrimaryActive:_,buttonSolidCheckedBg:L,buttonSolidCheckedHoverBg:H,buttonSolidCheckedActiveBg:U,calc:q}=e;return {[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:d,lineHeight:ie(q(n).sub(q(o).mul(2)).equal()),background:m,border:`${ie(o)} ${i} ${a}`,borderBlockStartWidth:q(o).add(.02).equal(),borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${c}`,`background-color ${c}`,`box-shadow ${c}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:q(o).mul(-1).equal()},"&:first-child":{borderInlineStart:`${ie(o)} ${i} ${a}`,borderStartStartRadius:S,borderEndStartRadius:S},"&:last-child":{borderStartEndRadius:S,borderEndEndRadius:S},"&:first-child:last-child":{borderRadius:S},[`${r}-group-large &`]:{height:g,fontSize:p,lineHeight:ie(q(g).sub(q(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}},[`${r}-group-small &`]:{height:b,paddingInline:q(y).sub(o).equal(),paddingBlock:0,lineHeight:ie(q(b).sub(q(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:C,borderEndStartRadius:C},"&:last-child":{borderStartEndRadius:C,borderEndEndRadius:C}},"&:hover":{position:"relative",color:N},"&:has(:focus-visible)":ha(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:N,background:$,borderColor:N,"&::before":{backgroundColor:N},"&:first-child":{borderColor:N},"&:hover":{color:O,borderColor:O,"&::before":{backgroundColor:O}},"&:active":{color:_,borderColor:_,"&::before":{backgroundColor:_}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:M,background:L,borderColor:L,"&:hover":{color:M,background:H,borderColor:H},"&:active":{color:M,background:U,borderColor:U}},"&-disabled":{color:T,backgroundColor:R,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:T,backgroundColor:R,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:P,backgroundColor:I,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},hue=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:c,colorTextDisabled:u,controlItemBgActiveDisabled:d,colorTextLightSolid:m,colorPrimary:p,colorPrimaryHover:g,colorPrimaryActive:b,colorWhite:y}=e,S=4,C=i,w=t?C-S*2:C-(S+o)*2;return {radioSize:C,dotSize:w,dotColorDisabled:u,buttonSolidCheckedColor:m,buttonSolidCheckedBg:p,buttonSolidCheckedHoverBg:g,buttonSolidCheckedActiveBg:b,buttonBg:c,buttonCheckedBg:c,buttonColor:a,buttonCheckedBgDisabled:d,buttonCheckedColorDisabled:u,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?p:y,radioBgColor:t?c:p}},tF=Ut("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${ie(n)} ${t}`,i=Ht(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return [due(i),fue(i),mue(i)]},hue,{unitless:{radioSize:true,dotSize:true}}),pue=(e,t)=>{const n=f.useContext(Q7),r=f.useContext(Z7),{getPrefixCls:o,direction:i,className:a,style:c,classNames:u,styles:d}=Wt("radio"),m=f.useRef(null),p=Ar(t,m),{isFormItemInput:g}=f.useContext(go),b=D=>{e.onChange?.(D),n?.onChange?.(D);},{prefixCls:y,className:S,rootClassName:C,children:w,style:$,title:M,classNames:T,styles:R,...I}=e,P=o("radio",y),N=(n?.optionType||r)==="button",O=N?`${P}-button`:P,_=Kn(P),[L,H]=tF(P,_),U={...I},q=f.useContext(eo);n&&(U.name=n.name,U.onChange=b,U.checked=e.value===n.value,U.disabled=U.disabled??n.disabled),U.disabled=U.disabled??q;const V={...e,...U},[z,F]=Xt([u,T],[d,R],{props:V}),G=X(`${O}-wrapper`,{[`${O}-wrapper-checked`]:U.checked,[`${O}-wrapper-disabled`]:U.disabled,[`${O}-wrapper-rtl`]:i==="rtl",[`${O}-wrapper-in-form-item`]:g,[`${O}-wrapper-block`]:!!n?.block},a,S,C,z.root,L,H,_),[Y,Q]=eF(U.onClick);return f.createElement(Vp,{component:"Radio",disabled:U.disabled},f.createElement("label",{className:G,style:{...F.root,...c,...$},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:M,onClick:Y},f.createElement(J7,{...U,className:X(z.icon,{[Yy]:!N}),style:F.icon,type:"radio",prefixCls:O,ref:p,onClick:Q}),w!==void 0?f.createElement("span",{className:X(`${O}-label`,z.label),style:F.label},w):null))},V0=f.forwardRef(pue),gue=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f.useContext(xt),{name:o}=f.useContext(go),i=Zl(lue(o)),{prefixCls:a,className:c,rootClassName:u,options:d,buttonStyle:m="outline",disabled:p,children:g,size:b,style:y,id:S,optionType:C,name:w=i,defaultValue:$,value:M,block:T=false,onChange:R,onMouseEnter:I,onMouseLeave:P,onFocus:N,onBlur:O,orientation:_,vertical:L,role:H="radiogroup"}=e,[U,q]=dn($,M),V=f.useCallback(te=>{const ne=U,ae=te.target.value;"value"in e||q(ae),ae!==ne&&R?.(te);},[U,q,R]),z=n("radio",a),F=`${z}-group`,G=Kn(z),[Y,Q]=tF(z,G);let D=g;d&&d.length>0&&(D=d.map(te=>typeof te=="string"||typeof te=="number"?f.createElement(V0,{key:te.toString(),prefixCls:z,disabled:p,value:te,checked:U===te},te):f.createElement(V0,{key:`radio-group-value-options-${te.value}`,prefixCls:z,disabled:te.disabled||p,value:te.value,checked:U===te.value,title:te.title,style:te.style,className:te.className,id:te.id,required:te.required},te.label)));const B=io(b),[,K]=yu(_,L),J=X(F,`${F}-${m}`,{[`${F}-${B}`]:B,[`${F}-rtl`]:r==="rtl",[`${F}-block`]:T},c,u,Y,Q,G),ee=f.useMemo(()=>({onChange:V,value:U,disabled:p,name:w,optionType:C,block:T}),[V,U,p,w,C,T]);return f.createElement("div",{...po(e,{aria:true,data:true}),role:H,className:X(J,{[`${z}-group-vertical`]:K}),style:y,onMouseEnter:I,onMouseLeave:P,onFocus:N,onBlur:O,id:S,ref:t},f.createElement(cue,{value:ee},D))}),vue=f.memo(gue),bue=(e,t)=>{const{getPrefixCls:n}=f.useContext(xt),{prefixCls:r,...o}=e,i=n("radio",r);return f.createElement(uue,{value:"button"},f.createElement(V0,{prefixCls:i,...o,type:"radio",ref:t}))},yue=f.forwardRef(bue),Cr=V0;Cr.Button=yue;Cr.Group=vue;Cr.__ANT_RADIO=true;function Df(e){return Ht(e,{inputAffixPadding:e.paddingXXS})}const _f=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:c,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:m,controlPaddingHorizontal:p,colorFillAlter:g,colorPrimaryHover:b,colorPrimary:y,controlOutlineWidth:S,controlOutline:C,colorErrorOutline:w,colorWarningOutline:$,colorBgContainer:M,inputFontSize:T,inputFontSizeLG:R,inputFontSizeSM:I}=e,P=T||n,N=I||P,O=R||c,_=Math.round((t-P*r)/2*10)/10-o,L=Math.round((i-N*r)/2*10)/10-o,H=Math.ceil((a-O*u)/2*10)/10-o;return {paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(L,0),paddingBlockLG:Math.max(H,0),paddingInline:d-o,paddingInlineSM:m-o,paddingInlineLG:p-o,addonBg:g,activeBorderColor:y,hoverBorderColor:b,activeShadow:`0 0 0 ${S}px ${C}`,errorActiveShadow:`0 0 0 ${S}px ${w}`,warningActiveShadow:`0 0 0 ${S}px ${$}`,hoverBg:M,activeBg:M,inputFontSize:P,inputFontSizeLG:O,inputFontSizeSM:N}},Sue=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),a1=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...Sue(Ht(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),RR=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),kO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...RR(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),nF=(e,t)=>({"&-outlined":{...RR(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...a1(e)},...kO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...kO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),FO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Cue=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...FO(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...FO(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...a1(e)}}}}),rF=(e,t)=>{const{componentCls:n}=e;return {"&-borderless":{background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},oF=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),HO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...oF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),iF=(e,t)=>({"&-filled":{...oF(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...a1(e)},...HO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...HO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),VO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),xue=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...VO(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...VO(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),aF=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ie(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),jO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...aF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),sF=(e,t)=>({"&-underlined":{...aF(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...jO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...jO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),lF=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),TR=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return {padding:`${ie(t)} ${ie(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},AR=e=>({padding:`${ie(e.paddingBlockSM)} ${ie(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),s1=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ie(e.paddingBlock)} ${ie(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...lF(e.colorTextPlaceholder),"&-lg":{...TR(e),...t.largeStyle},"&-sm":{...AR(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),wue=e=>{const{componentCls:t,antCls:n}=e;return {position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...TR(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...AR(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ie(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${ie(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${ie(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...w0(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select, & > ${n}-select-auto-complete ${t}, & > ${n}-cascader-picker ${t}, & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, & > ${n}-select:first-child, & > ${n}-select-auto-complete:first-child ${t}, & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${n}-select:last-child, & > ${n}-cascader-picker:last-child ${t}, & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},$ue=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return {[t]:{...cn(e),...s1(e),...nF(e),...iF(e),...rF(e),...sF(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},Eue=e=>{const{componentCls:t}=e;return {[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ie(e.inputAffixPadding)}`}}}},Mue=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:c}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return {[u]:{...s1(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...Eue(e),[`${c}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${c}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},Rue=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return {[`${t}-group`]:{...cn(e),...wue(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...Cue(e),...xue(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},Tue=e=>{const{componentCls:t}=e;return {[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},cF=Ut(["Input","Shared"],e=>{const t=Ht(e,Df(e));return [$ue(t),Mue(t)]},_f,{resetFont:false}),uF=Ut(["Input","Component"],e=>{const t=Ht(e,Df(e));return [Rue(t),Tue(t),Af(t,{focus:true,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},_f,{resetFont:false});var Aue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function CE(){return CE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,CE({},e,{ref:t,icon:Aue})),dF=f.forwardRef(Nue);var Ym={exports:{}},UO;function Pue(){if(UO)return Ym.exports;UO=1,Ym.exports=r,Ym.exports.isMobile=r,Ym.exports.default=r;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(o){o||(o={});let i=o.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return false;let a=e.test(i)&&!t.test(i)||!!o.tablet&&n.test(i);return !a&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(a=true),a}return Ym.exports}var Iue=Pue();const Oue=Ao(Iue);let jx;const Due=(()=>(typeof jx>"u"&&(jx=Oue()),jx)),NR=f.createContext(null),_ue=e=>{const{activeTabOffset:t,horizontal:n,rtl:r,indicator:o={}}=e,{size:i,align:a="center"}=o,[c,u]=f.useState(),d=f.useRef(),m=W.useCallback(g=>typeof i=="function"?i(g):typeof i=="number"?i:g,[i]);function p(){Lt.cancel(d.current);}return f.useEffect(()=>{const g={};if(t)if(n){g.width=m(t.width);const b=r?"right":"left";a==="start"&&(g[b]=t[b]),a==="center"&&(g[b]=t[b]+t.width/2,g.transform=r?"translateX(50%)":"translateX(-50%)"),a==="end"&&(g[b]=t[b]+t.width,g.transform="translateX(-100%)");}else g.height=m(t.height),a==="start"&&(g.top=t.top),a==="center"&&(g.top=t.top+t.height/2,g.transform="translateY(-50%)"),a==="end"&&(g.top=t.top+t.height,g.transform="translateY(-100%)");return p(),d.current=Lt(()=>{c&&g&&Object.keys(g).every(y=>{const S=g[y],C=c[y];return typeof S=="number"&&typeof C=="number"?Math.round(S)===Math.round(C):S===C})||u(g);}),p},[JSON.stringify(t),n,r,a,m]),{style:c}},qO={width:0,height:0,left:0,top:0};function Lue(e,t,n){return f.useMemo(()=>{const r=new Map,o=t.get(e[0]?.key)||qO,i=o.left+o.width;for(let a=0;ar.key).join("_"),t,n])}function GO(e,t){const n=f.useRef(e),[,r]=f.useState({});function o(i){const a=typeof i=="function"?i(n.current):i;a!==n.current&&t(a,n.current),n.current=a,r({});}return [n.current,o]}const Bue=.1,WO=.01,qb=20,KO=.995**qb;function zue(e,t){const[n,r]=f.useState(),[o,i]=f.useState(0),[a,c]=f.useState(0),[u,d]=f.useState(),m=f.useRef();function p(w){const{screenX:$,screenY:M}=w.touches[0];r({x:$,y:M}),window.clearInterval(m.current);}function g(w){if(!n)return;const{screenX:$,screenY:M}=w.touches[0];r({x:$,y:M});const T=$-n.x,R=M-n.y;t(T,R);const I=Date.now();i(I),c(I-o),d({x:T,y:R});}function b(){if(n&&(r(null),d(null),u)){const w=u.x/a,$=u.y/a,M=Math.abs(w),T=Math.abs($);if(Math.max(M,T){if(Math.abs(R)I?(T=$,y.current="x"):(T=M,y.current="y"),t(-T,-T)&&w.preventDefault();}const C=f.useRef(null);C.current={onTouchStart:p,onTouchMove:g,onTouchEnd:b,onWheel:S},f.useEffect(()=>{function w(R){C.current.onTouchStart(R);}function $(R){C.current.onTouchMove(R);}function M(R){C.current.onTouchEnd(R);}function T(R){C.current.onWheel(R);}return document.addEventListener("touchmove",$,{passive:false}),document.addEventListener("touchend",M,{passive:true}),e.current.addEventListener("touchstart",w,{passive:true}),e.current.addEventListener("wheel",T,{passive:false}),()=>{document.removeEventListener("touchmove",$),document.removeEventListener("touchend",M);}},[]);}function fF(e){const[t,n]=f.useState(0),r=f.useRef(0),o=f.useRef();return o.current=e,Ib(()=>{o.current?.();},[t]),()=>{r.current===t&&(r.current+=1,n(r.current));}}function kue(e){const t=f.useRef([]),[,n]=f.useState({}),r=f.useRef(typeof e=="function"?e():e),o=fF(()=>{let a=r.current;t.current.forEach(c=>{a=c(a);}),t.current=[],r.current=a,n({});});function i(a){t.current.push(a),o();}return [r.current,i]}const YO={width:0,height:0,left:0,top:0,right:0};function Fue(e,t,n,r,o,i,{tabs:a,tabPosition:c,rtl:u}){let d,m,p;return ["top","bottom"].includes(c)?(d="width",m=u?"right":"left",p=Math.abs(n)):(d="height",m="top",p=-n),f.useMemo(()=>{if(!a.length)return [0,0];const g=a.length;let b=g;for(let S=0;SMath.floor(p+t)){b=S-1;break}}let y=0;for(let S=g-1;S>=0;S-=1)if((e.get(a[S].key)||YO)[m]b?[0,-1]:[y,b]},[e,t,r,o,i,p,c,a.map(g=>g.key).join("_"),u])}function XO(e){let t;return e instanceof Map?(t={},e.forEach((n,r)=>{t[r]=n;})):t=e,JSON.stringify(t)}const Hue="TABS_DQ";function mF(e){return String(e).replace(/"/g,Hue)}function PR(e,t,n,r){return !(!n||r||e===false||e===void 0&&(t===false||t===null))}const hF=f.forwardRef((e,t)=>{const{prefixCls:n,editable:r,locale:o,style:i}=e;return !r||r.showAdd===false?null:f.createElement("button",{ref:t,type:"button",className:`${n}-nav-add`,style:i,"aria-label":o?.addAriaLabel||"Add tab",onClick:a=>{r.onEdit("add",{event:a});}},r.addIcon||"+")}),QO=f.forwardRef((e,t)=>{const{position:n,prefixCls:r,extra:o}=e;if(!o)return null;let i,a={};return typeof o=="object"&&!f.isValidElement(o)?a=o:a.right=o,n==="right"&&(i=a.right),n==="left"&&(i=a.left),i?f.createElement("div",{className:`${r}-extra-content`,ref:t},i):null});function xE(){return xE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,id:r,tabs:o,locale:i,mobile:a,more:c={},style:u,className:d,editable:m,tabBarGutter:p,rtl:g,removeAriaLabel:b,onTabClick:y,getPopupContainer:S,popupClassName:C,popupStyle:w}=e,[$,M]=f.useState(false),[T,R]=f.useState(null),{icon:I="More"}=c,P=`${r}-more-popup`,N=`${n}-dropdown`,O=T!==null?`${P}-${T}`:null,_=i?.dropdownAriaLabel;function L(G,Y){G.preventDefault(),G.stopPropagation(),m.onEdit("remove",{key:Y,event:G});}const H=f.createElement(Of,{onClick:({key:G,domEvent:Y})=>{y(G,Y),M(false);},prefixCls:`${N}-menu`,id:P,tabIndex:-1,role:"listbox","aria-activedescendant":O,selectedKeys:[T],"aria-label":_!==void 0?_:"expanded dropdown"},o.map(G=>{const{closable:Y,disabled:Q,closeIcon:D,key:B,label:K}=G,J=PR(Y,D,m,Q);return f.createElement(Qp,{key:B,id:`${P}-${B}`,role:"option","aria-controls":r&&`${r}-panel-${B}`,disabled:Q},f.createElement("span",null,K),J&&f.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:`${N}-menu-item-remove`,onClick:ee=>{ee.stopPropagation(),L(ee,B);}},D||m.removeIcon||"×"))}));function U(G){const Y=o.filter(B=>!B.disabled);let Q=Y.findIndex(B=>B.key===T)||0;const D=Y.length;for(let B=0;B{const G=document.getElementById(O);G?.scrollIntoView&&G.scrollIntoView(false);},[O,T]),f.useEffect(()=>{$||R(null);},[$]);const V={marginInlineStart:p};o.length||(V.visibility="hidden",V.order=1);const z=X(C,{[`${N}-rtl`]:g}),F=a?null:f.createElement(D7,xE({prefixCls:N,overlay:H,visible:o.length?$:false,onVisibleChange:M,overlayClassName:z,overlayStyle:w,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:S},c),f.createElement("button",{type:"button",className:`${n}-nav-more`,style:V,"aria-haspopup":"listbox","aria-controls":P,id:`${r}-more`,"aria-expanded":$,onKeyDown:q},I));return f.createElement("div",{className:X(`${n}-nav-operations`,d),style:u,ref:t},F,f.createElement(hF,{prefixCls:n,locale:i,editable:m}))}),jue=f.memo(Vue,(e,t)=>t.tabMoving),Uue=e=>{const{prefixCls:t,id:n,active:r,focus:o,tab:{key:i,label:a,disabled:c,closeIcon:u,icon:d},closable:m,renderWrapper:p,removeAriaLabel:g,editable:b,onClick:y,onFocus:S,onBlur:C,onKeyDown:w,onMouseDown:$,onMouseUp:M,style:T,className:R,tabCount:I,currentPosition:P}=e,N=`${t}-tab`,O=PR(m,u,b,c);function _(V){c||y(V);}function L(V){V.preventDefault(),V.stopPropagation(),b.onEdit("remove",{key:i,event:V});}const H=f.useMemo(()=>d&&typeof a=="string"?f.createElement("span",null,a):a,[a,d]),U=f.useRef(null);f.useEffect(()=>{o&&U.current&&U.current.focus();},[o]);const q=f.createElement("div",{key:i,"data-node-key":mF(i),className:X(N,R,{[`${N}-with-remove`]:O,[`${N}-active`]:r,[`${N}-disabled`]:c,[`${N}-focus`]:o}),style:T,onClick:_},f.createElement("div",{ref:U,role:"tab","aria-selected":r,id:n&&`${n}-tab-${i}`,className:`${N}-btn`,"aria-controls":n&&`${n}-panel-${i}`,"aria-disabled":c,tabIndex:c?null:r?0:-1,onClick:V=>{V.stopPropagation(),_(V);},onKeyDown:w,onMouseDown:$,onMouseUp:M,onFocus:S,onBlur:C},o&&f.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${P} of ${I}`),d&&f.createElement("span",{className:`${N}-icon`},d),a&&H),O&&f.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:r?0:-1,className:`${N}-remove`,onClick:V=>{V.stopPropagation(),L(V);}},u||b.removeIcon||"×"));return p?p(q):q};function wE(){return wE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{offsetWidth:n,offsetHeight:r,offsetTop:o,offsetLeft:i}=e,{width:a,height:c,left:u,top:d}=e.getBoundingClientRect();return Math.abs(a-n)<1?[a,c,u-t.left,d-t.top]:[n,r,i,o]},wd=e=>{const{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){const{width:r,height:o}=e.current.getBoundingClientRect();if(Math.abs(r-t)<1)return [r,o]}return [t,n]},ib=(e,t)=>e[t?0:1],ZO=f.forwardRef((e,t)=>{const{className:n,style:r,id:o,animated:i,activeKey:a,rtl:c,extra:u,editable:d,locale:m,tabPosition:p,tabBarGutter:g,children:b,onTabClick:y,onTabScroll:S,indicator:C,classNames:w,styles:$}=e,{prefixCls:M,tabs:T}=f.useContext(NR),R=f.useRef(null),I=f.useRef(null),P=f.useRef(null),N=f.useRef(null),O=f.useRef(null),_=f.useRef(null),L=f.useRef(null),H=p==="top"||p==="bottom",[U,q]=GO(0,(pe,Ie)=>{H&&S&&S({direction:pe>Ie?"left":"right"});}),[V,z]=GO(0,(pe,Ie)=>{!H&&S&&S({direction:pe>Ie?"top":"bottom"});}),[F,G]=f.useState([0,0]),[Y,Q]=f.useState([0,0]),[D,B]=f.useState([0,0]),[K,J]=f.useState([0,0]),[ee,te]=kue(new Map),ne=Lue(T,ee,Y[0]),ae=ib(F,H),oe=ib(Y,H),re=ib(D,H),ce=ib(K,H),he=Math.floor(ae)de?de:pe}const be=f.useRef(null),[He,Ue]=f.useState();function Pe(){Ue(Date.now());}function ue(){be.current&&clearTimeout(be.current);}zue(N,(pe,Ie)=>{function $e(Le,Ye){Le(it=>Se(it+Ye));}return he?(H?$e(q,pe):$e(z,Ie),ue(),Pe(),true):false}),f.useEffect(()=>(ue(),He&&(be.current=setTimeout(()=>{Ue(0);},100)),ue),[He]);const[ye,Te]=Fue(ne,me,H?U:V,oe,re,ce,{...e,tabs:T}),qe=Rt((pe=a)=>{const Ie=ne.get(pe)||{width:0,height:0,left:0,right:0,top:0};if(H){let $e=U;c?Ie.rightU+me&&($e=Ie.right+Ie.width-me):Ie.left<-U?$e=-Ie.left:Ie.left+Ie.width>-U+me&&($e=-(Ie.left+Ie.width-me)),z(0),q(Se($e));}else {let $e=V;Ie.top<-V?$e=-Ie.top:Ie.top+Ie.height>-V+me&&($e=-(Ie.top+Ie.height-me)),q(0),z(Se($e));}}),[Ze,We]=f.useState(),[tt,nt]=f.useState(false),Ke=T.filter(pe=>!pe.disabled).map(pe=>pe.key),Oe=pe=>{const Ie=Ke.indexOf(Ze||a),$e=Ke.length,Le=(Ie+pe+$e)%$e,Ye=Ke[Le];We(Ye);},Qe=(pe,Ie)=>{const $e=Ke.indexOf(pe),Le=T.find(it=>it.key===pe);PR(Le?.closable,Le?.closeIcon,d,Le?.disabled)&&(Ie.preventDefault(),Ie.stopPropagation(),d.onEdit("remove",{key:pe,event:Ie}),$e===Ke.length-1?Oe(-1):Oe(1));},Xe=(pe,Ie)=>{nt(true),Ie.button===1&&Qe(pe,Ie);},_e=pe=>{const{code:Ie}=pe,$e=c&&H,Le=Ke[0],Ye=Ke[Ke.length-1];switch(Ie){case "ArrowLeft":{H&&Oe($e?1:-1);break}case "ArrowRight":{H&&Oe($e?-1:1);break}case "ArrowUp":{pe.preventDefault(),H||Oe(-1);break}case "ArrowDown":{pe.preventDefault(),H||Oe(1);break}case "Home":{pe.preventDefault(),We(Le);break}case "End":{pe.preventDefault(),We(Ye);break}case "Enter":case "Space":{pe.preventDefault(),y(Ze??a,pe);break}case "Backspace":case "Delete":{Qe(Ze,pe);break}}},ze={};H?ze.marginInlineStart=g:ze.marginTop=g;const ct=T.map((pe,Ie)=>{const{key:$e}=pe;return f.createElement(Uue,{id:o,prefixCls:M,key:$e,tab:pe,className:w?.item,style:Ie===0?$?.item:{...ze,...$?.item},closable:pe.closable,editable:d,active:$e===a,focus:$e===Ze,renderWrapper:b,removeAriaLabel:m?.removeAriaLabel,tabCount:Ke.length,currentPosition:Ie+1,onClick:Le=>{y($e,Le);},onKeyDown:_e,onFocus:()=>{tt||We($e),qe($e),Pe(),N.current&&(c||(N.current.scrollLeft=0),N.current.scrollTop=0);},onBlur:()=>{We(void 0);},onMouseDown:Le=>Xe($e,Le),onMouseUp:()=>{nt(false);}})}),Pt=()=>te(()=>{const pe=new Map,Ie=O.current?.getBoundingClientRect();return T.forEach(({key:$e})=>{const Le=O.current?.querySelector(`[data-node-key="${mF($e)}"]`);if(Le){const[Ye,it,ht,$t]=que(Le,Ie);pe.set($e,{width:Ye,height:it,left:ht,top:$t});}}),pe});f.useEffect(()=>{Pt();},[T.map(pe=>pe.key).join("_")]);const ut=fF(()=>{const pe=wd(R),Ie=wd(I),$e=wd(P);G([pe[0]-Ie[0]-$e[0],pe[1]-Ie[1]-$e[1]]);const Le=wd(L);B(Le);const Ye=wd(_);J(Ye);const it=wd(O);Q([it[0]-Le[0],it[1]-Le[1]]),Pt();}),Dt=T.slice(0,ye),wt=T.slice(Te+1),Tt=[...Dt,...wt],gt=ne.get(a),{style:ft}=_ue({activeTabOffset:gt,horizontal:H,indicator:C,rtl:c});f.useEffect(()=>{qe();},[a,se,de,XO(gt),XO(ne),H]),f.useEffect(()=>{ut();},[c]);const st=!!Tt.length,Fe=`${M}-nav-wrap`;let Ge,ve,Ae,Ce;return H?c?(ve=U>0,Ge=U!==de):(Ge=U<0,ve=U!==se):(Ae=V<0,Ce=V!==se),f.createElement(da,{onResize:ut},f.createElement("div",{ref:Xl(t,R),role:"tablist","aria-orientation":H?"horizontal":"vertical",className:X(`${M}-nav`,n,w?.header),style:{...$?.header,...r},onKeyDown:()=>{Pe();}},f.createElement(QO,{ref:I,position:"left",extra:u,prefixCls:M}),f.createElement(da,{onResize:ut},f.createElement("div",{className:X(Fe,{[`${Fe}-ping-left`]:Ge,[`${Fe}-ping-right`]:ve,[`${Fe}-ping-top`]:Ae,[`${Fe}-ping-bottom`]:Ce}),ref:N},f.createElement(da,{onResize:ut},f.createElement("div",{ref:O,className:`${M}-nav-list`,style:{transform:`translate(${U}px, ${V}px)`,transition:He?"none":void 0}},ct,f.createElement(hF,{ref:L,prefixCls:M,locale:m,editable:d,style:{...ct.length===0?void 0:ze,visibility:st?"hidden":null}}),f.createElement("div",{className:X(`${M}-ink-bar`,w?.indicator,{[`${M}-ink-bar-animated`]:i.inkBar}),style:{...ft,...$?.indicator}}))))),f.createElement(jue,wE({},e,{removeAriaLabel:m?.removeAriaLabel,ref:_,prefixCls:M,tabs:Tt,className:!st&&Re,popupStyle:$?.popup,tabMoving:!!He})),f.createElement(QO,{ref:P,position:"right",extra:u,prefixCls:M})))}),Gue=({renderTabBar:e,...t})=>e?e(t,ZO):f.createElement(ZO,t),Wue=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,id:i,active:a,tabKey:c,children:u}=e,d=f.Children.count(u)>0;return f.createElement("div",{id:i&&`${i}-panel-${c}`,role:"tabpanel",tabIndex:a&&d?0:-1,"aria-labelledby":i&&`${i}-tab-${c}`,"aria-hidden":!a,style:o,className:X(n,a&&`${n}-active`,r),ref:t},u)});function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:t,activeKey:n,animated:r,tabPosition:o,destroyOnHidden:i,contentStyle:a,contentClassName:c}=e,{prefixCls:u,tabs:d}=f.useContext(NR),m=r.tabPane,p=`${u}-tabpane`;return f.createElement("div",{className:X(`${u}-content-holder`)},f.createElement("div",{className:X(`${u}-content`,`${u}-content-${o}`,{[`${u}-content-animated`]:m})},d.map(g=>{const{key:b,forceRender:y,style:S,className:C,destroyOnHidden:w,...$}=g,M=b===n;return f.createElement(vo,j0({key:b,visible:M,forceRender:y,removeOnLeave:!!(i??w),leavedClassName:`${p}-hidden`},r.tabPaneMotion),({style:T,className:R},I)=>f.createElement(Wue,j0({},$,{prefixCls:p,id:t,tabKey:b,animated:m,active:M,style:{...a,...S,...T},className:X(c,C,R),ref:I})))})))};function Yue(e={inkBar:true,tabPane:false}){let t;return e===false?t={inkBar:false,tabPane:false}:e===true?t={inkBar:true,tabPane:false}:t={inkBar:true,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=true),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=false),t}function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:n,prefixCls:r="rc-tabs",className:o,items:i,direction:a,activeKey:c,defaultActiveKey:u,editable:d,animated:m,tabPosition:p="top",tabBarGutter:g,tabBarStyle:b,tabBarExtraContent:y,locale:S,more:C,destroyOnHidden:w,renderTabBar:$,onChange:M,onTabClick:T,onTabScroll:R,getPopupContainer:I,popupClassName:P,indicator:N,classNames:O,styles:_,...L}=e,H=f.useMemo(()=>(i||[]).filter(ne=>ne&&typeof ne=="object"&&"key"in ne),[i]),U=a==="rtl",q=Yue(m),[V,z]=f.useState(false);f.useEffect(()=>{z(Due());},[]);const[F,G]=dn(u??H[0]?.key,c),[Y,Q]=f.useState(()=>H.findIndex(ne=>ne.key===F));f.useEffect(()=>{let ne=H.findIndex(ae=>ae.key===F);ne===-1&&(ne=Math.max(0,Math.min(Y,H.length-1)),G(H[ne]?.key)),Q(ne);},[H.map(ne=>ne.key).join("_"),F,Y]);const[D,B]=dn(null,n);f.useEffect(()=>{n||(B(`rc-tabs-${JO}`),JO+=1);},[]);function K(ne,ae){T?.(ne,ae);const oe=ne!==F;G(ne),oe&&M?.(ne);}const J={id:D,activeKey:F,animated:q,tabPosition:p,rtl:U,mobile:V},ee={...J,editable:d,locale:S,more:C,tabBarGutter:g,onTabClick:K,onTabScroll:R,extra:y,style:b,getPopupContainer:I,popupClassName:X(P,O?.popup),indicator:N,styles:_,classNames:O},te=f.useMemo(()=>({tabs:H,prefixCls:r}),[H,r]);return f.createElement(NR.Provider,{value:te},f.createElement("div",Ph({ref:t,id:n,className:X(r,`${r}-${p}`,{[`${r}-mobile`]:V,[`${r}-editable`]:d,[`${r}-rtl`]:U},o)},L),f.createElement(Gue,Ph({},ee,{renderTabBar:$})),f.createElement(Kue,Ph({destroyOnHidden:w},J,{contentStyle:_?.content,contentClassName:O?.content,animated:q}))))}),Que={motionAppear:false,motionEnter:true,motionLeave:true};function Zue(e,t={inkBar:true,tabPane:false}){let n;return t===false?n={inkBar:false,tabPane:false}:t===true?n={inkBar:true,tabPane:true}:n={inkBar:true,...typeof t=="object"?t:{}},n.tabPane&&(n.tabPaneMotion={...Que,motionName:Bl(e,"switch")}),n}function Jue(e){return e.filter(t=>t)}function ede(e,t){if(e)return e.map(r=>({...r,destroyOnHidden:r.destroyOnHidden??r.destroyInactiveTabPane}));const n=Ko(t).map(r=>{if(f.isValidElement(r)){const{key:o,props:i}=r,{tab:a,...c}=i||{};return {key:String(o),...c,label:a}}return null});return Jue(n)}const tde=e=>{const{componentCls:t,motionDurationSlow:n}=e;return [{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[zl(e,"slide-up"),zl(e,"slide-down")]]},nde=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:i,itemSelectedColor:a}=e;return {[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${ie(e.lineWidth)} ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:ha(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:true,value:ie(o)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${ie(e.borderRadiusLG)} ${ie(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${ie(e.borderRadiusLG)} ${ie(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:ie(o)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:true,value:`${ie(e.borderRadiusLG)} 0 0 ${ie(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:true,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:true,value:`0 ${ie(e.borderRadiusLG)} ${ie(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:true,value:e.colorBgContainer}}}}}}},rde=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return {[`${t}-dropdown`]:{...cn(e),position:"absolute",top:-9999,left:{_skip_check_:true,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${ie(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:true,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...ja,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${ie(e.paddingXXS)} ${ie(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:true,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},ode=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:i,verticalItemMargin:a,calc:c}=e;return {[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:true,value:0},left:{_skip_check_:true,value:0},borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:true,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:true,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:i,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:true,value:0},left:{_skip_check_:true,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:true,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:true,value:ie(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:true,value:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:true,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:true,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:true,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:true,value:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:true,value:e.paddingLG}}}}}},ide=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:o,cardHeightLG:i,horizontalItemPaddingSM:a,horizontalItemPaddingLG:c}=e;return {[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${ie(e.borderRadius)} ${ie(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${ie(e.borderRadius)} ${ie(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:true,value:`0 ${ie(e.borderRadius)} ${ie(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:true,value:`${ie(e.borderRadius)} 0 0 ${ie(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:i,minHeight:i}}}}}},ade=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:i,horizontalItemPadding:a,itemSelectedColor:c,itemColor:u}=e,d=`${t}-tab`;return {[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:u,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:true,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:true,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Si(e)},"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:c},[`&${d}-focus ${d}-btn:focus-visible`]:ha(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${o}`]:{margin:0,verticalAlign:"middle"},[`${o}:not(:last-child)`]:{marginRight:{_skip_check_:true,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:true,value:i}}}},sde=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:o,calc:i}=e;return {[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:true,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:true,value:0}},[r]:{marginRight:{_skip_check_:true,value:0},marginLeft:{_skip_check_:true,value:ie(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:true,value:ie(e.marginXS)},marginLeft:{_skip_check_:true,value:ie(i(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:true,value:o},marginLeft:{_skip_check_:true,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:true,value:"right"}}}}},lde=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:a,colorBorderSecondary:c}=e;return {[t]:{...cn(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:true,value:0},bottom:0,left:{_skip_check_:true,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:true,value:o},background:"transparent",border:`${ie(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${ie(e.borderRadiusLG)} ${ie(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a},...Si(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...ade(e),[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Si(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},cde=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:o,controlHeightLG:i}=e,a=t||i,c=n||o,u=r||i+8;return {zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:c,cardHeightLG:u,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(u-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},ude=Ut("Tabs",e=>{const t=Ht(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ie(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${ie(e.horizontalItemGutter)}`});return [ide(t),sde(t),ode(t),rde(t),nde(t),lde(t),tde(t)]},cde),dde=()=>null,fde=f.forwardRef((e,t)=>{const{type:n,className:r,rootClassName:o,size:i,onEdit:a,hideAdd:c,centered:u,addIcon:d,removeIcon:m,moreIcon:p,more:g,popupClassName:b,children:y,items:S,animated:C,style:w,indicatorSize:$,indicator:M,classNames:T,styles:R,destroyInactiveTabPane:I,destroyOnHidden:P,tabPlacement:N,tabPosition:O,..._}=e,{prefixCls:L}=_,{getPrefixCls:H,direction:U,getPopupContainer:q,className:V,style:z,classNames:F,styles:G}=Wt("tabs"),{tabs:Y}=f.useContext(xt),Q=H("tabs",L),D=Kn(Q),[B,K]=ude(Q,D),J=f.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:J.current}));let ee;n==="editable-card"&&(ee={onEdit:(se,{key:de,event:Se})=>{a?.(se==="add"?Se:de,se);},removeIcon:m??Y?.removeIcon??f.createElement(Os,null),addIcon:(d??Y?.addIcon)||f.createElement(dF,null),showAdd:c!==true});const te=H(),ne=io(i),ae=ede(S,y),oe=Zue(Q,C),re={align:M?.align??Y?.indicator?.align,size:M?.size??$??Y?.indicator?.size??Y?.indicatorSize},ce=f.useMemo(()=>{const se=N??O??void 0,de=U==="rtl";switch(se){case "start":return de?"right":"left";case "end":return de?"left":"right";default:return se}},[N,O,U]),he={...e,size:ne,tabPlacement:ce,items:ae},[me,Re]=Xt([F,T],[G,R],{props:he},{popup:{_default:"root"}});return f.createElement(Xue,{ref:J,direction:U,getPopupContainer:q,..._,items:ae,className:X({[`${Q}-${ne}`]:ne,[`${Q}-card`]:["card","editable-card"].includes(n),[`${Q}-editable-card`]:n==="editable-card",[`${Q}-centered`]:u},V,r,o,me.root,B,K,D),classNames:{...me,popup:X(b,B,K,D,me.popup?.root)},styles:Re,style:{...Re.root,...z,...w},editable:ee,more:{icon:Y?.more?.icon??Y?.moreIcon??p??f.createElement(MR,null),transitionName:`${te}-slide-up`,...g},prefixCls:Q,animated:oe,indicator:re,destroyOnHidden:P??I,tabPosition:ce})}),IR=fde;IR.TabPane=dde;function mde(e,t){if(e==null)return {};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r];}return n}function pF(e,t){if(e==null)return {};var n,r,o=mde(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;re?c?(g=Date.now(),i||(m=setTimeout(d?I:R,e))):R():i!==true&&(m=setTimeout(d?I:R,d===void 0?e-T:e));}return S.cancel=y,S}function pde(e,t,n){var r={},o=r.atBegin,i=o===void 0?false:o;return hde(e,t,{debounceMode:i!==false})}const gde=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return [{[`${t}-group`]:{...cn(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[n]:{...cn(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...cn(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:ha(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${ie(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${n}:not(${n}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` ${n}-checked:not(${n}-disabled), ${t}-checked:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function vde(e,t){const n=Ht(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return gde(n)}const gF=Ut("Checkbox",(e,{prefixCls:t})=>[vde(t,e)]),vF=W.createContext(null),bde=(e,t)=>{const{prefixCls:n,className:r,rootClassName:o,children:i,indeterminate:a=false,style:c,onMouseEnter:u,onMouseLeave:d,skipGroup:m=false,disabled:p,classNames:g,styles:b,...y}=e,{getPrefixCls:S,direction:C,className:w,style:$,classNames:M,styles:T}=Wt("checkbox"),R=f.useContext(vF),{isFormItemInput:I}=f.useContext(go),P=f.useContext(eo),N=(R?.disabled||p)??P,O={...e,indeterminate:a,disabled:N},[_,L]=Xt([M,g],[T,b],{props:O}),H=f.useRef(y.value),U=f.useRef(null),q=Ar(t,U);f.useEffect(()=>{R?.registerValue(y.value);},[]),f.useEffect(()=>{if(!m)return y.value!==H.current&&(R?.cancelValue(H.current),R?.registerValue(y.value),H.current=y.value),()=>R?.cancelValue(y.value)},[y.value]),f.useEffect(()=>{U.current?.input&&(U.current.input.indeterminate=a);},[a]);const V=S("checkbox",n),z=Kn(V),[F,G]=gF(V,z),Y={...y};R&&!m&&(Y.onChange=(...J)=>{y.onChange&&y.onChange.apply(y,J),R.toggleOption&&R.toggleOption({label:i,value:y.value});},Y.name=R.name,Y.checked=R.value.includes(y.value));const Q=X(`${V}-wrapper`,{[`${V}-rtl`]:C==="rtl",[`${V}-wrapper-checked`]:Y.checked,[`${V}-wrapper-disabled`]:N,[`${V}-wrapper-in-form-item`]:I},w,r,_.root,o,G,z,F),D=X(_.icon,{[`${V}-indeterminate`]:a},Yy,F),[B,K]=eF(Y.onClick);return f.createElement(Vp,{component:"Checkbox",disabled:N},f.createElement("label",{className:Q,style:{...L.root,...$,...c},onMouseEnter:u,onMouseLeave:d,onClick:B},f.createElement(J7,{...Y,onClick:K,prefixCls:V,className:D,style:L.icon,disabled:N,ref:q}),Qr(i)&&f.createElement("span",{className:X(`${V}-label`,_.label),style:L.label},i)))},bF=f.forwardRef(bde),yde=f.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:o=[],prefixCls:i,className:a,rootClassName:c,style:u,onChange:d,role:m="group",...p}=e,{getPrefixCls:g,direction:b}=f.useContext(xt),[y,S]=f.useState(p.value||n||[]),[C,w]=f.useState([]);f.useEffect(()=>{"value"in p&&S(p.value||[]);},[p.value]);const $=f.useMemo(()=>o.map(V=>typeof V=="string"||typeof V=="number"?{label:V,value:V}:V),[o]),M=V=>{w(z=>z.filter(F=>F!==V));},T=V=>{w(z=>[].concat(Yt(z),[V]));},R=V=>{const z=y.indexOf(V.value),F=Yt(y);z===-1?F.push(V.value):F.splice(z,1),"value"in p||S(F),d?.(F.filter(G=>C.includes(G)).sort((G,Y)=>{const Q=$.findIndex(B=>B.value===G),D=$.findIndex(B=>B.value===Y);return Q-D}));},I=g("checkbox",i),P=`${I}-group`,N=Kn(I),[O,_]=gF(I,N),L=Ln(p,["value","disabled"]),H=o.length?$.map(V=>f.createElement(bF,{prefixCls:I,key:V.value.toString(),disabled:"disabled"in V?V.disabled:p.disabled,value:V.value,checked:y.includes(V.value),onChange:V.onChange,className:X(`${P}-item`,V.className),style:V.style,title:V.title,id:V.id,required:V.required},V.label)):r,U=f.useMemo(()=>({toggleOption:R,value:y,disabled:p.disabled,name:p.name,registerValue:T,cancelValue:M}),[R,y,p.disabled,p.name,T,M]),q=X(P,{[`${P}-rtl`]:b==="rtl"},a,c,_,N,O);return f.createElement("div",{className:q,style:u,role:m,...L,ref:t},f.createElement(vF.Provider,{value:U},H))}),Wi=bF;Wi.Group=yde;Wi.__ANT_CHECKBOX=true;const Sde=e=>{const{componentCls:t}=e;return {[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},Cde=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:c}=e,u=`${t}-rail`;return {[t]:{...cn(e),borderBlockStart:`${ie(o)} solid ${r}`,[u]:{borderBlockStart:`${ie(o)} solid ${r}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ie(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ie(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${ie(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,[`${u}-start, ${u}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${u}-start`]:{width:`calc(${a} * 100%)`},[`${u}-end`]:{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${u}-start`]:{width:`calc(100% - ${a} * 100%)`},[`${u}-end`]:{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${ie(o)} 0 0`,[u]:{borderBlockStart:`${ie(o)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${u}-start, ${u}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${ie(o)} 0 0`,[u]:{borderBlockStart:`${ie(o)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${u}-start`]:{width:0},[`${u}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${u}-start`]:{width:"100%"},[`${u}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},xde=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),wde=Ut("Divider",e=>{const t=Ht(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return [Cde(t),Sde(t)]},xde,{unitless:{orientationMargin:true}}),$de=["left","right","center","start","end"],Ede={small:"sm",middle:"md"},Hl=e=>{const{getPrefixCls:t,direction:n,className:r,style:o,classNames:i,styles:a}=Wt("divider"),{prefixCls:c,type:u,orientation:d,vertical:m,titlePlacement:p,orientationMargin:g,className:b,rootClassName:y,children:S,dashed:C,variant:w="solid",plain:$,style:M,size:T,classNames:R,styles:I,...P}=e,N=t("divider",c),O=`${N}-rail`,[_,L]=wde(N),H=io(T),U=Ede[H],q=!!S,V=$de.includes(d||""),z=f.useMemo(()=>{const ne=p??(V?d:"center");return ne==="left"?n==="rtl"?"end":"start":ne==="right"?n==="rtl"?"start":"end":ne},[n,d,p,V]),F=z==="start"&&g!=null,G=z==="end"&&g!=null,[Y,Q]=yu(d,m,u),D={...e,orientation:Y,titlePlacement:z,size:H},[B,K]=Xt([i,R],[a,I],{props:D}),J=X(N,r,_,L,`${N}-${Y}`,{[`${N}-with-text`]:q,[`${N}-with-text-${z}`]:q,[`${N}-dashed`]:!!C,[`${N}-${w}`]:w!=="solid",[`${N}-plain`]:!!$,[`${N}-rtl`]:n==="rtl",[`${N}-no-default-orientation-margin-start`]:F,[`${N}-no-default-orientation-margin-end`]:G,[`${N}-${U}`]:!!U,[O]:!S,[B.rail]:B.rail&&!S},b,y,B.root),ee=f.useMemo(()=>typeof g=="number"?g:/^\d+$/.test(g)?Number(g):g,[g]),te={marginInlineStart:F?ee:void 0,marginInlineEnd:G?ee:void 0};return f.createElement("div",{className:J,style:{...o,...K.root,...S?{}:K.rail,...M},...P,role:"separator"},S&&!Q&&f.createElement(f.Fragment,null,f.createElement("div",{className:X(O,`${O}-start`,B.rail),style:K.rail}),f.createElement("span",{className:X(`${N}-inner-text`,B.content),style:{...te,...K.content}},S),f.createElement("div",{className:X(O,`${O}-end`,B.rail),style:K.rail})))},e8=(e,t)=>{if(!e)return null;const n={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:n.top,bottom:n.bottom,height:n.height}:{left:n.left,right:n.right,width:n.width,top:0,bottom:0,height:0}},Aa=e=>e!==void 0?`${e}px`:void 0;function Mde(e){const{prefixCls:t,containerRef:n,value:r,getValueIndex:o,motionName:i,onMotionStart:a,onMotionEnd:c,direction:u,vertical:d=false}=e,m=f.useRef(null),[p,g]=f.useState(r),b=P=>{const N=o(P),O=n.current?.querySelectorAll(`.${t}-item`)[N];return O?.offsetParent&&O},[y,S]=f.useState(null),[C,w]=f.useState(null);Mn(()=>{if(p!==r){const P=b(p),N=b(r),O=e8(P,d),_=e8(N,d);g(r),S(O),w(_),P&&N?a():c();}},[r]);const $=f.useMemo(()=>Aa(d?y?.top??0:u==="rtl"?-y?.right:y?.left),[d,u,y]),M=f.useMemo(()=>Aa(d?C?.top??0:u==="rtl"?-C?.right:C?.left),[d,u,C]),T=()=>d?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},R=()=>d?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},I=()=>{S(null),w(null),c();};return !y||!C?null:f.createElement(vo,{visible:true,motionName:i,motionAppear:true,onAppearStart:T,onAppearActive:R,onVisibleChanged:I},({className:P,style:N},O)=>{const _={...N,"--thumb-start-left":$,"--thumb-start-width":Aa(y?.width),"--thumb-active-left":M,"--thumb-active-width":Aa(C?.width),"--thumb-start-top":$,"--thumb-start-height":Aa(y?.height),"--thumb-active-top":M,"--thumb-active-height":Aa(C?.height)},L={ref:Ar(m,O),style:_,className:X(`${t}-thumb`,P)};return f.createElement("div",L)})}function Rde(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function Tde(e){return e.map(t=>{if(typeof t=="object"&&t!==null){const n=Rde(t);return {...t,title:n}}return {label:t?.toString(),title:t?.toString(),value:t}})}const Ade=({prefixCls:e,className:t,style:n,styles:r,classNames:o,data:i,disabled:a,checked:c,label:u,title:d,value:m,name:p,onChange:g,onFocus:b,onBlur:y,onKeyDown:S,onKeyUp:C,onMouseDown:w,itemRender:$=M=>M})=>{const M=R=>{a||g(R,m);},T=f.createElement("label",{className:X(t,{[`${e}-item-disabled`]:a}),style:n,onMouseDown:w},f.createElement("input",{name:p,className:`${e}-item-input`,type:"radio",disabled:a,checked:c,onChange:M,onFocus:b,onBlur:y,onKeyDown:S,onKeyUp:C}),f.createElement("div",{className:X(`${e}-item-label`,o?.label),title:d,style:r?.label},u));return $(T,{item:i})},Nde=f.forwardRef((e,t)=>{const{prefixCls:n="rc-segmented",direction:r,vertical:o,options:i=[],disabled:a,defaultValue:c,value:u,name:d,onChange:m,className:p="",style:g,styles:b,classNames:y,motionName:S="thumb-motion",itemRender:C,...w}=e,$=f.useRef(null),M=f.useMemo(()=>Ar($,t),[$,t]),T=f.useMemo(()=>Tde(i),[i]),[R,I]=dn(c??T[0]?.value,u),[P,N]=f.useState(false),O=(B,K)=>{I(K),m?.(K);},_=Ln(w,["children"]),[L,H]=f.useState(false),[U,q]=f.useState(false),V=()=>{q(true);},z=()=>{q(false);},F=()=>{H(false);},G=B=>{B.key==="Tab"&&H(true);},Y=B=>{const K=T.findIndex(ne=>ne.value===R),J=T.length,ee=(K+B+J)%J,te=T[ee];te&&(I(te.value),m?.(te.value));},Q=B=>{switch(B.key){case "ArrowLeft":case "ArrowUp":Y(-1);break;case "ArrowRight":case "ArrowDown":Y(1);break}},D=B=>{const{value:K,disabled:J}=B;return f.createElement(Ade,ir({},B,{name:d,data:B,itemRender:C,key:K,prefixCls:n,className:X(B.className,`${n}-item`,y?.item,{[`${n}-item-selected`]:K===R&&!P,[`${n}-item-focused`]:U&&L&&K===R}),style:b?.item,classNames:y,styles:b,checked:K===R,onChange:O,onFocus:V,onBlur:z,onKeyDown:Q,onKeyUp:G,onMouseDown:F,disabled:!!a||!!J}))};return f.createElement("div",ir({role:"radiogroup","aria-label":"segmented control",tabIndex:a?void 0:0,"aria-orientation":o?"vertical":"horizontal",style:g},_,{className:X(n,{[`${n}-rtl`]:r==="rtl",[`${n}-disabled`]:a,[`${n}-vertical`]:o},p),ref:M}),f.createElement("div",{className:`${n}-group`},f.createElement(Mde,{vertical:o,prefixCls:n,value:R,containerRef:$,motionName:`${n}-${S}`,direction:r,getValueIndex:B=>T.findIndex(K=>K.value===B),onMotionStart:()=>{N(true);},onMotionEnd:()=>{N(false);}}),T.map(D)))}),Pde=Nde;function t8(e,t){return {[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function n8(e){return {background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const Ide={overflow:"hidden",...ja},Ode=e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),o=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return {[t]:{...cn(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...Si(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${ie(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...n8(e),color:e.itemSelectedColor},"&-focused":ha(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:n,lineHeight:ie(n),padding:`0 ${ie(e.segmentedPaddingHorizontal)}`,...Ide},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...n8(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${ie(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:ie(r),padding:`0 ${ie(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:o,lineHeight:ie(o),padding:`0 ${ie(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...t8(`&-disabled ${t}-item`,e),...t8(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}},Dde=e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:c}=e;return {trackPadding:a,trackBg:c,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},_de=Ut("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=Ht(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return Ode(r)},Dde);function Lde(e){return typeof e=="object"&&!!e?.icon}const Bde=f.forwardRef((e,t)=>{const n=Zl(),{prefixCls:r,className:o,rootClassName:i,block:a,options:c=[],size:u="middle",style:d,vertical:m,orientation:p,shape:g="default",name:b=n,styles:y,classNames:S,...C}=e,{getPrefixCls:w,direction:$,className:M,style:T,classNames:R,styles:I}=Wt("segmented"),P={...e,options:c,size:u,shape:g},[N,O]=Xt([R,S],[I,y],{props:P}),_=w("segmented",r),[L,H]=_de(_),U=io(u),q=f.useMemo(()=>c.map(Y=>{if(Lde(Y)){const{icon:Q,label:D,...B}=Y;return {...B,label:f.createElement(f.Fragment,null,f.createElement("span",{className:X(`${_}-item-icon`,N.icon),style:O.icon},Q),D&&f.createElement("span",null,D))}}return Y}),[c,_,N.icon,O.icon]),[,V]=yu(p,m),z=X(o,i,M,N.root,{[`${_}-block`]:a,[`${_}-sm`]:U==="small",[`${_}-lg`]:U==="large",[`${_}-vertical`]:V,[`${_}-shape-${g}`]:g==="round"},L,H),F={...O.root,...T,...d},G=(Y,{item:Q})=>{if(!Q.tooltip)return Y;const D=typeof Q.tooltip=="object"?Q.tooltip:{title:Q.tooltip};return f.createElement(ec,{...D},Y)};return f.createElement(Pde,{...C,name:b,className:z,style:F,classNames:N,styles:O,itemRender:G,options:q,ref:t,prefixCls:_,direction:$,vertical:V})}),yF=Bde,SF=W.createContext({}),CF=W.createContext({}),xF=({prefixCls:e,value:t,onChange:n})=>{const r=()=>{if(n&&t&&!t.cleared){const o=t.toHsb();o.a=0;const i=to(o);i.cleared=true,n(i);}};return W.createElement("div",{className:`${e}-clear`,onClick:r})},wF="hex",$F="rgb",EF="hsb";var zde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};function $E(){return $E=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,$E({},e,{ref:t,icon:zde})),Fde=f.forwardRef(kde);var Hde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function EE(){return EE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,EE({},e,{ref:t,icon:Hde})),jde=f.forwardRef(Vde);function ME(){return typeof BigInt=="function"}function MF(e){return !e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Xc(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";i==="0"&&a==="0"&&(n=false);var c=n?"-":"";return {negative:n,negativeStr:c,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(c).concat(r)}}function OR(e){var t=String(e);return !Number.isNaN(Number(t))&&t.includes("e")}function Vc(e){var t=String(e);if(OR(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&DR(t)?t.length-t.indexOf(".")-1:0}function l1(e){var t=String(e);if(OR(e)){if(e>Number.MAX_SAFE_INTEGER)return String(ME()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&arguments[0]!==void 0?arguments[0]:true;return n?this.isInvalidate()?"":Xc("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),qde=(function(){function e(t){if(Yi(this,e),yt(this,"origin",""),yt(this,"number",void 0),yt(this,"empty",void 0),MF(t)){this.empty=true;return}this.origin=String(t),this.number=Number(t);}return Xi(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(oNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o0&&arguments[0]!==void 0?arguments[0]:true;return n?this.isInvalidate()?"":l1(this.number):this.origin}}]),e})();function na(e){return ME()?new Ude(e):new qde(e)}function Gb(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;if(e==="")return "";var o=Xc(e),i=o.negativeStr,a=o.integerStr,c=o.decimalStr,u="".concat(t).concat(c),d="".concat(i).concat(a);if(n>=0){var m=Number(c[n]);if(m>=5&&!r){var p=na(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-m));return Gb(p.toString(),t,n,r)}return n===0?d:"".concat(d).concat(t).concat(c.padEnd(n,"0").slice(0,n))}return u===".0"?d:"".concat(d).concat(u)}function Gde(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get(n,r){if(t[r])return t[r];const o=n[r];return typeof o=="function"?o.bind(n):o}}):e}function Wde(e,t){const n=f.useRef(null);function r(){try{const{selectionStart:i,selectionEnd:a,value:c}=e,u=c.substring(0,i),d=c.substring(a);n.current={start:i,end:a,value:c,beforeTxt:u,afterTxt:d};}catch{}}function o(){if(e&&n.current&&t)try{const{value:i}=e,{beforeTxt:a,afterTxt:c,start:u}=n.current;let d=i.length;if(i.startsWith(a))d=a.length;else if(i.endsWith(c))d=i.length-n.current.afterTxt.length;else {const m=a[u-1],p=i.indexOf(m,u-1);p!==-1&&(d=p+1);}e.setSelectionRange(d,d);}catch(i){xr(false,`Something warning of cursor restore. Please fire issue about this: ${i.message}`);}}return [r,o]}const Kde=200,Yde=600;function r8({prefixCls:e,action:t,children:n,disabled:r,className:o,style:i,onStep:a}){const c=t==="up",u=f.useRef(),d=f.useRef([]),m=()=>{clearTimeout(u.current);},p=S=>{S.preventDefault(),m(),a(c,"handler");function C(){a(c,"handler"),u.current=setTimeout(C,Kde);}u.current=setTimeout(C,Yde);};f.useEffect(()=>()=>{m(),d.current.forEach(S=>{Lt.cancel(S);});},[]);const g=`${e}-action`,b=X(g,`${g}-${t}`,{[`${g}-${t}-disabled`]:r},o),y=()=>d.current.push(Lt(m));return f.createElement("span",{unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y,onMouseDown:S=>{p(S);},"aria-label":c?"Increase Value":"Decrease Value","aria-disabled":r,className:b,style:i},n||f.createElement("span",{unselectable:"on",className:`${e}-action-${t}-inner`}))}function o8(e){const t=typeof e=="number"?l1(e):Xc(e).fullStr;return t.includes(".")?Xc(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const Xde=(()=>{const e=f.useRef(0),t=()=>{Lt.cancel(e.current);};return f.useEffect(()=>t,[]),n=>{t(),e.current=Lt(()=>{n();});}});function Ih(){return Ih=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),a8=e=>{const t=na(e);return t.isInvalidate()?null:t},Qde=f.forwardRef((e,t)=>{const{mode:n="input",prefixCls:r="rc-input-number",className:o,style:i,classNames:a,styles:c,min:u,max:d,step:m=1,defaultValue:p,value:g,disabled:b,readOnly:y,upHandler:S,downHandler:C,keyboard:w,changeOnWheel:$=false,controls:M=true,prefix:T,suffix:R,stringMode:I,parser:P,formatter:N,precision:O,decimalSeparator:_,onChange:L,onInput:H,onPressEnter:U,onStep:q,onMouseDown:V,onClick:z,onMouseUp:F,onMouseLeave:G,onMouseMove:Y,onMouseEnter:Q,onMouseOut:D,changeOnBlur:B=true,...K}=e,[J,ee]=f.useState(false),te=f.useRef(false),ne=f.useRef(false),ae=f.useRef(false),oe=f.useRef(null),re=f.useRef(null);f.useImperativeHandle(t,()=>Gde(re.current,{focus:Fe=>{iR(re.current,Fe);},blur:()=>{re.current?.blur();},nativeElement:oe.current}));const[ce,he]=f.useState(()=>na(g??p));function me(Fe){g===void 0&&he(Fe);}const Re=f.useCallback((Fe,Ge)=>{if(!Ge)return O>=0?O:Math.max(Vc(Fe),Vc(m))},[O,m]),se=f.useCallback(Fe=>{const Ge=String(Fe);if(P)return P(Ge);let ve=Ge;return _&&(ve=ve.replace(_,".")),ve.replace(/[^\w.-]+/g,"")},[P,_]),de=f.useRef(""),Se=f.useCallback((Fe,Ge)=>{if(N)return N(Fe,{userTyping:Ge,input:String(de.current)});let ve=typeof Fe=="number"?l1(Fe):Fe;if(!Ge){const Ae=Re(ve,Ge);DR(ve)&&(_||Ae>=0)&&(ve=Gb(ve,_||".",Ae));}return ve},[N,Re,_]),[be,He]=f.useState(()=>{const Fe=p??g;return ce.isInvalidate()&&["string","number"].includes(typeof Fe)?Number.isNaN(Fe)?"":Fe:Se(ce.toString(),false)});de.current=be;function Ue(Fe,Ge){He(Se(Fe.isInvalidate()?Fe.toString(false):Fe.toString(!Ge),Ge));}const Pe=f.useMemo(()=>a8(d),[d,O]),ue=f.useMemo(()=>a8(u),[u,O]),ye=f.useMemo(()=>!Pe||!ce||ce.isInvalidate()?false:Pe.lessEquals(ce),[Pe,ce]),Te=f.useMemo(()=>!ue||!ce||ce.isInvalidate()?false:ce.lessEquals(ue),[ue,ce]),[qe,Ze]=Wde(re.current,J),We=Fe=>Pe&&!Fe.lessEquals(Pe)?Pe:ue&&!ue.lessEquals(Fe)?ue:null,tt=Fe=>!We(Fe),nt=(Fe,Ge)=>{let ve=Fe,Ae=tt(ve)||ve.isEmpty();if(!ve.isEmpty()&&!Ge&&(ve=We(ve)||ve,Ae=true),!y&&!b&&Ae){const Ce=ve.toString(),pe=Re(Ce,Ge);return pe>=0&&(ve=na(Gb(Ce,".",pe)),tt(ve)||(ve=na(Gb(Ce,".",pe,true)))),ve.equals(ce)||(me(ve),L?.(ve.isEmpty()?null:i8(I,ve)),g===void 0&&Ue(ve,Ge)),ve}return ce},Ke=Xde(),Oe=Fe=>{if(qe(),de.current=Fe,He(Fe),!ne.current){const Ge=se(Fe),ve=na(Ge);ve.isNaN()||nt(ve,true);}H?.(Fe),Ke(()=>{let Ge=Fe;P||(Ge=Fe.replace(/。/g,".")),Ge!==Fe&&Oe(Ge);});},Qe=()=>{ne.current=true;},Xe=()=>{ne.current=false,Oe(re.current.value);},_e=Fe=>{Oe(Fe.target.value);},ze=Rt((Fe,Ge)=>{if(Fe&&ye||!Fe&&Te)return;te.current=false;let ve=na(ae.current?o8(m):m);Fe||(ve=ve.negate());const Ae=(ce||na(0)).add(ve.toString()),Ce=nt(Ae,false);q?.(i8(I,Ce),{offset:ae.current?o8(m):m,type:Fe?"up":"down",emitter:Ge}),re.current?.focus();}),ct=Fe=>{const Ge=na(se(be));let ve;Ge.isNaN()?ve=nt(ce,Fe):ve=nt(Ge,Fe),g!==void 0?Ue(ce,false):ve.isNaN()||Ue(ve,false);},Pt=()=>{te.current=true;},ut=Fe=>{const{key:Ge,shiftKey:ve}=Fe;te.current=true,ae.current=ve,Ge==="Enter"&&(ne.current||(te.current=false),ct(false),U?.(Fe)),w!==false&&!ne.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ge)&&(ze(Ge==="Up"||Ge==="ArrowUp","keyboard"),Fe.preventDefault());},Dt=()=>{te.current=false,ae.current=false;};f.useEffect(()=>{if($&&J){const Fe=ve=>{ze(ve.deltaY<0,"wheel"),ve.preventDefault();},Ge=re.current;if(Ge)return Ge.addEventListener("wheel",Fe,{passive:false}),()=>Ge.removeEventListener("wheel",Fe)}});const wt=()=>{B&&ct(false),ee(false),te.current=false;},Tt=Fe=>{re.current&&Fe.target!==re.current&&(re.current.focus(),Fe.preventDefault()),V?.(Fe);};Ib(()=>{ce.isInvalidate()||Ue(ce,false);},[O,N]),Ib(()=>{const Fe=na(g);he(Fe);const Ge=na(se(be));(!Fe.equals(Ge)||!te.current||N)&&Ue(Fe,te.current);},[g]),Ib(()=>{N&&Ze();},[be]);const gt={prefixCls:r,onStep:ze,className:a?.action,style:c?.action},ft=f.createElement(r8,Ih({},gt,{action:"up",disabled:ye}),S),st=f.createElement(r8,Ih({},gt,{action:"down",disabled:Te}),C);return f.createElement("div",{ref:oe,className:X(r,`${r}-mode-${n}`,o,a?.root,{[`${r}-focused`]:J,[`${r}-disabled`]:b,[`${r}-readonly`]:y,[`${r}-not-a-number`]:ce.isNaN(),[`${r}-out-of-range`]:!ce.isInvalidate()&&!tt(ce)}),style:{...c?.root,...i},onMouseDown:Tt,onMouseUp:F,onMouseLeave:G,onMouseMove:Y,onMouseEnter:Q,onMouseOut:D,onClick:z,onFocus:()=>{ee(true);},onBlur:wt,onKeyDown:ut,onKeyUp:Dt,onCompositionStart:Qe,onCompositionEnd:Xe,onBeforeInput:Pt},n==="spinner"&&M&&st,T!==void 0&&f.createElement("div",{className:X(`${r}-prefix`,a?.prefix),style:c?.prefix},T),f.createElement("input",Ih({autoComplete:"off",role:"spinbutton","aria-valuemin":u,"aria-valuemax":d,"aria-valuenow":ce.isInvalidate()?null:ce.toString(),step:m,ref:re,className:X(`${r}-input`,a?.input),style:c?.input,value:be,onChange:_e,disabled:b,readOnly:y},K)),R!==void 0&&f.createElement("div",{className:X(`${r}-suffix`,a?.suffix),style:c?.suffix},R),n==="spinner"&&M&&ft,n==="input"&&M&&f.createElement("div",{className:X(`${r}-actions`,a?.actions),style:c?.actions},ft,st))}),Zde=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:c,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:m,lineWidth:p,antCls:g}=e,[b,y]=dr(g,"space");return {[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,borderWidth:p,borderStyle:"solid",borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:u},"&-small":{paddingInline:i,borderRadius:d,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[b("addon-border-color")]:o,[b("addon-background")]:m,[b("addon-border-color-outlined")]:o,[b("addon-background-filled")]:m,borderColor:y("addon-border-color"),background:y("addon-background"),"&-variant-outlined":{[b("addon-border-color")]:y("addon-border-color-outlined")},"&-variant-filled":{[b("addon-border-color")]:"transparent",[b("addon-background")]:y("addon-background-filled"),[`&${t}-disabled`]:{[b("addon-border-color")]:o,[b("addon-background")]:m}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[b("addon-border-color-outlined")]:e.colorError,[b("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[b("addon-border-color-outlined")]:e.colorWarning,[b("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},Jde=Ut(["Space","Addon"],e=>[Zde(e),Af(e,{focus:false})]),RF=W.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:c,status:u,...d}=e,{getPrefixCls:m,direction:p}=W.useContext(xt),g=m("space-addon",i),[b,y]=Jde(g),{compactItemClassnames:S,compactSize:C}=Ds(g,p),w=Fl(g,u),$=X(g,b,S,y,`${g}-variant-${a}`,w,{[`${g}-${C}`]:C,[`${g}-disabled`]:c},n);return W.createElement("div",{ref:t,className:$,style:o,...d},r)}),efe=e=>{const t=e.handleVisible??"auto",n=e.controlHeightSM-e.lineWidth*2;return {..._f(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new ln(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:t===true?1:0,handleVisibleWidth:t===true?n:0}},tfe=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:m,paddingInlineLG:p,colorIcon:g,motionDurationMid:b,handleHoverColor:y,handleOpacity:S,paddingInline:C,paddingBlock:w,handleBg:$,handleActiveBg:M,inputAffixPadding:T,borderRadiusSM:R,controlWidth:I,handleBorderColor:P,filledHandleBg:N,lineHeightLG:O,antCls:_}=e,L=`${ie(n)} ${r} ${P}`,[H,U]=dr(_,"input-number");return [{[t]:{...cn(e),...s1(e),[H("input-padding-block")]:ie(w),[H("input-padding-inline")]:ie(C),display:"inline-flex",width:I,margin:0,paddingBlock:0,borderRadius:o,...nF(e,{[`${t}-actions`]:{background:$,[`${t}-action-down`]:{borderBlockStart:L}}}),...iF(e,{[`${t}-actions`]:{background:N,[`${t}-action-down`]:{borderBlockStart:L}},"&:focus-within":{[`${t}-actions`]:{background:$}}}),...sF(e,{[`${t}-actions`]:{background:$,[`${t}-action-down`]:{borderBlockStart:L}}}),...rF(e),"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:c}},[`${t}-input`]:{...cn(e),width:"100%",paddingBlock:U("input-padding-block"),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${b} linear`,appearance:"textfield",fontSize:"inherit",lineHeight:"inherit",...lF(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:"not-allowed",color:e.colorTextDisabled}}},{[t]:{[` ${t}-action-up-disabled, ${t}-action-down-disabled `]:{cursor:"not-allowed"},[`${t}-action`]:{...bu(),userSelect:"none",overflow:"hidden",fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",transition:`all ${b} linear`,"&:active":{background:M},"&:hover":{color:y}},"&-mode-input":{overflow:"hidden",[`${t}-actions`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:S,height:"100%",borderRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${b}`,overflow:"hidden",[`${t}-action`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:g,height:"50%",borderInlineStart:L,"&:hover":{height:"60%"}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:"none"}}},[`&${t}-mode-spinner`]:{padding:0,width:"auto",[`${t}-action`]:{flex:"none",paddingInline:U("input-padding-inline"),"&-up":{borderInlineStart:L},"&-down":{borderInlineEnd:L}},[`${t}-input`]:{textAlign:"center",paddingInline:U("input-padding-inline")}}}},{[t]:{"&-lg":{[H("input-padding-block")]:ie(m),[H("input-padding-inline")]:ie(p),paddingBlock:0,fontSize:a,lineHeight:O},"&-sm":{[H("input-padding-block")]:ie(d),[H("input-padding-inline")]:ie(u),paddingBlock:0,fontSize:i,borderRadius:R}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:"flex",flex:"none",alignItems:"center",alignSelf:"center",pointerEvents:"none"},[`${t}-prefix`]:{marginInlineEnd:T},[`${t}-suffix`]:{height:"100%",marginInlineStart:T,transition:`margin ${b}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},nfe=e=>{const{componentCls:t,antCls:n}=e;return {[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},rfe=Ut("InputNumber",e=>{const t=Ht(e,Df(e));return [tfe(t),nfe(t),Af(t)]},efe,{unitless:{handleOpacity:true},resetFont:false}),ofe=f.forwardRef((e,t)=>{const n=f.useRef(null);f.useImperativeHandle(t,()=>n.current);const{rootClassName:r,size:o,disabled:i,prefixCls:a,addonBefore:c,addonAfter:u,prefix:d,suffix:m,bordered:p,readOnly:g,status:b,controls:y=true,variant:S,className:C,style:w,classNames:$,styles:M,mode:T,...R}=e,{direction:I,className:P,style:N,styles:O,classNames:_}=Wt("inputNumber"),L=f.useContext(eo),H=i??L,U=f.useMemo(()=>!y||H||g?false:y,[y,H,g]),{compactSize:q,compactItemClassnames:V}=Ds(a,I);let z=T==="spinner"?f.createElement(dF,null):f.createElement(jde,null),F=T==="spinner"?f.createElement(Fde,null):f.createElement(hR,null);const G=typeof U=="boolean"?U:void 0;typeof U=="object"&&(z=U.upIcon||z,F=U.downIcon||F);const{hasFeedback:Y,isFormItemInput:Q,feedbackIcon:D}=f.useContext(go),B=io(oe=>o??q??oe),[K,J]=Jy("inputNumber",S,p),ee=Y&&f.createElement(f.Fragment,null,D),te={...e,size:B,disabled:H,controls:U},[ne,ae]=Xt([_,$],[O,M],{props:te});return f.createElement(Qde,{ref:n,mode:T,disabled:H,className:X(C,r,ne.root,P,V,Fl(a,b,Y),{[`${a}-${K}`]:J,[`${a}-lg`]:B==="large",[`${a}-sm`]:B==="small",[`${a}-rtl`]:I==="rtl",[`${a}-in-form-item`]:Q,[`${a}-without-controls`]:!U}),style:{...ae.root,...N,...w},upHandler:z,downHandler:F,prefixCls:a,readOnly:g,controls:G,prefix:d,suffix:ee||m,classNames:ne,styles:ae,...R})}),TF=f.forwardRef((e,t)=>{const{addonBefore:n,addonAfter:r,prefixCls:o,className:i,status:a,rootClassName:c,...u}=e,{getPrefixCls:d}=Wt("inputNumber"),m=d("input-number",o),{status:p}=f.useContext(go),g=Pf(p,a),b=Kn(m),[y,S]=rfe(m,b),C=n||r,w=f.createElement(ofe,{ref:t,...u,prefixCls:m,status:g,className:X(S,b,y,i),rootClassName:C?void 0:c});if(C){const $=R=>R?f.createElement(RF,{className:X(`${m}-addon`,S,y),variant:e.variant,disabled:e.disabled,status:g},f.createElement(kl,{form:true},R)):null,M=$(n),T=$(r);return f.createElement(UM,{rootClassName:c},M,w,T)}return w}),Qc=TF,ife=e=>f.createElement(Po,{theme:{components:{InputNumber:{handleVisible:true}}}},f.createElement(TF,{...e}));Qc._InternalPanelDoNotUseOrYouWillBeFired=ife;const Zc=({prefixCls:e,min:t=0,max:n=100,value:r,onChange:o,className:i,formatter:a})=>{const c=`${e}-steppers`,[u,d]=f.useState(0),m=Number.isNaN(r)?u:r;return W.createElement(Qc,{className:X(c,i),min:t,max:n,value:m,formatter:a,size:"small",onChange:p=>{d(p||0),o?.(p);}})},afe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-alpha-input`,[o,i]=f.useState(()=>to(t||"#000")),a=t||o,c=u=>{const d=a.toHsb();d.a=(u||0)/100;const m=to(d);i(m),n?.(m);};return W.createElement(Zc,{value:eR(a),prefixCls:e,formatter:u=>`${u}%`,className:r,onChange:c})};function sfe(e){return !!(e.addonBefore||e.addonAfter)}function lfe(e){return !!(e.prefix||e.suffix||e.allowClear)}function s8(e,t,n){const r=t.cloneNode(true),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...i)=>{t.setSelectionRange(...i);},o}function U0(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=s8(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=s8(t,e,r),n(o);return}n(o);}function RE(){return RE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:c,addonAfter:u,className:d,style:m,disabled:p,readOnly:g,focused:b,triggerFocus:y,allowClear:S,value:C,handleReset:w,hidden:$,classes:M,classNames:T,dataAttrs:R,styles:I,components:P,onClear:N}=e,O=r??n,_=P?.affixWrapper||"span",L=P?.groupWrapper||"span",H=P?.wrapper||"span",U=P?.groupAddon||"span",q=f.useRef(null),V=Y=>{q.current?.contains(Y.target)&&y?.();},z=lfe(e);let F=f.cloneElement(O,{value:C,className:X(O.props?.className,!z&&T?.variant)||null});const G=f.useRef(null);if(W.useImperativeHandle(t,()=>({nativeElement:G.current||q.current})),z){let Y=null;if(S){const K=!p&&!g&&C,J=`${o}-clear-icon`,ee=typeof S=="object"&&S?.clearIcon?S.clearIcon:"✖";Y=W.createElement("button",{type:"button",tabIndex:-1,onClick:te=>{w?.(te),N?.();},onMouseDown:te=>te.preventDefault(),className:X(J,{[`${J}-hidden`]:!K,[`${J}-has-suffix`]:!!a})},ee);}const Q=`${o}-affix-wrapper`,D=X(Q,{[`${o}-disabled`]:p,[`${Q}-disabled`]:p,[`${Q}-focused`]:b,[`${Q}-readonly`]:g,[`${Q}-input-with-clear-btn`]:a&&S&&C},M?.affixWrapper,T?.affixWrapper,T?.variant),B=(a||S)&&W.createElement("span",{className:X(`${o}-suffix`,T?.suffix),style:I?.suffix},Y,a);F=W.createElement(_,RE({className:D,style:I?.affixWrapper,onClick:V},R?.affixWrapper,{ref:q}),i&&W.createElement("span",{className:X(`${o}-prefix`,T?.prefix),style:I?.prefix},i),F,B);}if(sfe(e)){const Y=`${o}-group`,Q=`${Y}-addon`,D=`${Y}-wrapper`,B=X(`${o}-wrapper`,Y,M?.wrapper,T?.wrapper),K=X(D,{[`${D}-disabled`]:p},M?.group,T?.groupWrapper);F=W.createElement(L,{className:K,ref:G},W.createElement(H,{className:B},c&&W.createElement(U,{className:Q},c),F,u&&W.createElement(U,{className:Q},u)));}return W.cloneElement(F,{className:X(F.props?.className,d)||null,style:{...F.props?.style,...m},hidden:$})});function NF(e,t){return f.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return {...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:c,onKeyUp:u,prefixCls:d="rc-input",disabled:m,htmlSize:p,className:g,maxLength:b,suffix:y,showCount:S,count:C,type:w="text",classes:$,classNames:M,styles:T,onCompositionStart:R,onCompositionEnd:I,...P}=e,[N,O]=f.useState(false),_=f.useRef(false),L=f.useRef(false),H=f.useRef(null),U=f.useRef(null),q=se=>{H.current&&iR(H.current,se);},[V,z]=dn(e.defaultValue,e.value),F=V==null?"":String(V),[G,Y]=f.useState(null),Q=NF(C,S),D=Q.max||b,B=Q.strategy(F),K=!!D&&B>D;f.useImperativeHandle(t,()=>({focus:q,blur:()=>{H.current?.blur();},setSelectionRange:(se,de,Se)=>{H.current?.setSelectionRange(se,de,Se);},select:()=>{H.current?.select();},input:H.current,nativeElement:U.current?.nativeElement||H.current})),f.useEffect(()=>{L.current&&(L.current=false),O(se=>se&&m?false:se);},[m]);const J=(se,de,Se)=>{let be=de;if(!_.current&&Q.exceedFormatter&&Q.max&&Q.strategy(de)>Q.max)be=Q.exceedFormatter(de,{max:Q.max}),de!==be&&Y([H.current?.selectionStart||0,H.current?.selectionEnd||0]);else if(Se.source==="compositionEnd")return;z(be),H.current&&U0(H.current,se,r,be);};f.useEffect(()=>{G&&H.current?.setSelectionRange(...G);},[G]);const ee=se=>{J(se,se.target.value,{source:"change"});},te=se=>{_.current=false,J(se,se.currentTarget.value,{source:"compositionEnd"}),I?.(se);},ne=se=>{a&&se.key==="Enter"&&!L.current&&!se.nativeEvent.isComposing&&(L.current=true,a(se)),c?.(se);},ae=se=>{se.key==="Enter"&&(L.current=false),u?.(se);},oe=se=>{O(true),o?.(se);},re=se=>{L.current&&(L.current=false),O(false),i?.(se);},ce=se=>{z(""),q(),H.current&&U0(H.current,se,r);},he=K&&`${d}-out-of-range`,me=()=>{const se=Ln(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return W.createElement("input",q0({autoComplete:n},se,{onChange:ee,onFocus:oe,onBlur:re,onKeyDown:ne,onKeyUp:ae,className:X(d,{[`${d}-disabled`]:m},M?.input),style:T?.input,ref:H,size:p,type:w,onCompositionStart:de=>{_.current=true,R?.(de);},onCompositionEnd:te}))},Re=()=>{const se=Number(D)>0;if(y||Q.show){const de=Q.showFormatter?Q.showFormatter({value:F,count:B,maxLength:D}):`${B}${se?` / ${D}`:""}`;return W.createElement(W.Fragment,null,Q.show&&W.createElement("span",{className:X(`${d}-show-count-suffix`,{[`${d}-show-count-has-suffix`]:!!y},M?.count),style:{...T?.count}},de),y)}return null};return W.createElement(AF,q0({},P,{prefixCls:d,className:X(g,he),handleReset:ce,value:F,focused:N,triggerFocus:q,suffix:Re(),disabled:m,classes:$,classNames:M,styles:T,ref:U}),me())}),PF=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:W.createElement(kp,null)}),t};function IF(e,t){const n=f.useRef([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value");}));};return f.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o);})),[]),r}function ufe(e){return !!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Lf=f.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=true,status:o,size:i,disabled:a,onBlur:c,onFocus:u,suffix:d,allowClear:m,addonAfter:p,addonBefore:g,className:b,style:y,styles:S,rootClassName:C,onChange:w,classNames:$,variant:M,...T}=e,{getPrefixCls:R,direction:I,allowClear:P,autoComplete:N,className:O,style:_,classNames:L,styles:H}=Wt("input"),U=R("input",n),q=f.useRef(null),V=Kn(U),[z,F]=cF(U,C);uF(U,V);const{compactSize:G,compactItemClassnames:Y}=Ds(U,I),Q=io(He=>i??G??He),D=W.useContext(eo),B=a??D,K={...e,size:Q,disabled:B},[J,ee]=Xt([L,$],[H,S],{props:K}),{status:te,hasFeedback:ne,feedbackIcon:ae}=f.useContext(go),oe=Pf(te,o),re=ufe(e)||!!ne;f.useRef(re);const ce=IF(q,true),he=He=>{ce(),c?.(He);},me=He=>{ce(),u?.(He);},Re=He=>{ce(),w?.(He);},se=(ne||d)&&W.createElement(W.Fragment,null,d,ne&&ae),de=PF(m??P),[Se,be]=Jy("input",M,r);return W.createElement(cfe,{ref:Ar(t,q),prefixCls:U,autoComplete:N,...T,disabled:B,onBlur:he,onFocus:me,style:{...ee.root,..._,...y},styles:ee,suffix:se,allowClear:de,className:X(b,C,F,V,Y,O,J.root),onChange:Re,addonBefore:g&&W.createElement(kl,{form:true,space:true},g),addonAfter:p&&W.createElement(kl,{form:true,space:true},p),classNames:{...J,input:X({[`${U}-sm`]:Q==="small",[`${U}-lg`]:Q==="large",[`${U}-rtl`]:I==="rtl"},J.input,z),variant:X({[`${U}-${Se}`]:be},Fl(U,oe)),affixWrapper:X({[`${U}-affix-wrapper-sm`]:Q==="small",[`${U}-affix-wrapper-lg`]:Q==="large",[`${U}-affix-wrapper-rtl`]:I==="rtl"},z),wrapper:X({[`${U}-group-rtl`]:I==="rtl"},z),groupWrapper:X({[`${U}-group-wrapper-sm`]:Q==="small",[`${U}-group-wrapper-lg`]:Q==="large",[`${U}-group-wrapper-rtl`]:I==="rtl",[`${U}-group-wrapper-${Se}`]:be},Fl(`${U}-group-wrapper`,oe,ne),z)}})}),dfe=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,ffe=e=>dfe.test(`#${e}`),mfe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hex-input`,[o,i]=f.useState(()=>t?mh(t.toHexString()):void 0);f.useEffect(()=>{t&&i(mh(t.toHexString()));},[t]);const a=c=>{const u=c.target.value;i(mh(u)),ffe(mh(u,true))&&n?.(to(u));};return W.createElement(Lf,{className:r,value:o,prefix:"#",onChange:a,size:"small"})},hfe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hsb-input`,[o,i]=f.useState(()=>to(t||"#000")),a=t||o,c=(u,d)=>{const m=a.toHsb();m[d]=d==="h"?u:(u||0)/100;const p=to(m);i(p),n?.(p);};return W.createElement("div",{className:r},W.createElement(Zc,{max:360,min:0,value:Number(a.toHsb().h),prefixCls:e,className:r,formatter:u=>Fb(u||0).toString(),onChange:u=>c(Number(u),"h")}),W.createElement(Zc,{max:100,min:0,value:Number(a.toHsb().s)*100,prefixCls:e,className:r,formatter:u=>`${Fb(u||0)}%`,onChange:u=>c(Number(u),"s")}),W.createElement(Zc,{max:100,min:0,value:Number(a.toHsb().b)*100,prefixCls:e,className:r,formatter:u=>`${Fb(u||0)}%`,onChange:u=>c(Number(u),"b")}))},pfe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-rgb-input`,[o,i]=f.useState(()=>to(t||"#000")),a=t||o,c=(u,d)=>{const m=a.toRgb();m[d]=u||0;const p=to(m);i(p),n?.(p);};return W.createElement("div",{className:r},W.createElement(Zc,{max:255,min:0,value:Number(a.toRgb().r),prefixCls:e,className:r,onChange:u=>c(Number(u),"r")}),W.createElement(Zc,{max:255,min:0,value:Number(a.toRgb().g),prefixCls:e,className:r,onChange:u=>c(Number(u),"g")}),W.createElement(Zc,{max:255,min:0,value:Number(a.toRgb().b),prefixCls:e,className:r,onChange:u=>c(Number(u),"b")}))},gfe=[wF,EF,$F].map(e=>({value:e,label:e.toUpperCase()})),vfe=e=>{const{prefixCls:t,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:c}=e,[u,d]=dn(wF,n),m=`${t}-input`,p=b=>{d(b),i?.(b);},g=f.useMemo(()=>{const b={value:r,prefixCls:t,onChange:a};switch(u){case EF:return W.createElement(hfe,{...b});case $F:return W.createElement(pfe,{...b});default:return W.createElement(mfe,{...b})}},[u,t,r,a]);return W.createElement("div",{className:`${m}-container`},!c&&W.createElement(Jl,{value:u,variant:"borderless",getPopupContainer:b=>b,popupMatchSelectWidth:68,placement:"bottomRight",onChange:p,className:`${t}-format-select`,size:"small",options:gfe}),W.createElement("div",{className:m},g),!o&&W.createElement(afe,{prefixCls:t,value:r,onChange:a}))};function TE(e,t,n){return (e-t)/(n-t)}function _R(e,t,n,r){const o=TE(t,n,r),i={};switch(e){case "rtl":i.right=`${o*100}%`,i.transform="translateX(50%)";break;case "btt":i.bottom=`${o*100}%`,i.transform="translateY(50%)";break;case "ttb":i.top=`${o*100}%`,i.transform="translateY(-50%)";break;default:i.left=`${o*100}%`,i.transform="translateX(-50%)";break}return i}function Bc(e,t){return Array.isArray(e)?e[t]:e}const xu=f.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:true,styles:{},classNames:{}}),OF=f.createContext({});function AE(){return AE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,value:r,valueIndex:o,onStartMove:i,onDelete:a,style:c,render:u,dragging:d,draggingDelete:m,onOffsetChange:p,onChangeComplete:g,onFocus:b,onMouseEnter:y,...S}=e,{min:C,max:w,direction:$,disabled:M,keyboard:T,range:R,tabIndex:I,ariaLabelForHandle:P,ariaLabelledByForHandle:N,ariaRequired:O,ariaValueTextFormatterForHandle:_,styles:L,classNames:H}=f.useContext(xu),U=`${n}-handle`,q=B=>{M||i(B,o);},V=B=>{b?.(B,o);},z=B=>{y(B,o);},F=B=>{if(!M&&T){let K=null;switch(B.which||B.keyCode){case at.LEFT:K=$==="ltr"||$==="btt"?-1:1;break;case at.RIGHT:K=$==="ltr"||$==="btt"?1:-1;break;case at.UP:K=$!=="ttb"?1:-1;break;case at.DOWN:K=$!=="ttb"?-1:1;break;case at.HOME:K="min";break;case at.END:K="max";break;case at.PAGE_UP:K=2;break;case at.PAGE_DOWN:K=-2;break;case at.BACKSPACE:case at.DELETE:a?.(o);break}K!==null&&(B.preventDefault(),p(K,o));}},G=B=>{switch(B.which||B.keyCode){case at.LEFT:case at.RIGHT:case at.UP:case at.DOWN:case at.HOME:case at.END:case at.PAGE_UP:case at.PAGE_DOWN:g?.();break}},Y=_R($,r,C,w);let Q={};o!==null&&(Q={tabIndex:M?null:Bc(I,o),role:"slider","aria-valuemin":C,"aria-valuemax":w,"aria-valuenow":r,"aria-disabled":M,"aria-label":Bc(P,o),"aria-labelledby":Bc(N,o),"aria-required":Bc(O,o),"aria-valuetext":Bc(_,o)?.(r),"aria-orientation":$==="ltr"||$==="rtl"?"horizontal":"vertical",onMouseDown:q,onTouchStart:q,onFocus:V,onMouseEnter:z,onKeyDown:F,onKeyUp:G});let D=f.createElement("div",AE({ref:t,className:X(U,{[`${U}-${o+1}`]:o!==null&&R,[`${U}-dragging`]:d,[`${U}-dragging-delete`]:m},H.handle),style:{...Y,...c,...L.handle}},Q,S));return u&&(D=u(D,{index:o,prefixCls:n,value:r,dragging:d,draggingDelete:m})),D});function G0(){return G0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,style:r,onStartMove:o,onOffsetChange:i,values:a,handleRender:c,activeHandleRender:u,draggingIndex:d,draggingDelete:m,onFocus:p,...g}=e,b=f.useRef({}),[y,S]=f.useState(false),[C,w]=f.useState(-1),$=I=>{w(I),S(true);},M=(I,P)=>{$(P),p?.(I);},T=(I,P)=>{$(P);};f.useImperativeHandle(t,()=>({focus:I=>{b.current[I]?.focus();},hideHelp:()=>{wo.flushSync(()=>{S(false);});}}));const R={prefixCls:n,onStartMove:o,onOffsetChange:i,render:c,onFocus:M,onMouseEnter:T,...g};return f.createElement(f.Fragment,null,a.map((I,P)=>{const N=d===P;return f.createElement(l8,G0({ref:O=>{O?b.current[P]=O:delete b.current[P];},dragging:N,draggingDelete:N&&m,style:Bc(r,P),key:P,value:I,valueIndex:P},R))}),u&&y&&f.createElement(l8,G0({key:"a11y"},R,{value:a[C],valueIndex:null,dragging:d!==-1,draggingDelete:m,render:u,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":true})))}),yfe=e=>{const{prefixCls:t,style:n,children:r,value:o,onClick:i}=e,{min:a,max:c,direction:u,includedStart:d,includedEnd:m,included:p}=f.useContext(xu),g=`${t}-text`,b=_R(u,o,a,c);return f.createElement("span",{className:X(g,{[`${g}-active`]:p&&d<=o&&o<=m}),style:{...b,...n},onMouseDown:y=>{y.stopPropagation();},onClick:()=>{i(o);}},r)},Sfe=e=>{const{prefixCls:t,marks:n,onClick:r}=e,o=`${t}-mark`;return n.length?f.createElement("div",{className:o},n.map(({value:i,style:a,label:c})=>f.createElement(yfe,{key:i,prefixCls:o,style:a,value:i,onClick:r},c))):null},Cfe=e=>{const{prefixCls:t,value:n,style:r,activeStyle:o}=e,{min:i,max:a,direction:c,included:u,includedStart:d,includedEnd:m}=f.useContext(xu),p=`${t}-dot`,g=u&&d<=n&&n<=m;let b={..._R(c,n,i,a),...typeof r=="function"?r(n):r};return g&&(b={...b,...typeof o=="function"?o(n):o}),f.createElement("span",{className:X(p,{[`${p}-active`]:g}),style:b})},xfe=e=>{const{prefixCls:t,marks:n,dots:r,style:o,activeStyle:i}=e,{min:a,max:c,step:u}=f.useContext(xu),d=f.useMemo(()=>{const m=new Set;if(n.forEach(p=>{m.add(p.value);}),r&&u!==null){let p=a;for(;p<=c;)m.add(p),p+=u;}return Array.from(m)},[a,c,u,r,n]);return f.createElement("div",{className:`${t}-step`},d.map(m=>f.createElement(Cfe,{prefixCls:t,key:m,value:m,style:o,activeStyle:i})))},c8=e=>{const{prefixCls:t,style:n,start:r,end:o,index:i,onStartMove:a,replaceCls:c}=e,{direction:u,min:d,max:m,disabled:p,range:g,classNames:b}=f.useContext(xu),y=`${t}-track`,S=TE(r,d,m),C=TE(o,d,m),w=T=>{!p&&a&&a(T,-1);},$={};switch(u){case "rtl":$.right=`${S*100}%`,$.width=`${C*100-S*100}%`;break;case "btt":$.bottom=`${S*100}%`,$.height=`${C*100-S*100}%`;break;case "ttb":$.top=`${S*100}%`,$.height=`${C*100-S*100}%`;break;default:$.left=`${S*100}%`,$.width=`${C*100-S*100}%`;}const M=c||X(y,{[`${y}-${i+1}`]:i!==null&&g,[`${t}-track-draggable`]:a},b.track);return f.createElement("div",{className:M,style:{...$,...n},onMouseDown:w,onTouchStart:w})},wfe=e=>{const{prefixCls:t,style:n,values:r,startPoint:o,onStartMove:i}=e,{included:a,range:c,min:u,styles:d,classNames:m}=f.useContext(xu),p=f.useMemo(()=>{if(!c){if(r.length===0)return [];const y=o??u,S=r[0];return [{start:Math.min(y,S),end:Math.max(y,S)}]}const b=[];for(let y=0;yf.createElement(c8,{index:S,prefixCls:t,style:{...Bc(n,S),...d.track},start:b,end:y,key:S,onStartMove:i})))},$fe=130;function u8(e){const t="targetTouches"in e?e.targetTouches[0]:e;return {pageX:t.pageX,pageY:t.pageY}}function Efe(e,t,n,r,o,i,a,c,u,d,m){const[p,g]=f.useState(null),[b,y]=f.useState(-1),[S,C]=f.useState(false),[w,$]=f.useState(n),[M,T]=f.useState(n),R=f.useRef(null),I=f.useRef(null),P=f.useRef(null),{onDragStart:N,onDragChange:O}=f.useContext(OF);Mn(()=>{b===-1&&$(n);},[n,b]),f.useEffect(()=>()=>{document.removeEventListener("mousemove",R.current),document.removeEventListener("mouseup",I.current),P.current&&(P.current.removeEventListener("touchmove",R.current),P.current.removeEventListener("touchend",I.current));},[]);const _=(q,V,z)=>{V!==void 0&&g(V),$(q);let F=q;z&&(F=q.filter((G,Y)=>Y!==b)),a(F),O&&O({rawValues:q,deleteIndex:z?b:-1,draggingIndex:b,draggingValue:V});},L=Rt((q,V,z)=>{if(q===-1){const F=M[0],G=M[M.length-1],Y=r-F,Q=o-G;let D=V*(o-r);D=Math.max(D,Y),D=Math.min(D,Q),D=i(F+D)-F;const K=M.map(J=>J+D);_(K);}else {const F=(o-r)*V,G=[...w];G[q]=M[q];const Y=u(G,F,q,"dist");_(Y.values,Y.value,z);}}),H=(q,V,z)=>{q.stopPropagation();const F=z||n,G=F[V];y(V),g(G),T(F),$(F),C(false);const{pageX:Y,pageY:Q}=u8(q);let D=false;N&&N({rawValues:F,draggingIndex:V,draggingValue:G});const B=J=>{J.preventDefault();const{pageX:ee,pageY:te}=u8(J),ne=ee-Y,ae=te-Q,{width:oe,height:re}=e.current.getBoundingClientRect();let ce,he;switch(t){case "btt":ce=-ae/re,he=ne;break;case "ttb":ce=ae/re,he=ne;break;case "rtl":ce=-ne/oe,he=ae;break;default:ce=ne/oe,he=ae;}D=d?Math.abs(he)>$fe&&m{J.preventDefault(),document.removeEventListener("mouseup",K),document.removeEventListener("mousemove",B),P.current&&(P.current.removeEventListener("touchmove",R.current),P.current.removeEventListener("touchend",I.current)),R.current=null,I.current=null,P.current=null,c(D),y(-1),C(false);};document.addEventListener("mouseup",K),document.addEventListener("mousemove",B),q.currentTarget.addEventListener("touchend",K),q.currentTarget.addEventListener("touchmove",B),R.current=B,I.current=K,P.current=q.currentTarget;},U=f.useMemo(()=>{const q=[...n].sort((Y,Q)=>Y-Q),V=[...w].sort((Y,Q)=>Y-Q),z={};V.forEach(Y=>{z[Y]=(z[Y]||0)+1;}),q.forEach(Y=>{z[Y]=(z[Y]||0)-1;});const F=d?1:0;return Object.values(z).reduce((Y,Q)=>Y+Math.abs(Q),0)<=F?w:n},[n,w,d]);return [b,p,S,U,H]}function Mfe(e,t,n,r,o,i){const a=f.useCallback(b=>Math.max(e,Math.min(t,b)),[e,t]),c=f.useCallback(b=>{if(n!==null){const y=e+Math.round((a(b)-e)/n)*n,S=$=>(String($).split(".")[1]||"").length,C=Math.max(S(n),S(t),S(e)),w=Number(y.toFixed(C));return e<=w&&w<=t?w:null}return null},[n,e,t,a]),u=f.useCallback(b=>{const y=a(b),S=r.map($=>$.value);n!==null&&S.push(c(b)),S.push(e,t);let C=S[0],w=t-e;return S.forEach($=>{const M=Math.abs(y-$);M<=w&&(C=$,w=M);}),C},[e,t,r,n,a,c]),d=(b,y,S,C="unit")=>{if(typeof y=="number"){let w;const $=b[S],M=$+y;let T=[];r.forEach(N=>{T.push(N.value);}),T.push(e,t),T.push(c($));const R=y>0?1:-1;C==="unit"?T.push(c($+R*n)):T.push(c(M)),T=T.filter(N=>N!==null).filter(N=>y<0?N<=$:N>=$),C==="unit"&&(T=T.filter(N=>N!==$));const I=C==="unit"?$:M;w=T[0];let P=Math.abs(w-I);if(T.forEach(N=>{const O=Math.abs(N-I);O1){const N=[...b];return N[S]=w,d(N,y-R,S,C)}return w}else {if(y==="min")return e;if(y==="max")return t}},m=(b,y,S,C="unit")=>{const w=b[S],$=d(b,y,S,C);return {value:$,changed:$!==w}},p=b=>i===null&&b===0||typeof i=="number"&&b{const w=b.map(u),$=w[S],M=d(w,y,S,C);if(w[S]=M,o===false){const T=i||0;S>0&&w[S-1]!==$&&(w[S]=Math.max(w[S],w[S-1]+T)),S0;T-=1){let R=true;for(;p(w[T]-w[T-1])&&R;)({value:w[T-1],changed:R}=m(w,-1,T-1));}for(let T=w.length-1;T>0;T-=1){let R=true;for(;p(w[T]-w[T-1])&&R;)({value:w[T-1],changed:R}=m(w,-1,T-1));}for(let T=0;T{if(e===true||!e)return [!!e,false,false,0];const{editable:t,draggableTrack:n,minCount:r,maxCount:o}=e;return [true,t,!t&&n,r||0,o]},[e])}const Tfe=f.forwardRef((e,t)=>{const{prefixCls:n="rc-slider",className:r,style:o,classNames:i,styles:a,id:c,disabled:u=false,keyboard:d=true,autoFocus:m,onFocus:p,onBlur:g,min:b=0,max:y=100,step:S=1,value:C,defaultValue:w,range:$,count:M,onChange:T,onBeforeChange:R,onAfterChange:I,onChangeComplete:P,allowCross:N=true,pushable:O=false,reverse:_,vertical:L,included:H=true,startPoint:U,trackStyle:q,handleStyle:V,railStyle:z,dotStyle:F,activeDotStyle:G,marks:Y,dots:Q,handleRender:D,activeHandleRender:B,track:K,tabIndex:J=0,ariaLabelForHandle:ee,ariaLabelledByForHandle:te,ariaRequired:ne,ariaValueTextFormatterForHandle:ae}=e,oe=f.useRef(null),re=f.useRef(null),ce=f.useMemo(()=>L?_?"ttb":"btt":_?"rtl":"ltr",[_,L]),[he,me,Re,se,de]=Rfe($),Se=f.useMemo(()=>isFinite(b)?b:0,[b]),be=f.useMemo(()=>isFinite(y)?y:100,[y]),He=f.useMemo(()=>S!==null&&S<=0?1:S,[S]),Ue=f.useMemo(()=>typeof O=="boolean"?O?He:false:O>=0?O:false,[O,He]),Pe=f.useMemo(()=>Object.keys(Y||{}).map(Ae=>{const Ce=Y[Ae],pe={value:Number(Ae)};return Ce&&typeof Ce=="object"&&!f.isValidElement(Ce)&&("label"in Ce||"style"in Ce)?(pe.style=Ce.style,pe.label=Ce.label):pe.label=Ce,pe}).filter(({label:Ae})=>Ae||typeof Ae=="number").sort((Ae,Ce)=>Ae.value-Ce.value),[Y]),[ue,ye]=Mfe(Se,be,He,Pe,N,Ue),[Te,qe]=dn(w,C),Ze=f.useMemo(()=>{const Ae=Te==null?[]:Array.isArray(Te)?Te:[Te],[Ce=Se]=Ae;let pe=Te===null?[]:[Ce];if(he){if(pe=[...Ae],M||Te===void 0){const Ie=M>=0?M+1:2;for(pe=pe.slice(0,Ie);pe.lengthIe-$e);}return pe.forEach((Ie,$e)=>{pe[$e]=ue(Ie);}),pe},[Te,he,Se,M,ue]),We=Ae=>he?Ae:Ae[0],tt=Rt(Ae=>{const Ce=[...Ae].sort((pe,Ie)=>pe-Ie);T&&!Dl(Ce,Ze,true)&&T(We(Ce)),qe(Ce);}),nt=Rt(Ae=>{Ae&&oe.current.hideHelp();const Ce=We(Ze);I?.(Ce),xr(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),P?.(Ce);}),Ke=Ae=>{if(u||!me||Ze.length<=se)return;const Ce=[...Ze];Ce.splice(Ae,1),R?.(We(Ce)),tt(Ce);const pe=Math.max(0,Ae-1);oe.current.hideHelp(),oe.current.focus(pe);},[Oe,Qe,Xe,_e,ze]=Efe(re,ce,Ze,Se,be,ue,tt,nt,ye,me,se),ct=(Ae,Ce)=>{if(!u){const pe=[...Ze];let Ie=0,$e=0,Le=be-Se;Ze.forEach((ht,$t)=>{const Mt=Math.abs(Ae-ht);Mt<=Le&&(Le=Mt,Ie=$t),ht{Ae.preventDefault();const{width:Ce,height:pe,left:Ie,top:$e,bottom:Le,right:Ye}=re.current.getBoundingClientRect(),{clientX:it,clientY:ht}=Ae;let $t;switch(ce){case "btt":$t=(Le-ht)/pe;break;case "ttb":$t=(ht-$e)/pe;break;case "rtl":$t=(Ye-it)/Ce;break;default:$t=(it-Ie)/Ce;}const Mt=Se+$t*(be-Se);ct(ue(Mt),Ae);},[ut,Dt]=f.useState(null),wt=(Ae,Ce)=>{if(!u){const pe=ye(Ze,Ae,Ce);R?.(We(Ze)),tt(pe.values),Dt(pe.value);}};f.useEffect(()=>{if(ut!==null){const Ae=Ze.indexOf(ut);Ae>=0&&oe.current.focus(Ae);}Dt(null);},[ut]);const Tt=f.useMemo(()=>Re&&He===null?false:Re,[Re,He]),gt=Rt((Ae,Ce)=>{ze(Ae,Ce),R?.(We(Ze));}),ft=Oe!==-1;f.useEffect(()=>{if(!ft){const Ae=Ze.lastIndexOf(Qe);oe.current.focus(Ae);}},[ft]);const st=f.useMemo(()=>[..._e].sort((Ae,Ce)=>Ae-Ce),[_e]),[Fe,Ge]=f.useMemo(()=>he?[st[0],st[st.length-1]]:[Se,st[0]],[st,he,Se]);f.useImperativeHandle(t,()=>({focus:()=>{oe.current.focus(0);},blur:()=>{const{activeElement:Ae}=document;re.current?.contains(Ae)&&Ae?.blur();}})),f.useEffect(()=>{m&&oe.current.focus(0);},[]);const ve=f.useMemo(()=>({min:Se,max:be,direction:ce,disabled:u,keyboard:d,step:He,included:H,includedStart:Fe,includedEnd:Ge,range:he,tabIndex:J,ariaLabelForHandle:ee,ariaLabelledByForHandle:te,ariaRequired:ne,ariaValueTextFormatterForHandle:ae,styles:a||{},classNames:i||{}}),[Se,be,ce,u,d,He,H,Fe,Ge,he,J,ee,te,ne,ae,a,i]);return f.createElement(xu.Provider,{value:ve},f.createElement("div",{ref:re,className:X(n,r,{[`${n}-disabled`]:u,[`${n}-vertical`]:L,[`${n}-horizontal`]:!L,[`${n}-with-marks`]:Pe.length}),style:o,onMouseDown:Pt,id:c},f.createElement("div",{className:X(`${n}-rail`,i?.rail),style:{...z,...a?.rail}}),K!==false&&f.createElement(wfe,{prefixCls:n,style:q,values:Ze,startPoint:U,onStartMove:Tt?gt:void 0}),f.createElement(xfe,{prefixCls:n,marks:Pe,dots:Q,style:F,activeStyle:G}),f.createElement(bfe,{ref:oe,prefixCls:n,style:V,values:_e,draggingIndex:Oe,draggingDelete:Xe,onStartMove:gt,onOffsetChange:wt,onFocus:p,onBlur:g,handleRender:D,activeHandleRender:B,onChangeComplete:nt,onDelete:me?Ke:void 0}),f.createElement(Sfe,{prefixCls:n,marks:Pe,onClick:ct})))}),DF=f.createContext({}),d8=f.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:o}=e,i=f.useRef(null),a=n&&!r,c=f.useRef(null);function u(){Lt.cancel(c.current),c.current=null;}function d(){c.current=Lt(()=>{i.current?.forceAlign(),c.current=null;});}return f.useEffect(()=>(a?d():u(),u),[a,e.title,o]),f.createElement(ec,{ref:Ar(i,t),...e,open:a})}),Afe=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:c,handleColorDisabled:u,calc:d,handleSize:m,handleSizeHover:p,handleActiveColor:g,handleActiveOutlineColor:b,handleLineWidth:y,handleLineWidthHover:S,motionDurationMid:C}=e;return {[t]:{...cn(e),position:"relative",height:r,margin:`${ie(a)} ${ie(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${ie(i)} ${ie(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${C}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${C}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:c},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${ie(y)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:m,height:m,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:d(y).mul(-1).equal(),insetBlockStart:d(y).mul(-1).equal(),width:d(m).add(d(y).mul(2)).equal(),height:d(m).add(d(y).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:m,height:m,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${ie(y)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:` inset-inline-start ${C}, inset-block-start ${C}, width ${C}, height ${C}, box-shadow ${C}, outline ${C} `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:d(p).sub(m).div(2).add(S).mul(-1).equal(),insetBlockStart:d(p).sub(m).div(2).add(S).mul(-1).equal(),width:d(p).add(d(S).mul(2)).equal(),height:d(p).add(d(S).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${ie(S)} ${g}`,outline:`6px solid ${b}`,width:p,height:p,insetInlineStart:e.calc(m).sub(p).div(2).equal(),insetBlockStart:e.calc(m).sub(p).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${ie(y)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` ${t}-dot `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:m,height:m,boxShadow:`0 0 0 ${ie(y)} ${u}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:"unset"}}}},_F=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:c}=e,u=t?"paddingBlock":"paddingInline",d=t?"width":"height",m=t?"height":"width",p=t?"insetBlockStart":"insetInlineStart",g=t?"top":"insetInlineStart",b=c(r).mul(3).sub(o).div(2).equal(),y=c(o).sub(r).div(2).equal(),S=t?{borderWidth:`${ie(y)} 0`,transform:`translateY(${ie(c(y).mul(-1).equal())})`}:{borderWidth:`0 ${ie(y)}`,transform:`translateX(${ie(e.calc(y).mul(-1).equal())})`};return {[u]:r,[m]:c(r).mul(3).equal(),[`${n}-rail`]:{[d]:"100%",[m]:r},[`${n}-track,${n}-tracks`]:{[m]:r},[`${n}-track-draggable`]:{...S},[`${n}-handle`]:{[p]:b},[`${n}-mark`]:{insetInlineStart:0,top:0,[g]:c(r).mul(3).add(t?0:a).equal(),[d]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[g]:r,[d]:"100%",[m]:r},[`${n}-dot`]:{position:"absolute",[p]:c(r).sub(i).div(2).equal()}}},Nfe=e=>{const{componentCls:t,marginPartWithMark:n}=e;return {[`${t}-horizontal`]:{..._F(e,true),[`&${t}-with-marks`]:{marginBottom:n}}}},Pfe=e=>{const{componentCls:t}=e;return {[`${t}-vertical`]:{..._F(e,false),height:"100%"}}},Ife=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,c=new ln(a).setA(.2).toRgbString();return {controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:c,handleColorDisabled:new ln(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},Ofe=Ut("Slider",e=>{const t=Ht(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return [Afe(t),Nfe(t),Pfe(t)]},Ife);function Ux(){const[e,t]=f.useState(false),n=f.useRef(null),r=()=>{Lt.cancel(n.current);},o=i=>{r(),i?t(i):n.current=Lt(()=>{t(i);});};return f.useEffect(()=>r,[]),[e,o]}function Dfe(e){return e||e===null?e:t=>typeof t=="number"?t.toString():""}const LR=W.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:c,tooltip:u={},onChangeComplete:d,classNames:m,styles:p,vertical:g,orientation:b,...y}=e,[,S]=yu(b,g),{getPrefixCls:C,direction:w,className:$,style:M,classNames:T,styles:R,getPopupContainer:I}=Wt("slider"),P=W.useContext(eo),N=c??P,O={...e,disabled:N,vertical:S},[_,L]=Xt([T,m],[R,p],{props:O}),{handleRender:H,direction:U}=W.useContext(DF),V=(U||w)==="rtl",[z,F]=Ux(),[G,Y]=Ux(),Q={...u},{open:D,placement:B,getPopupContainer:K,prefixCls:J,formatter:ee}=Q,te=D,ne=(z||G)&&te!==false,ae=Dfe(ee),[oe,re]=Ux(),ce=Pe=>{d?.(Pe),re(false);},he=(Pe,ue)=>Pe||(ue?V?"left":"right":"top"),me=C("slider",n),[Re,se]=Ofe(me),de=X(o,$,_.root,i,{[`${me}-rtl`]:V,[`${me}-lock`]:oe},Re,se);V&&!S&&(y.reverse=!y.reverse),W.useEffect(()=>{const Pe=()=>{Lt(()=>{Y(false);},1);};return document.addEventListener("mouseup",Pe),()=>{document.removeEventListener("mouseup",Pe);}},[]);const Se=r&&!te,be=H||((Pe,ue)=>{const{index:ye}=ue,Te=Pe.props;function qe(nt,Ke,Oe){Oe&&y[nt]?.(Ke),Te[nt]?.(Ke);}const Ze={...Te,onMouseEnter:nt=>{F(true),qe("onMouseEnter",nt);},onMouseLeave:nt=>{F(false),qe("onMouseLeave",nt);},onMouseDown:nt=>{Y(true),re(true),qe("onMouseDown",nt);},onFocus:nt=>{Y(true),y.onFocus?.(nt),qe("onFocus",nt,true);},onBlur:nt=>{Y(false),y.onBlur?.(nt),qe("onBlur",nt,true);}},We=W.cloneElement(Pe,Ze),tt=(!!te||ne)&&ae!==null;return Se?We:W.createElement(d8,{...Q,prefixCls:C("tooltip",J),title:ae?ae(ue.value):"",value:ue.value,open:tt,placement:he(B,S),key:ye,classNames:{root:`${me}-tooltip`},getPopupContainer:K||I},We)}),He=Se?(Pe,ue)=>{const ye=W.cloneElement(Pe,{style:{...Pe.props.style,visibility:"hidden"}});return W.createElement(d8,{...Q,prefixCls:C("tooltip",J),title:ae?ae(ue.value):"",open:ae!==null&&ne,placement:he(B,S),key:"tooltip",classNames:{root:`${me}-tooltip`},getPopupContainer:K||I,draggingDelete:ue.draggingDelete},ye)}:void 0,Ue={...L.root,...M,...a};return W.createElement(Tfe,{...y,classNames:_,styles:L,step:y.step,range:r,className:de,style:Ue,disabled:N,vertical:S,ref:t,prefixCls:me,handleRender:be,activeHandleRender:He,onChangeComplete:ce})}),LF=e=>{const{prefixCls:t,colors:n,type:r,color:o,range:i=false,className:a,activeIndex:c,onActive:u,onDragStart:d,onDragChange:m,onKeyDelete:p,...g}=e,b={...g,track:false},y=f.useMemo(()=>`linear-gradient(90deg, ${n.map(I=>`${I.color} ${I.percent}%`).join(", ")})`,[n]),S=f.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),C=Rt(d),w=Rt(m),$=f.useMemo(()=>({onDragStart:C,onDragChange:w}),[]),M=Rt((R,I)=>{const{onFocus:P,style:N,className:O,onKeyDown:_}=R.props,L={...N};return r==="gradient"&&(L.background=bk(n,I.value)),f.cloneElement(R,{onFocus:H=>{u?.(I.index),P?.(H);},style:L,className:X(O,{[`${t}-slider-handle-active`]:c===I.index}),onKeyDown:H=>{(H.key==="Delete"||H.key==="Backspace")&&p&&p(I.index),_?.(H);}})}),T=f.useMemo(()=>({direction:"ltr",handleRender:M}),[]);return f.createElement(DF.Provider,{value:T},f.createElement(OF.Provider,{value:$},f.createElement(LR,{...b,className:X(a,`${t}-slider`),tooltip:{open:false},range:{editable:i,minCount:2},styles:{rail:{background:y},handle:S?{background:S}:{}},classNames:{rail:`${t}-slider-rail`,handle:`${t}-slider-handle`}})))},_fe=e=>{const{value:t,onChange:n,onChangeComplete:r}=e,o=a=>n(a[0]),i=a=>r(a[0]);return f.createElement(LF,{...e,value:[t],onChange:o,onChangeComplete:i})};function f8(e){return Yt(e).sort((t,n)=>t.percent-n.percent)}const Lfe=e=>{const{prefixCls:t,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:c,colors:u}=e,d=n==="gradient",m=f.useMemo(()=>u.map(w=>({percent:w.percent,color:w.color.toRgbString()})),[u]),p=f.useMemo(()=>m.map(w=>w.percent),[m]),g=f.useRef(m),b=({rawValues:w,draggingIndex:$,draggingValue:M})=>{if(w.length>m.length){const T=bk(m,M),R=Yt(m);R.splice($,0,{percent:M,color:T}),g.current=R;}else g.current=m;c(true),r(new jo(f8(g.current)),true);},y=({deleteIndex:w,draggingIndex:$,draggingValue:M})=>{let T=Yt(g.current);w!==-1?T.splice(w,1):(T[$]={...T[$],percent:M},T=f8(T)),r(new jo(T),true);},S=w=>{const $=Yt(m);$.splice(w,1);const M=new jo($);r(M),o(M);},C=w=>{o(new jo(m)),a>=w.length&&i(w.length-1),c(false);};return d?f.createElement(LF,{min:0,max:100,prefixCls:t,className:`${t}-gradient-slider`,colors:m,color:null,value:p,range:true,onChangeComplete:C,disabled:false,type:"gradient",activeIndex:a,onActive:i,onDragStart:b,onDragChange:y,onKeyDelete:S}):null},Bfe=f.memo(Lfe),zfe={slider:_fe},m8=()=>{const e=f.useContext(SF),{mode:t,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:c,onChange:u,onClear:d,onChangeComplete:m,activeIndex:p,gradientDragging:g,...b}=e,y=W.useMemo(()=>a.cleared?[{percent:0,color:new jo("")},{percent:100,color:new jo("")}]:a.getColors(),[a]),S=!a.isGradient(),[C,w]=W.useState(a);Mn(()=>{S||w(y[p]?.color);},[S,y,g,p]);const $=W.useMemo(()=>S?a:g?C:y[p]?.color,[y,a,p,S,C,g]),[M,T]=W.useState($),[R,I]=Nz(),P=M?.equals($)?$:M;Mn(()=>{T($);},[R,$?.toHexString()]);const N=(q,V)=>{let z=to(q);if(a.cleared){const G=z.toRgb();if(!G.r&&!G.g&&!G.b&&V){const{type:Y,value:Q=0}=V;z=new jo({h:Y==="hue"?Q:0,s:1,b:1,a:Y==="alpha"?Q/100:1});}else z=Hb(z);}if(t==="single")return z;const F=Yt(y);return F[p]={...F[p],color:z},new jo(F)},O=(q,V,z)=>{const F=N(q,z);T(F.isGradient()?F.getColors()[p].color:F),u(F,V);},_=(q,V)=>{m(N(q,V)),I();},L=q=>{u(N(q));};let H=null;const U=r.length>1;return (i||U)&&(H=W.createElement("div",{className:`${o}-operation`},U&&W.createElement(yF,{size:"small",options:r,value:t,onChange:n}),W.createElement(xF,{prefixCls:o,value:a,onChange:q=>{u(q),d?.();},...b}))),W.createElement(W.Fragment,null,H,W.createElement(Bfe,{...e,colors:y}),W.createElement(bre,{prefixCls:o,value:P?.toHsb(),disabledAlpha:c,onChange:(q,V)=>{O(q,true,V);},onChangeComplete:(q,V)=>{_(q,V);},components:zfe}),W.createElement(vfe,{value:$,onChange:L,prefixCls:o,disabledAlpha:c,...b}))},h8=()=>{const{prefixCls:e,value:t,presets:n,onChange:r}=f.useContext(CF);return Array.isArray(n)?W.createElement(moe,{value:t,presets:n,prefixCls:e,onChange:r}):null},kfe=e=>{const{prefixCls:t,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:c,disabledAlpha:u,mode:d,onModeChange:m,modeOptions:p,onChangeComplete:g,activeIndex:b,onActive:y,format:S,onFormatChange:C,gradientDragging:w,onGradientDragging:$,disabledFormat:M}=e,T=`${t}-inner`,R=W.useMemo(()=>({prefixCls:t,value:o,onChange:i,onClear:a,allowClear:c,disabledAlpha:u,mode:d,onModeChange:m,modeOptions:p,onChangeComplete:g,activeIndex:b,onActive:y,format:S,onFormatChange:C,gradientDragging:w,onGradientDragging:$,disabledFormat:M}),[t,o,i,a,c,u,d,m,p,g,b,y,S,C,w,$,M]),I=W.useMemo(()=>({prefixCls:t,value:o,presets:n,onChange:i}),[t,o,n,i]),P=W.createElement("div",{className:`${T}-content`},W.createElement(m8,null),Array.isArray(n)&&W.createElement(Hl,null),W.createElement(h8,null));return W.createElement(SF.Provider,{value:R},W.createElement(CF.Provider,{value:I},W.createElement("div",{className:T},typeof r=="function"?r(P,{components:{Picker:m8,Presets:h8}}):P)))},Ffe=f.forwardRef((e,t)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:c,showText:u,activeIndex:d,...m}=e,p=`${r}-trigger`,g=`${p}-text`,b=`${g}-cell`,[y]=No("ColorPicker"),S=W.useMemo(()=>{if(!u)return "";if(typeof u=="function")return u(n);if(n.cleared)return y.transparent;if(n.isGradient())return n.getColors().map((M,T)=>{const R=d!==-1&&d!==T;return W.createElement("span",{key:T,className:X(b,R&&`${b}-inactive`)},M.color.toRgbString()," ",M.percent,"%")});const w=n.toHexString().toUpperCase(),$=eR(n);switch(a){case "rgb":return n.toRgbString();case "hsb":return n.toHsbString();default:return $<100?`${w.slice(0,7)},${$}%`:w}},[n,a,u,d,y.transparent,b]),C=f.useMemo(()=>n.cleared?W.createElement(xF,{prefixCls:r}):W.createElement(WM,{prefixCls:r,color:n.toCssString()}),[n,r]);return W.createElement("div",{ref:t,className:X(p,c,{[`${p}-active`]:o,[`${p}-disabled`]:i}),...po(m)},C,u&&W.createElement("div",{className:g},S))});function Hfe(e,t,n){const[r]=No("ColorPicker"),[o,i]=dn(e,t),[a,c]=f.useState("single"),[u,d]=f.useMemo(()=>{const S=(Array.isArray(n)?n:[n]).filter(M=>M);S.length||S.push("single");const C=new Set(S),w=[],$=(M,T)=>{C.has(M)&&w.push({label:T,value:M});};return $("single",r.singleColor),$("gradient",r.gradientColor),[w,C]},[n,r.singleColor,r.gradientColor]),[m,p]=f.useState(null),g=Rt(S=>{p(S),i(S);}),b=f.useMemo(()=>{const S=to(o||"");return S.equals(m)?m:S},[o,m]),y=f.useMemo(()=>d.has(a)?a:u[0]?.value,[d,a,u]);return f.useEffect(()=>{c(b.isGradient()?"gradient":"single");},[b]),[b,g,y,c,u]}const BF=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),p8=(e,t)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=e;return {[`${n}-color-block`]:{position:"relative",borderRadius:r,width:t,height:t,boxShadow:o,flex:"none",...BF("50%",e.colorFillSecondary),[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${ie(i)} ${a}`,borderRadius:"inherit"}}}},Vfe=e=>{const{componentCls:t,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:c,controlHeightSM:u,marginXS:d,fontSizeIcon:m,paddingXS:p,colorTextPlaceholder:g,colorPickerInputNumberHandleWidth:b,lineWidth:y}=e;return {[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,padding:0,[`${n}-input-number-input`]:{paddingInlineStart:c,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:b}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${ie(i)}`,marginInlineStart:a},[`${t}-format-select${n}-select`]:{marginInlineEnd:d,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:e.calc(m).add(a).equal(),fontSize:r,lineHeight:ie(u)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{height:u,display:"flex",gap:a,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${ie(p)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:ie(e.calc(u).sub(e.calc(y).mul(2)).equal())},[`${n}-input-prefix`]:{color:g}}}}}},jfe=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:c,lineWidthBold:u,colorPickerHandlerSize:d}=e;return {userSelect:"none",[`${t}-select`]:{[`${t}-palette`]:{minHeight:e.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${t}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${t}-handler`]:{width:d,height:d,border:`${ie(u)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${c}`}}},Ufe=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:c,lineHeightSM:u,lineWidth:d,borderRadius:m,colorFill:p,colorWhite:g,marginXXS:b,paddingXS:y,fontHeightSM:S}=e;return {[`${t}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:S,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:b},[`${n}-collapse-item > ${n}-collapse-panel > ${n}-collapse-body`]:{padding:`${ie(y)} 0`},"&-label":{fontSize:a,color:c,lineHeight:u},"&-items":{display:"flex",flexWrap:"wrap",gap:e.calc(b).mul(1.5).equal(),[`${t}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:e.calc(i).add(e.calc(d).mul(4)).equal(),height:e.calc(i).add(e.calc(d).mul(4)).equal(),position:"absolute",top:e.calc(d).mul(-2).equal(),insetInlineStart:e.calc(d).mul(-2).equal(),borderRadius:m,border:`${ie(d)} solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:p},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.calc(i).div(13).mul(5).equal(),height:e.calc(i).div(13).mul(8).equal(),border:`${ie(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`&${t}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:g,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&${t}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},qfe=e=>{const{componentCls:t,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:c,marginSM:u,marginXS:d}=e,m=e.calc(a).sub(e.calc(i).mul(2).equal()).equal(),p=e.calc(a).add(e.calc(i).mul(2).equal()).equal(),g={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${e.colorPrimaryActive}`}};return {[`${t}-slider`]:[BF(ie(c),e.colorFillSecondary),{margin:0,padding:0,height:c,borderRadius:e.calc(c).div(2).equal(),"&-rail":{height:c,borderRadius:e.calc(c).div(2).equal(),boxShadow:n},[`& ${t}-slider-handle`]:{width:m,height:m,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:true,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:p,height:p,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${ie(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":g}}],[`${t}-slider-container`]:{display:"flex",gap:u,marginBottom:u,[`${t}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${t}-gradient-slider`]:{marginBottom:d,[`& ${t}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":g}}}},NE=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${ie(e.controlOutlineWidth)} ${n}`,outline:0}),Gfe=e=>{const{componentCls:t}=e;return {"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},g8=(e,t,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:c,red6:u}=e;return {[`${r}-clear`]:{width:t,height:t,borderRadius:o,border:`${ie(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${e.motionDurationFast}`,...n,"&::after":{content:'""',position:"absolute",insetInlineEnd:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:u},"&:hover":{borderColor:c}}}},Wfe=e=>{const{componentCls:t,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:c}=e;return {[`&${t}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${t}-trigger-active`]:{...NE(e,n,a)}},[`&${t}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${t}-trigger-active`]:{...NE(e,r,c)}}}},Kfe=e=>{const{componentCls:t,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:c,borderRadiusXS:u,borderRadiusLG:d,fontSizeLG:m}=e;return {[`&${t}-lg`]:{minWidth:n,minHeight:n,borderRadius:d,[`${t}-color-block, ${t}-clear`]:{width:o,height:o,borderRadius:a},[`${t}-trigger-text`]:{fontSize:m}},[`&${t}-sm`]:{minWidth:r,minHeight:r,borderRadius:c,[`${t}-color-block, ${t}-clear`]:{width:i,height:i,borderRadius:u},[`${t}-trigger-text`]:{lineHeight:ie(i)}}}},Yfe=e=>{const{antCls:t,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:c,colorText:u,colorBgContainerDisabled:d,borderRadius:m,marginXS:p,marginSM:g,controlHeight:b,controlHeightSM:y,colorBgTextActive:S,colorPickerPresetColorSize:C,colorPickerPreviewSize:w,lineWidth:$,colorBorder:M,paddingXXS:T,fontSize:R,colorPrimaryHover:I,controlOutline:P}=e;return [{[n]:{[`${n}-inner`]:{"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${t}-divider`]:{margin:`${ie(g)} 0 ${ie(p)}`}},[`${n}-panel`]:{...jfe(e)},...qfe(e),...p8(e,w),...Vfe(e),...Ufe(e),...g8(e,C,{marginInlineStart:"auto"}),[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:p}},"&-trigger":{minWidth:b,minHeight:b,borderRadius:m,border:`${ie($)} solid ${M}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:e.calc(T).sub($).equal(),[`${n}-trigger-text`]:{marginInlineStart:p,marginInlineEnd:e.calc(p).sub(e.calc(T).sub($)).equal(),fontSize:R,color:u,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:c}}},"&:hover":{borderColor:I},[`&${n}-trigger-active`]:{...NE(e,o,P)},"&-disabled":{color:c,background:d,cursor:"not-allowed","&:hover":{borderColor:S},[`${n}-trigger-text`]:{color:c}},...g8(e,y),...p8(e,y),...Wfe(e),...Kfe(e)},...Gfe(e)}},Af(e,{focusElCls:`${n}-trigger-active`})]},Xfe=Ut("ColorPicker",e=>{const{colorTextQuaternary:t,marginSM:n}=e,r=8,o=Ht(e,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${t}`,colorPickerSliderHeight:r,colorPickerPreviewSize:e.calc(r).mul(2).add(n).equal()});return Yfe(o)}),BR=e=>{const{mode:t,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:a=false,presets:c,children:u,trigger:d="click",open:m,disabled:p,placement:g="bottomLeft",arrow:b=true,panelRender:y,showText:S,style:C,className:w,size:$,rootClassName:M,prefixCls:T,styles:R,classNames:I,disabledAlpha:P=false,onFormatChange:N,onChange:O,onClear:_,onOpenChange:L,onChangeComplete:H,getPopupContainer:U,autoAdjustOverflow:q=true,destroyTooltipOnHide:V,destroyOnHidden:z,disabledFormat:F,...G}=e,{getPrefixCls:Y,direction:Q,className:D,style:B,classNames:K,styles:J}=Wt("colorPicker"),ee=f.useContext(eo),te=p??ee,ne=Y("color-picker",T),{compactSize:ae,compactItemClassnames:oe}=Ds(ne,Q),re=io(Ge=>$??ae??Ge),ce={...e,trigger:d,allowClear:a,autoAdjustOverflow:q,disabledAlpha:P,arrow:b,placement:g,disabled:te,size:re},[he,me]=Xt([K,I],[J,R],{props:ce},{popup:{_default:"root"}}),[Re,se]=dn(false,m),de=!te&&Re,[Se,be]=dn(i,o),He=Ge=>{be(Ge),Se!==Ge&&N?.(Ge);},Ue=Ge=>{(!Ge||!te)&&(se(Ge),L?.(Ge));},[Pe,ue,ye,Te,qe]=Hfe(r,n,t),Ze=f.useMemo(()=>eR(Pe)<100,[Pe]),[We,tt]=W.useState(null),nt=Ge=>{if(H){let ve=to(Ge);P&&Ze&&(ve=Hb(Ge)),H(ve);}},Ke=(Ge,ve)=>{let Ae=to(Ge);P&&Ze&&(Ae=Hb(Ae)),ue(Ae),tt(null),O&&O(Ae,Ae.toCssString()),ve||nt(Ae);},[Oe,Qe]=W.useState(0),[Xe,_e]=W.useState(false),ze=Ge=>{if(Te(Ge),Ge==="single"&&Pe.isGradient())Qe(0),Ke(new jo(Pe.getColors()[0].color)),tt(Pe);else if(Ge==="gradient"&&!Pe.isGradient()){const ve=Ze?Hb(Pe):Pe;Ke(new jo(We||[{percent:0,color:ve},{percent:100,color:ve}]));}},{status:ct}=W.useContext(go),Pt=Kn(ne),[ut,Dt]=Xfe(ne,Pt),wt={[`${ne}-rtl`]:Q},Tt=X(he.root,M,Dt,Pt,wt),gt=X(Fl(ne,ct),{[`${ne}-sm`]:re==="small",[`${ne}-lg`]:re==="large"},oe,D,Tt,w,ut),ft=X(ne,Tt,he.popup?.root),st={open:de,trigger:d,placement:g,arrow:b,rootClassName:M,getPopupContainer:U,autoAdjustOverflow:q,destroyOnHidden:z??!!V},Fe={...me.root,...B,...C};return W.createElement(Gi,{classNames:{root:ft},styles:{root:me.popup?.root,container:R?.popupOverlayInner},onOpenChange:Ue,content:W.createElement(kl,{form:true},W.createElement(kfe,{mode:ye,onModeChange:ze,modeOptions:qe,prefixCls:ne,value:Pe,allowClear:a,disabled:te,disabledAlpha:P,presets:c,panelRender:y,format:Se,onFormatChange:He,onChange:Ke,onChangeComplete:nt,onClear:_,activeIndex:Oe,onActive:Qe,gradientDragging:Xe,onGradientDragging:_e,disabledFormat:F})),...st},u||W.createElement(Ffe,{activeIndex:de?Oe:-1,open:de,className:gt,style:Fe,prefixCls:ne,disabled:te,showText:S,format:Se,...G,color:Pe}))},Qfe=lR(BR,void 0,e=>({...e,placement:"bottom",autoAdjustOverflow:false}),"color-picker",e=>e);BR._InternalPanelDoNotUseOrYouWillBeFired=Qfe;function W0(e){return ["small","middle","large"].includes(e)}function v8(e){return e?typeof e=="number"&&!Number.isNaN(e):false}const zF=W.createContext({latestIndex:0}),Zfe=zF.Provider,Jfe=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:c,styles:u}=e,{latestIndex:d}=f.useContext(zF);return Qr(o)?f.createElement(f.Fragment,null,f.createElement("div",{className:t,style:a},o),r{const{componentCls:t,antCls:n}=e;return {[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},tme=e=>{const{componentCls:t}=e;return {[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},nme=Ut("Space",e=>{const t=Ht(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return [eme(t),tme(t)]},()=>({}),{resetStyle:false}),rme=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:c,styles:u}=Wt("space"),{size:d=o??"small",align:m,className:p,rootClassName:g,children:b,direction:y,orientation:S,prefixCls:C,split:w,separator:$,style:M,vertical:T,wrap:R=false,classNames:I,styles:P,...N}=e,[O,_]=Array.isArray(d)?d:[d,d],L=W0(_),H=W0(O),U=v8(_),q=v8(O),V=Ko(b,{keepEmpty:true}),[z,F]=yu(S,T,y),G=m===void 0&&!F?"center":m,Y=$??w,Q=n("space",C),[D,B]=nme(Q),K={...e,size:d,orientation:z,align:G},[J,ee]=Xt([c,I],[u,P],{props:K}),te=X(Q,i,D,`${Q}-${z}`,{[`${Q}-rtl`]:r==="rtl",[`${Q}-align-${G}`]:G,[`${Q}-gap-row-${_}`]:L,[`${Q}-gap-col-${O}`]:H},p,g,B,J.root),ne=X(`${Q}-item`,J.item),ae=V.map((ce,he)=>{const me=ce?.key||`${ne}-${he}`;return f.createElement(Jfe,{prefix:Q,classNames:J,styles:ee,className:ne,key:me,index:he,separator:Y,style:ee.item},ce)}),oe=f.useMemo(()=>({latestIndex:V.reduce((he,me,Re)=>Qr(me)?Re:he,0)}),[V]);if(V.length===0)return null;const re={};return R&&(re.flexWrap="wrap"),!H&&q&&(re.columnGap=O),!L&&U&&(re.rowGap=_),f.createElement("div",{ref:t,className:te,style:{...re,...ee.root,...a,...M},...N},f.createElement(Zfe,{value:oe},ae))}),Es=rme;Es.Compact=UM;Es.Addon=RF;const kF=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=f.useContext(xt),{prefixCls:o,type:i="default",danger:a,disabled:c,loading:u,onClick:d,htmlType:m,children:p,className:g,menu:b,arrow:y,autoFocus:S,trigger:C,align:w,open:$,onOpenChange:M,placement:T,getPopupContainer:R,href:I,icon:P=f.createElement(MR,null),title:N,buttonsRender:O=re=>re,mouseEnterDelay:_,mouseLeaveDelay:L,overlayClassName:H,overlayStyle:U,destroyOnHidden:q,destroyPopupOnHide:V,dropdownRender:z,popupRender:F,...G}=e,Y=n("dropdown",o),Q=`${Y}-button`,B={menu:b,arrow:y,autoFocus:S,align:w,disabled:c,trigger:c?[]:C,onOpenChange:M,getPopupContainer:R||t,mouseEnterDelay:_,mouseLeaveDelay:L,classNames:{root:H},styles:{root:U},destroyOnHidden:q,popupRender:F||z},{compactSize:K,compactItemClassnames:J}=Ds(Y,r),ee=X(Q,J,g);"destroyPopupOnHide"in e&&(B.destroyPopupOnHide=V),"open"in e&&(B.open=$),"placement"in e?B.placement=T:B.placement=r==="rtl"?"bottomLeft":"bottomRight";const te=f.createElement(mt,{type:i,danger:a,disabled:c,loading:u,onClick:d,htmlType:m,href:I,title:N},p),ne=f.createElement(mt,{type:i,danger:a,icon:P}),[ae,oe]=O([te,ne]);return f.createElement(Es.Compact,{className:ee,size:K,block:true,...G},ae,f.createElement(i1,{...B},oe))};kF.__ANT_BUTTON=true;const nc=i1;nc.Button=kF;const FF=["wrap","nowrap","wrap-reverse"],HF=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],VF=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],ome=(e,t)=>{const n=t.wrap===true?"wrap":t.wrap;return {[`${e}-wrap-${n}`]:n&&FF.includes(n)}},ime=(e,t)=>{const n={};return VF.forEach(r=>{n[`${e}-align-${r}`]=t.align===r;}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},ame=(e,t)=>{const n={};return HF.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r;}),n},sme=(e,t)=>X({...ome(e,t),...ime(e,t),...ame(e,t)}),lme=e=>{const{componentCls:t}=e;return {[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},cme=e=>{const{componentCls:t}=e;return {[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},ume=e=>{const{componentCls:t}=e,n={};return FF.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r};}),n},dme=e=>{const{componentCls:t}=e,n={};return VF.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r};}),n},fme=e=>{const{componentCls:t}=e,n={};return HF.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r};}),n},mme=()=>({}),hme=Ut("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=Ht(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return [lme(o),cme(o),ume(o),dme(o),fme(o)]},mme,{resetStyle:false}),pme=W.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:a,gap:c,vertical:u,orientation:d,component:m="div",children:p,...g}=e,{flex:b,direction:y,getPrefixCls:S}=W.useContext(xt),C=S("flex",n),[w,$]=hme(C),[,M]=yu(d,u??b?.vertical),T=X(o,r,b?.className,C,w,$,sme(C,e),{[`${C}-rtl`]:y==="rtl",[`${C}-gap-${c}`]:W0(c),[`${C}-vertical`]:M}),R={...b?.style,...i};return Qr(a)&&(R.flex=a),Qr(c)&&!W0(c)&&(R.gap=c),W.createElement(m,{ref:t,className:T,style:R,...Ln(g,["justify","wrap","align"])},p)}),K0=W.createContext(null);var gme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function PE(){return PE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,PE({},e,{ref:t,icon:gme})),jF=f.forwardRef(vme),bme=e=>Qr(e)?typeof e=="object"&&!f.isValidElement(e)?e:{title:e}:null,yme=e=>{const{componentCls:t,floatButtonSize:n,iconCls:r,antCls:o,floatButtonIconSize:i}=e,[a,c]=dr(o,"float-btn"),u=`${t}-badge`,d=Math.SQRT2,m=(d-1)/d,p=e.calc(e.borderRadius).mul(m).equal(),g=e.calc(e.controlHeight).div(2).mul(m).equal();return {[t]:[{[a("size")]:ie(n)},{flexDirection:"column",margin:0,padding:`${ie(e.paddingXXS)} 0`,width:c("size"),minHeight:c("size"),height:"auto",wordBreak:"break-word",whiteSpace:"normal",gap:e.calc(e.paddingXXS).div(2).equal(),"&-rtl":{direction:"rtl"},[`&${t}-individual`]:{position:"fixed",zIndex:e.zIndexPopupBase,insetInlineEnd:e.floatButtonInsetInlineEnd,bottom:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary},[`&${t}-pure`]:{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-icon`]:{lineHeight:1},[`&${t}-icon-only`]:{[r]:{fontSize:i}},[`${t}-content`]:{fontSize:e.fontSizeSM},[u]:{position:"absolute",top:0,insetInlineEnd:0,[`&:not(${u}-dot)`]:{transform:"translate(50%, -50%)"}},[`&-rtl ${u}:not(${u}-dot)`]:{transform:"translate(-50%, -50%)"},"&-square":{[`${u}-dot`]:{marginTop:p,marginInlineEnd:p}},"&-circle":{[u]:{marginTop:g,marginInlineEnd:g}}}]}},Sme=e=>{const{componentCls:t,antCls:n,floatButtonSize:r,padding:o}=e,i=`${t}-group`,a=`${i}-list`,[c,u]=dr(n,"float-btn");return {[i]:[{[c("list-transform-start")]:`translate(0,${ie(r)})`,[c("list-trigger-offset")]:`calc(${ie(r)} + ${ie(o)})`},{...cn(e),position:"fixed",zIndex:e.zIndexPopupBase,insetInlineEnd:e.floatButtonInsetInlineEnd,bottom:e.floatButtonInsetBlockEnd,gap:o,"&-rtl":{direction:"rtl"},[`&${t}-pure`]:{position:"relative",inset:"auto"},[t]:{position:"relative",inset:"auto"}},{[`&:not(${i}-individual) ${a}`]:{boxShadow:e.boxShadowSecondary},[`&${i}-individual ${a}`]:{gap:o},[`&-menu-mode ${a}`]:{position:"absolute"},[a]:{borderRadius:e.borderRadiusLG,"&-motion":{transition:`all ${e.motionDurationSlow}`,"&-enter, &-appear":{opacity:0,transform:u("list-transform-start"),"&-active":{opacity:1,transform:"translate(0, 0)"}},"&-leave":{"&-active":{opacity:0,transform:u("list-transform-start")}}}},"&-top":{[a]:{bottom:u("list-trigger-offset")}},"&-bottom":{[a]:{[c("list-transform-start")]:`translate(0, calc(${ie(r)} * -1))`,top:u("list-trigger-offset")}},"&-left":{[a]:{[c("list-transform-start")]:`translate(${ie(r)}, 0)`,right:u("list-trigger-offset")}},"&-right":{[a]:{[c("list-transform-start")]:`translate(calc(${ie(r)} * -1), 0)`,left:u("list-trigger-offset")}}}]}},Cme=()=>({}),UF=Ut("FloatButton",e=>{const{controlHeightLG:t,marginXXL:n,marginLG:r,fontSizeIcon:o,calc:i}=e,a=Ht(e,{floatButtonIconSize:i(o).mul(1.5).equal(),floatButtonSize:t,floatButtonInsetBlockEnd:n,floatButtonInsetInlineEnd:r});return [yme(a),Sme(a),YM(e)]},Cme,{order:-998}),c1="float-btn",xme=W.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:o,style:i,type:a="default",shape:c="circle",icon:u,description:d,content:m,tooltip:p,badge:g={},classNames:b,styles:y,...S}=e,{getPrefixCls:C,direction:w}=W.useContext(xt),$=W.useContext(K0),M=C(c1,n),T=Kn(M),{shape:R,individual:I,classNames:P,styles:N}=$||{},O=R||c,_=I??true,L=m??d,H={...e,type:a,shape:O},[U,q]=UF(M,T),V=W.useMemo(()=>({icon:`${M}-icon`,content:`${M}-content`}),[M]),[z,F]=Xt([V,P,b],[N,y],{props:H}),G=!L&&!u?W.createElement(jF,null):u,[Y]=Su("FloatButton",i?.zIndex),Q={...i,zIndex:Y},D=Ln(g,["title","children","status","text"]),B="badge"in e&&W.createElement(n1,{...D,className:X(D.className,`${M}-badge`,{[`${M}-badge-dot`]:D.dot})}),K=bme(p);let J=W.createElement(mt,{...S,ref:t,className:X(U,q,T,M,r,o,`${M}-${a}`,`${M}-${O}`,{[`${M}-rtl`]:w==="rtl",[`${M}-individual`]:_,[`${M}-icon-only`]:!L}),classNames:z,styles:F,style:Q,shape:O,type:a,size:"large",icon:G,_skipSemantic:true},L,B);return K&&(J=W.createElement(ec,{...K},J)),J}),wu=xme,wme=W.createElement(Xle,null),qF=W.forwardRef((e,t)=>{const{backTopIcon:n}=Wt("floatButton"),{prefixCls:r,className:o,type:i="default",shape:a="circle",visibilityHeight:c=400,icon:u,target:d,onClick:m,duration:p=450,...g}=e,b=u??n??wme,[y,S]=f.useState(c===0),C=W.useRef(null);W.useImperativeHandle(t,()=>({nativeElement:C.current}));const w=()=>C.current?.ownerDocument||window,$=oJ(_=>{const L=Iz(_.target);S(L>=c);});f.useEffect(()=>{const L=(d||w)();return $({target:L}),L?.addEventListener("scroll",$),()=>{$.cancel(),L?.removeEventListener("scroll",$);}},[d]);const M=_=>{Fte(0,{getContainer:d||w,duration:p}),m?.(_);},{getPrefixCls:T}=f.useContext(xt),R=T(c1,r),I=T(),N=f.useContext(K0)?.shape||a,O={prefixCls:R,icon:b,type:i,shape:N,...g};return W.createElement(vo,{visible:y,motionName:`${I}-fade`},({className:_},L)=>W.createElement(wu,{ref:Ar(C,L),...O,onClick:M,className:X(o,_)}))}),GF=e=>{const{prefixCls:t,className:n,style:r,classNames:o,styles:i,rootClassName:a,shape:c="circle",type:u="default",placement:d,icon:m=W.createElement(jF,null),closeIcon:p,trigger:g,children:b,onOpenChange:y,open:S,onClick:C,...w}=e,{direction:$,getPrefixCls:M,closeIcon:T,classNames:R,styles:I,className:P,style:N}=Wt("floatButtonGroup"),O=p??T??W.createElement(Os,null),_=M(c1,t),L=Kn(_),[H,U]=UF(_,L),q=`${_}-group`,V=g&&["click","hover"].includes(g),[z]=Su("FloatButton",r?.zIndex),F=W.useRef(null),G=["top","left","right","bottom"].includes(d)?d:"top",[Y,Q]=dn(false,S),D=g==="hover",B=g==="click",K=Rt(de=>{Y!==de&&(Q(de),y?.(de));}),J=()=>{D&&K(true);},ee=()=>{D&&K(false);},te=de=>{B&&K(!Y),C?.(de);};W.useEffect(()=>{if(B){const de=Se=>{F.current?.contains(Se.target)||K(false);};return document.addEventListener("click",de,{capture:true}),()=>document.removeEventListener("click",de,{capture:true})}},[B]);const ne=c==="circle",ae={...e,shape:c,type:u,placement:G},[oe,re]=Xt([R,o],[I,i],{props:ae}),ce=W.useMemo(()=>({shape:c,individual:ne,classNames:{root:oe.item,icon:oe.itemIcon,content:oe.itemContent},styles:{root:re.item,icon:re.itemIcon,content:re.itemContent}}),[c,ne,oe,re]),he=W.useMemo(()=>({...ce,individual:true,classNames:{root:oe.trigger,icon:oe.triggerIcon,content:oe.triggerContent},styles:{root:re.trigger,icon:re.triggerIcon,content:re.triggerContent}}),[ce,oe,re]);let me;const Re=`${q}-list`,se=de=>{const Se=G==="top"||G==="bottom",be={className:X(Re,oe.list,de),style:re.list};return ne?me=W.createElement(pme,{vertical:Se,...be},b):me=W.createElement(Es.Compact,{vertical:Se,...be},b),me};return W.createElement(K0.Provider,{value:ce},W.createElement("div",{className:X(q,H,U,L,P,oe.root,n,a,{[`${q}-rtl`]:$==="rtl",[`${q}-individual`]:ne,[`${q}-${G}`]:V,[`${q}-menu-mode`]:V}),style:{...N,zIndex:z,...re.root,...r},ref:F,onMouseEnter:J,onMouseLeave:ee},V?W.createElement(vo,{visible:Y,motionName:`${Re}-motion`},({className:de})=>se(de)):se(),V&&W.createElement(K0.Provider,{value:he},W.createElement(wu,{type:u,icon:Y?O:m,"aria-label":e["aria-label"],className:`${q}-trigger`,onClick:te,...w}))))},b8=({backTop:e,...t})=>e?f.createElement(qF,{...t,visibilityHeight:0}):f.createElement(wu,{...t}),$me=({className:e,items:t,classNames:n,styles:r,prefixCls:o,...i})=>{const{getPrefixCls:a}=f.useContext(xt),u=`${a(c1,o)}-pure`;return t?f.createElement(GF,{className:X(e,u),classNames:n,styles:r,...i},t.map((d,m)=>f.createElement(b8,{key:m,...d}))):f.createElement(b8,{className:X(e,u),classNames:n,styles:r,...i})};wu.BackTop=qF;wu.Group=GF;wu._InternalPanelDoNotUseOrYouWillBeFired=$me;const Eme=e=>{const{getPrefixCls:t,direction:n}=f.useContext(xt),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[c,u]=uF(a),d=X(i,u,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},c,o),m=f.useContext(go),p=f.useMemo(()=>({...m,isFormItemInput:false}),[m]);return f.createElement(go.Provider,{value:p},f.createElement(Es.Compact,{className:d,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},Mme=e=>{const{componentCls:t,paddingXS:n}=e;return {[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},Rme=Ut(["Input","OTP"],e=>{const t=Ht(e,Df(e));return Mme(t)},_f),Tme=f.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:c,onFocus:u,...d}=e,{getPrefixCls:m}=f.useContext(xt),p=m("otp"),g=typeof c=="string"?c:r,b=f.useRef(null);f.useImperativeHandle(t,()=>b.current);const y=$=>{o(a,$.target.value);},S=()=>{Lt(()=>{const $=b.current?.input;document.activeElement===$&&$&&$.select();});},C=$=>{u?.($),S();},w=$=>{const{key:M,ctrlKey:T,metaKey:R}=$;M==="ArrowLeft"?i(a-1):M==="ArrowRight"?i(a+1):M==="z"&&(T||R)?$.preventDefault():M==="Backspace"&&!r&&i(a-1),S();};return f.createElement("span",{className:`${p}-input-wrapper`,role:"presentation"},c&&r!==""&&r!==void 0&&f.createElement("span",{className:`${p}-mask-icon`,"aria-hidden":"true"},g),f.createElement(Lf,{"aria-label":`OTP Input ${a+1}`,type:c===true?"password":"text",...d,ref:b,value:r,onInput:y,onFocus:C,onKeyDown:w,onMouseDown:S,onMouseUp:S,className:X(n,{[`${p}-mask-input`]:c})}))});function ab(e){return (e||"").split("")}const Ame=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=typeof r=="function"?r(t):r;return a?f.createElement("span",{className:X(`${n}-separator`,o),style:i},a):null},Nme=f.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:c,formatter:u,separator:d,variant:m,disabled:p,status:g,autoFocus:b,mask:y,type:S,onInput:C,onFocus:w,inputMode:$,classNames:M,styles:T,className:R,style:I,...P}=e,{classNames:N,styles:O,getPrefixCls:_,direction:L,style:H,className:U}=Wt("otp"),q=_("otp",n),V={...e,length:r},[z,F]=Xt([N,M],[O,T],{props:V}),G=po(P,{aria:true,data:true,attr:true}),[Y,Q]=Rme(q),D=io(de=>o??de),B=f.useContext(go),K=Pf(B.status,g),J=f.useMemo(()=>({...B,status:K,hasFeedback:false,feedbackIcon:null}),[B,K]),ee=f.useRef(null),te=f.useRef({});f.useImperativeHandle(t,()=>({focus:()=>{te.current[0]?.focus();},blur:()=>{for(let de=0;deu?u(de):de,[ae,oe]=f.useState(()=>ab(ne(i||"")));f.useEffect(()=>{a!==void 0&&oe(ab(a));},[a]);const re=Rt(de=>{oe(de),C&&C(de),c&&de.length===r&&de.every(Se=>Se)&&de.some((Se,be)=>ae[be]!==Se)&&c(de.join(""));}),ce=Rt((de,Se)=>{let be=Yt(ae);for(let Ue=0;Ue=0&&!be[Ue];Ue-=1)be.pop();const He=ne(be.map(Ue=>Ue||" ").join(""));return be=ab(He).map((Ue,Pe)=>Ue===" "&&!be[Pe]?be[Pe]:Ue),be}),he=(de,Se)=>{const be=ce(de,Se),He=Math.min(de+Se.length,r-1);He!==de&&be[de]!==void 0&&te.current[He]?.focus(),re(be);},me=de=>{te.current[de]?.focus();},Re=(de,Se)=>{for(let be=0;be{const be=`otp-${Se}`,He=ae[Se]||"";return f.createElement(f.Fragment,{key:be},f.createElement(Tme,{ref:Ue=>{te.current[Se]=Ue;},index:Se,size:D,htmlSize:1,className:X(z.input,`${q}-input`),style:F.input,onChange:he,value:He,onActiveChange:me,autoFocus:Se===0&&b,onFocus:Ue=>Re(Ue,Se),...se}),Sef.createElement(Wn,IE({},e,{ref:t,icon:Pme})),Ome=f.forwardRef(Ime);var Dme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function OE(){return OE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,OE({},e,{ref:t,icon:Dme})),Lme=f.forwardRef(_me),Bme=e=>e?f.createElement(Lme,null):f.createElement(Ome,null),zme={click:"onClick",hover:"onMouseOver"},kme=f.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=true,iconRender:i=Bme,suffix:a}=e,c=f.useContext(eo),u=n??c,d=typeof o=="object"&&o.visible!==void 0,[m,p]=f.useState(()=>d?o.visible:false),g=f.useRef(null);f.useEffect(()=>{d&&p(o.visible);},[d,o]);const b=IF(g),y=()=>{if(u)return;m&&b();const L=!m;p(L),typeof o=="object"&&o.onVisibleChange?.(L);},S=L=>{const H=zme[r]||"",U=i(m),q={[H]:y,className:`${L}-icon`,key:"passwordIcon",onMouseDown:V=>{V.preventDefault();},onMouseUp:V=>{V.preventDefault();}};return f.cloneElement(f.isValidElement(U)?U:f.createElement("span",null,U),q)},{className:C,prefixCls:w,inputPrefixCls:$,size:M,...T}=e,{getPrefixCls:R}=f.useContext(xt),I=R("input",$),P=R("input-password",w),N=o&&S(P),O=X(P,C,{[`${P}-${M}`]:!!M}),_={...Ln(T,["suffix","iconRender","visibilityToggle"]),type:m?"text":"password",className:O,prefixCls:I,suffix:f.createElement(f.Fragment,null,N,a)};return M&&(_.size=M),f.createElement(Lf,{ref:Ar(t,g),..._})}),Fme=e=>{const{componentCls:t}=e,n=`${t}-btn`;return {[t]:{width:"100%",[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}},Hme=Ut(["Input","Search"],e=>[Fme(e)]),Vme=f.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:c=false,addonAfter:u,loading:d,disabled:m,onSearch:p,onChange:g,onCompositionStart:b,onCompositionEnd:y,variant:S,onPressEnter:C,classNames:w,styles:$,hidden:M,...T}=e,{direction:R,getPrefixCls:I,classNames:P,styles:N}=Wt("inputSearch"),O={...e,enterButton:c},[_,L]=Xt([P,w],[N,$],{props:O},{button:{_default:"root"}}),H=f.useRef(false),U=I("input-search",n),q=I("input",r),[V,z]=Hme(U),{compactSize:F}=Ds(U,R),G=io(se=>i??F??se),Y=f.useRef(null),Q=se=>{se?.target&&se.type==="click"&&p&&p(se.target.value,se,{source:"clear"}),g?.(se);},D=se=>{document.activeElement===Y.current?.input&&se.preventDefault();},B=se=>{p&&p(Y.current?.input?.value,se,{source:"input"});},K=se=>{H.current||d||(C?.(se),B(se));},J=typeof c=="boolean"?f.createElement(pR,null):null,ee=`${U}-btn`,te=X(ee,{[`${ee}-${S}`]:S});let ne;const ae=c||{},oe=ae.type&&ae.type.__ANT_BUTTON===true;oe||ae.type==="button"?ne=kr(ae,{onMouseDown:D,onClick:se=>{ae?.props?.onClick?.(se),B(se);},key:"enterButton",...oe?{className:te,size:G}:{}}):ne=f.createElement(mt,{classNames:_.button,styles:L.button,className:te,color:c?"primary":"default",size:G,disabled:m,key:"enterButton",onMouseDown:D,onClick:B,loading:d,icon:J,variant:S==="borderless"||S==="filled"||S==="underlined"?"text":c?"solid":void 0},c),u&&(ne=[ne,kr(u,{key:"addonAfter"})]);const re=X(U,z,{[`${U}-rtl`]:R==="rtl",[`${U}-${G}`]:!!G,[`${U}-with-button`]:!!c},o,V,_.root),ce=se=>{H.current=true,b?.(se);},he=se=>{H.current=false,y?.(se);},me=po(T,{data:true}),Re=Ln({...T,classNames:Ln(_,["button","root"]),styles:Ln(L,["button","root"]),prefixCls:q,type:"search",size:G,variant:S,onPressEnter:K,onCompositionStart:ce,onCompositionEnd:he,onChange:Q,disabled:m},Object.keys(me));return f.createElement(UM,{className:re,style:{...a,...L.root},...me,hidden:M},f.createElement(Lf,{ref:Ar(Y,t),...Re}),ne)}),jme=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,Ume=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],qx={};let ii;function qme(e,t=false){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&qx[n])return qx[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),u={sizingStyle:Ume.map(d=>`${d}:${r.getPropertyValue(d)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(qx[n]=u),u}function Gme(e,t=false,n=null,r=null){ii||(ii=document.createElement("textarea"),ii.setAttribute("tab-index","-1"),ii.setAttribute("aria-hidden","true"),ii.setAttribute("name","hiddenTextarea"),document.body.appendChild(ii)),e.getAttribute("wrap")?ii.setAttribute("wrap",e.getAttribute("wrap")):ii.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:c}=qme(e,t);ii.setAttribute("style",`${c};${jme}`),ii.value=e.value||e.placeholder||"";let u,d,m,p=ii.scrollHeight;if(a==="border-box"?p+=i:a==="content-box"&&(p-=o),n!==null||r!==null){ii.value=" ";const b=ii.scrollHeight-o;n!==null&&(u=b*n,a==="border-box"&&(u=u+o+i),p=Math.max(u,p)),r!==null&&(d=b*r,a==="border-box"&&(d=d+o+i),m=p>d?"":"hidden",p=Math.min(d,p));}const g={height:p,overflowY:m,resize:"none"};return u&&(g.minHeight=u),d&&(g.maxHeight=d),g}function DE(){return DE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:c,style:u,disabled:d,onChange:m,onInternalAutoSize:p,...g}=e,[b,y]=dn(r,o),S=b??"",C=V=>{y(V.target.value),m?.(V);},w=f.useRef();f.useImperativeHandle(t,()=>({textArea:w.current}));const[$,M]=f.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),T=!!i,[R,I]=f.useState(Kx),[P,N]=f.useState(),O=()=>{I(Gx);};Mn(()=>{T&&O();},[o,$,M,T]),Mn(()=>{if(R===Gx)I(Wx);else if(R===Wx){const V=Gme(w.current,false,$,M);I(Kx),N(V);}},[R]);const _=f.useRef(),L=()=>{Lt.cancel(_.current);},H=V=>{R===Kx&&(a?.(V),i&&(L(),_.current=Lt(()=>{O();})));};f.useEffect(()=>L,[]);const q={...u,...T?P:null};return (R===Gx||R===Wx)&&(q.overflowY="hidden",q.overflowX="hidden"),f.createElement(da,{onResize:H,disabled:!(i||a)},f.createElement("textarea",DE({},g,{ref:w,style:q,className:X(n,c,{[`${n}-disabled`]:d}),disabled:d,value:S,onChange:C})))});function _E(){return _E=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[L,H]=dn(e,t),U=L==null?"":String(L),[q,V]=W.useState(false),z=W.useRef(false),[F,G]=W.useState(null),Y=f.useRef(null),Q=f.useRef(null),D=()=>Q.current?.textArea,B=()=>{D().focus();};f.useImperativeHandle(_,()=>({resizableTextArea:Q.current,focus:B,blur:()=>{D().blur();},nativeElement:Y.current?.nativeElement||D()})),f.useEffect(()=>{V(ue=>!S&&ue);},[S]);const[K,J]=W.useState(null);W.useEffect(()=>{K&&D().setSelectionRange(...K);},[K]);const ee=NF(g,p),te=ee.max??a,ne=Number(te)>0,ae=ee.strategy(U),oe=!!te&&ae>te,re=(ue,ye)=>{let Te=ye;!z.current&&ee.exceedFormatter&&ee.max&&ee.strategy(ye)>ee.max&&(Te=ee.exceedFormatter(ye,{max:ee.max}),ye!==Te&&J([D().selectionStart||0,D().selectionEnd||0])),H(Te),U0(ue.currentTarget,ue,o,Te);},ce=ue=>{z.current=true,c?.(ue);},he=ue=>{z.current=false,re(ue,ue.currentTarget.value),u?.(ue);},me=ue=>{re(ue,ue.target.value);},Re=ue=>{ue.key==="Enter"&&R&&!ue.nativeEvent.isComposing&&R(ue),N?.(ue);},se=ue=>{V(true),n?.(ue);},de=ue=>{V(false),r?.(ue);},Se=ue=>{H(""),B(),U0(D(),ue,o);};let be=d,He;ee.show&&(ee.showFormatter?He=ee.showFormatter({value:U,count:ae,maxLength:te}):He=`${ae}${ne?` / ${te}`:""}`,be=W.createElement(W.Fragment,null,be,W.createElement("span",{className:X(`${m}-data-count`,w?.count),style:$?.count},He)));const Ue=ue=>{M?.(ue),D()?.style.height&&G(true);},Pe=!P&&!p&&!i;return W.createElement(AF,{ref:Y,value:U,allowClear:i,handleReset:Se,suffix:be,prefixCls:m,classNames:{...w,affixWrapper:X(w?.affixWrapper,{[`${m}-show-count`]:p,[`${m}-textarea-allow-clear`]:i})},disabled:S,focused:q,className:X(b,oe&&`${m}-out-of-range`),style:{...y,...F&&!Pe?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof He=="string"?He:void 0}},hidden:C,readOnly:I,onClear:T},W.createElement(Wme,_E({},O,{autoSize:P,maxLength:a,onKeyDown:Re,onChange:me,onFocus:se,onBlur:de,onCompositionStart:ce,onCompositionEnd:he,className:X(w?.textarea),style:{resize:y?.resize,...$?.textarea},disabled:S,prefixCls:m,onResize:Ue,ref:Q,readOnly:I})))}),Yme=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return {[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` &-allow-clear > ${t}, &-affix-wrapper${r}-has-feedback ${t} `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},Xme=Ut(["Input","TextArea"],e=>{const t=Ht(e,Df(e));return Yme(t)},_f,{resetFont:false}),Qme=f.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=true,size:o,disabled:i,status:a,allowClear:c,classNames:u,rootClassName:d,className:m,style:p,styles:g,variant:b,showCount:y,onMouseDown:S,onResize:C,...w}=e,{getPrefixCls:$,direction:M,allowClear:T,autoComplete:R,className:I,style:P,classNames:N,styles:O}=Wt("textArea"),_=f.useContext(eo),L=i??_,{status:H,hasFeedback:U,feedbackIcon:q}=f.useContext(go),V=Pf(H,a),[z,F]=Xt([N,u],[O,g],{props:e}),G=f.useRef(null);f.useImperativeHandle(t,()=>({resizableTextArea:G.current?.resizableTextArea,focus:se=>{iR(G.current?.resizableTextArea?.textArea,se);},blur:()=>G.current?.blur()}));const Y=$("input",n),Q=Kn(Y),[D,B]=cF(Y,d);Xme(Y,Q);const{compactSize:K,compactItemClassnames:J}=Ds(Y,M),ee=io(se=>o??K??se),[te,ne]=Jy("textArea",b,r),ae=PF(c??T),[oe,re]=f.useState(false),[ce,he]=f.useState(false),me=se=>{re(true),S?.(se);const de=()=>{re(false),document.removeEventListener("mouseup",de);};document.addEventListener("mouseup",de);},Re=se=>{if(C?.(se),oe&&typeof getComputedStyle=="function"){const de=G.current?.nativeElement?.querySelector("textarea");de&&getComputedStyle(de).resize==="both"&&he(true);}};return f.createElement(Kme,{autoComplete:R,...w,style:{...F.root,...P,...p},styles:F,disabled:L,allowClear:ae,className:X(B,Q,m,d,J,I,z.root,{[`${Y}-textarea-affix-wrapper-resize-dirty`]:ce}),classNames:{...z,textarea:X({[`${Y}-sm`]:ee==="small",[`${Y}-lg`]:ee==="large"},D,z.textarea,oe&&`${Y}-mouse-active`),variant:X({[`${Y}-${te}`]:ne},Fl(Y,V)),affixWrapper:X(`${Y}-textarea-affix-wrapper`,{[`${Y}-affix-wrapper-rtl`]:M==="rtl",[`${Y}-affix-wrapper-sm`]:ee==="small",[`${Y}-affix-wrapper-lg`]:ee==="large",[`${Y}-textarea-show-count`]:y||e.count?.show},D)},prefixCls:Y,suffix:U&&f.createElement("span",{className:`${Y}-textarea-suffix`},q),showCount:y,ref:G,onResize:Re,onMouseDown:me})}),ba=Lf;ba.Group=Eme;ba.Search=Vme;ba.TextArea=Qme;ba.Password=kme;ba.OTP=Nme;var Zme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,LE({},e,{ref:t,icon:Zme})),y8=f.forwardRef(Jme);var ehe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};function BE(){return BE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,BE({},e,{ref:t,icon:ehe})),S8=f.forwardRef(the),nhe={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},rhe=[10,20,50,100],ohe=e=>{const{pageSizeOptions:t=rhe,locale:n,changeSize:r,pageSize:o,goButton:i,quickGo:a,rootPrefixCls:c,disabled:u,buildOptionText:d,showSizeChanger:m,sizeChangerRender:p}=e,[g,b]=W.useState(""),y=W.useMemo(()=>!g||Number.isNaN(g)?void 0:Number(g),[g]),S=typeof d=="function"?d:N=>`${N} ${n.items_per_page}`,C=N=>{const O=N.target.value;/^\d*$/.test(O)&&b(O);},w=N=>{i||g===""||(b(""),!(N.relatedTarget&&(N.relatedTarget.className.includes(`${c}-item-link`)||N.relatedTarget.className.includes(`${c}-item`)))&&a?.(y));},$=N=>{g!==""&&(N.keyCode===at.ENTER||N.type==="click")&&(b(""),a?.(y));},M=()=>t.some(N=>N.toString()===o.toString())?t:t.concat([o]).sort((N,O)=>{const _=Number.isNaN(Number(N))?0:Number(N),L=Number.isNaN(Number(O))?0:Number(O);return _-L}),T=`${c}-options`;if(!m&&!a)return null;let R=null,I=null,P=null;return m&&p&&(R=p({disabled:u,size:o,onSizeChange:N=>{r?.(Number(N));},"aria-label":n.page_size,className:`${T}-size-changer`,options:M().map(N=>({label:S(N),value:N}))})),a&&(i&&(P=typeof i=="boolean"?W.createElement("button",{type:"button",onClick:$,onKeyUp:$,disabled:u,className:`${T}-quick-jumper-button`},n.jump_to_confirm):W.createElement("span",{onClick:$,onKeyUp:$},i)),I=W.createElement("div",{className:`${T}-quick-jumper`},n.jump_to,W.createElement("input",{disabled:u,type:"text",value:g,onChange:C,onKeyUp:$,onBlur:w,"aria-label":n.page}),n.page,P)),W.createElement("li",{className:T},R,I)},Xm=e=>{const{rootPrefixCls:t,page:n,active:r,className:o,style:i,showTitle:a,onClick:c,onKeyPress:u,itemRender:d}=e,m=`${t}-item`,p=X(m,`${m}-${n}`,{[`${m}-active`]:r,[`${m}-disabled`]:!n},o),g=()=>{c(n);},b=S=>{u(S,c,n);},y=d(n,"page",W.createElement("a",{rel:"nofollow"},n));return y?W.createElement("li",{title:a?String(n):null,className:p,style:i,onClick:g,onKeyDown:b,tabIndex:0},y):null};function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function C8(){}function x8(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function Rc(e,t,n){const r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}const ahe=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:n="rc-select",className:r,classNames:o,styles:i,current:a,defaultCurrent:c=1,total:u=0,pageSize:d,defaultPageSize:m=10,onChange:p=C8,hideOnSinglePage:g,align:b,showPrevNextJumpers:y=true,showQuickJumper:S,showLessItems:C,showTitle:w=true,onShowSizeChange:$=C8,locale:M=nhe,style:T,totalBoundaryShowSizeChanger:R=50,disabled:I,simple:P,showTotal:N,showSizeChanger:O=u>R,sizeChangerRender:_,pageSizeOptions:L,itemRender:H=ihe,jumpPrevIcon:U,jumpNextIcon:q,prevIcon:V,nextIcon:z}=e,F=W.useRef(null),[G,Y]=dn(m,d),[Q,D]=dn(c,a),B=Math.max(1,Math.min(Q,Rc(void 0,G,u))),[K,J]=W.useState(B);f.useEffect(()=>{J(B);},[B]);const ee=Math.max(1,B-(C?3:5)),te=Math.min(Rc(void 0,G,u),B+(C?3:5));function ne(ve,Ae){let Ce=ve||W.createElement("button",{type:"button","aria-label":Ae,className:`${t}-item-link`});return typeof ve=="function"&&(Ce=W.createElement(ve,e)),Ce}function ae(ve){const Ae=ve.target.value,Ce=Rc(void 0,G,u);let pe;return Ae===""?pe=Ae:Number.isNaN(Number(Ae))?pe=K:Ae>=Ce?pe=Ce:pe=Number(Ae),pe}function oe(ve){return x8(ve)&&ve!==B&&x8(u)&&u>0}const re=u>G?S:false;function ce(ve){(ve.keyCode===at.UP||ve.keyCode===at.DOWN)&&ve.preventDefault();}function he(ve){const Ae=ae(ve);switch(Ae!==K&&J(Ae),ve.keyCode){case at.ENTER:se(Ae);break;case at.UP:se(Ae-1);break;case at.DOWN:se(Ae+1);break}}function me(ve){se(ae(ve));}function Re(ve){const Ae=Rc(ve,G,u),Ce=B>Ae&&Ae!==0?Ae:B;Y(ve),J(Ce),$?.(B,ve),D(Ce),p?.(Ce,ve);}function se(ve){if(oe(ve)&&!I){const Ae=Rc(void 0,G,u);let Ce=ve;return ve>Ae?Ce=Ae:ve<1&&(Ce=1),Ce!==K&&J(Ce),D(Ce),p?.(Ce,G),Ce}return B}const de=B>1,Se=Bu?u:B*G]));let Xe=null;const _e=Rc(void 0,G,u);if(g&&u<=G)return null;const ze=[],ct={rootPrefixCls:t,onClick:se,onKeyPress:ue,showTitle:w,itemRender:H,page:-1,className:o?.item,style:i?.item},Pt=B-1>0?B-1:0,ut=B+1<_e?B+1:_e,Dt=S&&S.goButton,wt=typeof P=="object"?P.readOnly:!P;let Tt=Dt,gt=null;P&&(Dt&&(typeof Dt=="boolean"?Tt=W.createElement("button",{type:"button",onClick:nt,onKeyUp:nt},M.jump_to_confirm):Tt=W.createElement("span",{onClick:nt,onKeyUp:nt},Dt),Tt=W.createElement("li",{title:w?`${M.jump_to}${B}/${_e}`:null,className:`${t}-simple-pager`},Tt)),gt=W.createElement("li",{title:w?`${B}/${_e}`:null,className:X(`${t}-simple-pager`,o?.item),style:i?.item},wt?K:W.createElement("input",{type:"text","aria-label":M.jump_to,value:K,disabled:I,onKeyDown:ce,onKeyUp:he,onChange:he,onBlur:me,size:3}),W.createElement("span",{className:`${t}-slash`},"/"),_e));const ft=C?1:2;if(_e<=3+ft*2){_e||ze.push(W.createElement(Xm,Sl({},ct,{key:"noPager",page:1,className:`${t}-item-disabled`})));for(let ve=1;ve<=_e;ve+=1)ze.push(W.createElement(Xm,Sl({},ct,{key:ve,page:ve,active:B===ve})));}else {const ve=C?M.prev_3:M.prev_5,Ae=C?M.next_3:M.next_5,Ce=H(ee,"jump-prev",ne(U,"prev page")),pe=H(te,"jump-next",ne(q,"next page"));y&&(Ke=Ce?W.createElement("li",{title:w?ve:null,key:"prev",onClick:Ue,tabIndex:0,onKeyDown:qe,className:X(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!U})},Ce):null,Xe=pe?W.createElement("li",{title:w?Ae:null,key:"next",onClick:Pe,tabIndex:0,onKeyDown:Ze,className:X(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!q})},pe):null);let Ie=Math.max(1,B-ft),$e=Math.min(B+ft,_e);B-1<=ft&&($e=1+ft*2),_e-B<=ft&&(Ie=_e-ft*2);for(let Le=Ie;Le<=$e;Le+=1)ze.push(W.createElement(Xm,Sl({},ct,{key:Le,page:Le,active:B===Le})));if(B-1>=ft*2&&B!==3&&(ze[0]=W.cloneElement(ze[0],{className:X(`${t}-item-after-jump-prev`,ze[0].props.className)}),ze.unshift(Ke)),_e-B>=ft*2&&B!==_e-2){const Le=ze[ze.length-1];ze[ze.length-1]=W.cloneElement(Le,{className:X(`${t}-item-before-jump-next`,Le.props.className)}),ze.push(Xe);}Ie!==1&&ze.unshift(W.createElement(Xm,Sl({},ct,{key:1,page:1}))),$e!==_e&&ze.push(W.createElement(Xm,Sl({},ct,{key:_e,page:_e})));}let st=We(Pt);if(st){const ve=!de||!_e;st=W.createElement("li",{title:w?M.prev_page:null,onClick:be,tabIndex:ve?null:0,onKeyDown:ye,className:X(`${t}-prev`,o?.item,{[`${t}-disabled`]:ve}),style:i?.item,"aria-disabled":ve},st);}let Fe=tt(ut);if(Fe){let ve,Ae;P?(ve=!Se,Ae=de?0:null):(ve=!Se||!_e,Ae=ve?null:0),Fe=W.createElement("li",{title:w?M.next_page:null,onClick:He,tabIndex:Ae,onKeyDown:Te,className:X(`${t}-next`,o?.item,{[`${t}-disabled`]:ve}),style:i?.item,"aria-disabled":ve},Fe);}const Ge=X(t,r,{[`${t}-start`]:b==="start",[`${t}-center`]:b==="center",[`${t}-end`]:b==="end",[`${t}-simple`]:P,[`${t}-disabled`]:I});return W.createElement("ul",Sl({className:Ge,style:T,ref:F},Oe),Qe,st,P?gt:ze,Fe,W.createElement(ohe,{locale:M,rootPrefixCls:t,disabled:I,selectPrefixCls:n,changeSize:Re,pageSize:G,pageSizeOptions:L,quickGo:re?se:null,goButton:Tt,showSizeChanger:O,sizeChangerRender:_}))},she=e=>{const{componentCls:t}=e;return {[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},lhe=e=>{const{componentCls:t}=e;return {[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...AR(e),width:e.paginationMiniQuickJumperInputWidth}}}}},che=e=>{const{componentCls:t}=e;return {[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...TR(e)}}}}},uhe=e=>{const{componentCls:t,antCls:n}=e,[,r]=dr(n,"pagination");return {[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r("item-size-actual"),lineHeight:r("item-size-actual"),verticalAlign:"top",[`${t}-item-link`]:{height:r("item-size-actual"),backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r("item-size-actual"),lineHeight:r("item-size-actual")}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:r("item-size-actual"),marginInlineEnd:r("item-spacing-actual"),input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${ie(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${ie(e.inputOutlineOffset)} 0 ${ie(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},dhe=e=>{const{componentCls:t,antCls:n}=e,[,r]=dr(n,"pagination");return {[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` ${t}-prev, ${t}-jump-prev, ${t}-jump-next `]:{marginInlineEnd:r("item-spacing-actual")},[` ${t}-prev, ${t}-next, ${t}-jump-prev, ${t}-jump-next `]:{display:"inline-block",minWidth:r("item-size-actual"),height:r("item-size-actual"),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r("item-size-actual"),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${ie(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:r("item-size-actual"),marginInlineStart:e.marginXS,lineHeight:r("item-size-actual"),verticalAlign:"baseline",input:{...s1(e),...RR(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...a1(e)},width:e.quickJumperInputWidth,height:r("item-size-actual"),boxSizing:"border-box",margin:0,marginInlineStart:r("item-spacing-actual"),marginInlineEnd:r("item-spacing-actual")}}}}},fhe=e=>{const{componentCls:t,antCls:n}=e,[,r]=dr(n,"pagination");return {[`${t}-item`]:{display:"inline-block",minWidth:r("item-size-actual"),height:r("item-size-actual"),marginInlineEnd:r("item-spacing-actual"),fontFamily:e.fontFamily,lineHeight:ie(e.calc(r("item-size-actual")).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${ie(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ie(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},mhe=e=>{const{componentCls:t,antCls:n}=e,[r,o]=dr(n,"pagination");return {[t]:{[r("item-size-actual")]:ie(e.itemSize),[r("item-spacing-actual")]:ie(e.marginXS),"&-small":{[r("item-size-actual")]:ie(e.itemSizeSM),[r("item-spacing-actual")]:ie(e.marginXXS)},"&-large":{[r("item-size-actual")]:ie(e.itemSizeLG),[r("item-spacing-actual")]:ie(e.marginSM)},...cn(e),display:"flex",alignItems:"center","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:o("item-size-actual"),marginInlineEnd:o("item-spacing-actual"),lineHeight:ie(e.calc(o("item-size-actual")).sub(2).equal()),verticalAlign:"middle"},...fhe(e),...dhe(e),...uhe(e),...lhe(e),...che(e),...she(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},hhe=e=>{const{componentCls:t}=e;return {[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Si(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...ha(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:ha(e)}}}},WF=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,..._f(e)}),KF=e=>Ht(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},Df(e)),phe=Ut("Pagination",e=>{const t=KF(e);return [mhe(t),hhe(t)]},WF),ghe=e=>{const{componentCls:t}=e;return {[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},vhe=Rf(["Pagination","bordered"],e=>{const t=KF(e);return ghe(t)},WF);function w8(e){return f.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[true,e]:[void 0,void 0],[e])}const bhe=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:o,rootClassName:i,style:a,size:c,locale:u,responsive:d,showSizeChanger:m,selectComponentClass:p,pageSizeOptions:g,styles:b,classNames:y,...S}=e,{xs:C}=x7(d),[,w]=Hr(),{getPrefixCls:$,direction:M,showSizeChanger:T,className:R,style:I,classNames:P,styles:N,totalBoundaryShowSizeChanger:O}=Wt("pagination"),_=$("pagination",n),[L,H]=phe(_),U=io(c),q=U==="small"||!!(C&&!U&&d),V={...e,size:U},[z,F]=Xt([P,y],[N,b],{props:V}),[G]=No("Pagination",Ez),Y={...G,...u},[Q,D]=w8(m),[B,K]=w8(T),J=Q??B,ee=D??K,te=p||Jl,ne=f.useMemo(()=>g?g.map(me=>Number(me)):void 0,[g]),ae=me=>{const{disabled:Re,size:se,onSizeChange:de,"aria-label":Se,className:be,options:He}=me,{className:Ue,onChange:Pe}=ee||{},ue=He.find(ye=>String(ye.value)===String(se))?.value;return f.createElement(te,{disabled:Re,showSearch:true,popupMatchSelectWidth:false,getPopupContainer:ye=>ye.parentNode,"aria-label":Se,options:He,...ee,value:ue,onChange:(ye,Te)=>{de?.(ye),Pe?.(ye,Te);},size:U,className:X(be,Ue)})},oe=f.useMemo(()=>{const me=f.createElement("span",{className:`${_}-item-ellipsis`},"•••"),Re=f.createElement("button",{className:`${_}-item-link`,type:"button",tabIndex:-1},M==="rtl"?f.createElement(of,null):f.createElement(ap,null)),se=f.createElement("button",{className:`${_}-item-link`,type:"button",tabIndex:-1},M==="rtl"?f.createElement(ap,null):f.createElement(of,null)),de=f.createElement("a",{className:`${_}-item-link`},f.createElement("div",{className:`${_}-item-container`},M==="rtl"?f.createElement(S8,{className:`${_}-item-link-icon`}):f.createElement(y8,{className:`${_}-item-link-icon`}),me)),Se=f.createElement("a",{className:`${_}-item-link`},f.createElement("div",{className:`${_}-item-container`},M==="rtl"?f.createElement(y8,{className:`${_}-item-link-icon`}):f.createElement(S8,{className:`${_}-item-link-icon`}),me));return {prevIcon:Re,nextIcon:se,jumpPrevIcon:de,jumpNextIcon:Se}},[M,_]),re=$("select",r),ce=X({[`${_}-${t}`]:!!t,[`${_}-${U}`]:U,[`${_}-mini`]:q,[`${_}-rtl`]:M==="rtl",[`${_}-bordered`]:w.wireframe},R,o,i,z.root,L,H),he={...F.root,...I,...a};return f.createElement(f.Fragment,null,w.wireframe&&f.createElement(vhe,{prefixCls:_}),f.createElement(ahe,{...oe,...S,styles:F,classNames:z,style:he,prefixCls:_,selectPrefixCls:re,className:ce,locale:Y,pageSizeOptions:ne,showSizeChanger:J,totalBoundaryShowSizeChanger:S.totalBoundaryShowSizeChanger??O,sizeChangerRender:ae}))},Y0=100,YF=Y0/5,XF=Y0/2-YF/2,Yx=XF*2*Math.PI,$8=50,E8=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return f.createElement("circle",{className:X(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:XF,cx:$8,cy:$8,strokeWidth:YF,style:n})},yhe=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,o=`${r}-hidden`,[i,a]=f.useState(false);Mn(()=>{e!==0&&a(true);},[e!==0]);const c=Math.max(Math.min(e,100),0);if(!i)return null;const u={strokeDashoffset:`${Yx/4}`,strokeDasharray:`${Yx*c/100} ${Yx*(100-c)/100}`};return f.createElement("span",{className:X(r,`${n}-progress`,c<=0&&o)},f.createElement("svg",{viewBox:`0 0 ${Y0} ${Y0}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},f.createElement(E8,{dotClassName:n,hasCircleCls:true}),f.createElement(E8,{dotClassName:n,style:u})))};function She(e){const{prefixCls:t,percent:n=0,className:r,style:o}=e,i=`${t}-dot`,a=`${i}-holder`,c=`${a}-hidden`;return f.createElement(f.Fragment,null,f.createElement("span",{className:X(a,r,n>0&&c),style:o},f.createElement("span",{className:X(i,`${t}-dot-spin`)},[1,2,3,4].map(u=>f.createElement("i",{className:`${t}-dot-item`,key:u})))),f.createElement(yhe,{prefixCls:t,percent:n}))}function Che(e){const{prefixCls:t,indicator:n,percent:r,className:o,style:i}=e,a=`${t}-dot`;return n&&f.isValidElement(n)?kr(n,c=>({className:X(c.className,a,o),style:{...c.style,...i},percent:r})):f.createElement(She,{prefixCls:t,percent:r,className:o,style:i})}const xhe=new Bt("antSpinMove",{to:{opacity:1}}),whe=new Bt("antRotate",{to:{transform:"rotate(405deg)"}}),$he=e=>{const{componentCls:t,calc:n}=e;return {[t]:{...cn(e),position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:xhe,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:whe,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}}}},Ehe=e=>{const{controlHeightLG:t,controlHeight:n}=e;return {contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},Mhe=Ut("Spin",e=>{const t=Ht(e,{spinDotDefault:e.colorTextDescription});return $he(t)},Ehe),Rhe=200,M8=[[30,.05],[70,.03],[96,.01]];function The(e,t){const[n,r]=f.useState(0),o=f.useRef(null),i=t==="auto";return f.useEffect(()=>(i&&e&&(r(0),o.current=setInterval(()=>{r(a=>{const c=100-a;for(let u=0;u{o.current&&(clearInterval(o.current),o.current=null);}),[i,e]),i?n:t}let QF;function Ahe(e,t){return !!e&&!!t&&!Number.isNaN(Number(t))}const u1=e=>{const{prefixCls:t,spinning:n=true,delay:r=0,className:o,rootClassName:i,size:a="default",tip:c,wrapperClassName:u,style:d,children:m,fullscreen:p=false,indicator:g,percent:b,classNames:y,styles:S,...C}=e,{getPrefixCls:w,direction:$,indicator:M,className:T,style:R,classNames:I,styles:P}=Wt("spin"),N=w("spin",t),[O,_]=Mhe(N),[L,H]=f.useState(()=>n&&!Ahe(n,r)),U=The(L,b);f.useEffect(()=>{if(n){const K=pde(r,()=>{H(true);});return K(),()=>{K?.cancel?.();}}H(false);},[r,n]);const q=f.useMemo(()=>typeof m<"u"&&!p,[m,p]),V={...e,size:a,spinning:L,tip:c,fullscreen:p,children:m,percent:U},[z,F]=Xt([I,y],[P,S],{props:V}),G=X(N,T,{[`${N}-sm`]:a==="small",[`${N}-lg`]:a==="large",[`${N}-spinning`]:L,[`${N}-show-text`]:!!c,[`${N}-rtl`]:$==="rtl"},o,!p&&i,!p&&z.root,O,_),Y=X(`${N}-container`,{[`${N}-blur`]:L}),Q=g??M??QF,D={...R,...d},B=f.createElement("div",{...C,style:p?D:{...F.root,...D},className:G,"aria-live":"polite","aria-busy":L},f.createElement(Che,{className:z.indicator,style:F.indicator,prefixCls:N,indicator:Q,percent:U}),c&&(q||p)?f.createElement("div",{className:X(`${N}-text`,z.tip),style:F.tip},c):null);return q?f.createElement("div",{...C,className:X(`${N}-nested-loading`,u,z.wrapper,O,_),style:F.wrapper},L&&f.createElement("div",{key:"loading"},B),f.createElement("div",{className:Y,key:"container"},m)):p?f.createElement("div",{className:X(`${N}-fullscreen`,{[`${N}-fullscreen-show`]:L},i,O,_,z.mask),style:F.mask},B):B};u1.setDefaultIndicator=e=>{QF=e;};let Dc=null,jc=e=>e(),up=[],dp={};function R8(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=dp,i=e?.()||document.body;return {getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}const Nhe=W.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(xt),i=dp.prefixCls||o("message"),a=f.useContext(D0),[c,u]=nk({...n,prefixCls:i,...a.message});return W.useImperativeHandle(t,()=>{const d={...c};return Object.keys(d).forEach(m=>{d[m]=(...p)=>(r(),c[m].apply(c,p));}),{instance:d,sync:r}}),u}),Phe=W.forwardRef((e,t)=>{const[n,r]=W.useState(R8),o=()=>{r(R8);};W.useEffect(o,[]);const i=HM(),a=i.getRootPrefixCls(),c=i.getIconPrefixCls(),u=i.getTheme(),d=W.createElement(Nhe,{ref:t,sync:o,messageConfig:n});return W.createElement(Po,{prefixCls:a,iconPrefixCls:c,theme:u},i.holderRender?i.holderRender(d):d)}),d1=()=>{if(!Dc){const e=document.createDocumentFragment(),t={fragment:e};Dc=t,jc(()=>{Ky(W.createElement(Phe,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,d1());});}}),e);});return}Dc.instance&&(up.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case "open":{jc(()=>{const r=Dc.instance.open({...dp,...e.config});r?.then(e.resolve),e.setCloseFn(r);});break}case "destroy":jc(()=>{Dc?.instance.destroy(e.key);});break;default:jc(()=>{var r;const o=(r=Dc.instance)[t].apply(r,Yt(e.args));o?.then(e.resolve),e.setCloseFn(o);});}}),up=[]);};function Ihe(e){dp={...dp,...e},jc(()=>{Dc?.sync?.();});}function Ohe(e){const t=jM(n=>{let r;const o={type:"open",config:e,resolve:n,setCloseFn:i=>{r=i;}};return up.push(o),()=>{r?jc(()=>{r();}):o.skipped=true;}});return d1(),t}function Dhe(e,t){const n=jM(r=>{let o;const i={type:e,args:t,resolve:r,setCloseFn:a=>{o=a;}};return up.push(i),()=>{o?jc(()=>{o();}):i.skipped=true;}});return d1(),n}const _he=e=>{up.push({type:"destroy",key:e}),d1();},Lhe=["success","info","warning","error","loading"],Bhe={open:Ohe,destroy:_he,config:Ihe,useMessage:rk,_InternalPanelDoNotUseOrYouWillBeFired:_ne},zR=Bhe;Lhe.forEach(e=>{zR[e]=(...t)=>Dhe(e,t);});const zhe=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:a,children:c,footer:u,...d}=e,{getPrefixCls:m}=f.useContext(xt),p=m(),g=t||m("modal"),b=Kn(p),[y,S]=Lk(g,b),C=`${g}-confirm`;let w={};return i?w={closable:o??false,title:"",footer:"",children:f.createElement(zk,{...e,prefixCls:g,confirmPrefixCls:C,rootPrefixCls:p,content:c})}:w={closable:o??true,title:a,footer:u!==null&&f.createElement(Ik,{...e}),children:c},f.createElement($k,{prefixCls:g,className:X(y,`${g}-pure-panel`,i&&C,i&&`${C}-${i}`,n,S,b),...d,closeIcon:Pk(g,r),closable:o,...w})},khe=n7(zhe);function ZF(e){return Kp(Vk(e))}const xa=Bk;xa.useModal=Wk;xa.info=function(t){return Kp(jk(t))};xa.success=function(t){return Kp(Uk(t))};xa.error=function(t){return Kp(qk(t))};xa.warning=ZF;xa.warn=ZF;xa.confirm=function(t){return Kp(Gk(t))};xa.destroyAll=function(){for(;Hc.length;){const t=Hc.pop();t&&t();}};xa.config=Cae;xa._InternalPanelDoNotUseOrYouWillBeFired=khe;let Md=null,Wb=e=>e(),X0=[],fp={};function T8(){const{getContainer:e,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:a}=fp,c=e?.()||document.body;return {getContainer:()=>c,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:a}}const Fhe=W.forwardRef((e,t)=>{const{notificationConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(xt),i=fp.prefixCls||o("notification"),a=f.useContext(D0),[c,u]=Jk({...n,prefixCls:i,...a.notification});return W.useEffect(r,[]),W.useImperativeHandle(t,()=>{const d={...c};return Object.keys(d).forEach(m=>{d[m]=(...p)=>(r(),c[m].apply(c,p));}),{instance:d,sync:r}}),u}),Hhe=W.forwardRef((e,t)=>{const[n,r]=W.useState(T8),o=()=>{r(T8);};W.useEffect(o,[]);const i=HM(),a=i.getRootPrefixCls(),c=i.getIconPrefixCls(),u=i.getTheme(),d=W.createElement(Fhe,{ref:t,sync:o,notificationConfig:n});return W.createElement(Po,{prefixCls:a,iconPrefixCls:c,theme:u},i.holderRender?i.holderRender(d):d)}),kR=()=>{if(!Md){const e=document.createDocumentFragment(),t={fragment:e};Md=t,Wb(()=>{Ky(W.createElement(Hhe,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,kR());});}}),e);});return}Md.instance&&(X0.forEach(e=>{switch(e.type){case "open":{Wb(()=>{Md.instance.open({...fp,...e.config});});break}case "destroy":Wb(()=>{Md?.instance?.destroy(e.key);});break}}),X0=[]);};function Vhe(e){fp={...fp,...e},Wb(()=>{Md?.sync?.();});}function JF(e){X0.push({type:"open",config:e}),kR();}const jhe=e=>{X0.push({type:"destroy",key:e}),kR();},Uhe=["success","info","warning","error"],qhe={open:JF,destroy:jhe,config:Vhe,useNotification:e7,_InternalPanelDoNotUseOrYouWillBeFired:_ae},eH=qhe;Uhe.forEach(e=>{eH[e]=t=>JF({...t,type:e});});const Ghe=e=>{const{componentCls:t,iconCls:n,antCls:r,zIndexPopup:o,colorText:i,colorWarning:a,marginXXS:c,marginXS:u,fontSize:d,fontWeightStrong:m,colorTextHeading:p}=e;return {[t]:{zIndex:o,[`&${r}-popover`]:{fontSize:d},[`${t}-message`]:{marginBottom:u,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:a,fontSize:d,lineHeight:1,marginInlineEnd:u},[`${t}-title`]:{fontWeight:m,color:p,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:c,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:u}}}}},Whe=e=>{const{zIndexPopupBase:t}=e;return {zIndexPopup:t+60}},tH=Ut("Popconfirm",e=>Ghe(e),Whe,{resetStyle:false}),nH=e=>{const{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:o,description:i,cancelText:a,okText:c,okType:u="primary",icon:d=f.createElement(Fp,null),showCancel:m=true,close:p,onConfirm:g,onCancel:b,onPopupClick:y,classNames:S,styles:C}=e,{getPrefixCls:w}=f.useContext(xt),[$]=No("Popconfirm",pa.Popconfirm),M=sf(o),T=sf(i);return f.createElement("div",{className:`${t}-inner-content`,onClick:y},f.createElement("div",{className:`${t}-message`},d&&f.createElement("span",{className:`${t}-message-icon`},d),f.createElement("div",{className:`${t}-message-text`},M&&f.createElement("div",{className:X(`${t}-title`,S?.title),style:C?.title},M),T&&f.createElement("div",{className:X(`${t}-description`,S?.content),style:C?.content},T))),f.createElement("div",{className:`${t}-buttons`},m&&f.createElement(mt,{onClick:b,size:"small",...r},a||$?.cancelText),f.createElement(rR,{buttonProps:{size:"small",...qM(u),...n},actionFn:g,close:p,prefixCls:w("btn"),quitOnNullishReturnValue:true,emitEvent:true},c||$?.okText)))},Khe=e=>{const{prefixCls:t,placement:n,className:r,style:o,...i}=e,{getPrefixCls:a}=f.useContext(xt),c=a("popconfirm",t);return tH(c),f.createElement(P7,{placement:n,className:X(c,r),style:o,content:f.createElement(nH,{prefixCls:c,...i})})},Yhe=f.forwardRef((e,t)=>{const{prefixCls:n,placement:r="top",trigger:o,okType:i="primary",icon:a=f.createElement(Fp,null),children:c,overlayClassName:u,onOpenChange:d,overlayStyle:m,styles:p,arrow:g,classNames:b,...y}=e,{getPrefixCls:S,className:C,style:w,classNames:$,styles:M,arrow:T,trigger:R}=Wt("popconfirm"),[I,P]=dn(e.defaultOpen??false,e.open),N=yR(g,T),O=o||R||"click",_=Q=>{P(Q),d?.(Q);},L=()=>{_(false);},H=Q=>e.onConfirm?.call(void 0,Q),U=Q=>{_(false),e.onCancel?.call(void 0,Q);},q=Q=>{const{disabled:D=false}=e;D||_(Q);},V=S("popconfirm",n),z={...e,placement:r,trigger:O,okType:i,overlayStyle:m,styles:p,classNames:b},[F,G]=Xt([$,b],[M,p],{props:z}),Y=X(V,C,u,F.root);return tH(V),f.createElement(Gi,{arrow:N,...Ln(y,["title"]),trigger:O,placement:r,onOpenChange:q,open:I,ref:t,classNames:{root:Y,container:F.container,arrow:F.arrow},styles:{root:{...w,...G.root,...m},container:G.container,arrow:G.arrow},content:f.createElement(nH,{okType:i,icon:a,...e,prefixCls:V,close:L,onConfirm:H,onCancel:U,classNames:F,styles:G}),"data-popover-inject":true},c)}),mp=Yhe;mp._InternalPanelDoNotUseOrYouWillBeFired=Khe;function Od(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=yM(e))||t){n&&(e=n);var r=0,o=function(){};return {s:o,n:function(){return r>=e.length?{done:true}:{done:false,value:e[r++]}},e:function(d){throw d},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=true,c=false;return {s:function(){n=n.call(e);},n:function(){var d=n.next();return a=d.done,d},e:function(d){c=true,i=d;},f:function(){try{a||n.return==null||n.return();}finally{if(c)throw i}}}}var Bf,Zp;function Ho(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(var r=t-1;r>=0;r--)n.push(e>>>r&1);}function ms(e,t){return (e>>>t&1)!=0}function ai(e){if(!e)throw new Error("Assertion error")}var _a=(function(){function e(t,n){Yi(this,e),yt(this,"modeBits",void 0),yt(this,"numBitsCharCount",void 0),this.modeBits=t,this.numBitsCharCount=n;}return Xi(e,[{key:"numCharCountBits",value:function(n){return this.numBitsCharCount[Math.floor((n+7)/17)]}}]),e})();Bf=_a;yt(_a,"NUMERIC",new Bf(1,[10,12,14]));yt(_a,"ALPHANUMERIC",new Bf(2,[9,11,13]));yt(_a,"BYTE",new Bf(4,[8,16,16]));yt(_a,"KANJI",new Bf(8,[8,10,12]));yt(_a,"ECI",new Bf(7,[0,0,0]));var Hi=Xi(function e(t,n){Yi(this,e),yt(this,"ordinal",void 0),yt(this,"formatBits",void 0),this.ordinal=t,this.formatBits=n;});Zp=Hi;yt(Hi,"LOW",new Zp(0,1));yt(Hi,"MEDIUM",new Zp(1,0));yt(Hi,"QUARTILE",new Zp(2,3));yt(Hi,"HIGH",new Zp(3,2));var Jc=(function(){function e(t,n,r){if(Yi(this,e),yt(this,"mode",void 0),yt(this,"numChars",void 0),yt(this,"bitData",void 0),this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice();}return Xi(e,[{key:"getData",value:function(){return this.bitData.slice()}}],[{key:"makeBytes",value:function(n){var r=[],o=Od(n),i;try{for(o.s();!(i=o.n()).done;){var a=i.value;Ho(a,8,r);}}catch(c){o.e(c);}finally{o.f();}return new e(_a.BYTE,n.length,r)}},{key:"makeNumeric",value:function(n){if(!e.isNumeric(n))throw new RangeError("String contains non-numeric characters");for(var r=[],o=0;o=1<e.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;for(var a=[],c=0;c>>9)*1335;var a=(r<<10|o)^21522;ai(a>>>15==0);for(var c=0;c<=5;c++)this.setFunctionModule(8,c,ms(a,c));this.setFunctionModule(8,7,ms(a,6)),this.setFunctionModule(8,8,ms(a,7)),this.setFunctionModule(7,8,ms(a,8));for(var u=9;u<15;u++)this.setFunctionModule(14-u,8,ms(a,u));for(var d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,ms(a,d));for(var m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,ms(a,m));this.setFunctionModule(8,this.size-8,true);}},{key:"drawVersion",value:function(){if(!(this.version<7)){for(var n=this.version,r=0;r<12;r++)n=n<<1^(n>>>11)*7973;var o=this.version<<12|n;ai(o>>>18==0);for(var i=0;i<18;i++){var a=ms(o,i),c=this.size-11+i%3,u=Math.floor(i/3);this.setFunctionModule(c,u,a),this.setFunctionModule(u,c,a);}}}},{key:"drawFinderPattern",value:function(n,r){for(var o=-4;o<=4;o++)for(var i=-4;i<=4;i++){var a=Math.max(Math.abs(i),Math.abs(o)),c=n+i,u=r+o;0<=c&&c=u)&&C.push(R[T]);});},$=0;$=1;o-=2){o==6&&(o=5);for(var i=0;i>>3],7-(r&7)),r++);}}ai(r==n.length*8);}},{key:"applyMask",value:function(n){if(n<0||n>7)throw new RangeError("Mask value out of range");for(var r=0;r5&&n++):(this.finderPenaltyAddHistory(i,a),o||(n+=this.finderPenaltyCountPatterns(a)*e.PENALTY_N3),o=this.modules[r][c],i=1);n+=this.finderPenaltyTerminateAndCount(o,i,a)*e.PENALTY_N3;}for(var u=0;u5&&n++):(this.finderPenaltyAddHistory(m,p),d||(n+=this.finderPenaltyCountPatterns(p)*e.PENALTY_N3),d=this.modules[g][u],m=1);n+=this.finderPenaltyTerminateAndCount(d,m,p)*e.PENALTY_N3;}for(var b=0;b0&&n[2]==r&&n[3]==r*3&&n[4]==r&&n[5]==r;return (o&&n[0]>=r*4&&n[6]>=r?1:0)+(o&&n[6]>=r*4&&n[0]>=r?1:0)}},{key:"finderPenaltyTerminateAndCount",value:function(n,r,o){var i=r;return n&&(this.finderPenaltyAddHistory(i,o),i=0),i+=this.size,this.finderPenaltyAddHistory(i,o),this.finderPenaltyCountPatterns(o)}},{key:"finderPenaltyAddHistory",value:function(n,r){var o=n;r[0]==0&&(o+=this.size),r.pop(),r.unshift(o);}}],[{key:"encodeText",value:function(n,r){var o=Jc.makeSegments(n);return e.encodeSegments(o,r)}},{key:"encodeBinary",value:function(n,r){var o=Jc.makeBytes(n);return e.encodeSegments([o],r)}},{key:"encodeSegments",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:true;if(!(e.MIN_VERSION<=o&&o<=i&&i<=e.MAX_VERSION)||a<-1||a>7)throw new RangeError("Invalid value");var u,d;for(u=o;;u++){var m=e.getNumDataCodewords(u,r)*8,p=Jc.getTotalBits(n,u);if(p<=m){d=p;break}if(u>=i)throw new RangeError("Data too long")}for(var g=r,b=0,y=[Hi.MEDIUM,Hi.QUARTILE,Hi.HIGH];b>>3]|=_<<7-(L&7);}),new e(u,g,O,a)}},{key:"getNumRawDataModules",value:function(n){if(ne.MAX_VERSION)throw new RangeError("Version number out of range");var r=(16*n+128)*n+64;if(n>=2){var o=Math.floor(n/7)+2;r-=(25*o-10)*o-55,n>=7&&(r-=36);}return ai(208<=r&&r<=29648),r}},{key:"getNumDataCodewords",value:function(n,r){return Math.floor(e.getNumRawDataModules(n)/8)-e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n]*e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n]}},{key:"reedSolomonComputeDivisor",value:function(n){if(n<1||n>255)throw new RangeError("Degree out of range");for(var r=[],o=0;o>>8||r>>>8)throw new RangeError("Byte out of range");for(var o=0,i=7;i>=0;i--)o=o<<1^(o>>>7)*285,o^=(r>>>i&1)*n;return ai(o>>>8==0),o}}]),e})();yt(_s,"MIN_VERSION",1);yt(_s,"MAX_VERSION",40);yt(_s,"PENALTY_N1",3);yt(_s,"PENALTY_N2",3);yt(_s,"PENALTY_N3",40);yt(_s,"PENALTY_N4",10);yt(_s,"ECC_CODEWORDS_PER_BLOCK",[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]]);yt(_s,"NUM_ERROR_CORRECTION_BLOCKS",[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]);var Xhe={L:Hi.LOW,M:Hi.MEDIUM,Q:Hi.QUARTILE,H:Hi.HIGH},rH=128,oH="L",iH="#FFFFFF",aH="#000000",sH=false,lH=1,Qhe=4,Zhe=0,Jhe=.1,cH=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[];return t.forEach(function(o,i){var a=null;o.forEach(function(c,u){if(!c&&a!==null){r.push("M".concat(a+n," ").concat(i+n,"h").concat(u-a,"v1H").concat(a+n,"z")),a=null;return}if(u===o.length-1){if(!c)return;a===null?r.push("M".concat(u+n,",").concat(i+n," h1v1H").concat(u+n,"z")):r.push("M".concat(a+n,",").concat(i+n," h").concat(u+1-a,"v1H").concat(a+n,"z"));return}c&&a===null&&(a=u);});}),r.join("")},uH=function(t,n){return t.slice().map(function(r,o){return o=n.y+n.h?r:r.map(function(i,a){return a=n.x+n.w?i:false})})},epe=function(t,n,r,o){if(o==null)return null;var i=t.length+r*2,a=Math.floor(n*Jhe),c=i/n,u=(o.width||a)*c,d=(o.height||a)*c,m=o.x==null?t.length/2-u/2:o.x*c,p=o.y==null?t.length/2-d/2:o.y*c,g=o.opacity==null?1:o.opacity,b=null;if(o.excavate){var y=Math.floor(m),S=Math.floor(p),C=Math.ceil(u+m-y),w=Math.ceil(d+p-S);b={x:y,y:S,w:C,h:w};}var $=o.crossOrigin;return {x:m,y:p,h:d,w:u,excavation:b,opacity:g,crossOrigin:$}},tpe=function(t,n){return n!=null?Math.max(Math.floor(n),0):t?Qhe:Zhe},npe=(function(){try{new Path2D().addPath(new Path2D);}catch{return false}return true})(),dH=function(t){var n=t.value,r=t.level,o=t.minVersion,i=t.includeMargin,a=t.marginSize,c=t.imageSettings,u=t.size,d=t.boostLevel,m=W.useMemo(function(){var p=Array.isArray(n)?n:[n],g=p.reduce(function(b,y){return b.push.apply(b,Yt(Jc.makeSegments(y))),b},[]);return _s.encodeSegments(g,Xhe[r],o,void 0,void 0,d)},[n,r,o,d]);return W.useMemo(function(){var p=m.getModules(),g=tpe(i,a),b=p.length+g*2,y=epe(p,u,g,c);return {cells:p,margin:g,numCells:b,calculatedImageSettings:y,qrcode:m}},[m,u,c,i,a])},rpe=["value","size","level","bgColor","fgColor","includeMargin","minVersion","marginSize","style","imageSettings","boostLevel"],ope=W.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?rH:r,i=e.level,a=i===void 0?oH:i,c=e.bgColor,u=c===void 0?iH:c,d=e.fgColor,m=d===void 0?aH:d,p=e.includeMargin,g=p===void 0?sH:p,b=e.minVersion,y=b===void 0?lH:b,S=e.marginSize,C=e.style,w=e.imageSettings,$=e.boostLevel,M=pF(e,rpe),T=w?.src,R=W.useRef(null),I=W.useRef(null),P=W.useCallback(function(G){R.current=G,typeof t=="function"?t(G):t&&(t.current=G);},[t]),N=W.useState(false),O=RM(N,2),_=O[1],L=dH({value:n,level:a,minVersion:y,includeMargin:g,marginSize:S,imageSettings:w,size:o,boostLevel:$}),H=L.margin,U=L.cells,q=L.numCells,V=L.calculatedImageSettings;W.useEffect(function(){if(R.current){var G=R.current,Y=G.getContext("2d");if(!Y)return;var Q=U,D=I.current,B=V!=null&&D!==null&&D.complete&&D.naturalHeight!==0&&D.naturalWidth!==0;B&&V.excavation!=null&&(Q=uH(U,V.excavation));var K=window.devicePixelRatio||1;G.height=G.width=o*K;var J=o/q*K;Y.scale(J,J),Y.fillStyle=u,Y.fillRect(0,0,q,q),Y.fillStyle=m,npe?Y.fill(new Path2D(cH(Q,H))):U.forEach(function(ee,te){ee.forEach(function(ne,ae){ne&&Y.fillRect(ae+H,te+H,1,1);});}),V&&(Y.globalAlpha=V.opacity),B&&Y.drawImage(D,V.x+H,V.y+H,V.w,V.h);}}),W.useEffect(function(){_(false);},[T]);var z=Jn({height:o,width:o},C),F=null;return T!=null&&(F=W.createElement("img",{alt:"QR-Code",src:T,key:T,style:{display:"none"},onLoad:function(){_(true);},ref:I,crossOrigin:V?.crossOrigin})),W.createElement(W.Fragment,null,W.createElement("canvas",ir({style:z,height:o,width:o,ref:P,role:"img"},M)),F)}),ipe=["value","size","level","bgColor","fgColor","includeMargin","minVersion","title","marginSize","imageSettings","boostLevel"],ape=W.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?rH:r,i=e.level,a=i===void 0?oH:i,c=e.bgColor,u=c===void 0?iH:c,d=e.fgColor,m=d===void 0?aH:d,p=e.includeMargin,g=p===void 0?sH:p,b=e.minVersion,y=b===void 0?lH:b,S=e.title,C=e.marginSize,w=e.imageSettings,$=e.boostLevel,M=pF(e,ipe),T=dH({value:n,level:a,minVersion:y,includeMargin:g,marginSize:C,imageSettings:w,size:o,boostLevel:$}),R=T.margin,I=T.cells,P=T.numCells,N=T.calculatedImageSettings,O=I,_=null;w!=null&&N!=null&&(N.excavation!=null&&(O=uH(I,N.excavation)),_=W.createElement("image",{href:w.src,height:N.h,width:N.w,x:N.x+R,y:N.y+R,preserveAspectRatio:"none",opacity:N.opacity,crossOrigin:N.crossOrigin}));var L=cH(O,R);return W.createElement("svg",ir({height:o,width:o,viewBox:"0 0 ".concat(P," ").concat(P),ref:t,role:"img"},M),!!S&&W.createElement("title",null,S),W.createElement("path",{fill:u,d:"M0,0 h".concat(P,"v").concat(P,"H0z"),shapeRendering:"crispEdges"}),W.createElement("path",{fill:m,d:L,shapeRendering:"crispEdges"}),_)}),spe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};function zE(){return zE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,zE({},e,{ref:t,icon:spe})),cpe=f.forwardRef(lpe),upe=W.createElement(u1,null);function dpe({prefixCls:e,locale:t,onRefresh:n,statusRender:r,status:o}){const i=W.createElement(W.Fragment,null,W.createElement("p",{className:`${e}-expired`},t?.expired),n&&W.createElement(mt,{type:"link",icon:W.createElement(cpe,null),onClick:n},t?.refresh)),a=W.createElement("p",{className:`${e}-scanned`},t?.scanned),c={expired:i,loading:upe,scanned:a};return (r??(m=>c[m.status]))({status:o,locale:t,onRefresh:n})}const fpe=e=>{const{componentCls:t,lineWidth:n,lineType:r,colorSplit:o}=e;return {[t]:{...cn(e),display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${ie(n)} ${r} ${o}`,position:"relative",overflow:"hidden",[`& > ${t}-cover`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeCoverBackgroundColor,textAlign:"center",[`& > ${t}-expired, & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"> canvas":{alignSelf:"stretch",flex:"auto",minWidth:0},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}},[`${t}-borderless`]:{borderColor:"transparent",padding:0,borderRadius:0}}},mpe=e=>({QRCodeCoverBackgroundColor:new ln(e.colorBgContainer).setA(.96).toRgbString()}),hpe=Ut("QRCode",e=>{const t=Ht(e,{QRCodeTextColor:e.colorText});return fpe(t)},mpe),ppe=e=>{const[,t]=Hr(),{value:n,type:r="canvas",icon:o="",size:i=160,iconSize:a,color:c=t.colorText,errorLevel:u="M",status:d="active",bordered:m=true,onRefresh:p,style:g,className:b,rootClassName:y,prefixCls:S,bgColor:C="transparent",marginSize:w,statusRender:$,classNames:M,styles:T,boostLevel:R,...I}=e,{getPrefixCls:P,className:N,style:O,classNames:_,styles:L}=Wt("qrcode"),H={...e,bgColor:C,type:r,size:i,status:d,bordered:m,errorLevel:u},[U,q]=Xt([_,M],[L,T],{props:H}),V=P("qrcode",S),[z,F]=hpe(V),G={src:o,x:void 0,y:void 0,height:typeof a=="number"?a:a?.height??40,width:typeof a=="number"?a:a?.width??40,excavate:true,crossOrigin:"anonymous"},Y=po(I,true),Q=Ln(I,Object.keys(Y)),D={value:n,size:i,level:u,bgColor:C,fgColor:c,style:{width:g?.width,height:g?.height},imageSettings:o?G:void 0,marginSize:w,boostLevel:R,...Y},[B]=No("QRCode");if(!n)return null;const K=X(V,b,y,z,F,N,U.root,{[`${V}-borderless`]:!m}),J={backgroundColor:C,...q.root,...O,...g,width:g?.width??i,height:g?.height??i};return W.createElement("div",{...Q,className:K,style:J},d!=="active"&&W.createElement("div",{className:X(`${V}-cover`,U.cover),style:q.cover},W.createElement(dpe,{prefixCls:V,locale:B,status:d,onRefresh:p,statusRender:$})),r==="canvas"?W.createElement(ope,{...D}):W.createElement(ape,{...D}))};function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[S,C]=dn(r??false,n);function w(R,I){let P=S;return o||(P=R,C(P),d?.(P,I)),P}function $(R){R.which===at.LEFT?w(false,R):R.which===at.RIGHT&&w(true,R),m?.(R);}function M(R){const I=w(!S,R);u?.(I,R);}const T=X(e,t,{[`${e}-checked`]:S,[`${e}-disabled`]:o});return f.createElement("button",kE({},b,{type:"button",role:"switch","aria-checked":S,disabled:o,className:T,ref:y,onKeyDown:$,onClick:M}),i,f.createElement("span",{className:`${e}-inner`},f.createElement("span",{className:X(`${e}-inner-checked`,g?.content),style:p?.content},a),f.createElement("span",{className:X(`${e}-inner-unchecked`,g?.content),style:p?.content},c)))});fH.displayName="Switch";const gpe=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:i,innerMaxMarginSM:a,handleSizeSM:c,calc:u}=e,d=`${t}-inner`,m=ie(u(c).add(u(r).mul(2)).equal()),p=ie(u(a).mul(2).equal());return {[t]:{[`&${t}-small`]:{minWidth:o,height:n,lineHeight:ie(n),[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${d}-checked, ${d}-unchecked`]:{minHeight:n},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${m} - ${p})`,marginInlineEnd:`calc(100% - ${m} + ${p})`},[`${d}-unchecked`]:{marginTop:u(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:c,height:c},[`${t}-loading-icon`]:{top:u(u(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${m} + ${p})`,marginInlineEnd:`calc(-100% + ${m} - ${p})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ie(u(c).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:u(e.marginXXS).div(2).equal(),marginInlineEnd:u(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:u(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:u(e.marginXXS).div(2).equal()}}}}}}},vpe=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return {[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},bpe=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:i,calc:a}=e,c=`${t}-handle`;return {[t]:{[c]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(i).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${c}`]:{insetInlineStart:`calc(100% - ${ie(a(i).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},ype=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:i,handleSize:a,calc:c}=e,u=`${t}-inner`,d=ie(c(a).add(c(r).mul(2)).equal()),m=ie(c(i).mul(2).equal());return {[t]:{[u]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${u}-checked, ${u}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${m})`,marginInlineEnd:`calc(100% - ${d} + ${m})`},[`${u}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${u}`]:{paddingInlineStart:o,paddingInlineEnd:i,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${m})`,marginInlineEnd:`calc(-100% + ${d} - ${m})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},Spe=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return {[t]:{...cn(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:ie(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...Si(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}}}},Cpe=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,i=t*n,a=r/2,c=2,u=i-c*2,d=a-c*2;return {trackHeight:i,trackHeightSM:a,trackMinWidth:u*2+c*4,trackMinWidthSM:d*2+c*2,trackPadding:c,handleBg:o,handleSize:u,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new ln("#00230b").setA(.2).toRgbString()}`,innerMinMargin:u/2,innerMaxMargin:u+c+c*2,innerMinMarginSM:d/2,innerMaxMarginSM:d+c+c*2}},xpe=Ut("Switch",e=>{const t=Ht(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return [Spe(t),ype(t),bpe(t),vpe(t),gpe(t)]},Cpe),wpe=f.forwardRef((e,t)=>{const{prefixCls:n,size:r,disabled:o,loading:i,className:a,rootClassName:c,style:u,checked:d,value:m,defaultChecked:p,defaultValue:g,onChange:b,styles:y,classNames:S,...C}=e,[w,$]=dn(p??g??false,d??m),{getPrefixCls:M,direction:T,className:R,style:I,classNames:P,styles:N}=Wt("switch"),O=f.useContext(eo),_=(o??O)||i,L=M("switch",n),H=f.createElement("div",{className:`${L}-handle`},i&&f.createElement(Wy,{className:`${L}-loading-icon`})),[U,q]=xpe(L),V=io(r),z={...e,size:V,disabled:_},[F,G]=Xt([P,S],[N,y],{props:z}),Y=X(R,{[`${L}-small`]:V==="small",[`${L}-loading`]:i,[`${L}-rtl`]:T==="rtl"},a,c,F.root,U,q),Q={...G.root,...I,...u},D=(...B)=>{$(B[0]),b?.(...B);};return f.createElement(Vp,{component:"Switch",disabled:_},f.createElement(fH,{...C,classNames:F,styles:G,checked:w,onChange:D,prefixCls:L,className:Y,style:Q,disabled:_,ref:t,loadingIcon:H}))}),mH=wpe;mH.__ANT_SWITCH=true;const $pe=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:i}=e,a=i(r).sub(n).equal(),c=i(t).sub(n).equal();return {[o]:{...cn(e),display:"inline-block",height:"auto",paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${o}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${o}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${o}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${o}-default`]:{color:e.solidTextColor}},[`${o}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${o}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${o}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${o}-solid, &${o}-filled`]:{color:e.colorTextDisabled,[`${o}-close-icon`]:{color:e.colorTextDisabled}},[`${o}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},FR=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return Ht(e,{tagFontSize:o,tagLineHeight:ie(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},HR=e=>{const t=tR(new jo(e.colorBgSolid),"#fff")?"#000":"#fff";return {defaultBg:new ln(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},VR=Ut("Tag",e=>{const t=FR(e);return $pe(t)},HR),hH=f.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:o,checked:i,children:a,icon:c,onChange:u,onClick:d,disabled:m,...p}=e,{getPrefixCls:g,tag:b}=f.useContext(xt),y=f.useContext(eo),S=m??y,C=R=>{S||(u?.(!i),d?.(R));},w=g("tag",n),[$,M]=VR(w),T=X(w,`${w}-checkable`,{[`${w}-checkable-checked`]:i,[`${w}-checkable-disabled`]:S},b?.className,o,$,M);return f.createElement("span",{...p,ref:t,style:{...r,...b?.style},className:T,onClick:C},c,f.createElement("span",null,a))});function Epe(e,t){const{id:n,prefixCls:r,rootClassName:o,className:i,style:a,classNames:c,styles:u,disabled:d,options:m,value:p,defaultValue:g,onChange:b,multiple:y,...S}=e,{getPrefixCls:C,direction:w,className:$,style:M,classNames:T,styles:R}=Wt("tag"),I=C("tag",r),P=`${I}-checkable-group`,N=Kn(I),[O,_]=VR(I,N),[L,H]=Xt([T,c],[R,u],{props:e}),U=f.useMemo(()=>(m||[]).map(Y=>Y&&typeof Y=="object"?Y:{value:Y,label:Y}),[m]),[q,V]=dn(g,p),z=(Y,Q)=>{let D=null;if(y){const B=q||[];D=Y?[].concat(Yt(B),[Q.value]):B.filter(K=>K!==Q.value);}else D=Y?Q.value:null;V(D),b?.(D);},F=W.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:F.current}));const G=po(S,{aria:true,data:true});return W.createElement("div",{...G,className:X(P,$,o,{[`${P}-disabled`]:d,[`${P}-rtl`]:w==="rtl"},O,_,i,L.root),style:{...M,...H.root,...a},id:n,ref:F},U.map(Y=>W.createElement(hH,{key:Y.value,className:X(`${P}-item`,L.item),style:H.item,checked:y?(q||[]).includes(Y.value):q===Y.value,onChange:Q=>z(Q,Y),disabled:d},Y.label)))}const Mpe=W.forwardRef(Epe);function Rpe(e,t){const{color:n,variant:r,bordered:o}=e;return f.useMemo(()=>{const i=n?.endsWith("-inverse");let a;r?a=r:i?a="solid":o===false?a="filled":a=t||"filled";const c=i?n?.replace("-inverse",""):n,u=t1(n),d=kle(n),m={};if(!u&&!d&&c)if(a==="solid")m.backgroundColor=n;else {const p=new ln(c).toHsl();p.l=.95,m.backgroundColor=new ln(p).toHexString(),m.color=n,a==="outlined"&&(m.borderColor=n);}return [a,c,u,d,m]},[n,r,o,t])}const Tpe=e=>Vy(e,(t,{textColor:n,lightBorderColor:r,lightColor:o,darkColor:i})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:o,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:i,borderColor:i,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:o,color:n}}})),Ape=Rf(["Tag","preset"],e=>{const t=FR(e);return Tpe(t)},HR);function Npe(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const sb=(e,t,n)=>{const r=Npe(n);return {[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},Ppe=Rf(["Tag","status"],e=>{const t=FR(e);return [sb(t,"success","Success"),sb(t,"processing","Info"),sb(t,"error","Error"),sb(t,"warning","Warning")]},HR),Ipe=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:o,style:i,children:a,icon:c,color:u,variant:d,onClose:m,bordered:p,disabled:g,href:b,target:y,styles:S,classNames:C,...w}=e,{getPrefixCls:$,direction:M,className:T,variant:R,style:I,classNames:P,styles:N}=Wt("tag"),[O,_,L,H,U]=Rpe(e,R),q=L||H,V=f.useContext(eo),z=g??V,{tag:F}=f.useContext(xt),[G,Y]=f.useState(true),Q=Ln(w,["closeIcon","closable"]),D={...e,color:_,variant:O,disabled:z,href:b,target:y,icon:c},[B,K]=Xt([P,C],[N,S],{props:D}),J=f.useMemo(()=>{let de={...K.root,...I,...i};return z||(de={...U,...de}),de},[K.root,I,i,U,z]),ee=$("tag",n),[te,ne]=VR(ee),ae=X(ee,T,B.root,`${ee}-${O}`,{[`${ee}-${_}`]:q,[`${ee}-hidden`]:!G,[`${ee}-rtl`]:M==="rtl",[`${ee}-disabled`]:z},r,o,te,ne),oe=de=>{z||(de.stopPropagation(),m?.(de),!de.defaultPrevented&&Y(false));},[,re]=BM(Ll(e),Ll(F),{closable:false,closeIconRender:de=>{const Se=f.createElement("span",{className:`${ee}-close-icon`,onClick:oe},de);return qz(de,Se,be=>({onClick:He=>{be?.onClick?.(He),oe(He);},className:X(be?.className,`${ee}-close-icon`)}))}}),ce=typeof w.onClick=="function"||a&&a.type==="a",he=kr(c,{className:X(f.isValidElement(c)?c.props?.className:"",B.icon),style:K.icon}),me=he?f.createElement(f.Fragment,null,he,a&&f.createElement("span",{className:B.content,style:K.content},a)):a,Re=b?"a":"span",se=f.createElement(Re,{...Q,ref:t,className:ae,style:J,href:z?void 0:b,target:y,onClick:z?void 0:Q.onClick,...b&&z?{"aria-disabled":true}:{}},me,re,L&&f.createElement(Ape,{key:"preset",prefixCls:ee}),H&&f.createElement(Ppe,{key:"status",prefixCls:ee}));return ce?f.createElement(Vp,{component:"Tag"},se):se}),ho=Ipe;ho.CheckableTag=hH;ho.CheckableTagGroup=Mpe;const Ope=e=>{const t=e?.algorithm?C0(e.algorithm):NM,n={...nf,...e?.token};return FB(n,{override:e?.token},t,lz)};function Dpe(e){const{sizeUnit:t,sizeStep:n}=e,r=n-2;return {sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}const _pe=(e,t)=>{const n=t??Hy(e),r=n.fontSizeSM,o=n.controlHeight-4;return {...n,...Dpe(t??e),...sz(r),controlHeight:o,...az({...n,controlHeight:o})}},Di=(e,t)=>new ln(e).setA(t).toRgbString(),Tc=(e,t)=>new ln(e).lighten(t).toHexString(),Lpe=e=>{const t=zp(e,{theme:"dark"});return {1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},Bpe=(e,t)=>{const n=e||"#000",r=t||"#fff";return {colorBgBase:n,colorTextBase:r,colorText:Di(r,.85),colorTextSecondary:Di(r,.65),colorTextTertiary:Di(r,.45),colorTextQuaternary:Di(r,.25),colorFill:Di(r,.18),colorFillSecondary:Di(r,.12),colorFillTertiary:Di(r,.08),colorFillQuaternary:Di(r,.04),colorBgSolid:Di(r,.95),colorBgSolidHover:Di(r,1),colorBgSolidActive:Di(r,.9),colorBgElevated:Tc(n,12),colorBgContainer:Tc(n,8),colorBgLayout:Tc(n,0),colorBgSpotlight:Tc(n,26),colorBgBlur:Di(r,.04),colorBorder:Tc(n,26),colorBorderDisabled:Tc(n,26),colorBorderSecondary:Tc(n,19)}},zpe=(e,t)=>{const n=Object.keys(AM).map(i=>{const a=zp(e[i],{theme:"dark"});return Array.from({length:10},()=>1).reduce((c,u,d)=>(c[`${i}-${d+1}`]=a[d],c[`${i}${d+1}`]=a[d],c),{})}).reduce((i,a)=>(i={...i,...a},i),{}),r=t??Hy(e),o=iz(e,{generateColorPalettes:Lpe,generateNeutralColorPalettes:Bpe});return {...r,...n,...o,colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover}};function kpe(){const[e,t,n,r]=Hr();return {theme:e,token:t,hashId:n,cssVar:r}}const Q0={defaultSeed:rp.token,useToken:kpe,defaultAlgorithm:Hy,darkAlgorithm:zpe,compactAlgorithm:_pe,getDesignToken:Ope,defaultConfig:rp,_internalContext:PM},Z0=e=>{const t=new Map;return e.forEach((n,r)=>{t.set(n,r);}),t},Fpe=e=>{const t=new Map;return e.forEach(({disabled:n,key:r},o)=>{n&&t.set(r,o);}),t};function Hpe(e,t){const n=e==="right";return t!=="rtl"?n?W.createElement(of,null):W.createElement(ap,null):n?W.createElement(ap,null):W.createElement(of,null)}const A8=({type:e,actions:t,moveToLeft:n,moveToRight:r,leftActive:o,rightActive:i,direction:a,disabled:c})=>{const u=e==="right",d=u?t[0]:t[1],m=u?r:n,p=u?i:o,g=Hpe(e,a);if(W.isValidElement(d)){const b=d,y=S=>{b?.props?.onClick?.(S),m?.(S);};return W.cloneElement(b,{disabled:c||!p,onClick:y})}return W.createElement(mt,{type:"primary",size:"small",disabled:c||!p,onClick:b=>m?.(b),icon:g},d)},pH=e=>{const{className:t,style:n,oneWay:r,actions:o,...i}=e;return W.createElement("div",{className:t,style:n},W.createElement(A8,{type:"right",actions:o,...i}),!r&&W.createElement(A8,{type:"left",actions:o,...i}),o.slice(r?1:2))},Vpe=(e,t,n)=>{const r=f.useMemo(()=>(e||[]).map(a=>t?{...a,key:t(a)}:a),[e,t]),[o,i]=f.useMemo(()=>{const a=[],c=Array.from({length:n?.length??0}),u=Z0(n||[]);return r.forEach(d=>{if(u.has(d.key)){const m=u.get(d.key);c[m]=d;}else a.push(d);}),[a,c]},[r,n]);return [r,o.filter(Boolean),i.filter(Boolean)]},jpe=[];function lb(e,t){const n=e.filter(r=>t.has(r));return e.length===n.length?e:n}function N8(e){return Array.from(e).join(";")}function Upe(e,t,n){const[r,o]=f.useMemo(()=>[new Set(e.map(p=>p?.key)),new Set(t.map(p=>p?.key))],[e,t]),[i,a]=dn(jpe,n),c=f.useMemo(()=>lb(i,r),[i,r]),u=f.useMemo(()=>lb(i,o),[i,o]);f.useEffect(()=>{a([].concat(Yt(lb(i,r)),Yt(lb(i,o))));},[N8(r),N8(o)]);const d=Rt(p=>{a([].concat(Yt(p),Yt(u)));}),m=Rt(p=>{a([].concat(Yt(c),Yt(p)));});return [c,u,d,m]}const gH=e=>{const{placeholder:t="",value:n,prefixCls:r,disabled:o,onChange:i,handleClear:a}=e,c=f.useCallback(u=>{i?.(u),u.target.value===""&&a?.();},[i]);return f.createElement(Lf,{placeholder:t,className:r,value:n,onChange:c,disabled:o,allowClear:true,prefix:f.createElement(pR,null)})};var qpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function FE(){return FE=Object.assign?Object.assign.bind():function(e){for(var t=1;tf.createElement(Wn,FE({},e,{ref:t,icon:qpe})),Wpe=f.forwardRef(Gpe),Kpe=e=>{const{prefixCls:t,classNames:n,styles:r,renderedText:o,renderedEl:i,item:a,checked:c,disabled:u,onClick:d,onRemove:m,showRemove:p}=e,g=u||a?.disabled,b=X(`${t}-content-item`,n.item,{[`${t}-content-item-disabled`]:g,[`${t}-content-item-checked`]:c&&!g});let y;(typeof o=="string"||typeof o=="number")&&(y=String(o));const[S]=No("Transfer",pa.Transfer),C={className:b,style:r.item,title:y},w=f.createElement("span",{className:X(`${t}-content-item-text`,n.itemContent),style:r.itemContent},i);return p?f.createElement("li",{...C},w,f.createElement("button",{type:"button",disabled:g,className:`${t}-content-item-remove`,"aria-label":S?.remove,onClick:()=>m?.(a)},f.createElement(Wpe,null))):(C.onClick=g?void 0:$=>d(a,$),f.createElement("li",{...C},f.createElement(Wi,{className:X(`${t}-checkbox`,n.itemIcon),style:r.itemIcon,checked:c,disabled:g}),w))},Ype=f.memo(Kpe),Xpe=["handleFilter","handleClear","checkedKeys"],Qpe=e=>({...{simple:true,showSizeChanger:false,showLessItems:false},...e}),Zpe=(e,t)=>{const{prefixCls:n,classNames:r,styles:o,filteredRenderItems:i,selectedKeys:a,disabled:c,showRemove:u,pagination:d,onScroll:m,onItemSelect:p,onItemRemove:g}=e,[b,y]=f.useState(1),S=f.useMemo(()=>d?Qpe(typeof d=="object"?d:{}):null,[d]),[C,w]=dn(10,S?.pageSize);f.useEffect(()=>{if(S){const N=Math.ceil(i.length/C);y(Math.min(b,N));}},[i,S,C]);const $=(N,O)=>{p(N.key,!a.includes(N.key),O);},M=N=>{g?.([N.key]);},T=N=>{y(N);},R=(N,O)=>{y(N),w(O);},I=f.useMemo(()=>S?i.slice((b-1)*C,b*C):i,[b,i,S,C]);f.useImperativeHandle(t,()=>({items:I}));const P=S?f.createElement(bhe,{size:"small",disabled:c,simple:S.simple,pageSize:C,showLessItems:S.showLessItems,showSizeChanger:S.showSizeChanger,className:`${n}-pagination`,total:i.length,current:b,onChange:T,onShowSizeChange:R}):null;return f.createElement(f.Fragment,null,f.createElement("ul",{className:X(`${n}-content`,r.list,{[`${n}-content-show-remove`]:u}),style:o.list,onScroll:m},(I||[]).map(({renderedEl:N,renderedText:O,item:_})=>f.createElement(Ype,{key:_.key,prefixCls:n,classNames:r,styles:o,item:_,renderedText:O,renderedEl:N,showRemove:u,onClick:$,onRemove:M,checked:a.includes(_.key),disabled:c}))),P)},Jpe=f.forwardRef(Zpe),ege=()=>null;function tge(e){return !!(e&&!W.isValidElement(e)&&Object.prototype.toString.call(e)==="[object Object]")}function Qm(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const nge=e=>e!==void 0,rge=e=>e&&typeof e=="object"?{...e,defaultValue:e.defaultValue||""}:{defaultValue:"",placeholder:""},HE=e=>{const{prefixCls:t,style:n,classNames:r,styles:o,dataSource:i=[],titleText:a="",checkedKeys:c,disabled:u,showSearch:d=false,searchPlaceholder:m,notFoundContent:p,selectAll:g,deselectAll:b,selectCurrent:y,selectInvert:S,removeAll:C,removeCurrent:w,showSelectAll:$=true,showRemove:M,pagination:T,direction:R,itemsUnit:I,itemUnit:P,selectAllLabel:N,selectionsIcon:O,footer:_,renderList:L,onItemSelectAll:H,onItemRemove:U,handleFilter:q,handleClear:V,filterOption:z,render:F=ege}=e,G=`${t}-section`,Y=`${t}-list`,Q=rge(d),[D,B]=f.useState(Q.defaultValue),K=f.useRef({}),J=ue=>{B(ue.target.value),q(ue);},ee=()=>{B(""),V();},te=(ue,ye)=>typeof z=="function"?z(D,ye,R):ue.includes(D),ne=ue=>{let ye=L?L({...ue,onItemSelect:(qe,Ze)=>ue.onItemSelect(qe,Ze)}):null;const Te=!!ye;return Te||(ye=W.createElement(Jpe,{ref:K,...ue,prefixCls:Y})),{customize:Te,bodyContent:ye}},ae=ue=>{const ye=F(ue),Te=tge(ye);return {item:ue,renderedEl:Te?ye.label:ye,renderedText:Te?ye.value:ye}},oe=f.useMemo(()=>Array.isArray(p)?p[R==="left"?0:1]:p,[p,R]),[re,ce]=f.useMemo(()=>{const ue=[],ye=[];return i.forEach(Te=>{const qe=ae(Te);D&&!te(qe.renderedText,Te)||(ue.push(Te),ye.push(qe));}),[ue,ye]},[i,D]),he=f.useMemo(()=>re.filter(ue=>c.includes(ue.key)&&!ue.disabled),[c,re]),me=f.useMemo(()=>{if(he.length===0)return "none";const ue=Z0(c);return re.every(ye=>ue.has(ye.key)||!!ye.disabled)?"all":"part"},[he.length,c,re]),Re=()=>{const ue=d?W.createElement("div",{className:`${Y}-body-search-wrapper`},W.createElement(gH,{prefixCls:`${Y}-search`,onChange:J,handleClear:ee,placeholder:Q.placeholder||m,value:D,disabled:u})):null,{customize:ye,bodyContent:Te}=ne({...Ln(e,Xpe),filteredItems:re,filteredRenderItems:ce,selectedKeys:c,classNames:r,styles:o});let qe;return ye?qe=W.createElement("div",{className:`${Y}-body-customize-wrapper`},Te):qe=re.length?Te:W.createElement("div",{className:`${Y}-body-not-found`},oe),W.createElement("div",{className:X(`${Y}-body`,{[`${Y}-body-with-search`]:d},r.body),style:o.body},ue,qe)},se=W.createElement(Wi,{disabled:i.filter(ue=>!ue.disabled).length===0||u,checked:me==="all",indeterminate:me==="part",className:`${Y}-checkbox`,onChange:()=>{H?.(re.filter(ue=>!ue.disabled).map(({key:ue})=>ue),me!=="all");}}),de=(ue,ye)=>{if(N)return typeof N=="function"?N({selectedCount:ue,totalCount:ye}):N;const Te=ye>1?I:P;return W.createElement(W.Fragment,null,(ue>0?`${ue}/`:"")+ye," ",Te)},Se=_&&(_.length<2?_(e):_(e,{direction:R})),be=Se?W.createElement("div",{className:X(`${Y}-footer`,r.footer),style:o.footer},Se):null,He=!M&&!T&&se;let Ue;M?Ue=[T?{key:"removeCurrent",label:w,onClick(){const ue=Qm((K.current?.items||[]).map(ye=>ye.item));U?.(ue);}}:null,{key:"removeAll",label:C,onClick(){U?.(Qm(re));}}].filter(Boolean):Ue=[{key:"selectAll",label:me==="all"?b:g,onClick(){const ue=Qm(re);H?.(ue,ue.length!==c.length);}},T?{key:"selectCurrent",label:y,onClick(){const ue=K.current?.items||[];H?.(Qm(ue.map(ye=>ye.item)),true);}}:null,{key:"selectInvert",label:S,onClick(){const ue=Qm((K.current?.items||[]).map(qe=>qe.item)),ye=new Set(c),Te=new Set(ye);ue.forEach(qe=>{ye.has(qe)?Te.delete(qe):Te.add(qe);}),H?.(Array.from(Te),"replace");}}];const Pe=W.createElement(nc,{className:`${Y}-header-dropdown`,menu:{items:Ue},disabled:u},nge(O)?O:W.createElement(hR,null));return W.createElement("div",{className:X(G,r.section,{[`${G}-with-pagination`]:!!T,[`${G}-with-footer`]:!!Se}),style:{...n,...o.section}},W.createElement("div",{className:X(`${Y}-header`,r.header),style:o.header},$?W.createElement(W.Fragment,null,He,Pe):null,W.createElement("span",{className:`${Y}-header-selected`},de(he.length,re.length)),W.createElement("span",{className:X(`${Y}-header-title`,r.title),style:o.title},a)),Re(),be)},oge=e=>{const{antCls:t,componentCls:n,listHeight:r,controlHeightLG:o}=e,i=`${t}-table`,a=`${t}-input`;return {[`${n}-customize-list`]:{[`${n}-section`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:r,minWidth:0},[`${i}-wrapper`]:{[`${i}-small`]:{border:0,borderRadius:0,[`${i}-selection-column`]:{width:o,minWidth:o}},[`${i}-pagination${i}-pagination`]:{margin:0,padding:e.paddingXS}},[`${a}[disabled]`]:{backgroundColor:"transparent"}}}},P8=(e,t)=>{const{componentCls:n,colorBorder:r}=e;return {[`${n}-section`]:{borderColor:t,[`${n}-list-search:not([disabled])`]:{borderColor:r}}}},ige=e=>{const{componentCls:t}=e;return {[`${t}-status-error`]:{...P8(e,e.colorError)},[`${t}-status-warning`]:{...P8(e,e.colorWarning)}}},age=e=>{const{componentCls:t,colorBorder:n,colorSplit:r,lineWidth:o,itemHeight:i,headerHeight:a,transferHeaderVerticalPadding:c,itemPaddingBlock:u,controlItemBgActive:d,colorTextDisabled:m,colorTextSecondary:p,listHeight:g,listWidth:b,listWidthLG:y,fontSizeIcon:S,marginXS:C,paddingSM:w,lineType:$,antCls:M,iconCls:T,motionDurationSlow:R,controlItemBgHover:I,borderRadiusLG:P,colorBgContainer:N,colorText:O,controlItemBgActiveHover:_}=e,L=ie(e.calc(P).sub(o).equal());return {display:"flex",flexDirection:"column",width:b,height:g,border:`${ie(o)} ${$} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:y,height:"auto"},[`${t}-list`]:{"&-search":{[`${T}-search`]:{color:m}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${ie(e.calc(c).sub(o).equal())} ${ie(w)} ${ie(c)}`,color:O,background:N,borderBottom:`${ie(o)} ${$} ${r}`,borderRadius:`${ie(P)} ${ie(P)} 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":{...ja,flex:"0 1 auto",textAlign:"end",marginInlineStart:"auto"},"&-dropdown":{...bu(),fontSize:S,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}}},"&-body":{display:"flex",flex:"auto",flexDirection:"column",fontSize:e.fontSize,minHeight:0,"&-search-wrapper":{position:"relative",flex:"none",padding:w}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none",borderRadius:`0 0 ${L} ${L}`,"&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${ie(u)} ${ie(w)}`,transition:`all ${R}`,"> *:not(:last-child)":{marginInlineEnd:C},"> *":{flex:"none"},"&-text":{...ja,flex:"auto"},"&-remove":{...Iee(e),color:n,"&:hover, &:focus":{color:p}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:I,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:_}},"&-checked":{backgroundColor:d},"&-disabled":{color:m,cursor:"not-allowed"}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:e.paddingXS,textAlign:"end",borderTop:`${ie(o)} ${$} ${r}`,[`${M}-pagination-options`]:{paddingInlineEnd:e.paddingXS}},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:m,textAlign:"center"},"&-footer":{borderTop:`${ie(o)} ${$} ${r}`},"&-checkbox":{lineHeight:1}}}},sge=e=>{const{antCls:t,iconCls:n,componentCls:r,marginXS:o,marginXXS:i,fontSizeIcon:a,colorBgContainerDisabled:c}=e;return {[r]:{...cn(e),position:"relative",display:"flex",alignItems:"stretch",[`${r}-disabled`]:{[`${r}-section`]:{background:c}},[`${r}-section`]:age(e),[`${r}-actions`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${ie(o)}`,verticalAlign:"middle",gap:i,[`${t}-btn ${n}`]:{fontSize:a}}}}},lge=e=>{const{componentCls:t}=e;return {[`${t}-rtl`]:{direction:"rtl"}}},cge=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,controlHeightLG:o,lineWidth:i}=e,a=Math.round(t*n);return {listWidth:180,listHeight:200,listWidthLG:250,headerHeight:o,itemHeight:r,itemPaddingBlock:(r-a)/2,transferHeaderVerticalPadding:Math.ceil((o-i-a)/2)}},uge=Ut("Transfer",e=>{const t=Ht(e);return [sge(t),oge(t),ige(t),lge(t)]},cge),f1=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,styles:i,style:a,listStyle:c,operationStyle:u,operations:d,actions:m,dataSource:p,targetKeys:g=[],selectedKeys:b,selectAllLabels:y=[],locale:S={},titles:C,disabled:w,showSearch:$=false,showSelectAll:M,oneWay:T,pagination:R,status:I,selectionsIcon:P,filterOption:N,render:O,footer:_,children:L,rowKey:H,onScroll:U,onChange:q,onSearch:V,onSelectChange:z}=e,{getPrefixCls:F,renderEmpty:G,direction:Y,className:Q,style:D,classNames:B,styles:K,selectionsIcon:J}=Wt("transfer"),ee=f.useContext(eo),te=w??ee,ne={...e,disabled:te},ae=F("transfer",t),[oe,re]=uge(ae),ce=m||d||[],[he,me,Re]=Vpe(p,H,g),[se,de,Se,be]=Upe(me,Re,b),[He,Ue]=uI(Ee=>Ee.key),[Pe,ue]=uI(Ee=>Ee.key),ye=f.useCallback((Ee,lt)=>{if(Ee==="left"){const et=typeof lt=="function"?lt(se||[]):lt;Se(et);}else {const et=typeof lt=="function"?lt(de||[]):lt;be(et);}},[se,de]),Te=(Ee,lt)=>{(Ee==="left"?Ue:ue)(lt);},qe=f.useCallback((Ee,lt)=>{Ee==="left"?z?.(lt,de):z?.(se,lt);},[se,de]),Ze=Ee=>C??Ee.titles??[],We=Ee=>{U?.("left",Ee);},tt=Ee=>{U?.("right",Ee);},nt=Ee=>{const lt=Ee==="right"?se:de,et=Fpe(he),Ct=lt.filter(Hn=>!et.has(Hn)),_t=Z0(Ct),fn=Ee==="right"?Ct.concat(g):g.filter(Hn=>!_t.has(Hn)),en=Ee==="right"?"left":"right";ye(en,[]),qe(en,[]),q?.(fn,Ee,Ct);},Ke=()=>{nt("left"),Te("left",null);},Oe=()=>{nt("right"),Te("right",null);},Qe=(Ee,lt,et)=>{ye(Ee,Ct=>{let _t=[];if(et==="replace")_t=lt;else if(et)_t=Array.from(new Set([].concat(Yt(Ct),Yt(lt))));else {const fn=Z0(lt);_t=Ct.filter(en=>!fn.has(en));}return qe(Ee,_t),_t}),Te(Ee,null);},Xe=(Ee,lt)=>{Qe("left",Ee,lt);},_e=(Ee,lt)=>{Qe("right",Ee,lt);},ze=Ee=>V?.("left",Ee.target.value),ct=Ee=>V?.("right",Ee.target.value),Pt=()=>V?.("left",""),ut=()=>V?.("right",""),Dt=(Ee,lt,et,Ct,_t)=>{lt.has(et)&&(lt.delete(et),Te(Ee,null)),Ct&&(lt.add(et),Te(Ee,_t));},wt=(Ee,lt,et,Ct)=>{(Ee==="left"?He:Pe)(Ct,lt,et);},Tt=(Ee,lt,et,Ct)=>{const _t=Ee==="left",fn=Yt(_t?se:de),en=new Set(fn),Hn=Yt(_t?me:Re).filter(Nn=>!Nn?.disabled),Nr=Hn.findIndex(Nn=>Nn.key===lt);Ct&&fn.length>0?wt(Ee,Hn,en,Nr):Dt(Ee,en,lt,et,Nr);const so=Array.from(en);qe(Ee,so),e.selectedKeys||ye(Ee,so);},gt=(Ee,lt,et)=>{Tt("left",Ee,lt,et?.shiftKey);},ft=(Ee,lt,et)=>{Tt("right",Ee,lt,et?.shiftKey);},st=Ee=>{ye("right",[]),q?.(g.filter(lt=>!Ee.includes(lt)),"left",Yt(Ee));},Fe=Ee=>typeof c=="function"?c({direction:Ee}):c||{},Ge=f.useContext(go),{hasFeedback:ve,status:Ae}=Ge,Ce=Ee=>({...Ee,notFoundContent:G?.("Transfer")||W.createElement(y7,{componentName:"Transfer"}),...S}),pe=Pf(Ae,I),Ie=!L&&R,$e=Re.filter(Ee=>de.includes(Ee.key)&&!Ee.disabled).length>0,Le=me.filter(Ee=>se.includes(Ee.key)&&!Ee.disabled).length>0,[Ye,it]=Xt([B,o],[K,i],{props:ne}),ht=X(ae,{[`${ae}-disabled`]:te,[`${ae}-customize-list`]:!!L,[`${ae}-rtl`]:Y==="rtl"},Fl(ae,pe,ve),Q,n,r,oe,re,Ye.root),[$t]=No("Transfer",pa.Transfer),Mt=Ce($t),[zt,Rn]=Ze(Mt),Ot=P??J;return W.createElement("div",{className:ht,style:{...D,...it.root,...a}},W.createElement(HE,{prefixCls:ae,style:Fe("left"),classNames:Ye,styles:it,titleText:zt,dataSource:me,filterOption:N,checkedKeys:se,handleFilter:ze,handleClear:Pt,onItemSelect:gt,onItemSelectAll:Xe,render:O,showSearch:$,renderList:L,footer:_,onScroll:We,disabled:te,direction:Y==="rtl"?"right":"left",showSelectAll:M,selectAllLabel:y[0],pagination:Ie,selectionsIcon:Ot,...Mt}),W.createElement(pH,{className:X(`${ae}-actions`,Ye.actions),rightActive:Le,moveToRight:Oe,leftActive:$e,actions:ce,moveToLeft:Ke,style:{...u,...it.actions},disabled:te,direction:Y,oneWay:T}),W.createElement(HE,{prefixCls:ae,style:Fe("right"),classNames:Ye,styles:it,titleText:Rn,dataSource:Re,filterOption:N,checkedKeys:de,handleFilter:ct,handleClear:ut,onItemSelect:ft,onItemSelectAll:_e,onItemRemove:st,render:O,showSearch:$,renderList:L,footer:_,onScroll:tt,disabled:te,direction:Y==="rtl"?"left":"right",showSelectAll:M,selectAllLabel:y[1],showRemove:T,pagination:Ie,selectionsIcon:Ot,...Mt}))};f1.List=HE;f1.Search=gH;f1.Operation=pH;const{proxyStateMap:dge}=sM(),fge=e=>dge.has(e),VE=new Set;dQ("createHandler",e=>(...t)=>{const n=e(...t),r=n.get||((o,i,a)=>Reflect.get(o,i,a));return n.get=(o,i,a)=>{for(const c of VE)c(o,i,a);return r(o,i,a)},n});const Xx=[],mge=e=>{Xx.length?Xx[Xx.length-1].add(e):e();};function hge(e){const t=new Map,n=new Map,r=(u,d)=>Array.from(d).some(([m,p])=>{const g=u[m],b=n.get(g);if(b)return r(g,b);if(!Object.is(g,p[0]))return true;const y=X4(g),S=p[1];return typeof y=="number"&&typeof S=="number"?y!==S:false}),o=()=>{Array.from(n).some(([u,d])=>r(u,d))&&a();},i=()=>{for(const[u,d]of t)n.has(u)||(d(),t.delete(u));for(const u of n.keys())if(!t.has(u)){const d=Wa(u,()=>mge(o),true);t.set(u,d);}},a=()=>{n.clear();const u=(d,m,p)=>{if(!fge(p))return;let g=n.get(p);g||(g=new Map,n.set(p,g));const b=Reflect.get(d,m,p);g.set(m,[b,X4(b)]);};VE.add(u);try{e();}finally{VE.delete(u),i();}};return a(),()=>{for(const u of t.values())u();t.clear(),n.clear();}}function pge(e,t){const n=hge(e);return ()=>{n();}}function lf(e,t,n){return en?n:e}function gge(e){return e.value}var jR=class vH{static fromConcurrency(t,n=""){if(!isFinite(t))throw new Error("concurrency must be finite");if(!(t>0))throw new Error("concurrency must be greater than 0");const r=new Array(t).fill(0).map((o,i)=>[n,`executors(${t})`,i].map(a=>a&&a.toString().trim()).filter(Boolean).join("."));return new vH(r)}executorRefs;idleState;constructor(t){if(!t.length)throw new Error("executors can not be empty");this.executorRefs=t.map(n=>({value:n})),this.idleState=new WeakMap,this.executorRefs.forEach(n=>this.idleState.set(n,true));}aborted=false;abort(){this.aborted=true,this.pendingResolves=[];}pendingResolves=[];replenish=t=>{this.aborted||this.pendingResolves.length&&this.pendingResolves.shift()?.();};async getExecutorRef(){const t=()=>this.executorRefs.find(r=>this.idleState.get(r));let n=t();for(;!n;){const{promise:r,resolve:o}=Promise.withResolvers();this.pendingResolves.push(o),await r,n=t();}return this.idleState.set(n,false),n}async dispatch(t){const n=await this.getExecutorRef(),r=gge(n);try{return await t(r)}finally{this.idleState.set(n,true),setTimeout(()=>this.replenish(n));}}};async function Vl(e,t,n){if(!e.length)return [];n=Math.min(n,e.length);const r=jR.fromConcurrency(n,"pmap");try{return await Promise.all(e.map((o,i)=>r.dispatch(()=>t(o,i,e))))}catch(o){throw r.abort(),o}}function UR(e){const t=jR.fromConcurrency(e,"pLimit");return function(r,...o){return t.dispatch(()=>r(...o))}}var bH=vge;function vge(e,t){const n=jR.fromConcurrency(t,"createLimitedVersionOfFn");return function(...o){return n.dispatch(()=>e(...o))}}function qR(e,t,n,r){let o=e[t];return Wa(e,()=>{const i=e[t];Object.is(o,i)||n(o=i);},r)}const{proxyStateMap:bge,snapCache:yge}=sM(),cb=e=>bge.has(e);function yH(e){const t=[];let n=0;const r=new Map,o=new WeakMap,i=()=>{const d=yge.get(c),m=d?.[1];if(m&&!o.has(m)){const p=new Map(r);o.set(m,p);}},a=d=>o.get(d)||r;if(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError(`proxyMap: initial state must be iterable tip: structure should be [[key, value]]`);for(const[d,m]of e)r.set(d,n),t[n++]=m;}const c={data:t,index:n,epoch:0,get size(){return cb(this)||i(),a(this).size},get(d){const p=a(this).get(d);if(p===void 0){this.epoch;return}return this.data[p]},has(d){const m=a(this);return this.epoch,m.has(d)},set(d,m){if(!cb(this))throw new Error("Cannot perform mutations on a snapshot");const p=r.get(d);return p===void 0?(r.set(d,this.index),this.data[this.index++]=m):this.data[p]=m,this.epoch++,this},delete(d){if(!cb(this))throw new Error("Cannot perform mutations on a snapshot");const m=r.get(d);return m===void 0?false:(delete this.data[m],r.delete(d),this.epoch++,true)},clear(){if(!cb(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,r.clear();},forEach(d){this.epoch,a(this).forEach((p,g)=>{d(this.data[p],g,this);});},*entries(){this.epoch;const d=a(this);for(const[m,p]of d)yield [m,this.data[p]];},*keys(){this.epoch;const d=a(this);for(const m of d.keys())yield m;},*values(){this.epoch;const d=a(this);for(const m of d.values())yield this.data[m];},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return "Map"},toJSON(){return new Map(this.entries())}},u=Bn(c);return Object.defineProperties(u,{size:{enumerable:false},index:{enumerable:false},epoch:{enumerable:false},data:{enumerable:false},toJSON:{enumerable:false}}),Object.seal(u),u}const{proxyStateMap:Sge,snapCache:Cge}=sM(),ub=e=>typeof e=="object"?Bn({x:e}).x:e,db=e=>Sge.has(e);function $r(e){const t=[],n=new Map;let r=0;const o=new WeakMap,i=()=>{const C=Cge.get(y),w=C?.[1];if(w&&!o.has(w)){const $=new Map(n);o.set(w,$);}},a=C=>o.get(C)||n;if(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("not iterable");for(const C of e)if(!n.has(C)){const w=ub(C);n.set(w,r),t[r++]=w;}}const c=C=>typeof C=="object"&&C!==null&&Symbol.iterator in C,u=C=>typeof C.forEach=="function",d=C=>{if(c(C))return C;if(u(C)){const w=[];return C.forEach($=>w.push($)),w}throw new TypeError("Expected an iterable")};function m(C){this.epoch;const w=$r(d(C)),$=$r();for(const M of this.values())w.has(M)&&$.add(M);return $r($)}function p(C){this.epoch;const w=$r(d(C)),$=$r();for(const M of this.values())$.add(M);for(const M of w.values())$.add(M);return $r($)}function g(C){this.epoch;const w=$r(d(C)),$=$r();for(const M of this.values())w.has(M)||$.add(M);return $r($)}function b(C){this.epoch;const w=$r(d(C)),$=$r();for(const M of this.values())w.has(M)||$.add(M);for(const M of w.values())this.has(M)||$.add(M);return $r($)}const y={data:t,index:r,epoch:0,get size(){return db(this)||i(),n.size},has(C){const w=a(this),$=ub(C);return this.epoch,w.has($)},add(C){if(!db(this))throw new Error("Cannot perform mutations on a snapshot");const w=ub(C);return n.has(w)||(n.set(w,this.index),this.data[this.index++]=w,this.epoch++),this},delete(C){if(!db(this))throw new Error("Cannot perform mutations on a snapshot");const w=ub(C),$=n.get(w);return $===void 0?false:(delete this.data[$],n.delete(w),this.epoch++,true)},clear(){if(!db(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,n.clear();},forEach(C){this.epoch,a(this).forEach($=>{C(this.data[$],this.data[$],this);});},*values(){this.epoch;const C=a(this);for(const w of C.values())yield this.data[w];},keys(){return this.epoch,this.values()},*entries(){this.epoch;const C=a(this);for(const w of C.values()){const $=this.data[w];yield [$,$];}},toJSON(){return new Set(this.values())},[Symbol.iterator](){return this.values()},get[Symbol.toStringTag](){return "Set"},intersection:m,union:p,difference:g,symmetricDifference:b,isSubsetOf(C){this.epoch;for(const w of this.values())if(!C.has(w))return false;return true},isSupersetOf(C){this.epoch;const w=d(C);for(const $ of w)if(!this.has($))return false;return true},isDisjointFrom(C){this.epoch;for(const w of this.values())if(C.has(w))return false;return true}},S=Bn(y);return Object.defineProperties(S,{size:{enumerable:false},data:{enumerable:false},index:{enumerable:false},epoch:{enumerable:false},toJSON:{enumerable:false}}),Object.seal(S),S}const xge=typeof GM_info<"u"&&GM_info.scriptHandler==="Userscripts";function li(e,t=true){if(e.startsWith("/")&&(e=location.origin+e),xge){GM.openInTab(e,!t);return}GM.openInTab(e,{active:t,insert:true,setParent:true});}function GR({storageKey:e,onUpdate:t,setPersist:n}){if(typeof GM_addValueChangeListener>"u")return;const r=UR(1);GM_addValueChangeListener(e,(o,i,a,c)=>{c&&a&&r(async()=>{n(false);try{t(a);}finally{await Promise.resolve().then(()=>{n(true);});}});});}function rc(e){const t=Bn({value:e()});function n(){return St(t).value}function r(){return t.value}function o(){return t.value=e()}const i=Kl(o,100,{edges:["leading","trailing"]});return {state:t,use:n,get:r,update:o,updateThrottled:i}}function SH(e,t,n){let r=au(Jr(e),t);Wa(e,()=>{const o=Jr(e),i=au(o,t);ua(r,i)||n(o),r=i;});}function CH(e,t){t.startsWith(Ro)||(t=`${ro}:${t}`);const n=Object.keys(e),[r,o]=Sf(()=>{const a=localStorage.getItem(t);if(!a)return;const c=JSON.parse(a);return au(c,n)});r&&Go("failed to load from localStorage key=",t,"error=",r);const i=Bn({...e,...o});return setTimeout(()=>{Wa(i,()=>{const a=Jr(i);localStorage.setItem(t,JSON.stringify(a));});}),i}async function WR(e,t){async function n(){const o=Object.keys(e);return au(await GM.getValue(t)||{},o)}const r=Bn({...e,...await n()});return setTimeout(()=>{const o=UR(1);Wa(r,()=>o(async()=>{const i=await n(),a=VX(i,Jr(r));GM.setValue(t,a);}));}),r}async function xH(e){const n=$r(await(async()=>await GM.getValue(e)||[])()),r=a=>{const c=new Set(a);for(const u of [...n,...c])c.has(u)?n.add(u):n.delete(u);};setTimeout(i);let o=true;function i(){Wa(n,()=>{o&&GM.setValue(e,Array.from(Jr(n)));}),GR({storageKey:e,setPersist:a=>o=a,onUpdate:r});}return {set:n,replaceAllWith:r}}async function wH(e,t){const r=yH(await(async()=>await GM.getValue(e)||[])()),o=c=>{const u=new Map(c);for(const[d,m]of [...r,...u])u.has(d)?r.set(d,m):r.delete(d);};setTimeout(a);let i=true;function a(){Wa(r,()=>{if(!i)return;let c=Array.from(Jr(r));GM.setValue(e,c);}),GR({storageKey:e,setPersist:c=>i=c,onUpdate:o});}return {map:r,replaceAllWith:o}}const wge=()=>document.querySelector(".bili-header__bar"),KR=rc($H);function $H(){const e=wge();return !!(e&&window.getComputedStyle(e).display==="none")}const cu=rc(function(){if(!$H())return 64;if(!document.body.classList.contains("fixed-navbar"))return 0;const n=document.documentElement.style.getPropertyValue("--navbar-height");if(!n)return 50;const r=Number(n.replace("px",""));return Number.isNaN(r)?50:r}),YR=rc(function(){const t=document.documentElement.style.getPropertyValue("--navbar-bounds-padding");return !t||!/^\d+%$/.test(t)?void 0:100-lf(Number(t.replace("%","")),2,10)*2});function $ge(){const e=YR.use(),{pureRecommend:t,grid:{useCustomGrid:n}}=qt();if(!t||!n||!e)return;const r=(1-e/100)/2*window.innerWidth+10,o=40;return r>o+24+5?void 0:r{const e=Jp.get();e&&localStorage.setItem(EH,e);});function MH(){return localStorage.getItem(EH)||wf.Pink}function Ege(){KR.updateThrottled(),cu.updateThrottled(),YR.updateThrottled(),Jp.updateThrottled();}const RH=new MutationObserver(()=>Ege());RH.observe(document.documentElement,{attributes:true,attributeFilter:["style"]});RH.observe(document.body,{attributes:true,attributeFilter:["class"]});document.body.addEventListener("click",e=>{const t=e.target,n=r=>!!r?.matches(".be-button.ok");!n(t)&&!n(t.parentElement)||t.closest(".be-popup.picker.open")&&setTimeout(Jp.updateThrottled,1e3);},{capture:true,passive:true});const TH={maxCount:5,top:cu.get()-4};zR.config(TH);function Mge(){const e=cu.use();return x(Yp,{message:{...TH,top:e-4},children:x(Rge,{})})}let fb,Ft=zR,sa=eH,XR=xa;function Rge(){return fb=Yp.useApp(),Ft=fb.message,sa=fb.notification,XR=fb.modal,null}function di(e){return e.filter(Boolean).filter(t=>t.test===void 0?true:typeof t.test=="boolean"?t.test:t.test()).map(t=>UL(t,["test"]))}const Tge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.793 3.693a1 1 0 0 1 1.414 0l2.5 2.5a1 1 0 0 1 0 1.414l-2.5 2.5a1 1 0 1 1-1.414-1.414L19.586 6.9l-1.793-1.793a1 1 0 0 1 0-1.414m0 10.15a1 1 0 0 1 1.414 0l2.5 2.5a1 1 0 0 1 0 1.414l-2.5 2.5a1 1 0 1 1-1.414-1.414l1.793-1.793l-1.793-1.793a1 1 0 0 1 0-1.414",clipRule:"evenodd"}),x("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.054 5.913c.352.023.657.043.946.043a1 1 0 1 1 0 2c-.346 0-.776-.028-1.184-.054a37 37 0 0 0-.606-.037c-.614-.03-1.118-.02-1.482.065c-1.456.341-3.07 1.481-4.394 4.117c1.304 2.555 2.9 3.529 4.394 3.879c.364.085.868.094 1.482.064c.186-.009.393-.022.606-.036A19 19 0 0 1 20 15.899a1 1 0 1 1 0 2c-.289 0-.594.02-.946.044c-.227.015-.473.032-.747.045c-.63.03-1.377.04-2.035-.115c-1.812-.424-3.549-1.493-4.972-3.634c-.553 1.02-1.177 1.822-1.927 2.427c-.978.788-2.12 1.106-3.213 1.24c-.882.108-1.81.102-2.64.096L3 18a1 1 0 1 1 0-2l.582.002c.824.005 1.593.01 2.335-.08c.892-.11 1.624-.348 2.201-.813c.687-.554 1.323-1.447 1.962-2.95l.046-.109l-.046-.109c-.651-1.53-1.303-2.495-2.015-3.103c-.56-.477-1.277-.726-2.161-.845c-.763-.102-1.562-.099-2.42-.095L3 7.899a1 1 0 1 1 0-2l.445-.001c.853-.004 1.813-.01 2.724.113c1.094.146 2.234.486 3.194 1.305c.75.64 1.375 1.481 1.93 2.52c1.408-2.187 3.136-3.421 4.979-3.853c.658-.154 1.405-.145 2.035-.115c.274.013.52.03.747.045",clipRule:"evenodd"})]}),Age=f.forwardRef(Tge);function eg(e){return t=>e({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em",...t})}const Nge=eg(e=>x("svg",{viewBox:"0 0 1024 1024",fill:"currentColor",...e,children:x("path",{d:"M550 470q10-36 34-62.5t56.5-41Q673 352 709 352q35 0 67.5 14t57 40.5Q858 433 869 470q1 4-1 7t-9 3H560q-4 0-8-2t-2-8zm-64-11q-7 27 3.5 46t28.5 29q18 10 36 10h310q19 0 37.5-10.5t28-30Q939 484 931 456q-14-51-46.5-88.5T807 309q-45-21-98-21-57 0-103 23.5t-77 62Q498 412 486 459zm-17 15q-35-10-61.5-34t-41-56.5Q352 351 352 315q0-35 14-67.5t40.5-57Q433 166 470 155q3-1 6.5 1t3.5 9v299q0 4-2 8t-9 2zm-11 64q28 7 47-3t29-28.5q10-18.5 10-36.5V160q0-19-10.5-37.5t-30.5-28Q483 85 455 93q-50 14-88 46.5T308.5 217Q288 262 288 315q0 57 23 103t62 77q39 31 85 43zm16 16q-10 36-34 62.5t-57 41Q350 672 314 672q-35 0-67.5-14T190 617.5Q166 591 155 554q-1-3 1-6.5t9-3.5h298q5 0 9 2t2 8zm63 11q7-27-3-46t-28-29q-18-10-36-10H160q-19 0-37.5 10.5t-28 30Q85 540 93 569q14 50 46.5 87.5T217 715q45 21 97 21 57 0 103.5-23.5t77.5-62q31-38.5 42-85.5zm17-15q36 10 62.5 34t41 57q14.5 33 14.5 69 0 35-14 67t-40.5 56.5Q591 858 554 869q-3 1-6.5-1t-3.5-9V560q0-4 2-8t8-2zm11-63q-27-7-46 3t-29 28q-10 18-10 36v310q0 19 10.5 37.5t30 28Q540 939 568 931q51-14 88.5-46.5T715 807q21-45 21-97 0-57-23.5-103.5t-62-77.5Q612 498 565 487z"})})),Pge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"currentColor",children:[x("path",{d:"M80 104v104H32a8 8 0 0 1-8-8v-88a8 8 0 0 1 8-8Z",opacity:.2}),x("path",{d:"M234 80.12A24 24 0 0 0 216 72h-56V56a40 40 0 0 0-40-40a8 8 0 0 0-7.16 4.42L75.06 96H32a16 16 0 0 0-16 16v88a16 16 0 0 0 16 16h172a24 24 0 0 0 23.82-21l12-96A24 24 0 0 0 234 80.12M32 112h40v88H32Zm191.94-15l-12 96a8 8 0 0 1-7.94 7H88v-94.11l36.71-73.43A24 24 0 0 1 144 56v24a8 8 0 0 0 8 8h64a8 8 0 0 1 7.94 9"})]})]}),Ige=f.forwardRef(Pge),Oge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"currentColor",children:[x("path",{d:"M80 48v104H32a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8Z",opacity:.2}),x("path",{d:"m239.82 157l-12-96A24 24 0 0 0 204 40H32a16 16 0 0 0-16 16v88a16 16 0 0 0 16 16h43.06l37.78 75.58A8 8 0 0 0 120 240a40 40 0 0 0 40-40v-16h56a24 24 0 0 0 23.82-27M72 144H32V56h40Zm150 21.29a7.88 7.88 0 0 1-6 2.71h-64a8 8 0 0 0-8 8v24a24 24 0 0 1-19.29 23.54L88 150.11V56h116a8 8 0 0 1 7.94 7l12 96a7.87 7.87 0 0 1-1.94 6.29"})]})]}),Dge=f.forwardRef(Oge),_ge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"m24 4l-6 6h-8v8l-6 6l6 6v8h8l6 6l6-6h8v-8l6-6l-6-6v-8h-8z"}),x("path",{d:"M24 30a6 6 0 1 0 0-12a6 6 0 0 0 0 12Z"})]})]}),Lge=f.forwardRef(_ge),Bge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("rect",{width:36,height:36,x:6,y:6,strokeLinecap:"round",rx:3}),x("path",{d:"M18.5 24v-7.794l6.75 3.897L32 24l-6.75 3.897l-6.75 3.897z"})]})]}),zge=f.forwardRef(Bge),kge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h5.615v1H5.616q-.231 0-.424.192T5 5.616v12.769q0 .23.192.423t.423.192h12.77q.23 0 .423-.192t.192-.423v-5.616h1v5.616q0 .69-.462 1.152T18.384 20zm4.123-5.03l-.708-.709L18.292 5H14V4h6v6h-1V5.708z"})]}),Fge=f.forwardRef(kge),Hge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M18 7h-3l4-4l4 4h-3v14h-2zM8 5c-3.86 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7s-3.13-7-7-7m2.19 9.53L7 12.69V9h1.5v2.82l2.44 1.41z"})]}),Vge=f.forwardRef(Hge),jge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M20 17h3l-4 4l-4-4h3V3h2zM8 5c-3.86 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7s-3.13-7-7-7m2.19 9.53L7 12.69V9h1.5v2.82l2.44 1.41z"})]}),Uge=f.forwardRef(jge),qge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h7m-7 6h7m-7 6h9m2-9l3-3l3 3m-3-3v12"})]}),Gge=f.forwardRef(qge),Wge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h9m-9 6h7m-7 6h7m4-3l3 3l3-3m-3-9v12"})]}),Kge=f.forwardRef(Wge),Yge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",children:[x("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M24 44a19.94 19.94 0 0 0 14.142-5.858A19.94 19.94 0 0 0 44 24a19.94 19.94 0 0 0-5.858-14.142A19.94 19.94 0 0 0 24 4A19.94 19.94 0 0 0 9.858 9.858A19.94 19.94 0 0 0 4 24a19.94 19.94 0 0 0 5.858 14.142A19.94 19.94 0 0 0 24 44Z"}),x("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5",clipRule:"evenodd"}),x("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M24.5 34V20h-2M21 34h7"})]})]}),Xge=f.forwardRef(Yge),Qge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M16 4.5V7H5v2h11v2.5L19.5 8M16 12.5V15H5v2h11v2.5l3.5-3.5"})]}),Zge=f.forwardRef(Qge),Jge=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),x("path",{strokeLinecap:"round",d:"M24.008 12v12.01l8.479 8.48"})]})]}),eve=f.forwardRef(Jge),tve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeWidth:4,children:[x("rect",{width:26,height:40,x:11,y:4,rx:3}),x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10h4m-6 28h8"})]})]}),nve=f.forwardRef(tve),rve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeWidth:4,children:[x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 32h10v9H19z"}),x("rect",{width:38,height:24,x:5,y:8,rx:2}),x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 27h4M14 41h20"})]})]}),ove=f.forwardRef(rve),ive=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",children:[x("path",{strokeLinecap:"round",strokeWidth:4,d:"M10.858 9.858A19.94 19.94 0 0 0 5 24a19.94 19.94 0 0 0 5.858 14.142m28.284 0A19.94 19.94 0 0 0 45 24a19.94 19.94 0 0 0-5.858-14.142M34.9 33.9A13.96 13.96 0 0 0 39 24a13.96 13.96 0 0 0-4.1-9.9m-19.8 0A13.96 13.96 0 0 0 11 24a13.96 13.96 0 0 0 4.1 9.9"}),x("path",{strokeLinejoin:"round",strokeWidth:3.5,d:"M28.182 20C30.29 20 32 21.612 32 23.6c0 2.588-2.546 4.8-3.818 6Q26.908 30.8 25 32q-1.909-1.2-3.182-2.4C20.545 28.4 18 26.188 18 23.6c0-1.988 1.71-3.6 3.818-3.6c1.328 0 2.498.64 3.182 1.61c.684-.97 1.854-1.61 3.182-1.61Z"})]})]}),ave=f.forwardRef(ive),sve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"m16 6.52l2.76 5.58l.46 1l1 .15l6.16.89l-4.38 4.3l-.75.73l.18 1l1.05 6.13l-5.51-2.89L16 23l-.93.49l-5.51 2.85l1-6.13l.18-1l-.74-.77l-4.42-4.35l6.16-.89l1-.15l.46-1zM16 2l-4.55 9.22l-10.17 1.47l7.36 7.18L6.9 30l9.1-4.78L25.1 30l-1.74-10.13l7.36-7.17l-10.17-1.48Z"})]}),lve=f.forwardRef(sve),cve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"m16 2l-4.55 9.22l-10.17 1.47l7.36 7.18L6.9 30l9.1-4.78L25.1 30l-1.74-10.13l7.36-7.17l-10.17-1.48Z"})]}),uve=f.forwardRef(cve),dve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M24 44c8.235 0 15-6.526 15-14.902c0-2.056-.105-4.26-1.245-7.686s-1.369-3.868-2.574-5.984c-.515 4.317-3.27 6.117-3.97 6.655c0-.56-1.666-6.747-4.193-10.45C24.537 8 21.163 5.617 19.185 4c0 3.07-.863 7.634-2.1 9.96c-1.236 2.325-1.468 2.41-3.013 4.14s-2.253 2.265-3.545 4.365S9 27.362 9 29.418C9 37.794 15.765 44 24 44Z"})]}),fve=f.forwardRef(dve),mve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{strokeDasharray:32,d:"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.6s",values:"32;0"})}),j("path",{strokeDasharray:"2 4",strokeDashoffset:6,d:"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",opacity:0,children:[x("set",{fill:"freeze",attributeName:"opacity",begin:"0.45s",to:1}),x("animateTransform",{fill:"freeze",attributeName:"transform",begin:"0.45s",dur:"0.6s",type:"rotate",values:"-180 12 12;0 12 12"}),x("animate",{attributeName:"stroke-dashoffset",begin:"0.85s",dur:"0.6s",repeatCount:"indefinite",to:0})]}),x("path",{strokeDasharray:10,strokeDashoffset:10,d:"M12 16v-7.5",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.85s",dur:"0.2s",to:0})}),x("path",{strokeDasharray:8,strokeDashoffset:8,d:"M12 8.5l3.5 3.5M12 8.5l-3.5 3.5",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"1.05s",dur:"0.2s",to:0})})]})]}),hve=f.forwardRef(mve),pve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"}),x("path",{strokeLinecap:"round",d:"m33 31l8 8m-8 0l8-8m-14-3h-8.2c-4.48 0-6.72 0-8.432.872a8 8 0 0 0-3.496 3.496C6 34.08 6 36.32 6 40.8V42h21"})]})]}),gve=f.forwardRef(pve),vve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"m13 8l-7 6l7 7"}),x("path",{d:"M6 14h22.994c6.883 0 12.728 5.62 12.996 12.5c.284 7.27-5.723 13.5-12.996 13.5H11.998"})]})]}),AH=f.forwardRef(vve),bve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{strokeLinecap:"round",d:"M13 12.432v-4.62A2.813 2.813 0 0 1 15.813 5h24.374A2.813 2.813 0 0 1 43 7.813v24.375A2.813 2.813 0 0 1 40.188 35h-4.672"}),x("path",{d:"M32.188 13H7.811A2.813 2.813 0 0 0 5 15.813v24.374A2.813 2.813 0 0 0 7.813 43h24.375A2.813 2.813 0 0 0 35 40.188V15.811A2.813 2.813 0 0 0 32.188 13Z"})]})]}),yve=f.forwardRef(bve),Sve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{children:[x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.14}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.29,transform:"rotate(30 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.43,transform:"rotate(60 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.57,transform:"rotate(90 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.71,transform:"rotate(120 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.86,transform:"rotate(150 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",transform:"rotate(180 12 12)"}),x("animateTransform",{attributeName:"transform",calcMode:"discrete",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"})]})]}),QR=f.forwardRef(Sve),Cve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zM17 6H7v13h10zm-7 11q.425 0 .713-.288T11 16V9q0-.425-.288-.712T10 8t-.712.288T9 9v7q0 .425.288.713T10 17m4 0q.425 0 .713-.288T15 16V9q0-.425-.288-.712T14 8t-.712.288T13 9v7q0 .425.288.713T14 17M7 6v13z"})]}),xve=f.forwardRef(Cve),wve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m10 8l-6 6l6 6m28 8l6 6l-6 6M4 14h40M4 34h40"})]}),NH=f.forwardRef(wve),$ve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M5.325 43.5h8.485l31.113-31.113l-8.486-8.485L5.325 35.015z"}),x("path",{strokeLinecap:"round",d:"m27.952 12.387l8.485 8.485"})]})]}),Eve=f.forwardRef($ve),Mve=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M16 20v-7h4v7zm-6 0V4h4v16zm-6 0V9h4v11z"})]}),Rve=f.forwardRef(Mve),ZR=f.createContext({});function m1(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const PH=typeof window<"u",IH=PH?f.useLayoutEffect:f.useEffect,h1=f.createContext(null);function JR(e,t){e.indexOf(t)===-1&&e.push(t);}function tg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1);}const Ua=(e,t,n)=>n>t?t:n{};const Ms={},OH=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function DH(e){return typeof e=="object"&&e!==null}const _H=e=>/^0[^.\s]+$/u.test(e);function tT(e){let t;return ()=>(t===void 0&&(t=e()),t)}const Ui=e=>e,Tve=(e,t)=>n=>t(e(n)),ng=(...e)=>e.reduce(Tve),cf=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class nT{constructor(){this.subscriptions=[];}add(t){return JR(this.subscriptions,t),()=>tg(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;ie*1e3,Vi=e=>e/1e3;function LH(e,t){return t?e*(1e3/t):0}const Ave=(e,t,n)=>{const r=t-e;return ((n-e)%r+r)%r+e},BH=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nve=1e-7,Pve=12;function Ive(e,t,n,r,o){let i,a,c=0;do a=t+(n-t)/2,i=BH(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>Nve&&++cIve(i,0,1,e,n);return i=>i===0||i===1?i:BH(o(i),t,r)}const zH=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kH=e=>t=>1-e(1-t),FH=rg(.33,1.53,.69,.99),rT=kH(FH),HH=zH(rT),VH=e=>(e*=2)<1?.5*rT(e):.5*(2-Math.pow(2,-10*(e-1))),oT=e=>1-Math.sin(Math.acos(e)),jH=kH(oT),UH=zH(oT),Ove=rg(.42,0,1,1),Dve=rg(0,0,.58,1),qH=rg(.42,0,.58,1),GH=e=>Array.isArray(e)&&typeof e[0]!="number";function WH(e,t){return GH(e)?e[Ave(0,e.length,t)]:e}const KH=e=>Array.isArray(e)&&typeof e[0]=="number",_ve={linear:Ui,easeIn:Ove,easeInOut:qH,easeOut:Dve,circIn:oT,circInOut:UH,circOut:jH,backIn:rT,backInOut:HH,backOut:FH,anticipate:VH},Lve=e=>typeof e=="string",I8=e=>{if(KH(e)){eT(e.length===4);const[t,n,r,o]=e;return rg(t,n,r,o)}else if(Lve(e))return _ve[e];return e},mb=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Bve(e,t){let n=new Set,r=new Set,o=false,i=false;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:false};function u(m){a.has(m)&&(d.schedule(m),e()),m(c);}const d={schedule:(m,p=false,g=false)=>{const y=g&&o?n:r;return p&&a.add(m),y.has(m)||y.add(m),m},cancel:m=>{r.delete(m),a.delete(m);},process:m=>{if(c=m,o){i=true;return}o=true,[n,r]=[r,n],n.forEach(u),n.clear(),o=false,i&&(i=false,d.process(m));}};return d}const zve=40;function YH(e,t){let n=false,r=true;const o={delta:0,timestamp:0,isProcessing:false},i=()=>n=true,a=mb.reduce((M,T)=>(M[T]=Bve(i),M),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:m,update:p,preRender:g,render:b,postRender:y}=a,S=()=>{const M=Ms.useManualTiming?o.timestamp:performance.now();n=false,Ms.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(M-o.timestamp,zve),1)),o.timestamp=M,o.isProcessing=true,c.process(o),u.process(o),d.process(o),m.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=false,n&&t&&(r=false,e(S));},C=()=>{n=true,r=true,o.isProcessing||e(S);};return {schedule:mb.reduce((M,T)=>{const R=a[T];return M[T]=(I,P=false,N=false)=>(n||C(),R.schedule(I,P,N)),M},{}),cancel:M=>{for(let T=0;T(Kb===void 0&&$o.set(Yr.isProcessing||Ms.useManualTiming?Yr.timestamp:performance.now()),Kb),set:e=>{Kb=e,queueMicrotask(kve);}},XH=e=>t=>typeof t=="string"&&t.startsWith(e),QH=XH("--"),Fve=XH("var(--"),iT=e=>Fve(e)?Hve.test(e.split("/*")[0].trim()):false,Hve=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function O8(e){return typeof e!="string"?false:e.split("/*")[0].includes("var(--")}const zf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},hp={...zf,transform:e=>Ua(0,1,e)},hb={...zf,default:1},Oh=e=>Math.round(e*1e5)/1e5,aT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Vve(e){return e==null}const jve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sT=(e,t)=>n=>!!(typeof n=="string"&&jve.test(n)&&n.startsWith(e)||t&&!Vve(n)&&Object.prototype.hasOwnProperty.call(n,t)),ZH=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,c]=r.match(aT);return {[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},Uve=e=>Ua(0,255,e),Zx={...zf,transform:e=>Math.round(Uve(e))},Uc={test:sT("rgb","red"),parse:ZH("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zx.transform(e)+", "+Zx.transform(t)+", "+Zx.transform(n)+", "+Oh(hp.transform(r))+")"};function qve(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const jE={test:sT("#"),parse:qve,transform:Uc.transform},og=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bl=og("deg"),Ha=og("%"),vt=og("px"),Gve=og("vh"),Wve=og("vw"),D8={...Ha,parse:e=>Ha.parse(e)/100,transform:e=>Ha.transform(e*100)},Dd={test:sT("hsl","hue"),parse:ZH("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ha.transform(Oh(t))+", "+Ha.transform(Oh(n))+", "+Oh(hp.transform(r))+")"},vr={test:e=>Uc.test(e)||jE.test(e)||Dd.test(e),parse:e=>Uc.test(e)?Uc.parse(e):Dd.test(e)?Dd.parse(e):jE.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Uc.transform(e):Dd.transform(e),getAnimatableNone:e=>{const t=vr.parse(e);return t.alpha=0,vr.transform(t)}},Kve=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yve(e){return isNaN(e)&&typeof e=="string"&&(e.match(aT)?.length||0)+(e.match(Kve)?.length||0)>0}const JH="number",eV="color",Xve="var",Qve="var(",_8="${}",Zve=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pp(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const c=t.replace(Zve,u=>(vr.test(u)?(r.color.push(i),o.push(eV),n.push(vr.parse(u))):u.startsWith(Qve)?(r.var.push(i),o.push(Xve),n.push(u)):(r.number.push(i),o.push(JH),n.push(parseFloat(u))),++i,_8)).split(_8);return {values:n,split:c,indexes:r,types:o}}function tV(e){return pp(e).values}function nV(e){const{split:t,types:n}=pp(e),r=t.length;return o=>{let i="";for(let a=0;atypeof e=="number"?0:vr.test(e)?vr.getAnimatableNone(e):e;function ebe(e){const t=tV(e);return nV(e)(t.map(Jve))}const Ul={test:Yve,parse:tV,createTransformer:nV,getAnimatableNone:ebe};function Jx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tbe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else {const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=Jx(u,c,e+1/3),i=Jx(u,c,e),a=Jx(u,c,e-1/3);}return {red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function J0(e,t){return n=>n>0?t:e}const Qn=(e,t,n)=>e+(t-e)*n,ew=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},nbe=[jE,Uc,Dd],rbe=e=>nbe.find(t=>t.test(e));function L8(e){const t=rbe(e);if(!t)return false;let n=t.parse(e);return t===Dd&&(n=tbe(n)),n}const B8=(e,t)=>{const n=L8(e),r=L8(t);if(!n||!r)return J0(e,t);const o={...n};return i=>(o.red=ew(n.red,r.red,i),o.green=ew(n.green,r.green,i),o.blue=ew(n.blue,r.blue,i),o.alpha=Qn(n.alpha,r.alpha,i),Uc.transform(o))},UE=new Set(["none","hidden"]);function obe(e,t){return UE.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ibe(e,t){return n=>Qn(e,t,n)}function lT(e){return typeof e=="number"?ibe:typeof e=="string"?iT(e)?J0:vr.test(e)?B8:lbe:Array.isArray(e)?rV:typeof e=="object"?vr.test(e)?B8:abe:J0}function rV(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>lT(i)(i,t[a]));return i=>{for(let a=0;a{for(const i in r)n[i]=r[i](o);return n}}function sbe(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o{const n=Ul.createTransformer(t),r=pp(e),o=pp(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?UE.has(e)&&!o.values.length||UE.has(t)&&!r.values.length?obe(e,t):ng(rV(sbe(r,o),o.values),n):J0(e,t)};function oV(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qn(e,t,n):lT(e)(e,t)}const cbe=e=>{const t=({timestamp:n})=>e(n);return {start:(n=true)=>Gn.update(t,n),stop:()=>jl(t),now:()=>Yr.isProcessing?Yr.timestamp:$o.now()}},iV=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i=ey?1/0:t}function aV(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(cT(r),ey);return {type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Vi(o)}}const ube=5;function sV(e,t,n){const r=Math.max(t-ube,0);return LH(n-e(r),t-r)}const or={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},tw=.001;function dbe({duration:e=or.duration,bounce:t=or.bounce,velocity:n=or.velocity,mass:r=or.mass}){let o,i,a=1-t;a=Ua(or.minDamping,or.maxDamping,a),e=Ua(or.minDuration,or.maxDuration,Vi(e)),a<1?(o=d=>{const m=d*a,p=m*e,g=m-n,b=qE(d,a),y=Math.exp(-p);return tw-g/b*y},i=d=>{const p=d*a*e,g=p*n+n,b=Math.pow(a,2)*Math.pow(d,2)*e,y=Math.exp(-p),S=qE(Math.pow(d,2),a);return (-o(d)+tw>0?-1:1)*((g-b)*y)/S}):(o=d=>{const m=Math.exp(-d*e),p=(d-n)*e+1;return -tw+m*p},i=d=>{const m=Math.exp(-d*e),p=(n-d)*(e*e);return m*p});const c=5/e,u=mbe(o,i,c);if(e=Fa(e),isNaN(u))return {stiffness:or.stiffness,damping:or.damping,duration:e};{const d=Math.pow(u,2)*r;return {stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const fbe=12;function mbe(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function gbe(e){let t={velocity:or.velocity,stiffness:or.stiffness,damping:or.damping,mass:or.mass,isResolvedFromDuration:false,...e};if(!z8(e,pbe)&&z8(e,hbe))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Ua(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:or.mass,stiffness:o,damping:i};}else {const n=dbe(e);t={...t,...n,mass:or.mass},t.isResolvedFromDuration=true;}return t}function gp(e=or.visualDuration,t=or.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:false,value:i},{stiffness:u,damping:d,mass:m,duration:p,velocity:g,isResolvedFromDuration:b}=gbe({...n,velocity:-Vi(n.velocity||0)}),y=g||0,S=d/(2*Math.sqrt(u*m)),C=a-i,w=Vi(Math.sqrt(u/m)),$=Math.abs(C)<5;r||(r=$?or.restSpeed.granular:or.restSpeed.default),o||(o=$?or.restDelta.granular:or.restDelta.default);let M;if(S<1){const R=qE(w,S);M=I=>{const P=Math.exp(-S*w*I);return a-P*((y+S*w*C)/R*Math.sin(R*I)+C*Math.cos(R*I))};}else if(S===1)M=R=>a-Math.exp(-w*R)*(C+(y+w*C)*R);else {const R=w*Math.sqrt(S*S-1);M=I=>{const P=Math.exp(-S*w*I),N=Math.min(R*I,300);return a-P*((y+S*w*C)*Math.sinh(N)+R*C*Math.cosh(N))/R};}const T={calculatedDuration:b&&p||null,next:R=>{const I=M(R);if(b)c.done=R>=p;else {let P=R===0?y:0;S<1&&(P=R===0?Fa(y):sV(M,R,I));const N=Math.abs(P)<=r,O=Math.abs(a-I)<=o;c.done=N&&O;}return c.value=c.done?a:I,c},toString:()=>{const R=Math.min(cT(T),ey),I=iV(P=>T.next(R*P).value,R,30);return R+"ms "+I},toTransition:()=>{}};return T}gp.applyToOptions=e=>{const t=aV(e,100,gp);return e.ease=t.ease,e.duration=Fa(t.duration),e.type="keyframes",e};function GE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:c,max:u,restDelta:d=.5,restSpeed:m}){const p=e[0],g={done:false,value:p},b=N=>c!==void 0&&Nu,y=N=>c===void 0?u:u===void 0||Math.abs(c-N)-S*Math.exp(-N/r),M=N=>w+$(N),T=N=>{const O=$(N),_=M(N);g.done=Math.abs(O)<=d,g.value=g.done?w:_;};let R,I;const P=N=>{b(g.value)&&(R=N,I=gp({keyframes:[g.value,y(g.value)],velocity:sV(M,N,g.value),damping:o,stiffness:i,restDelta:d,restSpeed:m}));};return P(0),{calculatedDuration:null,next:N=>{let O=false;return !I&&R===void 0&&(O=true,T(N),P(N)),R!==void 0&&N>=R?I.next(N-R):(!O&&T(N),g)}}}function vbe(e,t,n){const r=[],o=n||Ms.mix||oV,i=e.length-1;for(let a=0;at[0];if(i===2&&t[0]===t[1])return ()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=vbe(t,r,o),u=c.length,d=m=>{if(a&&m1)for(;pd(Ua(e[0],e[i-1],m)):d}function lV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=cf(0,t,r);e.push(Qn(n,1,o));}}function cV(e){const t=[0];return lV(t,e.length-1),t}function ybe(e,t){return e.map(n=>n*t)}function Sbe(e,t){return e.map(()=>t||qH).splice(0,e.length-1)}function Dh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=GH(r)?r.map(I8):I8(r),i={done:false,value:t[0]},a=ybe(n&&n.length===t.length?n:cV(t),e),c=bbe(a,t,{ease:Array.isArray(o)?o:Sbe(t,o)});return {calculatedDuration:e,next:u=>(i.value=c(u),i.done=u>=e,i)}}const Cbe=e=>e!==null;function uT(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(Cbe),c=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return !c||r===void 0?i[c]:r}const xbe={decay:GE,inertia:GE,tween:Dh,keyframes:Dh,spring:gp};function uV(e){typeof e.type=="string"&&(e.type=xbe[e.type]);}class dT{constructor(){this.updateFinished();}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t;});}notifyFinished(){this.resolve();}then(t,n){return this.finished.then(t,n)}}const wbe=e=>e/100;class fT extends dT{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=false,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==$o.now()&&this.tick($o.now()),this.isStopped=true,this.state!=="idle"&&(this.teardown(),this.options.onStop?.());},this.options=t,this.initAnimation(),this.play(),t.autoplay===false&&this.pause();}initAnimation(){const{options:t}=this;uV(t);const{type:n=Dh,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:c}=t;const u=n||Dh;u!==Dh&&typeof c[0]!="number"&&(this.mixKeyframes=ng(wbe,oV(c[0],c[1])),c=[0,100]);const d=u({...t,keyframes:c});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=cT(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=d;}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n;}tick(t,n=false){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:S,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-d*(this.playbackSpeed>=0?1:-1),$=this.playbackSpeed>=0?w<0:w>o;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let M=this.currentTime,T=r;if(p){const N=Math.min(this.currentTime,o)/c;let O=Math.floor(N),_=N%1;!_&&N>=1&&(_=1),_===1&&O--,O=Math.min(O,p+1),O%2&&(g==="reverse"?(_=1-_,b&&(_-=b/c)):g==="mirror"&&(T=a)),M=Ua(0,1,_)*c;}const R=$?{done:false,value:m[0]}:T.next(M);i&&(R.value=i(R.value));let{done:I}=R;!$&&u!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return P&&y!==GE&&(R.value=uT(m,this.options,C,this.speed)),S&&S(R.value),P&&this.finish(),R}then(t,n){return this.finished.then(t,n)}get duration(){return Vi(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Vi(t)}get time(){return Vi(this.currentTime)}set time(t){t=Fa(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(false);}get speed(){return this.playbackSpeed}set speed(t){this.updateTime($o.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Vi(this.currentTime));}play(){if(this.isStopped)return;const{driver:t=cbe,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start();}pause(){this.state="paused",this.updateTime($o.now()),this.holdTime=this.currentTime;}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null;}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.();}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.();}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null;}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0);}sample(t){return this.startTime=0,this.tick(t,true)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function $be(e){for(let t=1;te*180/Math.PI,WE=e=>{const t=qc(Math.atan2(e[1],e[0]));return KE(t)},Ebe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:WE,rotateZ:WE,skewX:e=>qc(Math.atan(e[1])),skewY:e=>qc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},KE=e=>(e=e%360,e<0&&(e+=360),e),k8=WE,F8=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),H8=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Mbe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:F8,scaleY:H8,scale:e=>(F8(e)+H8(e))/2,rotateX:e=>KE(qc(Math.atan2(e[6],e[5]))),rotateY:e=>KE(qc(Math.atan2(-e[2],e[0]))),rotateZ:k8,rotate:k8,skewX:e=>qc(Math.atan(e[4])),skewY:e=>qc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function YE(e){return e.includes("scale")?1:0}function XE(e,t){if(!e||e==="none")return YE(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Mbe,o=n;else {const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ebe,o=c;}if(!o)return YE(t);const i=r[t],a=o[1].split(",").map(Tbe);return typeof i=="function"?i(a):a[i]}const Rbe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return XE(n,t)};function Tbe(e){return parseFloat(e.trim())}const kf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ff=new Set(kf),V8=e=>e===zf||e===vt,Abe=new Set(["x","y","z"]),Nbe=kf.filter(e=>!Abe.has(e));function Pbe(e){const t=[];return Nbe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0));}),t}const Rl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>XE(t,"x"),y:(e,{transform:t})=>XE(t,"y")};Rl.translateX=Rl.x;Rl.translateY=Rl.y;const eu=new Set;let QE=false,ZE=false,JE=false;function dV(){if(ZE){const e=Array.from(eu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Pbe(r);o.length&&(n.set(r,o),r.render());}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a);});}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY);});}ZE=false,QE=false,eu.forEach(e=>e.complete(JE)),eu.clear();}function fV(){eu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ZE=true);});}function Ibe(){JE=true,fV(),dV(),JE=false;}class mT{constructor(t,n,r,o,i,a=false){this.state="pending",this.isAsync=false,this.needsMeasurement=false,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a;}scheduleResolve(){this.state="scheduled",this.isAsync?(eu.add(this),QE||(QE=true,Gn.read(fV),Gn.resolveKeyframes(dV))):(this.readKeyframes(),this.complete());}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c);}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0]);}$be(t);}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=false){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),eu.delete(this);}cancel(){this.state==="scheduled"&&(eu.delete(this),this.state="pending");}resume(){this.state==="pending"&&this.scheduleResolve();}}const Obe=e=>e.startsWith("--");function Dbe(e,t,n){Obe(t)?e.style.setProperty(t,n):e.style[t]=n;}const _be=tT(()=>window.ScrollTimeline!==void 0),Lbe={};function Bbe(e,t){const n=tT(e);return ()=>Lbe[t]??n()}const mV=Bbe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"});}catch{return false}return true},"linearEasing"),vh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,j8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vh([0,.65,.55,1]),circOut:vh([.55,0,1,.45]),backIn:vh([.31,.01,.66,-0.59]),backOut:vh([.33,1.53,.69,.99])};function hV(e,t){if(e)return typeof e=="function"?mV()?iV(e,t):"ease-out":KH(e)?vh(e):Array.isArray(e)?e.map(n=>hV(n,t)||j8.easeOut):j8[e]}function zbe(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:c="easeOut",times:u}={},d=void 0){const m={[t]:n};u&&(m.offset=u);const p=hV(c,o);Array.isArray(p)&&(m.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(m,g)}function hT(e){return typeof e=="function"&&"applyToOptions"in e}function kbe({type:e,...t}){return hT(e)&&mV()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Fbe extends dT{constructor(t){if(super(),this.finishedTime=null,this.isStopped=false,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=false,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,eT(typeof t.type!="string");const d=kbe(t);this.animation=zbe(n,r,o,d,i),d.autoplay===false&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const m=uT(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):Dbe(n,r,m),this.animation.cancel();}u?.(),this.notifyFinished();};}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished());}pause(){this.animation.pause();}complete(){this.animation.finish?.();}cancel(){try{this.animation.cancel();}catch{}}stop(){if(this.isStopped)return;this.isStopped=true;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel());}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.();}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Vi(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Vi(t)}get time(){return Vi(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Fa(t);}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t;}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t;}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_be()?(this.animation.timeline=t,Ui):n(this)}}const pV={anticipate:VH,backInOut:HH,circInOut:UH};function Hbe(e){return e in pV}function Vbe(e){typeof e.ease=="string"&&Hbe(e.ease)&&(e.ease=pV[e.ease]);}const nw=10;class jbe extends Fbe{constructor(t){Vbe(t),uV(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t;}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new fT({...a,autoplay:false}),u=Math.max(nw,$o.now()-this.startTime),d=Ua(0,nw,u-nw);n.setWithVelocity(c.sample(Math.max(0,u-d)).value,c.sample(u).value,d),c.stop();}}const U8=(e,t)=>t==="zIndex"?false:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ul.test(e)||e==="0")&&!e.startsWith("url("));function Ube(e){const t=e[0];if(e.length===1)return true;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function Kbe(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return false;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Wbe()&&n&&Gbe.has(n)&&(n!=="transform"||!d)&&!u&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const Ybe=40;class Xbe extends dT{constructor({autoplay:t=true,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:c,name:u,motionValue:d,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel();},this.createdAt=$o.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:u,motionValue:d,element:m,...p},b=m?.KeyframeResolver||mT;this.keyframeResolver=new b(c,(y,S,C)=>this.onKeyframesResolved(y,S,g,!C),u,d,m),this.keyframeResolver?.scheduleResolve();}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:c,delay:u,isHandoff:d,onUpdate:m}=r;this.resolvedAt=$o.now(),qbe(t,i,a,c)||((Ms.instantAnimations||!u)&&m?.(uT(t,r,n)),t[0]=t[t.length-1],e3(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Ybe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&Kbe(g),y=g.motionValue?.owner?.current,S=b?new jbe({...g,element:y}):new fT(g);S.finished.then(()=>{this.notifyFinished();}).catch(Ui),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S;}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ibe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t;}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t;}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play();}pause(){this.animation.pause();}complete(){this.animation.complete();}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel();}}class Qbe{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean);}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rr.attachTimeline(t));return ()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop();});}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t);}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t);}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return q8(this.animations,"duration")}get iterationDuration(){return q8(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]());}play(){this.runAll("play");}pause(){this.runAll("pause");}cancel(){this.runAll("cancel");}complete(){this.runAll("complete");}}function q8(e,t){let n=0;for(let r=0;rn&&(n=o);}return n}class Zbe extends Qbe{then(t,n){return this.finished.finally(t).then(()=>{})}}function gV(e,t,n,r=0,o=1){const i=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),a=e.size,c=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:c-i*r}const Jbe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function e0e(e){const t=Jbe.exec(e);if(!t)return [,];const[,n,r,o]=t;return [`--${n??r}`,o]}function vV(e,t,n=1){const[r,o]=e0e(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return OH(a)?parseFloat(a):a}return iT(o)?vV(o,t,n+1):o}const t0e={type:"spring",stiffness:500,damping:25,restSpeed:10},n0e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),r0e={type:"keyframes",duration:.8},o0e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},i0e=(e,{keyframes:t})=>t.length>2?r0e:Ff.has(e)?e.startsWith("scale")?n0e(t[1]):t0e:o0e,a0e=e=>e!==null;function s0e(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(a0e),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function pT(e,t){return e?.[t]??e?.default??e}function l0e({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:c,from:u,elapsed:d,...m}){return !!Object.keys(m).length}const gT=(e,t,n,r={},o,i)=>a=>{const c=pT(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Fa(u);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g);},onComplete:()=>{a(),c.onComplete&&c.onComplete();},name:e,motionValue:t,element:i?void 0:o};l0e(c)||Object.assign(m,i0e(e,m)),m.duration&&(m.duration=Fa(m.duration)),m.repeatDelay&&(m.repeatDelay=Fa(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=false;if((m.type===false||m.duration===0&&!m.repeatDelay)&&(e3(m),m.delay===0&&(p=true)),(Ms.instantAnimations||Ms.skipAnimations)&&(p=true,e3(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!i&&t.get()!==void 0){const g=s0e(m.keyframes,c);if(g!==void 0){Gn.update(()=>{m.onUpdate(g),m.onComplete();});return}}return c.isSync?new fT(m):new Xbe(m)};function G8(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity();}),t}function vT(e,t,n,r){if(typeof t=="function"){const[o,i]=G8(r);t=t(n!==void 0?n:e.custom,o,i);}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=G8(r);t=t(n!==void 0?n:e.custom,o,i);}return t}function Ud(e,t,n){const r=e.getProps();return vT(r,t,n!==void 0?n:r.custom,e)}const bV=new Set(["width","height","top","left","right","bottom",...kf]),W8=30,c0e=e=>!isNaN(parseFloat(e));class u0e{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=$o.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty();},this.hasAnimated=false,this.setCurrent(t),this.owner=n.owner;}setCurrent(t){this.current=t,this.updatedAt=$o.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=c0e(this.current));}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt;}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new nT);const r=this.events[t].add(n);return t==="change"?()=>{r(),Gn.read(()=>{this.events.change.getSize()||this.stop();});}:r}clearListeners(){for(const t in this.events)this.events[t].clear();}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n;}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t);}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r;}jump(t,n=true){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}dirty(){this.events.change?.notify(this.current);}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t);}removeDependent(t){this.dependents&&this.dependents.delete(t);}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=$o.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>W8)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,W8);return LH(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=true,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify();}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation();})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation();}isAnimating(){return !!this.animation}clearAnimation(){delete this.animation;}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}}function uf(e,t){return new u0e(e,t)}const t3=e=>Array.isArray(e);function d0e(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uf(n));}function f0e(e){return t3(e)?e[e.length-1]||0:e}function m0e(e,t){const n=Ud(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const c=f0e(i[a]);d0e(e,a,c);}}const Br=e=>!!(e&&e.getVelocity);function h0e(e){return !!(Br(e)&&e.add)}function n3(e,t){const n=e.getValue("willChange");if(h0e(n))return n.add(t);if(!n&&Ms.WillChange){const r=new Ms.WillChange("auto");e.addValue("willChange",r),r.add(t);}}function bT(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const p0e="framerAppearId",yV="data-"+bT(p0e);function SV(e){return e.props[yV]}function g0e({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==true;return t[n]=false,r}function yT(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...c}=t;const u=i?.reduceMotion;r&&(i=r);const d=[],m=o&&e.animationState&&e.animationState.getState()[o];for(const p in c){const g=e.getValue(p,e.latestValues[p]??null),b=c[p];if(b===void 0||m&&g0e(m,p))continue;const y={delay:n,...pT(i||{},p)},S=g.get();if(S!==void 0&&!g.isAnimating&&!Array.isArray(b)&&b===S&&!y.velocity)continue;let C=false;if(window.MotionHandoffAnimation){const M=SV(e);if(M){const T=window.MotionHandoffAnimation(M,p,Gn);T!==null&&(y.startTime=T,C=true);}}n3(e,p);const w=u??e.shouldReduceMotion;g.start(gT(p,g,b,w&&bV.has(p)?{type:false}:y,e,C));const $=g.animation;$&&d.push($);}return a&&Promise.all(d).then(()=>{Gn.update(()=>{a&&m0e(e,a);});}),d}function r3(e,t,n={}){const r=Ud(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(yT(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:m,staggerDirection:p}=o;return v0e(e,t,u,d,m,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function v0e(e,t,n=0,r=0,o=0,i=1,a){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(r3(u,t,{...a,delay:n+(typeof r=="function"?0:r)+gV(e.variantChildren,u,r,o,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function b0e(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>r3(e,i,n));r=Promise.all(o);}else if(typeof t=="string")r=r3(e,t,n);else {const o=typeof t=="function"?Ud(e,t,n.custom):t;r=Promise.all(yT(e,o,n));}return r.then(()=>{e.notify("AnimationComplete",t);})}const y0e={test:e=>e==="auto",parse:e=>e},CV=e=>t=>t.test(e),xV=[zf,vt,Ha,bl,Wve,Gve,y0e],K8=e=>xV.find(CV(e));function S0e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||_H(e):true}const C0e=new Set(["brightness","contrast","saturate","opacity"]);function x0e(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(aT)||[];if(!r)return e;const o=n.replace(r,"");let i=C0e.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const w0e=/\b([a-z-]*)\(.*?\)/gu,o3={...Ul,getAnimatableNone:e=>{const t=e.match(w0e);return t?t.map(x0e).join(" "):e}},Y8={...zf,transform:Math.round},$0e={rotate:bl,rotateX:bl,rotateY:bl,rotateZ:bl,scale:hb,scaleX:hb,scaleY:hb,scaleZ:hb,skew:bl,skewX:bl,skewY:bl,distance:vt,translateX:vt,translateY:vt,translateZ:vt,x:vt,y:vt,z:vt,perspective:vt,transformPerspective:vt,opacity:hp,originX:D8,originY:D8,originZ:vt},ST={borderWidth:vt,borderTopWidth:vt,borderRightWidth:vt,borderBottomWidth:vt,borderLeftWidth:vt,borderRadius:vt,borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomRightRadius:vt,borderBottomLeftRadius:vt,width:vt,maxWidth:vt,height:vt,maxHeight:vt,top:vt,right:vt,bottom:vt,left:vt,inset:vt,insetBlock:vt,insetBlockStart:vt,insetBlockEnd:vt,insetInline:vt,insetInlineStart:vt,insetInlineEnd:vt,padding:vt,paddingTop:vt,paddingRight:vt,paddingBottom:vt,paddingLeft:vt,paddingBlock:vt,paddingBlockStart:vt,paddingBlockEnd:vt,paddingInline:vt,paddingInlineStart:vt,paddingInlineEnd:vt,margin:vt,marginTop:vt,marginRight:vt,marginBottom:vt,marginLeft:vt,marginBlock:vt,marginBlockStart:vt,marginBlockEnd:vt,marginInline:vt,marginInlineStart:vt,marginInlineEnd:vt,fontSize:vt,backgroundPositionX:vt,backgroundPositionY:vt,...$0e,zIndex:Y8,fillOpacity:hp,strokeOpacity:hp,numOctaves:Y8},E0e={...ST,color:vr,backgroundColor:vr,outlineColor:vr,fill:vr,stroke:vr,borderColor:vr,borderTopColor:vr,borderRightColor:vr,borderBottomColor:vr,borderLeftColor:vr,filter:o3,WebkitFilter:o3},wV=e=>E0e[e];function $V(e,t){let n=wV(e);return n!==o3&&(n=Ul),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const M0e=new Set(["auto","none","0"]);function R0e(e,t,n){let r=0,o;for(;r{t.getValue(c).set(u);}),this.resolveNoneKeyframes();}}function EV(e,t,n){if(e==null)return [];if(e instanceof EventTarget)return [e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const MV=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function i3(e){return DH(e)&&"offsetHeight"in e}const{schedule:CT}=YH(queueMicrotask,false),ra={x:false,y:false};function RV(){return ra.x||ra.y}function A0e(e){return e==="x"||e==="y"?ra[e]?null:(ra[e]=true,()=>{ra[e]=false;}):ra.x||ra.y?null:(ra.x=ra.y=true,()=>{ra.x=ra.y=false;})}function TV(e,t){const n=EV(e),r=new AbortController,o={passive:true,...t,signal:r.signal};return [n,o,()=>r.abort()]}function X8(e){return !(e.pointerType==="touch"||RV())}function N0e(e,t,n={}){const[r,o,i]=TV(e,n),a=c=>{if(!X8(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const m=p=>{X8(p)&&(d(p),u.removeEventListener("pointerleave",m));};u.addEventListener("pointerleave",m,o);};return r.forEach(c=>{c.addEventListener("pointerenter",a,o);}),i}const AV=(e,t)=>t?e===t?true:AV(e,t.parentElement):false,xT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==false,P0e=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NV(e){return P0e.has(e.tagName)||e.isContentEditable===true}const Yb=new WeakSet;function Q8(e){return t=>{t.key==="Enter"&&e(t);}}function rw(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:true,bubbles:true}));}const I0e=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Q8(()=>{if(Yb.has(n))return;rw(n,"down");const o=Q8(()=>{rw(n,"up");}),i=()=>rw(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t);});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t);};function Z8(e){return xT(e)&&!RV()}function O0e(e,t,n={}){const[r,o,i]=TV(e,n),a=c=>{const u=c.currentTarget;if(!Z8(c))return;Yb.add(u);const d=t(u,c),m=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Yb.has(u)&&Yb.delete(u),Z8(b)&&typeof d=="function"&&d(b,{success:y});},p=b=>{m(b,u===window||u===document||n.useGlobalTarget||AV(u,b.target));},g=b=>{m(b,false);};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o);};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,o),i3(c)&&(c.addEventListener("focus",d=>I0e(d,o)),!NV(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0));}),i}function wT(e){return DH(e)&&"ownerSVGElement"in e}function PV(e){return wT(e)&&e.tagName==="svg"}const D0e=[...xV,vr,Ul],_0e=e=>D0e.find(CV(e)),J8=()=>({translate:0,scale:1,origin:0,originPoint:0}),_d=()=>({x:J8(),y:J8()}),eD=()=>({min:0,max:0}),gr=()=>({x:eD(),y:eD()}),ty={current:null},$T={current:false},L0e=typeof window<"u";function IV(){if($T.current=true,!!L0e)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ty.current=e.matches;e.addEventListener("change",t),t();}else ty.current=false;}const vp=new WeakMap;function p1(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bp(e){return typeof e=="string"||Array.isArray(e)}const ET=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],MT=["initial",...ET];function g1(e){return p1(e.animate)||MT.some(t=>bp(e[t]))}function OV(e){return !!(g1(e)||e.variants)}function B0e(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Br(o))e.addValue(r,o);else if(Br(i))e.addValue(r,uf(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===true?a.jump(o):a.hasAnimated||a.set(o);}else {const a=e.getStaticValue(r);e.addValue(r,uf(a!==void 0?a:o,{owner:e}));}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const tD=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ny={};function DV(e){ny=e;}function z0e(){return ny}class _V{scrapeMotionValuesFromProps(t,n,r){return {}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=false,this.isControllingVariants=false,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mT,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection));},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=$o.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=false:this.reducedMotionConfig==="always"?this.shouldReduceMotion=true:($T.current||IV(),this.shouldReduceMotion=ty.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext);}unmount(){this.projection&&this.projection.unmount(),jl(this.notifyUpdate),jl(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=false);}this.current=null;}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t);}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t);}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ff.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Gn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=true),this.scheduleRender();});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop();});}sortNodePosition(t){return !this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ny){const n=ny[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=true);}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props);}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n;}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get());}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState);}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(OH(r)||_H(r))?r=parseFloat(r):!_0e(r)&&Ul.test(n)&&(r=$V(t,n)),this.setBaseTarget(t,Br(r)?r.get():r)),Br(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n;}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=vT(this.props,n,this.presenceContext?.custom);i&&(r=i[t]);}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Br(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new nT),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n);}scheduleRenderMicrotask(){CT.render(this.render);}}class LV extends _V{constructor(){super(...arguments),this.KeyframeResolver=T0e;}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t];}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Br(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`);}));}}class oc{constructor(t){this.isMounted=false,this.node=t;}update(){}}function BV({top:e,left:t,right:n,bottom:r}){return {x:{min:t,max:n},y:{min:e,max:r}}}function k0e({x:e,y:t}){return {top:t.min,right:e.max,bottom:t.max,left:e.min}}function F0e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return {top:n.y,left:n.x,bottom:r.y,right:r.x}}function ow(e){return e===void 0||e===1}function a3({scale:e,scaleX:t,scaleY:n}){return !ow(e)||!ow(t)||!ow(n)}function _c(e){return a3(e)||zV(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zV(e){return nD(e.x)||nD(e.y)}function nD(e){return e&&e!=="0%"}function ry(e,t,n){const r=e-n,o=t*r;return n+o}function rD(e,t,n,r,o){return o!==void 0&&(e=ry(e,o,r)),ry(e,n,r)+t}function s3(e,t=0,n=1,r,o){e.min=rD(e.min,t,n,r,o),e.max=rD(e.max,t,n,r,o);}function kV(e,{x:t,y:n}){s3(e.x,t.translate,t.scale,t.originPoint),s3(e.y,n.translate,n.scale,n.originPoint);}const oD=.999999999999,iD=1.0000000000001;function H0e(e,t,n,r=false){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let c=0;coD&&(t.x=1),t.yoD&&(t.y=1);}function Ld(e,t){e.min=e.min+t,e.max=e.max+t;}function aD(e,t,n,r,o=.5){const i=Qn(e.min,e.max,o);s3(e,t,n,i,r);}function Bd(e,t){aD(e.x,t.x,t.scaleX,t.scale,t.originX),aD(e.y,t.y,t.scaleY,t.scale,t.originY);}function FV(e,t){return BV(F0e(e.getBoundingClientRect(),t))}function V0e(e,t,n){const r=FV(e,n),{scroll:o}=t;return o&&(Ld(r.x,o.offset.x),Ld(r.y,o.offset.y)),r}const j0e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},U0e=kf.length;function q0e(e,t,n){let r="",o=true;for(let i=0;i{if(!t.target)return e;if(typeof e=="string")if(vt.test(e))e=parseFloat(e);else return e;const n=sD(e,t.target.x),r=sD(e,t.target.y);return `${n}% ${r}%`}},G0e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ul.parse(e);if(o.length>5)return r;const i=Ul.createTransformer(e),a=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+a]/=c,o[1+a]/=u;const d=Qn(c,u,.5);return typeof o[2+a]=="number"&&(o[2+a]/=d),typeof o[3+a]=="number"&&(o[3+a]/=d),i(o)}},l3={borderRadius:{...Zm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zm,borderTopRightRadius:Zm,borderBottomLeftRadius:Zm,borderBottomRightRadius:Zm,boxShadow:G0e};function VV(e,{layout:t,layoutId:n}){return Ff.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!l3[e]||e==="opacity")}function TT(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(Br(r[a])||o&&Br(o[a])||VV(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function W0e(e){return window.getComputedStyle(e)}class jV extends LV{constructor(){super(...arguments),this.type="html",this.renderInstance=HV;}readValueFromInstance(t,n){if(Ff.has(n))return this.projection?.isProjecting?YE(n):Rbe(t,n);{const r=W0e(t),o=(QH(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return FV(t,n)}build(t,n,r){RT(t,n,r.transformTemplate);}scrapeMotionValuesFromProps(t,n,r){return TT(t,n,r)}}function K0e(e,t){return e in t}class Y0e extends _V{constructor(){super(...arguments),this.type="object";}readValueFromInstance(t,n){if(K0e(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t];}measureInstanceViewportBox(){return gr()}build(t,n){Object.assign(t.output,n);}renderInstance(t,{output:n}){Object.assign(t,n);}sortInstanceNodePosition(){return 0}}const X0e={offset:"stroke-dashoffset",array:"stroke-dasharray"},Q0e={offset:"strokeDashoffset",array:"strokeDasharray"};function Z0e(e,t,n=1,r=0,o=true){e.pathLength=1;const i=o?X0e:Q0e;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`;}const J0e=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function UV(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...c},u,d,m){if(RT(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const b of J0e)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&Z0e(p,o,i,a,false);}const qV=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),GV=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eye(e,t,n,r){HV(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(qV.has(o)?o:bT(o),t.attrs[o]);}function WV(e,t,n){const r=TT(e,t,n);for(const o in e)if(Br(e[o])||Br(t[o])){const i=kf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o];}return r}class KV extends LV{constructor(){super(...arguments),this.type="svg",this.isSVGTag=false,this.measureInstanceViewportBox=gr;}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ff.has(n)){const r=wV(n);return r&&r.default||0}return n=qV.has(n)?n:bT(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return WV(t,n,r)}build(t,n,r){UV(t,n,this.isSVGTag,r.transformTemplate,r.style);}renderInstance(t,n,r,o){eye(t,n,r,o);}mount(t){this.isSVGTag=GV(t.tagName),super.mount(t);}}const tye=MT.length;function YV(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?YV(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>b0e(e,n,r)))}function iye(e){let t=oye(e),n=lD(),r=true;const o=u=>(d,m)=>{const p=Ud(e,m,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;d={...d,...y,...b};}return d};function i(u){t=u(e);}function a(u){const{props:d}=e,m=YV(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let C=0;Cy&&T,O=false;const _=Array.isArray(M)?M:[M];let L=_.reduce(o(w),{});R===false&&(L={});const{prevResolvedValues:H={}}=$,U={...H,...L},q=F=>{N=true,g.has(F)&&(O=true,g.delete(F)),$.needsAnimating[F]=true;const G=e.getValue(F);G&&(G.liveStyle=false);};for(const F in U){const G=L[F],Y=H[F];if(b.hasOwnProperty(F))continue;let Q=false;t3(G)&&t3(Y)?Q=!XV(G,Y):Q=G!==Y,Q?G!=null?q(F):g.add(F):G!==void 0&&g.has(F)?q(F):$.protectedKeys[F]=true;}$.prevProp=M,$.prevResolvedValues=L,$.isActive&&(b={...b,...L}),r&&e.blockInitialAnimation&&(N=false);const V=I&&P;N&&(!V||O)&&p.push(..._.map(F=>{const G={type:w};if(typeof F=="string"&&r&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:Y}=e,Q=Ud(Y,F);if(Y.enteringChildren&&Q){const{delayChildren:D}=Q.transition||{};G.delay=gV(Y.enteringChildren,e,D);}}return {animation:F,options:G}}));}if(g.size){const C={};if(typeof d.initial!="boolean"){const w=Ud(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(C.transition=w.transition);}g.forEach(w=>{const $=e.getBaseTarget(w),M=e.getValue(w);M&&(M.liveStyle=true),C[w]=$??null;}),p.push({animation:C});}let S=!!p.length;return r&&(d.initial===false||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(S=false),r=false,S?t(p):Promise.resolve()}function c(u,d){if(n[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,d)),n[u].isActive=d;const m=a(u);for(const p in n)n[p].protectedKeys={};return m}return {animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=lD();}}}function aye(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!XV(t,e):false}function Ac(e=false){return {isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lD(){return {animate:Ac(true),whileInView:Ac(),whileHover:Ac(),whileTap:Ac(),whileDrag:Ac(),whileFocus:Ac(),exit:Ac()}}function cD(e,t){e.min=t.min,e.max=t.max;}function ea(e,t){cD(e.x,t.x),cD(e.y,t.y);}function uD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin;}const QV=1e-4,sye=1-QV,lye=1+QV,ZV=.01,cye=0-ZV,uye=0+ZV;function Eo(e){return e.max-e.min}function dye(e,t,n){return Math.abs(e-t)<=n}function dD(e,t,n,r=.5){e.origin=r,e.originPoint=Qn(t.min,t.max,e.origin),e.scale=Eo(n)/Eo(t),e.translate=Qn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=sye&&e.scale<=lye||isNaN(e.scale))&&(e.scale=1),(e.translate>=cye&&e.translate<=uye||isNaN(e.translate))&&(e.translate=0);}function _h(e,t,n,r){dD(e.x,t.x,n.x,r?r.originX:void 0),dD(e.y,t.y,n.y,r?r.originY:void 0);}function fD(e,t,n){e.min=n.min+t.min,e.max=e.min+Eo(t);}function fye(e,t,n){fD(e.x,t.x,n.x),fD(e.y,t.y,n.y);}function mD(e,t,n){e.min=t.min-n.min,e.max=e.min+Eo(t);}function oy(e,t,n){mD(e.x,t.x,n.x),mD(e.y,t.y,n.y);}function hD(e,t,n,r,o){return e-=t,e=ry(e,1/n,r),o!==void 0&&(e=ry(e,1/o,r)),e}function mye(e,t=0,n=1,r=.5,o,i=e,a=e){if(Ha.test(t)&&(t=parseFloat(t),t=Qn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Qn(i.min,i.max,r);e===i&&(c-=t),e.min=hD(e.min,t,n,c,o),e.max=hD(e.max,t,n,c,o);}function pD(e,t,[n,r,o],i,a){mye(e,t[n],t[r],t[o],t.scale,i,a);}const hye=["x","scaleX","originX"],pye=["y","scaleY","originY"];function gD(e,t,n,r){pD(e.x,t,hye,n?n.x:void 0,r?r.x:void 0),pD(e.y,t,pye,n?n.y:void 0,r?r.y:void 0);}function vD(e){return e.translate===0&&e.scale===1}function JV(e){return vD(e.x)&&vD(e.y)}function bD(e,t){return e.min===t.min&&e.max===t.max}function gye(e,t){return bD(e.x,t.x)&&bD(e.y,t.y)}function yD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ej(e,t){return yD(e.x,t.x)&&yD(e.y,t.y)}function SD(e){return Eo(e.x)/Eo(e.y)}function CD(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function _i(e){return [e("x"),e("y")]}function vye(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:m,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `);}const c=e.x.scale*t.x,u=e.y.scale*t.y;return (c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const tj=["TopLeft","TopRight","BottomLeft","BottomRight"],bye=tj.length,xD=e=>typeof e=="string"?parseFloat(e):e,wD=e=>typeof e=="number"||vt.test(e);function yye(e,t,n,r,o,i){o?(e.opacity=Qn(0,n.opacity??1,Sye(r)),e.opacityExit=Qn(t.opacity??1,0,Cye(r))):i&&(e.opacity=Qn(t.opacity??1,n.opacity??1,r));for(let a=0;art?1:n(cf(e,t,r))}function rj(e,t,n){const r=Br(e)?e:uf(e);return r.start(gT("",r,t,n)),r.animation}function yp(e,t,n,r={passive:true}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const xye=(e,t)=>e.depth-t.depth;class wye{constructor(){this.children=[],this.isDirty=false;}add(t){JR(this.children,t),this.isDirty=true;}remove(t){tg(this.children,t),this.isDirty=true;}forEach(t){this.isDirty&&this.children.sort(xye),this.isDirty=false,this.children.forEach(t);}}function $ye(e,t){const n=$o.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(jl(r),e(i-t));};return Gn.setup(r,true),()=>jl(r)}function Xb(e){return Br(e)?e.get():e}class Eye{constructor(){this.members=[];}add(t){JR(this.members,t),t.scheduleRender();}remove(t){if(tg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n);}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return false;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==false){r=i;break}}return r?(this.promote(r),true):false}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;o!==void 0&&i!==void 0&&o===i||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=true),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=true));const{crossfade:c}=t.options;c===false&&r.hide();}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete();});}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(false);});}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0);}}const Qb={hasAnimatedSinceResize:true,hasEverUpdated:false},iw=["","X","Y","Z"],Mye=1e3;let Rye=0;function aw(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0));}function oj(e){if(e.hasCheckedOptimisedAppear=true,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=SV(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Gn,!(o||i));}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&oj(r);}function ij({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},c=t?.()){this.id=Rye++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=false,this.isAnimationBlocked=false,this.isLayoutDirty=false,this.isProjectionDirty=false,this.isSharedProjectionDirty=false,this.isTransformDirty=false,this.updateManuallyBlocked=false,this.updateBlockedByResize=false,this.isUpdating=false,this.isSVG=false,this.needsReset=false,this.shouldResetTransform=false,this.hasCheckedOptimisedAppear=false,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=false,this.layoutVersion=0,this.updateScheduled=false,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=false,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=false,this.clearAllSnapshots());},this.updateProjection=()=>{this.projectionUpdateScheduled=false,this.nodes.forEach(Nye),this.nodes.forEach(Dye),this.nodes.forEach(_ye),this.nodes.forEach(Pye);},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=false,this.isVisible=true,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=false;Gn.read(()=>{p=window.innerWidth;}),e(a,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=true,m&&m(),m=$ye(g,250),Qb.hasAnimatedSinceResize&&(Qb.hasAnimatedSinceResize=false,this.nodes.forEach(RD)));});}c&&this.root.registerSharedNode(c,this),this.options.animate!==false&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||Fye,{onLayoutAnimationStart:S,onLayoutAnimationComplete:C}=d.getProps(),w=!this.targetLayout||!ej(this.targetLayout,b),$=!p&&g;if(this.options.layoutRoot||this.resumeFrom||$||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...pT(y,"layout"),onPlay:S,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=false),this.startAnimation(M),this.setAnimationOrigin(m,$);}else p||RD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b;});}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jl(this.updateProjection);}blockUpdate(){this.updateManuallyBlocked=true;}unblockUpdate(){this.updateManuallyBlocked=false;}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||false}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=true,this.nodes&&this.nodes.forEach(Lye),this.animationId++);}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=true){if(this.root.hasTreeAnimated=true,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&oj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=true;for(let m=0;m{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed();});}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Eo(this.snapshot.measuredBox.x)&&!Eo(this.snapshot.measuredBox.y)&&(this.snapshot=void 0));}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{const R=T/1e3;TD(p.x,a.x,R),TD(p.y,a.y,R),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zye(this.relativeTarget,this.relativeTargetOrigin,g,R),M&&gye(this.relativeTarget,M)&&(this.isProjectionDirty=false),M||(M=gr()),ea(M,this.relativeTarget)),S&&(this.animationValues=m,yye(m,d,this.latestValues,R,$,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R;},this.mixTargetDelta(this.options.layoutRoot?1e3:0);}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(jl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Gn.update(()=>{Qb.hasAnimatedSinceResize=true,this.motionValue||(this.motionValue=uf(0)),this.currentAnimation=rj(this.motionValue,[0,1e3],{...a,velocity:0,isSync:true,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c);},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation();}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0;});}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete");}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Mye),this.currentAnimation.stop()),this.completeAnimation();}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:m}=a;if(!(!c||!u||!d)){if(this!==a&&this.layout&&d&&aj(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||gr();const p=Eo(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const g=Eo(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g;}ea(c,u),Bd(c,m),_h(this.projectionDeltaWithTransform,this.layoutCorrected,c,m);}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Eye),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0});}isLead(){const a=this.getStack();return a?a.lead===this:true}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=true),c&&this.setOptions({transition:c});}relegate(){const a=this.getStack();return a?a.relegate(this):false}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=false;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=true),!c)return;const d={};u.z&&aw("z",a,d,this.animationValues);for(let m=0;ma.currentAnimation?.stop()),this.root.nodes.forEach(ED),this.root.sharedNodes.clear();}}}function Tye(e){e.updateLayout();}function Aye(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?_i(m=>{const p=i?t.measuredBox[m]:t.layoutBox[m],g=Eo(p);p.min=n[m].min,p.max=p.min+g;}):aj(o,t.layoutBox,n)&&_i(m=>{const p=i?t.measuredBox[m]:t.layoutBox[m],g=Eo(n[m]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=true,e.relativeTarget[m].max=e.relativeTarget[m].min+g);});const a=_d();_h(a,n,t.layoutBox);const c=_d();i?_h(c,e.applyTransform(r,true),t.measuredBox):_h(c,n,t.layoutBox);const u=!JV(a);let d=false;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:g}=m;if(p&&g){const b=gr();oy(b,t.layoutBox,p.layoutBox);const y=gr();oy(y,n,g.layoutBox),ej(b,y)||(d=true),m.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=m);}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d});}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n();}e.options.transition=void 0;}function Nye(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty));}function Pye(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=false;}function Iye(e){e.clearSnapshot();}function ED(e){e.clearMeasurements();}function MD(e){e.isLayoutDirty=false;}function Oye(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform();}function RD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=true;}function Dye(e){e.resolveTargetDelta();}function _ye(e){e.calcProjection();}function Lye(e){e.resetSkewAndRotation();}function Bye(e){e.removeLeadSnapshot();}function TD(e,t,n){e.translate=Qn(t.translate,0,n),e.scale=Qn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint;}function AD(e,t,n,r){e.min=Qn(t.min,n.min,r),e.max=Qn(t.max,n.max,r);}function zye(e,t,n,r){AD(e.x,t.x,n.x,r),AD(e.y,t.y,n.y,r);}function kye(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Fye={duration:.45,ease:[.4,0,.1,1]},ND=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),PD=ND("applewebkit/")&&!ND("chrome/")?Math.round:Ui;function ID(e){e.min=PD(e.min),e.max=PD(e.max);}function Hye(e){ID(e.x),ID(e.y);}function aj(e,t,n){return e==="position"||e==="preserve-aspect"&&!dye(SD(t),SD(n),.2)}function Vye(e){return e!==e.root&&e.scroll?.wasRoot}const jye=ij({attachResizeListener:(e,t)=>yp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>true}),sw={current:void 0},sj=ij({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sw.current){const e=new jye({});e.mount(window),e.setOptions({layoutScroll:true}),sw.current=e;}return sw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none";},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),v1=f.createContext({transformPagePoint:e=>e,isStatic:false,reducedMotion:"never"});function OD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t);}function Uye(...e){return t=>{let n=false;const r=e.map(o=>{const i=OD(o,t);return !n&&typeof i=="function"&&(n=true),i});if(n)return ()=>{for(let o=0;o{const{width:p,height:g,top:b,left:y,right:S,bottom:C}=c.current;if(t||!a.current||!p||!g)return;const w=n==="left"?`left: ${y}`:`right: ${S}`,$=r==="bottom"?`bottom: ${C}`:`top: ${b}`;a.current.dataset.motionPopId=i;const M=document.createElement("style");u&&(M.nonce=u);const T=o??document.head;return T.appendChild(M),M.sheet&&M.sheet.insertRule(` [data-motion-pop-id="${i}"] { position: absolute !important; width: ${p}px !important; height: ${g}px !important; ${w}px !important; ${$}px !important; } `),()=>{T.contains(M)&&T.removeChild(M);}},[t]),Uo.jsx(Gye,{isPresent:t,childRef:a,sizeRef:c,children:f.cloneElement(e,{ref:m})})}const Kye=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:c,anchorY:u,root:d})=>{const m=m1(Yye),p=f.useId();let g=true,b=f.useMemo(()=>(g=false,{id:p,initial:t,isPresent:n,custom:o,onExitComplete:y=>{m.set(y,true);for(const S of m.values())if(!S)return;r&&r();},register:y=>(m.set(y,false),()=>m.delete(y))}),[n,m,r]);return i&&g&&(b={...b}),f.useMemo(()=>{m.forEach((y,S)=>m.set(S,false));},[n]),f.useEffect(()=>{!n&&!m.size&&r&&r();},[n]),a==="popLayout"&&(e=Uo.jsx(Wye,{isPresent:n,anchorX:c,anchorY:u,root:d,children:e})),Uo.jsx(h1.Provider,{value:b,children:e})};function Yye(){return new Map}function lj(e=true){const t=f.useContext(h1);if(t===null)return [true,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=f.useId();f.useEffect(()=>{if(e)return o(i)},[e]);const a=f.useCallback(()=>e&&r&&r(i),[i,r,e]);return !n&&r?[false,a]:[true]}const pb=e=>e.key||"";function DD(e){const t=[];return f.Children.forEach(e,n=>{f.isValidElement(n)&&t.push(n);}),t}const Xye=({children:e,custom:t,initial:n=true,onExitComplete:r,presenceAffectsLayout:o=true,mode:i="sync",propagate:a=false,anchorX:c="left",anchorY:u="top",root:d})=>{const[m,p]=lj(a),g=f.useMemo(()=>DD(e),[e]),b=a&&!m?[]:g.map(pb),y=f.useRef(true),S=f.useRef(g),C=m1(()=>new Map),w=f.useRef(new Set),[$,M]=f.useState(g),[T,R]=f.useState(g);IH(()=>{y.current=false,S.current=g;for(let N=0;N{const O=pb(N),_=a&&!m?false:g===T||b.includes(O),L=()=>{if(w.current.has(O))return;if(w.current.add(O),C.has(O))C.set(O,true);else return;let H=true;C.forEach(U=>{U||(H=false);}),H&&(P?.(),R(S.current),a&&p?.(),r&&r());};return Uo.jsx(Kye,{isPresent:_,initial:!y.current||n?void 0:false,custom:t,presenceAffectsLayout:o,mode:i,root:d,onExitComplete:_?void 0:L,anchorX:c,anchorY:u,children:N},O)})})},cj=f.createContext({strict:false}),_D={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let LD=false;function Qye(){if(LD)return;const e={};for(const t in _D)e[t]={isEnabled:n=>_D[t].some(r=>!!n[r])};DV(e),LD=true;}function uj(){return Qye(),z0e()}function Zye(e){const t=uj();for(const n in e)t[n]={...t[n],...e[n]};DV(t);}const Jye=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function iy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Jye.has(e)}let dj=e=>!iy(e);function e1e(e){typeof e=="function"&&(dj=t=>t.startsWith("on")?!iy(t):e(t));}try{e1e(require("@emotion/is-prop-valid").default);}catch{}function t1e(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(dj(o)||n===true&&iy(o)||!t&&!iy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const b1=f.createContext({});function n1e(e,t){if(g1(e)){const{initial:n,animate:r}=e;return {initial:n===false||bp(n)?n:void 0,animate:bp(r)?r:void 0}}return e.inherit!==false?t:{}}function r1e(e){const{initial:t,animate:n}=n1e(e,f.useContext(b1));return f.useMemo(()=>({initial:t,animate:n}),[BD(t),BD(n)])}function BD(e){return Array.isArray(e)?e.join(" "):e}const AT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fj(e,t,n){for(const r in t)!Br(t[r])&&!VV(r,n)&&(e[r]=t[r]);}function o1e({transformTemplate:e},t){return f.useMemo(()=>{const n=AT();return RT(n,t,e),Object.assign({},n.vars,n.style)},[t])}function i1e(e,t){const n=e.style||{},r={};return fj(r,n,e),Object.assign(r,o1e(e,t)),r}function a1e(e,t){const n={},r=i1e(e,t);return e.drag&&e.dragListener!==false&&(n.draggable=false,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===true?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const mj=()=>({...AT(),attrs:{}});function s1e(e,t,n,r){const o=f.useMemo(()=>{const i=mj();return UV(i,t,GV(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};fj(i,e.style,e),o.style={...i,...o.style};}return o}const l1e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function NT(e){return typeof e!="string"||e.includes("-")?false:!!(l1e.indexOf(e)>-1||/[A-Z]/u.test(e))}function c1e(e,t,n,{latestValues:r},o,i=false,a){const u=(a??NT(e)?s1e:a1e)(t,r,o,e),d=t1e(t,typeof e=="string",i),m=e!==f.Fragment?{...d,...u,ref:n}:{},{children:p}=t,g=f.useMemo(()=>Br(p)?p.get():p,[p]);return f.createElement(e,{...m,children:g})}function u1e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return {latestValues:d1e(n,r,o,e),renderState:t()}}function d1e(e,t,n,r){const o={},i=r(e,{});for(const g in i)o[g]=Xb(i[g]);let{initial:a,animate:c}=e;const u=g1(e),d=OV(e);t&&d&&!u&&e.inherit!==false&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===false:false;m=m||a===false;const p=m?c:a;if(p&&typeof p!="boolean"&&!p1(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b(t,n)=>{const r=f.useContext(b1),o=f.useContext(h1),i=()=>u1e(e,t,r,o);return n?i():m1(i)},f1e=hj({scrapeMotionValuesFromProps:TT,createRenderState:AT}),m1e=hj({scrapeMotionValuesFromProps:WV,createRenderState:mj}),h1e=Symbol.for("motionComponentSymbol");function p1e(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n;});const o=f.useRef(null);return f.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(o.current=c);}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i);},[t])}const pj=f.createContext({});function bh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function g1e(e,t,n,r,o,i){const{visualElement:a}=f.useContext(b1),c=f.useContext(cj),u=f.useContext(h1),d=f.useContext(v1).reducedMotion,m=f.useRef(null),p=f.useRef(false);r=r||c.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===false:false,reducedMotionConfig:d,isSVG:i}),p.current&&m.current&&(m.current.manuallyAnimateOnMount=true));const g=m.current,b=f.useContext(pj);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&v1e(m.current,n,o,b);const y=f.useRef(false);f.useInsertionEffect(()=>{g&&y.current&&g.update(n,u);});const S=n[yV],C=f.useRef(!!S&&!window.MotionHandoffIsComplete?.(S)&&window.MotionHasOptimisedAnimation?.(S));return IH(()=>{p.current=true,g&&(y.current=true,window.MotionIsMounted=true,g.updateFeatures(),g.scheduleRenderMicrotask(),C.current&&g.animationState&&g.animationState.animateChanges());}),f.useEffect(()=>{g&&(!C.current&&g.animationState&&g.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(S);}),C.current=false),g.enteringChildren=void 0);}),g}function v1e(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gj(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||c&&bh(c),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:u,layoutRoot:d});}function gj(e){if(e)return e.options.allowProjection!==false?e.projection:gj(e.parent)}function lw(e,{forwardMotionProps:t=false,type:n}={},r,o){r&&Zye(r);const i=n?n==="svg":NT(e),a=i?m1e:f1e;function c(d,m){let p;const g={...f.useContext(v1),...d,layoutId:b1e(d)},{isStatic:b}=g,y=r1e(d),S=a(d,b);if(!b&&PH){y1e();const C=S1e(g);p=C.MeasureLayout,y.visualElement=g1e(e,S,g,o,C.ProjectionNode,i);}return Uo.jsxs(b1.Provider,{value:y,children:[p&&y.visualElement?Uo.jsx(p,{visualElement:y.visualElement,...g}):null,c1e(e,d,p1e(S,y.visualElement,m),S,b,t,i)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=f.forwardRef(c);return u[h1e]=e,u}function b1e({layoutId:e}){const t=f.useContext(ZR).id;return t&&e!==void 0?t+"-"+e:e}function y1e(e,t){f.useContext(cj).strict;}function S1e(e){const t=uj(),{drag:n,layout:r}=t;if(!n&&!r)return {};const o={...n,...r};return {MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function C1e(e,t){if(typeof Proxy>"u")return lw;const n=new Map,r=(i,a)=>lw(i,a,e,t),o=(i,a)=>r(i,a);return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,lw(a,void 0,e,t)),n.get(a))})}const x1e=(e,t)=>t.isSVG??NT(e)?new KV(t):new jV(t,{allowProjection:e!==f.Fragment});class w1e extends oc{constructor(t){super(t),t.animationState||(t.animationState=iye(t));}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();p1(t)&&(this.unmountControls=t.subscribe(this.node));}mount(){this.updateAnimationControlsSubscription();}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription();}unmount(){this.node.animationState.reset(),this.unmountControls?.();}}let $1e=0;class E1e extends oc{constructor(){super(...arguments),this.id=$1e++;}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id);});}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id));}unmount(){}}const M1e={animation:{Feature:w1e},exit:{Feature:E1e}};function ig(e){return {point:{x:e.pageX,y:e.pageY}}}const R1e=e=>t=>xT(t)&&e(t,ig(t));function Lh(e,t,n,r){return yp(e,t,R1e(n),r)}const vj=({current:e})=>e?e.ownerDocument.defaultView:null,zD=(e,t)=>Math.abs(e-t);function T1e(e,t){const n=zD(e.x,t.x),r=zD(e.y,t.y);return Math.sqrt(n**2+r**2)}const kD=new Set(["auto","scroll"]);class bj{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=false,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target);},this.onWindowScroll=()=>{this.handleScroll(window);},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=uw(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,S=T1e(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!S)return;const{point:C}=b,{timestamp:w}=Yr;this.history.push({...C,timestamp:w});const{onStart:$,onMove:M}=this.handlers;y||($&&$(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),M&&M(this.lastMoveEvent,b);},this.handlePointerMove=(b,y)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=cw(y,this.transformPagePoint),Gn.update(this.updatePoint,true);},this.handlePointerUp=(b,y)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const $=uw(b.type==="pointercancel"?this.lastMoveEventInfo:cw(y,this.transformPagePoint),this.history);this.startEvent&&S&&S(b,$),C&&C(b,$);},!xT(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=ig(t),d=cw(u,this.transformPagePoint),{point:m}=d,{timestamp:p}=Yr;this.history=[{...m,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,uw(d,this.history)),this.removeListeners=ng(Lh(this.contextWindow,"pointermove",this.handlePointerMove),Lh(this.contextWindow,"pointerup",this.handlePointerUp),Lh(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c);}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(kD.has(r.overflowX)||kD.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement;}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:true,passive:true}),window.addEventListener("scroll",this.onWindowScroll,{passive:true}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:true}),window.removeEventListener("scroll",this.onWindowScroll);};}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),Gn.update(this.updatePoint,true));}updateHandlers(t){this.handlers=t;}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jl(this.updatePoint);}}function cw(e,t){return t?{point:t(e.point)}:e}function FD(e,t){return {x:e.x-t.x,y:e.y-t.y}}function uw({point:e},t){return {point:e,delta:FD(e,yj(t)),offset:FD(e,A1e(t)),velocity:N1e(t,.1)}}function A1e(e){return e[0]}function yj(e){return e[e.length-1]}function N1e(e,t){if(e.length<2)return {x:0,y:0};let n=e.length-1,r=null;const o=yj(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Fa(t)));)n--;if(!r)return {x:0,y:0};const i=Vi(o.timestamp-r.timestamp);if(i===0)return {x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function P1e(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Qn(n,e,r.max):Math.min(e,n)),e}function HD(e,t,n){return {min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function I1e(e,{top:t,left:n,bottom:r,right:o}){return {x:HD(e.x,n,o),y:HD(e.y,t,r)}}function VD(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=cf(t.min,t.max-r,e.min):r>o&&(n=cf(e.min,e.max-o,t.min)),Ua(0,1,n)}function _1e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const c3=.35;function L1e(e=c3){return e===false?e=0:e===true&&(e=c3),{x:jD(e,"left","right"),y:jD(e,"top","bottom")}}function jD(e,t,n){return {min:UD(e,t),max:UD(e,n)}}function UD(e,t){return typeof e=="number"?e:e[t]||0}const B1e=new WeakMap;class z1e{constructor(t){this.openDragLock=null,this.isDragging=false,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=false,this.hasMutatedConstraints=false,this.elastic=gr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t;}start(t,{snapToCursor:n=false,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===false)return;const i=p=>{n?(this.stopAnimation(),this.snapToCursor(ig(p).point)):this.pauseAnimation();},a=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:S}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=A0e(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=true,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=true,this.visualElement.projection.target=void 0),_i(w=>{let $=this.getAxisMotionValue(w).get()||0;if(Ha.test($)){const{projection:M}=this.visualElement;if(M&&M.layout){const T=M.layout.layoutBox[w];T&&($=Eo(T)*(parseFloat($)/100));}}this.originPoint[w]=$;}),S&&Gn.postRender(()=>S(p,g)),n3(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",true);},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:S,onDrag:C}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:w}=g;if(y&&this.currentDirection===null){this.currentDirection=k1e(w),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),C&&C(p,g);},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null;},d=()=>_i(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new bj(t,{onSessionStart:i,onStart:a,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:vj(this.visualElement),element:this.visualElement.current});}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Gn.postRender(()=>c(r,o));}cancel(){this.isDragging=false;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=false),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",false);}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0;}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!gb(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=P1e(a,this.constraints[t],this.elastic[t])),i.set(a);}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(false):this.visualElement.projection?.layout,o=this.constraints;t&&bh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=I1e(r.layoutBox,t):this.constraints=false,this.elastic=L1e(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&_i(i=>{this.constraints!==false&&this.getAxisMotionValue(i)&&(this.constraints[i]=_1e(r.layoutBox[i],this.constraints[i]));});}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bh(t))return false;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return false;const i=V0e(r,o.root,this.visualElement.getTransformPagePoint());let a=O1e(o.layout.layoutBox,i);if(n){const c=n(k0e(a));this.hasMutatedConstraints=!!c,c&&(a=BV(c));}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=_i(m=>{if(!gb(m,n,this.currentDirection))return;let p=u&&u[m]||{};a&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(m,y)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return n3(this.visualElement,t),r.start(gT(t,r,0,n,this.visualElement,false))}stopAnimation(){_i(t=>this.getAxisMotionValue(t).stop());}pauseAnimation(){_i(t=>this.getAxisMotionValue(t).animation?.pause());}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_i(n=>{const{drag:r}=this.getProps();if(!gb(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:c}=o.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-Qn(a,c,.5)+u);}});}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!bh(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};_i(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==false){const u=c.get();o[a]=D1e({min:u,max:u},this.constraints[a]);}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),_i(a=>{if(!gb(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:d}=this.constraints[a];c.set(Qn(u,d,o[a]));});}addListeners(){if(!this.visualElement.current)return;B1e.set(this.visualElement,this);const t=this.visualElement.current,n=Lh(t,"pointerdown",u=>{const{drag:d,dragListener:m=true}=this.getProps(),p=u.target,g=p!==t&&NV(p);d&&m&&!g&&this.start(u);}),r=()=>{const{dragConstraints:u}=this.getProps();bh(u)&&u.current&&(this.constraints=this.resolveRefConstraints());},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Gn.read(r);const a=yp(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(_i(m=>{const p=this.getAxisMotionValue(m);p&&(this.originPoint[m]+=u[m].translate,p.set(p.get()+u[m].translate));}),this.visualElement.render());}));return ()=>{a(),n(),i(),c&&c();}}getProps(){const t=this.visualElement.getProps(),{drag:n=false,dragDirectionLock:r=false,dragPropagation:o=false,dragConstraints:i=false,dragElastic:a=c3,dragMomentum:c=true}=t;return {...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:c}}}function gb(e,t,n){return (t===true||t===e)&&(n===null||n===e)}function k1e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class F1e extends oc{constructor(t){super(t),this.removeGroupControls=Ui,this.removeListeners=Ui,this.controls=new z1e(t);}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ui;}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)));}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession();}}const qD=e=>(t,n)=>{e&&Gn.postRender(()=>e(t,n));};class H1e extends oc{constructor(){super(...arguments),this.removePointerDownListener=Ui;}onPointerDown(t){this.session=new bj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vj(this.node)});}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return {onSessionStart:qD(t),onStart:qD(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Gn.postRender(()=>o(i,a));}}}mount(){this.removePointerDownListener=Lh(this.node.current,"pointerdown",t=>this.onPointerDown(t));}update(){this.session&&this.session.updateHandlers(this.createPanHandlers());}unmount(){this.removePointerDownListener(),this.session&&this.session.end();}}let dw=false;class V1e extends f.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),dw&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove();}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Qb.hasEverUpdated=true;}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),dw=true,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Gn.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove();}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),CT.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove();}));}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;dw=true,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o));}safeToRemove(){const{safeToRemove:t}=this.props;t&&t();}render(){return null}}function Sj(e){const[t,n]=lj(),r=f.useContext(ZR);return Uo.jsx(V1e,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(pj),isPresent:t,safeToRemove:n})}const j1e={pan:{Feature:H1e},drag:{Feature:F1e,ProjectionNode:sj,MeasureLayout:Sj}};function GD(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Gn.postRender(()=>i(t,ig(t)));}class U1e extends oc{mount(){const{current:t}=this.node;t&&(this.unmount=N0e(t,(n,r)=>(GD(this.node,r,"Start"),o=>GD(this.node,o,"End"))));}unmount(){}}class q1e extends oc{constructor(){super(...arguments),this.isActive=false;}onFocus(){let t=false;try{t=this.node.current.matches(":focus-visible");}catch{t=true;}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",true),this.isActive=true);}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",false),this.isActive=false);}mount(){this.unmount=ng(yp(this.node.current,"focus",()=>this.onFocus()),yp(this.node.current,"blur",()=>this.onBlur()));}unmount(){}}function WD(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Gn.postRender(()=>i(t,ig(t)));}class G1e extends oc{mount(){const{current:t}=this.node;t&&(this.unmount=O0e(t,(n,r)=>(WD(this.node,r,"Start"),(o,{success:i})=>WD(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}));}unmount(){}}const u3=new WeakMap,fw=new WeakMap,W1e=e=>{const t=u3.get(e.target);t&&t(e);},K1e=e=>{e.forEach(W1e);};function Y1e({root:e,...t}){const n=e||document;fw.has(n)||fw.set(n,{});const r=fw.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(K1e,{root:e,...t})),r[o]}function X1e(e,t,n){const r=Y1e(t);return u3.set(e,n),r.observe(e),()=>{u3.delete(e),r.unobserve(e);}}const Q1e={some:0,all:1};class Z1e extends oc{constructor(){super(...arguments),this.hasEnteredView=false,this.isInView=false;}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Q1e[o]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=true),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),g=d?m:p;g&&g(u);};return X1e(this.node.current,a,c)}mount(){this.startObserver();}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(J1e(t,n))&&this.startObserver();}unmount(){}}function J1e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const eSe={inView:{Feature:Z1e},tap:{Feature:G1e},focus:{Feature:q1e},hover:{Feature:U1e}},tSe={layout:{ProjectionNode:sj,MeasureLayout:Sj}},nSe={...M1e,...eSe,...j1e,...tSe},PT=C1e(nSe,x1e);function rSe(e){return f.useEffect(()=>()=>e(),[])}function oSe(){!$T.current&&IV();const[e]=f.useState(ty.current);return e}function iSe(){const e=oSe(),{reducedMotion:t}=f.useContext(v1);return t==="never"?false:t==="always"?true:e}function IT(e){return typeof e=="object"&&!Array.isArray(e)}function Cj(e,t,n,r){return e==null?[]:typeof e=="string"&&IT(t)?EV(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function aSe(e,t,n){return e*(t+1)}function KD(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function sSe(e,t,n){for(let r=0;rt&&o.at{const O=mSe(T),{delay:_=0,times:L=cV(O),type:H=t.type||"keyframes",repeat:U,repeatType:q,repeatDelay:V=0,...z}=R;let{ease:F=t.ease||"easeOut",duration:G}=R;const Y=typeof _=="function"?_(P,N):_,Q=O.length,D=hT(H)?H:o?.[H||"keyframes"];if(Q<=2&&D){let ee=100;if(Q===2&&gSe(O)){const ae=O[1]-O[0];ee=Math.abs(ae);}const te={...t,...z};G!==void 0&&(te.duration=Fa(G));const ne=aV(te,ee,D);F=ne.ease,G=ne.duration;}G??(G=i);const B=p+Y;L.length===1&&L[0]===0&&(L[1]=1);const K=L.length-O.length;if(K>0&&lV(L,K),O.length===1&&O.unshift(null),U){G=aSe(G,U);const ee=[...O],te=[...L];F=Array.isArray(F)?[...F]:[F];const ne=[...F];for(let ae=0;ae{for(const S in b){const C=b[S];C.sort(uSe);const w=[],$=[],M=[];for(let P=0;Ptypeof e=="number",gSe=e=>e.every(pSe);function vSe(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wT(e)&&!PV(e)?new KV(t):new jV(t);n.mount(e),vp.set(e,n);}function bSe(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Y0e(t);n.mount(e),vp.set(e,n);}function ySe(e,t){return Br(e)||typeof e=="number"||typeof e=="string"&&!IT(t)}function xj(e,t,n,r){const o=[];if(ySe(e,t))o.push(rj(e,IT(t)&&t.default||t,n&&(n.default||n)));else {if(e==null)return o;const i=Cj(e,t,r),a=i.length;for(let c=0;c{r.push(...xj(c,i,a));}),r}function CSe(e){return Array.isArray(e)&&e.some(Array.isArray)}function wj(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,a){let c=[],u;if(CSe(o))c=SSe(o,n!==void 0?{reduceMotion:n,...i}:i,t);else {const{onComplete:m,...p}=a||{};typeof m=="function"&&(u=m),c=xj(o,i,n!==void 0?{reduceMotion:n,...p}:p,t);}const d=new Zbe(c);return u&&d.finished.then(u),t&&(t.animations.push(d),d.finished.then(()=>{tg(t.animations,d);})),d}return r}wj();function xSe(){const e=m1(()=>({current:null,animations:[]})),t=iSe()??void 0,n=f.useMemo(()=>wj({scope:e,reduceMotion:t}),[e,t]);return rSe(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0;}),[e,n]}function Sp({size:e=18,useAnimation:t=false,color:n="currentColor",...r}){return x("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,...r,children:x(PT.path,{fill:"transparent",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 11L11 17L21 7",...t&&{initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.2,ease:"easeInOut"}}})})}const $j=Ige,OT=Dge,DT=Lge,ag=zge,Ci=Fge,d3=Vge,f3=Uge,wSe=Gge,QD=Kge,Ej=Xge,$Se=Zge,Mj=Age,ESe=eve,MSe=nve,RSe=ove,TSe=ave,ay=Nge,df=lve,ASe=uve,NSe=fve,sy=hve,m3=gve,ly=AH,tu=yve,Rj=QR,Hf=xve,PSe=NH,_T=Eve,ISe="data:image/gif;base64,R0lGODlhGAAYAJECAP7+/v///wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTI2NTYzMDc2RTNDMTFFREJENEJEMzUxOTQzQjMxMkQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTI2NTYzMDg2RTNDMTFFREJENEJEMzUxOTQzQjMxMkQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBMjY1NjMwNTZFM0MxMUVEQkQ0QkQzNTE5NDNCMzEyRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBMjY1NjMwNjZFM0MxMUVEQkQ0QkQzNTE5NDNCMzEyRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAkEAAIALAAAAAAYABgAAAI5lI+py+0Po2QhTFXrRdlu031gJgqhpI0pdJ4sacJv6j6trABeTOMcfFslgp7ar4fcDVcyX+kJjToKACH5BAkEAAIALAAAAAAYABgAAAI2lI+py+0Po5xUhFDRvdls3H0T522SaJkRikKs6qptAr+kYoOzJvc37dPBgKQco3YbdpbM5qQAACH5BAkEAAIALAAAAAAYABgAAAI3lI+py+0Po5y02hhykHqLzmkGiImfCZHkkh0qmrztOSuyt8bmzfC0Z9sJa7qZLwhEwS7MpnNSAAAh+QQJBAACACwAAAAAGAAYAAACPJSPqcvtD6OctJoQ7MFYC55dYQSKHcmZo3J+qdsmJRzO7DvbMs7HSN5b/YIqBvCkGyKJixds4/NIp1RHAQAh+QQJBAACACwAAAAAGAAYAAACOpSPqcvtD6OcLwSarMVHXy54YKhJIrmhn3K25eKmJ/vGa1bnKS3rN2IzzHC94q/jE754yNVyBI1KIQUAIfkECQQAAgAsAAAAABgAGAAAAjmUj6nL7Q+jnLSaEOzBePbLSVwmjGJYopCZfmnDxmoif6xSkzeN5ozfIuF6RBfPVhQeN66Z5gmNTgoAIfkECQQAAgAsAAAAABgAGAAAAjmUj6nL7Q+jnLRaETLSMnMfdJ4Bit8YlRgKqerauOibyCen2OGK1/Pf2wB3NOGNyPLteIfk5QmNTgoAIfkECQQAAgAsAAAAABgAGAAAAjeUj6nL7Q+jnCkEWu3FRm/uHdYUCiVUnk+qSewYvd/amrWKyF2t6DbcuwmBGZgv+OHxOMyms1kAACH5BAkEAAIALAAAAAAYABgAAAI5lI+py+0PowtBLkptwlUf7n1YaIBlF5kmpI6puz5t9tLxBLsCgCpzdxPZcjQfEajbFHVJkvMJtRQAACH5BAkEAAIALAAAAAAYABgAAAI1lI+py+0Po5wpBFrtxUZv7nGdJgqheJ5QSkasJb2bmsFmSyPyaCv73avNcC1fr1gsKZdMSAEAIfkECQQAAgAsAAAAABgAGAAAAjWUj6nL7Q+jnLRaEfI1Wd8ebKDYkR4WHqcyol7Llm4KJ+0tx69cI/i+8vGGQdUpl9sol0xIAQAh+QQJBAACACwAAAAAGAAYAAACNJSPqcvtD6OctNq7QsBCa+xtV9h8DJl5p5qaCtqJsZugNvuyN43sIlzTCXkHnJHISSqXiQIAIfkECQQAAgAsAAAAABgAGAAAAjKUj6nL7Q+jnLTai3MMPLDuLeDXkZwZKqNYsqebJqva0u86yy1e6/feQ9SGL43xiEwUAAAh+QQJBAACACwAAAAAGAAYAAACM5SPqcvtD6OctNp7Q8BCa+xtzDd6JamEp5iai2qgcEvCc2K7N5LXLi3qsXCy4pCDTCoXBQAh+QQJBAACACwAAAAAGAAYAAACNJSPqcvtD6OctNoYcrhC7+txIag1mVkuY/exp5qOayLHqVK/M5J/+9Ez/IQvF7DISSqXkAIAIfkEBQQAAgAsAAAAABgAGAAAAjKUj6nL7Q+jnFSEUNG92WzcfZ21jWJYRucJranyutwig2xSey+e5nQPnMGEMeHoiExCCgA7";function LT({active:e=false,...t}){return e?x("img",{...t,src:ISe}):x(Rve,{...t})}const BT=eg(e=>j("svg",{viewBox:"0 0 20 20",fill:"currentColor",...e,children:[x("path",{className:"circle",d:"M10 3.1248000000000005C6.20305 3.1248000000000005 3.1250083333333336 6.202841666666667 3.1250083333333336 9.999833333333335C3.1250083333333336 13.796750000000001 6.20305 16.874833333333335 10 16.874833333333335C11.898291666666667 16.874833333333335 13.615833333333333 16.106291666666667 14.860625 14.861916666666666C15.104708333333335 14.617916666666666 15.500416666666668 14.617958333333334 15.7445 14.862041666666668C15.9885 15.106166666666669 15.988416666666668 15.501916666666666 15.744333333333334 15.745958333333334C14.274750000000001 17.215041666666668 12.243041666666667 18.124833333333335 10 18.124833333333335C5.512691666666667 18.124833333333335 1.8750083333333334 14.487125 1.8750083333333334 9.999833333333335C1.8750083333333334 5.512483333333334 5.512691666666667 1.8748000000000002 10 1.8748000000000002C14.487291666666668 1.8748000000000002 18.125 5.512483333333334 18.125 9.999833333333335C18.125 10.304458333333333 18.108208333333334 10.605458333333333 18.075458333333337 10.901791666666668C18.0375 11.244916666666667 17.728625 11.492291666666667 17.385583333333333 11.454333333333334C17.0425 11.416416666666667 16.795083333333334 11.107541666666668 16.833000000000002 10.764458333333334C16.860750000000003 10.513625000000001 16.875 10.2585 16.875 9.999833333333335C16.875 6.202841666666667 13.796958333333333 3.1248000000000005 10 3.1248000000000005z",fill:"currentColor"}),x("path",{d:"M15.391416666666666 9.141166666666667C15.635458333333334 8.897083333333335 16.031208333333332 8.897083333333335 16.275291666666668 9.141166666666667L17.5 10.365875L18.72475 9.141166666666667C18.968791666666668 8.897083333333335 19.364541666666668 8.897083333333335 19.608625 9.141166666666667C19.852666666666668 9.385291666666667 19.852666666666668 9.780958333333334 19.608625 10.025083333333333L18.08925 11.544416666666669C17.763833333333334 11.869833333333334 17.236208333333334 11.869833333333334 16.91075 11.544416666666669L15.391416666666666 10.025083333333333C15.147333333333334 9.780958333333334 15.147333333333334 9.385291666666667 15.391416666666666 9.141166666666667z",fill:"currentColor"}),x("path",{d:"M12.499333333333334 9.278375C13.05475 9.599 13.05475 10.400666666666668 12.499333333333334 10.721291666666668L9.373916666666666 12.525791666666668C8.818541666666667 12.846416666666666 8.124274999999999 12.445583333333333 8.124274999999999 11.804291666666668L8.124274999999999 8.1954C8.124274999999999 7.554066666666667 8.818541666666667 7.153233333333334 9.373916666666666 7.473900000000001L12.499333333333334 9.278375z",fill:"currentColor"})]})),Tj=gX(),zT=Tj.os.name?.toLowerCase()==="mac os",OSe=Tj.browser.name||"",kT=e=>new RegExp(String.raw`\b${e}\b`,"i").test(OSe),sg=kT("safari");kT("firefox");kT("edge");const DSe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"m19.833 21.26l-1.298-1.298q-.096.019-.173.029q-.077.009-.173.009H5.616q-.691 0-1.153-.462T4 18.384V5.813q0-.096.01-.173t.029-.173l-1.299-1.3l.713-.713l17.092 17.092zM5.616 19h11.957l-5.933-5.933l-1.902 1.902l-.707-.708l1.902-1.902L5 6.427v11.958q0 .23.192.423t.423.192M7.813 5l-1-1h4.419v1zm5.948 5.948l-.708-.707L18.292 5H14V4h6v6h-1V5.708zm6.24 6.24l-1-1V12.77h1z"})]}),_Se=f.forwardRef(DSe),LSe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M16 3h6v6h-2V5h-4zM2 3h6v2H4v4H2zm18 16v-4h2v6h-6v-2zM4 19h4v2H2v-6h2z"})]}),BSe=f.forwardRef(LSe),zSe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("rect",{width:20,height:16,x:2,y:4,rx:2}),x("rect",{width:9,height:7,x:13,y:13,rx:2})]})]}),kSe=f.forwardRef(zSe),FSe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M6 3h8.99v1.5H6zM2.99 6h1.5v1.5h-1.5zm0-3h1.5v1.5h-1.5zm0 6.01H4.5v1.5H2.99z"}),x("path",{fill:"currentColor",d:"M4.5 12h-3V1.49h15V6H18V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v9.48a2 2 0 0 0 2 2h2.5Z"}),x("path",{fill:"currentColor",d:"M22 7.5H8a2 2 0 0 0-2 2V19a2 2 0 0 0 2 2h5.53v1.53H12V24h6v-1.49h-1.5V21H22a2 2 0 0 0 2-2V9.5a2 2 0 0 0-2-2m.51 12h-15V9h15Z"})]}),HSe=f.forwardRef(FSe),ZD="0";function nu(e,t){GM.setClipboard(e),Ft.success(`已复制: ${e}`,t);}var ql=(e=>(e.PlayerScreenMode=`${t5}-player-screen-mode`,e.ForceAutoPlay=`${t5}-force-auto-play`,e))(ql||{}),wl=(e=>(e.Normal="normal",e.Wide="wide",e.WebFullscreen="web",e.Fullscreen="full",e))(wl||{}),FT=(e=>(e.ON="on",e.OFF="off",e))(FT||{}),rr=(e=>(e.Normal="Normal",e.CurrentPage="CurrentPage",e.NormalWebFullscreen="NormalWebFullscreen",e.Popup="Popup",e.Background="Background",e.Iina="Iina",e))(rr||{});const JD=Object.entries(rr).reduce((e,[t,n])=>({...e,[n]:`LinkOpenMode.${t}`}),{}),si={Normal:{icon:x(Ci,{className:"size-16px"}),label:"打开",desc:"默认在新标签页中打开"},CurrentPage:{icon:x(_Se,{className:"size-16px"}),label:"当前页中打开",desc:"不打开新标签页, 使用当前标签页打开, 适用于将网站作为应用安装场景"},NormalWebFullscreen:{icon:x(BSe,{className:"size-15px"}),label:"打开-网页全屏",desc:x(Be,{children:"默认在新标签页中打开, 打开后自动网页全屏"})},Popup:{icon:x(kSe,{className:"size-15px"}),label:"小窗打开",desc:j(Be,{children:["当"," ",x("a",{href:"https://developer.chrome.com/docs/web-platform/document-picture-in-picture",target:"_blank",children:"「文档画中画」API"})," ","可用时, 会使用「文档画中画」的形式: 窗口置顶 + 播放页网页全屏.",x("br",{}),"当该 API 不可用时, 会使用 popup window + 播放页网页全屏 的形式."]})},Background:{icon:x(HSe,{className:"size-15px"}),label:"后台打开"},Iina:{icon:x(ag,{className:"size-15px"}),label:"在 IINA 中打开",enabled:zT,desc:x(Be,{children:x("a",{href:"https://github.com/magicdawn/Bilibili-Gate/blob/main/notes/iina.md",target:"_blank",children:"macOS IINA 设置教程"})})}};function VSe(){return new bi}const Aj=VSe(),h3={card:{name:"18iuzk9",styles:"grid-column:1/-1"},cardWrap:{name:"k9oiqw",styles:"display:flex;column-gap:20px"},cover:{name:"1t7agkb",styles:"width:clamp(250px, 20%, 400px);flex-shrink:0"}},jSe="z-2",USe="z-3",qSe="z-4",GSe="z-5",WSe="z-6";var zr=(e=>(e.NormalGrid="grid",e.List="list",e.TwoColumnGrid="two-column-grid",e.CenterEmptyGrid="center-empty-grid",e))(zr||{}),ru=(e=>(e.Center="center",e.Left="left",e.Right="right",e))(ru||{}),ff=(e=>(e.Left="left",e.Right="right",e))(ff||{}),qo=(e=>(e.AddTimeDesc="add-time-desc",e.AddTimeAsc="add-time-asc",e.Shuffle="shuffle",e))(qo||{});function Nj(e,t="",n=[]){t&&n.push(t);for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const o=e[r],i=t?`${t}.${r}`:r;n.push(i),o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp)&&Nj(o,i,n);}return [...new Set(n)]}function Pj(e,t=""){const n=[];t&&n.push(t);for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const o=e[r],i=t?`${t}.${r}`:r;o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp)&&Object.getPrototypeOf(o)===Object.prototype&&(n.push(i),n.push(...Pj(o,i)));}return [...new Set(n)]}function KSe(e){const t=Nj(e),n=Pj(e);return t.filter(r=>!n.includes(r))}function YSe(e){return [...new Set(e)]}function XSe(e,t){if(!e)throw Error(t)}const Ij=String.raw,Nc=(e,...t)=>new RegExp(Ij(e,...t)),e_=Ij`(\d+(\.\d+)?)?(xs|sm|md|lg|xl)`,vb="(solid|dashed|dotted|double|none|hidden)";function cr(e,t){return XSe(e.endsWith("-"),"prefix must end with `-`"),t.map(n=>e+n)}const QSe=[[[...["block","flex","grid","table"].flatMap(e=>[e,`inline-${e}`]),"inline","flow-root","contents","list-item","hidden",...cr("table-",["row","column","cell","caption","row-group","column-group","header-group","footer-group"])],"display"],[["isolate","isolation-auto"],"isolation"],[["static","fixed","absolute","relative","sticky"],"position"],[["visible","invisible","collapse"],"visibility"],[cr("flex-",["row","row-reverse","col","col-reverse"]),"flex-direction"],[cr("flex-",["wrap","wrap-reverse","nowrap"]),"flex-wrap"],[cr("object-",["contain","cover","fill","none","scale-down"]),"object-fit"],[cr("object-",["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]),"object-position"],[["antialiased","subpixel-antialiased"],"font-smoothing"],[["italic","not-italic","oblique","not-oblique"],"font-style"],[cr("font-",["mono","sans","serif"]),"font-family"],[/^(?:font|fw)-?(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+)$/,"font-weight"],[["normal-nums","ordinal","slashed-zero","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions"],"font-variant-numeric"],[Nc`^(text|text-size|font-size)-(\d+|${e_}$)`,"font-size"],[/^(leading|line-height)-/,"line-height"],[cr("list-",["inside","outside"]),"list-style-position"],[cr("list-",["none","disc","decimal"]),"list-style-type"],[cr("text-",["left","center","right","justify","start","end"]),"text-align"],[["underline","overline","line-through","no-underline"],"text-decoration-line"],[cr("decoration-",["solid","double","dotted","dashed","wavy"]),"text-decoration-style"],[/^decoration-(\d+|(auto|from-font)$)/,"text-decoration-thickness"],[["truncate","text-ellipsis","text-clip"],"text-overflow"],[cr("text-",["wrap","nowrap","balance","pretty"]),"text-wrap"],[cr("bg-",["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]),"background-position"],[/^bg(-no)?-repeat($|-)/,"background-repeat"],[cr("bg-",["auto","cover","contain"]),"background-size"],[["bg-none",/^bg-gradient-to-/],"background-image"],[/^(?:border-|b-)?(?:rounded|rd)(?:-(.+))?$/,"rounded"],[Nc`^b(?:order)?-${vb}$`,"border-style"],[Nc`^b(?:order)?-([tblrxyse])-${vb}$`,(e,t)=>`border-${t?.[1]}-style`],[/^b(?:order)?($|-\d+)/,"border-width"],[/^b(?:order)?-([tblrxyse])($|-\d+)/,(e,t)=>`border-${t?.[1]}-width`],[/^(?:border|b)-(?:color-)?(.+)$/,"border-color"],[/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/,(e,t)=>`border-${t?.[1]}-color`],[/^outline-\d+/,"outline-width"],[["outline",Nc`^outline-${vb}$`],"outline-style"],[Nc`^divide-${vb}$`,"divide-style"],[/^divide-(x|y)($|-\d+)/,(e,t)=>`divide-${t?.[1]}-width`],[["ring",/^ring-\d+/],"ring-width"],[[/^ring-offset-\d+/],"ring-offset-width"],[["shadow",...cr("shadow-",["inner","none"]),Nc`^shadow-${e_}$`],"box-shadow"],[cr("border-",["collapse","separate"]),"border-collapse"],[cr("table-",["auto","fixed"]),"table-layout"],[cr("caption-",["top","bottom"]),"caption-side"],[cr("scroll-",["auto","smooth"]),"scroll-behavior"],[cr("snap-",["start","end","center","align-none"]),"scroll-snap-align"],[cr("snap-",["normal","always"]),"scroll-snap-stop"],[cr("snap-",["none","x","y","both","mandatory","proximity"]),"scroll-snap-type"],[/^stroke-\d+/,"stroke-width"],[["sr-only","not-sr-only"],"Screen-Readers"],[/^(flex-)?grow($|-\d+$)/,"flex-grow"],[/^(flex-)?shrink($|-\d+$)/,"flex-shrink"],[/^(flex-)?basis-(.+)$/,"flex-basis"],[/^flex-(initial|auto|none|\d+)$/,"flex"],[/^col-start-/,"grid-column-start"],[/^col-end-/,"grid-column-end"],[[/^col-/,/^col-span-/],"grid-column"],[/^row-start-/,"grid-row-start"],[/^row-end-/,"grid-row-end"],[[/^row-/,/^row-span-/],"grid-row"],["transition-none","transition-none"],[/^transition-delay-(.+)$/,"transition-delay"],[/^transition-ease(?:-(.+))?$/,"transition-timing-function"],[/^transition(-duration)?-\d+(m?s)?$/,"transition-duration"],[/^transition-(all$|\w+)/,"transition-property"],...["ring-inset","divide-x-reverse","divide-y-reverse"].map(e=>[e,e]),...["resize","blur","drop-shadow","grayscale","invert","sepia","backdrop-blur","backdrop-grayscale","backdrop-invert","backdrop-sepia"].map(e=>[Nc`^${e}($|-)`,e])],p3=new Map,Oj=new Map;for(let[e,t]of QSe){let n=[e].flat(),r=n.filter(i=>typeof i=="string"),o=n.filter(i=>typeof i=="object"&&i instanceof RegExp);r.forEach(i=>{let a=typeof t=="string"?t:t(i);p3.set(i,a);}),o.forEach(i=>{Oj.set(i,t);});}function ZSe(e){if(p3.has(e))return p3.get(e);for(let[t,n]of Oj.entries())if(t.test(e)){let r=t.exec(e);return typeof n=="string"?n:n(e,r)}}function JSe(e){return eCe.map(t=>typeof t=="string"?[t,t]:t).find(([t,n])=>e.startsWith(`${t}-`))}const eCe=["break-after","break-before","break-inside","grid-flow","align","whitespace","mix-blend","bg-blend","ease","origin","cursor","touch","color",["text","color"],["c","color"],["bg","background-color"],["decoration","text-decoration-color"],["from","gradient-color-stops"],["divide","divide-color"],["outline","outline-color"],["ring","ring-color"],["ring-offset","ring-offset-color"],["shadow","box-shadow-color"],["accent","accent-color"],["caret","caret-color"],"fill","stroke"],t_=new Map(Object.entries({flex:["flex-grow","flex-shrink","flex-basis"],"transiton-none":["transition-duration","transition-delay","transition-timing-function","transition-property"],m:["mt","mb","ml","mr","mx","my"],mx:["ml","mr"],my:["mt","mb"],p:["pt","pb","pl","pr","px","py"],px:["pl","pr"],py:["pt","pb"]}));function tCe(e){return (e||"").split(" ").map(t=>t.trim()).filter(Boolean)}function Dj(...e){let t=new Map;return tCe(X(...e)).filter(Boolean).forEach(n=>nCe(n,t)),YSe(Array.from(t.values())).join(" ")}function nCe(e,t){let n=e,r;function o(p){[p].flat().forEach(g=>{t_.has(g)&&[t_.get(g)].flat().filter(b=>b!==void 0).forEach(b=>{t.delete(r?r+b:b);}),t.set(r?r+g:g,n);});}function i(){let p=ZSe(e);if(p)return o(p),true}function a(){let p=JSe(e);if(!p)return;let[g,b]=p;return o(b),true}function c(){let p=e,g=/(\[[\w,()/-]+\])$/;g.test(e)&&(p=e.replace(g,function(y,S){return "*".repeat(S.length)})),p=p.replaceAll(/--(?=\d)/g,"-*");let b=p.lastIndexOf("-");if(b!==-1)return o(e.slice(0,b)),true}function u(){return o(e)}function d(){let p=/^(?:(?:[\w-]+|\[\S+\]):)+/.exec(e);p&&(r=p[0].split(new RegExp("(?<=:)(?:\\b|$)")).filter(Boolean).sort().join(""),e=e.slice(r.length));}function m(){if(e.startsWith("!")){e="important:"+e.slice(1);return}if(e.endsWith("!")){e="important:"+e.slice(0,-1);return}}i()||a()||(m(),d(),i()||a()||c()||u());}function ar(...e){let t=f.useMemo(()=>X(...e),[...e]);return f.useMemo(()=>Dj(t),[t])}const uu="inline-block cursor-pointer rounded bg-gate-primary-lv-3 px-6px text-white line-height-tight font-mono";function n_({className:e,...t}){return x("kbd",{...t,className:ar(uu,e)})}const _j=x(QR,{className:"text-gate-primary [.ant-spin_.ant-spin-dot&]:size-25px"}),Lj="flex items-center gap-x-1 [&.ant-btn:not(:disabled):focus-visible]:outline-0";function r_(e){if(/^z-\d+$/.test(e))return Number.parseInt(e.slice(2))}const rCe="z-1001",oCe="z-10004",iCe="z-10005",o_="z-11000",aCe="z-11200",sCe="z-11300",lCe="z-90000",i_={default:X("fixed left-50% top-50% max-w-450px min-w-200px w-[max-content] translate-x--50% translate-y--50% whitespace-pre-wrap rounded-6px bg-gate-primary px-24px py-12px text-14px text-white",lCe),singleLine:"text-center"};function gn(e,t=2e3,n=document.body){const r=document.createElement("div");r.textContent=e;const o=!e.includes(` `)&&!e.includes("r.remove(),t);}function Bj(){return gn(xf)}var mw,a_;function cCe(){if(a_)return mw;a_=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;mw=function(m,p){p=p||{};var g=typeof m;if(g==="string"&&m.length>0)return a(m);if(g==="number"&&isFinite(m))return p.long?u(m):c(m);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(m))};function a(m){if(m=String(m),!(m.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(m);if(p){var g=parseFloat(p[1]),b=(p[2]||"ms").toLowerCase();switch(b){case "years":case "year":case "yrs":case "yr":case "y":return g*i;case "weeks":case "week":case "w":return g*o;case "days":case "day":case "d":return g*r;case "hours":case "hour":case "hrs":case "hr":case "h":return g*n;case "minutes":case "minute":case "mins":case "min":case "m":return g*t;case "seconds":case "second":case "secs":case "sec":case "s":return g*e;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return g;default:return}}}}function c(m){var p=Math.abs(m);return p>=r?Math.round(m/r)+"d":p>=n?Math.round(m/n)+"h":p>=t?Math.round(m/t)+"m":p>=e?Math.round(m/e)+"s":m+"ms"}function u(m){var p=Math.abs(m);return p>=r?d(m,p,r,"day"):p>=n?d(m,p,n,"hour"):p>=t?d(m,p,t,"minute"):p>=e?d(m,p,e,"second"):m+" ms"}function d(m,p,g,b){var y=p>=g*1.5;return Math.round(m/g)+" "+b+(y?"s":"")}return mw}var uCe=cCe();const ao=Ao(uCe);var hw,s_;function dCe(){return s_||(s_=1,hw=function(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),hw}var pw,l_;function fCe(){return l_||(l_=1,pw=function(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}),pw}var gw,c_;function mCe(){if(c_)return gw;c_=1;var e=dCe(),t=fCe();return gw=function(r,o,i){var a=!e(o);return r&&(a||i===false)?t(r,o):o},gw}var hCe=mCe();const pCe=Ao(hCe);var vw,u_;function gCe(){return u_||(u_=1,vw=function(t,n){return function(){return t.apply(n,arguments)}}),vw}var bw,d_;function lg(){if(d_)return bw;d_=1;var e=gCe(),t=Object.prototype.toString,n=(function(D){return function(B){var K=t.call(B);return D[K]||(D[K]=K.slice(8,-1).toLowerCase())}})(Object.create(null));function r(D){return D=D.toLowerCase(),function(K){return n(K)===D}}function o(D){return Array.isArray(D)}function i(D){return typeof D>"u"}function a(D){return D!==null&&!i(D)&&D.constructor!==null&&!i(D.constructor)&&typeof D.constructor.isBuffer=="function"&&D.constructor.isBuffer(D)}var c=r("ArrayBuffer");function u(D){var B;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?B=ArrayBuffer.isView(D):B=D&&D.buffer&&c(D.buffer),B}function d(D){return typeof D=="string"}function m(D){return typeof D=="number"}function p(D){return D!==null&&typeof D=="object"}function g(D){if(n(D)!=="object")return false;var B=Object.getPrototypeOf(D);return B===null||B===Object.prototype}function b(D){return D&&Object.keys(D).length===0&&Object.getPrototypeOf(D)===Object.prototype}var y=r("Date"),S=r("File"),C=r("Blob"),w=r("FileList");function $(D){return t.call(D)==="[object Function]"}function M(D){return p(D)&&$(D.pipe)}function T(D){var B="[object FormData]";return D&&(typeof FormData=="function"&&D instanceof FormData||t.call(D)===B||$(D.toString)&&D.toString()===B)}var R=r("URLSearchParams");function I(D){return D.trim?D.trim():D.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function P(){var D;return typeof navigator<"u"&&((D=navigator.product)==="ReactNative"||D==="NativeScript"||D==="NS")?false:typeof window<"u"&&typeof document<"u"}function N(D,B){if(!(D===null||typeof D>"u"))if(typeof D!="object"&&(D=[D]),o(D))for(var K=0,J=D.length;K0;)ne=ee[te],(!J||J(ne,D,B))&&!ae[ne]&&(B[ne]=D[ne],ae[ne]=true);D=K!==false&&Object.getPrototypeOf(D);}while(D&&(!K||K(D,B))&&D!==Object.prototype);return B}function q(D,B,K){D=String(D),(K===void 0||K>D.length)&&(K=D.length),K-=B.length;var J=D.indexOf(B,K);return J!==-1&&J===K}function V(D){if(!D)return null;if(o(D))return D;var B=D.length;if(!m(B))return null;for(var K=new Array(B);B-- >0;)K[B]=D[B];return K}var z=(function(D){return function(B){return D&&B instanceof D}})(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function F(D,B){for(var K=D&&D[Symbol.iterator],J=K.call(D),ee;(ee=J.next())&&!ee.done;){var te=ee.value;B.call(D,te[0],te[1]);}}function G(D,B){for(var K,J=[];(K=D.exec(B))!==null;)J.push(K);return J}var Y=r("HTMLFormElement"),Q=(function(B){return function(K,J){return B.call(K,J)}})(Object.prototype.hasOwnProperty);return bw={isArray:o,isArrayBuffer:c,isBuffer:a,isFormData:T,isArrayBufferView:u,isString:d,isNumber:m,isObject:p,isPlainObject:g,isEmptyObject:b,isUndefined:i,isDate:y,isFile:S,isBlob:C,isFunction:$,isStream:M,isURLSearchParams:R,isStandardBrowserEnv:P,forEach:N,merge:O,extend:_,trim:I,stripBOM:L,inherits:H,toFlatObject:U,kindOf:n,kindOfTest:r,endsWith:q,toArray:V,isTypedArray:z,isFileList:w,forEachEntry:F,matchAll:G,isHTMLForm:Y,hasOwnProperty:Q},bw}var yw,f_;function zj(){if(f_)return yw;f_=1;var e=lg();function t(o,i,a,c,u){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",i&&(this.code=i),a&&(this.config=a),c&&(this.request=c),u&&(this.response=u);}e.inherits(t,Error,{toJSON:function(){return {message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return ["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(o){r[o]={value:o};}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:true}),t.from=function(o,i,a,c,u,d){var m=Object.create(n);return e.toFlatObject(o,m,function(g){return g!==Error.prototype}),t.call(m,o.message,i,a,c,u),m.cause=o,m.name=o.name,d&&Object.assign(m,d),m},yw=t,yw}var Sw,m_;function vCe(){if(m_)return Sw;m_=1;var e=zj();return Sw=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new e("Request failed with status code "+o.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o));},Sw}var bCe=vCe();const yCe=Ao(bCe);var Cw,h_;function SCe(){return h_||(h_=1,Cw=typeof self=="object"?self.FormData:window.FormData),Cw}var xw,p_;function CCe(){return p_||(p_=1,xw=SCe()),xw}var ww,g_;function xCe(){if(g_)return ww;g_=1;var e=lg(),t=zj(),n=CCe();function r(m){return e.isPlainObject(m)||e.isArray(m)}function o(m){return e.endsWith(m,"[]")?m.slice(0,-2):m}function i(m,p,g){return m?m.concat(p).map(function(y,S){return y=o(y),!g&&S?"["+y+"]":y}).join(g?".":""):p}function a(m){return e.isArray(m)&&!m.some(r)}var c=e.toFlatObject(e,{},null,function(p){return /^is[A-Z]/.test(p)});function u(m){return m&&e.isFunction(m.append)&&m[Symbol.toStringTag]==="FormData"&&m[Symbol.iterator]}function d(m,p,g){if(!e.isObject(m))throw new TypeError("target must be an object");p=p||new(n||FormData),g=e.toFlatObject(g,{metaTokens:true,dots:false,indexes:false},false,function(O,_){return !e.isUndefined(_[O])});var b=g.metaTokens,y=g.visitor||T,S=g.dots,C=g.indexes,w=g.Blob||typeof Blob<"u"&&Blob,$=w&&u(p);if(!e.isFunction(y))throw new TypeError("visitor must be a function");function M(N){if(N===null)return "";if(e.isDate(N))return N.toISOString();if(!$&&e.isBlob(N))throw new t("Blob is not supported. Use a Buffer instead.");return e.isArrayBuffer(N)||e.isTypedArray(N)?$&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function T(N,O,_){var L=N;if(N&&!_&&typeof N=="object"){if(e.endsWith(O,"{}"))O=b?O:O.slice(0,-2),N=JSON.stringify(N);else if(e.isArray(N)&&a(N)||e.isFileList(N)||e.endsWith(O,"[]")&&(L=e.toArray(N)))return O=o(O),L.forEach(function(U,q){!(e.isUndefined(U)||U===null)&&p.append(C===true?i([O],q,S):C===null?O:O+"[]",M(U));}),false}return r(N)?true:(p.append(i(_,O,S),M(N)),false)}var R=[],I=Object.assign(c,{defaultVisitor:T,convertValue:M,isVisitable:r});function P(N,O){if(!e.isUndefined(N)){if(R.indexOf(N)!==-1)throw Error("Circular reference detected in "+O.join("."));R.push(N),e.forEach(N,function(L,H){var U=!(e.isUndefined(L)||L===null)&&y.call(p,L,e.isString(H)?H.trim():H,O,I);U===true&&P(L,O?O.concat(H):[H]);}),R.pop();}}if(!e.isObject(m))throw new TypeError("data must be an object");return P(m),p}return ww=d,ww}var $w,v_;function wCe(){if(v_)return $w;v_=1;var e=xCe();function t(o){var i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'\(\)~]|%20|%00/g,function(c){return i[c]})}function n(o,i){this._pairs=[],o&&e(o,this,i);}var r=n.prototype;return r.append=function(i,a){this._pairs.push([i,a]);},r.toString=function(i){var a=i?function(c){return i.call(this,c,t)}:t;return this._pairs.map(function(u){return a(u[0])+"="+a(u[1])},"").join("&")},$w=n,$w}var Ew,b_;function $Ce(){if(b_)return Ew;b_=1;var e=lg(),t=wCe();function n(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return Ew=function(o,i,a){if(!i)return o;var c=o.indexOf("#");c!==-1&&(o=o.slice(0,c));var u=a&&a.encode||n,d=a&&a.serialize,m;return d?m=d(i,a):m=e.isURLSearchParams(i)?i.toString():new t(i,a).toString(u),m&&(o+=(o.indexOf("?")===-1?"?":"&")+m),o},Ew}var ECe=$Ce();const MCe=Ao(ECe);var Mw,y_;function RCe(){if(y_)return Mw;y_=1;var e=lg(),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Mw=function(r){var o={},i,a,c;return r&&e.forEach(r.split(` `),function(d){if(c=d.indexOf(":"),i=e.trim(d.slice(0,c)).toLowerCase(),a=e.trim(d.slice(c+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([a]):o[i]=o[i]?o[i]+", "+a:a;}}),o},Mw}var TCe=RCe();const ACe=Ao(TCe);var NCe=lg();const S_=Ao(NCe);function PCe(e){return new Promise((t,n)=>{let r=e.data;const o=e.headers??{};if(S_.isFormData(r)&&delete o["Content-Type"],e.auth){const m=e.auth.username||"",p=e.auth.password||"";o.Authorization="Basic "+Buffer.from(m+":"+p).toString("base64");}const i=function(){n(new Q3.AxiosError("Network Error",Q3.AxiosError.ERR_NETWORK,e));},a=function(){n(new Q3.AxiosError("timeout of "+e.timeout+"ms exceeded",Q3.AxiosError.ECONNABORTED,e));};S_.forEach(o,function(p,g){typeof r>"u"&&g.toLowerCase()==="content-type"&&delete o[g];}),r===void 0&&(r=null);const c=function(p){const g="responseHeaders"in p?ACe(p.responseHeaders):{},y={data:!e.responseType||e.responseType==="text"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:{responseURL:p.finalUrl,status:p.status,statusText:p.statusText,responseXML:null}};yCe(t,n,y);};e.cancelToken&&e.cancelToken.promise.then(function(p){n(p);});let u;e.responseType&&e.responseType!=="json"&&(u=e.responseType);const d=e.method.toUpperCase();d==="UNLINK"||d==="PURGE"||d==="LINK"?n(new Q3.AxiosError(`${d} is not a supported method by GM.xmlHttpRequest`)):GM.xmlHttpRequest({method:d,url:MCe(pCe(e.baseURL,e.url),e.params,e.paramsSerializer),headers:Object.fromEntries(Object.entries(o).map(([m,p])=>[m,p.toString()])),responseType:u,data:r,timeout:e.timeout,ontimeout:a,onload:c,onerror:i});})}const Rw=()=>qn().format("YYYY-MM-DD");function kj(e){async function t(){const n=Rw();(await GM.listValues()).filter(o=>o.startsWith(`${e}:`)&&o!==`${e}:${n}`).forEach(o=>GM.deleteValue(o));}return t(),{async set(n){t(),await GM.setValue(`${e}:${Rw()}`,n);},get(){return t(),GM.getValue(`${e}:${Rw()}`)}}}const ICe=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!OCe(o,i)&&r||Object.defineProperty(e,n,i);},OCe=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},DCe=(e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n);},_Ce=(e,t)=>`/* Wrapped ${e}*/ ${t}`,LCe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),BCe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),zCe=(e,t,n)=>{const r=n===""?"":`with ${n.trim()}() `,o=_Ce.bind(null,r,t.toString());Object.defineProperty(o,"name",BCe);const{writable:i,enumerable:a,configurable:c}=LCe;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:a,configurable:c});};function kCe(e,t,{ignoreNonConfigurable:n=false}={}){const{name:r}=e;for(const o of Reflect.ownKeys(t))ICe(e,t,o,n);return DCe(e,t),zCe(e,t,r),e}const FCe=new WeakMap;function HT(e,t){const n=([c])=>c,{cacheKey:r=n,cache:o=new Map}=t??{},i=new Map,a=function(...c){const u=r(c);if(i.has(u))return i.get(u);const d=(async()=>{try{if(o&&await o.has(u))return await o.get(u);const p=await e.apply(this,c);try{return p}finally{o&&(!t?.shouldCache||await t.shouldCache(p,{key:u,argumentsList:c}))&&await o.set(u,p);}}finally{i.delete(u);}})();return i.set(u,d),d};return kCe(a,e,{ignoreNonConfigurable:true}),FCe.set(a,o),a}function Ls(e,t){return t??=(...n)=>JSON.stringify(n),HT(e,{cache:false,cacheKey(n){return t(...n)}})}async function y1(e){const{img_key:t,sub_key:n}=await HCe(),r=UCe(t+n),o=Math.round(Date.now()/1e3),i={...e,wts:o},a=/[!'()*]/g,c=Object.keys(i).sort().map(d=>`${encodeURIComponent(d)}=${encodeURIComponent(i[d].toString().replaceAll(a,""))}`).join("&"),u=sparkMd5.hash(c+r);return {...i,wts:o,w_rid:u}}const Fj=kj("wbi-keys"),HCe=Ls(async function(){const e=await Fj.get();return e?.val&&e?.ts&&Date.now()-e.ts<=ao("6h")?e.val:VCe()});async function VCe(){const t=(await Q3.get("/x/web-interface/nav",{baseURL:rB})).data,n=t.data.wbi_img.img_url,r=t.data.wbi_img.sub_url,o={img_key:n.slice(n.lastIndexOf("/")+1,n.lastIndexOf(".")),sub_key:r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."))};return await Fj.set({val:o,ts:Date.now()}),o}const jCe=[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52];function UCe(e){return jCe.map(t=>e[t]).join("").slice(0,32)}function Hj(e,t,n){e.appkey=t;const r=new URLSearchParams(e);return r.sort(),sparkMd5.hash(r.toString()+n)}const qCe={platform:"ios",mobi_app:"ipad",device:"pad",build:"37300100",c_locale:"zh-Hans_CN",s_locale:"zh-Hans_CN"};class VT extends Error{constructor(t,n){t||="需要有效的 access_key",super(t,{cause:n}),this.name="NeedValidAccessKeyError";}}const Jt=Q3.create({baseURL:rB,withCredentials:true});Jt.interceptors.request.use(async function(e){return e.params||={},e.url?.includes("/wbi/")&&!(e.params.w_rid||e.params.wts)&&(e.params=await y1(e.params)),e});function Zn(e){return e?.code===0&&(e?.message==="0"||e?.message==="success"||e?.message==="OK")}const cg=Q3.create({adapter:PCe});cg.interceptors.request.use(function(e){if(!e.params?.sign){const{appkey:t,appsec:n}=qh;e.params={appkey:t,access_key:ot.accessKey||"",...UL(e.params,["sign"])},e.params.sign=Hj(e.params,t,n);}return e});cg.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){Go("response data is ArrayBuffer");const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r);}catch{}}return e});function jT(){const e={};return document.cookie.split(";").map(t=>t.trim()).filter(Boolean).forEach(t=>{const[n,r]=t.split("=").map(o=>o.trim()).filter(Boolean);n&&(e[n]=r);}),e}function $u(){const e=jT().bili_jct;if(!e)throw gn("找不到 csrf token, 请检查是否登录"),new Error("找不到 csrf token, 请检查是否登录");return e}function Yo(){return jT().DedeUserID}function S1(){return !!jT().DedeUserID}const g3=rc(()=>({cookie:document.cookie,logined:S1()}));function Vj(){return g3.update(),g3.state.value.logined}function UT(){return g3.use().logined}async function C_(){return (await Jt.get("https://member.bilibili.com/x/web/draft/list")).data.artlist?.drafts||[]}async function Tw(e){const t=new URLSearchParams({title:"",banner_url:"",content:"",summary:"",words:"0",category:"15",tid:"0",reprint:"0",tags:"",image_urls:"",origin_image_urls:"",dynamic_intro:"",media_id:"0",spoiler:"0",original:"0",top_video_bvid:"",aid:"",csrf:$u(),...e}),n=(await Jt.post("/x/article/creative/draft/addupdate",t)).data,r=n?.data?.aid?.toString(),o=Zn(n);return o||gn(n.message||"addupdate error"),{success:o,aid:r}}async function GCe(e){return (await Jt.get("/x/article/creative/draft/view",{params:{aid:e}})).data?.data?.content||""}class WCe{title;constructor(t){this.title=t;}getData=async()=>{const{title:t}=this,r=(await C_()).find(u=>u.title===t);if(!r){const{success:u,aid:d}=await Tw({title:t});return}const o=await GCe(r.id),c=(new DOMParser().parseFromString(o,"text/html").body.textContent||"").trim();if(c)try{return JSON.parse(c)}catch{return}};_aid;setData=async t=>{const{title:n}=this;if(!this._aid){const a=(await C_()).find(c=>c.title===n);if(a)this._aid=a.id.toString();else {const{success:c,aid:u}=await Tw({title:n});if(!c)return false;this._aid=u;}}const r=JSON.stringify(t),{success:o}=await Tw({aid:this._aid,title:n,content:`

${r}

`,words:r.length.toString()});return o}}const KCe=oo.extend("settings"),jj=new WCe(Ro),Uj=["accessKey","accessKeyExpireAt"],YCe=()=>[...Uj,...cy,"backupSettingsToArticleDraft","fav.addSeparator","watchlaterAddSeparator","watchlaterItemsOrder","popularWeeklyUseShuffle","popularGeneralUseAnonymous"],XCe=[...Uj,"backupSettingsToArticleDraft"];let qj=false;function Gj(e){qj=e;}let Aw;const QCe=Kl(jj.setData,ao("5s"));async function ZCe(e){if(!e.backupSettingsToArticleDraft||qj)return;const{pickedSettings:t}=Vf(e,ic,YCe());if(!Aw||!ua(Aw,t))try{await QCe(t),Aw=t,KCe("backup to article draft complete");}catch(r){console.error(r.stack||r);}}const JCe=oo.extend("settings"),ug={accessKey:"",accessKeyExpireAt:0,pureRecommend:true,appRecommend:{addOtherTabContents:false},modalFeedFullScreen:false,grid:{useCustomGrid:true,gridDisplayMode:zr.NormalGrid,twoColumnModeAlign:ru.Center,enableForceColumn:false,forceColumnCount:4,cardMinWidth:320},videoCard:{actions:{openInPipWindow:false,showLargePreview:true},videoPreview:{useMp4:true,useScale:false,useVideoCardAsTrigger:false,usePreferredCdn:true,addTo:{searchPage:true}},imgPreview:{enabled:true,autoPreviewWhenKeyboardSelect:false,autoPreviewWhenHover:true,disableWhenMultiSelecting:true}},autoPreviewUpdateInterval:700,useDelayForHover:false,enableSidebar:true,sidebarAlign:ff.Right,dynamicFeed:{showLive:true,videoOnly:false,followGroup:{enabled:true,forceUseMergeTimelineIds:[]},whenViewAll:{enableHideSomeContents:false,hideIds:[]},advancedFilter:false,__internal:{cacheAllItemsEntry:false,cacheAllItemsUpMids:[],externalFilterInput:false}},watchlaterAddSeparator:true,watchlaterItemsOrder:qo.AddTimeDesc,watchlaterUseNormalVideoUrl:false,fav:{addSeparator:true,excludedFolderIds:[],useCustomFavPicker:{onPlayPage:false}},popularGeneralUseAnonymous:false,popularWeeklyUseShuffle:false,spaceUpload:{showVol:false,useSyncFilterTextFromSearchText:false},filter:{enabled:true,minDuration:{enabled:false,value:60},minPlayCount:{enabled:false,value:1e4},minDanmakuCount:{enabled:false,value:10},exemptForFollowed:{video:true,picture:true},hideGotoTypePicture:false,hideGotoTypeBangumi:false,byAuthor:{enabled:false,keywords:[]},byTitle:{enabled:false,keywords:[]},dfByTitle:{enabled:false,keywords:[]}},style:{general:{popoverBorderColorUseColorPrimary:false},pureRecommend:{useStickyTabbar:true,stickyTabbarShadow:false,useWhiteBackground:true,hideTopChannel:false},videoCard:{useBorder:true,useBorderOnlyOnHover:true,useBoxShadow:false}},theme:"",colorPickerThemeSelectedColor:"",backupSettingsToArticleDraft:false,videoLinkOpenMode:rr.Normal,pipWindow:{defaultLocked:true,autoWebFullscreen:true},hidingTabKeys:[Je.KeepFollowOnly,Je.Live,Je.Liked],customTabKeysOrder:[],multiSelect:{clearWhenExit:true,showIcon:true},__internalEnableCopyBvidInfo:false,__internalAddTabbarCopyBvidButton:false,__internalHotSubUseDropdown:false,__internalRecTabRenderAsSegments:false},ot=Bn(Xd(ug)),ic=KSe(ug),cy=ic.filter(e=>e.includes("__internal")&&typeof Mo(ug,e)=="boolean");JCe("allowedLeafSettingsPaths = %O, internalBooleanPaths = %O",ic,cy);function qt(e){return St(ot,e)}function dg(){return Jr(ot)}const qT="settings";async function Wj(){const e=await GM.getValue(qT);return !e||typeof e!="object"?{}:(GT(e),Vf(e,ic).pickedSettings)}async function exe(){const e=await Wj();qa(e),Wa(ot,()=>{txe();}),GR({storageKey:qT,setPersist(t){Kj=t;},onUpdate(t){qa(t);}});}async function txe(){const e=Xd(Jr(ot));await nxe(e),await ZCe(e);}let Kj=true;async function nxe(e){Kj&&await GM.setValue(qT,e);}function qa(e){const{pickedPaths:t}=Vf(e,ic);for(const n of t){const r=Mo(e,n);Cf(ot,n,r);}}function rxe(){return qa(ug)}function GT(e){if(!e)return;const t=[["dynamicFeed.showLive","dynamicFeedShowLive"],["dynamicFeed.followGroup.enabled","dynamicFeedFollowGroupEnabled"],["dynamicFeed.followGroup.forceUseMergeTimelineIds","dynamicFeedFollowGroupForceUseMergeTimelineIds"],["dynamicFeed.whenViewAll.enableHideSomeContents","dynamicFeedWhenViewAllEnableHideSomeContents"],["dynamicFeed.whenViewAll.hideIds","dynamicFeedWhenViewAllHideIds"],["fav.addSeparator","favAddSeparator"],["fav.excludedFolderIds","favExcludedFolderIds"],["filter.enabled","filterEnabled"],["filter.minPlayCount.enabled","filterMinPlayCountEnabled"],["filter.minPlayCount.value","filterMinPlayCount"],["filter.minDuration.enabled","filterMinDurationEnabled"],["filter.minDuration.value","filterMinDuration"],["filter.exemptForFollowed.video","exemptForFollowedVideo"],["filter.exemptForFollowed.picture","exemptForFollowedPicture"],["filter.hideGotoTypePicture","filterOutGotoTypePicture"],["filter.hideGotoTypeBangumi","filterOutGotoTypeBangumi"],["filter.byAuthor.enabled","filterByAuthorNameEnabled"],["filter.byAuthor.keywords","filterByAuthorNameKeywords"],["filter.byTitle.enabled","filterByTitleEnabled"],["filter.byTitle.keywords","filterByTitleKeywords"],["style.pureRecommend.useStickyTabbar","styleUseStickyTabbarInPureRecommend"],["style.pureRecommend.useWhiteBackground","styleUseWhiteBackground"],["style.pureRecommend.hideTopChannel","styleHideTopChannel"],["style.videoCard.useBorder","styleUseCardBorder"],["style.videoCard.useBorderOnlyOnHover","styleUseCardBorderOnlyOnHover"],["style.videoCard.useBoxShadow","styleUseCardBoxShadow"],["pipWindow.defaultLocked","pipWindowDefaultLocked"],["videoCard.imgPreview.autoPreviewWhenKeyboardSelect","autoPreviewWhenKeyboardSelect"],["videoCard.imgPreview.autoPreviewWhenHover","autoPreviewWhenHover"],["grid.useCustomGrid","style.pureRecommend.useCustomGrid"],["grid.enableForceColumn","grid.enableForceCoumn"],["dynamicFeed.advancedFilter","dynamicFeedAdvancedSearch"],["dynamicFeed.advancedFilter","dynamicFeed.advancedSearch"]];for(const[n,r]of t){const o=i=>!za(i);o(Mo(e,n))||o(Mo(e,r))&&Cf(e,n,Mo(e,r));}}function Vf(e,t,n=[]){const r={},o=t.filter(i=>ic.includes(i)&&!n.includes(i)&&!za(Mo(e,i)));return o.forEach(i=>{const a=Mo(e,i);Cf(r,i,a);}),{pickedPaths:o,pickedSettings:r}}function Yj(e){const t=qt();return Mo(t,e)}async function C1(e){const t=await Wj();return Mo(t,e)||Mo(dg(),e)}function oxe(e,t){Cf(ot,e,t);}async function Rs(e,{add:t,remove:n}){const r=await C1(e),o=new Set(r);for(const i of t??[])o.add(i);for(const i of n??[])o.delete(i);oxe(e,Array.from(o));}await( exe());Is&&ot.accessKey&&ot.accessKeyExpireAt&&Date.now()>=ot.accessKeyExpireAt&&gn("access_key 已过期, 请重新获取 !!!");var Zb={exports:{}},ixe=Zb.exports,x_;function axe(){return x_||(x_=1,(function(e,t){(function(n,r){e.exports=r();})(ixe,(function(){var n,r,o=1e3,i=6e4,a=36e5,c=864e5,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=31536e6,m=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,g={years:d,months:m,days:c,hours:a,minutes:i,seconds:o,milliseconds:1,weeks:6048e5},b=function(I){return I instanceof T},y=function(I,P,N){return new T(I,N,P.$l)},S=function(I){return r.p(I)+"s"},C=function(I){return I<0},w=function(I){return C(I)?Math.ceil(I):Math.floor(I)},$=function(I){return Math.abs(I)},M=function(I,P){return I?C(I)?{negative:true,format:""+$(I)+P}:{negative:false,format:""+I+P}:{negative:false,format:""}},T=(function(){function I(N,O,_){var L=this;if(this.$d={},this.$l=_,N===void 0&&(this.$ms=0,this.parseFromMilliseconds()),O)return y(N*g[S(O)],this);if(typeof N=="number")return this.$ms=N,this.parseFromMilliseconds(),this;if(typeof N=="object")return Object.keys(N).forEach((function(q){L.$d[S(q)]=N[q];})),this.calMilliseconds(),this;if(typeof N=="string"){var H=N.match(p);if(H){var U=H.slice(2).map((function(q){return q!=null?Number(q):0}));return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var P=I.prototype;return P.calMilliseconds=function(){var N=this;this.$ms=Object.keys(this.$d).reduce((function(O,_){return O+(N.$d[_]||0)*g[_]}),0);},P.parseFromMilliseconds=function(){var N=this.$ms;this.$d.years=w(N/d),N%=d,this.$d.months=w(N/m),N%=m,this.$d.days=w(N/c),N%=c,this.$d.hours=w(N/a),N%=a,this.$d.minutes=w(N/i),N%=i,this.$d.seconds=w(N/o),N%=o,this.$d.milliseconds=N;},P.toISOString=function(){var N=M(this.$d.years,"Y"),O=M(this.$d.months,"M"),_=+this.$d.days||0;this.$d.weeks&&(_+=7*this.$d.weeks);var L=M(_,"D"),H=M(this.$d.hours,"H"),U=M(this.$d.minutes,"M"),q=this.$d.seconds||0;this.$d.milliseconds&&(q+=this.$d.milliseconds/1e3,q=Math.round(1e3*q)/1e3);var V=M(q,"S"),z=N.negative||O.negative||L.negative||H.negative||U.negative||V.negative,F=H.format||U.format||V.format?"T":"",G=(z?"-":"")+"P"+N.format+O.format+L.format+F+H.format+U.format+V.format;return G==="P"||G==="-P"?"P0D":G},P.toJSON=function(){return this.toISOString()},P.format=function(N){var O=N||"YYYY-MM-DDTHH:mm:ss",_={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return O.replace(u,(function(L,H){return H||String(_[L])}))},P.as=function(N){return this.$ms/g[S(N)]},P.get=function(N){var O=this.$ms,_=S(N);return _==="milliseconds"?O%=1e3:O=_==="weeks"?w(O/g[_]):this.$d[_],O||0},P.add=function(N,O,_){var L;return L=O?N*g[S(O)]:b(N)?N.$ms:y(N,this).$ms,y(this.$ms+L*(_?-1:1),this)},P.subtract=function(N,O){return this.add(N,O,true)},P.locale=function(N){var O=this.clone();return O.$l=N,O},P.clone=function(){return y(this.$ms,this)},P.humanize=function(N){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!N)},P.valueOf=function(){return this.asMilliseconds()},P.milliseconds=function(){return this.get("milliseconds")},P.asMilliseconds=function(){return this.as("milliseconds")},P.seconds=function(){return this.get("seconds")},P.asSeconds=function(){return this.as("seconds")},P.minutes=function(){return this.get("minutes")},P.asMinutes=function(){return this.as("minutes")},P.hours=function(){return this.get("hours")},P.asHours=function(){return this.as("hours")},P.days=function(){return this.get("days")},P.asDays=function(){return this.as("days")},P.weeks=function(){return this.get("weeks")},P.asWeeks=function(){return this.as("weeks")},P.months=function(){return this.get("months")},P.asMonths=function(){return this.as("months")},P.years=function(){return this.get("years")},P.asYears=function(){return this.as("years")},I})(),R=function(I,P,N){return I.add(P.years()*N,"y").add(P.months()*N,"M").add(P.days()*N,"d").add(P.hours()*N,"h").add(P.minutes()*N,"m").add(P.seconds()*N,"s").add(P.milliseconds()*N,"ms")};return function(I,P,N){n=N,r=N().$utils(),N.duration=function(L,H){var U=N.locale();return y(L,{$l:U},H)},N.isDuration=b;var O=P.prototype.add,_=P.prototype.subtract;P.prototype.add=function(L,H){return b(L)?R(this,L,1):O.bind(this)(L,H)},P.prototype.subtract=function(L,H){return b(L)?R(this,L,-1):_.bind(this)(L,H)};}}));})(Zb)),Zb.exports}var sxe=axe();const lxe=Ao(sxe);function w_(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,true)}function $_(e,t,n){var r=[],o=hM(e,r,n);return r.length<2?n:o+t(r)}var Xj=function(t){var n=gB(t);n.sheet.speedy=function(c){this.isSpeedy=c;},n.compat=true;var r=function(){for(var u=arguments.length,d=new Array(u),m=0;m!za(c)),i=performance.now();let a=e();for(;!o(a)&&performance.now()-i{let u=Array.from(document.querySelectorAll(e));if(i&&(u=u.filter(i)),u.length)return u},{timeout:r,interval:o});if(!c?.length){__("tryAction: timeout for selector = `%s`",e),a&&Go("tryAction timeout, selector = `%s`",e);return}__("tryAction: selector=`%s` count=%s",e,c.length);for(const u of c)await Promise.resolve(t(u));}async function Bh(e,t,n){return x1(e,r=>r.remove(),{selectorPredicate:t,warnOnTimeout:false})}function zs(){const e=document.activeElement?.tagName?.toLowerCase()??"";return !!(["input","textarea"].includes(e)||document.querySelector(".center-search__bar.is-focus"))}function Pxe(e,t){t??=e.getBoundingClientRect();const n=document.documentElement;return {top:t.top+window.scrollY-n.clientTop,left:t.left+window.scrollX-n.clientLeft}}function w1(e){return new Promise(t=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>t(),e):setTimeout(t);})}let Iw="";function KT(e){Iw||(Iw=document.title),document.title=`${e} - ${Iw}`;}function v3(...e){return e.map(t=>t.trim()).filter(Boolean).map(t=>t.startsWith(".")?t:`.${t}`).join(",")}const Cp={Evolved:{getDetectEl:()=>document.body,detect:e=>e.classList.contains("dark"),trigger:'.custom-navbar-item[role="listitem"][data-name="darkMode"]',triggerInner:'.navbar-dark-mode[item="darkMode"]'},Bili:{getDetectEl:()=>document.documentElement,detect:e=>e.classList.contains("bili_dark"),isTrigger:e=>{const t=e.closest(".avatar-panel-popover a.single-link-item");return t?!!Array.from(t.querySelectorAll(".link-title span")).find(n=>["深色","浅色"].includes(n.textContent||"")):false}}},L_=e=>{const t=e.getDetectEl();return t?e.detect(t):false},mf=rc(()=>L_(Cp.Bili)||L_(Cp.Evolved)||document.body.classList.contains("bilibili-helper-dark-mode")||document.documentElement.classList.contains("dark"));function $1(){return mf.use()}const lU=()=>{document.documentElement.classList.toggle(rU,mf.get()),document.documentElement.classList.toggle(oU,!mf.get());};lU();Wa(mf.state,lU);const YT=new MutationObserver(async()=>{await hn(0),mf.updateThrottled();});YT.observe(document.body,{attributes:true,attributeFilter:["class"]});YT.observe(document.documentElement,{attributes:true,attributeFilter:["data-darkreader-scheme"]});Ixe();async function Ixe(){const e=await fg(Cp.Bili.getDetectEl);e&&YT.observe(e,{attributes:true});}document.addEventListener("click",Oxe,{passive:true});async function Oxe(e){const t=e.target;(Cp.Bili.isTrigger(t)||t.closest(Cp.Evolved.trigger))&&(await hn(0),mf.updateThrottled());}const Dxe=oo.extend("components:css-vars");Dxe(":export = %O",Bs);const ac=e=>(e.startsWith("--")||(e=`--${e}`),`var(${e})`),XT=ac(Bs.appVideoCardBorderRadiusId),ya=ac(Bs.appPrimaryColorId),cU=ac(Bs.appBorderColorId);ac(Bs.appTextColorId);const b3=ac(Bs.appBgId),uy=ac(Bs.appBgLv1Id),_xe=ac(Bs.appBgLv2Id);ac(Bs.appBgLv3Id);const jf={name:"rmyi3a",styles:"color:var(--ant-button-default-hover-color);border-color:var(--ant-button-default-hover-border-color);background:var(--ant-button-default-hover-bg)"};function Lxe(){return Q0.useToken().token.colorPrimaryHover}function Uf(){const{popoverBorderColorUseColorPrimary:e}=St(ot.style.general),t=Lxe();return e?t:cU}function Bxe(){const e=Uf();return f.useMemo(()=>({border:`1px solid ${e}`}),[e])}function zxe(){const{colorLink:e,colorLinkActive:t,colorLinkHover:n}=Q0.useToken().token;return f.useMemo(()=>sn("color:",e,";&:visited{color:",e,";}&:hover{color:",n,";}&:active{color:",t,";}",""),[e,t,n])}const uU=`${ro}--use-ant-link-color`;function kxe(){const e=zxe();return sn(":root .",uU,"{",e,";}","")}var dU=function(e){return function(t,n){var r=f.useRef(false);e(function(){return function(){r.current=false;}},[]),e(function(){if(!r.current)r.current=true;else return t()},n);}},y3=function(e,t){return y3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r;}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);},y3(e,t)};function fU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");y3(e,t);function n(){this.constructor=e;}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n);}var ci=function(){return ci=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0;c--)(a=e[c])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function hU(e,t){return function(n,r){t(n,r,e);}}function pU(e,t,n,r,o,i){function a(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var c=r.kind,u=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,m=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,g=false,b=n.length-1;b>=0;b--){var y={};for(var S in r)y[S]=S==="access"?{}:r[S];for(var S in r.access)y.access[S]=r.access[S];y.addInitializer=function(w){if(g)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(w||null));};var C=(0, n[b])(c==="accessor"?{get:m.get,set:m.set}:m[u],y);if(c==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(p=a(C.get))&&(m.get=p),(p=a(C.set))&&(m.set=p),(p=a(C.init))&&o.unshift(p);}else (p=a(C))&&(c==="field"?o.unshift(p):m[u]=p);}d&&Object.defineProperty(d,r.name,m),g=true;}function gU(e,t,n){for(var r=arguments.length>2,o=0;o0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value);}catch(c){a={error:c};}finally{try{o&&!o.done&&(n=r.return)&&n.call(r);}finally{if(a)throw a.error}}return i}function CU(){for(var e=[],t=0;t1||u(b,S);})},y&&(o[b]=y(o[b])));}function u(b,y){try{d(r[b](y));}catch(S){g(i[0][3],S);}}function d(b){b.value instanceof hf?Promise.resolve(b.value.v).then(m,p):g(i[0][2],b);}function m(b){u("next",b);}function p(b){u("throw",b);}function g(b,y){b(y),i.shift(),i.length&&u(i[0][0],i[0][1]);}}function $U(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,i){t[o]=e[o]?function(a){return (n=!n)?{value:hf(e[o](a)),done:false}:i?i(a):a}:i;}}function EU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof du=="function"?du(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(a){return new Promise(function(c,u){a=e[i](a),o(c,u,a.done,a.value);})};}function o(i,a,c,u){Promise.resolve(u).then(function(d){i({value:d,done:c});},a);}}function MU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Fxe=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;},S3=function(e){return S3=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},S3(e)};function RU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=S3(e),r=0;r-1&&(o=setTimeout(function(){Jb.delete(e);},t)),Jb.set(e,ci(ci({},n),{timer:o}));},Gxe=function(e){return Jb.get(e)},e0=new Map,Wxe=function(e){return e0.get(e)},Kxe=function(e,t){e0.set(e,t),t.then(function(n){return e0.delete(e),n}).catch(function(){e0.delete(e);});},zc={},Yxe=function(e,t){zc[e]&&zc[e].forEach(function(n){return n(t)});},Ow=function(e,t){return zc[e]||(zc[e]=[]),zc[e].push(t),function(){var r=zc[e].indexOf(t);zc[e].splice(r,1);}},Xxe=function(e,t){var n=t.cacheKey,r=t.cacheTime,o=r===void 0?300*1e3:r,i=t.staleTime,a=i===void 0?0:i,c=t.setCache,u=t.getCache,d=f.useRef(void 0),m=f.useRef(void 0),p=function(b,y){c?c(y):qxe(b,o,y),Yxe(b,y.data);},g=function(b,y){return y===void 0&&(y=[]),u?u(y):Gxe(b)};return A1(function(){if(n){var b=g(n);b&&Object.hasOwnProperty.call(b,"data")&&(e.state.data=b.data,e.state.params=b.params,(a===-1||Date.now()-b.time<=a)&&(e.state.loading=false)),d.current=Ow(n,function(y){e.setState({data:y});});}},[]),qf(function(){var b;(b=d.current)===null||b===void 0||b.call(d);}),n?{onBefore:function(b){var y=g(n,b);return !y||!Object.hasOwnProperty.call(y,"data")?{}:a===-1||Date.now()-y.time<=a?{loading:false,data:y?.data,error:void 0,returnNow:true}:{data:y?.data,error:void 0}},onRequest:function(b,y){var S=Wxe(n);return S&&S!==m.current?{servicePromise:S}:(S=b.apply(void 0,Rr([],Xn(y),false)),m.current=S,Kxe(n,S),{servicePromise:S})},onSuccess:function(b,y){var S;n&&((S=d.current)===null||S===void 0||S.call(d),p(n,{data:b,params:y,time:Date.now()}),d.current=Ow(n,function(C){e.setState({data:C});}));},onMutate:function(b){var y;n&&((y=d.current)===null||y===void 0||y.call(d),p(n,{data:b,params:e.state.params,time:Date.now()}),d.current=Ow(n,function(S){e.setState({data:S});}));}}:{}},Dw,B_;function ZT(){if(B_)return Dw;B_=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Dw=e,Dw}var _w,z_;function Qxe(){if(z_)return _w;z_=1;var e=typeof Vv=="object"&&Vv&&Vv.Object===Object&&Vv;return _w=e,_w}var Lw,k_;function BU(){if(k_)return Lw;k_=1;var e=Qxe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Lw=n,Lw}var Bw,F_;function Zxe(){if(F_)return Bw;F_=1;var e=BU(),t=function(){return e.Date.now()};return Bw=t,Bw}var zw,H_;function Jxe(){if(H_)return zw;H_=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return zw=t,zw}var kw,V_;function ewe(){if(V_)return kw;V_=1;var e=Jxe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return kw=n,kw}var Fw,j_;function zU(){if(j_)return Fw;j_=1;var e=BU(),t=e.Symbol;return Fw=t,Fw}var Hw,U_;function twe(){if(U_)return Hw;U_=1;var e=zU(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(a){var c=n.call(a,o),u=a[o];try{a[o]=void 0;var d=!0;}catch{}var m=r.call(a);return d&&(c?a[o]=u:delete a[o]),m}return Hw=i,Hw}var Vw,q_;function nwe(){if(q_)return Vw;q_=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Vw=n,Vw}var jw,G_;function rwe(){if(G_)return jw;G_=1;var e=zU(),t=twe(),n=nwe(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(c){return c==null?c===void 0?o:r:i&&i in Object(c)?t(c):n(c)}return jw=a,jw}var Uw,W_;function owe(){if(W_)return Uw;W_=1;function e(t){return t!=null&&typeof t=="object"}return Uw=e,Uw}var qw,K_;function iwe(){if(K_)return qw;K_=1;var e=rwe(),t=owe(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return qw=r,qw}var Gw,Y_;function awe(){if(Y_)return Gw;Y_=1;var e=ewe(),t=ZT(),n=iwe(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt;function u(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m;}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=i.test(d);return p||a.test(d)?c(d.slice(2),p?2:8):o.test(d)?r:+d}return Gw=u,Gw}var Ww,X_;function kU(){if(X_)return Ww;X_=1;var e=ZT(),t=Zxe(),n=awe(),r="Expected a function",o=Math.max,i=Math.min;function a(c,u,d){var m,p,g,b,y,S,C=0,w=false,$=false,M=true;if(typeof c!="function")throw new TypeError(r);u=n(u)||0,e(d)&&(w=!!d.leading,$="maxWait"in d,g=$?o(n(d.maxWait)||0,u):g,M="trailing"in d?!!d.trailing:M);function T(U){var q=m,V=p;return m=p=void 0,C=U,b=c.apply(V,q),b}function R(U){return C=U,y=setTimeout(N,u),w?T(U):b}function I(U){var q=U-S,V=U-C,z=u-q;return $?i(z,g-V):z}function P(U){var q=U-S,V=U-C;return S===void 0||q>=u||q<0||$&&V>=g}function N(){var U=t();if(P(U))return O(U);y=setTimeout(N,I(U));}function O(U){return y=void 0,M&&m?T(U):(m=p=void 0,b)}function _(){y!==void 0&&clearTimeout(y),C=0,m=S=p=y=void 0;}function L(){return y===void 0?b:O(t())}function H(){var U=t(),q=P(U);if(m=arguments,p=this,S=U,q){if(y===void 0)return R(S);if($)return clearTimeout(y),y=setTimeout(N,u),T(S)}return y===void 0&&(y=setTimeout(N,u)),b}return H.cancel=_,H.flush=L,H}return Ww=a,Ww}var swe=kU();const lwe=Ao(swe);var cwe=function(e,t){var n=t.debounceWait,r=t.debounceLeading,o=t.debounceTrailing,i=t.debounceMaxWait,a=f.useRef(void 0),c=f.useMemo(function(){var u={};return r!==void 0&&(u.leading=r),o!==void 0&&(u.trailing=o),i!==void 0&&(u.maxWait=i),u},[r,o,i]);return f.useEffect(function(){if(n){var u=e.runAsync.bind(e);return a.current=lwe(function(d){d();},n,c),e.runAsync=function(){for(var d=[],m=0;mj("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})]}),jwe=f.forwardRef(Vwe),To={modalMask:X("fixed inset-0 flex items-center justify-center bg-black/50",iCe),modal:"max-h-[calc(90vh-50px)] w-500px flex flex-col overflow-hidden b-1px b-transparent rounded-10px b-solid bg-gate-bg px-15px pb-15px text-gate-text dark:b-gate-border",modalHeader:"flex items-center justify-between border-b-0 py-10px",modalTitle:"mb-0 flex items-center text-[1.5rem] line-height-1.5",modalBody:"flex-grow-1 overflow-y-auto pt-0"},qU=`${ro}-modal-visible`,Uwe=sn("body:has(.",qU,"){overflow-y:hidden;}","");function pg({show:e,onHide:t,children:n,clsModalMask:r,clsModal:o,width:i,hideWhenMaskOnClick:a=false,hideWhenEsc:c=false}){const u=f.useRef(null),d=rt(g=>{const b=g.target;if(u.current?.contains(b))return;const y=['.ant-tooltip-container[role="tooltip"]','.ant-popover-container[role="tooltip"]',".ant-select-dropdown"];b.closest(y.join(","))||a&&t();});la("esc",g=>{e&&c&&(g.preventDefault(),g.stopImmediatePropagation(),setTimeout(t));},{exactMatch:true});const m=ar(To.modalMask,r),p=ar(To.modal,o);return e?wo.createPortal(x("div",{className:X(Ca,{[qU]:e}),"data-role":"base-modal",children:x("div",{className:m,onClick:d,children:x("div",{className:p,style:{width:i},ref:u,children:n})})}),document.body):null}const gg=({className:e,...t})=>{const n=ar("ml-10px size-24px cursor-pointer transition-duration-150 transition-ease transition-property-transform hover:rotate-90 hover:scale-105%",e);return x(jwe,{...t,className:n})};let co=(function(e){return e.Lavender="#e6e6fa",e.Thistle="#d8bfd8",e.Plum="#dda0dd",e.Mauve="#e0b0ff",e.Wisteria="#c9a0dc",e.Orchid="#da70d6",e.MediumOrchid="#ba55d3",e.MediumPurple="#9370db",e.Amethyst="#9966cc",e.BlueViolet="#8a2be2",e.Purple="#800080",e.Violet="#8f00ff",e.Magenta="#ff00ff",e.Grape="#6f2da8",e.Indigo="#4b0082",e.Eggplant="#301934",e})({});const qwe=[{name:"Lavender",nameZh:"薰衣草",hex:co.Lavender,desc:"淡紫偏粉"},{name:"Thistle",nameZh:"蓟紫色",hex:co.Thistle,desc:"带灰调"},{name:"Plum",nameZh:"李子紫",hex:co.Plum,desc:"柔和温暖"},{name:"Mauve",nameZh:"淡紫色",hex:co.Mauve,desc:"烟粉色调"},{name:"Wisteria",nameZh:"紫藤色",hex:co.Wisteria,desc:"温柔浅紫"},{name:"Orchid",nameZh:"兰花紫",hex:co.Orchid,desc:"偏红亮紫"},{name:"Medium Orchid",nameZh:"中兰花紫",hex:co.MediumOrchid,desc:"稍深更艳"},{name:"Medium Purple",nameZh:"中紫色",hex:co.MediumPurple,desc:"柔和略蓝"},{name:"Amethyst",nameZh:"紫水晶色",hex:co.Amethyst,desc:"经典冷紫"},{name:"Blue Violet",nameZh:"蓝紫色",hex:co.BlueViolet,desc:"较冷"},{name:"Purple",nameZh:"标准紫色",hex:co.Purple,desc:"饱和且暗"},{name:"Violet",nameZh:"紫罗兰",hex:co.Violet,desc:"更偏蓝光谱"},{name:"Magenta",nameZh:"洋红色",hex:co.Magenta,desc:"红紫交界"},{name:"Grape",nameZh:"葡萄紫",hex:co.Grape,desc:"饱和深紫"},{name:"Indigo",nameZh:"靛青色",hex:co.Indigo,desc:"蓝紫之间"},{name:"Eggplant",nameZh:"茄子紫",hex:co.Eggplant,desc:"极深紫红"}],Gwe=[{id:"green",name:"绿意盎然",isDark:false,isCustom:false,colorPrimary:"rgb(77, 175, 124)",colorTheme:"rgb(77, 175, 124)"},{id:"blue",name:"蓝田生玉",isDark:false,isCustom:false,colorPrimary:"rgb(52, 152, 219)",colorTheme:"rgb(52, 152, 219)"},{id:"blue_plus",name:"蛋雅深蓝",isDark:false,isCustom:false,colorPrimary:"rgb(77, 131, 175)",colorTheme:"rgb(77, 131, 175)"},{id:"orange",name:"橙黄橘绿",isDark:false,isCustom:false,colorPrimary:"rgb(245, 171, 53)",colorTheme:"rgb(245, 171, 53)"},{id:"red",name:"热情似火",isDark:false,isCustom:false,colorPrimary:"rgb(214, 69, 65)",colorTheme:"rgb(214, 69, 65)"},{id:"pink",name:"粉装玉琢",isDark:false,isCustom:false,colorPrimary:"rgb(241, 130, 141)",colorTheme:"rgb(241, 130, 141)"},{id:"purple",name:"重斤球紫",isDark:false,isCustom:false,colorPrimary:"rgb(155, 89, 182)",colorTheme:"rgb(155, 89, 182)"},{id:"grey",name:"灰常美丽",isDark:false,isCustom:false,colorPrimary:"rgb(108, 122, 137)",colorTheme:"rgb(108, 122, 137)"},{id:"ming",name:"青出于黑",isDark:false,isCustom:false,colorPrimary:"rgb(51, 110, 123)",colorTheme:"rgb(51, 110, 123)"},{id:"blue2",name:"清热板蓝",isDark:false,isCustom:false,colorPrimary:"rgb(79, 98, 208)",colorTheme:"rgb(79, 98, 208)"},{id:"black",name:"黑灯瞎火",isDark:true,isCustom:false,colorPrimary:"rgb(150, 150, 150)",colorTheme:"rgb(59,59,59)"},{id:"mid_autumn",name:"月里嫦娥",isDark:false,isCustom:false,colorPrimary:"rgb(74, 55, 82)",colorTheme:"rgb(74, 55, 82)"},{id:"naruto",name:"木叶之村",isDark:false,isCustom:false,colorPrimary:"rgb(87, 144, 167)",colorTheme:"rgb(87, 144, 167)"},{id:"china_ink",name:"近墨者黑",isDark:false,isCustom:false,colorPrimary:"rgba(47, 47, 47, 1)",colorTheme:"rgba(47, 47, 47, 1)"},{id:"happy_new_year",name:"新年快乐",isDark:false,isCustom:false,colorPrimary:"rgb(192, 57, 43)",colorTheme:"rgb(192, 57, 43)"}],dy={id:"default-bili-pink",name:"B站粉",colorPrimary:wf.Pink,tooltip:"B站品牌色"},GU={id:"color-picker",name:"自定义",isCustom:true,colorPrimary:wf.Pink};function Wwe(e,t){return t.split(` `).map(n=>n.trim()).filter(Boolean).map(n=>{const[r,o]=n.split(" ").filter(Boolean);return {id:`${e}:${o}`,name:o,colorPrimary:r}})}const nA="UP长期洗涤",Kwe=Wwe(nA,` #0545b2 理想之蓝 #f4cd00 柠檬黄 #ef2729 石榴红 #f89c00 鹿箭 #233728 黛绿 #f2b9b7 和熙粉 #f3cc91 芝士黄 #6b4c68 葡萄紫 #ff7227 落日橙 #004d62 碧海天 #23909b 洗碧空 #aeb400 芥丝绿 #425a17 箬叶青 #002fa7 克莱因蓝 #003153 普鲁士蓝 #01847f 马尔斯绿 #fbd26a 申布伦黄 #470024 勃艮第红 #492d22 凡戴克棕 `),WU="bilibili-evolved-sync",KU=[{name:"预设",themes:[dy,{id:"bilibili-blue",name:"B站蓝",colorPrimary:wf.Blue,tooltip:"B站品牌色"},{id:"app-custom-高能红",name:"高能红",colorPrimary:"#fd453e"},{id:"app-custom-咸蛋黄",name:"咸蛋黄",colorPrimary:"#ffc034"},{id:"app-custom-早苗绿",name:"早苗绿",colorPrimary:"#85c255"},{id:"app-custom-宝石蓝",name:"宝石蓝",colorPrimary:"#0095ef"},{id:"app-custom-罗兰紫",name:"罗兰紫",colorPrimary:"#a029ac"},{id:WU,name:"B-Evolved",colorPrimary:`var(--theme-color,${MH()})`,tooltip:j(Be,{children:["使用 Bilibili-Evolved 的主题色",x("br",{}),"在 Bilibili-Evolved 设置中修改主题色后可能需要刷新页面同步"]})},GU]},{name:"LX Themes",themes:Gwe,tooltip:j(Be,{children:["提取自"," ",x("a",{target:"_blank",href:"https://github.com/lyswhut/lx-music-desktop/",children:"lx-music-desktop"}),x("br",{}),"Apache License 2.0"]})},{name:nA,themes:Kwe,tooltip:j(Be,{children:["提取自"," ",x("a",{target:"_blank",href:"https://www.bilibili.com/video/BV1g3411u7Lg/",children:"BV1g3411u7Lg"})," ","&"," ",x("a",{target:"_blank",href:"https://www.bilibili.com/video/BV1xu411q7sU/",children:"BV1xu411q7sU"})]})},{name:"紫定能行",themes:qwe.map(e=>({id:`purple-colors-${e.name}`,name:e.nameZh,colorPrimary:e.hex,tooltip:j(Be,{children:[e.name," ",e.nameZh," ",x("br",{}),e.desc]})})),tooltip:j(Be,{children:["提取自"," ",x("a",{target:"_blank",href:"https://magicdawn.github.io/purple-colors/",children:"purple-colors"})," "]})}],Ywe=KU.map(e=>e.themes).flat(),n9={[`${nA}:马尔斯绿`]:j(Be,{children:["马尔斯绿 MARRS GREEN ",x("br",{}),"2017年英国的百年造纸商G.F SMITH和英国城市文化节联合发起了「选出全世界最受欢迎的颜色」的活动, ",x("br",{}),"在为期半年由来自100多个约3万名用户的投票后,由来自苏格兰的联合国教科文组织工作人员 ",x("br",{}),"安妮•马尔斯(ANNIE MARRS)提交的一种蓝绿色当选。 ",x("br",{}),"马尔斯绿也因此由ANNIE MARRS的姓氏和主色调组合而得名。 ",x("br",{}),"马尔斯绿的灵感来源于ANNIE家乡苏格兰的泰勒河畔自然景观的一种蓝绿色调。 ",x("br",{})]})};function YU(){let{theme:e,colorPickerThemeSelectedColor:t}=qt();return e||=dy.id,f.useMemo(()=>{const n=Ywe.find(r=>r.id===e)||dy;return n.id===GU.id&&t?{...n,colorPrimary:t}:n},[e,t])}function XU(){const e=YU(),t=Jp.use();let n=e.colorPrimary;return e.id===WU&&(n=t||MH()),n}function Xwe(e,t){return e||t?"--bg1":"--bg2"}function Qwe(){const e=XU(),t=$1(),n=kxe(),{style:{pureRecommend:{useWhiteBackground:r}}}=qt(),o=f.useMemo(()=>({bgSrc:Xwe(t,r),bgFallback:t?"#17181a":r?"#fff":"#f6f7f8",text:t?"#fff":"#333"}),[t,r]);return x(WT,{styles:[n,Uwe,sn` :root { ${Jj}: ${e}; ${tU}: var(${o.bgSrc}, ${o.bgFallback}); ${eU}: var(--text1, ${o.text}); } `,"",""]})}var Zwe={name:"1ughwg6",styles:".bili-feed4 .bili-header{min-height:64px!important;}"},Jwe={name:"rpxvzv",styles:"#i_cecream,body>#app{.bili-feed4-layout{display:none;}}.desktop-download-tip,.vip-login-tip,.palette-button-adcard{display:none!important;}"};function e$e(){const{grid:{useCustomGrid:e},style:{pureRecommend:{useWhiteBackground:t,hideTopChannel:n}}}=qt(),r=$1(),o=$ge(),i=KR.use(),a=YR.use()??90,c="0 10px";if(Is)return x(WT,{styles:[Jwe,e&&sn("#i_cecream,body>#app,.bili-feed4 .bili-header,.bili-feed4 .bili-header .bili-header__bar{max-width:unset;}.bili-feed4-layout,.bili-feed4 .bili-header .bili-header__channel{max-width:",a,"%;padding:",c,";}",""),e&&typeof o=="number"&&sn(".",Ca,"{--back-top-right:",o,"px;}",""),sn("body{background-color:",b3,"!important;}.large-header,#i_cecream,body>#app,.bili-header.large-header,.bili-header.large-header .bili-header__channel{background-color:",b3,";}",""),!r&&!t&&sn(".bili-header .bili-header__channel .channel-entry-more__link,.bili-header .bili-header__channel .channel-link{background-color:",uy,";}",""),n&&sn(".bili-header__channel,.bili-header__banner{display:none!important;}",!i&&Zwe," .bili-feed4 .bili-header .bili-header__bar{&.slide-down,&:not(.slide-down){animation:headerSlideDown 0.3s linear forwards!important;box-shadow:0 2px 4px ",r?"rgb(255 255 255 / 5%)":"rgb(0 0 0 / 8%)","!important;}}.bili-header__bar:not(.slide-down){background-color:var(--bg1);color:var(--text1);transition:background-color 0.2s linear;animation-name:headerSlideDown;.left-entry{.mini-header__title,.entry-title,.default-entry,.loc-mc-box__text,.download-entry,.loc-entry{color:var(--text1);}}.right-entry .right-entry__outside{.right-entry-text,.right-entry-icon{color:var(--text2);}}}.area-header-wrapper{margin-top:10px;}",""),"",""]})}function t$e(...e){return function(t){return e.reduceRight((n,r)=>r?r(n):n,t)}}function ks({children:e,cssInsertContainer:t,cssInsertContainerEmotionKey:n}){t&&ji(n,"cssInsertContainerEmotionKey is required when cssInsertContainer is provided");const r=f.useMemo(()=>{if(t)return Xj({key:n,container:t}).cache},[t,n]),o=$1(),i=XU();return t$e(!!r&&(c=>x(MZ,{value:r,children:c})),!!t&&(c=>x(mJ,{container:t,children:c})),c=>x(Po,{locale:vxe,button:{autoInsertSpace:false},getPopupContainer:u=>u?.closest("."+Ca)??document.body,theme:{algorithm:o?Q0.darkAlgorithm:Q0.defaultAlgorithm,token:{colorPrimary:i,colorBgSpotlight:i,zIndexPopupBase:r_(o_),fontFamily:nU},components:{Notification:{zIndexPopup:r_(o_)},Button:{defaultShadow:"none",primaryShadow:"none"},Dropdown:{}}},children:c}))(e)}function P1({antd:e,baseGlobalStyle:t,homePageGlobalStyle:n}){return j(Be,{children:[e&&x(Mge,{}),t&&x(Qwe,{}),n&&x(e$e,{})]})}function n$e(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r));},t)}const I1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function rA(e){return "nodeType"in e}function Xo(e){var t,n;return e?Wf(e)?e:rA(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function oA(e){const{Document:t}=Xo(e);return e instanceof t}function vg(e){return Wf(e)?false:e instanceof Xo(e).HTMLElement}function QU(e){return e instanceof Xo(e).SVGElement}function Kf(e){return e?Wf(e)?e.document:rA(e)?oA(e)?e:vg(e)||QU(e)?e.ownerDocument:document:document:document}const Ga=I1?f.useLayoutEffect:f.useEffect;function iA(e){const t=f.useRef(e);return Ga(()=>{t.current=e;}),f.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o);},[]),n=f.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null);},[]);return [t,n]}function xp(e,t){t===void 0&&(t=[e]);const n=f.useRef(e);return Ga(()=>{n.current!==e&&(n.current=e);},t),n}function bg(e,t){const n=f.useRef();return f.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fy(e){const t=iA(e),n=f.useRef(null),r=f.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o;},[]);return [n,r]}function w3(e){const t=f.useRef();return f.useEffect(()=>{t.current=e;},[e]),t.current}let Xw={};function yg(e,t){return f.useMemo(()=>{if(t)return t;const n=Xw[e]==null?0:Xw[e]+1;return Xw[e]=n,e+"-"+n},[e,t])}function ZU(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const c=Object.entries(a);for(const[u,d]of c){const m=i[u];m!=null&&(i[u]=m+e*d);}return i},{...t})}}const qd=ZU(1),my=ZU(-1);function o$e(e){return "clientX"in e&&"clientY"in e}function aA(e){if(!e)return false;const{KeyboardEvent:t}=Xo(e.target);return t&&e instanceof t}function i$e(e){if(!e)return false;const{TouchEvent:t}=Xo(e.target);return t&&e instanceof t}function $3(e){if(i$e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return {x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return {x:t,y:n}}}return o$e(e)?{x:e.clientX,y:e.clientY}:null}const pf=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return "translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return "scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return [pf.Translate.toString(e),pf.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),r9="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function a$e(e){return e.matches(r9)?e:e.querySelector(r9)}const s$e={display:"none"};function l$e(e){let{id:t,value:n}=e;return W.createElement("div",{id:t,style:s$e},n)}function c$e(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return W.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":true},n)}function u$e(){const[e,t]=f.useState("");return {announce:f.useCallback(r=>{r!=null&&t(r);},[]),announcement:e}}const JU=f.createContext(null);function eq(e){const t=f.useContext(JU);f.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t]);}function d$e(){const[e]=f.useState(()=>new Set),t=f.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return [f.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var c;return (c=a[o])==null?void 0:c.call(a,i)});},[e]),t]}const f$e={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. `},m$e={onDragStart(e){let{active:t}=e;return "Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return "Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function h$e(e){let{announcements:t=m$e,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=f$e}=e;const{announce:i,announcement:a}=u$e(),c=yg("DndLiveRegion"),[u,d]=f.useState(false);if(f.useEffect(()=>{d(true);},[]),eq(f.useMemo(()=>({onDragStart(p){let{active:g}=p;i(t.onDragStart({active:g}));},onDragMove(p){let{active:g,over:b}=p;t.onDragMove&&i(t.onDragMove({active:g,over:b}));},onDragOver(p){let{active:g,over:b}=p;i(t.onDragOver({active:g,over:b}));},onDragEnd(p){let{active:g,over:b}=p;i(t.onDragEnd({active:g,over:b}));},onDragCancel(p){let{active:g,over:b}=p;i(t.onDragCancel({active:g,over:b}));}}),[i,t])),!u)return null;const m=W.createElement(W.Fragment,null,W.createElement(l$e,{id:r,value:o.draggable}),W.createElement(c$e,{id:c,announcement:a}));return n?wo.createPortal(m,n):m}var Mr;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable";})(Mr||(Mr={}));function hy(){}function p$e(e,t){return f.useMemo(()=>({sensor:e,options:{}}),[e,t])}function g$e(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const Sa=Object.freeze({x:0,y:0});function v$e(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function b$e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function y$e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function S$e(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function o9(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const C$e=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=o9(t,t.left,t.top),i=[];for(const a of r){const{id:c}=a,u=n.get(c);if(u){const d=v$e(o9(u),o);i.push({id:c,data:{droppableContainer:a,value:d}});}}return i.sort(b$e)};function x$e(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,c=i-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const u=x$e(c,t);u>0&&o.push({id:a,data:{droppableContainer:i,value:u}});}}return o.sort(y$e)};function $$e(e,t,n){return {...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tq(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Sa}function E$e(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i({...a,top:a.top+e*c.y,bottom:a.bottom+e*c.y,left:a.left+e*c.x,right:a.right+e*c.x}),{...n})}}const M$e=E$e(1);function R$e(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return {x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return {x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function T$e(e,t,n){const r=R$e(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:c}=r,u=e.left-a-(1-o)*parseFloat(n),d=e.top-c-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),m=o?e.width/o:e.width,p=i?e.height/i:e.height;return {width:m,height:p,top:d,right:u+m,bottom:d+p,left:u}}const A$e={ignoreTransform:false};function Yf(e,t){t===void 0&&(t=A$e);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:m}=Xo(e).getComputedStyle(e);d&&(n=T$e(n,d,m));}const{top:r,left:o,width:i,height:a,bottom:c,right:u}=n;return {top:r,left:o,width:i,height:a,bottom:c,right:u}}function i9(e){return Yf(e,{ignoreTransform:true})}function N$e(e){const t=e.innerWidth,n=e.innerHeight;return {top:0,left:0,right:t,bottom:n,width:t,height:n}}function P$e(e,t){return t===void 0&&(t=Xo(e).getComputedStyle(e)),t.position==="fixed"}function I$e(e,t){t===void 0&&(t=Xo(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return ["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):false})}function sA(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(oA(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!vg(o)||QU(o)||n.includes(o))return n;const i=Xo(e).getComputedStyle(o);return o!==e&&I$e(o,i)&&n.push(o),P$e(o,i)?n:r(o.parentNode)}return e?r(e):n}function nq(e){const[t]=sA(e,1);return t??null}function Qw(e){return !I1||!e?null:Wf(e)?e:rA(e)?oA(e)||e===Kf(e).scrollingElement?window:vg(e)?e:null:null}function rq(e){return Wf(e)?e.scrollX:e.scrollLeft}function oq(e){return Wf(e)?e.scrollY:e.scrollTop}function E3(e){return {x:rq(e),y:oq(e)}}var Lr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward";})(Lr||(Lr={}));function iq(e){return !I1||!e?false:e===document.scrollingElement}function aq(e){const t={x:0,y:0},n=iq(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,c=e.scrollLeft>=r.x;return {isTop:o,isLeft:i,isBottom:a,isRight:c,maxScroll:r,minScroll:t}}const O$e={x:.2,y:.2};function D$e(e,t,n,r,o){let{top:i,left:a,right:c,bottom:u}=n;r===void 0&&(r=10),o===void 0&&(o=O$e);const{isTop:d,isBottom:m,isLeft:p,isRight:g}=aq(e),b={x:0,y:0},y={x:0,y:0},S={height:t.height*o.y,width:t.width*o.x};return !d&&i<=t.top+S.height?(b.y=Lr.Backward,y.y=r*Math.abs((t.top+S.height-i)/S.height)):!m&&u>=t.bottom-S.height&&(b.y=Lr.Forward,y.y=r*Math.abs((t.bottom-S.height-u)/S.height)),!g&&c>=t.right-S.width?(b.x=Lr.Forward,y.x=r*Math.abs((t.right-S.width-c)/S.width)):!p&&a<=t.left+S.width&&(b.x=Lr.Backward,y.x=r*Math.abs((t.left+S.width-a)/S.width)),{direction:b,speed:y}}function _$e(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return {top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return {top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function sq(e){return e.reduce((t,n)=>qd(t,E3(n)),Sa)}function L$e(e){return e.reduce((t,n)=>t+rq(n),0)}function B$e(e){return e.reduce((t,n)=>t+oq(n),0)}function z$e(e,t){if(t===void 0&&(t=Yf),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);nq(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"});}const k$e=[["x",["left","right"],L$e],["y",["top","bottom"],B$e]];class lA{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=sA(n),o=sq(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,c]of k$e)for(const u of a)Object.defineProperty(this,u,{get:()=>{const d=c(r),m=o[i]-d;return this.rect[u]+m},enumerable:true});Object.defineProperty(this,"rect",{enumerable:false});}}class zh{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return (r=this.target)==null?void 0:r.removeEventListener(...n)});},this.target=t;}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r]);}}function F$e(e){const{EventTarget:t}=Xo(e);return e instanceof t?e:Kf(e)}function Zw(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:false}var Bi;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange";})(Bi||(Bi={}));function a9(e){e.preventDefault();}function H$e(e){e.stopPropagation();}var wn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab";})(wn||(wn={}));const lq={start:[wn.Space,wn.Enter],cancel:[wn.Esc],end:[wn.Space,wn.Enter,wn.Tab]},V$e=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case wn.Right:return {...n,x:n.x+25};case wn.Left:return {...n,x:n.x-25};case wn.Down:return {...n,y:n.y+25};case wn.Up:return {...n,y:n.y-25}}};class cq{constructor(t){this.props=void 0,this.autoScrollEnabled=false,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new zh(Kf(n)),this.windowListeners=new zh(Xo(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach();}attach(){this.handleStart(),this.windowListeners.add(Bi.Resize,this.handleCancel),this.windowListeners.add(Bi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Bi.Keydown,this.handleKeyDown));}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&z$e(r),n(Sa);}handleKeyDown(t){if(aA(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=lq,coordinateGetter:a=V$e,scrollBehavior:c="smooth"}=o,{code:u}=t;if(i.end.includes(u)){this.handleEnd(t);return}if(i.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:d}=r.current,m=d?{x:d.left,y:d.top}:Sa;this.referenceCoordinates||(this.referenceCoordinates=m);const p=a(t,{active:n,context:r.current,currentCoordinates:m});if(p){const g=my(p,m),b={x:0,y:0},{scrollableAncestors:y}=r.current;for(const S of y){const C=t.code,{isTop:w,isRight:$,isLeft:M,isBottom:T,maxScroll:R,minScroll:I}=aq(S),P=_$e(S),N={x:Math.min(C===wn.Right?P.right-P.width/2:P.right,Math.max(C===wn.Right?P.left:P.left+P.width/2,p.x)),y:Math.min(C===wn.Down?P.bottom-P.height/2:P.bottom,Math.max(C===wn.Down?P.top:P.top+P.height/2,p.y))},O=C===wn.Right&&!$||C===wn.Left&&!M,_=C===wn.Down&&!T||C===wn.Up&&!w;if(O&&N.x!==p.x){const L=S.scrollLeft+g.x,H=C===wn.Right&&L<=R.x||C===wn.Left&&L>=I.x;if(H&&!g.y){S.scrollTo({left:L,behavior:c});return}H?b.x=S.scrollLeft-L:b.x=C===wn.Right?S.scrollLeft-R.x:S.scrollLeft-I.x,b.x&&S.scrollBy({left:-b.x,behavior:c});break}else if(_&&N.y!==p.y){const L=S.scrollTop+g.y,H=C===wn.Down&&L<=R.y||C===wn.Up&&L>=I.y;if(H&&!g.x){S.scrollTo({top:L,behavior:c});return}H?b.y=S.scrollTop-L:b.y=C===wn.Down?S.scrollTop-R.y:S.scrollTop-I.y,b.y&&S.scrollBy({top:-b.y,behavior:c});break}}this.handleMove(t,qd(my(p,this.referenceCoordinates),b));}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n);}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n();}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n();}detach(){this.listeners.removeAll(),this.windowListeners.removeAll();}}cq.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=lq,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const c=i.activatorNode.current;return c&&e.target!==c?false:(e.preventDefault(),o?.({event:e.nativeEvent}),true)}return false}}];function s9(e){return !!(e&&"distance"in e)}function l9(e){return !!(e&&"delay"in e)}class cA{constructor(t,n,r){var o;r===void 0&&(r=F$e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=true,this.document=void 0,this.activated=false,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;this.props=t,this.events=n,this.document=Kf(a),this.documentListeners=new zh(this.document),this.listeners=new zh(r),this.windowListeners=new zh(Xo(a)),this.initialCoordinates=(o=$3(i))!=null?o:Sa,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach();}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:false}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Bi.Resize,this.handleCancel),this.windowListeners.add(Bi.DragStart,a9),this.windowListeners.add(Bi.VisibilityChange,this.handleCancel),this.windowListeners.add(Bi.ContextMenu,a9),this.documentListeners.add(Bi.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(l9(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(s9(n)){this.handlePending(n);return}}this.handleStart();}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null);}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n);}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=true,this.documentListeners.add(Bi.Click,H$e,{capture:true}),this.removeTextSelection(),this.documentListeners.add(Bi.SelectionChange,this.removeTextSelection),n(t));}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:c}}=i;if(!o)return;const u=(n=$3(t))!=null?n:Sa,d=my(o,u);if(!r&&c){if(s9(c)){if(c.tolerance!=null&&Zw(d,c.tolerance))return this.handleCancel();if(Zw(d,c.distance))return this.handleStart()}if(l9(c)&&Zw(d,c.tolerance))return this.handleCancel();this.handlePending(c,d);return}t.cancelable&&t.preventDefault(),a(u);}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n();}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n();}handleKeydown(t){t.code===wn.Esc&&this.handleCancel();}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges();}}const j$e={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class uA extends cA{constructor(t){const{event:n}=t,r=Kf(n.target);super(t,j$e,r);}}uA.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return !n.isPrimary||n.button!==0?false:(r?.({event:n}),true)}}];const U$e={move:{name:"mousemove"},end:{name:"mouseup"}};var M3;(function(e){e[e.RightClick=2]="RightClick";})(M3||(M3={}));class q$e extends cA{constructor(t){super(t,U$e,Kf(t.event.target));}}q$e.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===M3.RightClick?false:(r?.({event:n}),true)}}];const Jw={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class G$e extends cA{constructor(t){super(t,Jw);}static setup(){return window.addEventListener(Jw.move.name,t,{capture:false,passive:false}),function(){window.removeEventListener(Jw.move.name,t);};function t(){}}}G$e.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?false:(r?.({event:n}),true)}}];var kh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect";})(kh||(kh={}));var py;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder";})(py||(py={}));function W$e(e){let{acceleration:t,activator:n=kh.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:c=py.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:m,delta:p,threshold:g}=e;const b=Y$e({delta:p,disabled:!i}),[y,S]=r$e(),C=f.useRef({x:0,y:0}),w=f.useRef({x:0,y:0}),$=f.useMemo(()=>{switch(n){case kh.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case kh.DraggableRect:return o}},[n,o,u]),M=f.useRef(null),T=f.useCallback(()=>{const I=M.current;if(!I)return;const P=C.current.x*w.current.x,N=C.current.y*w.current.y;I.scrollBy(P,N);},[]),R=f.useMemo(()=>c===py.TreeOrder?[...d].reverse():d,[c,d]);f.useEffect(()=>{if(!i||!d.length||!$){S();return}for(const I of R){if(r?.(I)===false)continue;const P=d.indexOf(I),N=m[P];if(!N)continue;const{direction:O,speed:_}=D$e(I,N,$,t,g);for(const L of ["x","y"])b[L][O[L]]||(_[L]=0,O[L]=0);if(_.x>0||_.y>0){S(),M.current=I,y(T,a),C.current=_,w.current=O;return}}C.current={x:0,y:0},w.current={x:0,y:0},S();},[t,T,r,S,i,a,JSON.stringify($),JSON.stringify(b),y,d,R,m,JSON.stringify(g)]);}const K$e={x:{[Lr.Backward]:false,[Lr.Forward]:false},y:{[Lr.Backward]:false,[Lr.Forward]:false}};function Y$e(e){let{delta:t,disabled:n}=e;const r=w3(t);return bg(o=>{if(n||!r||!o)return K$e;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return {x:{[Lr.Backward]:o.x[Lr.Backward]||i.x===-1,[Lr.Forward]:o.x[Lr.Forward]||i.x===1},y:{[Lr.Backward]:o.y[Lr.Backward]||i.y===-1,[Lr.Forward]:o.y[Lr.Forward]||i.y===1}}},[n,t,r])}function X$e(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return bg(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function Q$e(e,t){return f.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return [...n,...i]},[]),[e,t])}var wp;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging";})(wp||(wp={}));var R3;(function(e){e.Optimized="optimized";})(R3||(R3={}));const c9=new Map;function Z$e(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=f.useState(null),{frequency:c,measure:u,strategy:d}=o,m=f.useRef(e),p=C(),g=xp(p),b=f.useCallback(function(w){w===void 0&&(w=[]),!g.current&&a($=>$===null?w:$.concat(w.filter(M=>!$.includes(M))));},[g]),y=f.useRef(null),S=bg(w=>{if(p&&!n)return c9;if(!w||w===c9||m.current!==e||i!=null){const $=new Map;for(let M of e){if(!M)continue;if(i&&i.length>0&&!i.includes(M.id)&&M.rect.current){$.set(M.id,M.rect.current);continue}const T=M.node.current,R=T?new lA(u(T),T):null;M.rect.current=R,R&&$.set(M.id,R);}return $}return w},[e,i,n,p,u]);return f.useEffect(()=>{m.current=e;},[e]),f.useEffect(()=>{p||b();},[n,p]),f.useEffect(()=>{i&&i.length>0&&a(null);},[JSON.stringify(i)]),f.useEffect(()=>{p||typeof c!="number"||y.current!==null||(y.current=setTimeout(()=>{b(),y.current=null;},c));},[c,p,b,...r]),{droppableRects:S,measureDroppableContainers:b,measuringScheduled:i!=null};function C(){switch(d){case wp.Always:return false;case wp.BeforeDragging:return n;default:return !n}}}function uq(e,t){return bg(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function J$e(e,t){return uq(e,t)}function e2e(e){let{callback:t,disabled:n}=e;const r=iA(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return f.useEffect(()=>()=>o?.disconnect(),[o]),o}function O1(e){let{callback:t,disabled:n}=e;const r=iA(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return f.useEffect(()=>()=>o?.disconnect(),[o]),o}function t2e(e){return new lA(Yf(e),e)}function u9(e,t,n){t===void 0&&(t=t2e);const[r,o]=f.useState(null);function i(){o(u=>{if(!e)return null;if(e.isConnected===false){var d;return (d=u??n)!=null?d:null}const m=t(e);return JSON.stringify(u)===JSON.stringify(m)?u:m});}const a=e2e({callback(u){if(e)for(const d of u){const{type:m,target:p}=d;if(m==="childList"&&p instanceof HTMLElement&&p.contains(e)){i();break}}}}),c=O1({callback:i});return Ga(()=>{i(),e?(c?.observe(e),a?.observe(document.body,{childList:true,subtree:true})):(c?.disconnect(),a?.disconnect());},[e]),r}function n2e(e){const t=uq(e);return tq(e,t)}const d9=[];function r2e(e){const t=f.useRef(e),n=bg(r=>e?r&&r!==d9&&e&&t.current&&e.parentNode===t.current.parentNode?r:sA(e):d9,[e]);return f.useEffect(()=>{t.current=e;},[e]),n}function o2e(e){const[t,n]=f.useState(null),r=f.useRef(e),o=f.useCallback(i=>{const a=Qw(i.target);a&&n(c=>c?(c.set(a,E3(a)),new Map(c)):null);},[]);return f.useEffect(()=>{const i=r.current;if(e!==i){a(i);const c=e.map(u=>{const d=Qw(u);return d?(d.addEventListener("scroll",o,{passive:true}),[d,E3(d)]):null}).filter(u=>u!=null);n(c.length?new Map(c):null),r.current=e;}return ()=>{a(e),a(i);};function a(c){c.forEach(u=>{const d=Qw(u);d?.removeEventListener("scroll",o);});}},[o,e]),f.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>qd(i,a),Sa):sq(e):Sa,[e,t])}function f9(e,t){t===void 0&&(t=[]);const n=f.useRef(null);return f.useEffect(()=>{n.current=null;},t),f.useEffect(()=>{const r=e!==Sa;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null);},[e]),n.current?my(e,n.current):Sa}function i2e(e){f.useEffect(()=>{if(!I1)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return ()=>{for(const n of t)n?.();}},e.map(t=>{let{sensor:n}=t;return n}));}function a2e(e,t){return f.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t);},n},{}),[e,t])}function dq(e){return f.useMemo(()=>e?N$e(e):null,[e])}const m9=[];function s2e(e,t){t===void 0&&(t=Yf);const[n]=e,r=dq(n?Xo(n):null),[o,i]=f.useState(m9);function a(){i(()=>e.length?e.map(u=>iq(u)?r:new lA(t(u),u)):m9);}const c=O1({callback:a});return Ga(()=>{c?.disconnect(),a(),e.forEach(u=>c?.observe(u));},[e]),o}function l2e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vg(t)?t:e}function c2e(e){let{measure:t}=e;const[n,r]=f.useState(null),o=f.useCallback(d=>{for(const{target:m}of d)if(vg(m)){r(p=>{const g=t(m);return p?{...p,width:g.width,height:g.height}:g});break}},[t]),i=O1({callback:o}),a=f.useCallback(d=>{const m=l2e(d);i?.disconnect(),m&&i?.observe(m),r(m?t(m):null);},[t,i]),[c,u]=fy(a);return f.useMemo(()=>({nodeRef:c,rect:n,setRef:u}),[n,c,u])}const u2e=[{sensor:uA,options:{}},{sensor:cq,options:{}}],d2e={current:{}},r0={draggable:{measure:i9},droppable:{measure:i9,strategy:wp.WhileDragging,frequency:R3.Optimized},dragOverlay:{measure:Yf}};class Fh extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return !n})}getNodeFor(t){var n,r;return (n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const f2e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Fh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:hy},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:r0,measureDroppableContainers:hy,windowRect:null,measuringScheduled:false},m2e={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:hy,draggableNodes:new Map,over:null,measureDroppableContainers:hy},D1=f.createContext(m2e),fq=f.createContext(f2e);function h2e(){return {draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Fh}}}function p2e(e,t){switch(t.type){case Mr.DragStart:return {...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Mr.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Mr.DragEnd:case Mr.DragCancel:return {...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Mr.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Fh(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Mr.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Fh(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Mr.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Fh(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function g2e(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=f.useContext(D1),i=w3(r),a=w3(n?.id);return f.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!aA(i)||document.activeElement===i.target)return;const c=o.get(a);if(!c)return;const{activatorNode:u,node:d}=c;if(!u.current&&!d.current)return;requestAnimationFrame(()=>{for(const m of [u.current,d.current]){if(!m)continue;const p=a$e(m);if(p){p.focus();break}}});}},[r,t,o,a,i]),null}function v2e(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function b2e(e){return f.useMemo(()=>({draggable:{...r0.draggable,...e?.draggable},droppable:{...r0.droppable,...e?.droppable},dragOverlay:{...r0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function y2e(e){let{activeNode:t,measure:n,initialRect:r,config:o=true}=e;const i=f.useRef(false),{x:a,y:c}=typeof o=="boolean"?{x:o,y:o}:o;Ga(()=>{if(!a&&!c||!t){i.current=false;return}if(i.current||!r)return;const d=t?.node.current;if(!d||d.isConnected===false)return;const m=n(d),p=tq(m,r);if(a||(p.x=0),c||(p.y=0),i.current=true,Math.abs(p.x)>0||Math.abs(p.y)>0){const g=nq(d);g&&g.scrollBy({top:p.y,left:p.x});}},[t,a,c,r,n]);}const mq=f.createContext({...Sa,scaleX:1,scaleY:1});var Cl;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized";})(Cl||(Cl={}));const hq=f.memo(function(t){var n,r,o,i;let{id:a,accessibility:c,autoScroll:u=true,children:d,sensors:m=u2e,collisionDetection:p=w$e,measuring:g,modifiers:b,...y}=t;const S=f.useReducer(p2e,void 0,h2e),[C,w]=S,[$,M]=d$e(),[T,R]=f.useState(Cl.Uninitialized),I=T===Cl.Initialized,{draggable:{active:P,nodes:N,translate:O},droppable:{containers:_}}=C,L=P!=null?N.get(P):null,H=f.useRef({initial:null,translated:null}),U=f.useMemo(()=>{var gt;return P!=null?{id:P,data:(gt=L?.data)!=null?gt:d2e,rect:H}:null},[P,L]),q=f.useRef(null),[V,z]=f.useState(null),[F,G]=f.useState(null),Y=xp(y,Object.values(y)),Q=yg("DndDescribedBy",a),D=f.useMemo(()=>_.getEnabled(),[_]),B=b2e(g),{droppableRects:K,measureDroppableContainers:J,measuringScheduled:ee}=Z$e(D,{dragging:I,dependencies:[O.x,O.y],config:B.droppable}),te=X$e(N,P),ne=f.useMemo(()=>F?$3(F):null,[F]),ae=Tt(),oe=J$e(te,B.draggable.measure);y2e({activeNode:P!=null?N.get(P):null,config:ae.layoutShiftCompensation,initialRect:oe,measure:B.draggable.measure});const re=u9(te,B.draggable.measure,oe),ce=u9(te?te.parentElement:null),he=f.useRef({activatorEvent:null,active:null,activeNode:te,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:_,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),me=_.getNodeFor((n=he.current.over)==null?void 0:n.id),Re=c2e({measure:B.dragOverlay.measure}),se=(r=Re.nodeRef.current)!=null?r:te,de=I?(o=Re.rect)!=null?o:re:null,Se=!!(Re.nodeRef.current&&Re.rect),be=n2e(Se?null:re),He=dq(se?Xo(se):null),Ue=r2e(I?me??te:null),Pe=s2e(Ue),ue=v2e(b,{transform:{x:O.x-be.x,y:O.y-be.y,scaleX:1,scaleY:1},activatorEvent:F,active:U,activeNodeRect:re,containerNodeRect:ce,draggingNodeRect:de,over:he.current.over,overlayNodeRect:Re.rect,scrollableAncestors:Ue,scrollableAncestorRects:Pe,windowRect:He}),ye=ne?qd(ne,O):null,Te=o2e(Ue),qe=f9(Te),Ze=f9(Te,[re]),We=qd(ue,qe),tt=de?M$e(de,ue):null,nt=U&&tt?p({active:U,collisionRect:tt,droppableRects:K,droppableContainers:D,pointerCoordinates:ye}):null,Ke=S$e(nt,"id"),[Oe,Qe]=f.useState(null),Xe=Se?ue:qd(ue,Ze),_e=$$e(Xe,(i=Oe?.rect)!=null?i:null,re),ze=f.useRef(null),ct=f.useCallback((gt,ft)=>{let{sensor:st,options:Fe}=ft;if(q.current==null)return;const Ge=N.get(q.current);if(!Ge)return;const ve=gt.nativeEvent,Ae=new st({active:q.current,activeNode:Ge,event:ve,options:Fe,context:he,onAbort(pe){if(!N.get(pe))return;const{onDragAbort:$e}=Y.current,Le={id:pe};$e?.(Le),$({type:"onDragAbort",event:Le});},onPending(pe,Ie,$e,Le){if(!N.get(pe))return;const{onDragPending:it}=Y.current,ht={id:pe,constraint:Ie,initialCoordinates:$e,offset:Le};it?.(ht),$({type:"onDragPending",event:ht});},onStart(pe){const Ie=q.current;if(Ie==null)return;const $e=N.get(Ie);if(!$e)return;const{onDragStart:Le}=Y.current,Ye={activatorEvent:ve,active:{id:Ie,data:$e.data,rect:H}};wo.unstable_batchedUpdates(()=>{Le?.(Ye),R(Cl.Initializing),w({type:Mr.DragStart,initialCoordinates:pe,active:Ie}),$({type:"onDragStart",event:Ye}),z(ze.current),G(ve);});},onMove(pe){w({type:Mr.DragMove,coordinates:pe});},onEnd:Ce(Mr.DragEnd),onCancel:Ce(Mr.DragCancel)});ze.current=Ae;function Ce(pe){return async function(){const{active:$e,collisions:Le,over:Ye,scrollAdjustedTranslate:it}=he.current;let ht=null;if($e&&it){const{cancelDrop:$t}=Y.current;ht={activatorEvent:ve,active:$e,collisions:Le,delta:it,over:Ye},pe===Mr.DragEnd&&typeof $t=="function"&&await Promise.resolve($t(ht))&&(pe=Mr.DragCancel);}q.current=null,wo.unstable_batchedUpdates(()=>{w({type:pe}),R(Cl.Uninitialized),Qe(null),z(null),G(null),ze.current=null;const $t=pe===Mr.DragEnd?"onDragEnd":"onDragCancel";if(ht){const Mt=Y.current[$t];Mt?.(ht),$({type:$t,event:ht});}});}}},[N]),Pt=f.useCallback((gt,ft)=>(st,Fe)=>{const Ge=st.nativeEvent,ve=N.get(Fe);if(q.current!==null||!ve||Ge.dndKit||Ge.defaultPrevented)return;const Ae={active:ve};gt(st,ft.options,Ae)===true&&(Ge.dndKit={capturedBy:ft.sensor},q.current=Fe,ct(st,ft));},[N,ct]),ut=Q$e(m,Pt);i2e(m),Ga(()=>{re&&T===Cl.Initializing&&R(Cl.Initialized);},[re,T]),f.useEffect(()=>{const{onDragMove:gt}=Y.current,{active:ft,activatorEvent:st,collisions:Fe,over:Ge}=he.current;if(!ft||!st)return;const ve={active:ft,activatorEvent:st,collisions:Fe,delta:{x:We.x,y:We.y},over:Ge};wo.unstable_batchedUpdates(()=>{gt?.(ve),$({type:"onDragMove",event:ve});});},[We.x,We.y]),f.useEffect(()=>{const{active:gt,activatorEvent:ft,collisions:st,droppableContainers:Fe,scrollAdjustedTranslate:Ge}=he.current;if(!gt||q.current==null||!ft||!Ge)return;const{onDragOver:ve}=Y.current,Ae=Fe.get(Ke),Ce=Ae&&Ae.rect.current?{id:Ae.id,rect:Ae.rect.current,data:Ae.data,disabled:Ae.disabled}:null,pe={active:gt,activatorEvent:ft,collisions:st,delta:{x:Ge.x,y:Ge.y},over:Ce};wo.unstable_batchedUpdates(()=>{Qe(Ce),ve?.(pe),$({type:"onDragOver",event:pe});});},[Ke]),Ga(()=>{he.current={activatorEvent:F,active:U,activeNode:te,collisionRect:tt,collisions:nt,droppableRects:K,draggableNodes:N,draggingNode:se,draggingNodeRect:de,droppableContainers:_,over:Oe,scrollableAncestors:Ue,scrollAdjustedTranslate:We},H.current={initial:de,translated:tt};},[U,te,nt,tt,N,se,de,K,_,Oe,Ue,We]),W$e({...ae,delta:O,draggingRect:tt,pointerCoordinates:ye,scrollableAncestors:Ue,scrollableAncestorRects:Pe});const Dt=f.useMemo(()=>({active:U,activeNode:te,activeNodeRect:re,activatorEvent:F,collisions:nt,containerNodeRect:ce,dragOverlay:Re,draggableNodes:N,droppableContainers:_,droppableRects:K,over:Oe,measureDroppableContainers:J,scrollableAncestors:Ue,scrollableAncestorRects:Pe,measuringConfiguration:B,measuringScheduled:ee,windowRect:He}),[U,te,re,F,nt,ce,Re,N,_,K,Oe,J,Ue,Pe,B,ee,He]),wt=f.useMemo(()=>({activatorEvent:F,activators:ut,active:U,activeNodeRect:re,ariaDescribedById:{draggable:Q},dispatch:w,draggableNodes:N,over:Oe,measureDroppableContainers:J}),[F,ut,U,re,w,Q,N,Oe,J]);return W.createElement(JU.Provider,{value:M},W.createElement(D1.Provider,{value:wt},W.createElement(fq.Provider,{value:Dt},W.createElement(mq.Provider,{value:_e},d)),W.createElement(g2e,{disabled:c?.restoreFocus===false})),W.createElement(h$e,{...c,hiddenTextDescribedById:Q}));function Tt(){const gt=V?.autoScrollEnabled===false,ft=typeof u=="object"?u.enabled===false:u===false,st=I&&!gt&&!ft;return typeof u=="object"?{...u,enabled:st}:{enabled:st}}}),S2e=f.createContext(null),h9="button",C2e="Draggable";function pq(e){let{id:t,data:n,disabled:r=false,attributes:o}=e;const i=yg(C2e),{activators:a,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:m,draggableNodes:p,over:g}=f.useContext(D1),{role:b=h9,roleDescription:y="draggable",tabIndex:S=0}=o??{},C=u?.id===t,w=f.useContext(C?mq:S2e),[$,M]=fy(),[T,R]=fy(),I=a2e(a,t),P=xp(n);Ga(()=>(p.set(t,{id:t,key:i,node:$,activatorNode:T,data:P}),()=>{const O=p.get(t);O&&O.key===i&&p.delete(t);}),[p,t]);const N=f.useMemo(()=>({role:b,tabIndex:S,"aria-disabled":r,"aria-pressed":C&&b===h9?true:void 0,"aria-roledescription":y,"aria-describedby":m.draggable}),[r,b,S,C,y,m.draggable]);return {active:u,activatorEvent:c,activeNodeRect:d,attributes:N,isDragging:C,listeners:r?void 0:I,node:$,over:g,setNodeRef:M,setActivatorNodeRef:R,transform:w}}function x2e(){return f.useContext(fq)}const w2e="Droppable",$2e={timeout:25};function E2e(e){let{data:t,disabled:n=false,id:r,resizeObserverConfig:o}=e;const i=yg(w2e),{active:a,dispatch:c,over:u,measureDroppableContainers:d}=f.useContext(D1),m=f.useRef({disabled:n}),p=f.useRef(false),g=f.useRef(null),b=f.useRef(null),{disabled:y,updateMeasurementsFor:S,timeout:C}={...$2e,...o},w=xp(S??r),$=f.useCallback(()=>{if(!p.current){p.current=true;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{d(Array.isArray(w.current)?w.current:[w.current]),b.current=null;},C);},[C]),M=O1({callback:$,disabled:y||!a}),T=f.useCallback((N,O)=>{M&&(O&&(M.unobserve(O),p.current=false),N&&M.observe(N));},[M]),[R,I]=fy(T),P=xp(t);return f.useEffect(()=>{!M||!R.current||(M.disconnect(),p.current=false,M.observe(R.current));},[R,M]),f.useEffect(()=>(c({type:Mr.RegisterDroppable,element:{id:r,key:i,disabled:n,node:R,rect:g,data:P}}),()=>c({type:Mr.UnregisterDroppable,key:i,id:r})),[r]),f.useEffect(()=>{n!==m.current.disabled&&(c({type:Mr.SetDroppableDisabled,id:r,key:i,disabled:n}),m.current.disabled=n);},[r,i,n,c]),{active:a,rect:g,isOver:u?.id===r,node:R,over:u,setNodeRef:I}}function M2e(e,t){za(e)||(typeof e=="function"?e(t):e.current=t);}function _1(...e){const t=f.useRef(null);return f.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,e.forEach(r=>r&&M2e(r,n));}}),[t,...e])}const Gd=rc(()=>({width:window.innerWidth,height:window.innerHeight}));document.addEventListener("resize",Gd.updateThrottled);document.addEventListener("orientationchange",Gd.updateThrottled);document.addEventListener("scroll",Kl(Gd.update,1e3));function R2e({expanded:e,children:t,...n}){return x("div",{...n,"data-classname":"wrapper",css:sn("transition:grid-template-rows 0.2s ease-out;display:grid;grid-template-rows:",e?1:0,"fr;",""),children:x("div",{"data-classname":"inner",className:"overflow-hidden",children:t})})}function pn(e){return x(ec,{...e,styles:{...e.styles,root:{width:"max-content",maxWidth:"50vw",...e.styles?.root}},children:e.children})}const T2e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M40 20c0 6.808-4.252 12.622-10.244 14.934H18.244C12.252 32.622 8 26.808 8 20c0-8.837 7.163-16 16-16s16 7.163 16 16"}),x("path",{d:"m29.756 34.934l-.68 8.15a1 1 0 0 1-.996.916h-8.16a1 1 0 0 1-.996-.917l-.68-8.15M18 17v6l6-3l6 3v-6"})]})]}),A2e=f.forwardRef(T2e),N2e=A2e,gq="rgb(0 0 0 / 0.85)";function Fr({children:e,tooltipProps:t,IconComponent:n,className:r,useBlackBg:o,...i}){n??=N2e;const a=x(n,{...i,className:ar("ml-4px size-16px cursor-pointer",r)});return !!e&&x(pn,{color:o?gq:void 0,...t,title:e,children:a})}function P2e(e,t){const n=qt(),r=!!Mo(n,e,false),o=f.useCallback(c=>{Cf(ot,e,c),t?.(c);},[]),i=f.useCallback(c=>{o(c.target.checked);},[]),a=f.useCallback(()=>{o(!Mo(ot,e,false));},[]);return {checked:r,onChange:o,checkboxOnChange:i,onToggle:a}}function vq({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:i,checkboxProps:a,switchProps:c,ref:u}){const{checked:d,onChange:m,checkboxOnChange:p}=P2e(e,n),g=y=>r?x(pn,{...o,title:r,children:y}):y;let b;if(typeof t=="function"?b=t(d):b=(t??e)||null,i==="checkbox"){let y=x("span",{style:{userSelect:"none"},children:b});return r&&(y=g(y)),x(Wi,{...a,ref:u,checked:d,onChange:p,styles:{label:{paddingInline:6}},children:y})}if(i==="switch"){let y=x(mH,{...c,checked:d,onChange:m,ref:u});return r&&(y=g(y)),y}}const Nt=function({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,ref:i,...a}){return x(vq,{ref:i,configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:"checkbox",checkboxProps:a})};function gf({configPath:e,extraAction:t,tooltip:n,tooltipProps:r,ref:o,...i}){return x(vq,{ref:o,configPath:e,extraAction:t,tooltip:n,tooltipProps:r,as:"switch",switchProps:i})}async function L1(e="即将刷新网页!"){Ft.info(e),await hn(500),location.reload();}function _r(e,t){return j(Be,{children:[j("div",{className:"flex items-center",children:["✅: ",e]}),j("div",{className:"flex items-center",children:["❎: ",t]})]})}let ah;function I2e(){Sf(()=>{ah&&URL.revokeObjectURL(ah),ah=void 0;});const e=dg(),t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"});return ah=URL.createObjectURL(n),ah}function O2e(){const e=I2e(),t=`${Ro}-settings ${qn().format("YYYY-MM-DD HH:mm:ss")}.json`;if(typeof GM_download<"u")GM_download?.({url:e,name:t});else {const n=document.createElement("a");n.href=e,n.download=t,n.click();}}async function D2e(){const e=await _2e();if(!e)return;const t=await e.text();if(!t)return gn("文件内容为空!");let n;try{n=JSON.parse(t);}catch{return gn("无法解析文件内容!")}GT(n);const{pickedPaths:r,pickedSettings:o}=Vf(n,ic);return r.length?(Gj(true),qa(o),Ft.success("导入成功!"),L1()):gn("没有有效的设置!")}function _2e(){return L2e({accept:".json",multiple:false})}function L2e(e){return new Promise(t=>{const n=document.createElement("input");n.type="file",Object.assign(n,e),n.addEventListener("change",()=>{t(n.files?.[0]||null);}),n.click();})}const Fn={tabPane:"max-h-[max(362px,calc(90vh-50px-56px-15px))] min-h-362px overflow-y-auto pr-12px",settingsGroup:"mb-10px",settingsGroupTitle:"flex items-center text-2em",settingsGroupSubTitle:"flex items-center text-1.25em",settingsLine:"flex flex-row flex-wrap items-center gap-x-10px gap-y-1"};function Zr({children:e,title:t,titleClassName:n,contentClassName:r,resetSettingPaths:o,...i}){const a=!!o?.length;return j("div",{className:Fn.settingsGroup,"data-role":"settings-group",...i,children:[j("div",{"data-role":"settings-group-title",className:ar(Fn.settingsGroupTitle,a&&"justify-between",n),children:[a?x("div",{className:"flex items-center",children:t}):t,o&&x(bq,{paths:o})]}),x("div",{"data-role":"settings-group-content",className:ar("flex flex-col gap-y-1",r),children:e})]})}function B2e(e){const{pickedSettings:t}=Vf(ug,e);qa(t);}function bq({paths:e,className:t}){return x(mp,{title:"确定重置下面的设置项?",onConfirm:()=>B2e(e),children:j(mt,{className:X("gap-x-4px",t),children:[x(AH,{className:"mt--1px size-12px"}),x("span",{children:"重置"})]})})}const z2e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M3.06 13a9 9 0 1 0 .49-4.087"}),x("path",{d:"M3 4.001v5h5M11 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0"})]})]}),p9=f.forwardRef(z2e),k2e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),x("path",{d:"M11.5 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v5m-5 6h7m-3-3l3 3l-3 3"})]})]}),gy=f.forwardRef(k2e),F2e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),x("path",{d:"M5 13V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-5.5M2 19h7m-3-3l3 3l-3 3"})]})]}),vy=f.forwardRef(F2e),H2e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5l1.53.11A2.98 2.98 0 0 1 22 15c0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4c0-2.05 1.53-3.76 3.56-3.97l1.07-.11l.5-.95A5.47 5.47 0 0 1 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.65-4.96A7.49 7.49 0 0 0 12 4"})]}),V2e=f.forwardRef(H2e),j2e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),x("path",{strokeLinecap:"round",d:"m33 21l-9 9l-9-9"})]})]}),U2e=f.forwardRef(j2e);function q2e(){return rxe(),L1()}async function G2e(){const e=await jj.getData();GT(e);const{pickedPaths:t,pickedSettings:n}=Vf(e,ic,XCe);return t.length?(Gj(true),qa(n),L1()):Ft.error("备份不存在或没有有效的配置")}function W2e(){const[e,t]=f.useState(false);return j("div",{className:Fn.tabPane,children:[x(Zr,{title:"设置项",children:j(Es,{size:20,children:[x(mp,{title:"确定",description:"确定恢复默认设置? 此操作不可逆!",onConfirm:q2e,children:j(mt,{danger:true,type:"primary",children:[x(p9,{}),"恢复默认设置"]})}),j(Es,{size:5,children:[x(pn,{title:"导出所有设置项到文件中, 包含 access_key 等数据, 请妥善保存",children:j(mt,{onClick:()=>O2e(),children:[x(gy,{}),"导出设置"]})}),x(pn,{title:"从文件中导入设置项, 将覆盖当前设置, 此操作不可逆!",children:j(mt,{onClick:()=>D2e(),children:[x(vy,{}),"导入设置"]})})]})]})}),x(Zr,{title:j(Be,{children:[x(V2e,{className:"mr-4px size-28px"}),"备份"]}),children:j("div",{className:"flex items-center gap-x-40px",children:[j("span",{className:"flex items-center gap-x-8px",children:[x(Nt,{configPath:"backupSettingsToArticleDraft",label:"备份设置到专栏草稿箱中",tooltip:`专栏 - 草稿箱 - ${Ro}`}),j("a",{className:"inline-flex items-center",href:"https://member.bilibili.com/platform/upload/text/draft",target:"_blank",children:[x(Ci,{className:"mr-4px size-16px"}),"去草稿箱浏览"]})]}),x(mp,{title:"确定",description:"将覆盖本地设置? 此操作不可逆!",onConfirm:G2e,children:j(mt,{danger:true,type:"primary",children:[x(p9,{}),"从专栏草稿箱中恢复"]})})]})}),x(Zr,{title:j(Be,{children:["其他",x(Fr,{children:"这里是一些作者不愿意解释的设置项 😬"}),x(mt,{onClick:()=>t(n=>!n),className:"ml-10px inline-icon-only-round-button",css:e&&jf,children:x(U2e,{className:X("size-16px transition-300 transition-transform",e?"rotate-180":"rotate-0")})})]}),children:x(R2e,{expanded:e,children:j("div",{className:"w-full flex gap-x-20px b-1px b-gate-border rounded-6px b-solid p-10px",children:[x(bq,{paths:cy,className:"flex-none"}),x("div",{className:"flex flex-1 flex-wrap items-start gap-x-20px gap-y-10px",children:cy.map(n=>x(Nt,{configPath:n,tooltip:j(Be,{children:[n,g9[n]&&j(Be,{children:[x("br",{}),g9[n]]})]}),label:UX(n.startsWith("__internal")?n.slice(10):n.replaceAll("__internal.",""))},n))})]})})})]})}const g9={};function yq(e,{l:t,c:n,h:r,alpha:o,deltaL:i,deltaC:a,deltaH:c,deltaAlpha:u}={}){const d=t??(i?`calc(l + ${i})`:"l"),m=n??(a?`calc(c + ${a})`:"c"),p=r??(c?`calc(h + ${c})`:"h"),g=o??(u?`calc(alpha + ${u})`:"alpha");return `oklch(from ${e} ${d} ${m} ${p} / ${g})`}function K2e(e,t){return yq(e,{deltaL:t})}function T3({className:e,...t}){return x(Hl,{variant:"solid",...t,className:ar("my-7px",e),css:sn("border-top-color:",yq(ya,{l:.9}),";","")})}const Sq=e=>{const t=Hj(e,qh.appkey,qh.appsec);return new URLSearchParams({...e,sign:t})};async function Y2e(){const t=(await Jt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/auth_code",Sq({appkey:qh.appkey,local_id:"0",ts:"0"}))).data;if(!Zn(t)){gn(t?.message||"获取 auth_code 失败");return}return t.data}async function X2e(e){const n=(await Jt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/poll",Sq({appkey:qh.appkey,auth_code:e,local_id:"0",ts:"0"}))).data,r={0:"成功","-3":"API校验密匙错误","-400":"请求错误","-404":"啥都木有",86038:"二维码已失效",86039:"二维码尚未确认",86090:"二维码已扫码未确认"};if(!Zn(n)){const a=n.code.toString(),c=n.message||r[a]||"未知错误";return a==="86038"?{success:false,message:c,action:"refresh"}:a==="86039"||a==="86090"?{success:false,message:c,action:"wait"}:{success:false,message:c,action:void 0}}const o=n.data.access_token,i=Date.now()+n.data.expires_in*1e3;return {success:true,message:"获取成功",accessKey:o,accessKeyExpireAt:i}}const dA={show:false,qrcodeUrl:"",auth_code:"",message:""},xl=Bn({...dA});function Hh(e){eEe(),Object.assign(xl,e);}function Q2e(e){Hh({...dA,...e,show:true});}const Cq=new bi;function xq(){Hh({...dA}),Cq.emit("hide");}function Z2e(){return Cq.once("hide")}function J2e(){const{qrcodeUrl:e,show:t,message:n}=St(xl),r=xq;return j(pg,{show:t,onHide:r,hideWhenMaskOnClick:false,hideWhenEsc:false,clsModalMask:"backdrop-blur-10px",clsModal:"aspect-ratio-10/16",width:260,children:[j("div",{className:To.modalHeader,children:[x("div",{className:To.modalTitle}),x(gg,{onClick:r})]}),j("div",{className:X(To.modalBody,"flex flex-col items-center justify-center text-center"),children:[x("div",{className:"mb-2px min-h-25px flex-center text-size-14px",children:n||""}),e&&x(ppe,{className:"mx-auto mb-40px flex-shrink-0 p-8px",value:e,size:200,icon:"https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/72/9c/b6/729cb6d8-75f5-0a56-0508-3a26cbba69ae/AppIcon-1x_U007emarketing-0-6-0-0-85-220-0.png/230x0w.webp"}),j("div",{className:"footnote text-size-13px",children:["打开「哔哩哔哩」或「bilibili」App ",x("br",{}),"扫码获取 access_key"]})]})]})}const eEe=Ip(function(){const t=document.createElement("div");t.classList.add("modal-tv-qrcode-auth",Ca),document.body.appendChild(t),Ka.createRoot(t).render(x(ks,{children:x(J2e,{})}));});async function v9(){const e=await Y2e();if(e)return Q2e({qrcodeUrl:e.url,auth_code:e.auth_code}),true}async function tEe(){if(!await v9())return;let t,n=xl.auth_code;function r(){if(!xl.show||!xl.auth_code||n!==xl.auth_code)return true}function o(){return !r()}for(;o();){const i=hn(1500),a=Z2e();if(await Promise.race([i,a]),a.off(),r())return;t=await X2e(xl.auth_code);const{success:c,accessKey:u,accessKeyExpireAt:d,message:m,action:p}=t;if(r())return;if(Hh({message:m}),c)return await hn(1e3),xq(),{accessKey:u,accessKeyExpireAt:d};if(p==="refresh"){if(await hn(2e3),r())return;await v9(),n=xl.auth_code,Hh({message:"已刷新二维码"});continue}if(p!=="wait"){Hh({message:m}),gn(m);return}}}async function nEe(){const{accessKey:e,accessKeyExpireAt:t}=await tEe()||{};!e||!t||(ot.accessKey=e,ot.accessKeyExpireAt=t,gn("获取成功"));}function rEe(){ot.accessKey="",ot.accessKeyExpireAt=0,gn("已删除 access_key");}const b9=x(mt,{target:"_blank",href:"https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E",children:"access_key 说明"});function fA({style:e,className:t}){const{runAsync:n,loading:r}=Va(nEe,{manual:true}),{accessKey:o}=qt();return x(Es,{size:"small",style:e,className:t,children:o?j(Be,{children:[x(mt,{onClick:n,loading:r,children:"重新获取 access_key"}),x(mp,{onConfirm:rEe,title:"确定删除 access_key?",children:x(mt,{children:"删除 access_key"})}),b9]}):j(Be,{children:[x(mt,{onClick:n,loading:r,children:"获取 access_key"}),b9]})})}const oEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M2 22V2h2v20zm4-5v-3h10v3zm0-7V7h16v3z"})]}),wq=f.forwardRef(oEe),iEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M11 22v-5H6v-3h5v-4H3V7h8V2h2v5h8v3h-8v4h5v3h-5v5z"})]}),aEe=f.forwardRef(iEe),sEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M20 22V2h2v20zM8 17v-3h10v3zm-6-7V7h16v3z"})]}),$q=f.forwardRef(sEe),Eq="w-720px",lEe=(e,t)=>{switch(e){case ru.Left:return t==="flex"?"justify-left":"ml-0 mr-auto";case ru.Right:return t==="flex"?"justify-right":"ml-auto mr-0";default:return t==="flex"?"justify-center":"mx-auto"}};function cEe({className:e}){const{grid:{gridDisplayMode:t,twoColumnModeAlign:n}}=qt();return j(Cr.Group,{className:e,disabled:t!==zr.TwoColumnGrid,buttonStyle:"solid",size:"small",value:n,onChange:r=>{ot.grid.twoColumnModeAlign=r.target.value;},children:[x(Cr.Button,{value:ru.Left,className:"inline-flex-center",children:x(wq,{className:"size-16px"})}),x(Cr.Button,{value:ru.Center,className:"inline-flex-center",children:x(aEe,{className:"size-16px"})}),x(Cr.Button,{value:ru.Right,className:"inline-flex-center",children:x($q,{className:"size-16px"})})]})}const uEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM4 15a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z"})]}),dEe=f.forwardRef(uEe),fEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5h8m-8 4h5m-5 6h8m-8 4h5M3 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm0 10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"})]}),mEe=f.forwardRef(fEe);function Mq(e){return {usingListMode:e===zr.List,usingTwoColumnMode:e===zr.TwoColumnGrid,usingCenterEmptyMode:e===zr.CenterEmptyGrid}}function Rq(){const{gridDisplayMode:e}=St(ot.grid);return Mq(e)}function mA(e){return e===zr.List}function hEe(){return St(ot.grid).gridDisplayMode===zr.List}function pEe({className:e}){const{gridDisplayMode:t}=St(ot.grid),o=ar("flex items-center gap-x-15px","[&_.ant-radio-wrapper]:inline-flex [&_.ant-radio-wrapper]:items-center","[&_.ant-radio-label]:inline-flex [&_.ant-radio-label]:items-center ![&_.ant-radio-label]:pl-4px",e);return x(Cr.Group,{size:"large",className:o,value:t,onChange:i=>{ot.grid.gridDisplayMode=i.target.value;},options:[{value:zr.NormalGrid,label:x(pn,{title:"这个是默认的网格模式",children:j("span",{className:"inline-flex-center",children:[x(dEe,{className:"mx-4px size-16px cursor-pointer"}),"网格"]})})},{value:zr.List,label:j(Be,{children:[x(mEe,{className:"mx-4px size-16px cursor-pointer"}),"列表"]})},{value:zr.TwoColumnGrid,label:j(Be,{children:["双列模式",x(cEe,{className:"ml-5px"})]})},{value:zr.CenterEmptyGrid,label:x(Be,{children:x(pn,{title:"网格中间不显示卡片",children:"中空模式"})})}]})}const Tq=lB&&["/video/","/list/watchlater","/bangumi/play/"].some(e=>location.pathname.startsWith(e)),gEe=[["/video/",()=>/^\/video\/(?BV\w+)\//.exec(location.pathname)?.groups?.bvid],["/list/watchlater",()=>new URLSearchParams(location.search).get("bvid")||void 0],["/bangumi/play/",()=>{}]];function Aq(){return gEe.find(([t])=>location.pathname.startsWith(t))?.[1]()}function hA(e,t=21){return `https://space.bilibili.com/${Yo()}/favlist?fid=${e}&ftype=create`}function Nq(e,t=21){return `https://space.bilibili.com/${Yo()}/favlist?fid=${e}&ftype=collect&ctype=${t}`}function vEe(e){return `https://www.bilibili.com/list/ml${e}`}function bEe(e){return `https://www.bilibili.com/video/${e}`}function pA(e){return e.toString(2).at(-2)==="0"}function gA(e){return e.toString(2).at(-1)==="1"}async function Pq({avid:e,add_media_ids:t="",del_media_ids:n=""}){const r=new URLSearchParams({rid:e.toString(),type:"2",add_media_ids:t,del_media_ids:n,platform:"web",eab_x:"2",ramval:"0",ga:"1",gaia_source:"web_normal",csrf:$u()}),i=(await Jt.post("/x/v3/fav/resource/deal",r)).data,a=Zn(i);return a||gn(i?.message||"fav deal api fail"),a}const mu={getVideoFavState:CEe,addFav:xEe,removeFavs:yEe,moveFavs:SEe,modifyFav:$Ee};async function yEe(e,t){const n=new URLSearchParams({resources:[t].flat().join(","),media_id:e.toString(),platform:"web",csrf:$u()}),o=(await Jt.post("/x/v3/fav/resource/batch-del",n)).data,i=Zn(o);return i||gn(o.message||_p),i}async function SEe(e,t,n){const r=new URLSearchParams({resources:[e].flat().join(","),src_media_id:t.toString(),tar_media_id:n.toString(),mid:Yo(),platform:"web",csrf:$u()}),i=(await Jt.post("/x/v3/fav/resource/move",r)).data,a=Zn(i);return a||gn(i?.message||"fav deal api fail"),a}async function CEe(e){if(!S1())return;const r=(await Jt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Yo(),type:2,rid:e}})).data.data.list.filter(c=>c.fav_state>0),o=r.map(c=>c.title),i=r.map(c=>hA(c.id)),a=r.map(c=>c.id);return {favFolders:r,favFolderNames:o,favFolderUrls:i,favFolderIds:a}}let e$,A3;async function xEe(e,t){if(!t&&(!e$||!A3)){await xA();const{folders:n}=mn,r=n.find(o=>pA(o.attr))??n[0];if(!r)return gn("没有找到默认收藏夹!");e$=r.id,A3=r.title;}return t||=e$,t?await Pq({avid:e,add_media_ids:t.toString()}):gn("没有找到默认收藏夹!")}async function wEe(){return (await Jt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Yo()}})).data.data.list}async function $Ee(e,t,n){const r=(t??[]).filter(u=>u!==void 0),o=[n].filter(u=>u!==void 0),i=l0(r,o),a=l0(o,r);return await Pq({avid:e,del_media_ids:i.length?i.join(","):void 0,add_media_ids:a.length?a.join(","):void 0})}async function EEe(e){return (await Jt.get("/x/v3/fav/folder/collected/list",{params:{up_mid:Yo(),platform:"web",ps:20,pn:e}})).data.data}async function MEe(){let e=1,t=true,n=[];for(;t;){const r=await EEe(e);n.push(...r.list),t=r.has_more,e++;}return n=n.filter(r=>!(r.title==="该合集已失效"&&r.upper.mid===0)),n=Wl(n,r=>r.id),n}async function REe(e,t){return (await Jt.get("/x/space/fav/season/list",{params:{season_id:e,ps:20,pn:t}})).data.data}var It=(e=>(e.Initial="initial",e.Shuffle="shuffle",e.PubTimeDesc="pub-time-desc",e.PubTimeAsc="pub-time-asc",e.PlayCountDesc="play-count-desc",e.CollectCountDesc="collect-count-desc",e.FavTimeDesc="fav-time-desc",e.FavTimeAsc="fav-time-asc",e))(It||{});function N3(e,t){return t==="initial"?e:t==="shuffle"?pi(e):t==="pub-time-desc"||t==="pub-time-asc"?bs(e,[r=>r.pubtime],[t==="pub-time-desc"?"desc":"asc"]):(t==="fav-time-desc"||t==="fav-time-asc")&&e.every(n=>n.from==="fav-folder")?bs(e,[r=>r.fav_time],[t==="fav-time-desc"?"desc":"asc"]):t==="play-count-desc"?bs(e,[n=>n.cnt_info.play],["desc"]):t==="collect-count-desc"?bs(e,[n=>n.cnt_info.collect],["desc"]):e}const Iq=new bi;class Oq{constructor(t){this.insideModal=t;}recSharedEmitter=new bi;servicesRegistry={};store=Bn({refreshing:false,refreshingTab:void 0,tabbarView:void 0,sidebarView:void 0});get refreshing(){return this.store.refreshing}get refreshingTab(){return this.store.refreshingTab}useStore=()=>St(this.store);setStore=t=>{const n=["tabbarView","sidebarView"];for(const r of n){const o=t[r];typeof o=="object"&&o!==null&&(t[r]=tB(o));}Object.assign(this.store,t);}}const vA=f.createContext(new Oq);function Dq(...e){return A1(()=>new Oq(...e),[])}function Ki(){return f.useContext(vA)}function bo(){const{recSharedEmitter:e}=Ki();return hg(t=>e.emit("refresh",t))}class Fs{qs;constructor(t){this.qs=new B1(t);}get hasMore(){return !!this.qs.bufferQueue.length||this.hasMoreExceptQueue}restore(){this.qs.restore();}async loadMore(t){if(!this.hasMore)return;if(this.qs.bufferQueue.length)return this.qs.sliceFromQueue();const n=await this.fetchMore(t);return n?.length&&this.qs.bufferQueue.push(...n),this.qs.sliceFromQueue()}}class B1{returnQueue=[];bufferQueue=[];get hasCache(){return !!this.returnQueue.length}ps;constructor(t=20){this.ps=t;}sliceCountFromQueue(t){if(this.bufferQueue.length){const n=this.bufferQueue.slice(0,t);return this.bufferQueue=this.bufferQueue.slice(t),this.doReturnItems(n)??[]}else return []}sliceFromQueue(t=1){return this.sliceCountFromQueue(this.ps*t)}doReturnItems(t){return this.returnQueue=[...this.returnQueue,...t??[]],t}restore(){this.bufferQueue=[...this.returnQueue,...this.bufferQueue],this.returnQueue=[];}get fetchedCount(){return this.returnQueue.length+this.bufferQueue.length}}function Eu(){const e=f.useRef(null),t=f.useCallback(()=>e.current?.closest(`.${sB}`)?.parentElement||document.body,[]);return {ref:e,getPopupContainer:t}}const bA=function({value:e,onChange:t,disabled:n,list:r,listDisplayConfig:o,dropdownProps:i,extraHelpInfo:a,$ref:c}){const{icon:u,label:d}=o[e],m=rt(S=>{const C=r.filter(T=>T!=="divider"),w=C.indexOf(e);if(w===-1)return;const $=(w+(S.shiftKey?-1:1)+C.length)%C.length,M=C[$];t(M);}),p=f.useMemo(()=>di(r.map(S=>{if(S==="divider")return {type:"divider"};const{icon:C,label:w}=o[S];return {key:S,icon:C,label:w,onClick:()=>t(S)}})),[r,o,t]),[g,b]=f.useState(false),y=Bxe();return j("span",{className:"inline-flex items-center",ref:c,children:[x(nc,{open:g,onOpenChange:b,disabled:n,menu:{items:p,selectedKeys:[e.toString()],styles:{root:y}},placement:"bottomRight",classNames:{root:"text-13px",item:"justify-start",itemContent:"flex-shrink-0"},...i,children:j(mt,{className:X(Lj,"px-3"),css:[g&&jf,"",""],disabled:n,onClick:m,children:[u,d]})}),j(Fr,{children:[a,a&&x(T3,{}),"操作说明: ",x("br",{}),"1. 点击/下拉切换 ",x("br",{}),"2. 按住 ",x("kbd",{className:uu,children:"Shift"})," 键点击逆序切换 ",x("br",{})]})]})},pl="size-16px",TEe={[It.Initial]:{icon:x($Se,{className:pl}),label:"初始顺序"},[It.Shuffle]:{icon:x(Mj,{className:pl}),label:"随机顺序"},[It.PubTimeDesc]:{icon:x(f3,{className:pl}),label:"最新投稿"},[It.PubTimeAsc]:{icon:x(d3,{className:pl}),label:"最早投稿"},[It.PlayCountDesc]:{icon:x(ag,{className:pl}),label:"最多播放"},[It.CollectCountDesc]:{icon:x(df,{className:X(pl)}),label:"最多收藏"},[It.FavTimeDesc]:{icon:x(f3,{className:X(pl)}),label:"最近收藏"},[It.FavTimeAsc]:{icon:x(d3,{className:X(pl)}),label:"最早收藏"}},AEe={all:[It.Initial,It.Shuffle],"fav-folder":[It.FavTimeDesc,It.PubTimeDesc,It.PlayCountDesc,It.CollectCountDesc,"divider",It.FavTimeAsc,It.PubTimeAsc,"divider",It.Shuffle],"fav-collection":[It.Initial,It.PubTimeDesc,It.PlayCountDesc,It.CollectCountDesc,"divider",It.PubTimeAsc,"divider",It.Shuffle]};function _q(e){return e.split(":")[0]}function Lq(e){const t=_q(e);return AEe[t]||Object.values(It)}function y9(e){const t=_q(e);return t==="fav-folder"?It.FavTimeDesc:t==="fav-collection"?It.PubTimeDesc:It.Initial}function yA(e,t){const n=Lq(e).filter(o=>o!=="divider"),r=t.get(e)||y9(e);return n.includes(r)?r:y9(e)}function NEe(e,t){return f.useMemo(()=>yA(e,t),[t,e])}function SA(){const e=bo(),{ref:t,getPopupContainer:n}=Eu(),{selectedKey:r,savedOrderMap:o}=St(mn),i=NEe(r,o),a=f.useMemo(()=>Lq(r),[r]);return x(bA,{value:i,onChange:async c=>{mn.savedOrderMap.set(r,c),await hn(100),e();},list:a,listDisplayConfig:TEe,$ref:t,dropdownProps:{getPopupContainer:n}})}const PEe=oo.extend("modules:rec-services:fav:store");var by=(e=>(e.CollectionIdFull="fav-collection-id",e.CollectionId="fav-cid",e.FolderIdFull="fav-folder-id",e.FolderId="fav-fid",e))(by||{});const Bq=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},yy=new URLSearchParams(location.search),zq=Bq(yy.get("fav-collection-id")??yy.get("fav-cid")),kq=Bq(yy.get("fav-folder-id")??yy.get("fav-fid")),Sy=Is&&(typeof kq=="number"||typeof zq=="number"),mn=Bn({folders:[],foldersUpdateAt:0,selectedFavFolderId:kq,get selectedFavFolder(){if(typeof this.selectedFavFolderId=="number")return this.folders.find(e=>e.id===this.selectedFavFolderId)},collections:[],collectionsUpdateAt:0,selectedFavCollectionId:zq,selectedFavCollectionDetailInfo:void 0,get selectedFavCollection(){if(typeof this.selectedFavCollectionId=="number")return this.collections.find(e=>e.id===this.selectedFavCollectionId)},get selectedKey(){let e,t;if(this.selectedFavFolderId!==void 0)e="fav-folder",t=this.selectedFavFolderId;else if(this.selectedFavCollectionId!==void 0)e="fav-collection",t=this.selectedFavCollectionId;else return "all";return `${e}:${t}`},get selectedLabel(){if(this.selectedFavFolder)return `${this.selectedFavFolder.title} (${this.selectedFavFolder.media_count})`;if(typeof this.selectedFavCollectionId=="number"){if(this.selectedFavCollection)return `${this.selectedFavCollection.title} (${this.selectedFavCollection.media_count})`;const e=this.selectedFavCollectionDetailInfo;return e?.id===this.selectedFavCollectionId?`${e.title} (${e.media_count})`:void 0}return "全部"},savedOrderMap:(await( wH("fav-saved-order"))).map,get usingShuffle(){return yA(this.selectedKey,this.savedOrderMap)===It.Shuffle}});function Fq(e,t){const n=mn.folders.find(o=>o.id===e);if(!n)return;const r=typeof t=="function"?t(n.media_count):t;r!==n.media_count&&(n.media_count=r,PEe("update folder(id=%s title=%s) media_count to %s",n.id,n.title,r));}function CA(e=false){return Promise.all([xA(e),DEe(e)])}const IEe=Ls(async()=>{const e=await wEe();mn.folders=e,mn.foldersUpdateAt=Date.now();});async function xA(e=false){if(!e){const{folders:t,foldersUpdateAt:n}=mn;if(t.length&&n&&Date.now()-n{const e=await MEe();mn.collections=e,mn.collectionsUpdateAt=Date.now();});async function DEe(e=false){if(!e){const{collections:t,collectionsUpdateAt:n}=mn;if(t.length&&n&&Date.now()-n{mn.selectedLabel&&KT(mn.selectedLabel);});_Ee();async function _Ee(){if(!(Is||Tq)||Sy)return;const e="fav-store",t=["selectedFavFolderId","selectedFavCollectionId","folders"],n=await GM.getValue(e);if(n)for(const o of t)za(n[o])||(mn[o]=n[o]);const r=UR(1);SH(mn,t,o=>{if(Sy)return;const i=au(o,t);r(async()=>{await GM.setValue(e,i);});});}var je=(e=>(e.Separator="separator",e.AppRecommend="app-recommend",e.PcRecommend="pc-recommend",e.DynamicFeed="dynamic-feed",e.Watchlater="watchlater",e.Fav="fav",e.PopularGeneral="popular-general",e.PopularWeekly="popular-weekly",e.Rank="ranking",e.Live="live",e.SpaceUpload="space-upload",e.Liked="liked",e))(je||{});class LEe{constructor(t){this.anonymous=t;}hasMore=true;page=1;tabbarView=x(BEe,{});async loadMore(){if(!this.hasMore)return;const n=(await Jt.get("/x/web-interface/popular",{params:{ps:20,pn:this.page},withCredentials:!this.anonymous})).data;return Zn(n)?(this.page++,this.hasMore=!n.data.no_more,(n.data.list||[]).map(o=>({...o,api:je.PopularGeneral,uniqId:`${je.PopularGeneral}-${o.bvid}`}))):(gn(n.message||xf),void 0)}}function BEe(){const e=bo();return x(Nt,{configPath:"popularGeneralUseAnonymous",tooltip:x(Be,{children:"✅ 匿名访问: 使用游客身份访问"}),label:"匿名访问",extraAction:async()=>{await hn(100),e();}})}function zEe(){const t=localStorage.getItem("bpx_player_profile");if(t)try{return JSON.parse(t)}catch{return}}function Hq(){return !!zEe()?.media.autoplay}function Xf(e){const t=q4.createInstance({driver:q4.INDEXEDDB,name:ro,storeName:e});return {db:t,get(n){return t.getItem(n.toString())},set(n,r){return t.setItem(n.toString(),r)},delete(n){return t.removeItem(n.toString())}}}function Mu({fn:e,generateKey:t,tableName:n,ttl:r,concurrency:o,autoCleanUp:i=true}){const a=typeof n=="string"?Xf(n):n,c=Kl(()=>{a.db.iterate((g,b)=>{u(g)||a.db.removeItem(b);});},1e3);i&&w1().then(c);function u(g){return !!(g&&g.val&&g.ts&&Date.now()-g.ts<=r)}async function d(...g){const b=t(...g),y=await a.get(b);if(y&&u(y))return y.val}const m=o&&o>0?bH(e,o):e,p=HT(m,{cacheKey(g){return t(...g)},cache:{async has(g){const b=await a.get(g);return u(b)},async get(g){const b=await a.get(g);if(b&&u(b))return b.val},async set(g,b){za(b)||await a.set(g,{val:b,ts:Date.now()});},async delete(g){await a.delete(g);}}});return Object.defineProperties(p,{cache:{value:a},cleanUp:{value:c},generateKey:{value:t},shouldReuseCached:{value:u},queryCache:{value:d}}),p}async function kEe(e){return (await Jt.get("/x/web-interface/view",{params:{bvid:e}})).data.data}const Vq=Mu({fn:kEe,generateKey:e=>e,tableName:"video-detail",ttl:ao("3M"),concurrency:3});async function FEe(e){return (await Jt.get("/x/player/pagelist",{params:{bvid:e}})).data?.data||[]}const jq=Mu({fn:FEe,generateKey:e=>e,tableName:"video-page-list",ttl:ao("3M"),concurrency:3});async function HEe({appKey:e,nscode:t,versionId:n}){const r={appKey:e,nscode:t,versionId:n};return (await Jt.get("/x/kv-frontend/namespace/data",{params:r})).data}function Uq({appKey:e,nscode:t}){return new URLSearchParams([["appKey",e],["nscode",t.toString()]]).toString()}const S9=Xf("kv-latest-version"),VEe=Ls(async({appKey:e,nscode:t})=>{const n=Uq({appKey:e,nscode:t}),r=await S9.get(n);let o="0";r&&r.versionId&&r.data&&Object.keys(r.data).length&&(o=r.versionId);const i=await HEe({appKey:e,nscode:t,versionId:o});return r?.data&&i.code===-304&&i.message==="Not Modified"?r.data:(await S9.set(n,i.data),i.data.data)}),jEe=Mu({fn:VEe,tableName:"get-kv-data",generateKey:({appKey:e,nscode:t})=>Uq({appKey:e,nscode:t}),ttl:ao("1h")});function UEe(e={},t){t.endsWith(".")||(t+=".");const n={};return e&&Object.keys(e).filter(r=>r.startsWith(t)).forEach(r=>{const o=r.slice(t.length),i=e[r]||"";n[o]=i;}),n}const C9=[{tid:0,name:"全部",slug:"all",season_type:0,type:"all"},{tid:0,name:"番剧",slug:"anime",season_type:1,type:"anime"},{tid:0,name:"国创",slug:"guochuang",season_type:4,type:"guochuang"},{tid:0,name:"纪录片",slug:"documentary",season_type:3,type:"documentary"},{tid:0,name:"电影",slug:"movie",season_type:2,type:"movie"},{tid:0,name:"电视剧",slug:"tv",season_type:5,type:"tv"},{tid:0,name:"综艺",slug:"variety",season_type:7,type:"variety"},{tid:1005,name:"动画",slug:"douga",season_type:0,type:"douga"},{tid:1008,name:"游戏",slug:"game",season_type:0,type:"game"},{tid:1007,name:"鬼畜",slug:"kichiku",season_type:0,type:"kichiku"},{tid:1003,name:"音乐",slug:"music",season_type:0,type:"music"},{tid:1004,name:"舞蹈",slug:"dance",season_type:0,type:"dance"},{tid:1001,name:"影视",slug:"cinephile",season_type:0,type:"cinephile"},{tid:1002,name:"娱乐",slug:"ent",season_type:0,type:"ent"},{tid:1010,name:"知识",slug:"knowledge",season_type:0,type:"knowledge"},{tid:1012,name:"科技数码",slug:"tech",season_type:0,type:"tech"},{tid:1020,name:"美食",slug:"food",season_type:0,type:"food"},{tid:1013,name:"汽车",slug:"car",season_type:0,type:"car"},{tid:1014,name:"时尚美妆",slug:"fashion",season_type:0,type:"fashion"},{tid:1018,name:"体育运动",slug:"sports",season_type:0,type:"sports"},{tid:1024,name:"动物",slug:"animal",season_type:0,type:"animal"}],wA={name:"全站",tid:0,slug:"all"};async function qEe(){try{return await GEe()||C9}catch(e){return LQ("parseRankTabsConfig failed",e),C9}}async function GEe(){const e=await jEe({appKey:"333.1339",nscode:10}),t=UEe(e,"channel_list"),n=JSON.parse(t.popular_page_sort||"");if(!n.length)return;const r=[],o=i=>{r.push({tid:i.tid||0,name:i.name,slug:i.route,season_type:i.seasonType||0,type:i.route});};for(const i of n){if(!t[i])continue;const a=JSON.parse(t[i]);o(a);}return Wl(r,i=>i.slug)}var o0=(e=>(e.Normal="normal",e.PgcSeason="pgc/season",e.PgcWeb="pgc/web",e))(o0||{});function qq(e){if(!["anime","guochuang","documentary","movie","tv","variety"].includes(e.type||""))return {apiType:"normal",url:`/x/web-interface/ranking/v2?rid=${e.tid}&type=all`};const{season_type:t}=e,n=`?day=3&season_type=${t}`;let r=`/pgc/web/rank/list${n}`,o="pgc/web";return t&&[2,3,4,5,7].includes(t)&&(r=`/pgc/season/rank/web/list${n}`,o="pgc/season"),{apiType:o,url:r}}function $A(e){return e.from==="normal"}function WEe(e){return e.from==="pgc/season"}function KEe(e){return e.from==="pgc/web"}const $p={top:e=>X("absolute top-8px",e==="left"?"left-8px":"right-8px",e==="left"?GSe:WSe),topContainer:e=>X($p.top(e),"flex items-center gap-x-5px",e==="left"?"flex-row":"flex-row-reverse"),tooltip:e=>X("pointer-events-none absolute bottom--6px translate-y-100% select-none whitespace-nowrap rounded-4px bg-gate-primary px-8px py-4px text-12px text-white line-height-18px",e==="left"?"left-0":"right-0")},La=f.memo(function({inlinePosition:t,icon:n,tooltip:r,visible:o=true,active:i=false,className:a,useMotion:c=false,motionProps:u,ref:d,...m}){const{triggerRef:p,tooltipEl:g}=z1({inlinePosition:t,tooltip:r}),b=f.useMemo(()=>Dj("action-button","relative size-28px cursor-pointer rounded-6px bg-[rgb(33_33_33_/_0.7)] color-white","b-1px b-solid",i?"b-gate-primary":"b-#444","hover:b-gate-primary",c||o?"inline-flex":"hidden","items-center justify-center","[&_svg]:pointer-events-none [&_svg]:select-none",a),[i,a,o,c]),y=_1(p,d),S={...m,className:b,ref:y,children:j(Be,{children:[n,g]})};return c?x(Xye,{children:o&&x(PT.div,{...S,...u},"action-button")}):x("div",{...S})});function z1({inlinePosition:e,tooltip:t,tooltipClassName:n}){const r=f.useRef(null),o=N1(r),i=ar($p.tooltip(e),n,o?"block":"hidden");return {triggerRef:r,tooltipEl:t?x("span",{className:i,children:t}):void 0}}function YEe(e,t,n=true){let r=0,o=t;return (...i)=>{if(r++,r===o)return r=0,n&&o++,e(...i)}}function Gq(e,t,n=true){const r=rt(e);return f.useMemo(()=>YEe(r,t,n),[r,t,n])}const XEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M8.5 6q.049 0 .098.009q.076.017.142.054q.061.034.114.083q.05.052.082.113A.5.5 0 0 1 9 6.5v3a.5.5 0 0 1-1 0V7.707l-5.146 5.147a.5.5 0 1 1-.708-.707L7.293 7H5.5a.5.5 0 0 1 0-1zM12 2a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H8.5a.5.5 0 0 1 0-1H12V3H3v3.5a.5.5 0 0 1-1 0V3a1 1 0 0 1 1-1z"})]}),Wq=f.forwardRef(XEe),QEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M10.969 3.219a.574.574 0 1 1 .812.812L8.313 7.5l3.468 3.469l.074.09a.575.575 0 0 1-.796.796l-.09-.074L7.5 8.312l-3.469 3.47a.574.574 0 1 1-.812-.813L6.688 7.5l-3.47-3.469l-.073-.09a.575.575 0 0 1 .796-.797l.09.075L7.5 6.687z"})]}),ZEe=f.forwardRef(QEe),JEe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M7.499 0c1.072 0 1.966.338 2.589 1.002c.619.66.912 1.58.912 2.634V6h1a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h7V3.636c0-.876-.242-1.524-.642-1.95C8.963 1.267 8.357 1 7.5 1c-.888 0-1.502.269-1.895.715l-.077.092C5.197 2.233 5 2.843 5 3.633H4c0-.95.237-1.795.737-2.44l.121-.145C5.482.342 6.4 0 7.5 0M3 13h9V7H3z"})]}),Kq=f.forwardRef(JEe),e3e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M7.501.978c1.074 0 1.968.345 2.59 1.014c.616.664.909 1.587.909 2.642V6h1a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h1V4.636c0-1.055.293-1.979.91-2.643c.622-.67 1.517-1.015 2.591-1.015M3 13h9V7H3zM7.501 1.978c-.855 0-1.461.27-1.857.696C5.243 3.105 5 3.76 5 4.636V6h5V4.634c0-.877-.241-1.531-.642-1.962c-.395-.426-1.001-.694-1.857-.694"})]}),t3e=f.forwardRef(e3e);function n3e(e,t){const n=t.document.head;Xj({key:"pip-window",container:n}),Array.from(document.querySelectorAll("style")).filter(i=>[ro,"ant","rc"].some(a=>i.textContent.includes(a))).forEach(i=>{const a=t.document.createElement("style");a.textContent=i.textContent,t.document.head.appendChild(a);});const r=document.createElement("div");r.classList.add(Ca),r.style.lineHeight="0",t.document.body.appendChild(r),Ka.createRoot(r).render(x(ks,{cssInsertContainer:n,cssInsertContainerEmotionKey:"pip-window",children:x(Po,{getPopupContainer:()=>t.document.body,getTargetContainer:()=>t,children:j(Yp,{message:{getContainer:()=>t.document.body},children:[x(P1,{baseGlobalStyle:true}),x(o3e,{newHref:e,pipWindow:t})]})})}));}var r3e={name:"pb1257",styles:"*{box-sizing:border-box;}:root,body,iframe{margin:0;padding:0;overscroll-behavior:none;}"};function o3e({newHref:e,pipWindow:t}){const n=N1(t.document.documentElement),[r,o]=f.useState(()=>ot.pipWindow.defaultLocked);return j(Be,{children:[x(WT,{styles:[r3e,"",""]}),x("iframe",{src:e,className:"block h-100vh w-full border-none"}),x(i3e,{locked:r,setLocked:o,pipWindow:t}),j("div",{className:X("fixed right-10px top-10px z-9999 flex-row-reverse items-center gap-x-6px",n?"flex":"hidden"),children:[x(a3e,{pipWindow:t,newHref:e}),x(s3e,{locked:r,setLocked:o})]})]})}const Yq="size-30px [&_svg]:size-16px";function i3e({locked:e,setLocked:t,pipWindow:n}){const{message:r}=Yp.useApp(),o=Gq(()=>{r.info("请先点击右上角「🔓解锁按钮」解锁");},3);return f.useMemo(()=>di([{key:"unlock",label:"解锁",icon:x(Kq,{}),onClick(){t(false);}}]),[]),e&&x("div",{className:X("locked-overlay","fixed inset-0 z-9999 select-none bg-transparent"),onClick:o})}function a3e({newHref:e,pipWindow:t}){return x(La,{inlinePosition:"right",icon:x(Wq,{}),tooltip:"新窗口打开",onClick:()=>{t.close();const r=new URL(e);r.searchParams.delete(ql.PlayerScreenMode),r.searchParams.delete(ql.ForceAutoPlay),li(r.href);},className:Yq})}function s3e({locked:e,setLocked:t}){const[n,r]=e?["锁定","解锁"]:["解锁","锁定"];return x(La,{inlinePosition:"right",icon:e?x(t3e,{}):x(Kq,{}),tooltip:`已${n}, 点击${r}`,className:Yq,onClick:()=>t(o=>!o)})}const Xq=oo.extend("VideoCard:useOpenRelated");function l3e({href:e,item:t,cardData:n,actionButtonVisible:r,hasOpenInPopupActionButton:o,getLargePreviewCurrentTime:i,hideLargePreview:a,shouldUseLargePreviewCurrentTime:c}){const{videoLinkOpenMode:u}=qt();function d($){const M=new URL(e,location.href);return $?.(M),M.href}const m=rt($=>{$.stopPropagation(),$.preventDefault(),p(void 0,$);}),p=rt(($,M)=>{$||=ot.videoLinkOpenMode;const T=d(N=>{if(($===rr.NormalWebFullscreen||$===rr.Popup&&ot.pipWindow.autoWebFullscreen)&&(N.searchParams.set(ql.PlayerScreenMode,wl.WebFullscreen),$===rr.Popup&&!Hq()&&N.searchParams.set(ql.ForceAutoPlay,FT.ON)),c()){const O=i();O&&(a(),N.searchParams.set("t",O.toString()));}}),R=()=>{const O=!($===rr.Background||!!(M?.metaKey||M?.ctrlKey));li(T,O);},I=()=>{location.href=T;};({[rr.Normal]:R,[rr.Background]:R,[rr.CurrentPage]:I,[rr.NormalWebFullscreen]:R,[rr.Popup]:()=>g(T),[rr.Iina]:b})[$]?.();});function g($){const{width:M,height:T}=EA({item:t});return Qq($,n.bvid,M,T)}function b(){let $=e;t.api===je.Watchlater&&($=`/video/${t.bvid}`);const M=new URL($,location.href).href,T=`iina://open?url=${encodeURIComponent(M)}`;window.open(T,"_self");}const y=f.useMemo(()=>Object.values(rr).filter($=>si[$].enabled===void 0).map($=>({key:JD[$],label:si[$].label,icon:si[$].icon,onClick:()=>p($)})),[]),S=f.useMemo(()=>Object.values(rr).filter($=>typeof si[$].enabled=="boolean"&&si[$].enabled).length?Object.values(rr).filter($=>typeof si[$].enabled=="boolean"&&si[$].enabled).map($=>({key:JD[$],label:si[$].label,icon:si[$].icon,onClick:()=>p($)})):[],[]),C=f.useMemo(()=>{if(u!==rr.Popup&&t.api!==je.Live&&MA&&o)return x(La,{visible:r,inlinePosition:"right",icon:si.Popup.icon,tooltip:si.Popup.label,onClick:$=>{$.preventDefault(),$.stopPropagation(),p(rr.Popup);}})},[u,r]),w=rt(()=>{p(rr.Popup);});return {onOpenWithMode:p,handleVideoLinkClick:m,consistentOpenMenus:y,conditionalOpenMenus:S,openInPopupActionButtonEl:C,onOpenInPopup:w}}function EA({item:e,dimensionFromApi:t}){let n,r,o;if(t)[n,r]=[t.width,t.height],t.rotate===1&&([n,r]=[r,n]),o=n/r;else if(e?.api===je.AppRecommend&&e.uri?.startsWith("bilibili://")){const i=new URL(e.uri).searchParams,a=Number(i.get("player_width")||0),c=Number(i.get("player_height")||0),u=Number(i.get("player_rotate")||0);a&&c&&!Number.isNaN(a)&&!Number.isNaN(c)&&([n,r]=[a,c],u===1&&([n,r]=[r,n]),o=n/r);}else if(e?.api===je.Rank&&$A(e)){const i=e.dimension.width,a=e.dimension.height,c=e.dimension.rotate;i&&a&&!Number.isNaN(i)&&!Number.isNaN(a)&&([n,r]=[i,a],c===1&&([n,r]=[r,n]),o=n/r);}return {width:n,height:r,aspectRatio:o}}const MA=!!window.documentPictureInPicture?.requestWindow;async function Qq(e,t,n,r){let o=1e3,i=Math.ceil(o/16*9);const a=200;if((!n||!r)&&t){const u=await Promise.race([jq(t),hn(a)]);if(u?.[0]?.dimension){const{dimension:d}=u[0];n=d.width,r=d.height;}}if(n&&r&&n %s",i),window.open(e,"_blank",i);}function Zq(){const{videoLinkOpenMode:e}=qt();return e!==rr.CurrentPage}function k1(){return Zq()?"_blank":"_self"}function P3(){return ot.videoLinkOpenMode!==rr.CurrentPage?"_blank":"_self"}function Ep(e){const t=k1();return x("a",{...e,target:t,children:e.children})}let bb=[],t$="";function x9(){const e=qn();return [e.format("YYYYMMDD"),e.hour()<18?"lt-18":"gte-18"].join("_")}async function u3e(){return bb.length&&t$&&t$===x9()||(bb=(await Jt.get("/x/web-interface/popular/series/list")).data.data.list,t$=x9()),bb}class Cy{constructor(t){this.useShuffle=t;}static PAGE_SIZE=20;episodesLoaded=false;episodes=[];qs=new B1(Cy.PAGE_SIZE);get hasMore(){return this.episodesLoaded?!!this.qs.bufferQueue.length||!!this.episodes.length:true}async loadMore(){if(this.episodesLoaded||(this.episodes=await u3e(),this.episodesLoaded=true,this.useShuffle&&(this.episodes=pi(this.episodes))),!this.hasMore)return;if(!this.useShuffle){if(this.qs.bufferQueue.length)return this.qs.sliceFromQueue();const n=this.episodes[0],r=n.number,o=await w9(r);return this.qs.bufferQueue.push({api:je.Separator,uniqId:`popular-weekly-separator-${r}`,content:x(Ep,{href:`https://www.bilibili.com/v/popular/weekly?num=${r}`,children:n.name})},...o),this.episodes=this.episodes.slice(1),this.qs.sliceFromQueue()}const t=5;for(;this.qs.bufferQueue.lengtho.number),o=>w9(o),2);this.qs.bufferQueue=pi([...this.qs.bufferQueue,...r.flat()]);}return this.qs.sliceFromQueue()}get tabbarView(){return x(d3e,{})}}const n$={};async function w9(e){if(!n$[e]?.length){const o=((await Jt.get("/x/web-interface/popular/series/one",{params:{number:e}})).data.data.list||[]).map(i=>({...i,api:je.PopularWeekly,uniqId:`${je.PopularWeekly}-${i.bvid}`}));n$[e]=o;}return n$[e]}function d3e(){const e=bo();return x(Be,{children:x(gf,{configPath:"popularWeeklyUseShuffle",checkedChildren:"随机顺序: 开",unCheckedChildren:"随机顺序: 关",extraAction:async()=>{await hn(100),e();}})})}const Jq="rank-store-slug",f3e=await( GM.getValue(Jq))||wA.slug,vi=Bn({slug:f3e,tabs:[],get currentTab(){return this.tabs.find(e=>e.slug===this.slug)||wA}}),m3e=Ls(async()=>{if(vi.tabs.length)return;const e=await qEe();vi.tabs=e;});qR(vi,"slug",()=>{GM.setValue(Jq,vi.slug);});class eG{constructor(t){this.slug=t;}loaded=false;qs=new B1(20);tabbarView=x(h3e,{});sidebarView=x(p3e,{});get hasMore(){return this.loaded?!!this.qs.bufferQueue.length:true}get rankTab(){return Jr(vi).tabs.find(t=>t.slug===this.slug)||wA}async loadMore(t){if(this.hasMore){if(!this.loaded){await m3e();const{url:n,apiType:r}=qq(this.rankTab),i=(await Jt.get(n,{signal:t})).data;if(this.loaded=true,!Zn(i)){gn(i.message||xf);return}const c=(i?.data?.list||i?.result?.list||[]).map((u,d)=>{const m=d+1;return {...u,api:je.Rank,uniqId:`${je.Rank}-${this.rankTab.slug}-rankingNo:${m}`,rankingNo:m,slug:this.rankTab.slug,rankTab:this.rankTab,from:r}});this.qs.bufferQueue=c;}return this.qs.sliceFromQueue()}}}function tG(){const{tabs:e}=St(vi),{normalList:t,pgcList:n}=f.useMemo(()=>{const r=e.map(a=>({...a,apiType:qq(a).apiType})),o=r.filter(a=>[o0.PgcSeason,o0.PgcWeb].includes(a.apiType));return {normalList:r.filter(a=>a.apiType===o0.Normal),pgcList:o}},[e]);return {normalList:t,pgcList:n}}function h3e(){const{enableSidebar:e}=qt(),{ref:t,getPopupContainer:n}=Eu(),r=bo(),{slug:o,currentTab:i}=St(vi),{normalList:a,pgcList:c}=tG(),u=(y,S,C)=>y.length?j("div",{className:"mt-15px max-w-350px first:mt-0",children:[j("p",{className:"mb-5px flex-v-center rounded-5px bg-gate-primary py-5px pl-6px text-white",children:[S,!!C&&x(Fr,{children:C})]}),x("div",{className:"grid grid-cols-4 gap-x-10px gap-y-8px px-2px",children:y.map(w=>{const $=w.slug===o;return x(mt,{className:X({"b-gate-primary":$,"color-gate-primary":$}),onClick:M=>{g(false),vi.slug=w.slug,r();},children:x("span",{children:w.name})},w.slug)})})]}):null,d=rt(y=>{const S=[...a,...c];if(!S.length)return;const C=S.findIndex(M=>M.slug===o);if(C===-1)return;const w=y.shiftKey?-1:1,$=(C+w+S.length)%S.length;vi.slug=S[$].slug,r();}),m=j(Be,{children:[u(a,"视频"),u(c,"PGC内容","不能提供预览")]}),[p,g]=f.useState(false),b=x(Gi,{arrow:false,open:p,onOpenChange:g,placement:"bottomLeft",getPopupContainer:n,content:m,styles:{container:{border:`1px solid ${Uf()}`}},children:x(mt,{css:[p&&jf,"",""],onClick:d,className:"outline-none!",children:i.name})});if(!e)return x("div",{ref:t,children:b})}function p3e(){const{slug:e}=St(vi),{normalList:t,pgcList:n}=tG(),r=bo(),o=rt(a=>{vi.slug=a,r();}),i=f.useMemo(()=>{const a={type:"group",label:"视频",children:t.map(u=>({key:u.slug,label:u.name,onClick:()=>o(u.slug)}))},c={type:"group",label:"PGC内容",children:n.map(u=>({key:u.slug,label:u.name,onClick:()=>o(u.slug)}))};return [a,c]},[t,n]);return x(tc,{items:i,selectedKeys:[e],mode:"inline",inlineIndent:10})}const g3e={[ur.PopularGeneral]:()=>new LEe(ot.popularGeneralUseAnonymous),[ur.PopularWeekly]:()=>new Cy(ot.popularWeeklyUseShuffle),[ur.Rank]:()=>new eG(vi.slug)};function nG(e){const{subtab:t}=Vo;return e??=ot.popularWeeklyUseShuffle,t===ur.PopularWeekly&&e}const r$=e=>x("img",{src:e,alt:"",className:"size-18px"}),o$={[ur.PopularGeneral]:{icon:r$("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_popular.png"),label:"综合热门",desc:"各个领域中新奇好玩的优质内容都在这里~",swr:true,anonymousUsage:true},[ur.PopularWeekly]:{icon:r$("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_weekly.png"),label:"每周必看",desc:"每周五晚 18:00 更新",anonymousUsage:true},[ur.Rank]:{icon:r$("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_rank.png"),label:"排行榜",desc:"排行榜根据稿件内容质量,近期的数据综合展示,动态更新",anonymousUsage:true,swr:true}};class v3e extends Fs{subtab;service;constructor(){super(20),this.subtab=Vo.subtab,this.service=g3e[Vo.subtab]();}get tabbarView(){return x(b3e,{children:this.service.tabbarView})}get sidebarView(){return this.service.sidebarView}get hasMoreExceptQueue(){return this.service.hasMore}fetchMore(t){return this.service.loadMore(t)}}const Vo=await( WR({subtab:ur.PopularGeneral},"hot-store"));Object.values(ur).includes(Vo.subtab)||(Vo.subtab=ur.PopularGeneral);function b3e({children:e}){const{subtab:t}=St(Vo),{icon:n,label:r}=o$[t],o=bo(),{ref:i,getPopupContainer:a}=Eu(),{__internalHotSubUseDropdown:c}=qt(),u=f.useMemo(()=>[ur.PopularGeneral,ur.PopularWeekly,ur.Rank].map((p,g)=>{const b=o$[p],y=p===t;return [g>0&&{type:"divider"},{key:p,label:x("span",{className:X({"color-gate-primary":y}),children:b.label}),icon:b.icon,onClick(){p!==Vo.subtab&&(Vo.subtab=p,o());}}].filter(Boolean)}).flat(),[t]),d=x(nc,{menu:{items:u},getPopupContainer:a,rootClassName:'![&_[role="separator"]]:mx-0 ![&_[role="separator"]]:my-2px',children:j(mt,{ref:i,className:"w-114px flex items-center justify-start gap-0 pl-16px",children:[n,x("span",{className:"ml-8px",children:r})]})}),m=f.useMemo(()=>x(Es.Compact,{children:[ur.PopularGeneral,ur.PopularWeekly,ur.Rank].map((p,g)=>{const{icon:b,label:y,desc:S}=o$[p],C=p===t;return x(pn,{title:j(Be,{children:[y,": ",S]}),children:x(mt,{className:"[&_.ant-btn-icon]:line-height-0",icon:b,variant:C?"solid":"outlined",color:C?"primary":"default",onClick:()=>{p!==Vo.subtab&&(Vo.subtab=p,o());},children:y})},p)})}),[t]);return j(Be,{children:[c?d:m,e]})}const rG=j(Be,{children:["1. 可以使用多个过滤词, 用空格分隔, 逻辑关系为且 (AND) ",x("br",{}),'2. 可以使用引号包裹过滤词, 如 "word or sentence" ',x("br",{}),'3. 可以使用 -"word or sentence" 排除; 必须使用引号(单引号 或 双引号) ',x("br",{})]});function oG(e){const t=[],n=[];if(!e.trim())return {includes:t,excludes:n};let r=0;const o=e.length;for(;r=o)break;let i=false,a="";if(e[r]==="-"){const c=e[r+1];(c==='"'||c==="'")&&(i=true,r++);}if(e[r]==='"'||e[r]==="'"){const c=e[r];r++;let u=false;for(;rj("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",children:[x("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M24 44a19.94 19.94 0 0 0 14.142-5.858A19.94 19.94 0 0 0 44 24a19.94 19.94 0 0 0-5.858-14.142A19.94 19.94 0 0 0 24 4A19.94 19.94 0 0 0 9.858 9.858A19.94 19.94 0 0 0 4 24a19.94 19.94 0 0 0 5.858 14.142A19.94 19.94 0 0 0 24 44Z"}),x("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M24 28.625v-4a6 6 0 1 0-6-6"}),x("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 37.625a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5",clipRule:"evenodd"})]})]}),S3e=f.forwardRef(y3e),C3e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0-4 0"}),x("path",{d:"M12 18q-.492 0-.97-.05Q6.271 17.452 3 12q3.6-6 9-6q5.197 0 8.727 5.558M15 18a3 3 0 1 0 6 0a3 3 0 1 0-6 0m5.2 2.2L22 22"})]})]}),x3e=f.forwardRef(C3e);function w3e(){const{grid:{useCustomGrid:e,enableForceColumn:t,forceColumnCount:n,cardMinWidth:r},style:o,enableSidebar:i,sidebarAlign:a}=qt();no(()=>qR(ot,"pureRecommend",async m=>{await hn(0),L1();}));const c=rt(()=>{const m="v0.34.10";GM.setClipboard(m),Ft.success(`已复制当前版本: ${m}`);}),u=f.useRef(null),d=N1(u);return j("div",{className:Fn.tabPane,children:[x(Zr,{title:j(Be,{children:[x(hi,{tabKey:Je.AppRecommend,className:"mr-5px mt-2px size-30px"}),"access_key",j(Fr,{className:"ml-5px mt-6px size-18px",IconComponent:S3e,tooltipProps:{classNames:{root:"text-14px"}},children:["App 端登录凭证, 使用情况: ",x("br",{}),x(T3,{}),j("div",{className:"group flex items-start",children:[j("div",{className:"w-55px flex flex-none items-center",children:[x(hi,{tabKey:Je.AppRecommend,className:"mr-1"})," 推荐"]}),j("ul",{className:"flex-1 list-disc pl-20px",children:[x("li",{className:"w-max",children:"获取推荐"}),x("li",{className:"w-max",children:"提交不喜欢"})]})]}),x(T3,{}),j("div",{className:"group flex items-start",children:[j("div",{className:"w-55px flex flex-none items-center",children:[x(hi,{tabKey:Je.Liked,className:"mr-1"}),"赞"]}),x("ul",{className:"w-max flex-1 list-disc pl-20px",children:x("li",{className:"w-max",children:"获取点赞列表"})})]})]})]}),children:x(fA,{})}),x(Zr,{title:"开关",resetSettingPaths:["pureRecommend","multiSelect.showIcon"],children:j("div",{className:Fn.settingsLine,children:[x(Nt,{configPath:"pureRecommend",label:"覆盖默认推荐",tooltip:j(Be,{children:[_r("覆盖默认推荐内容",`保留默认首页; 你可以从屏幕边缘找到入口面板, 使用 ${Ro} 的功能.`),"P.S 需要刷新网页"]})}),x(Nt,{configPath:"multiSelect.showIcon",label:"「多选」按钮",tooltip:"是否显示「多选」按钮"})]})}),j(Zr,{title:j(Be,{children:["布局",x(pn,{title:"透视",children:x(x3e,{ref:u,title:"透视",className:X("ml-1.5 size-1em cursor-pointer b-1px b-transparent rounded-md b-solid p-2px hover:b-gate-primary",{peeking:d})})})]}),resetSettingPaths:["grid.useCustomGrid","grid.cardMinWidth","grid.enableForceColumn","grid.forceColumnCount","enableSidebar","sidebarAlign","grid.gridDisplayMode","grid.twoColumnModeAlign"],children:[j("div",{className:Fn.settingsLine,children:[x(Nt,{configPath:"grid.useCustomGrid",label:"使用自定义网格配置",tooltip:j(Be,{children:["网格配置指: 网格宽度, 间距, 列数等. ",x("br",{}),_r(j(Be,{children:["使用 ",Ro," 自定义网格配置: 宽度为90%; 可跟随 Bilibili-Evolved 自定义顶栏配置"]}),x(Be,{children:"使用 bili-feed4 版本B站首页默认的网格配置"}))]})}),j("div",{className:"flex items-center gap-x-1 px-6px",children:[x(pn,{title:j(Be,{children:["如果期望显示更多的列, 可以调小这个值; ",x("br",{}),"如果期望显示更少的列, 可以调大这个值; ",x("br",{}),"手动设置列数时, 这个值不起作用. ",x("br",{}),x(n_,{children:"Alt / Opt"})," + ",x(n_,{children:"上下键"}),"可调整"]}),children:x("span",{className:"cursor-pointer",children:"视频卡片最小宽度"})}),x(Qc,{disabled:!e||t,value:r,onChange:m=>{m&&(ot.grid.cardMinWidth=m);},min:150,max:450,step:10,size:"small",className:"w-75px"})]}),j("div",{className:"flex items-center px-6px",children:[x(Nt,{disabled:!e,configPath:"grid.enableForceColumn",label:"手动设置列数",tooltip:x(Be,{children:"手动设置列数"})}),e&&t&&x(Qc,{value:n,onChange:m=>{m&&(ot.grid.forceColumnCount=m);},min:0,max:10,step:1,size:"small",className:"w-50px"})]})]}),j("div",{className:"flex items-center gap-x-4px",children:[x(Nt,{configPath:"enableSidebar",label:"使用侧边栏",tooltip:_r("使用侧边栏(如动态 分组/UP 选择)","使用下拉面板")}),j(Cr.Group,{disabled:!i,buttonStyle:"solid",size:"small",value:a,onChange:m=>{ot.sidebarAlign=m.target.value;},children:[x(Cr.Button,{value:ff.Left,className:"inline-flex-center",children:x(wq,{className:"size-16px"})}),x(Cr.Button,{value:ff.Right,className:"inline-flex-center",children:x($q,{className:"size-16px"})})]})]}),j("div",{className:"flex items-center",children:["网格显示模式",x(pEe,{className:"ml-xl"})]})]}),j(Zr,{title:"样式",resetSettingPaths:["style.general.popoverBorderColorUseColorPrimary","style.pureRecommend.useStickyTabbar","style.pureRecommend.stickyTabbarShadow","grid.useCustomGrid","style.pureRecommend.useWhiteBackground","style.pureRecommend.hideTopChannel"],children:[x("div",{className:Fn.settingsLine,children:x(Nt,{configPath:"style.general.popoverBorderColorUseColorPrimary",label:"下拉面板使用主题色边框"})}),j("div",{children:[x("div",{className:"flex items-center text-1.2em",children:"全屏推荐"}),j("div",{className:Fn.settingsLine,children:[x(Nt,{configPath:"style.pureRecommend.useStickyTabbar",label:"固定 Tab 栏",tooltip:_r("Tab 栏会吸附在顶栏下方","Tab 栏会随页面一起滚动")}),x(Nt,{disabled:!o.pureRecommend.useStickyTabbar,configPath:"style.pureRecommend.stickyTabbarShadow",label:"固定 Tab 栏时添加边框 & 阴影",tooltip:_r("Tab 栏在吸附状态下: 加宽, 添加边框 & 阴影","不改变")}),x(Nt,{configPath:"style.pureRecommend.useWhiteBackground",label:"使用纯白背景",tooltip:j(Be,{children:[_r("纯白背景","浅灰色背景"),"仅影响白色/浅色模式"]})}),x(Nt,{configPath:"style.pureRecommend.hideTopChannel",label:"隐藏顶部分区和Banner"})]})]})]}),x(Zr,{title:j(Be,{children:["帮助",j("span",{className:"relative top-4px ml-8px mr-4px inline-flex items-center text-size-14px",children:["当前版本",j(ho,{color:"green",className:"mx-4px cursor-pointer",onClick:c,children:[Ro," v","0.34.10"]}),x(tu,{className:"size-16px cursor-pointer",onClick:c})]})]}),children:j("div",{className:Fn.settingsLine,children:[x(pn,{title:"来个 Star 支持一下",children:x(mt,{href:"https://github.com/magicdawn/Bilibili-Gate",target:"_blank",children:"GitHub 主页"})}),x(mt,{href:"https://afdian.com/a/magicdawn",target:"_blank",children:"「爱发电」支持"}),x(mt,{href:"https://greasyfork.org/zh-CN/scripts/443530-bilibili-gate",target:"_blank",children:"GreasyFork 主页"}),x(mt,{href:"https://github.com/magicdawn/Bilibili-Gate/#%E5%BF%AB%E6%8D%B7%E9%94%AE%E8%AF%B4%E6%98%8E",target:"_blank",children:"查看可用的快捷键"}),x(mt,{href:"https://github.com/magicdawn/Bilibili-Gate/releases",target:"_blank",children:"更新日志"})]})})]})}const $3e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M7.5.875A3.626 3.626 0 0 1 11.127 4.5A3.624 3.624 0 0 1 8.5 7.983c1.197.145 2.224.568 2.997 1.33c.981.967 1.478 2.408 1.478 4.288a.475.475 0 0 1-.949 0c0-1.72-.453-2.88-1.196-3.613c-.745-.733-1.856-1.113-3.33-1.113c-1.472 0-2.584.38-3.328 1.113s-1.197 1.893-1.197 3.613a.475.475 0 0 1-.949 0c0-1.88.497-3.32 1.479-4.289c.772-.76 1.799-1.183 2.995-1.328a3.627 3.627 0 0 1 1-7.109m0 .95a2.676 2.676 0 1 0 0 5.35a2.676 2.676 0 0 0 0-5.35"})]}),sG=f.forwardRef($3e),E3e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17 19.5c0-1.657-2.239-3-5-3s-5 1.343-5 3m14-3c0-1.23-1.234-2.287-3-2.75M3 16.5c0-1.23 1.234-2.287 3-2.75m12-4.014a3 3 0 1 0-4-4.472M6 9.736a3 3 0 0 1 4-4.472m2 8.236a3 3 0 1 1 0-6a3 3 0 0 1 0 6"})]}),M3e=f.forwardRef(E3e),R3e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m-7-7h14"})]}),T3e=f.forwardRef(R3e),lG=sG,cG=M3e,xy=T3e;function uG(e){return `https://space.bilibili.com/${Yo()}/fans/follow?tagid=${e}`}function Sg(e){return `https://space.bilibili.com/${e}`}const dG=kj("w_webid"),fG=Ls(async()=>{const e=await dG.get();return e||A3e()});async function A3e(){const e=Yo();if(!e)return;const t=Sg(e),r=(await Jt.get(t,{responseType:"text",withCredentials:true})).data,i=new DOMParser().parseFromString(r,"text/html"),a=decodeURIComponent(i.getElementById("__RENDER_DATA__")?.textContent?.trim()||"");if(!a)return;const c=JSON.parse(a)?.access_id;return c&&await dG.set(c),c}async function N3e(e){const n=(await Jt.get("/x/space/wbi/acc/info",{params:{mid:e,w_webid:await fG()||""}})).data;if(!Zn(n)){Go("space acc info error for %s: %o",e,n);return}return n.data}const RA=Mu({fn:N3e,generateKey:e=>e.toString(),tableName:"space-acc-info",ttl:ao("10d"),concurrency:2});async function P3e(e){return (await RA(e))?.name}const Cg=Mu({fn:P3e,generateKey:e=>e.toString(),tableName:"user-nickname",ttl:ao("10d")});async function $9(e,t){await Cg.cache.set(e.toString(),{val:t,ts:Date.now()});}function I3e(){return TA("filter.byAuthor.keywords")}function O3e(){return AA("filter.byAuthor.keywords")}function D3e(){return TA("filter.byTitle.keywords")}function _3e(){return AA("filter.byTitle.keywords")}function L3e(){return TA("filter.dfByTitle.keywords")}function B3e(){return AA("filter.dfByTitle.keywords")}function mG(e){return `__${Ro}:${e}__`}async function TA(e){const t=mG(e),n=await C1(e);GM.setClipboard(JSON.stringify({[t]:n},null,2)),Ft.success("已复制到剪贴板!");}async function AA(e){const[t,n]=await Op(()=>navigator.clipboard.readText());if(t)return Ft.error("读取剪贴板失败!");if(!n)return Ft.error("剪贴板内容为空!");const[r,o]=Sf(()=>JSON.parse(n));if(r)return Ft.error("无法解析剪贴板内容!");if(!o)return Ft.error("剪贴板内容为空!");const i=mG(e),a=o?.[i];if(!a?.length)return Ft.error("没有符合条件的数据!");const c=await C1(e),u=l0(a,c);if(!u.length)return Ft.warning("没有可导入内容, 已全部存在!");Rs(e,{add:u}),Ft.success(`已导入 ${u.length} 条数据!`);}const E9=/^(?\d+)\((?[\S ]+)\)$/,z3e=/^\d+$/;function F1(e){if(E9.test(e)){const t=E9.exec(e)?.groups,n=t?.mid,r=t?.remark;return {mid:n,remark:r}}return z3e.test(e)?{mid:e,remark:void 0}:{}}function hG(e){const t=new Set,n=new Set;return e.forEach(r=>{const{mid:o}=F1(r);o?t.add(o):n.add(r);}),{blockUpMids:t,blockUpNames:n}}function M9(e){const t=[],n=[];e.forEach(o=>{if(o.startsWith("/")&&o.endsWith("/")){const i=new RegExp(o.slice(1,-1),"i");t.push(i);}else n.push(o);});function r(o){return n.some(i=>o.includes(i))||t.some(i=>i.test(o))}return {titleKeywordList:n,titleRegexList:t,test:r}}const k3e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m14 14l20 20m-20 0l20-20"})]}),F3e=f.forwardRef(k3e),{Search:H3e}=ba;var V3e={name:"1mzc5hv",styles:"color:var(--ant-color-text-disabled);background-color:var(--ant-color-bg-container-disabled);box-shadow:none;opacity:1;pointer-events:none;cursor:not-allowed"};function I3({configPath:e,searchProps:t,disabled:n,className:r,inputClassName:o,listClassName:i,renderHeader:a=OX}){const c=Yj(e),u=f.useMemo(()=>J3(c).toReversed(),[c]),d=x(H3e,{className:X("my-5px",o),enterButton:"添加",allowClear:true,disabled:n,size:"middle",...t,onSearch:async(b,y)=>{if(!b)return;if(new Set(await C1(e)).has(b)){Ft.warning(`${b} 已存在`);return}await Rs(e,{add:[b]}),y?.target&&y.target.closest(".ant-input-wrapper")?.querySelector(".ant-input-clear-icon")?.click();}}),m=!!u.length,p=!m,g=ar(p?"rounded-lg":["max-h-250px flex flex-wrap items-start gap-x-10px gap-y-5px overflow-y-auto pr-10px",i]);return j(Be,{children:[a(d),j("div",{className:g,css:n&&V3e,children:[p&&x(Fi,{image:Fi.PRESENTED_IMAGE_SIMPLE,description:"空空如也",className:"[&.ant-empty-normal]:my-1 [&.ant-empty-normal]:py-5px"}),m&&u.map(b=>x(pG,{tag:b.toString(),onDelete:async y=>{await Rs(e,{remove:[y]});},renderTag:e==="filter.byAuthor.keywords"?y=>x(j3e,{tag:y}):void 0},b))]})]})}const pG=f.memo(function({tag:t,renderTag:n,onDelete:r,className:o,...i}){return j("div",{...i,className:X("relative inline-flex items-center b-1px b-gate-border rounded-5px b-solid px-6px py-2px hover:b-gate-primary hover:color-gate-primary",o),children:[n?n(t):t,x(F3e,{className:"ml-2px size-16px cursor-pointer text-size-12px",onClick:()=>{r?.(t);}})]})});function j3e({tag:e}){const{mid:t,remark:n}=f.useMemo(()=>F1(e),[e]),[r,o]=f.useState(void 0);f.useEffect(()=>{(async()=>{if(!t)return;const c=await Cg(t);c&&o(c);})();},[t]);const i=t?r||n||t:e;return x(Be,{children:x(pn,{title:j(Be,{children:[!!t&&j(Be,{children:["mid: ",t," ",x("br",{})]}),!!n&&j(Be,{children:["备注: ",n," ",x("br",{}),n===r&&j(Be,{children:['P.S "备注" 与 "用户昵称" 相同, 是之前的数据, 现在你只需要填写 mid, 会自动获取昵称 ',x("br",{})]})]}),!t&&j(Be,{children:["使用用户名过滤: 用户可能改名, 建议使用 mid 过滤 ",x("br",{})]})]}),children:j("span",{className:X("inline-flex items-center justify-center",t?"cursor-pointer":"cursor-[edit]"),children:[t&&x(sG,{className:"mr-2px size-12px"}),t?x("a",{href:Sg(t),target:"_blank",style:{color:"inherit"},children:i}):i]})})})}const O3={blockContainer:"b-1px b-gate-border rounded-lg b-solid p-x-2 p-y-1 light:hover:b-gate-primary"};function U3e(){return x("div",{className:X(Fn.tabPane,"pr-15px"),children:x(Zr,{title:j(Be,{children:["内容过滤",x(gf,{configPath:"filter.enabled",className:"ml-10px"})]}),children:x(IR,{items:[{key:"recommend",label:j("span",{className:"inline-flex-center gap-x-1",children:[x(hi,{tabKey:Je.AppRecommend}),"推荐 / 热门",j(Fr,{className:"ml-1",children:["生效范围: ",x("br",{}),"视频/图文/影视: 推荐类 Tab ",x("br",{}),"UP/标题: 推荐类、热门 Tab ",x("br",{})]})]}),children:x(q3e,{})},{key:"dynamic-feed",label:j("span",{className:"inline-flex-center gap-x-1",children:[x(hi,{tabKey:Je.DynamicFeed}),"动态"]}),children:x(G3e,{})}]})})})}function q3e(){const{enabled:e,minDuration:t,minPlayCount:n,minDanmakuCount:r,hideGotoTypeBangumi:o,hideGotoTypePicture:i,byAuthor:a,byTitle:c}=qt().filter,u=d=>({label:"「已关注」豁免",tooltipProps:{color:gq},tooltip:j(Be,{children:["「已关注」内容不考虑过滤条件, 总是展示",x("br",{}),'"豁免" 一词来源'," ",x("a",{target:"_blank",href:"https://github.com/magicdawn/Bilibili-Gate/issues/1#issuecomment-2197868587",children:"pilipala"})]})});return x(Be,{children:j("div",{className:"grid grid-cols-2 gap-15px",children:[j("div",{children:[x("div",{className:Fn.settingsGroupSubTitle,children:"视频"}),j("div",{className:"flex flex-col gap-y-1",children:[j("div",{className:"flex items-center",children:[x(Nt,{configPath:"filter.minDuration.enabled",label:"按视频时长过滤",tooltip:x(Be,{children:"不显示短视频"}),disabled:!e,className:"min-w-130px"}),x(Qc,{className:"w-130px",size:"small",min:1,step:10,addonAfter:"秒",value:t.value,onChange:d=>!za(d)&&(ot.filter.minDuration.value=d),disabled:!e||!t.enabled})]}),j("div",{className:"flex items-center",children:[x(Nt,{disabled:!e,configPath:"filter.minPlayCount.enabled",label:"按播放次数过滤",tooltip:x(Be,{children:"不显示播放次数很少的视频"}),className:"min-w-130px"}),x(Qc,{className:"w-130px",size:"small",min:1,step:1e3,value:n.value,onChange:d=>!za(d)&&(ot.filter.minPlayCount.value=d),disabled:!e||!n.enabled,addonAfter:"次"})]}),j("div",{className:"flex items-center",children:[x(Nt,{disabled:!e,configPath:"filter.minDanmakuCount.enabled",label:"按弹幕条数过滤",tooltip:x(Be,{children:"不显示弹幕条数很少的视频"}),className:"min-w-130px"}),x(Qc,{className:"w-130px",size:"small",min:1,step:100,value:r.value,onChange:d=>!za(d)&&(ot.filter.minDanmakuCount.value=d),disabled:!e||!r.enabled,addonAfter:"条"})]}),x(Nt,{configPath:"filter.exemptForFollowed.video",disabled:!e,...u()})]})]}),j("div",{children:[x("div",{className:Fn.settingsGroupSubTitle,children:"图文"}),x(Nt,{configPath:"filter.hideGotoTypePicture",label:"过滤图文类型推荐",disabled:!e,className:"flex",tooltip:j(Be,{children:["过滤 ",x("kbd",{children:"goto = picture"})," 的内容: 包括 (动态 & 专栏) 等"]})}),x(Nt,{className:"flex",disabled:!e||!i,configPath:"filter.exemptForFollowed.picture",...u()}),x("div",{className:X(Fn.settingsGroupSubTitle,"mt-2"),children:"影视"}),x(Nt,{configPath:"filter.hideGotoTypeBangumi",label:"过滤影视类型推荐",tooltip:j(Be,{children:["过滤 ",x("kbd",{children:"goto = bangumi"})," 的内容: 包括 (番剧 / 电影 / 国创 / 纪录片) 等"]}),disabled:!e})]}),j("div",{className:X(O3.blockContainer,"col-span-full"),children:[j("div",{className:Fn.settingsGroupSubTitle,children:["UP",j(Fr,{children:["根据 UP 过滤视频 ",x("br",{}),"使用 mid 屏蔽时支持备注, 格式: ",x(ho,{color:"success",children:"mid(备注)"})," 如"," ",x(ho,{color:"success",children:"8047632(B站官方)"}),x("br",{}),j("div",{className:"mt-4px flex items-start",children:[x(Ej,{className:"mt-3px"}),j("div",{className:"ml-8px flex-1",children:["B站官方支持黑名单, 对于不喜欢的 UP 可以直接拉黑 ",x("br",{}),"此脚本会拉取官方黑名单, 并无视此页开关, 总是会过滤掉 ",x("br",{}),"这里是客户端过滤, 与黑名单功能重复, 优先使用黑名单功能 ",x("br",{})]})]})]}),x(gf,{configPath:"filter.byAuthor.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Gi,{placement:"left",content:j("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[j(mt,{onClick:W3e,children:[x(Hf,{}),"清理无效备注数据"]}),j(mt,{onClick:I3e,children:[x(gy,{}),"导出"]}),j(mt,{onClick:O3e,children:[x(vy,{}),"导入"]})]}),children:x(mt,{className:"icon-only-round-button size-26px",children:x(xy,{className:"size-16px"})})})]}),x(I3,{configPath:"filter.byAuthor.keywords",searchProps:{placeholder:"添加UP: 全名 / mid / mid(备注)"},disabled:!e||!a.enabled,className:"mt-2",listClassName:"max-h-130px"})]}),j("div",{className:X(O3.blockContainer,"col-span-full"),children:[j("div",{className:X(Fn.settingsGroupSubTitle),children:[x("span",{children:"标题"}),j(Fr,{children:["根据标题关键词过滤视频 ",x("br",{}),"支持普通关键字和正则(i), 语法:",x(ho,{color:"success",variant:"solid",children:"/abc|\\d+/"}),x("br",{}),"作用范围: 推荐 / 热门"]}),x(gf,{configPath:"filter.byTitle.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Gi,{placement:"left",content:j("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[j(mt,{onClick:D3e,children:[x(gy,{}),"导出"]}),j(mt,{onClick:_3e,children:[x(vy,{}),"导入"]})]}),children:x(mt,{className:"icon-only-round-button size-26px",children:x(xy,{className:"size-16px"})})})]}),x(I3,{configPath:"filter.byTitle.keywords",searchProps:{placeholder:"添加过滤关键词"},disabled:!e||!c.enabled,listClassName:"max-h-130px"})]})]})})}function G3e(){const{filter:{enabled:e,dfByTitle:t}}=qt();return j("div",{className:O3.blockContainer,children:[j("div",{className:Fn.settingsGroupSubTitle,children:[x("span",{children:"标题"}),j(Fr,{children:["支持普通关键字和正则(i), 语法:",x(ho,{color:"success",variant:"solid",children:"/abc|\\d+/"})]}),x(gf,{configPath:"filter.dfByTitle.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Gi,{placement:"left",content:j("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[j(mt,{onClick:L3e,children:[x(gy,{}),"导出"]}),j(mt,{onClick:B3e,children:[x(vy,{}),"导入"]})]}),children:x(mt,{className:"icon-only-round-button size-26px",children:x(xy,{className:"size-16px"})})})]}),x(I3,{configPath:"filter.dfByTitle.keywords",searchProps:{placeholder:"添加过滤关键词"},disabled:!e||!t.enabled})]})}async function W3e(){const e=ot.filter.byAuthor.keywords,t=await Vl(e,async n=>{const{mid:r,remark:o}=F1(n);return !r||!o||await Cg(r)!==o?n:r},1/0);return ua(t,e)?Ft.warning("没有「无效备注」数据!"):(ot.filter.byAuthor.keywords=t,Ft.success("已清理「无效备注」数据!"))}function K3e(){return j("div",{className:Fn.tabPane,children:[x(Zr,{title:"视频播放页",children:x(Nt,{configPath:"fav.useCustomFavPicker.onPlayPage",label:"使用自定义收藏弹窗",tooltip:j(Be,{children:["使用「",Ro,"」提供的选择收藏夹弹窗 ",x("br",{}),j("ul",{className:"ml-20px list-circle",children:[x("li",{children:"支持拼音搜索, 帮你快速找到收藏夹"}),x("li",{children:j("span",{className:"flex-v-center",children:["支持从收藏夹图标 或 快捷键",x("kbd",{className:X(uu,"mx-1 h-14px py-0 line-height-14px"),children:"e"}),"触发"]})})]})]})})}),x(Zr,{title:"搜索页",children:x(Nt,{configPath:"videoCard.videoPreview.addTo.searchPage",label:"浮动预览: 添加到「搜索页」",tooltip:x(Be,{children:"在搜索页的视频也添加「浮动预览」"})})})]})}function Y3e(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const X3e=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return !n||!t?r:Y3e(r,n,t)},Q3e=e=>{let{transform:t}=e;return {...t,x:0}};function NA(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Z3e(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function yb(e){return e!==null&&e>=0}function J3e(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let n=0;n{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=NA(t,r,n),a=t[o],c=i[o];return !c||!a?null:{x:c.left-a.left,y:c.top-a.top,scaleX:c.width/a.width,scaleY:c.height/a.height}},Sb={scaleX:1,scaleY:1},tMe=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const c=(t=i[n])!=null?t:r;if(!c)return null;if(o===n){const d=i[a];return d?{x:0,y:nn&&o<=a?{x:0,y:-c.height-u,...Sb}:o=a?{x:0,y:c.height+u,...Sb}:{x:0,y:0,...Sb}};function nMe(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?nr.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),y=a!=null,S=a?b.indexOf(a.id):-1,C=d?b.indexOf(d.id):-1,w=f.useRef(b),$=!J3e(b,w.current),M=C!==-1&&S===-1||$,T=eMe(i);Ga(()=>{$&&y&&m(b);},[$,b,y,m]),f.useEffect(()=>{w.current=b;},[b]);const R=f.useMemo(()=>({activeIndex:S,containerId:p,disabled:T,disableTransforms:M,items:b,overIndex:C,useDragOverlay:g,sortedRects:Z3e(b,u),strategy:o}),[S,p,T.draggable,T.droppable,M,b,C,u,g,o]);return W.createElement(bG.Provider,{value:R},t)}const oMe=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return NA(n,r,o).indexOf(t)},iMe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:c,previousContainerId:u,transition:d}=e;return !d||!r||c!==i&&o===a?false:n?true:a!==o&&t===u},aMe={duration:200,easing:"ease"},yG="transform",sMe=pf.Transition.toString({property:yG,duration:0,easing:"linear"}),lMe={roleDescription:"sortable"};function cMe(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=f.useState(null),c=f.useRef(n);return Ga(()=>{if(!t&&n!==c.current&&r.current){const u=o.current;if(u){const d=Yf(r.current,{ignoreTransform:true}),m={x:u.left-d.left,y:u.top-d.top,scaleX:u.width/d.width,scaleY:u.height/d.height};(m.x||m.y)&&a(m);}}n!==c.current&&(c.current=n);},[t,n,r,o]),f.useEffect(()=>{i&&a(null);},[i]),i}function uMe(e){let{animateLayoutChanges:t=iMe,attributes:n,disabled:r,data:o,getNewIndex:i=oMe,id:a,strategy:c,resizeObserverConfig:u,transition:d=aMe}=e;const{items:m,containerId:p,activeIndex:g,disabled:b,disableTransforms:y,sortedRects:S,overIndex:C,useDragOverlay:w,strategy:$}=f.useContext(bG),M=dMe(r,b),T=m.indexOf(a),R=f.useMemo(()=>({sortable:{containerId:p,index:T,items:m},...o}),[p,o,T,m]),I=f.useMemo(()=>m.slice(m.indexOf(a)),[m,a]),{rect:P,node:N,isOver:O,setNodeRef:_}=E2e({id:a,data:R,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...u}}),{active:L,activatorEvent:H,activeNodeRect:U,attributes:q,setNodeRef:V,listeners:z,isDragging:F,over:G,setActivatorNodeRef:Y,transform:Q}=pq({id:a,data:R,attributes:{...lMe,...n},disabled:M.draggable}),D=n$e(_,V),B=!!L,K=B&&!y&&yb(g)&&yb(C),J=!w&&F,ee=J&&K?Q:null,ne=K?ee??(c??$)({rects:S,activeNodeRect:U,activeIndex:g,overIndex:C,index:T}):null,ae=yb(g)&&yb(C)?i({id:a,items:m,activeIndex:g,overIndex:C}):T,oe=L?.id,re=f.useRef({activeId:oe,items:m,newIndex:ae,containerId:p}),ce=m!==re.current.items,he=t({active:L,containerId:p,isDragging:F,isSorting:B,id:a,index:T,items:m,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:d,wasDragging:re.current.activeId!=null}),me=cMe({disabled:!he,index:T,node:N,rect:P});return f.useEffect(()=>{B&&re.current.newIndex!==ae&&(re.current.newIndex=ae),p!==re.current.containerId&&(re.current.containerId=p),m!==re.current.items&&(re.current.items=m);},[B,ae,p,m]),f.useEffect(()=>{if(oe===re.current.activeId)return;if(oe!=null&&re.current.activeId==null){re.current.activeId=oe;return}const se=setTimeout(()=>{re.current.activeId=oe;},50);return ()=>clearTimeout(se)},[oe]),{active:L,activeIndex:g,attributes:q,data:R,rect:P,index:T,newIndex:ae,items:m,isOver:O,isSorting:B,isDragging:F,listeners:z,node:N,overIndex:C,over:G,setNodeRef:D,setActivatorNodeRef:Y,setDroppableNodeRef:_,setDraggableNodeRef:V,transform:me??ne,transition:Re()};function Re(){if(me||ce&&re.current.newIndex===T)return sMe;if(!(J&&!aA(H)||!d)&&(B||he))return pf.Transition.toString({...d,property:yG})}}function dMe(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:false}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}wn.Down,wn.Right,wn.Up,wn.Left;async function SG({removeEmpty:e=true}={}){const t=await y1({web_location:"0.0",w_webid:await fG()||""}),o=(await Jt.get("/x/relation/tags",{params:t})).data.data||[];return e?o.filter(i=>!!i.count):o}async function D3(e){const n=async c=>(await Jt.get("/x/relation/tag",{params:{mid:Yo(),tagid:e,pn:c,ps:20}})).data.data||[];let r=1,o=[],i=[];do i=await n(r),o=o.concat(i),r++;while(i.length===20);return J3(o.map(c=>c.mid))}async function fMe(){return (await Jt.get("/x/polymer/web-dynamic/v1/portal")).data?.data?.up_list||[]}var ui=(e=>(e.Mid="dyn-mid",e.GroupId="dyn-group-id",e.FilterTextFull="dyn-filter-text",e.FilterTextShort="dyn-filter",e.Offset="dyn-offset",e.MinId="dyn-min-id",e.MinTs="dyn-min-ts",e))(ui||{});const As=new URLSearchParams(location.search),Ns=As.get("dyn-mid")?.trim(),_3=As.get("dyn-group-id")?.trim()?Number(As.get("dyn-group-id").trim()):void 0,mMe=As.get("dyn-offset")||void 0,CG=Ns&&(As.get("dyn-filter-text")||As.get("dyn-filter"))||void 0,L3=Ns?As.get("dyn-min-id"):void 0,R9=L3?As.get("dyn-min-ts"):void 0,PA=Is&&(!!Ns||_3!==void 0);let B3,xG,wG;PA&&(Ns?(B3=Ns,xG=As.get("dyn-name")??B3?.toString()??void 0):_3!==void 0&&(wG=_3));var Oa=(e=>(e.All="all",e.UploadOnly="upload-only",e.DynamicOnly="dynamic-only",e))(Oa||{}),ca=(e=>(e.Upload="投稿视频",e.Dynamic="动态视频",e.ChargeOnly="充电专属",e))(ca||{});const hMe={all:"全部","upload-only":"仅投稿视频","dynamic-only":"仅动态视频"};var ou=(e=>(e.All="all",e._5m="5min",e._2m="2min",e._1m="1min",e._30s="30s",e._10s="10s",e))(ou||{});const $G={all:{label:"全部时长",duration:0},"5min":{label:"5分钟",duration:300},"2min":{label:"2分钟",duration:120},"1min":{label:"1分钟",duration:60},"30s":{label:"30秒",duration:30},"10s":{label:"10秒",duration:10}},Mp="all",vf="up:",hu="group:",pMe=(await( xH("dynamic-feed:hide-charge-only-videos-for-keys"))).set,gMe=(await( wH("dynamic-feed:add-separators"))).map,Zt=EG();function EG(){return Bn({upMid:B3,upName:xG,upFace:void 0,upList:[],upListUpdatedAt:0,groups:[],groupsUpdatedAt:0,selectedGroupId:wG,get selectedGroup(){if(typeof this.selectedGroupId=="number")return this.groups.find(e=>e.tagid===this.selectedGroupId)},dynamicFeedVideoType:"all",filterText:CG??void 0,get viewingAll(){return this.selectedKey===Mp},get viewingSomeUp(){return !!this.upMid},get viewingSomeGroup(){return typeof this.selectedGroupId=="number"},get selectedKey(){return this.upMid?`${vf}${this.upMid}`:this.selectedGroupId!==void 0?`${hu}${this.selectedGroupId}`:Mp},hideChargeOnlyVideosForKeysSet:pMe,get hideChargeOnlyVideos(){return this.hideChargeOnlyVideosForKeysSet.has(this.selectedKey)},addSeparatorsMap:gMe,get addSeparators(){return this.addSeparatorsMap.get("global")??false},filterMinDuration:"all",get filterMinDurationValue(){return $G[this.filterMinDuration].duration},updateUpList:MG,updateGroups:RG})}Bn({followGroupInfo:{}});async function MG(e=false){if(!e&&Zt.upList.length&&Zt.upListUpdatedAt&&Zt.upListUpdatedAt-Date.now()i.startsWith(hu)).length))return}!e&&Zt.groups.length&&Zt.groupsUpdatedAt&&Zt.groupsUpdatedAt-Date.now()Is&&(await hn(5e3),(!Zt.upList.length||!Zt.groups.length)&&(await w1(),TG())))();Ns&&SH(Zt,["upName","filterText","selectedGroup","viewingSomeUp","viewingAll"],({upName:e,filterText:t,selectedGroup:n,viewingSomeUp:r,viewingAll:o})=>{let i=o?"动态":r?`「${e}」的动态`:`「${n?.name}」分组动态`;t&&(i=`🔍【${t}】 - ${i}`),KT(i);});const vMe=Object.prototype.toString,bMe=e=>vMe.call(e)==="[object Error]",yMe=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function SMe(e){if(!(e&&bMe(e)&&e.name==="TypeError"&&typeof e.message=="string"))return false;const{message:n,stack:r}=e;return n==="Load failed"?r===void 0||"__sentry_captured__"in e:n.startsWith("error sending request for url")?true:yMe.has(n)}function CMe(e){if(typeof e=="number"){if(e<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(e))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(e!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function Cb(e,t,{min:n=0,allowInfinity:r=false}={}){if(t!==void 0){if(typeof t!="number"||Number.isNaN(t))throw new TypeError(`Expected \`${e}\` to be a number${r?" or Infinity":""}.`);if(!r&&!Number.isFinite(t))throw new TypeError(`Expected \`${e}\` to be a finite number.`);if(t0&&await new Promise((b,y)=>{const S=()=>{clearTimeout(C),o.signal?.removeEventListener("abort",S),y(o.signal.reason);},C=setTimeout(()=>{o.signal?.removeEventListener("abort",S),b();},g);o.unref&&C.unref?.(),o.signal?.addEventListener("abort",S,{once:true});}),o.signal?.throwIfAborted(),true}async function AG(e,t={}){if(t={...t},CMe(t.retries),Object.hasOwn(t,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");t.retries??=10,t.factor??=2,t.minTimeout??=1e3,t.maxTimeout??=Number.POSITIVE_INFINITY,t.maxRetryTime??=Number.POSITIVE_INFINITY,t.randomize??=false,t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>true,t.shouldConsumeRetry??=()=>true,Cb("factor",t.factor,{min:0,allowInfinity:false}),Cb("minTimeout",t.minTimeout,{min:0,allowInfinity:false}),Cb("maxTimeout",t.maxTimeout,{min:0,allowInfinity:true}),Cb("maxRetryTime",t.maxRetryTime,{min:0,allowInfinity:true}),t.factor>0||(t.factor=1),t.signal?.throwIfAborted();let n=0,r=0;const o=performance.now();for(;!Number.isFinite(t.retries)||r<=t.retries;){n++;try{t.signal?.throwIfAborted();const i=await e(n);return t.signal?.throwIfAborted(),i}catch(i){await $Me({error:i,attemptNumber:n,retriesConsumed:r,startTime:o,options:t})&&r++;}}throw new Error("Retry attempts exhausted without throwing an error.")}var ys=(e=>(e.Latest="pubdate",e.View="click",e.Fav="stow",e))(ys||{});const EMe={pubdate:{icon:x(ESe,{}),label:"最新发布"},click:{icon:x(ag,{}),label:"最多播放"},stow:{icon:x(df,{}),label:"最多收藏"}},MMe=40;async function RMe({mid:e,order:t="pubdate",keyword:n="",pagenum:r=1}){const i=(await Jt.get("/x/space/wbi/arc/search",{params:{mid:e,order:t,keyword:n,ps:MMe,pn:r}})).data;if(!Zn(i))throw new Error(`request json error: ${i.message}`||_p);const a=i.data.list.vlist||[],c=i.data.page.count;let u,d;{const{count:m,pn:p,ps:g}=i.data.page;u=p*gRMe(...e),{retries:5,factor:1.5,onFailedAttempt:t=>console.error(t)})}var Ba=(e=>(e.Mid="space-mid",e.GroupId="space-group-id",e.SearchText="space-search-text",e.FilterText="space-filter-text",e.InitialPage="space-initial-page",e))(Ba||{});const xg=new URLSearchParams(location.search),AMe=xg.get("space-mid")||void 0,A9=xg.get("space-group-id")||void 0,NMe=xg.get("space-search-text")||void 0,PMe=xg.get("space-filter-text")||void 0,N9=xg.get("space-initial-page")||void 0,NG=(AMe||"").split(/[,_-]/).map(e=>e.trim()).filter(Boolean).filter(e=>/^\d+$/.test(e)),PG=A9?Number(A9):void 0,z3=!!NG.length||PG!==void 0,ta=Bn({mids:NG,groupId:PG,order:ys.Latest,searchText:NMe,filterText:PMe,get isMultipleTraget(){return this.mids.length>1||this.groupId!==void 0},get allowedOrders(){return [ys.Latest,ys.View,!this.isMultipleTraget&&ys.Fav].filter(Boolean)},get usingOrder(){return this.allowedOrders.includes(this.order)?this.order:this.allowedOrders[0]}});function H1(){if(PA)return Je.DynamicFeed;if(Sy)return Je.Fav;if(z3)return Je.SpaceUpload;if(k3.get("gate-tab"))return k3.get("gate-tab")}var IG=(e=>(e.MainSwitch="gate",e.Tab="gate-tab",e))(IG||{});const k3=new URL(location.href).searchParams;function IMe(){return k3.has("gate")}function OMe(){const e=new URL(location.href);return e.search="",e.searchParams.set("gate","1"),e.href}const IA=await( WR({value:Je.AppRecommend},"video-source-tab"));{const e=H1();e&&(IA.value=e);}function OG(e){return uM.slice().sort((t,n)=>{let r=e.indexOf(t),o=e.indexOf(n);return r===-1&&(r=L$.indexOf(t)),o===-1&&(o=L$.indexOf(n)),r-o})}function OA(e){const{customTabKeysOrder:t}=qt(e);return f.useMemo(()=>OG(t),[t])}function DG(){const{hidingTabKeys:e,customTabKeysOrder:t}=qt(),n=UT(),r=f.useMemo(H1,[]),o=f.useMemo(()=>OG(t).filter(a=>a===Je.AppRecommend&&!n?true:!e.includes(a)),[e,t,n]);return r?[r]:o}function DMe(){const e=DG();return f.useMemo(()=>e.map(t=>({key:t,...Qf[t]})),[e])}function V1(){const e=St(IA).value,t=DG(),n=UT(),r=Je.AppRecommend;return !t.includes(e)||!n&&!Qf[e].anonymousUsage?r:e}function _G(){const e=f.useDeferredValue(V1()),t=tA(e),n=OA(),r=f.useMemo(()=>t?n.indexOf(e)>n.indexOf(t)?"right":"left":void 0,[n,e]);return {tab:e,prevTab:t,direction:r}}const _Me={name:"18r7nz9",styles:"height:32px;line-height:unset;--ant-border-radius:16px;&:has(:focus-visible){outline:none;outline-offset:unset;}>.ant-radio-button+span{height:100%;}"};function LG({className:e}){const t=UT(),n=V1(),r=DMe(),{__internalRecTabRenderAsSegments:o}=qt(),i=rt(u=>{if(!t&&!Qf[u].anonymousUsage&&!Vj())return aG();IA.value=u;}),a=x(Cr.Group,{optionType:"button",buttonStyle:"solid",size:"middle",value:n,className:X("inline-flex items-center",e),onFocus:u=>{u.target.blur();},onChange:u=>{const d=u.target.value;i(d);},children:r.map(({key:u,label:d})=>x(Cr.Button,{css:_Me,className:"video-source-tab",tabIndex:-1,value:u,children:j("span",{className:"h-full flex items-center line-height-unset",children:[x(hi,{tabKey:u,className:"mr-4px",active:u===n}),d]})},u))});let c;{const u=f.useMemo(()=>r.map(({key:d,label:m})=>({value:d,label:j("div",{className:"flex items-center gap-x-6px",children:[x(hi,{tabKey:d,active:d===n}),m]})})),[r,n]);c=x(yF,{size:"middle",options:u,value:n,onChange:i});}return j("div",{className:"flex-v-center",children:[o?c:a,x(Fr,{className:"ml-6px size-16px",children:x(Be,{children:r.map(({key:u,label:d,desc:m,extraHelpInfo:p})=>j(f.Fragment,{children:[j("div",{className:"h-22px flex items-center",children:[x(hi,{tabKey:u,className:"mr-4px",active:true}),d,": ",m]}),!!p&&p]},u))})})]})}function pu(e){return e.api===je.AppRecommend}function wg(e){return e.api===je.PcRecommend}function Wd(e){return e.api===je.DynamicFeed}function $g(e){return e.api===je.Watchlater}function Gl(e){return e.api===je.Fav}function LMe(e){return e.api===je.PopularGeneral}function BMe(e){return e.api===je.PopularWeekly}function DA(e){return e.api===je.Rank}function bf(e){return e.api===je.Live}function wy(e){return e.api===je.SpaceUpload}function BG(e){return e.api===je.Liked}async function zG(e,t){const n=Yo(),r=$u(),o=new URLSearchParams({fid:e,act:String(t),re_src:"11",gaia_source:"web_main",spmid:"333.999.0.0",extend_content:JSON.stringify({entity:"user",entity_id:n,fp:zMe()}),csrf:r}),a=(await Jt.post("/x/relation/modify",o)).data,c=Zn(a);return c||gn(a.message||"未知错误"),c}function zMe(){let e,t;const n=((e=window.reportObserver)===null||e===void 0||(t=e.cache)===null||t===void 0?void 0:t.fpriskMsg)||{};let r="empty";return n&&(r=`${n.webdriver}${n.screenResolution}${n.platform}${n.hardwareConcurrency}${n.deviceMemory}${n.colorDepth}${n.indexedDb}${n.language}${n.openDatabase}${n.touchSupport}${n.userAgent}`),decodeURIComponent(r)}const kMe=oo.extend("service:user:relations:blacklist"),FMe=FG("follow"),HMe=FG("remove"),kG={add:FMe,remove:HMe},{set:Rp,replaceAllWith:VMe}=await( xH("blacklist-mids"));function jMe(e){const t=St(Rp);return !!e&&t.has(e)}function FG(e){const t=e==="follow"?5:6;return async function(r){const o=await zG(r,t);if(o){const i=Rp;e==="follow"?i.add(r):e==="remove"&&i.delete(r);}return o}}async function UMe(){const t=async a=>{const u=(await Jt.get("/x/relation/blacks",{params:{re_version:0,ps:20,pn:a}})).data;if(!Zn(u))return;const d=u.data.total,m=u.data.list.map(p=>p.mid);return {total:d,mids:m}},n=await t(1);if(!n)return;const{total:r,mids:o=[]}=n;let i=o;if(r){const a=Math.ceil(r/20);for(let c=2;c<=a;c++){const{mids:u=[]}=await t(c)||{};i=i.concat(u);}}return i}(async()=>{if(!Is)return;await w1();const e=await UMe();kMe("user blocklist fetched: %o",e),e&&VMe(e.map(t=>t.toString()));})();var zi;(e=>{(t=>{t.Av="DYNAMIC_TYPE_AV",t.Draw="DYNAMIC_TYPE_DRAW",t.PgcUnion="DYNAMIC_TYPE_PGC_UNION",t.UgcSeason="DYNAMIC_TYPE_UGC_SEASON",t.Forward="DYNAMIC_TYPE_FORWARD",t.Article="DYNAMIC_TYPE_ARTICLE",t.LiveRcmd="DYNAMIC_TYPE_LIVE_RCMD";})(e.ItemType||(e.ItemType={})),(t=>{t.Normal="AUTHOR_TYPE_NORMAL",t.Pgc="AUTHOR_TYPE_PGC",t.UgcSeason="AUTHOR_TYPE_UGC_SEASON";})(e.AuthorType||(e.AuthorType={})),(t=>{t.Archive="MAJOR_TYPE_ARCHIVE",t.Opus="MAJOR_TYPE_OPUS",t.Pgc="MAJOR_TYPE_PGC",t.UgcSeason="MAJOR_TYPE_UGC_SEASON",t.LiveRcmd="MAJOR_TYPE_LIVE_RCMD";})(e.MajorType||(e.MajorType={})),(t=>{t.Goods="ADDITIONAL_TYPE_GOODS",t.Reserve="ADDITIONAL_TYPE_RESERVE";})(e.AdditionalType||(e.AdditionalType={}));})(zi||(zi={}));function Rd(e){const t=e.modules.module_dynamic.major;if(t?.type==="MAJOR_TYPE_ARCHIVE")return t.archive}const HG=23442827791579n,qMe=2251799813685247n,GMe=1n<<51n,F3=58n,VG="FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf";function _A(e){const t=["B","V","1","0","0","0","0","0","0","0","0","0"];let n=t.length-1,r=(GMe|BigInt(e))^HG;for(;r>0;)t[n]=VG[Number(r%BigInt(F3))],r=r/F3,n-=1;return [t[3],t[9]]=[t[9],t[3]],[t[4],t[7]]=[t[7],t[4]],t.join("")}function WMe(e){const t=Array.from(e);[t[3],t[9]]=[t[9],t[3]],[t[4],t[7]]=[t[7],t[4]],t.splice(0,3);const n=t.reduce((r,o)=>r*F3+BigInt(VG.indexOf(o)),0n);return Number(n&qMe^HG)}const KMe=eg(e=>j("svg",{viewBox:"0 0 24 24",fill:"currentColor",...e,children:[x("path",{d:"M12 4.99805C9.48178 4.99805 7.283 5.12616 5.73089 5.25202C4.65221 5.33949 3.81611 6.16352 3.72 7.23254C3.60607 8.4998 3.5 10.171 3.5 11.998C3.5 13.8251 3.60607 15.4963 3.72 16.76355C3.81611 17.83255 4.65221 18.6566 5.73089 18.7441C7.283 18.8699 9.48178 18.998 12 18.998C14.5185 18.998 16.7174 18.8699 18.2696 18.74405C19.3481 18.65655 20.184 17.8328 20.2801 16.76405C20.394 15.4973 20.5 13.82645 20.5 11.998C20.5 10.16965 20.394 8.49877 20.2801 7.23205C20.184 6.1633 19.3481 5.33952 18.2696 5.25205C16.7174 5.12618 14.5185 4.99805 12 4.99805zM5.60965 3.75693C7.19232 3.62859 9.43258 3.49805 12 3.49805C14.5677 3.49805 16.8081 3.62861 18.3908 3.75696C20.1881 3.90272 21.6118 5.29278 21.7741 7.09773C21.8909 8.3969 22 10.11405 22 11.998C22 13.88205 21.8909 15.5992 21.7741 16.8984C21.6118 18.7033 20.1881 20.09335 18.3908 20.23915C16.8081 20.3675 14.5677 20.498 12 20.498C9.43258 20.498 7.19232 20.3675 5.60965 20.2392C3.81206 20.0934 2.38831 18.70295 2.22603 16.8979C2.10918 15.5982 2 13.8808 2 11.998C2 10.1153 2.10918 8.39787 2.22603 7.09823C2.38831 5.29312 3.81206 3.90269 5.60965 3.75693z",fill:"currentColor"}),x("path",{d:"M14.7138 10.96875C15.50765 11.4271 15.50765 12.573 14.71375 13.0313L11.5362 14.8659C10.74235 15.3242 9.75 14.7513 9.75001 13.8346L9.75001 10.1655C9.75001 9.24881 10.74235 8.67587 11.5362 9.13422L14.7138 10.96875z",fill:"currentColor"})]})),YMe=eg(e=>j("svg",{viewBox:"0 0 24 24",fill:"currentColor",...e,children:[x("path",{d:"M12 4.99805C9.48178 4.99805 7.283 5.12616 5.73089 5.25202C4.65221 5.33949 3.81611 6.16352 3.72 7.23254C3.60607 8.4998 3.5 10.171 3.5 11.998C3.5 13.8251 3.60607 15.4963 3.72 16.76355C3.81611 17.83255 4.65221 18.6566 5.73089 18.7441C7.283 18.8699 9.48178 18.998 12 18.998C14.5185 18.998 16.7174 18.8699 18.2696 18.74405C19.3481 18.65655 20.184 17.8328 20.2801 16.76405C20.394 15.4973 20.5 13.82645 20.5 11.998C20.5 10.16965 20.394 8.49877 20.2801 7.23205C20.184 6.1633 19.3481 5.33952 18.2696 5.25205C16.7174 5.12618 14.5185 4.99805 12 4.99805zM5.60965 3.75693C7.19232 3.62859 9.43258 3.49805 12 3.49805C14.5677 3.49805 16.8081 3.62861 18.3908 3.75696C20.1881 3.90272 21.6118 5.29278 21.7741 7.09773C21.8909 8.3969 22 10.11405 22 11.998C22 13.88205 21.8909 15.5992 21.7741 16.8984C21.6118 18.7033 20.1881 20.09335 18.3908 20.23915C16.8081 20.3675 14.5677 20.498 12 20.498C9.43258 20.498 7.19232 20.3675 5.60965 20.2392C3.81206 20.0934 2.38831 18.70295 2.22603 16.8979C2.10918 15.5982 2 13.8808 2 11.998C2 10.1153 2.10918 8.39787 2.22603 7.09823C2.38831 5.29312 3.81206 3.90269 5.60965 3.75693z",fill:"currentColor"}),x("path",{d:"M15.875 10.75L9.875 10.75C9.46079 10.75 9.125 10.4142 9.125 10C9.125 9.58579 9.46079 9.25 9.875 9.25L15.875 9.25C16.2892 9.25 16.625 9.58579 16.625 10C16.625 10.4142 16.2892 10.75 15.875 10.75z",fill:"currentColor"}),x("path",{d:"M17.375 14.75L11.375 14.75C10.9608 14.75 10.625 14.4142 10.625 14C10.625 13.5858 10.9608 13.25 11.375 13.25L17.375 13.25C17.7892 13.25 18.125 13.5858 18.125 14C18.125 14.4142 17.7892 14.75 17.375 14.75z",fill:"currentColor"}),x("path",{d:"M7.875 10C7.875 10.4142 7.53921 10.75 7.125 10.75L6.625 10.75C6.21079 10.75 5.875 10.4142 5.875 10C5.875 9.58579 6.21079 9.25 6.625 9.25L7.125 9.25C7.53921 9.25 7.875 9.58579 7.875 10z",fill:"currentColor"}),x("path",{d:"M9.375 14C9.375 14.4142 9.03921 14.75 8.625 14.75L8.125 14.75C7.71079 14.75 7.375 14.4142 7.375 14C7.375 13.5858 7.71079 13.25 8.125 13.25L8.625 13.25C9.03921 13.25 9.375 13.5858 9.375 14z",fill:"currentColor"})]})),XMe=eg(function(e){return j("svg",{viewBox:"0 0 16 16",fill:"currentColor",...e,children:[x("path",{d:"M8.624933333333333 13.666666666666666C8.624933333333333 14.011849999999999 8.345125 14.291666666666666 7.999933333333333 14.291666666666666C4.525166666666666 14.291666666666666 1.7082933333333332 11.474791666666665 1.7082933333333332 8C1.7082933333333332 6.013308333333333 2.629825 4.2414233333333335 4.066321666666667 3.089385C4.335603333333333 2.8734283333333335 4.728959999999999 2.9166533333333335 4.944915 3.1859349999999997C5.160871666666666 3.4552099999999997 5.1176466666666665 3.848573333333333 4.848366666666666 4.0645283333333335C3.694975 4.98953 2.9582933333333328 6.40852 2.9582933333333328 8C2.9582933333333328 10.784416666666667 5.215528333333333 13.041666666666666 7.999933333333333 13.041666666666666C8.345125 13.041666666666666 8.624933333333333 13.321483333333333 8.624933333333333 13.666666666666666zM11.060475 12.810558333333333C10.844225000000002 12.541558333333331 10.887033333333335 12.148125 11.156041666666667 11.931875C12.306858333333333 11.006775 13.041599999999999 9.589424999999999 13.041599999999999 8C13.041599999999999 5.215561666666666 10.784408333333332 2.958333333333333 7.999933333333333 2.958333333333333C7.6548083333333325 2.958333333333333 7.374933333333333 2.6785083333333333 7.374933333333333 2.333333333333333C7.374933333333333 1.9881533333333332 7.6548083333333325 1.7083333333333333 7.999933333333333 1.7083333333333333C11.474725000000001 1.7083333333333333 14.291599999999999 4.525206666666667 14.291599999999999 8C14.291599999999999 9.984108333333333 13.372483333333332 11.753958333333332 11.939225 12.906125C11.670166666666663 13.122375 11.276725 13.079625 11.060475 12.810558333333333z",fill:"currentColor"}),x("path",{d:"M1.375 3.4130866666666666C1.375 3.0679066666666666 1.654825 2.7880866666666666 2 2.7880866666666666L4.333333333333333 2.7880866666666666C4.862608333333333 2.7880866666666666 5.291666666666666 3.2171449999999995 5.291666666666666 3.7464199999999996L5.291666666666666 6.079753333333334C5.291666666666666 6.424928333333334 5.011841666666666 6.704736666666666 4.666666666666666 6.704736666666666C4.321491666666667 6.704736666666666 4.041666666666666 6.424928333333334 4.041666666666666 6.079753333333334L4.041666666666666 4.038086666666667L2 4.038086666666667C1.654825 4.038086666666667 1.375 3.7582616666666664 1.375 3.4130866666666666z",fill:"currentColor"}),x("path",{d:"M14.625 12.5864C14.625 12.931591666666666 14.345183333333333 13.2114 14 13.2114L11.666666666666666 13.2114C11.137408333333335 13.2114 10.708333333333332 12.782383333333332 10.708333333333332 12.253066666666665L10.708333333333332 9.919733333333333C10.708333333333332 9.574608333333334 10.98815 9.294733333333333 11.333333333333332 9.294733333333333C11.678516666666667 9.294733333333333 11.958333333333332 9.574608333333334 11.958333333333332 9.919733333333333L11.958333333333332 11.9614L14 11.9614C14.345183333333333 11.9614 14.625 12.241275000000002 14.625 12.5864z",fill:"currentColor"})]})});function $y(e){if(!e)return 0;const t=[1,60,360];return e.split(":").map(Number).reverse().reduce((o,i,a)=>o+i*t[a],0)}function Hs(e){return e||=0,qn.duration(e||0,"seconds").format(e>=3600?"HH:mm:ss":"mm:ss")}function QMe(e){if(!e)return typeof e=="number"?"0":e;if(e<=9999)return e.toString();const t=n=>n.replace(/\.0$/,"");if(e/=1e4,e<=9999)return `${t(e.toFixed(1))}万`;if(e/=1e4,e<=9999)return `${t(e.toFixed(1))}亿`;console.warn(`formatCount(count = ${e}); can not handle input`);}function Gc(e){if(e){if(e==="-")return 0;if(/^\d+$/.test(e))return Number(e);if(/^\d+(?:\.\d+)?万$/.test(e))return Number(e.slice(0,-1))*1e4;if(/^\d+(?:\.\d+)?亿$/.test(e))return Number(e.slice(0,-1))*1e8}}const ZMe=qn().format("YYYY");function i0(e,t=false){if(!e)return "";const n=qn.unix(e),r=t?" HH:mm":"";return n.format("YYYY")===ZMe?n.format(`M-D${r}`):n.format(`YY-M-D${r}`)}function JMe(e){const t=qn().subtract(1,"day").startOf("day").unix();return e>=t}function eRe(e,t){if(!e)return;const n=qn.unix(e),r=n.format("YYYY-MM-DD")===qn().format("YYYY-MM-DD"),o=r&&Date.now()-e*1e3<=ao("12h"),i=n.format("YYYY-MM-DD")===qn().subtract(1,"day").format("YYYY-MM-DD"),a=n.format("YYYY")===qn().format("YYYY");if(o){const c=qn().diff(n,"minutes"),u=qn().diff(n,"hours");return c<1?"刚刚":c<60?`${c}分钟前`:`${u}小时前`}return r?n.format("今天 HH:mm"):i?n.format("昨天 HH:mm"):a?n.format("M月D日"):n.format("YYYY年M月D日")}const tRe={1:"橙色通过",0:"开放浏览","-1":"待审","-2":"被打回","-3":"网警锁定","-4":"被锁定","-5":"管理员锁定","-6":"修复待审","-7":"暂缓审核","-8":"补档待审","-9":"等待转码","-10":"延迟审核","-11":"视频源待修","-12":"转储失败","-13":"允许评论待审","-14":"临时回收站","-15":"分发中","-16":"转码失败","-20":"创建未提交","-30":"创建已提交","-40":"定时发布","-100":"用户删除"};function nRe(e){if(e!==void 0&&!(e>=0))return tRe[e]}const rRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M27.6 18.6v-7.2A5.4 5.4 0 0 0 22.2 6L15 22.2V42h20.916a3.6 3.6 0 0 0 3.6-3.06L42 22.74a3.6 3.6 0 0 0-3.6-4.14zM15 22h-4.806C8.085 21.963 6.283 23.71 6 25.8v12.6a4.16 4.16 0 0 0 4.194 3.6H15z"})]}),oRe=f.forwardRef(rRe),iRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})]}),aRe=f.forwardRef(iRe),sRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m6 0h6m-6 3h6M9 8l3 4.5"}),x("path",{d:"m15 8l-3 4.5V17"})]})]}),lRe=f.forwardRef(sRe),cRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 36c11.046 0 20-12 20-12s-8.954-12-20-12S4 24 4 24s8.954 12 20 12Z"}),x("path",{d:"M24 29a5 5 0 1 0 0-10a5 5 0 0 0 0 10Z"})]})]}),uRe=f.forwardRef(cRe),dRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.501S11.659 20.922 7.7 19z"})]}),fRe=f.forwardRef(dRe),mRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"m15 14l4-4l-4-4"}),x("path",{d:"M19 10H8a4 4 0 1 0 0 8h1"})]})]}),hRe=f.forwardRef(mRe);const P9="size-18px",Pc="size-16px",pRe={play:x(KMe,{className:P9}),danmaku:x(YMe,{className:P9}),like:x(oRe,{className:Pc}),"bangumi:follow":x(aRe,{className:Pc}),favorite:x(df,{className:Pc}),coin:x(lRe,{className:Pc}),"live:viewed-by":x(uRe,{className:Pc}),"dynamic-feed:comment":x(fRe,{className:Pc}),"dynamic-feed:forward":x(hRe,{className:Pc})},gRe=f.memo(function({field:e,value:t}){const n=f.useMemo(()=>typeof t=="number"||t&&/^\d+$/.test(t)?QMe(Number(t))??ZD:t??ZD,[t]),r=pRe[e];return j("span",{"data-field":e,className:"bili-video-card__stats--item gap-x-2px mr-0!",children:[r,x("span",{className:X("bili-video-card__stats--text line-height-18px"),children:n})]})});var Il=(e=>(e.AV="av",e.Ad="ad",e.Live="live",e))(Il||{});function vRe(e){const{major:t,additional:n}=e.modules.module_dynamic;if(n?.type===zi.AdditionalType.Goods)return true;if(t?.type===zi.MajorType.Opus){const r=t.opus.title||"";if(["B站密令","大红包"].some(o=>r.includes(o)))return true}return false}function jG(e){if(vRe(e))return;const t=e.modules.module_dynamic.major;if(!t)return;const n=e.modules.module_author,r=e.modules.module_dynamic.additional,o=t.type,i={authorName:n.name,authorFace:n.face,authorMid:n.mid.toString(),followed:n.following,pubts:n.pub_ts,statItems:[{field:"like",value:e.modules.module_stat.like.count},{field:"dynamic-feed:comment",value:e.modules.module_stat.comment.count},{field:"dynamic-feed:forward",value:e.modules.module_stat.forward.count}],recommendReason:n.pub_action};if(o===zi.MajorType.Archive&&t.archive){const a=t.archive;return {...i,avid:a.aid,bvid:a.bvid,goto:"av",href:`/video/${a.bvid}/`,title:a.title,cover:a.cover,duration:$y(a.duration_text)||0,durationStr:a.duration_text,recommendReason:a.badge.text===ca.Upload?a.badge.text:void 0,topMarkIcon:a.badge.text===ca.Upload?void 0:a.badge.icon_url??void 0,topMarkText:a.badge.text===ca.Upload?void 0:a.badge.text,statItems:[{field:"play",value:a.stat.play},{field:"danmaku",value:a.stat.danmaku}],play:Gc(a.stat.play),danmaku:Gc(a.stat.danmaku)}}if(o===zi.MajorType.Opus&&t.opus){const{opus:a}=t,c=!!a.pics?.length,u=r?.type===zi.AdditionalType.Reserve,d=u&&/直播预告/.test(r.reserve.title),m=(()=>{if(d)return "直播预告";if(u)return r.reserve.title?.split(":")[0]||"预约";if(e.type===zi.ItemType.Draw)return c?"图片":"文字动态";if(e.type===zi.ItemType.Article)return "专栏"})();return {...i,goto:"opus",href:a.jump_url,cover:a.pics?.[0]?.url,title:a.title||a.summary?.text||"",topMarkText:m}}if(o===zi.MajorType.Pgc&&t.pgc){const{pgc:a}=t;return {...i,cover:a.cover,goto:"bangumi",href:a.jump_url,title:a.title,statItems:[{field:"play",value:a.stat.play},{field:"danmaku",value:a.stat.danmaku}],topMarkText:n.label,pubts:n.pub_ts,pubdateDisplay:n.pub_time}}if(o===zi.MajorType.UgcSeason&&t.ugc_season){const{ugc_season:a}=t;return {...i,bvid:a.bvid,avid:a.aid.toString(),goto:"av",duration:$y(a.duration_text),durationStr:a.duration_text,cover:a.cover,href:`/video/${a.bvid}/`,title:a.title,statItems:[{field:"play",value:a.stat.play},{field:"danmaku",value:a.stat.danmaku}],play:Gc(a.stat.play),danmaku:Gc(a.stat.danmaku),recommendReason:n.pub_action,topMarkText:"合集",authorMid:void 0}}}const UG=x(Hl,{className:"[&.ant-divider-horizontal.ant-divider-with-text]:my-5px [&.ant-divider-horizontal.ant-divider-with-text]:text-14px",children:"底线"});function LA(e){const{enableSidebar:t}=qt(),{usingTwoColumnMode:n}=Rq(),r=St(Vo).subtab,{insideModal:o}=Ki();return f.useMemo(()=>!t||o&&n?false:e===Je.DynamicFeed?!Ns:e===Je.Hot?r===ur.Rank:e===Je.Fav,[e,t,r,o,n])}function qG(e,t){const n=f.useRef(null),r=rt(a=>{if(a||=t,!a)return;const c=n.current?.menu?.findItem({key:a});if(c)return c.scrollIntoViewIfNeeded?c.scrollIntoViewIfNeeded():c.scrollIntoView(),true}),o=f.useRef(false),i=rt(()=>{if(o.current)return;r()&&(o.current=true);});return no(()=>i()),Ts(()=>i(),[e]),{menuRef:n,revealSelected:r}}var GG=function(e){return function(t,n,r){return e(t,n,r)*r}},H3=function(e,t){if(e)throw Error("Invalid sort config: "+t)},WG=function(e){var t=e||{},n=t.asc,r=t.desc,o=n?1:-1,i=n||r;H3(!i,"Expected `asc` or `desc` property"),H3(n&&r,"Ambiguous object with `asc` and `desc` config properties");var a=e.comparer&&GG(e.comparer);return {order:o,sortBy:i,comparer:a}},bRe=function(e){return function t(n,r,o,i,a,c,u){var d,m;if(typeof n=="string")d=c[n],m=u[n];else if(typeof n=="function")d=n(c),m=n(u);else {var p=WG(n);return t(p.sortBy,r,o,p.order,p.comparer||e,c,u)}var g=a(d,m,i);return (g===0||d==null&&m==null)&&r.length>o?t(r[o],r,o+1,i,a,c,u):g}};function KG(e,t,n){if(e===void 0||e===true)return function(i,a){return t(i,a,n)};if(typeof e=="string")return H3(e.includes("."),"String syntax not allowed for nested properties."),function(i,a){return t(i[e],a[e],n)};if(typeof e=="function")return function(i,a){return t(e(i),e(a),n)};if(Array.isArray(e)){var r=bRe(t);return function(i,a){return r(e[0],e,1,n,t,i,a)}}var o=WG(e);return KG(o.sortBy,o.comparer||t,o.order)}var i$=function(e,t,n,r){var o;return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(o=n,n=o[0]),t.sort(KG(n,r,e))):t};function YG(e){var t=GG(e.comparer);return function(n){var r=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return {asc:function(o){return i$(1,r,o,t)},desc:function(o){return i$(-1,r,o,t)},by:function(o){return i$(1,r,o,t)}}}}var XG=function(e,t,n){return e==null?n:t==null?-n:typeof e!=typeof t?typeof et?1:0},QG=YG({comparer:XG});YG({comparer:XG,inPlaceSorting:true});function Ey(e,t,n){if(t.length!==n.length)throw new Error("props & orders length not match");const r=t.map((o,i)=>{const a=n[i];return a==="asc"?{asc:o}:a==="desc"?{desc:o}:{asc:o,comparer:a}});return QG(e).by(r)}function ZG(e,t){const n=t.map(({order:r,prop:o})=>r==="asc"?{asc:o}:r==="desc"?{desc:o}:{asc:o,comparer:r});return QG(e).by(n)}const kn=Bn({multiSelecting:false,selectedIdSet:$r(),shiftMultiSelectAnchorUniqId:void 0});function yRe(){const{multiSelecting:e}=St(kn);return e}function SRe(e){const{multiSelecting:t,selectedIdSet:n}=St(kn);return t&&!!e&&n.has(e)}const My=[];function Ps(){return My.at(-1)?.items??[]}function CRe(e){const t=My.at(-1);t&&(t.items=e);}function xRe(){no(()=>(My.push({items:[]}),()=>{My.pop();}));}function j1(){const{multiSelecting:e,selectedIdSet:t}=kn;return e?Ps().filter(n=>t.has(n.uniqId)):[]}function wRe(){return j1().map(Mg)}function BA(){const{multiSelecting:e}=kn;let t=e?j1():Ps();return e&&!t.length&&(t=Ps()),t.map(Mg).toReversed()}function zA(){const t=BA().map(n=>n.bvid).join(" ");nu(t,1);}function kA(e){let{bvid:t,authorName:n,pubts:r,title:o}=e;const i=qn.unix(r??0).format("YYYY-MM-DD");return o=o.replaceAll(/\n+/g," "),`${t} ;; [${n}] ${i} ${o}`}function FA(){const t=BA().map(kA).join(` `);nu(t,1);}function $Re(){const t=wRe().map(n=>{let r=n.href;if(r)return r.startsWith("/")&&(r=new URL(r,location.href).href),r}).filter(Boolean).join(` `);nu(t);}function ERe(e,t){const{multiSelecting:n,selectedIdSet:r}=kn;if(!n||!e||!t||e===t)return;const o=Ps(),i=o.findIndex(g=>g.uniqId===e),a=o.findIndex(g=>g.uniqId===t),c=g=>g>=0&&g<=o.length-1;if(!c(i)||!c(a))return;const u=[i,a],[d,m]=Ey(u,[g=>g],["asc"]),p=r.has(e);for(let g=d;g<=m;g++){const b=Ps()[g].uniqId;p?r.add(b):r.delete(b);}}const MRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M2 10h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1m9-9h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1m0 9a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm0-10a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM2 9a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zm7 2a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2zM0 2a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm5.354.854a.5.5 0 1 0-.708-.708L3 3.793l-.646-.647a.5.5 0 1 0-.708.708l1 1a.5.5 0 0 0 .708 0z"})]}),RRe=f.forwardRef(MRe),TRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M9.854 5.854a.5.5 0 0 0-.708-.708L6.5 7.793L5.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0zM2 4.5A2.5 2.5 0 0 1 4.5 2h5A2.5 2.5 0 0 1 12 4.5v5A2.5 2.5 0 0 1 9.5 12h-5A2.5 2.5 0 0 1 2 9.5zM4.5 3A1.5 1.5 0 0 0 3 4.5v5A1.5 1.5 0 0 0 4.5 11h5A1.5 1.5 0 0 0 11 9.5v-5A1.5 1.5 0 0 0 9.5 3zM7 14a2.5 2.5 0 0 1-2-1h4.5A3.5 3.5 0 0 0 13 9.5V4c.607.456 1 1.182 1 2v3.5A4.5 4.5 0 0 1 9.5 14z"})]}),ARe=f.forwardRef(TRe),NRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z"})]}),PRe=f.forwardRef(NRe),IRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 512 512",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 0 0-40-40H88a40 40 0 0 0-40 40v240a40 40 0 0 0 40 40h192a40 40 0 0 0 40-40v-40m64-160l80 80l-80 80m-193-80h273"})]}),ORe=f.forwardRef(IRe);function JG({iconOnly:e,addCopyActions:t=false}){const{multiSelecting:n}=St(kn),r=Uf(),o=rt(()=>{kn.multiSelecting||(kn.shiftMultiSelectAnchorUniqId=void 0,ot.multiSelect.clearWhenExit&&kn.selectedIdSet.clear());}),i=j(mt,{type:n?"primary":"default",className:X(e?"icon-only-round-button":"inline-flex-center"),onClick:()=>{kn.multiSelecting=!kn.multiSelecting,o();},children:[x(RRe,{className:"size-12px"}),!e&&j(Be,{children:["多选",kn.multiSelecting?"中":""]})]}),a=c=>x(Gi,{styles:{container:{border:`1px solid ${r}`}},content:j("div",{className:"max-w-288px",children:[j("div",{className:"flex items-start gap-x-6px",children:[x(Ej,{className:"mt-1 size-14px"}),j("div",{className:"flex-1 break-all",children:["使用 ",x("kbd",{className:X(uu,"mx-1"),children:"Shift"})," 键扩选: 切换选中状态后, 按住"," ",x("kbd",{className:X(uu,"mx-1"),children:"Shift"}),"键再选择区间终点, 整个区间会与起点选中状态同步."]})]}),x(Hl,{variant:"solid",className:"my-7px"}),j("div",{className:"flex flex-wrap items-center gap-x-15px gap-y-2px",children:[j(mt,{className:"inline-flex items-center",onClick:()=>kn.selectedIdSet.clear(),children:[x(Hf,{className:"size-18px"}),"清空"]}),j(mt,{className:"inline-flex items-center",onClick:()=>{const u=Ps().map(d=>d.uniqId);kn.selectedIdSet=$r(u);},children:[x(ARe,{className:"size-18px"}),"全选"]}),j(mt,{className:"inline-flex items-center",onClick:()=>{const u=Ps().filter(d=>!kn.selectedIdSet.has(d.uniqId)).map(d=>d.uniqId);kn.selectedIdSet=$r(u);},children:[x(PRe,{className:"size-18px"}),"反选"]}),x("div",{className:"flex-basis-100%"}),j(mt,{className:"inline-flex items-center",onClick:()=>{kn.multiSelecting=false,o();},children:[x(ORe,{className:"size-18px"}),"退出"]}),x(Nt,{configPath:"multiSelect.clearWhenExit",label:"退出时清空",tooltip:"退出多选时, 清空所有已选择项"})]}),t&&j(Be,{children:[x(Hl,{variant:"solid",className:"my-7px"}),x("div",{className:"flex flex-wrap gap-x-10px gap-y-5px",children:x(eW,{showCopyBvidInfo:true})})]})]}),children:c});return n?a(i):e?x(pn,{title:"多选",arrow:false,children:i}):i}const DRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[j("path",{strokeDasharray:20,d:"M12 4h2v6h2.5l-4.5 4.5M12 4h-2v6h-2.5l4.5 4.5",children:[x("animate",{attributeName:"d",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"M12 4h2v6h2.5l-4.5 4.5M12 4h-2v6h-2.5l4.5 4.5;M12 4h2v3h2.5l-4.5 4.5M12 4h-2v3h-2.5l4.5 4.5;M12 4h2v6h2.5l-4.5 4.5M12 4h-2v6h-2.5l4.5 4.5"}),x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.5s",values:"20;0"})]}),x("path",{strokeDasharray:14,strokeDashoffset:14,d:"M6 19h12",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.5s",dur:"0.2s",to:0})})]})]}),_Re=f.forwardRef(DRe);function eW({showCopyBvidInfo:e}){const{__internalEnableCopyBvidInfo:t}=qt();return j(Be,{children:[j(mt,{onClick:zA,className:"inline-flex-center",children:[x(tu,{})," 复制 BVID"]}),(e??t)&&j(mt,{onClick:FA,className:"inline-flex-center",children:[x(tu,{})," 复制 BVID 信息"]})]})}function Eg(){const{__internalAddTabbarCopyBvidButton:e}=qt();return e?x("div",{className:"flex items-center gap-x-2",children:j(Po,{theme:{components:{Button:{paddingInline:6}}},children:[x(LRe,{}),x(JG,{iconOnly:false}),x(eW,{})]})}):null}function LRe(){const e=f.useMemo(tW,[]),{recSharedEmitter:t}=Ki(),n=Va(()=>t.emit("load-to-end"),{manual:true});return e&&j(mt,{className:"flex items-center gap-x-1",loading:n.loading,onClick:()=>n.run(),children:[!n.loading&&x(_Re,{className:"size-18px"}),"加载全部"]})}function tW(){const e=H1();return !!e&&[Je.DynamicFeed,Je.SpaceUpload].includes(e)}function HA(e){return e.replace(/([A-Z])/,"999999$1").replace(/([a-z])/,"999998$1")}function VA(e,t){return e.localeCompare(t,"zh-CN")}function I9(e,t){return ZG(e,[{prop:n=>{const r=typeof t=="function"?t(n):n[t];return HA(r)},order:VA}])}const nW={overscrollBehavior:"contain",maxHeight:"60vh",overflowY:"scroll",scrollbarWidth:"thin",paddingRight:"12px"},BRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13"})]}),zRe=f.forwardRef(BRe),kRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("rect",{width:8,height:5,x:14,y:17,rx:1}),x("path",{d:"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5"}),x("path",{d:"M20 17v-2a2 2 0 1 0-4 0v2"})]})]}),FRe=f.forwardRef(kRe),HRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"})]}),VRe=f.forwardRef(HRe),jRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 512 512",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"m434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"}),x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"m160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"})]}),URe=f.forwardRef(jRe),rW=zRe,jA=FRe,UA=VRe,U1=URe;function oW(e){const{folders:t,collections:n,selectedKey:r}=St(mn),o=bo();return {menuItems:f.useMemo(()=>{const a=[],c=$X(n,d=>d.upper.name);let u=Object.entries(c).map(([d,m])=>({upName:d,collections:I9(m,"title")}));u=I9(u,"upName");for(const{upName:d,collections:m}of u){const p=m[0]?.upper.mid,g=p?Sg(p):"#";a.push(...di([{type:"group",label:j("span",{className:"flex items-center gap-x-2px",children:[x(Ci,{className:"mt-2px size-15px flex-none"}),j("a",{target:"_blank",href:g,children:["@",d]})]}),children:m.map(b=>{const y=`fav-collection:${b.id}`,S=j("span",{className:"ml-8px flex items-center gap-x-2px",children:[x(U1,{className:"size-15px flex-none"}),b.title," (",b.media_count,")"]});return {key:y,label:S,title:`${b.title} (${b.media_count})`,async onClick(){mn.selectedFavFolderId=void 0,mn.selectedFavCollectionId=b.id,e?.(),await hn(100),o();}}})}]));}return di([{key:"all",icon:x(rW,{}),label:"全部",async onClick(){mn.selectedFavFolderId=void 0,mn.selectedFavCollectionId=void 0,e?.(),await hn(100),o();}},!!t.length&&{type:"group",label:"收藏夹",children:t.map(d=>{pA(d.attr);const m=gA(d.attr),p=`fav-folder:${d.id}`,g=m?x(jA,{}):x(UA,{}),b=`${d.title} (${d.media_count})`;return {key:p,icon:g,label:b,async onClick(){mn.selectedFavFolderId=d.id,mn.selectedFavCollectionId=void 0,e?.(),await hn(100),o();}}})},!!n.length&&{type:"group",label:"合集",children:a}])},[t,n]),selectedKey:r}}function qRe({extraContent:e}){const{fav:t,enableSidebar:n}=qt(),{selectedFavFolder:r,selectedFavCollection:o,selectedLabel:i,selectedKey:a}=St(mn),c=bo(),{ref:u,getPopupContainer:d}=Eu();no(()=>{CA();}),Ts(()=>{(async()=>(await hn(100),c()))();},[t.addSeparator]);const[m,p]=f.useState(false),{menuItems:g}=oW(()=>{p(false);}),b="relative top-[-0.5px] size-15px",y=r?gA(r.attr)?x(jA,{className:b}):x(UA,{className:b}):o?x(U1,{className:b}):x(rW,{className:b}),S=i,C=x(nc,{open:m,onOpenChange:p,placement:"bottomLeft",getPopupContainer:d,menu:{items:g,style:{...nW,border:`1px solid ${Uf()}`},selectedKeys:[a]},children:x(mt,{css:[m&&jf,"",""],children:j("span",{className:"h-full flex items-center gap-x-4px",children:[y,S]})})});return j("div",{ref:u,className:"flex items-center gap-x-10px",children:[!n&&C,e,x(Eg,{})]})}function GRe({allFavFolderServices:e,state:t}){const{fav:n}=qt(),r=bo(),{ref:o,getPopupContainer:i}=Eu(),{totalCountInFavFolders:a}=St(t),[c,u]=f.useState(false),d=rt((g,b,y)=>{u(true),ot.fav.excludedFolderIds=g.map(S=>S.toString());}),m=f.useMemo(()=>e.filter(g=>!n.excludedFolderIds.includes(g.entry.id.toString())).length,[e,n.excludedFolderIds]),p=rt(g=>{g?u(false):c&&r();});return x(Gi,{getTooltipContainer:i,trigger:"click",placement:"bottom",onOpenChange:p,getPopupContainer:g=>g.parentElement||document.body,content:x(Be,{children:x(f1,{dataSource:e,rowKey:g=>g.entry.id.toString(),titles:["收藏夹","忽略"],targetKeys:n.excludedFolderIds,onChange:d,render:g=>g.entry.title,oneWay:true,style:{marginBottom:10}})}),children:j(ho,{ref:o,color:"success",className:"mx-0 cursor-pointer text-size-12px",children:["收藏夹(",m,") 收藏(",a,")"]})})}function WRe(){const{menuItems:e,selectedKey:t}=oW(),{menuRef:n}=qG(e,t);return j(Be,{children:[x(tc,{ref:n,items:e,selectedKeys:[t],mode:"inline",inlineIndent:10}),UG]})}var Da=(e=>(e[e.Offline=0]="Offline",e[e.Streaming=1]="Streaming",e[e.Rolling=2]="Rolling",e))(Da||{});class qA extends Map{#n=0;#e=new Map;#t=new Map;#o;#a;#i;constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.#o=t.maxSize,this.#a=t.maxAge||Number.POSITIVE_INFINITY,this.#i=t.onEviction;}get __oldCache(){return this.#t}#s(t){if(typeof this.#i=="function")for(const[n,r]of t)this.#i(n,r.value);}#r(t,n){return typeof n.expiry=="number"&&n.expiry<=Date.now()?(typeof this.#i=="function"&&this.#i(t,n.value),this.delete(t)):false}#f(t,n){if(this.#r(t,n)===false)return n.value}#c(t,n){return n.expiry?this.#f(t,n):n.value}#u(t,n){const r=n.get(t);return this.#c(t,r)}#d(t,n){this.#e.set(t,n),this.#n++,this.#n>=this.#o&&(this.#n=0,this.#s(this.#t),this.#t=this.#e,this.#e=new Map);}#m(t,n){this.#t.delete(t),this.#d(t,n);}*#l(){for(const t of this.#t){const[n,r]=t;this.#e.has(n)||this.#r(n,r)===false&&(yield t);}for(const t of this.#e){const[n,r]=t;this.#r(n,r)===false&&(yield t);}}get(t){if(this.#e.has(t)){const n=this.#e.get(t);return this.#c(t,n)}if(this.#t.has(t)){const n=this.#t.get(t);if(this.#r(t,n)===false)return this.#m(t,n),n.value}}set(t,n,{maxAge:r=this.#a}={}){const o=typeof r=="number"&&r!==Number.POSITIVE_INFINITY?Date.now()+r:void 0;return this.#e.has(t)?this.#e.set(t,{value:n,expiry:o}):this.#d(t,{value:n,expiry:o}),this}has(t){return this.#e.has(t)?!this.#r(t,this.#e.get(t)):this.#t.has(t)?!this.#r(t,this.#t.get(t)):false}peek(t){if(this.#e.has(t))return this.#u(t,this.#e);if(this.#t.has(t))return this.#u(t,this.#t)}expiresIn(t){const n=this.#e.get(t)??this.#t.get(t);if(n)return n.expiry?n.expiry-Date.now():Number.POSITIVE_INFINITY}delete(t){const n=this.#e.delete(t);return n&&this.#n--,this.#t.delete(t)||n}clear(){this.#e.clear(),this.#t.clear(),this.#n=0;}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const n=[...this.#l()],r=n.length-t;r<0?(this.#e=new Map(n),this.#t=new Map,this.#n=n.length):(r>0&&this.#s(n.slice(0,r)),this.#t=new Map(n.slice(r)),this.#e=new Map,this.#n=0),this.#o=t;}evict(t=1){const n=Number(t);if(!n||n<=0)return;const r=[...this.#l()],o=Math.trunc(Math.min(n,Math.max(r.length-1,0)));o<=0||(this.#s(r.slice(0,o)),this.#t=new Map(r.slice(o)),this.#e=new Map,this.#n=0);}*keys(){for(const[t]of this)yield t;}*values(){for(const[,t]of this)yield t;}*[Symbol.iterator](){for(const t of this.#e){const[n,r]=t;this.#r(n,r)===false&&(yield [n,r.value]);}for(const t of this.#t){const[n,r]=t;this.#e.has(n)||this.#r(n,r)===false&&(yield [n,r.value]);}}*entriesDescending(){let t=[...this.#e];for(let n=t.length-1;n>=0;--n){const r=t[n],[o,i]=r;this.#r(o,i)===false&&(yield [o,i.value]);}t=[...this.#t];for(let n=t.length-1;n>=0;--n){const r=t[n],[o,i]=r;this.#e.has(o)||this.#r(o,i)===false&&(yield [o,i.value]);}}*entriesAscending(){for(const[t,n]of this.#l())yield [t,n.value];}get size(){if(!this.#n)return this.#t.size;let t=0;for(const n of this.#t.keys())this.#e.has(n)||t++;return Math.min(this.#n+t,this.#o)}get maxSize(){return this.#o}get maxAge(){return this.#a}entries(){return this.entriesAscending()}forEach(t,n=this){for(const[r,o]of this.entriesAscending())t.call(n,o,r,this);}get[Symbol.toStringTag](){return "QuickLRU"}toString(){return `QuickLRU(${this.size}/${this.maxSize})`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}const KRe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2M9 10h.01M15 10h.01M9.5 15.05a3.5 3.5 0 0 1 5 0"})]}),YRe=f.forwardRef(KRe);function XRe(e){return e instanceof Error&&e.name==="AxiosError"}function xb(e){return e&&x("p",{className:"mt-10px",children:e})}function iW(e){if(!(e instanceof Error))return xb(JSON.stringify(e));let t,n,r;if(e.stack?t=j(Be,{children:["Error Stack: ",x("br",{}),e.stack]}):t=j(Be,{children:["Error Message: ",e.message]}),e.cause&&(n=j(Be,{children:["Error Cause: ",iW(e.cause)]})),XRe(e)){const o=Xd(e);o.config?.params?.access_key&&(o.config.params.access_key="*".repeat(o.config.params.access_key.length)),r=j(Be,{children:["axios config: ",JSON.stringify(o.config,null,2)]});}return j(Be,{children:[xb(t),xb(n),xb(r)]})}function QRe(e){return e&&e instanceof aW&&e.message||e&&e instanceof VT?e.message:"出错了, 请刷新重试!"}class aW extends Error{constructor(t){super(t),this.name="ShowMessageError";}}function ZRe({err:e,tab:t}){const n=k1(),r=f.useMemo(()=>QRe(e),[e]),o=f.useMemo(()=>iW(e),[e]);return j("div",{className:"flex flex-col items-center gap-y-0.5em p-20px text-center text-size-20px",children:[x(pn,{title:j("div",{className:"py-10px",children:[x("h3",{children:"错误详情"}),x("div",{className:"max-h-50vh overflow-hidden overflow-y-auto whitespace-pre-wrap break-normal",children:o})]}),children:j("p",{className:"flex cursor-pointer items-center justify-center",children:[x(YRe,{className:"mr-4px"}),r]})}),t===Je.Hot&&Vo.subtab===ur.PopularWeekly&&j("p",{className:"mt-8px flex items-center justify-center",children:["可能需手动输入验证码",x(Ci,{className:"ml-12px"}),x("a",{href:"https://www.bilibili.com/v/popular/weekly",target:n,className:"ml-2px",children:"每周必看"})]}),t===Je.Liked&&e instanceof VT&&x(fA,{className:"mt-0.5em"})]})}function sW(e){const t=e==="follow"?1:2;return async function(r){return await zG(r,t)}}const JRe=sW("follow"),eTe=sW("unfollow"),tTe={follow:JRe,unfollow:eTe};function nTe(e){return [1,2,6].includes(e.attribute)}async function rTe(e){return (await Jt.get("/x/relation",{params:{fid:e}})).data.data}const oTe=HT(rTe,{cacheKey:([e])=>e.toString()});function iTe(e){return !!(e.elec_arc_type===1||!e.elec_arc_type&&e.is_charging_arc||e.elec_arc_type===2)}function aTe(){const{searchText:e,filterText:t}=St(ta,{sync:true}),{allowedOrders:n,usingOrder:r}=St(ta),{spaceUpload:{useSyncFilterTextFromSearchText:o}}=qt(),i=bo(),{recSharedEmitter:a}=Ki(),c=rt(()=>{u();const{searchText:d,filterText:m}=ta,p=location.href,g=new URL(p);d?g.searchParams.set(Ba.SearchText,d):g.searchParams.delete(Ba.SearchText),m?g.searchParams.set(Ba.FilterText,m):g.searchParams.delete(Ba.FilterText),g.href!==p&&history.replaceState({},"",g.href);}),u=rt(()=>{ot.spaceUpload.useSyncFilterTextFromSearchText&&(ta.filterText=ta.searchText);});return no(c),j("div",{className:"flex items-center gap-x-10px",children:[x(bA,{value:r,list:n,listDisplayConfig:EMe,onChange:d=>{ta.order=d,i();}}),x(ba.Search,{style:{width:200},placeholder:"搜索词",allowClear:true,value:e,onChange:d=>ta.searchText=d.target.value,onSearch:d=>{ta.searchText=d,c(),i();}}),x(ba.Search,{style:{width:200},placeholder:"本地过滤词",allowClear:true,value:t,addonBefore:x(pn,{title:x(Be,{children:"精准搜索: 自动将搜索词同步到过滤词"}),children:x(Nt,{className:"[&>.ant-checkbox-label]:hidden",configPath:"spaceUpload.useSyncFilterTextFromSearchText",extraAction:d=>{d&&(c(),i());}})}),disabled:o,onChange:d=>ta.filterText=d.target.value,onSearch:d=>{ta.filterText=d,c(),i();}}),x(Nt,{configPath:"spaceUpload.showVol",label:"显示序号",className:"flex-none"}),x(Eg,{})]})}const lW=new qA({maxSize:100}),Ry=$r();async function sTe(e){if(Ry.has(e))return;const t=await oTe(e);nTe(t)&&Ry.add(e);}function cW(){const e=Jr(ta);return {mids:e.mids,groupId:e.groupId,order:e.usingOrder,searchText:e.searchText,filterText:e.filterText,initialPage:N9?Number(N9):void 0}}class GA extends Fs{constructor(t){if(super(GA.PAGE_SIZE),this.config=t,Object.assign(this,t),this.mids=t.mids,this.order=t.order,ji(this.mids.length||this.groupId!==void 0,"mid & groupId can not both be empty"),this.searchText=this.searchText?.trim(),this.initialPage&&(this.groupId!==void 0||this.mids.length>1))throw new Error("initialPage not supported when merging")}static PAGE_SIZE=20;mids;groupId;order;searchText;filterText;initialPage;sidebarView=void 0;tabbarView=x(aTe,{});get hasMoreExceptQueue(){return this.service?this.service.hasMore:true}async fetchAvatars(t){await Promise.all(t.map(async n=>{const r=await RA(n);r&&lW.set(n,r.face);}));}async fetchFollowState(t){await Vl(t,sTe,3);}pageTitleSet=false;async setPageTitle(){if(this.pageTitleSet)return;const t=[];this.searchText&&t.push(`🔍【${this.searchText}】`),this.filterText&&t.push(`⏳【${this.filterText}】`);let n;if(this.mids.length)n=(await Vl(this.mids,Cg,3)).map(i=>i?.trim()).filter(Boolean).map(i=>`「${i}」`).join("、");else {const i=(await SG()).find(a=>a.tagid===this.groupId)?.name||"";n=i?`「${i}」`:"";}const r=[t.join(""),`${n}的投稿`].map(o=>o.trim()).filter(Boolean).join(" - ");KT(r),this.pageTitleSet=true;}singleUpService;mergeTimelineService;async setupServices(){if(!(this.singleUpService||this.mergeTimelineService)){if(this.mids.length===1){this.singleUpService=new uW(this.mids[0],this.order,this.searchText,this.initialPage);return}if(this.mids.length){this.mergeTimelineService=new O9(this.mids,this.order,this.searchText);return}if(this.groupId!==void 0){const t=await D3(this.groupId);if(t.forEach(n=>Ry.add(n)),!t.length)throw new Error("Group is Empty!");this.mergeTimelineService=new O9(t.map(n=>n.toString()),this.order,this.searchText);return}}}get service(){return this.singleUpService||this.mergeTimelineService}warnNeedLoginOnce=Ip(aG);async fetchMore(t){if(!Vj())throw this.warnNeedLoginOnce(),new aW(iG);this.setPageTitle(),await this.setupServices(),ji(this.service,"this.service should exist after setupServices");const n=await this.service.loadMore(t)||[],r=this.singleUpService?this.singleUpService.endVol:this.mergeTimelineService.count-this.qs.fetchedCount;let o=n.map((i,a)=>({...i,api:je.SpaceUpload,uniqId:`${je.SpaceUpload}-${i.bvid}`,groupId:this.groupId,vol:r-a,page:this.singleUpService?this.singleUpService.page-1:void 0}));if(o=o.filter(i=>!iTe(i)),this.filterText){const{includes:i,excludes:a}=oG(this.filterText);o=o.filter(c=>i.every(u=>c.title.includes(u))&&a.every(u=>!c.title.includes(u)));}{const i=J3(o.filter(a=>a.author.trim()!=="账号已注销")).map(a=>a.mid).filter(Boolean);await Promise.all([this.fetchAvatars(i),this.fetchFollowState(i)]);}return o}}class O9{constructor(t,n,r){this.mids=t,this.order=n,this.searchText=r,ji(this.mids.length===1||this.mids.length>1&&this.order!==ys.Fav,"SpaceUploadItem.Fav not supported when merging"),this.singleUpServices=t.map(o=>new uW(o,this.order,this.searchText));}singleUpServices;get hasMore(){return this.singleUpServices.some(t=>t.hasMore)}get count(){return this.singleUpServices.reduce((t,n)=>t+n.count,0)}async refillQueues(t){await Vl(this.singleUpServices,n=>n.refillQueue(1,t),5);}async loadMore(t){if(!this.hasMore)return;if(this.mids.length===1)return this.singleUpServices[0].loadMore(t);const n=[],r=10;for(;this.hasMore&&n.lengthc.bufferQueue.length>0),i=bs(o.map(c=>{const u=c.bufferQueue[0],d={[ys.Latest]:u.created,[ys.View]:u.play,[ys.Fav]:u.play}[this.order];return {service:c,item:u,valueForSort:d}}),["valueForSort"],["desc"]).map(c=>c.service)[0];if(!i)break;const a=i.bufferQueue[0];i.bufferQueue=i.bufferQueue.slice(1),n.push(a);}return n}}class uW{constructor(t,n,r,o){this.mid=t,this.order=n,this.searchText=r,this.initialPage=o,this.page=this.initialPage??1;}bufferQueue=[];hasMoreForApi=true;count=0;endVol=0;get hasMore(){return !!this.bufferQueue.length||this.hasMoreForApi}async refillQueue(t,n){if(this.hasMore)for(;!n?.aborted&&this.hasMoreForApi&&this.bufferQueue.length(e||"").replace(/^http:\/\//,"https://"),WA="·";function dW(e,t){if(pu(e))return t[je.AppRecommend](e);if(wg(e))return t[je.PcRecommend](e);if(Wd(e))return t[je.DynamicFeed](e);if($g(e))return t[je.Watchlater](e);if(Gl(e))return t[je.Fav](e);if(LMe(e))return t[je.PopularGeneral](e);if(BMe(e))return t[je.PopularWeekly](e);if(DA(e))return t[je.Rank](e);if(bf(e))return t[je.Live](e);if(wy(e))return t[je.SpaceUpload](e);if(BG(e))return t[je.Liked](e);throw new Error("unknown api type")}function Mg(e){const t=dW(e,{[je.AppRecommend]:lTe,[je.PcRecommend]:uTe,[je.DynamicFeed]:dTe,[je.Watchlater]:fTe,[je.Fav]:mTe,[je.PopularGeneral]:hTe,[je.PopularWeekly]:pTe,[je.Rank]:gTe,[je.Live]:vTe,[je.SpaceUpload]:bTe,[je.Liked]:yTe});return t.authorFace&&(t.authorFace=D9(t.authorFace)),t.cover&&(t.cover=D9(t.cover)),t}function lTe(e){return cTe(e)}function cTe(e){const t=C=>{const{cover_left_text_1:w,cover_left_text_2:$,cover_left_text_3:M}=e,T=[w,$,M].filter(Boolean);if(C==="play"){const R=T.find(P=>/观看|播放$/.test(P));if(!R)return;const I=R.replace(/观看|播放$/,"");return Gc(I)}if(C==="danmaku"){const R=T.find(P=>P.endsWith("弹幕"));if(!R)return;const I=R.replace(/弹幕$/,"");return Gc(I)}if(C==="bangumi:follow"){const R=T.find(P=>/追[剧番]$/.test(P));if(!R)return;const I=R.replace(/追[剧番]$/,"");return Gc(I)}},n=e.param,r=e.bvid||_A(Number(e.param)),o=e.player_args?.cid,i=(()=>{if(e.uri.startsWith("http://")||e.uri.startsWith("https://"))return e.uri;if(e.goto==="av")return `/video/${r}/`;if(e.goto==="bangumi")return Go("bangumi uri should not starts with 'bilibili://': %s",e.uri),e.uri;if(e.goto==="picture"){const C=/^bilibili:\/\/article\/(\d+)$/.exec(e.uri)?.[1];return C?`/read/cv${C}`:e.uri}return e.uri})(),a=t("play"),c=void 0,u=void 0,d=t("danmaku"),m=void 0,p=t("bangumi:follow"),g=[{field:"play",value:a},typeof d=="number"?{field:"danmaku",value:d}:{field:"bangumi:follow",value:p}],b=e.desc||"",[y=void 0,S=void 0]=b.split(WA);return {avid:n,bvid:r,cid:o,goto:e.goto,href:i,title:e.title,cover:e.cover,pubts:void 0,pubdateDisplay:S,duration:e.player_args?.duration||0,durationStr:Hs(e.player_args?.duration),recommendReason:e.bottom_rcmd_reason||e.top_rcmd_reason,play:a,like:c,coin:u,danmaku:d,favorite:m,bangumiFollow:p,statItems:g,authorName:e.args.up_name||y,authorFace:e.avatar.cover,authorMid:String(e.args.up_id||""),appBadge:e.cover_badge,appBadgeDesc:e.desc}}function uTe(e){e.goto,Il.AV;const t=e.goto===Il.Live;return {avid:t?void 0:String(e.id),bvid:t?void 0:e.bvid,cid:t?void 0:e.cid,goto:e.goto,href:e.goto==="av"?`/video/${e.bvid}/`:e.uri,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:Hs(e.duration),recommendReason:t?e.room_info?.area.area_name:e.rcmd_reason?.content,play:e.stat?.view,like:e.stat?.like,coin:void 0,danmaku:e.stat?.danmaku,favorite:void 0,statItems:t?[{field:"live:viewed-by",value:e.room_info?.watched_show.num}]:[{field:"play",value:e.stat?.view},{field:"danmaku",value:e.stat?.danmaku}],authorName:e.owner?.name,authorFace:e.owner?.face,authorMid:String(e.owner?.mid)}}function dTe(e){return jG(e)}function fTe(e){const t=nRe(e.state),n=e.progress>0,r=`${n?"【已观看】· ":""}${e.title}`,o=t?x(pn,{title:j(Be,{children:["视频已失效, 原因: ",t]}),align:{offset:[0,-5]},placement:"topLeft",children:j("del",{children:[n?"【已观看】· ":"",e.title,"`"]})}):void 0,{watchlaterUseNormalVideoUrl:i,watchlaterItemsOrder:a}=dg(),c=(()=>{if(i)return `https://www.bilibili.com/video/${e.bvid}/`;let u=`https://www.bilibili.com/list/watchlater?bvid=${e.bvid}&oid=${e.aid}`;return a===qo.AddTimeAsc&&(u+="&desc=0"),u})();return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:c,title:r,titleRender:o,cover:e.pic,pubts:e.pubdate,pubdateDisplayForTitleAttr:`${i0(e.pubdate,true)} 发布, ${i0(e.add_at,true)} 添加稍后再看`,duration:e.duration,durationStr:Hs(e.duration),recommendReason:`${i0(e.add_at)} · 稍后再看`,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like},{field:"favorite",value:e.stat.favorite}],play:e.stat.view,like:e.stat.like,danmaku:e.stat.danmaku,authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function mTe(e){const t=e.from==="fav-folder"?e.folder.title:e.collection.title,n={display:"inline-block",verticalAlign:"middle",marginRight:4,marginTop:-2},r="[&_path]:fill-gate-primary",o=e.from==="fav-folder"?gA(e.folder.attr)?x(jA,{className:X("size-15px",r),style:n}):x(UA,{className:X("size-15px",r),style:n}):x(U1,{className:X("size-15px",r),style:n});return {avid:String(e.id),bvid:e.bvid,goto:"av",href:`/video/${e.bvid}/`,title:`【${t}】· ${e.title}`,titleRender:j(Be,{children:["【",o,t,"】· ",e.title]}),cover:e.cover,pubts:e.pubtime,duration:e.duration,durationStr:Hs(e.duration),recommendReason:e.from==="fav-folder"?`${i0(e.fav_time)} · 收藏`:void 0,play:e.cnt_info.play,danmaku:e.cnt_info.danmaku,favorite:e.cnt_info.collect,statItems:[{field:"play",value:e.cnt_info.play},{field:"danmaku",value:e.cnt_info.danmaku},{field:"favorite",value:e.cnt_info.collect}],authorName:e.upper.name,authorFace:e.upper.face,authorMid:String(e.upper.mid)}}function hTe(e){return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:Hs(e.duration),recommendReason:e.rcmd_reason?.content,play:e.stat.view,like:e.stat.like,coin:void 0,danmaku:e.stat.danmaku,favorite:void 0,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like}],authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function pTe(e){return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:Hs(e.duration),recommendReason:e.rcmd_reason,play:e.stat.view,like:e.stat.like,danmaku:e.stat.danmaku,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like}],authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function gTe(e){if(KEe(e)||WEe(e)){const n=e.new_ep.cover,r=e.new_ep.index_show;return {avid:"",bvid:"",goto:"bangumi",href:e.url,title:e.title,cover:n,pubts:void 0,pubdateDisplay:void 0,duration:0,durationStr:"",play:e.stat.view,like:e.stat.follow,danmaku:e.stat.danmaku,statItems:[{field:"play",value:e.stat.view},{field:"bangumi:follow",value:e.stat.follow}],rankingDesc:r}}let t=(e.dynamic||e.desc)?.trim();return t==="-"&&(t=void 0),t&&e.title.includes(t)&&(t=void 0),{avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:Hs(e.duration),recommendReason:t,play:e.stat.view,like:e.stat.like,danmaku:e.stat.danmaku,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like}],authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function vTe(e){const t=`${e.area_name_v2}`,n=e.live_status===Da.Streaming?"":`${WA}${o(e.record_live_time)} 直播过`,r="https://s1.hdslb.com/bfs/static/blive/blfe-link-center/static/img/average-backimg.e65973e.png";function o(i){const a=qn().format("YYYYMMDD"),c=qn().subtract(1,"day").format("YYYYMMDD"),u=qn.unix(i);return u.format("YYYYMMDD")===a?u.format("HH:mm"):u.format("YYYYMMDD")===c?`昨天 ${u.format("HH:mm")}`:u.format("MM-DD HH:mm")}return {goto:"live",href:`https://live.bilibili.com/${e.roomid}`,title:e.title,cover:e.room_cover||r,recommendReason:t,liveExtraDesc:n,statItems:[{field:"live:viewed-by",value:e.text_small}],authorName:e.uname,authorFace:e.face,authorMid:String(e.uid)}}function bTe(e){const t=$y(e.length),n=Hs(t);let r=e.description?.trim();return r==="-"&&(r=void 0),r&&e.title.includes(r)&&(r=void 0),{avid:e.aid.toString(),bvid:e.bvid,cid:void 0,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.created,duration:t,durationStr:n,recommendReason:r,play:e.play,like:void 0,coin:void 0,danmaku:e.video_review,favorite:void 0,statItems:[{field:"play",value:e.play},{field:"danmaku",value:e.video_review}],authorName:e.author,authorFace:lW.get(e.mid),authorMid:e.mid.toString(),followed:Ry.has(e.mid)}}function yTe(e){const{videoDetail:t}=e,n=e.param,r=_A(Number(n));return {avid:n,bvid:r,cid:void 0,goto:"av",href:`/video/${r}/`,title:e.title,cover:e.cover,pubts:t?.pubdate??e.ctime,duration:e.duration,durationStr:Hs(e.duration),recommendReason:void 0,play:e.play,danmaku:e.danmaku,like:void 0,coin:void 0,favorite:void 0,statItems:[{field:"play",value:e.play},{field:"danmaku",value:e.danmaku}],authorName:e.author,authorFace:t?.owner.face,authorMid:t?.owner.mid?.toString()}}const Na=oo.extend("modules:filter");function KA(e){return !!e&&["已关注","新关注"].includes(e)}function fW(e){return !!(e===Je.KeepFollowOnly||[Je.AppRecommend,Je.PcRecommend,Je.Hot].includes(e)&&(Rp.size||ot.filter.enabled&&(ot.filter.byAuthor.enabled||ot.filter.byTitle.enabled||ot.filter.minDuration.enabled||ot.filter.minPlayCount.enabled||ot.filter.minDanmakuCount.enabled))||e===Je.DynamicFeed&&ot.filter.dfByTitle.enabled)}function mW(e){return [je.AppRecommend,je.PcRecommend,je.Rank,je.PopularGeneral,je.PopularWeekly].includes(e)}function V3(e,t){if(!fW(t))return e;const n=dg().filter,{minDuration:r,minPlayCount:o,minDanmakuCount:i,byAuthor:a,byTitle:c,dfByTitle:u}=n,{blockUpMids:d,blockUpNames:m}=hG(a.keywords),{test:p}=M9(c.keywords),{test:g}=M9(u.keywords);return e.filter(b=>{if(b.api===je.Separator)return true;const{play:y,duration:S,danmaku:C,recommendReason:w,goto:$,authorName:M,authorMid:T,title:R,bvid:I,href:P}=Mg(b),N=KA(w);if(t==="keep-follow-only"&&!N)return false;function O(){if(T&&Rp.size&&Rp.has(T))return Na("filter out by blacklist-rule: %s %o",T,{bvid:I,title:R}),false;if(n.enabled&&a.enabled&&(d.size||m.size)&&(M||T)&&(M&&m.has(M)||T&&d.has(T)))return Na("filter out by author-rule: %o",{authorName:M,authorMid:T,rules:a.keywords,blockUpMids:d,blockUpNames:m,bvid:I,title:R}),false;let U=[R];if(b.api===je.Rank&&$A(b)&&b.desc&&U.push(b.desc),U=U.filter(Boolean),n.enabled&&c.enabled&&c.keywords.length&&U.length&&U.some(p))return Na("filter out by title-rule: %o",{possibleTitles:U,rules:c.keywords,bvid:I}),false}if(mW(b.api)&&O()===false)return false;if((b.api===je.AppRecommend||b.api===je.PcRecommend)&&n.enabled){const U=$==="av",q=$==="picture",V=$==="bangumi";if(U)return _();if(q)return L();if(V)return H()}function _(){return N&&n.exemptForFollowed.video?true:w==="关注了你"?(Na("filter out by recommendReason-rule: %s %o",w,{bvid:I,title:R}),false):r.enabled&&r.value&&S&&Sthis.totalPage){this.hasMoreExceptQueue=false;return}const n=await STe(this.page);Zn(n)||(gn(n.message||xf),this.hasMoreExceptQueue=false),this.page++;const{count:r,live_count:o,totalPage:i}=n.data;this.totalPage=i,this.liveCount=o;const a=n.data.list.map(m=>({...m,api:je.Live,uniqId:`${je.Live}-${m.roomid}`})),c=a.at(-1),u=qn().subtract(2,"weeks").unix();if(c){const m=c.live_status,p=c.record_live_time;m!==Da.Streaming&&p&&pm.live_status!==Da.Streaming)){this.separatorAdded=true;const m=a.findIndex(p=>p.live_status!==Da.Streaming);d.splice(m,0,{api:je.Separator,uniqId:"live-separator-recent",content:"最近直播过"});}return this.streamingOnly&&a.some(m=>m.live_status!==Da.Streaming)&&(this.hasMoreExceptQueue=false,d=a.filter(m=>m.live_status===Da.Streaming)),d}}const CTe=oo.extend("modules:rec-services:dynamic-feed:api");async function Tg({videoOnly:e,offset:t,page:n,upMid:r,abortSignal:o}){const i={timezone_offset:"-480",type:e?"video":"all",platform:"web",features:"itemOpusStyle",web_location:"0.0","x-bili-device-req-json":JSON.stringify({platform:"web",device:"pc"}),"x-bili-web-req-json":JSON.stringify({spm_id:"0.0"}),page:n};t&&(i.offset=t);const a="/x/polymer/web-dynamic/v1/feed/all";r&&(i.host_mid=r);const u=(await Jt.get(a,{signal:o,params:i})).data;if(!Zn(u)){const m=u.message||xf;throw gn(m),new Error(m,{cause:u})}const d=u.data;return d?.items?.length&&(d.items=d.items.filter(m=>{const p=!!jG(m);return p||CTe("dynamic-feed filter out: %o",{type:m.type,majorType:m.modules.module_dynamic.major?.type,additionalType:m.modules.module_dynamic.additional?.type,item:m}),p})),d}const Ty=Xf("dynamic-feed-items"),Ag=Xf("dynamic-feed-items-info");async function q1(e){return !!(await Ag.get(e))?.count}function xTe(e,t){const n=a=>`update-filter-cache:${a}`,o=Kl((a,c)=>{sa.info({icon:x(QR,{className:"size-16px"}),key:n(e),title:"过滤缓存更新中...",description:`「${t}」更新中: Page(${a}) Total(${c})`,duration:false});},200);return {notifyOnProgress:o,notifyOnSuccess:()=>{o.flush(),sa.success({key:n(e),title:"缓存更新成功",description:`「${t}」的过滤缓存更新成功`,duration:false});}}}async function wTe(e,t){await q1(e)?await hW(e):await ETe(e,void 0,t);}async function $Te(e,t=false){const n=await Ag.get(e);if(!(!t&&n&&n.count&&n.updatedAt&&Date.now()-n.updatedAt<60*1e3))return hW(e)}async function hW(e){if(!await q1(e))return;const t=await Ty.get(e)||[],n=new Set(t.map(u=>u.id_str));let r=1,o="",i=true,a=[];for(;i;){const u=await Tg({upMid:e,page:r,offset:o,videoOnly:true}),d=u.items;a=[...a,...d],o=u.offset,i=u.has_more,r++,i&&n.size&&d.every(p=>n.has(p.id_str))&&(i=false);}const c=Wl([...a,...t],u=>u.id_str);await Ty.set(e,c),await Ag.set(e,{count:c.length,updatedAt:Date.now()});}const a$=Xf("dynamic-feed-items-in-progress");async function ETe(e,t=false,n){const r=t?void 0:await a$.get(e);let o=r?.page??1,i=r?.offset??"",a=r?.items??[],c=true;for(;c;){const d=await Tg({upMid:e,page:o,offset:i,videoOnly:true}),m=d.items;a=[...a,...m],i=d.offset,c=d.has_more,o++,await a$.set(e,{page:o,offset:i,items:a}),n?.(o,a.length);}const u=Wl(a,d=>d.id_str);await Ty.set(e,u),await Ag.set(e,{count:u.length,updatedAt:Date.now()}),await a$.delete(e);}const pW=Mu({fn:Tg,generateKey:({upMid:e,videoOnly:t})=>`upMid=${e}&videoOnly=${t}`,tableName:"dynamic-feed-newest-items",ttl:300*1e3});class MTe{constructor(t,n,r=false){this.upMid=t,this.videoOnly=n,this.enableHeadCache=r;}bufferQueue=[];hasMoreForApi=true;offset="";page=1;get hasMore(){return !!this.bufferQueue.length||this.hasMoreForApi}async loadMore(){const r=await(this.page===1&&!this.offset&&this.enableHeadCache?pW:Tg)({videoOnly:this.videoOnly,upMid:this.upMid,page:this.page,offset:this.offset});return this.offset=r.offset,this.hasMoreForApi=r.has_more,this.page++,ua(r,{has_more:true,items:[],offset:"",update_baseline:"",update_num:0})&&(this.hasMoreForApi=false),r.items}async fillQueue(t,n){for(;!n?.aborted&&this.hasMoreForApi&&this.bufferQueue.lengthSs.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD;this.upServices=t.map(o=>new MTe(o,n,r));}static ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD=20;static ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD=10;upServices=[];get hasMore(){return this.upServices.some(t=>t.hasMore)}async loadMore(t){if(!this.hasMore)return [];const n=async()=>{await Vl(this.upServices,a=>a.fillQueue(1,t),5);},r=[],o=10;for(;this.hasMore&&r.lengthu.hasMore),a=bs(i.map(u=>{const d=u.bufferQueue[0],m=BigInt(d.id_str);return {service:u,item:d,id:m}}),["id"],["desc"]).map(u=>u.service)[0];if(!a)break;const c=a.bufferQueue[0];a.bufferQueue=a.bufferQueue.slice(1),r.push(c);}return r}}function xo(e,t,n){const r=rt(n);f.useEffect(()=>(e.on(t,r),()=>{e.off(t,r);}),[e,t,r]);}function RTe(){return new Promise((e,t)=>{const n=new Image;n.onload=()=>e(true),n.onerror=r=>e(false),n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=";})}const TTe=!sg&&await( RTe());function YA(e){return `${e}@96w_96h_1c_1s_!web-avatar${TTe?".avif":".webp"}`}function _9(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>t(true),n.onerror=()=>t(false);})}function ATe({externalFilterInput:e,onRefresh:t,getPopupContainer:n}){const{upMid:r,dynamicFeedVideoType:o,filterMinDuration:i,filterText:a,hideChargeOnlyVideos:c}=St(Zt),u=x(ba.Search,{style:{width:e?"250px":void 0},placeholder:"按标题关键字过滤",type:"search",autoCorrect:"off",autoCapitalize:"off",name:`filterText_${r}`,variant:"outlined",defaultValue:Zt.filterText,autoComplete:"off",allowClear:true,onChange:S=>{ITe({filterText:S.target.value,upMid:r,onRefresh:t});},onSearch:async S=>{Zt.filterText=S||void 0,await hn(100),t();}}),d=x(NTe,{externalFilterInput:e,filterInput:u,refresh:t}),[m,p]=f.useState(false),g=p,b=f.useMemo(()=>!!(o!==Oa.All||c||a||i!==ou.All),[o,c,a,i]),y=x(Gi,{open:m,onOpenChange:g,arrow:false,placement:"bottomLeft",getPopupContainer:n,content:d,styles:{container:{border:`1px solid ${Uf()}`}},children:x(n1,{dot:b,color:ya,offset:[-5,5],children:x(mt,{className:"icon-only-round-button",css:m&&jf,children:x(xy,{className:"ml-1px"})})})});return {filterInput:u,popoverContent:d,popoverTrigger:y}}const Kr={wrapper:"max-w-350px",section:"mt-10px min-w-300px first:mt-0px",sectionTilte:"flex items-center pb-2px pl-2px text-20px",sectionContent:"flex flex-col items-start gap-x-10px gap-y-6px"};function NTe({externalFilterInput:e,filterInput:t,refresh:n}){const{viewingSomeUp:r,selectedGroup:o,viewingSomeGroup:i,selectedKey:a,dynamicFeedVideoType:c,filterMinDuration:u,hideChargeOnlyVideos:d,addSeparators:m,filterText:p}=St(Zt);let g;{const b=PA&&!!p,y=p===CG,{href:S}=f.useMemo(()=>{const C=new URL(location.href);return C.searchParams.has(ui.FilterTextFull)?C.searchParams.set(ui.FilterTextFull,p||""):C.searchParams.has(ui.FilterTextShort)?C.searchParams.set(ui.FilterTextShort,p||""):C.searchParams.set(ui.FilterTextFull,p||""),{href:C.href,path:`${C.pathname}?${C.search}`}},[p]);g=b&&x(pn,{title:S,children:j(mt,{disabled:y,href:S,children:["转到过滤词为「",p||"空","」的链接"]})});}return j("div",{className:Kr.wrapper,children:[j("div",{className:Kr.section,children:[j("div",{className:Kr.sectionTilte,children:["视频类型",j(Fr,{children:["「",ca.ChargeOnly,"」在此程序中归类为「投稿视频」",x("br",{}),"「动态视频」时长通常较短"]})]}),x("div",{children:x(Cr.Group,{buttonStyle:"solid",value:c,onChange:async b=>{Zt.dynamicFeedVideoType=b.target.value,await hn(100),n?.();},children:Object.values(Oa).map(b=>x(Cr.Button,{value:b,children:hMe[b]},b))})})]}),c!==Oa.DynamicOnly&&j("div",{className:Kr.section,children:[x("div",{className:Kr.sectionTilte,children:"充电专属"}),x("div",{className:Kr.sectionContent,children:x(Wi,{className:"ml-5px",checked:d,onChange:async b=>{const y=b.target.checked,S=Zt.hideChargeOnlyVideosForKeysSet;y?S.add(a):S.delete(a),await hn(100),n?.();},children:x(pn,{title:j(Be,{children:["隐藏「",ca.ChargeOnly,"」视频 ",x("br",{}),"仅对当前 UP 或 分组生效"]}),children:j("span",{style:{userSelect:"none"},children:["隐藏「",ca.ChargeOnly,"」"]})})})})]}),j("div",{className:Kr.section,children:[x("div",{className:Kr.sectionTilte,children:"最短时长"}),x("div",{children:x(Cr.Group,{className:"overflow-hidden [&_.ant-radio-button-wrapper]:px-10px",buttonStyle:"solid",value:u,onChange:async b=>{Zt.filterMinDuration=b.target.value,await hn(100),n?.();},children:Object.values(ou).map(b=>{const{label:y}=$G[b];return x(Cr.Button,{value:b,children:y},b)})})})]}),(!e||g)&&j("div",{className:Kr.section,children:[x("div",{className:Kr.sectionTilte,children:"过滤"}),j("div",{className:Kr.sectionContent,children:[!e&&t,g]})]}),x(PTe,{}),j("div",{className:Kr.section,children:[j("div",{className:Kr.sectionTilte,children:[i?"分组":r?"UP":"全部",j(Fr,{children:["当前",i?"分组":r?"UP":"范围","的一些操作~"]}),i&&o&&j("span",{className:"ml-15px inline-flex items-center text-size-14px",children:["(",j("a",{href:uG(o?.tagid||""),target:"_blank",className:`mx-4px inline-flex items-center text-size-16px ${uU}`,children:[x(Ci,{className:"mr-2px size-18px"}),o?.name]}),")"]})]}),j("div",{className:Kr.sectionContent,children:[x(Wi,{checked:m,onChange:async b=>{Zt.addSeparatorsMap.set("global",b.target.checked),await hn(100),n?.();},children:x(pn,{title:j(Be,{children:["添加今日/更早分割线 ",x("br",{}),"当前实现为全局共享此设置"]}),children:"添加分割线"})}),i&&!!o&&x(OTe,{followGroup:o,refresh:n})]})]})]})}function PTe(){const{cacheAllItemsEntry:e,cacheAllItemsUpMids:t}=qt().dynamicFeed.__internal,{viewingSomeUp:n,upMid:r,upName:o}=St(Zt),i=Va(async(u,d)=>{const{notifyOnProgress:m,notifyOnSuccess:p}=xTe(u,d);await wTe(u,m),p();},{manual:true}),a=f.useMemo(()=>!!r&&t.includes(r.toString()),[r,t]),c=f.useCallback(async u=>{if(!r)return;const m=u.target.checked?{add:[r]}:{remove:[r]};await Rs("dynamicFeed.__internal.cacheAllItemsUpMids",m);},[]);return x(Be,{children:e&&n&&r&&o&&j("div",{className:Kr.section,children:[j("div",{className:Kr.sectionTilte,children:["过滤缓存",j(Fr,{children:["开启过滤缓存后, 会加载并缓存 UP 所有的动态 ",x("br",{}),"当本地有缓存且总条数 <= 5000时, 过滤框成为及时过滤, 无需点击过滤按钮"]})]}),j("div",{className:Kr.sectionContent,children:[j("div",{className:"flex flex-wrap items-center gap-x-10px gap-y-3px",children:[x(Wi,{className:"inline-flex items-center",checked:a,onChange:c,children:x(pn,{title:"只有开启此项, 过滤时才会使用缓存",children:j("span",{children:["为「",o,"」开启"]})})}),x(mt,{loading:i.loading,onClick:async()=>{await i.runAsync(r,o);},children:"更新缓存"})]}),x(Nt,{configPath:"dynamicFeed.advancedFilter",label:"使用高级过滤",tooltip:rG})]})]})})}const ITe=Kl(async function({filterText:e,upMid:t,onRefresh:n}){if(!t||!(e||!e&&Zt.filterText)||!ot.dynamicFeed.__internal.cacheAllItemsEntry||!ot.dynamicFeed.__internal.cacheAllItemsUpMids.includes(t.toString())||!await q1(t))return;const r=await Ag.get(t);!r||!r.count||r.count>=5e3||(Zt.filterText=e,await hn(0),n());},100);function gW(){return j(Be,{children:[x("p",{children:"机制介绍:"}),j("ul",{className:"text-13px",children:[j("li",{className:"flex items-start gap-x-10px",children:[x("div",{children:"「从全部过滤」:"}),x("div",{children:'基于全部动态 + 分组UP过滤, 速度可能巨慢, 且过滤后的数量取决于B站记录的"全部"动态范围'})]}),j("li",{className:"flex items-start gap-x-10px",children:[x("div",{children:"「拼接时间线」:"}),j("div",{children:["可以理解为: 去看一遍分组所有 UP 的动态, 然后将它们拼接起来 ",x("br",{}),"启动慢, 但可以加载所有动态; 且分组 UP 越多, 启动越慢 ",x("br",{}),"默认分组 UP 数量不超过 ",Ss.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD," ","时会使用「拼接时间线」 ",x("br",{}),"详见",x("a",{className:"mx-5px",href:"https://magicdawn.fun/2024/12/01/bilibili-gate-dynamic-feed-merge-timeline/",target:"_blank",children:"介绍博客"})]})]})]})]})}function OTe({followGroup:e,refresh:t}){const{whenViewAll:n}=St(ot.dynamicFeed),r=e.count;let o;const i=L9(e.tagid,"dynamicFeed.followGroup.forceUseMergeTimelineIds");{const{checked:u,onChange:d}=i,m=r<=Ss.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD;o=x(Wi,{checked:u,onChange:p=>{d(p),t?.();},disabled:m,children:x(pn,{title:j(Be,{children:[x(gW,{}),m&&j("p",{className:"text-yellow-400 italic",children:["当前分组 UP 数量: ",r,", 无需设置"]})]}),children:"分组动态: 强制使用「拼接时间线」"})});}let a;a=(r<=Ss.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD||i.checked)&&r>Ss.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD&&x(pn,{title:j(Be,{children:["当分组 UP 数量"," > ",Ss.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD,"时, 「拼接时间线」功能会缓存每个 UP 的最新动态5分钟. ",x("br",{}),"这里可以手动清除缓存"]}),children:x(mt,{onClick:()=>{pW.cache.db.clear(),Ft.success("已清除缓存");},children:"清除「拼接时间线」- 队头缓存"})});let c;{const{checked:u,onChange:d}=L9(`${hu}${e.tagid}`,"dynamicFeed.whenViewAll.hideIds");c=n.enableHideSomeContents&&x(Wi,{checked:u,onChange:d,children:x(pn,{title:j(Be,{children:["在「全部」动态中隐藏来自此 ",e.name," 的动态"]}),children:"在「全部」动态中隐藏来自此分组的动态"})});}return j(Be,{children:[c,o,a]})}function L9(e,t){const n=Yj(t),r=f.useMemo(()=>n.includes(e),[n]),o=rt(async a=>{await Rs(t,a?{add:[e]}:{remove:[e]});}),i=f.useCallback(a=>{o(a.target.checked);},[]);return {checked:r,setChecked:o,onChange:i}}function DTe(e){if(Object.assign(Zt,e),e.upMid){const t=Zt.upList.find(n=>n.mid.toString()===e.upMid);t&&(t.has_update=false);}}const s$={upMid:void 0,upName:void 0,upFace:void 0,filterText:void 0,selectedGroupId:void 0,dynamicFeedVideoType:Oa.All,filterMinDuration:ou.All};function vW(e){const{upList:t,groups:n,selectedKey:r}=St(Zt),o=bo(),{followGroup:{enabled:i}}=qt().dynamicFeed,{recSharedEmitter:a}=Ki(),c=rt(async m=>{DTe(m),await hn(100),o();}),u=rt(()=>{c({...s$}),a.emit("dynamic-feed:clear");});return {menuItems:f.useMemo(()=>{const m={key:"all",icon:x(Yc,{size:"small",children:"全"}),label:"全部",title:"全部",onClick:u};let p=[];i&&(p=n.map(y=>({key:`group:${y.tagid}`,icon:x(Yc,{size:"small",children:y.name[0]||"组"}),label:`${y.name} (${y.count})`,title:`${y.name} (${y.count})`,onClick:()=>c({...s$,selectedGroupId:y.tagid})})));let g=t;e==="dropdown"&&(g=ZG(t,[{prop:y=>y.has_update?1:0,order:"desc"},{prop:y=>HA(y.uname),order:VA}]));const b=g.map(y=>{let S=x(Yc,{size:"small",src:YA(y.face)});return y.has_update&&(S=x(n1,{dot:true,children:S})),{key:`up:${y.mid}`,icon:S,label:x("span",{title:y.uname,className:"block max-w-130px overflow-hidden text-ellipsis whitespace-nowrap",children:y.uname}),title:y.uname,onClick(){c({...s$,upMid:y.mid.toString(),upName:y.uname,upFace:y.face});}}});return [m,...p,...b]},[t,i,n,e]),selectedKey:r,onClear:u,onSelect:c}}function _Te(){const{dynamicFeed:{__internal:{externalFilterInput:e}}}=qt(),{viewingSomeUp:t,upName:n,upFace:r,selectedGroup:o}=St(Zt),i=bo(),{ref:a,getPopupContainer:c}=Eu(),u=LA(Je.DynamicFeed),{menuItems:d,selectedKey:m,onClear:p}=vW("dropdown");no(()=>{TG();});const g=o?.count,b=x(lG,{className:"mt--2px size-14px"}),y=r?x(Yc,{size:20,src:YA(r)}):void 0,S=t?y||b:o?x(cG,{className:"size-18px"}):void 0,C=t?n:o?o.name+(g?` (${g})`:""):"全部",[w,$]=f.useState(false),M=x(nc,{open:w,onOpenChange:$,placement:"bottomLeft",getPopupContainer:c,menu:{items:d,style:{...nW,border:`1px solid ${Uf()}`},selectedKeys:[m]},children:x(mt,{icon:S,className:"gap-4px",css:[w&&jf,"",""],children:C})}),{popoverTrigger:T,filterInput:R}=ATe({externalFilterInput:e,onRefresh:i,getPopupContainer:c});return j("div",{ref:a,className:"inline-flex items-center gap-x-8px",children:[!u&&M,u?j(mt,{onClick:p,className:"gap-0",disabled:!(t||o),children:[x(ly,{className:"mr-5px size-14px"}),x("span",{children:"清除"})]}):(t||o)&&j(mt,{onClick:p,className:"gap-0",children:[x(ly,{className:"mr-5px size-14px"}),x("span",{children:"清除"})]}),T,e&&R,x(Eg,{})]})}function LTe(){const e=LA(Je.DynamicFeed),{menuItems:t,selectedKey:n}=vW("sidebar"),{menuRef:r,revealSelected:o}=qG(t,n),{recSharedEmitter:i}=Ki();if(xo(i,"dynamic-feed:clear",()=>{o(Mp);}),!!e)return j(Be,{children:[x(tc,{ref:r,items:t,selectedKeys:[n],mode:"inline",inlineIndent:10}),UG]})}function XA(e=Zt){const t=Jr(e);return {upMid:t.upMid,groupId:t.selectedGroupId,filterText:t.filterText,dynamicFeedVideoType:t.dynamicFeedVideoType,hideChargeOnlyVideos:t.hideChargeOnlyVideos,filterMinDuration:t.filterMinDuration,filterMinDurationValue:t.filterMinDurationValue,selectedKey:t.selectedKey,viewingAll:t.viewingAll,viewingSomeUp:t.viewingSomeUp,viewingSomeGroup:t.viewingSomeGroup,addSeparators:t.addSeparators,showLiveInDynamicFeed:ot.dynamicFeed.showLive,videoOnly:ot.dynamicFeed.videoOnly,whenViewAllEnableHideSomeContents:ot.dynamicFeed.whenViewAll.enableHideSomeContents,whenViewAllHideIds:new Set(ot.dynamicFeed.whenViewAll.hideIds),advancedFilter:ot.dynamicFeed.advancedFilter,filterCacheEnabled:!!t.upMid&&ot.dynamicFeed.__internal.cacheAllItemsEntry&&ot.dynamicFeed.__internal.cacheAllItemsUpMids.includes(t.upMid.toString()),forceUseMergeTime:!!t.selectedGroup&&ot.dynamicFeed.followGroup.forceUseMergeTimelineIds.includes(t.selectedGroup.tagid),startingOffset:mMe,minId:B9(L3)?BigInt(L3):void 0,minTs:B9(R9)?Number(R9):void 0}}function B9(e){return !!e&&/^\d+$/.test(e)}const BTe=oo.extend("modules:rec-services:dynamic-feed");class G1 extends Fs{constructor(t){super(G1.PAGE_SIZE),this.config=t,this.config.showLiveInDynamicFeed&&!this.upMid&&this.groupId===void 0&&!this.filterText&&this.dynamicFeedVideoType===Oa.All&&this.filterMinDuration===ou.All&&(this.liveRecService=new Rg(true)),this.config.startingOffset&&(this.offset=this.config.startingOffset);}static PAGE_SIZE=15;tabbarView=x(_Te,{});sidebarView=x(LTe,{});hasMoreExceptQueue=true;get hasMore(){return this.qs.bufferQueue.length||this.liveRecService?.hasMore?true:this.viewingSomeGroup&&this.groupMergeTimelineService?this.groupMergeTimelineService.hasMore:!!this.hasMoreExceptQueue}async shouldReduceMinCount(){return this.viewingAll,this.viewingSomeGroup?(await this.loadGroupMids(),!this.groupMergeTimelineService):!!(this.filterText||this.dynamicFeedVideoType===Oa.DynamicOnly||this.filterMinDuration!==ou.All)}get upMid(){return this.config.upMid}get groupId(){return this.config.groupId}get filterText(){return this.config.filterText}get dynamicFeedVideoType(){return this.config.dynamicFeedVideoType}get hideChargeOnlyVideos(){return this.config.hideChargeOnlyVideos}get filterMinDuration(){return this.config.filterMinDuration}get filterMinDurationValue(){return this.config.filterMinDurationValue}get viewingSomeUp(){return this.config.viewingSomeUp}get viewingSomeGroup(){return this.config.viewingSomeGroup}shouldEnableMergeTimeline(t){return this.config.forceUseMergeTime||t>0&&t<=Ss.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD}groupMergeTimelineService;groupMids=new Set;groupMidsLoaded=false;async loadGroupMids(){if(this.groupId!==void 0&&!this.groupMidsLoaded)try{const t=await D3(this.groupId);this.groupMids=new Set(t),this.shouldEnableMergeTimeline(t.length)&&(this.groupMergeTimelineService=new Ss(t.map(n=>n.toString()),this.config.videoOnly));}finally{this.groupMidsLoaded=true;}}get viewingAll(){return this.config.viewingAll}viewingAllHideMids=new Set;viewingAllHideMidsLoaded=false;async loadViewingAllHideMids(){if(!this.viewingAll||!this.config.whenViewAllEnableHideSomeContents||!this.config.whenViewAllHideIds.size||this.viewingAllHideMidsLoaded)return;const t=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(vf)).map(i=>i.slice(vf.length)),n=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(hu)).map(i=>i.slice(hu.length)),r=this.viewingAllHideMids;t.forEach(i=>r.add(i)),(await Vl(n,i=>D3(i),3)).flat().forEach(i=>r.add(i.toString())),this.viewingAllHideMidsLoaded=true;}async fetchMore(t){const n=await this._fetchMore(t);return this.handleAddSeparators(n)}liveRecService;_queueForFilterCache;offset="";page=0;async _fetchMore(t){if(this.liveRecService?.hasMore)return (await this.liveRecService.loadMore(t)||[]).filter(p=>p.api!==je.Separator);let n;this.viewingSomeGroup&&await this.loadGroupMids(),this.viewingAll&&(await this.loadViewingAllHideMids(),BTe("viewingAll: hide-mids = %o",this.viewingAllHideMids));const r=!!(this.upMid&&this.filterText&&this.config.filterCacheEnabled&&await q1(this.upMid)),o=r&&this.config.advancedFilter,i=o?oG((this.filterText||"").toLowerCase()):void 0;if(r)this._queueForFilterCache||(await $Te(this.upMid),this._queueForFilterCache=new B1(20),this._queueForFilterCache.bufferQueue=(await Ty.get(this.upMid)||[]).filter(m=>{const p=Rd(m);if(!p)return false;const g=p.title;return c({filterText:this.filterText,title:g,useAdvancedFilter:o,useAdvancedFilterParsed:i})})),n=this._queueForFilterCache.sliceFromQueue(this.page+1)||[],this.page++,this.hasMoreExceptQueue=!!this._queueForFilterCache.bufferQueue.length;else if(this.viewingSomeGroup&&this.groupMergeTimelineService)n=await this.groupMergeTimelineService.loadMore(t);else {const m=await Tg({videoOnly:this.config.videoOnly,abortSignal:t,page:this.page+1,offset:this.offset,upMid:this.upMid});if(this.page++,this.hasMoreExceptQueue=m.has_more,this.offset=m.offset,n=m.items,this.config.minId){const p=this.config.minId,g=n.findIndex(b=>BigInt(b.id_str)<=p);g!==-1&&(this.hasMoreExceptQueue=false,n=n.slice(0,g+1));}if(this.config.minTs){const p=this.config.minTs,g=n.findIndex(b=>b.modules.module_author.pub_ts<=p);g!==-1&&(this.hasMoreExceptQueue=false,n=n.slice(0,g+1));}}const a=n.filter(m=>{if(!this.viewingSomeGroup||this.groupMergeTimelineService||!this.groupMids.size)return true;const p=m.modules.module_author.mid;return this.groupMids.has(p)}).filter(m=>{if(this.dynamicFeedVideoType===Oa.All)return true;const p=Rd(m);if(!p)return false;const g=p.badge.text;return this.dynamicFeedVideoType===Oa.DynamicOnly?g===ca.Dynamic:this.dynamicFeedVideoType===Oa.UploadOnly?g===ca.Upload||g===ca.ChargeOnly:false}).filter(m=>{if(!this.hideChargeOnlyVideos)return true;const p=Rd(m);return p?!(p.badge.text===ca.ChargeOnly):true}).filter(m=>{if(this.filterMinDuration===ou.All)return true;const p=Rd(m);return p?$y(p.duration_text)>=this.filterMinDurationValue:false}).filter(m=>{if(!this.filterText)return true;const p=Rd(m);if(!p)return false;const g=p.title||"";return c({filterText:this.filterText,title:g,useAdvancedFilter:o,useAdvancedFilterParsed:i})}).filter(m=>{if(this.config.selectedKey!==Mp)return true;const p=this.viewingAllHideMids;if(!p.size)return true;const g=m.modules.module_author.mid;return !p.has(g.toString())}).map(m=>({...m,api:je.DynamicFeed,uniqId:`${je.DynamicFeed}-${m.id_str||crypto.randomUUID()}`,groupId:this.viewingSomeGroup?this.groupId:void 0}));function c({title:m,filterText:p,useAdvancedFilter:g,useAdvancedFilterParsed:b}){return m=m.toLowerCase(),p=p.toLowerCase(),g?(b?.includes??[]).every(C=>m.includes(C))&&(b?.excludes??[]).every(C=>!m.includes(C)):m.includes(p)}const{upMid:u,upName:d}=Zt;if(Ns&&u&&d&&d===u.toString()&&a[0]){const m=a[0].modules.module_author.name,p=a[0].modules.module_author.face;Zt.upName=m,Zt.upFace=p;}if(this.viewingSomeGroup&&Zt.groups.length){const m=Zt.groups.find(p=>p.tagid===this.groupId);m&&(m.count=this.groupMids.size);}return a}separatorsConfig={today:{added:false,content:"今日",getInsertIndex:zTe},earlier:{added:false,content:"更早",getInsertIndex:bW(-1/0,qn().startOf("day").unix())}};handleAddSeparators(t){if(!this.config.addSeparators)return t;const n=t;{const r=this.separatorsConfig.today,{getInsertIndex:o,content:i,added:a}=r;if(!a){const c=o(t);c!==-1&&(n.splice(c,0,{api:je.Separator,uniqId:"dynamic-feed-separator-today",content:i}),r.added=true);}}{const r=this.separatorsConfig.earlier,{getInsertIndex:o,content:i,added:a}=r;if(!a){const c=o(t);c!==-1&&(n.splice(c,0,{api:je.Separator,uniqId:"dynamic-feed-separator-earlier",content:i}),r.added=true);}}return n}}function bW(e,t){return n=>n.findIndex(r=>{if(r.api!==je.DynamicFeed)return false;const o=r.modules.module_author.pub_ts;return o>=e&&or.api===je.Live&&r.live_status===Da.Streaming);return t!==-1?t:bW(qn().startOf("day").unix(),qn().endOf("day").unix())(e)}const Cs=20,Ay="ml-30px inline-flex items-center text-15px [&_svg]:mr-5px [&_svg]:mt--1px first:ml-0";class yW{constructor(t,n,r){this.collectionId=t,this.addSeparator=n,this.itemsOrder=r;}get hasMore(){return this.addSeparator&&!this.separatorAdded||!this.loaded?true:!!this.bufferQueue.length}loaded=false;bufferQueue=[];separatorAdded=false;get separator(){return {api:je.Separator,uniqId:`fav-collection-separator-${this.collectionId}`,content:x(kTe,{service:this})}}state=Bn({firstBvid:void 0,info:void 0});async loadMore(t){if(!this.hasMore)return;if(this.addSeparator&&!this.separatorAdded)return this.separatorAdded=true,[this.separator];if(!this.loaded){const r=await REe(this.collectionId,1),o=r?.medias||[],i=r?.info;await Op(()=>this.loadUserAvatarFromSpaceAccInfo(o,t));let a=o.map(u=>({...u,api:je.Fav,uniqId:`${je.Fav}-collection:${this.collectionId}-${u.bvid}`,collection:r.info,from:"fav-collection"}));[It.PubTimeDesc,It.PubTimeAsc,It.Shuffle].includes(this.itemsOrder)&&(a=N3(a,It.PubTimeDesc),a.forEach((u,d,m)=>{u.vol=m.length-d,u.volTooltip=j(Be,{children:["按投稿时间 Vol.",u.vol]});})),a=N3(a,this.itemsOrder),this.bufferQueue=a,this.loaded=true,this.state.firstBvid=a[0]?.bvid,this.state.info=Xd(i),mn.selectedFavCollectionDetailInfo=Xd(i);}this.itemsOrder===It.Shuffle&&(this.bufferQueue=pi(this.bufferQueue));let n;return [n,this.bufferQueue]=[this.bufferQueue.slice(0,Cs),this.bufferQueue.slice(Cs)],n}async loadUserAvatarFromSpaceAccInfo(t,n){if(!t.length)return;const r=wX(t,a=>a.upper.mid),o=Object.entries(r).map(([a,c])=>({mid:a,count:c})),i=bs(o,[a=>a.count],["desc"]).slice(0,3).map(a=>a.mid);await Promise.all(i.map(async a=>{if(n?.aborted)return;const u=(await RA(a))?.face;u&&t.filter(d=>d.upper.mid.toString()===a).forEach(d=>{d.upper.face||=u;});}));}get extraTabbarView(){return x(SA,{})}}function kTe({service:e}){const{firstBvid:t,info:n}=St(e.state);return j(Be,{children:[x(pn,{title:j(Be,{children:["UP: ",n?.upper.name," ",x("br",{}),n?.intro||"简介: N/A"]}),children:j(Ep,{href:Nq(e.collectionId),className:Ay,children:[x(Ci,{className:"size-16px"}),n?.title]})}),t&&j(Ep,{href:bEe(t),className:Ay,children:[x(ag,{className:"size-16px"}),"播放全部"]})]})}function FTe({service:e}){return j(Be,{children:[j(Ep,{href:hA(e.entry.id,e.entry.attr),className:Ay,children:[x(Ci,{className:"size-16px"}),e.entry.title]}),j(Ep,{href:vEe(e.entry.id),className:Ay,children:[x(ag,{className:"size-16px"}),"播放全部"]})]})}const HTe=[It.FavTimeDesc,It.PlayCountDesc,It.PubTimeDesc];function z9(e){return HTe.includes(e)}const SW=Xf("fav-folder-all-items");async function a0(e){await SW.delete(e);}class CW{constructor(t,n,r){if(this.folderId=t,this.addSeparator=n,this.itemsOrder=r,this.itemsOrder===It.Initial)throw new Error("this should not happen!");z9(this.itemsOrder)?this.needLoadAll=false:this.needLoadAll=true;}needLoadAll;get hasMore(){return this.addSeparator&&!this.separatorAdded?true:this.needLoadAll?this.allItemsLoaded?!!this.bufferQueue.length:true:this.innerService?this.innerService.hasMore:true}separatorAdded=false;get separator(){return this.assertInnerService(),{api:je.Separator,uniqId:`fav-folder-separator-${this.folderId}`,content:x(FTe,{service:this.innerService})}}entry;innerService;assertInnerService(){ji(this.innerService,"this.innerService should not be undefined"),ji(this.entry,"this.entry should not be undefined");}async createService(){if(this.innerService)return;await CA();const t=Jr(mn.folders).find(n=>n.id===this.folderId);ji(t,`favStore.favFolders should have this entry[fid=${this.folderId}]`),this.entry=t,z9(this.itemsOrder)?this.innerService=new Kd(t,this.itemsOrder):this.innerService=new Kd(t);}async loadMore(t){if(this.innerService||await this.createService(),!!this.hasMore){if(this.addSeparator&&!this.separatorAdded)return this.separatorAdded=true,[this.separator];if(this.needLoadAll){this.allItemsLoaded||await this.loadAllItems(t),this.itemsOrder===It.Shuffle&&(this.bufferQueue=pi(this.bufferQueue));const n=this.bufferQueue.slice(0,Cs);return this.bufferQueue=this.bufferQueue.slice(Cs),n}else {const n=await this.innerService?.loadMore(t);return this.runSideEffects(),n}}}allItemsLoaded=false;bufferQueue=[];async loadAllItems(t){const n=await this.fetchAllItems(t);this.bufferQueue=N3(n,this.itemsOrder),this.allItemsLoaded=true,this.runSideEffects();}_fetchAllItems=async t=>{this.assertInnerService();const n=[];for(;this.innerService.hasMore&&!t.aborted;){const r=await this.innerService.loadMore(t)||[];n.push(...r);}return n};_fetchAllItemsWithCache=Mu({fn:this._fetchAllItems,tableName:SW,generateKey:()=>`${this.folderId}`,ttl:ao("5min")});fetchAllItems=t=>(this.assertInnerService(),this.entry.media_count>Kd.PAGE_SIZE*3?this._fetchAllItemsWithCache(t):this._fetchAllItems(t));runSideEffects(){this.assertInnerService(),typeof this.innerService.info?.media_count=="number"&&Fq(this.folderId,this.innerService.info.media_count);}get extraTabbarView(){return x(SA,{})}}class Kd{constructor(t,n=It.FavTimeDesc){this.entry=t,this.itemsOrder=n,this.hasMore=t.media_count>0;}static PAGE_SIZE=20;hasMore;info;page=0;async loadMore(t){if(!this.hasMore)return;const n={[It.FavTimeDesc]:"mtime",[It.PlayCountDesc]:"view",[It.PubTimeDesc]:"pubtime"}[this.itemsOrder],o=(await Jt.get("/x/v3/fav/resource/list",{params:{media_id:this.entry.id,pn:this.page+1,ps:Kd.PAGE_SIZE,keyword:"",order:n,type:"0",tid:"0",platform:"web"}})).data;if(!Zn(o)){gn(o.message||xf);return}this.page++,this.hasMore=o.data.has_more,this.info=o.data.info;let i=o.data.medias||[];return i=i.filter(a=>a.title!=="已失效视频"),i.map(a=>({...a,from:"fav-folder",folder:this.info,api:je.Fav,uniqId:`${je.Fav}-folder:${this.info?.id||this.entry.id}-${a.bvid}`}))}}class VTe{constructor(t,n,r){if(this.addSeparator=t,this.itemsOrder=n,this.excludedFolderIds=r,![It.Initial,It.Shuffle].includes(this.itemsOrder))throw new Error("invalid items order")}get useShuffle(){return this.itemsOrder===It.Shuffle}shuffleBufferQueue=[];get hasMoreInService(){return this.serviceCreated?this.allServices.some(t=>t.hasMore):true}get hasMore(){return this.useShuffle?!!this.shuffleBufferQueue.length||this.hasMoreInService:this.hasMoreInService}get extraTabbarView(){return j(Be,{children:[x(SA,{}),x(GRe,{allFavFolderServices:this.allFolderServices,state:this.state})]})}async loadMore(t){if(this.serviceCreated||await this.createServices(),!this.hasMore)return;if(!this.useShuffle)return this.allServices.find(o=>o.hasMore)?.loadMore(t);if(this.shuffleBufferQueue.lengthu.hasMore),a=pi(i).slice(0,6),c=(await Vl(a,async u=>await u.loadMore(t)||[],2)).flat().filter(u=>u.api!==je.Separator);this.shuffleBufferQueue=pi([...this.shuffleBufferQueue,...pi(c)]);}const n=this.shuffleBufferQueue.slice(0,Cs);return this.shuffleBufferQueue=this.shuffleBufferQueue.slice(Cs),n}allFolderServices=[];state=Bn({totalCountInFavFolders:0});serviceCreated=false;allServices=[];async createServices(){await CA();const{folders:t,collections:n}=Xd(Jr(mn));this.allFolderServices=t.map(r=>new Kd(r)),this.state.totalCountInFavFolders=t.filter(r=>!this.excludedFolderIds.includes(r.id.toString())).reduce((r,o)=>r+o.media_count,0);{const r=t.filter(i=>!this.excludedFolderIds.includes(i.id.toString()));let o=this.itemsOrder;o===It.Initial&&(o=It.FavTimeDesc),this.allServices.push(...r.map(i=>new CW(i.id,this.addSeparator,o)));}this.allServices.push(...n.map(r=>new yW(r.id,this.addSeparator,this.itemsOrder))),this.serviceCreated=true;}}function QA(){const e=Jr(mn);return {selectedKey:e.selectedKey,itemsOrder:yA(e.selectedKey,e.savedOrderMap),selectedFavFolderId:e.selectedFavFolderId,selectedFavCollectionId:e.selectedFavCollectionId,addSeparator:ot.fav.addSeparator,excludedFolderIds:ot.fav.excludedFolderIds}}function jTe(e){return {...e,get viewingAll(){return e.selectedKey==="all"},get viewingSomeFolder(){return typeof e.selectedFavFolderId=="number"},get viewingSomeCollection(){return typeof e.selectedFavCollectionId=="number"}}}class W1 extends Fs{static PAGE_SIZE=Cs;config;innerService;constructor(t){super(W1.PAGE_SIZE),this.config=jTe(t);const{viewingAll:n,viewingSomeFolder:r,viewingSomeCollection:o}=this.config;if(n)this.innerService=new VTe(this.config.addSeparator,this.config.itemsOrder,this.config.excludedFolderIds);else if(r)this.innerService=new CW(this.config.selectedFavFolderId,this.config.addSeparator,this.config.itemsOrder);else if(o)this.innerService=new yW(this.config.selectedFavCollectionId,this.config.addSeparator,this.config.itemsOrder);else throw new Error("unexpected case!")}get tabbarView(){const{tabbarView:t,extraTabbarView:n}=this.innerService;return t||x(qRe,{extraContent:n})}sidebarView=x(WRe,{});get hasMoreExceptQueue(){return this.innerService.hasMore}fetchMore(t){return this.innerService.loadMore(t)}decreaseTotal(){this.config.viewingAll?this.innerService.state.totalCountInFavFolders-=1:this.config.viewingSomeFolder&&this.config.selectedFavFolderId?Fq(this.config.selectedFavFolderId,t=>t-1):this.config.viewingSomeCollection&&this.config.selectedFavCollectionId;}}async function ZA({asc:e=false,searchText:t="",abortSignal:n,extraParams:r}={}){const i=(await Jt.get("/x/v2/history/toview/web",{signal:n,params:await y1({asc:e,key:t,viewed:0,web_location:333.881,...r})})).data;return Zn(i)?{total:i.data.count,items:UTe(i.data.list||[])}:(Go("getAllWatchlaterItems error %s, fulljson %o",i.message,i),{err:i.message})}function UTe(e){return e.filter(t=>!(t.title==="以下为更早添加的视频"&&t.aid===0&&t.bvid===""&&t.add_at===0))}async function qTe(e){const t=new FormData;t.append("resources",e.join(",")),t.append("csrf",$u());const n=await y1({}),o=(await Jt.post("/x/v2/history/toview/v2/dels",t,{params:n})).data;return Zn(o)?true:(gn(o?.message||"出错了"),false)}const Vh=Bn({searchText:void 0});function GTe({service:e}){const{watchlaterAddSeparator:t,watchlaterItemsOrder:n,watchlaterUseNormalVideoUrl:r}=qt(),o=bo(),{searchText:i}=St(Vh,{sync:true}),a=yRe(),{recSharedEmitter:c}=Ki();Ts(()=>{(async()=>(await hn(100),o()))();},[t,n,r]);const{total:u}=St(e.state),d=i?`共 ${u} 条搜索结果`:`共 ${u} 个视频`,m=typeof u=="number"&&x(ho,{color:"success",style:{marginRight:0,marginTop:1,cursor:"pointer"},title:d,onClick:()=>{gn(`稍后再看: ${d}`);},children:u});return j("div",{className:"flex items-center gap-x-12px",children:[x(KTe,{}),x(ba.Search,{allowClear:true,placeholder:"搜索稍后再看",style:{width:180},value:i,onChange:p=>Vh.searchText=p.target.value,onSearch:p=>{Vh.searchText=p,o();}}),m,a&&x(pn,{arrow:false,title:"移除稍后再看 (多选)",children:x(mt,{className:"icon-only-round-button",onClick:()=>ZTe(c),children:x(Hf,{})})}),x(Eg,{})]})}const xW={[qo.AddTimeDesc]:{icon:x(f3,{}),label:"最近添加",helpInfo:"按添加时间倒序"},[qo.AddTimeAsc]:{icon:x(d3,{}),label:"最早添加",helpInfo:"按添加时间增序"},[qo.Shuffle]:{icon:x(Mj,{}),label:"随机顺序",helpInfo:"不包括近期添加的稍后再看, 近期: 最近48小时内"}},wW=Object.values(qo),WTe=x("div",{className:"grid grid-cols-[repeat(2,max-content)] gap-x-1 gap-y-0 line-height-tight",children:wW.map(e=>{const{icon:t,label:n,helpInfo:r}=xW[e];return j(Be,{children:[j("div",{className:"flex-center gap-x-1",children:[t,n,": "]}),x("div",{children:r})]})})});function KTe(){const e=bo(),{ref:t,getPopupContainer:n}=Eu(),{watchlaterItemsOrder:r}=qt(),{searchText:o}=St(Vh),i=!!o;return x(bA,{disabled:i,value:i?qo.AddTimeDesc:r,onChange:a=>{ot.watchlaterItemsOrder=a,e();},list:wW,listDisplayConfig:xW,$ref:t,dropdownProps:{getPopupContainer:n},extraHelpInfo:WTe})}const gu=Bn({updatedAt:0,bvidSet:$r()});function YTe(e){const t=St(gu).bvidSet;return !!e&&t.has(e)}function $W(e){gu.updatedAt=Date.now(),gu.bvidSet=$r(e);}function XTe(e,t){gu.updatedAt&&gu.bvidSet.add(t);}async function QTe(){if(!S1()||!Yo())return;const{items:e=[]}=await ZA();e.length&&$W(e.map(t=>t.bvid));}Is&&(async()=>(await w1(),await AG(QTe,{retries:3,onFailedAttempt(e){Go(`Try updateWatchlaterState ${e.attemptNumber} failed. There are ${e.retriesLeft} retries left`);}})))();async function ZTe(e){const t=j1().map(a=>({item:a,cardData:Mg(a)})).filter(a=>a.cardData.avid).map(a=>[a.cardData.avid,a.item.uniqId,a.cardData.title]).filter(Boolean),n=t.map(a=>a[0]),r=t.map(a=>a[1]),o=t.map(a=>a[2]);if(!n.length)return gn("没有选中的视频");await qTe(n)&&e.emit("remove-cards",[r,o]);}class Tp extends Fs{constructor(t,n,r,o){super(Tp.PAGE_SIZE),this.searchText=o,this.innerService=t===qo.Shuffle&&!this.searchText?new k9(n,r):new JTe(t,n,this.searchText);}static PAGE_SIZE=10;sidebarView=void 0;innerService;get hasMoreExceptQueue(){return this.innerService.hasMore}fetchMore(t){return this.innerService.loadMore(t)}get tabbarView(){return x(GTe,{service:this})}get state(){return this.innerService.state}decreaseTotal(){this.innerService.state.total!==void 0&&this.innerService.state.total--;}getServiceSnapshot(){return {bvidIndexMap:this.innerService instanceof k9?this.innerService.currentBvidIndexMap:void 0}}}function EW(e){return {...e,api:je.Watchlater,uniqId:`${je.Watchlater}-${e.bvid}`}}const MW=()=>qn().subtract(2,"days").unix(),j3={api:je.Separator,uniqId:"watchlater-separator-recent",content:"近期"},U3={api:je.Separator,uniqId:"watchlater-separator-earlier",content:"更早"};function RW(e){throw gn(`获取稍后再看失败: ${e}`),new Error(`获取稍后再看失败: ${e}`,{cause:e})}class k9{constructor(t,n){this.addSeparator=t,n?.size?(this.keepOrder=true,this.prevBvidIndexMap=n):this.keepOrder=false;}hasMore=true;state=Bn({total:void 0});keepOrder;prevBvidIndexMap;async loadMore(t){if(!this.hasMore)return;const n=await this.fetch(t);return this.hasMore=false,n}currentBvidIndexMap;async fetch(t){const{items:n=[],err:r}=await ZA({asc:false,searchText:void 0,abortSignal:t});r!==void 0&&RW(r),$W(n.map(u=>u.bvid).filter(Boolean));const o=n.map(EW),i=MW(),a=o.findIndex(u=>u.add_atthis.prevBvidIndexMap?.get(m.bvid)??-1],["asc"]):d=pi(d),c=[!!u.length&&this.addSeparator&&j3,...u,!!d.length&&this.addSeparator&&U3,...d].filter(Boolean);}return this.state.total=n.length,this.currentBvidIndexMap=new Map(c.filter(u=>u.api!==je.Separator).map((u,d)=>[u.bvid,d])),c}}class JTe{constructor(t,n,r){this.order=t,this.addSeparator=n,this.searchText=r,this.searchText||ji(t!==qo.Shuffle,"shuffle not supported in NormalOrderService");}firstPageLoaded=false;state=Bn({total:void 0});hasMore=true;page=1;async loadMore(){if(!this.hasMore)return;const t=await ZA({asc:this.order===qo.AddTimeAsc,searchText:this.searchText,extraParams:{need_split:"true",ps:20,pn:this.page}});if(t.err!==void 0){this.hasMore=false,RW(t.err);return}const{items:n,total:r}=t,o=Math.ceil(r/20);this.firstPageLoaded=true,this.state.total=t.total,this.hasMore=this.page{a.bvid&&XTe("add",a.bvid);});const i=n.map(EW);return this.insertSeparator(i)}recentSeparatorInserted=false;earlierSeparatorInserted=false;insertSeparator(t){if(!this.addSeparator)return t;let n=[...t];const r=MW(),o=t.some(a=>a.add_ata.add_at>=r);if(this.order===qo.AddTimeAsc){if(!this.earlierSeparatorInserted&&o&&(n=[U3,...n],this.earlierSeparatorInserted=true),!this.recentSeparatorInserted&&i){const a=n.findIndex(c=>c.api===je.Watchlater&&c.add_at>=r);n=[...n.slice(0,a),j3,...n.slice(a)],this.recentSeparatorInserted=true;}}else if(!this.recentSeparatorInserted&&i&&(n=[j3,...t],this.recentSeparatorInserted=true),!this.earlierSeparatorInserted&&o){const a=n.findIndex(c=>c.api===je.Watchlater&&c.add_atx(Nt,{configPath:"appRecommend.addOtherTabContents",label:"显示来自其他 Tab 的内容",tooltip:j(Be,{children:["显示来自其他 Tab 的内容 ",x("br",{}),"如动态 / 收藏 / 稍后再看 ",x("br",{}),"但是: 刷新时间会更长"]}),extraAction:async()=>{await hn(100),e?.();}});function tAe(){const e=bo(),{hidingTabKeys:t}=qt(),n=t.includes(Je.Liked);return j("div",{className:"flex items-center gap-x-10px",children:[TW(e),n&&x(pn,{title:"查看「我」点赞的视频",children:x("a",{href:`/?${IG.Tab}=${Je.Liked}`,target:"_blank",children:x($j,{className:"size-18px align-top"})})})]})}class Ap extends Fs{constructor(t){super(Ap.PAGE_SIZE),this.config=t,this.innerService=new nAe,this.allServices=[this.innerService],this.initOtherTabServices();}static PAGE_SIZE=20;tabbarView=x(tAe,{});sidebarView=void 0;innerService;allServices=[];otherTabServices=[];initOtherTabServices(){if(!S1()||!this.config.addOtherTabContents)return;let t,n,r;{const a=EG();a.upMid=void 0,a.selectedGroupId=void 0;const c=XA(a);Object.assign(c,{showLiveInDynamicFeed:true,whenViewAllEnableHideSomeContents:false,filterCacheEnabled:false}),t=new G1(c);}{const a=Object.assign(QA(),{selectedKey:"all",itemsOrder:It.Shuffle,selectedFavFolderId:void 0,selectedFavCollectionId:void 0,addSeparator:false});n=new W1(a);}r=new Tp(qo.AddTimeDesc,false),this.otherTabServices=[t,n,r];const o=[],i=7/3;o.push(...this.otherTabServices),eQ(Math.round(i*this.otherTabServices.length),()=>o.push(this.innerService)),this.allServices=pi(o);}get hasMore(){return !!this.qs.bufferQueue.length||this.innerService.hasMore||this.otherTabServices.some(t=>t.hasMore)}hasMoreExceptQueue=true;fetchMore(t){throw new Error("Method not implemented.")}async loadMore(t){if(this.hasMore){for(;this.hasMore&&this.qs.bufferQueue.lengthi.hasMore);if(!n.length)break;const r=pi(n).slice(0,3),o=(await Promise.all(r.map(async i=>await i.loadMore(t)||[]))).flat().filter(i=>i.api!==je.Separator);this.qs.bufferQueue.push(...o),this.qs.bufferQueue=pi(this.qs.bufferQueue);}return this.qs.sliceFromQueue()}}async loadMoreBatch(t,n){if(this.hasMore)return this.qs.bufferQueue.length?this.qs.sliceFromQueue(n):this.qs.doReturnItems(await this.innerService.getRecommendTimes(t,n))}}class nAe{static PAGE_SIZE=16;hasMore=true;async getRecommend(){const t=await cg.get(`${oB}/x/v2/feed/index`,{timeout:2e4,responseType:"json",params:{build:"1",mobi_app:"iphone",device:"pad",idx:Math.floor(Date.now()/1e3)+RX(1e3)}}),n=t.data;if(!n.data)throw new Error("Request fail with none invalid json",{cause:{type:"invalid-json",statusCode:t.status,json:n}});return n?.data?.items||[]}loadMore(t,n=2){return this.getRecommendTimes(t,n)}async getRecommendTimes(t,n){let r=(await Promise.all(CL(n).map(()=>this.getRecommend()))).flat();return r=r.filter(i=>!(i.card_goto?.includes("ad")||i.goto?.includes("ad")||i.ad_info||i.card_goto==="banner"||i.goto==="av"&&i.player_args===void 0)),r=Wl(r,i=>i.param),r.map(i=>({...i,api:je.AppRecommend,uniqId:`${je.AppRecommend}-${i.param}`}))}}async function rAe(e,t){const{bvid:n,goto:r,recommendReason:o}=t,i=r==="av";return pu(e)&&i&&!!n&&KA(o)?(await Vq(n))?.pubdate:void 0}const oAe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",fillRule:"evenodd",d:"M19 10a4 4 0 1 1-8 0a4 4 0 0 1 8 0m-4 18a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0 14a4 4 0 1 0 0-8a4 4 0 0 0 0 8m22-32a4 4 0 1 1-8 0a4 4 0 0 1 8 0m-4 18a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0 14a4 4 0 1 0 0-8a4 4 0 0 0 0 8",clipRule:"evenodd"})]}),AW=f.forwardRef(oAe);function iAe(){const{dynamicFeed:e}=qt(),t=OA(),n=r=>({order:t.indexOf(r)+1});return x("div",{className:Fn.tabPane,children:j("div",{className:"grid grid-cols-[250px_1fr] gap-x-50px",children:[x(Zr,{title:j(Be,{children:["Tab 设置",x(Fr,{className:"ml-5px",children:"勾选显示, 拖动排序"})]}),resetSettingPaths:["hidingTabKeys","customTabKeysOrder"],children:x(sAe,{})}),j(Zr,{title:"更多设置",contentClassName:"gap-y-15px",children:[j("div",{style:n(Je.Watchlater),children:[j("div",{className:"flex items-center text-size-1.3em",children:[x(hi,{tabKey:Je.Watchlater,className:"mr-5px mt--1px"}),"稍后再看"]}),j("div",{className:Fn.settingsLine,children:[x(Nt,{configPath:"watchlaterAddSeparator",label:"添加分割线",tooltip:"添加「近期」「更早」分割线"}),x(Nt,{configPath:"watchlaterUseNormalVideoUrl",label:"使用普通视频链接",tooltip:_r("使用普通视频链接","使用「稍后再看」自动列表链接")})]})]}),j("div",{style:n(Je.Fav),children:[j("div",{className:"flex items-center text-size-1.3em",children:[x(hi,{tabKey:Je.Fav,className:"mr-5px mt--2px"}),"收藏"]}),x("div",{className:Fn.settingsLine,children:x(Nt,{configPath:"fav.addSeparator",label:"添加分割线",tooltip:"顺序显示时, 按收藏夹添加分割线"})})]}),j("div",{style:n(Je.DynamicFeed),children:[j("div",{className:"flex items-center text-size-1.3em",children:[x(hi,{tabKey:Je.DynamicFeed,className:"mr-5px mt--2px"}),"动态"]}),j("div",{className:Fn.settingsLine,children:[x(Nt,{configPath:"dynamicFeed.followGroup.enabled",label:"启用分组筛选",tooltip:j(Be,{children:["动态 Tab 启用分组筛选 ",x("br",{}),x(gW,{})]})}),x(Nt,{configPath:"dynamicFeed.showLive",label:"在动态中显示直播",tooltip:j(Be,{children:["动态里显示正在直播的 UP",x("br",{}),"P.S 仅在选择「全部」时展示"]})}),x(Nt,{configPath:"dynamicFeed.videoOnly",label:"只显示视频",tooltip:_r("只获取视频动态: 投稿视频 / 动态视频","获取全部动态: 包含视频 / 图片 / 文章等")}),x(Nt,{configPath:"dynamicFeed.whenViewAll.enableHideSomeContents",label:"「全部」动态过滤",tooltip:j(Be,{children:["查看「全部」动态时 ",x("br",{}),_r("将添加右键菜单, 点击可添加到「全部」动态的过滤列表","关闭此功能")]})}),e.whenViewAll.enableHideSomeContents&&x(vk,{size:"small",className:"w-full",items:[{key:"1",label:"在「全部」动态中隐藏 UP/分组 的动态",children:x(cAe,{})}]})]})]}),j("div",{style:n(Je.AppRecommend),children:[j("div",{className:"flex items-center text-size-1.3em",children:[x(hi,{tabKey:Je.AppRecommend,className:"mr-5px"}),"App 推荐"]}),x("div",{className:Fn.settingsLine,children:x("div",{className:"flex items-center",children:TW()})})]})]})]})})}function aAe(){const{hidingTabKeys:e}=qt();return f.useMemo(()=>uM.filter(t=>!e.includes(t)),[e])}function sAe({className:e,style:t}){const n=aAe(),r=OA({sync:true}),o=g$e(p$e(uA)),i=rt(a=>{const{over:c,active:u}=a;if(!c?.id||c.id===u.id)return;const d=r.indexOf(u.id.toString()),m=r.indexOf(c.id.toString()),p=NA(r,d,m);ot.customTabKeysOrder=p;});return x("div",{className:e,style:t,children:x(Wi.Group,{className:"block line-height-[unset]",value:n,onChange:a=>{if(!a.length)return Ft.error("至少选择一项!");qa({hidingTabKeys:uM.filter(c=>!a.includes(c))});},children:x(hq,{sensors:o,collisionDetection:C$e,onDragEnd:i,modifiers:[Q3e,X3e],children:x(rMe,{items:r,strategy:tMe,children:r.map(a=>x(lAe,{id:a},a))})})})})}function lAe({id:e}){const{label:t,desc:n}=Qf[e],{attributes:r,listeners:o,setNodeRef:i,transform:a,transition:c,setActivatorNodeRef:u}=uMe({id:e}),d={transform:pf.Transform.toString(a),transition:c};return j("div",{ref:i,style:d,className:"mt-8px h-35px flex items-center justify-between b-1px b-gate-bg-lv-2 rounded-6px b-solid pl-10px pr-6px",children:[j(Wi,{value:e,className:"inline-flex items-center [&_.ant-checkbox-label]:inline-flex [&_.ant-checkbox-label]:select-none [&_.ant-checkbox-label]:items-center",children:[x(hi,{tabKey:e,className:"mr-5px"}),x(pn,{align:{offset:[0,-6]},title:n,children:t})]}),x("div",{...o,...r,ref:u,className:"cursor-grab rounded-5px px-5px py-3px text-size-0 hover:bg-gate-bg-lv-3",children:x(AW,{className:"size-18px"})})]},e)}function cAe(){const{hideIds:e}=St(ot.dynamicFeed.whenViewAll),t=rt(async o=>{await Rs("dynamicFeed.whenViewAll.hideIds",{remove:[o]});}),{groups:n}=St(Zt);return no(()=>{Zt.updateGroups();}),e.length?x("div",{className:"max-h-250px flex flex-wrap gap-10px overflow-y-auto",children:e.map(o=>x(pG,{tag:o,onDelete:t,renderTag:i=>x(uAe,{tag:i,followGroups:n})},o))}):x("div",{className:"flex items-center justify-center",children:x(Fi,{})})}function uAe({tag:e,followGroups:t}){let n,r;e.startsWith(vf)?n=e.slice(vf.length):e.startsWith(hu)&&(r=e.slice(hu.length));const[o,i]=f.useState(void 0);no(async()=>{if(!n)return;const g=await Cg(n);g&&i(g);});const[a,c]=f.useState(void 0);no(()=>{if(!r)return;const g=t?.find(b=>b.tagid.toString()===r)?.name;g&&c(g);});const u=f.useMemo(()=>n?o||n:r?a||r:"无效数据",[n,o,r,a]),d=f.useMemo(()=>n?`mid: ${n}`:r?`分组: ${r}`:`Tag: ${e}`,[n,r,e]),m=f.useMemo(()=>n?x(lG,{className:"mr-2px size-12px"}):r?x(cG,{className:"mr-2px size-16px"}):void 0,[n,r]),p=f.useMemo(()=>n?Sg(n):r?uG(r):void 0,[n,r]);return x(Be,{children:x(pn,{title:d,children:j("span",{className:X("inline-flex items-center",n?"cursor-pointer":"cursor-text"),children:[m,p?x("a",{href:p,target:"_blank",children:u}):u]})})})}const l$=[{useBorder:false},{useBorder:true,useBorderOnlyOnHover:true},{useBorder:true,useBorderOnlyOnHover:false}],NW=["「卡片边框」: 禁用","「卡片边框」: 仅在悬浮时显示","「卡片边框」: 总是显示"];function dAe(){return la(["shift.b"],e=>{if(zs())return;const t=au(ot.style.videoCard,["useBorder","useBorderOnlyOnHover"]),n=l$.findIndex(a=>ua(a,au(t,Object.keys(a))));if(n===-1)throw new Error("unexpected curIndex = -1");const r=(n+1)%l$.length,o=l$[r];Object.assign(ot.style.videoCard,o);const i=NW[r];Ft.success(i);},{exactMatch:true})}function fAe(){const{videoCard:{actions:{showLargePreview:e,openInPipWindow:t},imgPreview:{enabled:n}},videoLinkOpenMode:r,style:o,autoPreviewUpdateInterval:i}=qt(),a=f.useMemo(()=>Object.values(rr).filter(c=>si[c].enabled??true).map(c=>{const u=si[c];return {config:u,value:c,label:j("span",{className:"flex-v-center gap-x-8px",children:[u.icon,x("span",{children:u.label})]})}}),[]);return j("div",{className:Fn.tabPane,children:[x(Zr,{title:"视频链接",resetSettingPaths:["videoLinkOpenMode"],children:j("div",{className:"flex-v-center",children:["打开方式",j(Fr,{useBlackBg:true,children:["选择点击视频(封面图片 或 标题)时打开的模式 ",x("br",{}),a.map(({value:c,config:u})=>!!u.desc&&j("div",{className:"mt-10px flex items-start first:mt-0",children:[j("span",{className:"inline-flex items-center",children:[u.icon,x("span",{className:"ml-4px mr-10px min-w-95px",children:u.label})]}),x("span",{className:"desc",children:u.desc})]},c))]}),x(Jl,{className:"ml-8px w-160px",options:a,value:r,onChange:c=>{qa({videoLinkOpenMode:c});}})]})}),x(Zr,{title:"边框样式",resetSettingPaths:["style.videoCard.useBorder","style.videoCard.useBorderOnlyOnHover","style.videoCard.useBoxShadow"],children:j("div",{className:Fn.settingsLine,children:[x(Nt,{configPath:"style.videoCard.useBorder",label:"使用卡片边框",tooltip:j(Be,{children:["勾选后, 视频卡片会有边框包裹, 更像是一个卡片~ ",x("br",{}),"整个卡片区域可点击 / 可触发预览 / 可使用右键菜单 ",x("br",{}),"否则只是封面区域可以 ",x("br",{}),"使用快捷键 ",x(ho,{color:"green",children:"shift+b"})," 切换状态 ",x("br",{}),NW.map(c=>x(ho,{color:"success",className:"mx-1",children:c},c))]})}),x(Nt,{configPath:"style.videoCard.useBorderOnlyOnHover",label:"仅在悬浮时显示",disabled:!o.videoCard.useBorder,tooltip:_r("仅在悬浮时显示","常驻显示")}),x(Nt,{configPath:"style.videoCard.useBoxShadow",disabled:!o.videoCard.useBorder,label:"悬浮卡片时使用发光效果",tooltip:x(Be,{children:"悬浮卡片时使用发光效果, 看起来比较花哨~"})})]})}),j(Zr,{title:j(Be,{children:["快照预览",x(gf,{configPath:"videoCard.imgPreview.enabled",tooltip:"关闭此功能",className:"ml-3"})]}),resetSettingPaths:["videoCard.imgPreview.enabled","videoCard.imgPreview.autoPreviewWhenKeyboardSelect","videoCard.imgPreview.autoPreviewWhenHover","videoCard.imgPreview.disableWhenMultiSelecting","useDelayForHover","autoPreviewUpdateInterval"],children:[j("div",{className:Fn.settingsLine,children:[x(Nt,{disabled:!n,configPath:"videoCard.imgPreview.autoPreviewWhenHover",label:"鼠标悬浮后自动开始",tooltip:j(Be,{children:[_r("鼠标悬浮后自动开始预览, 不跟随鼠标位置","预览进度跟随鼠标位置(百分比)"),"切换设置快捷键: ",x(ho,{color:"green",children:"shift+m"})]})}),x(Nt,{disabled:!n,configPath:"videoCard.imgPreview.disableWhenMultiSelecting",label:"多选时禁用",tooltip:_r("多选开启时, 禁用快照预览","不禁用")}),x(Nt,{disabled:!n,configPath:"useDelayForHover",label:"延迟悬浮预览",tooltip:"延迟悬浮预览"}),x(Nt,{disabled:!n,configPath:"videoCard.imgPreview.autoPreviewWhenKeyboardSelect",label:"键盘选中后自动开始",tooltip:j(Be,{children:["手动预览快捷键: ",x(ho,{color:"green",children:"."})," or ",x(ho,{color:"green",children:"p"})," ",x("br",{}),"切换设置快捷键: ",x(ho,{color:"green",children:"shift+p"})]})})]}),j("div",{className:Fn.settingsLine,children:["自动预览更新间隔",x(LR,{disabled:!n,className:"w-500px",min:0,max:1e3,keyboard:true,onChange:c=>ot.autoPreviewUpdateInterval=c,value:i}),j("span",{style:{width:"65px"},children:["(",i,"ms)"]})]})]}),x(Zr,{title:j(Be,{children:["操作按钮",j(Fr,{children:["视频卡片右上角「稍后再看」按钮旁 ",x("br",{}),"「稍后再看」因其通用性不提供关闭选项"]})]}),resetSettingPaths:["videoCard.actions.showLargePreview","videoCard.actions.openInPipWindow","videoCard.videoPreview.useMp4","videoCard.videoPreview.usePreferredCdn","videoCard.videoPreview.useScale","videoCard.videoPreview.useVideoCardAsTrigger","pipWindow.defaultLocked","pipWindow.autoWebFullscreen"],children:j("div",{className:"grid grid-cols-[repeat(2,max-content)_1fr] items-start gap-x-20px",children:[x(Nt,{configPath:"videoCard.actions.showLargePreview",label:"浮动预览",tooltip:j(Be,{children:["创意来源「浮图秀」, 但使用视频预览 ",x("br",{}),"操作说明: ",x("br",{}),"1. 鼠标悬浮打开 「浮动预览」, 离开关闭 ",x("br",{}),"2. 点击固定「浮动预览」, 固定指: 不再随鼠标移出关闭预览 ",x("br",{}),"3. 可使用以下方式关闭固定的「浮动预览」",j("ul",{className:"ml-30px list-circle",children:[x("li",{children:"再次点击视频卡片按钮"}),x("li",{children:"点击预览视频右上方的「关闭」按钮"}),x("li",{children:"触发其他卡片的「浮动预览」"}),x("li",{children:"Esc键"}),x("li",{children:"点击页面空白处"})]})]})}),x(Nt,{configPath:"videoCard.actions.openInPipWindow",label:"小窗打开",tooltip:x(Be,{children:"仅当「文档画中画」API 可用时, 勾选生效"})}),x(Hl,{className:"grid-col-span-full my-2px py-0"}),j("div",{className:"flex flex-col",children:[x(Nt,{configPath:"videoCard.videoPreview.useMp4",disabled:!e,label:"浮动预览: 使用 mp4",tooltip:_r("使用 mp4, 最高 720p, 有声音","使用 dash, 最高 1080p, 无声音, 理论上更快")}),x(Nt,{configPath:"videoCard.videoPreview.usePreferredCdn",disabled:!e,label:"浮动预览: 使用优选 CDN",tooltip:_r("使用优选 CDN (降低 MCDN & PCDN 优先级)","使用默认 CDN")}),x(Nt,{configPath:"videoCard.videoPreview.useScale",disabled:!e,label:"浮动预览: 使用放大效果",tooltip:_r("浮动预览面板: 放大展开 (类似浮图秀)","浮动预览面板: 滑动展开")}),x(Nt,{configPath:"videoCard.videoPreview.useVideoCardAsTrigger",label:"浮动预览: 使用视频卡片作为触发器",tooltip:j(Be,{children:[_r("使用「视频卡片」作为触发器","使用「视频卡片右上角按钮」作为触发器, 悬浮视频卡片 1 秒后展开"),x(Hl,{className:"my-1"}),x("ul",{className:"ml-25px list-circle",children:x("li",{children:"与上面「浮动预览」开关独立"})})]})})]}),j("div",{className:"flex flex-col",children:[x(Nt,{configPath:"pipWindow.defaultLocked",disabled:!t,label:"小窗: 默认锁定",tooltip:_r("小窗打开时: 默认锁定","小窗打开时: 不锁定")}),x(Nt,{configPath:"pipWindow.autoWebFullscreen",disabled:!t,label:"小窗: 自动网页全屏",tooltip:_r("自动网页全屏","不启用")})]})]})})]})}function mAe(){const e=YU().id,t=tA(e),{colorPickerThemeSelectedColor:n}=qt(),[r,o]=f.useState(n||wf.Pink),i=f.useMemo(()=>typeof r=="string"?r:r.toHexString(),[r]);return no(()=>{Jp.updateThrottled();}),x("div",{children:KU.map(({name:a,themes:c,tooltip:u})=>j(f.Fragment,{children:[j("div",{className:"mt-2 flex items-center text-size-1.5em",children:[a,x(Fr,{className:"size-16px",useBlackBg:true,children:u})]}),x("div",{className:"flex flex-wrap gap-x-5px gap-y-2px",children:c.map(d=>{const m=e===d.id,p=d.isCustom,g=!!t&&t!==d.id,b=28,y=b+8;let S=x("div",{"data-role":"preview-wrapper",style:{width:y},className:X("mx-auto my-0 aspect-1 b-2px rounded-full b-solid",m?"b-gate-primary":"b-transparent","flex items-center justify-center text-size-0"),children:x("div",{"data-role":"preview",className:"aspect-1 flex items-center justify-center rounded-full text-white",css:sn("width:",b,"px;background-color:",p?i:d.colorPrimary,";",""),children:m&&x(Sp,{size:18,useAnimation:g})})});d.isCustom&&(S=x(BR,{value:r,onChange:w=>o(w),onOpenChange:w=>{w||qa({colorPickerThemeSelectedColor:i});},children:S}));let C=j("div",{className:"min-w-60px cursor-pointer text-center",onClick:w=>{qa({theme:d.id});},children:[S,d.name]});return (d.tooltip||n9[d.id])&&(C=x(pn,{title:j(Be,{children:[d.tooltip,n9[d.id]]}),color:d.colorPrimary,children:C})),C=x(f.Fragment,{children:C},d.id),C})})]},a))})}function F9(e,t,n){return la(e,r=>{if(zs())return;const i=!!!Mo(ot,t);Cf(ot,t,i),Ft.success(`已${i?"启用":"禁用"}「${n}」`);},{exactMatch:true})}const hAe="basic",H9=Bn({tab:hAe});function pAe(){return F9(["shift.p"],"videoCard.imgPreview.autoPreviewWhenKeyboardSelect","键盘选中后自动开始预览"),F9(["shift.m"],"videoCard.imgPreview.autoPreviewWhenHover","鼠标悬浮后自动开始预览"),dAe(),null}const gAe={name:"4k370z",styles:"&.ant-tabs{.ant-tabs-tab{justify-content:end;padding-inline:5px 15px;}.ant-tabs-nav-operations{display:none;}}"};function vAe({show:e,onHide:t}){const{tab:n}=St(H9);return j(pg,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:900,clsModalMask:"[&:has(svg.peeking)]:bg-transparent",clsModal:"max-h-unset [&:has(svg.peeking)]:opacity-10",children:[j("div",{className:To.modalHeader,children:[j("div",{className:To.modalTitle,children:[x(DT,{className:"mr-4px mt--2px size-26px"}),"设置"]}),x(gg,{onClick:t})]}),x("main",{className:To.modalBody,style:{overflow:"hidden"},children:x(IR,{tabPlacement:"start",size:"middle",css:gAe,activeKey:n,onChange:r=>H9.tab=r,items:[{label:"常规设置",key:"basic",children:x(w3e,{})},{label:"视频卡片",key:"video-card",children:x(fAe,{})},{label:"内容过滤",key:"filter",children:x(U3e,{})},{label:"主题选择",key:"theme-select",children:x("div",{className:Fn.tabPane,children:x(mAe,{})})},{label:"Tab 设置",key:"video-source-tab-config",children:x(iAe,{})},{label:"其他页面",key:"other-pages",children:x(K3e,{})},{label:"高级设置",key:"advance",children:x(W2e,{})}]})})]})}const bAe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m19 12l12 12l-12 12"})]}),PW=f.forwardRef(bAe);function yAe({children:e,initialOpen:t=false,ref:n}){const[r,o]=FU(t);f.useImperativeHandle(n,()=>o,[o]);const i=x(mt,{onClick:o.toggle,className:"icon-only-round-button",children:x(PW,{className:X("size-13px",r?"rotate-z-0":"rotate-z-180deg")})});return j(Be,{children:[i,r&&e]})}function IW({Component:e,defaultProps:t,containerClassName:n}){const r=Bn(t);function o(){const u=St(r);return x(e,{...u})}const i=Ip(()=>{const u=document.createElement("div");u.className=X(Ca,n),document.body.appendChild(u),Ka.createRoot(u).render(x(ks,{children:x(o,{})}));});function a(u){return (...d)=>(i(),u(...d))}const c=a(u=>{Object.assign(r,u);});return {WrappedComponent:o,proxyProps:r,mount:i,wrapAction:a,updateProps:c}}const Ny=yH();function SAe(){return St(Ny)}function CAe(e){const t=SAe();return e?t.get(e):void 0}function xAe(e){Ny.delete(e);}const wAe={show:false,reasons:[],onHide:EAe,okAction:void 0},{proxyProps:$Ae,updateProps:OW}=IW({Component:RAe,containerClassName:"show-dislike-container",defaultProps:wAe}),DW=new bi;function EAe(){DW.emit("modal-close"),OW({show:false,reasons:[],okAction:void 0});}async function MAe(e,t){OW({show:true,reasons:e,okAction:t}),await DW.once("modal-close");}const _W=function(){return St($Ae).show};function RAe({show:e,reasons:t,onHide:n,okAction:r}){const o=f.useRef(null),i=()=>!!e&&!!t?.length,a=Va(async b=>r?.(b),{manual:true}),c=a.loading,[u,d]=f.useState(t.length-1);Hwe(()=>{d(t.length-1);},[t]);const m=["1","2","3","4","5","6"];la(m,b=>{if(!i()||!m.includes(b.key)||!t?.length)return;const y=Number(b.key)-1;y>=0&&y{if(!i()||zs())return;const y=t.length;let S=u+b;S<0&&(S=S%y+y),S>y-1&&(S=S%y),d(S);});la("uparrow",()=>p(-1),{exactMatch:true}),la("downarrow",()=>p(1),{exactMatch:true});const g=hg(async b=>{if(!i()||u<0||u>t.length-1)return;const y=t[u];if(!y)return;b.preventDefault(),b.stopPropagation(),await a.runAsync(y)&&n();});return la("enter",g,{exactMatch:true}),j(pg,{show:e,onHide:n,hideWhenMaskOnClick:true,hideWhenEsc:true,width:350,clsModal:"rounded-15px",children:[j("div",{className:To.modalHeader,children:[j("div",{className:To.modalTitle,children:[x(OT,{className:"size-25px"}),x("span",{className:"ml-5px",children:"我不想看"}),j(Fr,{children:["选择后将减少相似内容推荐 ",x("br",{}),"操作说明: ",x("br",{}),j("div",{className:"ml-10px",children:["1. 使用删除键打开弹窗, Esc 关闭 ",x("br",{}),"2. 数字键 或 方向键选择 ",x("br",{}),"3. 回车键 或 确定按钮提交 ",x("br",{})]})]})]}),x(gg,{onClick:n})]}),x("div",{className:To.modalBody,ref:o,children:x(u1,{spinning:c,indicator:_j,children:x("div",{className:"reason-list mb-20px mt-20px flex flex-col gap-y-10px",children:t.map((b,y)=>{const S=y===u;return j("button",{"data-id":b.id,className:X("reason",{active:S},"relative flex cursor-pointer items-center b-2px rounded-6px b-solid bg-transparent px-6px py-12px",S?"b-gate-primary":"b-gate-border"),disabled:c,onClick:()=>{d(y);},children:[x("span",{"data-cls":"reason-no",className:"size-20px flex flex-none items-center justify-center rounded-full bg-gate-primary text-13px color-white",children:y+1}),x("span",{className:"flex-1 px-4px text-14px",children:b.name}),x("span",{className:"size-20px flex-none",children:S&&x(Sp,{className:"h-100% w-100% color-gate-primary",useAnimation:true})})]},b.id)})})})}),j("div",{className:"mt-2 flex items-center justify-end gap-x-10px",children:[x(mt,{onClick:n,children:"取消"}),x(mt,{type:"primary",onClick:g,loading:c,children:"确定"})]})]})}const LW={modalWidth:60,favFolderOrder:"default"},yh=CH({...LW},"modal-fav-manager");function TAe(e){return e=e.replace(new RegExp("^[\\s\\p{RGI_Emoji}]+","v"),""),e=HA(e),e}function AAe(){const{modalWidth:e,favFolderOrder:t}=St(yh),n="text-1.5em",r="text-1.2em";return j("div",{className:"flex flex-col gap-y-10px",children:[j("div",{className:"flex items-center justify-between",children:[x("div",{className:n,children:"窗口设置"}),x(mt,{className:"icon-only-round-button size-24px",onClick:()=>Object.assign(yh,LW),children:x(ly,{})})]}),j("div",{children:[j("div",{className:r,children:["窗口宽度 ",e,"%"]}),x(LR,{className:"mt-0",value:e,min:30,max:90,onChange:o=>{yh.modalWidth=o;}})]}),j("div",{children:[x("div",{className:r,children:"收藏夹排序"}),j(Cr.Group,{value:t,onChange:o=>{yh.favFolderOrder=o.target.value;},children:[x(Cr,{value:"default",children:"默认顺序"}),x(Cr,{value:"name",children:"按名称"})]})]})]})}function NAe({show:e,onHide:t,mode:n,pickOkAction:r,modifyInitialSelectedIds:o,modifyAllowEmpty:i,modifyOkAction:a}){const{modalWidth:c,favFolderOrder:u}=St(yh),[d,m]=f.useState(void 0),[p,g]=f.useState(void 0),b=Va(xA,{manual:true}),y=Va(async _=>r?.(_),{manual:true}),S=Va(async _=>a?.(_),{manual:true}),{folders:C}=St(mn),w=f.useMemo(()=>{const _=C.map((q,V)=>({...q,vol:V+1}));if(!p)return _;const L=_.filter(q=>q.title.includes(p)),H=_.filter(q=>q.title.toLowerCase().includes(p.toLowerCase())),U=_.filter(q=>vX.match(q.title,p));return Wl([...L,...H,...U],q=>q.id)},[C,p]),M=f.useMemo(()=>u==="name"?Ey(w,[_=>pA(_.attr)?1:0,_=>TAe(_.title)],["desc",VA]):w,[w,u]),T=f.useMemo(()=>new Set([o].flat().filter(_=>typeof _=="number")),[o]),R=PAe(),I=n==="modify"&&i,P=f.useMemo(()=>!I&&!d||n==="modify"&&ua(Array.from(T),[d]),[I,d,n,T]);la("r",()=>{e&&(zs()||b.run(true));},{exactMatch:true});const N=rt(async()=>{let _;if(d&&(_=C.find(L=>L.id===d)),!I&&!_)return Ft.error("请选择一个收藏夹");n==="pick"&&(ji(_,"selectedFolder should not be empty when mode=pick"),await y.runAsync(_)&&t()),n==="modify"&&await S.runAsync(_)&&t();}),O=rt(()=>{if(!(!e||n!=="modify"||!T.size)&&(!d||!T.has(d))){const _=Array.from(T)[0];m(_);}});return f.useEffect(()=>{e&&(b.run(),O());},[e]),Ts(()=>{if(e&&(!d||!T.has(d))){const _=Array.from(T)[0];m(_);}},[T]),j(pg,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:`${c}vw`,clsModal:"rounded-15px",children:[j("div",{className:To.modalHeader,children:[j("div",{className:"flex flex-wrap items-center gap-x-10px gap-y-1",children:[j("div",{className:To.modalTitle,children:[n==="pick"?x(PSe,{className:"size-25px"}):x(_T,{className:"size-25px"}),x("span",{className:"ml-5px",children:n==="pick"?"选择目标收藏夹":"修改收藏"})]}),x(ba,{className:"w-200px",allowClear:true,placeholder:"过滤: 支持拼音 / 拼音首字母",value:p,onChange:_=>g(_.target.value),spellCheck:false}),!!p&&j("span",{className:"ml-5px",children:[x("span",{className:X({"text-red":C.length&&!M.length}),children:M.length})," ","/ ",x("span",{children:C.length})]}),j(Fr,{className:"ml-5px size-1.3em",children:["1. 使用 ",x("kbd",{className:X(uu,"mx-2px"),children:"r"})," 刷新收藏夹 ",x("br",{}),"2. 使用 ",x("kbd",{className:X(uu,"mx-2px"),children:"esc"})," 取消操作, 关闭窗口 ",x("br",{}),"3. 使用 拼音 / 拼音首字母 过滤收藏夹标题 ",x("br",{})]}),x(Gi,{trigger:"click",title:x(AAe,{}),children:x(DT,{className:"size-1.3em cursor-pointer"})})]}),x(gg,{onClick:t})]}),x("div",{className:X(To.modalBody),children:x(u1,{spinning:b.loading||y.loading||S.loading,indicator:_j,children:x("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(225px,1fr))] mb-10px min-h-100px content-start items-center gap-10px pr-15px",children:M.length?M.map(_=>{const L=n==="modify"&&T.has(_.id),H=_.id===d;return j("button",{"data-id":_.id,className:X({active:H},"relative min-h-40px flex cursor-pointer items-center b-2px b-gate-border rounded-20px b-solid bg-transparent px-4px line-height-[1.2] hover:bg-gate-bg-lv1",H&&"b-gate-primary color-white bg-gate-primary! hover:bg-gate-primary-lv1!"),onClick:()=>{if(H&&I)return m(void 0);m(_.id);},children:[L&&x(pn,{title:"源收藏夹",placement:"left",children:x("span",{className:X("absolute left-2 top-50% size-2.5 flex-center translate-y--50% rounded-full",R)})}),j("span",{className:"flex-1 px-4px text-14px",children:[_.title," (",_.media_count,")"]}),x("span",{className:"mr-2px size-20px flex-none",children:H&&x(Sp,{className:"size-full color-white",useAnimation:true})})]},_.id)}):x(Fi,{className:"grid-col-span-full",image:Fi.PRESENTED_IMAGE_SIMPLE,description:"未找到收藏夹",children:"无过滤结果, 请检查过滤词 !"})})})}),j("div",{className:"mt-2 flex items-center justify-between",children:[x("div",{className:"flex-v-center gap-x-10px",children:j("a",{href:`https://space.bilibili.com/${Yo()}/favlist`,target:"_blank",className:"flex-v-center gap-x-1",children:[x(Ci,{className:"relative top--1px size-13px"}),"去个人空间新建收藏夹"]})}),j("div",{className:"flex-v-center gap-x-10px",children:[x(mt,{onClick:t,children:"取消"}),x(mt,{type:"primary",onClick:N,loading:y.loading||S.loading,disabled:P,children:"确定"})]})]})]})}function PAe(){const{theme:e}=qt();return e===dy.id?"bg-$brand_blue":"bg-$brand_pink"}const IAe={onHide:DAe,show:false,mode:"pick",pickOkAction:void 0,modifyInitialSelectedIds:void 0,modifyOkAction:void 0},{proxyProps:OAe,updateProps:JA}=IW({Component:NAe,containerClassName:"ModalFavManager",defaultProps:IAe}),e6=new bi;function DAe(){JA({show:false}),e6.emit("modal-close");}function BW(){return St(OAe).show}async function _Ae(e){JA({show:true,mode:"pick",pickOkAction:e}),await e6.once("modal-close");}async function Py(e,t,n=true){JA({show:true,mode:"modify",modifyInitialSelectedIds:e,modifyOkAction:t,modifyAllowEmpty:n}),await e6.once("modal-close");}async function t6(e,t,n){if(ua(t,[n?.id]))return Ft.warning("请选择不同的收藏夹!"),false;if(!await mu.modifyFav(e,t,n?.id))return false;[...t??[],n?.id].filter(a=>a!==void 0).forEach(a=>a0(a));let i;return n?i=`${t?.length?"已移动收藏到":"已加入收藏"}「${n.title}」`:i="已取消收藏",Ft.success(i),true}var q3=new Map,wb=new WeakMap,V9=0,LAe;function BAe(e){return e?(wb.has(e)||(V9+=1,wb.set(e,V9.toString())),wb.get(e)):"0"}function zAe(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?BAe(e.root):e[t]}`).toString()}function kAe(e){const t=zAe(e);let n=q3.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(a=>{a.forEach(c=>{var u;const d=c.isIntersecting&&o.some(m=>c.intersectionRatio>=m);e.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=d),(u=r.get(c.target))==null||u.forEach(m=>{m(d,c);});});},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},q3.set(t,n);}return n}function FAe(e,t,n={},r=LAe){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const u=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),()=>{}}const{id:o,observer:i,elements:a}=kAe(n),c=a.get(e)||[];return a.has(e)||a.set(e,c),c.push(t),i.observe(e),function(){c.splice(c.indexOf(t),1),c.length===0&&(a.delete(e),i.unobserve(e)),a.size===0&&(i.disconnect(),q3.delete(o));}}function HAe({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:c,fallbackInView:u,onChange:d}={}){var m;const[p,g]=f.useState(null),b=f.useRef(d),y=f.useRef(c),[S,C]=f.useState({inView:!!c,entry:void 0});b.current=d,f.useEffect(()=>{if(y.current===void 0&&(y.current=c),a||!p)return;let T;return T=FAe(p,(R,I)=>{const P=y.current;y.current=R,!(P===void 0&&!R)&&(C({inView:R,entry:I}),b.current&&b.current(R,I),I.isIntersecting&&i&&T&&(T(),T=void 0));},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{T&&T();}},[Array.isArray(e)?e.toString():e,p,o,r,i,a,n,u,t]);const w=(m=S.entry)==null?void 0:m.target,$=f.useRef(void 0);!p&&w&&!i&&!a&&$.current!==w&&($.current=w,C({inView:!!c,entry:void 0}),y.current=c);const M=[g,S.inView,S.entry];return M.ref=M[0],M.inView=M[1],M.entry=M[2],M}function j9(e){return !f.Children.toArray(e.props?.children).length}function VAe(e){const[t,n]=f.useState(e),r=f.useRef(t),o=f.useCallback(a=>{const c=typeof a=="function"?a(r.current):a;r.current=c,n(c);},[n]),i=f.useCallback(()=>r.current,[]);return [t,o,i]}function Tl(e){const[t,n,r]=VAe(e),o=f.useMemo(()=>({state:t,get:r,set:n,get val(){return r()},set val(i){n(i);}}),[r,n]);return o.state=t,o}function G3(e){const t=f.useRef(e),n=f.useCallback(()=>t.current,[]),r=f.useCallback(o=>t.current=o,[]);return f.useMemo(()=>({get:n,set:r,get val(){return n()},set val(o){r(o);}}),[n,r])}function zW({src:e,avif:t,webp:n,imgProps:r,className:o,...i}){return t??=!sg,n??=true,j("picture",{className:ar("h-full w-full object-cover",o),...i,children:[t&&x("source",{srcSet:`${e}.avif`,type:"image/avif"}),n&&x("source",{srcSet:`${e}.webp`,type:"image/webp"}),x("img",{src:e,loading:"lazy",className:"block h-full w-full",...r})]})}const jAe=typeof unsafeWindow<"u"?unsafeWindow:globalThis,n6=(e,t)=>{Sf(()=>jAe[e]=t);},UAe=`${lM}_gridItems`;function qAe(e){const t=e.filter(n=>n.api!==je.Separator);CRe(t),n6(UAe,t);}const GAe={getGenericCardDatas:BA,copyBvidsSingleLine:zA,copyBvidInfos:FA};setTimeout(()=>{Object.entries(GAe).forEach(([e,t])=>{n6(`${lM}_${e}`,t);});});function WAe(e){const{enabled:t,keywords:n}=St(ot.filter.byAuthor),{blockUpMids:r}=f.useMemo(()=>hG(n),[n]);return e?t&&r.has(e):false}var $b={},Co={},c$={exports:{}},U9;function kW(){return U9||(U9=1,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=true,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=true,e.exports.default=e.exports;})(c$)),c$.exports}var q9;function r6(){if(q9)return Co;q9=1;var e=wa();Object.defineProperty(Co,"__esModule",{value:true}),Co.isUndef=Co.isString=Co.isObject=Co.isNumber=Co.isFunction=Co.isBoolean=void 0;var t=e(kW());return Co.isObject=function(r){return r!==null&&(0, t.default)(r)==="object"},Co.isFunction=function(r){return typeof r=="function"},Co.isString=function(r){return typeof r=="string"},Co.isBoolean=function(r){return typeof r=="boolean"},Co.isNumber=function(r){return typeof r=="number"},Co.isUndef=function(r){return typeof r>"u"},Co}var u$={},G9;function KAe(){return G9||(G9=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=!!(typeof window<"u"&&window.document&&window.document.createElement);e.default=t;})(u$)),u$}var W9;function o6(){if(W9)return $b;W9=1;var e=wa();Object.defineProperty($b,"__esModule",{value:true}),$b.getTargetElement=r;var t=r6(),n=e(KAe());function r(o,i){if(n.default){if(!o)return i;var a;return (0, t.isFunction)(o)?a=o():"current"in o?a=o.current:a=o,a}}return $b}var FW=o6();async function YAe(e,t,n=false,r=false){const o={cid:t,fnver:0,fnval:n?1:16},i=e.toString();if(i.startsWith("BV"))o.bvid=i;else if(/^\d+$/.test(i))o.avid=i;else throw new Error("Invalid videoId provided, must be avid | bvid");const c=(await Jt.get("/x/player/wbi/playurl",{params:o})).data;function u(p){return Ey(p,[g=>XAe(g,r)],["desc"])}if(c?.data?.durl){const p=(c.data.durl||[]).map(g=>[g.url,...g.backup_url||[]]).flat().filter(Boolean);if(p.length)return u(p)}return Ey(c.data?.dash?.video||[],["id","codecid"],["desc","desc"]).map(p=>u([p.baseUrl,...p.backupUrl||[]])[0]).filter(Boolean)}function XAe(e,t){if(!t)return 10;const{hostname:n,searchParams:r,pathname:o}=new URL(e);return n.includes("mcdn")||r.get("os")==="mcdn"?2:o.startsWith("/v1/resource/")?1:n.includes("-mirror")?100:10}function i6(e){return !!(e?.image?.length&&e?.index?.length)}function K9(e){return Zn(e)?i6(e.data):true}async function QAe(e){const n=(await Jt.get("/x/player/videoshot",{params:{bvid:e,index:"1"}})).data;return Zn(n)||Go("videoshot error for %s: %o",e,n),i6(n.data)||Go("videoshot data invalid bvid=%s: %o",e,n.data),n}const d$=new qA({maxSize:1e4}),ZAe=Ls(async e=>{if(d$.has(e)){const a=d$.get(e);if(a)return a}const t=5,n=200;let r=0,o;do{if(r++,o=await QAe(e),K9(o))break;await hn(n);}while(r{for(const c of a.slice(1))await _9(c);})();}return o}),JAe=oo.extend("VideoCard:services");function HW(e){return async function(n){const r=new URLSearchParams({aid:n,csrf:$u()}),i=(await Jt.post(`/x/v2/history/toview/${e}`,r)).data,a=Zn(i);return a||gn(i?.message||"出错了"),a}}const W3=HW("add"),e6e=HW("del"),VW=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){const i=(await cg.get(oB+t,{responseType:"json",params:{goto:n.goto,id:n.param,reason_id:r,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data,a=Zn(i);let c=i.message;return a||(c||=_p,c+=`(code ${i.code})`,c+=` 请重新获取 access_key 后重试`),{success:a,json:i,message:c}}},t6e=VW("dislike"),n6e=VW("cancel");async function r6e(e){return {videoshotJson:await ZAe(e)}}function o6e(e){return i6(e?.videoshotJson?.data)}const i6e=e=>!!e?.playUrls?.length,Y9=new qA({maxSize:1e4,maxAge:ao("1h")}),a6e=Ls(async({bvid:e,cid:t,useMp4:n,usePreferredCdn:r,aspectRatioFromItem:o})=>{const i=JSON.stringify([e,n,r]),a=Y9.get(i);if(a)return a;let c;if(t===void 0||o===void 0){const m=await jq(e);if(t=m[0]?.cid,c=m[0]?.dimension,t===void 0)throw new TypeError(`can not get cid by bvid=${e}`)}const[u,d]=await Op(()=>YAe(e,t,n,r));if(JAe("playUrl: bvid=%s cid=%s %s",e,t,d),u)throw sa.error({title:"获取视频播放地址失败",description:u.message||u}),u;return d?.length&&Y9.set(i,{playUrls:d,dimension:c}),{playUrls:d??void 0,dimension:c}}),s6e=oo.extend("VideoCard:LargePreview"),jW={right:{multiplier:1,axis:"x",reverse:"left"},left:{multiplier:-1,axis:"x",reverse:"right"},bottom:{multiplier:1,axis:"y",reverse:"top"},top:{multiplier:-1,axis:"y",reverse:"bottom"}},uo={border:40,card:10};function l6e(e){return e?.closest(v3(Al,"bili-video-card"))?.querySelector(v3(aB,"bili-video-card__image"))?.getBoundingClientRect()}const c6e=f.memo(function({children:t,aspectRatio:n=1.7777777777777777,cardDescendantTarget:r,ref:o,...i}){const a=_1(o),[c,u]=f.useState(false),[d,m]=f.useState(void 0),p=rt(()=>{u(false),m(void 0);}),g=rt(()=>{const $=l6e(FW.getTargetElement(r)??void 0);if(!$)return p();const[M,T]=[document.documentElement.clientWidth,document.documentElement.clientHeight],R=40;if($.top>T-R||$.bottom<0+R||$.left>M-R||$.right<0+R)return p();const I={top:{x:0,y:0,width:M,height:$.top},bottom:{x:0,y:$.bottom,width:M,height:T-$.bottom},left:{x:0,y:0,width:$.left,height:T},right:{x:$.right,y:0,width:M-$.right,height:T}},P=K=>{const J=n,ee=1,te=K.width/J,ne=K.height/ee;return {scale:Math.min(te,ne),scaleLimit:te>ne?"height":"width"}},N=bs(Object.entries(I).map(([K,J])=>({direction:K,bbox:J,...P(J)})),["scale",K=>{switch(K.direction){case "top":return $.top;case "bottom":return T-$.bottom;case "left":return $.left;case "right":return M-$.right}}],["desc","desc"])[0];s6e("picked direction",N);const{direction:O,bbox:_,scale:L,scaleLimit:H}=N;let U,q;if(H==="width")U=Math.floor(_.width-(uo.card+uo.border)),q=U/n;else if(H==="height")q=Math.floor(_.height-(uo.card+uo.border)),U=q*n;else throw new Error("unexpected scaleLimit");let V=0,z=0,F=0,G=0;const Y=()=>{F=$.y+$.height/2-z;},Q=()=>{G=$.x+$.width/2-V;},D=()=>{if(VM-uo.border){V=M-uo.border-U;return}},B=()=>{if(zT-uo.border){z=T-uo.border-q;return}};switch(O){case "top":V=$.x+$.width/2-U/2,z=$.top-uo.card-q,D(),Q();break;case "bottom":V=$.x+$.width/2-U/2,z=$.bottom+uo.card,D(),Q();break;case "right":V=$.right+uo.card,z=$.y+$.height/2-q/2,B(),Y();break;case "left":V=$.left-uo.card-U,z=$.y+$.height/2-q/2,B(),Y();break}V=Math.floor(V),z=Math.floor(z),u(true),m({direction:O,elWidth:U,elHeight:q,elPosX:V,elPosY:z,arrowTop:F,arrowLeft:G});}),b=f.useMemo(()=>Kl(g,100),[g]);no(b),ma("resize",b,{target:window}),ma("scroll",b,{target:window});const{useScale:y}=qt().videoCard.videoPreview,S=y?.2:.3,C=f.useMemo(()=>{const $=d?.direction;if(!$)return;const{axis:M,multiplier:T,reverse:R}=jW[$];if(y)return M==="x"?{scale:.5,transformOrigin:`${R} ${d.arrowTop}px`}:{scale:.5,transformOrigin:`${d.arrowLeft}px ${R}`};{let I=30;return $==="top"&&(I=20),M==="x"?{x:-T*I,y:0}:{x:0,y:-T*I}}},[d,y]);return x("div",{...i,ref:a,className:X("fixed",aCe,c?"block":"hidden"),css:d&&sn("width:",d.elWidth,"px;height:",d.elHeight,"px;top:",d.elPosY,"px;left:",d.elPosX,"px;",""),children:c&&j(PT.div,{className:"relative h-100%",initial:{opacity:0,...C},animate:{opacity:1,x:0,y:0,scale:1},transition:{bounce:0,duration:S},children:[d?.direction&&x(u6e,{size:7,direction:d.direction,arrowTop:d.arrowTop,arrowLeft:d.arrowLeft}),x("div",{className:"h-full overflow-hidden rounded-20px bg-white/50% backdrop-blur-10px",css:sn("box-shadow:0px 0px 1px 1px ",ya,";",""),children:t})]})})});function u6e({size:e,direction:t,arrowTop:n,arrowLeft:r}){const{axis:o,multiplier:i,reverse:a}=jW[t],c=f.useMemo(()=>o==="x"?sn` ${t}: 100%; margin-${t}: -1px; top: ${n}px; margin-top: -${e/2}px; `:sn` ${t}: 100%; margin-${t}: -1px; left: ${r}px; margin-left: -${e/2}px; `,[e,t,o,n,r]);return x("div",{className:"absolute box-content h-0 w-0",css:[sn("border:",e,"px solid transparent;",""),c,sn` border-${t}-color: ${ya}; `,"",""]})}const $d=await( WR({volume:void 0,muted:void 0},"large-preview-store")),d6e=function({currentTimeRef:e,ref:t,...n}){const r=_1(t),o=f.useRef(false);no(()=>{r.current&&(typeof e.current=="number"&&(r.current.currentTime=e.current),typeof $d.volume=="number"&&(r.current.volume=$d.volume),typeof $d.muted=="boolean"&&(r.current.muted=$d.muted)),o.current=true;});const i=rt(()=>{o.current&&(e.current=r.current?.currentTime);}),a=rt(()=>{o.current&&r.current&&($d.volume=r.current.volume,$d.muted=r.current.muted);});return x("video",{ref:r,...n,onTimeUpdate:i,onVolumeChange:a})},f6e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M10.696 17.504c2.639-2.638 5.774-2.565 9.182-.696L32.62 9.745l-.721-4.958L43.213 16.1l-4.947-.71l-7.074 12.73c1.783 3.638 1.942 6.544-.697 9.182l-7.778-7.778L6.443 41.556l11.995-16.31z"})]}),m6e=f.forwardRef(f6e),h6e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M39 6H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3"}),x("path",{d:"M20.5 28v-6.062l5.25 3.03L31 28l-5.25 3.031l-5.25 3.031zM6 15h36m-9-9l-6 9m-6-9l-6 9"})]})]}),p6e=f.forwardRef(h6e);function X9(e){e.current!==void 0&&(clearTimeout(e.current),e.current=void 0);}function UW({shouldFetchPreviewData:e,hasLargePreviewActionButton:t,actionButtonVisible:n,actionButtonProps:r,actionButtonCss:o,bvid:i,cid:a,uniqId:c,recSharedEmitter:u,cardTarget:d,aspectRatioFromItem:m,cover:p,videoCardAsTriggerRef:g}){const{useMp4:b,useVideoCardAsTrigger:y,usePreferredCdn:S}=St(ot.videoCard.videoPreview),C=Tl(void 0),w=hg(async()=>{if(!e||i6e(C.val))return;const re=await a6e({bvid:i,cid:a,useMp4:b,usePreferredCdn:S,aspectRatioFromItem:m});C.set(re);});Ts(()=>{C.set(void 0);},[b,S]);const $=Va(w,{manual:true,loadingDelay:100}),[M,T]=f.useState(false),R=Tl(void 0),I=Tl(void 0),P=Tl(void 0),N=G3({}),O=rt(()=>P.val?Date.now()-P.val<1200:false),_=f.useRef(void 0),L=f.useRef(void 0),H=rt(()=>{X9(_),X9(L);}),U=rt((re,ce)=>{T(true),R.set(re),I.set(ce),u.emit("show-large-preview",c),P.set(void 0);}),q=rt(()=>{T(false),R.set(void 0),I.set(void 0),P.set(Date.now());});xo(u,"show-large-preview",re=>{re!==c&&(H(),q());});const V=rt(re=>{if(N.set({...N.val,[re]:true}),R.val==="click")return;$.run(),H();let ce=0;re==="video-card-action-button"&&(ce=200),re==="video-card"&&(ce=1e3),ce?_.current=setTimeout(()=>U("hover",re),ce):U("hover",re);}),z=rt(re=>{if(N.set({...N.val,[re]:false}),R.val==="click")return;const ce=()=>{N.val.popover||N.val["video-card-action-button"]||q();};H(),re==="video-card-action-button"||re==="video-card"||re==="popover"?L.current=setTimeout(ce,250):ce();}),F=rt(re=>{H(),R.val==="click"?q():U("click",re);}),G=rt(()=>{if(K.current)return Math.floor(K.current)}),Y=rt(()=>!!(M||O())),Q=rt(()=>{if(!i)return;const re=new URL(`https://${Ol.Main}/video/${i}`),ce=G();ce&&re.searchParams.set("t",ce.toString()),li(re.href),B.current?.pause(),q();}),D=f.useMemo(()=>EA({dimensionFromApi:C.state?.dimension})?.aspectRatio??m,[C.state?.dimension]),B=f.useRef(null),K=f.useRef(void 0),J=f.useRef(null),ee=M&&!!C.state?.playUrls?.length,te=ee&&j(c6e,{ref:J,aspectRatio:D,onMouseEnter:re=>V("popover"),onMouseLeave:re=>z("popover"),cardDescendantTarget:d,children:[x(d6e,{ref:B,currentTimeRef:K,autoPlay:true,controls:true,loop:true,poster:p,className:"size-full object-contain",children:C.state?.playUrls?.map((re,ce)=>x("source",{src:re},ce))}),j("div",{className:"absolute right-10px top-10px flex flex-row-reverse items-center justify-start gap-x-5px",children:[R.state==="click"?x(La,{inlinePosition:"right",icon:x(ZEe,{className:"size-14px"}),tooltip:"关闭",onClick:re=>{re.preventDefault(),re.stopPropagation(),q();}}):x(La,{inlinePosition:"right",icon:x(m6e,{className:"size-14px"}),tooltip:"固定",onClick:re=>{re.preventDefault(),re.stopPropagation(),F("popover-action-button");}}),x(La,{inlinePosition:"right",icon:x(Wq,{className:"size-14px"}),tooltip:"新窗口打开",onClick:re=>{re.preventDefault(),re.stopPropagation(),Q();}})]})]}),ne=t&&e&&x(La,{css:o,...r,visible:n,active:ee,inlinePosition:"right",icon:$.loading?x(Rj,{className:"size-16px"}):x(p6e,{className:"size-15px"}),tooltip:R.state==="click"&&M?"关闭浮动预览":"浮动预览",onMouseEnter:re=>V("video-card-action-button"),onMouseLeave:re=>z("video-card-action-button"),onClick:re=>{re.preventDefault(),re.stopPropagation(),F("video-card-action-button");}},"video-card-action-button");la("esc",()=>{zs()||q();},{exactMatch:true}),Pwe(()=>q(),[J,()=>FW.getTargetElement(d)?.closest(v3(Al,"bili-video-card"))]),ma("fullscreenchange",()=>{document.fullscreenElement&&(!M||R.val==="click"||document.fullscreenElement===B.current&&U("click","popover-video-fullscreen-button"));},{target:document});const ae=f.useRef(null),oe=g||ae;return ma("mouseenter",()=>{!y||!g||V("video-card");},{target:oe}),ma("mouseleave",()=>{!y||!g||z("video-card");},{target:oe}),{largePreviewActionButtonEl:ne,largePreviewEl:te,getLargePreviewCurrentTime:G,shouldUseLargePreviewCurrentTime:Y,largePreviewVisible:M,hideLargePreview:q}}const g6e=K2e(ya,.1),ki={normalBorder:sn("border-color:",cU,";",""),activeBorder:sn("border-color:",ya,";box-shadow:0px 0px 9px 4px ",g6e,";",""),rounded:sn("border-radius:",XT,";",""),bgLv1:sn("background-color:",uy,";",""),coverZoomEffect:{name:"dj03ws",styles:".bili-video-card__cover{transform-origin:center center;transition:transform 0.2s ease-out;transform:scale(1.05);}"}},v6e=sn(ki.activeBorder," &:hover{",ki.activeBorder,";}","");function b6e(e){const t=`--${ro}--separator-color`;return f.useMemo(()=>{if(e)return sn` ${ki.rounded} ${ki.normalBorder} background-color: ${b3}; ${t}: ${uy}; &:hover { background-color: ${uy}; ${t}: ${_xe}; } /* disable padding */ margin-inline: 0; .bili-video-card__wrap { padding: 0; } `},[e])}var y6e={name:"7dle4o",styles:"border:1px solid transparent;transition-property:border-color,box-shadow,background-color;transition-duration:0.3s;transition-timing-function:ease-in-out"};function S6e(){const{useDelayForHover:e,style:{videoCard:{useBorder:t,useBorderOnlyOnHover:n,useBoxShadow:r}}}=qt(),{multiSelecting:o}=St(kn),i=hEe();return f.useMemo(()=>[y6e,(o||t&&!i)&&[sn("cursor:pointer;",ki.rounded," &:hover{",ki.bgLv1," ",ki.normalBorder," ",r&&ki.activeBorder," ",e&&ki.coverZoomEffect,";}",""),(o||!n)&&ki.normalBorder]],[t,n,r,e,i,o])}function C6e(e){return e&&[ki.rounded,ki.activeBorder]}const x6e="_skeleton-active_wlycr_12";function w6e(e,t){const[n,r]=f.useState(void 0),[o,i]=f.useState(void 0),[a,c]=f.useState(void 0),u=rt(async()=>{if(!($g(e)||BG(e)||Gl(e)&&e.from==="fav-folder")||!t)return;const d=await mu.getVideoFavState(t);d&&(r(d.favFolderNames),i(d.favFolderUrls),c(d.favFolderIds));});return f.useMemo(()=>({folderNames:n,folderUrls:o,folderIds:a,updateFavFolderNames:u}),[n,o,a,u])}function $6e(e,t,n){if(!$g(t)||!n)return [];const r=e.folderNames??[],o=e.folderUrls??[],i=e.folderIds??[],a=di([{key:"watchlater-faved:browse-fav-folder",icon:x(ASe,{className:X(_n,"color-gate-primary")}),label:`已收藏在 ${(r||[]).map(d=>`「${d}」`).join("")}`,onClick(){o.forEach(d=>{window.open(d,P3());});}},{key:"watchlater-faved:modify-fav",icon:x(_T,{className:_n}),label:"编辑收藏",async onClick(){ji(i.length,"folderIds.length should not be empty"),await Py(i,d=>t6(n,i,d));}}]),c=di([{key:"watchlater:add-quick-fav",icon:x(df,{className:_n}),label:"收藏到「默认收藏夹」",async onClick(){await mu.addFav(n)&&Ft.success(`已加入收藏夹「${A3}」`);}},{key:"watchlater:add-fav",icon:x(df,{className:_n}),label:"收藏到",async onClick(){await _Ae(async d=>{const m=await mu.addFav(n,d.id);return m&&Ft.success(`已加入收藏夹「${d.title}」`),m});}}]);return !!r.length?a:c}function E6e({ctx:e,item:t,cardData:n,tab:r,multiSelecting:o,multiSelectingAppendix:i,onRemoveCurrent:a,recSharedEmitter:c}){if(!Gl(t))return [];const{avid:u}=n;e.folderNames,e.folderUrls;const d=e.folderIds??[];if(t.from==="fav-folder"){const m=o?[{key:"fav:batch-move-fav",label:`移动到其他收藏夹${i}`,icon:x(NH,{className:_n}),async onClick(){if(!kn.multiSelecting)return;const p=j1().filter(w=>Gl(w)&&w.from==="fav-folder").toReversed(),g=new Set(p.map(w=>w.folder.id));if(!g.size)return gn("至少选择一项视频");if(g.size>1)return gn("多选移动: 只能批量移动同一源收藏夹下的视频");const b=p[0].folder.id,y=p.map(w=>`${w.id}:${w.type}`),S=p.map(w=>w.uniqId),C=p.map(w=>w.title);await Py([t.folder.id],async w=>{ji(w,"targetFolder should not be empty");const $=await mu.moveFavs(y,b,w.id);if($)return a0(t.folder.id),a0(w.id),c.emit("remove-cards",[S,C,true]),Ft.success(`已移动 ${S.length} 个视频到「${w.title}」收藏夹`),$},false);}}]:[];return di([{key:"open-fav-folder",label:"浏览收藏夹",icon:x(Ci,{className:_n}),onClick(){const{id:p}=t.folder,g=r!==Je.Fav||mn.selectedKey==="all"&&mn.usingShuffle?`/?${by.FolderIdFull}=${p}`:hA(p);window.open(g,P3());}},{test:!!u,key:"modify-fav",icon:x(_T,{className:_n}),label:"编辑收藏",async onClick(){await Py(d,async p=>{const g=await t6(u,d,p);return g&&p?.id!==t.folder.id&&a?.(t,n,true),g},false);}},{key:"remove-fav",label:"移除收藏",icon:x(Hf,{className:_n}),async onClick(){if(!await XR.confirm({centered:true,title:"移除收藏",content:j(Be,{children:["确定将视频「",t.title,"」",x("br",{}),"从收藏夹「",t.folder.title,"」中移除?"]})}))return;const g=`${t.id}:${t.type}`;await mu.removeFavs(t.folder.id,g)&&(a0(t.folder.id),a?.(t,n));}},...m])}return t.from==="fav-collection"?di([{key:"open-fav-collection",label:"浏览合集",icon:x(Ci,{className:_n}),onClick(){const{id:m}=t.collection,p=r!==Je.Fav||mn.selectedKey==="all"&&mn.usingShuffle?`/?${by.CollectionIdFull}=${m}`:Nq(m);window.open(p,P3());}}]):[]}const M6e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:4,children:[x("path",{d:"M33 7.263A18.9 18.9 0 0 0 24 5C13.507 5 5 13.507 5 24s8.507 19 19 19a18.9 18.9 0 0 0 8-1.761"}),x("path",{strokeLinejoin:"round",d:"M31 30h12m-28-8l7 7l19-18m-4 13v12"})]})]}),R6e=f.forwardRef(M6e),T6e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",children:[x("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"}),x("path",{d:"M30 35h12z",clipRule:"evenodd"}),x("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M30 35h12m-15-7h-8.2c-4.48 0-6.72 0-8.432.872a8 8 0 0 0-3.496 3.496C6 34.08 6 36.32 6 40.8V42h21"})]})]}),A6e=f.forwardRef(T6e),N6e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",children:[x("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.92 12.799Q16 12.41 16 12a4 4 0 0 0-4.799-3.92zM8.667 9.788a4 4 0 0 0 5.545 5.545l-1.474-1.474a2 2 0 0 1-2.597-2.597z",clipRule:"evenodd"}),x("path",{fill:"currentColor",fillRule:"evenodd",d:"m16.52 17.64l-1.47-1.469c-.972.51-2.002.829-3.05.829c-1.526 0-3.014-.678-4.34-1.632c-1.32-.95-2.396-2.112-3.076-2.938c-.1-.121-.174-.212-.236-.291a2 2 0 0 1-.1-.139q.028-.045.1-.139c.062-.08.136-.17.236-.291c.665-.808 1.71-1.938 2.99-2.875l-1.43-1.43C4.797 8.297 3.723 9.47 3.04 10.3l-.073.088c-.314.375-.737.883-.737 1.613s.423 1.238.737 1.613l.073.088c.74.899 1.94 2.203 3.451 3.29C7.994 18.073 9.891 19 12 19c1.67 0 3.206-.581 4.52-1.36M8.806 5.686C9.79 5.269 10.864 5 12 5c2.11 0 4.006.927 5.509 2.009c1.51 1.087 2.711 2.391 3.45 3.29l.074.088c.314.375.737.883.737 1.613s-.423 1.238-.737 1.613l-.073.088a20.5 20.5 0 0 1-2.015 2.123l-1.416-1.416a18.5 18.5 0 0 0 2.123-2.27a2 2 0 0 0 .1-.138a2 2 0 0 0-.1-.139a14 14 0 0 0-.236-.291c-.68-.826-1.756-1.989-3.075-2.938C15.014 7.678 13.526 7 12 7c-.551 0-1.097.088-1.632.246z",clipRule:"evenodd"}),x("path",{stroke:"currentColor",strokeWidth:2,d:"m5 2l16 16"})]})]}),P6e=f.forwardRef(N6e),_n="size-16px";function I6e(e){const{item:t,cardData:n,tab:r,favContext:o,watchlaterContext:i,hasDislikeEntry:a,onTriggerDislike:c,onMoveToFirst:u,onRemoveCurrent:d,consistentOpenMenus:m,conditionalOpenMenus:p,multiSelecting:g}=e,{avid:b,bvid:y,cover:S,href:C,recommendReason:w,authorName:$,authorMid:M}=n,{enableHideSomeContents:T}=St(ot.dynamicFeed.whenViewAll),{recSharedEmitter:R}=Ki(),I=rt(()=>{let ae=C;C.startsWith("/")&&(ae=new URL(C,location.href).href),nu(ae);}),P=!!M&&mW(t.api)&&r!==Je.KeepFollowOnly,N=rt(async()=>{if(!M)return Ft.error("UP mid 为空!");await kG.add(M)&&Ft.success(`已加入黑名单: ${$}`);}),O=rt(async()=>{if(!M)return Ft.error("UP mid 为空!");const ae=`${M}`;if(ot.filter.byAuthor.keywords.includes(ae))return gn(`已在过滤名单中: ${ae}`);await Rs("filter.byAuthor.keywords",{add:[ae]}),$&&$9(M,$),Ft.success(`已加入过滤名单: ${$||M}`);}),_=za(n.followed)?r===Je.DynamicFeed&&bf(t)||r===Je.Live&&bf(t)?true:pu(t)||wg(t)?KA(w):false:n.followed,L=_,H=rt(async()=>{if(!M||!await XR.confirm({centered:true,title:"取消关注",content:j(Be,{children:["确定取消关注「",$,"」?"]})}))return;await tTe.unfollow(M)&&Ft.success("已取消关注");}),U=!!M&&!!$,q=rt(()=>{M&&li(`/?${ui.Mid}=${M}`);}),V=rt(()=>{M&&li(`/?${Ba.Mid}=${M}`);}),z=T&&Wd(t)&&Zt.selectedKey===Mp&&!!M,F=rt(async()=>{z&&(await Rs("dynamicFeed.whenViewAll.hideIds",{add:[vf+M]}),$9(M,$||""),Ft.success(`在「全部」动态中隐藏【${$}】的动态`));}),G=!!(Wd(t)&&Ns&&Zt.viewingSomeUp&&M),Y=f.useMemo(()=>G&&{label:"动态: 从此项开始查看",key:"动态: 从此项开始查看",icon:x(QD,{className:_n}),onClick(){const ae=new URL("/",location.href);ae.searchParams.set(ui.Mid,M);const oe=Ps().findIndex(ce=>ce.api===je.DynamicFeed&&ce.id_str===t.id_str),re=Ps()[oe-1]?.id_str||t.id_str;ae.searchParams.set(ui.Offset,re),li(ae.href);}},[G,t,M]),Q=f.useMemo(()=>G&&{icon:x(wSe,{className:_n}),label:"动态: 从此项开始截止",key:"动态: 从此项开始截止",onClick(){const ae=new URL("/",location.href);ae.searchParams.set(ui.Mid,M),ae.searchParams.set(ui.MinId,t.id_str),li(ae.href);}},[G,t,M]),D=f.useMemo(()=>z3&&wy(t)&&!!t.page&&{key:"space-upload-view-start-from-here",label:`投稿: 从此页开始查看 (当前第${t.page}页)`,icon:x(QD,{className:_n}),onClick(){const ae=new URL(location.href);ae.searchParams.set(Ba.InitialPage,t.page.toString()),li(ae.href);}},[z3,t]),B=Wd(t)||wy(t)?t.groupId:void 0,K=B!==void 0,J=St(Zt.groups),ee=B!==void 0?J.find(ae=>ae.tagid===B):void 0,te=ee?.name,ne=ee?.count;return f.useMemo(()=>{const{watchlaterAdded:ae,hasWatchlaterEntry:oe,onToggleWatchlater:re}=i,ce={type:"divider"},he=g?" (多选)":"",me=di([{key:"copy-link",label:`复制视频链接${he}`,icon:x(tu,{className:_n}),onClick(){kn.multiSelecting?$Re():I();}},{test:!!y,key:"copy-bvid",label:`复制 BVID${he}`,icon:x(tu,{className:_n}),onClick(){kn.multiSelecting?zA():nu(y);}},{test:!!y&&ot.__internalEnableCopyBvidInfo,key:"copy-bvid-info",label:`复制 BVID 信息${he}`,icon:x(tu,{className:_n}),onClick(){kn.multiSelecting?FA():nu(kA(n));}},{test:!!S,key:"view-cover",label:"查看封面",icon:x(Ci,{className:_n}),onClick(){if(!S)return;li(S);}}]),Re=di([{test:U&&_,key:"查看「投稿」与「动态」的区别",label:"查看「投稿」与「动态」的区别",icon:x(Ci,{className:_n}),onClick:()=>li("https://github.com/magicdawn/Bilibili-Gate?tab=readme-ov-file#%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95-%E6%9F%A5%E7%9C%8B-up-%E7%9A%84%E6%8A%95%E7%A8%BF--%E6%9F%A5%E7%9C%8B-up-%E7%9A%84%E5%8A%A8%E6%80%81")},{test:U,key:"查看 UP 的投稿",label:"查看 UP 的投稿",icon:x(sy,{className:_n}),onClick:V},D,{test:U&&_,key:"查看 UP 的动态",label:"查看 UP 的动态",icon:x(ay,{className:_n}),onClick:q},Q,Y,...U&&K?di([{type:"divider"},{test:U&&K&&(ne===void 0||ne<=30),key:"查看分组的投稿",label:"查看分组的投稿",icon:x(sy,{className:_n}),onClick:()=>li(`/?${Ba.GroupId}=${B}`)},{test:U&&K,key:"查看分组的动态",label:"查看分组的动态",icon:x(ay,{className:_n}),onClick:()=>li(`/?${ui.GroupId}=${B}`)},{type:"divider"}]):[],{test:oe,key:"watchlater",label:ae?"移除稍后再看":"稍后再看",icon:ae?x(Hf,{className:_n}):x(BT,{className:_n}),onClick(){re();}},{test:oe&&ae,key:"watchlater-readd",label:`重新添加稍候再看${r===Je.Watchlater?" (移到最前)":""}`,icon:x(R6e,{className:_n}),async onClick(){const{success:be}=await re(void 0,W3);be&&(Ft.success("已重新添加"),r===Je.Watchlater&&u?.(t,n));}},...$6e(o,t,b)]),se=di([{test:a,key:"dislike",label:"我不想看",icon:x(OT,{width:15,height:15}),onClick(){c();}},{test:L,key:"unfollow-up",label:"取消关注",icon:x(A6e,{className:_n}),onClick:H},{test:z,key:"hasEntry_addMidTo_dynamicFeedWhenViewAllHideIds",label:"在「全部」动态中隐藏 UP 的动态",icon:x(P6e,{className:_n}),onClick:F},{test:P,key:"blacklist-up",label:"将 UP 加入黑名单",icon:x(m3,{className:_n}),onClick:N},{test:P,key:"add-up-to-filterlist",label:"将 UP 加入过滤列表",icon:x(m3,{className:_n}),onClick:O}]),de=E6e({ctx:o,item:t,cardData:n,tab:r,multiSelecting:g,multiSelectingAppendix:he,onRemoveCurrent:d,recSharedEmitter:R});return di([...m,!!me.length&&ce,...me,!!Re.length&&ce,...Re,!!se.length&&ce,...se,!!de.length&&ce,...de,!!p.length&&ce,...p])},[t,n,r,i,o,a,L,P,U,z,m,p,g,B,K,te,ne,u,d])}function Sh(e){if(e.altKey)return e.stopPropagation(),true}const Np=rc(()=>Date.now()),O6e=(qn().add(1,"minute").startOf("minute").valueOf()-Np.get())%3e4;setTimeout(()=>{Np.update(),setInterval(Np.update,3e4);},O6e);document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&Np.update();});const D6e=f.memo(function({ts:t}){return t?JMe(t)?x(_6e,{ts:t}):x(qW,{ts:t}):null});function qW({ts:e}){return f.useMemo(()=>eRe(e),[e])}function _6e({ts:e}){const t=Np.use();return x(qW,{ts:e},t)}const L6e=X(IQ,"max-w-[calc(100%-6px)] w-max cursor-default overflow-hidden text-ellipsis whitespace-nowrap b-1px b-gate-border rounded-9px b-solid px-8px py-0 text-12px color-gate-primary line-height-17px"),B6e=X("line-clamp-2 mt-10px h-auto whitespace-normal"),z6e=sn("background-color:oklch(from ",ya," calc(l * 0.1 + 0.88) calc(c * 0.25) h);",iU," &{background-color:oklch(from ",ya," calc(l * 0.3 + 0.175) calc(c * 0.25) h);}",""),k6e=sn("color:",ya,";border-radius:2px;border:1px ",ya," solid;line-height:20px;padding:0 10px;transform:scale(0.8);transform-origin:center left;",""),Eb={name:"nux2qa",styles:"font-size:var(--subtitle-font-size);line-height:var(--subtitle-line-height);color:var(--text3);a&:visited{color:var(--text3);}display:inline-flex;width:max-content;max-width:100%;align-items:center;justify-content:flex-start"};var F6e={name:"15xw6zv",styles:"display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;max-width:100%"},H6e={name:"feo88y",styles:".bili-video-card .bili-video-card__info--tit>a&{font-family:inherit;font-weight:initial;}"},V6e={name:"1eyh0r6",styles:"text-indent:0!important;.bili-video-card &.bili-video-card__info--tit{padding-right:0;height:auto;max-height:calc(2 * var(--title-line-height));}"};const GW=f.memo(function({item:e,cardData:t,handleVideoLinkClick:n,className:r,gridDisplayMode:o}){const{useBorder:i}=St(ot.style.videoCard),a=k1(),c=mA(o),{goto:u,href:d,title:m,titleRender:p,pubts:g,pubdateDisplay:b,pubdateDisplayForTitleAttr:y,recommendReason:S,authorName:C,authorFace:w,authorMid:$,appBadge:M,appBadgeDesc:T,rankingDesc:R,liveExtraDesc:I}=t,P=u==="av",N=$?Sg($):d,O=e.api===je.Live&&e.live_status===Da.Streaming,{data:_}=Va(()=>rAe(e,t),{refreshDeps:[e,t]}),L=f.useMemo(()=>{if(P&&(C||g||_||b||y)){let q;return g||_?q=qn.unix(g||_).format("YYYY年M月D日 HH:mm"):q=b,[C,y||q].filter(Boolean).join(" · ")}},[P,C,g,_,b,y]),H=ar(L6e,c&&B6e);return j("div",{className:X(c?"pt-5px":"pt-15px","flex gap-x-5px overflow-hidden px-5px",i?"mb-10px":"mb-5px",r),children:[!!$&&j("a",{href:N,target:a,className:X("relative flex-center self-start rounded-full p-1px ring-1px",O?"ring-gate-primary":"ring-gate-border"),children:[w?x(Yc,{src:YA(w)}):x(Yc,{children:C?.[0]||T?.[0]||""}),O&&x(LT,{active:true,className:"absolute bottom-0 right-0 size-12px rounded-full bg-gate-primary"})]}),j("div",{className:"ml-5px flex flex-1 flex-col gap-y-4px overflow-hidden",children:[x("h3",{className:"bili-video-card__info--tit",title:m,css:V6e,children:x("a",{onClick:n,onContextMenu:Sh,href:d,target:a,rel:"noopener",css:H6e,children:p??m})}),U()]})]});function U(){const q=!!S&&x("div",{title:S,css:z6e,className:H,children:S}),V=()=>{let z;return g||_?z=x(D6e,{ts:g||_}):b&&(z=b),j(Be,{children:[j("a",{className:"bili-video-card__info--owner",href:N,target:a,title:L,css:Eb,onContextMenu:Sh,children:[x("span",{className:"bili-video-card__info--author",children:C}),!!z&&j("span",{className:"bili-video-card__info--date",children:[WA,z]})]}),q]})};return P?V():M||T?j("a",{className:"bili-video-card__info--owner",css:Eb,href:d,target:a,onContextMenu:Sh,children:[!!M&&x("span",{css:k6e,children:M}),!!T&&x("span",{children:T})]}):DA(e)&&R?x("div",{css:Eb,children:R}):bf(e)||wg(e)&&e.goto===Il.Live?j(Be,{children:[j("a",{css:[Eb,F6e,"",""],href:N,target:a,title:(C||"")+(I||""),onContextMenu:Sh,children:[C,I&&x("span",{className:"ml-4px",children:I})]}),q]}):V()}}),j6e=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),x("path",{strokeLinecap:"round",d:"M24 29c5 0 7 4 7 4H17s2-4 7-4m8-12l-3 3l3 3m-16-6l3 3l-3 3"})]})]}),U6e=f.forwardRef(j6e),q6e=f.memo(function({loading:t}){return j("div",{className:X("bili-video-card__skeleton",{hide:!t,[x6e]:t}),children:[x("div",{className:"bili-video-card__skeleton--cover",style:{borderRadius:XT}}),j("div",{className:"bili-video-card__skeleton--info px-5px",children:[x("div",{className:"bili-video-card__skeleton--avatar size-32px rounded-full"}),j("div",{className:"bili-video-card__skeleton--right ml-10px flex-1",children:[x("p",{className:"bili-video-card__skeleton--text"}),x("p",{className:"bili-video-card__skeleton--text short"}),x("p",{className:"bili-video-card__skeleton--light"}),x("p",{className:"bili-video-card__skeleton--text tiny"})]})]})]})}),fi={wrapper:"h-full flex flex-col overflow-hidden",cover:"relative aspect-16/9 rounded-t-6px",coverInner:"absolute left-0 top-0 h-full w-full flex flex-col items-center justify-center gap-y-2",dislikeReason:"text-center font-size-20px",dislikeDesc:"text-center text-16px",action:"relative flex-1",actionInner:"absolute left-0 top-0 h-full w-full flex items-center justify-center b-t-1px b-t-$bilibili-gate--separator-color b-t-solid transition-duration-300 transition-property-[border-color]",actionButton:"flex cursor-pointer items-center rounded-lg bg-transparent p-15px text-16px color-inherit"},G6e=f.memo(function({item:t,cardData:n,dislikedReason:r,emitter:o=Aj}){const i=rt(async()=>{if(!r?.id)return;let a=false,c="",u;try{({success:a,message:c}=await n6e(t,r.id));}catch(d){u=d;}if(u)return console.error(u.stack||u),Bj();a?(Ft.success("已撤销"),xAe(t.param)):Ft.error(c||_p);});return xo(o,"cancel-dislike",i),j("div",{className:fi.wrapper,children:[x("div",{className:fi.cover,children:j("div",{className:fi.coverInner,children:[x(U6e,{className:"size-32px"}),x("div",{className:fi.dislikeReason,children:r?.name}),x("div",{className:fi.dislikeDesc,children:r?.toast||"将减少此类内容推荐"})]})}),x(WW,{item:t,cardData:n,onClick:i})]})});function WW({item:e,cardData:t,onClick:n}){return j("div",{className:fi.action,children:[x(GW,{item:e,cardData:t,className:"invisible"}),x("div",{className:fi.actionInner,children:j("button",{className:fi.actionButton,onClick:n,children:[x(ly,{className:"mr-4px mt--2px size-16px"}),"撤销"]})})]})}const Q9=f.memo(function({item:t,cardData:n,blockType:r}){const{authorMid:o,authorName:i}=n,a=r==="blacklist"?"已拉黑":"已加入过滤列表",c=rt(()=>r==="blacklist"?u():d()),u=rt(async()=>{if(!o)return;await kG.remove(o)&&Ft.success(`已移出黑名单: ${i}`);}),d=rt(()=>{if(!o)return;const m=ot.filter.byAuthor.keywords.filter(p=>F1(p).mid===o);Rs("filter.byAuthor.keywords",{remove:m}),Ft.success(`已移出过滤列表: ${i}`);});return j("div",{className:fi.wrapper,children:[x("div",{className:fi.cover,children:j("div",{className:fi.coverInner,children:[x(m3,{className:"size-32px"}),x("div",{className:fi.dislikeReason,children:a}),j("div",{className:fi.dislikeDesc,children:["UP: ",i]})]})}),x(WW,{item:t,cardData:n,onClick:c})]})}),W6e=X("pointer-events-none absolute inset-0 overflow-hidden",USe,"rounded-b-none rounded-t-gate-video-card"),K6e=f.memo(function({videoDuration:t,pvideo:n,progress:r,t:o,className:i,ref:a,...c}){const u=f.useRef(null),[d,m]=f.useState(()=>({width:0,height:0}));no(()=>{const S=u.current?.getBoundingClientRect();S&&m({width:S.width,height:S.height});});const p=f.useMemo(()=>{function S(){return typeof r=="number"&&!Number.isNaN(r)?r:0}return lf(S()??0,0,1)},[r]),g=f.useMemo(()=>o??Math.floor((t||0)*p),[o,t,p]),b=rt(()=>g);f.useImperativeHandle(a,()=>({getT:b}),[b]);const y={progress:p,t:g,pvideo:n,elWidth:d.width,elHeight:d.height};return x("div",{...c,ref:u,className:X(W6e,i),children:!!(n&&d.width&&d.height&&p)&&x(Y6e,{...y})})}),Y6e=f.memo(function({t,progress:n,pvideo:r,elWidth:o,elHeight:i}){let a=f.useMemo(()=>X6e(r?.index||[],t)??0,[r,t]);const{img_x_len:c,img_y_len:u,img_x_size:d,img_y_size:m}=r,p=u*c;a=a+1;const g=Math.floor(a/p),b=a-g*p,y=r.image?.[g]||"",S=Math.floor(b/c)+1,C=b-(S-1)*c,w=o*c,$=i*u,M=(S-1)*i,T=(C-1)*o;return x("div",{className:"size-full",style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${T}px -${M}px`,backgroundSize:`${w}px ${$}px`},children:x(KW,{progress:n})})});function KW({progress:e,className:t,...n}){return x("div",{...n,"data-role":"track",className:X("absolute inset-x-0 bottom-0 h-2px bg-gate-bg-lv1",t),children:x("div",{"data-role":"bar",className:"h-full bg-gate-primary",style:{width:`${e*100}%`}})})}function X6e(e,t){let n=Q6e(e,t);if(n!==-1)return n;t>e.at(-1)&&(n=e.length-1);}function Q6e(e,t){let n=0,r=e.length-1,o=-1;for(;n<=r;){const c=Math.floor((n+r)/2),u=e[c];if(t===u)return c;uj("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M248 80a28 28 0 1 0-51.12 15.77l-26.79 33L146 73.4a28 28 0 1 0-36.06 0l-24.03 55.34l-26.79-33a28 28 0 1 0-26.6 12L47 194.63A16 16 0 0 0 62.78 208h130.44A16 16 0 0 0 209 194.63l14.47-86.85A28 28 0 0 0 248 80M128 40a12 12 0 1 1-12 12a12 12 0 0 1 12-12M24 80a12 12 0 1 1 12 12a12 12 0 0 1-12-12m196 12a12 12 0 1 1 12-12a12 12 0 0 1-12 12"})]}),J6e=f.forwardRef(Z6e),eNe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("circle",{cx:12,cy:24,r:3,fill:"currentColor"}),x("circle",{cx:24,cy:24,r:3,fill:"currentColor"}),x("circle",{cx:36,cy:24,r:3,fill:"currentColor"})]}),tNe=f.forwardRef(eNe),YW="pointer-events-none h-19px flex-center whitespace-nowrap rounded-2px bg-gate-primary px-4px text-center text-12px color-white";function XW({children:e,className:t}){return x("span",{className:ar(YW,t),children:e})}function QW(e){const{topMarkIcon:t,topMarkText:n}=e;return !!(t||n)}function nNe({cardData:e}){if(!QW(e))return;const{topMarkIcon:t,topMarkText:n}=e,r=!!t;return j(XW,{className:X("min-w-32px",r?"pl-4px pr-6px":"px-4px"),children:[r&&x(zW,{src:`${t}@!web-dynamic`,className:"h-16px w-16px"}),n]})}function rNe(e){return ["#FFD700","#C0C0C0","#B36700"][e-1]??ya}function oNe({item:e}){const t=e.rankingNo<=3,n=x(J6e,{});let r=false,o=[];$A(e)&&e.others?.length&&(r=true,o=e.others);const i=`「${e.rankTab.name}」排行第 ${e.rankingNo} 名`,{triggerRef:a,tooltipEl:c}=z1({inlinePosition:"left",tooltip:i,tooltipClassName:"left--2px"}),u="relative size-28px flex-center whitespace-nowrap rounded-full text-14px color-white",d=f.useMemo(()=>({backgroundColor:rNe(e.rankingNo)}),[e.rankingNo]),m=Zq();return j(Be,{children:[j("div",{ref:a,className:u,style:d,children:[t?n:x("span",{style:{marginLeft:-1},children:e.rankingNo}),c]}),r&&x(nc,{placement:"bottomLeft",menu:{items:[{type:"group",label:"「其他上榜视频」",children:o.map(p=>({key:p.bvid,label:p.title,onClick(){const g=new URL(`/video/${p.bvid}`,location.href).href;m?li(g):location.href=g;}}))}]},children:x("div",{className:u,style:d,children:x(tNe,{})})})]})}function iNe(){return j(XW,{children:[x(LT,{active:true,className:"size-14px"}),"直播中"]})}function aNe({item:e}){const t=f.useMemo(()=>Wd(e)?"动态":$g(e)?"稍后再看":Gl(e)?e.from==="fav-folder"?"收藏夹":"合集":e.api,[e]),n=f.useMemo(()=>{if(Gl(e)&&e.from==="fav-collection")return e.volTooltip},[e]),{triggerRef:r,tooltipEl:o}=z1({inlinePosition:"left",tooltip:n});return j("span",{ref:r,className:ar(YW,"pointer-events-auto"),children:[t,o]})}function sNe({vol:e,volTooltip:t}){const{triggerRef:n,tooltipEl:r}=z1({inlinePosition:"left",tooltip:t,tooltipClassName:"left--2px"});return j("div",{ref:n,className:"relative h-24px min-w-24px flex-center whitespace-nowrap rounded-8px bg-gate-primary px-6px text-center text-14px color-white",children:[e,r]})}const lNe=x(OT,{className:"size-16px"});function cNe({item:e,authed:t,actionButtonVisible:n}){const r=pu(e)&&!!e.three_point?.dislike_reasons?.length,o=rt(async c=>{if(c?.preventDefault(),c?.stopPropagation(),!r)return e.api!==je.AppRecommend?Ft.error("当前视频不支持提交「我不想看」"):void 0;if(!t)return gn("请先获取 access_key !");e?.param&&Ny.has(e.param)||await MAe(e.three_point?.dislike_reasons||[],i);}),i=hg(async c=>{if(!pu(e))return;let u=false,d="",m;try{({success:u,message:d}=await t6e(e,c.id));}catch(p){m=p;}return m?(console.error(m.stack||m),Bj()):(u?(Ft.success("已标记不想看"),Ny.set(e.param,{...c})):Ft.error(d||_p),u)});return {dislikeButtonEl:r&&x(La,{visible:n,inlinePosition:"left",icon:lNe,tooltip:"我不想看",onClick:o}),hasDislikeEntry:r,onTriggerDislike:o}}const uNe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})]}),dNe=f.forwardRef(uNe),fNe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("circle",{cx:12,cy:12,r:10}),x("path",{d:"m9 12l2 2l4-4"})]})]}),mNe=f.forwardRef(fNe),hNe=dNe,pNe=mNe;function gNe({multiSelecting:e,multiSelected:t,uniqId:n}){const r=rt(c=>{const{selectedIdSet:u,multiSelecting:d}=kn;if(!d)return;c?.preventDefault(),c?.stopPropagation();const m=!!c?.shiftKey;kn.shiftMultiSelectAnchorUniqId??=n,m||(kn.shiftMultiSelectAnchorUniqId=n),m?ERe(kn.shiftMultiSelectAnchorUniqId,n):t?u.delete(n):u.add(n);}),o=e&&x("div",{onClick:r,className:X("absolute inset-0 flex items-center justify-center bg-black/10",qSe)}),a=e&&x(t?pNe:hNe,{onClick:r,className:X("size-30px cursor-pointer text-white [&_g]:fill-inherit",t?"fill-gate-primary":"fill-none")});return {toggleMultiSelect:r,multiSelectBgEl:o,multiSelectEl:a}}function vNe(...e){}function bNe({uniqId:e,recSharedEmitter:t,title:n,active:r,videoDuration:o,tryFetchImagePreviewData:i,imagePreviewDataBox:a,autoPreviewWhenHover:c,videoPreviewWrapperRef:u}){const d=rt(()=>{const B=a.val?.videoshotJson?.data;return !!(B?.index?.length&&B?.image?.length)}),[m,p]=f.useState(false),[g,b]=t9(),[y,S]=t9(),C=rt(()=>g||0),[w,$]=f.useState(false),M=Tl(false),T=Tl(false),R=G3(false),[I,P]=f.useState(void 0),N=B=>{const K=u.current?.getBoundingClientRect();if(!K)return;const{x:J,width:ee}=K,te=B.pageX-window.scrollX-J;P(te/ee);};ma("mouseenter",async B=>{t.emit("mouseenter",e),M.set(true),N(B);const K=i(),J=800;let ee;ot.useDelayForHover&&(ee=hn(J)),await Promise.all([K,ee].filter(Boolean)),M.val&&(T.set(true),c&&!_.val&&d()&&q(true));},{target:u});const O=rt(()=>{M.set(false),T.set(false);});ma("mouseleave",O,{target:u}),xo(t,"mouseenter",B=>{B!==e&&O();}),ma("mousemove",B=>{$(true),M.val&&(!T.val||!c)&&N(B),c||H.stop();},{target:u});const _=G3(void 0),L=f.useRef(void 0),H=yNe({startByHoverBox:R,isHoveringBox:M,active:r,mouseMoved:w,idBox:_,autoPreviewWhenHover:c,setAutoPreviewing:p,setPreviewT:S,setPreviewProgress:b,onResume(){L.current?.();}}),U=rt(async()=>{if(!_.val){await i(),d()&&q(false);return}H.togglePaused();}),q=rt(B=>{R.set(B),$(false),H.reset(),H.stop(true),p(true),b(ne=>ne===void 0?0:ne),S(void 0);const K=8e3;let J=performance.now(),ee=0;L.current=()=>{J=performance.now()-C()*K;};function te(ne){if(H.shouldStop())return H.stop();if(!H.paused){const ae=performance.now(),oe=ae-J,re=lf(oe%K/K,0,1);if(b(re),(!ee||ae-ee>=ot.autoPreviewUpdateInterval)&&(b(re),ee=ae,o)){const ce=lf(Math.round(re*o),0,o);S(ce);}}_.val=requestAnimationFrame(te);}_.val=requestAnimationFrame(te);}),V=M.state,z=T.state,F=a.state?.videoshotJson?.data,G=!!F?.image?.length&&!!o&&(z||r)&&(c?m:true),Y=f.useRef(null);let Q,D;if(G){const B={videoDuration:o,pvideo:F};c?Q={...B,progress:g,t:y}:Q={...B,progress:I},D=x(K6e,{ref:Y,...Q});}return {onHotkeyPreviewAnimation:U,onStartPreviewAnimation:q,autoPreviewing:m,mouseProgress:I,previewProgress:g,previewT:y,isHovering:V,isHoveringAfterDelay:z,shouldShowPreview:G,previewImageRef:Y,previewImgProps:Q,previewImageEl:D}}function yNe({startByHoverBox:e,isHoveringBox:t,idBox:n,active:r,mouseMoved:o,autoPreviewWhenHover:i,setAutoPreviewing:a,setPreviewT:c,setPreviewProgress:u,onResume:d}){const m=UU(),p=rt(()=>{if(m.current)return true;if(e.val){if(!t.val)return true}else if(!r||o)return true;return false}),g=rt((S=false)=>{S||vNe("stopAnimation: %o",{autoPreviewWhenHover:i,unmounted:m.current,isHovering:t.val,active:r,mouseMoved:o}),n.val&&cancelAnimationFrame(n.val),n.val=void 0,a(false),u(void 0),c(void 0),y.reset();}),b=f.useRef(false),y=f.useMemo(()=>({shouldStop:p,stop:g,get paused(){return b.current},set paused(S){b.current=S;},togglePaused(){const S=this.paused;this.paused=!this.paused,S&&d?.();},reset(){this.paused=false;}}),[p,g,b,d]);return y}function SNe({item:e,cardData:t,onRemoveCurrent:n,actionButtonVisible:r,watchlaterAdded:o}){const{avid:i,bvid:a}=t,c=f.useMemo(()=>pu(e)||wg(e)?e.goto==="av":e.api===je.Rank?t.goto==="av":e.api===je.Live?false:!!a,[e,t]),u=Va((C,w)=>C(w),{manual:true}),d=tA(o),m=rt(async(C,w)=>{if(C?.preventDefault(),C?.stopPropagation(),u.loading)return {success:false};if(!i||!a)return {success:false};w??=o?e6e:W3;const $=await u.runAsync(w,i),M=w===W3;return $&&(M?gu.bvidSet.add(a):gu.bvidSet.delete(a),e.api===je.Watchlater?M||(await hn(250),n?.(e,t)):Ft.success(`已${M?"添加":"移除"}稍后再看`)),{success:$,targetState:M}}),p=18,g=u.loading?x(Rj,{className:"size-16px"}):e.api===je.Watchlater?o?x(Hf,{className:"size-16px"}):x(Sp,{size:p,useAnimation:d===true}):o?x(Sp,{size:p,useAnimation:d===false}):x(BT,{className:"size-20px"}),b=e.api===je.Watchlater?o?"已添加稍后再看, 点击移除":"已移除稍后再看":o?"已添加稍后再看, 点击移除":"稍后再看",y=c&&x(La,{visible:r,inlinePosition:"right",icon:g,tooltip:b,onClick:m});return {context:f.useMemo(()=>({watchlaterAdded:o,hasWatchlaterEntry:c,onToggleWatchlater:m}),[m,o,c]),watchlaterButtonEl:y}}const Z9=f.memo(function({style:t,className:n,item:r,loading:o,active:i,onRemoveCurrent:a,onMoveToFirst:c,refresh:u,emitter:d,recSharedEmitter:m,tab:p,baseCss:g,gridDisplayMode:b,multiSelecting:y,...S}){o=o??!r;const C=f.useMemo(()=>r&&Mg(r),[r]),w=CAe(r?.api===je.AppRecommend?r.param:void 0),$=jMe(C?.authorMid),M=WAe(C?.authorMid),T=YTe(C?.bvid),R=SRe(r?.uniqId),I=!!w,P=$,N=M,_=b6e(I||P||N),L=X("bili-video-card",Al,{[iB]:i},"relative",n),H=[g,_,mA(b)&&h3.card,y&&R&&v6e];return x("div",{"data-bvid":C?.bvid,style:t,className:L,css:H,...S,children:o?x(q6e,{loading:o}):r&&C&&(I?x(G6e,{item:r,cardData:C,emitter:d,dislikedReason:w}):P?x(Q9,{item:r,cardData:C,blockType:"blacklist"}):N?x(Q9,{item:r,cardData:C,blockType:"filter"}):x(xNe,{item:r,cardData:C,active:i,emitter:d,recSharedEmitter:m,tab:p,onRemoveCurrent:a,onMoveToFirst:c,refresh:u,watchlaterAdded:T,gridDisplayMode:b,multiSelecting:y,multiSelected:R}))})});var CNe={name:"vpmszz",styles:"background-color:unset;position:static;height:100%"};const xNe=f.memo(function({item:t,cardData:n,tab:r,active:o=false,onRemoveCurrent:i,onMoveToFirst:a,refresh:c,emitter:u=Aj,recSharedEmitter:d=Iq,watchlaterAdded:m,gridDisplayMode:p,multiSelecting:g=false,multiSelected:b}){const{accessKey:y,style:{videoCard:{useBorder:S,useBorderOnlyOnHover:C}},videoCard:{actions:w,imgPreview:{enabled:$,autoPreviewWhenHover:M,disableWhenMultiSelecting:T}},spaceUpload:{showVol:R},__internalEnableCopyBvidInfo:I}=qt(),{avid:P,bvid:N,cid:O,goto:_,href:L,title:H,cover:U,duration:q,durationStr:V,recommendReason:z,statItems:F,authorName:G,authorMid:Y}=n,Q=!!y,D=_==="av",B=["av","bangumi","picture","live","opus"];B.includes(_)||Go(`none (${B.join(",")}) goto type %s`,_,t);const K=mA(p),J=f.useMemo(()=>EA({item:t})?.aspectRatio,[t]),ee=f.useMemo(()=>!(!N||!N.startsWith("BV")||_!=="av"),[N,_]),te=!(!$||T&&g),ne=Tl(void 0),ae=hg(async()=>{if(!ee||!te||o6e(ne.val))return;const et=await r6e(N);ne.set(et),Zn(et.videoshotJson)||oe(et.videoshotJson);}),oe=Gq(et=>{sa.warning({title:`${et.message} (code: ${et.code})`,description:`${H} (${N})`,duration:2});},3,false),re=f.useRef(null),ce=f.useRef(null),he=S&&!K?re:ce,{onStartPreviewAnimation:me,onHotkeyPreviewAnimation:Re,isHovering:se,previewImageEl:de}=bNe({uniqId:t.uniqId,recSharedEmitter:d,title:H,active:o,videoDuration:q,tryFetchImagePreviewData:ae,imagePreviewDataBox:ne,autoPreviewWhenHover:M,videoPreviewWrapperRef:he});Ts(()=>{o&&(n6(`${lM}_activeItem`,t),ot.videoCard.imgPreview.autoPreviewWhenKeyboardSelect&&ae().then(()=>{me(false);}));},[o]);const Se=o||se,{watchlaterButtonEl:be,context:He}=SNe({item:t,cardData:n,onRemoveCurrent:i,actionButtonVisible:Se,watchlaterAdded:m}),{dislikeButtonEl:Ue,hasDislikeEntry:Pe,onTriggerDislike:ue}=cNe({item:t,authed:Q,actionButtonVisible:Se}),{largePreviewActionButtonEl:ye,largePreviewEl:Te,shouldUseLargePreviewCurrentTime:qe,getLargePreviewCurrentTime:Ze,largePreviewVisible:We,hideLargePreview:tt}=UW({shouldFetchPreviewData:ee,actionButtonVisible:Se,hasLargePreviewActionButton:w.showLargePreview,bvid:N,cid:O,uniqId:t.uniqId,recSharedEmitter:d,cardTarget:re,aspectRatioFromItem:J,cover:U,videoCardAsTriggerRef:he}),nt=w6e(t,P),{onOpenWithMode:Ke,handleVideoLinkClick:Oe,consistentOpenMenus:Qe,conditionalOpenMenus:Xe,openInPopupActionButtonEl:_e,onOpenInPopup:ze}=l3e({href:L,item:t,cardData:n,actionButtonVisible:Se,hasOpenInPopupActionButton:w.openInPipWindow,getLargePreviewCurrentTime:Ze,hideLargePreview:tt,shouldUseLargePreviewCurrentTime:qe}),{multiSelectBgEl:ct,multiSelectEl:Pt,toggleMultiSelect:ut}=gNe({multiSelecting:g,multiSelected:b,uniqId:t.uniqId}),Dt=rt(et=>{S&&(et.target.closest(".ant-dropdown-menu")||et.target.closest("a")||Ke());});xo(u,"open",()=>Ke()),xo(u,"open-in-popup",ze),xo(u,"open-with-large-preview-visible",()=>{We&&(tt(),Ke());}),xo(u,"toggle-watch-later",()=>{He.onToggleWatchlater();}),xo(u,"trigger-dislike",()=>{ue();}),xo(u,"start-preview-animation",me),xo(u,"hotkey-preview-animation",Re);const wt=I6e({item:t,cardData:n,tab:r,watchlaterContext:He,favContext:nt,onMoveToFirst:a,hasDislikeEntry:Pe,onTriggerDislike:ue,onRemoveCurrent:i,consistentOpenMenus:Qe,conditionalOpenMenus:Xe,multiSelecting:g}),Tt=rt(et=>{et&&nt.updateFavFolderNames();}),gt=QW(n),ft=DA(t),st=bf(t)&&t.live_status===Da.Streaming||wg(t)&&t.goto===Il.Live,Fe=r===Je.AppRecommend&&!pu(t)&&!bf(t),Ge=wy(t)&&R||Gl(t)&&!!t.vol&&!Fe,ve=I&&N&&x(La,{visible:Se,inlinePosition:"right",icon:x(tu,{className:"size-14px"}),tooltip:"复制 BVID 信息",onClick:et=>{et.stopPropagation(),et.preventDefault(),nu(kA(n));}}),Ae=j(Be,{children:[g&&Pt,Ue,gt&&x(nNe,{cardData:n}),ft&&x(oNe,{item:t}),st&&x(iNe,{}),Fe&&x(aNe,{item:t}),Ge&&!!t.vol&&x(sNe,{vol:t.vol,volTooltip:Gl(t)?t.volTooltip:void 0})]}),Ce=j(Be,{children:[be,ve,_e,ye]}),pe=!j9(Ae),Ie=!j9(Ce),$e=ar("left-top-marks",$p.topContainer("left"),g&&"gap-x-10px"),Le=$g(t)&&t.progress>0?x(KW,{progress:t.progress/t.duration,className:X("h-3px",jSe)}):void 0,Ye=`.${Ca} .${Al}`,it=f.useMemo(()=>[sn(Ye," &{overflow:hidden;border-radius:",XT,";transition:border-radius 0.2s ease;}",""),!K&&[(o||g||S&&!C)&&sn(Ye," &{border-bottom-left-radius:0;border-bottom-right-radius:0;}",""),S&&sn(Ye,":hover &{border-bottom-left-radius:0;border-bottom-right-radius:0;}","")]],[K,o,g,S,C]),ht=f.useMemo(()=>S&&!C||g?false:!S||S&&C&&!se,[S,C,se,g]),$t=k1(),Mt=j("a",{ref:ce,href:L,target:$t,className:X(aB,"relative isolate block overflow-hidden",ht&&"ring-1px ring-gate-border"),css:[it,K&&h3.cover,"",""],onClick:Oe,onContextMenu:et=>{Sh(et)||et.preventDefault();},children:[x("div",{className:"bili-video-card__image",style:{aspectRatio:"16 / 9"},children:U?x("div",{className:"bili-video-card__image--wrap",children:x(zW,{src:`${U}@672w_378h_1c_!web-home-common-cover`,className:"bili-video-card__cover v-img",style:{borderRadius:0},imgProps:{alt:H}})}):x("div",{className:"size-full flex-center",children:x("div",{className:"line-clamp-4 my-auto p-2 text-center line-height-snug",children:H})})}),j("div",{className:"bili-video-card__stats",css:sn(Ye," &{pointer-events:none;border-radius:0;}",""),children:[x("div",{className:"bili-video-card__stats--left gap-x-4px xl:gap-x-8px",children:F.map(({field:et,value:Ct})=>x(gRe,{field:et,value:Ct},et))}),x("span",{className:"bili-video-card__stats__duration relative top-0.5px",children:D&&V})]}),Le,te&&de,ct,pe&&x("div",{className:$e,children:Ae}),Ie&&x("div",{className:X("right-actions",$p.topContainer("right")),children:Ce})]}),zt=x(GW,{item:t,cardData:n,gridDisplayMode:p,handleVideoLinkClick:g?ut:Oe}),Rn=x(Be,{children:Te});function Ot(et){return x(nc,{trigger:["contextMenu"],onOpenChange:Tt,getPopupContainer:()=>re.current?.closest(`.${Al}`)??document.body,rootClassName:X(sCe,CX),menu:{items:wt,className:"w-max"},children:et})}function Ee(et){return x("div",{className:"bili-video-card__wrap",ref:re,css:[CNe,K&&h3.cardWrap,"",""],onClick:g?ut:Dt,onContextMenu:Ct=>{S&&Ct.preventDefault();},children:et})}const lt=S&&!K?Ot(Ee(j(Be,{children:[Mt,zt]}))):Ee(j(Be,{children:[Ot(Mt),zt]}));return j(Be,{children:[lt,Rn]})});var f$={};const wNe=fQ(jxe);var m$={},J9;function ZW(){return J9||(J9=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=Yl();function n(r){var o=(0, t.useRef)(r);return o.current=r,o}e.default=n;})(m$)),m$}var h$={},p$={},g$={},v$={},b$={},eL;function $Ne(){return eL||(eL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=false;e.default=t;})(b$)),b$}var tL;function ENe(){return tL||(tL=1,(function(e){var t=wa();Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var n=t(kW()),r=Yl(),o=t(ZW()),i=r6(),a=t($Ne()),c=function(d){a.default&&((0, i.isFunction)(d)||console.error("useUnmount expected parameter is a function, got ".concat((0, n.default)(d))));var m=(0, o.default)(d);(0, r.useEffect)(function(){return function(){m.current();}},[]);};e.default=c;})(v$)),v$}var y$={},nL;function MNe(){return nL||(nL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;function t(n,r){if(n===r)return true;for(var o=0;o!(!e||zs())),g=rt(()=>{if(typeof d!="number"||!o.current)return false;const P=i(),N=o.current.querySelector(`.${Al}.${iB}`)?.getBoundingClientRect();return !(!P||!N||N.top-P.top<-(P.height+N.height)||N.top-P.top>P.height*2+N.height)});function b(P){const N=R(d),O=N.getBoundingClientRect().left,_=q=>Math.abs(O-q)<1;{const q=JW(o.current),V=P==="down"?q:-q,z=R(d+V);if(z){const F=z.getBoundingClientRect().left;if(_(F))return V}}let L=0,H=N;const U=()=>P==="down"?H.nextElementSibling:H.previousElementSibling;for(;U();){if(H=U(),!H.classList.contains(Al))continue;P==="down"?L++:L--;const q=H.getBoundingClientRect().left;if(_(q))return L}return 0}const y=P=>N=>{if(!p())return;N?.preventDefault();let O;if(g()){const _=typeof P=="number"?P:b(P);O=d+_;}else O=$();if(Or){I(r);return}m(O),I(O);},S=(P,N)=>{DNe(P,(O,_)=>{p()&&N(O,_);},{exactMatch:true});};S("leftarrow",y(-1)),S("rightarrow",y(1)),S("tab",y(1)),S("shift.tab",y(-1)),S("uparrow",y("up")),S("downarrow",y("down"));const C=()=>{p()&&m(void 0);},w=()=>{if(!(!p()||typeof d!="number"))return c[d]};S("esc",C),S("enter",P=>{if(p()){if(typeof d=="number")return P.preventDefault(),c[d]?.emit("open");if(typeof u=="number")return P.preventDefault(),c[u]?.emit("open-with-large-preview-visible")}}),S("x",()=>w()?.emit("open-in-popup")),S("backspace",()=>w()?.emit("trigger-dislike")),S(["s","w"],()=>w()?.emit("toggle-watch-later")),S(["period","p"],()=>w()?.emit("hotkey-preview-animation"));function $(){const P=i();if(!P)return 0;const N=T();for(const[O,_]of N.entries())if(_.getBoundingClientRect().top>=P.top)return O;return 0}const M=`.${Al}`;function T(){return [...o.current?.querySelectorAll(M)||[]]}function R(P){return T()[P]}function I(P){const N=R(P);N?.scrollIntoViewIfNeeded?.(false);const O=i(),_=N.getBoundingClientRect();if(!(!O||!_)){if(_.top<=O.top){const L=-(O.top-_.top+10);a?.({offset:L});return}if(O.bottom-_.bottom<20){const L=20-(O.bottom-_.bottom);a?.({offset:L});return}}}return {activeIndex:d,clearActiveIndex:C}}const LNe=new Map,BNe=new Map;function JW(e,t=true){const{gridDisplayMode:n,useCustomGrid:r,enableForceColumn:o,forceColumnCount:i,cardMinWidth:a}=ot.grid;if(n===zr.List)return 1;if(t&&n===zr.TwoColumnGrid)return 2;if(r&&o&&i)return i;if(e||=document.querySelector(`.${Z3}`),!e)return Go("getColumnCount(): gridEl not found"),0;const c=r?LNe:BNe,u=new URLSearchParams({width:Math.round(e.clientWidth).toString(),cardMinWidth:r?a.toString():""}).toString();{const p=c.get(u);if(p)return p}const d=window.getComputedStyle(e);if(d.display!=="grid")return Go('getColumnCount(): gridEl.style.display !== "grid"'),0;const m=d.gridTemplateColumns.split(" ").length;return c.set(u,m),m}const zNe=oo.extend("modules:rec-services:pc");class yf extends Fs{constructor(t){super(yf.PAGE_SIZE),this.isKeepFollowOnly=t;}static PAGE_SIZE=30;tabbarView=void 0;sidebarView=void 0;hasMoreExceptQueue=true;fetchMore(t){const n=this.isKeepFollowOnly?5:2;return this.getRecommendTimes(n,t)}async loadMoreBatch(t,n){if(this.hasMore)return this.qs.bufferQueue.length?this.qs.sliceFromQueue(t):this.qs.doReturnItems(await this.getRecommendTimes(t,n))}async getRecommendTimes(t,n){let r=(await Promise.all(CL(t).map(()=>this.getRecommend(n)))).flat();return r=r.filter(i=>[Il.AV,Il.Live].includes(i.goto)?true:([Il.Ad].includes(i.goto)||zNe("uknown goto: %s %o",i.goto,i),false)),r=Wl(r,i=>i.id),r.forEach(i=>{i.rcmd_reason?.reason_type===1&&(i.rcmd_reason.content||="已关注");}),r.map(i=>({...i,uniqId:`${je.PcRecommend}-${i.bvid||i.room_info?.room_id||crypto.randomUUID()}`,api:je.PcRecommend}))}page=0;async getRecommend(t){const n=++this.page,r="/x/web-interface/wbi/index/top/feed/rcmd",o={fresh_type:8,fresh_idx_1h:n,fresh_idx:n,ps:yf.PAGE_SIZE,web_location:1430650,feed_version:"V8",homepage_ver:1},a=(await Jt.get(r,{signal:t,params:o})).data;return !Zn(a)&&a.code===-62011&&a.message==="暂时没有更多内容了"?(this.hasMoreExceptQueue=false,[]):(a.data?.item||gn(a.message||"API 请求没有返回结果"),a.data?.item||[])}}async function kNe(e=20,t=1){const n=Yo();return (await cg.get(`https://app.bilibili.com/x/v2/space/likearc?mid=${n}`,{responseType:"json",params:{...qCe,vmid:n,ps:e,pn:t}})).data}function FNe({service:e}){const{count:t}=e.useStore();return Number.isFinite(t)?j(Be,{children:[x(pn,{title:`共 ${t} 个视频`,children:x(ho,{color:"success",variant:"outlined",className:"cursor-pointer",children:t})}),x(Eg,{})]}):null}class Iy extends Fs{static PAGE_SIZE=20;constructor(){super(Iy.PAGE_SIZE);}tabbarView=x(FNe,{service:this});sidebarView;get hasMoreExceptQueue(){return this.errorJson?false:Iy.PAGE_SIZE*this.pnSt(this.store);showErrorNotification(t){sa.error({key:"LikedRecService:error",title:"获取喜欢列表失败",...t});}async fetchMore(t){if(!ot.accessKey)throw new VT;sa.destroy("LikedRecService:error");const n=await kNe(this.qs.ps,this.pn+1);if(!Zn(n))throw this.errorJson=n,this.showErrorNotification({title:"获取喜欢列表失败",description:n.message}),new Error("Request fail with none invalid json",{cause:n});const{count:r,item:o}=n.data,[i,a]=await Op(()=>Promise.all(o.map(u=>u.state?Vq(_A(u.param)):void 0))),c=o.map((u,d)=>({...u,uniqId:u.param,api:je.Liked,videoDetail:a?.[d]}));return this.pn++,this.store.count=r,c}}const HNe=[Je.KeepFollowOnly,Je.PcRecommend,Je.AppRecommend],VNe={[Je.AppRecommend]:()=>new Ap(eAe()),[Je.PcRecommend]:()=>new yf(false),[Je.KeepFollowOnly]:()=>new yf(true),[Je.DynamicFeed]:()=>new G1(XA()),[Je.Watchlater]:({existingService:e})=>{const{watchlaterAddSeparator:t,watchlaterItemsOrder:n}=ot,r=e&&e instanceof Tp?e.getServiceSnapshot().bvidIndexMap:void 0;return new Tp(n,t,r,Jr(Vh).searchText)},[Je.Fav]:()=>new W1(QA()),[Je.Hot]:()=>new v3e,[Je.Live]:()=>new Rg,[Je.SpaceUpload]:()=>new GA(cW()),[Je.Liked]:()=>new Iy};function Yd(e,t){const n=e[t];return ji(n,`servicesRegistry[tab=${t}] should not be nil`),n}const Mb=oo.extend("service"),jNe=e=>e.api===je.Separator?e.uniqId:dW(e,{[je.AppRecommend]:t=>t.param,[je.PcRecommend]:t=>t.bvid,[je.DynamicFeed]:t=>Rd(t)?.bvid??t.id_str,[je.Watchlater]:t=>t.bvid,[je.Fav]:t=>t.bvid,[je.PopularGeneral]:t=>t.bvid,[je.PopularWeekly]:t=>t.bvid,[je.Rank]:t=>t.uniqId,[je.Live]:t=>t.roomid,[je.SpaceUpload]:t=>t.bvid,[je.Liked]:t=>t.param});function K3(e,t){return Wl([...e,...t],jNe)}const cL=e=>e===Je.PcRecommend||e===Je.KeepFollowOnly;async function UNe(e,t,n=5){const{tab:r,abortSignal:o,servicesRegistry:i}=t;let a=[],c=true;const u=async d=>{let m=[];if(!HNe.includes(r)){const g=Yd(i,r);m=await g.loadMore(o)??[],c=g.hasMore,m=V3(m,r),a=K3(a,m);return}let p;if(r===Je.KeepFollowOnly)p=8,Mb("getMinCount: addMore(restCount = %s) times=%s",d,p);else {const g=cL(r)?yf.PAGE_SIZE:Ap.PAGE_SIZE,b=fW(r)?n:1.2;p=Math.ceil(d*b/g),Mb("getMinCount: addMore(restCount = %s) multipler=%s pagesize=%s times=%s",d,b,g,p);}if(cL(r)){const g=Yd(i,r);m=await g.loadMoreBatch(p,o)||[],c=g.hasMore;}else {const g=Yd(i,Je.AppRecommend);m=await(g.config.addOtherTabContents?g.loadMore(o):g.loadMoreBatch(o,p))||[],c=g.hasMore;}m=V3(m,r),a=K3(a,m);};for(await u(e);;){if(o?.aborted){Mb("getMinCount: break for abortSignal");break}if(!c){Mb("getMinCount: break for tab=%s hasMore=false",r);break}if(a.filter(m=>m.api!==je.Separator).length>=e)break;await u(e-a.length);}return a}const a6=()=>JW()*4;async function qNe(e){let t=a6();return e.tab===Je.DynamicFeed&&await Yd(e.servicesRegistry,Je.DynamicFeed).shouldReduceMinCount()&&(t=1),UNe(t,e,5)}function GNe(e,t){let n;switch(e){case Je.DynamicFeed:return n=t[Je.DynamicFeed],!ua(n?.config,XA());case Je.Fav:return n=t[Je.Fav],!ua(n?.config,QA());case Je.Hot:return n=t[Je.Hot],n?.subtab!==Vo.subtab||n.subtab===ur.Rank&&n.service instanceof eG&&n.service.rankTab.slug!==vi.slug;case Je.SpaceUpload:return n=t[Je.SpaceUpload],!ua(n?.config,cW());default:return false}}function WNe({tab:e,debug:t,fetcher:n,preAction:r,postAction:o,updateViewFromService:i,self:a}){const c=Ki(),{servicesRegistry:u}=c;no(()=>{d(true);}),qf(()=>{a.abortController.abort();});const d=rt(async(p=false)=>{if(c.refreshing&&c.refreshingTab===e)if(GNe(e,u))t("refresh(): tab=%s [start], current refreshing, sametab but conditions change, abort existing",e),a.abortController.abort();else {t("refresh() tab=%s [start], current refreshing, prevent same tab refresh()",e);return}else t("refresh(): tab=%s [start]",e);const b=performance.now();c.setStore({refreshing:true,refreshingTab:e}),a.setStore({refreshError:void 0,hasMore:true,items:[],refreshTs:Date.now()});const y=new AbortController,{signal:S}=y;a.abortController=y,await r?.();function C(){c.setStore({refreshing:false,refreshingTab:void 0}),a.setStore({showSkeleton:false});}function w(P){C(),a.setStore({refreshError:P}),console.error(P);}function $(){C(),a.setStore({hasMore:Yd(u,e).hasMore});}async function M(){const[P,N]=await Op(()=>n({tab:e,abortSignal:S,servicesRegistry:u}));return S.aborted?t("refresh(): tab=%s [aborted], ignoring rest code",e):P?w(P):(a.setStore({items:N??[]}),true)}let T;const R=p?u[e]:void 0;if(R?(R.restore(),a.setStore({items:R.qs.bufferQueue.slice(0,a6())}),T=!!await M()&&!!Qf[e].swr):(a.setStore({showSkeleton:true}),T=true),T){const[P,N]=Sf(()=>VNe[e]({existingService:R}));if(P)return w(P);if(u[e]=N,i?.(),!await M())return}$(),await o?.();const I=performance.now()-b;t("refresh(): tab=%s [success] cost %s ms",e,I.toFixed(0));}),{recSharedEmitter:m}=Ki();return xo(m,"refresh",d),{refresh:d}}const KNe=({title:e,titleId:t,...n},r)=>j("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,j("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M4 24c0 11.046 8.954 20 20 20v0c11.046 0 20-8.954 20-20S35.046 4 24 4"}),x("path",{d:"M36 24c0-6.627-5.373-12-12-12s-12 5.373-12 12s5.373 12 12 12v0"})]})]}),YNe=f.forwardRef(KNe),lh=oo.extend("components:RecGrid"),uL="grid-col-span-full";class XNe{store=Bn({refreshTs:-1,showSkeleton:false,hasMore:true,refreshError:void 0,items:[]});useStore=()=>St(this.store);setStore=t=>{const n=["items","refreshError"];for(const r of n)typeof t[r]=="object"&&(t[r]=tB(t[r]));Object.assign(this.store,t);};loadedPage=0;abortController=new AbortController;loadMoreLocker={};isLocked=t=>!!this.loadMoreLocker[t];lock=t=>{this.loadMoreLocker={[t]:true};};unlock=t=>{this.loadMoreLocker[t]=false;};get loadMoreRunning(){return this.isLocked(this.store.refreshTs)}}const eK=f.memo(function({className:t,containerClassName:n,shortcutEnabled:r,tab:o,infiniteScrollUseWindow:i,onScrollToTop:a,scrollerRef:c,ref:u}){const d=Ki(),{servicesRegistry:m,recSharedEmitter:p}=d,{refreshing:g}=d.useStore(),b=A1(()=>new XNe,[]),{useCustomGrid:y,gridDisplayMode:S,enableForceColumn:C,forceColumnCount:w,cardMinWidth:$}=St(ot.grid),{multiSelecting:M}=St(kn),T=UU();xRe();const R=rt(()=>{T.current||d.setStore({tabbarView:m[o]?.tabbarView,sidebarView:m[o]?.sidebarView});});no(R);const I=rt(()=>{oe(),R(),a?.();}),P=rt(()=>{oe(),R(),b.loadedPage=1,V();}),{refresh:N}=WNe({tab:o,debug:lh,fetcher:qNe,preAction:I,postAction:P,updateViewFromService:R,self:b});f.useImperativeHandle(u,()=>({refresh:N}),[N]);const{items:O,hasMore:_,refreshError:L,refreshTs:H,showSkeleton:U}=b.useStore();f.useEffect(()=>qAe(O),[O]);const q=f.useRef(void 0);ma("visibilitychange",ue=>{if(!(document.visibilityState==="visible")){q.current=Date.now();return}d.refreshing||b.loadMoreRunning||o===Je.Watchlater&&q.current&&Date.now()-q.current>ao("1h")&&N(true);},{target:document});const V=rt(async()=>{if(await hn(sg?100:0),lh("checkShouldLoadMore(): footerInViewRef = %s",se.current),se.current)return F()}),z=rt(()=>!(T.current||d.refreshing||b.abortController.signal.aborted||b.loadMoreRunning||b.store.refreshTs<0||b.store.refreshError||!b.store.hasMore)),F=rt(async()=>{if(!z())return;const ue=b.store.refreshTs;b.lock(ue);let ye=b.store.items,Te=true,qe;try{const Ze=Yd(m,o);let We=await Ze.loadMore(b.abortController.signal)||[];We=V3(We,o),ye=K3(ye,We),Te=Ze.hasMore;}catch(Ze){qe=Ze;}if(qe)throw b.unlock(ue),sa.error({title:"加载失败",description:qe.message||qe.stack}),qe;{const Ze=b.store.refreshTs;if(ue!==Ze){lh("loadMore: skip update for mismatch refreshTs, %o != %o",ue,Ze),b.unlock(ue);return}}b.loadedPage++,lh("loadMore: loadedPage(%s) len(%s -> %s)",b.loadedPage,b.store.items.length,ye.length),b.setStore({hasMore:Te,items:ye}),b.unlock(ue),V();}),G=rt(async()=>{const ye={key:"RecGrid:loadToEnd"+":error",title:"加载全部",duration:15},Te={title:"加载全部"},qe=Ze=>{throw sa.error({...ye,description:Ze}),new Error("loadToEnd error",{cause:Ze})};if(!tW())return qe("当前 Tab 不支持加载全部");if(b.store.refreshError)return qe("预检查失败: 先前错误");if(!b.store.hasMore)return sa.success({...Te,description:"没有更多了"});for(;!z();)await hn(500);for(;z();)await F();sa.success({...Te,description:"已完成"});});xo(p,"load-to-end",G);const Y=O,Q=f.useMemo(()=>Y.filter(ue=>ue.api!==je.Separator),[Y]),D=f.useRef(null),B=rt(()=>{if(i){const ue=cu.get()+50;return new DOMRect(0,ue,window.innerWidth,window.innerHeight-ue)}else return c?.current?.getBoundingClientRect()}),K=f.useMemo(()=>new Map,[H]),J=f.useMemo(()=>Q.map(({uniqId:ue})=>{const ye=ue;return K.get(ye)||(()=>{const Te=new bi;return K.set(ye,Te),Te})()}),[Q]),[ee,te]=f.useState(void 0);xo(p,"show-large-preview",te);const ne=f.useMemo(()=>{if(ee)return Q.findIndex(ue=>ue.uniqId===ee)},[Y,ee]),{activeIndex:ae,clearActiveIndex:oe}=_Ne({enabled:r,refresh:N,maxIndex:Q.length-1,gridRef:D,getScrollerRect:B,videoCardEmitters:J,activeLargePreviewItemIndex:ne,changeScrollY:i?function({offset:ue,absolute:ye}){const Te=document.documentElement;if(typeof ue=="number"){Te.scrollTop+=ue;return}if(typeof ye=="number"){Te.scrollTop=ye;return}}:void 0}),re=ue=>{b.setStore({items:ue(b.store.items)});},ce=rt((ue,ye,Te)=>{re(qe=>{const Ze=qe.slice(),We=[];for(const[tt,nt]of ue.entries()){const Ke=Ze.findIndex(Qe=>Qe.uniqId===nt);if(Ke===-1)continue;Ze.splice(Ke,1);const Oe=ye?.[tt];Oe&&We.push(Oe),o===Je.Watchlater&&m[o]?.decreaseTotal(),o===Je.Fav&&m[o]?.decreaseTotal();}return !Te&&We.length&&(We.length<=3?We.forEach(tt=>Ft.success(`已移除: ${We.join(", ")}`)):Ft.success(`已移除: ${We.length}个视频`)),Ze});}),he=rt((ue,ye)=>{re(Te=>{const qe=Te.find(nt=>nt.uniqId===ue.uniqId);if(!qe)return Te;const Ze=Te.indexOf(qe),We=Te.slice();We.splice(Ze,1);const tt=We.findIndex(nt=>nt.api!==je.Separator);return We.splice(tt,0,qe),We});});xo(p,"remove-cards",([ue,ye,Te])=>ce(ue,ye,Te));const{ref:me,inView:Re}=HAe({root:i?null:c?.current||null,rootMargin:`0px 0px ${window.innerHeight}px 0px`,onChange(ue){ue&&(lh("footerInView change to visible"),Sf(()=>se.current=!0),V());}}),se=fu(Re),de=x("div",{ref:me,className:X(uL,"flex items-center justify-center py-30px text-size-120%"),children:!g&&x(Be,{children:_?j(Be,{children:[x(YNe,{className:"mr-10px size-40px animate-spin color-gate-primary"}),"加载中~"]}):x(Be,{children:"没有更多了~"})})}),Se=X("min-h-100vh @container-inline-size",n),be=f.useMemo(()=>{const{videoGrid:ue,videoGridBiliFeed4:ye,videoGridCustom:Te,videoGridAddonCenterEmpty:qe,gridTemplateColumnsUsingVarCol:Ze,gridTemplateColumnsUsingCardMinWidth:We,narrowMode:tt}=G4,nt=y&&!(C&&w)&&S!==zr.TwoColumnGrid?We:Ze,Ke=[PQ,ue,nt,y?Te:ye],Oe=(...Qe)=>X(Ke,...Qe,t);return S===zr.TwoColumnGrid?{className:Oe(tt)}:(S===zr.CenterEmptyGrid&&Ke.push(qe),y?C&&w?{className:Oe(),style:{"--col":w.toString()}}:{className:Oe(),style:{"--card-min-width":`${$}px`}}:{className:Oe()})},[G4,y,S,C,w,$,t]),He=S6e(),Ue=({gridChildren:ue,gridSiblings:ye}={})=>j("div",{"data-tab":o,className:Se,children:[x("div",{"data-tab":o,ref:D,...be,children:ue}),ye]});if(L)return console.error("RecGrid.refresh error:",L.stack||L),Ue({gridSiblings:x(ZRe,{tab:o,err:L})});if(g&&U){const ue=a6();return Ue({gridChildren:Array.from({length:ue}).fill(0).map((ye,Te)=>x(Z9,{loading:true,tab:o},Te))})}const Pe=ue=>{if(ue.api===je.Separator)return x(Hl,{className:X(uL,SX),orientation:"horizontal",titlePlacement:"left",children:ue.content},ue.uniqId);{const ye=Q.findIndex(qe=>qe.uniqId===ue.uniqId),Te=ye===ae;return x(Z9,{baseCss:[He,C6e(Te)],tab:o,item:ue,active:Te,onRemoveCurrent:(qe,Ze,We)=>ce([qe.uniqId],[Ze.title],We),onMoveToFirst:he,refresh:N,emitter:J[ye],recSharedEmitter:p,gridDisplayMode:S,multiSelecting:M},ue.uniqId)}};return Ue({gridChildren:j(Be,{children:[Y.map(Pe),de]})})});function tK({className:e="",style:t,refreshHotkeyEnabled:n,ref:r}){n??=true;const{refreshing:o}=Ki().useStore(),i=bo(),a=f.useRef(null),c=rt(()=>{a.current&&(a.current.disabled||a.current.click());});f.useImperativeHandle(r,()=>({click:c}),[]),la("r",()=>{zs()||n&&c();},{exactMatch:true});const u=V1(),{watchlaterItemsOrder:d,popularWeeklyUseShuffle:m}=qt(),{usingShuffle:p}=St(mn),g=u===Je.AppRecommend||u===Je.PcRecommend||u===Je.KeepFollowOnly||u===Je.Watchlater&&d===qo.Shuffle||u===Je.Fav&&p||u===Je.Hot&&nG(m)?"换一换":"刷新",[b,y]=xSe(),S=rt(C=>{y(b.current,{rotate:[0,360]},{duration:.5,type:"tween"}),i();});return j(mt,{ref:a,style:t,className:X(Lj,"[&:disabled]:cursor-wait",e),disabled:o,onClick:S,children:[x(XMe,{ref:b,className:"size-14px"}),g]})}const QNe={name:"x4d4ct",styles:"scrollbar-width:thin;.ant-menu-item-group-title{padding:4px 8px;}.ant-menu-item{margin-block:1px;}ul.ant-menu-item-group-list{font-size:inherit;}"};function ZNe(e){const t=St(Vo).subtab;if(e===Je.Fav)return "max-w-300px";if(e===Je.DynamicFeed)return "min-w-200px";if(e===Je.Hot&&t===ur.Rank)return "min-w-130px"}function nK({className:e,style:t,sidebarView:n,tab:r}){const o=LA(r),i=ar("h-fit max-w-250px w-max flex-none overflow-x-hidden overflow-y-auto b-1px b-gate-border rounded-15px b-solid",ZNe(r),e);return o&&n&&x("div",{className:i,css:QNe,style:t,children:x(Po,{theme:{components:{Menu:{itemHeight:30}}},children:n})})}const JNe=f.memo(function({show:t,onHide:n}){const{grid:{gridDisplayMode:r},modalFeedFullScreen:o,sidebarAlign:i}=qt(),{usingTwoColumnMode:a}=Mq(r),c=!a&&o,u=f.useRef(null),d=f.useMemo(()=>X(c?"b-5px":"b-1px","b-gate-primary b-solid"),[c]),m=rt(()=>{u.current&&(u.current.scrollTop=0);}),{modalSettingsVisible:p}=s6(),g=[t,!p,!_W(),!BW()].every(Boolean),b=Dq(true),{tabbarView:y,sidebarView:S}=b.useStore(),{tab:C,direction:w}=_G(),$=()=>j("div",{className:X(To.modalHeader,"gap-x-15px pr-15px"),children:[j("div",{className:"left flex flex-shrink-1 flex-wrap items-center gap-x-15px gap-y-4px",children:[x(LG,{}),y]}),j("div",{className:"right flex flex-shrink-0 items-center gap-x-8px",children:[r===zr.TwoColumnGrid?null:x(yAe,{initialOpen:true,children:x(ePe,{})}),x(tK,{refreshHotkeyEnabled:g}),x(gg,{onClick:n,className:"ml-5px"})]})]}),M=X(a&&"bg-black/90%"),I=X("h-[calc(100vh-30px)] max-h-unset w-[calc(100vw-30px)] pr-0",c&&"h-full w-full",a&&Eq,d);return x(vA.Provider,{value:b,children:j(pg,{show:t,onHide:n,clsModalMask:M,clsModal:I,children:[$(),j("div",{"data-role":"modal-body",className:X("flex flex-1 gap-x-25px overflow-hidden",i===ff.Right&&"flex-row-reverse"),children:[x(nK,{tab:C,sidebarView:S,className:"max-h-full"}),x("div",{className:"h-full flex-1 overflow-y-auto pr-15px",ref:u,children:x(eK,{tab:C,direction:w,shortcutEnabled:g,onScrollToTop:m,infiniteScrollUseWindow:false,scrollerRef:u},C)})]})]})})});function ePe(){return x(Be,{children:x(Nt,{configPath:"modalFeedFullScreen",label:"全屏",tooltip:"世界清净了~"})})}const Ru=Bn({modalFeedVisible:false,modalSettingsVisible:false});function s6(){return St(Ru)}function tPe(){Ru.modalFeedVisible?rK():nPe();}function nPe(){aK(),Ru.modalFeedVisible=true;}function rK(){Ru.modalFeedVisible=false;}function rPe(){Ru.modalSettingsVisible?oK():l6();}function l6(){aK(),Ru.modalSettingsVisible=true;}function oK(){Ru.modalSettingsVisible=false;}function iK(){GM.registerMenuCommand?.("⚙️ 设置",l6);}const aK=Ip(function(){const t=document.createElement("div");t.classList.add("modals-container",Ca),document.body.appendChild(t),Ka.createRoot(t).render(x(ks,{children:x(oPe,{})}));});function oPe(){const{modalFeedVisible:e,modalSettingsVisible:t}=s6();return j(Be,{children:[x(JNe,{show:e,onHide:rK}),x(vAe,{show:t,onHide:oK})]})}const Ic=CH({align:"right",top:100},"float-entry"),C$={wrapperInner:"flex flex-col items-center gap-y-8px b-1px b-gate-primary rounded-18px b-solid bg-gate-bg p-4px",buttonIcon:"size-18px"};function iPe(){return x(hq,{children:x(aPe,{})})}function aPe(){const{align:e,top:t}=St(Ic,{sync:true}),n=f.useMemo(()=>({arrow:false,placement:e==="right"?"left":"right",align:{offset:[10*(e==="right"?-1:1),0]}}),[e]),r=f.useMemo(OMe,[]),{attributes:o,listeners:i,setNodeRef:a,setActivatorNodeRef:c,transform:u}=pq({id:"GateFloatEntry"});eq({onDragEnd(b){if(b.active.id==="GateFloatEntry"){Gd.update();const y=d.current?.getBoundingClientRect();if(!y)return;const S=lf(Math.round(y.top),0,window.innerHeight-y.height);let C=Ic.align;(Ic.align==="right"&&y.leftwindow.innerWidth/4*3)&&(C=Ic.align==="right"?"left":"right"),_Q("new pos",{align:C,top:S}),Ic.align=C,Ic.top=S,d.current?.animate([{transform:C==="right"?`translateX(-${window.innerWidth-y.right}px)`:`translateX(${y.left}px)`},{transform:"translateX(0)"}],{duration:200,easing:"ease-in-out"});}}});const d=_1(a),m=ar("fixed transition-200 transition-ease-in-out transition-property-right,left",oCe,e==="right"&&"right--30px pr-6px hover:right-0",e==="left"&&"left--30px pl-6px hover:left-0");no(Gd.updateThrottled);const{height:p}=Gd.use(),g=f.useMemo(()=>lf(t,0,p-150),[t,p]);return x("div",{ref:d,className:m,style:{top:`${g}px`,transform:pf.Transform.toString(u)},children:j("div",{className:C$.wrapperInner,children:[x(pn,{title:j(Be,{children:[Ro,": 在新窗口打开"]}),...n,children:x(mt,{className:"icon-only-round-button",href:r,target:"_blank",children:x(Ci,{className:C$.buttonIcon})})}),x(pn,{title:j(Be,{children:[Ro,": 弹窗打开"]}),...n,children:x(mt,{className:"icon-only-round-button",onClick:tPe,children:x(PW,{className:C$.buttonIcon})})}),x(mt,{className:"icon-only-round-button cursor-move",...i,...o,ref:c,children:x(AW,{className:"size-14px"})})]})})}function sPe(e,t,n){const r=rt(t),o=Tl(n);return f.useEffect(()=>{const i=new ResizeObserver(a=>{for(const c of a)if(c.target===e&&c.contentRect){const u=r(c);ua(o.val,u)||o.set(u);}});return i.observe(e),()=>{i.disconnect();}},[e,r]),o.state}function lPe(){const e=f.useRef(null),[t,n]=f.useState(false);return f.useEffect(()=>{const r=Kl(()=>{if(!e.current)return;const o=Math.trunc(e.current.getBoundingClientRect().top*10)/10,i=Number.parseInt(getComputedStyle(e.current).top),a=o<=i;n(a);},16);return r(),document.addEventListener("scroll",r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{document.removeEventListener("scroll",r),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r);}},[t]),[e,t]}const cPe=oo.extend("RecHeader");function uPe({leftSlot:e,rightSlot:t,shortcutEnabled:n,ref:r}){const{pureRecommend:o,multiSelect:{showIcon:i},style:{pureRecommend:{useStickyTabbar:a,stickyTabbarShadow:c,useWhiteBackground:u}}}=qt();la(["shift.comma"],T=>{zs()||rPe();},{exactMatch:true,useCapture:true});const[d,m]=lPe(),p=rt(()=>{if(!o)return;const T=d.current?.parentElement;if(!T)return;const R=T.getBoundingClientRect(),I=cu.get();if(R.top({scrollToTop:p}));const g=cu.use(),b=fPe(),y=KR.use(),S=$1(),C=dPe(),w=(()=>{let T;return y?T=S?"rgba(0, 0, 0, 26%) 0px 2px 10px 1px":"rgba(0, 0, 0, 13%) 0 1px 10px 1px;":T=`0 2px 4px ${S?"rgb(255 255 255 / 5%)":"rgb(0 0 0 / 8%)"}`,sn("box-shadow:",T,";","")})(),$=ar(o&&a&&["sticky mb-10px b-b-1px b-b-transparent b-b-solid",rCe,m&&["bg-gate-bg","b-b-gate-bg-lv1"]],m&&"sticky-state-on"),M=f.useMemo(()=>{if(!(o&&a))return;const R=[sn("top:",g-1,"px;","")];return c&&m&&R.push(w,C),R},[o,a,c,m,g,w,C]);return x("div",{ref:d,"data-role":"tab-bar-wrapper",className:$,css:M,children:j("div",{"data-role":"tab-bar",className:X(sB,"relative mb-0 h-auto flex flex-row items-center justify-between gap-x-15px px-0 py-8px"),children:[j("div",{"data-class-name":"left",className:"h-full flex flex-wrap items-center gap-x-15px gap-y-8px",children:[x(LG,{className:"flex-none"}),e]}),j("div",{"data-class-name":"right",className:"h-full min-w-180px flex flex-row-reverse flex-wrap items-center justify-right gap-x-8px gap-y-8px",children:[x(tK,{refreshHotkeyEnabled:n}),x(pn,{title:"设置",arrow:false,children:j(mt,{onClick:l6,className:"icon-only-round-button",children:[x(pAe,{}),x(DT,{className:"size-14px"})]})}),i&&x(JG,{iconOnly:true,addCopyActions:true}),b&&x(fA,{style:{marginLeft:5}}),t]})]})})}function dPe(){const{xScrolling:e,bodyWidth:t}=sPe(document.body,n=>{const r=n.contentRect.width,o=!!(r&&Math.round(r)>Math.round(window.innerWidth));return o?{xScrolling:o,bodyWidth:r}:{xScrolling:o}},()=>({xScrolling:false}));return f.useMemo(()=>{if(e){const n=Math.floor(t);return sn("margin-inline:calc((100% - ",n,"px) / 2);padding-inline:calc((",n,"px - 100%) / 2);","")}else {const n=zT||sg?"0px":"20px";return sn("margin-inline:calc((100% - 100vw + ",n,") / 2);padding-inline:calc((100vw - ",n," - 100%) / 2);","")}},[e,t])}function fPe(){const{accessKey:e}=qt(),t=V1();return !e&&[Je.AppRecommend,Je.Liked].includes(t)}function mPe(){const{modalFeedVisible:e,modalSettingsVisible:t}=s6();return [e,t,_W(),BW()].every(r=>r===false)}function hPe(){const{grid:{twoColumnModeAlign:e},sidebarAlign:t}=qt(),{usingTwoColumnMode:n}=Rq(),r=mPe(),o=Dq(),{tabbarView:i,sidebarView:a}=o.useStore(),{tab:c,direction:u}=_G(),d=f.useRef(null),m=rt(()=>d.current?.scrollToTop()),p=cu.use(),g=f.useMemo(()=>sn("position:sticky;top:",p+55,"px;max-height:calc(100vh - ",p+55+20,"px);",""),[p]);let b,y,S;return b=X("flex gap-x-25px",t===ff.Right&&"flex-row-reverse"),y="flex-1",S=X(n&&[Eq,lEe(e,"margin")]),j(vA.Provider,{value:o,children:[x(uPe,{ref:d,leftSlot:i,shortcutEnabled:r}),j("div",{className:b,children:[x(nK,{css:g,tab:c,sidebarView:a}),x(eK,{tab:c,direction:u,containerClassName:y,className:S,shortcutEnabled:r,infiniteScrollUseWindow:true,onScrollToTop:m},c)]})]})}const sK="html.bewly-design:not(:has(#i_cecream,#app))";function pPe(){return !!document.querySelector(sK)}function gPe(){return x1(sK,()=>{Go("unmount for using bewly-design"),Pp?.unmount();},{pollTimeout:5e3,warnOnTimeout:false})}let Pp;async function vPe(){if(Bh(".adblock-tips"),Bh(".vip-login-tip"),x1("html.gray",t=>t.classList.remove("gray")),iK(),pPe())return Go("quit for using bewly-design");ot.pureRecommend||IMe()||H1()?(await yPe(),gPe()):bPe();}function bPe(){const e=document.createElement("section");e.classList.add(Ca),document.body.append(e),Pp=Ka.createRoot(e),Pp.render(j(ks,{children:[x(P1,{antd:true,baseGlobalStyle:true}),x(iPe,{})]}));}async function yPe(){sg&&await hn(500),Bh("#i_cecream .bili-feed4-layout, body > #app .bili-feed4-layout"),Bh(".bili-feed4 .header-channel"),Bh(".palette-button-wrap");const e=document.createElement("div");e.classList.add("bili-feed4-layout","pure-recommend",Ca),await fg(()=>document.querySelector(".bili-feed4 .bili-header"),{interval:20,timeout:2e3}),document.body.append(e);const t=document.createElement("div");e.append(t),Pp=Ka.createRoot(t),Pp.render(j(ks,{children:[x(P1,{antd:true,baseGlobalStyle:true,homePageGlobalStyle:true}),x(hPe,{}),x(wu.BackTop,{style:{insetInlineEnd:"var(--back-top-right, 24px)"}})]}));}function c6(){CPe(),iK();}const SPe=Ip(()=>{const e=document.createElement("div");document.body.appendChild(e),Ka.createRoot(e).render(x(ks,{children:x(P1,{antd:true,baseGlobalStyle:true})}));});function CPe(){SPe();}function xPe(){try{return globalThis.self!==window.top}catch{return true}}function wPe(){xPe()||(c6(),ot.videoCard.videoPreview.addTo.searchPage&&$Pe());}function $Pe(){const e=bH(()=>{const r=Array.from(document.querySelectorAll(".video-list-item:has(> .bili-video-card),div:has(> .bili-video-card)"));for(const o of r)EPe(o);},1);e(),new MutationObserver(()=>e()).observe(document.body,{childList:true,subtree:true});}const dL=new WeakSet,fL=`${ro}-add-large-preview-processed`;function EPe(e){if(dL.has(e)||e.getAttribute(fL))return;const t=e.querySelector(".bili-watch-later--wrap");if(!t)return;const n=document.createElement("div");t.after(n),dL.add(e),e.setAttribute(fL,"true"),Ka.createRoot(n).render(x(ks,{children:x(MPe,{el:e})}));}function MPe({el:e}){const{bvid:t="",cover:n}=f.useMemo(()=>RPe(e),[e]),r=f.useMemo(()=>e.querySelector(".bili-video-card")??e,[e]),o=f.useMemo(()=>r.querySelector(".bili-video-card__wrap > a"),[e]),i=N1(r),a=f.useRef(o),{largePreviewActionButtonEl:c,largePreviewEl:u}=UW({shouldFetchPreviewData:!!t,hasLargePreviewActionButton:true,actionButtonVisible:i,actionButtonProps:{useMotion:true,motionProps:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:0}},transition:{duration:.2,ease:"linear",delay:.2}}},bvid:t,cid:void 0,uniqId:t,recSharedEmitter:Iq,cardTarget:r,cover:n,videoCardAsTriggerRef:a});return j(Be,{children:[x("div",{className:ar($p.top("right"),"right-[calc(8px+28px+5px)]"),children:c}),wo.createPortal(u,r)]})}function RPe(e){let t;{const r=e.querySelector(".bili-video-card__wrap > a")?.href;r&&(t=/^\/video\/(?BV\w+)\//i.exec(new URL(r).pathname)?.groups?.bvid);}const n=e.querySelector("picture.v-img.bili-video-card__cover img")?.currentSrc;return {bvid:t,cover:n}}function TPe(){c6(),NPe();}const APe=`${ro}-${crypto.randomUUID()}`;async function NPe(){if(!iu.mid)return;const e=".h-action",t=".upinfo .operations";await x1([e,t].join(","),n=>{iu.href=location.href,iu.usingNewSpacePage=n.matches(t),lK();const r=document.createElement("span");r.id=APe,r.classList.add("mr-24px"),n.prepend(r),Ka.createRoot(r).render(x(ks,{children:x(PPe,{})}));},{pollTimeout:1e4,pollInterval:1e3});}const iu=Bn({href:location.href,usingNewSpacePage:false,followed:false,get mid(){return IPe(this.href)},get collectionId(){const e=new URL(this.href);{const t=/https:\/\/space.bilibili.com\/(?\d+)\/lists\/(?\d+)(?:\?type=season)?/,n=this.href.match(t);if(n?.groups?.collectionId&&(e.searchParams.get("type")==="season"||!e.searchParams.get("type")))return Number(n?.groups?.collectionId)}if(/https:\/\/space.bilibili.com\/\d+\/channel\/collectiondetail\?/.test(this.href)){const r=new URL(this.href).searchParams.get("sid")?.trim();if(r)return Number(r)}},get isCollectionPage(){return typeof this.collectionId=="number"},get searchKeyword(){return /https:\/\/space.bilibili.com\/\d+\/search/.test(this.href)?new URLSearchParams(location.search).get("keyword")??void 0:void 0},get isSearching(){return !!this.searchKeyword?.trim()}}),lK=Ls(async()=>{const e=await fg(()=>{if(Array.from(document.querySelectorAll(".space-follow-btn")).filter(n=>n.textContent?.trim()==="已关注").length>0)return true},{interval:100,timeout:5e3});iu.followed=!!e;});window.navigation!==void 0&&window.navigation.addEventListener?.("navigatesuccess",()=>{iu.href=location.href,lK();});function PPe(){const{mid:e,collectionId:t,followed:n,isSearching:r,searchKeyword:o}=St(iu);if(!e)return;const i="w-34px b-white/33% rounded-full hover:b-gate-primary hover:bg-gate-primary",a="size-17px";let c;{let m=`https://www.bilibili.com/?${Ba.Mid}=${e}`;r&&o&&(m+=`&${Ba.SearchText}=${o}`),c=x(x$,{className:i,href:m,tooltip:`在「${Ro}」中查看 UP 的投稿`,children:x(sy,{className:a})},"btnSpaceUpload");}let u;if(n){const m=`https://www.bilibili.com/?${ui.Mid}=${e}`;u=x(x$,{className:i,href:m,tooltip:`在「${Ro}」中查看 UP 的动态`,children:x(ay,{className:a})},"btnDynamicFeed");}let d;return typeof t=="number"&&(d=x(x$,{className:i,href:`https://www.bilibili.com/?${by.CollectionIdFull}=${t}`,target:"_blank",tooltip:`在「${Ro}」中查看合集`,children:x(U1,{className:a})},"btnViewCollection")),j("span",{className:"inline-flex items-center gap-x-8px",children:[d,c,u]})}function x$({href:e,children:t,className:n,style:r,tooltip:o,...i}){const{usingNewSpacePage:a}=St(iu),c=ar("h-34px w-150px flex cursor-pointer items-center justify-center b-1px b-white/20% rounded-6px b-solid bg-white/14% text-14px color-white font-700 transition-duration-300 transition-property-all hover:bg-white/40%",n),u=a?x("a",{...i,href:e,className:c,style:r,children:t}):x("a",{href:e,className:X("h-f-btn",n),style:{width:"auto",paddingInline:"15px",...r},...i,children:t});return o?x(pn,{title:o,children:u}):u}function IPe(e=location.href){const n=new URL(e).pathname.split("/").map(r=>r.trim()).find(Boolean);if(!(!n||!/^\d+$/.test(n)))return n}function Y3(){if(!(typeof unsafeWindow>"u"))return unsafeWindow.player}const s0=oo.extend("main:video-play-page");async function OPe(){c6(),DPe(),VPe(),await BPe(),await zPe();}function DPe(){_Pe(),LPe(),HPe();}function _Pe(){MA&&GM.registerMenuCommand?.("🎦 小窗打开",()=>{cK(),kPe();});}function LPe(){zT&&GM.registerMenuCommand?.("▶️ IINA 打开",()=>{cK(),FPe();});}async function BPe(){const e=new URL(location.href).searchParams.get(ql.PlayerScreenMode);if(s0("targetMode=%s",e),!(e===wl.WebFullscreen||e===wl.Fullscreen))return;let n;e===wl.WebFullscreen&&(n=()=>document.querySelector('[role="button"][aria-label="网页全屏"]')?.click()),e===wl.Fullscreen&&(n=()=>document.querySelector('[role="button"][aria-label="全屏"]')?.click());const r=()=>document.querySelector("#bilibili-player .bpx-player-container")?.dataset.screen||wl.Normal,o=Date.now()+ao("30s");for(;r()!==e&&Date.now()<=o;)s0("current mode: %s",r()),n?.(),await hn(100);s0("handleFullscreen to %s complete",e);}async function zPe(){if(Hq()||!(new URL(location.href).searchParams.get(ql.ForceAutoPlay)===FT.ON))return;const t=()=>{const r=Y3();return !!r&&!r.isPaused()},n=Date.now()+ao("30s");for(;Date.now()<=n&&!t();)Y3()?.play(),await hn(1e3);s0("handleForceAutoPlay complete, playing = %s",t());}function cK(){const e=Y3();e&&!e.isPaused()&&e.pause();}function kPe(){const e=new URL(location.href);e.searchParams.set(ql.PlayerScreenMode,wl.WebFullscreen);const t=e.href;Qq(t,"");}function FPe(){const e=`iina://open?url=${encodeURIComponent(location.href)}`;window.open(e,"_self");}function HPe(){GM.registerMenuCommand?.("⭐️ 加入收藏",()=>X3());}async function VPe(){if(!ot.fav.useCustomFavPicker.onPlayPage||!Aq())return;document.addEventListener("keydown",t=>{t.key==="e"&&(zs()||jPe(t.target)||(t.stopImmediatePropagation(),t.preventDefault(),X3()));},{capture:true}),(await fg(()=>document.querySelector(".video-fav.video-toolbar-left-item"),{interval:100,timeout:5e3}))?.addEventListener("click",t=>{t.stopImmediatePropagation(),t.preventDefault(),X3();},{capture:true});}async function X3(e){const t=Aq();if(!t)return Ft.error("无法解析视频 BVID !");const n=WMe(t);if(e===void 0){const r=await mu.getVideoFavState(n);r&&(e=r.favFolderIds);}await Py(e,async r=>{if(!await t6(n,e,r))return;const i=!!r;return document.querySelector(".video-fav.video-toolbar-left-item")?.classList.toggle("on",i),true});}function jPe(e){return e.tagName.toLowerCase()!=="bili-comments"?false:!!UPe(e,["bili-comments-header-renderer","bili-comment-box","#editor.active"])}function UPe(e,t){let n=e;for(const r of t)if(n=n.shadowRoot?.querySelector(r)??void 0,!n)return;return n}qn.extend(lxe);(function(){if(Is)return vPe();if(Tq)return OPe();if(OQ)return TPe();if(DQ)return wPe()})(); })(UAParser, axios, SparkMD5, localforage, PinyinMatch);