zpd-ui 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,10 +2,11 @@ import type { CSSProperties } from 'react';
2
2
  import React from 'react';
3
3
  import './index.scss';
4
4
  export interface BarrageBullet {
5
- text: string;
5
+ text?: string;
6
6
  userInfo?: any;
7
7
  id?: string;
8
8
  line?: number;
9
+ [key: string]: any;
9
10
  }
10
11
  export interface BarrageProps {
11
12
  list: BarrageBullet[];
@@ -1,5 +1,5 @@
1
- import { type FC } from 'react';
2
1
  import { type UseVapOptions } from '../../hooks/useVap';
2
+ import { type FC } from 'react';
3
3
  export interface VapPlayerProps extends UseVapOptions {
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
@@ -38,6 +38,8 @@ export default VapPlayer;
38
38
  * keepAlive模式优势:
39
39
  * 1. 避免频繁创建销毁DOM
40
40
  * 2. 避免重复初始化VAP实例
41
- * 3. 通过display:none控制显示隐藏
41
+ * 3. 通过opacity控制显示隐藏,保持Canvas渲染上下文稳定
42
42
  * 4. 播放完成后自动重置到开始位置
43
+ * 5. pointerEvents:none 让点击事件穿透,不阻挡下层交互
44
+ * 6. 自动处理页面后台时浏览器清理canvas的问题(回到前台自动恢复)
43
45
  */
@@ -67,6 +67,9 @@ export declare const useVap: (config: UseVapOptions) => {
67
67
  vapInstance: Vap | null;
68
68
  isReady: boolean;
69
69
  play: () => void;
70
+ playFromStart: () => void;
70
71
  pause: () => void;
71
72
  reset: () => void;
73
+ reinitialize: () => Promise<boolean>;
74
+ checkCanvasValid: () => boolean;
72
75
  };
@@ -8,6 +8,8 @@ declare module 'video-animation-player' {
8
8
  loop?: boolean
9
9
  mute?: boolean
10
10
  autoplay?: boolean
11
+ accurate?: boolean
12
+ beginPoint?: number
11
13
  }
12
14
 
13
15
  export default class Vap {
@@ -1 +1 @@
1
- var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,i=(e,t)=>function(){return t||(0,e[n(e)[0]])((t={exports:{}}).exports,t),t.exports},l=(i,l,o)=>(o=null!=i?e(s(i)):{},((e,s,i,l)=>{if(s&&"object"==typeof s||"function"==typeof s)for(var o,c=n(s),u=0,d=c.length;u<d;u++)o=c[u],a.call(e,o)||void 0===o||t(e,o,{get:(e=>s[e]).bind(null,o),enumerable:!(l=r(s,o))||l.enumerable});return e})(!l&&i&&i.__esModule?o:t(o,"default",{value:i,enumerable:!0}),i));let o=require("react");o=l(o);let c=require("clsx");c=l(c);let u=require("react/jsx-runtime"),d=require("dayjs");d=l(d);let h=require("video-animation-player");h=l(h);const f=new class{constructor(e=""){this.audioCache=new Map,this.loadingPromises=new Map,this.assetOrigin=e}setAssetOrigin(e){this.assetOrigin=e}preload(e){if(this.audioCache.has(e))return Promise.resolve();if(this.loadingPromises.has(e))return this.loadingPromises.get(e);const t=new Promise((t,r)=>{const n=e.startsWith("http")?e:`${this.assetOrigin}${e}`,s=new Audio(n);s.preload="auto";const a=()=>{this.audioCache.set(e,s),l(),t()},i=e=>{l(),r(e)},l=()=>{s.removeEventListener("canplaythrough",a),s.removeEventListener("error",i),this.loadingPromises.delete(e)};s.addEventListener("canplaythrough",a),s.addEventListener("error",i),s.load()});return this.loadingPromises.set(e,t),t}async preloadAll(e){await Promise.all(e.map(e=>this.preload(e)))}async play(e,t=1,r){try{this.audioCache.has(e)||await this.preload(e);const n=this.audioCache.get(e);if(!n)return;const s=n.cloneNode(!0);s.volume=Math.max(0,Math.min(1,t));const a=()=>{s.removeEventListener("ended",i),s.removeEventListener("error",l),s.remove()},i=()=>{r?.onEnded?.(),a()},l=e=>{r?.onError?.(new Error(e.message||"音频播放失败")),a()};s.addEventListener("ended",i),s.addEventListener("error",l),await s.play()}catch(n){r?.onError?.(n)}}stopAll(){this.audioCache.forEach(e=>{e.pause(),e.currentTime=0})}clear(){this.audioCache.forEach(e=>{e.src="",e.load()}),this.audioCache.clear(),this.loadingPromises.clear()}isCached(e){return this.audioCache.has(e)}getCacheSize(){return this.audioCache.size}};var m=o.default.forwardRef(({list:e=[],intervalTime:t=1600,className:r="",renderItem:n,tabClassName:s="",lines:a=2,lineHeight:i=25,tabClassNameStyle:l={},duration:d=8},h)=>{const[f,m]=(0,o.useState)([]),p=(0,o.useRef)(1),y=(0,o.useRef)(0),v=(0,o.useRef)(null),g=(0,o.useRef)(e),x=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,o.useEffect)(()=>{g.current=e,y.current=0},[e]);const w=(0,o.useCallback)(()=>{m(e=>e.slice(1))},[]),b=(0,o.useCallback)(e=>(e-1)*i,[i]),M=(0,o.useCallback)(()=>{const e=g.current;if(!e.length)return;const t=y.current,r=p.current;y.current=(y.current+1)%e.length,p.current=p.current%a+1;const n=e[t];if(!n)return;const s={...n,line:r,id:n?.id||String(Date.now()+Math.random())};m(e=>[...e,s])},[a]);return(0,o.useImperativeHandle)(h,()=>({showNextBullet:M})),(0,o.useEffect)(()=>{v.current=setInterval(()=>{M()},t);const e=()=>{window.document.hidden?(v.current&&(clearInterval(v.current),v.current=null),m([])):(m([]),M(),v.current&&clearInterval(v.current),v.current=setInterval(()=>{M()},t))};return window.document.addEventListener("visibilitychange",e),()=>{v.current&&clearInterval(v.current),window.document.removeEventListener("visibilitychange",e)}},[t,M]),f.length?(0,u.jsx)("div",{className:(0,c.default)("w-full relative",r),style:{"--barrage-duration":`${d}s`},children:Array.isArray(f)&&f.map((e,t)=>(0,u.jsx)("div",{className:(0,c.default)(s,"absolute z-3 w-fit h-fit rounded-50 flex items-center justify-center text-24 text-#fff",{"bullet-item-rtl":x,"bullet-item":!x}),"data-line":e.line,style:{top:e.line?`${b(e.line)}px`:void 0,...l},onAnimationEnd:w,children:n(e,t)},e?.id||`barrage-item-${t}`))}):null});m.displayName="Barrage";var p=m;const y=["tw","my","ph","en"],v=["tr"],g=["0","0"];var x=({time:e,background:t})=>{const r=(0,o.useMemo)(()=>e?(e+"").padStart(2,"0").split(""):g,[e]);return(0,u.jsx)("div",{className:`fcc ${t}`,dir:"ltr",children:Array(2).fill(0).map((e,t)=>(0,u.jsx)("div",{children:r[t]},t))})},w=l(i({"node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/duration.js":(e,t)=>{var r,n;r=e,n=function(){var e,t,r=1e3,n=6e4,s=36e5,a=864e5,i=/\[([^\]]+)]|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,l=31536e6,o=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:l,months:o,days:a,hours:s,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof g},h=function(e,t,r){return new g(e,r,t.$l)},f=function(e){return t.p(e)+"s"},m=function(e){return e<0},p=function(e){return m(e)?Math.ceil(e):Math.floor(e)},y=function(e){return Math.abs(e)},v=function(e,t){return e?m(e)?{negative:!0,format:""+y(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},g=function(){function m(e,t,r){var n=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){n.$d[f(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var s=e.match(c);if(s){var a=s.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var y=m.prototype;return y.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,r){return t+(e.$d[r]||0)*u[r]},0)},y.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=p(e/l),e%=l,this.$d.months=p(e/o),e%=o,this.$d.days=p(e/a),e%=a,this.$d.hours=p(e/s),e%=s,this.$d.minutes=p(e/n),e%=n,this.$d.seconds=p(e/r),e%=r,this.$d.milliseconds=e},y.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=v(r,"D"),s=v(this.$d.hours,"H"),a=v(this.$d.minutes,"M"),i=this.$d.seconds||0;this.$d.milliseconds&&(i+=this.$d.milliseconds/1e3,i=Math.round(1e3*i)/1e3);var l=v(i,"S"),o=e.negative||t.negative||n.negative||s.negative||a.negative||l.negative,c=s.format||a.format||l.format?"T":"",u=(o?"-":"")+"P"+e.format+t.format+n.format+c+s.format+a.format+l.format;return"P"===u||"-P"===u?"P0D":u},y.toJSON=function(){return this.toISOString()},y.format=function(e){var r=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return r.replace(i,function(e,t){return t||String(n[e])})},y.as=function(e){return this.$ms/u[f(e)]},y.get=function(e){var t=this.$ms,r=f(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?p(t/u[r]):this.$d[r],t||0},y.add=function(e,t,r){var n;return n=t?e*u[f(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+n*(r?-1:1),this)},y.subtract=function(e,t){return this.add(e,t,!0)},y.locale=function(e){var t=this.clone();return t.$l=e,t},y.clone=function(){return h(this.$ms,this)},y.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},m}(),x=function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")};return function(r,n,s){e=s,t=s().$utils(),s.duration=function(e,t){return h(e,{$l:s.locale()},t)},s.isDuration=d;var a=n.prototype.add,i=n.prototype.subtract;n.prototype.add=function(e,t){return d(e)?x(this,e,1):a.bind(this)(e,t)},n.prototype.subtract=function(e,t){return d(e)?x(this,e,-1):i.bind(this)(e,t)}}},"object"==typeof e&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(r="undefined"!=typeof globalThis?globalThis:r||self).dayjs_plugin_duration=n()}})(),1);d.default.extend(w.default);const b=(e=!1)=>{const[t,r]=(0,o.useState)(e);return[t,(0,o.useMemo)(()=>({setTrue:()=>r(!0),setFalse:()=>r(!1),toggle:()=>r(e=>!e),set:e=>r(e)}),[])]},M=e=>{const t=(0,o.useRef)(e);return t.current=e,t};var N=({height:e,children:t,handleMore:r,hasMore:n=!0,className:s,style:a})=>{const[i,{setTrue:l,setFalse:c}]=b(!1),d=o.default.useRef(null),h=M(n),f=M(i),m=M(r),p=(0,o.useRef)(void 0),y=(0,o.useCallback)(async()=>{if(h.current&&(()=>{if(!d.current)return!1;const{scrollTop:e,scrollHeight:t,clientHeight:r}=d.current;return t-r-e<10})()&&!f.current){l(),p.current&&clearTimeout(p.current);try{await(m.current?.())}finally{p.current=setTimeout(()=>{c()},500)}}},[h,f,m,l,c]);return(0,o.useEffect)(()=>(y?.(),()=>{p.current&&clearTimeout(p.current)}),[y]),(0,u.jsx)("div",{className:`infinite-container ${s}`,ref:d,style:{maxHeight:e?e/7.5+"vw":void 0,height:"100%",overflowY:"auto",...a},onScroll:y,children:t})},C=({onRetry:e})=>(0,u.jsx)("div",{className:"minglex-the-list-error",children:(0,u.jsxs)("div",{className:"minglex-the-list-error__content",children:[(0,u.jsx)("div",{className:"minglex-the-list-error__text",children:"error"}),(0,u.jsx)("button",{className:"minglex-the-list-error__retry-btn",onClick:e,children:"retry"})]})}),k=()=>(0,u.jsx)("div",{className:"minglex-the-list-load-more",children:(0,u.jsx)("div",{className:"minglex-the-list-load-more__text",children:"loadMore..."})}),_=()=>(0,u.jsx)("div",{className:"minglex-the-list-loading",children:(0,u.jsx)("div",{className:"minglex-the-list-loading__text",children:"loading..."})}),j=(0,o.forwardRef)(({url:e,params:t={},method:r="get",pageSize:n=10,dataKey:s="items",className:a,renderItem:i,onDataLoaded:l,finishRender:d,cursorKey:h,hasNextKey:f="has_next",myRankKey:m="my_rank",noDataRender:p,children:y,request:v,enablePadding:g=!1,useSimpleRender:x=!1,paddingThreshold:w,paddingPlaceholder:b={}},M)=>{const[j,$]=(0,o.useState)([]),[E,S]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!0),[T,A]=(0,o.useState)(null),[P,D]=(0,o.useState)(!1),O=(0,o.useRef)(1),I=(0,o.useRef)(void 0),H=(0,o.useRef)(!1),W=(0,o.useCallback)(()=>{const e={current_page:O.current,page_size:n,page:O.current,page_num:O.current,limit:n,offset:(O.current-1)*n,...t};return h&&void 0!==I.current&&(e[h]=I.current),Object.entries(e).reduce((e,[t,r])=>(null!=r&&(e[t]=r),e),{})},[n,t,h]),Y=(0,o.useCallback)(t=>"get"===r.toLowerCase()?{url:e,method:r,params:t}:{url:e,method:r,data:t},[e,r]),B=(0,o.useCallback)(e=>{const t=e?.data[f],r=e?.data[m];let a=e?.data[s]||e?.data?.records||e?.data?.ranks||[];const i="boolean"==typeof t&&t;if(g&&!i){const e=a.length,t=Math.min(w??n,n);if(e<t){const r=Array(t-e).fill(b);a=[...a,...r]}}if(h){const t=e?.data?.[h];null!=t&&(I.current=t)}return{newItems:a,hasMoreData:i,myRank:r||null}},[s,h,f,m,g,w,n,b]),F=(0,o.useCallback)((e,t)=>{if(t)return $(e),e;{const t=[...j,...e];return $(t),t}},[j]),z=(0,o.useCallback)(async()=>{const e=v||window?.__ZPD_REQUEST__?.request;if(!e)throw new Error("List: 请提供 request 函数\n方式1: 通过 props 传入 <List request={myRequest} ... />\n方式2: 在项目入口配置 window.__ZPD_REQUEST__ = { request: myRequest }");return await e(Y(W()))},[W,Y,v]),q=(0,o.useCallback)(async(e=!1)=>{if((!E||e)&&(!P||e))try{S(!0),A(null),e&&(O.current=1);const t=await z(),{newItems:r,hasMoreData:n,myRank:s}=B(t);O.current=O.current+1,D(!n);const a=F(r,e);l?.(t.data,a,s)}catch(t){A(t)}finally{S(!1),L(!1)}},[E,P,z,B,F,l]),U=(0,o.useCallback)(async()=>{E||P||await q(!1)},[q,E,P]),Z=(0,o.useCallback)(async()=>{D(!1),A(null),O.current=1,I.current=void 0,await q(!0)},[q]),V=(0,o.useCallback)(()=>{$([]),D(!0),O.current=1,I.current=void 0,A(null),H.current=!1},[]),X=(0,o.useCallback)(()=>j,[j]);if((0,o.useImperativeHandle)(M,()=>({refresh:Z,clear:V,getList:X}),[Z,V,X]),(0,o.useEffect)(()=>{H.current||(H.current=!0,q(!0))},[q,H]),R)return(0,u.jsx)(_,{});if(T&&Array.isArray(j)&&0===j?.length)return(0,u.jsx)(C,{onRetry:Z});if(Array.isArray(j)&&0===j?.length)return p?.()||null;const K=()=>(0,u.jsxs)(u.Fragment,{children:[j.map((e,t)=>(0,u.jsx)("div",{className:"minglex-the-list__item",children:i(e,t)},`simple-list-item-${t}`)),E&&!P&&(0,u.jsx)(k,{}),P&&d?.(),y&&y]});return x?(0,u.jsx)("div",{className:(0,c.default)("minglex-the-list-simple-render",a),children:K()}):(0,u.jsx)("div",{className:(0,c.default)("minglex-the-list",a),children:(0,u.jsx)(N,{handleMore:U,hasMore:!P,className:"minglex-the-list__scroll",children:K()})})});j.displayName="List";var $=j;function E(e,t){const r=(0,o.useRef)(!1),n=(0,o.useRef)(e);return n.current=e,(0,o.useCallback)((...e)=>{r.current||(n.current(...e),r.current=!0,setTimeout(()=>{r.current=!1},t))},[t])}var S=(0,o.forwardRef)(({topRender:e,topCount:t=3,renderItem:r,onDataLoaded:n,className:s="",listClassName:a="",listStyle:i={},classNameStyle:l={},myRankRender:d,...h},f)=>{const[m,p]=(0,o.useState)([]),[y,v]=(0,o.useState)([]),[g,x]=(0,o.useState)(null),w=(0,o.useRef)(null),b=(0,o.useRef)(!1),M=(0,o.useMemo)(()=>Math.max(0,t),[t]),N=(0,o.useMemo)(()=>M>0&&!!e,[M,e]),C=(0,o.useCallback)((e,t,r)=>{v(t),x(r),N&&!b.current&&t.length>0&&(p(t.slice(0,M)),b.current=!0),n?.(e,t,r)},[M,N,n]),k=(0,o.useCallback)((e,t)=>N&&t<M?null:r(e,t),[M,N,r]),_=(0,o.useCallback)(()=>{p([]),v([]),x(null),b.current=!1},[]),j=(0,o.useCallback)(()=>{w.current?.refresh(),_()},[_]),E=(0,o.useCallback)(()=>{w.current?.clear(),_()},[_]),S=(0,o.useCallback)(()=>y,[y]),R=(0,o.useCallback)(()=>y.slice(M),[y,M]),L=(0,o.useCallback)(()=>m,[m]);(0,o.useImperativeHandle)(f,()=>({refresh:j,clear:E,getList:S,getRestList:R,getTopList:L}),[j,E,S,R,L]);const T=(0,o.useMemo)(()=>N?e?.(m):null,[N,e,m]),A=(0,o.useMemo)(()=>d&&g?d(g):null,[d,g]);return(0,u.jsxs)("div",{className:(0,c.default)("w-full",s),style:l,children:[T,(0,u.jsx)("div",{className:(0,c.default)("w-full",a),style:i,children:(0,u.jsx)($,{ref:w,...h,renderItem:k,onDataLoaded:C})}),A]})});S.displayName="RankList";var R=S;const L=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"};var T=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(r){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const A=e=>{const{autoScale:t=!0,onEnded:r,...n}=e,s=(0,o.useRef)(null),a=(0,o.useRef)(null),[i,l]=(0,o.useState)(!1),c=(0,o.useRef)(r),u=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{c.current=r},[r]),(0,o.useEffect)(()=>{if(u.current=!1,!s.current)return;const e=s.current;let r=!1;return(async()=>{if(e&&!u.current&&!r){u.current=!0;try{a.current&&(T(a.current,e),a.current=null,l(!1));let s=n;if(t){const t=await(e=>new Promise(t=>{const r=e.getBoundingClientRect();r.width>0&&r.height>0?t(!0):requestAnimationFrame(()=>{const r=e.getBoundingClientRect();r.width>0&&r.height>0?t(!0):requestAnimationFrame(()=>{const r=e.getBoundingClientRect();t(r.width>0&&r.height>0)})})}))(e);if(r)return;t&&(s=((e,t)=>{const r=e.getBoundingClientRect(),n=r.width,s=r.height;if(0===n||0===s)return t;const a=2*n,i=2*s;return{...t,width:a,height:i}})(e,n))}a.current=((e,t,r)=>{e.innerHTML="";const n=new h.default({container:e,src:t.src,width:t.width||250,height:t.height||200,config:t.config,loop:t.loop??!0,mute:t.mute??!0,autoplay:t.autoplay??!0});return r&&n.on("ended",r),n.on("error",e=>{setTimeout(()=>{try{n.play?.()}catch(e){}},100)}),(e=>{requestAnimationFrame(()=>{const t=e.querySelector("canvas");t&&(t.style.width="100%",t.style.height="100%",t.style.display="block")})})(e),n})(e,s,()=>c.current?.()),l(!0)}catch(s){}finally{u.current=!1}}})(),()=>{r=!0,u.current=!1,a.current&&(T(a.current,e),a.current=null),l(!1)}},[e.src]),{containerRef:s,vapInstance:a.current,isReady:i,play:()=>{try{a.current?.play?.()}catch(e){}},pause:()=>{try{a.current?.pause?.()}catch(e){}},reset:()=>{try{a.current?.pause?.(),a.current?.setTime?.(0)}catch(e){}}}};var P="__MM__",D="__DD__",O="__YYYY__";const I=e=>{if(e.includes("?"))window.location.hash=e;else{const t=(e=>{const t=e.indexOf("?");return-1===t?"":e.slice(t)})(window.location.hash);window.location.hash=`${e}${t}`}};var H=()=>{const e=window.location.hash.replace(/^#/,""),t=e.indexOf("?");return-1===t?e:e.slice(0,t)||"/"};exports.AudioEffect=({audioUrl:e,volume:t=1,autoPlay:r=!0,onEnded:n,onError:s,onPlay:a})=>{const i=(0,o.useRef)("");return(0,o.useEffect)(()=>{r&&i.current!==e&&(i.current=e,(async()=>{try{a?.(),await f.play(e,t,{onEnded:n,onError:s})}catch(r){s?.(r)}})())},[e,t,r,n,s,a]),null},exports.Barrage=p,exports.CountDown=({targetTime:e,serverTime:t,refreshData:r,format:n="HH:mm:ss",className:s,backgroundClassName:a="",partClassName:i="",escapedTextClassName:l="",onEnd:h})=>{const[f,m]=(0,o.useState)(0),[p,y]=(0,o.useState)(0),[v,g]=(0,o.useState)(0),[w,b]=(0,o.useState)(0),[M,N]=(0,o.useState)(!1),C=(0,o.useRef)(null),k=(0,o.useRef)(null),_=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),j=()=>{if(k.current){const{serverTime:e,localTime:t}=k.current;return e+(Date.now()-t)}return(0,d.default)().valueOf()},$=e=>{if(null==e||""===e||"0"===e)return 0;const t="string"==typeof e?parseInt(e,10):e;return isNaN(t)||t<=0||t<=j()?0:t},E=["dd","HH","mm","ss","d","H","m","s"],S=(e,t)=>{if(!e.startsWith(t))return null;const r="["===t?"]":t,n=e.indexOf(r,1);return-1===n?null:{content:e.slice(1,n),length:n+1}},R=e=>{const t=e.startsWith("d")?"day":e.startsWith("H")?"hour":e.startsWith("m")?"minute":"second";return{type:t,value:"day"===t?f:"hour"===t?p:"minute"===t?v:w}},L=(e,t,r)=>{const n=e[t+r.length];return!(n&&/[a-zA-Z]/.test(n))},T=e=>{for(let t=1;t<e.length;t++){const r=e[t];if("["===r||"'"===r)return t;for(const n of E)if(e.slice(t).startsWith(n)){const r=e[t-1],s=e[t+n.length];if(!(/[a-zA-Z]/.test(r)||s&&/[a-zA-Z]/.test(s)))return t}}return e.length},A=e=>{for(const t of E)if(e.startsWith(t)&&L(e,0,t)){const{type:e,value:r}=R(t);return{part:{type:e,value:r,format:t},length:t.length}}return null},P=()=>{C.current&&(clearInterval(C.current),C.current=void 0)},D=()=>{const{day:t,hour:n,minute:s,seconds:a}=(()=>{const t=$(e);if(0===t)return{day:0,hour:0,minute:0,seconds:0};const r=t-j();if(r<=0)return{day:0,hour:0,minute:0,seconds:0};const n=d.default.duration(r);return{day:Math.floor(n.asDays()),hour:n.hours(),minute:n.minutes(),seconds:n.seconds()}})();t+n+s+a>0?(m(t),y(n),g(s),b(a)):(m(0),y(0),g(0),b(0),P(),M||(N(!0),r?.(),h?.()))};return(0,o.useEffect)(()=>{if(t&&t>0)if(k.current){const{serverTime:e,localTime:r}=k.current,n=t-(e+(Date.now()-r));Math.abs(n)>500&&(k.current={serverTime:t,localTime:Date.now()})}else k.current={serverTime:t,localTime:Date.now()};else k.current=null},[t]),(0,o.useEffect)(()=>{const t=$(e);return N(!1),D(),t>0&&t>j()&&(C.current=setInterval(D,1e3)),()=>{P()}},[e]),(()=>{const e=(()=>{const e=[];let t=_?(e=>{let t=-1,r="",n=-1,s="";for(const o of["HH","H"]){for(let n=0;n<=e.length-o.length;n++)if(e.slice(n,n+o.length)===o){const s=n>0?e[n-1]:"",a=n+o.length<e.length?e[n+o.length]:"";if(!/[a-zA-Z]/.test(s)&&!/[a-zA-Z]/.test(a)){t=n,r=o;break}}if(-1!==t)break}for(const o of["ss","s"]){for(let t=0;t<=e.length-o.length;t++)if(e.slice(t,t+o.length)===o){const r=t>0?e[t-1]:"",a=t+o.length<e.length?e[t+o.length]:"";if(!/[a-zA-Z]/.test(r)&&!/[a-zA-Z]/.test(a)){n=t,s=o;break}}if(-1!==n)break}if(-1===t||-1===n)return e;const a=e.split(""),i=r.length,l=s.length;for(let o=0;o<Math.max(i,l);o++)o<i&&o<l&&([a[t+o],a[n+o]]=[a[n+o],a[t+o]]);return a.join("")})(n):n;for(;t.length>0;){let r=!1;const n=S(t,"[");if(n&&(e.push({type:"text",value:n.content,format:"",textClassName:l}),t=t.slice(n.length),r=!0),!r){const n=S(t,"'");n&&(e.push({type:"text",value:n.content,format:"",textClassName:l}),t=t.slice(n.length),r=!0)}if(!r){const n=A(t);n&&(e.push(n.part),t=t.slice(n.length),r=!0)}if(!r){const r=T(t),n=t.slice(0,r);n&&e.push({type:"text",value:n,format:"",textClassName:i}),t=t.slice(r)}}return e})();return(0,u.jsx)("div",{className:(0,c.default)(`fcc ${s}`),children:e.map((e,t)=>"text"===e.type?(0,u.jsx)("span",{className:(0,c.default)("mx-2 fcc whitespace-pre font-700",e.textClassName),children:e.value},t):(0,u.jsx)("div",{className:"fcc",children:(0,u.jsx)(x,{time:e.value,background:a??""})},t))})})()},exports.List=$,exports.MusicPlayer=({musicUrl:e,playIconClass:t,pauseIconClass:r,className:n,loop:s=!0,autoPlay:a=!0,animationClassName:i="animate-spin-slow"})=>{const[l,d]=(0,o.useState)(!1),h=(0,o.useRef)(null),f=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{const e=h.current;if(!e)return;const t=()=>d(!0),r=()=>d(!1);return e.addEventListener("play",t),e.addEventListener("pause",r),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",r)}},[]),(0,o.useEffect)(()=>{const e=h.current;if(!e)return;const t=!e.paused;e.pause(),e.currentTime=0,e.load(),f.current=!1,t&&a&&e.play().catch(e=>{})},[e,a]),(0,o.useEffect)(()=>{if(!a)return;const e=h.current;if(!e)return;const t=async()=>{try{return e.muted=!1,await e.play(),!0}catch{return!1}},r=()=>{e&&(e.muted=!1)},n=setTimeout(async()=>{if(f.current)return;if(f.current=!0,await t())return;if(await(async()=>{try{return e.muted=!0,await e.play(),!0}catch{return!1}})())return document.addEventListener("click",r,{once:!0}),document.addEventListener("touchstart",r,{once:!0}),void document.addEventListener("scroll",r,{once:!0});const n=async()=>{await t()};document.addEventListener("click",n,{once:!0}),document.addEventListener("touchstart",n,{once:!0})},100);return()=>{clearTimeout(n),document.removeEventListener("click",r),document.removeEventListener("touchstart",r),document.removeEventListener("scroll",r)}},[a]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:(0,c.default)(l?t:r,"transition-transform",l&&i?i:"",n),onClick:()=>{h.current&&(l?h.current.pause():h.current.play(),d(!l))}}),(0,u.jsx)("audio",{ref:h,src:e,loop:s})]})},exports.NavBar=({title:e,rightIcon:t="",leftIcon:r="",onRightClick:n,onLeftClick:s,type:a="close",className:i="",children:l,enableScrollBg:d=!1,scrollBgClassName:h="bg-black/60 backdrop-blur-sm",titleAlign:f="center",renderLeft:m,renderRight:p})=>{const[y,v]=(0,o.useState)(!1),g=(0,o.useRef)(null),x=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,o.useEffect)(()=>{if(!d)return;const e=g.current;if(!e)return;const t=new IntersectionObserver(([e])=>{v(!e.isIntersecting)},{threshold:0,rootMargin:"0px"});return t.observe(e),()=>t.disconnect()},[d]);const w=E(()=>{s?.(),"close"!==a&&window.history.back()},400),b=E(()=>{n?.()},400),M=(0,o.useMemo)(()=>m?m():r?(0,u.jsx)("div",{className:(0,c.default)(r,x&&"rotate-180"),onClick:w}):null,[m,r,x,w]),N=(0,o.useMemo)(()=>p?p():(0,u.jsx)("div",{className:(0,c.default)(t),style:{visibility:t?"visible":"hidden"},onClick:b}),[p,t,b]),C=(0,o.useMemo)(()=>e?(0,u.jsx)("span",{className:"center"===f?"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":"",children:e}):null,[e,f]);return(0,u.jsxs)(u.Fragment,{children:[d&&(0,u.jsx)("div",{ref:g,className:"pointer-events-none absolute left-0 top-0 h-1 w-full"}),(0,u.jsx)("div",{className:(0,c.default)(i,"fixed left-0 top-0 z-99 h-fit w-full px-24 pt-90 text-#fff text-34 font-bold",d&&"transition-all duration-300",d&&y&&h),children:(0,u.jsxs)("div",{className:"w-full flex items-center justify-between relative",children:["left"===f?(0,u.jsxs)("div",{className:"flex items-center",children:[M,C,l]}):(0,u.jsxs)(u.Fragment,{children:[M,C,l]}),N]})})]})},exports.NoticeBar=({className:e,style:t,children:r,text:n,textClassName:s,pixelsPerSecond:a=20,speed:i,pauseOnHover:l=!1,gap:d,noOverflowClassName:h=""})=>{const f=(0,o.useRef)(null),m=(0,o.useRef)(null),p=(0,o.useRef)(null),[y,v]=(0,o.useState)(i||8),[g,x]=(0,o.useState)(!1),w=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,o.useEffect)(()=>{let e=null;const t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{if(!f.current||!p.current)return;const e=f.current,t=p.current,r=e.scrollWidth>t.clientWidth;x(r),r&&v(void 0===i?(e.scrollWidth+t.clientWidth)/a:i)},100)};t();const r=new ResizeObserver(t);return f.current&&r.observe(f.current),p.current&&r.observe(p.current),()=>{e&&clearTimeout(e),r.disconnect()}},[r,n,a,i]);const b=(0,o.useMemo)(()=>r||(n&&Array.isArray(n)&&n?.length>0?n.map((e,t)=>(0,u.jsx)("span",{className:s,children:e},t)):n&&"string"==typeof n?(0,u.jsx)("span",{className:s,children:n}):null),[r,n,s]),M=(0,o.useCallback)(e=>void 0!==d?(0,u.jsxs)(o.default.Fragment,{children:[b,(0,u.jsx)("span",{className:(0,c.default)("inline-block",d)})]},e):(0,u.jsxs)(o.default.Fragment,{children:[(0,u.jsx)("span",{style:{visibility:"visible"},children:b}),(0,u.jsx)("span",{style:{visibility:"hidden"},children:b})]},e),[b,d]),N=(0,o.useMemo)(()=>(0,u.jsx)("div",{ref:f,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap"},children:b}),[b]);return g?(0,u.jsxs)("div",{ref:p,className:(0,c.default)("infinite-scroll",e,{"pause-on-hover":l}),style:{...t,"--t":`${y}s`},children:[(0,u.jsx)("div",{ref:m,className:(0,c.default)("infinite-scroll__track",{"infinite-scroll__track--animate":!w,"infinite-scroll__track--animate-rtl":w}),style:{animationDuration:`${y}s`},children:M("track-1")}),(0,u.jsx)("div",{className:(0,c.default)("infinite-scroll__track",{"infinite-scroll__track--animate":!w,"infinite-scroll__track--animate-rtl":w}),"aria-hidden":"true",style:{animationDuration:`${y}s`},children:M("track-2")})]}):(0,u.jsxs)("div",{ref:p,className:(0,c.default)("infinite-scroll",e),style:t,children:[N,(0,u.jsx)("div",{className:(0,c.default)("w-full text-center text-nowrap",h),children:b})]})},exports.Progress=({className:e="",value:t,showPercent:r=!1,style:n,onChange:s,disabled:a=!1,draggable:i=!0,innerImageClassName:l="",outerImageClassName:d="",innerClassName:h="",pointClassName:f="",pointOffsetPercent:m,maxCount:p,decreaseButtonClassName:y,increaseButtonClassName:v,onDecrease:g,onIncrease:x,buttonSpacing:w="mx-10",step:b=1,minValue:M,children:N})=>{const C=(0,o.useRef)(null),[k,_]=(0,o.useState)(!1),j="rtl"===document.dir,$=g||(()=>{if(a||!s)return;const e=void 0!==M?M:p?1:0,r=Math.max(e,t-b);s?.(r)}),E=x||(()=>{if(a||!s)return;const e=p||100,r=Math.min(e,t+b);s?.(r)}),S=()=>p?Math.min(100,Math.floor(t/p*100)):Math.min(100,Math.max(0,t)),R=e=>{if(!C.current)return t;const r=C.current.getBoundingClientRect(),n=j?Math.max(0,Math.min(100,(r.right-e)/r.width*100)):Math.max(0,Math.min(100,(e-r.left)/r.width*100));return p?Math.max(1,Math.min(p,Math.round(n/100*p))):Math.round(n)};return(0,o.useEffect)(()=>{if(!i)return;const e=C.current;if(!e)return;const t=e=>{if(a)return;_(!0);const t=e.touches[0],r=R(t.clientX);s?.(r)},r=e=>{if(a||!k)return;e.preventDefault();const t=e.touches[0],r=R(t.clientX);s?.(r)},n=()=>{_(!1)};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",r,{passive:!1}),e.addEventListener("touchend",n,{passive:!0}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",n)}},[a,k,s,i]),(0,o.useEffect)(()=>{if(k){const e=e=>{const t=R(e.clientX);s?.(t)},t=()=>{_(!1)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[k,s]),(0,u.jsxs)("div",{className:(0,c.default)("flex items-center flex-shrink-0",e),children:[y&&(0,u.jsx)("div",{className:(0,c.default)(y,w),onClick:$}),(0,u.jsx)("div",{ref:C,className:(0,c.default)({"cursor-not-allowed":a,"cursor-pointer":!a&&i,"cursor-default":!a&&!i,"w-fit":!0,"h-fit":!0}),style:{userSelect:"none",WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",...n},onMouseDown:e=>{if(a||!i)return;_(!0);const t=R(e.clientX);s?.(t)},onMouseMove:e=>{if(a||!k||!i)return;const t=R(e.clientX);s?.(t)},onMouseUp:()=>{_(!1)},children:(0,u.jsxs)("div",{className:(0,c.default)(d,"relative flex items-center overflow-hidden"),children:[(0,u.jsx)("div",{className:(0,c.default)(h,"absolute top-50% overflow-hidden -translate-y-50%",j?"right-0":"left-0",f?"":"transition-all duration-300"),style:{width:`${S()}%`},children:l?(0,u.jsx)("div",{className:(0,c.default)(l)}):null}),f&&(0,u.jsx)("div",{className:(0,c.default)(f,"absolute top-50% -translate-y-50% rtl:translate-x-50% ltr:-translate-x-50%"),style:{[j?"right":"left"]:`${(e=>{if(!f)return 0;const t=m??5;return t+e*(100-2*t)/100})(S())}%`}}),r&&(0,u.jsx)("div",{className:(0,c.default)("absolute top-50% -translate-y-50%",j?"left-10":"right-10"),children:`${S()}%`}),N&&N]})}),v&&(0,u.jsx)("div",{className:(0,c.default)(v,w),onClick:E})]})},exports.RankList=R,exports.ShadowText=({children:e,className:t="",shadowColor:r="#FFEE7B",shadowOffset:n=2,useResponsive:s=!0})=>{const a=s?L(n):`${n}px`;return(0,u.jsx)("div",{className:(0,c.default)(t),style:{fontFamily:"SF Pro Display",textShadow:`-${a} ${a} 0 ${r}, ${a} ${a} 0 ${r}, ${a} -${a} 0 ${r}, -${a} -${a} 0 ${r}`},children:e})},exports.StrokeText=({text:e,strokeWidth:t=4,fontSize:r=30,stroke:n="#F57E34",className:s=""})=>(0,u.jsxs)("svg",{className:(0,c.default)("max-h-full max-w-full text-center",s),children:[(0,u.jsx)("text",{x:"50%",y:"50%",dominantBaseline:"middle",textAnchor:"middle",fontSize:L(r),fill:"none",stroke:n,strokeWidth:L(t),children:e}),(0,u.jsx)("text",{dominantBaseline:"middle",textAnchor:"middle",x:"50%",y:"50%",fontSize:L(r),fill:"#fff",children:e})]}),exports.TabList=({tabs:e,activeValue:t,onTabClick:r,className:n="",renderTab:s,tabClassName:a,activeTabClassName:i,tabStyle:l,activeTabStyle:d,commonTabClassName:h})=>{const f=(0,o.useCallback)((e,n)=>{e.disabled||e.value===t||r?.(e.value,n)},[r,t]),m=(0,o.useCallback)((e,t,r)=>(0,u.jsx)("div",{className:(0,c.default)("flex-shrink-0",h,r?i:a),style:{...l,...r&&d},onClick:()=>f(e,t),children:e.label},e.value),[f,a,i,l,d,h]),p=(0,o.useCallback)((e,t,r)=>s?(0,u.jsx)("div",{onClick:()=>f(e,t),className:"flex-shrink-0",children:s(e,t,r)},e.value):m(e,t,r),[s,f,m]),y=(0,o.useMemo)(()=>e.find(e=>e.value===t),[e,t]);return(0,u.jsxs)("div",{className:(0,c.default)("w-full relative overflow-x-hidden"),children:[(0,u.jsx)("div",{className:(0,c.default)("w-full flex items-center justify-between",n),children:Array.isArray(e)&&e.map((e,r)=>p(e,r,t===e.value))}),y?.children&&y?.children]})},exports.Tabs=({tabs:e,activeValue:t,onTabClick:r,className:n="",scrollDelay:s=50,disableAutoScroll:a=!1,renderTab:i,tabClassName:l="",activeTabClassName:d="",tabStyle:h,activeTabStyle:f,commonTabClassName:m="",tabItemOutClassName:p=""})=>{const y=(0,o.useRef)(null),v=(0,o.useRef)([]),g=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),x=(0,o.useCallback)(e=>{if(!a)try{const t=y.current,r=v.current[e];if(!t||!r)return;const n=t.getBoundingClientRect(),s=r.getBoundingClientRect();if(s.left>=n.left&&s.right<=n.right){const e=n.left+n.width/2,t=s.left+s.width/2;if(Math.abs(e-t)<=n.width/4)return}const a=s.width,i=n.width;if(g){const e=s.left-n.left+t.scrollLeft-(i-a)/2,r=-(t.scrollWidth-i),l=Math.max(r,Math.min(0,e));t.scrollTo({left:l,behavior:"smooth"})}else{const e=s.left-n.left+t.scrollLeft-(i-a)/2;t.scrollTo({left:Math.max(0,e),behavior:"smooth"})}}catch(t){}},[a,e.length,g]);(0,o.useEffect)(()=>{v.current=v.current.slice(0,e.length)},[e.length]);const w=(0,o.useMemo)(()=>e.findIndex(e=>e.value===t),[e,t]);(0,o.useEffect)(()=>{if(!e.length||a||-1===w)return;const t=setTimeout(()=>x(w),s);return()=>clearTimeout(t)},[w,x,s,a]);const b=(0,o.useCallback)((e,n)=>{e?.disabled||e?.value===t||(r?.(e.value,n),x(n))},[r,x]),M=(0,o.useCallback)((e,t,r)=>(0,u.jsx)("div",{ref:e=>{v.current[t]=e},className:(0,c.default)("flex-shrink-0",m,r?d:l),style:{...h,...r&&f},onClick:()=>b(e,t),children:e.label},e.label),[b,l,d,h,f]),N=(0,o.useCallback)((e,t,r)=>i?(0,u.jsx)("div",{ref:e=>{v.current[t]=e},className:"flex-shrink-0",onClick:()=>b(e,t),children:i(e,t,r)},e.value):M(e,t,r),[i,b,M]);return(0,u.jsx)("div",{className:(0,c.default)("flex items-center relative w-full h-full overflow-hidden",n),children:(0,u.jsx)("div",{ref:y,className:"scrollbar-hide scrollbar-none h-full flex-1 flex-shrink-0 overflow-x-auto overflow-y-hidden scroll-smooth",children:(0,u.jsx)("div",{className:(0,c.default)("h-full min-w-max flex items-center",p),children:Array.isArray(e)&&e?.map((e,r)=>N(e,r,t===e.value))})})})},exports.VapPlayer=({className:e,style:t,visible:r=!0,keepAlive:n=!1,...s})=>{const{containerRef:a,isReady:i,play:l,reset:c}=A(s);return(0,o.useEffect)(()=>{n&&(r&&i?l():!r&&i&&c())},[r,i,n,l,c]),(0,u.jsx)("div",{ref:a,className:e,style:{...t,display:n&&!r?"none":void 0}})},exports.audioManager=f,exports.checkVersion=(e,t)=>{try{if(!e||!t)return!1;const r=e.split(".").map(e=>Number(e)),n=t.split(".").map(e=>Number(e));if(r.some(e=>isNaN(e))||n.some(e=>isNaN(e)))return!1;const s=Math.max(r.length,n.length);for(let e=0;e<s;e++){const t=r[e]||0,s=n[e]||0;if(t>s)return!0;if(t<s)return!1}return!0}catch{return!1}},exports.formatLocaleDate=(e,t="yyyy/MM/dd hh:mm:ss",r,n="LOCALE")=>{if(!e)return"";let s;s="number"==typeof e?new Date(e<1e10?1e3*e:e):e;const a=((e,t)=>{if(!e)return e;let r=e;if((e=>!y.includes(e.toLowerCase()))(t)){r=r.replace(/yyyy/g,O),r=r.replace(/MM/g,P),r=r.replace(/dd/g,D);const t=e.startsWith("yyyy"),n=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){r=r.replace(O+"/",""),r=r.replace("/"+O,""),r=r.replace(O,""),r=r.replace(P,"__SWAP_MM__"),r=r.replace(D,P),r=r.replace("__SWAP_MM__",D);const e=r.match(/(\s+[hHmMsS:.]+.*)$/);if(e){const t=e[1];r=r.replace(t,"")+"/yyyy"+t}else r+="/yyyy"}else n?(r=r.replace(P,"__SWAP_MM__"),r=r.replace(D,P),r=r.replace("__SWAP_MM__",D),r=r.replace(O,"yyyy")):(r=r.replace(P,"__SWAP_MM__"),r=r.replace(D,P),r=r.replace("__SWAP_MM__",D));r=r.replace(/__MM__/g,"MM"),r=r.replace(/__DD__/g,"dd"),r=r.replace(/__YYYY__/g,"yyyy")}return r=(e=>v.includes(e.toLowerCase()))(t)?r.replace(/:/g,"."):r,r})(t,window?.localStorage?.getItem(n)||r||"en");return((e,t="yyyy.MM.dd")=>{const r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(const n in r)if(new RegExp("("+n+")").test(t)){const e=1===RegExp.$1.length?String(r[n]):String(r[n]).padStart(2,"0");t=t.replace(RegExp.$1,e)}return"undefined"!=typeof document&&"rtl"===document.documentElement.dir?`‪${t}‬`:t})(s,a)},exports.getPx=e=>window.innerWidth/750*e,exports.getUrlParam=function(e){try{return new URLSearchParams(window.location.search).get(e)}catch{return null}},exports.getVw=L,exports.isIOS=function(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(window.navigator.userAgent)||/iPhone|iPod/.test(window.navigator.userAgent)},exports.navigate=I,exports.playSound=(e,t=1,r)=>f.play(e,t,r),exports.useAudio=(e={})=>{const{volume:t=1,preloadUrls:r=[],clearOnUnmount:n=!1}=e,[s,a]=(0,o.useState)(!1),i=(0,o.useRef)(!0);return(0,o.useEffect)(()=>{if(0===r.length)return;let e=!1;return(async()=>{a(!0);try{await f.preloadAll(r)}catch(t){}finally{e||a(!1)}})(),()=>{e=!0}},[r]),(0,o.useEffect)(()=>()=>{i.current=!1,n&&f.clear()},[n]),{play:(0,o.useCallback)(async(e,r,n)=>{i.current&&await f.play(e,r??t,n)},[t]),preload:(0,o.useCallback)(async e=>{await f.preload(e)},[]),preloadAll:(0,o.useCallback)(async e=>{a(!0);try{await f.preloadAll(e)}finally{a(!1)}},[]),isCached:(0,o.useCallback)(e=>f.isCached(e),[]),stopAll:(0,o.useCallback)(()=>{f.stopAll()},[]),clear:(0,o.useCallback)(()=>{f.clear()},[]),isLoading:s}},exports.useBoolean=b,exports.useDebounce=function(e,t){const r=(0,o.useRef)(null),n=(0,o.useRef)(e);return n.current=e,(0,o.useEffect)(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),(0,o.useCallback)((...e)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...e),r.current=null},t)},[t])},exports.useHashLocation=()=>{const[e,t]=(0,o.useState)(H());return(0,o.useEffect)(()=>{const e=()=>t(H());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,I]},exports.useLatest=M,exports.useThrottle=E,exports.useVap=A;
1
+ var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,i=(e,t)=>function(){return t||(0,e[n(e)[0]])((t={exports:{}}).exports,t),t.exports},l=(i,l,c)=>(c=null!=i?e(s(i)):{},((e,s,i,l)=>{if(s&&"object"==typeof s||"function"==typeof s)for(var c,o=n(s),u=0,d=o.length;u<d;u++)c=o[u],a.call(e,c)||void 0===c||t(e,c,{get:(e=>s[e]).bind(null,c),enumerable:!(l=r(s,c))||l.enumerable});return e})(!l&&i&&i.__esModule?c:t(c,"default",{value:i,enumerable:!0}),i));let c=require("react");c=l(c);let o=require("clsx");o=l(o);let u=require("react/jsx-runtime"),d=require("dayjs");d=l(d);let h=require("video-animation-player");h=l(h);const f=new class{constructor(e=""){this.audioCache=new Map,this.loadingPromises=new Map,this.assetOrigin=e}setAssetOrigin(e){this.assetOrigin=e}preload(e){if(this.audioCache.has(e))return Promise.resolve();if(this.loadingPromises.has(e))return this.loadingPromises.get(e);const t=new Promise((t,r)=>{const n=e.startsWith("http")?e:`${this.assetOrigin}${e}`,s=new Audio(n);s.preload="auto";const a=()=>{this.audioCache.set(e,s),l(),t()},i=e=>{l(),r(e)},l=()=>{s.removeEventListener("canplaythrough",a),s.removeEventListener("error",i),this.loadingPromises.delete(e)};s.addEventListener("canplaythrough",a),s.addEventListener("error",i),s.load()});return this.loadingPromises.set(e,t),t}async preloadAll(e){await Promise.all(e.map(e=>this.preload(e)))}async play(e,t=1,r){try{this.audioCache.has(e)||await this.preload(e);const n=this.audioCache.get(e);if(!n)return;const s=n.cloneNode(!0);s.volume=Math.max(0,Math.min(1,t));const a=()=>{s.removeEventListener("ended",i),s.removeEventListener("error",l),s.remove()},i=()=>{r?.onEnded?.(),a()},l=e=>{r?.onError?.(new Error(e.message||"音频播放失败")),a()};s.addEventListener("ended",i),s.addEventListener("error",l),await s.play()}catch(n){r?.onError?.(n)}}stopAll(){this.audioCache.forEach(e=>{e.pause(),e.currentTime=0})}clear(){this.audioCache.forEach(e=>{e.src="",e.load()}),this.audioCache.clear(),this.loadingPromises.clear()}isCached(e){return this.audioCache.has(e)}getCacheSize(){return this.audioCache.size}};var m=c.default.forwardRef(({list:e=[],intervalTime:t=1600,className:r="",renderItem:n,tabClassName:s="",lines:a=2,lineHeight:i=25,tabClassNameStyle:l={},duration:d=8},h)=>{const[f,m]=(0,c.useState)([]),p=(0,c.useRef)(1),y=(0,c.useRef)(0),v=(0,c.useRef)(null),g=(0,c.useRef)(e),x=(0,c.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,c.useEffect)(()=>{g.current=e,y.current=0},[e]);const w=(0,c.useCallback)(()=>{m(e=>e.slice(1))},[]),b=(0,c.useCallback)(e=>(e-1)*i,[i]),C=(0,c.useCallback)(()=>{const e=g.current;if(!e.length)return;const t=y.current,r=p.current;y.current=(y.current+1)%e.length,p.current=p.current%a+1;const n=e[t];if(!n)return;const s={...n,line:r,id:n?.id||String(Date.now()+Math.random())};m(e=>[...e,s])},[a]);return(0,c.useImperativeHandle)(h,()=>({showNextBullet:C})),(0,c.useEffect)(()=>{v.current=setInterval(()=>{C()},t);const e=()=>{window.document.hidden?(v.current&&(clearInterval(v.current),v.current=null),m([])):(m([]),C(),v.current&&clearInterval(v.current),v.current=setInterval(()=>{C()},t))};return window.document.addEventListener("visibilitychange",e),()=>{v.current&&clearInterval(v.current),window.document.removeEventListener("visibilitychange",e)}},[t,C]),f.length?(0,u.jsx)("div",{className:(0,o.default)("w-full relative",r),style:{"--barrage-duration":`${d}s`},children:Array.isArray(f)&&f.map((e,t)=>(0,u.jsx)("div",{className:(0,o.default)(s,"absolute z-3 w-fit h-fit rounded-50 flex items-center justify-center text-24 text-#fff",{"bullet-item-rtl":x,"bullet-item":!x}),"data-line":e.line,style:{top:e.line?`${b(e.line)}px`:void 0,...l},onAnimationEnd:w,children:n(e,t)},e?.id||`barrage-item-${t}`))}):null});m.displayName="Barrage";var p=m;const y=["tw","my","ph","en"],v=["tr"],g=["0","0"];var x=({time:e,background:t})=>{const r=(0,c.useMemo)(()=>e?(e+"").padStart(2,"0").split(""):g,[e]);return(0,u.jsx)("div",{className:`fcc ${t}`,dir:"ltr",children:Array(2).fill(0).map((e,t)=>(0,u.jsx)("div",{children:r[t]},t))})},w=l(i({"node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/duration.js":(e,t)=>{var r,n;r=e,n=function(){var e,t,r=1e3,n=6e4,s=36e5,a=864e5,i=/\[([^\]]+)]|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,l=31536e6,c=2628e6,o=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:l,months:c,days:a,hours:s,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof g},h=function(e,t,r){return new g(e,r,t.$l)},f=function(e){return t.p(e)+"s"},m=function(e){return e<0},p=function(e){return m(e)?Math.ceil(e):Math.floor(e)},y=function(e){return Math.abs(e)},v=function(e,t){return e?m(e)?{negative:!0,format:""+y(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},g=function(){function m(e,t,r){var n=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){n.$d[f(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var s=e.match(o);if(s){var a=s.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var y=m.prototype;return y.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,r){return t+(e.$d[r]||0)*u[r]},0)},y.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=p(e/l),e%=l,this.$d.months=p(e/c),e%=c,this.$d.days=p(e/a),e%=a,this.$d.hours=p(e/s),e%=s,this.$d.minutes=p(e/n),e%=n,this.$d.seconds=p(e/r),e%=r,this.$d.milliseconds=e},y.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=v(r,"D"),s=v(this.$d.hours,"H"),a=v(this.$d.minutes,"M"),i=this.$d.seconds||0;this.$d.milliseconds&&(i+=this.$d.milliseconds/1e3,i=Math.round(1e3*i)/1e3);var l=v(i,"S"),c=e.negative||t.negative||n.negative||s.negative||a.negative||l.negative,o=s.format||a.format||l.format?"T":"",u=(c?"-":"")+"P"+e.format+t.format+n.format+o+s.format+a.format+l.format;return"P"===u||"-P"===u?"P0D":u},y.toJSON=function(){return this.toISOString()},y.format=function(e){var r=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return r.replace(i,function(e,t){return t||String(n[e])})},y.as=function(e){return this.$ms/u[f(e)]},y.get=function(e){var t=this.$ms,r=f(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?p(t/u[r]):this.$d[r],t||0},y.add=function(e,t,r){var n;return n=t?e*u[f(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+n*(r?-1:1),this)},y.subtract=function(e,t){return this.add(e,t,!0)},y.locale=function(e){var t=this.clone();return t.$l=e,t},y.clone=function(){return h(this.$ms,this)},y.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},m}(),x=function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")};return function(r,n,s){e=s,t=s().$utils(),s.duration=function(e,t){return h(e,{$l:s.locale()},t)},s.isDuration=d;var a=n.prototype.add,i=n.prototype.subtract;n.prototype.add=function(e,t){return d(e)?x(this,e,1):a.bind(this)(e,t)},n.prototype.subtract=function(e,t){return d(e)?x(this,e,-1):i.bind(this)(e,t)}}},"object"==typeof e&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(r="undefined"!=typeof globalThis?globalThis:r||self).dayjs_plugin_duration=n()}})(),1);d.default.extend(w.default);const b=(e=!1)=>{const[t,r]=(0,c.useState)(e);return[t,(0,c.useMemo)(()=>({setTrue:()=>r(!0),setFalse:()=>r(!1),toggle:()=>r(e=>!e),set:e=>r(e)}),[])]},C=e=>{const t=(0,c.useRef)(e);return t.current=e,t};var M=({height:e,children:t,handleMore:r,hasMore:n=!0,className:s,style:a})=>{const[i,{setTrue:l,setFalse:o}]=b(!1),d=c.default.useRef(null),h=C(n),f=C(i),m=C(r),p=(0,c.useRef)(void 0),y=(0,c.useCallback)(async()=>{if(h.current&&(()=>{if(!d.current)return!1;const{scrollTop:e,scrollHeight:t,clientHeight:r}=d.current;return t-r-e<10})()&&!f.current){l(),p.current&&clearTimeout(p.current);try{await(m.current?.())}finally{p.current=setTimeout(()=>{o()},500)}}},[h,f,m,l,o]);return(0,c.useEffect)(()=>(y?.(),()=>{p.current&&clearTimeout(p.current)}),[y]),(0,u.jsx)("div",{className:`infinite-container ${s}`,ref:d,style:{maxHeight:e?e/7.5+"vw":void 0,height:"100%",overflowY:"auto",...a},onScroll:y,children:t})},N=({onRetry:e})=>(0,u.jsx)("div",{className:"minglex-the-list-error",children:(0,u.jsxs)("div",{className:"minglex-the-list-error__content",children:[(0,u.jsx)("div",{className:"minglex-the-list-error__text",children:"error"}),(0,u.jsx)("button",{className:"minglex-the-list-error__retry-btn",onClick:e,children:"retry"})]})}),k=()=>(0,u.jsx)("div",{className:"minglex-the-list-load-more",children:(0,u.jsx)("div",{className:"minglex-the-list-load-more__text",children:"loadMore..."})}),_=()=>(0,u.jsx)("div",{className:"minglex-the-list-loading",children:(0,u.jsx)("div",{className:"minglex-the-list-loading__text",children:"loading..."})}),j=(0,c.forwardRef)(({url:e,params:t={},method:r="get",pageSize:n=10,dataKey:s="items",className:a,renderItem:i,onDataLoaded:l,finishRender:d,cursorKey:h,hasNextKey:f="has_next",myRankKey:m="my_rank",noDataRender:p,children:y,request:v,enablePadding:g=!1,useSimpleRender:x=!1,paddingThreshold:w,paddingPlaceholder:b={}},C)=>{const[j,E]=(0,c.useState)([]),[$,S]=(0,c.useState)(!1),[R,T]=(0,c.useState)(!0),[L,A]=(0,c.useState)(null),[P,D]=(0,c.useState)(!1),O=(0,c.useRef)(1),I=(0,c.useRef)(void 0),H=(0,c.useRef)(!1),W=(0,c.useCallback)(()=>{const e={current_page:O.current,page_size:n,page:O.current,page_num:O.current,limit:n,offset:(O.current-1)*n,...t};return h&&void 0!==I.current&&(e[h]=I.current),Object.entries(e).reduce((e,[t,r])=>(null!=r&&(e[t]=r),e),{})},[n,t,h]),Y=(0,c.useCallback)(t=>"get"===r.toLowerCase()?{url:e,method:r,params:t}:{url:e,method:r,data:t},[e,r]),F=(0,c.useCallback)(e=>{const t=e?.data[f],r=e?.data[m];let a=e?.data[s]||e?.data?.records||e?.data?.ranks||[];const i="boolean"==typeof t&&t;if(g&&!i){const e=a.length,t=Math.min(w??n,n);if(e<t){const r=Array(t-e).fill(b);a=[...a,...r]}}if(h){const t=e?.data?.[h];null!=t&&(I.current=t)}return{newItems:a,hasMoreData:i,myRank:r||null}},[s,h,f,m,g,w,n,b]),z=(0,c.useCallback)((e,t)=>{if(t)return E(e),e;{const t=[...j,...e];return E(t),t}},[j]),B=(0,c.useCallback)(async()=>{const e=v||window?.__ZPD_REQUEST__?.request;if(!e)throw new Error("List: 请提供 request 函数\n方式1: 通过 props 传入 <List request={myRequest} ... />\n方式2: 在项目入口配置 window.__ZPD_REQUEST__ = { request: myRequest }");return await e(Y(W()))},[W,Y,v]),q=(0,c.useCallback)(async(e=!1)=>{if((!$||e)&&(!P||e))try{S(!0),A(null),e&&(O.current=1);const t=await B(),{newItems:r,hasMoreData:n,myRank:s}=F(t);O.current=O.current+1,D(!n);const a=z(r,e);l?.(t.data,a,s)}catch(t){A(t)}finally{S(!1),T(!1)}},[$,P,B,F,z,l]),U=(0,c.useCallback)(async()=>{$||P||await q(!1)},[q,$,P]),Z=(0,c.useCallback)(async()=>{D(!1),A(null),O.current=1,I.current=void 0,await q(!0)},[q]),V=(0,c.useCallback)(()=>{E([]),D(!0),O.current=1,I.current=void 0,A(null),H.current=!1},[]),X=(0,c.useCallback)(()=>j,[j]);if((0,c.useImperativeHandle)(C,()=>({refresh:Z,clear:V,getList:X}),[Z,V,X]),(0,c.useEffect)(()=>{H.current||(H.current=!0,q(!0))},[q,H]),R)return(0,u.jsx)(_,{});if(L&&Array.isArray(j)&&0===j?.length)return(0,u.jsx)(N,{onRetry:Z});if(Array.isArray(j)&&0===j?.length)return p?.()||null;const K=()=>(0,u.jsxs)(u.Fragment,{children:[j.map((e,t)=>(0,u.jsx)("div",{className:"minglex-the-list__item",children:i(e,t)},`simple-list-item-${t}`)),$&&!P&&(0,u.jsx)(k,{}),P&&d?.(),y&&y]});return x?(0,u.jsx)("div",{className:(0,o.default)("minglex-the-list-simple-render",a),children:K()}):(0,u.jsx)("div",{className:(0,o.default)("minglex-the-list",a),children:(0,u.jsx)(M,{handleMore:U,hasMore:!P,className:"minglex-the-list__scroll",children:K()})})});j.displayName="List";var E=j;function $(e,t){const r=(0,c.useRef)(!1),n=(0,c.useRef)(e);return n.current=e,(0,c.useCallback)((...e)=>{r.current||(n.current(...e),r.current=!0,setTimeout(()=>{r.current=!1},t))},[t])}var S=(0,c.forwardRef)(({topRender:e,topCount:t=3,renderItem:r,onDataLoaded:n,className:s="",listClassName:a="",listStyle:i={},classNameStyle:l={},myRankRender:d,...h},f)=>{const[m,p]=(0,c.useState)([]),[y,v]=(0,c.useState)([]),[g,x]=(0,c.useState)(null),w=(0,c.useRef)(null),b=(0,c.useRef)(!1),C=(0,c.useMemo)(()=>Math.max(0,t),[t]),M=(0,c.useMemo)(()=>C>0&&!!e,[C,e]),N=(0,c.useCallback)((e,t,r)=>{v(t),x(r),M&&!b.current&&t.length>0&&(p(t.slice(0,C)),b.current=!0),n?.(e,t,r)},[C,M,n]),k=(0,c.useCallback)((e,t)=>M&&t<C?null:r(e,t),[C,M,r]),_=(0,c.useCallback)(()=>{p([]),v([]),x(null),b.current=!1},[]),j=(0,c.useCallback)(()=>{w.current?.refresh(),_()},[_]),$=(0,c.useCallback)(()=>{w.current?.clear(),_()},[_]),S=(0,c.useCallback)(()=>y,[y]),R=(0,c.useCallback)(()=>y.slice(C),[y,C]),T=(0,c.useCallback)(()=>m,[m]);(0,c.useImperativeHandle)(f,()=>({refresh:j,clear:$,getList:S,getRestList:R,getTopList:T}),[j,$,S,R,T]);const L=(0,c.useMemo)(()=>M?e?.(m):null,[M,e,m]),A=(0,c.useMemo)(()=>d&&g?d(g):null,[d,g]);return(0,u.jsxs)("div",{className:(0,o.default)("w-full",s),style:l,children:[L,(0,u.jsx)("div",{className:(0,o.default)("w-full",a),style:i,children:(0,u.jsx)(E,{ref:w,...h,renderItem:k,onDataLoaded:N})}),A]})});S.displayName="RankList";var R=S;const T=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"};var L=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(r){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const A=e=>{const t=(0,c.useRef)(null),r=(0,c.useRef)(null),[n,s]=(0,c.useState)(!1),a=(0,c.useRef)(!1),i=(0,c.useRef)(e);(0,c.useEffect)(()=>{i.current=e});const l=(0,c.useCallback)(async e=>{const n=t.current;if(!n||a.current)return!1;a.current=!0;try{r.current&&(L(r.current,n),r.current=null,s(!1));const{autoScale:t=!0,onEnded:a,...l}=i.current;let c=l;if(t){const t=await(e=>new Promise(t=>{const r=e.getBoundingClientRect();r.width>0&&r.height>0?t(!0):requestAnimationFrame(()=>{const r=e.getBoundingClientRect();r.width>0&&r.height>0?t(!0):requestAnimationFrame(()=>{const r=e.getBoundingClientRect();t(r.width>0&&r.height>0)})})}))(n);if(e?.())return!1;t&&(c=((e,t)=>{const r=e.getBoundingClientRect(),n=r.width,s=r.height;if(0===n||0===s)return t;const a=2*n,i=2*s;return{...t,width:a,height:i}})(n,l))}return r.current=await((e,t,r)=>new Promise(n=>{e.innerHTML="";const s=new h.default({container:e,src:t.src,width:t.width||250,height:t.height||200,config:t.config,loop:t.loop??!0,mute:t.mute??!0,autoplay:t.autoplay??!0,beginPoint:0,accurate:!0});r&&s.on("ended",r),s.on("error",e=>{setTimeout(()=>s.play?.(),100)}),(e=>{requestAnimationFrame(()=>{const t=e.querySelector("canvas");t&&(t.style.width="100%",t.style.height="100%",t.style.display="block")})})(e);let a=!1;const i=()=>{a||(a=!0,n(s))};s.on("canplay",i),setTimeout(()=>{a||i()},2e3)}))(n,c,a),e?.()?(L(r.current,n),r.current=null,!1):(s(!0),!0)}catch(l){return!1}finally{a.current=!1}},[]);(0,c.useEffect)(()=>{if(a.current=!1,!t.current)return;const e=t.current;let n=!1;return l(()=>n),()=>{n=!0,a.current=!1,r.current&&(L(r.current,e),r.current=null),s(!1)}},[e.src]);const o=(0,c.useCallback)(()=>{try{r.current?.play?.()}catch(e){}},[]),u=(0,c.useCallback)(()=>{try{r.current?.pause?.()}catch(e){}},[]),d=(0,c.useCallback)(()=>{try{r.current?.pause?.(),r.current?.setTime?.(0)}catch(e){}},[]),f=(0,c.useCallback)(()=>{try{r.current?.pause?.(),r.current?.setTime?.(0),setTimeout(()=>r.current?.play?.(),0)}catch(e){}},[]),m=(0,c.useCallback)(async()=>await l(),[l]),p=(0,c.useCallback)(()=>(e=>{if(!e)return!1;const t=e.querySelector("canvas");return null!==t&&null!==t.parentElement})(t.current),[]);return{containerRef:t,vapInstance:r.current,isReady:n,play:o,playFromStart:f,pause:u,reset:d,reinitialize:m,checkCanvasValid:p}};var P="__MM__",D="__DD__",O="__YYYY__";const I=e=>{if(e.includes("?"))window.location.hash=e;else{const t=(e=>{const t=e.indexOf("?");return-1===t?"":e.slice(t)})(window.location.hash);window.location.hash=`${e}${t}`}};var H=()=>{const e=window.location.hash.replace(/^#/,""),t=e.indexOf("?");return-1===t?e:e.slice(0,t)||"/"};exports.AudioEffect=({audioUrl:e,volume:t=1,autoPlay:r=!0,onEnded:n,onError:s,onPlay:a})=>{const i=(0,c.useRef)("");return(0,c.useEffect)(()=>{r&&i.current!==e&&(i.current=e,(async()=>{try{a?.(),await f.play(e,t,{onEnded:n,onError:s})}catch(r){s?.(r)}})())},[e,t,r,n,s,a]),null},exports.Barrage=p,exports.CountDown=({targetTime:e,serverTime:t,refreshData:r,format:n="HH:mm:ss",className:s,backgroundClassName:a="",partClassName:i="",escapedTextClassName:l="",onEnd:h})=>{const[f,m]=(0,c.useState)(0),[p,y]=(0,c.useState)(0),[v,g]=(0,c.useState)(0),[w,b]=(0,c.useState)(0),[C,M]=(0,c.useState)(!1),N=(0,c.useRef)(null),k=(0,c.useRef)(null),_=(0,c.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),j=()=>{if(k.current){const{serverTime:e,localTime:t}=k.current;return e+(Date.now()-t)}return(0,d.default)().valueOf()},E=e=>{if(null==e||""===e||"0"===e)return 0;const t="string"==typeof e?parseInt(e,10):e;return isNaN(t)||t<=0||t<=j()?0:t},$=["dd","HH","mm","ss","d","H","m","s"],S=(e,t)=>{if(!e.startsWith(t))return null;const r="["===t?"]":t,n=e.indexOf(r,1);return-1===n?null:{content:e.slice(1,n),length:n+1}},R=e=>{const t=e.startsWith("d")?"day":e.startsWith("H")?"hour":e.startsWith("m")?"minute":"second";return{type:t,value:"day"===t?f:"hour"===t?p:"minute"===t?v:w}},T=(e,t,r)=>{const n=e[t+r.length];return!(n&&/[a-zA-Z]/.test(n))},L=e=>{for(let t=1;t<e.length;t++){const r=e[t];if("["===r||"'"===r)return t;for(const n of $)if(e.slice(t).startsWith(n)){const r=e[t-1],s=e[t+n.length];if(!(/[a-zA-Z]/.test(r)||s&&/[a-zA-Z]/.test(s)))return t}}return e.length},A=e=>{for(const t of $)if(e.startsWith(t)&&T(e,0,t)){const{type:e,value:r}=R(t);return{part:{type:e,value:r,format:t},length:t.length}}return null},P=()=>{N.current&&(clearInterval(N.current),N.current=void 0)},D=()=>{const{day:t,hour:n,minute:s,seconds:a}=(()=>{const t=E(e);if(0===t)return{day:0,hour:0,minute:0,seconds:0};const r=t-j();if(r<=0)return{day:0,hour:0,minute:0,seconds:0};const n=d.default.duration(r);return{day:Math.floor(n.asDays()),hour:n.hours(),minute:n.minutes(),seconds:n.seconds()}})();t+n+s+a>0?(m(t),y(n),g(s),b(a)):(m(0),y(0),g(0),b(0),P(),C||(M(!0),r?.(),h?.()))};return(0,c.useEffect)(()=>{if(t&&t>0)if(k.current){const{serverTime:e,localTime:r}=k.current,n=t-(e+(Date.now()-r));Math.abs(n)>500&&(k.current={serverTime:t,localTime:Date.now()})}else k.current={serverTime:t,localTime:Date.now()};else k.current=null},[t]),(0,c.useEffect)(()=>{const t=E(e);return M(!1),D(),t>0&&t>j()&&(N.current=setInterval(D,1e3)),()=>{P()}},[e]),(()=>{const e=(()=>{const e=[];let t=_?(e=>{let t=-1,r="",n=-1,s="";for(const c of["HH","H"]){for(let n=0;n<=e.length-c.length;n++)if(e.slice(n,n+c.length)===c){const s=n>0?e[n-1]:"",a=n+c.length<e.length?e[n+c.length]:"";if(!/[a-zA-Z]/.test(s)&&!/[a-zA-Z]/.test(a)){t=n,r=c;break}}if(-1!==t)break}for(const c of["ss","s"]){for(let t=0;t<=e.length-c.length;t++)if(e.slice(t,t+c.length)===c){const r=t>0?e[t-1]:"",a=t+c.length<e.length?e[t+c.length]:"";if(!/[a-zA-Z]/.test(r)&&!/[a-zA-Z]/.test(a)){n=t,s=c;break}}if(-1!==n)break}if(-1===t||-1===n)return e;const a=e.split(""),i=r.length,l=s.length;for(let c=0;c<Math.max(i,l);c++)c<i&&c<l&&([a[t+c],a[n+c]]=[a[n+c],a[t+c]]);return a.join("")})(n):n;for(;t.length>0;){let r=!1;const n=S(t,"[");if(n&&(e.push({type:"text",value:n.content,format:"",textClassName:l}),t=t.slice(n.length),r=!0),!r){const n=S(t,"'");n&&(e.push({type:"text",value:n.content,format:"",textClassName:l}),t=t.slice(n.length),r=!0)}if(!r){const n=A(t);n&&(e.push(n.part),t=t.slice(n.length),r=!0)}if(!r){const r=L(t),n=t.slice(0,r);n&&e.push({type:"text",value:n,format:"",textClassName:i}),t=t.slice(r)}}return e})();return(0,u.jsx)("div",{className:(0,o.default)(`fcc ${s}`),children:e.map((e,t)=>"text"===e.type?(0,u.jsx)("span",{className:(0,o.default)("mx-2 fcc whitespace-pre font-700",e.textClassName),children:e.value},t):(0,u.jsx)("div",{className:"fcc",children:(0,u.jsx)(x,{time:e.value,background:a??""})},t))})})()},exports.List=E,exports.MusicPlayer=({musicUrl:e,playIconClass:t,pauseIconClass:r,className:n,loop:s=!0,autoPlay:a=!0,animationClassName:i="animate-spin-slow"})=>{const[l,d]=(0,c.useState)(!1),h=(0,c.useRef)(null),f=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{const e=h.current;if(!e)return;const t=()=>d(!0),r=()=>d(!1);return e.addEventListener("play",t),e.addEventListener("pause",r),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",r)}},[]),(0,c.useEffect)(()=>{const e=h.current;if(!e)return;const t=!e.paused;e.pause(),e.currentTime=0,e.load(),f.current=!1,t&&a&&e.play().catch(e=>{})},[e,a]),(0,c.useEffect)(()=>{if(!a)return;const e=h.current;if(!e)return;const t=async()=>{try{return e.muted=!1,await e.play(),!0}catch{return!1}},r=()=>{e&&(e.muted=!1)},n=setTimeout(async()=>{if(f.current)return;if(f.current=!0,await t())return;if(await(async()=>{try{return e.muted=!0,await e.play(),!0}catch{return!1}})())return document.addEventListener("click",r,{once:!0}),document.addEventListener("touchstart",r,{once:!0}),void document.addEventListener("scroll",r,{once:!0});const n=async()=>{await t()};document.addEventListener("click",n,{once:!0}),document.addEventListener("touchstart",n,{once:!0})},100);return()=>{clearTimeout(n),document.removeEventListener("click",r),document.removeEventListener("touchstart",r),document.removeEventListener("scroll",r)}},[a]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:(0,o.default)(l?t:r,"transition-transform",l&&i?i:"",n),onClick:()=>{h.current&&(l?h.current.pause():h.current.play(),d(!l))}}),(0,u.jsx)("audio",{ref:h,src:e,loop:s})]})},exports.NavBar=({title:e,rightIcon:t="",leftIcon:r="",onRightClick:n,onLeftClick:s,type:a="close",className:i="",children:l,enableScrollBg:d=!1,scrollBgClassName:h="bg-black/60 backdrop-blur-sm",titleAlign:f="center",renderLeft:m,renderRight:p})=>{const[y,v]=(0,c.useState)(!1),g=(0,c.useRef)(null),x=(0,c.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,c.useEffect)(()=>{if(!d)return;const e=g.current;if(!e)return;const t=new IntersectionObserver(([e])=>{v(!e.isIntersecting)},{threshold:0,rootMargin:"0px"});return t.observe(e),()=>t.disconnect()},[d]);const w=$(()=>{s?.(),"close"!==a&&window.history.back()},400),b=$(()=>{n?.()},400),C=(0,c.useMemo)(()=>m?m():r?(0,u.jsx)("div",{className:(0,o.default)(r,x&&"rotate-180"),onClick:w}):null,[m,r,x,w]),M=(0,c.useMemo)(()=>p?p():(0,u.jsx)("div",{className:(0,o.default)(t),style:{visibility:t?"visible":"hidden"},onClick:b}),[p,t,b]),N=(0,c.useMemo)(()=>e?(0,u.jsx)("span",{className:"center"===f?"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":"",children:e}):null,[e,f]);return(0,u.jsxs)(u.Fragment,{children:[d&&(0,u.jsx)("div",{ref:g,className:"pointer-events-none absolute left-0 top-0 h-1 w-full"}),(0,u.jsx)("div",{className:(0,o.default)(i,"fixed left-0 top-0 z-99 h-fit w-full px-24 pt-90 text-#fff text-34 font-bold",d&&"transition-all duration-300",d&&y&&h),children:(0,u.jsxs)("div",{className:"w-full flex items-center justify-between relative",children:["left"===f?(0,u.jsxs)("div",{className:"flex items-center",children:[C,N,l]}):(0,u.jsxs)(u.Fragment,{children:[C,N,l]}),M]})})]})},exports.NoticeBar=({className:e,style:t,children:r,text:n,textClassName:s,pixelsPerSecond:a=20,speed:i,pauseOnHover:l=!1,gap:d,noOverflowClassName:h=""})=>{const f=(0,c.useRef)(null),m=(0,c.useRef)(null),p=(0,c.useRef)(null),[y,v]=(0,c.useState)(i||8),[g,x]=(0,c.useState)(!1),w=(0,c.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,c.useEffect)(()=>{let e=null;const t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{if(!f.current||!p.current)return;const e=f.current,t=p.current,r=e.scrollWidth>t.clientWidth;x(r),r&&v(void 0===i?(e.scrollWidth+t.clientWidth)/a:i)},100)};t();const r=new ResizeObserver(t);return f.current&&r.observe(f.current),p.current&&r.observe(p.current),()=>{e&&clearTimeout(e),r.disconnect()}},[r,n,a,i]);const b=(0,c.useMemo)(()=>r||(n&&Array.isArray(n)&&n?.length>0?n.map((e,t)=>(0,u.jsx)("span",{className:s,children:e},t)):n&&"string"==typeof n?(0,u.jsx)("span",{className:s,children:n}):null),[r,n,s]),C=(0,c.useCallback)(e=>void 0!==d?(0,u.jsxs)(c.default.Fragment,{children:[b,(0,u.jsx)("span",{className:(0,o.default)("inline-block",d)})]},e):(0,u.jsxs)(c.default.Fragment,{children:[(0,u.jsx)("span",{style:{visibility:"visible"},children:b}),(0,u.jsx)("span",{style:{visibility:"hidden"},children:b})]},e),[b,d]),M=(0,c.useMemo)(()=>(0,u.jsx)("div",{ref:f,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap"},children:b}),[b]);return g?(0,u.jsxs)("div",{ref:p,className:(0,o.default)("infinite-scroll",e,{"pause-on-hover":l}),style:{...t,"--t":`${y}s`},children:[(0,u.jsx)("div",{ref:m,className:(0,o.default)("infinite-scroll__track",{"infinite-scroll__track--animate":!w,"infinite-scroll__track--animate-rtl":w}),style:{animationDuration:`${y}s`},children:C("track-1")}),(0,u.jsx)("div",{className:(0,o.default)("infinite-scroll__track",{"infinite-scroll__track--animate":!w,"infinite-scroll__track--animate-rtl":w}),"aria-hidden":"true",style:{animationDuration:`${y}s`},children:C("track-2")})]}):(0,u.jsxs)("div",{ref:p,className:(0,o.default)("infinite-scroll",e),style:t,children:[M,(0,u.jsx)("div",{className:(0,o.default)("w-full text-center text-nowrap",h),children:b})]})},exports.Progress=({className:e="",value:t,showPercent:r=!1,style:n,onChange:s,disabled:a=!1,draggable:i=!0,innerImageClassName:l="",outerImageClassName:d="",innerClassName:h="",pointClassName:f="",pointOffsetPercent:m,maxCount:p,decreaseButtonClassName:y,increaseButtonClassName:v,onDecrease:g,onIncrease:x,buttonSpacing:w="mx-10",step:b=1,minValue:C,children:M})=>{const N=(0,c.useRef)(null),[k,_]=(0,c.useState)(!1),j="rtl"===document.dir,E=g||(()=>{if(a||!s)return;const e=void 0!==C?C:p?1:0,r=Math.max(e,t-b);s?.(r)}),$=x||(()=>{if(a||!s)return;const e=p||100,r=Math.min(e,t+b);s?.(r)}),S=()=>p?Math.min(100,Math.floor(t/p*100)):Math.min(100,Math.max(0,t)),R=e=>{if(!N.current)return t;const r=N.current.getBoundingClientRect(),n=j?Math.max(0,Math.min(100,(r.right-e)/r.width*100)):Math.max(0,Math.min(100,(e-r.left)/r.width*100));return p?Math.max(1,Math.min(p,Math.round(n/100*p))):Math.round(n)};return(0,c.useEffect)(()=>{if(!i)return;const e=N.current;if(!e)return;const t=e=>{if(a)return;_(!0);const t=e.touches[0],r=R(t.clientX);s?.(r)},r=e=>{if(a||!k)return;e.preventDefault();const t=e.touches[0],r=R(t.clientX);s?.(r)},n=()=>{_(!1)};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",r,{passive:!1}),e.addEventListener("touchend",n,{passive:!0}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",n)}},[a,k,s,i]),(0,c.useEffect)(()=>{if(k){const e=e=>{const t=R(e.clientX);s?.(t)},t=()=>{_(!1)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[k,s]),(0,u.jsxs)("div",{className:(0,o.default)("flex items-center flex-shrink-0",e),children:[y&&(0,u.jsx)("div",{className:(0,o.default)(y,w),onClick:E}),(0,u.jsx)("div",{ref:N,className:(0,o.default)({"cursor-not-allowed":a,"cursor-pointer":!a&&i,"cursor-default":!a&&!i,"w-fit":!0,"h-fit":!0}),style:{userSelect:"none",WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",...n},onMouseDown:e=>{if(a||!i)return;_(!0);const t=R(e.clientX);s?.(t)},onMouseMove:e=>{if(a||!k||!i)return;const t=R(e.clientX);s?.(t)},onMouseUp:()=>{_(!1)},children:(0,u.jsxs)("div",{className:(0,o.default)(d,"relative flex items-center overflow-hidden"),children:[(0,u.jsx)("div",{className:(0,o.default)(h,"absolute top-50% overflow-hidden -translate-y-50%",j?"right-0":"left-0",f?"":"transition-all duration-300"),style:{width:`${S()}%`},children:l?(0,u.jsx)("div",{className:(0,o.default)(l)}):null}),f&&(0,u.jsx)("div",{className:(0,o.default)(f,"absolute top-50% -translate-y-50% rtl:translate-x-50% ltr:-translate-x-50%"),style:{[j?"right":"left"]:`${(e=>{if(!f)return 0;const t=m??5;return t+e*(100-2*t)/100})(S())}%`}}),r&&(0,u.jsx)("div",{className:(0,o.default)("absolute top-50% -translate-y-50%",j?"left-10":"right-10"),children:`${S()}%`}),M&&M]})}),v&&(0,u.jsx)("div",{className:(0,o.default)(v,w),onClick:$})]})},exports.RankList=R,exports.ShadowText=({children:e,className:t="",shadowColor:r="#FFEE7B",shadowOffset:n=2,useResponsive:s=!0})=>{const a=s?T(n):`${n}px`;return(0,u.jsx)("div",{className:(0,o.default)(t),style:{fontFamily:"SF Pro Display",textShadow:`-${a} ${a} 0 ${r}, ${a} ${a} 0 ${r}, ${a} -${a} 0 ${r}, -${a} -${a} 0 ${r}`},children:e})},exports.StrokeText=({text:e,strokeWidth:t=4,fontSize:r=30,stroke:n="#F57E34",className:s=""})=>(0,u.jsxs)("svg",{className:(0,o.default)("max-h-full max-w-full text-center",s),children:[(0,u.jsx)("text",{x:"50%",y:"50%",dominantBaseline:"middle",textAnchor:"middle",fontSize:T(r),fill:"none",stroke:n,strokeWidth:T(t),children:e}),(0,u.jsx)("text",{dominantBaseline:"middle",textAnchor:"middle",x:"50%",y:"50%",fontSize:T(r),fill:"#fff",children:e})]}),exports.TabList=({tabs:e,activeValue:t,onTabClick:r,className:n="",renderTab:s,tabClassName:a,activeTabClassName:i,tabStyle:l,activeTabStyle:d,commonTabClassName:h})=>{const f=(0,c.useCallback)((e,n)=>{e.disabled||e.value===t||r?.(e.value,n)},[r,t]),m=(0,c.useCallback)((e,t,r)=>(0,u.jsx)("div",{className:(0,o.default)("flex-shrink-0",h,r?i:a),style:{...l,...r&&d},onClick:()=>f(e,t),children:e.label},e.value),[f,a,i,l,d,h]),p=(0,c.useCallback)((e,t,r)=>s?(0,u.jsx)("div",{onClick:()=>f(e,t),className:"flex-shrink-0",children:s(e,t,r)},e.value):m(e,t,r),[s,f,m]),y=(0,c.useMemo)(()=>e.find(e=>e.value===t),[e,t]);return(0,u.jsxs)("div",{className:(0,o.default)("w-full relative overflow-x-hidden"),children:[(0,u.jsx)("div",{className:(0,o.default)("w-full flex items-center justify-between",n),children:Array.isArray(e)&&e.map((e,r)=>p(e,r,t===e.value))}),y?.children&&y?.children]})},exports.Tabs=({tabs:e,activeValue:t,onTabClick:r,className:n="",scrollDelay:s=50,disableAutoScroll:a=!1,renderTab:i,tabClassName:l="",activeTabClassName:d="",tabStyle:h,activeTabStyle:f,commonTabClassName:m="",tabItemOutClassName:p=""})=>{const y=(0,c.useRef)(null),v=(0,c.useRef)([]),g=(0,c.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),x=(0,c.useCallback)(e=>{if(!a)try{const t=y.current,r=v.current[e];if(!t||!r)return;const n=t.getBoundingClientRect(),s=r.getBoundingClientRect();if(s.left>=n.left&&s.right<=n.right){const e=n.left+n.width/2,t=s.left+s.width/2;if(Math.abs(e-t)<=n.width/4)return}const a=s.width,i=n.width;if(g){const e=s.left-n.left+t.scrollLeft-(i-a)/2,r=-(t.scrollWidth-i),l=Math.max(r,Math.min(0,e));t.scrollTo({left:l,behavior:"smooth"})}else{const e=s.left-n.left+t.scrollLeft-(i-a)/2;t.scrollTo({left:Math.max(0,e),behavior:"smooth"})}}catch(t){}},[a,e.length,g]);(0,c.useEffect)(()=>{v.current=v.current.slice(0,e.length)},[e.length]);const w=(0,c.useMemo)(()=>e.findIndex(e=>e.value===t),[e,t]);(0,c.useEffect)(()=>{if(!e.length||a||-1===w)return;const t=setTimeout(()=>x(w),s);return()=>clearTimeout(t)},[w,x,s,a]);const b=(0,c.useCallback)((e,n)=>{e?.disabled||e?.value===t||(r?.(e.value,n),x(n))},[r,x]),C=(0,c.useCallback)((e,t,r)=>(0,u.jsx)("div",{ref:e=>{v.current[t]=e},className:(0,o.default)("flex-shrink-0",m,r?d:l),style:{...h,...r&&f},onClick:()=>b(e,t),children:e.label},e.label),[b,l,d,h,f]),M=(0,c.useCallback)((e,t,r)=>i?(0,u.jsx)("div",{ref:e=>{v.current[t]=e},className:"flex-shrink-0",onClick:()=>b(e,t),children:i(e,t,r)},e.value):C(e,t,r),[i,b,C]);return(0,u.jsx)("div",{className:(0,o.default)("flex items-center relative w-full h-full overflow-hidden",n),children:(0,u.jsx)("div",{ref:y,className:"scrollbar-hide scrollbar-none h-full flex-1 flex-shrink-0 overflow-x-auto overflow-y-hidden scroll-smooth",children:(0,u.jsx)("div",{className:(0,o.default)("h-full min-w-max flex items-center",p),children:Array.isArray(e)&&e?.map((e,r)=>M(e,r,t===e.value))})})})},exports.VapPlayer=({className:e="",style:t,visible:r=!0,keepAlive:n=!1,...s})=>{const{containerRef:a,isReady:i,playFromStart:l,reset:d,reinitialize:h,checkCanvasValid:f}=A((0,c.useMemo)(()=>n?{...s,autoplay:!1}:s,[n,s.src]));(0,c.useEffect)(()=>{n&&(r&&i?l():!r&&i&&d())},[r,i,n,l,d]);const m=(0,c.useCallback)(async()=>{"visible"===document.visibilityState&&(f()||await h()&&r&&setTimeout(()=>l(),100))},[r,f,h,l]);return(0,c.useEffect)(()=>{if(n)return document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}},[n,m]),(0,u.jsx)("div",{ref:a,className:(0,o.default)("w-full h-full",e),style:{...t,opacity:n&&!r?0:1,pointerEvents:"none"}})},exports.audioManager=f,exports.checkVersion=(e,t)=>{try{if(!e||!t)return!1;const r=e.split(".").map(e=>Number(e)),n=t.split(".").map(e=>Number(e));if(r.some(e=>isNaN(e))||n.some(e=>isNaN(e)))return!1;const s=Math.max(r.length,n.length);for(let e=0;e<s;e++){const t=r[e]||0,s=n[e]||0;if(t>s)return!0;if(t<s)return!1}return!0}catch{return!1}},exports.formatLocaleDate=(e,t="yyyy/MM/dd hh:mm:ss",r,n="LOCALE")=>{if(!e)return"";let s;s="number"==typeof e?new Date(e<1e10?1e3*e:e):e;const a=((e,t)=>{if(!e)return e;let r=e;if((e=>!y.includes(e.toLowerCase()))(t)){r=r.replace(/yyyy/g,O),r=r.replace(/MM/g,P),r=r.replace(/dd/g,D);const t=e.startsWith("yyyy"),n=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){r=r.replace(O+"/",""),r=r.replace("/"+O,""),r=r.replace(O,""),r=r.replace(P,"__SWAP_MM__"),r=r.replace(D,P),r=r.replace("__SWAP_MM__",D);const e=r.match(/(\s+[hHmMsS:.]+.*)$/);if(e){const t=e[1];r=r.replace(t,"")+"/yyyy"+t}else r+="/yyyy"}else n?(r=r.replace(P,"__SWAP_MM__"),r=r.replace(D,P),r=r.replace("__SWAP_MM__",D),r=r.replace(O,"yyyy")):(r=r.replace(P,"__SWAP_MM__"),r=r.replace(D,P),r=r.replace("__SWAP_MM__",D));r=r.replace(/__MM__/g,"MM"),r=r.replace(/__DD__/g,"dd"),r=r.replace(/__YYYY__/g,"yyyy")}return r=(e=>v.includes(e.toLowerCase()))(t)?r.replace(/:/g,"."):r,r})(t,window?.localStorage?.getItem(n)||r||"en");return((e,t="yyyy.MM.dd")=>{const r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(const n in r)if(new RegExp("("+n+")").test(t)){const e=1===RegExp.$1.length?String(r[n]):String(r[n]).padStart(2,"0");t=t.replace(RegExp.$1,e)}return"undefined"!=typeof document&&"rtl"===document.documentElement.dir?`‪${t}‬`:t})(s,a)},exports.getPx=e=>window.innerWidth/750*e,exports.getUrlParam=function(e){try{return new URLSearchParams(window.location.search).get(e)}catch{return null}},exports.getVw=T,exports.isIOS=function(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(window.navigator.userAgent)||/iPhone|iPod/.test(window.navigator.userAgent)},exports.navigate=I,exports.playSound=(e,t=1,r)=>f.play(e,t,r),exports.useAudio=(e={})=>{const{volume:t=1,preloadUrls:r=[],clearOnUnmount:n=!1}=e,[s,a]=(0,c.useState)(!1),i=(0,c.useRef)(!0);return(0,c.useEffect)(()=>{if(0===r.length)return;let e=!1;return(async()=>{a(!0);try{await f.preloadAll(r)}catch(t){}finally{e||a(!1)}})(),()=>{e=!0}},[r]),(0,c.useEffect)(()=>()=>{i.current=!1,n&&f.clear()},[n]),{play:(0,c.useCallback)(async(e,r,n)=>{i.current&&await f.play(e,r??t,n)},[t]),preload:(0,c.useCallback)(async e=>{await f.preload(e)},[]),preloadAll:(0,c.useCallback)(async e=>{a(!0);try{await f.preloadAll(e)}finally{a(!1)}},[]),isCached:(0,c.useCallback)(e=>f.isCached(e),[]),stopAll:(0,c.useCallback)(()=>{f.stopAll()},[]),clear:(0,c.useCallback)(()=>{f.clear()},[]),isLoading:s}},exports.useBoolean=b,exports.useDebounce=function(e,t){const r=(0,c.useRef)(null),n=(0,c.useRef)(e);return n.current=e,(0,c.useEffect)(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),(0,c.useCallback)((...e)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...e),r.current=null},t)},[t])},exports.useHashLocation=()=>{const[e,t]=(0,c.useState)(H());return(0,c.useEffect)(()=>{const e=()=>t(H());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,I]},exports.useLatest=C,exports.useThrottle=$,exports.useVap=A;
package/dist/zpd-ui.css CHANGED
@@ -1,2 +1,2 @@
1
- *,:before,:after,::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-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--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: }.container{width:100%}.fcc{justify-content:center;align-items:center;display:flex}.animate-spin-slow{animation:5s linear infinite spin-slow}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.left-0{left:0}.left-1\/2,.left-50\%{left:50%}.left-10{left:10px}.right-0{right:0}.right-10{right:10px}.top-0{top:0}.top-1\/2,.top-50\%{top:50%}.z-3{z-index:3}.z-99{z-index:99}.mx-10{margin-left:10px;margin-right:10px}.mx-2{margin-left:2px;margin-right:2px}.mx-4{margin-left:4px;margin-right:4px}.mx-5{margin-left:5px;margin-right:5px}.ml-1{margin-left:1px}.ml-2{margin-left:2px}.inline-block{display:inline-block}.hidden{display:none}.h-1{height:1px}.h-100{height:100px}.h-150{height:150px}.h-200{height:200px}.h-300{height:300px}.h-32{height:32px}.h-40{height:40px}.h-50{height:50px}.h-560{height:560px}.h-60{height:60px}.h-80{height:80px}.h-fit{height:fit-content}.h-full{height:100%}.max-h-full{max-height:100%}.max-w-full{max-width:100%}.min-w-max{min-width:max-content}.w-126{width:126px}.w-160{width:160px}.w-200{width:200px}.w-32{width:32px}.w-50{width:50px}.w-500{width:500px}.w-560{width:560px}.w-60{width:60px}.w-fit{width:fit-content}.w-full{width:100%}.flex{display:flex}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2,.-translate-x-50\%,[dir=ltr] .ltr\:-translate-x-50\%{--un-translate-x:-50%;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(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-1\/2,.-translate-y-50\%{--un-translate-y:-50%;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[dir=rtl] .rtl\:translate-x-50\%{--un-translate-x:50%;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(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:translateX(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))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-110{--un-scale-x:1.1;--un-scale-y:1.1;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(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-slow{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-10{gap:10px}.gap-12{gap:12px}.gap-16{gap:16px}.gap-8{gap:8px}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.scroll-smooth{scroll-behavior:smooth}.whitespace-pre{white-space:pre}.border-2{border-width:2px}.border-\#E9DDF9{--un-border-opacity:1;border-color:rgb(233 221 249/var(--un-border-opacity))}.rounded-10{border-radius:10px}.rounded-12{border-radius:12px}.rounded-20{border-radius:20px}.rounded-50{border-radius:50px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.bg-\[linear-gradient\(270deg\,\#FF499E_0\%\,\#FFA271_100\%\)\]{background-image:linear-gradient(270deg,#ff499e 0%,#ffa271 100%)}.bg-\[rgba\(0\,0\,0\,0\.5\)\]{--un-bg-opacity:.5;background-color:rgba(0,0,0,var(--un-bg-opacity))}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-blue-500{--un-bg-opacity:1;background-color:rgb(59 130 246/var(--un-bg-opacity))}.bg-gray-100{--un-bg-opacity:1;background-color:rgb(243 244 246/var(--un-bg-opacity))}.bg-gray-200{--un-bg-opacity:1;background-color:rgb(229 231 235/var(--un-bg-opacity))}.bg-green{--un-bg-opacity:1;background-color:rgb(74 222 128/var(--un-bg-opacity))}.bg-green-500{--un-bg-opacity:1;background-color:rgb(34 197 94/var(--un-bg-opacity))}.bg-pink{--un-bg-opacity:1;background-color:rgb(244 114 182/var(--un-bg-opacity))}.from-\#000\/80{--un-gradient-from-position:0%;--un-gradient-from:#000c var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#0000 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-\#C9BEE1{--un-gradient-from-position:0%;--un-gradient-from:rgb(201 190 225/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#c9bee100 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-\#FFD700{--un-gradient-from-position:0%;--un-gradient-from:rgb(255 215 0/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#ffd70000 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-\#FFF054{--un-gradient-from-position:0%;--un-gradient-from:rgb(255 240 84/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#fff05400 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.to-\#000\/60{--un-gradient-to-position:100%;--un-gradient-to:#0009 var(--un-gradient-to-position)}.to-\#DED6F0{--un-gradient-to-position:100%;--un-gradient-to:rgb(222 214 240/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-\#F5B440{--un-gradient-to-position:100%;--un-gradient-to:rgb(245 180 64/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-\#FFA500{--un-gradient-to-position:100%;--un-gradient-to:rgb(255 165 0/var(--un-to-opacity,1))var(--un-gradient-to-position)}.px{padding-left:4px;padding-right:4px}.px-16{padding-left:16px;padding-right:16px}.px-20{padding-left:20px;padding-right:20px}.px-24{padding-left:24px;padding-right:24px}.py-10{padding-top:10px;padding-bottom:10px}.py-8{padding-top:8px;padding-bottom:8px}.pt-90{padding-top:90px}.text-center{text-align:center}.text-nowrap{text-wrap:nowrap}.text-16{font-size:16px}.text-24{font-size:24px}.text-28{font-size:28px}.text-32{font-size:32px}.text-34{font-size:34px}.text-48{font-size:48px}.text-\#000{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-\#6E2F00{--un-text-opacity:1;color:rgb(110 47 0/var(--un-text-opacity))}.text-\#8A6CAF{--un-text-opacity:1;color:rgb(138 108 175/var(--un-text-opacity))}.text-\#C0C0C1{--un-text-opacity:1;color:rgb(192 192 193/var(--un-text-opacity))}.text-\#FFD700{--un-text-opacity:1;color:rgb(255 215 0/var(--un-text-opacity))}.text-\#fff,.text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.text-gray-400{--un-text-opacity:1;color:rgb(156 163 175/var(--un-text-opacity))}.text-gray-600{--un-text-opacity:1;color:rgb(75 85 99/var(--un-text-opacity))}.text-gray-700{--un-text-opacity:1;color:rgb(55 65 81/var(--un-text-opacity))}.text-yellow-400{--un-text-opacity:1;color:rgb(250 204 21/var(--un-text-opacity))}.font-500{font-weight:500}.font-700,.font-bold{font-weight:700}.shadow-\[inset_0px_6px_9px_0px_rgba\(255\,255\,255\,0\.25\)\]{--un-shadow:inset 0px 6px 9px 0px var(--un-shadow-color,#ffffff40);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.backdrop-blur-md{--un-backdrop-blur:blur(12px);-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)}.backdrop-blur-sm{--un-backdrop-blur:blur(4px);-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)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.bg-gradient-to-b{--un-gradient-shape:to bottom;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}html,body,#root,#app{-webkit-overflow-scrolling:touch;overscroll-behavior:none;overscroll-behavior-y:none}input,button{color:inherit;font-size:inherit;background-color:#0000;border:0 solid #0000;padding:0}input:focus,button:focus{outline:none}div{box-sizing:border-box;-ms-overflow-style:none;scrollbar-width:none}div::-webkit-scrollbar{display:none}tbody,td,tr{-ms-overflow-style:none;scrollbar-width:none}tbody::-webkit-scrollbar{display:none}td::-webkit-scrollbar{display:none}tr::-webkit-scrollbar{display:none}.scrollable-container,div[style*=overflow],[class*=overflow-y-auto],[class*=overflow-auto]{touch-action:pan-y;overscroll-behavior:none!important;overscroll-behavior-y:none!important}img,image{-webkit-touch-callout:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none}a:link,a:active,a:visited,a:hover{-webkit-tap-highlight-color:#0000;-webkit-tap-highlight-color:transparent;background:0 0}div,span,img,ul,li,ol,h1,h2,h3,h4,h5,h6,input,textarea,button,select,p,dl,dt,dd,a,image,button,form,table,th,tr,td,tbody{-webkit-tap-highlight-color:#0000;-webkit-user-select:none;user-select:none}@keyframes rightToLeft{0%{transform:translate(100vw)}to{transform:translate(-100%)}}@keyframes leftToRight{0%{transform:translate(-100vw)}to{transform:translate(100%)}}.bullet-item,.bullet-item-rtl{will-change:transform;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;transform:translateZ(0)}.bullet-item{animation:rightToLeft var(--barrage-duration,8s)linear both}.bullet-item-rtl{animation:leftToRight var(--barrage-duration,8s)linear both}.minglex-the-list{width:100%;height:100%;margin-left:auto;margin-right:auto;overflow:hidden}.minglex-the-list__scroll{height:100%}.minglex-the-list-simple-render{width:100%;height:auto;overflow-x:hidden}.minglex-the-list-loading{justify-content:center;align-items:center;height:100%;display:flex}.minglex-the-list-loading__text{color:#e3e3e4;font-size:28px}.minglex-the-list-load-more{text-align:center;padding-top:20px;padding-bottom:20px}.minglex-the-list-load-more__text{color:#99999b;font-size:24px}.minglex-the-list-error{justify-content:center;align-items:center;height:100%;display:flex}.minglex-the-list-error__content{text-align:center}.minglex-the-list-error__text{color:#e3e3e4;margin-bottom:20px;font-size:28px}.minglex-the-list-error__retry-btn{color:#fff;cursor:pointer;background-color:#bb92ff;border:none;border-radius:10px;padding:15px 30px;font-size:24px}.minglex-the-list-error__retry-btn:active{opacity:.8}.minglex-the-list-no-data{text-align:center;flex-flow:column wrap;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.minglex-the-list-no-data__image{width:280px;height:280px;margin-left:auto;margin-right:auto}.infinite-scroll{contain:layout paint;width:100%;display:flex;position:relative;overflow:hidden}.infinite-scroll__track{backface-visibility:hidden;white-space:nowrap;display:flex;transform:translateZ(0)}.infinite-scroll__track--static{justify-content:center;width:100%;animation:none}.infinite-scroll__track--animate{animation:linear infinite infinite-scroll-animate;animation-delay:calc(var(--t,5s)*-1);will-change:transform}.infinite-scroll__track--animate:nth-child(2){animation-delay:calc(var(--t,5s)/-2);animation-name:infinite-scroll-animate2}.infinite-scroll__track--animate-rtl{animation:linear infinite infinite-scroll-animate-rtl;animation-delay:calc(var(--t,5s)*-1);will-change:transform}.infinite-scroll__track--animate-rtl:nth-child(2){animation-delay:calc(var(--t,5s)/-2);animation-name:infinite-scroll-animate2-rtl}.infinite-scroll.pause-on-hover:hover .infinite-scroll__track--animate{animation-play-state:paused}@keyframes infinite-scroll-animate{0%{transform:translate(100%)}to{transform:translate(-100%)}}@keyframes infinite-scroll-animate2{0%{transform:translate(0,0)}to{transform:translate(-200%)}}@keyframes infinite-scroll-animate-rtl{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes infinite-scroll-animate2-rtl{0%{transform:translate(0,0)}to{transform:translate(200%)}}
1
+ *,:before,:after,::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-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--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: }.container{width:100%}.fcc{justify-content:center;align-items:center;display:flex}.animate-spin-slow{animation:5s linear infinite spin-slow}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.left-0{left:0}.left-1\/2,.left-50\%{left:50%}.left-10{left:10px}.right-0{right:0}.right-10{right:10px}.top-0{top:0}.top-1\/2,.top-50\%{top:50%}.z-3{z-index:3}.z-99{z-index:99}.mx-10{margin-left:10px;margin-right:10px}.mx-2{margin-left:2px;margin-right:2px}.mx-4{margin-left:4px;margin-right:4px}.mx-5{margin-left:5px;margin-right:5px}.ml-1{margin-left:1px}.ml-2{margin-left:2px}.inline-block{display:inline-block}.hidden{display:none}.h-1{height:1px}.h-100{height:100px}.h-150{height:150px}.h-200{height:200px}.h-300{height:300px}.h-32{height:32px}.h-40{height:40px}.h-50{height:50px}.h-560{height:560px}.h-60{height:60px}.h-80{height:80px}.h-fit{height:fit-content}.h-full{height:100%}.max-h-full{max-height:100%}.max-w-full{max-width:100%}.min-w-max{min-width:max-content}.w-126{width:126px}.w-160{width:160px}.w-200{width:200px}.w-32{width:32px}.w-50{width:50px}.w-500{width:500px}.w-560{width:560px}.w-60{width:60px}.w-fit{width:fit-content}.w-full{width:100%}.flex{display:flex}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2,.-translate-x-50\%,[dir=ltr] .ltr\:-translate-x-50\%{--un-translate-x:-50%;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(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-1\/2,.-translate-y-50\%{--un-translate-y:-50%;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[dir=rtl] .rtl\:translate-x-50\%{--un-translate-x:50%;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(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:translateX(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))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-110{--un-scale-x:1.1;--un-scale-y:1.1;transform:translateX(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))rotateZ(var(--un-rotate-z))skewX(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-slow{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-10{gap:10px}.gap-12{gap:12px}.gap-16{gap:16px}.gap-8{gap:8px}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.scroll-smooth{scroll-behavior:smooth}.whitespace-pre{white-space:pre}.border-2{border-width:2px}.border-\#E9DDF9{--un-border-opacity:1;border-color:rgb(233 221 249/var(--un-border-opacity))}.rounded-10{border-radius:10px}.rounded-12{border-radius:12px}.rounded-20{border-radius:20px}.rounded-50{border-radius:50px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.bg-\[linear-gradient\(270deg\,\#FF499E_0\%\,\#FFA271_100\%\)\]{background-image:linear-gradient(270deg,#ff499e 0%,#ffa271 100%)}.bg-\[rgba\(0\,0\,0\,0\.5\)\]{--un-bg-opacity:.5;background-color:rgba(0,0,0,var(--un-bg-opacity))}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-blue-500{--un-bg-opacity:1;background-color:rgb(59 130 246/var(--un-bg-opacity))}.bg-gray-100{--un-bg-opacity:1;background-color:rgb(243 244 246/var(--un-bg-opacity))}.bg-gray-200{--un-bg-opacity:1;background-color:rgb(229 231 235/var(--un-bg-opacity))}.bg-green{--un-bg-opacity:1;background-color:rgb(74 222 128/var(--un-bg-opacity))}.bg-green-500{--un-bg-opacity:1;background-color:rgb(34 197 94/var(--un-bg-opacity))}.bg-pink{--un-bg-opacity:1;background-color:rgb(244 114 182/var(--un-bg-opacity))}.from-\#000\/80{--un-gradient-from-position:0%;--un-gradient-from:#000c var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#0000 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-\#C9BEE1{--un-gradient-from-position:0%;--un-gradient-from:rgb(201 190 225/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#c9bee100 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-\#FFD700{--un-gradient-from-position:0%;--un-gradient-from:rgb(255 215 0/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#ffd70000 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-\#FFF054{--un-gradient-from-position:0%;--un-gradient-from:rgb(255 240 84/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#fff05400 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.to-\#000\/60{--un-gradient-to-position:100%;--un-gradient-to:#0009 var(--un-gradient-to-position)}.to-\#DED6F0{--un-gradient-to-position:100%;--un-gradient-to:rgb(222 214 240/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-\#F5B440{--un-gradient-to-position:100%;--un-gradient-to:rgb(245 180 64/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-\#FFA500{--un-gradient-to-position:100%;--un-gradient-to:rgb(255 165 0/var(--un-to-opacity,1))var(--un-gradient-to-position)}.px{padding-left:4px;padding-right:4px}.px-16{padding-left:16px;padding-right:16px}.px-20{padding-left:20px;padding-right:20px}.px-24{padding-left:24px;padding-right:24px}.py-10{padding-top:10px;padding-bottom:10px}.py-8{padding-top:8px;padding-bottom:8px}.pt-90{padding-top:90px}.text-center{text-align:center}.text-nowrap{text-wrap:nowrap}.text-16{font-size:16px}.text-24{font-size:24px}.text-28{font-size:28px}.text-32{font-size:32px}.text-34{font-size:34px}.text-48{font-size:48px}.text-\#000{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-\#6E2F00{--un-text-opacity:1;color:rgb(110 47 0/var(--un-text-opacity))}.text-\#8A6CAF{--un-text-opacity:1;color:rgb(138 108 175/var(--un-text-opacity))}.text-\#C0C0C1{--un-text-opacity:1;color:rgb(192 192 193/var(--un-text-opacity))}.text-\#FFD700{--un-text-opacity:1;color:rgb(255 215 0/var(--un-text-opacity))}.text-\#fff,.text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.text-gray-400{--un-text-opacity:1;color:rgb(156 163 175/var(--un-text-opacity))}.text-gray-600{--un-text-opacity:1;color:rgb(75 85 99/var(--un-text-opacity))}.text-gray-700{--un-text-opacity:1;color:rgb(55 65 81/var(--un-text-opacity))}.text-yellow-400{--un-text-opacity:1;color:rgb(250 204 21/var(--un-text-opacity))}.font-500{font-weight:500}.font-700,.font-bold{font-weight:700}.shadow-\[inset_0px_6px_9px_0px_rgba\(255\,255\,255\,0\.25\)\]{--un-shadow:inset 0px 6px 9px 0px var(--un-shadow-color,#ffffff40);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.backdrop-blur-md{--un-backdrop-blur:blur(12px);-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)}.backdrop-blur-sm{--un-backdrop-blur:blur(4px);-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)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.bg-gradient-to-b{--un-gradient-shape:to bottom;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}html,body,#root,#app{-webkit-overflow-scrolling:touch;overscroll-behavior:none;overscroll-behavior-y:none}input,button{color:inherit;font-size:inherit;background-color:#0000;border:0 solid #0000;padding:0}input:focus,button:focus{outline:none}div{box-sizing:border-box;-ms-overflow-style:none;scrollbar-width:none}div::-webkit-scrollbar{display:none}tbody,td,tr{-ms-overflow-style:none;scrollbar-width:none}tbody::-webkit-scrollbar{display:none}td::-webkit-scrollbar{display:none}tr::-webkit-scrollbar{display:none}.scrollable-container,div[style*=overflow],[class*=overflow-y-auto],[class*=overflow-auto]{touch-action:pan-y;overscroll-behavior:none!important;overscroll-behavior-y:none!important}img,image{-webkit-touch-callout:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none}a:link,a:active,a:visited,a:hover{-webkit-tap-highlight-color:#0000;-webkit-tap-highlight-color:transparent;background:0 0}div,span,img,ul,li,ol,h1,h2,h3,h4,h5,h6,input,textarea,button,select,p,dl,dt,dd,a,image,button,form,table,th,tr,td,tbody{-webkit-tap-highlight-color:#0000;-webkit-user-select:none;user-select:none}@keyframes rightToLeft{0%{transform:translate(100vw)}to{transform:translate(-100%)}}@keyframes leftToRight{0%{transform:translate(-100vw)}to{transform:translate(100%)}}.bullet-item,.bullet-item-rtl{-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.bullet-item{animation:rightToLeft var(--barrage-duration,8s)linear both}.bullet-item-rtl{animation:leftToRight var(--barrage-duration,8s)linear both}.minglex-the-list{width:100%;height:100%;margin-left:auto;margin-right:auto;overflow:hidden}.minglex-the-list__scroll{height:100%}.minglex-the-list-simple-render{width:100%;height:auto;overflow-x:hidden}.minglex-the-list-loading{justify-content:center;align-items:center;height:100%;display:flex}.minglex-the-list-loading__text{color:#e3e3e4;font-size:28px}.minglex-the-list-load-more{text-align:center;padding-top:20px;padding-bottom:20px}.minglex-the-list-load-more__text{color:#99999b;font-size:24px}.minglex-the-list-error{justify-content:center;align-items:center;height:100%;display:flex}.minglex-the-list-error__content{text-align:center}.minglex-the-list-error__text{color:#e3e3e4;margin-bottom:20px;font-size:28px}.minglex-the-list-error__retry-btn{color:#fff;cursor:pointer;background-color:#bb92ff;border:none;border-radius:10px;padding:15px 30px;font-size:24px}.minglex-the-list-error__retry-btn:active{opacity:.8}.minglex-the-list-no-data{text-align:center;flex-flow:column wrap;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.minglex-the-list-no-data__image{width:280px;height:280px;margin-left:auto;margin-right:auto}.infinite-scroll{contain:layout style;width:100%;display:flex;position:relative;overflow:hidden}.infinite-scroll__track{backface-visibility:hidden;white-space:nowrap;display:flex}.infinite-scroll__track--static{justify-content:center;width:100%;animation:none}.infinite-scroll__track--animate{animation:linear infinite infinite-scroll-animate;animation-delay:calc(var(--t,5s)*-1)}.infinite-scroll__track--animate:nth-child(2){animation-delay:calc(var(--t,5s)/-2);animation-name:infinite-scroll-animate2}.infinite-scroll__track--animate-rtl{animation:linear infinite infinite-scroll-animate-rtl;animation-delay:calc(var(--t,5s)*-1)}.infinite-scroll__track--animate-rtl:nth-child(2){animation-delay:calc(var(--t,5s)/-2);animation-name:infinite-scroll-animate2-rtl}.infinite-scroll.pause-on-hover:hover .infinite-scroll__track--animate{animation-play-state:paused}@keyframes infinite-scroll-animate{0%{transform:translate(100%)}to{transform:translate(-100%)}}@keyframes infinite-scroll-animate2{0%{transform:translate(0)}to{transform:translate(-200%)}}@keyframes infinite-scroll-animate-rtl{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes infinite-scroll-animate2-rtl{0%{transform:translate(0)}to{transform:translate(200%)}}
2
2
  /*$vite$:1*/
package/dist/zpd-ui.es.js CHANGED
@@ -1,13 +1,13 @@
1
- import e,{forwardRef as t,useCallback as n,useEffect as r,useImperativeHandle as s,useMemo as i,useRef as a,useState as l}from"react";import o from"clsx";import{Fragment as c,jsx as u,jsxs as d}from"react/jsx-runtime";import h from"dayjs";import m from"video-animation-player";var f=Object.create,y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,N=(e,t)=>function(){return t||(0,e[p(e)[0]])((t={exports:{}}).exports,t),t.exports},b=(e,t,n)=>(n=null!=e?f(g(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var s,i=p(t),a=0,l=i.length;a<l;a++)s=i[a],w.call(e,s)||void 0===s||y(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=v(t,s))||r.enumerable});return e})(!t&&e&&e.__esModule?n:y(n,"default",{value:e,enumerable:!0}),e));const x=new class{constructor(e=""){this.audioCache=/* @__PURE__ */new Map,this.loadingPromises=/* @__PURE__ */new Map,this.assetOrigin=e}setAssetOrigin(e){this.assetOrigin=e}preload(e){if(this.audioCache.has(e))return Promise.resolve();if(this.loadingPromises.has(e))return this.loadingPromises.get(e);const t=new Promise((t,n)=>{const r=e.startsWith("http")?e:`${this.assetOrigin}${e}`,s=new Audio(r);s.preload="auto";const i=()=>{this.audioCache.set(e,s),l(),t()},a=e=>{l(),n(e)},l=()=>{s.removeEventListener("canplaythrough",i),s.removeEventListener("error",a),this.loadingPromises.delete(e)};s.addEventListener("canplaythrough",i),s.addEventListener("error",a),s.load()});return this.loadingPromises.set(e,t),t}async preloadAll(e){await Promise.all(e.map(e=>this.preload(e)))}async play(e,t=1,n){try{this.audioCache.has(e)||await this.preload(e);const r=this.audioCache.get(e);if(!r)return;const s=r.cloneNode(!0);s.volume=Math.max(0,Math.min(1,t));const i=()=>{s.removeEventListener("ended",a),s.removeEventListener("error",l),s.remove()},a=()=>{n?.onEnded?.(),i()},l=e=>{n?.onError?.(new Error(e.message||"音频播放失败")),i()};s.addEventListener("ended",a),s.addEventListener("error",l),await s.play()}catch(r){n?.onError?.(r)}}stopAll(){this.audioCache.forEach(e=>{e.pause(),e.currentTime=0})}clear(){this.audioCache.forEach(e=>{e.src="",e.load()}),this.audioCache.clear(),this.loadingPromises.clear()}isCached(e){return this.audioCache.has(e)}getCacheSize(){return this.audioCache.size}},M=(e,t=1,n)=>x.play(e,t,n);var _=({audioUrl:e,volume:t=1,autoPlay:n=!0,onEnded:s,onError:i,onPlay:l})=>{const o=a("");return r(()=>{n&&o.current!==e&&(o.current=e,(async()=>{try{l?.(),await x.play(e,t,{onEnded:s,onError:i})}catch(n){i?.(n)}})())},[e,t,n,s,i,l]),null},$=e.forwardRef(({list:e=[],intervalTime:t=1600,className:c="",renderItem:d,tabClassName:h="",lines:m=2,lineHeight:f=25,tabClassNameStyle:y={},duration:v=8},p)=>{const[g,w]=l([]),N=a(1),b=a(0),x=a(null),M=a(e),_=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{M.current=e,b.current=0},[e]);const $=n(()=>{w(e=>e.slice(1))},[]),C=n(e=>(e-1)*f,[f]),k=n(()=>{const e=M.current;if(!e.length)return;const t=b.current,n=N.current;b.current=(b.current+1)%e.length,N.current=N.current%m+1;const r=e[t];if(!r)return;const s={...r,line:n,id:r?.id||String(Date.now()+Math.random())};w(e=>[...e,s])},[m]);return s(p,()=>({showNextBullet:k})),r(()=>{x.current=setInterval(()=>{k()},t);const e=()=>{window.document.hidden?(x.current&&(clearInterval(x.current),x.current=null),w([])):(w([]),k(),x.current&&clearInterval(x.current),x.current=setInterval(()=>{k()},t))};return window.document.addEventListener("visibilitychange",e),()=>{x.current&&clearInterval(x.current),window.document.removeEventListener("visibilitychange",e)}},[t,k]),g.length?/* @__PURE__ */u("div",{className:o("w-full relative",c),style:{"--barrage-duration":`${v}s`},children:Array.isArray(g)&&g.map((e,t)=>/* @__PURE__ */u("div",{className:o(h,"absolute z-3 w-fit h-fit rounded-50 flex items-center justify-center text-24 text-#fff",{"bullet-item-rtl":_,"bullet-item":!_}),"data-line":e.line,style:{top:e.line?`${C(e.line)}px`:void 0,...y},onAnimationEnd:$,children:d(e,t)},e?.id||`barrage-item-${t}`))}):null});$.displayName="Barrage";var C=$;const k=["tw","my","ph","en"],E=["tr"],T=["0","0"];var L=({time:e,background:t})=>{const n=i(()=>e?(e+"").padStart(2,"0").split(""):T,[e]);/* @__PURE__ */
2
- return u("div",{className:`fcc ${t}`,dir:"ltr",children:Array(2).fill(0).map((e,t)=>/* @__PURE__ */u("div",{children:n[t]},t))})},S=/* @__PURE__ */b(/* @__PURE__ */N({"node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/duration.js":(e,t)=>{var n,r;n=e,r=function(){var e,t,n=1e3,r=6e4,s=36e5,i=864e5,a=/\[([^\]]+)]|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,l=31536e6,o=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:l,months:o,days:i,hours:s,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof g},h=function(e,t,n){return new g(e,n,t.$l)},m=function(e){return t.p(e)+"s"},f=function(e){return e<0},y=function(e){return f(e)?Math.ceil(e):Math.floor(e)},v=function(e){return Math.abs(e)},p=function(e,t){return e?f(e)?{negative:!0,format:""+v(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},g=function(){function f(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[m(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){r.$d[m(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var s=e.match(c);if(s){var i=s.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=i[0],this.$d.months=i[1],this.$d.weeks=i[2],this.$d.days=i[3],this.$d.hours=i[4],this.$d.minutes=i[5],this.$d.seconds=i[6],this.calMilliseconds(),this}}return this}var v=f.prototype;return v.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,n){return t+(e.$d[n]||0)*u[n]},0)},v.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=y(e/l),e%=l,this.$d.months=y(e/o),e%=o,this.$d.days=y(e/i),e%=i,this.$d.hours=y(e/s),e%=s,this.$d.minutes=y(e/r),e%=r,this.$d.seconds=y(e/n),e%=n,this.$d.milliseconds=e},v.toISOString=function(){var e=p(this.$d.years,"Y"),t=p(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=p(n,"D"),s=p(this.$d.hours,"H"),i=p(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var l=p(a,"S"),o=e.negative||t.negative||r.negative||s.negative||i.negative||l.negative,c=s.format||i.format||l.format?"T":"",u=(o?"-":"")+"P"+e.format+t.format+r.format+c+s.format+i.format+l.format;return"P"===u||"-P"===u?"P0D":u},v.toJSON=function(){return this.toISOString()},v.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(a,function(e,t){return t||String(r[e])})},v.as=function(e){return this.$ms/u[m(e)]},v.get=function(e){var t=this.$ms,n=m(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?y(t/u[n]):this.$d[n],t||0},v.add=function(e,t,n){var r;return r=t?e*u[m(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+r*(n?-1:1),this)},v.subtract=function(e,t){return this.add(e,t,!0)},v.locale=function(e){var t=this.clone();return t.$l=e,t},v.clone=function(){return h(this.$ms,this)},v.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},v.valueOf=function(){return this.asMilliseconds()},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},f}(),w=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,s){e=s,t=s().$utils(),s.duration=function(e,t){return h(e,{$l:s.locale()},t)},s.isDuration=d;var i=r.prototype.add,a=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?w(this,e,1):i.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?w(this,e,-1):a.bind(this)(e,t)}}},"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_duration=r()}})(),1);h.extend(S.default);var A=({targetTime:e,serverTime:t,refreshData:n,format:s="HH:mm:ss",className:c,backgroundClassName:d="",partClassName:m="",escapedTextClassName:f="",onEnd:y})=>{const[v,p]=l(0),[g,w]=l(0),[N,b]=l(0),[x,M]=l(0),[_,$]=l(!1),C=a(null),k=a(null),E=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),T=()=>{if(k.current){const{serverTime:e,localTime:t}=k.current;return e+(Date.now()-t)}return h().valueOf()},S=e=>{if(null==e||""===e||"0"===e)return 0;const t="string"==typeof e?parseInt(e,10):e;return isNaN(t)||t<=0||t<=T()?0:t},A=["dd","HH","mm","ss","d","H","m","s"],P=(e,t)=>{if(!e.startsWith(t))return null;const n="["===t?"]":t,r=e.indexOf(n,1);return-1===r?null:{content:e.slice(1,r),length:r+1}},D=e=>{const t=e.startsWith("d")?"day":e.startsWith("H")?"hour":e.startsWith("m")?"minute":"second";return{type:t,value:"day"===t?v:"hour"===t?g:"minute"===t?N:x}},R=(e,t,n)=>{const r=e[t+n.length];return!(r&&/[a-zA-Z]/.test(r))},O=e=>{for(let t=1;t<e.length;t++){const n=e[t];if("["===n||"'"===n)return t;for(const r of A)if(e.slice(t).startsWith(r)){const n=e[t-1],s=e[t+r.length];if(!(/[a-zA-Z]/.test(n)||s&&/[a-zA-Z]/.test(s)))return t}}return e.length},I=e=>{for(const t of A)if(e.startsWith(t)&&R(e,0,t)){const{type:e,value:n}=D(t);return{part:{type:e,value:n,format:t},length:t.length}}return null},H=()=>{C.current&&(clearInterval(C.current),C.current=void 0)},W=()=>{const{day:t,hour:r,minute:s,seconds:i}=(()=>{const t=S(e);if(0===t)return{day:0,hour:0,minute:0,seconds:0};const n=t-T();if(n<=0)return{day:0,hour:0,minute:0,seconds:0};const r=h.duration(n);return{day:Math.floor(r.asDays()),hour:r.hours(),minute:r.minutes(),seconds:r.seconds()}})();t+r+s+i>0?(p(t),w(r),b(s),M(i)):(p(0),w(0),b(0),M(0),H(),_||($(!0),n?.(),y?.()))};return r(()=>{if(t&&t>0)if(k.current){const{serverTime:e,localTime:n}=k.current,r=t-(e+(Date.now()-n));Math.abs(r)>500&&(k.current={serverTime:t,localTime:Date.now()})}else k.current={serverTime:t,localTime:Date.now()};else k.current=null},[t]),r(()=>{const t=S(e);return $(!1),W(),t>0&&t>T()&&(C.current=setInterval(W,1e3)),()=>{H()}},[e]),(()=>{const e=(()=>{const e=[];let t=E?(e=>{let t=-1,n="",r=-1,s="";for(const o of["HH","H"]){for(let r=0;r<=e.length-o.length;r++)if(e.slice(r,r+o.length)===o){const s=r>0?e[r-1]:"",i=r+o.length<e.length?e[r+o.length]:"";if(!/[a-zA-Z]/.test(s)&&!/[a-zA-Z]/.test(i)){t=r,n=o;break}}if(-1!==t)break}for(const o of["ss","s"]){for(let t=0;t<=e.length-o.length;t++)if(e.slice(t,t+o.length)===o){const n=t>0?e[t-1]:"",i=t+o.length<e.length?e[t+o.length]:"";if(!/[a-zA-Z]/.test(n)&&!/[a-zA-Z]/.test(i)){r=t,s=o;break}}if(-1!==r)break}if(-1===t||-1===r)return e;const i=e.split(""),a=n.length,l=s.length;for(let o=0;o<Math.max(a,l);o++)o<a&&o<l&&([i[t+o],i[r+o]]=[i[r+o],i[t+o]]);return i.join("")})(s):s;for(;t.length>0;){let n=!1;const r=P(t,"[");if(r&&(e.push({type:"text",value:r.content,format:"",textClassName:f}),t=t.slice(r.length),n=!0),!n){const r=P(t,"'");r&&(e.push({type:"text",value:r.content,format:"",textClassName:f}),t=t.slice(r.length),n=!0)}if(!n){const r=I(t);r&&(e.push(r.part),t=t.slice(r.length),n=!0)}if(!n){const n=O(t),r=t.slice(0,n);r&&e.push({type:"text",value:r,format:"",textClassName:m}),t=t.slice(n)}}return e})();/* @__PURE__ */
3
- return u("div",{className:o(`fcc ${c}`),children:e.map((e,t)=>"text"===e.type?/* @__PURE__ */u("span",{className:o("mx-2 fcc whitespace-pre font-700",e.textClassName),children:e.value},t):/* @__PURE__ */u("div",{className:"fcc",children:/* @__PURE__ */u(L,{time:e.value,background:d??""})},t))})})()};const P=(e=!1)=>{const[t,n]=l(e);return[t,i(()=>({setTrue:()=>n(!0),setFalse:()=>n(!1),toggle:()=>n(e=>!e),set:e=>n(e)}),[])]},D=e=>{const t=a(e);return t.current=e,t};var R=({height:t,children:s,handleMore:i,hasMore:l=!0,className:o,style:c})=>{const[d,{setTrue:h,setFalse:m}]=P(!1),f=e.useRef(null),y=D(l),v=D(d),p=D(i),g=a(void 0),w=n(async()=>{if(y.current&&(()=>{if(!f.current)return!1;const{scrollTop:e,scrollHeight:t,clientHeight:n}=f.current;return t-n-e<10})()&&!v.current){h(),g.current&&clearTimeout(g.current);try{await(p.current?.())}finally{g.current=setTimeout(()=>{m()},500)}}},[y,v,p,h,m]);return r(()=>(w?.(),()=>{g.current&&clearTimeout(g.current)}),[w]),/* @__PURE__ */u("div",{className:`infinite-container ${o}`,ref:f,style:{maxHeight:t?t/7.5+"vw":void 0,height:"100%",overflowY:"auto",...c},onScroll:w,children:s})},O=({onRetry:e})=>/* @__PURE__ */u("div",{className:"minglex-the-list-error",children:/* @__PURE__ */d("div",{className:"minglex-the-list-error__content",children:[/* @__PURE__ */u("div",{className:"minglex-the-list-error__text",children:"error"}),/* @__PURE__ */u("button",{className:"minglex-the-list-error__retry-btn",onClick:e,children:"retry"})]})}),I=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-load-more",children:/* @__PURE__ */u("div",{className:"minglex-the-list-load-more__text",children:"loadMore..."})}),H=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-loading",children:/* @__PURE__ */u("div",{className:"minglex-the-list-loading__text",children:"loading..."})}),W=t(({url:e,params:t={},method:i="get",pageSize:h=10,dataKey:m="items",className:f,renderItem:y,onDataLoaded:v,finishRender:p,cursorKey:g,hasNextKey:w="has_next",myRankKey:N="my_rank",noDataRender:b,children:x,request:M,enablePadding:_=!1,useSimpleRender:$=!1,paddingThreshold:C,paddingPlaceholder:k={}},E)=>{const[T,L]=l([]),[S,A]=l(!1),[P,D]=l(!0),[W,Y]=l(null),[j,B]=l(!1),z=a(1),F=a(void 0),q=a(!1),U=n(()=>{const e={current_page:z.current,page_size:h,page:z.current,page_num:z.current,limit:h,offset:(z.current-1)*h,...t};return g&&void 0!==F.current&&(e[g]=F.current),Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{})},[h,t,g]),Z=n(t=>"get"===i.toLowerCase()?{url:e,method:i,params:t}:{url:e,method:i,data:t},[e,i]),X=n(e=>{const t=e?.data[w],n=e?.data[N];let r=e?.data[m]||e?.data?.records||e?.data?.ranks||[];const s="boolean"==typeof t&&t;if(_&&!s){const e=r.length,t=Math.min(C??h,h);if(e<t){const n=Array(t-e).fill(k);r=[...r,...n]}}if(g){const t=e?.data?.[g];null!=t&&(F.current=t)}return{newItems:r,hasMoreData:s,myRank:n||null}},[m,g,w,N,_,C,h,k]),K=n((e,t)=>{if(t)return L(e),e;{const t=[...T,...e];return L(t),t}},[T]),V=n(async()=>{const e=M||window?.__ZPD_REQUEST__?.request;if(!e)throw new Error("List: 请提供 request 函数\n方式1: 通过 props 传入 <List request={myRequest} ... />\n方式2: 在项目入口配置 window.__ZPD_REQUEST__ = { request: myRequest }");return await e(Z(U()))},[U,Z,M]),Q=n(async(e=!1)=>{if((!S||e)&&(!j||e))try{A(!0),Y(null),e&&(z.current=1);const t=await V(),{newItems:n,hasMoreData:r,myRank:s}=X(t);z.current=z.current+1,B(!r);const i=K(n,e);v?.(t.data,i,s)}catch(t){Y(t)}finally{A(!1),D(!1)}},[S,j,V,X,K,v]),J=n(async()=>{S||j||await Q(!1)},[Q,S,j]),G=n(async()=>{B(!1),Y(null),z.current=1,F.current=void 0,await Q(!0)},[Q]),ee=n(()=>{L([]),B(!0),z.current=1,F.current=void 0,Y(null),q.current=!1},[]),te=n(()=>T,[T]);if(s(E,()=>({refresh:G,clear:ee,getList:te}),[G,ee,te]),r(()=>{q.current||(q.current=!0,Q(!0))},[Q,q]),P)/* @__PURE__ */return u(H,{});if(W&&Array.isArray(T)&&0===T?.length)/* @__PURE__ */return u(O,{onRetry:G});if(Array.isArray(T)&&0===T?.length)return b?.()||null;const ne=()=>/* @__PURE__ */d(c,{children:[T.map((e,t)=>/* @__PURE__ */u("div",{className:"minglex-the-list__item",children:y(e,t)},`simple-list-item-${t}`)),S&&!j&&/* @__PURE__ */u(I,{}),j&&p?.(),x&&x]});/* @__PURE__ */
4
- return u("div",$?{className:o("minglex-the-list-simple-render",f),children:ne()}:{className:o("minglex-the-list",f),children:/* @__PURE__ */u(R,{handleMore:J,hasMore:!j,className:"minglex-the-list__scroll",children:ne()})})});W.displayName="List";var Y=W,j=({musicUrl:e,playIconClass:t,pauseIconClass:n,className:s,loop:i=!0,autoPlay:h=!0,animationClassName:m="animate-spin-slow"})=>{const[f,y]=l(!1),v=a(null),p=a(!1);return r(()=>{const e=v.current;if(!e)return;const t=()=>y(!0),n=()=>y(!1);return e.addEventListener("play",t),e.addEventListener("pause",n),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",n)}},[]),r(()=>{const e=v.current;if(!e)return;const t=!e.paused;e.pause(),e.currentTime=0,e.load(),p.current=!1,t&&h&&e.play().catch(e=>{})},[e,h]),r(()=>{if(!h)return;const e=v.current;if(!e)return;const t=async()=>{try{return e.muted=!1,await e.play(),!0}catch{return!1}},n=()=>{e&&(e.muted=!1)},r=setTimeout(async()=>{if(p.current)return;if(p.current=!0,await t())return;if(await(async()=>{try{return e.muted=!0,await e.play(),!0}catch{return!1}})())return document.addEventListener("click",n,{once:!0}),document.addEventListener("touchstart",n,{once:!0}),void document.addEventListener("scroll",n,{once:!0});const r=async()=>{await t()};document.addEventListener("click",r,{once:!0}),document.addEventListener("touchstart",r,{once:!0})},100);return()=>{clearTimeout(r),document.removeEventListener("click",n),document.removeEventListener("touchstart",n),document.removeEventListener("scroll",n)}},[h]),/* @__PURE__ */d(c,{children:[/* @__PURE__ */u("div",{className:o(f?t:n,"transition-transform",f&&m?m:"",s),onClick:()=>{v.current&&(f?v.current.pause():v.current.play(),y(!f))}}),/* @__PURE__ */u("audio",{ref:v,src:e,loop:i})]})};function B(e,t){const r=a(!1),s=a(e);return s.current=e,n((...e)=>{r.current||(s.current(...e),r.current=!0,setTimeout(()=>{r.current=!1},t))},[t])}var z=({title:e,rightIcon:t="",leftIcon:n="",onRightClick:s,onLeftClick:h,type:m="close",className:f="",children:y,enableScrollBg:v=!1,scrollBgClassName:p="bg-black/60 backdrop-blur-sm",titleAlign:g="center",renderLeft:w,renderRight:N})=>{const[b,x]=l(!1),M=a(null),_=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{if(!v)return;const e=M.current;if(!e)return;const t=new IntersectionObserver(([e])=>{x(!e.isIntersecting)},{threshold:0,rootMargin:"0px"});return t.observe(e),()=>t.disconnect()},[v]);const $=B(()=>{h?.(),"close"!==m&&window.history.back()},400),C=B(()=>{s?.()},400),k=i(()=>w?w():n?/* @__PURE__ */u("div",{className:o(n,_&&"rotate-180"),onClick:$}):null,[w,n,_,$]),E=i(()=>N?N():/* @__PURE__ */u("div",{className:o(t),style:{visibility:t?"visible":"hidden"},onClick:C}),[N,t,C]),T=i(()=>e?/* @__PURE__ */u("span",{className:"center"===g?"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":"",children:e}):null,[e,g]);/* @__PURE__ */
5
- return d(c,{children:[v&&/* @__PURE__ */u("div",{ref:M,className:"pointer-events-none absolute left-0 top-0 h-1 w-full"}),/* @__PURE__ */u("div",{className:o(f,"fixed left-0 top-0 z-99 h-fit w-full px-24 pt-90 text-#fff text-34 font-bold",v&&"transition-all duration-300",v&&b&&p),children:/* @__PURE__ */d("div",{className:"w-full flex items-center justify-between relative",children:["left"===g?/* @__PURE__ */d("div",{className:"flex items-center",children:[k,T,y]}):/* @__PURE__ */d(c,{children:[k,T,y]}),E]})})]})},F=({className:t,style:s,children:c,text:h,textClassName:m,pixelsPerSecond:f=20,speed:y,pauseOnHover:v=!1,gap:p,noOverflowClassName:g=""})=>{const w=a(null),N=a(null),b=a(null),[x,M]=l(y||8),[_,$]=l(!1),C=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{let e=null;const t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{if(!w.current||!b.current)return;const e=w.current,t=b.current,n=e.scrollWidth>t.clientWidth;$(n),n&&M(void 0===y?(e.scrollWidth+t.clientWidth)/f:y)},100)};t();const n=new ResizeObserver(t);return w.current&&n.observe(w.current),b.current&&n.observe(b.current),()=>{e&&clearTimeout(e),n.disconnect()}},[c,h,f,y]);const k=i(()=>c||(h&&Array.isArray(h)&&h?.length>0?h.map((e,t)=>/* @__PURE__ */u("span",{className:m,children:e},t)):h&&"string"==typeof h?/* @__PURE__ */u("span",{className:m,children:h}):null),[c,h,m]),E=n(t=>/* @__PURE__ */d(e.Fragment,void 0!==p?{children:[k,/* @__PURE__ */u("span",{className:o("inline-block",p)})]}:{children:[/* @__PURE__ */u("span",{style:{visibility:"visible"},children:k}),/* @__PURE__ */u("span",{style:{visibility:"hidden"},children:k})]},t),[k,p]),T=i(()=>/* @__PURE__ */u("div",{ref:w,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap"},children:k}),[k]);/* @__PURE__ */
6
- return d("div",_?{ref:b,className:o("infinite-scroll",t,{"pause-on-hover":v}),style:{...s,"--t":`${x}s`},children:[/* @__PURE__ */u("div",{ref:N,className:o("infinite-scroll__track",{"infinite-scroll__track--animate":!C,"infinite-scroll__track--animate-rtl":C}),style:{animationDuration:`${x}s`},children:E("track-1")}),/* @__PURE__ */u("div",{className:o("infinite-scroll__track",{"infinite-scroll__track--animate":!C,"infinite-scroll__track--animate-rtl":C}),"aria-hidden":"true",style:{animationDuration:`${x}s`},children:E("track-2")})]}:{ref:b,className:o("infinite-scroll",t),style:s,children:[T,/* @__PURE__ */u("div",{className:o("w-full text-center text-nowrap",g),children:k})]})},q=({className:e="",value:t,showPercent:n=!1,style:s,onChange:i,disabled:c=!1,draggable:h=!0,innerImageClassName:m="",outerImageClassName:f="",innerClassName:y="",pointClassName:v="",pointOffsetPercent:p,maxCount:g,decreaseButtonClassName:w,increaseButtonClassName:N,onDecrease:b,onIncrease:x,buttonSpacing:M="mx-10",step:_=1,minValue:$,children:C})=>{const k=a(null),[E,T]=l(!1),L="rtl"===document.dir,S=b||(()=>{if(c||!i)return;const e=void 0!==$?$:g?1:0,n=Math.max(e,t-_);i?.(n)}),A=x||(()=>{if(c||!i)return;const e=g||100,n=Math.min(e,t+_);i?.(n)}),P=()=>g?Math.min(100,Math.floor(t/g*100)):Math.min(100,Math.max(0,t)),D=e=>{if(!k.current)return t;const n=k.current.getBoundingClientRect(),r=L?Math.max(0,Math.min(100,(n.right-e)/n.width*100)):Math.max(0,Math.min(100,(e-n.left)/n.width*100));return g?Math.max(1,Math.min(g,Math.round(r/100*g))):Math.round(r)};return r(()=>{if(!h)return;const e=k.current;if(!e)return;const t=e=>{if(c)return;T(!0);const t=e.touches[0],n=D(t.clientX);i?.(n)},n=e=>{if(c||!E)return;e.preventDefault();const t=e.touches[0],n=D(t.clientX);i?.(n)},r=()=>{T(!1)};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",n,{passive:!1}),e.addEventListener("touchend",r,{passive:!0}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",r)}},[c,E,i,h]),r(()=>{if(E){const e=e=>{const t=D(e.clientX);i?.(t)},t=()=>{T(!1)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[E,i]),/* @__PURE__ */d("div",{className:o("flex items-center flex-shrink-0",e),children:[w&&/* @__PURE__ */u("div",{className:o(w,M),onClick:S}),
7
- /* @__PURE__ */u("div",{ref:k,className:o({"cursor-not-allowed":c,"cursor-pointer":!c&&h,"cursor-default":!c&&!h,"w-fit":!0,"h-fit":!0}),style:{userSelect:"none",WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",...s},onMouseDown:e=>{if(c||!h)return;T(!0);const t=D(e.clientX);i?.(t)},onMouseMove:e=>{if(c||!E||!h)return;const t=D(e.clientX);i?.(t)},onMouseUp:()=>{T(!1)},children:/* @__PURE__ */d("div",{className:o(f,"relative flex items-center overflow-hidden"),children:[
8
- /* @__PURE__ */u("div",{className:o(y,"absolute top-50% overflow-hidden -translate-y-50%",L?"right-0":"left-0",v?"":"transition-all duration-300"),style:{width:`${P()}%`},children:m?/* @__PURE__ */u("div",{className:o(m)}):null}),v&&/* @__PURE__ */u("div",{className:o(v,"absolute top-50% -translate-y-50% rtl:translate-x-50% ltr:-translate-x-50%"),style:{[L?"right":"left"]:`${(e=>{if(!v)return 0;const t=p??5;return t+e*(100-2*t)/100})(P())}%`}}),n&&/* @__PURE__ */u("div",{className:o("absolute top-50% -translate-y-50%",L?"left-10":"right-10"),children:`${P()}%`}),C&&C]})}),N&&/* @__PURE__ */u("div",{className:o(N,M),onClick:A})]})},U=t(({topRender:e,topCount:t=3,renderItem:r,onDataLoaded:c,className:h="",listClassName:m="",listStyle:f={},classNameStyle:y={},myRankRender:v,...p},g)=>{const[w,N]=l([]),[b,x]=l([]),[M,_]=l(null),$=a(null),C=a(!1),k=i(()=>Math.max(0,t),[t]),E=i(()=>k>0&&!!e,[k,e]),T=n((e,t,n)=>{x(t),_(n),E&&!C.current&&t.length>0&&(N(t.slice(0,k)),C.current=!0),c?.(e,t,n)},[k,E,c]),L=n((e,t)=>E&&t<k?null:r(e,t),[k,E,r]),S=n(()=>{N([]),x([]),_(null),C.current=!1},[]),A=n(()=>{$.current?.refresh(),S()},[S]),P=n(()=>{$.current?.clear(),S()},[S]),D=n(()=>b,[b]),R=n(()=>b.slice(k),[b,k]),O=n(()=>w,[w]);s(g,()=>({refresh:A,clear:P,getList:D,getRestList:R,getTopList:O}),[A,P,D,R,O]);const I=i(()=>E?e?.(w):null,[E,e,w]),H=i(()=>v&&M?v(M):null,[v,M]);/* @__PURE__ */
1
+ import e,{forwardRef as t,useCallback as n,useEffect as r,useImperativeHandle as s,useMemo as i,useRef as a,useState as l}from"react";import o from"clsx";import{Fragment as c,jsx as u,jsxs as d}from"react/jsx-runtime";import h from"dayjs";import m from"video-animation-player";var f=Object.create,y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,b=(e,t)=>function(){return t||(0,e[p(e)[0]])((t={exports:{}}).exports,t),t.exports},N=(e,t,n)=>(n=null!=e?f(g(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var s,i=p(t),a=0,l=i.length;a<l;a++)s=i[a],w.call(e,s)||void 0===s||y(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=v(t,s))||r.enumerable});return e})(!t&&e&&e.__esModule?n:y(n,"default",{value:e,enumerable:!0}),e));const x=new class{constructor(e=""){this.audioCache=/* @__PURE__ */new Map,this.loadingPromises=/* @__PURE__ */new Map,this.assetOrigin=e}setAssetOrigin(e){this.assetOrigin=e}preload(e){if(this.audioCache.has(e))return Promise.resolve();if(this.loadingPromises.has(e))return this.loadingPromises.get(e);const t=new Promise((t,n)=>{const r=e.startsWith("http")?e:`${this.assetOrigin}${e}`,s=new Audio(r);s.preload="auto";const i=()=>{this.audioCache.set(e,s),l(),t()},a=e=>{l(),n(e)},l=()=>{s.removeEventListener("canplaythrough",i),s.removeEventListener("error",a),this.loadingPromises.delete(e)};s.addEventListener("canplaythrough",i),s.addEventListener("error",a),s.load()});return this.loadingPromises.set(e,t),t}async preloadAll(e){await Promise.all(e.map(e=>this.preload(e)))}async play(e,t=1,n){try{this.audioCache.has(e)||await this.preload(e);const r=this.audioCache.get(e);if(!r)return;const s=r.cloneNode(!0);s.volume=Math.max(0,Math.min(1,t));const i=()=>{s.removeEventListener("ended",a),s.removeEventListener("error",l),s.remove()},a=()=>{n?.onEnded?.(),i()},l=e=>{n?.onError?.(new Error(e.message||"音频播放失败")),i()};s.addEventListener("ended",a),s.addEventListener("error",l),await s.play()}catch(r){n?.onError?.(r)}}stopAll(){this.audioCache.forEach(e=>{e.pause(),e.currentTime=0})}clear(){this.audioCache.forEach(e=>{e.src="",e.load()}),this.audioCache.clear(),this.loadingPromises.clear()}isCached(e){return this.audioCache.has(e)}getCacheSize(){return this.audioCache.size}},M=(e,t=1,n)=>x.play(e,t,n);var _=({audioUrl:e,volume:t=1,autoPlay:n=!0,onEnded:s,onError:i,onPlay:l})=>{const o=a("");return r(()=>{n&&o.current!==e&&(o.current=e,(async()=>{try{l?.(),await x.play(e,t,{onEnded:s,onError:i})}catch(n){i?.(n)}})())},[e,t,n,s,i,l]),null},$=e.forwardRef(({list:e=[],intervalTime:t=1600,className:c="",renderItem:d,tabClassName:h="",lines:m=2,lineHeight:f=25,tabClassNameStyle:y={},duration:v=8},p)=>{const[g,w]=l([]),b=a(1),N=a(0),x=a(null),M=a(e),_=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{M.current=e,N.current=0},[e]);const $=n(()=>{w(e=>e.slice(1))},[]),C=n(e=>(e-1)*f,[f]),E=n(()=>{const e=M.current;if(!e.length)return;const t=N.current,n=b.current;N.current=(N.current+1)%e.length,b.current=b.current%m+1;const r=e[t];if(!r)return;const s={...r,line:n,id:r?.id||String(Date.now()+Math.random())};w(e=>[...e,s])},[m]);return s(p,()=>({showNextBullet:E})),r(()=>{x.current=setInterval(()=>{E()},t);const e=()=>{window.document.hidden?(x.current&&(clearInterval(x.current),x.current=null),w([])):(w([]),E(),x.current&&clearInterval(x.current),x.current=setInterval(()=>{E()},t))};return window.document.addEventListener("visibilitychange",e),()=>{x.current&&clearInterval(x.current),window.document.removeEventListener("visibilitychange",e)}},[t,E]),g.length?/* @__PURE__ */u("div",{className:o("w-full relative",c),style:{"--barrage-duration":`${v}s`},children:Array.isArray(g)&&g.map((e,t)=>/* @__PURE__ */u("div",{className:o(h,"absolute z-3 w-fit h-fit rounded-50 flex items-center justify-center text-24 text-#fff",{"bullet-item-rtl":_,"bullet-item":!_}),"data-line":e.line,style:{top:e.line?`${C(e.line)}px`:void 0,...y},onAnimationEnd:$,children:d(e,t)},e?.id||`barrage-item-${t}`))}):null});$.displayName="Barrage";var C=$;const E=["tw","my","ph","en"],k=["tr"],T=["0","0"];var S=({time:e,background:t})=>{const n=i(()=>e?(e+"").padStart(2,"0").split(""):T,[e]);/* @__PURE__ */
2
+ return u("div",{className:`fcc ${t}`,dir:"ltr",children:Array(2).fill(0).map((e,t)=>/* @__PURE__ */u("div",{children:n[t]},t))})},L=/* @__PURE__ */N(/* @__PURE__ */b({"node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/duration.js":(e,t)=>{var n,r;n=e,r=function(){var e,t,n=1e3,r=6e4,s=36e5,i=864e5,a=/\[([^\]]+)]|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,l=31536e6,o=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:l,months:o,days:i,hours:s,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof g},h=function(e,t,n){return new g(e,n,t.$l)},m=function(e){return t.p(e)+"s"},f=function(e){return e<0},y=function(e){return f(e)?Math.ceil(e):Math.floor(e)},v=function(e){return Math.abs(e)},p=function(e,t){return e?f(e)?{negative:!0,format:""+v(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},g=function(){function f(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[m(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){r.$d[m(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var s=e.match(c);if(s){var i=s.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=i[0],this.$d.months=i[1],this.$d.weeks=i[2],this.$d.days=i[3],this.$d.hours=i[4],this.$d.minutes=i[5],this.$d.seconds=i[6],this.calMilliseconds(),this}}return this}var v=f.prototype;return v.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,n){return t+(e.$d[n]||0)*u[n]},0)},v.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=y(e/l),e%=l,this.$d.months=y(e/o),e%=o,this.$d.days=y(e/i),e%=i,this.$d.hours=y(e/s),e%=s,this.$d.minutes=y(e/r),e%=r,this.$d.seconds=y(e/n),e%=n,this.$d.milliseconds=e},v.toISOString=function(){var e=p(this.$d.years,"Y"),t=p(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=p(n,"D"),s=p(this.$d.hours,"H"),i=p(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var l=p(a,"S"),o=e.negative||t.negative||r.negative||s.negative||i.negative||l.negative,c=s.format||i.format||l.format?"T":"",u=(o?"-":"")+"P"+e.format+t.format+r.format+c+s.format+i.format+l.format;return"P"===u||"-P"===u?"P0D":u},v.toJSON=function(){return this.toISOString()},v.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(a,function(e,t){return t||String(r[e])})},v.as=function(e){return this.$ms/u[m(e)]},v.get=function(e){var t=this.$ms,n=m(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?y(t/u[n]):this.$d[n],t||0},v.add=function(e,t,n){var r;return r=t?e*u[m(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+r*(n?-1:1),this)},v.subtract=function(e,t){return this.add(e,t,!0)},v.locale=function(e){var t=this.clone();return t.$l=e,t},v.clone=function(){return h(this.$ms,this)},v.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},v.valueOf=function(){return this.asMilliseconds()},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},f}(),w=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,s){e=s,t=s().$utils(),s.duration=function(e,t){return h(e,{$l:s.locale()},t)},s.isDuration=d;var i=r.prototype.add,a=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?w(this,e,1):i.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?w(this,e,-1):a.bind(this)(e,t)}}},"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_duration=r()}})(),1);h.extend(L.default);var A=({targetTime:e,serverTime:t,refreshData:n,format:s="HH:mm:ss",className:c,backgroundClassName:d="",partClassName:m="",escapedTextClassName:f="",onEnd:y})=>{const[v,p]=l(0),[g,w]=l(0),[b,N]=l(0),[x,M]=l(0),[_,$]=l(!1),C=a(null),E=a(null),k=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),T=()=>{if(E.current){const{serverTime:e,localTime:t}=E.current;return e+(Date.now()-t)}return h().valueOf()},L=e=>{if(null==e||""===e||"0"===e)return 0;const t="string"==typeof e?parseInt(e,10):e;return isNaN(t)||t<=0||t<=T()?0:t},A=["dd","HH","mm","ss","d","H","m","s"],P=(e,t)=>{if(!e.startsWith(t))return null;const n="["===t?"]":t,r=e.indexOf(n,1);return-1===r?null:{content:e.slice(1,r),length:r+1}},D=e=>{const t=e.startsWith("d")?"day":e.startsWith("H")?"hour":e.startsWith("m")?"minute":"second";return{type:t,value:"day"===t?v:"hour"===t?g:"minute"===t?b:x}},R=(e,t,n)=>{const r=e[t+n.length];return!(r&&/[a-zA-Z]/.test(r))},O=e=>{for(let t=1;t<e.length;t++){const n=e[t];if("["===n||"'"===n)return t;for(const r of A)if(e.slice(t).startsWith(r)){const n=e[t-1],s=e[t+r.length];if(!(/[a-zA-Z]/.test(n)||s&&/[a-zA-Z]/.test(s)))return t}}return e.length},I=e=>{for(const t of A)if(e.startsWith(t)&&R(e,0,t)){const{type:e,value:n}=D(t);return{part:{type:e,value:n,format:t},length:t.length}}return null},H=()=>{C.current&&(clearInterval(C.current),C.current=void 0)},W=()=>{const{day:t,hour:r,minute:s,seconds:i}=(()=>{const t=L(e);if(0===t)return{day:0,hour:0,minute:0,seconds:0};const n=t-T();if(n<=0)return{day:0,hour:0,minute:0,seconds:0};const r=h.duration(n);return{day:Math.floor(r.asDays()),hour:r.hours(),minute:r.minutes(),seconds:r.seconds()}})();t+r+s+i>0?(p(t),w(r),N(s),M(i)):(p(0),w(0),N(0),M(0),H(),_||($(!0),n?.(),y?.()))};return r(()=>{if(t&&t>0)if(E.current){const{serverTime:e,localTime:n}=E.current,r=t-(e+(Date.now()-n));Math.abs(r)>500&&(E.current={serverTime:t,localTime:Date.now()})}else E.current={serverTime:t,localTime:Date.now()};else E.current=null},[t]),r(()=>{const t=L(e);return $(!1),W(),t>0&&t>T()&&(C.current=setInterval(W,1e3)),()=>{H()}},[e]),(()=>{const e=(()=>{const e=[];let t=k?(e=>{let t=-1,n="",r=-1,s="";for(const o of["HH","H"]){for(let r=0;r<=e.length-o.length;r++)if(e.slice(r,r+o.length)===o){const s=r>0?e[r-1]:"",i=r+o.length<e.length?e[r+o.length]:"";if(!/[a-zA-Z]/.test(s)&&!/[a-zA-Z]/.test(i)){t=r,n=o;break}}if(-1!==t)break}for(const o of["ss","s"]){for(let t=0;t<=e.length-o.length;t++)if(e.slice(t,t+o.length)===o){const n=t>0?e[t-1]:"",i=t+o.length<e.length?e[t+o.length]:"";if(!/[a-zA-Z]/.test(n)&&!/[a-zA-Z]/.test(i)){r=t,s=o;break}}if(-1!==r)break}if(-1===t||-1===r)return e;const i=e.split(""),a=n.length,l=s.length;for(let o=0;o<Math.max(a,l);o++)o<a&&o<l&&([i[t+o],i[r+o]]=[i[r+o],i[t+o]]);return i.join("")})(s):s;for(;t.length>0;){let n=!1;const r=P(t,"[");if(r&&(e.push({type:"text",value:r.content,format:"",textClassName:f}),t=t.slice(r.length),n=!0),!n){const r=P(t,"'");r&&(e.push({type:"text",value:r.content,format:"",textClassName:f}),t=t.slice(r.length),n=!0)}if(!n){const r=I(t);r&&(e.push(r.part),t=t.slice(r.length),n=!0)}if(!n){const n=O(t),r=t.slice(0,n);r&&e.push({type:"text",value:r,format:"",textClassName:m}),t=t.slice(n)}}return e})();/* @__PURE__ */
3
+ return u("div",{className:o(`fcc ${c}`),children:e.map((e,t)=>"text"===e.type?/* @__PURE__ */u("span",{className:o("mx-2 fcc whitespace-pre font-700",e.textClassName),children:e.value},t):/* @__PURE__ */u("div",{className:"fcc",children:/* @__PURE__ */u(S,{time:e.value,background:d??""})},t))})})()};const P=(e=!1)=>{const[t,n]=l(e);return[t,i(()=>({setTrue:()=>n(!0),setFalse:()=>n(!1),toggle:()=>n(e=>!e),set:e=>n(e)}),[])]},D=e=>{const t=a(e);return t.current=e,t};var R=({height:t,children:s,handleMore:i,hasMore:l=!0,className:o,style:c})=>{const[d,{setTrue:h,setFalse:m}]=P(!1),f=e.useRef(null),y=D(l),v=D(d),p=D(i),g=a(void 0),w=n(async()=>{if(y.current&&(()=>{if(!f.current)return!1;const{scrollTop:e,scrollHeight:t,clientHeight:n}=f.current;return t-n-e<10})()&&!v.current){h(),g.current&&clearTimeout(g.current);try{await(p.current?.())}finally{g.current=setTimeout(()=>{m()},500)}}},[y,v,p,h,m]);return r(()=>(w?.(),()=>{g.current&&clearTimeout(g.current)}),[w]),/* @__PURE__ */u("div",{className:`infinite-container ${o}`,ref:f,style:{maxHeight:t?t/7.5+"vw":void 0,height:"100%",overflowY:"auto",...c},onScroll:w,children:s})},O=({onRetry:e})=>/* @__PURE__ */u("div",{className:"minglex-the-list-error",children:/* @__PURE__ */d("div",{className:"minglex-the-list-error__content",children:[/* @__PURE__ */u("div",{className:"minglex-the-list-error__text",children:"error"}),/* @__PURE__ */u("button",{className:"minglex-the-list-error__retry-btn",onClick:e,children:"retry"})]})}),I=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-load-more",children:/* @__PURE__ */u("div",{className:"minglex-the-list-load-more__text",children:"loadMore..."})}),H=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-loading",children:/* @__PURE__ */u("div",{className:"minglex-the-list-loading__text",children:"loading..."})}),W=t(({url:e,params:t={},method:i="get",pageSize:h=10,dataKey:m="items",className:f,renderItem:y,onDataLoaded:v,finishRender:p,cursorKey:g,hasNextKey:w="has_next",myRankKey:b="my_rank",noDataRender:N,children:x,request:M,enablePadding:_=!1,useSimpleRender:$=!1,paddingThreshold:C,paddingPlaceholder:E={}},k)=>{const[T,S]=l([]),[L,A]=l(!1),[P,D]=l(!0),[W,Y]=l(null),[j,z]=l(!1),B=a(1),F=a(void 0),q=a(!1),U=n(()=>{const e={current_page:B.current,page_size:h,page:B.current,page_num:B.current,limit:h,offset:(B.current-1)*h,...t};return g&&void 0!==F.current&&(e[g]=F.current),Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{})},[h,t,g]),Z=n(t=>"get"===i.toLowerCase()?{url:e,method:i,params:t}:{url:e,method:i,data:t},[e,i]),V=n(e=>{const t=e?.data[w],n=e?.data[b];let r=e?.data[m]||e?.data?.records||e?.data?.ranks||[];const s="boolean"==typeof t&&t;if(_&&!s){const e=r.length,t=Math.min(C??h,h);if(e<t){const n=Array(t-e).fill(E);r=[...r,...n]}}if(g){const t=e?.data?.[g];null!=t&&(F.current=t)}return{newItems:r,hasMoreData:s,myRank:n||null}},[m,g,w,b,_,C,h,E]),X=n((e,t)=>{if(t)return S(e),e;{const t=[...T,...e];return S(t),t}},[T]),K=n(async()=>{const e=M||window?.__ZPD_REQUEST__?.request;if(!e)throw new Error("List: 请提供 request 函数\n方式1: 通过 props 传入 <List request={myRequest} ... />\n方式2: 在项目入口配置 window.__ZPD_REQUEST__ = { request: myRequest }");return await e(Z(U()))},[U,Z,M]),Q=n(async(e=!1)=>{if((!L||e)&&(!j||e))try{A(!0),Y(null),e&&(B.current=1);const t=await K(),{newItems:n,hasMoreData:r,myRank:s}=V(t);B.current=B.current+1,z(!r);const i=X(n,e);v?.(t.data,i,s)}catch(t){Y(t)}finally{A(!1),D(!1)}},[L,j,K,V,X,v]),J=n(async()=>{L||j||await Q(!1)},[Q,L,j]),G=n(async()=>{z(!1),Y(null),B.current=1,F.current=void 0,await Q(!0)},[Q]),ee=n(()=>{S([]),z(!0),B.current=1,F.current=void 0,Y(null),q.current=!1},[]),te=n(()=>T,[T]);if(s(k,()=>({refresh:G,clear:ee,getList:te}),[G,ee,te]),r(()=>{q.current||(q.current=!0,Q(!0))},[Q,q]),P)/* @__PURE__ */return u(H,{});if(W&&Array.isArray(T)&&0===T?.length)/* @__PURE__ */return u(O,{onRetry:G});if(Array.isArray(T)&&0===T?.length)return N?.()||null;const ne=()=>/* @__PURE__ */d(c,{children:[T.map((e,t)=>/* @__PURE__ */u("div",{className:"minglex-the-list__item",children:y(e,t)},`simple-list-item-${t}`)),L&&!j&&/* @__PURE__ */u(I,{}),j&&p?.(),x&&x]});/* @__PURE__ */
4
+ return u("div",$?{className:o("minglex-the-list-simple-render",f),children:ne()}:{className:o("minglex-the-list",f),children:/* @__PURE__ */u(R,{handleMore:J,hasMore:!j,className:"minglex-the-list__scroll",children:ne()})})});W.displayName="List";var Y=W,j=({musicUrl:e,playIconClass:t,pauseIconClass:n,className:s,loop:i=!0,autoPlay:h=!0,animationClassName:m="animate-spin-slow"})=>{const[f,y]=l(!1),v=a(null),p=a(!1);return r(()=>{const e=v.current;if(!e)return;const t=()=>y(!0),n=()=>y(!1);return e.addEventListener("play",t),e.addEventListener("pause",n),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",n)}},[]),r(()=>{const e=v.current;if(!e)return;const t=!e.paused;e.pause(),e.currentTime=0,e.load(),p.current=!1,t&&h&&e.play().catch(e=>{})},[e,h]),r(()=>{if(!h)return;const e=v.current;if(!e)return;const t=async()=>{try{return e.muted=!1,await e.play(),!0}catch{return!1}},n=()=>{e&&(e.muted=!1)},r=setTimeout(async()=>{if(p.current)return;if(p.current=!0,await t())return;if(await(async()=>{try{return e.muted=!0,await e.play(),!0}catch{return!1}})())return document.addEventListener("click",n,{once:!0}),document.addEventListener("touchstart",n,{once:!0}),void document.addEventListener("scroll",n,{once:!0});const r=async()=>{await t()};document.addEventListener("click",r,{once:!0}),document.addEventListener("touchstart",r,{once:!0})},100);return()=>{clearTimeout(r),document.removeEventListener("click",n),document.removeEventListener("touchstart",n),document.removeEventListener("scroll",n)}},[h]),/* @__PURE__ */d(c,{children:[/* @__PURE__ */u("div",{className:o(f?t:n,"transition-transform",f&&m?m:"",s),onClick:()=>{v.current&&(f?v.current.pause():v.current.play(),y(!f))}}),/* @__PURE__ */u("audio",{ref:v,src:e,loop:i})]})};function z(e,t){const r=a(!1),s=a(e);return s.current=e,n((...e)=>{r.current||(s.current(...e),r.current=!0,setTimeout(()=>{r.current=!1},t))},[t])}var B=({title:e,rightIcon:t="",leftIcon:n="",onRightClick:s,onLeftClick:h,type:m="close",className:f="",children:y,enableScrollBg:v=!1,scrollBgClassName:p="bg-black/60 backdrop-blur-sm",titleAlign:g="center",renderLeft:w,renderRight:b})=>{const[N,x]=l(!1),M=a(null),_=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{if(!v)return;const e=M.current;if(!e)return;const t=new IntersectionObserver(([e])=>{x(!e.isIntersecting)},{threshold:0,rootMargin:"0px"});return t.observe(e),()=>t.disconnect()},[v]);const $=z(()=>{h?.(),"close"!==m&&window.history.back()},400),C=z(()=>{s?.()},400),E=i(()=>w?w():n?/* @__PURE__ */u("div",{className:o(n,_&&"rotate-180"),onClick:$}):null,[w,n,_,$]),k=i(()=>b?b():/* @__PURE__ */u("div",{className:o(t),style:{visibility:t?"visible":"hidden"},onClick:C}),[b,t,C]),T=i(()=>e?/* @__PURE__ */u("span",{className:"center"===g?"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":"",children:e}):null,[e,g]);/* @__PURE__ */
5
+ return d(c,{children:[v&&/* @__PURE__ */u("div",{ref:M,className:"pointer-events-none absolute left-0 top-0 h-1 w-full"}),/* @__PURE__ */u("div",{className:o(f,"fixed left-0 top-0 z-99 h-fit w-full px-24 pt-90 text-#fff text-34 font-bold",v&&"transition-all duration-300",v&&N&&p),children:/* @__PURE__ */d("div",{className:"w-full flex items-center justify-between relative",children:["left"===g?/* @__PURE__ */d("div",{className:"flex items-center",children:[E,T,y]}):/* @__PURE__ */d(c,{children:[E,T,y]}),k]})})]})},F=({className:t,style:s,children:c,text:h,textClassName:m,pixelsPerSecond:f=20,speed:y,pauseOnHover:v=!1,gap:p,noOverflowClassName:g=""})=>{const w=a(null),b=a(null),N=a(null),[x,M]=l(y||8),[_,$]=l(!1),C=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{let e=null;const t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{if(!w.current||!N.current)return;const e=w.current,t=N.current,n=e.scrollWidth>t.clientWidth;$(n),n&&M(void 0===y?(e.scrollWidth+t.clientWidth)/f:y)},100)};t();const n=new ResizeObserver(t);return w.current&&n.observe(w.current),N.current&&n.observe(N.current),()=>{e&&clearTimeout(e),n.disconnect()}},[c,h,f,y]);const E=i(()=>c||(h&&Array.isArray(h)&&h?.length>0?h.map((e,t)=>/* @__PURE__ */u("span",{className:m,children:e},t)):h&&"string"==typeof h?/* @__PURE__ */u("span",{className:m,children:h}):null),[c,h,m]),k=n(t=>/* @__PURE__ */d(e.Fragment,void 0!==p?{children:[E,/* @__PURE__ */u("span",{className:o("inline-block",p)})]}:{children:[/* @__PURE__ */u("span",{style:{visibility:"visible"},children:E}),/* @__PURE__ */u("span",{style:{visibility:"hidden"},children:E})]},t),[E,p]),T=i(()=>/* @__PURE__ */u("div",{ref:w,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap"},children:E}),[E]);/* @__PURE__ */
6
+ return d("div",_?{ref:N,className:o("infinite-scroll",t,{"pause-on-hover":v}),style:{...s,"--t":`${x}s`},children:[/* @__PURE__ */u("div",{ref:b,className:o("infinite-scroll__track",{"infinite-scroll__track--animate":!C,"infinite-scroll__track--animate-rtl":C}),style:{animationDuration:`${x}s`},children:k("track-1")}),/* @__PURE__ */u("div",{className:o("infinite-scroll__track",{"infinite-scroll__track--animate":!C,"infinite-scroll__track--animate-rtl":C}),"aria-hidden":"true",style:{animationDuration:`${x}s`},children:k("track-2")})]}:{ref:N,className:o("infinite-scroll",t),style:s,children:[T,/* @__PURE__ */u("div",{className:o("w-full text-center text-nowrap",g),children:E})]})},q=({className:e="",value:t,showPercent:n=!1,style:s,onChange:i,disabled:c=!1,draggable:h=!0,innerImageClassName:m="",outerImageClassName:f="",innerClassName:y="",pointClassName:v="",pointOffsetPercent:p,maxCount:g,decreaseButtonClassName:w,increaseButtonClassName:b,onDecrease:N,onIncrease:x,buttonSpacing:M="mx-10",step:_=1,minValue:$,children:C})=>{const E=a(null),[k,T]=l(!1),S="rtl"===document.dir,L=N||(()=>{if(c||!i)return;const e=void 0!==$?$:g?1:0,n=Math.max(e,t-_);i?.(n)}),A=x||(()=>{if(c||!i)return;const e=g||100,n=Math.min(e,t+_);i?.(n)}),P=()=>g?Math.min(100,Math.floor(t/g*100)):Math.min(100,Math.max(0,t)),D=e=>{if(!E.current)return t;const n=E.current.getBoundingClientRect(),r=S?Math.max(0,Math.min(100,(n.right-e)/n.width*100)):Math.max(0,Math.min(100,(e-n.left)/n.width*100));return g?Math.max(1,Math.min(g,Math.round(r/100*g))):Math.round(r)};return r(()=>{if(!h)return;const e=E.current;if(!e)return;const t=e=>{if(c)return;T(!0);const t=e.touches[0],n=D(t.clientX);i?.(n)},n=e=>{if(c||!k)return;e.preventDefault();const t=e.touches[0],n=D(t.clientX);i?.(n)},r=()=>{T(!1)};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",n,{passive:!1}),e.addEventListener("touchend",r,{passive:!0}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",r)}},[c,k,i,h]),r(()=>{if(k){const e=e=>{const t=D(e.clientX);i?.(t)},t=()=>{T(!1)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[k,i]),/* @__PURE__ */d("div",{className:o("flex items-center flex-shrink-0",e),children:[w&&/* @__PURE__ */u("div",{className:o(w,M),onClick:L}),
7
+ /* @__PURE__ */u("div",{ref:E,className:o({"cursor-not-allowed":c,"cursor-pointer":!c&&h,"cursor-default":!c&&!h,"w-fit":!0,"h-fit":!0}),style:{userSelect:"none",WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",...s},onMouseDown:e=>{if(c||!h)return;T(!0);const t=D(e.clientX);i?.(t)},onMouseMove:e=>{if(c||!k||!h)return;const t=D(e.clientX);i?.(t)},onMouseUp:()=>{T(!1)},children:/* @__PURE__ */d("div",{className:o(f,"relative flex items-center overflow-hidden"),children:[
8
+ /* @__PURE__ */u("div",{className:o(y,"absolute top-50% overflow-hidden -translate-y-50%",S?"right-0":"left-0",v?"":"transition-all duration-300"),style:{width:`${P()}%`},children:m?/* @__PURE__ */u("div",{className:o(m)}):null}),v&&/* @__PURE__ */u("div",{className:o(v,"absolute top-50% -translate-y-50% rtl:translate-x-50% ltr:-translate-x-50%"),style:{[S?"right":"left"]:`${(e=>{if(!v)return 0;const t=p??5;return t+e*(100-2*t)/100})(P())}%`}}),n&&/* @__PURE__ */u("div",{className:o("absolute top-50% -translate-y-50%",S?"left-10":"right-10"),children:`${P()}%`}),C&&C]})}),b&&/* @__PURE__ */u("div",{className:o(b,M),onClick:A})]})},U=t(({topRender:e,topCount:t=3,renderItem:r,onDataLoaded:c,className:h="",listClassName:m="",listStyle:f={},classNameStyle:y={},myRankRender:v,...p},g)=>{const[w,b]=l([]),[N,x]=l([]),[M,_]=l(null),$=a(null),C=a(!1),E=i(()=>Math.max(0,t),[t]),k=i(()=>E>0&&!!e,[E,e]),T=n((e,t,n)=>{x(t),_(n),k&&!C.current&&t.length>0&&(b(t.slice(0,E)),C.current=!0),c?.(e,t,n)},[E,k,c]),S=n((e,t)=>k&&t<E?null:r(e,t),[E,k,r]),L=n(()=>{b([]),x([]),_(null),C.current=!1},[]),A=n(()=>{$.current?.refresh(),L()},[L]),P=n(()=>{$.current?.clear(),L()},[L]),D=n(()=>N,[N]),R=n(()=>N.slice(E),[N,E]),O=n(()=>w,[w]);s(g,()=>({refresh:A,clear:P,getList:D,getRestList:R,getTopList:O}),[A,P,D,R,O]);const I=i(()=>k?e?.(w):null,[k,e,w]),H=i(()=>v&&M?v(M):null,[v,M]);/* @__PURE__ */
9
9
  return d("div",{className:o("w-full",h),style:y,children:[I,
10
- /* @__PURE__ */u("div",{className:o("w-full",m),style:f,children:/* @__PURE__ */u(Y,{ref:$,...p,renderItem:L,onDataLoaded:T})}),H]})});U.displayName="RankList";var Z=U;const X=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"},K=e=>window.innerWidth/750*e;var V=({children:e,className:t="",shadowColor:n="#FFEE7B",shadowOffset:r=2,useResponsive:s=!0})=>{const i=s?X(r):`${r}px`;/* @__PURE__ */
11
- return u("div",{className:o(t),style:{fontFamily:"SF Pro Display",textShadow:`-${i} ${i} 0 ${n}, ${i} ${i} 0 ${n}, ${i} -${i} 0 ${n}, -${i} -${i} 0 ${n}`},children:e})},Q=({text:e,strokeWidth:t=4,fontSize:n=30,stroke:r="#F57E34",className:s=""})=>/* @__PURE__ */d("svg",{className:o("max-h-full max-w-full text-center",s),children:[/* @__PURE__ */u("text",{x:"50%",y:"50%",dominantBaseline:"middle",textAnchor:"middle",fontSize:X(n),fill:"none",stroke:r,strokeWidth:X(t),children:e}),/* @__PURE__ */u("text",{dominantBaseline:"middle",textAnchor:"middle",x:"50%",y:"50%",fontSize:X(n),fill:"#fff",children:e})]}),J=({tabs:e,activeValue:t,onTabClick:r,className:s="",renderTab:a,tabClassName:l,activeTabClassName:c,tabStyle:h,activeTabStyle:m,commonTabClassName:f})=>{const y=n((e,n)=>{e.disabled||e.value===t||r?.(e.value,n)},[r,t]),v=n((e,t,n)=>/* @__PURE__ */u("div",{className:o("flex-shrink-0",f,n?c:l),style:{...h,...n&&m},onClick:()=>y(e,t),children:e.label},e.value),[y,l,c,h,m,f]),p=n((e,t,n)=>a?/* @__PURE__ */u("div",{onClick:()=>y(e,t),className:"flex-shrink-0",children:a(e,t,n)},e.value):v(e,t,n),[a,y,v]),g=i(()=>e.find(e=>e.value===t),[e,t]);/* @__PURE__ */
12
- return d("div",{className:o("w-full relative overflow-x-hidden"),children:[/* @__PURE__ */u("div",{className:o("w-full flex items-center justify-between",s),children:Array.isArray(e)&&e.map((e,n)=>p(e,n,t===e.value))}),g?.children&&g?.children]})},G=({tabs:e,activeValue:t,onTabClick:s,className:l="",scrollDelay:c=50,disableAutoScroll:d=!1,renderTab:h,tabClassName:m="",activeTabClassName:f="",tabStyle:y,activeTabStyle:v,commonTabClassName:p="",tabItemOutClassName:g=""})=>{const w=a(null),N=a([]),b=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),x=n(e=>{if(!d)try{const t=w.current,n=N.current[e];if(!t||!n)return;const r=t.getBoundingClientRect(),s=n.getBoundingClientRect();if(s.left>=r.left&&s.right<=r.right){const e=r.left+r.width/2,t=s.left+s.width/2;if(Math.abs(e-t)<=r.width/4)return}const i=s.width,a=r.width;if(b){const e=s.left-r.left+t.scrollLeft-(a-i)/2,n=-(t.scrollWidth-a),l=Math.max(n,Math.min(0,e));t.scrollTo({left:l,behavior:"smooth"})}else{const e=s.left-r.left+t.scrollLeft-(a-i)/2;t.scrollTo({left:Math.max(0,e),behavior:"smooth"})}}catch(t){}},[d,e.length,b]);r(()=>{N.current=N.current.slice(0,e.length)},[e.length]);const M=i(()=>e.findIndex(e=>e.value===t),[e,t]);r(()=>{if(!e.length||d||-1===M)return;const t=setTimeout(()=>x(M),c);return()=>clearTimeout(t)},[M,x,c,d]);const _=n((e,n)=>{e?.disabled||e?.value===t||(s?.(e.value,n),x(n))},[s,x]),$=n((e,t,n)=>/* @__PURE__ */u("div",{ref:e=>{N.current[t]=e},className:o("flex-shrink-0",p,n?f:m),style:{...y,...n&&v},onClick:()=>_(e,t),children:e.label},e.label),[_,m,f,y,v]),C=n((e,t,n)=>h?/* @__PURE__ */u("div",{ref:e=>{N.current[t]=e},className:"flex-shrink-0",onClick:()=>_(e,t),children:h(e,t,n)},e.value):$(e,t,n),[h,_,$]);/* @__PURE__ */
13
- return u("div",{className:o("flex items-center relative w-full h-full overflow-hidden",l),children:/* @__PURE__ */u("div",{ref:w,className:"scrollbar-hide scrollbar-none h-full flex-1 flex-shrink-0 overflow-x-auto overflow-y-hidden scroll-smooth",children:/* @__PURE__ */u("div",{className:o("h-full min-w-max flex items-center",g),children:Array.isArray(e)&&e?.map((e,n)=>C(e,n,t===e.value))})})})},ee=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(n){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const te=e=>{const{autoScale:t=!0,onEnded:n,...s}=e,i=a(null),o=a(null),[c,u]=l(!1),d=a(n),h=a(!1);return r(()=>{d.current=n},[n]),r(()=>{if(h.current=!1,!i.current)return;const e=i.current;let n=!1;return(async()=>{if(e&&!h.current&&!n){h.current=!0;try{o.current&&(ee(o.current,e),o.current=null,u(!1));let r=s;if(t){const t=await(e=>new Promise(t=>{const n=e.getBoundingClientRect();n.width>0&&n.height>0?t(!0):requestAnimationFrame(()=>{const n=e.getBoundingClientRect();n.width>0&&n.height>0?t(!0):requestAnimationFrame(()=>{const n=e.getBoundingClientRect();t(n.width>0&&n.height>0)})})}))(e);if(n)return;t&&(r=((e,t)=>{const n=e.getBoundingClientRect(),r=n.width,s=n.height;if(0===r||0===s)return t;const i=2*r,a=2*s;return{...t,width:i,height:a}})(e,s))}o.current=((e,t,n)=>{e.innerHTML="";const r=new m({container:e,src:t.src,width:t.width||250,height:t.height||200,config:t.config,loop:t.loop??!0,mute:t.mute??!0,autoplay:t.autoplay??!0});return n&&r.on("ended",n),r.on("error",e=>{setTimeout(()=>{try{r.play?.()}catch(e){}},100)}),(e=>{requestAnimationFrame(()=>{const t=e.querySelector("canvas");t&&(t.style.width="100%",t.style.height="100%",t.style.display="block")})})(e),r})(e,r,()=>d.current?.()),u(!0)}catch(r){}finally{h.current=!1}}})(),()=>{n=!0,h.current=!1,o.current&&(ee(o.current,e),o.current=null),u(!1)}},[e.src]),{containerRef:i,vapInstance:o.current,isReady:c,play:()=>{try{o.current?.play?.()}catch(e){}},pause:()=>{try{o.current?.pause?.()}catch(e){}},reset:()=>{try{o.current?.pause?.(),o.current?.setTime?.(0)}catch(e){}}}};var ne=({className:e,style:t,visible:n=!0,keepAlive:s=!1,...i})=>{const{containerRef:a,isReady:l,play:o,reset:c}=te(i);return r(()=>{s&&(n&&l?o():!n&&l&&c())},[n,l,s,o,c]),/* @__PURE__ */u("div",{ref:a,className:e,style:{...t,display:s&&!n?"none":void 0}})},re="__MM__",se="__DD__",ie="__YYYY__";const ae=(e,t="yyyy/MM/dd hh:mm:ss",n,r="LOCALE")=>{if(!e)return"";let s;s="number"==typeof e?new Date(e<1e10?1e3*e:e):e;const i=((e,t)=>{if(!e)return e;let n=e;if((e=>!k.includes(e.toLowerCase()))(t)){n=n.replace(/yyyy/g,ie),n=n.replace(/MM/g,re),n=n.replace(/dd/g,se);const t=e.startsWith("yyyy"),r=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){n=n.replace(ie+"/",""),n=n.replace("/"+ie,""),n=n.replace(ie,""),n=n.replace(re,"__SWAP_MM__"),n=n.replace(se,re),n=n.replace("__SWAP_MM__",se);const e=n.match(/(\s+[hHmMsS:.]+.*)$/);if(e){const t=e[1];n=n.replace(t,"")+"/yyyy"+t}else n+="/yyyy"}else r?(n=n.replace(re,"__SWAP_MM__"),n=n.replace(se,re),n=n.replace("__SWAP_MM__",se),n=n.replace(ie,"yyyy")):(n=n.replace(re,"__SWAP_MM__"),n=n.replace(se,re),n=n.replace("__SWAP_MM__",se));n=n.replace(/__MM__/g,"MM"),n=n.replace(/__DD__/g,"dd"),n=n.replace(/__YYYY__/g,"yyyy")}return n=(e=>E.includes(e.toLowerCase()))(t)?n.replace(/:/g,"."):n,n})(t,window?.localStorage?.getItem(r)||n||"en");return((e,t="yyyy.MM.dd")=>{const n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(const r in n)if(/* @__PURE__ */new RegExp("("+r+")").test(t)){const e=1===RegExp.$1.length?String(n[r]):String(n[r]).padStart(2,"0");t=t.replace(RegExp.$1,e)}return"undefined"!=typeof document&&"rtl"===document.documentElement.dir?`‪${t}‬`:t})(s,i)};function le(e){try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function oe(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(window.navigator.userAgent)||/iPhone|iPod/.test(window.navigator.userAgent)}const ce=(e,t)=>{try{if(!e||!t)return!1;const n=e.split(".").map(e=>Number(e)),r=t.split(".").map(e=>Number(e));if(n.some(e=>isNaN(e))||r.some(e=>isNaN(e)))return!1;const s=Math.max(n.length,r.length);for(let e=0;e<s;e++){const t=n[e]||0,s=r[e]||0;if(t>s)return!0;if(t<s)return!1}return!0}catch{return!1}},ue=(e={})=>{const{volume:t=1,preloadUrls:s=[],clearOnUnmount:i=!1}=e,[o,c]=l(!1),u=a(!0);return r(()=>{if(0===s.length)return;let e=!1;return(async()=>{c(!0);try{await x.preloadAll(s)}catch(t){}finally{e||c(!1)}})(),()=>{e=!0}},[s]),r(()=>()=>{u.current=!1,i&&x.clear()},[i]),{play:n(async(e,n,r)=>{u.current&&await x.play(e,n??t,r)},[t]),preload:n(async e=>{await x.preload(e)},[]),preloadAll:n(async e=>{c(!0);try{await x.preloadAll(e)}finally{c(!1)}},[]),isCached:n(e=>x.isCached(e),[]),stopAll:n(()=>{x.stopAll()},[]),clear:n(()=>{x.clear()},[]),isLoading:o}};function de(e,t){const s=a(null),i=a(e);return i.current=e,r(()=>()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),n((...e)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i.current(...e),s.current=null},t)},[t])}const he=e=>{if(e.includes("?"))window.location.hash=e;else{const t=(e=>{const t=e.indexOf("?");return-1===t?"":e.slice(t)})(window.location.hash);window.location.hash=`${e}${t}`}};var me=()=>{const e=window.location.hash.replace(/^#/,""),t=e.indexOf("?");return-1===t?e:e.slice(0,t)||"/"};const fe=()=>{const[e,t]=l(me());return r(()=>{const e=()=>t(me());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,he]};export{_ as AudioEffect,C as Barrage,A as CountDown,Y as List,j as MusicPlayer,z as NavBar,F as NoticeBar,q as Progress,Z as RankList,V as ShadowText,Q as StrokeText,J as TabList,G as Tabs,ne as VapPlayer,x as audioManager,ce as checkVersion,ae as formatLocaleDate,K as getPx,le as getUrlParam,X as getVw,oe as isIOS,he as navigate,M as playSound,ue as useAudio,P as useBoolean,de as useDebounce,fe as useHashLocation,D as useLatest,B as useThrottle,te as useVap};
10
+ /* @__PURE__ */u("div",{className:o("w-full",m),style:f,children:/* @__PURE__ */u(Y,{ref:$,...p,renderItem:S,onDataLoaded:T})}),H]})});U.displayName="RankList";var Z=U;const V=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"},X=e=>window.innerWidth/750*e;var K=({children:e,className:t="",shadowColor:n="#FFEE7B",shadowOffset:r=2,useResponsive:s=!0})=>{const i=s?V(r):`${r}px`;/* @__PURE__ */
11
+ return u("div",{className:o(t),style:{fontFamily:"SF Pro Display",textShadow:`-${i} ${i} 0 ${n}, ${i} ${i} 0 ${n}, ${i} -${i} 0 ${n}, -${i} -${i} 0 ${n}`},children:e})},Q=({text:e,strokeWidth:t=4,fontSize:n=30,stroke:r="#F57E34",className:s=""})=>/* @__PURE__ */d("svg",{className:o("max-h-full max-w-full text-center",s),children:[/* @__PURE__ */u("text",{x:"50%",y:"50%",dominantBaseline:"middle",textAnchor:"middle",fontSize:V(n),fill:"none",stroke:r,strokeWidth:V(t),children:e}),/* @__PURE__ */u("text",{dominantBaseline:"middle",textAnchor:"middle",x:"50%",y:"50%",fontSize:V(n),fill:"#fff",children:e})]}),J=({tabs:e,activeValue:t,onTabClick:r,className:s="",renderTab:a,tabClassName:l,activeTabClassName:c,tabStyle:h,activeTabStyle:m,commonTabClassName:f})=>{const y=n((e,n)=>{e.disabled||e.value===t||r?.(e.value,n)},[r,t]),v=n((e,t,n)=>/* @__PURE__ */u("div",{className:o("flex-shrink-0",f,n?c:l),style:{...h,...n&&m},onClick:()=>y(e,t),children:e.label},e.value),[y,l,c,h,m,f]),p=n((e,t,n)=>a?/* @__PURE__ */u("div",{onClick:()=>y(e,t),className:"flex-shrink-0",children:a(e,t,n)},e.value):v(e,t,n),[a,y,v]),g=i(()=>e.find(e=>e.value===t),[e,t]);/* @__PURE__ */
12
+ return d("div",{className:o("w-full relative overflow-x-hidden"),children:[/* @__PURE__ */u("div",{className:o("w-full flex items-center justify-between",s),children:Array.isArray(e)&&e.map((e,n)=>p(e,n,t===e.value))}),g?.children&&g?.children]})},G=({tabs:e,activeValue:t,onTabClick:s,className:l="",scrollDelay:c=50,disableAutoScroll:d=!1,renderTab:h,tabClassName:m="",activeTabClassName:f="",tabStyle:y,activeTabStyle:v,commonTabClassName:p="",tabItemOutClassName:g=""})=>{const w=a(null),b=a([]),N=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),x=n(e=>{if(!d)try{const t=w.current,n=b.current[e];if(!t||!n)return;const r=t.getBoundingClientRect(),s=n.getBoundingClientRect();if(s.left>=r.left&&s.right<=r.right){const e=r.left+r.width/2,t=s.left+s.width/2;if(Math.abs(e-t)<=r.width/4)return}const i=s.width,a=r.width;if(N){const e=s.left-r.left+t.scrollLeft-(a-i)/2,n=-(t.scrollWidth-a),l=Math.max(n,Math.min(0,e));t.scrollTo({left:l,behavior:"smooth"})}else{const e=s.left-r.left+t.scrollLeft-(a-i)/2;t.scrollTo({left:Math.max(0,e),behavior:"smooth"})}}catch(t){}},[d,e.length,N]);r(()=>{b.current=b.current.slice(0,e.length)},[e.length]);const M=i(()=>e.findIndex(e=>e.value===t),[e,t]);r(()=>{if(!e.length||d||-1===M)return;const t=setTimeout(()=>x(M),c);return()=>clearTimeout(t)},[M,x,c,d]);const _=n((e,n)=>{e?.disabled||e?.value===t||(s?.(e.value,n),x(n))},[s,x]),$=n((e,t,n)=>/* @__PURE__ */u("div",{ref:e=>{b.current[t]=e},className:o("flex-shrink-0",p,n?f:m),style:{...y,...n&&v},onClick:()=>_(e,t),children:e.label},e.label),[_,m,f,y,v]),C=n((e,t,n)=>h?/* @__PURE__ */u("div",{ref:e=>{b.current[t]=e},className:"flex-shrink-0",onClick:()=>_(e,t),children:h(e,t,n)},e.value):$(e,t,n),[h,_,$]);/* @__PURE__ */
13
+ return u("div",{className:o("flex items-center relative w-full h-full overflow-hidden",l),children:/* @__PURE__ */u("div",{ref:w,className:"scrollbar-hide scrollbar-none h-full flex-1 flex-shrink-0 overflow-x-auto overflow-y-hidden scroll-smooth",children:/* @__PURE__ */u("div",{className:o("h-full min-w-max flex items-center",g),children:Array.isArray(e)&&e?.map((e,n)=>C(e,n,t===e.value))})})})},ee=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(n){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const te=e=>{const t=a(null),s=a(null),[i,o]=l(!1),c=a(!1),u=a(e);r(()=>{u.current=e});const d=n(async e=>{const n=t.current;if(!n||c.current)return!1;c.current=!0;try{s.current&&(ee(s.current,n),s.current=null,o(!1));const{autoScale:t=!0,onEnded:r,...i}=u.current;let a=i;if(t){const t=await(e=>new Promise(t=>{const n=e.getBoundingClientRect();n.width>0&&n.height>0?t(!0):requestAnimationFrame(()=>{const n=e.getBoundingClientRect();n.width>0&&n.height>0?t(!0):requestAnimationFrame(()=>{const n=e.getBoundingClientRect();t(n.width>0&&n.height>0)})})}))(n);if(e?.())return!1;t&&(a=((e,t)=>{const n=e.getBoundingClientRect(),r=n.width,s=n.height;if(0===r||0===s)return t;const i=2*r,a=2*s;return{...t,width:i,height:a}})(n,i))}return s.current=await((e,t,n)=>new Promise(r=>{e.innerHTML="";const s=new m({container:e,src:t.src,width:t.width||250,height:t.height||200,config:t.config,loop:t.loop??!0,mute:t.mute??!0,autoplay:t.autoplay??!0,beginPoint:0,accurate:!0});n&&s.on("ended",n),s.on("error",e=>{setTimeout(()=>s.play?.(),100)}),(e=>{requestAnimationFrame(()=>{const t=e.querySelector("canvas");t&&(t.style.width="100%",t.style.height="100%",t.style.display="block")})})(e);let i=!1;const a=()=>{i||(i=!0,r(s))};s.on("canplay",a),setTimeout(()=>{i||a()},2e3)}))(n,a,r),e?.()?(ee(s.current,n),s.current=null,!1):(o(!0),!0)}catch(r){return!1}finally{c.current=!1}},[]);r(()=>{if(c.current=!1,!t.current)return;const e=t.current;let n=!1;return d(()=>n),()=>{n=!0,c.current=!1,s.current&&(ee(s.current,e),s.current=null),o(!1)}},[e.src]);const h=n(()=>{try{s.current?.play?.()}catch(e){}},[]),f=n(()=>{try{s.current?.pause?.()}catch(e){}},[]),y=n(()=>{try{s.current?.pause?.(),s.current?.setTime?.(0)}catch(e){}},[]),v=n(()=>{try{s.current?.pause?.(),s.current?.setTime?.(0),setTimeout(()=>s.current?.play?.(),0)}catch(e){}},[]),p=n(async()=>await d(),[d]),g=n(()=>(e=>{if(!e)return!1;const t=e.querySelector("canvas");return null!==t&&null!==t.parentElement})(t.current),[]);return{containerRef:t,vapInstance:s.current,isReady:i,play:h,playFromStart:v,pause:f,reset:y,reinitialize:p,checkCanvasValid:g}};var ne=({className:e="",style:t,visible:s=!0,keepAlive:a=!1,...l})=>{const{containerRef:c,isReady:d,playFromStart:h,reset:m,reinitialize:f,checkCanvasValid:y}=te(i(()=>a?{...l,autoplay:!1}:l,[a,l.src]));r(()=>{a&&(s&&d?h():!s&&d&&m())},[s,d,a,h,m]);const v=n(async()=>{"visible"===document.visibilityState&&(y()||await f()&&s&&setTimeout(()=>h(),100))},[s,y,f,h]);return r(()=>{if(a)return document.addEventListener("visibilitychange",v),()=>{document.removeEventListener("visibilitychange",v)}},[a,v]),/* @__PURE__ */u("div",{ref:c,className:o("w-full h-full",e),style:{...t,opacity:a&&!s?0:1,pointerEvents:"none"}})},re="__MM__",se="__DD__",ie="__YYYY__";const ae=(e,t="yyyy/MM/dd hh:mm:ss",n,r="LOCALE")=>{if(!e)return"";let s;s="number"==typeof e?new Date(e<1e10?1e3*e:e):e;const i=((e,t)=>{if(!e)return e;let n=e;if((e=>!E.includes(e.toLowerCase()))(t)){n=n.replace(/yyyy/g,ie),n=n.replace(/MM/g,re),n=n.replace(/dd/g,se);const t=e.startsWith("yyyy"),r=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){n=n.replace(ie+"/",""),n=n.replace("/"+ie,""),n=n.replace(ie,""),n=n.replace(re,"__SWAP_MM__"),n=n.replace(se,re),n=n.replace("__SWAP_MM__",se);const e=n.match(/(\s+[hHmMsS:.]+.*)$/);if(e){const t=e[1];n=n.replace(t,"")+"/yyyy"+t}else n+="/yyyy"}else r?(n=n.replace(re,"__SWAP_MM__"),n=n.replace(se,re),n=n.replace("__SWAP_MM__",se),n=n.replace(ie,"yyyy")):(n=n.replace(re,"__SWAP_MM__"),n=n.replace(se,re),n=n.replace("__SWAP_MM__",se));n=n.replace(/__MM__/g,"MM"),n=n.replace(/__DD__/g,"dd"),n=n.replace(/__YYYY__/g,"yyyy")}return n=(e=>k.includes(e.toLowerCase()))(t)?n.replace(/:/g,"."):n,n})(t,window?.localStorage?.getItem(r)||n||"en");return((e,t="yyyy.MM.dd")=>{const n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(const r in n)if(/* @__PURE__ */new RegExp("("+r+")").test(t)){const e=1===RegExp.$1.length?String(n[r]):String(n[r]).padStart(2,"0");t=t.replace(RegExp.$1,e)}return"undefined"!=typeof document&&"rtl"===document.documentElement.dir?`‪${t}‬`:t})(s,i)};function le(e){try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function oe(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(window.navigator.userAgent)||/iPhone|iPod/.test(window.navigator.userAgent)}const ce=(e,t)=>{try{if(!e||!t)return!1;const n=e.split(".").map(e=>Number(e)),r=t.split(".").map(e=>Number(e));if(n.some(e=>isNaN(e))||r.some(e=>isNaN(e)))return!1;const s=Math.max(n.length,r.length);for(let e=0;e<s;e++){const t=n[e]||0,s=r[e]||0;if(t>s)return!0;if(t<s)return!1}return!0}catch{return!1}},ue=(e={})=>{const{volume:t=1,preloadUrls:s=[],clearOnUnmount:i=!1}=e,[o,c]=l(!1),u=a(!0);return r(()=>{if(0===s.length)return;let e=!1;return(async()=>{c(!0);try{await x.preloadAll(s)}catch(t){}finally{e||c(!1)}})(),()=>{e=!0}},[s]),r(()=>()=>{u.current=!1,i&&x.clear()},[i]),{play:n(async(e,n,r)=>{u.current&&await x.play(e,n??t,r)},[t]),preload:n(async e=>{await x.preload(e)},[]),preloadAll:n(async e=>{c(!0);try{await x.preloadAll(e)}finally{c(!1)}},[]),isCached:n(e=>x.isCached(e),[]),stopAll:n(()=>{x.stopAll()},[]),clear:n(()=>{x.clear()},[]),isLoading:o}};function de(e,t){const s=a(null),i=a(e);return i.current=e,r(()=>()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),n((...e)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i.current(...e),s.current=null},t)},[t])}const he=e=>{if(e.includes("?"))window.location.hash=e;else{const t=(e=>{const t=e.indexOf("?");return-1===t?"":e.slice(t)})(window.location.hash);window.location.hash=`${e}${t}`}};var me=()=>{const e=window.location.hash.replace(/^#/,""),t=e.indexOf("?");return-1===t?e:e.slice(0,t)||"/"};const fe=()=>{const[e,t]=l(me());return r(()=>{const e=()=>t(me());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,he]};export{_ as AudioEffect,C as Barrage,A as CountDown,Y as List,j as MusicPlayer,B as NavBar,F as NoticeBar,q as Progress,Z as RankList,K as ShadowText,Q as StrokeText,J as TabList,G as Tabs,ne as VapPlayer,x as audioManager,ce as checkVersion,ae as formatLocaleDate,X as getPx,le as getUrlParam,V as getVw,oe as isIOS,he as navigate,M as playSound,ue as useAudio,P as useBoolean,de as useDebounce,fe as useHashLocation,D as useLatest,z as useThrottle,te as useVap};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zpd-ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "A React component library",
5
5
  "type": "module",
6
6
  "main": "./dist/zpd-ui.cjs.js",