@funhub/platform 0.1.45 → 0.1.47

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 (51) hide show
  1. package/dist/biz.mjs +1 -1
  2. package/dist/components/biz/basics/fullscreen-feed/index.mjs +1 -1
  3. package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -1
  4. package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +1 -1
  5. package/dist/components/biz/basics/fullscreen-feed/schema/index.mjs +1 -1
  6. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
  7. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
  8. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +1 -1
  9. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +1 -1
  10. package/dist/components/biz/business/channel-list/client.mjs +1 -1
  11. package/dist/components/biz/business/channel-list/material.d.mts +1 -0
  12. package/dist/components/biz/business/channel-list/schema.d.mts +1 -0
  13. package/dist/components/biz/business/channel-list/schema.mjs +1 -1
  14. package/dist/components/biz/business/comment/comment-list.mjs +1 -1
  15. package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
  16. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs +1 -1
  17. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs +1 -1
  18. package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +1 -1
  19. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.mjs +1 -1
  20. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs +1 -1
  21. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.mjs +1 -1
  22. package/dist/components/biz/business/post-card/variants/basic-post-card/index.mjs +1 -1
  23. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  24. package/dist/components/biz/business/profile/profile-header/material.d.mts +7 -1
  25. package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
  26. package/dist/components/biz/business/profile/profile-header/server.mjs +1 -1
  27. package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
  28. package/dist/components/biz/business/profile/profile-main/server.mjs +1 -1
  29. package/dist/components/biz/business/profile/profile-main/shell.d.mts +6 -0
  30. package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
  31. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +1 -1
  32. package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +1 -1
  33. package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs +1 -1
  34. package/dist/components/biz/business/search-bar/variants/tag-search-bar/runtime/client.mjs +1 -1
  35. package/dist/components/biz/utils/transformers/data.mjs +1 -1
  36. package/dist/components/common/funhub-provider/funhub-provider.mjs +1 -1
  37. package/dist/components/pages/collection-detail/detail.mjs +1 -1
  38. package/dist/components/pages/feed-series/feed-series-client.mjs +1 -1
  39. package/dist/components/pages/feed-series/page.mjs +1 -1
  40. package/dist/components/pages/login/index.mjs +1 -1
  41. package/dist/components/pages/profile/layout.d.mts +0 -4
  42. package/dist/components/pages/profile/page.d.mts +1 -1
  43. package/dist/components/pages/profile/page.mjs +1 -1
  44. package/dist/components/pages/settings/_components/settings.mjs +1 -1
  45. package/dist/components/pages/video-detail/page.mjs +1 -1
  46. package/dist/components/ui/badge.d.mts +1 -1
  47. package/dist/components/ui/button.d.mts +2 -2
  48. package/package.json +1 -1
  49. package/dist/components/biz/business/index.mjs +0 -2
  50. package/dist/components/pages/profile/_components/user-profile-container/client.mjs +0 -2
  51. package/dist/components/pages/profile/layout.mjs +0 -2
package/dist/biz.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- import{CARD_SPEC_MAP as e,CardSpec as t,getCardSpecConfig as n}from"./components/biz/utils/constants/card-spec.mjs";import{getChannelList as r}from"./components/biz/utils/helpers/get-channel-list.mjs";import{buildContentUrl as i}from"./components/biz/utils/helpers/url.mjs";import{DataBindingUIMode as a,DataSourceType as o}from"./components/biz/utils/schema/data.mjs";import{commonStylesToInline as s,customStylesToInline as c,mergeStyles as l}from"./components/biz/utils/styles/helpers.mjs";import{commonStyleSchema as u}from"./components/biz/utils/styles/schema.mjs";import{transformContentListToCardItems as d,transformContentToCardItem as f}from"./components/biz/utils/transformers/card-grid.mjs";import{defaultProps as p}from"./components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs";import{schema as m}from"./components/biz/business/banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as h,basicBannerInspectorPropsSchema as g}from"./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as _}from"./components/biz/business/banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as v}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import y from"./components/biz/business/banner/variants/basic-banner/index.mjs";import{defaultProps as b}from"./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as x}from"./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";import S from"./components/biz/business/card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as C}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as w}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import T from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as E}from"./components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as D}from"./components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs";import O from"./components/biz/business/card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as k}from"./components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as A}from"./components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs";import j from"./components/biz/business/card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as M}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as N}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import P from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as F}from"./components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as I}from"./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import L from"./components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as R}from"./components/biz/business/floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as z,floatingBallInspectorPropsSchema as B}from"./components/biz/business/floating-ball/schema.mjs";import{FloatingBall as V}from"./components/biz/business/floating-ball/server.mjs";import{floatingBallMaterial as H}from"./components/biz/business/floating-ball/material.mjs";import{defaultProps as U}from"./components/biz/basics/fullscreen-feed/defaults/default-props.mjs";import{BasicFullscreen as W}from"./components/biz/basics/fullscreen-feed/basic-fullscreen.mjs";import{schema as G}from"./components/biz/basics/fullscreen-feed/schema/index.mjs";import K from"./components/biz/basics/fullscreen-feed/index.mjs";import{defaultProps as q}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as J}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import Y from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as X}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as Z}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import Q from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as $}from"./components/biz/business/home-recommend/variants/home-recommend-grid/defaults/default-props.mjs";import{defaultProps as ee}from"./components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs";import{defaultProps as te}from"./components/biz/basics/search/variants/basic-search/defaults/default-props.mjs";import{defaultProps as ne}from"./components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as re}from"./components/biz/basics/logo/variants/basic-logo/schema/index.mjs";import ie from"./components/biz/basics/logo/variants/basic-logo/index.mjs";import{defaultProps as ae}from"./components/biz/basics/search/variants/simple-search/defaults/default-props.mjs";import{schema as oe}from"./components/biz/basics/search/variants/simple-search/schema/index.mjs";import se from"./components/biz/basics/search/variants/simple-search/index.mjs";import{schema as ce}from"./components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs";import le from"./components/biz/business/search-bar/variants/detail-search-bar/index.mjs";import{schema as ue}from"./components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.mjs";import{homeRecommendGridInspectorDefaultProps as de,homeRecommendGridInspectorPropsSchema as fe}from"./components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.mjs";import{HomeRecommendGrid as pe}from"./components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as me}from"./components/biz/business/home-recommend/variants/home-recommend-grid/material.mjs";import he from"./components/biz/business/home-recommend/variants/home-recommend-grid/index.mjs";import{defaultProps as ge}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs";import{schema as _e}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import{homeRecommendWaterfallInspectorDefaultProps as ve,homeRecommendWaterfallInspectorPropsSchema as ye}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs";import{HomeRecommendWaterfall as be}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as xe}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/material.mjs";import Se from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/index.mjs";import{MarqueeClient as Ce}from"./components/biz/business/marquee/client.mjs";import{marqueeInspectorPropsSchema as we}from"./components/biz/business/marquee/schema.mjs";import{MarqueeServer as Te}from"./components/biz/business/marquee/server.mjs";import{marqueeMaterial as Ee}from"./components/biz/business/marquee/material.mjs";import{defaultProps as De}from"./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as Oe}from"./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";import ke from"./components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as Ae}from"./components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs";import{schema as je}from"./components/biz/business/post-card/variants/basic-post-card/schema/index.mjs";import Me from"./components/biz/business/post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as Ne}from"./components/biz/business/profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as Pe,profileHeaderInspectorPropsSchema as Fe}from"./components/biz/business/profile/profile-header/schema.mjs";import{UserProfileHeader as Ie,buildUserProfileHeaderPrefetch as Le}from"./components/biz/business/profile/profile-header/server.mjs";import{profileHeaderMaterial as Re,profileHeaderMaterialWithDisabledBackground as ze}from"./components/biz/business/profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as Be,profileMainCollectTabOptions as Ve,profileMainHistoryTabOptions as He,profileMainLikeTabOptions as Ue,profileMainMineTabOptions as We,profileMainProfileTabOptions as Ge,profileMainTabOptions as Ke}from"./components/biz/business/profile/profile-main/variants.mjs";import{UserProfileMainShell as qe}from"./components/biz/business/profile/profile-main/shell.mjs";import{UserProfileMainClient as Je}from"./components/biz/business/profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as Ye,profileMainInspectorPropsSchema as Xe}from"./components/biz/business/profile/profile-main/schema.mjs";import{CollectTab as Ze}from"./components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as Qe,buildCollectTabPrefetch as $e}from"./components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as et}from"./components/biz/business/profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as tt,buildHistoryTabPrefetch as nt}from"./components/biz/business/profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as rt}from"./components/biz/business/profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as it,buildLikeTabPrefetch as at}from"./components/biz/business/profile/profile-main/tabs/like-tab/server.mjs";import{UserProfileMain as ot}from"./components/biz/business/profile/profile-main/server.mjs";import{profileMainMaterial as st}from"./components/biz/business/profile/profile-main/material.mjs";import{PublishTab as ct}from"./components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as lt,buildPublishTabPrefetch as ut}from"./components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs";import{defaultProps as dt}from"./components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as ft}from"./components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs";import pt from"./components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as mt}from"./components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as ht}from"./components/biz/basics/search/variants/basic-search/schema/index.mjs";import gt from"./components/biz/basics/search/variants/basic-search/index.mjs";import{schema as _t}from"./components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs";import vt from"./components/biz/business/search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as yt}from"./components/biz/basics/search/variants/filter-search/defaults/default-props.mjs";import{defaultProps as bt}from"./components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as xt}from"./components/biz/basics/search/variants/filter-search/schema/index.mjs";import St from"./components/biz/basics/search/variants/filter-search/index.mjs";import{schema as Ct}from"./components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs";import wt from"./components/biz/business/search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as Tt}from"./components/biz/basics/search/variants/tag-search/defaults/default-props.mjs";import{defaultProps as Et}from"./components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as Dt}from"./components/biz/basics/search/variants/tag-search/schema/index.mjs";import Ot from"./components/biz/basics/search/variants/tag-search/index.mjs";import{schema as kt}from"./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";import At from"./components/biz/business/search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as jt}from"./components/biz/business/search-history/client.mjs";import{searchHistoryInspectorPropsSchema as Mt}from"./components/biz/business/search-history/schema.mjs";import{SearchHistoryServer as Nt}from"./components/biz/business/search-history/server.mjs";import{searchHistoryMaterial as Pt}from"./components/biz/business/search-history/material.mjs";import{SearchInputClient as Ft}from"./components/biz/business/search-input/client.mjs";import{searchInputInspectorPropsSchema as It}from"./components/biz/business/search-input/schema.mjs";import{SearchInputServer as Lt}from"./components/biz/business/search-input/server.mjs";import{searchInputMaterial as Rt}from"./components/biz/business/search-input/material.mjs";import{TabBarClient as zt}from"./components/biz/business/tab-bar/client.mjs";import{tabBarInspectorPropsSchema as Bt}from"./components/biz/business/tab-bar/schema.mjs";import{TabBarServer as Vt}from"./components/biz/business/tab-bar/server.mjs";import{tabBarMaterial as Ht}from"./components/biz/business/tab-bar/material.mjs";import{TextRecommendClient as Ut}from"./components/biz/business/text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as Wt}from"./components/biz/business/text-recommend/schema.mjs";import{TextRecommendServer as Gt}from"./components/biz/business/text-recommend/server.mjs";import{textRecommendMaterial as Kt}from"./components/biz/business/text-recommend/material.mjs";import{VideoHorizontalListClient as qt}from"./components/biz/business/video-horizontal-list/client.mjs";import{videoHorizontalListInspectorPropsSchema as Jt}from"./components/biz/business/video-horizontal-list/schema.mjs";import{VideoHorizontalListServer as Yt}from"./components/biz/business/video-horizontal-list/server.mjs";import{videoHorizontalListMaterial as Xt}from"./components/biz/business/video-horizontal-list/material.mjs";import{ComponentType as Zt,extractDataByComponentType as Qt}from"./components/biz/utils/transformers/data.mjs";import{defaultProps as $t}from"./components/biz/basics/card-item/defaults/default-props.mjs";import{schema as en}from"./components/biz/basics/card-item/schema/index.mjs";import{defaultProps as tn}from"./components/biz/basics/card-layout/defaults/default-props.mjs";import{schema as nn}from"./components/biz/basics/card-layout/schema/index.mjs";import{ButtonClient as rn}from"./components/biz/example/button/client.mjs";import{buttonInspectorDefaultProps as an,buttonInspectorPropsSchema as on}from"./components/biz/example/button/schema.mjs";import{Button as sn}from"./components/biz/example/button/server.mjs";import{exampleButtonMaterial as cn}from"./components/biz/example/button/material.mjs";import{Renderer as ln}from"./components/biz/renderer/renderer.mjs";export{y as BasicBanner,p as BasicBannerDefaultData,_ as BasicBannerMaterialComponent,m as BasicBannerSchema,L as BasicFeatureGrid,F as BasicFeatureGridDefaultData,I as BasicFeatureGridSchema,W as BasicFullscreen,K as BasicFullscreenFeed,U as BasicFullscreenFeedDefaultData,G as BasicFullscreenFeedSchema,ie as BasicLogo,ee as BasicLogoDefaultData,re as BasicLogoSchema,ke as BasicNavBar,De as BasicNavBarDefaultData,Oe as BasicNavBarSchema,Me as BasicPostCard,Ae as BasicPostCardDefaultData,je as BasicPostCardSchema,pt as BasicRecommendedUsers,dt as BasicRecommendedUsersDefaultData,ft as BasicRecommendedUsersSchema,gt as BasicSearch,vt as BasicSearchBar,mt as BasicSearchBarDefaultData,_t as BasicSearchBarSchema,te as BasicSearchDefaultData,ht as BasicSearchSchema,sn as Button,rn as ButtonClient,e as CARD_SPEC_MAP,S as CardGrid2x3,b as CardGrid2x3DefaultData,T as CardGrid2x3Infinite,C as CardGrid2x3InfiniteDefaultData,w as CardGrid2x3InfiniteSchema,x as CardGrid2x3Schema,O as CardGrid2x4,E as CardGrid2x4DefaultData,D as CardGrid2x4Schema,j as CardGrid3x3,k as CardGrid3x3DefaultData,P as CardGrid3x3Infinite,M as CardGrid3x3InfiniteDefaultData,N as CardGrid3x3InfiniteSchema,A as CardGrid3x3Schema,$t as CardItemDefaultData,en as CardItemSchema,tn as CardLayoutDefaultData,nn as CardLayoutSchema,t as CardSpec,Ze as CollectTab,Qe as CollectTabServer,Zt as ComponentType,a as DataBindingUIMode,o as DataSourceType,le as DetailSearchBar,ne as DetailSearchBarDefaultData,ce as DetailSearchBarSchema,St as FilterSearch,wt as FilterSearchBar,bt as FilterSearchBarDefaultData,Ct as FilterSearchBarSchema,yt as FilterSearchDefaultData,xt as FilterSearchSchema,V as FloatingBall,R as FloatingBallClient,Y as FullscreenFeedClient,q as FullscreenPostFeedDefaultData,J as FullscreenPostFeedSchema,Q as FullscreenVideoClient,X as FullscreenVideoFeedDefaultData,Z as FullscreenVideoFeedSchema,et as HistoryTab,tt as HistoryTabServer,he as HomeRecommendGrid,$ as HomeRecommendGridDefaultData,pe as HomeRecommendGridMaterialComponent,ue as HomeRecommendGridSchema,Se as HomeRecommendWaterfall,ge as HomeRecommendWaterfallDefaultData,be as HomeRecommendWaterfallMaterialComponent,_e as HomeRecommendWaterfallSchema,rt as LikeTab,it as LikeTabServer,Ce as MarqueeClient,Te as MarqueeServer,ct as PublishTab,lt as PublishTabServer,ln as Renderer,jt as SearchHistoryClient,Nt as SearchHistoryServer,Ft as SearchInputClient,Lt as SearchInputServer,se as SimpleSearch,ae as SimpleSearchDefaultData,oe as SimpleSearchSchema,zt as TabBarClient,Vt as TabBarServer,Ot as TagSearch,At as TagSearchBar,Et as TagSearchBarDefaultData,kt as TagSearchBarSchema,Tt as TagSearchDefaultData,Dt as TagSearchSchema,Ut as TextRecommendClient,Gt as TextRecommendServer,Ie as UserProfileHeader,Ne as UserProfileHeaderClient,ot as UserProfileMain,Je as UserProfileMainClient,qe as UserProfileMainShell,qt as VideoHorizontalListClient,Yt as VideoHorizontalListServer,h as basicBannerInspectorDefaultProps,g as basicBannerInspectorPropsSchema,v as basicBannerMaterial,$e as buildCollectTabPrefetch,i as buildContentUrl,nt as buildHistoryTabPrefetch,at as buildLikeTabPrefetch,ut as buildPublishTabPrefetch,Le as buildUserProfileHeaderPrefetch,an as buttonInspectorDefaultProps,on as buttonInspectorPropsSchema,u as commonStyleSchema,s as commonStylesToInline,c as customStylesToInline,cn as exampleButtonMaterial,Qt as extractDataByComponentType,z as floatingBallInspectorDefaultProps,B as floatingBallInspectorPropsSchema,H as floatingBallMaterial,n as getCardSpecConfig,r as getChannelList,de as homeRecommendGridInspectorDefaultProps,fe as homeRecommendGridInspectorPropsSchema,me as homeRecommendGridMaterial,ve as homeRecommendWaterfallInspectorDefaultProps,ye as homeRecommendWaterfallInspectorPropsSchema,xe as homeRecommendWaterfallMaterial,we as marqueeInspectorPropsSchema,Ee as marqueeMaterial,l as mergeStyles,Pe as profileHeaderInspectorDefaultProps,Fe as profileHeaderInspectorPropsSchema,Re as profileHeaderMaterial,ze as profileHeaderMaterialWithDisabledBackground,Be as profileMainCollectCollectionTabOptions,Ve as profileMainCollectTabOptions,He as profileMainHistoryTabOptions,Ye as profileMainInspectorDefaultProps,Xe as profileMainInspectorPropsSchema,Ue as profileMainLikeTabOptions,st as profileMainMaterial,We as profileMainMineTabOptions,Ge as profileMainProfileTabOptions,Ke as profileMainTabOptions,Mt as searchHistoryInspectorPropsSchema,Pt as searchHistoryMaterial,It as searchInputInspectorPropsSchema,Rt as searchInputMaterial,Bt as tabBarInspectorPropsSchema,Ht as tabBarMaterial,Wt as textRecommendInspectorPropsSchema,Kt as textRecommendMaterial,d as transformContentListToCardItems,f as transformContentToCardItem,Jt as videoHorizontalListInspectorPropsSchema,Xt as videoHorizontalListMaterial};
2
+ import{CARD_SPEC_MAP as e,CardSpec as t,getCardSpecConfig as n}from"./components/biz/utils/constants/card-spec.mjs";import{getChannelList as r}from"./components/biz/utils/helpers/get-channel-list.mjs";import{buildContentUrl as i}from"./components/biz/utils/helpers/url.mjs";import{DataBindingUIMode as a,DataSourceType as o}from"./components/biz/utils/schema/data.mjs";import{commonStylesToInline as s,customStylesToInline as c,mergeStyles as l}from"./components/biz/utils/styles/helpers.mjs";import{commonStyleSchema as u}from"./components/biz/utils/styles/schema.mjs";import{transformContentListToCardItems as d,transformContentToCardItem as f}from"./components/biz/utils/transformers/card-grid.mjs";import{defaultProps as p}from"./components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs";import{schema as m}from"./components/biz/business/banner/variants/basic-banner/schema/index.mjs";import{defaultProps as h}from"./components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as g}from"./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import{BasicFullscreen as _}from"./components/biz/basics/fullscreen-feed/basic-fullscreen.mjs";import{defaultProps as v}from"./components/biz/basics/fullscreen-feed/defaults/default-props.mjs";import{schema as y}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import{schema as b}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import{defaultProps as x}from"./components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs";import{defaultProps as S}from"./components/biz/basics/search/variants/basic-search/defaults/default-props.mjs";import{defaultProps as C}from"./components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as w}from"./components/biz/basics/logo/variants/basic-logo/schema/index.mjs";import T from"./components/biz/basics/logo/variants/basic-logo/index.mjs";import{defaultProps as E}from"./components/biz/basics/search/variants/simple-search/defaults/default-props.mjs";import{schema as D}from"./components/biz/basics/search/variants/simple-search/schema/index.mjs";import O from"./components/biz/basics/search/variants/simple-search/index.mjs";import{schema as k}from"./components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs";import A from"./components/biz/business/search-bar/variants/detail-search-bar/index.mjs";import{schema as j}from"./components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.mjs";import{schema as M}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import{schema as N}from"./components/biz/business/post-card/variants/basic-post-card/schema/index.mjs";import{defaultProps as P}from"./components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as F}from"./components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs";import{ComponentType as I,extractDataByComponentType as L}from"./components/biz/utils/transformers/data.mjs";import{defaultProps as R}from"./components/biz/basics/card-item/defaults/default-props.mjs";import{schema as z}from"./components/biz/basics/card-item/schema/index.mjs";import{defaultProps as B}from"./components/biz/basics/card-layout/defaults/default-props.mjs";import{schema as V}from"./components/biz/basics/card-layout/schema/index.mjs";import{schema as H}from"./components/biz/basics/fullscreen-feed/schema/index.mjs";import U from"./components/biz/basics/fullscreen-feed/index.mjs";import{schema as W}from"./components/biz/basics/search/variants/basic-search/schema/index.mjs";import G from"./components/biz/basics/search/variants/basic-search/index.mjs";import{defaultProps as K}from"./components/biz/basics/search/variants/filter-search/defaults/default-props.mjs";import{schema as q}from"./components/biz/basics/search/variants/filter-search/schema/index.mjs";import J from"./components/biz/basics/search/variants/filter-search/index.mjs";import{defaultProps as Y}from"./components/biz/basics/search/variants/tag-search/defaults/default-props.mjs";import{schema as X}from"./components/biz/basics/search/variants/tag-search/schema/index.mjs";import Z from"./components/biz/basics/search/variants/tag-search/index.mjs";import{basicBannerInspectorDefaultProps as Q,basicBannerInspectorPropsSchema as $}from"./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as ee}from"./components/biz/business/banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as te}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import ne from"./components/biz/business/banner/variants/basic-banner/index.mjs";import{defaultProps as re}from"./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as ie}from"./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";import ae from"./components/biz/business/card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as oe}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as se}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import ce from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as le}from"./components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as ue}from"./components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs";import de from"./components/biz/business/card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as fe}from"./components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as pe}from"./components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs";import me from"./components/biz/business/card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as he}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as ge}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import _e from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs";import ve from"./components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as ye}from"./components/biz/business/floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as be,floatingBallInspectorPropsSchema as xe}from"./components/biz/business/floating-ball/schema.mjs";import{FloatingBall as Se}from"./components/biz/business/floating-ball/server.mjs";import{floatingBallMaterial as Ce}from"./components/biz/business/floating-ball/material.mjs";import{defaultProps as we}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import Te from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as Ee}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import De from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as Oe}from"./components/biz/business/home-recommend/variants/home-recommend-grid/defaults/default-props.mjs";import{homeRecommendGridInspectorDefaultProps as ke,homeRecommendGridInspectorPropsSchema as Ae}from"./components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.mjs";import{HomeRecommendGrid as je}from"./components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as Me}from"./components/biz/business/home-recommend/variants/home-recommend-grid/material.mjs";import Ne from"./components/biz/business/home-recommend/variants/home-recommend-grid/index.mjs";import{defaultProps as Pe}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs";import{homeRecommendWaterfallInspectorDefaultProps as Fe,homeRecommendWaterfallInspectorPropsSchema as Ie}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs";import{HomeRecommendWaterfall as Le}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as Re}from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/material.mjs";import ze from"./components/biz/business/home-recommend/variants/home-recommend-waterfall/index.mjs";import{MarqueeClient as Be}from"./components/biz/business/marquee/client.mjs";import{marqueeInspectorPropsSchema as Ve}from"./components/biz/business/marquee/schema.mjs";import{MarqueeServer as He}from"./components/biz/business/marquee/server.mjs";import{marqueeMaterial as Ue}from"./components/biz/business/marquee/material.mjs";import{defaultProps as We}from"./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as Ge}from"./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";import Ke from"./components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as qe}from"./components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs";import Je from"./components/biz/business/post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as Ye}from"./components/biz/business/profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as Xe,profileHeaderInspectorPropsSchema as Ze}from"./components/biz/business/profile/profile-header/schema.mjs";import{UserProfileHeader as Qe,buildUserProfileHeaderPrefetch as $e}from"./components/biz/business/profile/profile-header/server.mjs";import{profileHeaderMaterial as et,profileHeaderMaterialWithDisabledBackground as tt}from"./components/biz/business/profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as nt,profileMainCollectTabOptions as rt,profileMainHistoryTabOptions as it,profileMainLikeTabOptions as at,profileMainMineTabOptions as ot,profileMainProfileTabOptions as st,profileMainTabOptions as ct}from"./components/biz/business/profile/profile-main/variants.mjs";import{UserProfileMainShell as lt}from"./components/biz/business/profile/profile-main/shell.mjs";import{UserProfileMainClient as ut}from"./components/biz/business/profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as dt,profileMainInspectorPropsSchema as ft}from"./components/biz/business/profile/profile-main/schema.mjs";import{CollectTab as pt}from"./components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as mt,buildCollectTabPrefetch as ht}from"./components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as gt}from"./components/biz/business/profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as _t,buildHistoryTabPrefetch as vt}from"./components/biz/business/profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as yt}from"./components/biz/business/profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as bt,buildLikeTabPrefetch as xt}from"./components/biz/business/profile/profile-main/tabs/like-tab/server.mjs";import{UserProfileMain as St}from"./components/biz/business/profile/profile-main/server.mjs";import{profileMainMaterial as Ct}from"./components/biz/business/profile/profile-main/material.mjs";import{PublishTab as wt}from"./components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as Tt,buildPublishTabPrefetch as Et}from"./components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs";import Dt from"./components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as Ot}from"./components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as kt}from"./components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs";import At from"./components/biz/business/search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as jt}from"./components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as Mt}from"./components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs";import Nt from"./components/biz/business/search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as Pt}from"./components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as Ft}from"./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";import It from"./components/biz/business/search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as Lt}from"./components/biz/business/search-history/client.mjs";import{searchHistoryInspectorPropsSchema as Rt}from"./components/biz/business/search-history/schema.mjs";import{SearchHistoryServer as zt}from"./components/biz/business/search-history/server.mjs";import{searchHistoryMaterial as Bt}from"./components/biz/business/search-history/material.mjs";import{SearchInputClient as Vt}from"./components/biz/business/search-input/client.mjs";import{searchInputInspectorPropsSchema as Ht}from"./components/biz/business/search-input/schema.mjs";import{SearchInputServer as Ut}from"./components/biz/business/search-input/server.mjs";import{searchInputMaterial as Wt}from"./components/biz/business/search-input/material.mjs";import{TabBarClient as Gt}from"./components/biz/business/tab-bar/client.mjs";import{tabBarInspectorPropsSchema as Kt}from"./components/biz/business/tab-bar/schema.mjs";import{TabBarServer as qt}from"./components/biz/business/tab-bar/server.mjs";import{tabBarMaterial as Jt}from"./components/biz/business/tab-bar/material.mjs";import{TextRecommendClient as Yt}from"./components/biz/business/text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as Xt}from"./components/biz/business/text-recommend/schema.mjs";import{TextRecommendServer as Zt}from"./components/biz/business/text-recommend/server.mjs";import{textRecommendMaterial as Qt}from"./components/biz/business/text-recommend/material.mjs";import{VideoHorizontalListClient as $t}from"./components/biz/business/video-horizontal-list/client.mjs";import{videoHorizontalListInspectorPropsSchema as en}from"./components/biz/business/video-horizontal-list/schema.mjs";import{VideoHorizontalListServer as tn}from"./components/biz/business/video-horizontal-list/server.mjs";import{videoHorizontalListMaterial as nn}from"./components/biz/business/video-horizontal-list/material.mjs";import{ButtonClient as rn}from"./components/biz/example/button/client.mjs";import{buttonInspectorDefaultProps as an,buttonInspectorPropsSchema as on}from"./components/biz/example/button/schema.mjs";import{Button as sn}from"./components/biz/example/button/server.mjs";import{exampleButtonMaterial as cn}from"./components/biz/example/button/material.mjs";import{Renderer as ln}from"./components/biz/renderer/renderer.mjs";export{ne as BasicBanner,p as BasicBannerDefaultData,ee as BasicBannerMaterialComponent,m as BasicBannerSchema,ve as BasicFeatureGrid,h as BasicFeatureGridDefaultData,g as BasicFeatureGridSchema,_ as BasicFullscreen,U as BasicFullscreenFeed,v as BasicFullscreenFeedDefaultData,H as BasicFullscreenFeedSchema,T as BasicLogo,x as BasicLogoDefaultData,w as BasicLogoSchema,Ke as BasicNavBar,We as BasicNavBarDefaultData,Ge as BasicNavBarSchema,Je as BasicPostCard,qe as BasicPostCardDefaultData,N as BasicPostCardSchema,Dt as BasicRecommendedUsers,P as BasicRecommendedUsersDefaultData,F as BasicRecommendedUsersSchema,G as BasicSearch,At as BasicSearchBar,Ot as BasicSearchBarDefaultData,kt as BasicSearchBarSchema,S as BasicSearchDefaultData,W as BasicSearchSchema,sn as Button,rn as ButtonClient,e as CARD_SPEC_MAP,ae as CardGrid2x3,re as CardGrid2x3DefaultData,ce as CardGrid2x3Infinite,oe as CardGrid2x3InfiniteDefaultData,se as CardGrid2x3InfiniteSchema,ie as CardGrid2x3Schema,de as CardGrid2x4,le as CardGrid2x4DefaultData,ue as CardGrid2x4Schema,me as CardGrid3x3,fe as CardGrid3x3DefaultData,_e as CardGrid3x3Infinite,he as CardGrid3x3InfiniteDefaultData,ge as CardGrid3x3InfiniteSchema,pe as CardGrid3x3Schema,R as CardItemDefaultData,z as CardItemSchema,B as CardLayoutDefaultData,V as CardLayoutSchema,t as CardSpec,pt as CollectTab,mt as CollectTabServer,I as ComponentType,a as DataBindingUIMode,o as DataSourceType,A as DetailSearchBar,C as DetailSearchBarDefaultData,k as DetailSearchBarSchema,J as FilterSearch,Nt as FilterSearchBar,jt as FilterSearchBarDefaultData,Mt as FilterSearchBarSchema,K as FilterSearchDefaultData,q as FilterSearchSchema,Se as FloatingBall,ye as FloatingBallClient,Te as FullscreenFeedClient,we as FullscreenPostFeedDefaultData,y as FullscreenPostFeedSchema,De as FullscreenVideoClient,Ee as FullscreenVideoFeedDefaultData,b as FullscreenVideoFeedSchema,gt as HistoryTab,_t as HistoryTabServer,Ne as HomeRecommendGrid,Oe as HomeRecommendGridDefaultData,je as HomeRecommendGridMaterialComponent,j as HomeRecommendGridSchema,ze as HomeRecommendWaterfall,Pe as HomeRecommendWaterfallDefaultData,Le as HomeRecommendWaterfallMaterialComponent,M as HomeRecommendWaterfallSchema,yt as LikeTab,bt as LikeTabServer,Be as MarqueeClient,He as MarqueeServer,wt as PublishTab,Tt as PublishTabServer,ln as Renderer,Lt as SearchHistoryClient,zt as SearchHistoryServer,Vt as SearchInputClient,Ut as SearchInputServer,O as SimpleSearch,E as SimpleSearchDefaultData,D as SimpleSearchSchema,Gt as TabBarClient,qt as TabBarServer,Z as TagSearch,It as TagSearchBar,Pt as TagSearchBarDefaultData,Ft as TagSearchBarSchema,Y as TagSearchDefaultData,X as TagSearchSchema,Yt as TextRecommendClient,Zt as TextRecommendServer,Qe as UserProfileHeader,Ye as UserProfileHeaderClient,St as UserProfileMain,ut as UserProfileMainClient,lt as UserProfileMainShell,$t as VideoHorizontalListClient,tn as VideoHorizontalListServer,Q as basicBannerInspectorDefaultProps,$ as basicBannerInspectorPropsSchema,te as basicBannerMaterial,ht as buildCollectTabPrefetch,i as buildContentUrl,vt as buildHistoryTabPrefetch,xt as buildLikeTabPrefetch,Et as buildPublishTabPrefetch,$e as buildUserProfileHeaderPrefetch,an as buttonInspectorDefaultProps,on as buttonInspectorPropsSchema,u as commonStyleSchema,s as commonStylesToInline,c as customStylesToInline,cn as exampleButtonMaterial,L as extractDataByComponentType,be as floatingBallInspectorDefaultProps,xe as floatingBallInspectorPropsSchema,Ce as floatingBallMaterial,n as getCardSpecConfig,r as getChannelList,ke as homeRecommendGridInspectorDefaultProps,Ae as homeRecommendGridInspectorPropsSchema,Me as homeRecommendGridMaterial,Fe as homeRecommendWaterfallInspectorDefaultProps,Ie as homeRecommendWaterfallInspectorPropsSchema,Re as homeRecommendWaterfallMaterial,Ve as marqueeInspectorPropsSchema,Ue as marqueeMaterial,l as mergeStyles,Xe as profileHeaderInspectorDefaultProps,Ze as profileHeaderInspectorPropsSchema,et as profileHeaderMaterial,tt as profileHeaderMaterialWithDisabledBackground,nt as profileMainCollectCollectionTabOptions,rt as profileMainCollectTabOptions,it as profileMainHistoryTabOptions,dt as profileMainInspectorDefaultProps,ft as profileMainInspectorPropsSchema,at as profileMainLikeTabOptions,Ct as profileMainMaterial,ot as profileMainMineTabOptions,st as profileMainProfileTabOptions,ct as profileMainTabOptions,Rt as searchHistoryInspectorPropsSchema,Bt as searchHistoryMaterial,Ht as searchInputInspectorPropsSchema,Wt as searchInputMaterial,Kt as tabBarInspectorPropsSchema,Jt as tabBarMaterial,Xt as textRecommendInspectorPropsSchema,Qt as textRecommendMaterial,d as transformContentListToCardItems,f as transformContentToCardItem,en as videoHorizontalListInspectorPropsSchema,nn as videoHorizontalListMaterial};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{schema as n}from"./schema/index.mjs";var r=t;export{r as default};
2
+ import e from"./runtime/client.mjs";import{defaultProps as t}from"./defaults/default-props.mjs";import{schema as n}from"./schema/index.mjs";var r=e;export{r as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useLoginModalStore as e}from"../../../../../store/modules/login-modal-store.mjs";import{prefetchVideoPlayerSrc as t}from"../../../../common/video-player/process-m3u8-cache.mjs";import{BasicFullscreen as n}from"../basic-fullscreen.mjs";import{adaptFeedItemToSafeInformation as r,normalizeToFeedItem as i}from"./adapters.mjs";import a from"./styles.module.mjs";import{BottomInfo as o}from"./bottom-info.mjs";import{PostSlide as s}from"./post-slide.mjs";import{UserAction as ee}from"./user-action.mjs";import{VideoSlide as te}from"./video-slide.mjs";import{useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import g from"next/dynamic";import{useParams as ne,useRouter as re}from"next/navigation";const _=g(()=>import(`./comment-modal.mjs`),{ssr:!1,loading:()=>null});function v(g){let v=re(),y=ne(),{items:b,activeIndex:x,top:ie,bottom:ae,videoConfig:oe,userInteracted:S,onUserInteracted:C,onActiveIndexChange:se,onDataUpdate:ce,onOpenComment:w,getNavigationInfo:T,onControlsVisibilityChange:E,onGestureStart:le,onGestureEnd:D,onSwipeCancel:ue,onCustomActionRender:de,onVideoProgressUpdate:fe,currentUserId:pe,followIds:me,onFollowIdsChange:he,commentContentId:ge,onRequireLogin:O,style:_e,activeEpisodeId:ve}=g,k=oe;function A(){S||C()}function j(e){A();let t=typeof y?.locale==`string`?`/${y.locale}`:``;v.push(`${t}/profile/${e}`)}let M=c(e=>`${typeof y?.locale==`string`?`/${y.locale}`:``}/feed-series/${e}/episode/1`,[y?.locale]);function N(e){A();let t=M(e);window.isWebView?window.location.href=t:v.push(t)}function P(){if(O){O();return}e.getState().open()}let[F,ye]=f({});function I(e,t){if(!t)return e;let n=t.static?{...e.static||{},...t.static}:e.static,r=t.author?{...e.author||{},...t.author}:e.author;return{...e,...t,static:n,author:r}}function L(e,t){ye(n=>{let r=n[e]||{},i=t.static?{...r.static||{},...t.static}:r.static,a=t.author?{...r.author||{},...t.author}:r.author;return{...n,[e]:{...r,...t,...i?{static:i}:{},...a?{author:a}:{}}}}),ce(e,t)}let[R,be]=f(null),[z,xe]=f(``),[Se,Ce]=f(1),[B,V]=f(!1);function we(e,t,n){if(A(),w){w(t);return}be(t),xe(e),Ce(n),V(!0)}function Te(e){let t=e.static?.comment_cnt;t!=null&&z&&L(z,{static:{comment_cnt:t}})}let H=u(()=>{function e(e){return!!e&&typeof e==`object`&&typeof e.kind==`string`&&!!e.originalData}function t(e){return!!e&&typeof e==`object`&&typeof e.content_id==`string`}function n(e){return!!e&&typeof e==`object`&&typeof e.id==`string`&&typeof e.name==`string`}function a(e){let t=Array.isArray(e.medias)?e.medias:[],n=t.map(e=>e?.media_url?e.is_video&&e.cover_image||e.media_url:``).filter(e=>!!e),r=e.content||``,i=r.length>18?`${r.slice(0,18)}...`:r,a={id:e.content_id,mid:e.content_id,name:i,img_y:e.cover_image||``,preview_images:t,description:r,tags:(e.tags||[]).map(e=>({id:e,name:e})),links:[],static:{like_cnt:e.like_count??0,dislike_cnt:e.dislike_count??0,comment_cnt:e.comment_count??0,share_cnt:e.share_count??0,browse_cnt:e.view_count??0,collect_cnt:0},type:e.type,is_liked:!!e.is_liked,is_dislike:!!e.is_dislike,is_collected:!!e.is_collected,is_followed:!!e.is_followed,author:e.author,up_user:e.user_id};return{kind:`post`,id:e.content_id,title:i,content:r,images:n,originalData:a}}function o(e){let t=(Array.isArray(e.preview_images)?e.preview_images:[]).map(e=>e?typeof e==`string`?e:e.is_video?e.cover_image||e.media_url||``:e.media_url||``:``).filter(e=>!!e);return{kind:`post`,id:e.id,title:e.name,content:e.description??``,images:t,originalData:e}}return(b||[]).map(s=>{if(e(s))return s;if(t(s))return a(s);if(n(s)){let e=r(s);return e.type===1&&e.links.length===0?o(e):i(e)}return null}).filter(Boolean)},[b]),U=u(()=>{if(!H.length)return[];let e=Math.max(0,x-1),t=Math.min(H.length-1,x+2),n=[];for(let r=e;r<=t;r+=1){let e=H[r];if(!e||e.kind!==`video`)continue;let t=e.videoUrl||e.hlsList?.[0]?.url||``;t&&n.push(t)}return Array.from(new Set(n))},[x,H]);l(()=>{U.forEach(e=>t(e))},[U]);let W=d(new Set);l(()=>{let e=H[x];if(!e||e.kind!==`video`||Number(e.originalData?.episode_cnt||0)<=1||T(x).onSeriesClick)return;let t=e.originalData?.id||e.id;if(!t)return;let n=M(t);W.current.has(n)||(W.current.add(n),v.prefetch(n))},[x,M,T,H,v]);let G=`env(safe-area-inset-bottom, 0px)`,K=ie??0,q=ae??0,Ee={..._e,top:`${K}px`,bottom:`calc(${q}px + ${G})`,height:`calc(100dvh - ${K}px - (${q}px + ${G}))`},J=d(x),[De,Y]=f(!1),[X,Z]=f(!1),[Oe,Q]=f(!1),$=De&&X&&Oe;return l(()=>{J.current=x,Y(!1),Z(!1),Q(!1)},[x,E]),l(()=>{E?.($)},[$,E]),h(p,{children:[m(n,{items:H,activeIndex:x,userInteracted:S,onUserInteracted:C,onActiveIndexChange:se,onViewportIndexChange:e=>{J.current=e,Y(!1),Z(!1),Q(!1)},onGestureStart:le,onGestureEnd:D,onSwipeCancel:ue,style:Ee,className:`w-full h-full fixed top-0 left-0 overflow-hidden z-[2] touch-none ${a.fullscreenFeed}`,trackClassName:a.feedTrack,itemWrapperClassName:a.feedItem,renderItem:({item:e,index:t,activeIndex:n,isActive:r,isSettledActive:i,shouldMount:c,swipeNext:l})=>{if(!e)return m(`div`,{className:a.emptySlide});let u=Math.abs(t-n)<=1,d=I(e.originalData,F[e.id]);return h(p,{children:[e.kind===`post`?m(s,{item:e,isSettledActive:i,shouldMount:c}):e.kind===`video`?m(te,{item:e,videoConfig:k,isActive:r,isSettledActive:i,shouldMount:c,shouldLoadCover:u,isPaused:B,userInteracted:S,onPlayerInteract:()=>{t===J.current&&X&&Q(!0)},onControlsVisibilityChange:e=>{t===J.current&&Y(e)},onVideoEnded:k?.autoNext?l:void 0,onProgressUpdate:(n,r)=>{t===J.current&&(!X&&n>=.05&&Z(!0),fe?.({id:e.id,currentTime:n,duration:r}))}}):m(`div`,{className:a.emptySlide}),m(ee,{information:d,onUpdate:t=>L(e.id,t),onOpenComment:()=>we(e.id,d,e.kind===`post`?2:1),onCustomActionRender:de,onUserNavigate:j,currentUserId:pe,followIds:me,onFollowChange:e=>{he?.(e)},onRequireLogin:P,activeEpisodeId:ve}),r&&m(o,{information:d,isPost:e.kind===`post`,navigation:(()=>{let e=T(t);return(d.episode_cnt??0)>1&&!e.onSeriesClick?{...e,onSeriesClick:()=>N(d.id)}:e})(),isControlsVisible:$,onUserNavigate:j,onNextClick:l})]})}}),!w&&B&&R&&m(_,{open:B,information:R,contentId:ge||R.id,content_type:Se,onUpdate:Te,onClose:()=>V(!1)})]})}export{v as default};
2
+ "use client";import{prefetchVideoPlayerSrc as e}from"../../../../common/video-player/process-m3u8-cache.mjs";import{useLoginModalStore as t}from"../../../../../store/modules/login-modal-store.mjs";import{BasicFullscreen as n}from"../basic-fullscreen.mjs";import{adaptFeedItemToSafeInformation as r,normalizeToFeedItem as i}from"./adapters.mjs";import a from"./styles.module.mjs";import{BottomInfo as o}from"./bottom-info.mjs";import{PostSlide as s}from"./post-slide.mjs";import{UserAction as ee}from"./user-action.mjs";import{VideoSlide as te}from"./video-slide.mjs";import{useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import g from"next/dynamic";import{useParams as ne,useRouter as re}from"next/navigation";const _=g(()=>import(`./comment-modal.mjs`),{ssr:!1,loading:()=>null});function v(g){let v=re(),y=ne(),{items:b,activeIndex:x,top:ie,bottom:ae,videoConfig:oe,userInteracted:S,onUserInteracted:C,onActiveIndexChange:se,onDataUpdate:ce,onOpenComment:w,getNavigationInfo:T,onControlsVisibilityChange:E,onGestureStart:le,onGestureEnd:D,onSwipeCancel:ue,onCustomActionRender:de,onVideoProgressUpdate:fe,currentUserId:pe,followIds:me,onFollowIdsChange:he,commentContentId:ge,onRequireLogin:O,style:_e,activeEpisodeId:ve}=g,k=oe;function A(){S||C()}function j(e){A();let t=typeof y?.locale==`string`?`/${y.locale}`:``;v.push(`${t}/profile/${e}`)}let M=c(e=>`${typeof y?.locale==`string`?`/${y.locale}`:``}/feed-series/${e}/episode/1`,[y?.locale]);function N(e){A();let t=M(e);window.isWebView?window.location.href=t:v.push(t)}function P(){if(O){O();return}t.getState().open()}let[F,ye]=f({});function I(e,t){if(!t)return e;let n=t.static?{...e.static||{},...t.static}:e.static,r=t.author?{...e.author||{},...t.author}:e.author;return{...e,...t,static:n,author:r}}function L(e,t){ye(n=>{let r=n[e]||{},i=t.static?{...r.static||{},...t.static}:r.static,a=t.author?{...r.author||{},...t.author}:r.author;return{...n,[e]:{...r,...t,...i?{static:i}:{},...a?{author:a}:{}}}}),ce(e,t)}let[R,be]=f(null),[z,xe]=f(``),[Se,Ce]=f(1),[B,V]=f(!1);function we(e,t,n){if(A(),w){w(t);return}be(t),xe(e),Ce(n),V(!0)}function Te(e){let t=e.static?.comment_cnt;t!=null&&z&&L(z,{static:{comment_cnt:t}})}let H=u(()=>{function e(e){return!!e&&typeof e==`object`&&typeof e.kind==`string`&&!!e.originalData}function t(e){return!!e&&typeof e==`object`&&typeof e.content_id==`string`}function n(e){return!!e&&typeof e==`object`&&typeof e.id==`string`&&typeof e.name==`string`}function a(e){let t=Array.isArray(e.medias)?e.medias:[],n=t.map(e=>e?.media_url?e.is_video&&e.cover_image||e.media_url:``).filter(e=>!!e),r=e.content||``,i=r.length>18?`${r.slice(0,18)}...`:r,a={id:e.content_id,mid:e.content_id,name:i,img_y:e.cover_image||``,preview_images:t,description:r,tags:(e.tags||[]).map(e=>({id:e,name:e})),links:[],static:{like_cnt:e.like_count??0,dislike_cnt:e.dislike_count??0,comment_cnt:e.comment_count??0,share_cnt:e.share_count??0,browse_cnt:e.view_count??0,collect_cnt:0},type:e.type,is_liked:!!e.is_liked,is_dislike:!!e.is_dislike,is_collected:!!e.is_collected,is_followed:!!e.is_followed,author:e.author,up_user:e.user_id};return{kind:`post`,id:e.content_id,title:i,content:r,images:n,originalData:a}}function o(e){let t=(Array.isArray(e.preview_images)?e.preview_images:[]).map(e=>e?typeof e==`string`?e:e.is_video?e.cover_image||e.media_url||``:e.media_url||``:``).filter(e=>!!e);return{kind:`post`,id:e.id,title:e.name,content:e.description??``,images:t,originalData:e}}return(b||[]).map(s=>{if(e(s))return s;if(t(s))return a(s);if(n(s)){let e=r(s);return e.type===1&&e.links.length===0?o(e):i(e)}return null}).filter(Boolean)},[b]),U=u(()=>{if(!H.length)return[];let e=Math.max(0,x-1),t=Math.min(H.length-1,x+2),n=[];for(let r=e;r<=t;r+=1){let e=H[r];if(!e||e.kind!==`video`)continue;let t=e.videoUrl||e.hlsList?.[0]?.url||``;t&&n.push(t)}return Array.from(new Set(n))},[x,H]);l(()=>{U.forEach(t=>e(t))},[U]);let W=d(new Set);l(()=>{let e=H[x];if(!e||e.kind!==`video`||Number(e.originalData?.episode_cnt||0)<=1||T(x).onSeriesClick)return;let t=e.originalData?.id||e.id;if(!t)return;let n=M(t);W.current.has(n)||(W.current.add(n),v.prefetch(n))},[x,M,T,H,v]);let G=`env(safe-area-inset-bottom, 0px)`,K=ie??0,q=ae??0,Ee={..._e,top:`${K}px`,bottom:`calc(${q}px + ${G})`,height:`calc(100dvh - ${K}px - (${q}px + ${G}))`},J=d(x),[De,Y]=f(!1),[X,Z]=f(!1),[Oe,Q]=f(!1),$=De&&X&&Oe;return l(()=>{J.current=x,Y(!1),Z(!1),Q(!1)},[x,E]),l(()=>{E?.($)},[$,E]),h(p,{children:[m(n,{items:H,activeIndex:x,userInteracted:S,onUserInteracted:C,onActiveIndexChange:se,onViewportIndexChange:e=>{J.current=e,Y(!1),Z(!1),Q(!1)},onGestureStart:le,onGestureEnd:D,onSwipeCancel:ue,style:Ee,className:`w-full h-full fixed top-0 left-0 overflow-hidden z-[2] touch-none ${a.fullscreenFeed}`,trackClassName:a.feedTrack,itemWrapperClassName:a.feedItem,renderItem:({item:e,index:t,activeIndex:n,isActive:r,isSettledActive:i,shouldMount:c,swipeNext:l})=>{if(!e)return m(`div`,{className:a.emptySlide});let u=Math.abs(t-n)<=1,d=I(e.originalData,F[e.id]);return h(p,{children:[e.kind===`post`?m(s,{item:e,isSettledActive:i,shouldMount:c}):e.kind===`video`?m(te,{item:e,videoConfig:k,isActive:r,isSettledActive:i,shouldMount:c,shouldLoadCover:u,isPaused:B,userInteracted:S,onPlayerInteract:()=>{t===J.current&&X&&Q(!0)},onControlsVisibilityChange:e=>{t===J.current&&Y(e)},onVideoEnded:k?.autoNext?l:void 0,onProgressUpdate:(n,r)=>{t===J.current&&(!X&&n>=.05&&Z(!0),fe?.({id:e.id,currentTime:n,duration:r}))}}):m(`div`,{className:a.emptySlide}),m(ee,{information:d,onUpdate:t=>L(e.id,t),onOpenComment:()=>we(e.id,d,e.kind===`post`?2:1),onCustomActionRender:de,onUserNavigate:j,currentUserId:pe,followIds:me,onFollowChange:e=>{he?.(e)},onRequireLogin:P,activeEpisodeId:ve}),r&&m(o,{information:d,isPost:e.kind===`post`,navigation:(()=>{let e=T(t);return(d.episode_cnt??0)>1&&!e.onSeriesClick?{...e,onSeriesClick:()=>N(d.id)}:e})(),isControlsVisible:$,onUserNavigate:j,onNextClick:l})]})}}),!w&&B&&R&&m(_,{open:B,information:R,contentId:ge||R.id,content_type:Se,onUpdate:Te,onClose:()=>V(!1)})]})}export{v as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Image as e}from"../../../../ui/image.mjs";import{useBrowseReport as t}from"../../../../../hooks/use-browse-report.mjs";import{prefetchVideoPlayerSrc as n}from"../../../../common/video-player/process-m3u8-cache.mjs";import r from"./styles.module.mjs";import i from"../../../../../assets/icons/common/full_screen.mjs";import a from"../../../../common/video-player/index.mjs";import{useCallback as o,useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as ee}from"next-intl";const p=new Set,m=[];function h(e){if(!e||p.has(e)||(p.add(e),m.push(e),m.length<=200))return;let t=m.shift();t&&p.delete(t)}function g(e){return!!(e&&p.has(e))}function _({item:p,isActive:m,isSettledActive:_,shouldMount:v,shouldLoadCover:y,isPaused:b=!1,videoConfig:x,userInteracted:S,onPlayerInteract:C,onControlsVisibilityChange:w,onVideoEnded:T,onProgressUpdate:E}){let te=ee(`components.biz.basics.fullscreenFeed.runtime`),D=l(null),O=l(null),k=l(null),A=l(0),j=l(0),M=l(null),[N,P]=u(null),[F,I]=u(!1),[ne,L]=u(!1),[R,z]=u(!1),[B,V]=u(!1),[H,U]=u(!1),[W,G]=u(!1);s(()=>{G(!1),V(!1),I(!1),L(!1),z(!1),M.current&&=(window.cancelAnimationFrame(M.current),null)},[p.id]),s(()=>{v||(I(!1),L(!1),z(!1),M.current&&=(window.cancelAnimationFrame(M.current),null))},[v]);let K=!!(y&&m&&p.videoUrl&&!R&&!F&&!ne),q=!!(y&&p.poster),J=!!(y&&p.poster&&!R);s(()=>{A.current=0,j.current=0},[p.id]),s(()=>{!v||!p.videoUrl||n(p.videoUrl)},[p.videoUrl,v]),s(()=>{if(!v||!p.videoUrl){G(!1),V(!1),k.current&&=(window.clearTimeout(k.current),null);return}if(!m||!_){k.current&&=(window.clearTimeout(k.current),null);return}if(W)return;let e=!1,t=g(p.id)?80:260,n=window.setTimeout(()=>{e||G(!0)},t);return()=>{e=!0,window.clearTimeout(n)}},[m,_,p.videoUrl,v,p.id,W]),s(()=>()=>{k.current&&=(window.clearTimeout(k.current),null)},[]);let Y=t({contentId:p.id,contentType:1,enabled:!!(W&&m&&_&&p.videoUrl),preferProgressInitial:!0,preferProgressInitialTimeoutMs:1e3,intervalMs:60*1e3,getCurrentTimeSeconds:()=>A.current,getDurationSeconds:()=>j.current}),X=o(()=>{let e=O.current?.getPlayer?.();if(e){if(k.current&&=(window.clearTimeout(k.current),null),m&&!b){e.paused&&(k.current=window.setTimeout(()=>{e.play?.().catch(()=>{})},260));return}e.paused||e.pause?.()}},[m,b]),Z=o(()=>{let e=O.current?.getPlayer?.();e&&(e.volume=m&&S?1:0)},[m,S]),re=c(()=>({autoplay:!1,loop:x?.loop??!0,videoFillMode:`contain`,volume:{default:0,miniVolume:.2}}),[x?.loop]),Q=o(()=>{let e=D.current,t=O.current?.getPlayer?.();if(!e||!t)return;let n=t.video,r=e.clientWidth,i=e.clientHeight,a=n?.videoWidth,o=n?.videoHeight;if(!r||!i||!a||!o)return;U(a>o);let s=a/o,c=r,l=c/s;l>i&&(l=i,c=l*s);let u=(i-l)/2;P(Math.max(0,Math.min(i-44,u+l+20)))},[]),$=o(()=>{let e=O.current?.getPlayer?.(),t=D.current;if(!e||!t)return()=>{};let n=()=>{Q()},r=()=>{I(!0),L(!1),Q()},i=()=>{I(!1),L(!0),P(null)};e.on?.(`loadedmetadata`,n),e.on?.(`canplay`,r),e.on?.(`error`,i);let a=new ResizeObserver(()=>Q());return a.observe(t),()=>{e.off?.(`loadedmetadata`,n),e.off?.(`canplay`,r),e.off?.(`error`,i),a.disconnect()}},[Q]),ie=o(()=>{h(p.id),V(!0),window.requestAnimationFrame(()=>{X(),Z()})},[p.id,X,Z]);return s(()=>{!W||!p.videoUrl||B&&X()},[m,b,B,p.videoUrl,W,X]),s(()=>{!W||!p.videoUrl||B&&Z()},[B,p.videoUrl,W,Z,S]),s(()=>{if(!(!W||!m||!p.videoUrl||!B))return $()},[$,m,B,p.videoUrl,W]),s(()=>{m||(M.current&&=(window.cancelAnimationFrame(M.current),null),P(null),U(!1))},[m]),f(`div`,{ref:D,"data-id":p.id,className:r.videoSlide,onPointerDown:()=>{m&&C?.()},children:[q&&d(`div`,{className:r.videoPosterBg,children:d(e,{src:p.poster,fill:!0,alt:p.title||`video`,priority:m,className:`object-cover blur-[4px] scale-105`})}),J&&d(`div`,{className:r.videoPosterCover,children:d(e,{src:p.poster,fill:!0,alt:p.title||`video`,priority:m,className:`object-cover`})}),W&&p.videoUrl?f(`div`,{className:`${r.videoPlayerBox}`,children:[d(a,{ref:O,plyerId:p.id,resolution:p.resolution,poster:p.poster,videoUrl:p.videoUrl,hlsList:p.hlsList,mergeConfig:re,onVideoEnded:x?.autoNext?T:void 0,onPlayerReady:ie,onControlsVisibilityChange:w,onProgressUpdate:(e,t)=>{A.current=e,j.current=t,e>0&&I(!0),!R&&e>=.05&&(M.current||=window.requestAnimationFrame(()=>{M.current=null,z(!0)})),E?.(e,t)},onPlay:Y.handlePlay,onPause:Y.handlePause,onEnded:Y.handleEnded}),K&&d(`div`,{className:r.posterLoading,children:d(`img`,{src:`/images/common/loading.gif`,alt:`loading`,width:36,height:36})})]}):d(`div`,{className:r.videoPlaceholder,children:K&&d(`div`,{className:r.posterLoading,children:d(`img`,{src:`/images/common/loading.gif`,alt:`loading`,width:36,height:36})})}),W&&m&&H&&F&&N!=null&&f(`button`,{type:`button`,className:r.fullscreenBtn,style:{top:`${N}px`},onClick:()=>O.current?.enterFullscreen(),children:[d(i,{}),te(`videoSlide.watchFullscreen`)]})]})}export{_ as VideoSlide};
2
+ "use client";import{Image as e}from"../../../../ui/image.mjs";import{prefetchVideoPlayerSrc as t}from"../../../../common/video-player/process-m3u8-cache.mjs";import{useBrowseReport as n}from"../../../../../hooks/use-browse-report.mjs";import r from"./styles.module.mjs";import i from"../../../../../assets/icons/common/full_screen.mjs";import a from"../../../../common/video-player/index.mjs";import{useCallback as o,useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as ee}from"next-intl";const p=new Set,m=[];function h(e){if(!e||p.has(e)||(p.add(e),m.push(e),m.length<=200))return;let t=m.shift();t&&p.delete(t)}function g(e){return!!(e&&p.has(e))}function _({item:p,isActive:m,isSettledActive:_,shouldMount:v,shouldLoadCover:y,isPaused:b=!1,videoConfig:x,userInteracted:S,onPlayerInteract:C,onControlsVisibilityChange:w,onVideoEnded:T,onProgressUpdate:E}){let te=ee(`components.biz.basics.fullscreenFeed.runtime`),D=l(null),O=l(null),k=l(null),A=l(0),j=l(0),M=l(null),[N,P]=u(null),[F,I]=u(!1),[ne,L]=u(!1),[R,z]=u(!1),[B,V]=u(!1),[H,U]=u(!1),[W,G]=u(!1);s(()=>{G(!1),V(!1),I(!1),L(!1),z(!1),M.current&&=(window.cancelAnimationFrame(M.current),null)},[p.id]),s(()=>{v||(I(!1),L(!1),z(!1),M.current&&=(window.cancelAnimationFrame(M.current),null))},[v]);let K=!!(y&&m&&p.videoUrl&&!R&&!F&&!ne),q=!!(y&&p.poster),J=!!(y&&p.poster&&!R);s(()=>{A.current=0,j.current=0},[p.id]),s(()=>{!v||!p.videoUrl||t(p.videoUrl)},[p.videoUrl,v]),s(()=>{if(!v||!p.videoUrl){G(!1),V(!1),k.current&&=(window.clearTimeout(k.current),null);return}if(!m||!_){k.current&&=(window.clearTimeout(k.current),null);return}if(W)return;let e=!1,t=g(p.id)?80:260,n=window.setTimeout(()=>{e||G(!0)},t);return()=>{e=!0,window.clearTimeout(n)}},[m,_,p.videoUrl,v,p.id,W]),s(()=>()=>{k.current&&=(window.clearTimeout(k.current),null)},[]);let Y=n({contentId:p.id,contentType:1,enabled:!!(W&&m&&_&&p.videoUrl),preferProgressInitial:!0,preferProgressInitialTimeoutMs:1e3,intervalMs:60*1e3,getCurrentTimeSeconds:()=>A.current,getDurationSeconds:()=>j.current}),X=o(()=>{let e=O.current?.getPlayer?.();if(e){if(k.current&&=(window.clearTimeout(k.current),null),m&&!b){e.paused&&(k.current=window.setTimeout(()=>{e.play?.().catch(()=>{})},260));return}e.paused||e.pause?.()}},[m,b]),Z=o(()=>{let e=O.current?.getPlayer?.();e&&(e.volume=m&&S?1:0)},[m,S]),re=c(()=>({autoplay:!1,loop:x?.loop??!0,videoFillMode:`contain`,volume:{default:0,miniVolume:.2}}),[x?.loop]),Q=o(()=>{let e=D.current,t=O.current?.getPlayer?.();if(!e||!t)return;let n=t.video,r=e.clientWidth,i=e.clientHeight,a=n?.videoWidth,o=n?.videoHeight;if(!r||!i||!a||!o)return;U(a>o);let s=a/o,c=r,l=c/s;l>i&&(l=i,c=l*s);let u=(i-l)/2;P(Math.max(0,Math.min(i-44,u+l+20)))},[]),$=o(()=>{let e=O.current?.getPlayer?.(),t=D.current;if(!e||!t)return()=>{};let n=()=>{Q()},r=()=>{I(!0),L(!1),Q()},i=()=>{I(!1),L(!0),P(null)};e.on?.(`loadedmetadata`,n),e.on?.(`canplay`,r),e.on?.(`error`,i);let a=new ResizeObserver(()=>Q());return a.observe(t),()=>{e.off?.(`loadedmetadata`,n),e.off?.(`canplay`,r),e.off?.(`error`,i),a.disconnect()}},[Q]),ie=o(()=>{h(p.id),V(!0),window.requestAnimationFrame(()=>{X(),Z()})},[p.id,X,Z]);return s(()=>{!W||!p.videoUrl||B&&X()},[m,b,B,p.videoUrl,W,X]),s(()=>{!W||!p.videoUrl||B&&Z()},[B,p.videoUrl,W,Z,S]),s(()=>{if(!(!W||!m||!p.videoUrl||!B))return $()},[$,m,B,p.videoUrl,W]),s(()=>{m||(M.current&&=(window.cancelAnimationFrame(M.current),null),P(null),U(!1))},[m]),f(`div`,{ref:D,"data-id":p.id,className:r.videoSlide,onPointerDown:()=>{m&&C?.()},children:[q&&d(`div`,{className:r.videoPosterBg,children:d(e,{src:p.poster,fill:!0,alt:p.title||`video`,priority:m,className:`object-cover blur-[4px] scale-105`})}),J&&d(`div`,{className:r.videoPosterCover,children:d(e,{src:p.poster,fill:!0,alt:p.title||`video`,priority:m,className:`object-cover`})}),W&&p.videoUrl?f(`div`,{className:`${r.videoPlayerBox}`,children:[d(a,{ref:O,plyerId:p.id,resolution:p.resolution,poster:p.poster,videoUrl:p.videoUrl,hlsList:p.hlsList,mergeConfig:re,onVideoEnded:x?.autoNext?T:void 0,onPlayerReady:ie,onControlsVisibilityChange:w,onProgressUpdate:(e,t)=>{A.current=e,j.current=t,e>0&&I(!0),!R&&e>=.05&&(M.current||=window.requestAnimationFrame(()=>{M.current=null,z(!0)})),E?.(e,t)},onPlay:Y.handlePlay,onPause:Y.handlePause,onEnded:Y.handleEnded}),K&&d(`div`,{className:r.posterLoading,children:d(`img`,{src:`/images/common/loading.gif`,alt:`loading`,width:36,height:36})})]}):d(`div`,{className:r.videoPlaceholder,children:K&&d(`div`,{className:r.posterLoading,children:d(`img`,{src:`/images/common/loading.gif`,alt:`loading`,width:36,height:36})})}),W&&m&&H&&F&&N!=null&&f(`button`,{type:`button`,className:r.fullscreenBtn,style:{top:`${N}px`},onClick:()=>O.current?.enterFullscreen(),children:[d(i,{}),te(`videoSlide.watchFullscreen`)]})]})}export{_ as VideoSlide};
@@ -1,2 +1,2 @@
1
1
 
2
- import{componentMeta as e}from"./component.mjs";import{dataSchema as t}from"./data.schema.mjs";import{eventSchema as n}from"./event.schema.mjs";import{propsSchema as r}from"./props.schema.mjs";import{styleSchema as i}from"./style.schema.mjs";const a={...e,propsSchema:r,dataSchema:t,styleSchema:i,eventSchema:n};export{a as schema};
2
+ import{eventSchema as e}from"./event.schema.mjs";import{propsSchema as t}from"./props.schema.mjs";import{styleSchema as n}from"./style.schema.mjs";import{componentMeta as r}from"./component.mjs";import{dataSchema as i}from"./data.schema.mjs";const a={...r,propsSchema:t,dataSchema:i,styleSchema:n,eventSchema:e};export{a as schema};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import{defineArrayItemPropSchema as t,defineComponentPropsSchema as n,defineNumberPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a,getSchemaDefaultProps as o}from"../../../../../../utils/schema/schema.mjs";import s from"zod";const c=n({interval:r({label:`播放间隔`,defaultValue:e.interval}),list:t(s.object({contentId:r({label:`内容ID`,required:!1}),title:a({label:`内容标题`,required:!1}),coverUrl:a({label:`封面`,required:!1}),showViewCount:i({label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1}]})}),l=o(c);export{l as basicBannerInspectorDefaultProps,c as basicBannerInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"../../../../../../utils/schema/schema.mjs";import{defaultProps as o}from"./defaults/default-props.mjs";import s from"zod";const c=t({interval:n({label:`播放间隔`,defaultValue:o.interval}),list:e(s.object({contentId:n({label:`内容ID`,required:!1}),title:i({label:`内容标题`,required:!1}),coverUrl:i({label:`封面`,required:!1}),showViewCount:r({label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1}]})}),l=a(c);export{l as basicBannerInspectorDefaultProps,c as basicBannerInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{buildContentUrl as e}from"../../../../../utils/helpers/url.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{defaultProps as n}from"../defaults/default-props.mjs";import{Image as r}from"../../../../../../ui/image.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{Carousel as a,CarouselContent as o,CarouselItem as s}from"../../../../../../ui/carousel.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/legacy/button.mjs";import u from"../../../../../../ui/link.mjs";import d from"clsx";import{useIsClient as f}from"foxact/use-is-client";import{useEffect as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v={list:[]};function y({mode:y=`renderer`,props:b=v,styles:x,events:S}){let C=y===`editor`,{autoplay:w=n.autoplay,interval:T=n.interval,loop:E=n.loop,showTitle:D=n.showTitle,showIndicator:O=n.showIndicator,list:k=[]}={...n,...b},[A,j]=h(),[M,N]=h(0),P=f(),F=m(null);if(p(()=>{if(!A||!P)return;let e=()=>{N(A.selectedScrollSnap())};return A.on(`select`,e),e(),()=>{A.off(`select`,e)}},[A,S,P]),p(()=>!w||!A||k.length<=1?void 0:(F.current=setInterval(()=>{A.canScrollNext()?A.scrollNext():E&&A.scrollTo(0)},T),()=>{F.current&&=(clearInterval(F.current),null)}),[w,A,T,E,k.length]),!k||k.length===0)return null;let I=k[M],L=x?t(x,{}):void 0;return _(i,{className:C?`relative w-full pointer-events-none`:`relative w-full`,style:L,children:[g(a,{setApi:j,opts:{align:`start`,loop:E,skipSnaps:!1,dragFree:!1},className:`w-full`,children:g(o,{className:`ml-0`,children:k.map((t,n)=>g(s,{className:`pl-0`,children:g(u,{href:e({url:``,contentId:t.contentId,contentType:1,title:t.title}),className:`block relative w-full h-[242px] overflow-hidden touch-manipulation`,children:g(r,{src:t.coverUrl,alt:t.title||`Banner ${n+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},n))})}),D&&I?.title&&g(i,{className:`absolute bottom-[8px] left-[8px]`,children:g(c,{as:`p`,className:`text-white text-[16px] line-clamp-1`,children:I.title})}),O&&k.length>1&&g(i,{className:`absolute bottom-[16px] right-[8px] flex items-center gap-[4px]`,children:k.map((e,t)=>g(l,{type:`button`,className:d(`transition-all duration-300 rounded-full !p-0`,t===M?`w-[10px] h-[6px] bg-black`:`w-[6px] h-[6px] bg-white/50`),"aria-label":`跳转到第 ${t+1} 个 Banner`},t))})]})}export{y as default};
2
+ "use client";import{buildContentUrl as e}from"../../../../../utils/helpers/url.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{Image as n}from"../../../../../../ui/image.mjs";import{Box as r}from"../../../../../../ui/box.mjs";import{Carousel as i,CarouselContent as a,CarouselItem as o}from"../../../../../../ui/carousel.mjs";import{Text as s}from"../../../../../../ui/text.mjs";import c from"../../../../../../ui/legacy/button.mjs";import l from"../../../../../../ui/link.mjs";import{defaultProps as u}from"../defaults/default-props.mjs";import d from"clsx";import{useIsClient as f}from"foxact/use-is-client";import{useEffect as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v={list:[]};function y({mode:y=`renderer`,props:b=v,styles:x,events:S}){let C=y===`editor`,{autoplay:w=u.autoplay,interval:T=u.interval,loop:E=u.loop,showTitle:D=u.showTitle,showIndicator:O=u.showIndicator,list:k=[]}={...u,...b},[A,j]=h(),[M,N]=h(0),P=f(),F=m(null);if(p(()=>{if(!A||!P)return;let e=()=>{N(A.selectedScrollSnap())};return A.on(`select`,e),e(),()=>{A.off(`select`,e)}},[A,S,P]),p(()=>!w||!A||k.length<=1?void 0:(F.current=setInterval(()=>{A.canScrollNext()?A.scrollNext():E&&A.scrollTo(0)},T),()=>{F.current&&=(clearInterval(F.current),null)}),[w,A,T,E,k.length]),!k||k.length===0)return null;let I=k[M],L=x?t(x,{}):void 0;return _(r,{className:C?`relative w-full pointer-events-none`:`relative w-full`,style:L,children:[g(i,{setApi:j,opts:{align:`start`,loop:E,skipSnaps:!1,dragFree:!1},className:`w-full`,children:g(a,{className:`ml-0`,children:k.map((t,r)=>g(o,{className:`pl-0`,children:g(l,{href:e({url:``,contentId:t.contentId,contentType:1,title:t.title}),className:`block relative w-full h-[242px] overflow-hidden touch-manipulation`,children:g(n,{src:t.coverUrl,alt:t.title||`Banner ${r+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},r))})}),D&&I?.title&&g(r,{className:`absolute bottom-[8px] left-[8px]`,children:g(s,{as:`p`,className:`text-white text-[16px] line-clamp-1`,children:I.title})}),O&&k.length>1&&g(r,{className:`absolute bottom-[16px] right-[8px] flex items-center gap-[4px]`,children:k.map((e,t)=>g(c,{type:`button`,className:d(`transition-all duration-300 rounded-full !p-0`,t===M?`w-[10px] h-[6px] bg-black`:`w-[6px] h-[6px] bg-white/50`),"aria-label":`跳转到第 ${t+1} 个 Banner`},t))})]})}export{y as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{CardSpec as e}from"../../../../../utils/constants/card-spec.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{transformContentListToCardItems as n}from"../../../../../utils/transformers/card-grid.mjs";import{gContentGetAppChannelBlockData as r}from"../../../../../../../service/generated/client.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{InfiniteScroll as a}from"../../../../../../ui/infinite-scroll.mjs";import{Text as o}from"../../../../../../ui/text.mjs";import s from"../../../../../basics/card-layout/runtime/client.mjs";import{usePaginated as c}from"../../../../../../../hooks/query/use-query.mjs";import{useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={},g={list:[],title:``,cursor:``,block_id:``};function _({props:_=h,styles:v,data:y=g}){let b=e.V2_LARGE,{gap:x=8}=_||{},{title:S,cursor:C,block_id:w,list:T}=y,E=v?t(v,{}):void 0,D=T&&T.length>0,O=u(()=>{if(!D)return;let e=C&&C.trim()?C:void 0;return{pages:[{data:{block:{data:{videos:T,cursor:C||``}}}}],pageParams:[e]}},[D,T,C]),{data:k,fetchNextPage:A,hasNextPage:j}=c({key:[`card-grid-2x3-infinite`,w],queryFn:e=>r({block_id:w,cursor:e||void 0,page_size:20}),getNextPageParam:e=>{let t=e.data?.block?.data?.cursor;return t&&t.trim()?t:void 0},options:{enabled:!!w,initialData:O,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},initialPageParam:D&&C&&C.trim()?C:void 0}),M=d(T),[N,P]=f(!1);l(()=>{P(!0)},[]);let F=u(()=>{let e=[...M.current];if(!N)return e;let t=[...e],n=k?.pages;if(n&&n.length>1)for(let e=1;e<n.length;e++){let r=n[e].data?.block?.data?.videos||[];t.push(...r)}return t},[N,k?.pages]),I=u(()=>n(F,`view-duration`),[F]);return m(i,{children:[S&&p(o,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[10px] px-[12px]`,children:S}),p(a,{loadMore:()=>A().then(()=>void 0),hasMore:j===!0||j===void 0&&!!C&&T.length>0,initialLoad:!0,rootId:`app-scroll-container`,threshold:1e3,className:``,children:p(s,{props:{cardSpec:b,gap:x},data:I,styles:E})})]})}export{_ as default};
2
+ "use client";import{CardSpec as e}from"../../../../../utils/constants/card-spec.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{transformContentListToCardItems as n}from"../../../../../utils/transformers/card-grid.mjs";import{gContentGetAppChannelBlockData as r}from"../../../../../../../service/generated/client.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{InfiniteScroll as a}from"../../../../../../ui/infinite-scroll.mjs";import{Text as o}from"../../../../../../ui/text.mjs";import{usePaginated as s}from"../../../../../../../hooks/query/use-query.mjs";import c from"../../../../../basics/card-layout/runtime/client.mjs";import{useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={},g={list:[],title:``,cursor:``,block_id:``};function _({props:_=h,styles:v,data:y=g}){let b=e.V2_LARGE,{gap:x=8}=_||{},{title:S,cursor:C,block_id:w,list:T}=y,E=v?t(v,{}):void 0,D=T&&T.length>0,O=u(()=>{if(!D)return;let e=C&&C.trim()?C:void 0;return{pages:[{data:{block:{data:{videos:T,cursor:C||``}}}}],pageParams:[e]}},[D,T,C]),{data:k,fetchNextPage:A,hasNextPage:j}=s({key:[`card-grid-2x3-infinite`,w],queryFn:e=>r({block_id:w,cursor:e||void 0,page_size:20}),getNextPageParam:e=>{let t=e.data?.block?.data?.cursor;return t&&t.trim()?t:void 0},options:{enabled:!!w,initialData:O,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},initialPageParam:D&&C&&C.trim()?C:void 0}),M=d(T),[N,P]=f(!1);l(()=>{P(!0)},[]);let F=u(()=>{let e=[...M.current];if(!N)return e;let t=[...e],n=k?.pages;if(n&&n.length>1)for(let e=1;e<n.length;e++){let r=n[e].data?.block?.data?.videos||[];t.push(...r)}return t},[N,k?.pages]),I=u(()=>n(F,`view-duration`),[F]);return m(i,{children:[S&&p(o,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[10px] px-[12px]`,children:S}),p(a,{loadMore:()=>A().then(()=>void 0),hasMore:j===!0||j===void 0&&!!C&&T.length>0,initialLoad:!0,rootId:`app-scroll-container`,threshold:1e3,className:``,children:p(c,{props:{cardSpec:b,gap:x},data:I,styles:E})})]})}export{_ as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{CardSpec as e}from"../../../../../utils/constants/card-spec.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{transformContentListToCardItems as n}from"../../../../../utils/transformers/card-grid.mjs";import{gContentGetAppChannelBlockData as r}from"../../../../../../../service/generated/client.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{InfiniteScroll as a}from"../../../../../../ui/infinite-scroll.mjs";import{Text as o}from"../../../../../../ui/text.mjs";import s from"../../../../../basics/card-layout/runtime/client.mjs";import{usePaginated as c}from"../../../../../../../hooks/query/use-query.mjs";import{useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={},g={list:[],title:``,cursor:``,block_id:``};function _({props:_=h,styles:v,data:y=g}){let b=e.V3_SMALL,{gap:x=8}=_||{},{title:S,cursor:C,block_id:w,list:T}=y,E=v?t(v,{}):void 0,D=T&&T.length>0,O=u(()=>{if(!D)return;let e=C&&C.trim()?C:void 0;return{pages:[{data:{block:{data:{videos:T,cursor:C||``}}}}],pageParams:[e]}},[D,T,C]),{data:k,fetchNextPage:A,hasNextPage:j}=c({key:[`card-grid-3x3-infinite`,w],queryFn:e=>r({block_id:w,cursor:e||void 0,page_size:21}),getNextPageParam:e=>{let t=e.data?.block?.data?.cursor;return t&&t.trim()?t:void 0},options:{enabled:!!w,initialData:O,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},initialPageParam:D&&C&&C.trim()?C:void 0}),M=d(T),[N,P]=f(!1);l(()=>{P(!0)},[]);let F=u(()=>{let e=[...M.current];if(!N)return e;let t=[...e],n=k?.pages;if(n&&n.length>1)for(let e=1;e<n.length;e++){let r=n[e].data?.block?.data?.videos||[];t.push(...r)}return t},[N,k?.pages]),I=u(()=>n(F,`view-duration`),[F]);return m(i,{children:[S&&p(o,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[10px] px-[12px]`,children:S}),p(a,{loadMore:()=>A().then(()=>void 0),hasMore:j===!0||j===void 0&&!!C&&T.length>0,className:``,initialLoad:!0,rootId:`app-scroll-container`,threshold:1e3,children:p(s,{props:{cardSpec:b,gap:x},data:I,styles:E})})]})}export{_ as default};
2
+ "use client";import{CardSpec as e}from"../../../../../utils/constants/card-spec.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{transformContentListToCardItems as n}from"../../../../../utils/transformers/card-grid.mjs";import{gContentGetAppChannelBlockData as r}from"../../../../../../../service/generated/client.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{InfiniteScroll as a}from"../../../../../../ui/infinite-scroll.mjs";import{Text as o}from"../../../../../../ui/text.mjs";import{usePaginated as s}from"../../../../../../../hooks/query/use-query.mjs";import c from"../../../../../basics/card-layout/runtime/client.mjs";import{useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={},g={list:[],title:``,cursor:``,block_id:``};function _({props:_=h,styles:v,data:y=g}){let b=e.V3_SMALL,{gap:x=8}=_||{},{title:S,cursor:C,block_id:w,list:T}=y,E=v?t(v,{}):void 0,D=T&&T.length>0,O=u(()=>{if(!D)return;let e=C&&C.trim()?C:void 0;return{pages:[{data:{block:{data:{videos:T,cursor:C||``}}}}],pageParams:[e]}},[D,T,C]),{data:k,fetchNextPage:A,hasNextPage:j}=s({key:[`card-grid-3x3-infinite`,w],queryFn:e=>r({block_id:w,cursor:e||void 0,page_size:21}),getNextPageParam:e=>{let t=e.data?.block?.data?.cursor;return t&&t.trim()?t:void 0},options:{enabled:!!w,initialData:O,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},initialPageParam:D&&C&&C.trim()?C:void 0}),M=d(T),[N,P]=f(!1);l(()=>{P(!0)},[]);let F=u(()=>{let e=[...M.current];if(!N)return e;let t=[...e],n=k?.pages;if(n&&n.length>1)for(let e=1;e<n.length;e++){let r=n[e].data?.block?.data?.videos||[];t.push(...r)}return t},[N,k?.pages]),I=u(()=>n(F,`view-duration`),[F]);return m(i,{children:[S&&p(o,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[10px] px-[12px]`,children:S}),p(a,{loadMore:()=>A().then(()=>void 0),hasMore:j===!0||j===void 0&&!!C&&T.length>0,className:``,initialLoad:!0,rootId:`app-scroll-container`,threshold:1e3,children:p(c,{props:{cardSpec:b,gap:x},data:I,styles:E})})]})}export{_ as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a,{loadHiddenChannelIdsFromStorage as o}from"./channel-filter-dialog.mjs";import{defaultProps as s}from"./default-props.mjs";import{clsx as c}from"clsx";import{useEffect as l,useMemo as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";const h={};function g(e,t){return t===0?`/`:`${r.CHANNEL}/${encodeURIComponent(e.name)}`}function _(r){let{mode:_=`renderer`,styles:v,events:y,...b}=r,x=_===`editor`,S=b||h,C={...s,...S},[w,T]=d(!1),{isSticky:E,ref:D}=i(),[O,k]=d(C.list),A=u(()=>C.list.find(e=>e.isDefault)?.name??null,[C.list]),j=u(()=>C.currentChannelId??A,[C.currentChannelId,A]);l(()=>{let e=o();k(e?.length?C.list.filter(t=>!e.includes(t.name)):C.list)},[C.list]);let M=e=>{k(e)},N=(e,t)=>{y?.onChannelChange?.(e,t)},P=v?e(v,{}):void 0;return m(f,{children:[E&&p(t,{className:`w-full h-11`}),p(t,{as:`nav`,ref:D,className:c(`w-full transition-all duration-200`,x&&`pointer-events-none`,!C.isFullfeed&&E&&`fixed top-0 left-0 right-0 z-50`,C.isFullfeed&&`fixed top-[54px] left-0 z-10 w-full`,!C.isFullfeed&&`bg-bg1`),style:P,children:p(t,{className:`relative flex items-center h-[44px]`,children:p(t,{className:`flex-1 overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:p(t,{className:`flex items-center h-full w-4 h-4 gap-4`,children:O.map((e,t)=>{let r=j===e.name||j===null&&t===0;return p(n,{href:g(e,t),className:c(`whitespace-nowrap cursor-pointer transition-all duration-200`,`flex items-center justify-center h-11`,`${r?`text-xl`:`text-base`}`),style:{fontWeight:r?`bold`:`normal`,color:r?`var(--color-theme5)`:`var(--color-text2)`},onClick:()=>N(e,t),children:e.name},e.name||`channel-${t}`)})})})})}),p(a,{open:w,onOpenChange:T,channels:C.list,currentChannelId:j,onChannelClick:N,onChannelsChange:M})]})}export{_ as default};
2
+ "use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a from"../../../../assets/icons/filter_dark.mjs";import o,{loadHiddenChannelIdsFromStorage as s}from"./channel-filter-dialog.mjs";import{defaultProps as c}from"./default-props.mjs";import{clsx as l}from"clsx";import{useEffect as u,useMemo as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";const g={};function _(e,t){return t===0?`/`:`${r.CHANNEL}/${encodeURIComponent(e.name)}`}function v(r){let{mode:v=`renderer`,styles:y,events:b,...x}=r,S=v===`editor`,C=x||g,w={...c,...C},[T,E]=f(!1),{isSticky:D,ref:O}=i(),[k,A]=f(w.list),j=d(()=>w.list.find(e=>e.isDefault)?.name??null,[w.list]),M=d(()=>w.currentChannelId??j,[w.currentChannelId,j]);u(()=>{let e=s();A(e?.length?w.list.filter(t=>!e.includes(t.name)):w.list)},[w.list]);let N=e=>{A(e)},P=(e,t)=>{b?.onChannelChange?.(e,t)},F=y?e(y,{}):void 0;return h(p,{children:[D&&m(t,{className:`w-full h-11`}),m(t,{as:`nav`,ref:O,className:l(`w-full transition-all duration-200`,S&&`pointer-events-none`,!w.isFullfeed&&D&&`fixed top-0 left-0 right-0 z-50`,w.isFullfeed&&`fixed top-[54px] left-0 z-10 w-full`,!w.isFullfeed&&`bg-bg1`),style:F,children:h(t,{className:`relative flex items-center h-[44px]`,children:[m(t,{className:`flex-1 overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:m(t,{className:`flex items-center h-full w-4 h-4 gap-4`,children:k.map((e,t)=>{let r=M===e.name||M===null&&t===0;return m(n,{href:_(e,t),className:l(`whitespace-nowrap cursor-pointer transition-all duration-200`,`flex items-center justify-center h-11`,`${r?`text-xl`:`text-base`}`),style:{fontWeight:r?`bold`:`normal`,color:r?`var(--color-theme5)`:`var(--color-text2)`},onClick:()=>P(e,t),children:e.name},e.name||`channel-${t}`)})})}),r.filterable?m(t,{className:`flex items-center gap-[12px] px-[8px]`,children:m(t,{className:`flex items-center justify-center cursor-pointer w-7 h-8`,onClick:()=>{E(!0),b?.onFilterClick?.()},children:m(a,{className:`w-5 h-5`,style:{color:`var(--color-text1)`}})})}):null]})}),m(o,{open:T,onOpenChange:E,channels:w.list,currentChannelId:M,onChannelClick:P,onChannelsChange:N})]})}export{v as default};
@@ -8,6 +8,7 @@ import * as zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region components/biz/business/channel-list/material.d.ts
10
10
  declare const channelListMaterial: DefineMaterialOption<typeof BasicChannelListClient, typeof BasicChannelListClient, zod.ZodObject<{
11
+ filterable: zod.ZodBoolean & SchemaHasDefaultValue;
11
12
  list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
12
13
  name: zod.ZodOptional<zod.ZodString>;
13
14
  icon: zod.ZodOptional<zod.ZodString>;
@@ -10,6 +10,7 @@ import z$1 from "zod";
10
10
  * 定义可以被低代码右侧inspector编辑的props
11
11
  */
12
12
  declare const channelListInspectorPropsSchema: z$1.ZodObject<{
13
+ filterable: z$1.ZodBoolean & SchemaHasDefaultValue;
13
14
  list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
14
15
  name: z$1.ZodOptional<z$1.ZodString>;
15
16
  icon: z$1.ZodOptional<z$1.ZodString>;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({list:e(a.object({name:r({label:`内容标题`,required:!1}),icon:r({label:`图标`,required:!1}),isDefault:n({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});i(o);export{o as channelListInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({filterable:n({label:`是否显示筛选`,defaultValue:!0}),list:e(a.object({name:r({label:`内容标题`,required:!1}),icon:r({label:`图标`,required:!1}),isDefault:n({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});i(o);export{o as channelListInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../utils/cn.mjs";import{debounceFun as t,getCurrentSecondTime as n,parseTextAtUserIds as r,replaceAtUserElement as i}from"../../../../utils/common.mjs";import{useUserStore as a}from"../../../../store/modules/user-store.mjs";import{gCommunityGetComments as o,pCommunityCreateComment as s,pCommunityDislikeComment as c,pCommunityLikeComment as l}from"../../../../service/generated/client.mjs";import{Box as u}from"../../../ui/box.mjs";import{InfiniteScroll as ee}from"../../../ui/infinite-scroll.mjs";import{Text as d}from"../../../ui/text.mjs";import{useDeleteRequest as te}from"../../../../hooks/query/use-query.mjs";import{useLoginModalStore as ne}from"../../../../store/modules/login-modal-store.mjs";import{useLikeDislike as re}from"../../../../hooks/use-like-dislike.mjs";import{useKeepAliveEffect as ie,useKeepAliveState as f}from"../../../common/keep-scroll-position/index.mjs";import{isMobileIOS as ae}from"../../../../utils/tools.mjs";import{MediaPreview as oe}from"../../../common/media-preview/index.mjs";import{mapApiCommentToComment as p}from"../../../../types/safe-comment.mjs";import se from"../../../../assets/icons/common/solid-arrow.mjs";import ce from"./comment-input.mjs";import{CommentItem as le}from"./comment-item.mjs";import ue from"./reply-detail.mjs";import{memo as m,useCallback as h,useEffect as de,useMemo as g,useRef as fe,useState as pe}from"react";import{Fragment as me,jsx as _,jsxs as v}from"react/jsx-runtime";import{toast as he}from"sonner";import{useTranslations as ge}from"next-intl";const _e=t(e=>{e()},0),ve=t(e=>{e()},10),ye=t(e=>{try{l({comment_id:e.id,is_like:e.like_flag!==`1`},{revalidate:!1})}catch(e){console.error(`点赞评论失败:`,e)}},200),be=t(e=>{try{c({comment_id:e.id,is_dislike:e.like_flag!==`2`},{revalidate:!1})}catch(e){console.error(`点踩评论失败:`,e)}},200);function xe(e){if(e==null)return 0;let t=typeof e==`number`?e:Number(e);if(!Number.isNaN(t)&&t>0)return t>0xe8d4a51000?Math.floor(t/1e3):Math.floor(t);let n=Date.parse(String(e));return Number.isNaN(n)?0:Math.floor(n/1e3)}function y(e,t,n){let r=[];return Array.isArray(n)&&n.length>0?(n.forEach(e=>{let t=!!e?.is_video,n=String(e?.media_url||``),i=String(e?.cover_image||``);!n&&!i||r.push({cover_image:i,cover_image_thumbnail:i,cover_image_radio:1,cover_image_resolution:String(e?.cover_image_resolution||``),image_url:t?``:n,image_thumbnail:t?``:n,image_radio:1,image_resolution:String(e?.image_resolution||``),is_video:t,resolution:String(e?.video_resolution||``),video_duration:Number(e?.video_duration||0),video_url:t?n:``,video_size:Number(e?.video_size||0),video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r):(e?.length&&e.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:e,image_thumbnail:e,image_radio:1,image_resolution:``,is_video:!1,resolution:``,video_duration:0,video_url:``,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),t?.length&&t.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:``,image_thumbnail:``,image_radio:1,image_resolution:``,is_video:!0,resolution:``,video_duration:0,video_url:e,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r)}function Se(e){let t=typeof e.reply_count==`number`?e.reply_count:0,n=Array.isArray(e.sub_comments)?e.sub_comments.length:0,r=t>0?t:n,i=e.is_liked?`1`:e.is_dislike?`2`:`0`,a=b(e.mentioned_users),o=a.length>0?a:Ce(e.content||``),s=String(e.comment_id??e.id??``),c=typeof e.like_count==`number`?e.like_count:0,l=e.is_liked&&c===0?1:c;return p({id:s,reply_cnt:r.toString(),like_cnt:l,dislike_cnt:0,created_at:xe(e.create_time),text:e.content||``,type:`4`,like_flag:i,user_id:e.user_id||``,user_name:e.user?.nickname||e.user?.username||``,avatar:e.user?.avatar_url||``,files:[],at_users:o,nine_grid_content_info:y(e?.images,e?.videos,e?.medias),is_follow:!1})}function b(e){return Array.isArray(e)?e.map(e=>({user_id:e.user_id||``,name:e.nickname||e.username||``,avatar:e.avatar_url||``,birthday:``,signature:e.signature||``})):[]}function Ce(e){if(!e)return[];let t=new Map,n=/<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g,r;for(;(r=n.exec(e))!==null;){let e=r[1]?String(r[1]):``,n=(r[2]?String(r[2]):``).replace(/^@/,``)||e;!e||t.has(e)||t.set(e,{user_id:e,name:n,avatar:``,birthday:``,signature:``})}if(t.size>0)return Array.from(t.values());let i=/<@_user>(\w+)<\/@_user>/g;for(;(r=i.exec(e))!==null;){let e=r[1]?String(r[1]):``;!e||t.has(e)||t.set(e,{user_id:e,name:e,avatar:``,birthday:``,signature:``})}return Array.from(t.values())}function we(e){return!Array.isArray(e)||e.length===0?[]:e.map(e=>{let t=!!e.is_video,n=t?String(e.video_url||``):String(e.image_url||e.cover_image||``),r=String(e.cover_image||e.image_url||``);return{media_url:n,is_video:t,image_resolution:String(e.image_resolution||``),cover_image:r,cover_image_resolution:String(e.cover_image_resolution||``),video_resolution:String(e.resolution||``),video_duration:Number(e.video_duration||0),video_size:Number(e.video_size||0)}}).filter(e=>!!e.media_url)}const x=m(({information:t,listQueryKey:c,contentId:l,contentType:m,isShow:xe=!0,isClickLoad:y=!1,initialComments:b,initialTotal:x,initialHasMore:S,addCommentCount:Te,onCommentAdded:Ee,onRequireLogin:C,onTotalChange:w,onReplyDetailVisibleChange:T,className:De})=>{let{userInfo:E,userId:Oe,isLogin:D}=a(),{open:ke}=ne(),O=ge(`components.biz.business.comment`),Ae=Te??Ee??(()=>{});function je(e){if(!e)return``;if(Array.isArray(e))return String(e[0]||``);if(typeof e==`object`){if(Object.prototype.hasOwnProperty.call(e,`comment_id`))return String(e.comment_id??``);if(Array.isArray(e.data))return String(e.data[0]||``)}return``}let k=h(()=>{C?C():ke()},[C,ke]),A=y?5:20,j=g(()=>b?.length?b.map(Se):[],[b]),M=b!==void 0||typeof x==`number`||typeof S==`boolean`,Me=g(()=>typeof S==`boolean`?S:typeof x==`number`?j.length<x:M?j.length===0?!1:j.length>=A:!0,[M,S,j.length,x,A]),[N,P]=f(`info-detail-comment-list-${l}`,j),[F,I]=f(`info-detail-comment-list-has-more-${l}`,Me),[L,Ne]=f(`info-comment-detail-page-${l}`,j.length>0?2:1),[Pe,R]=f(`info-detail-comment-list-loading-${l}`,!1),[z,B]=f(`info-detail-selected-comment-${l}`,p({id:``,user_id:``})),[V,H]=f(`info-detail-reply-detail-visible-${l}`,!1),[U,W]=pe(!1),G=fe(null),K=h(e=>{typeof window>`u`||window.dispatchEvent(new CustomEvent(`funhub:comment-reply-detail-visible-change`,{detail:{visible:e}}))},[]);de(()=>{K(V),T?.(V)},[K,T,V]),de(()=>()=>{K(!1),T?.(!1)},[K,T]);let q=g(()=>Pe||F&&N.length===0?O(`commentList.loading`):N.length>0&&!F?O(`commentList.noMore`):N.length===0&&!F?O(`commentList.emptyPrompt`):``,[N.length,F,Pe,O]),Fe=g(()=>U?`回复@${z.user_name}`:``,[U,z.user_name]),{getLikedListData:Ie,getDislikedListData:J}=re(),Le=h(()=>{P(e=>e.map(e=>e.id===z.id?{...e,reply_cnt:(Number(e.reply_cnt||0)+1).toString()}:e)),B(e=>({...e,reply_cnt:(Number(e.reply_cnt||0)+1).toString()}))},[z.id,P,B]),Y=h(async()=>{if(l)try{let e=await o({content_id:l,page:L,page_size:A,sort_by:`latest`});if(e.code!==0)throw Error(e.message||O(`commentList.fetchCommentsFailed`));let t=(e.data?.data?.comments??[]).map(Se),n=e.data?.data?.total??0;L===1&&w&&w(n),((e.data?.data?.has_more??!1)===!1||t.length<A)&&I(!1),P(e=>{let n=new Set(e.map(e=>e.id)),r=t.filter(e=>!n.has(e.id));return[...e,...r]}),Ne(L+1)}catch(e){console.error(`获取评论列表失败:`,e),I(!1)}},[l,L,A,P,I,Ne]),X=h(async()=>{R(!0);try{await Y()}catch(e){console.error(`获取评论列表失败:`,e)}R(!1)},[Y,R]);ie(()=>{y&&!M&&X()},[M,y,X],`info-detail-comment-initial-load-more-${l}`),ie(()=>{!M||!w||typeof x==`number`&&w(x)},[M,x,w],`info-detail-comment-initial-total-${l}`);function Re(){_e(()=>{W(!1)})}async function ze({text:e,imageVideoInfoList:t}){try{if(!D)return k(),{success:!1,message:O(`commentList.loginRequired`)};let a=E?.userId||E?.user_id||Oe||``;if(!a)return k(),{success:!1,message:O(`commentList.loginRequired`)};let o=E?.nick_name||E?.nickname||E?.name||E?.user_name||E?.username||``,c=E?.avatar||E?.avatar_url||``,u=we(t),ee=r(e),d=await s({content_id:l,content:i(e),medias:u,mentioned_users:ee,source_type:m===`video`?1:2},{revalidate:!1});if(d.code===0){let r=je(d.data);if(!r||r===`0`)return{success:!1,message:O(`commentList.publishCommentFailed`)};let i=Ce(e),s=p({text:e,id:r,avatar:c,user_id:a,user_name:o,like_cnt:d.data.like_count,created_at:n(),nine_grid_content_info:t,at_users:i});return P(e=>[s,...e]),{success:!0}}else return{success:!1,message:d.message||O(`commentList.publishCommentFailed`)}}catch(e){return console.error(e),{success:!1,message:O(`commentList.publishCommentFailed`)}}}let Z=h(async({text:e,imageVideoInfoList:t,callback:n})=>{try{if(!D)return k(),{success:!1,message:O(`commentList.loginRequired`)};if(!z?.id||z.id===`0`)return{success:!1,message:O(`commentList.invalidReplyTarget`)};let a=we(t),o=r(e),c=await s({content_id:l,content:i(e),medias:a,mentioned_users:o,parent_id:z.id,source_type:m===`video`?1:2},{revalidate:!1});if(c.code!==0)return{success:!1,message:c.message||O(`commentList.publishReplyFailed`)};P(e=>e.map(e=>e.id===z.id?{...e,reply_cnt:(Number(e.reply_cnt)+1).toString()}:e));let u=je(c.data);return!u||u===`0`?{success:!1,message:O(`commentList.publishReplyFailed`)}:(n?.(u),{success:!0})}catch(e){return console.error(`发布回复评论失败:`,e),{success:!1,message:O(`commentList.publishReplyFailed`)}}},[l,m,D,k,z.id,P,O]);async function Be({text:e,imageVideoInfoList:t}){let n=e=>e.success?e:(he.error(e.message||O(`commentList.publishCommentFailed`)),{...e,toastHandled:!0});if(U){let r=await Z({text:e,imageVideoInfoList:t,callback:e=>{}});return W(!1),n(r)}else{let r=await ze({text:e,imageVideoInfoList:t});return r.success&&Ae(),W(!1),n(r)}}let Q=h(e=>{B(e),ae()&&G.current?.focus(),ve(()=>{W(!0),G.current?.focus()})},[B]),$=h(e=>{B(e),H(!0)},[H,B]),Ve=h(e=>{if(e.reply_cnt===`0`){Q(e);return}$(e)},[Q,$]),He=h(e=>{if(!D){C?.();return}P(Ie(N,e.id)),ye(e)},[N,Ie,D,C,P]),Ue=h(e=>{if(!D){C?.();return}e.like_flag!==`2`&&he.message(O(`commentList.dislikeHint`)),P(J(N,e.id)),be(e)},[N,J,D,C,P,O]),We=te();function Ge(){c&&We(c),H(!1)}return v(me,{children:[v(u,{className:e(`w-full pb-[60px]`,De),children:[N.map((e,t)=>_(le,{comment:e,onReply:Q,onViewReplies:$,onReplyAction:Ve,onLike:He,onDislike:Ue,isLogin:D,onRequireLogin:k},`${e.id}-${t}-comment`)),xe&&_(ee,{loadMore:async()=>{await Y()},hasMore:F,initialLoad:!y&&N.length===0&&F!==!1}),y&&v(u,{className:`w-full my-[8px]`,children:[!q&&v(u,{className:`w-[fit-content] h-[42px] flex items-center justify-center mx-[auto]`,onClick:()=>{X()},children:[_(d,{className:`text-text3 text-[14px]`,children:O(`commentList.viewMore`)}),_(se,{className:`w-[8px] h-[auto] ml-[4px] text-text3`})]}),q&&_(u,{className:`w-full h-[42px] flex items-center justify-center`,children:_(d,{className:`text-text3 text-[12px]`,children:q})})]}),_(ce,{placeholder:Fe,onPublish:({text:e,imageVideoInfoList:t})=>Be({text:e,imageVideoInfoList:t}),onInputBlur:Re,onRequireLogin:k,ref:G})]}),_(ue,{visible:V,comment:z,information:t,contentType:m,onClose:Ge,onReplyComment:Z,onReplyAdded:Le,onRequireLogin:k},z.id),_(oe,{})]})});export{x as default};
2
+ "use client";import{cn as e}from"../../../../utils/cn.mjs";import{debounceFun as t,getCurrentSecondTime as n,parseTextAtUserIds as r,replaceAtUserElement as i}from"../../../../utils/common.mjs";import{useUserStore as a}from"../../../../store/modules/user-store.mjs";import{gCommunityGetComments as o,pCommunityCreateComment as s,pCommunityDislikeComment as c,pCommunityLikeComment as l}from"../../../../service/generated/client.mjs";import{Box as u}from"../../../ui/box.mjs";import{InfiniteScroll as ee}from"../../../ui/infinite-scroll.mjs";import{Text as d}from"../../../ui/text.mjs";import{useLoginModalStore as te}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as ne}from"../../../../hooks/query/use-query.mjs";import{useLikeDislike as re}from"../../../../hooks/use-like-dislike.mjs";import{useKeepAliveEffect as ie,useKeepAliveState as f}from"../../../common/keep-scroll-position/index.mjs";import{isMobileIOS as ae}from"../../../../utils/tools.mjs";import{MediaPreview as oe}from"../../../common/media-preview/index.mjs";import{mapApiCommentToComment as p}from"../../../../types/safe-comment.mjs";import se from"../../../../assets/icons/common/solid-arrow.mjs";import ce from"./comment-input.mjs";import{CommentItem as le}from"./comment-item.mjs";import ue from"./reply-detail.mjs";import{memo as m,useCallback as h,useEffect as de,useMemo as g,useRef as fe,useState as pe}from"react";import{Fragment as me,jsx as _,jsxs as v}from"react/jsx-runtime";import{toast as he}from"sonner";import{useTranslations as ge}from"next-intl";const _e=t(e=>{e()},0),ve=t(e=>{e()},10),ye=t(e=>{try{l({comment_id:e.id,is_like:e.like_flag!==`1`},{revalidate:!1})}catch(e){console.error(`点赞评论失败:`,e)}},200),be=t(e=>{try{c({comment_id:e.id,is_dislike:e.like_flag!==`2`},{revalidate:!1})}catch(e){console.error(`点踩评论失败:`,e)}},200);function xe(e){if(e==null)return 0;let t=typeof e==`number`?e:Number(e);if(!Number.isNaN(t)&&t>0)return t>0xe8d4a51000?Math.floor(t/1e3):Math.floor(t);let n=Date.parse(String(e));return Number.isNaN(n)?0:Math.floor(n/1e3)}function y(e,t,n){let r=[];return Array.isArray(n)&&n.length>0?(n.forEach(e=>{let t=!!e?.is_video,n=String(e?.media_url||``),i=String(e?.cover_image||``);!n&&!i||r.push({cover_image:i,cover_image_thumbnail:i,cover_image_radio:1,cover_image_resolution:String(e?.cover_image_resolution||``),image_url:t?``:n,image_thumbnail:t?``:n,image_radio:1,image_resolution:String(e?.image_resolution||``),is_video:t,resolution:String(e?.video_resolution||``),video_duration:Number(e?.video_duration||0),video_url:t?n:``,video_size:Number(e?.video_size||0),video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r):(e?.length&&e.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:e,image_thumbnail:e,image_radio:1,image_resolution:``,is_video:!1,resolution:``,video_duration:0,video_url:``,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),t?.length&&t.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:``,image_thumbnail:``,image_radio:1,image_resolution:``,is_video:!0,resolution:``,video_duration:0,video_url:e,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r)}function Se(e){let t=typeof e.reply_count==`number`?e.reply_count:0,n=Array.isArray(e.sub_comments)?e.sub_comments.length:0,r=t>0?t:n,i=e.is_liked?`1`:e.is_dislike?`2`:`0`,a=b(e.mentioned_users),o=a.length>0?a:Ce(e.content||``),s=String(e.comment_id??e.id??``),c=typeof e.like_count==`number`?e.like_count:0,l=e.is_liked&&c===0?1:c;return p({id:s,reply_cnt:r.toString(),like_cnt:l,dislike_cnt:0,created_at:xe(e.create_time),text:e.content||``,type:`4`,like_flag:i,user_id:e.user_id||``,user_name:e.user?.nickname||e.user?.username||``,avatar:e.user?.avatar_url||``,files:[],at_users:o,nine_grid_content_info:y(e?.images,e?.videos,e?.medias),is_follow:!1})}function b(e){return Array.isArray(e)?e.map(e=>({user_id:e.user_id||``,name:e.nickname||e.username||``,avatar:e.avatar_url||``,birthday:``,signature:e.signature||``})):[]}function Ce(e){if(!e)return[];let t=new Map,n=/<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g,r;for(;(r=n.exec(e))!==null;){let e=r[1]?String(r[1]):``,n=(r[2]?String(r[2]):``).replace(/^@/,``)||e;!e||t.has(e)||t.set(e,{user_id:e,name:n,avatar:``,birthday:``,signature:``})}if(t.size>0)return Array.from(t.values());let i=/<@_user>(\w+)<\/@_user>/g;for(;(r=i.exec(e))!==null;){let e=r[1]?String(r[1]):``;!e||t.has(e)||t.set(e,{user_id:e,name:e,avatar:``,birthday:``,signature:``})}return Array.from(t.values())}function we(e){return!Array.isArray(e)||e.length===0?[]:e.map(e=>{let t=!!e.is_video,n=t?String(e.video_url||``):String(e.image_url||e.cover_image||``),r=String(e.cover_image||e.image_url||``);return{media_url:n,is_video:t,image_resolution:String(e.image_resolution||``),cover_image:r,cover_image_resolution:String(e.cover_image_resolution||``),video_resolution:String(e.resolution||``),video_duration:Number(e.video_duration||0),video_size:Number(e.video_size||0)}}).filter(e=>!!e.media_url)}const x=m(({information:t,listQueryKey:c,contentId:l,contentType:m,isShow:xe=!0,isClickLoad:y=!1,initialComments:b,initialTotal:x,initialHasMore:S,addCommentCount:Te,onCommentAdded:Ee,onRequireLogin:C,onTotalChange:w,onReplyDetailVisibleChange:T,className:De})=>{let{userInfo:E,userId:Oe,isLogin:D}=a(),{open:ke}=te(),O=ge(`components.biz.business.comment`),Ae=Te??Ee??(()=>{});function je(e){if(!e)return``;if(Array.isArray(e))return String(e[0]||``);if(typeof e==`object`){if(Object.prototype.hasOwnProperty.call(e,`comment_id`))return String(e.comment_id??``);if(Array.isArray(e.data))return String(e.data[0]||``)}return``}let k=h(()=>{C?C():ke()},[C,ke]),A=y?5:20,j=g(()=>b?.length?b.map(Se):[],[b]),M=b!==void 0||typeof x==`number`||typeof S==`boolean`,Me=g(()=>typeof S==`boolean`?S:typeof x==`number`?j.length<x:M?j.length===0?!1:j.length>=A:!0,[M,S,j.length,x,A]),[N,P]=f(`info-detail-comment-list-${l}`,j),[F,I]=f(`info-detail-comment-list-has-more-${l}`,Me),[L,Ne]=f(`info-comment-detail-page-${l}`,j.length>0?2:1),[Pe,R]=f(`info-detail-comment-list-loading-${l}`,!1),[z,B]=f(`info-detail-selected-comment-${l}`,p({id:``,user_id:``})),[V,H]=f(`info-detail-reply-detail-visible-${l}`,!1),[U,W]=pe(!1),G=fe(null),K=h(e=>{typeof window>`u`||window.dispatchEvent(new CustomEvent(`funhub:comment-reply-detail-visible-change`,{detail:{visible:e}}))},[]);de(()=>{K(V),T?.(V)},[K,T,V]),de(()=>()=>{K(!1),T?.(!1)},[K,T]);let q=g(()=>Pe||F&&N.length===0?O(`commentList.loading`):N.length>0&&!F?O(`commentList.noMore`):N.length===0&&!F?O(`commentList.emptyPrompt`):``,[N.length,F,Pe,O]),Fe=g(()=>U?`回复@${z.user_name}`:``,[U,z.user_name]),{getLikedListData:Ie,getDislikedListData:J}=re(),Le=h(()=>{P(e=>e.map(e=>e.id===z.id?{...e,reply_cnt:(Number(e.reply_cnt||0)+1).toString()}:e)),B(e=>({...e,reply_cnt:(Number(e.reply_cnt||0)+1).toString()}))},[z.id,P,B]),Y=h(async()=>{if(l)try{let e=await o({content_id:l,page:L,page_size:A,sort_by:`latest`});if(e.code!==0)throw Error(e.message||O(`commentList.fetchCommentsFailed`));let t=(e.data?.data?.comments??[]).map(Se),n=e.data?.data?.total??0;L===1&&w&&w(n),((e.data?.data?.has_more??!1)===!1||t.length<A)&&I(!1),P(e=>{let n=new Set(e.map(e=>e.id)),r=t.filter(e=>!n.has(e.id));return[...e,...r]}),Ne(L+1)}catch(e){console.error(`获取评论列表失败:`,e),I(!1)}},[l,L,A,P,I,Ne]),X=h(async()=>{R(!0);try{await Y()}catch(e){console.error(`获取评论列表失败:`,e)}R(!1)},[Y,R]);ie(()=>{y&&!M&&X()},[M,y,X],`info-detail-comment-initial-load-more-${l}`),ie(()=>{!M||!w||typeof x==`number`&&w(x)},[M,x,w],`info-detail-comment-initial-total-${l}`);function Re(){_e(()=>{W(!1)})}async function ze({text:e,imageVideoInfoList:t}){try{if(!D)return k(),{success:!1,message:O(`commentList.loginRequired`)};let a=E?.userId||E?.user_id||Oe||``;if(!a)return k(),{success:!1,message:O(`commentList.loginRequired`)};let o=E?.nick_name||E?.nickname||E?.name||E?.user_name||E?.username||``,c=E?.avatar||E?.avatar_url||``,u=we(t),ee=r(e),d=await s({content_id:l,content:i(e),medias:u,mentioned_users:ee,source_type:m===`video`?1:2},{revalidate:!1});if(d.code===0){let r=je(d.data);if(!r||r===`0`)return{success:!1,message:O(`commentList.publishCommentFailed`)};let i=Ce(e),s=p({text:e,id:r,avatar:c,user_id:a,user_name:o,like_cnt:d.data.like_count,created_at:n(),nine_grid_content_info:t,at_users:i});return P(e=>[s,...e]),{success:!0}}else return{success:!1,message:d.message||O(`commentList.publishCommentFailed`)}}catch(e){return console.error(e),{success:!1,message:O(`commentList.publishCommentFailed`)}}}let Z=h(async({text:e,imageVideoInfoList:t,callback:n})=>{try{if(!D)return k(),{success:!1,message:O(`commentList.loginRequired`)};if(!z?.id||z.id===`0`)return{success:!1,message:O(`commentList.invalidReplyTarget`)};let a=we(t),o=r(e),c=await s({content_id:l,content:i(e),medias:a,mentioned_users:o,parent_id:z.id,source_type:m===`video`?1:2},{revalidate:!1});if(c.code!==0)return{success:!1,message:c.message||O(`commentList.publishReplyFailed`)};P(e=>e.map(e=>e.id===z.id?{...e,reply_cnt:(Number(e.reply_cnt)+1).toString()}:e));let u=je(c.data);return!u||u===`0`?{success:!1,message:O(`commentList.publishReplyFailed`)}:(n?.(u),{success:!0})}catch(e){return console.error(`发布回复评论失败:`,e),{success:!1,message:O(`commentList.publishReplyFailed`)}}},[l,m,D,k,z.id,P,O]);async function Be({text:e,imageVideoInfoList:t}){let n=e=>e.success?e:(he.error(e.message||O(`commentList.publishCommentFailed`)),{...e,toastHandled:!0});if(U){let r=await Z({text:e,imageVideoInfoList:t,callback:e=>{}});return W(!1),n(r)}else{let r=await ze({text:e,imageVideoInfoList:t});return r.success&&Ae(),W(!1),n(r)}}let Q=h(e=>{B(e),ae()&&G.current?.focus(),ve(()=>{W(!0),G.current?.focus()})},[B]),$=h(e=>{B(e),H(!0)},[H,B]),Ve=h(e=>{if(e.reply_cnt===`0`){Q(e);return}$(e)},[Q,$]),He=h(e=>{if(!D){C?.();return}P(Ie(N,e.id)),ye(e)},[N,Ie,D,C,P]),Ue=h(e=>{if(!D){C?.();return}e.like_flag!==`2`&&he.message(O(`commentList.dislikeHint`)),P(J(N,e.id)),be(e)},[N,J,D,C,P,O]),We=ne();function Ge(){c&&We(c),H(!1)}return v(me,{children:[v(u,{className:e(`w-full pb-[60px]`,De),children:[N.map((e,t)=>_(le,{comment:e,onReply:Q,onViewReplies:$,onReplyAction:Ve,onLike:He,onDislike:Ue,isLogin:D,onRequireLogin:k},`${e.id}-${t}-comment`)),xe&&_(ee,{loadMore:async()=>{await Y()},hasMore:F,initialLoad:!y&&N.length===0&&F!==!1}),y&&v(u,{className:`w-full my-[8px]`,children:[!q&&v(u,{className:`w-[fit-content] h-[42px] flex items-center justify-center mx-[auto]`,onClick:()=>{X()},children:[_(d,{className:`text-text3 text-[14px]`,children:O(`commentList.viewMore`)}),_(se,{className:`w-[8px] h-[auto] ml-[4px] text-text3`})]}),q&&_(u,{className:`w-full h-[42px] flex items-center justify-center`,children:_(d,{className:`text-text3 text-[12px]`,children:q})})]}),_(ce,{placeholder:Fe,onPublish:({text:e,imageVideoInfoList:t})=>Be({text:e,imageVideoInfoList:t}),onInputBlur:Re,onRequireLogin:k,ref:G})]}),_(ue,{visible:V,comment:z,information:t,contentType:m,onClose:Ge,onReplyComment:Z,onReplyAdded:Le,onRequireLogin:k},z.id),_(oe,{})]})});export{x as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useDeleteRequest as r}from"../../../../hooks/query/use-query.mjs";import{useLoginModalStore as i}from"../../../../store/modules/login-modal-store.mjs";import{debounceFun as a}from"../../../../utils/tools.mjs";import o from"../../../common/interaction-animations.module.mjs";import s from"../../../common/collection-popup/index.mjs";import{useContentOperate as c}from"../../../../hooks/use-content-operate.mjs";import l from"../../../../assets/icons/detail/check-ok.mjs";import u from"../../../../assets/icons/detail/collect_nor.mjs";import d from"../../../../assets/icons/detail/collect_sel.mjs";import f from"../../../../assets/icons/detail/give_like.mjs";import p from"../../../../assets/icons/detail/give_like_sel.mjs";import m from"../../../../assets/icons/detail/share.mjs";import{useCallback as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as S}from"next-intl";function C({mode:C=`renderer`,information:E,onUpdate:D}){let O=C===`editor`||!E?.id||E.id.startsWith(`preview-`),k=S(`components.biz.business.detail`),[A,j]=v(!1),[M,N]=v(!1),P=_(0),F=e(e=>e.userId),I=e(e=>e.isLogin),L=r(),R=h(()=>{F&&(L([`user-profile`,`mine`,F,`user-like-video`]),L([`user-profile`,`mine`,F,`user-like-post`]),L([`user-profile`,`mine`,F,`user-collect-video`,F]),L([`user-profile`,`mine`,F,`user-collect-post`,F]))},[L,F]),{likeAnimation:z,handleLikeOperate:B,handleDefaultCollectionOperate:V,handleShareOperate:H}=c({id:E.id,isLike:E.like||!1,isDislike:E.dislike||!1,isCollect:E.collect||!1,likeCnt:T(E.static?.like_cnt),dislikeCnt:T(E.static?.dislike_cnt),contentType:E.content_type,prefetchDefaultCollection:!O,animationClasses:{like:o.likeShakeAnimation,dislike:o.dislikeShakeAnimation}}),U=h(e=>{D?.({...e})},[D]),W=h(async()=>{if(A)return;if(!I){i.getState().open();return}let e=Date.now();if(e-P.current<300)return;P.current=e,j(!0);let t=E.like||!1,n=E.dislike||!1,r=T(E.static?.like_cnt),a=T(E.static?.dislike_cnt),o=!t,s=Math.max(0,r+(o?1:-1)),c=o?!1:n,l=o&&n?Math.max(0,a-1):a;U({like:o,dislike:c,static:{...E.static,like_cnt:s,dislike_cnt:l}});try{let e=await B();if(!e){U({like:t,dislike:n,static:{...E.static,like_cnt:r,dislike_cnt:a}});return}U({like:e.isLike,dislike:e.isDislike??c,static:{...E.static,like_cnt:e.likeCnt,dislike_cnt:e.dislikeCnt??l}}),R(),window.sensors?.track?.(`detail_like_click`,{object_id:E.id,action:e.isLike?`点赞`:`取消点赞`,like_count:e.likeCnt})}catch(e){console.error(`点赞操作失败:`,e),x.error(k(`detailOperate.operateFailed`))}finally{j(!1)}},[B,E,R,A,I,k,U]),G=g(()=>E.id,[E.id]),K=h(()=>{H(({isCollect:e})=>{U({collect:e})},G)},[H,G,U]);async function q(e){return await new Promise(e=>setTimeout(e,300)),e}let J=h(()=>{s.show({mode:`select`,onCollect:async e=>{try{await q({contentId:E.id,collectionId:e}),U({collect:!0}),R(),x.success(k(`detailOperate.modifyCollectionSuccess`))}catch(e){console.error(`修改收藏夹失败:`,e),x.error(k(`detailOperate.collectFailed`))}}})},[E.id,R,k,U]),Y=h(e=>{let t=e||k(`detailOperate.defaultCollection`);x.custom(e=>b(`div`,{className:`flex items-center justify-between gap-[16px] px-[16px] py-[12px] rounded-[12px] bg-black text-white shadow-lg min-w-[280px]`,children:[b(`div`,{className:`flex items-center gap-[10px]`,children:[y(`div`,{className:`w-[24px] h-[24px] rounded-full bg-white flex items-center justify-center`,children:y(l,{className:`w-[14px] h-[14px]`})}),b(`div`,{className:`flex items-center gap-[6px]`,children:[y(`span`,{className:`text-[14px] leading-[20px]`,children:k(`detailOperate.collectAdded`)}),y(`span`,{className:`text-[14px] leading-[20px] font-semibold`,children:t})]})]}),y(`button`,{type:`button`,className:`text-[14px] text-theme5 font-semibold`,onClick:()=>{x.dismiss(e),J()},children:k(`detailOperate.modifyCollection`)})]}))},[J,k]),X=h(async()=>{if(M)return;if(!I){i.getState().open();return}let e=E.collect||!1;N(!0),window.sensors?.track?.(`detail_fav_click`,{object_id:E.id,action:e?`取消收藏`:`收藏`});try{let t=await V({currentCollect:e,onUpdate:({isCollect:e})=>{U({collect:e})}});if(!t?.success){x.error(t?.message||k(`detailOperate.collectFailed`));return}R(),window.sensors?.track?.(`detail_fav_click`,{object_id:E.id,action:t.isCollect?`收藏`:`取消收藏`}),!e&&t.isCollect&&Y(t.collectionTitle)}catch(e){console.error(`收藏操作失败:`,e),x.error(e?.message||k(`detailOperate.collectFailed`))}finally{N(!1)}},[V,E.collect,E.id,R,M,I,Y,k,U]),Z=g(()=>a(X,300),[X]);return b(t,{className:`w-full h-[42px] mt-[16px] flex items-center justify-between ${O?`pointer-events-none`:``}`,children:[b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center ${A?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:W,children:[E.like?y(p,{className:`w-[20px] h-[20px] ${z.animationClass}`}):y(f,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:E.static?E.static.like_cnt===0?k(`detailOperate.like`):w(E.static?.like_cnt):k(`detailOperate.like`)})]}),b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center ${M?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:Z,children:[E.collect?y(d,{className:`w-[20px] h-[20px]`}):y(u,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:k(`detailOperate.collection`)})]}),b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center cursor-pointer`,onClick:K,children:[y(m,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:k(`detailOperate.share`)})]})]})}function w(e){let t=Number(e||0);return Number.isNaN(t)||t<=0?`0`:t>=1e4?`${(t/1e4).toFixed(1)}w`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function T(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}export{C as DetailOperate};
2
+ "use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useLoginModalStore as r}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as i}from"../../../../hooks/query/use-query.mjs";import{debounceFun as a}from"../../../../utils/tools.mjs";import o from"../../../common/interaction-animations.module.mjs";import s from"../../../common/collection-popup/index.mjs";import{useContentOperate as c}from"../../../../hooks/use-content-operate.mjs";import l from"../../../../assets/icons/detail/check-ok.mjs";import u from"../../../../assets/icons/detail/collect_nor.mjs";import d from"../../../../assets/icons/detail/collect_sel.mjs";import f from"../../../../assets/icons/detail/give_like.mjs";import p from"../../../../assets/icons/detail/give_like_sel.mjs";import m from"../../../../assets/icons/detail/share.mjs";import{useCallback as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as S}from"next-intl";function C({mode:C=`renderer`,information:E,onUpdate:D}){let O=C===`editor`||!E?.id||E.id.startsWith(`preview-`),k=S(`components.biz.business.detail`),[A,j]=v(!1),[M,N]=v(!1),P=_(0),F=e(e=>e.userId),I=e(e=>e.isLogin),L=i(),R=h(()=>{F&&(L([`user-profile`,`mine`,F,`user-like-video`]),L([`user-profile`,`mine`,F,`user-like-post`]),L([`user-profile`,`mine`,F,`user-collect-video`,F]),L([`user-profile`,`mine`,F,`user-collect-post`,F]))},[L,F]),{likeAnimation:z,handleLikeOperate:B,handleDefaultCollectionOperate:V,handleShareOperate:H}=c({id:E.id,isLike:E.like||!1,isDislike:E.dislike||!1,isCollect:E.collect||!1,likeCnt:T(E.static?.like_cnt),dislikeCnt:T(E.static?.dislike_cnt),contentType:E.content_type,prefetchDefaultCollection:!O,animationClasses:{like:o.likeShakeAnimation,dislike:o.dislikeShakeAnimation}}),U=h(e=>{D?.({...e})},[D]),W=h(async()=>{if(A)return;if(!I){r.getState().open();return}let e=Date.now();if(e-P.current<300)return;P.current=e,j(!0);let t=E.like||!1,n=E.dislike||!1,i=T(E.static?.like_cnt),a=T(E.static?.dislike_cnt),o=!t,s=Math.max(0,i+(o?1:-1)),c=o?!1:n,l=o&&n?Math.max(0,a-1):a;U({like:o,dislike:c,static:{...E.static,like_cnt:s,dislike_cnt:l}});try{let e=await B();if(!e){U({like:t,dislike:n,static:{...E.static,like_cnt:i,dislike_cnt:a}});return}U({like:e.isLike,dislike:e.isDislike??c,static:{...E.static,like_cnt:e.likeCnt,dislike_cnt:e.dislikeCnt??l}}),R(),window.sensors?.track?.(`detail_like_click`,{object_id:E.id,action:e.isLike?`点赞`:`取消点赞`,like_count:e.likeCnt})}catch(e){console.error(`点赞操作失败:`,e),x.error(k(`detailOperate.operateFailed`))}finally{j(!1)}},[B,E,R,A,I,k,U]),G=g(()=>E.id,[E.id]),K=h(()=>{H(({isCollect:e})=>{U({collect:e})},G)},[H,G,U]);async function q(e){return await new Promise(e=>setTimeout(e,300)),e}let J=h(()=>{s.show({mode:`select`,onCollect:async e=>{try{await q({contentId:E.id,collectionId:e}),U({collect:!0}),R(),x.success(k(`detailOperate.modifyCollectionSuccess`))}catch(e){console.error(`修改收藏夹失败:`,e),x.error(k(`detailOperate.collectFailed`))}}})},[E.id,R,k,U]),Y=h(e=>{let t=e||k(`detailOperate.defaultCollection`);x.custom(e=>b(`div`,{className:`flex items-center justify-between gap-[16px] px-[16px] py-[12px] rounded-[12px] bg-black text-white shadow-lg min-w-[280px]`,children:[b(`div`,{className:`flex items-center gap-[10px]`,children:[y(`div`,{className:`w-[24px] h-[24px] rounded-full bg-white flex items-center justify-center`,children:y(l,{className:`w-[14px] h-[14px]`})}),b(`div`,{className:`flex items-center gap-[6px]`,children:[y(`span`,{className:`text-[14px] leading-[20px]`,children:k(`detailOperate.collectAdded`)}),y(`span`,{className:`text-[14px] leading-[20px] font-semibold`,children:t})]})]}),y(`button`,{type:`button`,className:`text-[14px] text-theme5 font-semibold`,onClick:()=>{x.dismiss(e),J()},children:k(`detailOperate.modifyCollection`)})]}))},[J,k]),X=h(async()=>{if(M)return;if(!I){r.getState().open();return}let e=E.collect||!1;N(!0),window.sensors?.track?.(`detail_fav_click`,{object_id:E.id,action:e?`取消收藏`:`收藏`});try{let t=await V({currentCollect:e,onUpdate:({isCollect:e})=>{U({collect:e})}});if(!t?.success){x.error(t?.message||k(`detailOperate.collectFailed`));return}R(),window.sensors?.track?.(`detail_fav_click`,{object_id:E.id,action:t.isCollect?`收藏`:`取消收藏`}),!e&&t.isCollect&&Y(t.collectionTitle)}catch(e){console.error(`收藏操作失败:`,e),x.error(e?.message||k(`detailOperate.collectFailed`))}finally{N(!1)}},[V,E.collect,E.id,R,M,I,Y,k,U]),Z=g(()=>a(X,300),[X]);return b(t,{className:`w-full h-[42px] mt-[16px] flex items-center justify-between ${O?`pointer-events-none`:``}`,children:[b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center ${A?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:W,children:[E.like?y(p,{className:`w-[20px] h-[20px] ${z.animationClass}`}):y(f,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:E.static?E.static.like_cnt===0?k(`detailOperate.like`):w(E.static?.like_cnt):k(`detailOperate.like`)})]}),b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center ${M?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:Z,children:[E.collect?y(d,{className:`w-[20px] h-[20px]`}):y(u,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:k(`detailOperate.collection`)})]}),b(t,{className:`w-[25%] h-full flex flex-col items-center justify-center cursor-pointer`,onClick:K,children:[y(m,{className:`w-[20px] h-[20px] text-text2`}),y(n,{className:`text-[12px] text-text2 leading-[20px]`,children:k(`detailOperate.share`)})]})]})}function w(e){let t=Number(e||0);return Number.isNaN(t)||t<=0?`0`:t>=1e4?`${(t/1e4).toFixed(1)}w`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function T(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}export{C as DetailOperate};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{schema as n}from"./schema/index.mjs";var r=t;export{r as default};
2
+ import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";var r=e;export{r as default};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{schema as n}from"./schema/index.mjs";var r=t;export{r as default};
2
+ import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";var r=e;export{r as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../../../utils/styles/helpers.mjs";import{useUserStore as t}from"../../../../../../store/modules/user-store.mjs";import{gContentGetAppChannelBlockData as n}from"../../../../../../service/generated/client.mjs";import{checkFollowStatus as r}from"../../../../../../utils/follow-service.mjs";import{useKeepAliveEffect as i,useKeepAliveState as a}from"../../../../../common/keep-scroll-position/index.mjs";import{defaultProps as o}from"../../../../basics/fullscreen-feed/defaults/default-props.mjs";import{adaptFeedItemToSafeInformation as s,normalizeToFeedItem as ee}from"../../../../basics/fullscreen-feed/runtime/adapters.mjs";import{batchQueryContentInteractions as te}from"../../../../../../hooks/use-content-operate.mjs";import{buildInteractionMap as ne,collectPendingInteractionIds as re,mergeInteractionIntoFeedItems as ie}from"../../../../basics/fullscreen-feed/runtime/interaction-sync.mjs";import{useCallback as c,useEffect as l,useMemo as u,useRef as d}from"react";function f(e){return!!e&&typeof e==`object`&&(`data`in e||`props`in e||`styles`in e||`events`in e)}function p(e){let t=String(e?.content_id??e?.id??``),n=e?.author,r=Array.isArray(e?.medias)?e.medias:[],i=String(e?.content||``),a=e?.title?String(e.title):i.length>18?`${i.slice(0,18)}...`:i;return{id:t,mid:t,show_at:e?.create_time||``,name:a,img_y:e?.cover_image||``,preview_images:r,description:e?.content||``,tags:[],links:[],up_user:e?.user_id||n?.user_id||``,source_username:n?.nick_name||``,type:e?.type,is_liked:!!e?.is_liked,is_dislike:!!e?.is_dislike,is_collected:!!e?.is_collected,is_followed:!!e?.is_followed,author:n?{user_id:n.user_id||``,nick_name:n.nick_name||``,user_name:n.user_name||n.username||n.nick_name||``,avatar:n.avatar||``,is_verified:!!n.is_verified}:void 0,static:{like_cnt:e?.like_count||0,dislike_cnt:e?.dislike_count||0,comment_cnt:e?.comment_count||0,share_cnt:e?.share_count||0,browse_cnt:e?.view_count||0,collect_cnt:0}}}function m(e){let t=p(e);return t.id?{kind:`post`,id:t.id,title:t.name,content:e?.content||``,images:t.preview_images||[],originalData:t}:null}function ae(e){return!e||typeof e!=`object`?null:`kind`in e&&`originalData`in e?e:`content_id`in e||`comment_count`in e||`like_count`in e?m(e):ee(s(e))}function oe(e){if(Array.isArray(e))return e;if(!e||typeof e!=`object`)return[];let t=e.list||e.contents||e.videos||e.items;return Array.isArray(t)?t:[]}function h(s){let ee=s.data||{},f=s.styles,p=u(()=>s.events||{},[s.events]),m=s.data,h={...o,...ee},g=String(m?.block_id||m?.blockId||h.block_id||h.blockId||``),_=String(m?.app_id||h.app_id||h.appId||``)||void 0,se=m?.cursor||h.cursor,v=se==null?``:String(se),y=Number(m?.refresh_key??m?.refreshKey??h.refresh_key??h.refreshKey??0),ce=String(m?.keep_alive_key||m?.keepAliveKey||h.keep_alive_key||h.keepAliveKey||``),b=u(()=>ce||`fullscreen-feed-runtime:${_||`app`}:${g||`unknown`}`,[_,g,ce]),x=u(()=>oe(m).map(e=>ae(e)).filter(Boolean),[m]),S=u(()=>{let e=Number(h.initialActiveIndex??0);return Number.isFinite(e)?e:0},[h.initialActiveIndex]),[le,C]=a(`${b}-active-index`,S),[ue,w]=a(`${b}-user-interacted`,!1),[T,E]=a(`${b}-follow-ids`,Array.isArray(h.followIds)?h.followIds:[]),D=d(T),[O,k]=a(`${b}-items`,x),A=d(O);A.current=O;let[de,fe]=a(`${b}-refresh-key`,y),{userId:pe,userInfo:me}=t(),j=pe||me?.userId||``,[M,N]=a(`${b}-checked-interaction-ids`,{video:[],post:[]}),P=d({video:new Set(M.video),post:new Set(M.post)}),F=d(M);F.current=M;let[I,L]=a(`${b}-checked-followee-ids`,[]),R=d(new Set(I)),z=d(I);z.current=I;let B=d(new Set),V=d(!1),H=c(e=>{let t=e.originalData;return t?.author?.user_id||t?.up_user||``},[]),U=c(async()=>{if(V.current||!j||B.current.size===0)return;V.current=!0;let e=Array.from(B.current);B.current=new Set;let t=await r({app_id:0,follower_id:j,followee_ids:e});if(t.success&&t.data?.is_following_map){let n=t.data.is_following_map;k(e=>{let t=!1,r=e.map(e=>{let r=H(e);if(!r||!(r in n))return e;let i=!!n[r];return e.originalData?.is_followed===i?e:(t=!0,{...e,originalData:{...e.originalData,is_followed:i}})});return t?r:e}),E(t=>{let r=new Set(t);e.forEach(e=>{n[e]?r.add(e):r.delete(e)});let i=Array.from(r);return D.current=i,i})}V.current=!1,B.current.size>0&&U()},[H,j,E,k]),W=c(e=>{if(!j)return;let t=e.map(e=>H(e)).filter(e=>!!e);t.length!==0&&(t.forEach(e=>{R.current.has(e)||(R.current.add(e),B.current.add(e))}),B.current.size>0&&L(Array.from(R.current)),U())},[U,H,j,L]),G=c(e=>{if(e.size===0)return e;let t=new Map;return e.forEach((e,n)=>{if(!e)return;let{is_followed:r,...i}=e;t.set(n,i)}),t},[]),K=c(async e=>{if(!j)return;let{pendingVideoIds:t,pendingPostIds:n}=re(e,P.current);if(t.length===0&&n.length===0)return;N({video:Array.from(P.current.video),post:Array.from(P.current.post)});let[r,i]=await Promise.all([t.length>0?te(t,1):Promise.resolve(null),n.length>0?te(n,2):Promise.resolve(null)]),a=G(ne(r?.interaction_list)),o=G(ne(i?.interaction_list));k(e=>{let t=ie(e,a,o);if(t===e)return e;if(R.current.size===0)return t;let n=!1,r=t.map(e=>{let t=H(e);if(!t||!R.current.has(t))return e;let r=D.current.includes(t);return e.originalData?.is_followed===r?e:(n=!0,{...e,originalData:{...e.originalData,is_followed:r}})});return n?r:t})},[H,j,N,k,G]),[q,J]=a(`${b}-cursor`,v),Y=d(q),X=d(!1),[Z,Q]=a(`${b}-has-more`,!!(v&&v.trim()));l(()=>{Y.current=q},[q]),l(()=>{D.current=T},[T]),l(()=>{P.current={video:new Set(F.current.video),post:new Set(F.current.post)}},[F,j]),l(()=>{P.current={video:new Set,post:new Set},N({video:[],post:[]})},[j,N]),l(()=>{R.current=new Set(z.current)},[z,j]),l(()=>{R.current=new Set,B.current=new Set,L([]),j&&A.current.length!==0&&W(A.current)},[b,W,j,L]),l(()=>{j&&O.length!==0&&W(O)},[O,W,j]),l(()=>{j&&O.length!==0&&K(O)},[O,K,j]),i(()=>{y!==de&&(O.length>0||(k(x),J(v),Y.current=v,Q(!!(v&&v.trim())),C(S),w(!1),R.current=new Set,L([]),P.current={video:new Set,post:new Set},N({video:[],post:[]})),fe(y))},[S,v,x,O.length,y,C,J,Q,k,N,fe,w,de],`fullscreen-feed-runtime-refresh-${b}`);let he=h.onSwipeTo||p.onSwipeTo,ge=h.onCustomActionRender,_e=h.onRequireLogin||p.onRequireLogin,ve=h.onFollowIdsChange||p.onFollowIdsChange,ye=p.onControlsVisibilityChange,be=p.onGestureStart,xe=p.onGestureEnd,Se=p.onSwipeCancel,Ce=h.onDataUpdate||p.onDataUpdate,we=h.onOpenComment||p.onOpenComment,Te=f?e(f,{}):void 0,Ee={loop:h.loop,autoNext:h.autoNext,...h.videoConfig||{}},$=c(async()=>{if(!g||!Z||X.current)return;let e=Y.current;if(!e||!e.trim()){Q(!1);return}X.current=!0;try{let t=(await n({app_id:_,block_id:g,cursor:e||void 0})).data?.block?.data,r=t?.cursor,i=r==null?``:String(r),a=[];Array.isArray(t?.videos)&&a.push(...t.videos),Array.isArray(t?.contents)&&a.push(...t.contents);let o=a.map(e=>ae(e)).filter(Boolean);o.length>0&&(k(e=>{let t=new Set(e.map(e=>`${e.kind}:${e.id}`)),n=[...e];return o.forEach(e=>{if(!e.id)return;let r=`${e.kind}:${e.id}`;t.has(r)||(t.add(r),n.push(e))}),n}),W(o),K(o)),Y.current=i,J(i),Q(!!(i&&i.trim()))}catch(e){console.error(`FullscreenFeed runtime fetchMore failed:`,e),Q(!1)}finally{X.current=!1}},[_,g,Z,J]),De=c(()=>{w(!0),p.onUserInteracted?.()},[p,w]),Oe=c((e,t)=>{C(e),he?.({activeIndex:e,items:A.current,direction:t});let n=A.current.length;g&&Z&&n>0&&e>=n-2&&$()},[g,$,Z,he,C]),ke=c(e=>{D.current=e,E(e),ve?.(e)},[ve,E]),Ae=c(e=>{let t=p.getNavigationInfo;if(t)return t(e);let n=O[e+1];return{showSeriesButton:!1,nextItemText:n?`\u4E0B\u4E00\u6761${n.title?`\u00B7${n.title}`:``}`:``}},[O,p]);return{items:O,activeIndex:le,...h,top:h.top,bottom:h.bottom,currentUserId:h.currentUserId,videoConfig:Ee,userInteracted:ue,onUserInteracted:De,onActiveIndexChange:Oe,onDataUpdate:(e,t)=>Ce?.(e,t),onOpenComment:we,getNavigationInfo:Ae,onControlsVisibilityChange:ye,onGestureStart:be,onGestureEnd:xe,onSwipeCancel:Se,onCustomActionRender:ge,followIds:T,onFollowIdsChange:ke,onRequireLogin:_e,style:Te}}export{f as isRuntimeBaseComponentProps,h as useFullscreenFeedRuntimeCompat};
2
+ "use client";import{mergeStyles as e}from"../../../../utils/styles/helpers.mjs";import{useUserStore as t}from"../../../../../../store/modules/user-store.mjs";import{gContentGetAppChannelBlockData as n}from"../../../../../../service/generated/client.mjs";import{checkFollowStatus as r}from"../../../../../../utils/follow-service.mjs";import{useKeepAliveEffect as i,useKeepAliveState as a}from"../../../../../common/keep-scroll-position/index.mjs";import{adaptFeedItemToSafeInformation as o,normalizeToFeedItem as ee}from"../../../../basics/fullscreen-feed/runtime/adapters.mjs";import{batchQueryContentInteractions as s}from"../../../../../../hooks/use-content-operate.mjs";import{defaultProps as te}from"../../../../basics/fullscreen-feed/defaults/default-props.mjs";import{buildInteractionMap as c,collectPendingInteractionIds as ne,mergeInteractionIntoFeedItems as re}from"../../../../basics/fullscreen-feed/runtime/interaction-sync.mjs";import{useCallback as l,useEffect as u,useMemo as d,useRef as f}from"react";function p(e){return!!e&&typeof e==`object`&&(`data`in e||`props`in e||`styles`in e||`events`in e)}function m(e){let t=String(e?.content_id??e?.id??``),n=e?.author,r=Array.isArray(e?.medias)?e.medias:[],i=String(e?.content||``),a=e?.title?String(e.title):i.length>18?`${i.slice(0,18)}...`:i;return{id:t,mid:t,show_at:e?.create_time||``,name:a,img_y:e?.cover_image||``,preview_images:r,description:e?.content||``,tags:[],links:[],up_user:e?.user_id||n?.user_id||``,source_username:n?.nick_name||``,type:e?.type,is_liked:!!e?.is_liked,is_dislike:!!e?.is_dislike,is_collected:!!e?.is_collected,is_followed:!!e?.is_followed,author:n?{user_id:n.user_id||``,nick_name:n.nick_name||``,user_name:n.user_name||n.username||n.nick_name||``,avatar:n.avatar||``,is_verified:!!n.is_verified}:void 0,static:{like_cnt:e?.like_count||0,dislike_cnt:e?.dislike_count||0,comment_cnt:e?.comment_count||0,share_cnt:e?.share_count||0,browse_cnt:e?.view_count||0,collect_cnt:0}}}function h(e){let t=m(e);return t.id?{kind:`post`,id:t.id,title:t.name,content:e?.content||``,images:t.preview_images||[],originalData:t}:null}function ie(e){return!e||typeof e!=`object`?null:`kind`in e&&`originalData`in e?e:`content_id`in e||`comment_count`in e||`like_count`in e?h(e):ee(o(e))}function ae(e){if(Array.isArray(e))return e;if(!e||typeof e!=`object`)return[];let t=e.list||e.contents||e.videos||e.items;return Array.isArray(t)?t:[]}function g(o){let ee=o.data||{},p=o.styles,m=d(()=>o.events||{},[o.events]),h=o.data,g={...te,...ee},_=String(h?.block_id||h?.blockId||g.block_id||g.blockId||``),v=String(h?.app_id||g.app_id||g.appId||``)||void 0,oe=h?.cursor||g.cursor,y=oe==null?``:String(oe),b=Number(h?.refresh_key??h?.refreshKey??g.refresh_key??g.refreshKey??0),se=String(h?.keep_alive_key||h?.keepAliveKey||g.keep_alive_key||g.keepAliveKey||``),x=d(()=>se||`fullscreen-feed-runtime:${v||`app`}:${_||`unknown`}`,[v,_,se]),S=d(()=>ae(h).map(e=>ie(e)).filter(Boolean),[h]),C=d(()=>{let e=Number(g.initialActiveIndex??0);return Number.isFinite(e)?e:0},[g.initialActiveIndex]),[ce,w]=a(`${x}-active-index`,C),[le,T]=a(`${x}-user-interacted`,!1),[E,D]=a(`${x}-follow-ids`,Array.isArray(g.followIds)?g.followIds:[]),O=f(E),[k,A]=a(`${x}-items`,S),j=f(k);j.current=k;let[ue,de]=a(`${x}-refresh-key`,b),{userId:fe,userInfo:pe}=t(),M=fe||pe?.userId||``,[N,P]=a(`${x}-checked-interaction-ids`,{video:[],post:[]}),F=f({video:new Set(N.video),post:new Set(N.post)}),I=f(N);I.current=N;let[L,R]=a(`${x}-checked-followee-ids`,[]),z=f(new Set(L)),B=f(L);B.current=L;let V=f(new Set),H=f(!1),U=l(e=>{let t=e.originalData;return t?.author?.user_id||t?.up_user||``},[]),W=l(async()=>{if(H.current||!M||V.current.size===0)return;H.current=!0;let e=Array.from(V.current);V.current=new Set;let t=await r({app_id:0,follower_id:M,followee_ids:e});if(t.success&&t.data?.is_following_map){let n=t.data.is_following_map;A(e=>{let t=!1,r=e.map(e=>{let r=U(e);if(!r||!(r in n))return e;let i=!!n[r];return e.originalData?.is_followed===i?e:(t=!0,{...e,originalData:{...e.originalData,is_followed:i}})});return t?r:e}),D(t=>{let r=new Set(t);e.forEach(e=>{n[e]?r.add(e):r.delete(e)});let i=Array.from(r);return O.current=i,i})}H.current=!1,V.current.size>0&&W()},[U,M,D,A]),G=l(e=>{if(!M)return;let t=e.map(e=>U(e)).filter(e=>!!e);t.length!==0&&(t.forEach(e=>{z.current.has(e)||(z.current.add(e),V.current.add(e))}),V.current.size>0&&R(Array.from(z.current)),W())},[W,U,M,R]),K=l(e=>{if(e.size===0)return e;let t=new Map;return e.forEach((e,n)=>{if(!e)return;let{is_followed:r,...i}=e;t.set(n,i)}),t},[]),q=l(async e=>{if(!M)return;let{pendingVideoIds:t,pendingPostIds:n}=ne(e,F.current);if(t.length===0&&n.length===0)return;P({video:Array.from(F.current.video),post:Array.from(F.current.post)});let[r,i]=await Promise.all([t.length>0?s(t,1):Promise.resolve(null),n.length>0?s(n,2):Promise.resolve(null)]),a=K(c(r?.interaction_list)),o=K(c(i?.interaction_list));A(e=>{let t=re(e,a,o);if(t===e)return e;if(z.current.size===0)return t;let n=!1,r=t.map(e=>{let t=U(e);if(!t||!z.current.has(t))return e;let r=O.current.includes(t);return e.originalData?.is_followed===r?e:(n=!0,{...e,originalData:{...e.originalData,is_followed:r}})});return n?r:t})},[U,M,P,A,K]),[J,Y]=a(`${x}-cursor`,y),X=f(J),Z=f(!1),[Q,$]=a(`${x}-has-more`,!!(y&&y.trim()));u(()=>{X.current=J},[J]),u(()=>{O.current=E},[E]),u(()=>{F.current={video:new Set(I.current.video),post:new Set(I.current.post)}},[I,M]),u(()=>{F.current={video:new Set,post:new Set},P({video:[],post:[]})},[M,P]),u(()=>{z.current=new Set(B.current)},[B,M]),u(()=>{z.current=new Set,V.current=new Set,R([]),M&&j.current.length!==0&&G(j.current)},[x,G,M,R]),u(()=>{M&&k.length!==0&&G(k)},[k,G,M]),u(()=>{M&&k.length!==0&&q(k)},[k,q,M]),i(()=>{b!==ue&&(k.length>0||(A(S),Y(y),X.current=y,$(!!(y&&y.trim())),w(C),T(!1),z.current=new Set,R([]),F.current={video:new Set,post:new Set},P({video:[],post:[]})),de(b))},[C,y,S,k.length,b,w,Y,$,A,P,de,T,ue],`fullscreen-feed-runtime-refresh-${x}`);let me=g.onSwipeTo||m.onSwipeTo,he=g.onCustomActionRender,ge=g.onRequireLogin||m.onRequireLogin,_e=g.onFollowIdsChange||m.onFollowIdsChange,ve=m.onControlsVisibilityChange,ye=m.onGestureStart,be=m.onGestureEnd,xe=m.onSwipeCancel,Se=g.onDataUpdate||m.onDataUpdate,Ce=g.onOpenComment||m.onOpenComment,we=p?e(p,{}):void 0,Te={loop:g.loop,autoNext:g.autoNext,...g.videoConfig||{}},Ee=l(async()=>{if(!_||!Q||Z.current)return;let e=X.current;if(!e||!e.trim()){$(!1);return}Z.current=!0;try{let t=(await n({app_id:v,block_id:_,cursor:e||void 0})).data?.block?.data,r=t?.cursor,i=r==null?``:String(r),a=[];Array.isArray(t?.videos)&&a.push(...t.videos),Array.isArray(t?.contents)&&a.push(...t.contents);let o=a.map(e=>ie(e)).filter(Boolean);o.length>0&&(A(e=>{let t=new Set(e.map(e=>`${e.kind}:${e.id}`)),n=[...e];return o.forEach(e=>{if(!e.id)return;let r=`${e.kind}:${e.id}`;t.has(r)||(t.add(r),n.push(e))}),n}),G(o),q(o)),X.current=i,Y(i),$(!!(i&&i.trim()))}catch(e){console.error(`FullscreenFeed runtime fetchMore failed:`,e),$(!1)}finally{Z.current=!1}},[v,_,Q,Y]),De=l(()=>{T(!0),m.onUserInteracted?.()},[m,T]),Oe=l((e,t)=>{w(e),me?.({activeIndex:e,items:j.current,direction:t});let n=j.current.length;_&&Q&&n>0&&e>=n-2&&Ee()},[_,Ee,Q,me,w]),ke=l(e=>{O.current=e,D(e),_e?.(e)},[_e,D]),Ae=l(e=>{let t=m.getNavigationInfo;if(t)return t(e);let n=k[e+1];return{showSeriesButton:!1,nextItemText:n?`\u4E0B\u4E00\u6761${n.title?`\u00B7${n.title}`:``}`:``}},[k,m]);return{items:k,activeIndex:ce,...g,top:g.top,bottom:g.bottom,currentUserId:g.currentUserId,videoConfig:Te,userInteracted:le,onUserInteracted:De,onActiveIndexChange:Oe,onDataUpdate:(e,t)=>Se?.(e,t),onOpenComment:Ce,getNavigationInfo:Ae,onControlsVisibilityChange:ve,onGestureStart:ye,onGestureEnd:be,onSwipeCancel:xe,onCustomActionRender:he,followIds:E,onFollowIdsChange:ke,onRequireLogin:ge,style:we}}export{p as isRuntimeBaseComponentProps,g as useFullscreenFeedRuntimeCompat};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{schema as n}from"./schema/index.mjs";import{homeRecommendGridInspectorDefaultProps as r,homeRecommendGridInspectorPropsSchema as i}from"./inspector-schema.mjs";import{HomeRecommendGrid as a}from"./server.mjs";import{homeRecommendGridMaterial as o}from"./material.mjs";var s=t;export{s as default};
2
+ import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";import{homeRecommendGridInspectorDefaultProps as r,homeRecommendGridInspectorPropsSchema as i}from"./inspector-schema.mjs";import{HomeRecommendGrid as a}from"./server.mjs";import{homeRecommendGridMaterial as o}from"./material.mjs";var s=e;export{s as default};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{mode:i=`renderer`,moreLink:a=e.moreLink,title:o,enableInfinite:s,data:c}=r;return n(t,{mode:i,props:{moreLink:a,title:o,enableInfinite:s},data:c})}export{r as HomeRecommendGrid};
2
+ import e from"./runtime/client.mjs";import{defaultProps as t}from"./defaults/default-props.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{mode:i=`renderer`,moreLink:a=t.moreLink,title:o,enableInfinite:s,data:c}=r;return n(e,{mode:i,props:{moreLink:a,title:o,enableInfinite:s},data:c})}export{r as HomeRecommendGrid};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{schema as n}from"./schema/index.mjs";import{homeRecommendWaterfallInspectorDefaultProps as r,homeRecommendWaterfallInspectorPropsSchema as i}from"./inspector-schema.mjs";import{HomeRecommendWaterfall as a}from"./server.mjs";import{homeRecommendWaterfallMaterial as o}from"./material.mjs";var s=t;export{s as default};
2
+ import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";import{homeRecommendWaterfallInspectorDefaultProps as r,homeRecommendWaterfallInspectorPropsSchema as i}from"./inspector-schema.mjs";import{HomeRecommendWaterfall as a}from"./server.mjs";import{homeRecommendWaterfallMaterial as o}from"./material.mjs";var s=e;export{s as default};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{schema as n}from"./schema/index.mjs";var r=t;export{r as default};
2
+ import e from"./runtime/client.mjs";import{schema as t}from"./schema/index.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";var r=e;export{r as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{gUserGetUserInfo as r,gUserViewUserInfo as i,pInteractionFollow as a,pInteractionUnfollow as o}from"../../../../../service/generated/client.mjs";import{Box as s}from"../../../../ui/box.mjs";import{Text as c}from"../../../../ui/text.mjs";import{useDeleteRequest as l,useMutation as u,useRequest as d,useUpdateRequest as f}from"../../../../../hooks/query/use-query.mjs";import{useLoginModalStore as p}from"../../../../../store/modules/login-modal-store.mjs";import{LeftArrowIcon as m}from"../../../../common/icons/left-arrow.mjs";import{SettingIcon as h}from"../../../../common/icons/setting.mjs";import{UserProfileAvatar as g}from"./user-profile-avatar.mjs";import{UserProfileCoverBackground as _}from"./user-profile-cover-background.mjs";import{useEffect as v,useMemo as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{toast as C}from"sonner";import{useTranslations as w}from"next-intl";import T from"next/link";import{useRouter as ee}from"next/navigation";const E=n.persist,D=`https://guadd-sg-ccs-sing-dev.s3.ap-southeast-1.amazonaws.com/default/default_avatar.png`,O=`/images/mine/img_mine_head_bg.png`;function te({userId:e,currentUserId:n,isFollowing:r}){let i=w(`components.pages.profile`),{open:s}=p(),c=l(),d=f(),{mutateAsync:m,isPending:h}=u(async e=>a(e)),{mutateAsync:g,isPending:_}=u(async e=>o(e)),v=h||_;async function y(){if(!v){if(!n){s();return}try{if(r){let t=await g({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.unfollowSuccess`)),b(!1),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.unfollowFailed`))}else{let t=await m({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.followSuccess`)),b(!0),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.followFailed`))}}catch(e){console.error(`关注操作失败`,e),C.error(i(`client.operationFailed`))}}}function b(t){d([`user-profile`,`profile`,e],e=>!e||!e.data?e:{...e,data:{...e.data,is_following:t}})}return x(t,{variant:r?`outline`:`default`,className:`rounded-full disabled:opacity-100`,onClick:y,disabled:v,children:i(v?`client.processing`:r?`client.followed`:`client.follow`)})}function k({id:a,enableCustomBackground:o=!0,showBackButton:l=!0,requireLogin:u=!1,cookieToken:f,cookieUserId:C,isEditorPreview:k=!1,className:A,mode:j=`renderer`}){let M=w(`components.pages.profile`);w(`components.pages.profile.components`);let N=k||j===`editor`,ne=!N,re=ee(),{open:ie}=p(),{isLogin:ae,userId:P,token:F}=n(),[I,L]=b(!1);v(()=>{if(!E){L(!0);return}L(E.hasHydrated());let e=E.onHydrate(()=>{L(!1)}),t=E.onFinishHydration(()=>{L(!0)});return()=>{e(),t()}},[]);let R=N?!1:I?ae&&!!P&&!!F:!!C&&!!f,z=N?``:I?P:P||C,B=z,V=a==null||!!a&&!!B&&a===B,oe=!V&&!!a,H=V?[`user-profile`,`mine`]:[`user-profile`,`profile`,a],{data:U}=d(N?[`editor-preview`,...H]:H,()=>a?i({target_user_id:a,user_id:z||a}):r({user_id:a||z||``}),{staleTime:0,enabled:ne&&(!!a||!!z)}),W=y(()=>{let e=U?U.data:void 0;return e?{userId:e.user_id,isFollowing:e.is_following||!1,name:e.nick_name||`User${a??``}`,avatar:e.avatar||D,followingCnt:e.following_count??0,followersCnt:e.follower_count??0,likeCnt:e.like_count??0,signature:e.signature||``,background:e.bg_image||O}:{}},[a,U]),G=u&&V&&!R,K=!R&&oe,q=V&&R&&!G,J=!R,se=o&&q,ce=o&&J,le={name:M(`client.welcomeToPlanet`),description:M(`client.exploreAdventures`),avatar:D,followingCnt:0,followersCnt:0,likeCnt:0,background:O};function Y(){ie()}function X(){re.back()}let ue=G?x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.loginNow`)}):K?x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.follow`)}):R?V?x(T,{href:`/edit`,children:x(t,{variant:`outline`,className:`rounded-full`,children:M(`client.editProfile`)})}):x(te,{userId:a||``,currentUserId:z,isFollowing:W?.isFollowing}):x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.loginNow`)}),Z=G?le:W,Q=Z.name||``,$=Z.description||Z.signature||``;Z.followingCnt,Z.followersCnt,Z.likeCnt;let de=Z.avatar||``;return S(s,{className:e(`flex flex-col relative`,A),children:[S(s,{className:`absolute top-0 p-3 z-10 flex items-center justify-between w-full`,children:[x(t,{variant:`ghost`,size:`icon-xs`,onClick:X,className:e(`h-4 w-4 p-0 hover:bg-transparent`,{invisible:!l}),children:x(m,{className:`w-4 h-4`})}),x(T,{href:`/settings`,className:e({invisible:!V}),children:x(h,{})})]}),x(_,{isMine:se,enableCustomBackground:o,src:Z.background,onUnauthorizedClick:ce?Y:void 0}),S(s,{className:`flex-1 px-3`,children:[S(s,{className:`relative flex justify-end`,children:[x(g,{isMine:q,src:de,alt:Q||`avatar`,onUnauthorizedClick:J?Y:void 0}),x(s,{className:`flex divide-x divide-text1/5 py-4 h-12`})]}),S(s,{className:`flex items-center justify-between gap-1`,children:[x(c,{as:`p`,className:`text-text1 text-xl line-clamp-2 font-bold`,children:Q}),ue]}),$&&x(c,{as:`p`,className:`text-sm py-1 line-clamp-3 text-text1/66`,children:$})]})]})}export{k as UserProfileHeaderClient};
2
+ "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{gUserGetUserInfo as r,gUserViewUserInfo as i,pInteractionFollow as a,pInteractionUnfollow as o}from"../../../../../service/generated/client.mjs";import{Box as s}from"../../../../ui/box.mjs";import{Text as c}from"../../../../ui/text.mjs";import{useLoginModalStore as l}from"../../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as u,useMutation as d,useRequest as f,useUpdateRequest as p}from"../../../../../hooks/query/use-query.mjs";import{LeftArrowIcon as m}from"../../../../common/icons/left-arrow.mjs";import{SettingIcon as h}from"../../../../common/icons/setting.mjs";import{UserProfileAvatar as g}from"./user-profile-avatar.mjs";import{UserProfileCoverBackground as _}from"./user-profile-cover-background.mjs";import{useEffect as v,useMemo as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{toast as C}from"sonner";import{useTranslations as w}from"next-intl";import T from"next/link";import{useRouter as ee}from"next/navigation";const E=n.persist,D=`https://guadd-sg-ccs-sing-dev.s3.ap-southeast-1.amazonaws.com/default/default_avatar.png`,O=`/images/mine/img_mine_head_bg.png`;function te({userId:e,currentUserId:n,isFollowing:r}){let i=w(`components.pages.profile`),{open:s}=l(),c=u(),f=p(),{mutateAsync:m,isPending:h}=d(async e=>a(e)),{mutateAsync:g,isPending:_}=d(async e=>o(e)),v=h||_;async function y(){if(!v){if(!n){s();return}try{if(r){let t=await g({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.unfollowSuccess`)),b(!1),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.unfollowFailed`))}else{let t=await m({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.followSuccess`)),b(!0),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.followFailed`))}}catch(e){console.error(`关注操作失败`,e),C.error(i(`client.operationFailed`))}}}function b(t){f([`user-profile`,`profile`,e],e=>!e||!e.data?e:{...e,data:{...e.data,is_following:t}})}return x(t,{variant:r?`outline`:`default`,className:`rounded-full disabled:opacity-100`,onClick:y,disabled:v,children:i(v?`client.processing`:r?`client.followed`:`client.follow`)})}function k({id:a,enableCustomBackground:o=!0,showBackButton:u=!0,requireLogin:d=!1,cookieToken:p,cookieUserId:C,isEditorPreview:k=!1,className:A,mode:j=`renderer`}){let M=w(`components.pages.profile`);w(`components.pages.profile.components`);let N=k||j===`editor`,ne=!N,re=ee(),{open:ie}=l(),{isLogin:ae,userId:P,token:F}=n(),[I,L]=b(!1);v(()=>{if(!E){L(!0);return}L(E.hasHydrated());let e=E.onHydrate(()=>{L(!1)}),t=E.onFinishHydration(()=>{L(!0)});return()=>{e(),t()}},[]);let R=N?!1:I?ae&&!!P&&!!F:!!C&&!!p,z=N?``:I?P:P||C,B=z,V=a==null||!!a&&!!B&&a===B,oe=!V&&!!a,H=V?[`user-profile`,`mine`]:[`user-profile`,`profile`,a],{data:U}=f(N?[`editor-preview`,...H]:H,()=>a?i({target_user_id:a,user_id:z||a}):r({user_id:a||z||``}),{staleTime:0,enabled:ne&&(!!a||!!z)}),W=y(()=>{let e=U?U.data:void 0;return e?{userId:e.user_id,isFollowing:e.is_following||!1,name:e.nick_name||`User${a??``}`,avatar:e.avatar||D,followingCnt:e.following_count??0,followersCnt:e.follower_count??0,likeCnt:e.like_count??0,signature:e.signature||``,background:e.bg_image||O}:{}},[a,U]),G=N||d&&V&&!R,K=!G&&!R&&oe,q=V&&R&&!G,J=!R,se=o&&q,ce=o&&J,le={name:M(`client.welcomeToPlanet`),description:M(`client.exploreAdventures`),avatar:D,followingCnt:0,followersCnt:0,likeCnt:0,background:O};function Y(){ie()}function X(){re.back()}let ue=G?x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.loginNow`)}):K?x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.follow`)}):R?V?x(T,{href:`/edit`,children:x(t,{variant:`outline`,className:`rounded-full`,children:M(`client.editProfile`)})}):x(te,{userId:a||``,currentUserId:z,isFollowing:W?.isFollowing}):x(t,{className:`rounded-full`,size:`lg`,onClick:Y,children:M(`client.loginNow`)}),Z=G?le:W,Q=Z.name||``,$=Z.description||Z.signature||``;Z.followingCnt,Z.followersCnt,Z.likeCnt;let de=Z.avatar||``;return S(s,{className:e(`flex flex-col relative`,A),children:[S(s,{className:`absolute top-0 p-3 z-10 flex items-center justify-between w-full`,children:[x(t,{variant:`ghost`,size:`icon-xs`,onClick:X,className:e(`h-4 w-4 p-0 hover:bg-transparent`,{invisible:!u}),children:x(m,{className:`w-4 h-4`})}),x(T,{href:`/settings`,className:e({invisible:!V}),children:x(h,{})})]}),x(_,{isMine:se,enableCustomBackground:o,src:Z.background,onUnauthorizedClick:ce?Y:void 0}),S(s,{className:`flex-1 px-3`,children:[S(s,{className:`relative flex justify-end`,children:[x(g,{isMine:q,src:de,alt:Q||`avatar`,onUnauthorizedClick:J?Y:void 0}),x(s,{className:`flex divide-x divide-text1/5 py-4 h-12`})]}),S(s,{className:`flex items-center justify-between gap-1`,children:[x(c,{as:`p`,className:`text-text1 text-xl line-clamp-2 font-bold`,children:Q}),ue]}),$&&x(c,{as:`p`,className:`text-sm py-1 line-clamp-3 text-text1/66`,children:$})]})]})}export{k as UserProfileHeaderClient};
@@ -7,7 +7,13 @@ import * as zod from "zod";
7
7
  import * as zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region components/biz/business/profile/profile-header/material.d.ts
10
- declare const profileHeaderMaterial: DefineMaterialOption<typeof UserProfileHeader, typeof UserProfileHeaderClient, zod.ZodObject<{
10
+ declare const profileHeaderMaterial: DefineMaterialOption<({
11
+ mode,
12
+ ...props
13
+ }: React.ComponentProps<typeof UserProfileHeader>) => react_jsx_runtime0.JSX.Element, ({
14
+ mode,
15
+ ...props
16
+ }: React.ComponentProps<typeof UserProfileHeaderClient>) => react_jsx_runtime0.JSX.Element, zod.ZodObject<{
11
17
  mode: zod.ZodOptional<zod.ZodEnum<{
12
18
  renderer: "renderer";
13
19
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{UserProfileHeaderClient as t}from"./client.mjs";import{profileHeaderInspectorPropsSchema as n}from"./schema.mjs";import{UserProfileHeader as r}from"./server.mjs";import{jsx as i}from"react/jsx-runtime";const a=e({type:`profile-header`,category:`内容组件`,name:`用户信息模块(有背景图)`,icon:`/static/components-thumb/user_profile_with_background.png`,serverComponent:r,clientComponent:t,propsSchema:n}),o=e({type:`profile-header-with-disabled-background`,category:`内容组件`,name:`用户信息模块(无背景图)`,icon:`/static/components-thumb/user_profile_plain.png`,serverComponent:({mode:e=`renderer`,...t})=>i(r,{...t,mode:e,enableCustomBackground:!1}),clientComponent:({mode:e=`renderer`,...n})=>i(t,{...n,mode:e,enableCustomBackground:!1}),propsSchema:n});export{a as profileHeaderMaterial,o as profileHeaderMaterialWithDisabledBackground};
2
+ import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{UserProfileHeaderClient as t}from"./client.mjs";import{profileHeaderInspectorPropsSchema as n}from"./schema.mjs";import{UserProfileHeader as r}from"./server.mjs";import{jsx as i}from"react/jsx-runtime";function a(e){return e===`editor`?{id:void 0,requireLogin:!0,cookieToken:``,cookieUserId:``,token:``,currentUserId:``}:{}}const o=e({type:`profile-header`,category:`内容组件`,name:`用户信息模块(有背景图)`,icon:`/static/components-thumb/user_profile_with_background.png`,serverComponent:({mode:e=`renderer`,...t})=>i(r,{...t,...a(e),mode:e}),clientComponent:({mode:e=`renderer`,...n})=>i(t,{...n,...a(e),mode:e}),propsSchema:n}),s=e({type:`profile-header-with-disabled-background`,category:`内容组件`,name:`用户信息模块(无背景图)`,icon:`/static/components-thumb/user_profile_plain.png`,serverComponent:({mode:e=`renderer`,...t})=>i(r,{...t,...a(e),mode:e,enableCustomBackground:!1}),clientComponent:({mode:e=`renderer`,...n})=>i(t,{...n,...a(e),mode:e,enableCustomBackground:!1}),propsSchema:n});export{o as profileHeaderMaterial,s as profileHeaderMaterialWithDisabledBackground};
@@ -1,2 +1,2 @@
1
1
 
2
- import{gUserGetUserInfo as e,gUserViewUserInfo as t}from"../../../../../service/generated/client.mjs";import{HydrationBoundary as n}from"../../../../../hooks/query/hydration-boundary.mjs";import{UserProfileHeaderClient as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";function a({id:n,currentUserId:r,token:i,authConfig:a}){return n||r&&i?[{queryKey:n==null||r&&n===r?[`user-profile`,`mine`]:[`user-profile`,`profile`,n],async queryFn(){return n==null?e({user_id:r},a):t({target_user_id:n,user_id:r||n},a)}}]:[]}function o({mode:e=`renderer`,...t}){return i(s,{...t,mode:e})}function s({mode:e=`renderer`,token:t=``,currentUserId:o=``,authConfig:s,...c}){if(e===`editor`)return i(r,{...c,mode:e,isEditorPreview:!0});let l=a({id:c.id,currentUserId:o,token:t,authConfig:s});return l.length===0?i(r,{...c,mode:e}):i(n,{prefetch:l,children:i(r,{...c,mode:e})})}export{o as UserProfileHeader,a as buildUserProfileHeaderPrefetch};
2
+ import{gUserGetUserInfo as e,gUserViewUserInfo as t}from"../../../../../service/generated/client.mjs";import{HydrationBoundary as n}from"../../../../../hooks/query/hydration-boundary.mjs";import{UserProfileHeaderClient as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";import{cookies as a}from"next/headers";function o(e,t){let n={};if(e&&(n.Authorization=`Bearer ${e}`),t&&(n[`X-User-Id`]=t),Object.keys(n).length!==0)return{headers:n}}async function s({cookieToken:e,cookieUserId:t,token:n,currentUserId:r,authConfig:i}){let s=``,c=``;try{let e=await a();s=e.get(`token`)?.value||``,c=e.get(`userId`)?.value||``}catch{}let l=e||s,u=t||c,d=n||l,f=r||u;return{cookieToken:l,cookieUserId:u,token:d,currentUserId:f,authConfig:i||o(d,f)}}function c({id:n,currentUserId:r,token:i,authConfig:a}){return n||r&&i?[{queryKey:n==null||r&&n===r?[`user-profile`,`mine`]:[`user-profile`,`profile`,n],async queryFn(){return n==null?e({user_id:r},a):t({target_user_id:n,user_id:r||n},a)}}]:[]}function l({mode:e=`renderer`,...t}){return i(u,{...t,mode:e})}async function u({mode:e=`renderer`,cookieToken:t,cookieUserId:a,token:o=``,currentUserId:l=``,authConfig:u,...d}){if(e===`editor`)return i(r,{...d,mode:e,isEditorPreview:!0});let f=await s({cookieToken:t,cookieUserId:a,token:o,currentUserId:l,authConfig:u}),p=c({id:d.id,currentUserId:f.currentUserId,token:f.token,authConfig:f.authConfig});return p.length===0?i(r,{...d,mode:e,cookieToken:f.cookieToken,cookieUserId:f.cookieUserId}):i(n,{prefetch:p,children:i(r,{...d,mode:e,cookieToken:f.cookieToken,cookieUserId:f.cookieUserId})})}export{l as UserProfileHeader,c as buildUserProfileHeaderPrefetch};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../../../ui/box.mjs";import{Text as t}from"../../../../ui/text.mjs";import{UserProfileMainShell as n}from"./shell.mjs";import{jsx as r}from"react/jsx-runtime";function i({id:i,className:a,cookieUserId:o,currentUserId:s,requireLogin:c=!1,mode:l=`renderer`}){let u=l===`editor`?``:s||o||``,d=i==null||!!u&&i===u;return r(n,{isMine:d,renderMode:c&&d&&!u?`login-required`:`content`,className:a,children:r(e,{className:`py-6 text-center`,children:r(t,{className:`text-sm text-text3`,children:`内容由服务端按当前 Tab 渲染`})})})}export{i as UserProfileMainClient};
2
+ "use client";import{VideoList as e}from"../../../../common/list/video-list/video-list.mjs";import{UserProfileMainShell as t}from"./shell.mjs";import{jsx as n}from"react/jsx-runtime";function r(e){return e*1e3}const i=[{id:`00d21b841126c976`,title:`朝朝暮暮都是你`,coverImage:`/md-204/uploads/default/other/2024-04-15/2750647625e6193940163169b77fb566.jpg`,duration:192,viewCount:237,createTime:1772175066,isMoreLink:!0},{id:`009f2e1820718add`,title:`狗哥的乡村爱情故事`,coverImage:`/md-204/uploads/default/other/2024-04-11/579bc5eb807d29657828945330b0ac47.jpg`,duration:74,viewCount:191,createTime:1770714221,isMoreLink:!0},{id:`02e2a11f78a3ffbf`,title:`唯爱百分之十二`,coverImage:`/md-204/resource/b6/b689e34f40d0e5baccb8f79630b99425.jpg`,duration:3348,viewCount:214,createTime:1770347155,isMoreLink:!0},{id:`2c19073cbd3c5c5a`,title:`疯狂磕学家`,coverImage:`/md-204/uploads/default/other/2024-08-23/5e174eeb8f2009dd7bb797fcabd5a649.jpg`,duration:2359,viewCount:17,createTime:1769757646,isMoreLink:!0},{id:`07e029915c2a9c96`,title:`我和祖宗做交易`,coverImage:`/md-204/uploads/default/other/2024-05-23/b53e50fa75986b41aac766c253a91fea.jpg`,duration:194,viewCount:75,createTime:1769670600,isMoreLink:!0},{id:`0ae1056a620b286f`,title:`识汝不识丁`,coverImage:`/md-204/uploads/default/other/2024-08-24/8958d46da3087a420d1d55e691dcb10a.jpg`,duration:2053,viewCount:13,createTime:1769651310,isMoreLink:!0},{id:`05564bf1aaf5fad6`,title:`我们的天空`,coverImage:`/md-204/resource/1a/1af6ce7117dcda390cf08db26e832684.jpg`,duration:2737,viewCount:180,createTime:1769566315,isMoreLink:!0},{id:`00f61e5be01409bb`,title:`我初初爱你`,coverImage:`/md-204/resource/bd/bd657a65bc6adc202a94acb8aca33f38.jpg`,duration:2898,viewCount:362,createTime:1769410683,isMoreLink:!0},{id:`062cd69d44fcb772`,title:`料理情缘`,coverImage:`/md-204/uploads/default/other/2023-11-27/de0491f07909b05fa012d15552e02cd0.png`,duration:2726,viewCount:33,createTime:1769157580,isMoreLink:!0},{id:`05751871b640b1a7`,title:`穷小伙被碎玻璃割伤眼睛,却因祸得福获得了一只超能神眼,人生直接开挂,之前欺负他的人统统匍匐在他脚下,征服姐妹花,走向人生巅峰!`,coverImage:`/md-204/dcc-file/29/29a0fdc86f0d756ad8f123e81693d233-small.jpgbnc`,duration:9236,viewCount:137,createTime:1769157575,isMoreLink:!1}].map(e=>({id:e.id,title:e.title,coverImage:e.coverImage,duration:e.duration,authorName:``,viewCount:e.viewCount,publishTime:r(e.createTime),is_more_link:e.isMoreLink}));function a({id:r,className:a,cookieUserId:o,currentUserId:s,requireLogin:c=!1,mode:l=`renderer`}){let u=l===`editor`?``:s||o||``,d=r==null||!!u&&r===u;return n(t,{profileId:r,currentUserId:u,isMine:d,renderMode:c&&d&&!u?`login-required`:`content`,className:a,children:n(e,{list:i,loading:!1,hasMore:!1,showVideoProgress:!1})})}export{a as UserProfileMainClient};
@@ -1,2 +1,2 @@
1
1
 
2
- import{gUserViewUserInfo as e}from"../../../../../service/generated/client.mjs";import{profileMainCollectCollectionTabOptions as t,profileMainCollectTabOptions as n,profileMainHistoryTabOptions as r,profileMainLikeTabOptions as i,profileMainMineTabOptions as a,profileMainProfileTabOptions as o}from"./variants.mjs";import{UserProfileMainShell as s}from"./shell.mjs";import{CollectTabServer as c}from"./tabs/collect-tab/server.mjs";import{HistoryTabServer as l}from"./tabs/history-tab/server.mjs";import{LikeTabServer as u}from"./tabs/like-tab/server.mjs";import{jsx as d}from"react/jsx-runtime";function f({isMine:e,tab:t}){let n=e?a:o;return t&&n.includes(t)?t:n[0]}function p(e,t,n){return e&&t.includes(e)?e:n}function m(e,t){return e&&(t===`collect`||t===`like`)}function h(e){let{mode:t=`renderer`,...n}=e;return d(g,{...n,mode:t})}async function g({mode:a=`renderer`,id:o,showCreateAction:h=!1,requireLogin:g=!1,cookieToken:_,cookieUserId:v,className:y,token:b=``,currentUserId:x=``,authConfig:S,tab:C,likeTab:w,historyTab:T,collectTab:E,collectCollectionTab:D}){let O=a===`editor`,k=b||_||``,A=x||v||``,j=!!k,M=o==null||!!A&&o===A,N=!M&&!!o,P=M?A:o?String(o):void 0,F=M?[`user-profile`,`mine`]:[`user-profile`,`profile`,o],I=f({isMine:M,tab:C}),L=`content`;if(g&&M&&!j&&(L=`login-required`),!O&&L===`content`&&m(N,I)){let t=(await e({target_user_id:String(o),user_id:A||String(o)},S))?.data??{},n=Number(t.collections_open??1)>0,r=Number(t.like_open??1)>0;I===`collect`&&!n&&(L=`privacy-collect`),I===`like`&&!r&&(L=`privacy-like`)}let R=O?[]:void 0,z=null;if(L===`content`)switch(I){case`like`:z=d(u,{mode:a,isMine:M,targetUserId:P,queryKeyPrefix:F,resolvedLikeTab:p(w,i,`video`),prefetch:R});break;case`history`:z=d(l,{mode:a,targetUserId:P,queryKeyPrefix:F,resolvedHistoryTab:p(T,r,`video`),authConfig:S,prefetch:R});break;default:z=d(c,{mode:a,isMine:M,userId:P,showCreateAction:h&&M,queryKeyPrefix:F,resolvedCollectTab:p(E,n,`video`),resolvedCollectCollectionTab:p(D,t,`created`),authConfig:S,prefetch:R});break}return d(s,{isMine:M,renderMode:L,className:y,children:z})}export{h as UserProfileMain};
2
+ import{gUserViewUserInfo as e}from"../../../../../service/generated/client.mjs";import{profileMainCollectCollectionTabOptions as t,profileMainCollectTabOptions as n,profileMainHistoryTabOptions as r,profileMainLikeTabOptions as i,profileMainMineTabOptions as a,profileMainProfileTabOptions as o}from"./variants.mjs";import{UserProfileMainShell as s}from"./shell.mjs";import{CollectTabServer as c}from"./tabs/collect-tab/server.mjs";import{HistoryTabServer as l}from"./tabs/history-tab/server.mjs";import{LikeTabServer as u}from"./tabs/like-tab/server.mjs";import{jsx as d}from"react/jsx-runtime";import{cookies as f}from"next/headers";function p({isMine:e,tab:t}){let n=e?a:o;return t&&n.includes(t)?t:n[0]}function m(e,t,n){return e&&t.includes(e)?e:n}function h(e,t){let n={};if(e&&(n.Authorization=`Bearer ${e}`),t&&(n[`X-User-Id`]=t),Object.keys(n).length!==0)return{headers:n}}async function g({cookieToken:e,cookieUserId:t,token:n,currentUserId:r,authConfig:i}){let a=``,o=``;try{let e=await f();a=e.get(`token`)?.value||``,o=e.get(`userId`)?.value||``}catch{}let s=e||a,c=t||o,l=n||s,u=r||c;return{token:l,currentUserId:u,authConfig:i||h(l,u)}}function _(e,t){return e&&(t===`collect`||t===`like`)}function v(e){let{mode:t=`renderer`,...n}=e;return d(y,{...n,mode:t})}async function y({mode:a=`renderer`,id:o,showCreateAction:f=!1,requireLogin:h=!1,cookieToken:v,cookieUserId:y,className:b,token:x=``,currentUserId:S=``,authConfig:C,tab:w,likeTab:T,historyTab:E,collectTab:D,collectCollectionTab:O}){let k=a===`editor`,A=await g({cookieToken:v,cookieUserId:y,token:x,currentUserId:S,authConfig:C}),j=A.token,M=A.currentUserId,N=A.authConfig,P=!!j,F=o==null||!!M&&o===M,I=!F&&!!o,L=F?M:o?String(o):void 0,R=F?[`user-profile`,`mine`]:[`user-profile`,`profile`,o],z=p({isMine:F,tab:w}),B=`content`;if(h&&F&&!P&&(B=`login-required`),!k&&B===`content`&&_(I,z)){let t=(await e({target_user_id:String(o),user_id:M||String(o)},N))?.data??{},n=Number(t.collections_open??1)>0,r=Number(t.like_open??1)>0;z===`collect`&&!n&&(B=`privacy-collect`),z===`like`&&!r&&(B=`privacy-like`)}let V=k?[]:void 0,H=null;if(B===`content`)switch(z){case`like`:H=d(u,{mode:a,isMine:F,targetUserId:L,queryKeyPrefix:R,resolvedLikeTab:m(T,i,`video`),prefetch:V});break;case`history`:H=d(l,{mode:a,targetUserId:L,queryKeyPrefix:R,resolvedHistoryTab:m(E,r,`video`),authConfig:N,prefetch:V});break;default:H=d(c,{mode:a,isMine:F,userId:L,showCreateAction:f&&F,queryKeyPrefix:R,resolvedCollectTab:m(D,n,`video`),resolvedCollectCollectionTab:m(O,t,`created`),authConfig:N,prefetch:V});break}return d(s,{profileId:o,currentUserId:M,isMine:F,renderMode:B,className:b,children:H})}export{v as UserProfileMain};
@@ -5,6 +5,10 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  //#region components/biz/business/profile/profile-main/shell.d.ts
6
6
  type UserProfileMainRenderMode = 'content' | 'login-required' | 'privacy-collect' | 'privacy-like';
7
7
  interface UserProfileMainShellProps extends PropsWithChildren {
8
+ /** 用户 ID。 */
9
+ profileId?: string;
10
+ /** 当前登录用户 ID。 */
11
+ currentUserId?: string;
8
12
  /** 是否为本人视角。 */
9
13
  isMine: boolean;
10
14
  /** 当前内容区渲染模式。 */
@@ -16,6 +20,8 @@ interface UserProfileMainShellProps extends PropsWithChildren {
16
20
  * 用户资料主体客户端壳层,仅负责主 Tab 交互与占位渲染。
17
21
  */
18
22
  declare function UserProfileMainShell({
23
+ profileId,
24
+ currentUserId,
19
25
  isMine,
20
26
  renderMode,
21
27
  className,
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{Box as n}from"../../../../ui/box.mjs";import{EmptyState as r}from"../../../../ui/empty.mjs";import{Tabs as i,TabsList as a,TabsTrigger as o}from"../../../../ui/tabs.mjs";import{Text as s}from"../../../../ui/text.mjs";import{useLoginModalStore as c}from"../../../../../store/modules/login-modal-store.mjs";import{profileMainMineTabOptions as l,profileMainProfileTabOptions as u}from"./variants.mjs";import{useEffect as d,useMemo as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useTranslations as h}from"next-intl";import{parseAsString as g,useQueryState as _}from"nuqs";function v(e){return e?[...l]:[...u]}function y(e,t){let n=v(t);return n.includes(e)?e:n[0]}function b({isMine:l,renderMode:u,className:b,children:x}){let S=h(`components.pages.profile`),{open:C}=c(),w=v(l),[T,E]=_(`tab`,g.withDefault(`collect`)),D=f(()=>y(T,l),[l,T]);d(()=>{T!==D&&E(D,{shallow:!1})},[D,E,T]);let O={collect:S(`client.collect`),like:S(`client.like`),history:S(`client.history`)},k=x;return u===`login-required`?k=m(n,{className:`flex gap-4 flex-col items-center justify-center py-10 text-center`,children:[p(s,{className:`text-base text-text1`,children:S(`client.loginToView`)}),p(t,{size:`lg`,variant:`secondary`,onClick:C,children:S(`client.loginNow`)})]}):u===`privacy-collect`?k=p(r,{type:`no-content`,text:S(`client.collectionNotPublic`)}):u===`privacy-like`&&(k=p(r,{type:`no-content`,text:S(`client.likeNotPublic`)})),m(n,{className:e(b),children:[p(n,{className:`border-b bg-bg1 sticky z-10 top-0 border-text1/5 h-10`,children:p(i,{value:D,onValueChange:e=>{E(e,{shallow:!1})},className:`w-fit`,children:p(a,{variant:`default`,className:`inline-flex h-9`,children:w.map(e=>p(o,{value:e,className:`p-2.5 !text-base !w-fit data-active:!text-lg data-active:font-bold`,children:O[e]},e))})})}),p(n,{className:`p-2`,children:k})]})}export{b as UserProfileMainShell};
2
+ "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{Box as r}from"../../../../ui/box.mjs";import{EmptyState as i}from"../../../../ui/empty.mjs";import{Tabs as a,TabsList as o,TabsTrigger as s}from"../../../../ui/tabs.mjs";import{Text as c}from"../../../../ui/text.mjs";import{useLoginModalStore as l}from"../../../../../store/modules/login-modal-store.mjs";import{profileMainMineTabOptions as u,profileMainProfileTabOptions as d}from"./variants.mjs";import{useEffect as f,useMemo as p,useRef as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useTranslations as _}from"next-intl";import{useRouter as v}from"next/navigation";import{parseAsString as y,useQueryState as b}from"nuqs";function x(e){return e?[...u]:[...d]}function S(e,t){let n=x(t);return n.includes(e)?e:n[0]}function C(e){let t=window.getComputedStyle(e);return/auto|scroll|overlay/.test(t.overflowY)}function w(e){if(typeof window>`u`)return null;let t=e?.parentElement??null;for(;t;){if(C(t))return t;t=t.parentElement}let n=document.getElementById(`app-scroll-container`);return n instanceof HTMLElement?n:null}function T(e){return typeof window>`u`?0:e?e.scrollTop:window.scrollY||window.pageYOffset||0}function E(e,t){if(!(typeof window>`u`)){if(e){e.scrollTo({top:t});return}window.scrollTo({top:t,left:0})}}function D({profileId:u,currentUserId:d,isMine:C,renderMode:D,className:O,children:k}){let A=v(),j=_(`components.pages.profile`),M=m(null),N=m(!1),P=l(e=>e.open),F=l(e=>e.isOpen),I=n(e=>e.isLogin),L=n(e=>e.userId),R=x(C),[z,B]=b(`tab`,y.withDefault(`collect`)),V=p(()=>S(z,C),[C,z]),H=C?d||L||``:u,U=p(()=>`profile-scroll:${H||(C?`mine`:`guest`)}:${V}`,[C,V,H]);f(()=>{z!==V&&B(V,{shallow:!1})},[V,B,z]),f(()=>{if(F&&!I){N.current=!0;return}!F&&N.current&&(N.current=!1,I&&A.refresh())},[F,A,I]),f(()=>{if(typeof window>`u`)return;let e=w(M.current),t=window.sessionStorage.getItem(U),n=t?Number(t):0;Number.isFinite(n)&&n>0&&requestAnimationFrame(()=>{E(e,n)});let r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{window.sessionStorage.setItem(U,String(T(e))),r=!1}))};return e?(e.addEventListener(`scroll`,i,{passive:!0}),()=>{e.removeEventListener(`scroll`,i)}):(window.addEventListener(`scroll`,i,{passive:!0}),()=>{window.removeEventListener(`scroll`,i)})},[U]);let W={collect:j(`client.collect`),like:j(`client.like`),history:j(`client.history`)},G=k;return D===`login-required`?G=g(r,{className:`flex gap-4 flex-col items-center justify-center py-10 text-center`,children:[h(c,{className:`text-base text-text1`,children:j(`client.loginToView`)}),h(t,{size:`lg`,variant:`secondary`,onClick:P,children:j(`client.loginNow`)})]}):D===`privacy-collect`?G=h(i,{type:`no-content`,text:j(`client.collectionNotPublic`)}):D===`privacy-like`&&(G=h(i,{type:`no-content`,text:j(`client.likeNotPublic`)})),g(r,{ref:M,className:e(O),children:[h(r,{className:`border-b bg-bg1 sticky z-10 top-0 border-text1/5 h-10`,children:h(a,{value:V,onValueChange:e=>{B(e,{shallow:!1})},className:`w-fit`,children:h(o,{variant:`default`,className:`inline-flex h-9`,children:R.map(e=>h(s,{value:e,className:`p-2.5 !text-base !w-fit data-active:!text-lg data-active:font-bold`,children:W[e]},e))})})}),h(r,{className:`p-2`,children:G})]})}export{D as UserProfileMainShell};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{pInteractionCheckFollow as n}from"../../../../../../../service/generated/client.mjs";import{pxToVw as r}from"../../../../../../../utils/helper.mjs";import{Avatar as i,AvatarFallback as a,AvatarImage as o}from"../../../../../../ui/avatar.mjs";import{Box as s}from"../../../../../../ui/box.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/link.mjs";import{useRequest as u}from"../../../../../../../hooks/query/use-query.mjs";import{defaultProps as d}from"../defaults/default-props.mjs";import f from"../../../../../../../assets/icons/follow_nor.mjs";import p from"../../../../../../../assets/icons/follow_sel.mjs";import{RecommendedUsersSkeleton as m}from"./recommended-users-skeleton.mjs";import{useEffect as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";const x={},S={list:[]};function C({props:C=x,styles:w,data:T=S}){function E(e){let t=new Set;return e.filter(e=>e.user_id?t.has(e.user_id)?!1:(t.add(e.user_id),!0):!0)}let D={...d,...C},{userId:O,isLogin:k}=t(),{title:A,avatarSize:j,followButtonSize:M,itemGap:N,listPadding:P,nameFontSize:F}=D,[I,L]=v(()=>E(T.list||[])),R=_(T.list),z=g(()=>I.map(e=>e.user_id).filter(Boolean),[I]),B=g(()=>z.join(`,`),[z]),{data:V}=u(g(()=>[`recommended-users`,`follow-status`,O,B],[B,O]),()=>n({follower_id:O,followee_ids:z}),{staleTime:0,enabled:!!k&&!!O&&z.length>0}),H=!!V?.data?.is_following_map;h(()=>{R.current!==T.list&&(R.current=T.list,L(E(T.list||[])))},[T.list]),h(()=>{let e=V?.data?.is_following_map;!e||Object.keys(e).length===0||L(t=>t.filter(e=>e.user_id?!(k&&O&&e.user_id===O):!0).map(t=>!t.user_id||e[t.user_id]===void 0?t:{...t,isFollow:!!e[t.user_id]}))},[V?.data?.is_following_map,k,O]);let U=w?e(w,{}):void 0,W=M+12;return b(s,{style:U,className:`mb-[16px]`,children:[y(c,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[8px] px-[12px] pt-[16px]`,children:A}),I&&I.length>0?y(s,{className:`overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:y(s,{className:`flex h-[62px]`,style:{paddingLeft:r(P),gap:r(N)},children:I.map((e,t)=>b(l,{href:`/profile/${e.user_id}`,className:`flex flex-col items-center shrink-0`,style:{paddingRight:t===I.length-1?r(P):0},children:[b(s,{className:`relative flex flex-col items-center`,children:[b(i,{size:`lg`,children:[e.avatar?y(o,{src:e.avatar,alt:e.nick_name}):null,y(a,{})]}),y(s,{className:`absolute`,style:{width:r(W),height:r(W),bottom:`-${r(W/2)}`,border:`${r(6)} solid rgba(255,255,255,0)`,boxSizing:`border-box`,borderRadius:`9999px`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:k?H?1:.6:1},children:k&&H&&e.isFollow?y(p,{width:M,height:M}):y(f,{width:M,height:M})})]}),y(c,{className:`text-center mt-[8px] text-text1 whitespace-nowrap overflow-hidden text-ellipsis`,style:{fontSize:r(F),maxWidth:r(j+20)},title:e.nick_name,children:e.nick_name})]},e.user_id||`user-${t}`))})}):y(m,{avatarSize:j,followButtonSize:M,itemGap:N,listPadding:P,nameFontSize:F,itemCount:7})]})}export{C as default};
2
+ "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{pInteractionCheckFollow as n}from"../../../../../../../service/generated/client.mjs";import{pxToVw as r}from"../../../../../../../utils/helper.mjs";import{Avatar as i,AvatarFallback as a,AvatarImage as o}from"../../../../../../ui/avatar.mjs";import{Box as s}from"../../../../../../ui/box.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/link.mjs";import{useRequest as u}from"../../../../../../../hooks/query/use-query.mjs";import d from"../../../../../../../assets/icons/follow_nor.mjs";import f from"../../../../../../../assets/icons/follow_sel.mjs";import{defaultProps as p}from"../defaults/default-props.mjs";import{RecommendedUsersSkeleton as m}from"./recommended-users-skeleton.mjs";import{useEffect as h,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";const x={},S={list:[]};function C({props:C=x,styles:w,data:T=S}){function E(e){let t=new Set;return e.filter(e=>e.user_id?t.has(e.user_id)?!1:(t.add(e.user_id),!0):!0)}let D={...p,...C},{userId:O,isLogin:k}=t(),{title:A,avatarSize:j,followButtonSize:M,itemGap:N,listPadding:P,nameFontSize:F}=D,[I,L]=v(()=>E(T.list||[])),R=_(T.list),z=g(()=>I.map(e=>e.user_id).filter(Boolean),[I]),B=g(()=>z.join(`,`),[z]),{data:V}=u(g(()=>[`recommended-users`,`follow-status`,O,B],[B,O]),()=>n({follower_id:O,followee_ids:z}),{staleTime:0,enabled:!!k&&!!O&&z.length>0}),H=!!V?.data?.is_following_map;h(()=>{R.current!==T.list&&(R.current=T.list,L(E(T.list||[])))},[T.list]),h(()=>{let e=V?.data?.is_following_map;!e||Object.keys(e).length===0||L(t=>t.filter(e=>e.user_id?!(k&&O&&e.user_id===O):!0).map(t=>!t.user_id||e[t.user_id]===void 0?t:{...t,isFollow:!!e[t.user_id]}))},[V?.data?.is_following_map,k,O]);let U=w?e(w,{}):void 0,W=M+12;return b(s,{style:U,className:`mb-[16px]`,children:[y(c,{as:`h2`,className:`text-[18px] font-bold text-text1 mb-[8px] px-[12px] pt-[16px]`,children:A}),I&&I.length>0?y(s,{className:`overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:y(s,{className:`flex h-[62px]`,style:{paddingLeft:r(P),gap:r(N)},children:I.map((e,t)=>b(l,{href:`/profile/${e.user_id}`,className:`flex flex-col items-center shrink-0`,style:{paddingRight:t===I.length-1?r(P):0},children:[b(s,{className:`relative flex flex-col items-center`,children:[b(i,{size:`lg`,children:[e.avatar?y(o,{src:e.avatar,alt:e.nick_name}):null,y(a,{})]}),y(s,{className:`absolute`,style:{width:r(W),height:r(W),bottom:`-${r(W/2)}`,border:`${r(6)} solid rgba(255,255,255,0)`,boxSizing:`border-box`,borderRadius:`9999px`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:k?H?1:.6:1},children:k&&H&&e.isFollow?y(f,{width:M,height:M}):y(d,{width:M,height:M})})]}),y(c,{className:`text-center mt-[8px] text-text1 whitespace-nowrap overflow-hidden text-ellipsis`,style:{fontSize:r(F),maxWidth:r(j+20)},title:e.nick_name,children:e.nick_name})]},e.user_id||`user-${t}`))})}):y(m,{avatarSize:j,followButtonSize:M,itemGap:N,listPadding:P,nameFontSize:F,itemCount:7})]})}export{C as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import{defaultProps as i}from"../defaults/default-props.mjs";import a from"../../../../../basics/search/variants/basic-search/index.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=i.gap}={...i,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...x},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(a,{props:h,events:{onClick:b}})]})}export{u as default};
2
+ "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import i from"../../../../../basics/search/variants/basic-search/index.mjs";import{defaultProps as a}from"../defaults/default-props.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=a.gap}={...a,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...x},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(i,{props:h,events:{onClick:b}})]})}export{u as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import{defaultProps as i}from"../defaults/default-props.mjs";import a from"../../../../../basics/search/variants/filter-search/index.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=i.gap}={...i,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...x},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(a,{props:h,events:{onClick:b}})]})}export{u as default};
2
+ "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import i from"../../../../../basics/search/variants/filter-search/index.mjs";import{defaultProps as a}from"../defaults/default-props.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=a.gap}={...a,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...x},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(i,{props:h,events:{onClick:b}})]})}export{u as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import{defaultProps as i}from"../defaults/default-props.mjs";import a from"../../../../../basics/search/variants/tag-search/index.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=i.gap}={...i,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=(e,t)=>{f?.onTagClick?.(e,t)},S=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...S},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(a,{props:h,events:{onClick:b,onTagClick:x}})]})}export{u as default};
2
+ "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{pxToVw as t}from"../../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../../ui/box.mjs";import r from"../../../../../basics/logo/variants/basic-logo/index.mjs";import i from"../../../../../basics/search/variants/tag-search/index.mjs";import{defaultProps as a}from"../defaults/default-props.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c={},l={list:[]};function u({props:u=c,styles:d,events:f,data:p=l}){let{logo:m,search:h,gap:g=a.gap}={...a,...u},{list:_}=p,v=()=>{f?.onLogoClick?.()},y=(e,t)=>{f?.onLogoChannelChange?.(e,t)},b=()=>{f?.onSearchClick?.()},x=(e,t)=>{f?.onTagClick?.(e,t)},S=d?e(d,{}):void 0;return s(n,{as:`header`,className:`w-full flex items-center px-[16px] py-[8px]`,style:{...g>0?{gap:t(g)}:void 0,...S},children:[o(r,{props:m,events:{onClick:v,onChannelChange:y},data:_}),o(i,{props:h,events:{onClick:b,onTagClick:x}})]})}export{u as default};
@@ -1,2 +1,2 @@
1
1
 
2
- import{business_exports as e}from"../../business/index.mjs";let t=function(e){return e[e.Banner=1]=`Banner`,e[e.CardGrid=2]=`CardGrid`,e[e.FeatureGrid=3]=`FeatureGrid`,e[e.RecommendedUsers=4]=`RecommendedUsers`,e}({});const n={[t.Banner]:{schemaName:`BasicBannerSchema`,componentName:`BasicBanner`},[t.FeatureGrid]:{schemaName:`BasicFeatureGridSchema`,componentName:`BasicFeatureGrid`},[t.RecommendedUsers]:{schemaName:`BasicRecommendedUsersSchema`,componentName:`BasicRecommendedUsers`}},r={1:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},2:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},3:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},4:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},5:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},6:{schemaName:`FullscreenVideoFeedSchema`,componentName:`FullscreenVideoClient`}},i={schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},a={6:{schemaName:`FullscreenPostFeedSchema`,componentName:`FullscreenFeedClient`}},o={schemaName:`BasicPostCardSchema`,componentName:`BasicPostCard`};function s(){let t={};for(let n of Object.keys(e)){if(!n.endsWith(`Schema`))continue;let r=e[n];r&&typeof r==`object`&&`dataSchema`in r&&(t[n]=r)}return t}function c(){let t={};for(let n of Object.keys(e)){if(n.endsWith(`Schema`)||n.endsWith(`DefaultData`))continue;let r=e[n];typeof r==`function`&&(t[n]=r)}return t}const l=s(),u=c();function d(e,s){return e.type===t.CardGrid?s?r[e.show_style]??i:a[e.show_style]??o:n[e.type]}function f(e,t){let n=d(e,t),r=l[n.schemaName];if(!r)return console.warn(`[extractDataByComponentType] 未找到 Schema: ${n.schemaName}`),null;let i=u[n.componentName];if(!i)return console.warn(`[extractDataByComponentType] 未找到组件: ${n.componentName}`),null;let a=r.dataSchema?.dataBinding?.field;if(!a)return console.warn(`[extractDataByComponentType] Schema ${n.schemaName} 缺少 dataBinding.field`),null;let o=e.data?.[a],s=Array.isArray(o)?o:[],c={component:i,data:{title:e.cn_name,list:s,icons:e.data?.icons??[],block_id:String(e.id??``),channel_id:String(e.channel_id??``),show_style:e.show_style}};return e.data?.cursor&&(c.data.cursor=String(e.data?.cursor??``)),e.show_style===6&&(c.data.bottom=56,c.data.top=42),c}function p(e,t){return!Array.isArray(e)||e.length===0?[]:e.map(e=>f(e,t)).filter(e=>e!==null)}export{t as ComponentType,p as extractDataByComponentType};
2
+ import e from"../../business/banner/variants/basic-banner/runtime/client.mjs";import{schema as t}from"../../business/banner/variants/basic-banner/schema/index.mjs";import n from"../../business/feature-grid/variants/basic-feature-grid/runtime/client.mjs";import{schema as r}from"../../business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import i from"../../business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs";import{schema as a}from"../../business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import o from"../../business/fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs";import{schema as s}from"../../business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import c from"../../business/home-recommend/variants/home-recommend-grid/runtime/client.mjs";import{schema as l}from"../../business/home-recommend/variants/home-recommend-grid/schema/index.mjs";import u from"../../business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs";import{schema as d}from"../../business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import f from"../../business/post-card/variants/basic-post-card/runtime/client.mjs";import{schema as p}from"../../business/post-card/variants/basic-post-card/schema/index.mjs";import m from"../../business/recommended-users/variants/basic-recommended-users/runtime/client.mjs";import{schema as h}from"../../business/recommended-users/variants/basic-recommended-users/schema/index.mjs";let g=function(e){return e[e.Banner=1]=`Banner`,e[e.CardGrid=2]=`CardGrid`,e[e.FeatureGrid=3]=`FeatureGrid`,e[e.RecommendedUsers=4]=`RecommendedUsers`,e}({});const _={[g.Banner]:{schemaName:`BasicBannerSchema`,componentName:`BasicBanner`},[g.FeatureGrid]:{schemaName:`BasicFeatureGridSchema`,componentName:`BasicFeatureGrid`},[g.RecommendedUsers]:{schemaName:`BasicRecommendedUsersSchema`,componentName:`BasicRecommendedUsers`}},v={1:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},2:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},3:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},4:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},5:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},6:{schemaName:`FullscreenVideoFeedSchema`,componentName:`FullscreenVideoClient`}},y={schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},b={6:{schemaName:`FullscreenPostFeedSchema`,componentName:`FullscreenFeedClient`}},x={schemaName:`BasicPostCardSchema`,componentName:`BasicPostCard`},S={BasicBannerSchema:t,BasicFeatureGridSchema:r,BasicPostCardSchema:p,BasicRecommendedUsersSchema:h,FullscreenPostFeedSchema:a,FullscreenVideoFeedSchema:s,HomeRecommendGridSchema:l,HomeRecommendWaterfallSchema:d},C={BasicBanner:e,BasicFeatureGrid:n,BasicPostCard:f,BasicRecommendedUsers:m,FullscreenFeedClient:i,FullscreenVideoClient:o,HomeRecommendGrid:c,HomeRecommendWaterfall:u};function w(e,t){return e.type===g.CardGrid?t?v[e.show_style]??y:b[e.show_style]??x:_[e.type]}function T(e,t){let n=w(e,t),r=S[n.schemaName];if(!r)return console.warn(`[extractDataByComponentType] 未找到 Schema: ${n.schemaName}`),null;let i=C[n.componentName];if(!i)return console.warn(`[extractDataByComponentType] 未找到组件: ${n.componentName}`),null;let a=r.dataSchema?.dataBinding?.field;if(!a)return console.warn(`[extractDataByComponentType] Schema ${n.schemaName} 缺少 dataBinding.field`),null;let o=e.data?.[a],s=Array.isArray(o)?o:[],c={component:i,data:{title:e.cn_name,list:s,icons:e.data?.icons??[],block_id:String(e.id??``),channel_id:String(e.channel_id??``),show_style:e.show_style}};return e.data?.cursor&&(c.data.cursor=String(e.data?.cursor??``)),e.show_style===6&&(c.data.bottom=56,c.data.top=42),c}function E(e,t){return!Array.isArray(e)||e.length===0?[]:e.map(e=>T(e,t)).filter(e=>e!==null)}export{g as ComponentType,E as extractDataByComponentType};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gUserGetUserInfo as t}from"../../../service/generated/client.mjs";import{Toaster as n}from"../../ui/sonner.mjs";import{useRequest as r}from"../../../hooks/query/use-query.mjs";import{MediaPreview as i}from"../media-preview/index.mjs";import{CollectionPopupHost as a}from"../collection-popup/index.mjs";import{IntlProvider as o}from"../intl-provider/intl-provider.mjs";import{BlockedDialog as s}from"../blocked-dialog/blocked-dialog.mjs";import{LoginDialog as c}from"../login-dialog/login-dialog.mjs";import{useEffect as l,useRef as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{QueryClient as h,QueryClientProvider as g}from"@tanstack/react-query";import{useRouter as _}from"next/navigation";import{NuqsAdapter as v}from"nuqs/adapters/next/app";function y(){let{userId:n,setUserInfo:i}=e(),a={code:0,message:``,data:{}},{data:o}=r([`user-init`,n],()=>n?t({user_id:n}):Promise.resolve(a),{enabled:!!n});return l(()=>{if(!n)return;let e=o?.data;e&&i(e)},[i,n,o]),null}function b(t){let{queryClient:r,intl:b,children:x}=t,[S]=d(()=>new h),C=r??S,w=_(),T=e(e=>e.isLogin&&!!e.token&&!!e.userId),E=u(T);l(()=>{E.current&&!T&&(C.clear(),w.refresh()),E.current=T},[T,C,w]);let D=m(f,{children:[p(y,{}),x,p(s,{}),p(c,{}),p(a,{}),p(n,{position:`top-center`}),p(i,{})]});return p(g,{client:C,children:p(v,{children:p(o,{...b,children:D})})})}export{b as FunhubProvider};
2
+ "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gUserGetUserInfo as t}from"../../../service/generated/client.mjs";import{Toaster as n}from"../../ui/sonner.mjs";import{useRequest as r}from"../../../hooks/query/use-query.mjs";import{MediaPreview as i}from"../media-preview/index.mjs";import{CollectionPopupHost as a}from"../collection-popup/index.mjs";import{IntlProvider as o}from"../intl-provider/intl-provider.mjs";import{BlockedDialog as s}from"../blocked-dialog/blocked-dialog.mjs";import{LoginDialog as c}from"../login-dialog/login-dialog.mjs";import{useEffect as l,useRef as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{useRouter as h}from"next/navigation";import{QueryClient as g,QueryClientProvider as _}from"@tanstack/react-query";import{NuqsAdapter as v}from"nuqs/adapters/next/app";function y(){let{userId:n,setUserInfo:i}=e(),a={code:0,message:``,data:{}},{data:o}=r([`user-init`,n],()=>n?t({user_id:n}):Promise.resolve(a),{enabled:!!n});return l(()=>{if(!n)return;let e=o?.data;e&&i(e)},[i,n,o]),null}function b(t){let{queryClient:r,intl:b,children:x}=t,[S]=d(()=>new g),C=r??S,w=h(),T=e(e=>e.isLogin&&!!e.token&&!!e.userId),E=u(T);l(()=>{E.current&&!T&&(C.clear(),w.refresh()),E.current=T},[T,C,w]);let D=m(f,{children:[p(y,{}),x,p(s,{}),p(c,{}),p(a,{}),p(n,{position:`top-center`}),p(i,{})]});return p(_,{client:C,children:p(v,{children:p(o,{...b,children:D})})})}export{b as FunhubProvider};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Button as e}from"../../ui/button.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,gUserViewUserInfo as r,pCommunityDeleteCollection as i,pCommunityRemoveContentFromCollection as a,pCommunitySubscribeCollection as o,pInteractionBatchDeleteCollects as s}from"../../../service/generated/client.mjs";import{Box as c}from"../../ui/box.mjs";import{Checkbox as ee}from"../../ui/checkbox.mjs";import{Drawer as te,DrawerContent as ne,DrawerDescription as re,DrawerTitle as ie}from"../../ui/drawer.mjs";import{List as ae}from"../../ui/list.mjs";import{Text as l}from"../../ui/text.mjs";import{useDeleteRequest as oe,useMutation as u,useRequest as d,useUpdateRequest as se}from"../../../hooks/query/use-query.mjs";import{useLoginModalStore as ce}from"../../../store/modules/login-modal-store.mjs";import{ShareDrawer as le}from"../../common/share-popup/share-drawer.mjs";import{SharePlatformEnum as f}from"../../../types/share.mjs";import p from"../../../utils/share-manager.mjs";import{HeaderNav as m}from"../../common/header-nav/client.mjs";import{MoreIcon as h}from"../../common/icons/more.mjs";import{CollectionDetailCard as g}from"./_components/collection-detail-card.mjs";import{useMemo as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as ue}from"next-intl";import{useRouter as S,useSearchParams as de}from"next/navigation";function C(e){if(e.cover_image)return e.cover_image;let t=``;return e.medias?.find(e=>e?(!e.is_video&&!t&&e.media_url&&(t=e.media_url),!!e.cover_image):!1)?.cover_image||t}function w(e){let t=e.detail.info?.video_duration;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return Math.floor(t);let n=e.medias?.find(e=>{let t=e?.video_duration;return typeof t==`number`&&Number.isFinite(t)&&t>0})?.video_duration;return typeof n==`number`&&Number.isFinite(n)&&n>0?Math.floor(n):0}function T(e){let t=e.detail.info?.play_count;if(typeof t==`number`&&Number.isFinite(t))return Math.max(0,Math.floor(t));let n=e.detail.view_count;return typeof n==`number`&&Number.isFinite(n)?Math.max(0,Math.floor(n)):0}function fe(e){let t=e.detail,n=t.info,r=n?.cover_image||t.cover_image||C(e),i=n?.text||n?.title||t.title||t.content||``,a=t.author_score??0,o=t.tags??[];return{id:e.content_id?String(e.content_id):String(e.id),title:i,type:e.type,coverImage:r,score:a,collectedAt:t.create_time,tags:o,duration:w(e),viewCount:T(e),publishTime:t.create_time||t.update_time||``,is_more_link:n?.is_more_link??!1,authorName:``}}function E({id:C}){let w=ue(`components.pages.collectionDetail`),T=S(),E=de(),{userId:D,isLogin:O}=t(),{open:k}=ce(),A=oe();se();let j=d([`collection-detail`,C],()=>n({collection_id:C})),M=j.data?.data?.data?.collection?.user_id,N=!!(M&&D&&String(M)===String(D)),P=d([`user-info`,M],()=>r({target_user_id:M,user_id:M})),[F,I]=v(!1),[L,R]=v(!1),[z,B]=v(!1),[V,H]=v(()=>new Set),[U,W]=v(null),G=j.data?.data?.data?.collection,K=G?.contents,q=_(()=>K?K.map(e=>({content_id:e.content_id,id:Number(e.content_id),detail:e,type:Number(e.source_type??0),medias:e.medias,cover_image:e.cover_image})):[],[K]).map(fe),J=_(()=>new Set(q.map(e=>e.id)),[q]),Y=J.size>0&&V.size===J.size;G?.cover_image,G?.content_count,G?.is_subscribe;let{mutateAsync:pe,isPending:me}=u(async e=>await o({collection_id:C,subscribe:e})),{mutateAsync:he,isPending:ge}=u(async e=>await a({collection_id:C,content_id:e})),{mutateAsync:_e,isPending:X}=u(async e=>await i({collection_id:e})),{mutateAsync:ve,isPending:Z}=u(async e=>await s({app_id:0,user_id:D,folder_id:C,content_type:1,content_ids:e})),Q=P.data?.data;Q?.avatar,Q?.nick_name;let ye=N&&G?.is_default===!1;function be(e){W({kind:`content`,id:e.id,type:e.type,title:e.title,isCollected:!0}),I(!0)}function xe(){if(N){R(!0);return}W({kind:`collection`,id:C}),I(!0)}function Se(){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}if(!N){x.error(w(`detail.operationFailed`));return}R(!1),H(new Set),B(!0)}function Ce(){H(new Set),B(!1)}function we(e){H(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function Te(){if(Y){H(new Set);return}H(new Set(J))}async function Ee(){if(!(V.size===0||Z)){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}try{let e=await ve(Array.from(V));if(e.code===0){x.success(w(`detail.uncollectSuccess`)),A([`collection-detail`,C]),A([`user-profile`,`mine`]),A([`user-profile`,`profile`,M]),H(new Set),B(!1);return}x.error(e.message||w(`detail.uncollectFailed`))}catch(e){console.error(`批量取消收藏失败`,e),x.error(w(`detail.operationFailed`))}}}function De(e){if(typeof window>`u`)return``;if(e.kind===`collection`)return`${window.location.origin}/collection/${e.id}`;let t=e.title?encodeURIComponent(e.title):`detail`,n=e.type===1?`/video/${e.id}/${t}`:`/post/${e.id}`;return`${window.location.origin}${n}`}function $(e){if(!U)return;let t=De(U);t&&p.showSharePopup({type:e,data:{id:U.id},copyUrl:t})}function Oe(){$(f.WECHAT)}function ke(){$(f.QQ)}function Ae(){$(f.WECHAT_MOMENTS)}function je(){if(!ge){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}!U||U.kind!==`content`||he(U.id).then(e=>{if(e.code===0){x.success(w(`detail.uncollectSuccess`)),A([`collection-detail`,C]),W(e=>e&&{...e,isCollected:!1});return}x.error(e.message||w(`detail.uncollectFailed`))}).catch(e=>{console.error(`取消收藏失败`,e),x.error(w(`detail.operationFailed`))})}}function Me(){let e=new URLSearchParams(E.toString());e.set(`id`,C),e.set(`type`,`edit`),T.push(`/collection/create?${e.toString()}`),R(!1),I(!1)}async function Ne(){if(!X){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}if(!ye){x.error(w(`detail.defaultCollectionDeleteNotSupported`));return}try{let e=await _e(C);if(e.code===0){x.success(w(`detail.deleteSuccess`)),A([`collection-detail`,C]),A([`user-profile`,`mine`]),A([`user-profile`,`profile`,M]),R(!1),I(!1),T.back();return}x.error(e.message||w(`detail.deleteFailed`))}catch(e){console.error(`删除合集失败`,e),x.error(w(`detail.operationFailed`))}}}return b(c,{className:`flex flex-col bg-bg1 min-h-screen ${z?`pb-28`:`pb-6`}`,children:[y(m,{title:G?.title??``,rightChild:N?z?y(`button`,{type:`button`,onClick:Ce,className:`px-2 py-1 text-sm text-text1`,children:w(`detail.done`)}):y(`button`,{type:`button`,onClick:xe,className:`p-2`,children:y(h,{})}):void 0}),y(c,{className:`px-4 flex items-start gap-4`,children:b(c,{className:`flex-1 flex flex-col gap-2`,children:[y(c,{className:`flex items-center justify-between`,children:y(l,{className:`text-xl text-text1 font-medium line-clamp-2`,children:G?.title??w(`detail.defaultTitle`)})}),y(c,{className:`text-text2 text-sm`,children:G?.description})]})}),y(c,{className:`px-4 ${z?`pb-20`:``}`,children:y(ae,{loading:j.isLoading,hasMore:!1,emptyText:w(`detail.emptyContent`),className:`divide-y divide-text1/5`,children:q.map(e=>y(g,{...e,onOpenShare:be,isEditMode:z,isSelected:V.has(e.id),onToggleSelection:we},e.id))})}),z&&b(c,{style:{paddingBottom:`calc(12px + env(safe-area-inset-bottom, 0px))`},className:`fixed left-0 right-0 bottom-0 z-10 bg-bg1 border-t border-text1/10 px-4 pt-3 flex items-center justify-between`,children:[b(c,{className:`flex items-center gap-2`,children:[y(ee,{checked:Y,onCheckedChange:Te}),y(l,{className:`text-sm text-text1`,children:w(`detail.selectAll`)})]}),y(e,{className:`rounded-full py-2.5 h-auto px-6.5`,variant:V.size>0?`default`:`outline`,disabled:V.size===0||Z,onClick:Ee,children:w(Z?`detail.deleting`:`detail.delete`)})]}),b(te,{open:L,onOpenChange:R,children:[y(ie,{className:`hidden`,children:w(`detail.collectionManageTitle`)}),y(re,{className:`hidden`,children:w(`detail.collectionManageTitle`)}),b(ne,{className:`z-[2000]`,children:[b(c,{className:`px-4 py-5`,children:[y(l,{className:`text-sm text-text1 text-center font-medium`,children:w(`detail.collectionManageTitle`)}),b(c,{className:`mt-4 border-t border-text1/10`,children:[y(`button`,{className:`w-full text-left py-4 border-b border-text1/10`,onClick:Me,children:y(l,{className:`text-text1`,children:w(`detail.editCollection`)})}),y(`button`,{className:`w-full text-left py-4 border-b border-text1/10`,onClick:Se,children:y(l,{className:`text-text1`,children:w(`detail.manageCollection`)})}),y(`button`,{className:`w-full text-left py-4 ${X?`opacity-60 cursor-not-allowed`:``}`,onClick:Ne,disabled:X,children:y(l,{className:`text-destructive`,children:w(X?`detail.deleting`:`detail.deleteCollection`)})})]})]}),y(e,{className:`w-full h-auto py-4 text-lg text-text1`,size:`lg`,onClick:()=>R(!1),variant:`secondary`,children:w(`detail.cancel`)})]})]}),y(le,{isShowCollect:U?.kind===`content`&&N&&O,isCollected:U?.isCollected,open:F,onOpenChange:I,onShareWeChat:Oe,onShareQQ:ke,onShareMoments:Ae,onUncollect:je})]})}export{E as CollectionDetail};
2
+ "use client";import{Button as e}from"../../ui/button.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,gUserViewUserInfo as r,pCommunityDeleteCollection as i,pCommunityRemoveContentFromCollection as a,pCommunitySubscribeCollection as o,pInteractionBatchDeleteCollects as s}from"../../../service/generated/client.mjs";import{Box as c}from"../../ui/box.mjs";import{Checkbox as ee}from"../../ui/checkbox.mjs";import{Drawer as te,DrawerContent as ne,DrawerDescription as re,DrawerTitle as ie}from"../../ui/drawer.mjs";import{List as ae}from"../../ui/list.mjs";import{Text as l}from"../../ui/text.mjs";import{useLoginModalStore as oe}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as se,useMutation as u,useRequest as d,useUpdateRequest as ce}from"../../../hooks/query/use-query.mjs";import{ShareDrawer as le}from"../../common/share-popup/share-drawer.mjs";import{SharePlatformEnum as f}from"../../../types/share.mjs";import p from"../../../utils/share-manager.mjs";import{HeaderNav as m}from"../../common/header-nav/client.mjs";import{MoreIcon as h}from"../../common/icons/more.mjs";import{CollectionDetailCard as g}from"./_components/collection-detail-card.mjs";import{useMemo as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{toast as x}from"sonner";import{useTranslations as ue}from"next-intl";import{useRouter as S,useSearchParams as de}from"next/navigation";function C(e){if(e.cover_image)return e.cover_image;let t=``;return e.medias?.find(e=>e?(!e.is_video&&!t&&e.media_url&&(t=e.media_url),!!e.cover_image):!1)?.cover_image||t}function w(e){let t=e.detail.info?.video_duration;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return Math.floor(t);let n=e.medias?.find(e=>{let t=e?.video_duration;return typeof t==`number`&&Number.isFinite(t)&&t>0})?.video_duration;return typeof n==`number`&&Number.isFinite(n)&&n>0?Math.floor(n):0}function T(e){let t=e.detail.info?.play_count;if(typeof t==`number`&&Number.isFinite(t))return Math.max(0,Math.floor(t));let n=e.detail.view_count;return typeof n==`number`&&Number.isFinite(n)?Math.max(0,Math.floor(n)):0}function fe(e){let t=e.detail,n=t.info,r=n?.cover_image||t.cover_image||C(e),i=n?.text||n?.title||t.title||t.content||``,a=t.author_score??0,o=t.tags??[];return{id:e.content_id?String(e.content_id):String(e.id),title:i,type:e.type,coverImage:r,score:a,collectedAt:t.create_time,tags:o,duration:w(e),viewCount:T(e),publishTime:t.create_time||t.update_time||``,is_more_link:n?.is_more_link??!1,authorName:``}}function E({id:C}){let w=ue(`components.pages.collectionDetail`),T=S(),E=de(),{userId:D,isLogin:O}=t(),{open:k}=oe(),A=se();ce();let j=d([`collection-detail`,C],()=>n({collection_id:C})),M=j.data?.data?.data?.collection?.user_id,N=!!(M&&D&&String(M)===String(D)),P=d([`user-info`,M],()=>r({target_user_id:M,user_id:M})),[F,I]=v(!1),[L,R]=v(!1),[z,B]=v(!1),[V,H]=v(()=>new Set),[U,W]=v(null),G=j.data?.data?.data?.collection,K=G?.contents,q=_(()=>K?K.map(e=>({content_id:e.content_id,id:Number(e.content_id),detail:e,type:Number(e.source_type??0),medias:e.medias,cover_image:e.cover_image})):[],[K]).map(fe),J=_(()=>new Set(q.map(e=>e.id)),[q]),Y=J.size>0&&V.size===J.size;G?.cover_image,G?.content_count,G?.is_subscribe;let{mutateAsync:pe,isPending:me}=u(async e=>await o({collection_id:C,subscribe:e})),{mutateAsync:he,isPending:ge}=u(async e=>await a({collection_id:C,content_id:e})),{mutateAsync:_e,isPending:X}=u(async e=>await i({collection_id:e})),{mutateAsync:ve,isPending:Z}=u(async e=>await s({app_id:0,user_id:D,folder_id:C,content_type:1,content_ids:e})),Q=P.data?.data;Q?.avatar,Q?.nick_name;let ye=N&&G?.is_default===!1;function be(e){W({kind:`content`,id:e.id,type:e.type,title:e.title,isCollected:!0}),I(!0)}function xe(){if(N){R(!0);return}W({kind:`collection`,id:C}),I(!0)}function Se(){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}if(!N){x.error(w(`detail.operationFailed`));return}R(!1),H(new Set),B(!0)}function Ce(){H(new Set),B(!1)}function we(e){H(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function Te(){if(Y){H(new Set);return}H(new Set(J))}async function Ee(){if(!(V.size===0||Z)){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}try{let e=await ve(Array.from(V));if(e.code===0){x.success(w(`detail.uncollectSuccess`)),A([`collection-detail`,C]),A([`user-profile`,`mine`]),A([`user-profile`,`profile`,M]),H(new Set),B(!1);return}x.error(e.message||w(`detail.uncollectFailed`))}catch(e){console.error(`批量取消收藏失败`,e),x.error(w(`detail.operationFailed`))}}}function De(e){if(typeof window>`u`)return``;if(e.kind===`collection`)return`${window.location.origin}/collection/${e.id}`;let t=e.title?encodeURIComponent(e.title):`detail`,n=e.type===1?`/video/${e.id}/${t}`:`/post/${e.id}`;return`${window.location.origin}${n}`}function $(e){if(!U)return;let t=De(U);t&&p.showSharePopup({type:e,data:{id:U.id},copyUrl:t})}function Oe(){$(f.WECHAT)}function ke(){$(f.QQ)}function Ae(){$(f.WECHAT_MOMENTS)}function je(){if(!ge){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}!U||U.kind!==`content`||he(U.id).then(e=>{if(e.code===0){x.success(w(`detail.uncollectSuccess`)),A([`collection-detail`,C]),W(e=>e&&{...e,isCollected:!1});return}x.error(e.message||w(`detail.uncollectFailed`))}).catch(e=>{console.error(`取消收藏失败`,e),x.error(w(`detail.operationFailed`))})}}function Me(){let e=new URLSearchParams(E.toString());e.set(`id`,C),e.set(`type`,`edit`),T.push(`/collection/create?${e.toString()}`),R(!1),I(!1)}async function Ne(){if(!X){if(!O||!D){x.error(w(`detail.pleaseLogin`)),k();return}if(!ye){x.error(w(`detail.defaultCollectionDeleteNotSupported`));return}try{let e=await _e(C);if(e.code===0){x.success(w(`detail.deleteSuccess`)),A([`collection-detail`,C]),A([`user-profile`,`mine`]),A([`user-profile`,`profile`,M]),R(!1),I(!1),T.back();return}x.error(e.message||w(`detail.deleteFailed`))}catch(e){console.error(`删除合集失败`,e),x.error(w(`detail.operationFailed`))}}}return b(c,{className:`flex flex-col bg-bg1 min-h-screen ${z?`pb-28`:`pb-6`}`,children:[y(m,{title:G?.title??``,rightChild:N?z?y(`button`,{type:`button`,onClick:Ce,className:`px-2 py-1 text-sm text-text1`,children:w(`detail.done`)}):y(`button`,{type:`button`,onClick:xe,className:`p-2`,children:y(h,{})}):void 0}),y(c,{className:`px-4 flex items-start gap-4`,children:b(c,{className:`flex-1 flex flex-col gap-2`,children:[y(c,{className:`flex items-center justify-between`,children:y(l,{className:`text-xl text-text1 font-medium line-clamp-2`,children:G?.title??w(`detail.defaultTitle`)})}),y(c,{className:`text-text2 text-sm`,children:G?.description})]})}),y(c,{className:`px-4 ${z?`pb-20`:``}`,children:y(ae,{loading:j.isLoading,hasMore:!1,emptyText:w(`detail.emptyContent`),className:`divide-y divide-text1/5`,children:q.map(e=>y(g,{...e,onOpenShare:be,isEditMode:z,isSelected:V.has(e.id),onToggleSelection:we},e.id))})}),z&&b(c,{style:{paddingBottom:`calc(12px + env(safe-area-inset-bottom, 0px))`},className:`fixed left-0 right-0 bottom-0 z-10 bg-bg1 border-t border-text1/10 px-4 pt-3 flex items-center justify-between`,children:[b(c,{className:`flex items-center gap-2`,children:[y(ee,{checked:Y,onCheckedChange:Te}),y(l,{className:`text-sm text-text1`,children:w(`detail.selectAll`)})]}),y(e,{className:`rounded-full py-2.5 h-auto px-6.5`,variant:V.size>0?`default`:`outline`,disabled:V.size===0||Z,onClick:Ee,children:w(Z?`detail.deleting`:`detail.delete`)})]}),b(te,{open:L,onOpenChange:R,children:[y(ie,{className:`hidden`,children:w(`detail.collectionManageTitle`)}),y(re,{className:`hidden`,children:w(`detail.collectionManageTitle`)}),b(ne,{className:`z-[2000]`,children:[b(c,{className:`px-4 py-5`,children:[y(l,{className:`text-sm text-text1 text-center font-medium`,children:w(`detail.collectionManageTitle`)}),b(c,{className:`mt-4 border-t border-text1/10`,children:[y(`button`,{className:`w-full text-left py-4 border-b border-text1/10`,onClick:Me,children:y(l,{className:`text-text1`,children:w(`detail.editCollection`)})}),y(`button`,{className:`w-full text-left py-4 border-b border-text1/10`,onClick:Se,children:y(l,{className:`text-text1`,children:w(`detail.manageCollection`)})}),y(`button`,{className:`w-full text-left py-4 ${X?`opacity-60 cursor-not-allowed`:``}`,onClick:Ne,disabled:X,children:y(l,{className:`text-destructive`,children:w(X?`detail.deleting`:`detail.deleteCollection`)})})]})]}),y(e,{className:`w-full h-auto py-4 text-lg text-text1`,size:`lg`,onClick:()=>R(!1),variant:`secondary`,children:w(`detail.cancel`)})]})]}),y(le,{isShowCollect:U?.kind===`content`&&N&&O,isCollected:U?.isCollected,open:F,onOpenChange:I,onShareWeChat:Oe,onShareQQ:ke,onShareMoments:Ae,onUncollect:je})]})}export{E as CollectionDetail};
@@ -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{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};
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{useLoginModalStore as a}from"../../../store/modules/login-modal-store.mjs";import{useRequest as o}from"../../../hooks/query/use-query.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}=o([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}=o(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}=o(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(()=>{a.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
- 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{defaultLocale as i,isValidLocale as a,resolveLocaleByPriority as o,resolveLocaleFromAcceptLanguage as s}from"../../../i18n.mjs";import{getTranslator as c}from"../../../i18n/translator.mjs";import l from"./feed-series-client.mjs";import{Suspense as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{cookies as p,headers as m}from"next/headers";function h(e){return a(e)?e:i}function g(e){return c(e)(`components.pages.feedSeries.page.videoLoading`)}function _({loadingText:e}){return f(`div`,{className:`relative h-screen w-full overflow-hidden bg-black text-white`,children:[d(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.14),rgba(0,0,0,0.9)_55%)]`}),d(`div`,{className:`absolute left-0 top-0 z-20 w-full px-4 pt-[max(env(safe-area-inset-top),14px)]`,children:d(`div`,{className:`h-10 w-full animate-pulse rounded-full bg-white/15`})}),d(`div`,{className:`pointer-events-none absolute inset-0 z-10 flex items-center justify-center`,children:f(`div`,{className:`relative flex h-[92px] w-[92px] items-center justify-center`,children:[d(`span`,{className:`absolute h-[68px] w-[68px] rounded-full bg-black/55 backdrop-blur-sm`}),d(`span`,{className:`h-10 w-10 animate-spin rounded-full border-[3px] border-white/25 border-t-white`})]})}),d(`div`,{className:`pointer-events-none absolute left-0 right-0 top-[calc(50%+62px)] z-10 text-center text-xs text-white/70`,children:e}),f(`div`,{className:`absolute right-3 bottom-10 z-20 flex flex-col items-center gap-4`,children:[d(`div`,{className:`h-12 w-12 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`})]}),f(`div`,{className:`absolute bottom-0 left-0 right-[56px] z-20 p-4`,children:[d(`div`,{className:`mb-3 h-5 w-[120px] animate-pulse rounded bg-white/20`}),d(`div`,{className:`mb-2 h-4 w-[75%] animate-pulse rounded bg-white/15`}),d(`div`,{className:`mb-4 h-4 w-[58%] animate-pulse rounded bg-white/15`}),d(`div`,{className:`h-10 w-full animate-pulse rounded-lg bg-white/20`})]})]})}async function v(i){let a=i?.params||{},o=a.seriesId||``,s=n(a.episodeNum,1),c=[];if(o){let t=await e({id:o});r(t?.data?.video?.links,s),c.push({queryKey:[`feed-series-detail`,o],queryFn:()=>Promise.resolve(t)})}return d(t,{prefetch:c,children:d(l,{...i})})}async function y(e){let t=await p(),n=await m();return d(u,{fallback:d(_,{loadingText:g(h(o(t.get(`NEXT_LOCALE`)?.value,s(n.get(`accept-language`)),i)))}),children:d(v,{...e})})}export{y as default};
2
+ import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{normalizeEpisodeNumber as t,warmupProcessM3u8Auto as n}from"../../common/video-player/process-m3u8-cache.mjs";import{HydrationBoundary as r}from"../../../hooks/query/hydration-boundary.mjs";import{defaultLocale as i,isValidLocale as a,resolveLocaleByPriority as o,resolveLocaleFromAcceptLanguage as s}from"../../../i18n.mjs";import{getTranslator as c}from"../../../i18n/translator.mjs";import l from"./feed-series-client.mjs";import{Suspense as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{cookies as p,headers as m}from"next/headers";function h(e){return a(e)?e:i}function g(e){return c(e)(`components.pages.feedSeries.page.videoLoading`)}function _({loadingText:e}){return f(`div`,{className:`relative h-screen w-full overflow-hidden bg-black text-white`,children:[d(`div`,{className:`absolute inset-0 bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.14),rgba(0,0,0,0.9)_55%)]`}),d(`div`,{className:`absolute left-0 top-0 z-20 w-full px-4 pt-[max(env(safe-area-inset-top),14px)]`,children:d(`div`,{className:`h-10 w-full animate-pulse rounded-full bg-white/15`})}),d(`div`,{className:`pointer-events-none absolute inset-0 z-10 flex items-center justify-center`,children:f(`div`,{className:`relative flex h-[92px] w-[92px] items-center justify-center`,children:[d(`span`,{className:`absolute h-[68px] w-[68px] rounded-full bg-black/55 backdrop-blur-sm`}),d(`span`,{className:`h-10 w-10 animate-spin rounded-full border-[3px] border-white/25 border-t-white`})]})}),d(`div`,{className:`pointer-events-none absolute left-0 right-0 top-[calc(50%+62px)] z-10 text-center text-xs text-white/70`,children:e}),f(`div`,{className:`absolute right-3 bottom-10 z-20 flex flex-col items-center gap-4`,children:[d(`div`,{className:`h-12 w-12 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`}),d(`div`,{className:`h-6 w-6 animate-pulse rounded-full bg-white/20`})]}),f(`div`,{className:`absolute bottom-0 left-0 right-[56px] z-20 p-4`,children:[d(`div`,{className:`mb-3 h-5 w-[120px] animate-pulse rounded bg-white/20`}),d(`div`,{className:`mb-2 h-4 w-[75%] animate-pulse rounded bg-white/15`}),d(`div`,{className:`mb-4 h-4 w-[58%] animate-pulse rounded bg-white/15`}),d(`div`,{className:`h-10 w-full animate-pulse rounded-lg bg-white/20`})]})]})}async function v(i){let a=i?.params||{},o=a.seriesId||``,s=t(a.episodeNum,1),c=[];if(o){let t=await e({id:o});n(t?.data?.video?.links,s),c.push({queryKey:[`feed-series-detail`,o],queryFn:()=>Promise.resolve(t)})}return d(r,{prefetch:c,children:d(l,{...i})})}async function y(e){let t=await p(),n=await m();return d(u,{fallback:d(_,{loadingText:g(h(o(t.get(`NEXT_LOCALE`)?.value,s(n.get(`accept-language`)),i)))}),children:d(v,{...e})})}export{y as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{hashPassword as e}from"../../../utils/common.mjs";import{pUserLogin as t}from"../../../service/generated/client.mjs";import{Box as n}from"../../ui/box.mjs";import{useDeleteRequest as r}from"../../../hooks/query/use-query.mjs";import{useLoginModalStore as i}from"../../../store/modules/login-modal-store.mjs";import{useSetAuthFields as a}from"../../../hooks/use-auth.mjs";import{Forgot as o}from"./forgot.mjs";import{LoginClient as s}from"./login-client.mjs";import{Password as c}from"./password.mjs";import{Register as l}from"./register.mjs";import{ResetPassword as u}from"./reset-password.mjs";import{Verify as d}from"./verify.mjs";import{useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{toast as h}from"sonner";import{useTranslations as g}from"next-intl";function _(_){let{initialStep:v=`login`}=_,{close:y,resolveLogin:b}=i(),[x,S]=f(v),[C,w]=f(``),T=a(),[E,D]=f(``),O=r(),k=g(`components.pages.login`);return m(n,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col fixed top-0 left-0 right-0 bottom-0 z-50`,children:[x===`login`&&p(s,{onRegister:()=>S(`register`),onForgotPassword:()=>S(`forgot`),errorText:E,onSubmit:async n=>{D(``);try{let r=e(n.password),{data:i}=await t({email:n.email,password:r});T({token:i.token,expireTime:i.expire_time,userId:i.user_id}),h.success(k(`index.loginSuccess`)),O([`user-profile`,`mine`]),b(!0)}catch(e){D(e.message??k(`index.loginFailed`))}},onClose:()=>{y()}}),x===`register`&&p(l,{onLogin:()=>S(`login`),onClose:()=>S(`login`),onVerify:e=>{w(e),S(`verify`)}}),x===`forgot`&&p(o,{onLogin:()=>S(`login`),onClose:()=>S(`login`),onVerify:e=>{w(e),S(`verify`)}}),x===`reset-password`&&p(u,{onClose:()=>{y()},onPassword:e=>{w(e??``),S(`password`)}}),x===`verify`&&p(d,{email:C,onClose:()=>S(`register`),onPassword:e=>{w(e),S(`password`)}}),x===`password`&&p(c,{email:C,onClose:()=>S(`verify`)})]})}export{_ as Login};
2
+ "use client";import{hashPassword as e}from"../../../utils/common.mjs";import{pUserLogin as t}from"../../../service/generated/client.mjs";import{Box as n}from"../../ui/box.mjs";import{useLoginModalStore as r}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as i}from"../../../hooks/query/use-query.mjs";import{useSetAuthFields as a}from"../../../hooks/use-auth.mjs";import{Forgot as o}from"./forgot.mjs";import{LoginClient as s}from"./login-client.mjs";import{Password as c}from"./password.mjs";import{Register as l}from"./register.mjs";import{ResetPassword as u}from"./reset-password.mjs";import{Verify as d}from"./verify.mjs";import{useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{toast as h}from"sonner";import{useTranslations as g}from"next-intl";function _(_){let{initialStep:v=`login`}=_,{close:y,resolveLogin:b}=r(),[x,S]=f(v),[C,w]=f(``),T=a(),[E,D]=f(``),O=i(),k=g(`components.pages.login`);return m(n,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col fixed top-0 left-0 right-0 bottom-0 z-50`,children:[x===`login`&&p(s,{onRegister:()=>S(`register`),onForgotPassword:()=>S(`forgot`),errorText:E,onSubmit:async n=>{D(``);try{let r=e(n.password),{data:i}=await t({email:n.email,password:r});T({token:i.token,expireTime:i.expire_time,userId:i.user_id}),h.success(k(`index.loginSuccess`)),O([`user-profile`,`mine`]),b(!0)}catch(e){D(e.message??k(`index.loginFailed`))}},onClose:()=>{y()}}),x===`register`&&p(l,{onLogin:()=>S(`login`),onClose:()=>S(`login`),onVerify:e=>{w(e),S(`verify`)}}),x===`forgot`&&p(o,{onLogin:()=>S(`login`),onClose:()=>S(`login`),onVerify:e=>{w(e),S(`verify`)}}),x===`reset-password`&&p(u,{onClose:()=>{y()},onPassword:e=>{w(e??``),S(`password`)}}),x===`verify`&&p(d,{email:C,onClose:()=>S(`register`),onPassword:e=>{w(e),S(`password`)}}),x===`password`&&p(c,{email:C,onClose:()=>S(`verify`)})]})}export{_ as Login};
@@ -24,10 +24,6 @@ interface UserProfilePageProps {
24
24
  collectTab?: string;
25
25
  /** 收藏合集 Tab */
26
26
  collectCollectionTab?: string;
27
- /** 服务端透传的登录 Token。 */
28
- cookieToken?: string;
29
- /** 服务端透传的当前用户 ID。 */
30
- cookieUserId?: string;
31
27
  }
32
28
  //#endregion
33
29
  export { UserProfilePageProps };
@@ -10,6 +10,6 @@ interface UserProfilePageComponentProps extends UserProfilePageProps {
10
10
  /**
11
11
  * 用户资料页服务端组件。
12
12
  */
13
- declare function UserProfilePage(props: UserProfilePageComponentProps): Promise<react_jsx_runtime0.JSX.Element>;
13
+ declare function UserProfilePage(props: UserProfilePageComponentProps): react_jsx_runtime0.JSX.Element;
14
14
  //#endregion
15
15
  export { UserProfilePage };
@@ -1,2 +1,2 @@
1
1
 
2
- import{UserProfileHeader as e}from"../../biz/business/profile/profile-header/server.mjs";import{UserProfileMain as t}from"../../biz/business/profile/profile-main/server.mjs";import{UserProfilePageLayout as n}from"./layout.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cookies as a}from"next/headers";async function o(o){let{className:s,id:c,showCreateAction:l,showBackButton:u,requireLogin:d,tab:f,likeTab:p,historyTab:m,collectTab:h,collectCollectionTab:g}=o,_=await a(),v=_.get(`token`)?.value||``,y=_.get(`userId`)?.value||``,b={};v&&(b.Authorization=`Bearer ${v}`),y&&(b[`X-User-Id`]=y);let x=Object.keys(b).length>0?{headers:b}:void 0;return i(n,{id:c,cookieUserId:y,className:s,children:[r(e,{id:c,showBackButton:u,requireLogin:d,cookieToken:v,cookieUserId:y,token:v,currentUserId:y,authConfig:x}),r(t,{id:c,showCreateAction:l,requireLogin:d,cookieToken:v,cookieUserId:y,token:v,currentUserId:y,authConfig:x,tab:f,likeTab:p,historyTab:m,collectTab:h,collectCollectionTab:g})]})}export{o as UserProfilePage};
2
+ import{UserProfileHeader as e}from"../../biz/business/profile/profile-header/server.mjs";import{UserProfileMain as t}from"../../biz/business/profile/profile-main/server.mjs";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{id:o,showCreateAction:s,showBackButton:c,requireLogin:l,tab:u,likeTab:d,historyTab:f,collectTab:p,collectCollectionTab:m}=a;return i(n,{children:[r(e,{id:o,showBackButton:c,requireLogin:l}),r(t,{id:o,showCreateAction:s,requireLogin:l,tab:u,likeTab:d,historyTab:f,collectTab:p,collectCollectionTab:m})]})}export{a as UserProfilePage};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../utils/cn.mjs";import{Button as t}from"../../../ui/button.mjs";import{AlertDialog as n,AlertDialogAction as r,AlertDialogCancel as i,AlertDialogContent as a,AlertDialogDescription as ee,AlertDialogFooter as o,AlertDialogHeader as s}from"../../../ui/alert-dialog.mjs";import{useUserStore as c}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as l,pUserUserPrivacySettings as u}from"../../../../service/generated/client.mjs";import{Box as d}from"../../../ui/box.mjs";import{List as f}from"../../../ui/list.mjs";import{Switch as p}from"../../../ui/switch.mjs";import{useDeleteRequest as m,useRequest as h}from"../../../../hooks/query/use-query.mjs";import{useLoginModalStore as g}from"../../../../store/modules/login-modal-store.mjs";import{locales as _,persistLocalePreference as v}from"../../../../i18n.mjs";import{HeaderNav as y}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as b}from"./reset-password-drawer.mjs";import{useEffect as x,useRef as S,useState as C}from"react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{useLocale as te,useTranslations as E}from"next-intl";import ne from"next/link";function D(e){return{collection:Number(e?.collections_open??0)>0,follower:Number(e?.follower_open??0)>0,following:Number(e?.following_open??0)>0,like:Number(e?.like_open??0)>0}}function O(e){return{collections_open:e.collection?1:0,follower_open:e.follower?1:0,following_open:e.following?1:0,like_open:e.like?1:0}}function k({className:k}={}){let A=E(`components.pages.settings.components`),j=te(),{open:M}=g(),N=c(e=>e.isLogin),P=c(e=>e.token),F=c(e=>e.logout),I=c(e=>e.userId),L=(N||!!P)&&!!I,R=D(),[z,B]=C(R),V=S(R),[H,U]=C(!1),[W,G]=C(!1),K=m(),q=[`user-privacy-settings`,I],J=j===`zh-CN`?`en`:`zh-CN`,Y=_.find(e=>e.code===J)?.name||J,{data:X}=h(q,()=>l({user_id:I}),{enabled:!!I}),Z=X?.data;x(()=>{if(!Z)return;let e=D(Z);B(e),V.current=e},[Z]),x(()=>{V.current=z},[z]);async function re(e){let t=await u({user_id:I,...O(e)});if(t.code!==0)throw Error(t.message||`隐私设置更新失败`);K(q)}async function Q(e,t){let n=V.current,r={...n,[e]:t};B(r);try{await re(r)}catch(e){console.error(`update settings failed:`,e),B(n)}}let ie=m();function ae(){ie([`user-profile`,`mine`]),F(),window.location.href=`/user/mine`}function oe(e){G(e)}function se(){G(!0)}function ce(){G(!1)}function le(){G(!1),ae()}function $(e){U(e)}function ue(){if(!L){M();return}U(!0)}function de(e){L||(e.preventDefault(),e.stopPropagation(),M())}function fe(){v(J),window.location.reload()}function pe(e){Q(`collection`,e)}function me(e){Q(`like`,e)}function he(e){Q(`following`,e)}function ge(e){Q(`follower`,e)}return T(d,{className:e(k),children:[w(y,{className:`!bg-bg2`,title:A(`settings.title`)}),w(b,{open:H,onOpenChange:$}),T(d,{className:`flex flex-col gap-2 `,children:[w(f,{className:`bg-bg2 py-2`,children:w(ne,{href:`/feedback`,onClick:de,children:w(f.Item,{title:A(`settings.feedbackTitle`),arrow:!0})})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.resetPasswordTitle`),arrow:!0,onClick:ue})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.languageTitle`),extra:T(t,{size:`sm`,variant:`outline`,onClick:fe,children:[A(`settings.switchTo`),` `,Y]})})}),L?T(f,{className:`bg-bg2 py-2`,children:[w(f.Item,{title:A(`settings.privacySettingsTitle`),extra:T(`span`,{className:`text-xs`,children:[A(`settings.whenOff`),`,`,A(`settings.listPrivateHint`)]})}),w(f.Item,{className:`pl-8 mt-2`,title:A(`settings.collectionsTitle`),extra:w(p,{checked:z.collection,onCheckedChange:pe})}),w(f.Item,{className:`pl-8`,title:A(`settings.like`),extra:w(p,{checked:z.like,onCheckedChange:me})}),w(f.Item,{className:`pl-8`,title:A(`settings.follow`),extra:w(p,{checked:z.following,onCheckedChange:he})}),w(f.Item,{className:`pl-8`,title:A(`settings.followersTitle`),extra:w(p,{checked:z.follower,onCheckedChange:ge})})]}):null]}),H||!L?null:w(d,{className:`fixed bottom-0 w-full left-0`,children:w(t,{className:`h-auto text-base py-4 w-full`,variant:`secondary`,onClick:se,children:A(`settings.button`)})}),w(n,{open:W,onOpenChange:oe,children:T(a,{size:`sm`,children:[w(s,{children:w(ee,{children:A(`settings.logoutConfirmMessage`)})}),T(o,{children:[w(i,{onClick:ce,children:A(`settings.cancel`)}),w(r,{onClick:le,children:A(`settings.confirm`)})]})]})})]})}export{k as Settings};
2
+ "use client";import{cn as e}from"../../../../utils/cn.mjs";import{Button as t}from"../../../ui/button.mjs";import{AlertDialog as n,AlertDialogAction as r,AlertDialogCancel as i,AlertDialogContent as a,AlertDialogDescription as ee,AlertDialogFooter as o,AlertDialogHeader as s}from"../../../ui/alert-dialog.mjs";import{useUserStore as c}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as l,pUserUserPrivacySettings as u}from"../../../../service/generated/client.mjs";import{Box as d}from"../../../ui/box.mjs";import{List as f}from"../../../ui/list.mjs";import{Switch as p}from"../../../ui/switch.mjs";import{useLoginModalStore as m}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as h,useRequest as g}from"../../../../hooks/query/use-query.mjs";import{locales as _,persistLocalePreference as v}from"../../../../i18n.mjs";import{HeaderNav as y}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as b}from"./reset-password-drawer.mjs";import{useEffect as x,useRef as S,useState as C}from"react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{useLocale as te,useTranslations as E}from"next-intl";import ne from"next/link";function D(e){return{collection:Number(e?.collections_open??0)>0,follower:Number(e?.follower_open??0)>0,following:Number(e?.following_open??0)>0,like:Number(e?.like_open??0)>0}}function O(e){return{collections_open:e.collection?1:0,follower_open:e.follower?1:0,following_open:e.following?1:0,like_open:e.like?1:0}}function k({className:k}={}){let A=E(`components.pages.settings.components`),j=te(),{open:M}=m(),N=c(e=>e.isLogin),P=c(e=>e.token),F=c(e=>e.logout),I=c(e=>e.userId),L=(N||!!P)&&!!I,R=D(),[z,B]=C(R),V=S(R),[H,U]=C(!1),[W,G]=C(!1),K=h(),q=[`user-privacy-settings`,I],J=j===`zh-CN`?`en`:`zh-CN`,Y=_.find(e=>e.code===J)?.name||J,{data:X}=g(q,()=>l({user_id:I}),{enabled:!!I}),Z=X?.data;x(()=>{if(!Z)return;let e=D(Z);B(e),V.current=e},[Z]),x(()=>{V.current=z},[z]);async function re(e){let t=await u({user_id:I,...O(e)});if(t.code!==0)throw Error(t.message||`隐私设置更新失败`);K(q)}async function Q(e,t){let n=V.current,r={...n,[e]:t};B(r);try{await re(r)}catch(e){console.error(`update settings failed:`,e),B(n)}}let ie=h();function ae(){ie([`user-profile`,`mine`]),F(),window.location.href=`/user/mine`}function oe(e){G(e)}function se(){G(!0)}function ce(){G(!1)}function le(){G(!1),ae()}function $(e){U(e)}function ue(){if(!L){M();return}U(!0)}function de(e){L||(e.preventDefault(),e.stopPropagation(),M())}function fe(){v(J),window.location.reload()}function pe(e){Q(`collection`,e)}function me(e){Q(`like`,e)}function he(e){Q(`following`,e)}function ge(e){Q(`follower`,e)}return T(d,{className:e(k),children:[w(y,{className:`!bg-bg2`,title:A(`settings.title`)}),w(b,{open:H,onOpenChange:$}),T(d,{className:`flex flex-col gap-2 `,children:[w(f,{className:`bg-bg2 py-2`,children:w(ne,{href:`/feedback`,onClick:de,children:w(f.Item,{title:A(`settings.feedbackTitle`),arrow:!0})})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.resetPasswordTitle`),arrow:!0,onClick:ue})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.languageTitle`),extra:T(t,{size:`sm`,variant:`outline`,onClick:fe,children:[A(`settings.switchTo`),` `,Y]})})}),L?T(f,{className:`bg-bg2 py-2`,children:[w(f.Item,{title:A(`settings.privacySettingsTitle`),extra:T(`span`,{className:`text-xs`,children:[A(`settings.whenOff`),`,`,A(`settings.listPrivateHint`)]})}),w(f.Item,{className:`pl-8 mt-2`,title:A(`settings.collectionsTitle`),extra:w(p,{checked:z.collection,onCheckedChange:pe})}),w(f.Item,{className:`pl-8`,title:A(`settings.like`),extra:w(p,{checked:z.like,onCheckedChange:me})}),w(f.Item,{className:`pl-8`,title:A(`settings.follow`),extra:w(p,{checked:z.following,onCheckedChange:he})}),w(f.Item,{className:`pl-8`,title:A(`settings.followersTitle`),extra:w(p,{checked:z.follower,onCheckedChange:ge})})]}):null]}),H||!L?null:w(d,{className:`fixed bottom-0 w-full left-0`,children:w(t,{className:`h-auto text-base py-4 w-full`,variant:`secondary`,onClick:se,children:A(`settings.button`)})}),w(n,{open:W,onOpenChange:oe,children:T(a,{size:`sm`,children:[w(s,{children:w(ee,{children:A(`settings.logoutConfirmMessage`)})}),T(o,{children:[w(i,{onClick:ce,children:A(`settings.cancel`)}),w(r,{onClick:le,children:A(`settings.confirm`)})]})]})})]})}export{k as Settings};
@@ -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{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};
2
+ import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{normalizeEpisodeNumber as t,warmupProcessM3u8Auto as n}from"../../common/video-player/process-m3u8-cache.mjs";import{HydrationBoundary as r}from"../../../hooks/query/hydration-boundary.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=t(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 n(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(r,{prefetch:m&&_?[{queryKey:[`video-detail`,m],queryFn:()=>Promise.resolve(_)}]:[],children:c(o,{detailId:m,isWebView:d,materialConfig:f})})]})}export{u 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?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
9
+ variant?: "link" | "default" | "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?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
- size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
+ variant?: "link" | "default" | "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> & {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.45",
4
+ "version": "0.1.47",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"
@@ -1,2 +0,0 @@
1
-
2
- import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.mjs";import{defaultProps as t}from"./banner/variants/basic-banner/defaults/default-props.mjs";import{schema as n}from"./banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as r,basicBannerInspectorPropsSchema as i}from"./banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as a}from"./banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as o}from"./banner/variants/basic-banner/material.mjs";import s from"./banner/variants/basic-banner/index.mjs";import{defaultProps as c}from"./card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as l}from"./card-grid/variants/card-grid-2x3/schema/index.mjs";import u from"./card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as d}from"./card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as f}from"./card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import p from"./card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as m}from"./card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as h}from"./card-grid/variants/card-grid-2x4/schema/index.mjs";import g from"./card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as _}from"./card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as v}from"./card-grid/variants/card-grid-3x3/schema/index.mjs";import y from"./card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as b}from"./card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as x}from"./card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import S from"./card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as C}from"./feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as w}from"./feature-grid/variants/basic-feature-grid/schema/index.mjs";import T from"./feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as E}from"./floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as D,floatingBallInspectorPropsSchema as O}from"./floating-ball/schema.mjs";import{FloatingBall as k}from"./floating-ball/server.mjs";import{floatingBallMaterial as A}from"./floating-ball/material.mjs";import{defaultProps as j}from"../basics/fullscreen-feed/defaults/default-props.mjs";import{schema as M}from"../basics/fullscreen-feed/schema/index.mjs";import N from"../basics/fullscreen-feed/index.mjs";import{defaultProps as P}from"./fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as F}from"./fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import I from"./fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as L}from"./fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as R}from"./fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import z from"./fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as B}from"./home-recommend/variants/home-recommend-grid/defaults/default-props.mjs";import{defaultProps as V}from"./search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as H}from"./search-bar/variants/detail-search-bar/schema/index.mjs";import U from"./search-bar/variants/detail-search-bar/index.mjs";import{schema as W}from"./home-recommend/variants/home-recommend-grid/schema/index.mjs";import{homeRecommendGridInspectorDefaultProps as G,homeRecommendGridInspectorPropsSchema as K}from"./home-recommend/variants/home-recommend-grid/inspector-schema.mjs";import{HomeRecommendGrid as q}from"./home-recommend/variants/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as J}from"./home-recommend/variants/home-recommend-grid/material.mjs";import Y from"./home-recommend/variants/home-recommend-grid/index.mjs";import{defaultProps as X}from"./home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs";import{schema as Z}from"./home-recommend/variants/home-recommend-waterfall/schema/index.mjs";import{homeRecommendWaterfallInspectorDefaultProps as Q,homeRecommendWaterfallInspectorPropsSchema as $}from"./home-recommend/variants/home-recommend-waterfall/inspector-schema.mjs";import{HomeRecommendWaterfall as ee}from"./home-recommend/variants/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as te}from"./home-recommend/variants/home-recommend-waterfall/material.mjs";import ne from"./home-recommend/variants/home-recommend-waterfall/index.mjs";import{MarqueeClient as re}from"./marquee/client.mjs";import{marqueeInspectorPropsSchema as ie}from"./marquee/schema.mjs";import{MarqueeServer as ae}from"./marquee/server.mjs";import{marqueeMaterial as oe}from"./marquee/material.mjs";import{defaultProps as se}from"./nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as ce}from"./nav-bar/variants/basic-nav-bar/schema/index.mjs";import le from"./nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as ue}from"./post-card/variants/basic-post-card/defaults/default-props.mjs";import{schema as de}from"./post-card/variants/basic-post-card/schema/index.mjs";import fe from"./post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as pe}from"./profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as me,profileHeaderInspectorPropsSchema as he}from"./profile/profile-header/schema.mjs";import{UserProfileHeader as ge,buildUserProfileHeaderPrefetch as _e}from"./profile/profile-header/server.mjs";import{profileHeaderMaterial as ve,profileHeaderMaterialWithDisabledBackground as ye}from"./profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as be,profileMainCollectTabOptions as xe,profileMainHistoryTabOptions as Se,profileMainLikeTabOptions as Ce,profileMainMineTabOptions as we,profileMainProfileTabOptions as Te,profileMainTabOptions as Ee}from"./profile/profile-main/variants.mjs";import{UserProfileMainShell as De}from"./profile/profile-main/shell.mjs";import{UserProfileMainClient as Oe}from"./profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as ke,profileMainInspectorPropsSchema as Ae}from"./profile/profile-main/schema.mjs";import{CollectTab as je}from"./profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as Me,buildCollectTabPrefetch as Ne}from"./profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as Pe}from"./profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as Fe,buildHistoryTabPrefetch as Ie}from"./profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as Le}from"./profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as Re,buildLikeTabPrefetch as ze}from"./profile/profile-main/tabs/like-tab/server.mjs";import{UserProfileMain as Be}from"./profile/profile-main/server.mjs";import{profileMainMaterial as Ve}from"./profile/profile-main/material.mjs";import{PublishTab as He}from"./profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as Ue,buildPublishTabPrefetch as We}from"./profile/profile-main/tabs/publish-tab/server.mjs";import{defaultProps as Ge}from"./recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as Ke}from"./recommended-users/variants/basic-recommended-users/schema/index.mjs";import qe from"./recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as Je}from"./search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as Ye}from"./search-bar/variants/basic-search-bar/schema/index.mjs";import Xe from"./search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as Ze}from"./search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as Qe}from"./search-bar/variants/filter-search-bar/schema/index.mjs";import $e from"./search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as et}from"./search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as tt}from"./search-bar/variants/tag-search-bar/schema/index.mjs";import nt from"./search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as rt}from"./search-history/client.mjs";import{searchHistoryInspectorPropsSchema as it}from"./search-history/schema.mjs";import{SearchHistoryServer as at}from"./search-history/server.mjs";import{searchHistoryMaterial as ot}from"./search-history/material.mjs";import{SearchInputClient as st}from"./search-input/client.mjs";import{searchInputInspectorPropsSchema as ct}from"./search-input/schema.mjs";import{SearchInputServer as lt}from"./search-input/server.mjs";import{searchInputMaterial as ut}from"./search-input/material.mjs";import{TabBarClient as dt}from"./tab-bar/client.mjs";import{tabBarInspectorPropsSchema as ft}from"./tab-bar/schema.mjs";import{TabBarServer as pt}from"./tab-bar/server.mjs";import{tabBarMaterial as mt}from"./tab-bar/material.mjs";import{TextRecommendClient as ht}from"./text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as gt}from"./text-recommend/schema.mjs";import{TextRecommendServer as _t}from"./text-recommend/server.mjs";import{textRecommendMaterial as vt}from"./text-recommend/material.mjs";import{VideoHorizontalListClient as yt}from"./video-horizontal-list/client.mjs";import{videoHorizontalListInspectorPropsSchema as bt}from"./video-horizontal-list/schema.mjs";import{VideoHorizontalListServer as xt}from"./video-horizontal-list/server.mjs";import{videoHorizontalListMaterial as St}from"./video-horizontal-list/material.mjs";var Ct=e({BasicBanner:()=>s,BasicBannerDefaultData:()=>t,BasicBannerMaterialComponent:()=>a,BasicBannerSchema:()=>n,BasicFeatureGrid:()=>T,BasicFeatureGridDefaultData:()=>C,BasicFeatureGridSchema:()=>w,BasicFullscreenFeed:()=>N,BasicFullscreenFeedDefaultData:()=>j,BasicFullscreenFeedSchema:()=>M,BasicNavBar:()=>le,BasicNavBarDefaultData:()=>se,BasicNavBarSchema:()=>ce,BasicPostCard:()=>fe,BasicPostCardDefaultData:()=>ue,BasicPostCardSchema:()=>de,BasicRecommendedUsers:()=>qe,BasicRecommendedUsersDefaultData:()=>Ge,BasicRecommendedUsersSchema:()=>Ke,BasicSearchBar:()=>Xe,BasicSearchBarDefaultData:()=>Je,BasicSearchBarSchema:()=>Ye,CardGrid2x3:()=>u,CardGrid2x3DefaultData:()=>c,CardGrid2x3Infinite:()=>p,CardGrid2x3InfiniteDefaultData:()=>d,CardGrid2x3InfiniteSchema:()=>f,CardGrid2x3Schema:()=>l,CardGrid2x4:()=>g,CardGrid2x4DefaultData:()=>m,CardGrid2x4Schema:()=>h,CardGrid3x3:()=>y,CardGrid3x3DefaultData:()=>_,CardGrid3x3Infinite:()=>S,CardGrid3x3InfiniteDefaultData:()=>b,CardGrid3x3InfiniteSchema:()=>x,CardGrid3x3Schema:()=>v,CollectTab:()=>je,CollectTabServer:()=>Me,DetailSearchBar:()=>U,DetailSearchBarDefaultData:()=>V,DetailSearchBarSchema:()=>H,FilterSearchBar:()=>$e,FilterSearchBarDefaultData:()=>Ze,FilterSearchBarSchema:()=>Qe,FloatingBall:()=>k,FloatingBallClient:()=>E,FullscreenFeedClient:()=>I,FullscreenPostFeedDefaultData:()=>P,FullscreenPostFeedSchema:()=>F,FullscreenVideoClient:()=>z,FullscreenVideoFeedDefaultData:()=>L,FullscreenVideoFeedSchema:()=>R,HistoryTab:()=>Pe,HistoryTabServer:()=>Fe,HomeRecommendGrid:()=>Y,HomeRecommendGridDefaultData:()=>B,HomeRecommendGridMaterialComponent:()=>q,HomeRecommendGridSchema:()=>W,HomeRecommendWaterfall:()=>ne,HomeRecommendWaterfallDefaultData:()=>X,HomeRecommendWaterfallMaterialComponent:()=>ee,HomeRecommendWaterfallSchema:()=>Z,LikeTab:()=>Le,LikeTabServer:()=>Re,MarqueeClient:()=>re,MarqueeServer:()=>ae,PublishTab:()=>He,PublishTabServer:()=>Ue,SearchHistoryClient:()=>rt,SearchHistoryServer:()=>at,SearchInputClient:()=>st,SearchInputServer:()=>lt,TabBarClient:()=>dt,TabBarServer:()=>pt,TagSearchBar:()=>nt,TagSearchBarDefaultData:()=>et,TagSearchBarSchema:()=>tt,TextRecommendClient:()=>ht,TextRecommendServer:()=>_t,UserProfileHeader:()=>ge,UserProfileHeaderClient:()=>pe,UserProfileMain:()=>Be,UserProfileMainClient:()=>Oe,UserProfileMainShell:()=>De,VideoHorizontalListClient:()=>yt,VideoHorizontalListServer:()=>xt,basicBannerInspectorDefaultProps:()=>r,basicBannerInspectorPropsSchema:()=>i,basicBannerMaterial:()=>o,buildCollectTabPrefetch:()=>Ne,buildHistoryTabPrefetch:()=>Ie,buildLikeTabPrefetch:()=>ze,buildPublishTabPrefetch:()=>We,buildUserProfileHeaderPrefetch:()=>_e,floatingBallInspectorDefaultProps:()=>D,floatingBallInspectorPropsSchema:()=>O,floatingBallMaterial:()=>A,homeRecommendGridInspectorDefaultProps:()=>G,homeRecommendGridInspectorPropsSchema:()=>K,homeRecommendGridMaterial:()=>J,homeRecommendWaterfallInspectorDefaultProps:()=>Q,homeRecommendWaterfallInspectorPropsSchema:()=>$,homeRecommendWaterfallMaterial:()=>te,marqueeInspectorPropsSchema:()=>ie,marqueeMaterial:()=>oe,profileHeaderInspectorDefaultProps:()=>me,profileHeaderInspectorPropsSchema:()=>he,profileHeaderMaterial:()=>ve,profileHeaderMaterialWithDisabledBackground:()=>ye,profileMainCollectCollectionTabOptions:()=>be,profileMainCollectTabOptions:()=>xe,profileMainHistoryTabOptions:()=>Se,profileMainInspectorDefaultProps:()=>ke,profileMainInspectorPropsSchema:()=>Ae,profileMainLikeTabOptions:()=>Ce,profileMainMaterial:()=>Ve,profileMainMineTabOptions:()=>we,profileMainProfileTabOptions:()=>Te,profileMainTabOptions:()=>Ee,searchHistoryInspectorPropsSchema:()=>it,searchHistoryMaterial:()=>ot,searchInputInspectorPropsSchema:()=>ct,searchInputMaterial:()=>ut,tabBarInspectorPropsSchema:()=>ft,tabBarMaterial:()=>mt,textRecommendInspectorPropsSchema:()=>gt,textRecommendMaterial:()=>vt,videoHorizontalListInspectorPropsSchema:()=>bt,videoHorizontalListMaterial:()=>St});export{Ct as business_exports};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../../store/modules/user-store.mjs";import{Box as n}from"../../../../ui/box.mjs";import{useLoginModalStore as r}from"../../../../../store/modules/login-modal-store.mjs";import{useEffect as i,useMemo as a,useRef as o}from"react";import{jsx as s}from"react/jsx-runtime";import{useRouter as c}from"next/navigation";import{parseAsString as l,useQueryState as u}from"nuqs";function d({id:d,cookieUserId:f,className:p,children:m}){let h=c(),g=o(null),_=o(!1),v=r(e=>e.isOpen),y=t(e=>e.isLogin),b=t(e=>e.userId),x=y&&!!b,S=b||f,C=d==null||!!d&&!!b&&d===b,w=C?S:d?String(d):void 0,[T]=u(`tab`,l.withDefault(`collect`)),E=a(()=>{let e=C?[`collect`,`publish`,`like`,`history`]:[`collect`,`publish`,`like`];return T&&e.includes(T)?T:e[0]},[C,T]),D=a(()=>`profile-scroll:${w||(C?`mine`:`guest`)}:${E}`,[C,E,w]);return i(()=>{if(v&&!x){_.current=!0;return}!v&&_.current&&(_.current=!1,x&&h.refresh())},[x,v,h]),i(()=>{if(typeof window>`u`)return;let e=g.current;if(!e)return;let t=window.sessionStorage.getItem(D),n=t?Number(t):0;Number.isFinite(n)&&n>0&&requestAnimationFrame(()=>{e.scrollTo({top:n})})},[D]),i(()=>{if(typeof window>`u`)return;let e=g.current;if(!e)return;let t=!1,n=()=>{t||(t=!0,requestAnimationFrame(()=>{window.sessionStorage.setItem(D,String(e.scrollTop)),t=!1}))};return e.addEventListener(`scroll`,n,{passive:!0}),()=>{e.removeEventListener(`scroll`,n)}},[D]),s(n,{ref:g,className:e(`profile-container w-full bg-bg1 flex flex-col h-full overflow-y-auto`,p),children:m})}export{d as UserProfileContainer};
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{UserProfileContainer as e}from"./_components/user-profile-container/client.mjs";import{jsx as t}from"react/jsx-runtime";function n({id:n,cookieUserId:r,className:i,children:a}){return t(e,{id:n,cookieUserId:r,className:i,children:a})}export{n as UserProfilePageLayout};