@funhub/platform 0.1.34 → 0.1.36

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.
Files changed (119) hide show
  1. package/dist/assets/icons/search/avatar.mjs +2 -0
  2. package/dist/assets/icons/search/video.mjs +2 -0
  3. package/dist/assets/images/frame.mjs +2 -0
  4. package/dist/biz.d.mts +14 -14
  5. package/dist/biz.mjs +1 -1
  6. package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
  7. package/dist/components/biz/business/banner-carousel/material.d.mts +1 -1
  8. package/dist/components/biz/business/banner-carousel/schema.d.mts +1 -1
  9. package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
  10. package/dist/components/biz/business/channel-list/client.mjs +1 -1
  11. package/dist/components/biz/business/detail/materials/registry.d.mts +1 -1
  12. package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +1 -1
  13. package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +1 -1
  14. package/dist/components/biz/business/header-search/header-avatar-icon/client.d.mts +1 -1
  15. package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
  16. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +2 -2
  17. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
  18. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +6 -1
  19. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +1 -1
  20. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +8 -3
  21. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
  22. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.d.mts +2 -2
  23. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
  24. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +6 -1
  25. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +1 -1
  26. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +5 -2
  27. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -1
  28. package/dist/components/biz/business/header-search/header-logo-search/client.d.mts +4 -2
  29. package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
  30. package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +6 -1
  31. package/dist/components/biz/business/header-search/header-logo-search/material.mjs +1 -1
  32. package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +8 -3
  33. package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -1
  34. package/dist/components/biz/business/header-search/header-search/client.d.mts +1 -1
  35. package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
  36. package/dist/components/biz/business/header-search/shared/avatar.mjs +2 -0
  37. package/dist/components/biz/business/header-search/shared/logo.mjs +2 -0
  38. package/dist/components/biz/business/header-search/shared/search.mjs +2 -0
  39. package/dist/components/biz/business/index.d.mts +13 -13
  40. package/dist/components/biz/business/index.mjs +1 -1
  41. package/dist/components/biz/business/large-feature-grid/default.mjs +1 -1
  42. package/dist/components/biz/business/marquee/client.d.mts +7 -9
  43. package/dist/components/biz/business/marquee/client.mjs +1 -1
  44. package/dist/components/biz/business/marquee/index.d.mts +2 -2
  45. package/dist/components/biz/business/marquee/material.d.mts +15 -6
  46. package/dist/components/biz/business/marquee/schema.d.mts +23 -28
  47. package/dist/components/biz/business/marquee/schema.mjs +1 -1
  48. package/dist/components/biz/business/marquee/server.d.mts +1 -1
  49. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
  50. package/dist/components/biz/business/profile/index.d.mts +1 -1
  51. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  52. package/dist/components/biz/business/profile/profile-header/index.d.mts +1 -1
  53. package/dist/components/biz/business/profile/profile-header/material.d.mts +4 -6
  54. package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
  55. package/dist/components/biz/business/profile/profile-header/schema.d.mts +4 -8
  56. package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
  57. package/dist/components/biz/business/search-history/client.d.mts +10 -12
  58. package/dist/components/biz/business/search-history/client.mjs +1 -1
  59. package/dist/components/biz/business/search-history/index.d.mts +2 -2
  60. package/dist/components/biz/business/search-history/material.d.mts +1 -1
  61. package/dist/components/biz/business/search-history/schema.d.mts +7 -15
  62. package/dist/components/biz/business/search-history/schema.mjs +1 -1
  63. package/dist/components/biz/business/search-history/server.d.mts +6 -2
  64. package/dist/components/biz/business/search-input/client.d.mts +11 -9
  65. package/dist/components/biz/business/search-input/client.mjs +1 -1
  66. package/dist/components/biz/business/search-input/index.d.mts +2 -2
  67. package/dist/components/biz/business/search-input/schema.d.mts +6 -10
  68. package/dist/components/biz/business/search-input/schema.mjs +1 -1
  69. package/dist/components/biz/business/search-input/server.d.mts +1 -1
  70. package/dist/components/biz/business/tab-bar/client.d.mts +6 -5
  71. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  72. package/dist/components/biz/business/tab-bar/index.d.mts +2 -2
  73. package/dist/components/biz/business/tab-bar/schema.d.mts +10 -18
  74. package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
  75. package/dist/components/biz/business/tab-bar/server.d.mts +1 -1
  76. package/dist/components/biz/business/text-recommend/client.d.mts +10 -14
  77. package/dist/components/biz/business/text-recommend/client.mjs +1 -1
  78. package/dist/components/biz/business/text-recommend/index.d.mts +2 -2
  79. package/dist/components/biz/business/text-recommend/material.d.mts +4 -1
  80. package/dist/components/biz/business/text-recommend/schema.d.mts +9 -12
  81. package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
  82. package/dist/components/biz/business/text-recommend/server.d.mts +1 -1
  83. package/dist/components/biz/business/text-recommend/server.mjs +1 -1
  84. package/dist/components/biz/business/video-horizontal-list/client.d.mts +5 -2
  85. package/dist/components/biz/business/video-horizontal-list/client.mjs +1 -1
  86. package/dist/components/biz/business/video-horizontal-list/index.d.mts +2 -2
  87. package/dist/components/biz/business/video-horizontal-list/material.d.mts +19 -8
  88. package/dist/components/biz/business/video-horizontal-list/schema.d.mts +20 -24
  89. package/dist/components/biz/business/video-horizontal-list/schema.mjs +1 -1
  90. package/dist/components/biz/business/video-horizontal-list/server.d.mts +1 -1
  91. package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +1 -1
  92. package/dist/components/common/popup-video/index.mjs +1 -1
  93. package/dist/components/pages/feed-series/feed-series-client.mjs +1 -1
  94. package/dist/components/pages/home/client.mjs +1 -1
  95. package/dist/components/pages/post-detail/post-detail-client.mjs +1 -1
  96. package/dist/components/pages/publish/page-client.mjs +1 -1
  97. package/dist/components/pages/search/hot-recommend.mjs +1 -1
  98. package/dist/components/pages/search/page-client.mjs +1 -1
  99. package/dist/components/pages/search/search-result/search-all.mjs +1 -1
  100. package/dist/components/pages/user-follow/page.mjs +1 -1
  101. package/dist/components/pages/video-detail/page.mjs +1 -1
  102. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  103. package/dist/components/ui/badge.d.mts +1 -1
  104. package/dist/components/ui/button.d.mts +2 -2
  105. package/dist/components/ui/image.d.mts +4 -4
  106. package/dist/constants/event-key.mjs +1 -1
  107. package/dist/hooks/use-search-history.mjs +1 -1
  108. package/dist/i18n/locales/en.mjs +1 -1
  109. package/dist/i18n/locales/zh-CN.mjs +1 -1
  110. package/dist/materials.d.mts +2 -2
  111. package/dist/materials.mjs +1 -1
  112. package/dist/utils/schema/index.d.mts +1 -1
  113. package/dist/utils/schema/inspector.d.mts +31 -1
  114. package/dist/utils/schema/schema.d.mts +31 -2
  115. package/dist/utils/schema/schema.mjs +1 -1
  116. package/dist/utils.d.mts +2 -2
  117. package/dist/utils.mjs +1 -1
  118. package/package.json +5 -3
  119. package/theme.css +106 -0
@@ -13,15 +13,26 @@ import * as zod_v4_core0 from "zod/v4/core";
13
13
  */
14
14
  declare const videoHorizontalListMaterial: DefineMaterialOption<typeof VideoHorizontalListServer, typeof VideoHorizontalListClient, zod.ZodObject<{
15
15
  title: zod.ZodString & SchemaHasDefaultValue;
16
+ moduleCount: zod.ZodNumber & SchemaHasDefaultValue;
17
+ layout: zod.ZodObject<{
18
+ readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
19
+ readonly tag: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
20
+ }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
21
+ commonPlayCount: zod.ZodObject<{
22
+ readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
23
+ readonly delta: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
24
+ }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
25
+ commonEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
16
26
  items: zod.ZodArray<zod.ZodObject<{
17
- title: zod.ZodString;
18
- description: zod.ZodOptional<zod.ZodString>;
19
- cover: zod.ZodOptional<zod.ZodString>;
20
- playCount: zod.ZodOptional<zod.ZodString>;
21
- showPlayCount: zod.ZodOptional<zod.ZodBoolean>;
22
- showEpisodes: zod.ZodOptional<zod.ZodBoolean>;
23
- episodesText: zod.ZodOptional<zod.ZodString>;
24
- badge: zod.ZodOptional<zod.ZodString>;
27
+ content: zod.ZodString & SchemaHasDefaultValue;
28
+ title: zod.ZodString & SchemaHasDefaultValue;
29
+ contentDescription: zod.ZodString & SchemaHasDefaultValue;
30
+ cover: zod.ZodString & SchemaHasDefaultValue;
31
+ useVideoPoster: zod.ZodBoolean & SchemaHasDefaultValue;
32
+ showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
33
+ playCountDelta: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
34
+ showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
35
+ badge: zod.ZodString & SchemaHasDefaultValue;
25
36
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
26
37
  }, zod_v4_core0.$strip>, "video-horizontal-list">;
27
38
  //#endregion
@@ -9,31 +9,27 @@ import { z } from "zod";
9
9
  */
10
10
  declare const videoHorizontalListInspectorPropsSchema: z.ZodObject<{
11
11
  title: z.ZodString & SchemaHasDefaultValue;
12
+ moduleCount: z.ZodNumber & SchemaHasDefaultValue;
13
+ layout: z.ZodObject<{
14
+ readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
15
+ readonly tag: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
16
+ }, z.core.$strip> & SchemaHasDefaultValue;
17
+ commonPlayCount: z.ZodObject<{
18
+ readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
19
+ readonly delta: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
20
+ }, z.core.$strip> & SchemaHasDefaultValue;
21
+ commonEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
12
22
  items: z.ZodArray<z.ZodObject<{
13
- title: z.ZodString;
14
- description: z.ZodOptional<z.ZodString>;
15
- cover: z.ZodOptional<z.ZodString>;
16
- playCount: z.ZodOptional<z.ZodString>;
17
- showPlayCount: z.ZodOptional<z.ZodBoolean>;
18
- showEpisodes: z.ZodOptional<z.ZodBoolean>;
19
- episodesText: z.ZodOptional<z.ZodString>;
20
- badge: z.ZodOptional<z.ZodString>;
23
+ content: z.ZodString & SchemaHasDefaultValue;
24
+ title: z.ZodString & SchemaHasDefaultValue;
25
+ contentDescription: z.ZodString & SchemaHasDefaultValue;
26
+ cover: z.ZodString & SchemaHasDefaultValue;
27
+ useVideoPoster: z.ZodBoolean & SchemaHasDefaultValue;
28
+ showPlayCount: z.ZodBoolean & SchemaHasDefaultValue;
29
+ playCountDelta: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
30
+ showEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
31
+ badge: z.ZodString & SchemaHasDefaultValue;
21
32
  }, z.core.$strip>> & SchemaHasDefaultValue;
22
33
  }, z.core.$strip>;
23
- declare const videoHorizontalListInspectorDefaultProps: {
24
- title: string;
25
- items: {
26
- title: string;
27
- description?: string | undefined;
28
- cover?: string | undefined;
29
- playCount?: string | undefined;
30
- showPlayCount?: boolean | undefined;
31
- showEpisodes?: boolean | undefined;
32
- episodesText?: string | undefined;
33
- badge?: string | undefined;
34
- }[];
35
- };
36
- type VideoHorizontalListInspectorProps = z.infer<typeof videoHorizontalListInspectorPropsSchema>;
37
- type VideoHorizontalListProps = VideoHorizontalListInspectorProps;
38
34
  //#endregion
39
- export { VideoHorizontalListInspectorProps, VideoHorizontalListProps, videoHorizontalListInspectorDefaultProps, videoHorizontalListInspectorPropsSchema };
35
+ export { videoHorizontalListInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineTextPropSchema as n,getSchemaDefaultProps as r}from"../../../../utils/schema/schema.mjs";import{z as i}from"zod";const a=i.object({title:i.string(),description:i.string().optional(),cover:i.string().optional(),playCount:i.string().optional(),showPlayCount:i.boolean().optional(),showEpisodes:i.boolean().optional(),episodesText:i.string().optional(),badge:i.string().optional()}),o=t({title:n({label:`推荐位名称`,defaultValue:`推荐视频`}),items:e(a,{label:`推荐位模块`,defaultValue:[]})}),s=r(o);export{s as videoHorizontalListInspectorDefaultProps,o as videoHorizontalListInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({content:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!0}),playCountDelta:a({label:`播放量浮动`,defaultValue:``,required:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue:``})}),c=t({title:a({label:`推荐位名称`,defaultValue:`推荐视频`}),moduleCount:n({label:`推荐模块数`,defaultValue:1}),layout:r({enabled:i({label:`组件铺设`,defaultValue:!1}),tag:a({label:`取数范围标签`,defaultValue:`动作`,required:!1})},{label:`组件铺设`,defaultValue:{enabled:!1,tag:`动作`}}),commonPlayCount:r({enabled:i({label:`通用播放量`,defaultValue:!0}),delta:a({label:`播放量浮动值`,defaultValue:``,required:!1})},{label:`通用播放量`,defaultValue:{enabled:!0,delta:``}}),commonEpisodes:i({label:`通用集数`,defaultValue:!0}),items:e(s,{label:`推荐位模块`,defaultValue:[{content:``,title:`视频标题 1`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{content:``,title:`视频标题 2`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{content:``,title:`视频标题 3`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``}]})});export{c as videoHorizontalListInspectorPropsSchema};
@@ -1,5 +1,5 @@
1
1
 
2
- import { VideoHorizontalListProps } from "./schema.mjs";
2
+ import { VideoHorizontalListProps } from "./client.mjs";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region components/biz/business/video-horizontal-list/server.d.ts
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogHeader as a,AlertDialogTitle as o}from"../../ui/alert-dialog.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useTranslations as l}from"next-intl";function u({open:u,onOpenChange:d,onConfirm:f,onCancel:p,title:m,description:h,confirmText:g,cancelText:_,isConfirming:v=!1,children:y}){let b=l(`components.common`),x=m??b(`title`),S=h??b(`deleteConfirmDialog.description`),C=g??b(`deleteConfirmDialog.confirm`),w=_??b(`deleteConfirmDialog.cancel`);function T(e){e||p?.(),d(e)}function E(){v||f()}return s(e,{open:u,onOpenChange:T,children:c(r,{size:`sm`,className:`max-w-[330px] gap-0 p-0 overflow-hidden rounded-lg bg-bg1 shadow-2xl`,children:[c(a,{className:`flex flex-col items-center justify-center min-h-[110px] p-4 gap-2 text-center`,children:[s(o,{className:`text-[16px] font-normal leading-[24px] text-text1`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:x}),S&&s(i,{className:`text-[14px] leading-[20px] text-text2`,children:S})]}),y,c(`div`,{className:`grid grid-cols-[1fr_1px_1fr] items-center h-[46px] border-t border-line1/5`,children:[s(n,{disabled:v,className:`h-full rounded-none border-none bg-transparent hover:bg-line1/10 text-[16px] font-normal text-text1 outline-none active:opacity-70 transition-opacity`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:w}),s(`div`,{className:`h-[22px] w-px bg-line1/30`}),s(t,{disabled:v,onClick:E,className:`h-full rounded-none border-none bg-transparent hover:bg-line1/10 text-[16px] font-normal text-[#fd4c5e] outline-none active:opacity-70 transition-opacity`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:C})]})]})})}export{u as DeleteConfirmDialog};
2
+ "use client";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogHeader as a,AlertDialogTitle as o}from"../../ui/alert-dialog.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useTranslations as l}from"next-intl";function u({open:u,onOpenChange:d,onConfirm:f,onCancel:p,title:m,description:h,confirmText:g,cancelText:_,isConfirming:v=!1,children:y}){let b=l(`components.common`),x=m??(m===``?``:b(`title`)),S=h??b(`deleteConfirmDialog.description`),C=g??b(`deleteConfirmDialog.confirm`),w=_??b(`deleteConfirmDialog.cancel`);function T(e){e||p?.(),d(e)}function E(){v||f()}return s(e,{open:u,onOpenChange:T,children:c(r,{size:`sm`,className:`max-w-[330px] gap-0 p-0 overflow-hidden rounded-lg bg-bg1 shadow-2xl`,children:[c(a,{className:`flex flex-col items-center justify-center min-h-[110px] p-4 gap-2 text-center`,children:[x&&s(o,{className:`text-[16px] font-normal leading-[24px] text-text1`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:x}),S&&s(i,{className:`text-[16px] leading-[24px] text-text2`,children:S})]}),y,c(`div`,{className:`grid grid-cols-[1fr_1px_1fr] items-center h-[46px] border-t border-line1`,children:[s(n,{disabled:v,className:`h-full rounded-none border-none bg-transparent hover:bg-line1/10 text-[16px] font-normal text-text1 outline-none active:opacity-70 transition-opacity`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:w}),s(`div`,{className:`h-[22px] w-px bg-line1`}),s(t,{disabled:v,onClick:E,className:`h-full rounded-none border-none bg-transparent hover:bg-line1/10 text-[16px] font-normal text-theme5 outline-none active:opacity-70 transition-opacity`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:C})]})]})})}export{u as DeleteConfirmDialog};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Button as e}from"../../ui/button.mjs";import{parseResolution as t}from"../../../utils/common.mjs";import n from"../../../utils/event-bus.mjs";import r from"../video-player/index.mjs";import{eventKey as i}from"../../../constants/event-key.mjs";import a from"./popup-video.module.mjs";import{useCallback as o,useEffect as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{usePathname as d}from"next/navigation";function f(){let f=d(),[p,m]=c(!1),[h,g]=c(null),[_,v]=c(0),y=o(e=>{if(typeof window>`u`)return 0;let{width:n,height:r}=t(e.resolution);return n<=0?0:Math.max(0,r*(window.innerWidth/n))},[]),b=o(({info:e,show:t})=>{if(!e||!t){m(!1),g(null);return}g(e),v(y(e)),m(!0)},[y]);return s(()=>(n.on(i.SHOW_POPUP_VIDEO,b),()=>{n.off(i.SHOW_POPUP_VIDEO,b)}),[b]),s(()=>{m(!1),g(null)},[f]),!p||!h?null:u(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center bg-black/95`,children:[l(e,{variant:`ghost`,className:`absolute left-4 top-4 h-10 w-10 rounded-full border border-white/20 text-white`,onClick:()=>{m(!1),g(null)},children:`←`}),l(`div`,{className:a.popupVideo,style:{width:`100%`,maxHeight:`100%`,height:_>0?`${_}px`:`auto`},children:l(r,{plyerId:h.plyerId,resolution:h.resolution,poster:h.poster||``,videoUrl:h.videoUrl||``,hlsList:h.hlsList,mergeConfig:_>0?{}:{fitVideoSize:`fixWidth`}})})]})}export{f as default};
2
+ "use client";import{Button as e}from"../../ui/button.mjs";import{parseResolution as t}from"../../../utils/common.mjs";import n from"../../../utils/event-bus.mjs";import{eventKey as r}from"../../../constants/event-key.mjs";import i from"../video-player/index.mjs";import a from"./popup-video.module.mjs";import{useCallback as o,useEffect as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{usePathname as d}from"next/navigation";function f(){let f=d(),[p,m]=c(!1),[h,g]=c(null),[_,v]=c(0),y=o(e=>{if(typeof window>`u`)return 0;let{width:n,height:r}=t(e.resolution);return n<=0?0:Math.max(0,r*(window.innerWidth/n))},[]),b=o(({info:e,show:t})=>{if(!e||!t){m(!1),g(null);return}g(e),v(y(e)),m(!0)},[y]);return s(()=>(n.on(r.SHOW_POPUP_VIDEO,b),()=>{n.off(r.SHOW_POPUP_VIDEO,b)}),[b]),s(()=>{m(!1),g(null)},[f]),!p||!h?null:u(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center bg-black/95`,children:[l(e,{variant:`ghost`,className:`absolute left-4 top-4 h-10 w-10 rounded-full border border-white/20 text-white`,onClick:()=>{m(!1),g(null)},children:`←`}),l(`div`,{className:a.popupVideo,style:{width:`100%`,maxHeight:`100%`,height:_>0?`${_}px`:`auto`},children:l(i,{plyerId:h.plyerId,resolution:h.resolution,poster:h.poster||``,videoUrl:h.videoUrl||``,hlsList:h.hlsList,mergeConfig:_>0?{}:{fitVideoSize:`fixWidth`}})})]})}export{f as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{useFollowIdsState as t}from"../../../store/modules/follow-ids-store.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetAppChannels as r,gContentGetVideoDetail as i}from"../../../service/generated/client.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{useLoginModalStore as o}from"../../../store/modules/login-modal-store.mjs";import{useKeepAliveState as s}from"../../common/keep-scroll-position/index.mjs";import{batchQueryContentInteractions as c}from"../../../hooks/use-content-operate.mjs";import l from"../../biz/basics/fullscreen-feed/runtime/client.mjs";import{queryKey as u}from"../../../constants/query-key.mjs";import ee from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{SeriesEpisodes as d}from"../../common/series-episodes/index.mjs";import{useCallback as f,useEffect as te,useLayoutEffect as ne,useMemo as p,useRef as re,useState as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useTranslations as v}from"next-intl";function y(e,t){return(e||[]).map((e,n)=>({id:e.id||`${t||`episode`}-${n+1}`,name:e.name||String(n+1),preview_m3u8_url:e.preview_m3u8_url||e.preview_m3u8url||``,m3u8_url:e.m3u8_url||e.m3u8url||``}))}function b(e,t,n){let r=e.id||``,i=t||r,a=y(e.links,i),o=e.static,s=e.score===void 0||e.score===null?void 0:Number(e.score),c=e.duration===void 0||e.duration===null?void 0:Number(e.duration),l={id:i,mid:i,name:e.name||``,img_x:e.img_x||``,img_y:e.img_y||``,img_type:e.img_type||``,cat_id:e.cat_id||``,cat_name:e.cat_name||``,status:e.status||``,status_text:e.status_text||``,show_at:e.show_at||``,tags:[],update_status:e.update_status||``,description:e.description||``,language:e.language||``,director:e.director||``,issue_date:e.issue_date||``,actor:e.actor||``,up_user:e.up_user||``,money:e.money||``,source_username:e.source_username||``,task_id:e.task_id||``,file_status:e.file_status||``,score:Number.isFinite(s)?s:void 0,duration:Number.isFinite(c)?c:void 0,episode_cnt:a.length||0,links:[],static:{browse_cnt:Number(o?.browse_cnt||0),collect_cnt:Number(o?.collect_cnt||0),comment_cnt:Number(e.comment_count??o?.comment_cnt??0),like_cnt:Number(o?.like_cnt||0),share_cnt:Number(o?.share_cnt||0),dislike_cnt:Number(o?.dislike_cnt||0)},type:e.type??e.content_type,author:{avatar:``,user_id:``,nick_name:``,user_name:``,is_verified:!1}};if(a.length===0)return{seriesTitle:l.name,seriesList:[],contents:[{...l,links:[]}]};let u=a.map((e,t)=>{let r=e.id||`${i||`episode`}-${t+1}`,o=n(t+1),s=[e,...a.filter(t=>t.id!==e.id)];return{...l,id:r,mid:i,episode_name:o,links:s}});return{seriesTitle:l.name,seriesList:a,contents:u}}function x({params:y,initialContents:x}){let S=v(`components.pages.feedSeries`),C=v(`components.common.seriesEpisodes`),{locale:w,seriesId:T,episodeNum:E=`1`}=y,{userInfo:D,isLogin:O}=n(),{followIds:ie,setFollowIds:ae}=t(),k=p(()=>x??[],[x]),[A,j]=m({}),{data:oe}=a([u.CHANNEL],()=>r()),se=e(oe?.data),M=p(()=>`feed-series:${w||`default`}:${T}`,[w,T]),ce=p(()=>{let e=Number.parseInt(E??`1`,10);return Number.isNaN(e)?0:Math.max(0,e-1)},[E]),[N,le]=s(`${M}-active-index`,ce),[P,ue]=s(`${M}-user-interacted`,!1),[de,fe]=s(`${M}-series-title-toggle`,!1),[F,I]=m(!1),L=re(null),[R,z]=m(0),B=g(`div`,{ref:L,className:`fixed top-0 left-0 right-0 z-40`,children:g(ee,{data:{list:se}})});ne(()=>{let e=L.current;if(!e)return;let t=()=>{z(Math.max(0,Math.round(e.getBoundingClientRect().height)))};t();let n=new ResizeObserver(()=>t());return n.observe(e),()=>{n.disconnect()}},[]);let{data:V,isFetching:H}=a(p(()=>[`feed-series-detail`,T],[T]),async()=>T?await i({id:T}):null,{enabled:!!T&&k.length===0}),U=p(()=>V?.data?.video,[V]),W=p(()=>U?b(U,T,e=>C(`episodeLabel`,{episode:e})):null,[U,T,C]),G=p(()=>k.length>0?k:W?.contents??[],[W?.contents,k]),K=p(()=>Object.keys(A).length===0?G:G.map(e=>{let t=A[e.id];return t?{...e,...t,static:t.static?{...e.static,...t.static}:e.static,author:t.author?{...e.author,...t.author}:e.author}:e}),[G,A]),q=W?.seriesTitle??(k[0]?.name||``),J=W?.seriesList??[],{data:Y}=a(p(()=>[`feed-series-interactions`,T,O],[O,T]),async()=>await c([T],1),{enabled:!!O&&!!T}),X=p(()=>Y?.interaction_list,[Y]);te(()=>{if(!X||X.length===0)return;let e=X.find(e=>e.content_id===T)||X[0];e&&j(t=>{let n=!1,r={...t};for(let t of G){let i=r[t.id],a={...i,is_liked:e.is_liked||!1,is_dislike:e.is_disliked??e.is_dislike??!1,is_collected:e.is_collected||!1,is_followed:e.is_followed||!1};(!i||i.is_liked!==a.is_liked||i.is_dislike!==a.is_dislike||i.is_collected!==a.is_collected||i.is_followed!==a.is_followed)&&(n=!0,r[t.id]=a)}return n?r:t})},[X,G,T]);let Z=f(({})=>{},[]),pe=f(()=>{o.getState().open()},[]),me=f((e,t)=>{let n=t.is_liked!==void 0||t.is_dislike!==void 0||t.is_collected!==void 0||t.is_followed!==void 0||t.static?.like_cnt!==void 0||t.static?.dislike_cnt!==void 0||t.static?.collect_cnt!==void 0||t.static?.comment_cnt!==void 0;j(r=>{if(!n)return{...r,[e]:{...r[e],...t,static:t.static?{...r[e]?.static,...t.static}:r[e]?.static,author:t.author?{...r[e]?.author,...t.author}:r[e]?.author}};let i=!1,a={...r};for(let e of G){let n=e.id,r=a[n],o=t.static?{...r?.static||{},...t.static}:r?.static,s=t.author?{...r?.author||{},...t.author}:r?.author,c={...r,...t,static:o,author:s},l=!1;if(t.is_liked!==void 0&&r?.is_liked!==t.is_liked&&(l=!0),t.is_dislike!==void 0&&r?.is_dislike!==t.is_dislike&&(l=!0),t.is_collected!==void 0&&r?.is_collected!==t.is_collected&&(l=!0),t.is_followed!==void 0&&r?.is_followed!==t.is_followed&&(l=!0),t.static){let e=r?.static||{};t.static.like_cnt!==void 0&&e.like_cnt!==t.static.like_cnt&&(l=!0),t.static.dislike_cnt!==void 0&&e.dislike_cnt!==t.static.dislike_cnt&&(l=!0),t.static.collect_cnt!==void 0&&e.collect_cnt!==t.static.collect_cnt&&(l=!0),t.static.comment_cnt!==void 0&&e.comment_cnt!==t.static.comment_cnt&&(l=!0)}if(t.author&&r?.author){let e=r.author,n=t.author;for(let t of Object.keys(n))if(e?.[t]!==n[t]){l=!0;break}}l&&(i=!0,a[n]=c)}return i?a:r})},[G]),Q=f((e,t)=>{le(e),Z({episodeId:T,episodeNum:e+1,mode:t===`jump`?`replace`:`push`})},[Z,T]),he=f(()=>({showSeriesButton:!0,seriesTitle:q,seriesText:`${N+1}/${J.length||K.length}`,onSeriesClick:()=>I(!0)}),[N,K.length,J.length,q]),$=p(()=>K[N]?.links?.[0]?.id||``,[N,K]);return T?H&&G.length===0?_(h,{children:[B,_(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[S(`feedSeriesClient.episodeLoading`),`...`]})]}):!H&&G.length===0?_(h,{children:[B,g(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:S(`feedSeriesClient.noEpisodes`)})]}):_(h,{children:[B,g(l,{items:K,activeIndex:N,top:R,videoConfig:{loop:!1,autoNext:!0},userInteracted:P,onUserInteracted:()=>ue(!0),onActiveIndexChange:Q,onDataUpdate:me,getNavigationInfo:he,currentUserId:D.userId||void 0,followIds:ie,onFollowIdsChange:ae,commentContentId:T,onRequireLogin:pe,activeEpisodeId:$}),F&&g(d,{mode:`selector`,variant:`sheet`,open:F,title:S(`feedSeriesClient.episodeSelectorTitle`),updateStatus:U?.update_status,seriesList:J,activeEpisodeId:$,showEpisodeTitle:de,onToggleTitle:fe,onClose:()=>I(!1),onSelectEpisode:(e,t)=>{I(!1),Q(Math.max(0,t-1),`jump`)}})]}):_(h,{children:[B,_(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[S(`feedSeriesClient.missingEpisode`),` `,`ID`]})]})}export{x as default};
2
+ "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{useFollowIdsState as t}from"../../../store/modules/follow-ids-store.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetAppChannels as r,gContentGetVideoDetail as i}from"../../../service/generated/client.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{useLoginModalStore as o}from"../../../store/modules/login-modal-store.mjs";import{queryKey as s}from"../../../constants/query-key.mjs";import{useKeepAliveState as c}from"../../common/keep-scroll-position/index.mjs";import{batchQueryContentInteractions as l}from"../../../hooks/use-content-operate.mjs";import u from"../../biz/basics/fullscreen-feed/runtime/client.mjs";import ee from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{SeriesEpisodes as d}from"../../common/series-episodes/index.mjs";import{useCallback as f,useEffect as te,useLayoutEffect as p,useMemo as m,useRef as ne,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{useTranslations as y}from"next-intl";function b(e,t){return(e||[]).map((e,n)=>({id:e.id||`${t||`episode`}-${n+1}`,name:e.name||String(n+1),preview_m3u8_url:e.preview_m3u8_url||e.preview_m3u8url||``,m3u8_url:e.m3u8_url||e.m3u8url||``}))}function x(e,t,n){let r=e.id||``,i=t||r,a=b(e.links,i),o=e.static,s=e.score===void 0||e.score===null?void 0:Number(e.score),c=e.duration===void 0||e.duration===null?void 0:Number(e.duration),l={id:i,mid:i,name:e.name||``,img_x:e.img_x||``,img_y:e.img_y||``,img_type:e.img_type||``,cat_id:e.cat_id||``,cat_name:e.cat_name||``,status:e.status||``,status_text:e.status_text||``,show_at:e.show_at||``,tags:[],update_status:e.update_status||``,description:e.description||``,language:e.language||``,director:e.director||``,issue_date:e.issue_date||``,actor:e.actor||``,up_user:e.up_user||``,money:e.money||``,source_username:e.source_username||``,task_id:e.task_id||``,file_status:e.file_status||``,score:Number.isFinite(s)?s:void 0,duration:Number.isFinite(c)?c:void 0,episode_cnt:a.length||0,links:[],static:{browse_cnt:Number(o?.browse_cnt||0),collect_cnt:Number(o?.collect_cnt||0),comment_cnt:Number(e.comment_count??o?.comment_cnt??0),like_cnt:Number(o?.like_cnt||0),share_cnt:Number(o?.share_cnt||0),dislike_cnt:Number(o?.dislike_cnt||0)},type:e.type??e.content_type,author:{avatar:``,user_id:``,nick_name:``,user_name:``,is_verified:!1}};if(a.length===0)return{seriesTitle:l.name,seriesList:[],contents:[{...l,links:[]}]};let u=a.map((e,t)=>{let r=e.id||`${i||`episode`}-${t+1}`,o=n(t+1),s=[e,...a.filter(t=>t.id!==e.id)];return{...l,id:r,mid:i,episode_name:o,links:s}});return{seriesTitle:l.name,seriesList:a,contents:u}}function S({params:b,initialContents:S}){let C=y(`components.pages.feedSeries`),w=y(`components.common.seriesEpisodes`),{locale:T,seriesId:E,episodeNum:D=`1`}=b,{userInfo:re,isLogin:O}=n(),{followIds:ie,setFollowIds:k}=t(),A=m(()=>S??[],[S]),[j,M]=h({}),{data:ae}=a([s.CHANNEL],()=>r()),oe=e(ae?.data),N=m(()=>`feed-series:${T||`default`}:${E}`,[T,E]),se=m(()=>{let e=Number.parseInt(D??`1`,10);return Number.isNaN(e)?0:Math.max(0,e-1)},[D]),[P,ce]=c(`${N}-active-index`,se),[le,ue]=c(`${N}-user-interacted`,!1),[de,fe]=c(`${N}-series-title-toggle`,!1),[F,I]=h(!1),L=ne(null),[R,z]=h(0),B=_(`div`,{ref:L,className:`fixed top-0 left-0 right-0 z-40`,children:_(ee,{data:{list:oe}})});p(()=>{let e=L.current;if(!e)return;let t=()=>{z(Math.max(0,Math.round(e.getBoundingClientRect().height)))};t();let n=new ResizeObserver(()=>t());return n.observe(e),()=>{n.disconnect()}},[]);let{data:V,isFetching:H}=a(m(()=>[`feed-series-detail`,E],[E]),async()=>E?await i({id:E}):null,{enabled:!!E&&A.length===0}),U=m(()=>V?.data?.video,[V]),W=m(()=>U?x(U,E,e=>w(`episodeLabel`,{episode:e})):null,[U,E,w]),G=m(()=>A.length>0?A:W?.contents??[],[W?.contents,A]),K=m(()=>Object.keys(j).length===0?G:G.map(e=>{let t=j[e.id];return t?{...e,...t,static:t.static?{...e.static,...t.static}:e.static,author:t.author?{...e.author,...t.author}:e.author}:e}),[G,j]),q=W?.seriesTitle??(A[0]?.name||``),J=W?.seriesList??[],{data:Y}=a(m(()=>[`feed-series-interactions`,E,O],[O,E]),async()=>await l([E],1),{enabled:!!O&&!!E}),X=m(()=>Y?.interaction_list,[Y]);te(()=>{if(!X||X.length===0)return;let e=X.find(e=>e.content_id===E)||X[0];e&&M(t=>{let n=!1,r={...t};for(let t of G){let i=r[t.id],a={...i,is_liked:e.is_liked||!1,is_dislike:e.is_disliked??e.is_dislike??!1,is_collected:e.is_collected||!1,is_followed:e.is_followed||!1};(!i||i.is_liked!==a.is_liked||i.is_dislike!==a.is_dislike||i.is_collected!==a.is_collected||i.is_followed!==a.is_followed)&&(n=!0,r[t.id]=a)}return n?r:t})},[X,G,E]);let Z=f(({})=>{},[]),pe=f(()=>{o.getState().open()},[]),me=f((e,t)=>{let n=t.is_liked!==void 0||t.is_dislike!==void 0||t.is_collected!==void 0||t.is_followed!==void 0||t.static?.like_cnt!==void 0||t.static?.dislike_cnt!==void 0||t.static?.collect_cnt!==void 0||t.static?.comment_cnt!==void 0;M(r=>{if(!n)return{...r,[e]:{...r[e],...t,static:t.static?{...r[e]?.static,...t.static}:r[e]?.static,author:t.author?{...r[e]?.author,...t.author}:r[e]?.author}};let i=!1,a={...r};for(let e of G){let n=e.id,r=a[n],o=t.static?{...r?.static||{},...t.static}:r?.static,s=t.author?{...r?.author||{},...t.author}:r?.author,c={...r,...t,static:o,author:s},l=!1;if(t.is_liked!==void 0&&r?.is_liked!==t.is_liked&&(l=!0),t.is_dislike!==void 0&&r?.is_dislike!==t.is_dislike&&(l=!0),t.is_collected!==void 0&&r?.is_collected!==t.is_collected&&(l=!0),t.is_followed!==void 0&&r?.is_followed!==t.is_followed&&(l=!0),t.static){let e=r?.static||{};t.static.like_cnt!==void 0&&e.like_cnt!==t.static.like_cnt&&(l=!0),t.static.dislike_cnt!==void 0&&e.dislike_cnt!==t.static.dislike_cnt&&(l=!0),t.static.collect_cnt!==void 0&&e.collect_cnt!==t.static.collect_cnt&&(l=!0),t.static.comment_cnt!==void 0&&e.comment_cnt!==t.static.comment_cnt&&(l=!0)}if(t.author&&r?.author){let e=r.author,n=t.author;for(let t of Object.keys(n))if(e?.[t]!==n[t]){l=!0;break}}l&&(i=!0,a[n]=c)}return i?a:r})},[G]),Q=f((e,t)=>{ce(e),Z({episodeId:E,episodeNum:e+1,mode:t===`jump`?`replace`:`push`})},[Z,E]),he=f(()=>({showSeriesButton:!0,seriesTitle:q,seriesText:`${P+1}/${J.length||K.length}`,onSeriesClick:()=>I(!0)}),[P,K.length,J.length,q]),$=m(()=>K[P]?.links?.[0]?.id||``,[P,K]);return E?H&&G.length===0?v(g,{children:[B,v(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[C(`feedSeriesClient.episodeLoading`),`...`]})]}):!H&&G.length===0?v(g,{children:[B,_(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:C(`feedSeriesClient.noEpisodes`)})]}):v(g,{children:[B,_(u,{items:K,activeIndex:P,top:R,videoConfig:{loop:!1,autoNext:!0},userInteracted:le,onUserInteracted:()=>ue(!0),onActiveIndexChange:Q,onDataUpdate:me,getNavigationInfo:he,currentUserId:re.userId||void 0,followIds:ie,onFollowIdsChange:k,commentContentId:E,onRequireLogin:pe,activeEpisodeId:$}),F&&_(d,{mode:`selector`,variant:`sheet`,open:F,title:C(`feedSeriesClient.episodeSelectorTitle`),updateStatus:U?.update_status,seriesList:J,activeEpisodeId:$,showEpisodeTitle:de,onToggleTitle:fe,onClose:()=>I(!1),onSelectEpisode:(e,t)=>{I(!1),Q(Math.max(0,t-1),`jump`)}})]}):v(g,{children:[B,v(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[C(`feedSeriesClient.missingEpisode`),` `,`ID`]})]})}export{S as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{gContentGetAppChannelBlock as e,gContentGetAppChannelBlockData as t,gContentListVisibleFloatingBall as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{useRequireLogin as o}from"../../../hooks/use-auth.mjs";import{useKeepAliveState as s}from"../../common/keep-scroll-position/index.mjs";import{queryKey as c}from"../../../constants/query-key.mjs";import{extractDataByComponentType as l}from"../../biz/utils/transformers/data.mjs";import{useEffect as u,useLayoutEffect as d,useMemo as f,useRef as p}from"react";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{useRouter as _}from"next/navigation";const v=`app-scroll-container`;function y(e){return typeof document>`u`?null:document.getElementById(e)}function b(){if(typeof document>`u`)return 0;let e=document.querySelector(`[data-top-nav-root="true"]`);return e&&e.getBoundingClientRect().height||0}function x({currentChannelId:x,isPGC:S}){let C=_(),w=o(),{data:T}=a(c.GET_CONTENT_LIST(x),()=>e({channel_id:x})),{data:E}=a([c.FLOATING_BALL],()=>n()),D=f(()=>T?.data?.blocks||[],[T?.data?.blocks]),O=f(()=>{let e=D.findIndex(e=>e.type===4),t=e>=0?D[e]:null;return{index:e,block:t,blockId:t?.id||``}},[D]),{data:k}=a([c.GUESS_YOU_LIKE_USER_DATA,O.blockId],()=>t({block_id:O.blockId}),{enabled:!!O.blockId}),A=f(()=>{if(O.index<0)return D;let e=k?.data.block?.data?.users||[];return D.map((t,n)=>n===O.index?{...t,data:{...t.data||{},users:e}}:t)},[D,k,O.index]),[j,M]=s(`home-scroll-top-${x}`,0),N=p(null),P=p({restored:!1,lastScrollTop:j,key:x,rafId:null}),F=p(M),I=p(j);u(()=>{F.current=M},[M]),u(()=>{I.current=j},[j]),u(()=>{P.current.key!==x&&(P.current.restored=!1,P.current.lastScrollTop=j,I.current=j,P.current.key=x)},[x,j]);let L=A.length>0;d(()=>{if(!L)return;N.current=y(v);let e=N.current;if(!e||P.current.restored||j<=0)return;let t=b(),n=Math.max(0,j+t);window.requestAnimationFrame(()=>{e.scrollTop=n,P.current.restored=!0,P.current.lastScrollTop=n})},[L,x,j]),u(()=>{N.current=y(v);let e=N.current;if(!e)return;function t(){P.current.restored=!0,P.current.rafId!==null&&window.cancelAnimationFrame(P.current.rafId),P.current.rafId=window.requestAnimationFrame(()=>{P.current.rafId=null;let e=N.current;if(!e)return;let t=e.scrollTop||0,n=b(),r=Math.max(0,t-n);Math.abs(t-P.current.lastScrollTop)>1&&(P.current.lastScrollTop=t,F.current(r))})}e.addEventListener(`scroll`,t,{passive:!0});let n=P.current.rafId;return()=>{n!==null&&window.cancelAnimationFrame(n),e.removeEventListener(`scroll`,t)}},[x]);let R=f(()=>l(A,S),[A,S]),z=f(()=>E?.data?.ball_infos?.find(e=>e.channel_id===x),[E?.data?.ball_infos,x]);return g(m,{children:[z&&h(i,{className:`fixed right-[20px] bottom-[80px] w-[52px] h-[52px] z-30 rounded-[16px] cursor-move select-none bg-[#FD4C5E33] overflow-hidden`,onClick:()=>{w(()=>{z?.jump_url&&C.push(z.jump_url)})},children:h(r,{src:z.material_url||``,alt:z.name||``,fill:!0,priority:!0,fetchPriority:`high`,sizes:`52px`,unoptimized:!0})}),R.map(e=>{let t=e.component,n=e.data.block_id||`block-${e.data.title||``}`;return h(t,{data:e.data},n)})]})}export{x as default};
2
+ "use client";import{gContentGetAppChannelBlock as e,gContentGetAppChannelBlockData as t,gContentListVisibleFloatingBall as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{useRequireLogin as o}from"../../../hooks/use-auth.mjs";import{queryKey as s}from"../../../constants/query-key.mjs";import{useKeepAliveState as c}from"../../common/keep-scroll-position/index.mjs";import{extractDataByComponentType as l}from"../../biz/utils/transformers/data.mjs";import{useEffect as u,useLayoutEffect as d,useMemo as f,useRef as p}from"react";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{useRouter as _}from"next/navigation";const v=`app-scroll-container`;function y(e){return typeof document>`u`?null:document.getElementById(e)}function b(){if(typeof document>`u`)return 0;let e=document.querySelector(`[data-top-nav-root="true"]`);return e&&e.getBoundingClientRect().height||0}function x({currentChannelId:x,isPGC:S}){let C=_(),w=o(),{data:T}=a(s.GET_CONTENT_LIST(x),()=>e({channel_id:x})),{data:E}=a([s.FLOATING_BALL],()=>n()),D=f(()=>T?.data?.blocks||[],[T?.data?.blocks]),O=f(()=>{let e=D.findIndex(e=>e.type===4),t=e>=0?D[e]:null;return{index:e,block:t,blockId:t?.id||``}},[D]),{data:k}=a([s.GUESS_YOU_LIKE_USER_DATA,O.blockId],()=>t({block_id:O.blockId}),{enabled:!!O.blockId}),A=f(()=>{if(O.index<0)return D;let e=k?.data.block?.data?.users||[];return D.map((t,n)=>n===O.index?{...t,data:{...t.data||{},users:e}}:t)},[D,k,O.index]),[j,M]=c(`home-scroll-top-${x}`,0),N=p(null),P=p({restored:!1,lastScrollTop:j,key:x,rafId:null}),F=p(M),I=p(j);u(()=>{F.current=M},[M]),u(()=>{I.current=j},[j]),u(()=>{P.current.key!==x&&(P.current.restored=!1,P.current.lastScrollTop=j,I.current=j,P.current.key=x)},[x,j]);let L=A.length>0;d(()=>{if(!L)return;N.current=y(v);let e=N.current;if(!e||P.current.restored||j<=0)return;let t=b(),n=Math.max(0,j+t);window.requestAnimationFrame(()=>{e.scrollTop=n,P.current.restored=!0,P.current.lastScrollTop=n})},[L,x,j]),u(()=>{N.current=y(v);let e=N.current;if(!e)return;function t(){P.current.restored=!0,P.current.rafId!==null&&window.cancelAnimationFrame(P.current.rafId),P.current.rafId=window.requestAnimationFrame(()=>{P.current.rafId=null;let e=N.current;if(!e)return;let t=e.scrollTop||0,n=b(),r=Math.max(0,t-n);Math.abs(t-P.current.lastScrollTop)>1&&(P.current.lastScrollTop=t,F.current(r))})}e.addEventListener(`scroll`,t,{passive:!0});let n=P.current.rafId;return()=>{n!==null&&window.cancelAnimationFrame(n),e.removeEventListener(`scroll`,t)}},[x]);let R=f(()=>l(A,S),[A,S]),z=f(()=>E?.data?.ball_infos?.find(e=>e.channel_id===x),[E?.data?.ball_infos,x]);return g(m,{children:[z&&h(i,{className:`fixed right-[20px] bottom-[80px] w-[52px] h-[52px] z-30 rounded-[16px] cursor-move select-none bg-[#FD4C5E33] overflow-hidden`,onClick:()=>{w(()=>{z?.jump_url&&C.push(z.jump_url)})},children:h(r,{src:z.material_url||``,alt:z.name||``,fill:!0,priority:!0,fetchPriority:`high`,sizes:`52px`,unoptimized:!0})}),R.map(e=>{let t=e.component,n=e.data.block_id||`block-${e.data.title||``}`;return h(t,{data:e.data},n)})]})}export{x as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetComments as n,gCommunityGetContentInfo as r,gCommunityGetContentList as i,gContentGetAppChannels as a}from"../../../service/generated/client.mjs";import{checkFollowStatus as o}from"../../../utils/follow-service.mjs";import{EmptyState as s}from"../../ui/empty.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{useBrowseReport as l}from"../../../hooks/use-browse-report.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as ee}from"../../../hooks/use-content-operate.mjs";import{queryKey as p}from"../../../constants/query-key.mjs";import m from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{DetailFollowAction as te}from"../../biz/business/detail/detail-follow-action.mjs";import{DetailOperate as ne}from"../../biz/business/detail/detail-operate.mjs";import{PostRecommendList as re}from"../../biz/business/detail/post-recommend-list.mjs";import{DetailHero as h}from"../../biz/business/detail/video-hero.mjs";import g from"../../biz/business/comment/comment-list.mjs";import ie from"../../common/info-card/card-header.mjs";import _ from"../../common/info-card/card-text.mjs";import{useCallback as ae,useEffect as v,useMemo as y}from"react";import{Fragment as b,jsx as x,jsxs as S}from"react/jsx-runtime";import{useTranslations as C}from"next-intl";import{useSearchParams as oe}from"next/navigation";function se(e){if(!e||typeof e!=`object`||!e.content_id)return null;let t=Array.isArray(e.medias)?e.medias:[],n=t.filter(e=>e&&e.is_video===!1),r=t.filter(e=>e&&e.is_video===!0),i=n.map(e=>e.media_url).filter(e=>typeof e==`string`&&e.length>0),a=(Array.isArray(e.images)?e.images:[]).map(e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.url||e.image_url||e.media_url)||``).filter(e=>typeof e==`string`&&e.length>0),o=i.length?i:a,s=r.map(e=>e.cover_image).find(e=>typeof e==`string`&&e.length>0),c=o[0]||``,l=e.cover_image||s||c||``,u=(Array.isArray(e.tags)?e.tags:[]).map(e=>{if(e&&typeof e==`object`){let t=e.id??e.name??``,n=e.name??e.id??``,r=e.group??``;return{id:String(t),name:String(n),group:String(r)}}return{id:String(e),name:String(e),group:``}}).filter(e=>!!(e.id||e.name));return{...t.length?{medias:t}:{},id:e.content_id,mid:e.content_id,name:e.title||``,cat_id:``,cat_name:``,status:String(e.status||`2`),status_text:``,create_time:e.create_time,show_at:e.create_time,position:``,img_type:``,img_x:l,img_y:l,img_width:``,img_height:``,preview_images:o,score:``,duration:``,is_more_link:`n`,update_status:`1`,description:e.content||``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:u,source_tags:u.map(e=>e.name).filter(Boolean).join(`,`),source_actor:[],links:[],money:``,up_user:e.user_id||e.author?.user_id||``,source_username:e.author?.nickname||e.author?.username||``,task_id:``,file_status:``,content_type:2,author:{...e.author,avatar:e.author.avatar_url},like:e.interaction?.is_liked||!1,dislike:e.interaction?.is_dislike||!1,collect:e.interaction?.is_collected||!1,is_followed:e.interaction?.is_followed||!1,static:{like_cnt:e.like_count||0,comment_cnt:e.comment_count||0,share_cnt:e.share_count||0,browse_cnt:e.view_count||0},info:{text:e.content||``,images:o}}}function ce(e){let t=Array.isArray(e.medias)?e.medias:[],n=t.filter(e=>e&&e.is_video===!1).map(e=>e.media_url).filter(e=>typeof e==`string`&&e.length>0),r=(Array.isArray(e.images)?e.images:[]).map(e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.url||e.image_url||e.media_url)||``).filter(e=>typeof e==`string`&&e.length>0),i=n.length?n:r,a=t.filter(e=>e&&e.is_video===!0).map(e=>e.cover_image).find(e=>typeof e==`string`&&e.length>0),o=e.cover_image||a||i[0]||``,s=(Array.isArray(e.tags)?e.tags:[]).map(e=>{if(e&&typeof e==`object`){let t=e.id??e.name??``,n=e.name??e.id??``,r=e.group??``;return{id:String(t),name:String(n),group:String(r)}}return{id:String(e),name:String(e),group:``}}).filter(e=>!!(e.id||e.name)),c=t.length?t:i.filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}));return{...c.length?{medias:c}:{},id:e.content_id||``,mid:e.content_id||``,name:e.title||``,cat_id:``,cat_name:``,status:String(e.status||`2`),status_text:``,create_time:e.create_time,show_at:e.create_time,position:``,img_type:``,img_x:o,img_y:o,img_width:``,img_height:``,preview_images:i,score:``,duration:``,is_more_link:`n`,update_status:`1`,description:e.content||``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:s,source_tags:s.map(e=>e.name).filter(Boolean).join(`,`),source_actor:[],links:[],money:``,up_user:e.user_id||e.author?.user_id||``,source_username:e.author?.nickname||e.author?.username||``,task_id:``,file_status:``,content_type:2,author:{...e.author,avatar:e.author.avatar_url},like:e.interaction?.is_liked||!1,dislike:e.interaction?.is_dislike||!1,collect:e.interaction?.is_collected||!1,is_followed:e.interaction?.is_followed||!1,statics_cnt:{like_cnt:String(e.like_count||0),dislike_cnt:String(e.dislike_count||0),comment_cnt:String(e.comment_count||0),share_cnt:String(e.share_count||0),browse_cnt:String(e.view_count||0),collect_cnt:String(e.collect_count||0)}}}function w({detailId:f,initialInformation:w,initialRecommendList:le,initialCommentList:T,initialCommentTotal:E,initialCommentHasMore:D}){let O=C(`components.pages.postDetail`),k=oe(),{isLogin:ue,userInfo:de,userId:fe}=t(),A=fe||de?.userId||``;l({contentId:f,contentType:2,enabled:!!f,enableIntervalReport:!1,enableExitReport:!1});let{data:j}=c(y(()=>[`post-detail`,f],[f]),async()=>f?await r({content_id:f}):null,{enabled:!!f}),M=y(()=>{let e=j?.data?.data;return se(e)},[j?.data?.data]),pe=w??M??null,{data:N}=c(y(()=>[`post-detail-recommend`,f],[f]),async()=>f?await i({page:1,page_size:6,sort_by:`recommend`}):null,{enabled:!!f}),P=y(()=>(N?.data?.data?.contents??[]).filter(e=>e.content_id!==f).slice(0,4).map(e=>ce(e)),[f,N?.data?.data?.contents]),F=le??P??[],[I,L]=d(`detail-information-${f}`,pe),[R,z]=d(`detail-recommend-${f}`,F),[B,V]=d(`info-detail-comment-add-count-${f}`,0),H=y(()=>I?.content_type===0,[I?.content_type]),U=y(()=>[`post-detail-comments`,f,1,5],[5,f]),{data:W}=c(U,async()=>f?await n({content_id:f,page:1,page_size:5,sort_by:`latest`}):null,{enabled:!!f}),me=y(()=>{if(T?.length)return T;let e=W?.data?.data?.comments??[];if(e.length>0)return e},[W?.data?.data?.comments,T]),G=y(()=>{if(typeof E==`number`)return E;if(W?.data?.data)return typeof W?.data?.data?.total==`number`?W.data.data.total:void 0},[W?.data?.data,E]),K=y(()=>{if(typeof D==`boolean`)return D;if(W?.data?.data)return W?.data?.data?.has_more??!1},[W?.data?.data,D]),[q,J]=d(`post-detail-comment-total-${f}`,typeof E==`number`?E:void 0);v(()=>{typeof G==`number`&&J(e=>typeof e==`number`?Math.max(e,G):G)},[G,J]);let he=y(()=>[`detail-interaction`,I?.id,I?.content_type],[I?.content_type,I?.id]),Y=I?.up_user||``,ge=!!(A&&Y&&A===Y),_e=y(()=>[`detail-follow-status`,A,Y],[A,Y]),{data:X}=c(he,async()=>!I?.id||typeof I.content_type!=`number`?null:await ee([I.id],2),{enabled:!!I?.id}),{data:Z}=c(_e,async()=>!A||!Y?null:await o({app_id:0,follower_id:A,followee_ids:[Y]}),{enabled:!!ue&&!!A&&!!Y&&!ge});v(()=>{!I&&M&&L(M)},[I,M,L]),v(()=>{R.length===0&&P.length>0&&z(P)},[R.length,P,z]),v(()=>{if(!X?.interaction_list?.[0])return;let e=X.interaction_list[0];L(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[X,L]),v(()=>{if(!Z?.data||!Y)return;let e=!!Z.data?.is_following_map?.[Y];L(t=>!t||t.is_followed===e?t:{...t,is_followed:e})},[Z?.data,Y,L]);let Q=ae(e=>{L(t=>t&&{...t,...e})},[L]);u(()=>{I?.id&&I.id},[I?.id],`detail-page-report-${f}`),v(()=>{!I||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:I.id||f,author_id:I.up_user,object_type:I.content_type,object_category:I.content_type,object_tags:I.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,I]),v(()=>{V(0)},[I?.id,V]);let ve=y(()=>(typeof q==`number`?q:typeof G==`number`?G:0)+B,[B,q,G]);v(()=>{k?.get(`tab`)===`comment`&&(typeof window>`u`||window.requestAnimationFrame(()=>{document.getElementById(`detail-comments`)?.scrollIntoView({behavior:`smooth`,block:`start`})}))},[I?.id,k]);let $=I?.status===`2`,{data:ye}=c([p.CHANNEL],()=>a());return S(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 pt-11`,children:[x(`div`,{className:`fixed top-0 left-0 right-0 z-40`,children:x(m,{data:{list:e(ye?.data)}})}),x(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:S(b,{children:[I&&!$&&x(s,{type:`no-content`,text:O(`postDetailClient.postOffline`)}),I&&$&&S(b,{children:[H&&x(h,{information:I,isVideo:!0}),S(`article`,{className:`w-full`,children:[x(ie,{infoData:I,rightChild:x(te,{information:I,onUpdate:Q})}),x(_,{infoData:I,isEllipsis:!1}),!H&&x(`div`,{className:`mt-[12px]`,children:x(h,{information:I,isVideo:!1})})]}),x(ne,{information:I,onUpdate:Q}),S(`div`,{id:`detail-comments`,className:`w-full border-t-[8px] border-bg2 mt-[12px]`,children:[S(`div`,{className:`w-full px-[16px] h-[40px] flex items-center justify-between border-b-[1px] border-line1`,children:[x(`p`,{className:`text-[16px] text-text1 font-bold`,children:O(`postDetailClient.comment`)}),S(`p`,{className:`text-[12px] text-text3`,children:[ve,O(`postDetailClient.reactions`)]})]}),x(g,{listQueryKey:U,contentId:I.id,information:I,isShow:!1,isClickLoad:!0,initialComments:me,initialTotal:G,initialHasMore:K,addCommentCount:()=>{V(e=>e+1)},onTotalChange:e=>{J(t=>typeof t==`number`?Math.max(t,e):e)}})]}),R.length>0&&x(re,{information:I,initRecommendList:R})]}),!I&&x(s,{type:`no-content`,text:O(`postDetailClient.postDeleted`)})]})})]})}export{w as default};
2
+ "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetComments as n,gCommunityGetContentInfo as r,gCommunityGetContentList as i,gContentGetAppChannels as a}from"../../../service/generated/client.mjs";import{checkFollowStatus as o}from"../../../utils/follow-service.mjs";import{EmptyState as s}from"../../ui/empty.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{useBrowseReport as l}from"../../../hooks/use-browse-report.mjs";import{queryKey as u}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as ee,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as p}from"../../../hooks/use-content-operate.mjs";import m from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{DetailFollowAction as te}from"../../biz/business/detail/detail-follow-action.mjs";import{DetailOperate as ne}from"../../biz/business/detail/detail-operate.mjs";import{PostRecommendList as re}from"../../biz/business/detail/post-recommend-list.mjs";import{DetailHero as h}from"../../biz/business/detail/video-hero.mjs";import g from"../../biz/business/comment/comment-list.mjs";import ie from"../../common/info-card/card-header.mjs";import ae from"../../common/info-card/card-text.mjs";import{useCallback as oe,useEffect as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useTranslations as se}from"next-intl";import{useSearchParams as S}from"next/navigation";function C(e){if(!e||typeof e!=`object`||!e.content_id)return null;let t=Array.isArray(e.medias)?e.medias:[],n=t.filter(e=>e&&e.is_video===!1),r=t.filter(e=>e&&e.is_video===!0),i=n.map(e=>e.media_url).filter(e=>typeof e==`string`&&e.length>0),a=(Array.isArray(e.images)?e.images:[]).map(e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.url||e.image_url||e.media_url)||``).filter(e=>typeof e==`string`&&e.length>0),o=i.length?i:a,s=r.map(e=>e.cover_image).find(e=>typeof e==`string`&&e.length>0),c=o[0]||``,l=e.cover_image||s||c||``,u=(Array.isArray(e.tags)?e.tags:[]).map(e=>{if(e&&typeof e==`object`){let t=e.id??e.name??``,n=e.name??e.id??``,r=e.group??``;return{id:String(t),name:String(n),group:String(r)}}return{id:String(e),name:String(e),group:``}}).filter(e=>!!(e.id||e.name));return{...t.length?{medias:t}:{},id:e.content_id,mid:e.content_id,name:e.title||``,cat_id:``,cat_name:``,status:String(e.status||`2`),status_text:``,create_time:e.create_time,show_at:e.create_time,position:``,img_type:``,img_x:l,img_y:l,img_width:``,img_height:``,preview_images:o,score:``,duration:``,is_more_link:`n`,update_status:`1`,description:e.content||``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:u,source_tags:u.map(e=>e.name).filter(Boolean).join(`,`),source_actor:[],links:[],money:``,up_user:e.user_id||e.author?.user_id||``,source_username:e.author?.nickname||e.author?.username||``,task_id:``,file_status:``,content_type:2,author:{...e.author,avatar:e.author.avatar_url},like:e.interaction?.is_liked||!1,dislike:e.interaction?.is_dislike||!1,collect:e.interaction?.is_collected||!1,is_followed:e.interaction?.is_followed||!1,static:{like_cnt:e.like_count||0,comment_cnt:e.comment_count||0,share_cnt:e.share_count||0,browse_cnt:e.view_count||0},info:{text:e.content||``,images:o}}}function ce(e){let t=Array.isArray(e.medias)?e.medias:[],n=t.filter(e=>e&&e.is_video===!1).map(e=>e.media_url).filter(e=>typeof e==`string`&&e.length>0),r=(Array.isArray(e.images)?e.images:[]).map(e=>typeof e==`string`?e:e&&typeof e==`object`&&(e.url||e.image_url||e.media_url)||``).filter(e=>typeof e==`string`&&e.length>0),i=n.length?n:r,a=t.filter(e=>e&&e.is_video===!0).map(e=>e.cover_image).find(e=>typeof e==`string`&&e.length>0),o=e.cover_image||a||i[0]||``,s=(Array.isArray(e.tags)?e.tags:[]).map(e=>{if(e&&typeof e==`object`){let t=e.id??e.name??``,n=e.name??e.id??``,r=e.group??``;return{id:String(t),name:String(n),group:String(r)}}return{id:String(e),name:String(e),group:``}}).filter(e=>!!(e.id||e.name)),c=t.length?t:i.filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}));return{...c.length?{medias:c}:{},id:e.content_id||``,mid:e.content_id||``,name:e.title||``,cat_id:``,cat_name:``,status:String(e.status||`2`),status_text:``,create_time:e.create_time,show_at:e.create_time,position:``,img_type:``,img_x:o,img_y:o,img_width:``,img_height:``,preview_images:i,score:``,duration:``,is_more_link:`n`,update_status:`1`,description:e.content||``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:s,source_tags:s.map(e=>e.name).filter(Boolean).join(`,`),source_actor:[],links:[],money:``,up_user:e.user_id||e.author?.user_id||``,source_username:e.author?.nickname||e.author?.username||``,task_id:``,file_status:``,content_type:2,author:{...e.author,avatar:e.author.avatar_url},like:e.interaction?.is_liked||!1,dislike:e.interaction?.is_dislike||!1,collect:e.interaction?.is_collected||!1,is_followed:e.interaction?.is_followed||!1,statics_cnt:{like_cnt:String(e.like_count||0),dislike_cnt:String(e.dislike_count||0),comment_cnt:String(e.comment_count||0),share_cnt:String(e.share_count||0),browse_cnt:String(e.view_count||0),collect_cnt:String(e.collect_count||0)}}}function w({detailId:f,initialInformation:w,initialRecommendList:le,initialCommentList:T,initialCommentTotal:E,initialCommentHasMore:D}){let O=se(`components.pages.postDetail`),k=S(),{isLogin:ue,userInfo:A,userId:de}=t(),j=de||A?.userId||``;l({contentId:f,contentType:2,enabled:!!f,enableIntervalReport:!1,enableExitReport:!1});let{data:M}=c(v(()=>[`post-detail`,f],[f]),async()=>f?await r({content_id:f}):null,{enabled:!!f}),N=v(()=>{let e=M?.data?.data;return C(e)},[M?.data?.data]),fe=w??N??null,{data:P}=c(v(()=>[`post-detail-recommend`,f],[f]),async()=>f?await i({page:1,page_size:6,sort_by:`recommend`}):null,{enabled:!!f}),F=v(()=>(P?.data?.data?.contents??[]).filter(e=>e.content_id!==f).slice(0,4).map(e=>ce(e)),[f,P?.data?.data?.contents]),I=le??F??[],[L,R]=d(`detail-information-${f}`,fe),[z,B]=d(`detail-recommend-${f}`,I),[V,H]=d(`info-detail-comment-add-count-${f}`,0),U=v(()=>L?.content_type===0,[L?.content_type]),W=v(()=>[`post-detail-comments`,f,1,5],[5,f]),{data:G}=c(W,async()=>f?await n({content_id:f,page:1,page_size:5,sort_by:`latest`}):null,{enabled:!!f}),pe=v(()=>{if(T?.length)return T;let e=G?.data?.data?.comments??[];if(e.length>0)return e},[G?.data?.data?.comments,T]),K=v(()=>{if(typeof E==`number`)return E;if(G?.data?.data)return typeof G?.data?.data?.total==`number`?G.data.data.total:void 0},[G?.data?.data,E]),me=v(()=>{if(typeof D==`boolean`)return D;if(G?.data?.data)return G?.data?.data?.has_more??!1},[G?.data?.data,D]),[q,J]=d(`post-detail-comment-total-${f}`,typeof E==`number`?E:void 0);_(()=>{typeof K==`number`&&J(e=>typeof e==`number`?Math.max(e,K):K)},[K,J]);let he=v(()=>[`detail-interaction`,L?.id,L?.content_type],[L?.content_type,L?.id]),Y=L?.up_user||``,ge=!!(j&&Y&&j===Y),_e=v(()=>[`detail-follow-status`,j,Y],[j,Y]),{data:X}=c(he,async()=>!L?.id||typeof L.content_type!=`number`?null:await p([L.id],2),{enabled:!!L?.id}),{data:Z}=c(_e,async()=>!j||!Y?null:await o({app_id:0,follower_id:j,followee_ids:[Y]}),{enabled:!!ue&&!!j&&!!Y&&!ge});_(()=>{!L&&N&&R(N)},[L,N,R]),_(()=>{z.length===0&&F.length>0&&B(F)},[z.length,F,B]),_(()=>{if(!X?.interaction_list?.[0])return;let e=X.interaction_list[0];R(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[X,R]),_(()=>{if(!Z?.data||!Y)return;let e=!!Z.data?.is_following_map?.[Y];R(t=>!t||t.is_followed===e?t:{...t,is_followed:e})},[Z?.data,Y,R]);let Q=oe(e=>{R(t=>t&&{...t,...e})},[R]);ee(()=>{L?.id&&L.id},[L?.id],`detail-page-report-${f}`),_(()=>{!L||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:L.id||f,author_id:L.up_user,object_type:L.content_type,object_category:L.content_type,object_tags:L.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,L]),_(()=>{H(0)},[L?.id,H]);let ve=v(()=>(typeof q==`number`?q:typeof K==`number`?K:0)+V,[V,q,K]);_(()=>{k?.get(`tab`)===`comment`&&(typeof window>`u`||window.requestAnimationFrame(()=>{document.getElementById(`detail-comments`)?.scrollIntoView({behavior:`smooth`,block:`start`})}))},[L?.id,k]);let $=L?.status===`2`,{data:ye}=c([u.CHANNEL],()=>a());return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 pt-11`,children:[b(`div`,{className:`fixed top-0 left-0 right-0 z-40`,children:b(m,{data:{list:e(ye?.data)}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[L&&!$&&b(s,{type:`no-content`,text:O(`postDetailClient.postOffline`)}),L&&$&&x(y,{children:[U&&b(h,{information:L,isVideo:!0}),x(`article`,{className:`w-full`,children:[b(ie,{infoData:L,rightChild:b(te,{information:L,onUpdate:Q})}),b(ae,{infoData:L,isEllipsis:!1}),!U&&b(`div`,{className:`mt-[12px]`,children:b(h,{information:L,isVideo:!1})})]}),b(ne,{information:L,onUpdate:Q}),x(`div`,{id:`detail-comments`,className:`w-full border-t-[8px] border-bg2 mt-[12px]`,children:[x(`div`,{className:`w-full px-[16px] h-[40px] flex items-center justify-between border-b-[1px] border-line1`,children:[b(`p`,{className:`text-[16px] text-text1 font-bold`,children:O(`postDetailClient.comment`)}),x(`p`,{className:`text-[12px] text-text3`,children:[ve,O(`postDetailClient.reactions`)]})]}),b(g,{listQueryKey:W,contentId:L.id,information:L,isShow:!1,isClickLoad:!0,initialComments:pe,initialTotal:K,initialHasMore:me,addCommentCount:()=>{H(e=>e+1)},onTotalChange:e=>{J(t=>typeof t==`number`?Math.max(t,e):e)}})]}),z.length>0&&b(re,{information:L,initRecommendList:z})]}),!L&&b(s,{type:`no-content`,text:O(`postDetailClient.postDeleted`)})]})})]})}export{w as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../utils/cn.mjs";import{AlertDialog as t,AlertDialogAction as n,AlertDialogCancel as r,AlertDialogContent as ee,AlertDialogDescription as te,AlertDialogFooter as ne,AlertDialogHeader as re,AlertDialogTitle as ie}from"../../ui/alert-dialog.mjs";import{getAtUserElement as i}from"../../../utils/common.mjs";import ae from"../../../utils/event-bus.mjs";import{pCommunityPublishContent as oe}from"../../../service/generated/client.mjs";import{Box as se}from"../../ui/box.mjs";import{useKeyboardOpen as ce}from"../../../hooks/use-keyboard-open.mjs";import{useMediaPreview as a}from"../../common/media-preview/index.mjs";import o from"../../ui/popup.mjs";import{eventKey as s}from"../../../constants/event-key.mjs";import{UploadProgress as c}from"./components/upload-progress.mjs";import{ContactList as l}from"../../biz/business/contact/contact-list.mjs";import{Collection as u}from"./components/collection.mjs";import{MAX_MATERIAL_COUNT as d}from"./constants.mjs";import{filterAtUserNames as le}from"./utils/publish-utils.mjs";import{PublishEditor as ue}from"./components/editor.mjs";import{PublishHeader as de}from"./components/header.mjs";import{MaterialGrid as fe}from"./components/material-grid.mjs";import{Toolbar as pe}from"./components/toolbar.mjs";import{useFileUpload as me}from"./hooks/use-file-upload.mjs";import{useCallback as f,useEffect as he,useMemo as ge,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{toast as _}from"sonner";import{useTranslations as _e}from"next-intl";import{useRouter as v}from"next/navigation";function y({className:y}={}){let b=_e(`components.pages.publish`),ve=v(),x=p(null),[ye,S]=m(!1),[C,w]=m(`0`),{isOpen:T}=ce(),[E,D]=m(null),[O,k]=m([]),[A,j]=m(``),[M,N]=m(``),[P,F]=m(``),[I,L]=m(0),[be,R]=m(``),[z,B]=m(``),[xe,V]=m(0),[H,U]=m(``),[W,G]=m([]),[Se,K]=m(!1),[Ce,q]=m(!1),[we,Te]=m(``),J=p(null);he(()=>()=>{ae.emit(s.WAIT_LOADING_SHOW,{show:!1})},[]);let Y=f(e=>(Te(e),q(!0),new Promise(e=>{J.current=e})),[]),{selectFile:X}=me({onProgressUpdate:(e,t,n,r)=>{D(r>0?{currentFiles:e,totalFiles:t,currentTasks:n,totalTasks:r}:null)}}),Z=f(async()=>{if(A){if(!await Y(b(`pageClient.switchToPostConfirm`)))return;j(``),N(``),F(``),L(0),V(0),R(``),B(``)}if(O.length>=d){_.error(b(`pageClient.maxMaterialCount`));return}let e=await X(`material`,{maxMaterialCount:d-O.length});!e||e.type!==`material`||(e.errors.length>0&&_.error(e.errors.length===1?e.errors[0]:b(`pageClient.uploadFailedCount`,{count:e.errors.length})),e.items.length>0&&k(t=>[...t,...e.items].slice(0,d)))},[Y,O.length,X,B,N,F,k,R,L,V,j,b,A]),Ee=f(async()=>{if(O.length>0){if(!await Y(b(`pageClient.switchToVideoConfirm`)))return;k([])}let e=await X(`video`);!e||e.type!==`video`||(j(e.videoUrl),N(e.coverUrl),F(e.coverUrl),R(e.resolution),B(e.coverImageResolution),L(e.videoDuration),V(e.videoSize))},[Y,O.length,X,B,N,F,k,R,L,V,j,b]);function De(e){S(e)}function Oe(){S(!1)}let Q=ge(()=>(H.trim()===``||H.trim()===`<br>`)&&O.length===0&&!A,[H,O.length,A]),$=a(),ke=f(()=>{$.open(O.map(e=>({src:e.media_url,type:e.is_video?`video`:`image`,cover:e.cover_image})))},[O,$]),Ae=f(e=>{k(t=>t.filter((t,n)=>n!==e))},[k]),je=f(()=>{j(``),N(``),F(``),L(0),V(0),R(``),B(``)},[N,F,B,R,L,V,j]),Me=f(async()=>{let e=await X(`cover`);!e||e.type!==`cover`||(N(e.coverUrl),B(e.coverImageResolution))},[X,B,N]),Ne=f(e=>{S(!1),G(t=>[...t,e]),x.current?.restoreSelection();let t=`${i(e)}&nbsp;`;x.current?.insertHtml(t)},[G]),Pe=f(()=>{x.current?.saveSelection(),S(!0)},[]);return g(se,{className:e(`relative min-h-screen max-w-full bg-bg2 overflow-hidden flex flex-col`,y),children:[h(de,{onPublish:async()=>{if(!Se){K(!0);try{if(Q){_.error(b(`pageClient.editContentFirst`));return}let e=H;if(e=e.replace(/<br>/g,``),!e&&O.length===0&&!A){_.error(b(`pageClient.editContentFirst`));return}let t=le(e,W),n={content:e,mentioned_users:t,collection_ids:C===`0`?[]:[C]};O.length>0?(n.medias=O.map(e=>(delete e.index,e)),n.type=1):A?(n.medias=[{media_url:A,is_video:!0,cover_image:M,video_resolution:be,cover_image_resolution:z,video_duration:I,video_size:xe}],n.type=2):n.type=3,await oe(n),_.success(b(`pageClient.publishSuccess`)),k([]),j(``),N(``),F(``),L(0),V(0),R(``),B(``),U(``),G([]),w(`0`),ve.back()}catch(e){console.error(e),_.error(b(`pageClient.publishFailed`))}finally{K(!1)}}},isEmpty:Q}),h(ue,{ref:x,content:H,onContentChange:U,atUsers:W,onAtUsersChange:G}),E&&h(c,{currentFiles:E.currentFiles,totalFiles:E.totalFiles,currentTasks:E.currentTasks,totalTasks:E.totalTasks}),(O.length>0||A)&&h(fe,{materialList:O,videoUrl:A,videoDuration:I,coverUrl:M,originCoverUrl:P,isKeyboardOpen:T,onMaterialDelete:Ae,onVideoDelete:je,onMaterialAdd:Z,onCoverClick:Me,onPreview:ke}),h(pe,{isKeyboardOpen:T,onMaterialClick:()=>void Z(),onVideoClick:()=>void Ee(),onAtUserClick:Pe}),h(u,{active:C,setActive:w}),h(t,{open:Ce,onOpenChange:e=>{q(e),e||(J.current?.(!1),J.current=null)},children:g(ee,{children:[g(re,{children:[h(ie,{children:b(`pageClient.title`)}),h(te,{children:we})]}),g(ne,{children:[h(r,{onClick:()=>{q(!1),J.current?.(!1),J.current=null},children:b(`pageClient.cancel`)}),h(n,{onClick:()=>{q(!1),J.current?.(!0),J.current=null},children:b(`pageClient.resume`)})]})]})}),h(o,{open:ye,onOpenChange:De,showCloseButton:!1,className:`w-full rounded-[8px] bg-bg2`,children:h(l,{onSelect:Ne,onClose:Oe})})]})}export{y as PublishPageClient};
2
+ "use client";import{cn as e}from"../../../utils/cn.mjs";import{AlertDialog as t,AlertDialogAction as n,AlertDialogCancel as r,AlertDialogContent as ee,AlertDialogDescription as te,AlertDialogFooter as ne,AlertDialogHeader as re,AlertDialogTitle as ie}from"../../ui/alert-dialog.mjs";import{getAtUserElement as i}from"../../../utils/common.mjs";import ae from"../../../utils/event-bus.mjs";import{pCommunityPublishContent as oe}from"../../../service/generated/client.mjs";import{Box as se}from"../../ui/box.mjs";import{useKeyboardOpen as ce}from"../../../hooks/use-keyboard-open.mjs";import{eventKey as a}from"../../../constants/event-key.mjs";import{useMediaPreview as o}from"../../common/media-preview/index.mjs";import s from"../../ui/popup.mjs";import{UploadProgress as c}from"./components/upload-progress.mjs";import{ContactList as l}from"../../biz/business/contact/contact-list.mjs";import{Collection as u}from"./components/collection.mjs";import{MAX_MATERIAL_COUNT as d}from"./constants.mjs";import{filterAtUserNames as le}from"./utils/publish-utils.mjs";import{PublishEditor as ue}from"./components/editor.mjs";import{PublishHeader as de}from"./components/header.mjs";import{MaterialGrid as fe}from"./components/material-grid.mjs";import{Toolbar as pe}from"./components/toolbar.mjs";import{useFileUpload as me}from"./hooks/use-file-upload.mjs";import{useCallback as f,useEffect as he,useMemo as ge,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{toast as _}from"sonner";import{useTranslations as _e}from"next-intl";import{useRouter as v}from"next/navigation";function y({className:y}={}){let b=_e(`components.pages.publish`),ve=v(),x=p(null),[ye,S]=m(!1),[C,w]=m(`0`),{isOpen:T}=ce(),[E,D]=m(null),[O,k]=m([]),[A,j]=m(``),[M,N]=m(``),[P,F]=m(``),[I,L]=m(0),[be,R]=m(``),[z,B]=m(``),[xe,V]=m(0),[H,U]=m(``),[W,G]=m([]),[Se,K]=m(!1),[Ce,q]=m(!1),[we,Te]=m(``),J=p(null);he(()=>()=>{ae.emit(a.WAIT_LOADING_SHOW,{show:!1})},[]);let Y=f(e=>(Te(e),q(!0),new Promise(e=>{J.current=e})),[]),{selectFile:X}=me({onProgressUpdate:(e,t,n,r)=>{D(r>0?{currentFiles:e,totalFiles:t,currentTasks:n,totalTasks:r}:null)}}),Z=f(async()=>{if(A){if(!await Y(b(`pageClient.switchToPostConfirm`)))return;j(``),N(``),F(``),L(0),V(0),R(``),B(``)}if(O.length>=d){_.error(b(`pageClient.maxMaterialCount`));return}let e=await X(`material`,{maxMaterialCount:d-O.length});!e||e.type!==`material`||(e.errors.length>0&&_.error(e.errors.length===1?e.errors[0]:b(`pageClient.uploadFailedCount`,{count:e.errors.length})),e.items.length>0&&k(t=>[...t,...e.items].slice(0,d)))},[Y,O.length,X,B,N,F,k,R,L,V,j,b,A]),Ee=f(async()=>{if(O.length>0){if(!await Y(b(`pageClient.switchToVideoConfirm`)))return;k([])}let e=await X(`video`);!e||e.type!==`video`||(j(e.videoUrl),N(e.coverUrl),F(e.coverUrl),R(e.resolution),B(e.coverImageResolution),L(e.videoDuration),V(e.videoSize))},[Y,O.length,X,B,N,F,k,R,L,V,j,b]);function De(e){S(e)}function Oe(){S(!1)}let Q=ge(()=>(H.trim()===``||H.trim()===`<br>`)&&O.length===0&&!A,[H,O.length,A]),$=o(),ke=f(()=>{$.open(O.map(e=>({src:e.media_url,type:e.is_video?`video`:`image`,cover:e.cover_image})))},[O,$]),Ae=f(e=>{k(t=>t.filter((t,n)=>n!==e))},[k]),je=f(()=>{j(``),N(``),F(``),L(0),V(0),R(``),B(``)},[N,F,B,R,L,V,j]),Me=f(async()=>{let e=await X(`cover`);!e||e.type!==`cover`||(N(e.coverUrl),B(e.coverImageResolution))},[X,B,N]),Ne=f(e=>{S(!1),G(t=>[...t,e]),x.current?.restoreSelection();let t=`${i(e)}&nbsp;`;x.current?.insertHtml(t)},[G]),Pe=f(()=>{x.current?.saveSelection(),S(!0)},[]);return g(se,{className:e(`relative min-h-screen max-w-full bg-bg2 overflow-hidden flex flex-col`,y),children:[h(de,{onPublish:async()=>{if(!Se){K(!0);try{if(Q){_.error(b(`pageClient.editContentFirst`));return}let e=H;if(e=e.replace(/<br>/g,``),!e&&O.length===0&&!A){_.error(b(`pageClient.editContentFirst`));return}let t=le(e,W),n={content:e,mentioned_users:t,collection_ids:C===`0`?[]:[C]};O.length>0?(n.medias=O.map(e=>(delete e.index,e)),n.type=1):A?(n.medias=[{media_url:A,is_video:!0,cover_image:M,video_resolution:be,cover_image_resolution:z,video_duration:I,video_size:xe}],n.type=2):n.type=3,await oe(n),_.success(b(`pageClient.publishSuccess`)),k([]),j(``),N(``),F(``),L(0),V(0),R(``),B(``),U(``),G([]),w(`0`),ve.back()}catch(e){console.error(e),_.error(b(`pageClient.publishFailed`))}finally{K(!1)}}},isEmpty:Q}),h(ue,{ref:x,content:H,onContentChange:U,atUsers:W,onAtUsersChange:G}),E&&h(c,{currentFiles:E.currentFiles,totalFiles:E.totalFiles,currentTasks:E.currentTasks,totalTasks:E.totalTasks}),(O.length>0||A)&&h(fe,{materialList:O,videoUrl:A,videoDuration:I,coverUrl:M,originCoverUrl:P,isKeyboardOpen:T,onMaterialDelete:Ae,onVideoDelete:je,onMaterialAdd:Z,onCoverClick:Me,onPreview:ke}),h(pe,{isKeyboardOpen:T,onMaterialClick:()=>void Z(),onVideoClick:()=>void Ee(),onAtUserClick:Pe}),h(u,{active:C,setActive:w}),h(t,{open:Ce,onOpenChange:e=>{q(e),e||(J.current?.(!1),J.current=null)},children:g(ee,{children:[g(re,{children:[h(ie,{children:b(`pageClient.title`)}),h(te,{children:we})]}),g(ne,{children:[h(r,{onClick:()=>{q(!1),J.current?.(!1),J.current=null},children:b(`pageClient.cancel`)}),h(n,{onClick:()=>{q(!1),J.current?.(!0),J.current=null},children:b(`pageClient.resume`)})]})]})}),h(s,{open:ye,onOpenChange:De,showCloseButton:!1,className:`w-full rounded-[8px] bg-bg2`,children:h(l,{onSelect:Ne,onClose:Oe})})]})}export{y as PublishPageClient};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gCommunityGetHotContentList as t,gContentGetHotVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{Text as o}from"../../ui/text.mjs";import{useRequest as s}from"../../../hooks/query/use-query.mjs";import{getPostDetailPagePath as c}from"../../../utils/tools.mjs";import l from"../../common/at-element/index.mjs";import{useCardDecoration as u}from"../../../hooks/use-card-decoration.mjs";import d from"./style.module.mjs";import f from"../../ui/rate.mjs";import{memo as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";import _ from"next/link";const v=p(({list:e})=>{let t=g(`components.pages.search`),{getCalculationScore:n}=u();return e.length===0?m(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:h(i,{children:[m(o,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`})]})]})}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),e.map((e,t)=>h(_,{className:`w-full flex items-center justify-between mt-[12px] shrink-0`,href:c({id:e.video_id,contentType:0}),children:[h(i,{className:`w-[76px] h-[102px] rounded-[8px] overflow-hidden relative bg-bg2`,children:[m(r,{src:e.cover||``,fill:!0,alt:e.name||``,objectFit:`cover`}),m(i,{className:`w-[18px] h-[18px] rounded-tl-[8px] rounded-br-[8px] flex items-center justify-center overflow-hidden absolute left-0 top-0 z-[1]`,style:{background:t>2?`linear-gradient( 218deg, #909BB7 0%, #5D7198 100%)`:`linear-gradient( 175deg, #FD4C5E 0%, #F05D19 100%)`},children:m(o,{className:`text-[12px] leading-[12px] text-white`,children:t+1})})]}),h(i,{className:`flex-1 flex flex-col ml-[12px]`,children:[m(o,{className:`leading-[26px] text-text1 text-[18px] font-bold max-w-[200px] line-clamp-1 mb-[4px]`,children:e.name}),h(i,{className:`flex items-center`,style:{transform:`scale(0.6)`,transformOrigin:`left center`},children:[m(f,{allowHalf:!0,value:n({score:String(e.score??0)})}),m(o,{className:`ml-[8px] text-[24px] text-[#F59E0B] font-bold leading-[24px]`,children:e.score?(Number(e.score)/10).toFixed(1):0})]}),m(i,{className:`w-fit mt-[4px] h-[20px] leading-[20px] px-[6px] text-text2 text-[12px] bg-line1 rounded-[4px]`,children:e.cat_name})]})]},String(e.video_id??t)))]})}),y=p(({list:e})=>{let t=g(`components.pages.search`);return e.length===0?h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`})]})]}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),e.map((e,t)=>h(_,{className:`w-full h-[48px] mt-[8px] flex items-center`,href:c({id:e.content_id,contentType:1}),children:[h(o,{className:`text-[16px] leading-[24px] font-bold ${t<3?`text-theme1`:`text-text3`}`,children:[t+1,`.`]}),m(o,{className:`ml-[8px] text-[16px] text-text1 leading-[24px] line-clamp-1 max-w-[260px] ${d.hotInfoTitle}`,children:m(l,{text:e.title??``,atUsers:[]})})]},String(e.content_id??t)))]})});function b({isShow:r}){let{userInfo:a}=e(),{data:o}=s([`hotVideo`],()=>n({user_id:a.user_id})),c=o?.data?.hot_video_list??[],{data:l}=s([`hotContent`],()=>t({user_id:a.user_id})),u=l?.data?.hot_content_list??[];return r?h(i,{className:`w-full px-[12px] flex gap-x-[12px] flex-nowrap pb-[24px] ${d.gScrollBoxX}`,children:[m(v,{list:c}),m(y,{list:u})]}):null}export{b as default};
2
+ "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gCommunityGetHotContentList as t,gContentGetHotVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{Text as o}from"../../ui/text.mjs";import{useRequest as s}from"../../../hooks/query/use-query.mjs";import{getPostDetailPagePath as c}from"../../../utils/tools.mjs";import l from"../../common/at-element/index.mjs";import{useCardDecoration as u}from"../../../hooks/use-card-decoration.mjs";import d from"../../ui/rate.mjs";import f from"./style.module.mjs";import{memo as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";import _ from"next/link";const v=p(({list:e})=>{let t=g(`components.pages.search`),{getCalculationScore:n}=u();return e.length===0?m(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:h(i,{children:[m(o,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`})]})]})}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),e.map((e,t)=>h(_,{className:`w-full flex items-center justify-between mt-[12px] shrink-0`,href:c({id:e.video_id,contentType:0}),children:[h(i,{className:`w-[76px] h-[102px] rounded-[8px] overflow-hidden relative bg-bg2`,children:[m(r,{src:e.cover||``,fill:!0,alt:e.name||``,objectFit:`cover`}),m(i,{className:`w-[18px] h-[18px] rounded-tl-[8px] rounded-br-[8px] flex items-center justify-center overflow-hidden absolute left-0 top-0 z-[1]`,style:{background:t>2?`linear-gradient( 218deg, #909BB7 0%, #5D7198 100%)`:`linear-gradient( 175deg, #FD4C5E 0%, #F05D19 100%)`},children:m(o,{className:`text-[12px] leading-[12px] text-white`,children:t+1})})]}),h(i,{className:`flex-1 flex flex-col ml-[12px]`,children:[m(o,{className:`leading-[26px] text-text1 text-[18px] font-bold max-w-[200px] line-clamp-1 mb-[4px]`,children:e.name}),h(i,{className:`flex items-center`,style:{transform:`scale(0.6)`,transformOrigin:`left center`},children:[m(d,{allowHalf:!0,value:n({score:String(e.score??0)})}),m(o,{className:`ml-[8px] text-[24px] text-[#F59E0B] font-bold leading-[24px]`,children:e.score?(Number(e.score)/10).toFixed(1):0})]}),m(i,{className:`w-fit mt-[4px] h-[20px] leading-[20px] px-[6px] text-text2 text-[12px] bg-line1 rounded-[4px]`,children:e.cat_name})]})]},String(e.video_id??t)))]})}),y=p(({list:e})=>{let t=g(`components.pages.search`);return e.length===0?h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`})]})]}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),e.map((e,t)=>h(_,{className:`w-full h-[48px] mt-[8px] flex items-center`,href:c({id:e.content_id,contentType:1}),children:[h(o,{className:`text-[16px] leading-[24px] font-bold ${t<3?`text-theme1`:`text-text3`}`,children:[t+1,`.`]}),m(o,{className:`ml-[8px] text-[16px] text-text1 leading-[24px] line-clamp-1 max-w-[260px] ${f.hotInfoTitle}`,children:m(l,{text:e.title??``,atUsers:[]})})]},String(e.content_id??t)))]})});function b({isShow:r}){let{userInfo:a}=e(),{data:o}=s([`hotVideo`],()=>n({user_id:a.user_id})),c=o?.data?.hot_video_list??[],{data:l}=s([`hotContent`],()=>t({user_id:a.user_id})),u=l?.data?.hot_content_list??[];return r?h(i,{className:`w-full px-[12px] flex gap-x-[12px] flex-nowrap pb-[24px] ${f.gScrollBoxX}`,children:[m(v,{list:c}),m(y,{list:u})]}):null}export{b as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as r}from"../../../service/generated/client.mjs";import{Text as i}from"../../ui/text.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{useSearchHistory as o}from"../../../hooks/use-search-history.mjs";import{eventKey as s}from"../../../constants/event-key.mjs";import{SearchHistoryServer as c}from"../../biz/business/search-history/server.mjs";import l from"./hot-recommend.mjs";import u from"./hot-search.mjs";import d from"./search-result/index.mjs";import f from"./top-header.mjs";import{memo as p,useEffect as m,useMemo as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{useTranslations as b}from"next-intl";import{useSearchParams as x}from"next/navigation";const S=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.post`,value:`info`},{labelKey:`tabs.user`,value:`user`}],C=p(({searchType:e,onChange:t,tabList:n})=>v(`nav`,{className:`w-full h-[42px] bg-bg1 flex items-center px-[3px] sticky top-[53px] left-0 z-50`,children:n.map(n=>v(i,{className:`h-[30px] rounded-[15px] leading-[30px] px-[9px] text-[16px] bg-transparent transition-all duration-150 ${e===n.value?`text-theme5 !text-[20px] font-bold`:`text-text2`}`,onClick:()=>{e!==n.value&&t(n.value)},children:n.label},n.value))}));function w(){let i=b(`components.pages.search.pageClient`),{userInfo:p}=n(),w=p?.user_id||`guest`,T=x().get(`q`)?.toString()||``,E=T?decodeURIComponent(T):``,{data:D,refetch:O}=a([`hotSearchKey`],()=>r({user_id:w})),k=h(()=>D?.data?.recommend_list??[],[D]),[A,j]=g(E),M=h(()=>S.map(e=>({value:e.value,label:i(e.labelKey)})),[i]),[N,P]=g(E),[F,I]=g(0),[L,R]=g(S[0].value),[,z]=g([]),{history:B,addHistory:V}=o({storageKey:w}),H=h(()=>A.trim()===``?k.length>0||B.length>0||A.trim()===``:!1,[k,A,B]),U=h(()=>A.trim()!==``&&!H,[A,H]);return m(()=>(t.on(s.EXCHANGE_SEARCH_TYPE,R),()=>{t.off(s.EXCHANGE_SEARCH_TYPE,R)}),[R]),y(`div`,{className:`w-full min-h-screen bg-bg1 pb-[12px]`,children:[v(f,{setSearchInputVal:t=>{t!==A&&(z([]),j(t),e({q:t}))},initInputVal:N,initInputVersion:F,addSearchHistory:V}),H&&y(`div`,{className:`w-full pt-[8px]`,children:[B.length>0&&v(c,{title:i(`searchHistory`),rows:`2`,onHistoryClick:e=>{P(e),I(e=>e+1)}}),v(u,{initHotSearchKeywordList:k,onRefreshHotKey:async()=>(await O()).data??{code:0,message:``,data:{recommend_list:[]}},onClick:e=>{P(e.title||``),I(e=>e+1)}})]}),v(l,{isShow:A.trim()===``}),U&&y(_,{children:[v(C,{searchType:L,tabList:M,onChange:e=>{R(e),z([])}}),v(d,{inputVal:A,searchType:L},`${L}-${A}`)]})]})}export{w as default};
2
+ "use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as r}from"../../../service/generated/client.mjs";import{Text as i}from"../../ui/text.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{eventKey as o}from"../../../constants/event-key.mjs";import{useSearchHistory as s}from"../../../hooks/use-search-history.mjs";import{SearchHistoryClient as c}from"../../biz/business/search-history/client.mjs";import l from"./hot-recommend.mjs";import u from"./hot-search.mjs";import d from"./search-result/index.mjs";import f from"./top-header.mjs";import{memo as p,useEffect as m,useMemo as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{useTranslations as b}from"next-intl";import{usePathname as x,useRouter as S,useSearchParams as C}from"next/navigation";const w=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.post`,value:`info`},{labelKey:`tabs.user`,value:`user`}],T=p(({searchType:e,onChange:t,tabList:n})=>v(`nav`,{className:`w-full h-[42px] bg-bg1 flex items-center px-[3px] sticky top-[53px] left-0 z-50`,children:n.map(n=>v(i,{className:`h-[30px] rounded-[15px] leading-[30px] px-[9px] text-[16px] bg-transparent transition-all duration-150 ${e===n.value?`text-theme5 !text-[20px] font-bold`:`text-text2`}`,onClick:()=>{e!==n.value&&t(n.value)},children:n.label},n.value))}));function E(){let i=b(`components.pages.search.pageClient`),{userInfo:p}=n(),E=p?.user_id||`guest`,D=C(),O=x(),k=S(),A=D.get(`q`)?.toString()||``,j=A?decodeURIComponent(A):``,{data:M,refetch:N}=a([`hotSearchKey`],()=>r({user_id:E})),P=h(()=>M?.data?.recommend_list??[],[M]),[F,I]=g(j),L=h(()=>w.map(e=>({value:e.value,label:i(e.labelKey)})),[i]),[R,z]=g(j),[B,V]=g(0),[H,U]=g(w[0].value),[,W]=g([]),{history:G,addHistory:K}=s({storageKey:E}),q=h(()=>F.trim()===``?P.length>0||G.length>0||F.trim()===``:!1,[P,F,G]),J=h(()=>F.trim()!==``&&!q,[F,q]);return m(()=>(t.on(o.EXCHANGE_SEARCH_TYPE,U),()=>{t.off(o.EXCHANGE_SEARCH_TYPE,U)}),[U]),y(`div`,{className:`w-full min-h-screen bg-bg1 pb-[12px]`,children:[v(f,{setSearchInputVal:t=>{t!==F&&(W([]),I(t),e({q:t}))},initInputVal:R,initInputVersion:B,addSearchHistory:K}),q&&y(`div`,{className:`w-full pt-[8px]`,children:[G.length>0&&v(c,{title:i(`searchHistory`),rows:2,storageKey:E,onHistoryClick:e=>{z(e),V(e=>e+1);let t=new URLSearchParams(D.toString());t.set(`q`,e),k.push(`${O}?${t.toString()}`)}}),v(u,{initHotSearchKeywordList:P,onRefreshHotKey:async()=>(await N()).data??{code:0,message:``,data:{recommend_list:[]}},onClick:e=>{z(e.title||``),V(e=>e+1)}})]}),v(l,{isShow:F.trim()===``}),J&&y(_,{children:[v(T,{searchType:H,tabList:L,onChange:e=>{U(e),W([])}}),v(d,{inputVal:F,searchType:H},`${H}-${F}`)]})]})}export{E as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../../service/generated/client.mjs";import{Box as n}from"../../../ui/box.mjs";import{List as r}from"../../../ui/list.mjs";import{usePaginated as i,useRefetchQuery as a,useRequest as o,useUpdateRequest as s}from"../../../../hooks/query/use-query.mjs";import{UserActivityList as c}from"../../../common/list/user-activity-list/user-activity-list.mjs";import{eventKey as l}from"../../../../constants/event-key.mjs";import{UserList as u}from"./search-user.mjs";import{mapRecommendContentToUserActivityItem as d}from"../search-utils.mjs";import{VideoList as f}from"./search-video-info.mjs";import{useCallback as p,useMemo as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useTranslations as v}from"next-intl";function y({inputVal:y}){let b=v(`components.pages.search.searchResult`),{data:x=[]}=o([`searchByKeyForAll`,y,3],async()=>(await t({data_type:2,extra_params:JSON.stringify({type:3,keywords:y}),page:1,page_size:5})).data.videos?.list),S=[`searchByKeyForAll`,y,4],{data:C=[]}=o(S,async()=>(await t({data_type:2,extra_params:JSON.stringify({type:4,keywords:y}),page:1,page_size:5})).data.users?.list),w=m(()=>[`searchByKeyForAll`,y,2],[y]),T=p(async e=>await t({data_type:2,extra_params:JSON.stringify({type:2,keywords:y}),page:e||1,page_size:10}),[y,10]),E=i({key:w,initialPageParam:1,async queryFn(e){return(await T(e))?.data?.contents??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),D=m(()=>E.data?.pages.flatMap(e=>e.list??[])??[],[E.data?.pages]),O=async e=>{if(e!==!1)try{E&&await E.fetchNextPage()}catch(e){console.error(`获取信息列表失败`,e)}},k=s(),A=s(),j=a(),M=e=>{k(S,t=>e)},N=p(e=>{A(w,t=>{if(!t)return t;let n=t.pages.map(t=>({...t,list:(t.list??[]).map(t=>t.content_id===e.content_id?e:t)}));return{...t,pages:n}})},[w,A]),P=p(()=>{j(w)},[w,j]),F=p(e=>({...d(e),onLikeSuccess(t){N({...e,like_count:String(t.count),dislike_count:t.dislikeCount===void 0?e.dislike_count:String(t.dislikeCount),interaction:{...e.interaction,is_liked:t.isLiked,is_dislike:t.isDisliked??e.interaction?.is_dislike}})},onDislikeSuccess(t){N({...e,like_count:t.likeCount===void 0?e.like_count:String(t.likeCount),dislike_count:String(t.count),interaction:{...e.interaction,is_dislike:t.isDisliked,is_liked:t.isLiked??e.interaction?.is_liked}})}}),[N]),I=m(()=>D.map(F),[F,D]),L=m(()=>D.length===0&&!E.hasNextPage&&x.length===0&&C.length===0,[D.length,E.hasNextPage,C.length,x.length]),R=m(()=>x.length===0&&C.length===0,[C.length,x.length]);return L?g(n,{className:`w-full pt-[12px]`,children:g(r,{loading:E.isFetching,loadMore:O,hasMore:E.hasNextPage,empty:`nodata`,emptyText:b(`searchAll.emptyResult`),children:[]})}):_(n,{className:`w-full pt-[12px] ${R?`!pt-0`:``}`,children:[C.length>0&&g(u,{list:C,onUpdate:M}),x.length>0&&_(h,{children:[g(f,{list:x}),_(n,{className:`w-fit h-[46px] leading-[46px] mx-auto mt-[-12px] text-[14px] text-text2`,onClick:()=>{e.emit(l.EXCHANGE_SEARCH_TYPE,`video`)},children:[b(`searchAll.more`),` `,y,` `,b(`searchAll.relatedSuffix`)]})]}),I.length>0&&g(n,{className:`w-full`,children:g(c,{list:I,loading:E.isFetching,loadMore:O,hasMore:E.hasNextPage,emptyText:b(`searchAll.emptyResult`),showGroupHeaders:!1,onActionSuccess:P})})]})}export{y as default};
2
+ "use client";import e from"../../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../../service/generated/client.mjs";import{Box as n}from"../../../ui/box.mjs";import{List as r}from"../../../ui/list.mjs";import{usePaginated as i,useRefetchQuery as a,useRequest as o,useUpdateRequest as s}from"../../../../hooks/query/use-query.mjs";import{eventKey as c}from"../../../../constants/event-key.mjs";import{UserActivityList as l}from"../../../common/list/user-activity-list/user-activity-list.mjs";import{UserList as u}from"./search-user.mjs";import{mapRecommendContentToUserActivityItem as d}from"../search-utils.mjs";import{VideoList as f}from"./search-video-info.mjs";import{useCallback as p,useMemo as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useTranslations as v}from"next-intl";function y({inputVal:y}){let b=v(`components.pages.search.searchResult`),{data:x=[]}=o([`searchByKeyForAll`,y,3],async()=>(await t({data_type:2,extra_params:JSON.stringify({type:3,keywords:y}),page:1,page_size:5})).data.videos?.list),S=[`searchByKeyForAll`,y,4],{data:C=[]}=o(S,async()=>(await t({data_type:2,extra_params:JSON.stringify({type:4,keywords:y}),page:1,page_size:5})).data.users?.list),w=m(()=>[`searchByKeyForAll`,y,2],[y]),T=p(async e=>await t({data_type:2,extra_params:JSON.stringify({type:2,keywords:y}),page:e||1,page_size:10}),[y,10]),E=i({key:w,initialPageParam:1,async queryFn(e){return(await T(e))?.data?.contents??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),D=m(()=>E.data?.pages.flatMap(e=>e.list??[])??[],[E.data?.pages]),O=async e=>{if(e!==!1)try{E&&await E.fetchNextPage()}catch(e){console.error(`获取信息列表失败`,e)}},k=s(),A=s(),j=a(),M=e=>{k(S,t=>e)},N=p(e=>{A(w,t=>{if(!t)return t;let n=t.pages.map(t=>({...t,list:(t.list??[]).map(t=>t.content_id===e.content_id?e:t)}));return{...t,pages:n}})},[w,A]),P=p(()=>{j(w)},[w,j]),F=p(e=>({...d(e),onLikeSuccess(t){N({...e,like_count:String(t.count),dislike_count:t.dislikeCount===void 0?e.dislike_count:String(t.dislikeCount),interaction:{...e.interaction,is_liked:t.isLiked,is_dislike:t.isDisliked??e.interaction?.is_dislike}})},onDislikeSuccess(t){N({...e,like_count:t.likeCount===void 0?e.like_count:String(t.likeCount),dislike_count:String(t.count),interaction:{...e.interaction,is_dislike:t.isDisliked,is_liked:t.isLiked??e.interaction?.is_liked}})}}),[N]),I=m(()=>D.map(F),[F,D]),L=m(()=>D.length===0&&!E.hasNextPage&&x.length===0&&C.length===0,[D.length,E.hasNextPage,C.length,x.length]),R=m(()=>x.length===0&&C.length===0,[C.length,x.length]);return L?g(n,{className:`w-full pt-[12px]`,children:g(r,{loading:E.isFetching,loadMore:O,hasMore:E.hasNextPage,empty:`nodata`,emptyText:b(`searchAll.emptyResult`),children:[]})}):_(n,{className:`w-full pt-[12px] ${R?`!pt-0`:``}`,children:[C.length>0&&g(u,{list:C,onUpdate:M}),x.length>0&&_(h,{children:[g(f,{list:x}),_(n,{className:`w-fit h-[46px] leading-[46px] mx-auto mt-[-12px] text-[14px] text-text2`,onClick:()=>{e.emit(c.EXCHANGE_SEARCH_TYPE,`video`)},children:[b(`searchAll.more`),` `,y,` `,b(`searchAll.relatedSuffix`)]})]}),I.length>0&&g(n,{className:`w-full`,children:g(l,{list:I,loading:E.isFetching,loadMore:O,hasMore:E.hasNextPage,emptyText:b(`searchAll.emptyResult`),showGroupHeaders:!1,onActionSuccess:P})})]})}export{y as default};
@@ -1,2 +1,2 @@
1
1
 
2
- import{cn as e}from"../../../utils/cn.mjs";import{gContentGetAppChannels as t,gInteractionGetFollowingContentList as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{HydrationBoundary as a}from"../../../hooks/query/hydration-boundary.mjs";import{defaultLocale as o,isValidLocale as s,resolveLocaleByPriority as c,resolveLocaleFromAcceptLanguage as l}from"../../../i18n.mjs";import{queryKey as u}from"../../../constants/query-key.mjs";import{getTranslator as d}from"../../../i18n/translator.mjs";import{FollowTopHeader as f}from"./_components/follow-top-header.mjs";import{PostTab as p}from"./_components/post-tab.mjs";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{cookies as g,headers as _}from"next/headers";function v(e){return s(e)?e:o}async function y({userId:e,page:t,pageSize:r,authConfig:i}){let a=await n({app_id:0,user_id:e,page:t,page_size:r,content_type:2},i),o=a.data?.post_infos??[];return{data:{list:o,total:a.data?.total??o.length,has_more:!!a.data?.has_more}}}async function b({className:n}={}){let s=await g(),b=await _(),x=s.get(`token`)?.value||``,S=d(v(c(s.get(`NEXT_LOCALE`)?.value,l(b.get(`accept-language`)),o))),C=s.get(`userId`)?.value||``,w=x?{headers:{Authorization:`Bearer ${x}`}}:void 0,T=[],E=[];return E.push({queryKey:[u.CHANNEL],queryFn:()=>t()}),C&&E.push({type:`infinite`,queryKey:[...T,`user-follow-post`,C],initialPageParam:1,async queryFn(e){return y({userId:C,page:e,pageSize:10,authConfig:w})}}),m(a,{prefetch:E,children:h(r,{className:e(`w-full h-full overflow-y-auto `,n),children:[m(f,{}),m(r,{className:`w-full px-[16px] py-[12px] g-scroll-box-x scrollbar-hide flex items-center min-w-max`,children:[{key:`posts`,label:S(`components.pages.userFollow.page.tabs.posts`)}].map(e=>m(r,{className:`h-full px-[9px] shrink-0 flex items-center justify-center`,children:m(i,{className:`leading-[24px] transition-all duration-100 !text-theme5 !text-[20px] font-bold`,children:e.label})},e.key))}),m(r,{className:`w-full bg-bg2`,children:m(p,{queryKeyPrefix:T,cookieUserId:C||void 0})})]})})}export{b as UserFollowPage};
2
+ import{cn as e}from"../../../utils/cn.mjs";import{gContentGetAppChannels as t,gInteractionGetFollowingContentList as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{HydrationBoundary as a}from"../../../hooks/query/hydration-boundary.mjs";import{queryKey as o}from"../../../constants/query-key.mjs";import{defaultLocale as s,isValidLocale as c,resolveLocaleByPriority as l,resolveLocaleFromAcceptLanguage as u}from"../../../i18n.mjs";import{getTranslator as d}from"../../../i18n/translator.mjs";import{FollowTopHeader as f}from"./_components/follow-top-header.mjs";import{PostTab as p}from"./_components/post-tab.mjs";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{cookies as g,headers as _}from"next/headers";function v(e){return c(e)?e:s}async function y({userId:e,page:t,pageSize:r,authConfig:i}){let a=await n({app_id:0,user_id:e,page:t,page_size:r,content_type:2},i),o=a.data?.post_infos??[];return{data:{list:o,total:a.data?.total??o.length,has_more:!!a.data?.has_more}}}async function b({className:n}={}){let c=await g(),b=await _(),x=c.get(`token`)?.value||``,S=d(v(l(c.get(`NEXT_LOCALE`)?.value,u(b.get(`accept-language`)),s))),C=c.get(`userId`)?.value||``,w=x?{headers:{Authorization:`Bearer ${x}`}}:void 0,T=[],E=[];return E.push({queryKey:[o.CHANNEL],queryFn:()=>t()}),C&&E.push({type:`infinite`,queryKey:[...T,`user-follow-post`,C],initialPageParam:1,async queryFn(e){return y({userId:C,page:e,pageSize:10,authConfig:w})}}),m(a,{prefetch:E,children:h(r,{className:e(`w-full h-full overflow-y-auto `,n),children:[m(f,{}),m(r,{className:`w-full px-[16px] py-[12px] g-scroll-box-x scrollbar-hide flex items-center min-w-max`,children:[{key:`posts`,label:S(`components.pages.userFollow.page.tabs.posts`)}].map(e=>m(r,{className:`h-full px-[9px] shrink-0 flex items-center justify-center`,children:m(i,{className:`leading-[24px] transition-all duration-100 !text-theme5 !text-[20px] font-bold`,children:e.label})},e.key))}),m(r,{className:`w-full bg-bg2`,children:m(p,{queryKeyPrefix:T,cookieUserId:C||void 0})})]})})}export{b as UserFollowPage};
@@ -1,2 +1,2 @@
1
1
 
2
- import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{HydrationBoundary as t}from"../../../hooks/query/hydration-boundary.mjs";import{normalizeEpisodeNumber as n,warmupProcessM3u8Auto as r}from"../../common/video-player/process-m3u8-cache.mjs";import{revalidate as i}from"../../../constants/revalidate.mjs";import{DetailStructuredData as a}from"../../biz/business/detail/detail-structured-data.mjs";import o from"./video-detail-client.mjs";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";async function u({params:u,isWebView:d=!1,materialConfig:f}){let{level:p}=await u,m=p?.[0]||``,h=p.findIndex(e=>e===`episode`),g=n(h>=0?p?.[h+1]:void 0,1),_=null,v=null;if(m){_=await e({id:m},{revalidate:i.TIME});let t=_?.data?.video;t&&typeof t==`object`&&(await r(t.links,g),v={...t,mid:t.mid||t.id||``,content_type:0,episode_cnt:t.links?.length||0})}return l(s,{children:[v&&c(a,{information:v,detailId:m}),c(t,{prefetch:m&&_?[{queryKey:[`video-detail`,m],queryFn:()=>Promise.resolve(_)}]:[],children:c(o,{detailId:m,isWebView:d,materialConfig:f})})]})}export{u as default};
2
+ import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{HydrationBoundary as t}from"../../../hooks/query/hydration-boundary.mjs";import{revalidate as n}from"../../../constants/revalidate.mjs";import{normalizeEpisodeNumber as r,warmupProcessM3u8Auto as i}from"../../common/video-player/process-m3u8-cache.mjs";import{DetailStructuredData as a}from"../../biz/business/detail/detail-structured-data.mjs";import o from"./video-detail-client.mjs";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";async function u({params:u,isWebView:d=!1,materialConfig:f}){let{level:p}=await u,m=p?.[0]||``,h=p.findIndex(e=>e===`episode`),g=r(h>=0?p?.[h+1]:void 0,1),_=null,v=null;if(m){_=await e({id:m},{revalidate:n.TIME});let t=_?.data?.video;t&&typeof t==`object`&&(await i(t.links,g),v={...t,mid:t.mid||t.id||``,content_type:0,episode_cnt:t.links?.length||0})}return l(s,{children:[v&&c(a,{information:v,detailId:m}),c(t,{prefetch:m&&_?[{queryKey:[`video-detail`,m],queryFn:()=>Promise.resolve(_)}]:[],children:c(o,{detailId:m,isWebView:d,materialConfig:f})})]})}export{u as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import n from"../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as r}from"../../../utils/decrypt-image-client.mjs";import{gContentGetAppChannels as i,gContentGetVideoDetail as a,pInteractionBrowse as o}from"../../../service/generated/client.mjs";import{uint8ArrayToBase64 as s}from"../../../utils/uint8.mjs";import{EmptyState as c}from"../../ui/empty.mjs";import{useRequest as l}from"../../../hooks/query/use-query.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as p}from"../../../hooks/use-content-operate.mjs";import{queryKey as m}from"../../../constants/query-key.mjs";import ee from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{resolveMaterialProps as te,videoDetailMaterials as ne}from"../../biz/business/detail/materials/registry.mjs";import{DetailHero as re}from"../../biz/business/detail/video-hero.mjs";import{Fragment as h,useCallback as g,useEffect as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useTranslations as ie}from"next-intl";import{useParams as S,useSearchParams as C}from"next/navigation";const w=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{rows:2}}];function T({detailId:f,initialInformation:T,isWebView:E=!1,materialConfig:D}){let O=ie(`components.pages.videoDetail`),k=S(),ae=C(),A=k.level,j=Array.isArray(A)?A:typeof A==`string`?[A]:[],M=j.findIndex(e=>e===`episode`),N=M>=0?j[M+1]:j[2],P=Math.max(1,Number(N)||1),[F,I]=d(`detail-current-series-num-${f}`,P);_(()=>{I(P)},[f,P,I]);let L=Math.max(0,F-1),{data:R}=l(v(()=>[`video-detail`,f],[f]),async()=>f?await a({id:f}):null,{enabled:!!f}),z=v(()=>{let e=R?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[R?.data?.video]),oe=T??z??null,[B,V]=d(`detail-information-${f}`,oe),H=B?.links?.[L]?.id||``,{data:U,isFetching:W,isFetchedAfterMount:G,isSuccess:K}=l(v(()=>[`detail-interaction`,B?.id,B?.content_type,H,F],[H,F,B?.content_type,B?.id]),async()=>!B?.id||typeof B.content_type!=`number`?null:await p([B.id],1),{enabled:E?!1:!!B?.id,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1}),se=v(()=>{if(!G||W||!K)return 0;let e=U?.interaction_list?.[0]?.browse_record,t=Number(e?.browse_duration||0);if(!Number.isFinite(t)||t<=0)return 0;let n=String(e?.browse_episode||``).trim();if(!n)return t;let r=Number.parseInt(n,10);return Number.isNaN(r)?0:r===F?t:0},[F,U,G,W,K]),[ce,le]=d(`info-detail-active-tab-${f}`,`video`),[q,J]=d(`info-detail-comment-add-count-${f}`,0),[Y,ue]=d(`info-detail-comment-total-${f}`,void 0),X=g(async e=>{let t=String(f||``).trim();if(!t)return;let n=e.browse_episode||F,r=Date.now(),i=String(e.browse_key||r);try{await o({app_id:0,content_type:1,content_id:t,browse_duration:Number(e.browse_duration||0),browse_episode:String(n),browse_key:i,browse_page_ts:r})}catch(e){console.error(`上报播放进度失败:`,e)}},[F,f]);_(()=>{!B&&z&&V(z),window.video={[f]:B},window.getVideoInfoAsync=async()=>{let e=B?.links?.[L]?.m3u8_url||``,t=e?`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(`${n()}/m3f/${e}`)}`:``,i=B?.img_y||B?.img_x||B?.preview_images?.[0]||``,a=``,o=await r(i);return o&&(a=s(o.bytes)),{poster:a,src:t,title:B?.name||``}},window.getVideoBrowseRecordAsync=async()=>{let e=await p([f],1);return e?.interaction_list?.[0]?e.interaction_list[0].browse_record:null},window.reportVideoBrowse=X},[f,L,B,z,V,X]),_(()=>{if(!U?.interaction_list?.[0])return;let e=U.interaction_list[0];V(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[U,V]);let Z=g(e=>{V(t=>t&&{...t,...e})},[V]);u(()=>{B?.id&&B.id},[B?.id],`detail-page-report-${f}`),_(()=>{!B||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:B.id||f,author_id:B.up_user,object_type:B.content_type,object_category:B.content_type,object_tags:B.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,B]),_(()=>{J(0)},[H,J]),v(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let de=g(()=>{},[!1,le]);g(()=>{J(e=>e+1)},[J]),_(()=>{},[!1,de,B?.id,ae]);let Q=g(e=>{if(E){let t=encodeURIComponent(B?.name||``),n=`/webview/${B?.id}/${t}/episode/${e}`;window.location.href=n}else I(e)},[B?.id,B?.name,E,I]),$=B?.status===`1`,{data:fe}=l([m.CHANNEL],()=>i()),pe=e(fe?.data),me=v(()=>{if(D!==void 0){let e=new Map(w.map(e=>[e.componentName,e]));return D.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return w},[D]),he=g(e=>{if(!B)return null;let t=ne[e.componentName];if(!t)return null;let n=t.clientComponent,r=te(t,e.props);if(!r.isValid)return b(`div`,{children:`组件配置错误`});let i={};return e.componentName.startsWith(`video-detail-info`)&&(i.information=B,i.currentSeriesNum=F,i.onEpisodeChange=Q,i.isShow=!0),e.componentName===`video-detail-actions`&&(i.information=B,i.onUpdate=Z),e.componentName===`video-detail-recommend`&&(i.detailId=f),b(n,{...r.props,...i})},[F,f,Q,Z,B,!0]);return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${E?``:`pt-11`}`,children:[!E&&b(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:b(ee,{data:{list:pe}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[B&&!$&&b(c,{type:`no-content`,text:O(`videoDetailClient.videoUnavailable`)}),B&&$&&x(y,{children:[!E&&b(re,{isVideo:!0,information:B,episodeIndex:L,resumeProgressSeconds:se}),b(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,x(`div`,{className:t(`w-full`,!1),children:[me.map(e=>b(h,{children:he(e)},e.id)),!1]}),!1]}),!B&&b(c,{type:`no-content`,text:O(`videoDetailClient.videoDeleted`)})]})})]})}export{T as default};
2
+ "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import n from"../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as r}from"../../../utils/decrypt-image-client.mjs";import{gContentGetAppChannels as i,gContentGetVideoDetail as a,pInteractionBrowse as o}from"../../../service/generated/client.mjs";import{uint8ArrayToBase64 as s}from"../../../utils/uint8.mjs";import{EmptyState as c}from"../../ui/empty.mjs";import{useRequest as l}from"../../../hooks/query/use-query.mjs";import{queryKey as ee}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as te,useKeepAliveState as u}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as d}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as f}from"../../../hooks/use-content-operate.mjs";import p from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{resolveMaterialProps as ne,videoDetailMaterials as re}from"../../biz/business/detail/materials/registry.mjs";import{DetailHero as ie}from"../../biz/business/detail/video-hero.mjs";import{Fragment as m,useCallback as h,useEffect as g,useMemo as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{useTranslations as x}from"next-intl";import{useParams as S,useSearchParams as C}from"next/navigation";const w=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{rows:2}}];function T({detailId:d,initialInformation:T,isWebView:E=!1,materialConfig:D}){let O=x(`components.pages.videoDetail`),ae=S(),k=C(),A=ae.level,j=Array.isArray(A)?A:typeof A==`string`?[A]:[],M=j.findIndex(e=>e===`episode`),N=M>=0?j[M+1]:j[2],P=Math.max(1,Number(N)||1),[F,I]=u(`detail-current-series-num-${d}`,P);g(()=>{I(P)},[d,P,I]);let L=Math.max(0,F-1),{data:R}=l(_(()=>[`video-detail`,d],[d]),async()=>d?await a({id:d}):null,{enabled:!!d}),z=_(()=>{let e=R?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[R?.data?.video]),oe=T??z??null,[B,V]=u(`detail-information-${d}`,oe),H=B?.links?.[L]?.id||``,{data:U,isFetching:W,isFetchedAfterMount:G,isSuccess:K}=l(_(()=>[`detail-interaction`,B?.id,B?.content_type,H,F],[H,F,B?.content_type,B?.id]),async()=>!B?.id||typeof B.content_type!=`number`?null:await f([B.id],1),{enabled:E?!1:!!B?.id,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1}),se=_(()=>{if(!G||W||!K)return 0;let e=U?.interaction_list?.[0]?.browse_record,t=Number(e?.browse_duration||0);if(!Number.isFinite(t)||t<=0)return 0;let n=String(e?.browse_episode||``).trim();if(!n)return t;let r=Number.parseInt(n,10);return Number.isNaN(r)?0:r===F?t:0},[F,U,G,W,K]),[ce,le]=u(`info-detail-active-tab-${d}`,`video`),[q,J]=u(`info-detail-comment-add-count-${d}`,0),[Y,ue]=u(`info-detail-comment-total-${d}`,void 0),X=h(async e=>{let t=String(d||``).trim();if(!t)return;let n=e.browse_episode||F,r=Date.now(),i=String(e.browse_key||r);try{await o({app_id:0,content_type:1,content_id:t,browse_duration:Number(e.browse_duration||0),browse_episode:String(n),browse_key:i,browse_page_ts:r})}catch(e){console.error(`上报播放进度失败:`,e)}},[F,d]);g(()=>{!B&&z&&V(z),window.video={[d]:B},window.getVideoInfoAsync=async()=>{let e=B?.links?.[L]?.m3u8_url||``,t=e?`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(`${n()}/m3f/${e}`)}`:``,i=B?.img_y||B?.img_x||B?.preview_images?.[0]||``,a=``,o=await r(i);return o&&(a=s(o.bytes)),{poster:a,src:t,title:B?.name||``}},window.getVideoBrowseRecordAsync=async()=>{let e=await f([d],1);return e?.interaction_list?.[0]?e.interaction_list[0].browse_record:null},window.reportVideoBrowse=X},[d,L,B,z,V,X]),g(()=>{if(!U?.interaction_list?.[0])return;let e=U.interaction_list[0];V(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[U,V]);let Z=h(e=>{V(t=>t&&{...t,...e})},[V]);te(()=>{B?.id&&B.id},[B?.id],`detail-page-report-${d}`),g(()=>{!B||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:B.id||d,author_id:B.up_user,object_type:B.content_type,object_category:B.content_type,object_tags:B.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[d,B]),g(()=>{J(0)},[H,J]),_(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let de=h(()=>{},[!1,le]);h(()=>{J(e=>e+1)},[J]),g(()=>{},[!1,de,B?.id,k]);let Q=h(e=>{if(E){let t=encodeURIComponent(B?.name||``),n=`/webview/${B?.id}/${t}/episode/${e}`;window.location.href=n}else I(e)},[B?.id,B?.name,E,I]),$=B?.status===`1`,{data:fe}=l([ee.CHANNEL],()=>i()),pe=e(fe?.data),me=_(()=>{if(D!==void 0){let e=new Map(w.map(e=>[e.componentName,e]));return D.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return w},[D]),he=h(e=>{if(!B)return null;let t=re[e.componentName];if(!t)return null;let n=t.clientComponent,r=ne(t,e.props);if(!r.isValid)return y(`div`,{children:`组件配置错误`});let i={};return e.componentName.startsWith(`video-detail-info`)&&(i.information=B,i.currentSeriesNum=F,i.onEpisodeChange=Q,i.isShow=!0),e.componentName===`video-detail-actions`&&(i.information=B,i.onUpdate=Z),e.componentName===`video-detail-recommend`&&(i.detailId=d),y(n,{...r.props,...i})},[F,d,Q,Z,B,!0]);return b(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${E?``:`pt-11`}`,children:[!E&&y(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:y(p,{data:{list:pe}})}),y(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:b(v,{children:[B&&!$&&y(c,{type:`no-content`,text:O(`videoDetailClient.videoUnavailable`)}),B&&$&&b(v,{children:[!E&&y(ie,{isVideo:!0,information:B,episodeIndex:L,resumeProgressSeconds:se}),y(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,b(`div`,{className:t(`w-full`,!1),children:[me.map(e=>y(m,{children:he(e)},e.id)),!1]}),!1]}),!B&&y(c,{type:`no-content`,text:O(`videoDetailClient.videoDeleted`)})]})})]})}export{T as default};
@@ -6,7 +6,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
6
6
  //#region components/ui/badge.d.ts
7
7
  /** badgeVariants 工具定义。 */
8
8
  declare const badgeVariants: (props?: ({
9
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
9
+ variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
10
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  /** Badge 组件。 */
12
12
  declare function Badge({
@@ -7,8 +7,8 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
7
7
  //#region components/ui/button.d.ts
8
8
  /** buttonVariants 工具定义。 */
9
9
  declare const buttonVariants: (props?: ({
10
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
- size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
+ variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
12
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  /** Button 组件属性。 */
14
14
  type ButtonProps = Button.Props & VariantProps<typeof buttonVariants> & {
@@ -1,11 +1,11 @@
1
1
 
2
2
  import * as React from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import NextImage from "next/image";
4
+ import Image from "next/image";
5
5
 
6
6
  //#region components/ui/image.d.ts
7
7
  /** BaseImageProps 属性定义。 */
8
- type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof NextImage>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
8
+ type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
9
9
  type CommonImageProps = BaseImageProps & {
10
10
  /** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
11
11
  alt?: string; /** 图片类名。 */
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
27
27
  /** ImageProps 属性定义。 */
28
28
  type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
29
29
  /** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
30
- declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
30
+ declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
- export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
32
+ export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
@@ -1,2 +1,2 @@
1
1
 
2
- const e={ITEM_INFO_CHANGE:`ITEM_INFO_CHANGE`,DOCUMENT_CLICK:`DOCUMENT_CLICK`,DOCUMENT_TOUCH:`DOCUMENT_TOUCH`,DOCUMENT_SCROLL:`DOCUMENT_SCROLL`,SHOW_LOGIN_POPUP:`SHOW_LOGIN_POPUP`,WAIT_LOADING_SHOW:`WAIT_LOADING_SHOW`,SHOW_POPUP_VIDEO:`SHOW_POPUP_VIDEO`,EXCHANGE_SEARCH_TYPE:`EXCHANGE_SEARCH_TYPE`,CHANNEL_LIST_CHANGE:`CHANNEL_LIST_CHANGE`,USER_INFO_LOAD_COMPLETE:`USER_INFO_LOAD_COMPLETE`};export{e as eventKey};
2
+ const e={ITEM_INFO_CHANGE:`ITEM_INFO_CHANGE`,DOCUMENT_CLICK:`DOCUMENT_CLICK`,DOCUMENT_TOUCH:`DOCUMENT_TOUCH`,DOCUMENT_SCROLL:`DOCUMENT_SCROLL`,SHOW_LOGIN_POPUP:`SHOW_LOGIN_POPUP`,WAIT_LOADING_SHOW:`WAIT_LOADING_SHOW`,SHOW_POPUP_VIDEO:`SHOW_POPUP_VIDEO`,EXCHANGE_SEARCH_TYPE:`EXCHANGE_SEARCH_TYPE`,CHANNEL_LIST_CHANGE:`CHANNEL_LIST_CHANGE`,USER_INFO_LOAD_COMPLETE:`USER_INFO_LOAD_COMPLETE`,SEARCH_HISTORY_UPDATE:`SEARCH_HISTORY_UPDATE`};export{e as eventKey};
@@ -1,2 +1,2 @@
1
1
 
2
- import{useEffect as e,useState as t}from"react";function n({storageKey:n,maxCount:r=20}){let[i,a]=t([]),o=`search_history_${n}`;return e(()=>{let e=localStorage.getItem(o);if(e)try{a(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}},[o]),{history:i,addHistory:e=>{if(!e.trim())return;let t=[e,...i.filter(t=>t!==e)].slice(0,r);a(t),localStorage.setItem(o,JSON.stringify(t))},clearHistory:()=>{a([]),localStorage.removeItem(o)}}}export{n as useSearchHistory};
2
+ import e from"../utils/event-bus.mjs";import{eventKey as t}from"../constants/event-key.mjs";import{useEffect as n,useState as r}from"react";function i({storageKey:i,maxCount:a=20}){let[o,s]=r([]),c=`search_history_${i}`;return n(()=>{let e=localStorage.getItem(c);if(e)try{s(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}},[c]),{history:o,addHistory:n=>{if(!n.trim())return;let r=[n,...o.filter(e=>e!==n)].slice(0,a);s(r),localStorage.setItem(c,JSON.stringify(r)),e.emit(t.SEARCH_HISTORY_UPDATE)},clearHistory:()=>{s([]),localStorage.removeItem(c),e.emit(t.SEARCH_HISTORY_UPDATE)}}}export{i as useSearchHistory};
@@ -1,4 +1,4 @@
1
1
 
2
2
  var e={components:{biz:{basics:{fullscreenFeed:{runtime:{bottomInfo:{collapse:`Collapse`,expand:`Expand`,nextItem:`Next`,seriesAction:`Episodes · {title}`,seriesActionWithEpisode:`Episodes · {title} {episodeName}`},commentModal:{comment:`Comments`},userAction:{collectAction:`Collect`,commentAction:`Comment`,followFailed:`Follow failed`,like:`Like`,likeAction:`Like`,loginRequired:`Please log in first`,shareAction:`Share`},videoSlide:{watchFullscreen:`Watch full screen`}}}},business:{comment:{commentInput:{cannotSelectVideoWhenImageSelected:`Cannot select a video after choosing images`,dragFileNotSupported:`Drag-and-drop images/files is not supported. Please use the upload button below`,image:`Pictures`,imageUploadFailed:`Image upload failed`,partialImageUploadFailed:`Some images failed to upload`,pasteFileNotSupported:`Pasting images/files is not supported. Please use the upload button below`,placeholder:`Say something...`,publishCommentFailed:`Failed to publish comment`,publishDefault:`Publish`,publishSuccess:`Published successfully`,publishing:`Publishing...`,video:`Video`,videoUploadFailed:`Video upload failed`},commentItem:{contentInReview:`Content in review`,dislike:`Dislike`,like:`Like`,reply:`Reply`,replyCount:`{count} replies`},commentList:{dislikeHint:`Already disliked`,emptyPrompt:`No comments yet. Be the first one!`,fetchCommentsFailed:`Failed to fetch comments`,invalidReplyTarget:`Invalid reply target`,loading:`Loading...`,loginRequired:`Please log in first`,noMore:`No more`,publishCommentFailed:`Failed to publish comment`,publishReplyFailed:`Failed to publish reply`,viewMore:`View more`},replyDetail:{commentDetail:`Comment details`,dislike:`Dislike`,dislikeHint:`Already disliked`,fetchRepliesFailed:`Failed to fetch replies`,follow:`Follow`,followFailed:`Failed to follow`,followed:`Following`,invalidReplyTarget:`Invalid reply target`,like:`Like`,loginRequired:`Please log in first`,publishReplyFailed:`Failed to publish reply`,reply:`Reply`,underReview:`Content in review`,unfollowFailed:`Failed to unfollow`}},contact:{contactList:{myFollowing:`Following`,noFollowingUsers:`You are not following any users yet`,noMore:`No more`,noSearchResult:`No results found`},contactSearch:{cancel:`Cancel`,close:`Close`,placeholder:`Search users you want to @`}},detail:{detailFollowAction:{follow:`Follow`,following:`Following`},detailGuessLike:{title:`Guess you like it`},detailIntroduction:{collapse:`Collapse`,expand:`Expand`,score:`Score`},detailOperate:{collectAdded:`Added`,collectFailed:`Failed to collect`,collection:`Collection`,defaultCollection:`Default Collection`,like:`Like`,modifyCollection:`Change`,modifyCollectionSuccess:`Collection updated`,operateFailed:`Operation failed, please try again`,share:`Bagikan`},detailPopularComments:{emptyPrompt:`Looking forward to your first comment`,like:`Like`,mediaPlaceholder:`[Image/Video]`,popularComments:`Pop comments`},detailTabs:{discussion:`DISCUSSION`,video:`Video`},postRecommendList:{title:`Related Posts`},videoHero:{coverAlt:`Video player cover`,noVideos:`No videos available`}},fullscreenFeed:{variants:{fullscreenVideoFeed:{runtime:{client:{contentLoading:`Loading content...`}}}}},navBar:{variants:{basicNavBar:{runtime:{channelFilterDialog:{add:`Add`,allAddedTo:`All have been added to`,allChannels:`All channels`,delete:`Delete`,moreChannels:`More channels`,myChannels:`My channels`,resetDefault:`Reset to default`}}}}},searchHistory:{clear:`Clear`,clearAllHistory:`Delete all history`,confirmClearDescription:`Are you sure you want to delete all search history?`},videoHorizontalList:{allEpisodes:`All {count} episodes`,defaultTitle:`Recommended Videos`,updatedTo:`Updated to {count} episodes`}}},common:{blockedDialog:{contactSupport:`Contact Support`,description:`Due to: {remark}, your account has been restricted from logging in.
3
3
  Unblock time: {unblockTime}
4
- If this was not you, please contact support or file an appeal.`,gotIt:`Got it`,remarkDefault:`Abnormal behavior detected`,title:`Account Restricted`,unblockTimePermanent:`Permanent`},collectionPopup:{collectSuccess:`Added to collection`,coverAlt:`Cover image`,createCollection:`Create Collection`,createCollectionHint:`to create your collection.`,createModalAction:`Done`,createModalTitle:`New Collection`,favoriteToCollectionTitle:`Favorite to Collection`,newCollection:`New`,noCollections:`No collections yet`,postsCountSuffix:`Posts`,selectTitle:`Select Collection`,updateSuccess:`Collection updated`},debugLocaleSwitcher:{current:`Current`,languageDebugging:`Language Debugging`},deleteConfirmDialog:{cancel:`Cancel`,confirm:`Delete`,description:`This action cannot be undone.`},followButton:{follow:`Follow`,followFailed:`Failed to follow`,following:`Following`,loginFailed:`Login failed`,loginRequired:`Please log in first`,unfollowConfirmDialog:{cancel:`cancel`,confirm:`OK`,confirmUnfollow:`Are you sure you want to unfollow`},unfollowFailed:`Failed to unfollow`},imageCropModal:{cancel:`Cancel`,confirm:`Confirm`,processing:`Processing...`},infoCard:{cardBottom:{comment:`Comment`,dislike:`Dislike`,like:`Like`,share:`Share`}},list:{collectionList:{collectionListItem:{contentCountSuffix:`content`,movieLabel:`Movie`}}},photoGrid:{episodeLoading:`Episode Loading`,missingEpisode:`Missing valid episode`,noEpisodes:`No episodes available`},picker:{genderPicker:{cancel:`Cancel`,confirm:`Confirm`,options:{female:`Female`,male:`Male`,secret:`Secret`},title:`Select Gender`},pickerDrawer:{cancel:`Cancel`,confirm:`Confirm`,title:`Please Select`}},seriesEpisodes:{completedSeriesTotal:`Completed series: {total} episodes`,episodeLabel:`Episode {episode}`,episodeNotFound:`Episode not found`,episodeSwitchFailed:`Failed to switch episode`,episodeTitle:`Episode title`,ongoingSeriesTotal:`Ongoing series: {total} episodes`,ongoingSeriesUpdatedTo:`Ongoing series: updated to {total} episodes`,selectorTitle:`Episodes`,singleContent:`Single episode`},sharePopup:{shareContent:{copyFailed:`Copy failed`,copyShareLink:`Copy link`,copySuccess:`Copied`,shareHint:`Can paste a link to share with friends`,shareLinksTitle:`Share Links`},shareDrawer:{cancel:`Cancel`,collectionLabel:`Collection`,label:`Uncollect`,moments:`Moments`,wechat:`WeChat`,wechatFriend:`WeChat Friend`}},skeleton:{loading:`Loading`},title:`Are you sure you want to delete this content?`},pages:{collectionAdd:{page:{collectionNotFound:`Collection not found`,done:`Done`,emptyPublish:`No posts available to add`,selectPostFirst:`Please select posts first`,submitFailed:`Add failed, please try again later`,submitSuccess:`Added successfully`,submitting:`Adding...`,title:`Add posts to collection`,userNotFound:`User not found`}},collectionCreate:{form:{addCover:`Add cover`,collectionNotFound:`Collection not found`,coverAlt:`Collection cover`,coverLabel:`Cover`,coverUploadFailed:`Failed to upload cover`,create:`Create`,createFailed:`Create failed`,createSuccess:`Created successfully`,createTitle:`Create Collection`,creating:`Creating...`,descriptionLabel:`Description`,descriptionPlaceholder:`Add a description for this collection`,editTitle:`Edit Collection`,label:`Title`,save:`Save`,saveFailed:`Save failed`,saveSuccess:`Saved successfully`,saving:`Saving...`,signatureLabel:`Description`,titlePlaceholder:`Please enter collection title`,titleRequired:`Please enter collection title`,uploading:`Uploading...`}},collectionDetail:{components:{collectionDetailCard:{collectedInLabel:`Collected in:`}},detail:{add:`Add Content`,contentCountSuffix:`Section Contents`,coverAlt:`Collection cover`,defaultCollectionDeleteNotSupported:`Default collection cannot be deleted`,defaultTitle:`Collection`,deleteCollection:`Delete collection`,deleteFailed:`Delete failed`,deleteSuccess:`Collection deleted`,deleting:`Deleting...`,editCollection:`Edit Collection`,emptyContent:`No content yet`,operationFailed:`Operation failed, please try again later`,ownerAvatarAlt:`Collection owner`,pleaseLogin:`Please log in first`,subscribe:`Subscribe`,subscribeOperateFailed:`Subscription action failed`,subscribeProcessing:`Processing...`,subscribeSuccess:`Subscribed successfully`,subscribed:`Subscribed`,uncollectFailed:`Failed to remove from collection`,uncollectSuccess:`Removed from collection`,unsubscribeSuccess:`Unsubscribed`,updatedSuffix:`Update`}},edit:{page:{avatarUpdateSuccess:`Updated successfully`,avatarUploadFailed:`Failed to upload avatar. Please try again later.`,avatarUploading:`Uploading...`,clickToChangeAvatar:`Tap to change avatar`,displayIdLabel:`Display ID`,genderFemale:`Female`,genderLabel:`Gender`,genderMale:`Male`,genderSecret:`Private`,genderSelect:`Please select`,genderUpdateSuccess:`Gender updated successfully`,imageTypeInvalid:`Only JPG/JPEG/PNG formats are supported`,label:`Nickname`,loading:`Loading`,nicknameInvalidChars:`Nickname only supports _, - and .`,nicknamePlaceholder:`Enter your nickname`,nicknameRequired:`Please enter a nickname`,nicknameTooShort:`Nickname must be at least 2 characters`,nicknameUpdateSuccess:`Nickname updated successfully`,save:`Save`,saveFailed:`Save failed. Please try again later.`,saveSuccess:`Saved successfully`,signatureLabel:`Signature`,signaturePlaceholder:`Enter your bio`,signatureTooShort:`Bio must be at least 2 characters`,signatureUpdateSuccess:`Bio updated successfully`,submit:`Submit`,title:`Edit profile`,updateFailed:`Update failed. Please try again later.`,userNotFound:`User info not found`}},feedSeries:{feedSeriesClient:{episodeLoading:`Episode Loading`,episodeSelectorTitle:`Episodes`,missingEpisode:`Missing valid episode`,noEpisodes:`No episodes available`},page:{videoLoading:`Loading video...`}},feedback:{components:{feedbackForm:{addScreenshot:`Add screenshot`,alt:`Screenshot of feedback`,contactLabel:`Contact`,contentMinLength:`Problem description must be at least 4 characters.`,delete:`Delete`,imageTypeInvalid:`Only JPG/JPEG/PNG formats are supported`,label:`Feedback content`,loading:`Submitting...`,message:`Update failed, please try again later.`,missingContact:`Enter your contact information.`,missingFeedback:`Please enter your feedback`,missingScreenshot:`Please upload a screenshot`,placeholder:`obtain SMS verification code`,placeholder1_6d0242:`Please enter your email or phone number so we can resolve your issue.`,screenshotLabel:`Upload Screenshot`,screenshotUploadFailed:`Screenshot upload failed, please try again later`,submit:`SUBMIT`,submitsuccess:`Feedback submitted successfully. We will resolve it as soon as possible.`,title:`Feedback`,uploading:`UPLOADING...`}}},follow:{components:{followButton:{follow:`Follow`,following:`Following`},interactionTabs:{fans:`Fans`,follow:`Follow`},userList:{follow:`Follow`,followBack:`Follow back`,followNow:`Follow now`,noFans:`No fans yet`,noFollowedUsers:`Not following any users`}},pages:{fans:{privateListUnavailable:`This fan list is not publicly available`},followed:{privateListUnavailable:`This following list is not publicly available`}}},fullscreenFeed:{page:{episodeSelectorTitle:`Episodes`,missingParams:`Missing testimonial bit or episode parameter`}},login:{forgot:{back:`Back`,emailPlaceholder:`Enter your email`,getCode:`Get verification code`,loginLink:`Remembered your password? Log in`,or:`or`,sendFailed:`Failed to send, please try again later`,sending:`Sending...`,title:`Forgot your password?`},index:{loginFailed:`Login failed. Please try again later.`,loginSuccess:`Logged in successfully`},loginClient:{agreeToTerms:`I have read and agree to the Terms of Service and Privacy Policy`,agreeToTermsPrefix:`I have read and agree to the `,and:` and `,close:`Close`,emailPlaceholder:`Enter your email`,forgotPassword:`Forgot Password`,hidePassword:`Hide password`,loggingIn:`Logging in...`,login:`Log in`,noAccount:`Don't have an account?`,passwordPlaceholder:`Enter your password`,privacyPolicy:`Privacy Policy`,registerLink:`Create a new account`,showPassword:`Show password`,title:`Log in to your account`,userAgreement:`Terms of Service`},password:{back:`Back`,confirmModify:`Confirm changes`,confirmPasswordPlaceholder:`Re-enter your password`,confirmReset:`Confirm reset`,passwordPlaceholder:`Enter a password (6-18 characters)`,passwordSetSuccess:`Password updated`,passwordTooLong:`Password must be no more than 18 characters`,passwordTooShort:`Password must be at least 6 characters`,passwordsNotMatch:`Passwords do not match`,register:`Register`,setLoginPassword:`Set a login password`,setNewPassword:`Set a new password`,submitFailed:`Failed to submit. Please try again later.`,submitting:`Submitting...`},register:{back:`Back`,emailPlaceholder:`Enter your email`,getCode:`Get verification code`,hasAccount:`Already have an account?`,invalidEmail:`Please enter a valid email`,loginLink:`Log in`,sendFailed:`Failed to send`,sending:`Sending...`,title:`Create your account`},resetPassword:{back:`Back`,codePlaceholder:`Enter the verification code`,resend:`Resend`,sendCode:`Send code`,sendFailed:`Failed to send`,title:`Reset password`,verifyEmail:`Verify email`,verifyFailed:`Verification failed. Please try again later.`,verifyHint:`Verify your identity`,verifyViaEmail:`Verify via email`,verifying:`Verifying...`},verify:{back:`Back`,invalidCode:`Invalid verification code`,nextStep:`Next`,resend:`Resend`,sentTo:`Sent to`,title:`Enter the verification code`,verifying:`Verifying...`}},postDetail:{postDetailClient:{comment:`Comments`,postDeleted:`This post has been deleted`,postOffline:`This post is no longer available`,reactions:`Reactions`}},profile:{client:{collect:`Collect`,collectionNotPublic:`This collection is private`,editProfile:`Edit profile`,exploreAdventures:`Explore amazing adventures.`,follow:`Follow`,followFailed:`Follow failed`,followSuccess:`Followed successfully`,followed:`Following`,history:`History`,like:`Like`,likeNotPublic:`Likes are private`,loginNow:`Log in`,loginToView:`Please log in to view`,operationFailed:`Operation failed. Please try again later.`,processing:`Processing...`,publish:`Publish`,unfollowFailed:`Unfollow failed`,unfollowSuccess:`Unfollowed`,welcomeToPlanet:`Welcome`},components:{tabs:{collectTab:{cancel:`Cancel`,collections:`Collections`,created:`Created`,delete:`Delete`,edit:`Edit`,noCreatedCollections:`No created collections yet`,noSubscribedCollections:`No subscribed collections yet`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,subscribed:`Subscribed`,uncollectFailed:`Failed to uncollect`,uncollectedSuccess:`Uncollected successfully`,video:`Video`},historyTab:{cancel:`Cancel`,delete:`Delete`,deleteFailed:`Deletion failed.`,edit:`Edit`,historyDeletedSuccess:`Browsing history deleted`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,video:`Video`},likeTab:{cancel:`Cancel`,delete:`Delete`,edit:`Edit`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,unlikeFailed:`Failed to unlike`,unlikedSuccess:`Unliked successfully`,video:`Video`},publishTab:{deleteFailed:`Delete failed`,deleteSuccess:`Deleted`,emptyText:`No published content yet`}},userProfileHeader:{fans:`Fans`,follow:`Follow`,likesReceived:`Likes Received`}}},publish:{components:{collection:{createCollection:`Create Collection`,moreCollections:`More collections`,syncToCollection:`Sync to collection`},collectionCard:{contentCountSuffix:`Bar Contents`},collectionPopup:{noCollections:`No collections yet`,syncToCollection:`Sync to collection`},coverItem:{coverAlt:`Cover`,editCover:`Edit cover`,uploadImage:`Upload Image`},editor:{headlineHint:`With Headline`},header:{publish:`Publish`},materialItem:{deleteMaterial:`Delete media`,uploadImage:`Uploaded image`,videoCover:`Video cover`},mediaPreview:{previewAlt:`Preview`},uploadProgress:{uploading:`Uploading`}},pageClient:{cancel:`cancel`,editContentFirst:`Please edit the content first`,maxMaterialCount:`You can upload up to 9 materials`,publishFailed:`Publish failed, please try again later`,publishSuccess:`Published successfully`,resume:`Continued`,switchToPostConfirm:`Switching to post will clear the main video. Continue?`,switchToVideoConfirm:`Switching to video will clear existing materials. Continue?`,title:`Confirm toggle`,uploadFailedCount:`{count} files failed to upload`}},search:{hotRecommend:{hotPostsTitle:`Popular Posts`,hotVideosTitle:`Popular Videos`},hotSearch:{recommendedSearches:`Recommended searches`},pageClient:{tabs:{all:`All`,post:`Posts`,user:`Users`,video:`Videos`}},searchResult:{searchAll:{emptyResult:`No related content found`,more:`MORE`,relatedSuffix:`Related`},searchUser:{emptyResult:`No related content found`,followersSuffix:`Followers`},searchVideoInfo:{noRelevantContent:`No relevant content found`}},topHeader:{placeholder:`Please enter keywords`,search:`Cari`}},settings:{components:{resetPasswordDrawer:{boundEmailNotice:`The email address is currently bound`,codeSentSuccess:`Verification code sent`,confirmPasswordPlaceholder:`Please enter the login password again`,passwordPlaceholder:`Enter password (6-18 characters)`,passwordResetSuccess:`Password changed successfully`,resendAfter:`resend after`,resetFailed:`Modification failed, please try again later`,resetPassword:`Change Password`,sendCode:`Send verification code`,sendFailed:`Failed to send, please try again later`,sending:`Sending...`,setNewPasswordHint:`Set a new login password`,submitting:`Submitting...`,title:`Reset Password`,verifyEmailButton:`Validate Email`,verifyFailed:`Verification failed, please check the code`,verifyHint:`Perform verification`,verifySuccess:`Verification successful`,verifying:`Verifying...`},settings:{button:`Log Out`,cancel:`Cancel`,collectionsTitle:`Collections`,confirm:`Confirm`,feedbackTitle:`Feedback`,follow:`Following`,followersTitle:`Followers`,languageTitle:`Language`,like:`Likes`,listPrivateHint:`This list will be private`,logoutConfirmMessage:`Are you sure you want to log out?`,privacySettingsTitle:`Privacy Settings`,resetPasswordTitle:`Reset Password`,switchTo:`Switch to`,title:`Settings`,whenOff:`When turned off`}}},userFollow:{components:{comprehensiveTab:{empty:`No content yet, try somewhere else.`,postsFeed:`Posts Feed`},contentItem:{filmAndTv:`Film and television related`},followNoLogin:{login:`Log in`,notLoggedIn:`You are not logged in`},followNoUser:{empty:`You haven't followed anyone yet`},followedList:{newUpdate:`New update`,seeAll:`See All`},postTab:{empty:`Not following any posts`}},page:{tabs:{posts:`Posts`}}},videoDetail:{videoDetailClient:{videoDeleted:`This video has been deleted`,videoUnavailable:`This video is unavailable`}}},ui:{infiniteScroll:{failed:`Load failed, click to retry`,loading:`Loading`,noMore:`No more`},list:{empty:`No content yet`,loading:`Loading...`,postList:{earlier:`Earlier`,empty:`No browsing history`,postListItem:{coverAlt:`Post cover`},today:`Today`},userActivityList:{earlier:`Earlier`,empty:`No browsing history`,today:`Today`,userActivityListActions:{comment:`Comment`,dislike:`Dislike`,like:`Like`,likeFailed:`Like failed`,share:`Share`},userActivityListItem:{collapse:`Collapse`,collectFailed:`Collection failed`,expand:`Expand`,mediaAlt:`Feed image`}},videoList:{earlier:`Earlier`,empty:`No viewing history`,today:`Today`,videoListItem:{coverAlt:`Video cover`,movie:`Movie`,series:`Series`,watchUntil:`Watched `}}},loading:{label:`Loading...`}}},tabBar:{follow:`Follow`,home:`Home`,message:`Message`,mine:`Mine`}};export{e as default};
4
+ If this was not you, please contact support or file an appeal.`,gotIt:`Got it`,remarkDefault:`Abnormal behavior detected`,title:`Account Restricted`,unblockTimePermanent:`Permanent`},collectionPopup:{collectSuccess:`Added to collection`,coverAlt:`Cover image`,createCollection:`Create Collection`,createCollectionHint:`to create your collection.`,createModalAction:`Done`,createModalTitle:`New Collection`,favoriteToCollectionTitle:`Favorite to Collection`,newCollection:`New`,noCollections:`No collections yet`,postsCountSuffix:`Posts`,selectTitle:`Select Collection`,updateSuccess:`Collection updated`},debugLocaleSwitcher:{current:`Current`,languageDebugging:`Language Debugging`},deleteConfirmDialog:{cancel:`Cancel`,confirm:`Delete`,description:`This action cannot be undone.`},followButton:{follow:`Follow`,followFailed:`Failed to follow`,following:`Following`,loginFailed:`Login failed`,loginRequired:`Please log in first`,unfollowConfirmDialog:{cancel:`cancel`,confirm:`OK`,confirmUnfollow:`Are you sure you want to unfollow`},unfollowFailed:`Failed to unfollow`},imageCropModal:{cancel:`Cancel`,confirm:`Confirm`,processing:`Processing...`},infoCard:{cardBottom:{comment:`Comment`,dislike:`Dislike`,like:`Like`,share:`Share`}},list:{collectionList:{collectionListItem:{contentCountSuffix:`content`,movieLabel:`Movie`}}},photoGrid:{episodeLoading:`Episode Loading`,missingEpisode:`Missing valid episode`,noEpisodes:`No episodes available`},picker:{genderPicker:{cancel:`Cancel`,confirm:`Confirm`,options:{female:`Female`,male:`Male`,secret:`Secret`},title:`Select Gender`},pickerDrawer:{cancel:`Cancel`,confirm:`Confirm`,title:`Please Select`}},seriesEpisodes:{completedSeriesTotal:`Completed series: {total} episodes`,episodeLabel:`Episode {episode}`,episodeNotFound:`Episode not found`,episodeSwitchFailed:`Failed to switch episode`,episodeTitle:`Episode title`,ongoingSeriesTotal:`Ongoing series: {total} episodes`,ongoingSeriesUpdatedTo:`Ongoing series: updated to {total} episodes`,selectorTitle:`Episodes`,singleContent:`Single episode`},sharePopup:{shareContent:{copyFailed:`Copy failed`,copyShareLink:`Copy link`,copySuccess:`Copied`,shareHint:`Can paste a link to share with friends`,shareLinksTitle:`Share Links`},shareDrawer:{cancel:`Cancel`,collectionLabel:`Collection`,label:`Uncollect`,moments:`Moments`,wechat:`WeChat`,wechatFriend:`WeChat Friend`}},skeleton:{loading:`Loading`},title:`Are you sure you want to delete this content?`},pages:{collectionAdd:{page:{collectionNotFound:`Collection not found`,done:`Done`,emptyPublish:`No posts available to add`,selectPostFirst:`Please select posts first`,submitFailed:`Add failed, please try again later`,submitSuccess:`Added successfully`,submitting:`Adding...`,title:`Add posts to collection`,userNotFound:`User not found`}},collectionCreate:{form:{addCover:`Add cover`,collectionNotFound:`Collection not found`,coverAlt:`Collection cover`,coverLabel:`Cover`,coverUploadFailed:`Failed to upload cover`,create:`Create`,createFailed:`Create failed`,createSuccess:`Created successfully`,createTitle:`Create Collection`,creating:`Creating...`,descriptionLabel:`Description`,descriptionPlaceholder:`Add a description for this collection`,editTitle:`Edit Collection`,label:`Title`,save:`Save`,saveFailed:`Save failed`,saveSuccess:`Saved successfully`,saving:`Saving...`,signatureLabel:`Description`,titlePlaceholder:`Please enter collection title`,titleRequired:`Please enter collection title`,uploading:`Uploading...`}},collectionDetail:{components:{collectionDetailCard:{collectedInLabel:`Collected in:`}},detail:{add:`Add Content`,contentCountSuffix:`Section Contents`,coverAlt:`Collection cover`,defaultCollectionDeleteNotSupported:`Default collection cannot be deleted`,defaultTitle:`Collection`,deleteCollection:`Delete collection`,deleteFailed:`Delete failed`,deleteSuccess:`Collection deleted`,deleting:`Deleting...`,editCollection:`Edit Collection`,emptyContent:`No content yet`,operationFailed:`Operation failed, please try again later`,ownerAvatarAlt:`Collection owner`,pleaseLogin:`Please log in first`,subscribe:`Subscribe`,subscribeOperateFailed:`Subscription action failed`,subscribeProcessing:`Processing...`,subscribeSuccess:`Subscribed successfully`,subscribed:`Subscribed`,uncollectFailed:`Failed to remove from collection`,uncollectSuccess:`Removed from collection`,unsubscribeSuccess:`Unsubscribed`,updatedSuffix:`Update`}},edit:{page:{avatarUpdateSuccess:`Updated successfully`,avatarUploadFailed:`Failed to upload avatar. Please try again later.`,avatarUploading:`Uploading...`,clickToChangeAvatar:`Tap to change avatar`,displayIdLabel:`Display ID`,genderFemale:`Female`,genderLabel:`Gender`,genderMale:`Male`,genderSecret:`Private`,genderSelect:`Please select`,genderUpdateSuccess:`Gender updated successfully`,imageTypeInvalid:`Only JPG/JPEG/PNG formats are supported`,label:`Nickname`,loading:`Loading`,nicknameInvalidChars:`Nickname only supports _, - and .`,nicknamePlaceholder:`Enter your nickname`,nicknameRequired:`Please enter a nickname`,nicknameTooShort:`Nickname must be at least 2 characters`,nicknameUpdateSuccess:`Nickname updated successfully`,save:`Save`,saveFailed:`Save failed. Please try again later.`,saveSuccess:`Saved successfully`,signatureLabel:`Signature`,signaturePlaceholder:`Enter your bio`,signatureTooShort:`Bio must be at least 2 characters`,signatureUpdateSuccess:`Bio updated successfully`,submit:`Submit`,title:`Edit profile`,updateFailed:`Update failed. Please try again later.`,userNotFound:`User info not found`}},feedSeries:{feedSeriesClient:{episodeLoading:`Episode Loading`,episodeSelectorTitle:`Episodes`,missingEpisode:`Missing valid episode`,noEpisodes:`No episodes available`},page:{videoLoading:`Loading video...`}},feedback:{components:{feedbackForm:{addScreenshot:`Add screenshot`,alt:`Screenshot of feedback`,contactLabel:`Contact`,contentMinLength:`Problem description must be at least 4 characters.`,delete:`Delete`,imageTypeInvalid:`Only JPG/JPEG/PNG formats are supported`,label:`Feedback content`,loading:`Submitting...`,message:`Update failed, please try again later.`,missingContact:`Enter your contact information.`,missingFeedback:`Please enter your feedback`,missingScreenshot:`Please upload a screenshot`,placeholder:`obtain SMS verification code`,placeholder1_6d0242:`Please enter your email or phone number so we can resolve your issue.`,screenshotLabel:`Upload Screenshot`,screenshotUploadFailed:`Screenshot upload failed, please try again later`,submit:`SUBMIT`,submitsuccess:`Feedback submitted successfully. We will resolve it as soon as possible.`,title:`Feedback`,uploading:`UPLOADING...`}}},follow:{components:{followButton:{follow:`Follow`,following:`Following`},interactionTabs:{fans:`Fans`,follow:`Follow`},userList:{follow:`Follow`,followBack:`Follow back`,followNow:`Follow now`,noFans:`No fans yet`,noFollowedUsers:`Not following any users`}},pages:{fans:{privateListUnavailable:`This fan list is not publicly available`},followed:{privateListUnavailable:`This following list is not publicly available`}}},fullscreenFeed:{page:{episodeSelectorTitle:`Episodes`,missingParams:`Missing testimonial bit or episode parameter`}},login:{forgot:{back:`Back`,emailPlaceholder:`Enter your email`,getCode:`Get verification code`,loginLink:`Remembered your password? Log in`,or:`or`,sendFailed:`Failed to send, please try again later`,sending:`Sending...`,title:`Forgot your password?`},index:{loginFailed:`Login failed. Please try again later.`,loginSuccess:`Logged in successfully`},loginClient:{agreeToTerms:`I have read and agree to the Terms of Service and Privacy Policy`,agreeToTermsPrefix:`I have read and agree to the `,and:` and `,close:`Close`,emailPlaceholder:`Enter your email`,forgotPassword:`Forgot Password`,hidePassword:`Hide password`,loggingIn:`Logging in...`,login:`Log in`,noAccount:`Don't have an account?`,passwordPlaceholder:`Enter your password`,privacyPolicy:`Privacy Policy`,registerLink:`Create a new account`,showPassword:`Show password`,title:`Log in to your account`,userAgreement:`Terms of Service`},password:{back:`Back`,confirmModify:`Confirm changes`,confirmPasswordPlaceholder:`Re-enter your password`,confirmReset:`Confirm reset`,passwordPlaceholder:`Enter a password (6-18 characters)`,passwordSetSuccess:`Password updated`,passwordTooLong:`Password must be no more than 18 characters`,passwordTooShort:`Password must be at least 6 characters`,passwordsNotMatch:`Passwords do not match`,register:`Register`,setLoginPassword:`Set a login password`,setNewPassword:`Set a new password`,submitFailed:`Failed to submit. Please try again later.`,submitting:`Submitting...`},register:{back:`Back`,emailPlaceholder:`Enter your email`,getCode:`Get verification code`,hasAccount:`Already have an account?`,invalidEmail:`Please enter a valid email`,loginLink:`Log in`,sendFailed:`Failed to send`,sending:`Sending...`,title:`Create your account`},resetPassword:{back:`Back`,codePlaceholder:`Enter the verification code`,resend:`Resend`,sendCode:`Send code`,sendFailed:`Failed to send`,title:`Reset password`,verifyEmail:`Verify email`,verifyFailed:`Verification failed. Please try again later.`,verifyHint:`Verify your identity`,verifyViaEmail:`Verify via email`,verifying:`Verifying...`},verify:{back:`Back`,invalidCode:`Invalid verification code`,nextStep:`Next`,resend:`Resend`,sentTo:`Sent to`,title:`Enter the verification code`,verifying:`Verifying...`}},postDetail:{postDetailClient:{comment:`Comments`,postDeleted:`This post has been deleted`,postOffline:`This post is no longer available`,reactions:`Reactions`}},profile:{client:{collect:`Collect`,collectionNotPublic:`This collection is private`,editProfile:`Edit profile`,exploreAdventures:`Explore amazing adventures.`,follow:`Follow`,followFailed:`Follow failed`,followSuccess:`Followed successfully`,followed:`Following`,history:`History`,like:`Like`,likeNotPublic:`Likes are private`,loginNow:`Log in`,loginToView:`Please log in to view`,operationFailed:`Operation failed. Please try again later.`,processing:`Processing...`,publish:`Publish`,unfollowFailed:`Unfollow failed`,unfollowSuccess:`Unfollowed`,welcomeToPlanet:`Welcome`},components:{tabs:{collectTab:{cancel:`Cancel`,collections:`Collections`,created:`Created`,delete:`Delete`,edit:`Edit`,noCreatedCollections:`No created collections yet`,noSubscribedCollections:`No subscribed collections yet`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,subscribed:`Subscribed`,uncollectFailed:`Failed to uncollect`,uncollectedSuccess:`Uncollected successfully`,video:`Video`},historyTab:{cancel:`Cancel`,delete:`Delete`,deleteFailed:`Deletion failed.`,edit:`Edit`,historyDeletedSuccess:`Browsing history deleted`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,video:`Video`},likeTab:{cancel:`Cancel`,delete:`Delete`,edit:`Edit`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,unlikeFailed:`Failed to unlike`,unlikedSuccess:`Unliked successfully`,video:`Video`},publishTab:{deleteFailed:`Delete failed`,deleteSuccess:`Deleted`,emptyText:`No published content yet`}},userProfileHeader:{fans:`Fans`,follow:`Follow`,likesReceived:`Likes Received`}}},publish:{components:{collection:{createCollection:`Create Collection`,moreCollections:`More collections`,syncToCollection:`Sync to collection`},collectionCard:{contentCountSuffix:`Bar Contents`},collectionPopup:{noCollections:`No collections yet`,syncToCollection:`Sync to collection`},coverItem:{coverAlt:`Cover`,editCover:`Edit cover`,uploadImage:`Upload Image`},editor:{headlineHint:`With Headline`},header:{publish:`Publish`},materialItem:{deleteMaterial:`Delete media`,uploadImage:`Uploaded image`,videoCover:`Video cover`},mediaPreview:{previewAlt:`Preview`},uploadProgress:{uploading:`Uploading`}},pageClient:{cancel:`cancel`,editContentFirst:`Please edit the content first`,maxMaterialCount:`You can upload up to 9 materials`,publishFailed:`Publish failed, please try again later`,publishSuccess:`Published successfully`,resume:`Continued`,switchToPostConfirm:`Switching to post will clear the main video. Continue?`,switchToVideoConfirm:`Switching to video will clear existing materials. Continue?`,title:`Confirm toggle`,uploadFailedCount:`{count} files failed to upload`}},search:{hotRecommend:{hotPostsTitle:`Popular Posts`,hotVideosTitle:`Popular Videos`},hotSearch:{recommendedSearches:`Recommended searches`},pageClient:{searchHistory:`Search History`,tabs:{all:`All`,post:`Posts`,user:`Users`,video:`Videos`}},searchResult:{searchAll:{emptyResult:`No related content found`,more:`MORE`,relatedSuffix:`Related`},searchUser:{emptyResult:`No related content found`,followersSuffix:`Followers`},searchVideoInfo:{noRelevantContent:`No relevant content found`}},topHeader:{placeholder:`Please enter keywords`,search:`Cari`}},settings:{components:{resetPasswordDrawer:{boundEmailNotice:`The email address is currently bound`,codeSentSuccess:`Verification code sent`,confirmPasswordPlaceholder:`Please enter the login password again`,passwordPlaceholder:`Enter password (6-18 characters)`,passwordResetSuccess:`Password changed successfully`,resendAfter:`resend after`,resetFailed:`Modification failed, please try again later`,resetPassword:`Change Password`,sendCode:`Send verification code`,sendFailed:`Failed to send, please try again later`,sending:`Sending...`,setNewPasswordHint:`Set a new login password`,submitting:`Submitting...`,title:`Reset Password`,verifyEmailButton:`Validate Email`,verifyFailed:`Verification failed, please check the code`,verifyHint:`Perform verification`,verifySuccess:`Verification successful`,verifying:`Verifying...`},settings:{button:`Log Out`,cancel:`Cancel`,collectionsTitle:`Collections`,confirm:`Confirm`,feedbackTitle:`Feedback`,follow:`Following`,followersTitle:`Followers`,languageTitle:`Language`,like:`Likes`,listPrivateHint:`This list will be private`,logoutConfirmMessage:`Are you sure you want to log out?`,privacySettingsTitle:`Privacy Settings`,resetPasswordTitle:`Reset Password`,switchTo:`Switch to`,title:`Settings`,whenOff:`When turned off`}}},userFollow:{components:{comprehensiveTab:{empty:`No content yet, try somewhere else.`,postsFeed:`Posts Feed`},contentItem:{filmAndTv:`Film and television related`},followNoLogin:{login:`Log in`,notLoggedIn:`You are not logged in`},followNoUser:{empty:`You haven't followed anyone yet`},followedList:{newUpdate:`New update`,seeAll:`See All`},postTab:{empty:`Not following any posts`}},page:{tabs:{posts:`Posts`}}},videoDetail:{videoDetailClient:{videoDeleted:`This video has been deleted`,videoUnavailable:`This video is unavailable`}}},ui:{infiniteScroll:{failed:`Load failed, click to retry`,loading:`Loading`,noMore:`No more`},list:{empty:`No content yet`,loading:`Loading...`,postList:{earlier:`Earlier`,empty:`No browsing history`,postListItem:{coverAlt:`Post cover`},today:`Today`},userActivityList:{earlier:`Earlier`,empty:`No browsing history`,today:`Today`,userActivityListActions:{comment:`Comment`,dislike:`Dislike`,like:`Like`,likeFailed:`Like failed`,share:`Share`},userActivityListItem:{collapse:`Collapse`,collectFailed:`Collection failed`,expand:`Expand`,mediaAlt:`Feed image`}},videoList:{earlier:`Earlier`,empty:`No viewing history`,today:`Today`,videoListItem:{coverAlt:`Video cover`,movie:`Movie`,series:`Series`,watchUntil:`Watched `}}},loading:{label:`Loading...`}}},tabBar:{follow:`Follow`,home:`Home`,message:`Message`,mine:`Mine`}};export{e as default};