zpd-ui 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MingleX UI
1
+ # ZPD UI
2
2
 
3
3
  一个基于 React + TypeScript 的组件库。
4
4
 
@@ -243,7 +243,7 @@ function App() {
243
243
 
244
244
  ### NavBar 导航栏
245
245
 
246
- 导航栏组件,支持滚动变色和左右图标。
246
+ 导航栏组件,支持标题居中/左对齐、滚动变色、自定义左右侧内容等功能。
247
247
 
248
248
  #### Props
249
249
 
@@ -255,19 +255,66 @@ function App() {
255
255
  | onRightClick | `() => void` | - | 右侧点击回调 |
256
256
  | onLeftClick | `() => void` | - | 左侧点击回调 |
257
257
  | type | `'back' \| 'close'` | `'close'` | 左侧按钮类型 |
258
+ | className | `string` | `''` | 容器类名 |
259
+ | children | `React.ReactNode` | - | 自定义内容 |
258
260
  | enableScrollBg | `boolean` | `false` | 是否启用滚动变色 |
259
261
  | scrollBgClassName | `string` | `'bg-black/60 backdrop-blur-sm'` | 滚动时样式类名 |
262
+ | titleAlign | `'center' \| 'left'` | `'center'` | 标题对齐方式 |
263
+ | renderLeft | `() => React.ReactNode` | - | 自定义左侧内容(优先级高于 leftIcon) |
264
+ | renderRight | `() => React.ReactNode` | - | 自定义右侧内容(优先级高于 rightIcon) |
260
265
 
261
266
  #### 示例
262
267
 
263
268
  ```tsx
269
+ // 基础用法 - 标题居中
264
270
  <NavBar
265
- title="标题"
266
- leftIcon="icon-back"
267
- rightIcon="icon-more"
271
+ title="页面标题"
272
+ leftIcon="i-custom-back"
273
+ rightIcon="i-custom-more"
268
274
  onLeftClick={() => history.back()}
269
275
  enableScrollBg={true}
270
- scrollBgClassName="bg-black/60 backdrop-blur-sm"
276
+ />
277
+
278
+ // 左对齐模式 - 左侧图标和标题紧挨着
279
+ <NavBar
280
+ title="消息列表"
281
+ leftIcon="i-custom-back"
282
+ rightIcon="i-custom-search"
283
+ titleAlign="left"
284
+ />
285
+
286
+ // 自定义右侧内容 - 多个操作按钮
287
+ <NavBar
288
+ title="购物车"
289
+ leftIcon="i-custom-back"
290
+ renderRight={() => (
291
+ <div className="flex items-center gap-16">
292
+ <span className="text-24 text-gray-400" onClick={() => console.log('管理')}>
293
+ 管理
294
+ </span>
295
+ <div className="i-custom-search" onClick={() => console.log('搜索')} />
296
+ </div>
297
+ )}
298
+ />
299
+
300
+ // 完全自定义左右两侧
301
+ <NavBar
302
+ title="设置"
303
+ titleAlign="left"
304
+ renderLeft={() => (
305
+ <button className="flex items-center gap-8" onClick={() => history.back()}>
306
+ <div className="i-custom-back" />
307
+ <span className="text-24">返回</span>
308
+ </button>
309
+ )}
310
+ renderRight={() => (
311
+ <div className="flex items-center gap-16">
312
+ <button className="px-16 py-8 bg-blue-500 rounded-8 text-white">
313
+ 保存
314
+ </button>
315
+ <div className="i-custom-more" />
316
+ </div>
317
+ )}
271
318
  />
272
319
  ```
273
320
 
@@ -332,64 +379,102 @@ function App() {
332
379
 
333
380
  ### RankList 排行榜列表
334
381
 
335
- 排行榜列表组件,支持顶部展示和我的排名。
382
+ 排行榜列表组件,支持顶部展示和我的排名。自动将前 N 名单独渲染在顶部区域。
336
383
 
337
384
  #### Props
338
385
 
339
386
  | 属性 | 类型 | 默认值 | 描述 |
340
387
  |------|------|--------|------|
341
388
  | topRender | `(topList: T[]) => React.ReactNode` | - | 顶部渲染函数 |
342
- | topCount | `number` | `3` | 顶部数量 |
389
+ | topCount | `number` | `3` | 顶部数量(设为 0 则不渲染顶部区域) |
343
390
  | renderItem | `(item: T, index: number) => React.ReactNode` | - | 列表项渲染函数 |
344
391
  | myRankRender | `(myRank: T) => React.ReactNode` | - | 我的排名渲染函数 |
392
+ | className | `string` | `''` | 容器类名 |
393
+ | listClassName | `string` | `''` | 列表区域类名 |
394
+ | listStyle | `CSSProperties` | `{}` | 列表区域样式 |
395
+ | classNameStyle | `CSSProperties` | `{}` | 容器样式 |
345
396
  | ...ListProps | - | - | 继承 List 组件的所有属性 |
346
397
 
398
+ #### Ref 方法
399
+
400
+ | 方法 | 参数 | 返回值 | 描述 |
401
+ |------|------|--------|------|
402
+ | refresh | - | `void` | 刷新列表 |
403
+ | clear | - | `void` | 清空列表 |
404
+ | getList | - | `T[]` | 获取完整列表 |
405
+ | getTopList | - | `T[]` | 获取 Top 列表 |
406
+ | getRestList | - | `T[]` | 获取剩余列表(去除 Top) |
407
+
347
408
  #### 示例
348
409
 
349
410
  ```tsx
350
- <RankList
351
- url="/api/info"
352
- dataKey="ranks"
353
- params={{
354
- banner_name: 'spooky_hunt',
355
- }}
356
- request={request}
357
- cursorKey="last_id" // 如果服务端说他用last_id分页,你就这么写
358
- topCount={3}
359
- listClassName="h-600" // 这个必须要有高度
360
- topRender={topList => {
361
- return (
362
- <div className="mb-100 h-100 w-full bg-red-500">
363
- <div className="fcc flex-col justify-start">
364
- {topList.length > 0 ? (
365
- topList.map((item, index) => {
366
- return (
367
- <div key={index} className="mb-10">
368
- Top {index + 1}: {(item as { rank: number }).rank}
369
- </div>
370
- )
371
- })
372
- ) : (
373
- <div className="h-full fcc text-gray">
374
- <div>暂无 Top 3 数据</div>
375
- </div>
376
- )}
377
- </div>
378
- </div>
379
- )
380
- }}
381
- renderItem={(item, index) => (
382
- <div key={index} className="mb-10 h-100 w-full bg-pink">
383
- {(item as { rank: number }).rank}
384
- </div>
385
- )}
386
- noDataRender={() => {
387
- return <div className="h-100 w-full bg-pink">没有数据</div>
388
- }}
389
- finishRender={() => {
390
- return <div className="h-100 w-full text-center">没有更多数据</div>
391
- }}
392
- />
411
+ // 基础用法 - 前 3 名单独展示
412
+ <RankList
413
+ url="/api/ranks"
414
+ dataKey="ranks"
415
+ topCount={3}
416
+ listClassName="h-600"
417
+ topRender={topList => (
418
+ <div className="mb-20 flex justify-around">
419
+ {topList.map((item, index) => (
420
+ <div key={index} className="flex flex-col items-center">
421
+ <img src={item.avatar} className="h-80 w-80 rounded-full" />
422
+ <span className="text-20">Top {index + 1}</span>
423
+ <span className="text-24 font-bold">{item.name}</span>
424
+ </div>
425
+ ))}
426
+ </div>
427
+ )}
428
+ renderItem={(item, index) => (
429
+ <div key={index} className="flex items-center justify-between px-20 py-16">
430
+ <span className="text-gray-400">#{index + 1}</span>
431
+ <span>{item.name}</span>
432
+ <span className="text-24 font-bold">{item.score}</span>
433
+ </div>
434
+ )}
435
+ />
436
+
437
+ // 不渲染 Top 区域
438
+ <RankList
439
+ url="/api/ranks"
440
+ topCount={0} // 设为 0,不渲染 top 区域
441
+ renderItem={(item, index) => <RankItem data={item} />}
442
+ />
443
+
444
+ // 带我的排名
445
+ <RankList
446
+ url="/api/ranks"
447
+ topCount={3}
448
+ listClassName="h-600"
449
+ topRender={topList => <TopRankCard list={topList} />}
450
+ renderItem={(item, index) => <RankItem data={item} />}
451
+ myRankRender={myRank => (
452
+ <div className="fixed bottom-0 left-0 w-full bg-gradient-to-t from-black/80 px-20 py-16">
453
+ <div className="flex items-center justify-between">
454
+ <span>我的排名:#{myRank.rank}</span>
455
+ <span className="text-24 font-bold">{myRank.score}</span>
456
+ </div>
457
+ </div>
458
+ )}
459
+ />
460
+
461
+ // 使用 ref 方法
462
+ const rankListRef = useRef<RankListRef>(null)
463
+
464
+ <RankList
465
+ ref={rankListRef}
466
+ url="/api/ranks"
467
+ renderItem={(item) => <RankItem data={item} />}
468
+ />
469
+
470
+ // 刷新列表
471
+ <button onClick={() => rankListRef.current?.refresh()}>
472
+ 刷新
473
+ </button>
474
+
475
+ // 获取列表数据
476
+ const topList = rankListRef.current?.getTopList()
477
+ const fullList = rankListRef.current?.getList()
393
478
  ```
394
479
 
395
480
  ### ShadowText 阴影文字
@@ -43,6 +43,49 @@ import { type FC } from 'react';
43
43
  * <span className="text-28">自定义标题区域</span>
44
44
  * </div>
45
45
  * </NavBar>
46
+ *
47
+ * @example
48
+ * // 左对齐模式 - 左侧图标和标题紧挨着
49
+ * <NavBar
50
+ * title="页面标题"
51
+ * leftIcon="i-custom-back"
52
+ * rightIcon="i-custom-more"
53
+ * titleAlign="left"
54
+ * onLeftClick={() => console.log('返回')}
55
+ * onRightClick={() => console.log('更多')}
56
+ * />
57
+ *
58
+ * @example
59
+ * // 自定义右侧内容
60
+ * <NavBar
61
+ * title="购物车"
62
+ * leftIcon="i-custom-back"
63
+ * renderRight={() => (
64
+ * <div className="flex items-center gap-12">
65
+ * <span className="text-24 text-gray-400">管理</span>
66
+ * <div className="i-custom-more" />
67
+ * </div>
68
+ * )}
69
+ * />
70
+ *
71
+ * @example
72
+ * // 自定义左侧和右侧内容
73
+ * <NavBar
74
+ * title="消息"
75
+ * titleAlign="left"
76
+ * renderLeft={() => (
77
+ * <button className="flex items-center gap-8" onClick={() => history.back()}>
78
+ * <div className="i-custom-back" />
79
+ * <span className="text-24">返回</span>
80
+ * </button>
81
+ * )}
82
+ * renderRight={() => (
83
+ * <div className="flex items-center gap-16">
84
+ * <div className="i-custom-search" onClick={() => console.log('搜索')} />
85
+ * <div className="i-custom-more" onClick={() => console.log('更多')} />
86
+ * </div>
87
+ * )}
88
+ * />
46
89
  */
47
90
  export interface NavbarProps {
48
91
  title?: string;
@@ -55,6 +98,9 @@ export interface NavbarProps {
55
98
  children?: React.ReactNode;
56
99
  enableScrollBg?: boolean;
57
100
  scrollBgClassName?: string;
101
+ titleAlign?: 'center' | 'left';
102
+ renderLeft?: () => React.ReactNode;
103
+ renderRight?: () => React.ReactNode;
58
104
  }
59
105
  declare const Navbar: FC<NavbarProps>;
60
106
  export default Navbar;
@@ -41,6 +41,10 @@ export interface NoticeBarProps {
41
41
  * 如果不设置,将自动使用隐藏节点方式创建间隔
42
42
  */
43
43
  gap?: string;
44
+ /**
45
+ * 非溢出时的div样式控制
46
+ */
47
+ noOverflowClassName?: string;
44
48
  }
45
49
  declare const NoticeBar: React.FC<NoticeBarProps>;
46
50
  export default NoticeBar;
@@ -1,8 +1,9 @@
1
1
  import { useAudio, type UseAudioOptions, type UseAudioReturn } from './useAudio';
2
2
  import { useBoolean } from './useBoolean';
3
+ import { useDebounce } from './useDebounce';
3
4
  import { navigate, useHashLocation } from './useHashLocation';
4
5
  import { useLatest } from './useLatest';
5
6
  import { useThrottle } from './useThrottle';
6
7
  import { useVap, type UseVapOptions, type VapConfig } from './useVap';
7
- export { navigate, useAudio, useBoolean, useHashLocation, useLatest, useThrottle, useVap };
8
+ export { navigate, useAudio, useBoolean, useDebounce, useHashLocation, useLatest, useThrottle, useVap };
8
9
  export type { UseAudioOptions, UseAudioReturn, UseVapOptions, VapConfig };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 防抖 Hook
3
+ * 在事件被触发后延迟执行,如果在延迟期间再次触发则重新计时
4
+ * 适用场景:搜索输入、表单验证、窗口 resize 等高频触发但只需要最后一次结果的场景
5
+ *
6
+ * @param callback 要防抖的回调函数
7
+ * @param delay 防抖延迟时间(毫秒)
8
+ * @returns 返回一个防抖后的函数,可以像原函数一样调用
9
+ */
10
+ export declare function useDebounce<T extends (...args: never[]) => unknown>(callback: T, delay: number): T;
@@ -20,7 +20,7 @@ export declare const getLocaleDateFormat: (format: string, locale: string) => st
20
20
  export declare const formatDate: (date: Date, format?: string) => string;
21
21
  /**
22
22
  * 本地化日期格式化(结合语言环境) (主要就用这个)
23
- * @param date 日期对象或时间戳(毫秒)
23
+ * @param date Date 对象、秒级时间戳(10位)或毫秒级时间戳(13位)
24
24
  * @param format 原始格式
25
25
  * @param locale 语言代码(如 'en', 'ar', 'tr' 等)
26
26
  * @param localeKey localStorage 中存储语言设置的 key
@@ -31,9 +31,11 @@ export declare const formatDate: (date: Date, format?: string) => string;
31
31
  * // TW: formatLocaleDate(date, 'yyyy/MM/dd hh:mm', 'tw') -> '2024/01/30 23:59'
32
32
  * // AR: formatLocaleDate(date, 'yyyy/MM/dd hh:mm', 'ar') -> '30/01/2024 23:59'
33
33
  * // TR: formatLocaleDate(date, 'yyyy/MM/dd hh:mm', 'tr') -> '30/01/2024 23.59'
34
- * // 时间戳: formatLocaleDate(1706639985000, 'yyyy/MM/dd hh:mm:ss', 'tw') -> '2024/01/30 23:59:45'
34
+ * // 秒级时间戳(10位): formatLocaleDate(1706639985, 'yyyy/MM/dd hh:mm:ss', 'tw') -> '2024/01/30 23:59:45'
35
+ * // 毫秒级时间戳(13位): formatLocaleDate(1706639985000, 'yyyy/MM/dd hh:mm:ss', 'tw') -> '2024/01/30 23:59:45'
35
36
  * 用法示例:
36
- * {formatLocaleDate(new Date(itemInfo?.create_time), 'yyyy/MM/dd hh:mm:ss', currentLocale)}
37
- * {formatLocaleDate(itemInfo?.create_time, 'yyyy/MM/dd hh:mm:ss', currentLocale)}
37
+ * {formatLocaleDate(new Date(), 'yyyy/MM/dd hh:mm:ss', currentLocale)}
38
+ * {formatLocaleDate(1706639985, 'yyyy/MM/dd hh:mm:ss', currentLocale)} // 秒级
39
+ * {formatLocaleDate(1706639985000, 'yyyy/MM/dd hh:mm:ss', currentLocale)} // 毫秒级
38
40
  */
39
41
  export declare const formatLocaleDate: (date: Date | number, format?: string, locale?: string, localeKey?: string) => string;
@@ -1 +1 @@
1
- var e=Object.create,t=Object.defineProperty,s=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=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(r(i)):{},((e,r,i,l)=>{if(r&&"object"==typeof r||"function"==typeof r)for(var o,c=n(r),u=0,d=c.length;u<d;u++)o=c[u],a.call(e,o)||void 0===o||t(e,o,{get:(e=>r[e]).bind(null,o),enumerable:!(l=s(r,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,s)=>{const n=e.startsWith("http")?e:`${this.assetOrigin}${e}`,r=new Audio(n);r.preload="auto";const a=()=>{this.audioCache.set(e,r),l(),t()},i=e=>{l(),s(e)},l=()=>{r.removeEventListener("canplaythrough",a),r.removeEventListener("error",i),this.loadingPromises.delete(e)};r.addEventListener("canplaythrough",a),r.addEventListener("error",i),r.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,s){try{this.audioCache.has(e)||await this.preload(e);const n=this.audioCache.get(e);if(!n)return;const r=n.cloneNode(!0);r.volume=Math.max(0,Math.min(1,t));const a=()=>{r.removeEventListener("ended",i),r.removeEventListener("error",l),r.remove()},i=()=>{s?.onEnded?.(),a()},l=e=>{s?.onError?.(new Error(e.message||"音频播放失败")),a()};r.addEventListener("ended",i),r.addEventListener("error",l),await r.play()}catch(n){s?.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=1300,className:s="",renderItem:n,tabClassName:r="",lines:a=2,lineHeight:i=25,tabClassNameStyle:l={}},d)=>{const[h,f]=(0,o.useState)([]),m=(0,o.useRef)(1),p=(0,o.useRef)(0),y=(0,o.useRef)(null),v=(0,o.useRef)(e),g=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,o.useEffect)(()=>{v.current=e,p.current=0},[e]);const x=(0,o.useCallback)(()=>{f(e=>e.slice(1))},[]),w=(0,o.useCallback)(e=>(e-1)*i,[i]),b=(0,o.useCallback)(()=>{const e=v.current;if(!e.length)return;const t=p.current,s=m.current;p.current=(p.current+1)%e.length,m.current=m.current%a+1;const n=e[t];if(!n)return;const r={...n,line:s,id:n?.id||String(Date.now()+Math.random())};f(e=>[...e,r])},[a]);return(0,o.useImperativeHandle)(d,()=>({showNextBullet:b})),(0,o.useEffect)(()=>{y.current=setInterval(b,t);const e=()=>{window.document.hidden?y.current&&(clearInterval(y.current),y.current=null):y.current=setInterval(b,t)};return window.document.addEventListener("visibilitychange",e),()=>{y.current&&clearInterval(y.current),window.document.removeEventListener("visibilitychange",e)}},[t,b]),h.length?(0,u.jsx)("div",{className:(0,c.default)("w-full relative",s),children:Array.isArray(h)&&h.map((e,t)=>(0,u.jsx)("div",{className:(0,c.default)(r,"absolute z-3 w-fit h-fit rounded-50 flex items-center justify-center text-24 text-#fff",{"bullet-item-rtl":g,"bullet-item":!g}),"data-line":e.line,style:{top:e.line?`${w(e.line)}px`:void 0,...l},onAnimationEnd:x,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 s=(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",{className:"font-700",children:s[t]},t))})},w=l(i({"node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/duration.js":(e,t)=>{var s,n;s=e,n=function(){var e,t,s=1e3,n=6e4,r=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:r,minutes:n,seconds:s,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof g},h=function(e,t,s){return new g(e,s,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,s){var n=this;if(this.$d={},this.$l=s,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 r=e.match(c);if(r){var a=r.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,s){return t+(e.$d[s]||0)*u[s]},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/r),e%=r,this.$d.minutes=p(e/n),e%=n,this.$d.seconds=p(e/s),e%=s,this.$d.milliseconds=e},y.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),s=+this.$d.days||0;this.$d.weeks&&(s+=7*this.$d.weeks);var n=v(s,"D"),r=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||r.negative||a.negative||l.negative,c=r.format||a.format||l.format?"T":"",u=(o?"-":"")+"P"+e.format+t.format+n.format+c+r.format+a.format+l.format;return"P"===u||"-P"===u?"P0D":u},y.toJSON=function(){return this.toISOString()},y.format=function(e){var s=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 s.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,s=f(e);return"milliseconds"===s?t%=1e3:t="weeks"===s?p(t/u[s]):this.$d[s],t||0},y.add=function(e,t,s){var n;return n=t?e*u[f(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+n*(s?-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,s){return e.add(t.years()*s,"y").add(t.months()*s,"M").add(t.days()*s,"d").add(t.hours()*s,"h").add(t.minutes()*s,"m").add(t.seconds()*s,"s").add(t.milliseconds()*s,"ms")};return function(s,n,r){e=r,t=r().$utils(),r.duration=function(e,t){return h(e,{$l:r.locale()},t)},r.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):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_duration=n()}})(),1);d.default.extend(w.default);const b=(e=!1)=>{const[t,s]=(0,o.useState)(e);return[t,(0,o.useMemo)(()=>({setTrue:()=>s(!0),setFalse:()=>s(!1),toggle:()=>s(e=>!e),set:e=>s(e)}),[])]},N=e=>{const t=(0,o.useRef)(e);return t.current=e,t};var M=({height:e,children:t,handleMore:s,hasMore:n=!0,className:r,style:a})=>{const[i,{setTrue:l,setFalse:c}]=b(!1),d=o.default.useRef(null),h=N(n),f=N(i),m=N(s),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:s}=d.current;return t-s-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 ${r}`,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,u.jsx)("div",{className:"minglex-the-list-no-data",children:(0,u.jsx)("span",{children:"no data"})}),$=(0,o.forwardRef)(({url:e,params:t={},method:s="get",pageSize:n=10,dataKey:r="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,paddingThreshold:x,paddingPlaceholder:w={}},b)=>{const[N,$]=(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),H=(0,o.useRef)(void 0),I=(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!==H.current&&(e[h]=H.current),Object.entries(e).reduce((e,[t,s])=>(null!=s&&(e[t]=s),e),{})},[n,t,h]),Y=(0,o.useCallback)(t=>"get"===s.toLowerCase()?{url:e,method:s,params:t}:{url:e,method:s,data:t},[e,s]),B=(0,o.useCallback)(e=>{const t=e?.data[f],s=e?.data[m];let a=e?.data[r]||e?.data?.records||e?.data?.ranks||[],i="boolean"==typeof t&&t;if(g){const e=a.length,t=Math.min(x??n,n);if(e<t){const s=Array(t-e).fill(w);a=[...a,...s]}i=!1}if(h){const t=e?.data?.[h];null!=t&&(H.current=t)}return{newItems:a,hasMoreData:i,myRank:s||null}},[r,h,f,m,g,x,n,w]),z=(0,o.useCallback)((e,t)=>{if(t)return $(e),e;{const t=[...N,...e];return $(t),t}},[N]),F=(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 F(),{newItems:s,hasMoreData:n,myRank:r}=B(t);O.current=O.current+1,D(!n);const a=z(s,e);l?.(t.data,a,r)}catch(t){A(t)}finally{S(!1),L(!1)}},[E,P,F,B,z,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,H.current=void 0,await q(!0)},[q]),V=(0,o.useCallback)(()=>{$([]),D(!0),O.current=1,H.current=void 0,A(null),I.current=!1},[]),X=(0,o.useCallback)(()=>N,[N]);return(0,o.useImperativeHandle)(b,()=>({refresh:Z,clear:V,getList:X}),[Z,V,X]),(0,o.useEffect)(()=>{I.current||(I.current=!0,q(!0))},[q,I]),R?(0,u.jsx)(_,{}):T&&Array.isArray(N)&&0===N?.length?(0,u.jsx)(C,{onRetry:Z}):Array.isArray(N)&&0===N?.length?p?.()||(0,u.jsx)(j,{}):g?(0,u.jsxs)("div",{className:(0,c.default)("minglex-the-list",a),children:[N.map((e,t)=>(0,u.jsx)("div",{className:"minglex-the-list__item",children:i(e,t)},`simple-list-item-${t}`)),E&&(0,u.jsx)(k,{}),P&&d?.(),y&&y]}):(0,u.jsx)("div",{className:(0,c.default)("minglex-the-list",a),children:(0,u.jsxs)(M,{handleMore:U,hasMore:!P,className:"minglex-the-list__scroll",children:[N.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]})})});$.displayName="List";var E=$;function S(e,t){const s=(0,o.useRef)(!1),n=(0,o.useRef)(e);return n.current=e,(0,o.useCallback)((...e)=>{s.current||(n.current(...e),s.current=!0,setTimeout(()=>{s.current=!1},t))},[t])}var R=(0,o.forwardRef)(({topRender:e,topCount:t=3,renderItem:s,onDataLoaded:n,className:r="",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),N=Math.max(0,t),M=(0,o.useCallback)((e,t,s)=>{v(t),x(s),!b.current&&t.length>0&&(p(t.slice(0,N)),b.current=!0),n?.(e,t,s)},[N,n]),C=(0,o.useCallback)((e,t)=>t<N?null:s(e,t),[N,s]),k=(0,o.useCallback)(()=>{w.current?.refresh(),p([]),v([]),x(null),b.current=!1},[]),_=(0,o.useCallback)(()=>{w.current?.clear(),p([]),v([]),x(null),b.current=!1},[]),j=(0,o.useCallback)(()=>y,[y]),$=(0,o.useCallback)(()=>y.slice(N),[y,N]),S=(0,o.useCallback)(()=>m,[m]);(0,o.useImperativeHandle)(f,()=>({refresh:k,clear:_,getList:j,getRestList:$,getTopList:S}),[k,_,j,$,S]);const R=(0,o.useMemo)(()=>e?e(m):null,[e,m]),L=(0,o.useMemo)(()=>d&&g?d(g):null,[d,g]);return(0,u.jsxs)("div",{className:(0,c.default)("w-full",r),style:{width:"100%",...l},children:[R,(0,u.jsx)("div",{className:(0,c.default)("w-full",a),style:{width:"100%",...i},children:(0,u.jsx)(E,{ref:w,...h,renderItem:C,onDataLoaded:M})}),L]})});R.displayName="RankList";var L=R;const T=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"};var A=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(s){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const P=e=>{const{autoScale:t=!0,onEnded:s,...n}=e,r=(0,o.useRef)(null),a=(0,o.useRef)(null),[i,l]=(0,o.useState)(!1),c=(0,o.useRef)(s),u=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{c.current=s},[s]),(0,o.useEffect)(()=>{if(u.current=!1,!r.current)return;const e=r.current;let s=!1;return(async()=>{if(e&&!u.current&&!s){u.current=!0;try{a.current&&(A(a.current,e),a.current=null,l(!1));let r=n;if(t){const t=await(e=>new Promise(t=>{const s=e.getBoundingClientRect();s.width>0&&s.height>0?t(!0):requestAnimationFrame(()=>{const s=e.getBoundingClientRect();s.width>0&&s.height>0?t(!0):requestAnimationFrame(()=>{const s=e.getBoundingClientRect();t(s.width>0&&s.height>0)})})}))(e);if(s)return;t&&(r=((e,t)=>{const s=e.getBoundingClientRect(),n=s.width,r=s.height;if(0===n||0===r)return t;const a=2*n,i=2*r;return{...t,width:a,height:i}})(e,n))}a.current=((e,t,s)=>{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 s&&n.on("ended",s),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,r,()=>c.current?.()),l(!0)}catch(r){}finally{u.current=!1}}})(),()=>{s=!0,u.current=!1,a.current&&(A(a.current,e),a.current=null),l(!1)}},[e.src]),{containerRef:r,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 D="__MM__",O="__DD__",H="__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 W=()=>{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:s=!0,onEnded:n,onError:r,onPlay:a})=>{const i=(0,o.useRef)("");return(0,o.useEffect)(()=>{s&&i.current!==e&&(i.current=e,(async()=>{try{a?.(),await f.play(e,t,{onEnded:n,onError:r})}catch(s){r?.(s)}})())},[e,t,s,n,r,a]),null},exports.Barrage=p,exports.CountDown=({targetTime:e,serverTime:t,refreshData:s,format:n="HH:mm:ss",className:r,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),[N,M]=(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 s="["===t?"]":t,n=e.indexOf(s,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,s)=>{const n=e[t+s.length];return!(n&&/[a-zA-Z]/.test(n))},T=e=>{for(let t=1;t<e.length;t++){const s=e[t];if("["===s||"'"===s)return t;for(const n of E)if(e.slice(t).startsWith(n)){const s=e[t-1],r=e[t+n.length];if(!(/[a-zA-Z]/.test(s)||r&&/[a-zA-Z]/.test(r)))return t}}return e.length},A=e=>{for(const t of E)if(e.startsWith(t)&&L(e,0,t)){const{type:e,value:s}=R(t);return{part:{type:e,value:s,format:t},length:t.length}}return null},P=()=>{C.current&&(clearInterval(C.current),C.current=void 0)},D=()=>{const{day:t,hour:n,minute:r,seconds:a}=(()=>{const t=$(e);if(0===t)return{day:0,hour:0,minute:0,seconds:0};const s=t-j();if(s<=0)return{day:0,hour:0,minute:0,seconds:0};const n=d.default.duration(s);return{day:Math.floor(n.asDays()),hour:n.hours(),minute:n.minutes(),seconds:n.seconds()}})();t+n+r+a>0?(m(t),y(n),g(r),b(a)):(m(0),y(0),g(0),b(0),P(),N||(M(!0),s?.(),h?.()))};return(0,o.useEffect)(()=>{if(t&&t>0)if(k.current){const{serverTime:e,localTime:s}=k.current,n=t-(e+(Date.now()-s));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 M(!1),D(),t>0&&t>j()&&(C.current=setInterval(D,1e3)),()=>{P()}},[e]),(()=>{const e=(()=>{const e=[];let t=_?(e=>{let t=-1,s="",n=-1,r="";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 r=n>0?e[n-1]:"",a=n+o.length<e.length?e[n+o.length]:"";if(!/[a-zA-Z]/.test(r)&&!/[a-zA-Z]/.test(a)){t=n,s=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 s=t>0?e[t-1]:"",a=t+o.length<e.length?e[t+o.length]:"";if(!/[a-zA-Z]/.test(s)&&!/[a-zA-Z]/.test(a)){n=t,r=o;break}}if(-1!==n)break}if(-1===t||-1===n)return e;const a=e.split(""),i=s.length,l=r.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 s=!1;const n=S(t,"[");if(n&&(e.push({type:"text",value:n.content,format:"",textClassName:l}),t=t.slice(n.length),s=!0),!s){const n=S(t,"'");n&&(e.push({type:"text",value:n.content,format:"",textClassName:l}),t=t.slice(n.length),s=!0)}if(!s){const n=A(t);n&&(e.push(n.part),t=t.slice(n.length),s=!0)}if(!s){const s=T(t),n=t.slice(0,s);n&&e.push({type:"text",value:n,format:"",textClassName:i}),t=t.slice(s)}}return e})();return(0,u.jsx)("div",{className:(0,c.default)(`fcc ${r}`),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=E,exports.MusicPlayer=({musicUrl:e,playIconClass:t,pauseIconClass:s,className:n,loop:r=!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),s=()=>d(!1);return e.addEventListener("play",t),e.addEventListener("pause",s),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",s)}},[]),(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}},s=()=>{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",s,{once:!0}),document.addEventListener("touchstart",s,{once:!0}),void document.addEventListener("scroll",s,{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",s),document.removeEventListener("touchstart",s),document.removeEventListener("scroll",s)}},[a]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:(0,c.default)(l?t:s,"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:r})]})},exports.NavBar=({title:e,rightIcon:t="",leftIcon:s="",onRightClick:n,onLeftClick:r,type:a="close",className:i="",children:l,enableScrollBg:d=!1,scrollBgClassName:h="bg-black/60 backdrop-blur-sm"})=>{const[f,m]=(0,o.useState)(!1),p=(0,o.useRef)(null),y=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,o.useEffect)(()=>{if(!d)return;const e=p.current;if(!e)return;const t=new IntersectionObserver(([e])=>{m(!e.isIntersecting)},{threshold:0,rootMargin:"0px"});return t.observe(e),()=>{t.disconnect()}},[d]);const v=S(()=>{r?.(),"close"===a||window.history.back()},400),g=S(()=>{n?.()},400);return(0,u.jsxs)(u.Fragment,{children:[d&&(0,u.jsx)("div",{ref:p,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&&f&&h),children:(0,u.jsxs)("div",{className:(0,c.default)("w-full flex items-center justify-between relative"),children:[(0,u.jsx)("div",{className:(0,c.default)(s??"",y?"rotate-180":""),onClick:v}),e&&(0,u.jsx)("span",{children:e}),l&&l,(0,u.jsx)("div",{className:(0,c.default)(t??""),style:{visibility:t?"visible":"hidden"},onClick:g})]})})]})},exports.NoticeBar=({className:e,style:t,children:s,text:n,textClassName:r,pixelsPerSecond:a=20,speed:i,pauseOnHover:l=!1,gap:d})=>{const h=(0,o.useRef)(null),f=(0,o.useRef)(null),m=(0,o.useRef)(null),[p,y]=(0,o.useState)(i||8),[v,g]=(0,o.useState)(!1),x=(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(!h.current||!m.current)return;const e=h.current,t=m.current,s=e.scrollWidth>t.clientWidth;g(s),s&&y(void 0===i?(e.scrollWidth+t.clientWidth)/a:i)},100)};t();const s=new ResizeObserver(t);return h.current&&s.observe(h.current),m.current&&s.observe(m.current),()=>{e&&clearTimeout(e),s.disconnect()}},[s,n,a,i]);const w=(0,o.useMemo)(()=>s||(n&&Array.isArray(n)&&n?.length>0?n.map((e,t)=>(0,u.jsx)("span",{className:r,children:e},t)):n&&"string"==typeof n?(0,u.jsx)("span",{className:r,children:n}):null),[s,n,r]),b=(0,o.useCallback)(e=>void 0!==d?(0,u.jsxs)(o.default.Fragment,{children:[w,(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:w}),(0,u.jsx)("span",{style:{visibility:"hidden"},children:w})]},e),[w,d]),N=(0,o.useMemo)(()=>(0,u.jsx)("div",{ref:h,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap"},children:w}),[w]);return v?(0,u.jsxs)("div",{ref:m,className:(0,c.default)("infinite-scroll",e,{"pause-on-hover":l}),style:{...t,"--t":`${p}s`},children:[(0,u.jsx)("div",{ref:f,className:(0,c.default)("infinite-scroll__track",{"infinite-scroll__track--animate":!x,"infinite-scroll__track--animate-rtl":x}),style:{animationDuration:`${p}s`},children:b("track-1")}),(0,u.jsx)("div",{className:(0,c.default)("infinite-scroll__track",{"infinite-scroll__track--animate":!x,"infinite-scroll__track--animate-rtl":x}),"aria-hidden":"true",style:{animationDuration:`${p}s`},children:b("track-2")})]}):(0,u.jsxs)("div",{ref:m,className:(0,c.default)("infinite-scroll",e),style:t,children:[N,(0,u.jsx)("div",{className:"w-full text-center text-nowrap",children:w})]})},exports.Progress=({className:e="",value:t,showPercent:s=!1,style:n,onChange:r,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:N,children:M})=>{const C=(0,o.useRef)(null),[k,_]=(0,o.useState)(!1),j="rtl"===document.dir,$=g||(()=>{if(a||!r)return;const e=void 0!==N?N:p?1:0,s=Math.max(e,t-b);r?.(s)}),E=x||(()=>{if(a||!r)return;const e=p||100,s=Math.min(e,t+b);r?.(s)}),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 s=C.current.getBoundingClientRect(),n=j?Math.max(0,Math.min(100,(s.right-e)/s.width*100)):Math.max(0,Math.min(100,(e-s.left)/s.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],s=R(t.clientX);r?.(s)},s=e=>{if(a||!k)return;e.preventDefault();const t=e.touches[0],s=R(t.clientX);r?.(s)},n=()=>{_(!1)};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",s,{passive:!1}),e.addEventListener("touchend",n,{passive:!0}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",n)}},[a,k,r,i]),(0,o.useEffect)(()=>{if(k){const e=e=>{const t=R(e.clientX);r?.(t)},t=()=>{_(!1)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[k,r]),(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);r?.(t)},onMouseMove:e=>{if(a||!k||!i)return;const t=R(e.clientX);r?.(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())}%`}}),s&&(0,u.jsx)("div",{className:(0,c.default)("absolute top-50% -translate-y-50%",j?"left-10":"right-10"),children:`${S()}%`}),M&&M]})}),v&&(0,u.jsx)("div",{className:(0,c.default)(v,w),onClick:E})]})},exports.RankList=L,exports.ShadowText=({children:e,className:t="",shadowColor:s="#FFEE7B",shadowOffset:n=2,useResponsive:r=!0})=>{const a=r?T(n):`${n}px`;return(0,u.jsx)("div",{className:(0,c.default)(t),style:{fontFamily:"SF Pro Display",textShadow:`-${a} ${a} 0 ${s}, ${a} ${a} 0 ${s}, ${a} -${a} 0 ${s}, -${a} -${a} 0 ${s}`},children:e})},exports.StrokeText=({text:e,strokeWidth:t=4,fontSize:s=30,stroke:n="#F57E34",className:r=""})=>(0,u.jsxs)("svg",{className:(0,c.default)("max-h-full max-w-full text-center",r),children:[(0,u.jsx)("text",{x:"50%",y:"50%",dominantBaseline:"middle",textAnchor:"middle",fontSize:T(s),fill:"none",stroke:n,strokeWidth:T(t),children:e}),(0,u.jsx)("text",{dominantBaseline:"middle",textAnchor:"middle",x:"50%",y:"50%",fontSize:T(s),fill:"#fff",children:e})]}),exports.TabList=({tabs:e,activeValue:t,onTabClick:s,className:n="",renderTab:r,tabClassName:a,activeTabClassName:i,tabStyle:l,activeTabStyle:d,commonTabClassName:h})=>{const f=(0,o.useCallback)((e,n)=>{e.disabled||e.value===t||s?.(e.value,n)},[s,t]),m=(0,o.useCallback)((e,t,s)=>(0,u.jsx)("div",{className:(0,c.default)("flex-shrink-0",h,s?i:a),style:{...l,...s&&d},onClick:()=>f(e,t),children:e.label},e.value),[f,a,i,l,d,h]),p=(0,o.useCallback)((e,t,s)=>r?(0,u.jsx)("div",{onClick:()=>f(e,t),className:"flex-shrink-0",children:r(e,t,s)},e.value):m(e,t,s),[r,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,s)=>p(e,s,t===e.value))}),y?.children&&y?.children]})},exports.Tabs=({tabs:e,activeValue:t,onTabClick:s,className:n="",scrollDelay:r=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,s=v.current[e];if(!t||!s)return;const n=t.getBoundingClientRect(),r=s.getBoundingClientRect();if(r.left>=n.left&&r.right<=n.right){const e=n.left+n.width/2,t=r.left+r.width/2;if(Math.abs(e-t)<=n.width/4)return}const a=r.width,i=n.width;if(g){const e=n.right-r.right-(i-a)/2;t.scrollTo({left:-Math.max(0,e),behavior:"smooth"})}else{const e=r.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),r);return()=>clearTimeout(t)},[w,x,r,a]);const b=(0,o.useCallback)((e,n)=>{e?.disabled||e?.value===t||(s?.(e.value,n),x(n))},[s,x]),N=(0,o.useCallback)((e,t,s)=>(0,u.jsx)("div",{ref:e=>{v.current[t]=e},className:(0,c.default)("flex-shrink-0",m,s?d:l),style:{...h,...s&&f},onClick:()=>b(e,t),children:e.label},e.label),[b,l,d,h,f]),M=(0,o.useCallback)((e,t,s)=>i?(0,u.jsx)("div",{ref:e=>{v.current[t]=e},className:"flex-shrink-0",onClick:()=>b(e,t),children:i(e,t,s)},e.value):N(e,t,s),[i,b,N]);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,s)=>M(e,s,t===e.value))})})})},exports.VapPlayer=({className:e,style:t,visible:s=!0,keepAlive:n=!1,...r})=>{const{containerRef:a,isReady:i,play:l,reset:c}=P(r);return(0,o.useEffect)(()=>{n&&(s&&i?l():!s&&i&&c())},[s,i,n,l,c]),(0,u.jsx)("div",{ref:a,className:e,style:{...t,display:n&&!s?"none":void 0}})},exports.audioManager=f,exports.checkVersion=(e,t)=>{try{if(!e||!t)return!1;const s=e.split(".").map(e=>Number(e)),n=t.split(".").map(e=>Number(e));if(s.some(e=>isNaN(e))||n.some(e=>isNaN(e)))return!1;const r=Math.max(s.length,n.length);for(let e=0;e<r;e++){const t=s[e]||0,r=n[e]||0;if(t>r)return!0;if(t<r)return!1}return!0}catch{return!1}},exports.formatLocaleDate=(e,t="yyyy/MM/dd hh:mm:ss",s,n="LOCALE")=>e?((e,t="yyyy.MM.dd")=>{const s={"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 s)if(new RegExp("("+n+")").test(t)){const e=1===RegExp.$1.length?String(s[n]):String(s[n]).padStart(2,"0");t=t.replace(RegExp.$1,e)}return"undefined"!=typeof document&&"rtl"===document.documentElement.dir?`‪${t}‬`:t})("number"==typeof e?new Date(e):e,((e,t)=>{if(!e)return e;let s=e;if((e=>!y.includes(e.toLowerCase()))(t)){s=s.replace(/yyyy/g,H),s=s.replace(/MM/g,D),s=s.replace(/dd/g,O);const t=e.startsWith("yyyy"),n=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){s=s.replace(H+"/",""),s=s.replace("/"+H,""),s=s.replace(H,""),s=s.replace(D,"__SWAP_MM__"),s=s.replace(O,D),s=s.replace("__SWAP_MM__",O);const e=s.match(/(\s+[hHmMsS:.]+.*)$/);if(e){const t=e[1];s=s.replace(t,"")+"/yyyy"+t}else s+="/yyyy"}else n?(s=s.replace(D,"__SWAP_MM__"),s=s.replace(O,D),s=s.replace("__SWAP_MM__",O),s=s.replace(H,"yyyy")):(s=s.replace(D,"__SWAP_MM__"),s=s.replace(O,D),s=s.replace("__SWAP_MM__",O));s=s.replace(/__MM__/g,"MM"),s=s.replace(/__DD__/g,"dd"),s=s.replace(/__YYYY__/g,"yyyy")}return s=(e=>v.includes(e.toLowerCase()))(t)?s.replace(/:/g,"."):s,s})(t,window?.localStorage?.getItem(n)||s||"en")):"",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,s)=>f.play(e,t,s),exports.useAudio=(e={})=>{const{volume:t=1,preloadUrls:s=[],clearOnUnmount:n=!1}=e,[r,a]=(0,o.useState)(!1),i=(0,o.useRef)(!0);return(0,o.useEffect)(()=>{if(0===s.length)return;let e=!1;return(async()=>{a(!0);try{await f.preloadAll(s)}catch(t){}finally{e||a(!1)}})(),()=>{e=!0}},[s]),(0,o.useEffect)(()=>()=>{i.current=!1,n&&f.clear()},[n]),{play:(0,o.useCallback)(async(e,s,n)=>{i.current&&await f.play(e,s??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:r}},exports.useBoolean=b,exports.useHashLocation=()=>{const[e,t]=(0,o.useState)(W());return(0,o.useEffect)(()=>{const e=()=>t(W());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,I]},exports.useLatest=N,exports.useThrottle=S,exports.useVap=P;
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=1300,className:r="",renderItem:n,tabClassName:s="",lines:a=2,lineHeight:i=25,tabClassNameStyle:l={}},d)=>{const[h,f]=(0,o.useState)([]),m=(0,o.useRef)(1),p=(0,o.useRef)(0),y=(0,o.useRef)(null),v=(0,o.useRef)(e),g=(0,o.useMemo)(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);(0,o.useEffect)(()=>{v.current=e,p.current=0},[e]);const x=(0,o.useCallback)(()=>{f(e=>e.slice(1))},[]),w=(0,o.useCallback)(e=>(e-1)*i,[i]),b=(0,o.useCallback)(()=>{const e=v.current;if(!e.length)return;const t=p.current,r=m.current;p.current=(p.current+1)%e.length,m.current=m.current%a+1;const n=e[t];if(!n)return;const s={...n,line:r,id:n?.id||String(Date.now()+Math.random())};f(e=>[...e,s])},[a]);return(0,o.useImperativeHandle)(d,()=>({showNextBullet:b})),(0,o.useEffect)(()=>{y.current=setInterval(b,t);const e=()=>{window.document.hidden?y.current&&(clearInterval(y.current),y.current=null):y.current=setInterval(b,t)};return window.document.addEventListener("visibilitychange",e),()=>{y.current&&clearInterval(y.current),window.document.removeEventListener("visibilitychange",e)}},[t,b]),h.length?(0,u.jsx)("div",{className:(0,c.default)("w-full relative",r),children:Array.isArray(h)&&h.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":g,"bullet-item":!g}),"data-line":e.line,style:{top:e.line?`${w(e.line)}px`:void 0,...l},onAnimationEnd:x,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)}),[])]},N=e=>{const t=(0,o.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:c}]=b(!1),d=o.default.useRef(null),h=N(n),f=N(i),m=N(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,u.jsx)("div",{className:"minglex-the-list-no-data",children:(0,u.jsx)("span",{children:"no data"})}),$=(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,paddingThreshold:x,paddingPlaceholder:w={}},b)=>{const[N,$]=(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),H=(0,o.useRef)(void 0),I=(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!==H.current&&(e[h]=H.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||[],i="boolean"==typeof t&&t;if(g){const e=a.length,t=Math.min(x??n,n);if(e<t){const r=Array(t-e).fill(w);a=[...a,...r]}i=!1}if(h){const t=e?.data?.[h];null!=t&&(H.current=t)}return{newItems:a,hasMoreData:i,myRank:r||null}},[s,h,f,m,g,x,n,w]),F=(0,o.useCallback)((e,t)=>{if(t)return $(e),e;{const t=[...N,...e];return $(t),t}},[N]),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,H.current=void 0,await q(!0)},[q]),V=(0,o.useCallback)(()=>{$([]),D(!0),O.current=1,H.current=void 0,A(null),I.current=!1},[]),X=(0,o.useCallback)(()=>N,[N]);return(0,o.useImperativeHandle)(b,()=>({refresh:Z,clear:V,getList:X}),[Z,V,X]),(0,o.useEffect)(()=>{I.current||(I.current=!0,q(!0))},[q,I]),R?(0,u.jsx)(_,{}):T&&Array.isArray(N)&&0===N?.length?(0,u.jsx)(C,{onRetry:Z}):Array.isArray(N)&&0===N?.length?p?.()||(0,u.jsx)(j,{}):g?(0,u.jsxs)("div",{className:(0,c.default)("minglex-the-list",a),children:[N.map((e,t)=>(0,u.jsx)("div",{className:"minglex-the-list__item",children:i(e,t)},`simple-list-item-${t}`)),E&&(0,u.jsx)(k,{}),P&&d?.(),y&&y]}):(0,u.jsx)("div",{className:(0,c.default)("minglex-the-list",a),children:(0,u.jsxs)(M,{handleMore:U,hasMore:!P,className:"minglex-the-list__scroll",children:[N.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]})})});$.displayName="List";var E=$;function S(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 R=(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),N=(0,o.useMemo)(()=>Math.max(0,t),[t]),M=(0,o.useMemo)(()=>N>0&&!!e,[N,e]),C=(0,o.useCallback)((e,t,r)=>{v(t),x(r),M&&!b.current&&t.length>0&&(p(t.slice(0,N)),b.current=!0),n?.(e,t,r)},[N,M,n]),k=(0,o.useCallback)((e,t)=>M&&t<N?null:r(e,t),[N,M,r]),_=(0,o.useCallback)(()=>{p([]),v([]),x(null),b.current=!1},[]),j=(0,o.useCallback)(()=>{w.current?.refresh(),_()},[_]),$=(0,o.useCallback)(()=>{w.current?.clear(),_()},[_]),S=(0,o.useCallback)(()=>y,[y]),R=(0,o.useCallback)(()=>y.slice(N),[y,N]),L=(0,o.useCallback)(()=>m,[m]);(0,o.useImperativeHandle)(f,()=>({refresh:j,clear:$,getList:S,getRestList:R,getTopList:L}),[j,$,S,R,L]);const T=(0,o.useMemo)(()=>M?e?.(m):null,[M,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)(E,{ref:w,...h,renderItem:k,onDataLoaded:C})}),A]})});R.displayName="RankList";var L=R;const T=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"};var A=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(r){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const P=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&&(A(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&&(A(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 D="__MM__",O="__DD__",H="__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 W=()=>{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),[N,M]=(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(),N||(M(!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 M(!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=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,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=S(()=>{s?.(),"close"!==a&&window.history.back()},400),b=S(()=>{n?.()},400),N=(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]),M=(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:[N,C,l]}):(0,u.jsxs)(u.Fragment,{children:[N,C,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,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]),N=(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]),M=(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:N("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:N("track-2")})]}):(0,u.jsxs)("div",{ref:p,className:(0,c.default)("infinite-scroll",e),style:t,children:[M,(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:N,children:M})=>{const C=(0,o.useRef)(null),[k,_]=(0,o.useState)(!1),j="rtl"===document.dir,$=g||(()=>{if(a||!s)return;const e=void 0!==N?N: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()}%`}),M&&M]})}),v&&(0,u.jsx)("div",{className:(0,c.default)(v,w),onClick:E})]})},exports.RankList=L,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,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: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,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=n.right-s.right-(i-a)/2;t.scrollTo({left:-Math.max(0,e),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]),N=(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]),M=(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):N(e,t,r),[i,b,N]);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)=>M(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}=P(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,H),r=r.replace(/MM/g,D),r=r.replace(/dd/g,O);const t=e.startsWith("yyyy"),n=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){r=r.replace(H+"/",""),r=r.replace("/"+H,""),r=r.replace(H,""),r=r.replace(D,"__SWAP_MM__"),r=r.replace(O,D),r=r.replace("__SWAP_MM__",O);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(D,"__SWAP_MM__"),r=r.replace(O,D),r=r.replace("__SWAP_MM__",O),r=r.replace(H,"yyyy")):(r=r.replace(D,"__SWAP_MM__"),r=r.replace(O,D),r=r.replace("__SWAP_MM__",O));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,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)(W());return(0,o.useEffect)(()=>{const e=()=>t(W());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,I]},exports.useLatest=N,exports.useThrottle=S,exports.useVap=P;
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-10{left:10px}.left-50\%{left:50%}.right-0{right:0}.right-10{right:10px}.top-0{top:0}.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-0{margin-left:0}.ml-1{margin-left:1px}.ml-2{margin-left:2px}.mr-0{margin-right:0}[dir=ltr] .ltr\:mr-12{margin-right:12px}[dir=rtl] .rtl\:ml-12{margin-left:12px}.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-74{height:74px}.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-206{width:206px}.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-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-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}.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-\#B3BAC5{--un-border-opacity:1;border-color:rgb(179 186 197/var(--un-border-opacity))}.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-40{border-radius:40px}.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-30{font-size:30px}.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-\#838995{--un-text-opacity:1;color:rgb(131 137 149/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-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{-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}@keyframes rightToLeft{0%{transform:translate(100vw)}to{transform:translate(-100%)}}@keyframes leftToRight{0%{transform:translate(-100vw)}to{transform:translate(100%)}}.bullet-item{animation:6s linear both rightToLeft}.bullet-item-rtl{animation:6s linear both leftToRight}.minglex-the-list{width:100%;height:100%;margin-left:auto;margin-right:auto;overflow:hidden}.minglex-the-list__scroll{height:100%}.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-0{margin-left:0}.ml-1{margin-left:1px}.ml-2{margin-left:2px}.mr-0{margin-right:0}[dir=ltr] .ltr\:mr-12{margin-right:12px}[dir=rtl] .rtl\:ml-12{margin-left:12px}.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-74{height:74px}.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-206{width:206px}.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-\#B3BAC5{--un-border-opacity:1;border-color:rgb(179 186 197/var(--un-border-opacity))}.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-40{border-radius:40px}.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-30{font-size:30px}.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-\#838995{--un-text-opacity:1;color:rgb(131 137 149/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{-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{animation:6s linear both rightToLeft}.bullet-item-rtl{animation:6s linear both leftToRight}.minglex-the-list{width:100%;height:100%;margin-left:auto;margin-right:auto;overflow:hidden}.minglex-the-list__scroll{height:100%}.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%)}}
2
2
  /*$vite$:1*/
package/dist/zpd-ui.es.js CHANGED
@@ -1,14 +1,12 @@
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}},_=(e,t=1,n)=>x.play(e,t,n);var M=({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=1300,className:c="",renderItem:d,tabClassName:h="",lines:m=2,lineHeight:f=25,tabClassNameStyle:y={}},v)=>{const[p,g]=l([]),w=a(1),N=a(0),b=a(null),x=a(e),_=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{x.current=e,N.current=0},[e]);const M=n(()=>{g(e=>e.slice(1))},[]),$=n(e=>(e-1)*f,[f]),C=n(()=>{const e=x.current;if(!e.length)return;const t=N.current,n=w.current;N.current=(N.current+1)%e.length,w.current=w.current%m+1;const r=e[t];if(!r)return;const s={...r,line:n,id:r?.id||String(Date.now()+Math.random())};g(e=>[...e,s])},[m]);return s(v,()=>({showNextBullet:C})),r(()=>{b.current=setInterval(C,t);const e=()=>{window.document.hidden?b.current&&(clearInterval(b.current),b.current=null):b.current=setInterval(C,t)};return window.document.addEventListener("visibilitychange",e),()=>{b.current&&clearInterval(b.current),window.document.removeEventListener("visibilitychange",e)}},[t,C]),p.length?/* @__PURE__ */u("div",{className:o("w-full relative",c),children:Array.isArray(p)&&p.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?`${$(e.line)}px`:void 0,...y},onAnimationEnd:M,children:d(e,t)},e?.id||`barrage-item-${t}`))}):null});$.displayName="Barrage";var C=$;const k=["tw","my","ph","en"],E=["tr"],L=["0","0"];var S=({time:e,background:t})=>{const n=i(()=>e?(e+"").padStart(2,"0").split(""):L,[e]);/* @__PURE__ */
2
- return u("div",{className:`fcc ${t}`,dir:"ltr",children:Array(2).fill(0).map((e,t)=>/* @__PURE__ */u("div",{className:"font-700",children:n[t]},t))})},T=/* @__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(T.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,_]=l(0),[M,$]=l(!1),C=a(null),k=a(null),E=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]),L=()=>{if(k.current){const{serverTime:e,localTime:t}=k.current;return e+(Date.now()-t)}return h().valueOf()},T=e=>{if(null==e||""===e||"0"===e)return 0;const t="string"==typeof e?parseInt(e,10):e;return isNaN(t)||t<=0||t<=L()?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},H=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},I=()=>{C.current&&(clearInterval(C.current),C.current=void 0)},W=()=>{const{day:t,hour:r,minute:s,seconds:i}=(()=>{const t=T(e);if(0===t)return{day:0,hour:0,minute:0,seconds:0};const n=t-L();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),_(i)):(p(0),w(0),b(0),_(0),I(),M||($(!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=T(e);return $(!1),W(),t>0&&t>L()&&(C.current=setInterval(W,1e3)),()=>{I()}},[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=H(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"})]})}),H=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-load-more",children:/* @__PURE__ */u("div",{className:"minglex-the-list-load-more__text",children:"loadMore..."})}),I=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-loading",children:/* @__PURE__ */u("div",{className:"minglex-the-list-loading__text",children:"loading..."})}),W=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-no-data",children:/* @__PURE__ */u("span",{children:"no data"})}),Y=t(({url:e,params:t={},method:i="get",pageSize:c=10,dataKey:h="items",className:m,renderItem:f,onDataLoaded:y,finishRender:v,cursorKey:p,hasNextKey:g="has_next",myRankKey:w="my_rank",noDataRender:N,children:b,request:x,enablePadding:_=!1,paddingThreshold:M,paddingPlaceholder:$={}},C)=>{const[k,E]=l([]),[L,S]=l(!1),[T,A]=l(!0),[P,D]=l(null),[Y,j]=l(!1),B=a(1),z=a(void 0),F=a(!1),q=n(()=>{const e={current_page:B.current,page_size:c,page:B.current,page_num:B.current,limit:c,offset:(B.current-1)*c,...t};return p&&void 0!==z.current&&(e[p]=z.current),Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{})},[c,t,p]),U=n(t=>"get"===i.toLowerCase()?{url:e,method:i,params:t}:{url:e,method:i,data:t},[e,i]),Z=n(e=>{const t=e?.data[g],n=e?.data[w];let r=e?.data[h]||e?.data?.records||e?.data?.ranks||[],s="boolean"==typeof t&&t;if(_){const e=r.length,t=Math.min(M??c,c);if(e<t){const n=Array(t-e).fill($);r=[...r,...n]}s=!1}if(p){const t=e?.data?.[p];null!=t&&(z.current=t)}return{newItems:r,hasMoreData:s,myRank:n||null}},[h,p,g,w,_,M,c,$]),X=n((e,t)=>{if(t)return E(e),e;{const t=[...k,...e];return E(t),t}},[k]),K=n(async()=>{const e=x||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(U(q()))},[q,U,x]),V=n(async(e=!1)=>{if((!L||e)&&(!Y||e))try{S(!0),D(null),e&&(B.current=1);const t=await K(),{newItems:n,hasMoreData:r,myRank:s}=Z(t);B.current=B.current+1,j(!r);const i=X(n,e);y?.(t.data,i,s)}catch(t){D(t)}finally{S(!1),A(!1)}},[L,Y,K,Z,X,y]),Q=n(async()=>{L||Y||await V(!1)},[V,L,Y]),J=n(async()=>{j(!1),D(null),B.current=1,z.current=void 0,await V(!0)},[V]),G=n(()=>{E([]),j(!0),B.current=1,z.current=void 0,D(null),F.current=!1},[]),ee=n(()=>k,[k]);return s(C,()=>({refresh:J,clear:G,getList:ee}),[J,G,ee]),r(()=>{F.current||(F.current=!0,V(!0))},[V,F]),T?/* @__PURE__ */u(I,{}):P&&Array.isArray(k)&&0===k?.length?/* @__PURE__ */u(O,{onRetry:J}):Array.isArray(k)&&0===k?.length?N?.()||/* @__PURE__ */u(W,{}):_?/* @__PURE__ */d("div",{className:o("minglex-the-list",m),children:[k.map((e,t)=>/* @__PURE__ */u("div",{className:"minglex-the-list__item",children:f(e,t)},`simple-list-item-${t}`)),L&&/* @__PURE__ */u(H,{}),Y&&v?.(),b&&b]}):/* @__PURE__ */u("div",{className:o("minglex-the-list",m),children:/* @__PURE__ */d(R,{handleMore:Q,hasMore:!Y,className:"minglex-the-list__scroll",children:[k.map((e,t)=>/* @__PURE__ */u("div",{className:"minglex-the-list__item",children:f(e,t)},`simple-list-item-${t}`)),L&&!Y&&/* @__PURE__ */u(H,{}),Y&&v?.(),b&&b]})})});Y.displayName="List";var j=Y,B=({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 F=({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"})=>{const[g,w]=l(!1),N=a(null),b=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{if(!v)return;const e=N.current;if(!e)return;const t=new IntersectionObserver(([e])=>{w(!e.isIntersecting)},{threshold:0,rootMargin:"0px"});return t.observe(e),()=>{t.disconnect()}},[v]);const x=z(()=>{h?.(),"close"===m||window.history.back()},400),_=z(()=>{s?.()},400);/* @__PURE__ */
4
- return d(c,{children:[v&&/* @__PURE__ */u("div",{ref:N,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&&g&&p),children:/* @__PURE__ */d("div",{className:o("w-full flex items-center justify-between relative"),children:[
5
- /* @__PURE__ */u("div",{className:o(n??"",b?"rotate-180":""),onClick:x}),e&&/* @__PURE__ */u("span",{children:e}),y&&y,
6
- /* @__PURE__ */u("div",{className:o(t??""),style:{visibility:t?"visible":"hidden"},onClick:_})]})})]})},q=({className:t,style:s,children:c,text:h,textClassName:m,pixelsPerSecond:f=20,speed:y,pauseOnHover:v=!1,gap:p})=>{const g=a(null),w=a(null),N=a(null),[b,x]=l(y||8),[_,M]=l(!1),$=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(!g.current||!N.current)return;const e=g.current,t=N.current,n=e.scrollWidth>t.clientWidth;M(n),n&&x(void 0===y?(e.scrollWidth+t.clientWidth)/f:y)},100)};t();const n=new ResizeObserver(t);return g.current&&n.observe(g.current),N.current&&n.observe(N.current),()=>{e&&clearTimeout(e),n.disconnect()}},[c,h,f,y]);const C=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:[C,/* @__PURE__ */u("span",{className:o("inline-block",p)})]}:{children:[/* @__PURE__ */u("span",{style:{visibility:"visible"},children:C}),/* @__PURE__ */u("span",{style:{visibility:"hidden"},children:C})]},t),[C,p]),E=i(()=>/* @__PURE__ */u("div",{ref:g,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap"},children:C}),[C]);/* @__PURE__ */
7
- return d("div",_?{ref:N,className:o("infinite-scroll",t,{"pause-on-hover":v}),style:{...s,"--t":`${b}s`},children:[/* @__PURE__ */u("div",{ref:w,className:o("infinite-scroll__track",{"infinite-scroll__track--animate":!$,"infinite-scroll__track--animate-rtl":$}),style:{animationDuration:`${b}s`},children:k("track-1")}),/* @__PURE__ */u("div",{className:o("infinite-scroll__track",{"infinite-scroll__track--animate":!$,"infinite-scroll__track--animate-rtl":$}),"aria-hidden":"true",style:{animationDuration:`${b}s`},children:k("track-2")})]}:{ref:N,className:o("infinite-scroll",t),style:s,children:[E,/* @__PURE__ */u("div",{className:"w-full text-center text-nowrap",children:C})]})},U=({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:_="mx-10",step:M=1,minValue:$,children:C})=>{const k=a(null),[E,L]=l(!1),S="rtl"===document.dir,T=b||(()=>{if(c||!i)return;const e=void 0!==$?$:g?1:0,n=Math.max(e,t-M);i?.(n)}),A=x||(()=>{if(c||!i)return;const e=g||100,n=Math.min(e,t+M);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=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=k.current;if(!e)return;const t=e=>{if(c)return;L(!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=()=>{L(!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=()=>{L(!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,_),onClick:T}),
8
- /* @__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;L(!0);const t=D(e.clientX);i?.(t)},onMouseMove:e=>{if(c||!E||!h)return;const t=D(e.clientX);i?.(t)},onMouseUp:()=>{L(!1)},children:/* @__PURE__ */d("div",{className:o(f,"relative flex items-center overflow-hidden"),children:[
9
- /* @__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]})}),N&&/* @__PURE__ */u("div",{className:o(N,_),onClick:A})]})},Z=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=Math.max(0,t),E=n((e,t,n)=>{x(t),M(n),!C.current&&t.length>0&&(N(t.slice(0,k)),C.current=!0),c?.(e,t,n)},[k,c]),L=n((e,t)=>t<k?null:r(e,t),[k,r]),S=n(()=>{$.current?.refresh(),N([]),x([]),M(null),C.current=!1},[]),T=n(()=>{$.current?.clear(),N([]),x([]),M(null),C.current=!1},[]),A=n(()=>b,[b]),P=n(()=>b.slice(k),[b,k]),D=n(()=>w,[w]);s(g,()=>({refresh:S,clear:T,getList:A,getRestList:P,getTopList:D}),[S,T,A,P,D]);const R=i(()=>e?e(w):null,[e,w]),O=i(()=>v&&_?v(_):null,[v,_]);/* @__PURE__ */
10
- return d("div",{className:o("w-full",h),style:{width:"100%",...y},children:[R,
11
- /* @__PURE__ */u("div",{className:o("w-full",m),style:{width:"100%",...f},children:/* @__PURE__ */u(j,{ref:$,...p,renderItem:L,onDataLoaded:E})}),O]})});Z.displayName="RankList";var X=Z;const K=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"},V=e=>window.innerWidth/750*e;var Q=({children:e,className:t="",shadowColor:n="#FFEE7B",shadowOffset:r=2,useResponsive:s=!0})=>{const i=s?K(r):`${r}px`;/* @__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,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}},_=(e,t=1,n)=>x.play(e,t,n);var M=({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=1300,className:c="",renderItem:d,tabClassName:h="",lines:m=2,lineHeight:f=25,tabClassNameStyle:y={}},v)=>{const[p,g]=l([]),w=a(1),N=a(0),b=a(null),x=a(e),_=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{x.current=e,N.current=0},[e]);const M=n(()=>{g(e=>e.slice(1))},[]),$=n(e=>(e-1)*f,[f]),C=n(()=>{const e=x.current;if(!e.length)return;const t=N.current,n=w.current;N.current=(N.current+1)%e.length,w.current=w.current%m+1;const r=e[t];if(!r)return;const s={...r,line:n,id:r?.id||String(Date.now()+Math.random())};g(e=>[...e,s])},[m]);return s(v,()=>({showNextBullet:C})),r(()=>{b.current=setInterval(C,t);const e=()=>{window.document.hidden?b.current&&(clearInterval(b.current),b.current=null):b.current=setInterval(C,t)};return window.document.addEventListener("visibilitychange",e),()=>{b.current&&clearInterval(b.current),window.document.removeEventListener("visibilitychange",e)}},[t,C]),p.length?/* @__PURE__ */u("div",{className:o("w-full relative",c),children:Array.isArray(p)&&p.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?`${$(e.line)}px`:void 0,...y},onAnimationEnd:M,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,_]=l(0),[M,$]=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},H=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},I=()=>{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),_(i)):(p(0),w(0),b(0),_(0),I(),M||($(!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)),()=>{I()}},[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=H(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"})]})}),H=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-load-more",children:/* @__PURE__ */u("div",{className:"minglex-the-list-load-more__text",children:"loadMore..."})}),I=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-loading",children:/* @__PURE__ */u("div",{className:"minglex-the-list-loading__text",children:"loading..."})}),W=()=>/* @__PURE__ */u("div",{className:"minglex-the-list-no-data",children:/* @__PURE__ */u("span",{children:"no data"})}),Y=t(({url:e,params:t={},method:i="get",pageSize:c=10,dataKey:h="items",className:m,renderItem:f,onDataLoaded:y,finishRender:v,cursorKey:p,hasNextKey:g="has_next",myRankKey:w="my_rank",noDataRender:N,children:b,request:x,enablePadding:_=!1,paddingThreshold:M,paddingPlaceholder:$={}},C)=>{const[k,E]=l([]),[T,L]=l(!1),[S,A]=l(!0),[P,D]=l(null),[Y,j]=l(!1),B=a(1),z=a(void 0),F=a(!1),q=n(()=>{const e={current_page:B.current,page_size:c,page:B.current,page_num:B.current,limit:c,offset:(B.current-1)*c,...t};return p&&void 0!==z.current&&(e[p]=z.current),Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{})},[c,t,p]),U=n(t=>"get"===i.toLowerCase()?{url:e,method:i,params:t}:{url:e,method:i,data:t},[e,i]),Z=n(e=>{const t=e?.data[g],n=e?.data[w];let r=e?.data[h]||e?.data?.records||e?.data?.ranks||[],s="boolean"==typeof t&&t;if(_){const e=r.length,t=Math.min(M??c,c);if(e<t){const n=Array(t-e).fill($);r=[...r,...n]}s=!1}if(p){const t=e?.data?.[p];null!=t&&(z.current=t)}return{newItems:r,hasMoreData:s,myRank:n||null}},[h,p,g,w,_,M,c,$]),X=n((e,t)=>{if(t)return E(e),e;{const t=[...k,...e];return E(t),t}},[k]),K=n(async()=>{const e=x||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(U(q()))},[q,U,x]),V=n(async(e=!1)=>{if((!T||e)&&(!Y||e))try{L(!0),D(null),e&&(B.current=1);const t=await K(),{newItems:n,hasMoreData:r,myRank:s}=Z(t);B.current=B.current+1,j(!r);const i=X(n,e);y?.(t.data,i,s)}catch(t){D(t)}finally{L(!1),A(!1)}},[T,Y,K,Z,X,y]),Q=n(async()=>{T||Y||await V(!1)},[V,T,Y]),J=n(async()=>{j(!1),D(null),B.current=1,z.current=void 0,await V(!0)},[V]),G=n(()=>{E([]),j(!0),B.current=1,z.current=void 0,D(null),F.current=!1},[]),ee=n(()=>k,[k]);return s(C,()=>({refresh:J,clear:G,getList:ee}),[J,G,ee]),r(()=>{F.current||(F.current=!0,V(!0))},[V,F]),S?/* @__PURE__ */u(I,{}):P&&Array.isArray(k)&&0===k?.length?/* @__PURE__ */u(O,{onRetry:J}):Array.isArray(k)&&0===k?.length?N?.()||/* @__PURE__ */u(W,{}):_?/* @__PURE__ */d("div",{className:o("minglex-the-list",m),children:[k.map((e,t)=>/* @__PURE__ */u("div",{className:"minglex-the-list__item",children:f(e,t)},`simple-list-item-${t}`)),T&&/* @__PURE__ */u(H,{}),Y&&v?.(),b&&b]}):/* @__PURE__ */u("div",{className:o("minglex-the-list",m),children:/* @__PURE__ */d(R,{handleMore:Q,hasMore:!Y,className:"minglex-the-list__scroll",children:[k.map((e,t)=>/* @__PURE__ */u("div",{className:"minglex-the-list__item",children:f(e,t)},`simple-list-item-${t}`)),T&&!Y&&/* @__PURE__ */u(H,{}),Y&&v?.(),b&&b]})})});Y.displayName="List";var j=Y,B=({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 F=({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),_=a(null),M=i(()=>"undefined"!=typeof window&&("rtl"===window.document.dir||"rtl"===window.document.documentElement.dir),[]);r(()=>{if(!v)return;const e=_.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),k=i(()=>w?w():n?/* @__PURE__ */u("div",{className:o(n,M&&"rotate-180"),onClick:$}):null,[w,n,M,$]),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__ */
4
+ return d(c,{children:[v&&/* @__PURE__ */u("div",{ref:_,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]})})]})},q=({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,_]=l(y||8),[M,$]=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&&_(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__ */
5
+ return d("div",M?{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})]})},U=({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:_="mx-10",step:M=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-M);i?.(n)}),A=x||(()=>{if(c||!i)return;const e=g||100,n=Math.min(e,t+M);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,_),onClick:S}),
6
+ /* @__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:[
7
+ /* @__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,_),onClick:A})]})},Z=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),M(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([]),M(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 H=i(()=>E?e?.(w):null,[E,e,w]),I=i(()=>v&&_?v(_):null,[v,_]);/* @__PURE__ */
8
+ return d("div",{className:o("w-full",h),style:y,children:[H,
9
+ /* @__PURE__ */u("div",{className:o("w-full",m),style:f,children:/* @__PURE__ */u(j,{ref:$,...p,renderItem:L,onDataLoaded:T})}),I]})});Z.displayName="RankList";var X=Z;const K=e=>{const t=window.innerWidth/100;return window.innerWidth/750*e/t+"vw"},V=e=>window.innerWidth/750*e;var Q=({children:e,className:t="",shadowColor:n="#FFEE7B",shadowOffset:r=2,useResponsive:s=!0})=>{const i=s?K(r):`${r}px`;/* @__PURE__ */
12
10
  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})},J=({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:K(n),fill:"none",stroke:r,strokeWidth:K(t),children:e}),/* @__PURE__ */u("text",{dominantBaseline:"middle",textAnchor:"middle",x:"50%",y:"50%",fontSize:K(n),fill:"#fff",children:e})]}),G=({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__ */
13
11
  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]})},ee=({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=r.right-s.right-(a-i)/2;t.scrollTo({left:-Math.max(0,e),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 _=i(()=>e.findIndex(e=>e.value===t),[e,t]);r(()=>{if(!e.length||d||-1===_)return;const t=setTimeout(()=>x(_),c);return()=>clearTimeout(t)},[_,x,c,d]);const M=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:()=>M(e,t),children:e.label},e.label),[M,m,f,y,v]),C=n((e,t,n)=>h?/* @__PURE__ */u("div",{ref:e=>{N.current[t]=e},className:"flex-shrink-0",onClick:()=>M(e,t),children:h(e,t,n)},e.value):$(e,t,n),[h,M,$]);/* @__PURE__ */
14
- 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))})})})},te=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(n){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const ne=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&&(te(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&&(te(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 re=({className:e,style:t,visible:n=!0,keepAlive:s=!1,...i})=>{const{containerRef:a,isReady:l,play:o,reset:c}=ne(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}})},se="__MM__",ie="__DD__",ae="__YYYY__";const le=(e,t="yyyy/MM/dd hh:mm:ss",n,r="LOCALE")=>e?((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})("number"==typeof e?new Date(e):e,((e,t)=>{if(!e)return e;let n=e;if((e=>!k.includes(e.toLowerCase()))(t)){n=n.replace(/yyyy/g,ae),n=n.replace(/MM/g,se),n=n.replace(/dd/g,ie);const t=e.startsWith("yyyy"),r=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){n=n.replace(ae+"/",""),n=n.replace("/"+ae,""),n=n.replace(ae,""),n=n.replace(se,"__SWAP_MM__"),n=n.replace(ie,se),n=n.replace("__SWAP_MM__",ie);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(se,"__SWAP_MM__"),n=n.replace(ie,se),n=n.replace("__SWAP_MM__",ie),n=n.replace(ae,"yyyy")):(n=n.replace(se,"__SWAP_MM__"),n=n.replace(ie,se),n=n.replace("__SWAP_MM__",ie));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")):"";function oe(e){try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function ce(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(window.navigator.userAgent)||/iPhone|iPod/.test(window.navigator.userAgent)}const ue=(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}},de=(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}},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{M as AudioEffect,C as Barrage,A as CountDown,j as List,B as MusicPlayer,F as NavBar,q as NoticeBar,U as Progress,X as RankList,Q as ShadowText,J as StrokeText,G as TabList,ee as Tabs,re as VapPlayer,x as audioManager,ue as checkVersion,le as formatLocaleDate,V as getPx,oe as getUrlParam,K as getVw,ce as isIOS,he as navigate,_ as playSound,de as useAudio,P as useBoolean,fe as useHashLocation,D as useLatest,z as useThrottle,ne as useVap};
12
+ 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))})})})},te=(e,t)=>{if(e)try{e.pause?.(),e.destroy?.()}catch(n){}if(t){for(;t.firstChild;)t.removeChild(t.firstChild);t.innerHTML=""}};const ne=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&&(te(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&&(te(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 re=({className:e,style:t,visible:n=!0,keepAlive:s=!1,...i})=>{const{containerRef:a,isReady:l,play:o,reset:c}=ne(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}})},se="__MM__",ie="__DD__",ae="__YYYY__";const le=(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,ae),n=n.replace(/MM/g,se),n=n.replace(/dd/g,ie);const t=e.startsWith("yyyy"),r=e.includes("dd/yyyy")||e.includes("dd yyyy");if(t){n=n.replace(ae+"/",""),n=n.replace("/"+ae,""),n=n.replace(ae,""),n=n.replace(se,"__SWAP_MM__"),n=n.replace(ie,se),n=n.replace("__SWAP_MM__",ie);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(se,"__SWAP_MM__"),n=n.replace(ie,se),n=n.replace("__SWAP_MM__",ie),n=n.replace(ae,"yyyy")):(n=n.replace(se,"__SWAP_MM__"),n=n.replace(ie,se),n=n.replace("__SWAP_MM__",ie));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 oe(e){try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function ce(){return/\(i[^;]+;( U;)? CPU.+Mac OS X/.test(window.navigator.userAgent)||/iPhone|iPod/.test(window.navigator.userAgent)}const ue=(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}},de=(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 he(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 me=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 fe=()=>{const e=window.location.hash.replace(/^#/,""),t=e.indexOf("?");return-1===t?e:e.slice(0,t)||"/"};const ye=()=>{const[e,t]=l(fe());return r(()=>{const e=()=>t(fe());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,me]};export{M as AudioEffect,C as Barrage,A as CountDown,j as List,B as MusicPlayer,F as NavBar,q as NoticeBar,U as Progress,X as RankList,Q as ShadowText,J as StrokeText,G as TabList,ee as Tabs,re as VapPlayer,x as audioManager,ue as checkVersion,le as formatLocaleDate,V as getPx,oe as getUrlParam,K as getVw,ce as isIOS,me as navigate,_ as playSound,de as useAudio,P as useBoolean,he as useDebounce,ye as useHashLocation,D as useLatest,z as useThrottle,ne as useVap};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zpd-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A React component library",
5
5
  "type": "module",
6
6
  "main": "./dist/zpd-ui.cjs.js",