@funhub/platform 0.1.63 → 0.1.65

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 (53) hide show
  1. package/dist/biz.d.mts +3 -3
  2. package/dist/biz.mjs +1 -1
  3. package/dist/components/biz/business/detail/shared/detail-info-title.mjs +1 -1
  4. package/dist/components/biz/business/detail/shared/detail-introduction.mjs +1 -1
  5. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  6. package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -1
  7. package/dist/components/biz/business/detail/video-detail-actions/client.d.mts +1 -1
  8. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
  9. package/dist/components/biz/business/detail/video-detail-info/client.d.mts +1 -1
  10. package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -1
  11. package/dist/components/biz/business/detail/video-detail-info-title/client.mjs +1 -1
  12. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.mjs +1 -1
  13. package/dist/components/biz/business/detail/video-detail-player/client.d.mts +2 -1
  14. package/dist/components/biz/business/detail/video-detail-player/client.mjs +1 -1
  15. package/dist/components/biz/business/detail/video-detail-player/schema.d.mts +4 -1
  16. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
  17. package/dist/components/biz/business/detail/video-detail-recommend/utils.mjs +1 -1
  18. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +2 -0
  19. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
  20. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +1 -0
  21. package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +1 -1
  22. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +2 -0
  23. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
  24. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +1 -0
  25. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +1 -1
  26. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  27. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
  28. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
  29. package/dist/components/biz/business/image-text-recommend/client.d.mts +2 -18
  30. package/dist/components/biz/business/image-text-recommend/client.mjs +1 -1
  31. package/dist/components/biz/business/image-text-recommend/index.d.mts +1 -1
  32. package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
  33. package/dist/components/biz/business/image-text-recommend/server.d.mts +1 -3
  34. package/dist/components/biz/business/image-text-recommend/server.mjs +1 -1
  35. package/dist/components/biz/business/image-text-recommend/shared/query.mjs +2 -0
  36. package/dist/components/biz/business/index.d.mts +2 -2
  37. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  38. package/dist/components/biz/business/profile/profile-header/server.d.mts +1 -1
  39. package/dist/components/biz/business/search-history/client.mjs +1 -1
  40. package/dist/components/biz/business/search-input/client.d.mts +2 -4
  41. package/dist/components/biz/business/search-input/client.mjs +1 -1
  42. package/dist/components/biz/business/search-input/index.d.mts +1 -1
  43. package/dist/components/biz/business/search-input/schema.d.mts +6 -3
  44. package/dist/components/biz/business/search-input/schema.mjs +1 -1
  45. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  46. package/dist/components/biz/business/tab-bar/material.d.mts +0 -1
  47. package/dist/components/biz/business/tab-bar/schema.d.mts +0 -1
  48. package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
  49. package/dist/components/biz/business/tab-bar/server.mjs +1 -1
  50. package/dist/components/biz/business/text-recommend/client.mjs +1 -1
  51. package/dist/components/common/series-episodes/index.mjs +1 -1
  52. package/dist/components/ui/image.d.mts +4 -4
  53. package/package.json +1 -1
package/dist/biz.d.mts CHANGED
@@ -84,7 +84,7 @@ import { schema as schema$22 } from "./components/biz/business/home-recommend/ho
84
84
  import { HomeRecommendWaterfall } from "./components/biz/business/home-recommend/home-recommend-waterfall/server.mjs";
85
85
  import { homeRecommendWaterfallMaterial } from "./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";
86
86
  import { imageTextRecommendInspectorPropsSchema } from "./components/biz/business/image-text-recommend/schema.mjs";
87
- import { ImageTextRecommendClient, ImageTextRecommendInitialData, ImageTextRecommendProps } from "./components/biz/business/image-text-recommend/client.mjs";
87
+ import { ImageTextRecommendClient, ImageTextRecommendProps } from "./components/biz/business/image-text-recommend/client.mjs";
88
88
  import { ImageTextRecommendServer } from "./components/biz/business/image-text-recommend/server.mjs";
89
89
  import { imageTextRecommendMaterial } from "./components/biz/business/image-text-recommend/material.mjs";
90
90
  import { defaultMarqueePeriod, getDefaultMarqueePeriod, marqueeInspectorPropsSchema } from "./components/biz/business/marquee/schema.mjs";
@@ -134,7 +134,7 @@ import { searchHistoryInspectorPropsSchema } from "./components/biz/business/sea
134
134
  import { SearchHistoryClient, SearchHistoryProps } from "./components/biz/business/search-history/client.mjs";
135
135
  import { SearchHistoryServer } from "./components/biz/business/search-history/server.mjs";
136
136
  import { searchHistoryMaterial } from "./components/biz/business/search-history/material.mjs";
137
- import { searchInputInspectorPropsSchema } from "./components/biz/business/search-input/schema.mjs";
137
+ import { SearchInputInspectorProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema } from "./components/biz/business/search-input/schema.mjs";
138
138
  import { SearchInputClient, SearchInputProps } from "./components/biz/business/search-input/client.mjs";
139
139
  import { SearchInputServer } from "./components/biz/business/search-input/server.mjs";
140
140
  import { searchInputMaterial } from "./components/biz/business/search-input/material.mjs";
@@ -154,4 +154,4 @@ import { exampleButtonMaterial } from "./components/biz/example/button/material.
154
154
  import "./components/biz/example/button/index.mjs";
155
155
  import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps } from "./components/biz/renderer/renderer.mjs";
156
156
  import "./components/biz/renderer/index.mjs";
157
- export { BaseComponentProps, BasicBannerClient as BasicBanner, defaultProps as BasicBannerDefaultData, BasicBanner as BasicBannerMaterialComponent, schema as BasicBannerSchema, BasicFeatureGridClient as BasicFeatureGrid, defaultProps$1 as BasicFeatureGridDefaultData, schema$1 as BasicFeatureGridSchema, BasicFullscreen, FullscreenFeedClient as BasicFullscreenFeed, defaultProps$2 as BasicFullscreenFeedDefaultData, schema$2 as BasicFullscreenFeedSchema, BasicLogoClient as BasicLogo, defaultProps$3 as BasicLogoDefaultData, schema$3 as BasicLogoSchema, BasicNavBarClient as BasicNavBar, defaultProps$4 as BasicNavBarDefaultData, schema$4 as BasicNavBarSchema, BasicPostCardClient as BasicPostCard, defaultProps$5 as BasicPostCardDefaultData, schema$5 as BasicPostCardSchema, BasicRecommendedUsersClient as BasicRecommendedUsers, defaultProps$6 as BasicRecommendedUsersDefaultData, schema$6 as BasicRecommendedUsersSchema, BasicSearchClient as BasicSearch, BasicSearchBarClient as BasicSearchBar, defaultProps$7 as BasicSearchBarDefaultData, schema$7 as BasicSearchBarSchema, defaultProps$8 as BasicSearchDefaultData, schema$8 as BasicSearchSchema, BuildCollectTabPrefetchParams, BuildHistoryTabPrefetchParams, BuildLikeTabPrefetchParams, BuildPublishTabPrefetchParams, BuildUserProfileHeaderPrefetchParams, Button, ButtonClient, ButtonInspectorProps, ButtonProps, CARD_SPEC_MAP, CardCornerMode, CardGrid2x3Client as CardGrid2x3, defaultProps$9 as CardGrid2x3DefaultData, CardGrid2x3InfiniteClient as CardGrid2x3Infinite, defaultProps$10 as CardGrid2x3InfiniteDefaultData, schema$9 as CardGrid2x3InfiniteSchema, schema$10 as CardGrid2x3Schema, CardGrid2x4Client as CardGrid2x4, defaultProps$11 as CardGrid2x4DefaultData, schema$11 as CardGrid2x4Schema, CardGrid3x3Client as CardGrid3x3, defaultProps$12 as CardGrid3x3DefaultData, CardGrid3x3InfiniteClient as CardGrid3x3Infinite, defaultProps$13 as CardGrid3x3InfiniteDefaultData, schema$12 as CardGrid3x3InfiniteSchema, schema$13 as CardGrid3x3Schema, defaultProps$14 as CardItemDefaultData, schema$14 as CardItemSchema, defaultProps$15 as CardLayoutDefaultData, schema$15 as CardLayoutSchema, CardSpec, ChannelDataItem, CollectTab, CollectTabAuthConfig, CollectTabProps, CollectTabServer, CommonStyleSchema, ComponentMaterial, ComponentSchema, ComponentType, ContentBlockItem, DataBinding, DataBindingField, DataBindingSourceType, DataBindingUIMode, DataSchema, DataSlot, DataSourceType, DetailSearchBarClient as DetailSearchBar, defaultProps$16 as DetailSearchBarDefaultData, schema$16 as DetailSearchBarSchema, EventDefinition, EventSchema, ExtractedDataItem, FieldSchema, FieldType, FilterSearchClient as FilterSearch, FilterSearchBarClient as FilterSearchBar, defaultProps$17 as FilterSearchBarDefaultData, schema$17 as FilterSearchBarSchema, defaultProps$18 as FilterSearchDefaultData, schema$18 as FilterSearchSchema, FloatingBall, FloatingBallClient, FloatingBallClientProps, FloatingBallInspectorProps, FullscreenPostFeedClient as FullscreenFeedClient, defaultProps$19 as FullscreenPostFeedDefaultData, schema$19 as FullscreenPostFeedSchema, FullscreenVideoFeedClient as FullscreenVideoClient, defaultProps$20 as FullscreenVideoFeedDefaultData, schema$20 as FullscreenVideoFeedSchema, HistoryTab, HistoryTabAuthConfig, HistoryTabProps, HistoryTabServer, HomeRecommendGridClient as HomeRecommendGrid, homeRecommendGridInspectorDefaultProps as HomeRecommendGridDefaultData, HomeRecommendGrid as HomeRecommendGridMaterialComponent, schema$21 as HomeRecommendGridSchema, HomeRecommendWaterfallClient as HomeRecommendWaterfall, homeRecommendWaterfallInspectorDefaultProps as HomeRecommendWaterfallDefaultData, HomeRecommendWaterfall as HomeRecommendWaterfallMaterialComponent, schema$22 as HomeRecommendWaterfallSchema, ImageTextRecommendClient, ImageTextRecommendInitialData, ImageTextRecommendProps, ImageTextRecommendServer, LikeDetailItem, LikeTab, LikeTabProps, LikeTabServer, MarqueeClient, MarqueeProps, MarqueeServer, MaterialRegistry, NodeDocument, PageDocument, PageMeta, ProfileHeaderInspectorProps, ProfileMainAuthConfig, ProfileMainInspectorProps, PropDefinition, PropSchema, PublishTab, PublishTabProps, PublishTabServer, PublishTabUserInfo, RawContentData, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps, SearchHistoryClient, SearchHistoryProps, SearchHistoryServer, SearchInputClient, SearchInputProps, SearchInputServer, SimpleSearchClient as SimpleSearch, defaultProps$21 as SimpleSearchDefaultData, schema$23 as SimpleSearchSchema, StylePropDefinition, StyleSchema, TabBarClient, TabBarProps, TabBarServer, TagSearchClient as TagSearch, TagSearchBarClient as TagSearchBar, defaultProps$22 as TagSearchBarDefaultData, schema$24 as TagSearchBarSchema, defaultProps$23 as TagSearchDefaultData, schema$25 as TagSearchSchema, TextRecommendClient, TextRecommendProps, TextRecommendServer, UserProfileHeader, UserProfileHeaderAuthConfig, UserProfileHeaderClient, UserProfileHeaderClientProps, UserProfileHeaderProps, UserProfileMain, UserProfileMainClient, UserProfileMainProps, UserProfileMainRenderMode, UserProfileMainShell, UserProfileMainShellProps, basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema, basicBannerMaterial, buildCollectTabPrefetch, buildContentUrl, buildHistoryTabPrefetch, buildLikeTabPrefetch, buildPublishTabPrefetch, buildUserProfileHeaderPrefetch, buttonInspectorDefaultProps, buttonInspectorPropsSchema, commonStyleSchema, commonStylesToInline, customStylesToInline, defaultMarqueePeriod, exampleButtonMaterial, extractDataByComponentType, floatingBallInspectorDefaultProps, floatingBallInspectorPropsSchema, floatingBallMaterial, getCardSpecConfig, getChannelList, getDefaultMarqueePeriod, homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema, homeRecommendGridMaterial, homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema, homeRecommendWaterfallMaterial, imageTextRecommendInspectorPropsSchema, imageTextRecommendMaterial, marqueeInspectorPropsSchema, marqueeMaterial, mergeStyles, profileHeaderInspectorDefaultProps, profileHeaderInspectorPropsSchema, profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground, profileMainCollectCollectionTabOptions, profileMainCollectTabOptions, profileMainHistoryTabOptions, profileMainInspectorDefaultProps, profileMainInspectorPropsSchema, profileMainLikeTabOptions, profileMainMaterial, profileMainMineTabOptions, profileMainProfileTabOptions, profileMainTabOptions, searchHistoryInspectorPropsSchema, searchHistoryMaterial, searchInputInspectorPropsSchema, searchInputMaterial, tabBarInspectorPropsSchema, tabBarMaterial, textRecommendInspectorPropsSchema, textRecommendMaterial, transformContentListToCardItems, transformContentToCardItem };
157
+ export { BaseComponentProps, BasicBannerClient as BasicBanner, defaultProps as BasicBannerDefaultData, BasicBanner as BasicBannerMaterialComponent, schema as BasicBannerSchema, BasicFeatureGridClient as BasicFeatureGrid, defaultProps$1 as BasicFeatureGridDefaultData, schema$1 as BasicFeatureGridSchema, BasicFullscreen, FullscreenFeedClient as BasicFullscreenFeed, defaultProps$2 as BasicFullscreenFeedDefaultData, schema$2 as BasicFullscreenFeedSchema, BasicLogoClient as BasicLogo, defaultProps$3 as BasicLogoDefaultData, schema$3 as BasicLogoSchema, BasicNavBarClient as BasicNavBar, defaultProps$4 as BasicNavBarDefaultData, schema$4 as BasicNavBarSchema, BasicPostCardClient as BasicPostCard, defaultProps$5 as BasicPostCardDefaultData, schema$5 as BasicPostCardSchema, BasicRecommendedUsersClient as BasicRecommendedUsers, defaultProps$6 as BasicRecommendedUsersDefaultData, schema$6 as BasicRecommendedUsersSchema, BasicSearchClient as BasicSearch, BasicSearchBarClient as BasicSearchBar, defaultProps$7 as BasicSearchBarDefaultData, schema$7 as BasicSearchBarSchema, defaultProps$8 as BasicSearchDefaultData, schema$8 as BasicSearchSchema, BuildCollectTabPrefetchParams, BuildHistoryTabPrefetchParams, BuildLikeTabPrefetchParams, BuildPublishTabPrefetchParams, BuildUserProfileHeaderPrefetchParams, Button, ButtonClient, ButtonInspectorProps, ButtonProps, CARD_SPEC_MAP, CardCornerMode, CardGrid2x3Client as CardGrid2x3, defaultProps$9 as CardGrid2x3DefaultData, CardGrid2x3InfiniteClient as CardGrid2x3Infinite, defaultProps$10 as CardGrid2x3InfiniteDefaultData, schema$9 as CardGrid2x3InfiniteSchema, schema$10 as CardGrid2x3Schema, CardGrid2x4Client as CardGrid2x4, defaultProps$11 as CardGrid2x4DefaultData, schema$11 as CardGrid2x4Schema, CardGrid3x3Client as CardGrid3x3, defaultProps$12 as CardGrid3x3DefaultData, CardGrid3x3InfiniteClient as CardGrid3x3Infinite, defaultProps$13 as CardGrid3x3InfiniteDefaultData, schema$12 as CardGrid3x3InfiniteSchema, schema$13 as CardGrid3x3Schema, defaultProps$14 as CardItemDefaultData, schema$14 as CardItemSchema, defaultProps$15 as CardLayoutDefaultData, schema$15 as CardLayoutSchema, CardSpec, ChannelDataItem, CollectTab, CollectTabAuthConfig, CollectTabProps, CollectTabServer, CommonStyleSchema, ComponentMaterial, ComponentSchema, ComponentType, ContentBlockItem, DataBinding, DataBindingField, DataBindingSourceType, DataBindingUIMode, DataSchema, DataSlot, DataSourceType, DetailSearchBarClient as DetailSearchBar, defaultProps$16 as DetailSearchBarDefaultData, schema$16 as DetailSearchBarSchema, EventDefinition, EventSchema, ExtractedDataItem, FieldSchema, FieldType, FilterSearchClient as FilterSearch, FilterSearchBarClient as FilterSearchBar, defaultProps$17 as FilterSearchBarDefaultData, schema$17 as FilterSearchBarSchema, defaultProps$18 as FilterSearchDefaultData, schema$18 as FilterSearchSchema, FloatingBall, FloatingBallClient, FloatingBallClientProps, FloatingBallInspectorProps, FullscreenPostFeedClient as FullscreenFeedClient, defaultProps$19 as FullscreenPostFeedDefaultData, schema$19 as FullscreenPostFeedSchema, FullscreenVideoFeedClient as FullscreenVideoClient, defaultProps$20 as FullscreenVideoFeedDefaultData, schema$20 as FullscreenVideoFeedSchema, HistoryTab, HistoryTabAuthConfig, HistoryTabProps, HistoryTabServer, HomeRecommendGridClient as HomeRecommendGrid, homeRecommendGridInspectorDefaultProps as HomeRecommendGridDefaultData, HomeRecommendGrid as HomeRecommendGridMaterialComponent, schema$21 as HomeRecommendGridSchema, HomeRecommendWaterfallClient as HomeRecommendWaterfall, homeRecommendWaterfallInspectorDefaultProps as HomeRecommendWaterfallDefaultData, HomeRecommendWaterfall as HomeRecommendWaterfallMaterialComponent, schema$22 as HomeRecommendWaterfallSchema, ImageTextRecommendClient, ImageTextRecommendProps, ImageTextRecommendServer, LikeDetailItem, LikeTab, LikeTabProps, LikeTabServer, MarqueeClient, MarqueeProps, MarqueeServer, MaterialRegistry, NodeDocument, PageDocument, PageMeta, ProfileHeaderInspectorProps, ProfileMainAuthConfig, ProfileMainInspectorProps, PropDefinition, PropSchema, PublishTab, PublishTabProps, PublishTabServer, PublishTabUserInfo, RawContentData, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps, SearchHistoryClient, SearchHistoryProps, SearchHistoryServer, SearchInputClient, SearchInputInspectorProps, SearchInputProps, SearchInputServer, SimpleSearchClient as SimpleSearch, defaultProps$21 as SimpleSearchDefaultData, schema$23 as SimpleSearchSchema, StylePropDefinition, StyleSchema, TabBarClient, TabBarProps, TabBarServer, TagSearchClient as TagSearch, TagSearchBarClient as TagSearchBar, defaultProps$22 as TagSearchBarDefaultData, schema$24 as TagSearchBarSchema, defaultProps$23 as TagSearchDefaultData, schema$25 as TagSearchSchema, TextRecommendClient, TextRecommendProps, TextRecommendServer, UserProfileHeader, UserProfileHeaderAuthConfig, UserProfileHeaderClient, UserProfileHeaderClientProps, UserProfileHeaderProps, UserProfileMain, UserProfileMainClient, UserProfileMainProps, UserProfileMainRenderMode, UserProfileMainShell, UserProfileMainShellProps, basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema, basicBannerMaterial, buildCollectTabPrefetch, buildContentUrl, buildHistoryTabPrefetch, buildLikeTabPrefetch, buildPublishTabPrefetch, buildUserProfileHeaderPrefetch, buttonInspectorDefaultProps, buttonInspectorPropsSchema, commonStyleSchema, commonStylesToInline, customStylesToInline, defaultMarqueePeriod, exampleButtonMaterial, extractDataByComponentType, floatingBallInspectorDefaultProps, floatingBallInspectorPropsSchema, floatingBallMaterial, getCardSpecConfig, getChannelList, getDefaultMarqueePeriod, homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema, homeRecommendGridMaterial, homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema, homeRecommendWaterfallMaterial, imageTextRecommendInspectorPropsSchema, imageTextRecommendMaterial, marqueeInspectorPropsSchema, marqueeMaterial, mergeStyles, profileHeaderInspectorDefaultProps, profileHeaderInspectorPropsSchema, profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground, profileMainCollectCollectionTabOptions, profileMainCollectTabOptions, profileMainHistoryTabOptions, profileMainInspectorDefaultProps, profileMainInspectorPropsSchema, profileMainLikeTabOptions, profileMainMaterial, profileMainMineTabOptions, profileMainProfileTabOptions, profileMainTabOptions, searchHistoryInspectorPropsSchema, searchHistoryMaterial, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema, searchInputMaterial, tabBarInspectorPropsSchema, tabBarMaterial, textRecommendInspectorPropsSchema, textRecommendMaterial, transformContentListToCardItems, transformContentToCardItem };
package/dist/biz.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- import{CARD_SPEC_MAP as ee,CardSpec as te,getCardSpecConfig as e}from"./components/biz/utils/constants/card-spec.mjs";import{getChannelList as t}from"./components/biz/utils/helpers/get-channel-list.mjs";import{buildContentUrl as n}from"./components/biz/utils/helpers/url.mjs";import{DataBindingUIMode as r,DataSourceType as i}from"./components/biz/utils/schema/data.mjs";import{commonStylesToInline as a,customStylesToInline as o,mergeStyles as s}from"./components/biz/utils/styles/helpers.mjs";import{commonStyleSchema as c}from"./components/biz/utils/styles/schema.mjs";import{transformContentListToCardItems as l,transformContentToCardItem as u}from"./components/biz/utils/transformers/card-grid.mjs";import{defaultProps as d}from"./components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs";import{schema as f}from"./components/biz/business/banner/variants/basic-banner/schema/index.mjs";import{defaultProps as p}from"./components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as m}from"./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import{BasicFullscreen as h}from"./components/biz/basics/fullscreen-feed/basic-fullscreen.mjs";import{defaultProps as g}from"./components/biz/basics/fullscreen-feed/defaults/default-props.mjs";import{schema as _}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import{schema as v}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import{defaultProps as y}from"./components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs";import{defaultProps as b}from"./components/biz/basics/search/variants/basic-search/defaults/default-props.mjs";import{defaultProps as x}from"./components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{defaultProps as S}from"./components/biz/basics/search/variants/simple-search/defaults/default-props.mjs";import{schema as C}from"./components/biz/basics/search/variants/simple-search/schema/index.mjs";import w from"./components/biz/basics/search/variants/simple-search/index.mjs";import{schema as T}from"./components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs";import E from"./components/biz/business/search-bar/variants/detail-search-bar/index.mjs";import{homeRecommendGridInspectorDefaultProps as D,homeRecommendGridInspectorPropsSchema as O}from"./components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs";import{schema as k}from"./components/biz/business/home-recommend/home-recommend-grid/schema.mjs";import{homeRecommendWaterfallInspectorDefaultProps as A,homeRecommendWaterfallInspectorPropsSchema as j}from"./components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs";import{schema as M}from"./components/biz/business/home-recommend/home-recommend-waterfall/schema.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/logo/variants/basic-logo/schema/index.mjs";import G from"./components/biz/basics/logo/variants/basic-logo/index.mjs";import{schema as K}from"./components/biz/basics/search/variants/basic-search/schema/index.mjs";import q from"./components/biz/basics/search/variants/basic-search/index.mjs";import{defaultProps as J}from"./components/biz/basics/search/variants/filter-search/defaults/default-props.mjs";import{schema as Y}from"./components/biz/basics/search/variants/filter-search/schema/index.mjs";import X from"./components/biz/basics/search/variants/filter-search/index.mjs";import{defaultProps as Z}from"./components/biz/basics/search/variants/tag-search/defaults/default-props.mjs";import{schema as Q}from"./components/biz/basics/search/variants/tag-search/schema/index.mjs";import ne from"./components/biz/basics/search/variants/tag-search/index.mjs";import{basicBannerInspectorDefaultProps as re,basicBannerInspectorPropsSchema as ie}from"./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as ae}from"./components/biz/business/banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as oe}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import se from"./components/biz/business/banner/variants/basic-banner/index.mjs";import{defaultProps as ce}from"./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as le}from"./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";import ue from"./components/biz/business/card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as de}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as fe}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import pe from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as me}from"./components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as he}from"./components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs";import ge from"./components/biz/business/card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as _e}from"./components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as ve}from"./components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs";import ye from"./components/biz/business/card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as be}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as xe}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import Se from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs";import Ce from"./components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as we}from"./components/biz/business/floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as Te,floatingBallInspectorPropsSchema as Ee}from"./components/biz/business/floating-ball/schema.mjs";import{FloatingBall as De}from"./components/biz/business/floating-ball/server.mjs";import{floatingBallMaterial as Oe}from"./components/biz/business/floating-ball/material.mjs";import{defaultProps as ke}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import Ae from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as je}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import Me from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{HomeRecommendGrid as Ne}from"./components/biz/business/home-recommend/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as Pe}from"./components/biz/business/home-recommend/home-recommend-grid/material.mjs";import Fe from"./components/biz/business/home-recommend/home-recommend-grid/index.mjs";import{HomeRecommendWaterfall as Ie}from"./components/biz/business/home-recommend/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as Le}from"./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";import Re from"./components/biz/business/home-recommend/home-recommend-waterfall/index.mjs";import{ImageTextRecommendClient as $}from"./components/biz/business/image-text-recommend/client.mjs";import{imageTextRecommendInspectorPropsSchema as ze}from"./components/biz/business/image-text-recommend/schema.mjs";import{ImageTextRecommendServer as Be}from"./components/biz/business/image-text-recommend/server.mjs";import{imageTextRecommendMaterial as Ve}from"./components/biz/business/image-text-recommend/material.mjs";import{defaultMarqueePeriod as He,getDefaultMarqueePeriod as Ue,marqueeInspectorPropsSchema as We}from"./components/biz/business/marquee/schema.mjs";import{MarqueeClient as Ge}from"./components/biz/business/marquee/client.mjs";import{MarqueeServer as Ke}from"./components/biz/business/marquee/server.mjs";import{marqueeMaterial as qe}from"./components/biz/business/marquee/material.mjs";import{defaultProps as Je}from"./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as Ye}from"./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";import Xe from"./components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as Ze}from"./components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs";import Qe from"./components/biz/business/post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as $e}from"./components/biz/business/profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as et,profileHeaderInspectorPropsSchema as tt}from"./components/biz/business/profile/profile-header/schema.mjs";import{UserProfileHeader as nt,buildUserProfileHeaderPrefetch as rt}from"./components/biz/business/profile/profile-header/server.mjs";import{profileHeaderMaterial as it,profileHeaderMaterialWithDisabledBackground as at}from"./components/biz/business/profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as ot,profileMainCollectTabOptions as st,profileMainHistoryTabOptions as ct,profileMainLikeTabOptions as lt,profileMainMineTabOptions as ut,profileMainProfileTabOptions as dt,profileMainTabOptions as ft}from"./components/biz/business/profile/profile-main/variants.mjs";import{UserProfileMainShell as pt}from"./components/biz/business/profile/profile-main/shell.mjs";import{UserProfileMainClient as mt}from"./components/biz/business/profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as ht,profileMainInspectorPropsSchema as gt}from"./components/biz/business/profile/profile-main/schema.mjs";import{CollectTab as _t}from"./components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as vt,buildCollectTabPrefetch as yt}from"./components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as bt}from"./components/biz/business/profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as xt,buildHistoryTabPrefetch as St}from"./components/biz/business/profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as Ct}from"./components/biz/business/profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as wt,buildLikeTabPrefetch as Tt}from"./components/biz/business/profile/profile-main/tabs/like-tab/server.mjs";import{UserProfileMain as Et}from"./components/biz/business/profile/profile-main/server.mjs";import{profileMainMaterial as Dt}from"./components/biz/business/profile/profile-main/material.mjs";import{PublishTab as Ot}from"./components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as kt,buildPublishTabPrefetch as At}from"./components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs";import jt 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 Nt}from"./components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs";import Pt from"./components/biz/business/search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as Ft}from"./components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as It}from"./components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs";import Lt from"./components/biz/business/search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as Rt}from"./components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as zt}from"./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";import Bt from"./components/biz/business/search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as Vt}from"./components/biz/business/search-history/client.mjs";import{searchHistoryInspectorPropsSchema as Ht}from"./components/biz/business/search-history/schema.mjs";import{SearchHistoryServer as Ut}from"./components/biz/business/search-history/server.mjs";import{searchHistoryMaterial as Wt}from"./components/biz/business/search-history/material.mjs";import{SearchInputClient as Gt}from"./components/biz/business/search-input/client.mjs";import{searchInputInspectorPropsSchema as Kt}from"./components/biz/business/search-input/schema.mjs";import{SearchInputServer as qt}from"./components/biz/business/search-input/server.mjs";import{searchInputMaterial as Jt}from"./components/biz/business/search-input/material.mjs";import{TabBarClient as Yt}from"./components/biz/business/tab-bar/client.mjs";import{tabBarInspectorPropsSchema as Xt}from"./components/biz/business/tab-bar/schema.mjs";import{TabBarServer as Zt}from"./components/biz/business/tab-bar/server.mjs";import{tabBarMaterial as Qt}from"./components/biz/business/tab-bar/material.mjs";import{TextRecommendClient as $t}from"./components/biz/business/text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as en}from"./components/biz/business/text-recommend/schema.mjs";import{TextRecommendServer as tn}from"./components/biz/business/text-recommend/server.mjs";import{textRecommendMaterial as nn}from"./components/biz/business/text-recommend/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{se as BasicBanner,d as BasicBannerDefaultData,ae as BasicBannerMaterialComponent,f as BasicBannerSchema,Ce as BasicFeatureGrid,p as BasicFeatureGridDefaultData,m as BasicFeatureGridSchema,h as BasicFullscreen,U as BasicFullscreenFeed,g as BasicFullscreenFeedDefaultData,H as BasicFullscreenFeedSchema,G as BasicLogo,y as BasicLogoDefaultData,W as BasicLogoSchema,Xe as BasicNavBar,Je as BasicNavBarDefaultData,Ye as BasicNavBarSchema,Qe as BasicPostCard,Ze as BasicPostCardDefaultData,N as BasicPostCardSchema,jt as BasicRecommendedUsers,P as BasicRecommendedUsersDefaultData,F as BasicRecommendedUsersSchema,q as BasicSearch,Pt as BasicSearchBar,Mt as BasicSearchBarDefaultData,Nt as BasicSearchBarSchema,b as BasicSearchDefaultData,K as BasicSearchSchema,sn as Button,rn as ButtonClient,ee as CARD_SPEC_MAP,ue as CardGrid2x3,ce as CardGrid2x3DefaultData,pe as CardGrid2x3Infinite,de as CardGrid2x3InfiniteDefaultData,fe as CardGrid2x3InfiniteSchema,le as CardGrid2x3Schema,ge as CardGrid2x4,me as CardGrid2x4DefaultData,he as CardGrid2x4Schema,ye as CardGrid3x3,_e as CardGrid3x3DefaultData,Se as CardGrid3x3Infinite,be as CardGrid3x3InfiniteDefaultData,xe as CardGrid3x3InfiniteSchema,ve as CardGrid3x3Schema,R as CardItemDefaultData,z as CardItemSchema,B as CardLayoutDefaultData,V as CardLayoutSchema,te as CardSpec,_t as CollectTab,vt as CollectTabServer,I as ComponentType,r as DataBindingUIMode,i as DataSourceType,E as DetailSearchBar,x as DetailSearchBarDefaultData,T as DetailSearchBarSchema,X as FilterSearch,Lt as FilterSearchBar,Ft as FilterSearchBarDefaultData,It as FilterSearchBarSchema,J as FilterSearchDefaultData,Y as FilterSearchSchema,De as FloatingBall,we as FloatingBallClient,Ae as FullscreenFeedClient,ke as FullscreenPostFeedDefaultData,_ as FullscreenPostFeedSchema,Me as FullscreenVideoClient,je as FullscreenVideoFeedDefaultData,v as FullscreenVideoFeedSchema,bt as HistoryTab,xt as HistoryTabServer,Fe as HomeRecommendGrid,D as HomeRecommendGridDefaultData,Ne as HomeRecommendGridMaterialComponent,k as HomeRecommendGridSchema,Re as HomeRecommendWaterfall,A as HomeRecommendWaterfallDefaultData,Ie as HomeRecommendWaterfallMaterialComponent,M as HomeRecommendWaterfallSchema,$ as ImageTextRecommendClient,Be as ImageTextRecommendServer,Ct as LikeTab,wt as LikeTabServer,Ge as MarqueeClient,Ke as MarqueeServer,Ot as PublishTab,kt as PublishTabServer,ln as Renderer,Vt as SearchHistoryClient,Ut as SearchHistoryServer,Gt as SearchInputClient,qt as SearchInputServer,w as SimpleSearch,S as SimpleSearchDefaultData,C as SimpleSearchSchema,Yt as TabBarClient,Zt as TabBarServer,ne as TagSearch,Bt as TagSearchBar,Rt as TagSearchBarDefaultData,zt as TagSearchBarSchema,Z as TagSearchDefaultData,Q as TagSearchSchema,$t as TextRecommendClient,tn as TextRecommendServer,nt as UserProfileHeader,$e as UserProfileHeaderClient,Et as UserProfileMain,mt as UserProfileMainClient,pt as UserProfileMainShell,re as basicBannerInspectorDefaultProps,ie as basicBannerInspectorPropsSchema,oe as basicBannerMaterial,yt as buildCollectTabPrefetch,n as buildContentUrl,St as buildHistoryTabPrefetch,Tt as buildLikeTabPrefetch,At as buildPublishTabPrefetch,rt as buildUserProfileHeaderPrefetch,an as buttonInspectorDefaultProps,on as buttonInspectorPropsSchema,c as commonStyleSchema,a as commonStylesToInline,o as customStylesToInline,He as defaultMarqueePeriod,cn as exampleButtonMaterial,L as extractDataByComponentType,Te as floatingBallInspectorDefaultProps,Ee as floatingBallInspectorPropsSchema,Oe as floatingBallMaterial,e as getCardSpecConfig,t as getChannelList,Ue as getDefaultMarqueePeriod,D as homeRecommendGridInspectorDefaultProps,O as homeRecommendGridInspectorPropsSchema,Pe as homeRecommendGridMaterial,A as homeRecommendWaterfallInspectorDefaultProps,j as homeRecommendWaterfallInspectorPropsSchema,Le as homeRecommendWaterfallMaterial,ze as imageTextRecommendInspectorPropsSchema,Ve as imageTextRecommendMaterial,We as marqueeInspectorPropsSchema,qe as marqueeMaterial,s as mergeStyles,et as profileHeaderInspectorDefaultProps,tt as profileHeaderInspectorPropsSchema,it as profileHeaderMaterial,at as profileHeaderMaterialWithDisabledBackground,ot as profileMainCollectCollectionTabOptions,st as profileMainCollectTabOptions,ct as profileMainHistoryTabOptions,ht as profileMainInspectorDefaultProps,gt as profileMainInspectorPropsSchema,lt as profileMainLikeTabOptions,Dt as profileMainMaterial,ut as profileMainMineTabOptions,dt as profileMainProfileTabOptions,ft as profileMainTabOptions,Ht as searchHistoryInspectorPropsSchema,Wt as searchHistoryMaterial,Kt as searchInputInspectorPropsSchema,Jt as searchInputMaterial,Xt as tabBarInspectorPropsSchema,Qt as tabBarMaterial,en as textRecommendInspectorPropsSchema,nn as textRecommendMaterial,l as transformContentListToCardItems,u as transformContentToCardItem};
2
+ import{CARD_SPEC_MAP as ee,CardSpec as te,getCardSpecConfig as e}from"./components/biz/utils/constants/card-spec.mjs";import{getChannelList as t}from"./components/biz/utils/helpers/get-channel-list.mjs";import{buildContentUrl as n}from"./components/biz/utils/helpers/url.mjs";import{DataBindingUIMode as r,DataSourceType as i}from"./components/biz/utils/schema/data.mjs";import{commonStylesToInline as a,customStylesToInline as o,mergeStyles as s}from"./components/biz/utils/styles/helpers.mjs";import{commonStyleSchema as c}from"./components/biz/utils/styles/schema.mjs";import{transformContentListToCardItems as l,transformContentToCardItem as u}from"./components/biz/utils/transformers/card-grid.mjs";import{defaultProps as d}from"./components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs";import{schema as f}from"./components/biz/business/banner/variants/basic-banner/schema/index.mjs";import{defaultProps as p}from"./components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as m}from"./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import{BasicFullscreen as h}from"./components/biz/basics/fullscreen-feed/basic-fullscreen.mjs";import{defaultProps as g}from"./components/biz/basics/fullscreen-feed/defaults/default-props.mjs";import{schema as _}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import{schema as v}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import{defaultProps as y}from"./components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs";import{defaultProps as b}from"./components/biz/basics/search/variants/basic-search/defaults/default-props.mjs";import{defaultProps as x}from"./components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{defaultProps as S}from"./components/biz/basics/search/variants/simple-search/defaults/default-props.mjs";import{schema as C}from"./components/biz/basics/search/variants/simple-search/schema/index.mjs";import w from"./components/biz/basics/search/variants/simple-search/index.mjs";import{schema as T}from"./components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs";import E from"./components/biz/business/search-bar/variants/detail-search-bar/index.mjs";import{homeRecommendGridInspectorDefaultProps as D,homeRecommendGridInspectorPropsSchema as O}from"./components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs";import{schema as k}from"./components/biz/business/home-recommend/home-recommend-grid/schema.mjs";import{homeRecommendWaterfallInspectorDefaultProps as A,homeRecommendWaterfallInspectorPropsSchema as j}from"./components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs";import{schema as M}from"./components/biz/business/home-recommend/home-recommend-waterfall/schema.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/logo/variants/basic-logo/schema/index.mjs";import G from"./components/biz/basics/logo/variants/basic-logo/index.mjs";import{schema as K}from"./components/biz/basics/search/variants/basic-search/schema/index.mjs";import q from"./components/biz/basics/search/variants/basic-search/index.mjs";import{defaultProps as J}from"./components/biz/basics/search/variants/filter-search/defaults/default-props.mjs";import{schema as Y}from"./components/biz/basics/search/variants/filter-search/schema/index.mjs";import X from"./components/biz/basics/search/variants/filter-search/index.mjs";import{defaultProps as Z}from"./components/biz/basics/search/variants/tag-search/defaults/default-props.mjs";import{schema as Q}from"./components/biz/basics/search/variants/tag-search/schema/index.mjs";import ne from"./components/biz/basics/search/variants/tag-search/index.mjs";import{basicBannerInspectorDefaultProps as re,basicBannerInspectorPropsSchema as ie}from"./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as ae}from"./components/biz/business/banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as oe}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import se from"./components/biz/business/banner/variants/basic-banner/index.mjs";import{defaultProps as ce}from"./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as le}from"./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";import ue from"./components/biz/business/card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as de}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as fe}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import pe from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as me}from"./components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as he}from"./components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs";import ge from"./components/biz/business/card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as _e}from"./components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as ve}from"./components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs";import ye from"./components/biz/business/card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as be}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as xe}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import Se from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs";import Ce from"./components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs";import{FloatingBallClient as we}from"./components/biz/business/floating-ball/client.mjs";import{floatingBallInspectorDefaultProps as Te,floatingBallInspectorPropsSchema as Ee}from"./components/biz/business/floating-ball/schema.mjs";import{FloatingBall as De}from"./components/biz/business/floating-ball/server.mjs";import{floatingBallMaterial as Oe}from"./components/biz/business/floating-ball/material.mjs";import{defaultProps as ke}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import Ae from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as je}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import Me from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{HomeRecommendGrid as Ne}from"./components/biz/business/home-recommend/home-recommend-grid/server.mjs";import{homeRecommendGridMaterial as Pe}from"./components/biz/business/home-recommend/home-recommend-grid/material.mjs";import Fe from"./components/biz/business/home-recommend/home-recommend-grid/index.mjs";import{HomeRecommendWaterfall as Ie}from"./components/biz/business/home-recommend/home-recommend-waterfall/server.mjs";import{homeRecommendWaterfallMaterial as Le}from"./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";import Re from"./components/biz/business/home-recommend/home-recommend-waterfall/index.mjs";import{ImageTextRecommendClient as $}from"./components/biz/business/image-text-recommend/client.mjs";import{imageTextRecommendInspectorPropsSchema as ze}from"./components/biz/business/image-text-recommend/schema.mjs";import{ImageTextRecommendServer as Be}from"./components/biz/business/image-text-recommend/server.mjs";import{imageTextRecommendMaterial as Ve}from"./components/biz/business/image-text-recommend/material.mjs";import{defaultMarqueePeriod as He,getDefaultMarqueePeriod as Ue,marqueeInspectorPropsSchema as We}from"./components/biz/business/marquee/schema.mjs";import{MarqueeClient as Ge}from"./components/biz/business/marquee/client.mjs";import{MarqueeServer as Ke}from"./components/biz/business/marquee/server.mjs";import{marqueeMaterial as qe}from"./components/biz/business/marquee/material.mjs";import{defaultProps as Je}from"./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as Ye}from"./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";import Xe from"./components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as Ze}from"./components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs";import Qe from"./components/biz/business/post-card/variants/basic-post-card/index.mjs";import{UserProfileHeaderClient as $e}from"./components/biz/business/profile/profile-header/client.mjs";import{profileHeaderInspectorDefaultProps as et,profileHeaderInspectorPropsSchema as tt}from"./components/biz/business/profile/profile-header/schema.mjs";import{UserProfileHeader as nt,buildUserProfileHeaderPrefetch as rt}from"./components/biz/business/profile/profile-header/server.mjs";import{profileHeaderMaterial as it,profileHeaderMaterialWithDisabledBackground as at}from"./components/biz/business/profile/profile-header/material.mjs";import{profileMainCollectCollectionTabOptions as ot,profileMainCollectTabOptions as st,profileMainHistoryTabOptions as ct,profileMainLikeTabOptions as lt,profileMainMineTabOptions as ut,profileMainProfileTabOptions as dt,profileMainTabOptions as ft}from"./components/biz/business/profile/profile-main/variants.mjs";import{UserProfileMainShell as pt}from"./components/biz/business/profile/profile-main/shell.mjs";import{UserProfileMainClient as mt}from"./components/biz/business/profile/profile-main/client.mjs";import{profileMainInspectorDefaultProps as ht,profileMainInspectorPropsSchema as gt}from"./components/biz/business/profile/profile-main/schema.mjs";import{CollectTab as _t}from"./components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs";import{CollectTabServer as vt,buildCollectTabPrefetch as yt}from"./components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs";import{HistoryTab as bt}from"./components/biz/business/profile/profile-main/tabs/history-tab/client.mjs";import{HistoryTabServer as xt,buildHistoryTabPrefetch as St}from"./components/biz/business/profile/profile-main/tabs/history-tab/server.mjs";import{LikeTab as Ct}from"./components/biz/business/profile/profile-main/tabs/like-tab/client.mjs";import{LikeTabServer as wt,buildLikeTabPrefetch as Tt}from"./components/biz/business/profile/profile-main/tabs/like-tab/server.mjs";import{UserProfileMain as Et}from"./components/biz/business/profile/profile-main/server.mjs";import{profileMainMaterial as Dt}from"./components/biz/business/profile/profile-main/material.mjs";import{PublishTab as Ot}from"./components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs";import{PublishTabServer as kt,buildPublishTabPrefetch as At}from"./components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs";import jt 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 Nt}from"./components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs";import Pt from"./components/biz/business/search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as Ft}from"./components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as It}from"./components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs";import Lt from"./components/biz/business/search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as Rt}from"./components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as zt}from"./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";import Bt from"./components/biz/business/search-bar/variants/tag-search-bar/index.mjs";import{SearchHistoryClient as Vt}from"./components/biz/business/search-history/client.mjs";import{searchHistoryInspectorPropsSchema as Ht}from"./components/biz/business/search-history/schema.mjs";import{SearchHistoryServer as Ut}from"./components/biz/business/search-history/server.mjs";import{searchHistoryMaterial as Wt}from"./components/biz/business/search-history/material.mjs";import{SearchInputClient as Gt}from"./components/biz/business/search-input/client.mjs";import{searchInputInspectorDefaultProps as Kt,searchInputInspectorPropsSchema as qt}from"./components/biz/business/search-input/schema.mjs";import{SearchInputServer as Jt}from"./components/biz/business/search-input/server.mjs";import{searchInputMaterial as Yt}from"./components/biz/business/search-input/material.mjs";import{TabBarClient as Xt}from"./components/biz/business/tab-bar/client.mjs";import{tabBarInspectorPropsSchema as Zt}from"./components/biz/business/tab-bar/schema.mjs";import{TabBarServer as Qt}from"./components/biz/business/tab-bar/server.mjs";import{tabBarMaterial as $t}from"./components/biz/business/tab-bar/material.mjs";import{TextRecommendClient as en}from"./components/biz/business/text-recommend/client.mjs";import{textRecommendInspectorPropsSchema as tn}from"./components/biz/business/text-recommend/schema.mjs";import{TextRecommendServer as nn}from"./components/biz/business/text-recommend/server.mjs";import{textRecommendMaterial as rn}from"./components/biz/business/text-recommend/material.mjs";import{ButtonClient as an}from"./components/biz/example/button/client.mjs";import{buttonInspectorDefaultProps as on,buttonInspectorPropsSchema as sn}from"./components/biz/example/button/schema.mjs";import{Button as cn}from"./components/biz/example/button/server.mjs";import{exampleButtonMaterial as ln}from"./components/biz/example/button/material.mjs";import{Renderer as un}from"./components/biz/renderer/renderer.mjs";export{se as BasicBanner,d as BasicBannerDefaultData,ae as BasicBannerMaterialComponent,f as BasicBannerSchema,Ce as BasicFeatureGrid,p as BasicFeatureGridDefaultData,m as BasicFeatureGridSchema,h as BasicFullscreen,U as BasicFullscreenFeed,g as BasicFullscreenFeedDefaultData,H as BasicFullscreenFeedSchema,G as BasicLogo,y as BasicLogoDefaultData,W as BasicLogoSchema,Xe as BasicNavBar,Je as BasicNavBarDefaultData,Ye as BasicNavBarSchema,Qe as BasicPostCard,Ze as BasicPostCardDefaultData,N as BasicPostCardSchema,jt as BasicRecommendedUsers,P as BasicRecommendedUsersDefaultData,F as BasicRecommendedUsersSchema,q as BasicSearch,Pt as BasicSearchBar,Mt as BasicSearchBarDefaultData,Nt as BasicSearchBarSchema,b as BasicSearchDefaultData,K as BasicSearchSchema,cn as Button,an as ButtonClient,ee as CARD_SPEC_MAP,ue as CardGrid2x3,ce as CardGrid2x3DefaultData,pe as CardGrid2x3Infinite,de as CardGrid2x3InfiniteDefaultData,fe as CardGrid2x3InfiniteSchema,le as CardGrid2x3Schema,ge as CardGrid2x4,me as CardGrid2x4DefaultData,he as CardGrid2x4Schema,ye as CardGrid3x3,_e as CardGrid3x3DefaultData,Se as CardGrid3x3Infinite,be as CardGrid3x3InfiniteDefaultData,xe as CardGrid3x3InfiniteSchema,ve as CardGrid3x3Schema,R as CardItemDefaultData,z as CardItemSchema,B as CardLayoutDefaultData,V as CardLayoutSchema,te as CardSpec,_t as CollectTab,vt as CollectTabServer,I as ComponentType,r as DataBindingUIMode,i as DataSourceType,E as DetailSearchBar,x as DetailSearchBarDefaultData,T as DetailSearchBarSchema,X as FilterSearch,Lt as FilterSearchBar,Ft as FilterSearchBarDefaultData,It as FilterSearchBarSchema,J as FilterSearchDefaultData,Y as FilterSearchSchema,De as FloatingBall,we as FloatingBallClient,Ae as FullscreenFeedClient,ke as FullscreenPostFeedDefaultData,_ as FullscreenPostFeedSchema,Me as FullscreenVideoClient,je as FullscreenVideoFeedDefaultData,v as FullscreenVideoFeedSchema,bt as HistoryTab,xt as HistoryTabServer,Fe as HomeRecommendGrid,D as HomeRecommendGridDefaultData,Ne as HomeRecommendGridMaterialComponent,k as HomeRecommendGridSchema,Re as HomeRecommendWaterfall,A as HomeRecommendWaterfallDefaultData,Ie as HomeRecommendWaterfallMaterialComponent,M as HomeRecommendWaterfallSchema,$ as ImageTextRecommendClient,Be as ImageTextRecommendServer,Ct as LikeTab,wt as LikeTabServer,Ge as MarqueeClient,Ke as MarqueeServer,Ot as PublishTab,kt as PublishTabServer,un as Renderer,Vt as SearchHistoryClient,Ut as SearchHistoryServer,Gt as SearchInputClient,Jt as SearchInputServer,w as SimpleSearch,S as SimpleSearchDefaultData,C as SimpleSearchSchema,Xt as TabBarClient,Qt as TabBarServer,ne as TagSearch,Bt as TagSearchBar,Rt as TagSearchBarDefaultData,zt as TagSearchBarSchema,Z as TagSearchDefaultData,Q as TagSearchSchema,en as TextRecommendClient,nn as TextRecommendServer,nt as UserProfileHeader,$e as UserProfileHeaderClient,Et as UserProfileMain,mt as UserProfileMainClient,pt as UserProfileMainShell,re as basicBannerInspectorDefaultProps,ie as basicBannerInspectorPropsSchema,oe as basicBannerMaterial,yt as buildCollectTabPrefetch,n as buildContentUrl,St as buildHistoryTabPrefetch,Tt as buildLikeTabPrefetch,At as buildPublishTabPrefetch,rt as buildUserProfileHeaderPrefetch,on as buttonInspectorDefaultProps,sn as buttonInspectorPropsSchema,c as commonStyleSchema,a as commonStylesToInline,o as customStylesToInline,He as defaultMarqueePeriod,ln as exampleButtonMaterial,L as extractDataByComponentType,Te as floatingBallInspectorDefaultProps,Ee as floatingBallInspectorPropsSchema,Oe as floatingBallMaterial,e as getCardSpecConfig,t as getChannelList,Ue as getDefaultMarqueePeriod,D as homeRecommendGridInspectorDefaultProps,O as homeRecommendGridInspectorPropsSchema,Pe as homeRecommendGridMaterial,A as homeRecommendWaterfallInspectorDefaultProps,j as homeRecommendWaterfallInspectorPropsSchema,Le as homeRecommendWaterfallMaterial,ze as imageTextRecommendInspectorPropsSchema,Ve as imageTextRecommendMaterial,We as marqueeInspectorPropsSchema,qe as marqueeMaterial,s as mergeStyles,et as profileHeaderInspectorDefaultProps,tt as profileHeaderInspectorPropsSchema,it as profileHeaderMaterial,at as profileHeaderMaterialWithDisabledBackground,ot as profileMainCollectCollectionTabOptions,st as profileMainCollectTabOptions,ct as profileMainHistoryTabOptions,ht as profileMainInspectorDefaultProps,gt as profileMainInspectorPropsSchema,lt as profileMainLikeTabOptions,Dt as profileMainMaterial,ut as profileMainMineTabOptions,dt as profileMainProfileTabOptions,ft as profileMainTabOptions,Ht as searchHistoryInspectorPropsSchema,Wt as searchHistoryMaterial,Kt as searchInputInspectorDefaultProps,qt as searchInputInspectorPropsSchema,Yt as searchInputMaterial,Zt as tabBarInspectorPropsSchema,$t as tabBarMaterial,tn as textRecommendInspectorPropsSchema,rn as textRecommendMaterial,l as transformContentListToCardItems,u as transformContentToCardItem};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../../../ui/box.mjs";import t from"../../../../../assets/icons/common/right_arrow.mjs";import{useEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({title:c,className:l=``}){let[u,d]=a(!1),[f,p]=a(!1),m=i(null),h=i(null),g=i(null),_=r(()=>c?.trim()??``,[c]);if(n(()=>{d(!1)},[_]),n(()=>{if(u){p(!0);return}if(!_){p(!1);return}let e=h.current,t=g.current;if(!e||!t){p(!1);return}let n=()=>{let n=e.clientWidth||e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;p(r>n+1)};n();let r=new ResizeObserver(n);return r.observe(e),m.current&&r.observe(m.current),()=>{r.disconnect()}},[u,_]),!_)return null;function v(){d(e=>!e)}return s(e,{ref:m,className:`relative flex items-start min-w-0 ${l}`,children:[o(`span`,{ref:g,className:`absolute invisible whitespace-nowrap text-[20px] leading-[28px] font-bold`,children:_}),o(`p`,{ref:h,className:`flex-1 min-w-0 text-[20px] leading-[28px] font-bold text-text1 ${u?``:`line-clamp-1`}`,children:_}),f&&o(`button`,{type:`button`,className:`ml-[8px] h-[24px] w-[24px] flex items-center justify-center`,onClick:v,children:o(t,{className:`h-[12px] w-[12px] text-text2 transition-transform ${u?`-rotate-90`:`rotate-90`}`})})]})}export{c as DetailInfoTitle};
2
+ "use client";import{Box as e}from"../../../../ui/box.mjs";import t from"../../../../../assets/icons/common/right_arrow.mjs";import{useEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({title:c,className:l=``}){let[u,d]=a(!1),[f,p]=a(!1),m=i(null),h=i(null),g=i(null),_=r(()=>c?.trim()??``,[c]);if(n(()=>{d(!1)},[_]),n(()=>{if(u){p(!0);return}if(!_){p(!1);return}let e=h.current,t=g.current;if(!e||!t){p(!1);return}let n=()=>{let n=e.clientWidth||e.getBoundingClientRect().width,r=t.getBoundingClientRect().width;p(r>n+1)};n();let r=new ResizeObserver(n);return r.observe(e),m.current&&r.observe(m.current),()=>{r.disconnect()}},[u,_]),!_)return null;function v(){d(e=>!e)}return s(e,{ref:m,className:`relative flex items-start min-w-0 overflow-hidden ${l}`,children:[o(`span`,{ref:g,className:`absolute invisible whitespace-nowrap text-[20px] leading-[28px] font-bold`,children:_}),o(`p`,{ref:h,className:`flex-1 min-w-0 text-[20px] leading-[28px] font-bold text-text1 ${u?``:`line-clamp-1`}`,children:_}),f&&o(`button`,{type:`button`,className:`ml-[8px] h-[24px] w-[24px] flex items-center justify-center`,onClick:v,children:o(t,{className:`h-[12px] w-[12px] text-text2 transition-transform ${u?`-rotate-90`:`rotate-90`}`})})]})}export{c as DetailInfoTitle};
@@ -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{useCardDecoration as n}from"../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTags as r}from"./detail-info-tags.mjs";import{DetailInfoTitle as i}from"./detail-info-title.mjs";import{useMemo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useTranslations as c}from"next-intl";function l({information:l,isShow:d,showTags:f=!0}){let p=c(`components.biz.business.detail`),{getTitleText:m}=n(),h=a(()=>m(l),[m,l]),g=a(()=>l.description||``,[l.description]),_=a(()=>u(l.score),[l.score]),v=l.tags||[],y=f&&v.length>0;return!h&&!g&&!y?null:s(e,{className:`w-full mt-4 px-[12px]`,children:[s(e,{className:`w-full flex items-start justify-between min-w-0`,children:[o(e,{className:`flex-1 pr-[12px] min-w-0`,children:o(i,{title:h})}),s(e,{className:`ml-4 shrink-0 flex flex-col items-center`,children:[o(e,{className:`text-[28px] leading-[36px] h-[36px] font-bold text-[#FF9F1A]`,children:_}),o(t,{className:`text-[12px] text-text2 leading-4`,children:p(`detailIntroduction.score`)})]})]}),g&&d&&o(t,{className:`mt-[12px] text-[14px] leading-[22px] text-text2`,children:g}),y&&o(r,{tags:v,className:`mt-[12px]`})]})}function u(e){let t=Number(e||`0`);return Number.isFinite(t)?(t>10?t/10:t).toFixed(1):`0`}export{l as DetailIntroduction};
2
+ "use client";import{Box as e}from"../../../../ui/box.mjs";import{Text as t}from"../../../../ui/text.mjs";import{useCardDecoration as n}from"../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTags as r}from"./detail-info-tags.mjs";import{DetailInfoTitle as i}from"./detail-info-title.mjs";import{useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";function f({information:f,isShow:m,showTags:h=!0}){let g=d(`components.biz.business.detail`),{getTitleText:_}=n(),v=o(()=>_(f),[_,f]),y=o(()=>f.description||``,[f.description]),[b,x]=c(!1),[S,C]=c(!1),w=s(null),T=o(()=>p(f.score),[f.score]),E=f.tags||[],D=h&&E.length>0;a(()=>{x(!1)},[y]),a(()=>{if(b){C(!0);return}let e=w.current;if(!y||!m||!e){C(!1);return}let t=()=>{C(e.scrollHeight>e.clientHeight+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[y,b,m]);function O(){x(e=>!e)}return!v&&!y&&!D?null:u(e,{className:`w-full mt-4 px-[12px]`,children:[u(e,{className:`w-full flex items-start justify-between min-w-0`,children:[l(e,{className:`flex-1 pr-[12px] min-w-0`,children:l(i,{title:v})}),u(e,{className:`ml-4 shrink-0 flex flex-col items-center`,children:[l(e,{className:`text-[28px] leading-[36px] h-[36px] font-bold text-[#FF9F1A]`,children:T}),l(t,{className:`text-[12px] text-text2 leading-4`,children:g(`detailIntroduction.score`)})]})]}),y&&m&&u(e,{className:`mt-[12px]`,children:[l(`p`,{ref:w,className:`text-[14px] leading-[22px] text-text2 break-all ${b?``:`line-clamp-1`}`,children:y}),S&&l(`button`,{type:`button`,className:`mt-[8px] text-theme5 inline-flex items-center text-[12px] leading-[18px] text-text2`,onClick:O,children:g(b?`detailIntroduction.collapse`:`detailIntroduction.expand`)})]}),D&&l(r,{tags:E,className:`mt-[12px]`})]})}function p(e){let t=Number(e||`0`);return Number.isFinite(t)?(t>10?t/10:t).toFixed(1):`0`}export{f as DetailIntroduction};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{createContext as e,use as t}from"react";import{jsx as n}from"react/jsx-runtime";const r=e(void 0);function i({value:e,children:t}){return n(r.Provider,{value:e,children:t})}function a(){return t(r)}export{i as VideoDetailMaterialRuntimeProvider,a as useVideoDetailMaterialRuntimeContext};
2
+ "use client";import{gContentGetVideoDetail as e}from"../../../../../service/generated/client.mjs";import{useRequest as t}from"../../../../../hooks/query/use-query.mjs";import{createContext as n,use as r,useCallback as i,useMemo as a}from"react";import{jsx as o}from"react/jsx-runtime";import{useParams as s}from"next/navigation";const c=n(void 0);function l({value:e,children:t}){return o(c,{value:e,children:t})}function u(){let e=r(c),t=d(e===void 0);return e??t}function d(n){let r=s().level,o=Array.isArray(r)?r:typeof r==`string`?[r]:[],c=o[0]||``,l=o.findIndex(e=>e===`episode`),u=l>=0?o[l+1]:o[2],d=Math.max(1,Number(u)||1),f=Math.max(0,d-1),p=o[1]||``,m=typeof window<`u`&&(window.isWebView===!0||window.isWebview===!0),{data:h,isPending:g,isFetching:_,isError:v,isSuccess:y}=t([`video-detail-material-fallback`,c],async()=>c?await e({id:c}):null,{enabled:n&&!!c}),b=a(()=>{let e=h?.data?.video;if(!(!e||typeof e!=`object`))return{...e,content_type:0,episode_cnt:e.links?.length||0}},[h?.data?.video]),x=i(e=>{if(!c||typeof window>`u`)return;let t=encodeURIComponent(p);window.location.href=m?`/webview/${c}/${t}/episode/${e}`:`/video/${c}/${t}/episode/${e}`},[c,m,p]);if(n)return{information:b,currentSeriesNum:d,onEpisodeChange:x,detailId:c,episodeIndex:f,resumeProgressSeconds:0,isShow:!0,isWebView:m,isInformationLoading:!!c&&!b&&(g||_),isInformationResolved:!c||!!b||v||y}}export{l as VideoDetailMaterialRuntimeProvider,u as useVideoDetailMaterialRuntimeContext};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{pxToVw as t}from"../../../../../utils/helper.mjs";import{Image as n}from"../../../../ui/image.mjs";import{Box as r}from"../../../../ui/box.mjs";import{Text as i}from"../../../../ui/text.mjs";import{useBrowseReport as a}from"../../../../../hooks/use-browse-report.mjs";import{MediaPreview as o,useMediaPreview as s}from"../../../../common/media-preview/index.mjs";import c from"../../../../common/video-player/index.mjs";import{UserActivityMediaGrid as l}from"../../../../common/list/user-activity-list/user-activity-list-item.mjs";import{memo as u,useCallback as d,useEffect as f,useMemo as p,useRef as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useTranslations as v}from"next-intl";const y=u(({mode:t=`renderer`,information:n,isVideo:a,episodeIndex:c=0,resumeProgressSeconds:u=0,className:f=``})=>{let m=t===`editor`,h=p(()=>({id:n.id,name:n.name,preview_images:n.preview_images,img_y:n.img_y,img_x:n.img_x}),[n.id,n.name,n.preview_images,n.img_y,n.img_x]),v=p(()=>{let e=n?.medias,t=Array.isArray(e)?e.filter(Boolean):[];return t.length>0?t:(h.preview_images?.length?h.preview_images:[h.img_y||h.img_x||``].filter(Boolean)).filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}))},[h.img_x,h.img_y,h.preview_images,n]),y=s(),x=p(()=>v.filter(Boolean).map(e=>{let t=e?.is_video?`video`:`image`,r=String(e?.media_url||``),i=e?.cover_image||n.img_y||n.img_x;return{src:r,type:t,...i?{cover:String(i)}:{}}}).filter(e=>!!e.src),[n.img_x,n.img_y,v]),S=d(e=>{m||!x.length||y.open(x,e)},[m,y,x]);return m?g(`img`,{src:`/static/components-thumb/video_player.png`,alt:`video-preview`,className:`w-full block`}):a?g(b,{information:n,episodeIndex:c,resumeProgressSeconds:u,isEditor:m}):_(`div`,{className:e(`w-full`,f),children:[_(r,{className:`mt-3 px-[12px] space-y-1`,children:[g(i,{as:`p`,className:`break-all`,dangerouslySetInnerHTML:{__html:n.description}}),g(l,{medias:v,onItemClick:S})]}),g(o,{})]})});y.displayName=`DetailHero`;const b=u(({information:e,episodeIndex:t,resumeProgressSeconds:n,isEditor:r})=>{let i=p(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images]);return g(x,{information:{...e,...i},episodeIndex:t,resumeProgressSeconds:n,isEditor:r})},(e,t)=>{let n=e.information,r=t.information;return n.id===r.id&&n.mid===r.mid&&n.img_width===r.img_width&&n.img_height===r.img_height&&n.img_y===r.img_y&&n.img_x===r.img_x&&e.resumeProgressSeconds===t.resumeProgressSeconds&&e.episodeIndex===t.episodeIndex&&e.isEditor===t.isEditor});b.displayName=`StableDetailPlayerBox`;function x({information:e,episodeIndex:i,resumeProgressSeconds:o,isEditor:s}){let l=v(`components.biz.business.detail`),u=m(0),y=m(0),b=Math.max(0,Number(i)||0),x=b+1,T=p(()=>e?.id,[e?.id]),E=p(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images,links:e.links}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images,e.links]),D=p(()=>E.mid||E.id,[E.id,E.mid]),O=p(()=>{let e=E.links?.[b]?.id;return e?String(e):`ep-${b+1}`},[b,E.links]),k=p(()=>`__reportData_detail_page__${E.id}:${O}`,[O,E.id]),A=p(()=>{if(s||typeof window>`u`)return 0;try{let e=sessionStorage.getItem(k);if(!e)return 0;let t=JSON.parse(e),n=Number(t.currentTime||0),r=Number(t.duration||0);if(!Number.isFinite(n)||!Number.isFinite(r))return 0;if(n>0&&r>0)return n}catch(e){console.error(`读取 sessionStorage 数据失败:`,e)}return 0},[s,k]),j=p(()=>{let e=Number(o||0);return Number.isFinite(e)&&e>0?e:0},[o]),M=p(()=>j>0?j:A,[j,A]),N=p(()=>{let t=w(e),n=t[t.length?Math.max(0,Math.min(b,t.length-1)):0]?.url||``,r=!!t.length;if(!r)return{hasVideo:!1,hlsList:[],videoUrl:``,width:1,height:1,resolution:`0x0`,aspectRatio:1,poster:``};let i=Number(E.img_width||0)||1,a=Number(E.img_height||0)||1;return{hasVideo:r,hlsList:t,videoUrl:n,width:i,height:a,resolution:S(i,a),aspectRatio:(i||1)/(a||1),poster:E.img_y||E.img_x||E.preview_images?.[0]||``}},[e.id,e.links,b,E.img_width,E.img_height,E.img_y,E.img_x,E.preview_images]),P=d((e,t)=>{u.current=e,y.current=t},[]),F=p(()=>N.videoUrl.endsWith(`m3u8`)?{startTimeSeconds:M,preload:`none`}:{startTimeSeconds:M},[M,N.videoUrl]);f(()=>{u.current=0,y.current=0},[T,b]);let I=a({contentId:T,browseEpisode:x,contentType:1,enabled:!s&&!!T,intervalMs:60*1e3,getCurrentTimeSeconds:()=>u.current,getDurationSeconds:()=>y.current});if(f(()=>{if(s)return;let e=()=>{if(!(typeof window>`u`)&&!(u.current<=0||y.current<=0))try{sessionStorage.setItem(k,JSON.stringify({episodeId:O,currentTime:u.current,duration:y.current}))}catch(e){console.error(`写入 sessionStorage 失败:`,e)}},t=()=>{e()},n=()=>{document.visibilityState===`hidden`&&e()},r=()=>{e()};return window.addEventListener(`beforeunload`,t),document.addEventListener(`visibilitychange`,n),window.addEventListener(`popstate`,r),()=>{window.removeEventListener(`beforeunload`,t),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`popstate`,r),e()}},[O,s,k]),!N.hasVideo)return g(`div`,{className:`mt-3 rounded-xl bg-bg1 px-3 py-10 text-center text-text3`,children:l(`videoHero.noVideos`)});let L=C(430,N.aspectRatio,242),R=L.height>0?t(L.height):`auto`,z=t(242);return _(h,{children:[g(r,{suppressHydrationWarning:!0,className:`w-full`,style:{height:R,maxWidth:`100%`,maxHeight:z}}),_(r,{className:`w-full relative bg-bg2 !fixed !top-[44px] !left-0 z-[10]`,children:[N.poster&&_(`div`,{className:`w-full h-full bg-bg2 absolute top-0 left-0 z-[1] overflow-hidden`,style:{height:R},children:[g(n,{src:N.poster,alt:l(`videoHero.coverAlt`),fill:!0,className:`object-cover`,priority:!0}),g(`div`,{className:`w-full h-full absolute top-0 left-0 z-[1] bg-[rgba(255,255,255,0.2)] backdrop-blur-[4px]`})]}),g(r,{suppressHydrationWarning:!0,"data-aspect-ratio":N.resolution,className:`w-full overflow-hidden flex justify-center relative z-[2]`,style:{height:R,maxWidth:`100%`,maxHeight:z,backdropFilter:`blur(0)`,WebkitBackdropFilter:`blur(0)`},children:g(c,{plyerId:`detail-player-${E.id}-${b}`,parentId:D,resolution:N.resolution||`0x0`,videoUrl:N.videoUrl,poster:N.poster,mergeConfig:F,onProgressUpdate:s?void 0:P,onPlay:s?void 0:I.handlePlay,onPause:s?void 0:I.handlePause,onEnded:s?void 0:I.handleEnded},`stable-player-${E.id}-${b}`)})]})]})}function S(e,t){return!e||!t?``:`${e}x${t}`}function C(e,t,n){let r=e/t;return r<=n?{width:e,height:r}:{width:n*t,height:n}}function w(e){let t=e.links||[];return t.length>0?t.map((e,t)=>({text:e.name||String(t+1),url:e.m3u8_url||e.preview_m3u8_url||``,definition:``,isDefault:t===0})).filter(e=>e.url):[]}export{y as DetailHero};
2
+ "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{pxToVw as t}from"../../../../../utils/helper.mjs";import{Image as n}from"../../../../ui/image.mjs";import{Box as r}from"../../../../ui/box.mjs";import{Text as i}from"../../../../ui/text.mjs";import{useBrowseReport as a}from"../../../../../hooks/use-browse-report.mjs";import{MediaPreview as o,useMediaPreview as s}from"../../../../common/media-preview/index.mjs";import c from"../../../../common/video-player/index.mjs";import{UserActivityMediaGrid as l}from"../../../../common/list/user-activity-list/user-activity-list-item.mjs";import{memo as u,useCallback as d,useEffect as f,useMemo as p,useRef as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useTranslations as v}from"next-intl";const y=u(({mode:t=`renderer`,information:n,isVideo:a,episodeIndex:c=0,resumeProgressSeconds:u=0,className:f=``})=>{let m=t===`editor`,h=p(()=>({id:n.id,name:n.name,preview_images:n.preview_images,img_y:n.img_y,img_x:n.img_x}),[n.id,n.name,n.preview_images,n.img_y,n.img_x]),v=p(()=>{let e=n?.medias,t=Array.isArray(e)?e.filter(Boolean):[];return t.length>0?t:(h.preview_images?.length?h.preview_images:[h.img_y||h.img_x||``].filter(Boolean)).filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}))},[h.img_x,h.img_y,h.preview_images,n]),y=s(),x=p(()=>v.filter(Boolean).map(e=>{let t=e?.is_video?`video`:`image`,r=String(e?.media_url||``),i=e?.cover_image||n.img_y||n.img_x;return{src:r,type:t,...i?{cover:String(i)}:{}}}).filter(e=>!!e.src),[n.img_x,n.img_y,v]),S=d(e=>{m||!x.length||y.open(x,e)},[m,y,x]);return m?g(`img`,{src:`/static/components-thumb/video_player.png`,alt:`video-preview`,className:`w-full block`}):a?g(b,{information:n,episodeIndex:c,resumeProgressSeconds:u,isEditor:m}):_(`div`,{className:e(`w-full`,f),children:[_(r,{className:`mt-3 px-[12px] space-y-1`,children:[g(i,{as:`p`,className:`break-all`,dangerouslySetInnerHTML:{__html:n.description}}),g(l,{medias:v,onItemClick:S})]}),g(o,{})]})});y.displayName=`DetailHero`;const b=u(({information:e,episodeIndex:t,resumeProgressSeconds:n,isEditor:r})=>{let i=p(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images]);return g(x,{information:{...e,...i},episodeIndex:t,resumeProgressSeconds:n,isEditor:r})},(e,t)=>{let n=e.information,r=t.information;return n.id===r.id&&n.mid===r.mid&&n.img_width===r.img_width&&n.img_height===r.img_height&&n.img_y===r.img_y&&n.img_x===r.img_x&&e.resumeProgressSeconds===t.resumeProgressSeconds&&e.episodeIndex===t.episodeIndex&&e.isEditor===t.isEditor});b.displayName=`StableDetailPlayerBox`;function x({information:e,episodeIndex:i,resumeProgressSeconds:o,isEditor:s}){let l=v(`components.biz.business.detail`),u=m(0),y=m(0),b=Math.max(0,Number(i)||0),x=b+1,T=p(()=>e?.id,[e?.id]),E=p(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images,links:e.links}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images,e.links]),D=p(()=>E.mid||E.id,[E.id,E.mid]),O=p(()=>{let e=E.links?.[b]?.id;return e?String(e):`ep-${b+1}`},[b,E.links]),k=p(()=>`__reportData_detail_page__${E.id}:${O}`,[O,E.id]),A=p(()=>{if(s||typeof window>`u`)return 0;try{let e=sessionStorage.getItem(k);if(!e)return 0;let t=JSON.parse(e),n=Number(t.currentTime||0),r=Number(t.duration||0);if(!Number.isFinite(n)||!Number.isFinite(r))return 0;if(n>0&&r>0)return n}catch(e){console.error(`读取 sessionStorage 数据失败:`,e)}return 0},[s,k]),j=p(()=>{let e=Number(o||0);return Number.isFinite(e)&&e>0?e:0},[o]),M=p(()=>j>0?j:A,[j,A]),N=p(()=>{let t=w(e),n=t[t.length?Math.max(0,Math.min(b,t.length-1)):0]?.url||``,r=!!t.length;if(!r)return{hasVideo:!1,hlsList:[],videoUrl:``,width:1,height:1,resolution:`0x0`,aspectRatio:1,poster:``};let i=Number(E.img_width||0)||1,a=Number(E.img_height||0)||1;return{hasVideo:r,hlsList:t,videoUrl:n,width:i,height:a,resolution:S(i,a),aspectRatio:(i||1)/(a||1),poster:E.img_y||E.img_x||E.preview_images?.[0]||``}},[e.id,e.links,b,E.img_width,E.img_height,E.img_y,E.img_x,E.preview_images]),P=d((e,t)=>{u.current=e,y.current=t},[]),F=p(()=>N.videoUrl.endsWith(`m3u8`)?{startTimeSeconds:M,preload:`none`}:{startTimeSeconds:M},[M,N.videoUrl]);f(()=>{u.current=0,y.current=0},[T,b]);let I=a({contentId:T,browseEpisode:x,contentType:1,enabled:!s&&!!T,intervalMs:60*1e3,getCurrentTimeSeconds:()=>u.current,getDurationSeconds:()=>y.current});if(f(()=>{if(s)return;let e=()=>{if(!(typeof window>`u`)&&!(u.current<=0||y.current<=0))try{sessionStorage.setItem(k,JSON.stringify({episodeId:O,currentTime:u.current,duration:y.current}))}catch(e){console.error(`写入 sessionStorage 失败:`,e)}},t=()=>{e()},n=()=>{document.visibilityState===`hidden`&&e()},r=()=>{e()};return window.addEventListener(`beforeunload`,t),document.addEventListener(`visibilitychange`,n),window.addEventListener(`popstate`,r),()=>{window.removeEventListener(`beforeunload`,t),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`popstate`,r),e()}},[O,s,k]),!N.hasVideo)return g(`div`,{className:`mt-3 rounded-xl bg-bg1 px-3 py-10 text-center text-text3`,children:l(`videoHero.noVideos`)});let L=C(430,N.aspectRatio,242),R=L.height>0?t(L.height):`auto`,z=L.height>0?`calc(${R} + 0px)`:`auto`,B=t(242);return _(h,{children:[g(r,{suppressHydrationWarning:!0,className:`w-full`,style:{height:z,maxWidth:`100%`,maxHeight:`calc(${B} + 0px)`}}),_(r,{className:`w-full relative bg-bg2 !fixed !top-[44px] !left-0 z-[10]`,children:[N.poster&&_(`div`,{className:`w-full h-full bg-bg2 absolute top-0 left-0 z-[1] overflow-hidden`,style:{height:R},children:[g(n,{src:N.poster,alt:l(`videoHero.coverAlt`),fill:!0,className:`object-cover`,priority:!0}),g(`div`,{className:`w-full h-full absolute top-0 left-0 z-[1] bg-[rgba(255,255,255,0.2)] backdrop-blur-[4px]`})]}),g(r,{suppressHydrationWarning:!0,"data-aspect-ratio":N.resolution,className:`w-full overflow-hidden flex justify-center relative z-[2]`,style:{height:R,maxWidth:`100%`,maxHeight:B,backdropFilter:`blur(0)`,WebkitBackdropFilter:`blur(0)`},children:g(c,{plyerId:`detail-player-${E.id}-${b}`,parentId:D,resolution:N.resolution||`0x0`,videoUrl:N.videoUrl,poster:N.poster,mergeConfig:F,onProgressUpdate:s?void 0:P,onPlay:s?void 0:I.handlePlay,onPause:s?void 0:I.handlePause,onEnded:s?void 0:I.handleEnded},`stable-player-${E.id}-${b}`)})]})]})}function S(e,t){return!e||!t?``:`${e}x${t}`}function C(e,t,n){let r=e/t;return r<=n?{width:e,height:r}:{width:n*t,height:n}}function w(e){let t=e.links||[];return t.length>0?t.map((e,t)=>({text:e.name||String(t+1),url:e.m3u8_url||e.preview_m3u8_url||``,definition:``,isDefault:t===0})).filter(e=>e.url):[]}export{y as DetailHero};
@@ -8,6 +8,6 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
8
8
  */
9
9
  declare function VideoDetailActionsClient({
10
10
  mode
11
- }: VideoDetailActionsProps): react_jsx_runtime0.JSX.Element;
11
+ }: VideoDetailActionsProps): react_jsx_runtime0.JSX.Element | null;
12
12
  //#endregion
13
13
  export { VideoDetailActionsClient };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{DetailOperate as e}from"../shared/detail-operate.mjs";import{editorPreviewInformation as t}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as n}from"../shared/runtime-context-provider.mjs";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`}){let a=n(),o=a?.information,s=a?.onUpdateInformation,c=i===`editor`||!o;return r(`div`,{className:c?`pointer-events-none`:void 0,children:r(e,{mode:i,information:c?t:o,onUpdate:c?e=>{}:s??(()=>{})})})}export{i as VideoDetailActionsClient};
2
+ "use client";import{DetailOperate as e}from"../shared/detail-operate.mjs";import{editorPreviewInformation as t}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as n}from"../shared/runtime-context-provider.mjs";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`}){let a=n(),o=a?.information,s=a?.onUpdateInformation,c=i===`editor`,l=c?t:o;return l?r(`div`,{className:c?`pointer-events-none`:void 0,children:r(e,{mode:i,information:l,onUpdate:c?e=>{}:s??(()=>{})})}):null}export{i as VideoDetailActionsClient};
@@ -10,6 +10,6 @@ declare function VideoDetailInfoClient({
10
10
  showTags,
11
11
  showEpisodes,
12
12
  mode
13
- }: VideoDetailInfoProps): react_jsx_runtime0.JSX.Element;
13
+ }: VideoDetailInfoProps): react_jsx_runtime0.JSX.Element | null;
14
14
  //#endregion
15
15
  export { VideoDetailInfoClient };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{SeriesEpisodes as e}from"../../../../common/series-episodes/index.mjs";import{DetailIntroduction as t}from"../shared/detail-introduction.mjs";import{editorPreviewInformation as n}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as r}from"../shared/runtime-context-provider.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({showTags:o=!1,showEpisodes:s=!1,mode:c=`renderer`}){let l=r(),u=l?.information,d=l?.currentSeriesNum??1,f=l?.onEpisodeChange,p=l?.isShow??!0,m=c===`editor`||!u,h=m?n:u,g=Math.max(1,Number(d||1)),_=m?e=>{}:f??(()=>{}),v=h?.is_more_link===`y`&&(h?.links?.length??0)>0;return a(`div`,{className:m?`pointer-events-none`:void 0,children:[i(t,{information:h,isShow:p,showTags:o}),s&&v&&i(e,{mode:`detail`,series_num:g,information:h,onEpisodeChange:_})]})}export{o as VideoDetailInfoClient};
2
+ "use client";import{SeriesEpisodes as e}from"../../../../common/series-episodes/index.mjs";import{DetailIntroduction as t}from"../shared/detail-introduction.mjs";import{editorPreviewInformation as n}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as r}from"../shared/runtime-context-provider.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({showTags:o=!1,showEpisodes:s=!1,mode:c=`renderer`}){let l=r(),u=l?.information,d=l?.currentSeriesNum??1,f=l?.onEpisodeChange,p=l?.isShow??!0,m=c===`editor`,h=m?n:u;if(!h)return null;let g=Math.max(1,Number(d||1)),_=m?e=>{}:f??(()=>{}),v=h?.is_more_link===`y`&&(h?.links?.length??0)>0;return a(`div`,{className:m?`pointer-events-none`:void 0,children:[i(t,{information:h,isShow:p,showTags:o}),s&&v&&i(e,{mode:`detail`,series_num:g,information:h,onEpisodeChange:_})]})}export{o as VideoDetailInfoClient};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../../../ui/box.mjs";import{useCardDecoration as t}from"../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTitle as n}from"../shared/detail-info-title.mjs";import{editorPreviewInformation as r}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as i}from"../shared/runtime-context-provider.mjs";import{jsx as a}from"react/jsx-runtime";function o({mode:o=`renderer`}){let s=i()?.information,c=o===`editor`||!s?r:s,{getTitleText:l}=t(),u=l(c);return u?a(e,{className:`w-full mt-[16px] px-[12px]`,children:a(n,{title:u})}):null}export{o as VideoDetailInfoTitleClient};
2
+ "use client";import{Box as e}from"../../../../ui/box.mjs";import{useCardDecoration as t}from"../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTitle as n}from"../shared/detail-info-title.mjs";import{editorPreviewInformation as r}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as i}from"../shared/runtime-context-provider.mjs";import{jsx as a}from"react/jsx-runtime";function o({mode:o=`renderer`}){let s=i()?.information,c=o===`editor`,{getTitleText:l}=t(),u=c?r:s;if(!u)return null;let d=l(u);return d?a(e,{className:`w-full mt-[16px] px-[12px]`,children:a(n,{title:d})}):null}export{o as VideoDetailInfoTitleClient};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../../../ui/box.mjs";import{useCardDecoration as t}from"../../../../../hooks/use-card-decoration.mjs";import{SeriesEpisodes as n}from"../../../../common/series-episodes/index.mjs";import{DetailInfoTags as r}from"../shared/detail-info-tags.mjs";import{DetailInfoTitle as i}from"../shared/detail-info-title.mjs";import{editorPreviewInformation as a}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as o}from"../shared/runtime-context-provider.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({showTags:l=!0,showEpisodes:u=!0,mode:d=`renderer`}){let f=o(),p=f?.information,m=f?.currentSeriesNum??1,h=f?.onEpisodeChange,g=d===`editor`||!p,_=g?a:p,v=Math.max(1,Number(m||1)),y=g?e=>{}:h??(()=>{}),{getTitleText:b}=t(),x=b(_),S=_?.is_more_link===`y`&&(_?.links?.length??0)>0,C=l&&(_.tags?.length??0)>0,w=u&&S;return!x&&!C&&!w?null:c(e,{className:`w-full mt-[16px] ${g?`pointer-events-none`:``}`,children:[c(e,{className:`px-[12px]`,children:[x&&s(i,{title:x}),C&&s(r,{tags:_.tags||[],className:`mt-[12px]`})]}),w&&s(n,{mode:`detail`,series_num:v,information:_,onEpisodeChange:y})]})}export{l as VideoDetailInfoTitleTagsEpisodesClient};
2
+ "use client";import{Box as e}from"../../../../ui/box.mjs";import{useCardDecoration as t}from"../../../../../hooks/use-card-decoration.mjs";import{SeriesEpisodes as n}from"../../../../common/series-episodes/index.mjs";import{DetailInfoTags as r}from"../shared/detail-info-tags.mjs";import{DetailInfoTitle as i}from"../shared/detail-info-title.mjs";import{editorPreviewInformation as a}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as o}from"../shared/runtime-context-provider.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({showTags:l=!0,showEpisodes:u=!0,mode:d=`renderer`}){let f=o(),p=f?.information,m=f?.currentSeriesNum??1,h=f?.onEpisodeChange,g=d===`editor`,{getTitleText:_}=t(),v=g,y=v?a:p;if(!y)return null;let b=Math.max(1,Number(m||1)),x=v?e=>{}:h??(()=>{}),S=_(y),C=y?.is_more_link===`y`&&(y?.links?.length??0)>0,w=l&&(y.tags?.length??0)>0,T=u&&C;return!S&&!w&&!T?null:c(e,{className:`w-full mt-[16px] ${v?`pointer-events-none`:``}`,children:[c(e,{className:`px-[12px]`,children:[S&&s(i,{title:S}),w&&s(r,{tags:y.tags||[],className:`mt-[12px]`})]}),T&&s(n,{mode:`detail`,series_num:b,information:y,onEpisodeChange:x})]})}export{l as VideoDetailInfoTitleTagsEpisodesClient};
@@ -7,7 +7,8 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
7
7
  * 视频播放器物料客户端组件。
8
8
  */
9
9
  declare function VideoDetailPlayerClient({
10
- mode
10
+ mode,
11
+ children
11
12
  }: VideoDetailPlayerProps): react_jsx_runtime0.JSX.Element;
12
13
  //#endregion
13
14
  export { VideoDetailPlayerClient };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{editorPreviewInformation as e}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as t}from"../shared/runtime-context-provider.mjs";import{DetailHero as n}from"../shared/video-hero.mjs";import{jsx as r}from"react/jsx-runtime";function i({mode:i=`renderer`}){let a=t(),o=a?.information,s=a?.episodeIndex??0,c=a?.resumeProgressSeconds??0,l=i===`editor`||!o,u=l?{...e,id:``,mid:``}:o;return r(`div`,{className:l?`pointer-events-none`:void 0,children:r(n,{mode:i,isVideo:!0,information:u,episodeIndex:l?0:s,resumeProgressSeconds:l?0:c})})}export{i as VideoDetailPlayerClient};
2
+ "use client";import{EmptyState as e}from"../../../../ui/empty.mjs";import{Skeleton as t}from"../../../../ui/skeleton.mjs";import n from"../../search-bar/variants/detail-search-bar/index.mjs";import{editorPreviewInformation as r}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as i}from"../shared/runtime-context-provider.mjs";import{DetailHero as a}from"../shared/video-hero.mjs";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import{useTranslations as l}from"next-intl";function u({mode:u=`renderer`,children:d}){let f=l(`components.pages.videoDetail`),p=i(),m=p?.information,h=p?.episodeIndex??0,g=p?.resumeProgressSeconds??0,_=p?.isWebView??!1,v=p?.isInformationLoading??!1,y=p?.isInformationResolved??!!m,b=u===`editor`,x=b?{...r,id:``,mid:``}:m,S=b?0:h,C=b?0:g,w=x?.status===`1`;return b&&x?s(`div`,{className:`pointer-events-none`,children:s(a,{mode:u,isVideo:!0,information:x,episodeIndex:S,resumeProgressSeconds:C})}):c(`div`,{className:`w-full bg-bg2 text-text1 ${_?``:`pt-11`}`,children:[!_&&s(`div`,{className:`fixed h-[44px] bg-black top-0 left-0 right-0 z-[1000]`,children:s(n,{})}),c(`div`,{className:`mx-auto w-full max-w-[840px]`,children:[x&&!w&&s(e,{type:`no-content`,text:f(`videoDetailClient.videoUnavailable`)}),x&&w&&c(o,{children:[!_&&s(a,{mode:u,isVideo:!0,information:x,episodeIndex:S,resumeProgressSeconds:C}),d]}),!x&&v&&c(`div`,{className:`px-[12px] pt-[16px]`,children:[s(t,{className:`w-full aspect-[16/9] rounded-[12px]`}),s(t,{className:`w-[70%] h-[24px] mt-[16px]`}),s(t,{className:`w-full h-[16px] mt-[12px]`}),s(t,{className:`w-[85%] h-[16px] mt-[8px]`})]}),!x&&!v&&y&&s(e,{type:`no-content`,text:f(`videoDetailClient.videoDeleted`)})]})]})}export{u as VideoDetailPlayerClient};
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { InferSchemaProps } from "../../../../../utils/schema/schema.mjs";
3
3
  import "../../../../../utils/schema/index.mjs";
4
+ import { ReactNode } from "react";
4
5
  import * as zod from "zod";
5
6
  import * as zod_v4_core0 from "zod/v4/core";
6
7
 
@@ -16,6 +17,8 @@ declare const videoDetailPlayerInspectorPropsSchema: zod.ZodObject<{
16
17
  }, zod_v4_core0.$strip>;
17
18
  type VideoDetailPlayerInspectorProps = InferSchemaProps<typeof videoDetailPlayerInspectorPropsSchema>;
18
19
  /** 播放器物料 props。 */
19
- type VideoDetailPlayerProps = VideoDetailPlayerInspectorProps;
20
+ interface VideoDetailPlayerProps extends VideoDetailPlayerInspectorProps {
21
+ children?: ReactNode;
22
+ }
20
23
  //#endregion
21
24
  export { VideoDetailPlayerInspectorProps, VideoDetailPlayerProps, videoDetailPlayerInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{gContentGetGuessYouLikeVideos as e}from"../../../../../service/generated/client.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{useRequest as r}from"../../../../../hooks/query/use-query.mjs";import i from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as a}from"../../../../common/cards/mini-three-card.mjs";import{useCardDecoration as o}from"../../../../../hooks/use-card-decoration.mjs";import{buildEditorPreviewRecommendList as s}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as c}from"../shared/runtime-context-provider.mjs";import{buildEpisodeLabel as l,clampColumns as u,mergeManualAndPool as d,mockPagedList as f,resolveRows as p}from"./utils.mjs";import{useEffect as m,useMemo as h,useRef as g,useState as _}from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";function b({rows:b,columns:te,smartTagEnabled:C,smartTagIds:w,title:ne,showPlayCount:re,playCountDelta:ie,showEpisode:T,enableInfinite:E,items:D,mode:O=`renderer`}){let k=c()?.detailId||``,A=O===`editor`,j=A||!k,{getVerticalHoCoverImageUrl:M,getTitleText:N}=o(),[P,F]=_(1),I=g(null),L=h(()=>w??[],[w]),R=h(()=>D??[],[D]),z=!!E&&!A,B=p(b,z),V=u(te),H=B*V,U=h(()=>s(H),[H]),{data:W}=r([`video-detail-recommend`,k],async()=>!k||j?null:await e(),{enabled:!j&&!!k}),G=h(()=>{if(j)return U;let e=W?.data?.videos;return Array.isArray(e)?e.map(e=>x(e)).filter(e=>!k||!e.id||e.id!==k):[]},[W?.data?.videos,k,U,j]),K=h(()=>C?new Set:new Set(R.map(e=>e.contentId)),[R,C]),q=h(()=>{if(j)return G;let e=G.filter(e=>!K.has(e.id));if(!C||L.length===0)return e;let t=new Set(L.map(String));return e.filter(e=>(Array.isArray(e.source_tags)?e.source_tags:String(e.source_tags||``).split(`,`).filter(Boolean)).some(e=>t.has(String(e?.id??e))))},[j,K,G,C,L]),J=h(()=>{if(C||!R.length)return[];let e=new Map(q.map(e=>[e.id,e]));return R.map((t,n)=>{let r=U[n%Math.max(1,U.length)],i=e.get(t.contentId)??(j?{...r,id:t.contentId||r.id||`preview-manual-${n+1}`,name:r.name||`猜你喜欢 ${n+1}`}:null);if(!i)return null;let a=t.titleMode===`custom`?t.title:N(i),o=t.coverMode===`upload`?t.coverUrl:M(i);return{info:{...i,name:a||i.name,img_y:o||i.img_y,img_x:o||i.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[U,q,N,M,j,R,C]),Y=h(()=>q.map(e=>({info:e})),[q]),X=h(()=>d(J,Y,H),[J,H,Y]),Z=h(()=>{if(!z)return X;let e=f(Y,P,H,5);return P===1?X:X.concat(e)},[X,P,H,Y,z]),Q=z&&P<5&&Y.length>0,$=String(ne||``).trim();return m(()=>{z&&F(1)},[k,z]),m(()=>{if(!z)return;let e=I.current;if(!e||!Q)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&F(e=>Math.min(e+1,5))});return t.observe(e),()=>{t.disconnect()}},[Q,z]),Z.length?y(t,{className:`w-full mt-[16px] ${j?`pointer-events-none`:``}`,children:[$?v(n,{className:`block pl-[12px] mb-[8px] text-text1 text-[18px] leading-[26px] font-bold`,children:$}):null,v(t,{className:`w-full flex flex-wrap px-[12px]`,children:Z.map((e,t)=>{let r=N(e.info),o=re!==!1&&(e.config?.showPlayCount??!0),s=e.config?.showEpisode??T,c=S(e.info.play_count||0),u=l(Number(e.info.update_status)===1?`done`:`updating`,e.info.episode_cnt||e.info.links?.length,e.info.episode_cnt||e.info.links?.length),d=Number.isFinite(V)&&V>0?V:3,f=`${100/d}%`,p=t%d,m=d>1?{paddingLeft:8*p/d,paddingRight:8*(d-p-1)/d}:null;return v(a,{url:M(e.info),text:r,textChild:v(n,{as:`h3`,className:`text-text1 text-[16px] h-[24px] leading-[24px] mt-[4px] line-clamp-1`,children:r}),style:{width:f,...m||{}},bottomLeftChild:o?y(`div`,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[v(i,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),c]}):null,bottomRightChild:s&&u?v(`div`,{className:`text-[#fff] text-[12px] leading-[20px] pr-2`,children:u}):null,linkPath:j?``:ee(e.info)},`guess-like-${t}`)})}),z&&v(`div`,{ref:I,className:`h-[1px] w-full`})]}):null}function x(e){return{id:e.video_id||``,mid:``,name:e.name||``,cat_id:``,cat_name:``,status:`1`,status_text:``,create_time:``,content_type:0,episode_cnt:e.episode_count||0,show_at:e.show_at??``,position:``,img_type:e.img_type??``,img_x:e.img_x??``,img_y:e.img_y??``,img_width:``,img_height:``,play_count:e.play_count,preview_images:[],duration:String(e.duration??``),score:String(e.score??``),is_more_link:e.is_more_link?`y`:`n`,update_status:String(e.update_status??``),description:e.description??``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:[],source_tags:e.source_tags??``,source_actor:[],links:Array.isArray(e.episodes)?e.episodes.map(e=>({id:e.id??``,name:e.name??``,preview_m3u8_url:e.preview_m3u8_url??``,m3u8_url:e.m3u8_url??``})):[],money:``,up_user:``,source_username:``,task_id:``,file_status:``}}function S(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 ee(e){if(e.content_type===0){let t=encodeURIComponent(e.name||``);return`/video/${e.id}/${t}/episode/1`}return`/post/${e.id}`}export{b as VideoDetailRecommendClient};
2
+ "use client";import{gContentGetGuessYouLikeVideos as e}from"../../../../../service/generated/client.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{useRequest as r}from"../../../../../hooks/query/use-query.mjs";import i from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as a}from"../../../../common/cards/mini-three-card.mjs";import{useCardDecoration as o}from"../../../../../hooks/use-card-decoration.mjs";import{buildEditorPreviewRecommendList as s}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as c}from"../shared/runtime-context-provider.mjs";import{clampColumns as l,mergeManualAndPool as u,resolveRows as d}from"./utils.mjs";import{useCallback as f,useEffect as p,useMemo as m,useRef as ee,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";function v({rows:v,columns:y,smartTagEnabled:x,smartTagIds:S,title:ae,showPlayCount:oe,playCountDelta:se,showEpisode:ce,enableInfinite:le,items:w,mode:ue=`renderer`}){let T=c()?.detailId||``,E=ue===`editor`,D=E,{getVerticalHoCoverImageUrl:O,getTitleText:k}=o(),de=ee(null),A=m(()=>S??[],[S]),j=m(()=>w??[],[w]),M=!!le&&!E,N=x===!0,P=!N,F=M&&N&&!D,fe=d(v,M),I=l(y),L=fe*I,[pe,R]=h([]),[z,B]=h(2),[V,H]=h(!1),[U,W]=h(!1),G=m(()=>s(L),[L]),{data:K}=r([`video-detail-recommend`,T,F?`paged`:`all`],async()=>!T||D?null:F?await e({page:1,page_size:16}):await e(),{enabled:!D&&!!T}),q=m(()=>D?G:b(K?.data?.videos,T),[K?.data?.videos,T,G,D]);p(()=>{if(!F){R([]),B(2),H(!1),W(!1);return}R(q),B(2),H(te(K?.data?.videos,16)),W(!1)},[K?.data?.videos,q,F]);let J=F?pe:q,Y=m(()=>P?new Set(j.map(e=>C(e.contentId)).filter(Boolean)):new Set,[j,P]),X=m(()=>{if(D)return J;let e=J.filter(e=>!Y.has(e.id));if(!N||A.length===0)return e;let t=new Set(A.map(String));return e.filter(e=>(Array.isArray(e.source_tags)?e.source_tags:String(e.source_tags||``).split(`,`).filter(Boolean)).some(e=>t.has(String(e?.id??e))))},[J,D,N,Y,A]),Z=m(()=>{if(!P||!j.length)return[];let e=new Map;return J.forEach(t=>{let n=C(t.id);n&&e.set(n,t)}),j.map((t,n)=>{let r=G[n%Math.max(1,G.length)],i=C(t.contentId),a=e.get(i)??(D?{...r,id:i||r.id||`preview-manual-${n+1}`,name:r.name||`猜你喜欢 ${n+1}`}:null);if(!a)return null;let o=t.titleMode===`custom`?t.title:k(a),s=t.coverMode===`upload`?t.coverUrl:O(a);return{info:{...a,name:o||a.name,img_y:s||a.img_y,img_x:s||a.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[G,J,k,O,D,j,P]),Q=m(()=>X.map(e=>({info:e})),[X]),me=m(()=>u(Z,Q,L),[Z,L,Q]),$=m(()=>{if(F){if(!Z.length)return Q;let e=new Set(Z.map(e=>e.info.id).filter(Boolean));return Z.concat(Q.filter(t=>!e.has(t.info.id)))}if(M){if(!Z.length)return Q;let e=new Set(Z.map(e=>e.info.id).filter(Boolean));return Z.concat(Q.filter(t=>!e.has(t.info.id)))}return me},[me,Z,Q,M,F]),he=V&&$.length>0?Math.max(0,$.length-4):-1,ge=String(ae||``).trim(),_e=f(async()=>{if(!(!F||!V||U)){W(!0);try{let t=await e({page:z,page_size:16}),n=Array.isArray(t.data?.videos)?t.data.videos:[],r=b(n,T),i=0;R(e=>{let t=new Set(e.map(e=>e.id).filter(Boolean)),n=[...e];return r.forEach(e=>{(!e.id||!t.has(e.id))&&(n.push(e),e.id&&t.add(e.id))}),i=n.length-e.length,n}),B(e=>e+1),H(te(n,16)&&i>0)}catch(e){console.error(`猜你喜欢分页加载失败`,e),H(!1)}finally{W(!1)}}},[T,V,U,z,F]);return p(()=>{if(!F)return;let e=de.current;if(!e||!V)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&!U&&_e()});return t.observe(e),()=>{t.disconnect()}},[_e,V,U,F,he]),$.length?_(t,{className:`w-full mt-[16px] ${D?`pointer-events-none`:``}`,children:[ge?g(n,{className:`block pl-[12px] mb-[8px] text-text1 text-[18px] leading-[26px] font-bold`,children:ge}):null,g(t,{className:`w-full flex flex-wrap px-[12px]`,children:$.map((e,t)=>{let r=k(e.info),o=oe!==!1&&(e.config?.showPlayCount??!0),s=e.config?.showEpisode??ce,c=re(e.info.play_count||0),l=ne(e.info),u=Number.isFinite(I)&&I>0?I:3,d=`${100/u}%`,f=t%u,p=u>1?{paddingLeft:8*f/u,paddingRight:8*(u-f-1)/u}:null;return g(`div`,{ref:t===he?de:void 0,style:{width:d,...p||{}},children:g(a,{url:O(e.info),text:r,textChild:g(n,{as:`h3`,className:`text-text1 text-[16px] h-[24px] leading-[24px] mt-[4px] line-clamp-1`,children:r}),style:{width:`100%`},bottomLeftChild:o?_(`div`,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[g(i,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),c]}):null,bottomRightChild:s&&l?g(`div`,{className:`text-[#fff] text-[12px] leading-[20px] pr-2`,children:l}):null,linkPath:D?``:ie(e.info)})},`guess-like-${t}`)})})]}):null}function y(e){return{id:e.video_id||``,mid:``,name:e.name||``,cat_id:``,cat_name:``,status:`1`,status_text:``,create_time:``,content_type:0,episode_cnt:e.episode_count||0,show_at:e.show_at??``,position:``,img_type:e.img_type??``,img_x:e.img_x??``,img_y:e.img_y??``,img_width:``,img_height:``,play_count:e.play_count,preview_images:[],duration:String(e.duration??``),score:String(e.score??``),is_more_link:e.is_more_link?`y`:`n`,update_status:String(e.update_status??``),description:e.description??``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:[],source_tags:e.source_tags??``,source_actor:[],links:Array.isArray(e.episodes)?e.episodes.map(e=>({id:e.id??``,name:e.name??``,preview_m3u8_url:e.preview_m3u8_url??``,m3u8_url:e.m3u8_url??``})):[],money:``,up_user:``,source_username:``,task_id:``,file_status:``}}function b(e,t){if(!Array.isArray(e))return[];let n=C(t);return e.map(e=>y(e)).filter(e=>!n||!e.id||C(e.id)!==n)}function te(e,t){if(!Array.isArray(e)||e.length===0)return!1;let n=e[0];if(typeof n?.has_more==`boolean`)return n.has_more;let r=Number(n?.total??0);return Number.isFinite(r)&&r>0?r>t:e.length>=t}function ne(e){if(x(e)){let t=Number(e.episode_cnt||e.links?.length||0);return t>0?`全${t}集`:``}return S(Number(e.duration||0))}function x(e){if(Number(e.type??e.content_type??0)===2)return!0;let t=e.is_more_link;if(t===!0||t===`y`||t===`1`)return!0;let n=Number(e.episode_cnt||e.links?.length||0);return Number.isFinite(n)&&n>1}function S(e){if(!Number.isFinite(e)||e<=0)return``;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function re(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 ie(e){if(e.content_type===0){let t=encodeURIComponent(e.name||``);return`/video/${e.id}/${t}/episode/1`}return`/post/${e.id}`}function C(e){return typeof e==`string`?e.trim():``}export{v as VideoDetailRecommendClient};
@@ -1,2 +1,2 @@
1
1
 
2
- function e(e,t){let n=Number(e||1);if(!Number.isFinite(n))return 1;let r=Math.max(1,Math.floor(n));return t?r:Math.min(10,r)}function t(e){let t=Number(e??3);return Number.isFinite(t)?Math.min(6,Math.max(1,Math.floor(t))):3}function n(e,t,n){return e===`done`?`全${Number(t||0)}集`:e===`updating`?`更新至${Number(n||0)}`:``}function r(e,t,n){let r=Math.max(0,n),i=e.slice(0,r);return i.length>=r?i:i.concat(t.slice(0,r-i.length))}function i(e,t,n,r){if(!e.length||t<1||t>r)return[];let i=Math.max(0,n);if(!i)return[];let a=(t-1)*i%e.length,o=a+i;return o<=e.length?e.slice(a,o):e.slice(a).concat(e.slice(0,o-e.length))}export{n as buildEpisodeLabel,t as clampColumns,r as mergeManualAndPool,i as mockPagedList,e as resolveRows};
2
+ function e(e,t){let n=Number(e||1);if(!Number.isFinite(n))return 1;let r=Math.max(1,Math.floor(n));return t?r:Math.min(10,r)}function t(e){let t=Number(e??3);return Number.isFinite(t)?Math.min(6,Math.max(1,Math.floor(t))):3}function n(e,t,n){let r=Math.max(0,n),i=e.slice(0,r);return i.length>=r?i:i.concat(t.slice(0,r-i.length))}export{t as clampColumns,n as mergeManualAndPool,e as resolveRows};
@@ -19,6 +19,7 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
19
19
  enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
20
20
  moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
21
21
  smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
22
+ catId: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
22
23
  items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
23
24
  contentId: z$1.ZodString;
24
25
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
@@ -54,6 +55,7 @@ declare const homeRecommendGridInspectorDefaultProps: {
54
55
  showEpisode: boolean;
55
56
  enableInfinite: boolean;
56
57
  moreLink: string;
58
+ catId: string;
57
59
  };
58
60
  type HomeRecommendGridInspectorProps = z$1.infer<typeof homeRecommendGridInspectorPropsSchema>;
59
61
  //#endregion
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as o,HOME_RECOMMEND_DEFAULT_GRID_ROWS as s,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as c,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as l,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as u,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as d,HOME_RECOMMEND_DEFAULT_TITLE as f}from"../shared/home-recommend-default-config.mjs";import p from"zod";const m=e({rows:t({label:`行数`,defaultValue:s}),columns:t({label:`列数`,defaultValue:o}),smartTagEnabled:n({label:`智能铺设`,defaultValue:d}),title:r({label:`推荐位名称`,defaultValue:f}),showPlayCount:n({label:`显示播放量`,defaultValue:u}),playCountDelta:t({label:`播放量浮动`,defaultValue:c}),showEpisode:n({label:`显示集数`,defaultValue:l}),enableInfinite:n({label:`无限下拉`,defaultValue:a,required:!1}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:p.array(p.string()).optional(),items:p.array(p.object({contentId:p.string(),coverMode:p.enum([`upload`,`content`]).optional(),coverUrl:p.string().optional(),badge_url:p.string().optional(),titleMode:p.enum([`custom`,`content`]).optional(),title:p.string().optional(),description:p.string().optional(),showPlayCount:p.boolean().optional(),playCountDelta:p.number().optional(),showEpisode:p.boolean().optional()})).optional()}),h={...i(m),smartTagIds:[],items:[]},g={rows:{type:`number`,title:`行数`,default:h.rows},columns:{type:`number`,title:`列数`,default:h.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:h.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:h.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:h.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:h.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:h.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:h.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:h.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:h.smartTagIds,items:{type:`string`,title:`标签 ID`}},items:{type:`array`,title:`推荐项`,default:h.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{h as homeRecommendGridInspectorDefaultProps,m as homeRecommendGridInspectorPropsSchema,g as homeRecommendGridPropsSchema};
2
+ import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as o,HOME_RECOMMEND_DEFAULT_GRID_ROWS as s,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as c,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as l,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as u,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as d,HOME_RECOMMEND_DEFAULT_TITLE as f}from"../shared/home-recommend-default-config.mjs";import p from"zod";const m=e({rows:t({label:`行数`,defaultValue:s}),columns:t({label:`列数`,defaultValue:o}),smartTagEnabled:n({label:`智能铺设`,defaultValue:d}),title:r({label:`推荐位名称`,defaultValue:f}),showPlayCount:n({label:`显示播放量`,defaultValue:u}),playCountDelta:t({label:`播放量浮动`,defaultValue:c}),showEpisode:n({label:`显示集数`,defaultValue:l}),enableInfinite:n({label:`无限下拉`,defaultValue:a,required:!1}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:p.array(p.string()).optional(),catId:r({label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1,defaultValue:``}),items:p.array(p.object({contentId:p.string(),coverMode:p.enum([`upload`,`content`]).optional(),coverUrl:p.string().optional(),badge_url:p.string().optional(),titleMode:p.enum([`custom`,`content`]).optional(),title:p.string().optional(),description:p.string().optional(),showPlayCount:p.boolean().optional(),playCountDelta:p.number().optional(),showEpisode:p.boolean().optional()})).optional()}),h={...i(m),smartTagIds:[],items:[]},g={rows:{type:`number`,title:`行数`,default:h.rows},columns:{type:`number`,title:`列数`,default:h.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:h.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:h.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:h.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:h.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:h.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:h.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:h.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:h.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:h.catId},items:{type:`array`,title:`推荐项`,default:h.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{h as homeRecommendGridInspectorDefaultProps,m as homeRecommendGridInspectorPropsSchema,g as homeRecommendGridPropsSchema};
@@ -19,6 +19,7 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
19
19
  enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
20
20
  moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
21
21
  smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
22
+ catId: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
22
23
  items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
23
24
  contentId: zod.ZodString;
24
25
  coverMode: zod.ZodOptional<zod.ZodEnum<{
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./client.mjs";import{resolveHomeRecommendServerData as t}from"../shared/home-recommend-server-data.mjs";import{jsx as n}from"react/jsx-runtime";function r({rows:e,columns:t}){let n=Number(e),r=Number(t);if(!Number.isFinite(n)||!Number.isFinite(r))return 16;let i=Math.floor(n)*Math.floor(r);return!Number.isFinite(i)||i<=0?16:i}async function i(i){let{mode:a=`renderer`,...o}=i;if(a!==`renderer`)return n(e,{...o,mode:a});let s=await t({smartTagEnabled:o.smartTagEnabled,pageSize:r(o),items:o.items});return n(e,{...o,prefetchData:s.data,mode:a})}export{i as HomeRecommendGrid};
2
+ import e from"./client.mjs";import{resolveHomeRecommendServerData as t}from"../shared/home-recommend-server-data.mjs";import{jsx as n}from"react/jsx-runtime";function r(e){let t=e.smartTagEnabled===!0,n=t?e.enableInfinite===!0:!1,r=Array.isArray(e.smartTagIds)?e.smartTagIds.map(e=>String(e||``).trim()).filter(Boolean):[],i=typeof e.catId==`string`?e.catId.trim():``;return{...e,smartTagEnabled:t,smartTagIds:r,catId:i,enableInfinite:n,items:Array.isArray(e.items)?e.items.filter(Boolean):e.items}}function i({rows:e,columns:t}){let n=Number(e),r=Number(t);if(!Number.isFinite(n)||!Number.isFinite(r))return 16;let i=Math.floor(n)*Math.floor(r);return!Number.isFinite(i)||i<=0?16:i}async function a(a){let{mode:o=`renderer`,...s}=a,c=r(s);if(o!==`renderer`)return n(e,{...c,mode:o});let l=await t({smartTagEnabled:c.smartTagEnabled,smartTagIds:c.smartTagIds,catId:c.catId,enableInfinite:c.enableInfinite,pageSize:i(c),items:c.items});return n(e,{...c,prefetchData:l.data,mode:o})}export{a as HomeRecommendGrid};
@@ -17,6 +17,7 @@ declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
17
17
  enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
18
18
  moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
19
19
  smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
20
+ catId: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
20
21
  items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
21
22
  contentId: z$1.ZodString;
22
23
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
@@ -49,6 +50,7 @@ declare const homeRecommendWaterfallInspectorDefaultProps: {
49
50
  showEpisode: boolean;
50
51
  enableInfinite: boolean;
51
52
  moreLink: string;
53
+ catId: string;
52
54
  };
53
55
  type HomeRecommendWaterfallInspectorProps = z$1.infer<typeof homeRecommendWaterfallInspectorPropsSchema>;
54
56
  //#endregion
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as o,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as s,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as c,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as l,HOME_RECOMMEND_DEFAULT_TITLE as u}from"../shared/home-recommend-default-config.mjs";import d from"zod";const f=e({smartTagEnabled:n({label:`智能铺设`,defaultValue:l}),title:r({label:`推荐位名称`,defaultValue:u}),showPlayCount:n({label:`显示播放量`,defaultValue:c}),playCountDelta:t({label:`播放量浮动`,defaultValue:o}),showEpisode:n({label:`显示集数`,defaultValue:s}),enableInfinite:n({label:`无限下拉`,defaultValue:a}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:d.array(d.string()).optional(),items:d.array(d.object({contentId:d.string(),coverMode:d.enum([`upload`,`content`]).optional(),coverUrl:d.string().optional(),badge_url:d.string().optional(),titleMode:d.enum([`custom`,`content`]).optional(),title:d.string().optional(),showPlayCount:d.boolean().optional(),playCountDelta:d.number().optional(),showEpisode:d.boolean().optional()})).optional()}),p={...i(f),smartTagIds:[],items:[]},m={smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:p.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:p.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:p.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:p.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:p.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:p.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:p.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:p.smartTagIds,items:{type:`string`,title:`标签 ID`}},items:{type:`array`,title:`推荐项`,default:p.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{p as homeRecommendWaterfallInspectorDefaultProps,f as homeRecommendWaterfallInspectorPropsSchema,m as homeRecommendWaterfallPropsSchema};
2
+ import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as o,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as s,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as c,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as l,HOME_RECOMMEND_DEFAULT_TITLE as u}from"../shared/home-recommend-default-config.mjs";import d from"zod";const f=e({smartTagEnabled:n({label:`智能铺设`,defaultValue:l}),title:r({label:`推荐位名称`,defaultValue:u}),showPlayCount:n({label:`显示播放量`,defaultValue:c}),playCountDelta:t({label:`播放量浮动`,defaultValue:o}),showEpisode:n({label:`显示集数`,defaultValue:s}),enableInfinite:n({label:`无限下拉`,defaultValue:a}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:d.array(d.string()).optional(),catId:r({label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1,defaultValue:``}),items:d.array(d.object({contentId:d.string(),coverMode:d.enum([`upload`,`content`]).optional(),coverUrl:d.string().optional(),badge_url:d.string().optional(),titleMode:d.enum([`custom`,`content`]).optional(),title:d.string().optional(),showPlayCount:d.boolean().optional(),playCountDelta:d.number().optional(),showEpisode:d.boolean().optional()})).optional()}),p={...i(f),smartTagIds:[],items:[]},m={smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:p.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:p.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:p.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:p.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:p.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:p.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:p.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:p.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:p.catId},items:{type:`array`,title:`推荐项`,default:p.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{p as homeRecommendWaterfallInspectorDefaultProps,f as homeRecommendWaterfallInspectorPropsSchema,m as homeRecommendWaterfallPropsSchema};
@@ -17,6 +17,7 @@ declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRe
17
17
  enableInfinite: zod.ZodBoolean & SchemaHasDefaultValue;
18
18
  moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
19
19
  smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
20
+ catId: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
20
21
  items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
21
22
  contentId: zod.ZodString;
22
23
  coverMode: zod.ZodOptional<zod.ZodEnum<{
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./client.mjs";import{resolveHomeRecommendServerData as t}from"../shared/home-recommend-server-data.mjs";import{jsx as n}from"react/jsx-runtime";function r(e){let t=Array.isArray(e)?e.length:0;return t>0?t:16}async function i(i){let{mode:a=`renderer`,...o}=i;if(a!==`renderer`)return n(e,{...o,mode:a});let s=await t({smartTagEnabled:o.smartTagEnabled,pageSize:r(o.items),items:o.items});return n(e,{...o,prefetchData:s.data,mode:a})}export{i as HomeRecommendWaterfall};
2
+ import e from"./client.mjs";import{resolveHomeRecommendServerData as t}from"../shared/home-recommend-server-data.mjs";import{jsx as n}from"react/jsx-runtime";function r(e){let t=(e.smartTagEnabled??e.smartLayoutEnabled)===!0,n=t?e.enableInfinite===!0:!1,r=Array.isArray(e.smartTagIds)?e.smartTagIds.map(e=>String(e||``).trim()).filter(Boolean):[],i=typeof e.catId==`string`?e.catId.trim():``;return{...e,smartTagEnabled:t,smartTagIds:r,catId:i,enableInfinite:n,items:Array.isArray(e.items)?e.items.filter(Boolean):e.items}}function i(e){let t=Array.isArray(e)?e.length:0;return t<=0?16:t}async function a(a){let{mode:o=`renderer`,...s}=a,c=r(s);if(o!==`renderer`)return n(e,{...c,mode:o});let l=await t({smartTagEnabled:c.smartTagEnabled,smartTagIds:c.smartTagIds,catId:c.catId,enableInfinite:c.enableInfinite,pageSize:i(c.items),items:c.items});return n(e,{...c,prefetchData:l.data,mode:o})}export{a as HomeRecommendWaterfall};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Text as r}from"../../../../ui/text.mjs";import i from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as a}from"../../../../common/cards/mini-three-card.mjs";import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as o,HOME_RECOMMEND_DEFAULT_GRID_ROWS as s,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as c,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as l,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as u,HOME_RECOMMEND_MAX_GRID_COLUMNS as d,HOME_RECOMMEND_MAX_GRID_ROWS as f}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as p}from"./home-recommend-preview.mjs";import{useCallback as m,useEffect as h,useLayoutEffect as g,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{useRouter as ee}from"next/navigation";const te={},ne={list:[]};function S({variant:t,props:i=te,data:a=ne,mode:p=`renderer`}){let S=p===`editor`,w=ee(),{list:T,title:ae,cursor:D}=a,O=_(()=>Array.isArray(T)?T:[],[T]),k=_(()=>Array.isArray(a.icons)?a.icons:[],[a.icons]),{rows:A,columns:oe,moreLink:se,title:j,smartTagEnabled:le,showPlayCount:ue,playCountDelta:de,showEpisode:fe,enableInfinite:pe}=i,P=pe===!0,F=!S&&P&&le!==!0,[I,me]=y(0),[L,R]=y(O),[z,he]=y(k),[B,V]=y(()=>M(D)),[ge,_e]=y(!1),ve=v(null),H=v(null),U=v(!1);h(()=>{R(O),he(k),V(M(D))},[D,k,O]);let ye=ie(A,s,f),W=ie(oe,o,d),G=t===`grid`?ye*W:16,be=ye*W,xe=S&&t===`grid`&&!P,K=xe?L.slice(0,be):L,q=xe?z.slice(0,be):z,Se=t===`waterfall`?6:4,J=K.length>0?Math.max(0,K.length-Se):-1,Ce=!!B,we=j&&j.trim()||ae||``,Y=ue??u,X=Number(de??c),Z=fe??l,Q=!P,$=Q?re(se):``,Te=Q&&!!$,Ee=m(async()=>{let t=B;if(!(!F||!t||U.current)){U.current=!0,_e(!0);try{let n=await e({cursor:t,page_size:G}),r=Array.isArray(n.data?.videos)?n.data.videos:[],i=M(n.data?.cursor);r.length>0&&R(e=>e.concat(r)),V(e=>{if(!(!r.length||!i))return i===e?void 0:i})}catch(e){console.error(`推荐位加载下一页失败(client)`,e),V(void 0)}finally{U.current=!1,_e(!1)}}},[B,G,F]),De=m(()=>{$&&($.startsWith(`http`)?window.location.href=$:w.push($))},[$,w]);h(()=>{let e=H.current;if(!e||!F||!Ce)return;let t=document.getElementById(`app-scroll-container`)||null,n=new IntersectionObserver(e=>{!e[0]?.isIntersecting||ge||Ee()},{root:t,threshold:0});return n.observe(e),()=>{n.disconnect()}},[Ee,Ce,ge,K.length,G,F,J]),g(()=>{let e=ve.current;if(!e||t!==`waterfall`)return;let n=()=>{let t=e.clientWidth||0;me(t>0?(t-12)/2:0)};n();let r=new ResizeObserver(n);return r.observe(e),()=>{r.disconnect()}},[t]);let Oe=_(()=>t===`waterfall`?ce(K,q,I):{left:[],right:[]},[I,q,K,t]);return K.length?x(n,{className:`w-full mt-[16px]`,children:[x(n,{className:`flex items-center justify-between px-[12px] mb-[8px]`,children:[b(r,{className:`flex-1 min-w-0 text-text1 text-[18px] leading-[26px] font-bold line-clamp-1`,children:we}),Te&&b(r,{className:`text-text3 text-[12px] leading-[18px] cursor-pointer`,onClick:De,children:`更多`})]}),t===`grid`&&b(n,{className:`w-full flex flex-wrap px-[12px]`,children:K.map((e,n)=>{let r=q[n],i=E(e),a=Y&&(i?.showPlayCount??!0),o=i?.playCountDelta??X,s=i?.showEpisode??Z,c=n%W,l=W>1?{paddingLeft:12*c/W,paddingRight:12*(W-c-1)/W}:void 0;return b(`div`,{ref:n===J?H:void 0,className:`min-w-0`,style:{width:`${100/W}%`,...l||{}},children:b(C,{variant:t,item:e,icon:r,index:n,showPlayCount:a,playCountDelta:o,showEpisode:s,widthStyle:{width:`100%`}})},N(e,n))})}),t===`waterfall`&&x(n,{ref:ve,className:`w-full px-[12px] flex gap-[12px]`,children:[b(n,{className:`flex-1 min-w-0 flex flex-col`,children:Oe.left.map(e=>{let n=E(e.item),r=Y&&(n?.showPlayCount??!0),i=n?.playCountDelta??X,a=n?.showEpisode??Z;return b(`div`,{ref:e.index===J?H:void 0,children:b(C,{variant:t,item:e.item,icon:e.icon,index:e.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},N(e.item,e.index))})}),b(n,{className:`flex-1 min-w-0 flex flex-col`,children:Oe.right.map(e=>{let n=E(e.item),r=Y&&(n?.showPlayCount??!0),i=n?.playCountDelta??X,a=n?.showEpisode??Z;return b(`div`,{ref:e.index===J?H:void 0,children:b(C,{variant:t,item:e.item,icon:e.icon,index:e.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},N(e.item,e.index))})})]})]}):null}function C({variant:e,item:t,icon:o,index:s,showPlayCount:c,playCountDelta:l,showEpisode:u,widthStyle:d}){let f=ae(t),p=t.name||``,m=k(t.static?.browse_cnt??0),h=O(t,u),g=se(t,o,s);return b(a,{url:f,text:p,className:`w-full`,style:d,topRightChild:g?b(w,{url:g}):void 0,bottomLeftChild:c?x(n,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[b(i,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),m]}):null,bottomRightChild:u?h&&b(r,{className:`text-[#fff] text-[12px] leading-[18px] pr-2`,children:h}):null,textChild:b(n,{className:`mt-[4px]`,children:b(r,{as:`h3`,className:e===`waterfall`?`text-text1 text-[14px] leading-[20px] break-words`:`text-text1 text-[14px] leading-[20px] line-clamp-1`,children:p})}),linkPath:T(t)})}function w({url:e}){return b(n,{className:`relative w-[40px] h-[20px]`,children:b(t,{src:e,alt:`corner`,fill:!0,objectFit:`cover`})})}function T(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id||``}/${t}/episode/1`}function re(e){return e?e.trim():``}function ie(e,t,n){let r=Number(e);return!Number.isFinite(r)||r<=0?t:Math.min(n,Math.floor(r))}function E(e){return e[p]}function ae(e){return e.img_y||e.img_x||``}function D(e){return typeof e==`string`?e:``}function O(e,t){if((e.type??0)===2){if(!t)return``;let n=Number(e.episode_cnt||e.links?.length||0);return n>0?`全${n}集`:``}return oe(Number(e.duration||0))}function k(e){return!Number.isFinite(e)||e<=0?`0`:e>=1e6?`${A(e/1e6)}M`:e>=1e3?`${A(e/1e3)}k`:Math.floor(e).toString()}function A(e){let t=e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function oe(e){if(!Number.isFinite(e)||e<=0)return``;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function se(e,t,n){return D(e.badge_url)||D(t?.material_url)||``}function ce(e,t,n){let r=[],i=[],a=0,o=0;return e.forEach((e,s)=>{let c=t[s],l=j(n,e);a<=o?(r.push({item:e,icon:c,index:s}),a+=l):(i.push({item:e,icon:c,index:s}),o+=l)}),{left:r,right:i}}function j(e,t){if(!e)return 0;let n=e*1.3461538461538463,r=O(t,!0)?18:0;return n+20+r+6+16}function M(e){if(typeof e==`string`)return e.trim()||void 0}function N(e,t){return e.id?`home-recommend-${e.id}`:`home-recommend-${t}`}export{S as default};
2
+ "use client";import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Text as r}from"../../../../ui/text.mjs";import i from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as a}from"../../../../common/cards/mini-three-card.mjs";import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as o,HOME_RECOMMEND_DEFAULT_GRID_ROWS as s,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as c,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as l,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as u,HOME_RECOMMEND_MAX_GRID_COLUMNS as ee,HOME_RECOMMEND_MAX_GRID_ROWS as te}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as d}from"./home-recommend-preview.mjs";import{useCallback as f,useEffect as p,useLayoutEffect as m,useMemo as h,useRef as g,useState as _}from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{useRouter as ne}from"next/navigation";const re={},ie={list:[]};function b({variant:t,props:i=re,data:a=ie,mode:d=`renderer`}){let b=d===`editor`,S=ne(),{list:C,title:T,cursor:E}=a,D=h(()=>Array.isArray(C)?C:[],[C]),O=h(()=>Array.isArray(a.icons)?a.icons:[],[a.icons]),{rows:se,columns:k,moreLink:A,title:j,smartTagEnabled:le,smartTagIds:P,catId:ue,showPlayCount:de,playCountDelta:fe,showEpisode:pe,enableInfinite:me}=i,F=me===!0,I=!b&&F&&le===!0,L=h(()=>Array.isArray(P)?P.map(e=>String(e||``).trim()).filter(Boolean):[],[P]),R=typeof ue==`string`?ue.trim():``,[z,he]=_(0),[B,ge]=_(D),[_e,ve]=_(O),[V,H]=_(()=>M(E)),[ye,be]=_(!1),xe=g(null),U=g(null),W=g(!1);p(()=>{ge(D),ve(O),H(M(E))},[E,O,D]);let Se=oe(se,s,te),G=oe(k,o,ee),K=t===`grid`?Se*G:16,Ce=Se*G,we=b&&t===`grid`,q=we?B.slice(0,Ce):B,J=we?_e.slice(0,Ce):_e,Y=q.length>0?Math.max(0,q.length-4):-1,Te=!!V,Ee=j&&j.trim()||T||``,X=de??u,Z=Number(fe??c),Q=pe??l,De=!F,$=De?ae(A):``,Oe=De&&!!$,ke=f(async()=>{let t=V;if(!(!I||!t||W.current)){W.current=!0,be(!0);try{let n=await e({cursor:t,page_size:K,tags:L.length>0?L:void 0,cat_id:R||void 0}),r=Array.isArray(n.data?.videos)?n.data.videos:[],i=M(n.data?.cursor);r.length>0&&ge(e=>e.concat(r)),H(e=>{if(!(!r.length||!i))return i===e?void 0:i})}catch(e){console.error(`推荐位加载下一页失败(client)`,e),H(void 0)}finally{W.current=!1,be(!1)}}},[V,R,K,L,I]),Ae=f(()=>{$&&($.startsWith(`http`)?window.location.href=$:S.push($))},[$,S]);p(()=>{let e=U.current;if(!e||!I||!Te)return;let t=document.getElementById(`app-scroll-container`)||null,n=new IntersectionObserver(e=>{!e[0]?.isIntersecting||ye||ke()},{root:t,threshold:0});return n.observe(e),()=>{n.disconnect()}},[ke,Te,ye,q.length,K,I,Y]),m(()=>{let e=xe.current;if(!e||t!==`waterfall`)return;let n=()=>{let t=e.clientWidth||0;he(t>0?(t-12)/2:0)};n();let r=new ResizeObserver(n);return r.observe(e),()=>{r.disconnect()}},[t]);let je=h(()=>t===`waterfall`?ce(q,J,z):{left:[],right:[]},[z,J,q,t]);return q.length?y(n,{className:`w-full mt-[16px]`,children:[y(n,{className:`flex items-center justify-between px-[12px] mb-[8px]`,children:[v(r,{className:`flex-1 min-w-0 text-text1 text-[18px] leading-[26px] font-bold line-clamp-1`,children:Ee}),Oe&&v(r,{className:`text-text3 text-[12px] leading-[18px] cursor-pointer`,onClick:Ae,children:`更多`})]}),t===`grid`&&v(n,{className:`w-full flex flex-wrap px-[12px]`,children:q.map((e,n)=>{let r=J[n],i=w(e),a=X&&(i?.showPlayCount??!0),o=i?.playCountDelta??Z,s=i?.showEpisode??Q,c=n%G,l=G>1?{paddingLeft:12*c/G,paddingRight:12*(G-c-1)/G}:void 0;return v(`div`,{ref:n===Y?U:void 0,className:`min-w-0`,style:{width:`${100/G}%`,...l||{}},children:v(x,{variant:t,item:e,icon:r,index:n,showPlayCount:a,playCountDelta:o,showEpisode:s,widthStyle:{width:`100%`}})},N(e,n))})}),t===`waterfall`&&y(n,{ref:xe,className:`w-full px-[12px] flex gap-[12px]`,children:[v(n,{className:`flex-1 min-w-0 flex flex-col`,children:je.left.map(e=>{let n=w(e.item),r=X&&(n?.showPlayCount??!0),i=n?.playCountDelta??Z,a=n?.showEpisode??Q;return v(`div`,{ref:e.index===Y?U:void 0,children:v(x,{variant:t,item:e.item,icon:e.icon,index:e.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},N(e.item,e.index))})}),v(n,{className:`flex-1 min-w-0 flex flex-col`,children:je.right.map(e=>{let n=w(e.item),r=X&&(n?.showPlayCount??!0),i=n?.playCountDelta??Z,a=n?.showEpisode??Q;return v(`div`,{ref:e.index===Y?U:void 0,children:v(x,{variant:t,item:e.item,icon:e.icon,index:e.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},N(e.item,e.index))})})]})]}):null}function x({variant:e,item:t,icon:o,index:s,showPlayCount:c,playCountDelta:l,showEpisode:u,widthStyle:ee}){let te=T(t),d=t.name||``,f=se(t.static?.browse_cnt??0),p=D(t,u),m=j(t,o,s);return v(a,{url:te,text:d,className:`w-full`,style:ee,topRightChild:m?v(S,{url:m}):void 0,bottomLeftChild:c?y(n,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[v(i,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),f]}):null,bottomRightChild:u?p&&v(r,{className:`text-[#fff] text-[12px] leading-[18px] pr-2`,children:p}):null,textChild:v(n,{className:`py-[4px]`,children:v(r,{as:`h3`,className:`text-text1 text-[16px] leading-[24px] ${e===`waterfall`?`break-words`:`line-clamp-1`}`,children:d})}),linkPath:C(t)})}function S({url:e}){return v(n,{className:`relative w-[40px] h-[20px]`,children:v(t,{src:e,alt:`corner`,fill:!0,objectFit:`cover`})})}function C(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id||``}/${t}/episode/1`}function ae(e){return e?e.trim():``}function oe(e,t,n){let r=Number(e);return!Number.isFinite(r)||r<=0?t:Math.min(n,Math.floor(r))}function w(e){return e[d]}function T(e){return e.img_y||e.img_x||``}function E(e){return typeof e==`string`?e:``}function D(e,t){if(!t)return``;if(O(e)){let t=Number(e.episode_cnt||e.links?.length||0);return t>0?`全${t}集`:``}return A(Number(e.duration||0))}function O(e){if(Number(e.type??0)===2)return!0;let t=e.is_more_link;if(t===!0||t===`y`||t===`1`)return!0;let n=Number(e.episode_cnt||e.links?.length||0);return Number.isFinite(n)&&n>1}function se(e){return!Number.isFinite(e)||e<=0?`0`:e>=1e6?`${k(e/1e6)}M`:e>=1e3?`${k(e/1e3)}k`:Math.floor(e).toString()}function k(e){let t=e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function A(e){if(!Number.isFinite(e)||e<=0)return``;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function j(e,t,n){return E(e.badge_url)||E(t?.material_url)||``}function ce(e,t,n){let r=[],i=[],a=n<=0,o=0,s=0;return e.forEach((e,c)=>{let l=t[c];if(a){c%2==0?r.push({item:e,icon:l,index:c}):i.push({item:e,icon:l,index:c});return}let u=le(n,e);o<=s?(r.push({item:e,icon:l,index:c}),o+=u):(i.push({item:e,icon:l,index:c}),s+=u)}),{left:r,right:i}}function le(e,t){if(!e)return 0;let n=e*1.3461538461538463,r=D(t,!0)?18:0;return n+20+r+6+16}function M(e){if(typeof e==`string`)return e.trim()||void 0}function N(e,t){return e.id?`home-recommend-${e.id}`:`home-recommend-${t}`}export{b as default};
@@ -1,2 +1,2 @@
1
1
 
2
- import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as e,HOME_RECOMMEND_DEFAULT_GRID_ROWS as t,HOME_RECOMMEND_DEFAULT_TITLE as n,HOME_RECOMMEND_MAX_GRID_COLUMNS as r,HOME_RECOMMEND_MAX_GRID_ROWS as i}from"./home-recommend-default-config.mjs";const a=`/static/components-thumb/video_player.png`,o=`__homeRecommendCardConfig`,s=Array.from({length:60},(e,t)=>{let n=t%2==1,r={browse_cnt:12345+t*731};return{id:`preview-recommend-${t+1}`,name:`${`媒资标题`.repeat((t+1)*2)}`,img_y:a,img_x:a,type:n?2:1,duration:n?0:60*(18+t),episode_cnt:n?12+t%3*6:0,static:r}});function c({variant:e,enableInfinite:t,rows:n,columns:r,items:i}){let a=Array.isArray(i)?i.length:0;return t?Math.max(8,a):e===`waterfall`?Math.max(4,a):Math.max(f(n,r),2,a)}function l(e){let t=Math.max(1,Math.floor(e));return Array.from({length:t},(e,t)=>{let n=s[t%s.length];return{...n,id:`preview-recommend-${t+1}`,name:n.name}})}function u(e,t,n){return t.length?e.map((e,r)=>{let i=t[r];if(!i)return e;let a=(i.contentId?n.get(i.contentId):void 0)||e,s=i.titleMode===`custom`?i.title?.trim()||a.name||e.name||``:a.name||e.name||``,c=i.coverMode===`upload`&&!!i.coverUrl,l=c?i.coverUrl||``:a.img_y||a.img_x||e.img_y||e.img_x||``,u=c?i.coverUrl||``:a.img_x||a.img_y||e.img_x||e.img_y||``,f=a.badge_url||e.badge_url||``,p=i.badge_url??f,m=d(i,a);return{...e,...a,id:a.id||e.id||`preview-recommend-${r+1}`,name:s,img_y:l,img_x:u,badge_url:p||void 0,[o]:m}}):e}function d(e,t){let n=t[o],r={showPlayCount:e.showPlayCount??n?.showPlayCount,playCountDelta:e.playCountDelta??n?.playCountDelta,showEpisode:e.showEpisode??n?.showEpisode};if(!(r.showPlayCount===void 0&&r.playCountDelta===void 0&&r.showEpisode===void 0))return r}function f(n,a){return p(n,t,1,i)*p(a,e,1,r)}function p(e,t,n,r){let i=Number(e);return Number.isFinite(i)?Math.min(r,Math.max(n,Math.floor(i))):t}function m({variant:e,schemaTitle:t,enableInfinite:r,smartTagEnabled:i,rows:a,columns:o,items:s}){let d=new Map,f=i?[]:Array.isArray(s)?s.filter(Boolean):[],p=u(l(c({variant:e,enableInfinite:r,rows:a,columns:o,items:f})),f,d);return{title:t&&t.trim()||n,list:p,icons:[],cursor:``,show_style:void 0}}export{o as HOME_RECOMMEND_CARD_CONFIG_FIELD,m as buildHomeRecommendEditorPreviewData};
2
+ import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as e,HOME_RECOMMEND_DEFAULT_GRID_ROWS as t,HOME_RECOMMEND_DEFAULT_TITLE as n,HOME_RECOMMEND_MAX_GRID_COLUMNS as r,HOME_RECOMMEND_MAX_GRID_ROWS as i}from"./home-recommend-default-config.mjs";const a=`/static/components-thumb/video_player.png`,o=`__homeRecommendCardConfig`,s=Array.from({length:60},(e,t)=>{let n=t%2==1,r={browse_cnt:12345+t*731};return{id:`preview-recommend-${t+1}`,name:`${`媒资标题`.repeat((t+1)*2)}`,img_y:a,img_x:a,type:n?2:1,duration:n?0:60*(18+t),episode_cnt:n?12+t%3*6:0,static:r}});function c({variant:e,enableInfinite:t,rows:n,columns:r,items:i}){let a=Array.isArray(i)?i.length:0;return e===`grid`?Math.max(f(n,r),2,a):t?Math.max(8,a):e===`waterfall`?Math.max(4,a):Math.max(2,a)}function l(e){let t=Math.max(1,Math.floor(e));return Array.from({length:t},(e,t)=>{let n=s[t%s.length];return{...n,id:`preview-recommend-${t+1}`,name:n.name}})}function u(e,t,n){return t.length?e.map((e,r)=>{let i=t[r];if(!i)return e;let a=(i.contentId?n.get(i.contentId):void 0)||e,s=i.titleMode===`custom`?i.title?.trim()||a.name||e.name||``:a.name||e.name||``,c=i.coverMode===`upload`&&!!i.coverUrl,l=c?i.coverUrl||``:a.img_y||a.img_x||e.img_y||e.img_x||``,u=c?i.coverUrl||``:a.img_x||a.img_y||e.img_x||e.img_y||``,f=a.badge_url||e.badge_url||``,p=i.badge_url??f,m=d(i,a);return{...e,...a,id:a.id||e.id||`preview-recommend-${r+1}`,name:s,img_y:l,img_x:u,badge_url:p||void 0,[o]:m}}):e}function d(e,t){let n=t[o],r={showPlayCount:e.showPlayCount??n?.showPlayCount,playCountDelta:e.playCountDelta??n?.playCountDelta,showEpisode:e.showEpisode??n?.showEpisode};if(!(r.showPlayCount===void 0&&r.playCountDelta===void 0&&r.showEpisode===void 0))return r}function f(n,a){return p(n,t,1,i)*p(a,e,1,r)}function p(e,t,n,r){let i=Number(e);return Number.isFinite(i)?Math.min(r,Math.max(n,Math.floor(i))):t}function m({variant:e,schemaTitle:t,enableInfinite:r,smartTagEnabled:i,rows:a,columns:o,items:s}){let d=new Map,f=i?[]:Array.isArray(s)?s.filter(Boolean):[],p=u(l(c({variant:e,enableInfinite:r,rows:a,columns:o,items:f})),f,d);return{title:t&&t.trim()||n,list:p,icons:[],cursor:``,show_style:void 0}}export{o as HOME_RECOMMEND_CARD_CONFIG_FIELD,m as buildHomeRecommendEditorPreviewData};
@@ -1,2 +1,2 @@
1
1
 
2
- import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{resolveHomeRecommendFeedMode as t}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as n}from"./home-recommend-preview.mjs";import{batchGetHomeRecommendVideoDetailMap as r}from"./home-recommend-video-detail.mjs";function i(e){return typeof e==`string`?e.trim():``}function a(e){return typeof e==`string`?e.trim():``}function o(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}function s(e,t){let n=e,r=i(n.video_id||e.id||e.mid)||t,a=o(n.play_count),s=o(n.like_count),c=o(n.collect_count),l=Array.isArray(n.episodes)?n.episodes.length:0,u=a!==void 0||s!==void 0||c!==void 0?{browse_cnt:a,like_cnt:s,collect_cnt:c}:void 0;return{id:r,mid:i(e.mid),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,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,time:e.time,money:e.money,source_username:e.source_username,task_id:e.task_id,error_msg:e.error_msg,file_status:e.file_status,score:o(e.score)??void 0,duration:o(e.duration)??void 0,episode_cnt:l>0?l:void 0,type:e.is_more_link?2:1,static:u}}function c(e){let t={showPlayCount:e.showPlayCount,playCountDelta:e.playCountDelta,showEpisode:e.showEpisode};if(!(t.showPlayCount===void 0&&t.playCountDelta===void 0&&t.showEpisode===void 0))return t}function l(e,t){let r=a(t.coverUrl),i=t.coverMode===`upload`||r&&t.coverMode!==`content`?r:e.img_y||e.img_x||``,o=a(t.title),s=t.titleMode===`custom`||o&&t.titleMode!==`content`?o:e.name||``,l=a(t.description),u=a(t.badge_url),d=c(t);return{...e,name:s||e.name,img_y:i||e.img_y||e.img_x,img_x:i||e.img_x||e.img_y,description:l||e.description,badge_url:u||e.badge_url,[n]:d}}function u(e){let t=i(e.contentId),n=a(e.coverUrl),r=a(e.title),o=a(e.description);return{id:t,mid:t,name:r||``,img_x:n,img_y:n,description:o,type:1}}function d(e,t){if(!Array.isArray(e)||e.length===0||!Array.isArray(t)||t.length===0)return e;let n=t.map(e=>({...e,contentId:i(e.contentId)})),r=new Map;return n.forEach(e=>{e.contentId&&r.set(e.contentId,e)}),e.map((e,t)=>{let a=i(e.id||e.mid),o=a?r.get(a):void 0,s=n[t],c=o||(s?.contentId?void 0:s);return c?l(e,c):e})}async function f(e){let t=(Array.isArray(e)?e:[]).map(e=>({...e,contentId:i(e.contentId)})).filter(e=>!!e.contentId);if(!t.length)return[];let n=await r(t.map(e=>({id:e.contentId})));return t.map(e=>{let t=n.get(e.contentId||``);return l(t?s(t,e.contentId||``):u(e),e)})}async function p(t){try{let n=await e({page_size:t});return{videos:Array.isArray(n.data?.videos)?n.data.videos:[],nextCursor:n.data?.cursor||``,loaded:!0}}catch(e){return console.error(`推荐位获取热门视频失败(server)`,e),{videos:[],nextCursor:``,loaded:!1}}}async function m({smartTagEnabled:e,pageSize:n=16,items:r=[]}){let i=t(e),a={list:[],icons:[],title:``,cursor:``,show_style:void 0};if(i===`manual-with-video-detail`)try{let e=await f(r);return{feedMode:i,data:{...a,list:e,cursor:``}}}catch(e){return console.error(`推荐位智能铺设补齐视频详情失败(server)`,e),{feedMode:i,data:{...a,list:[],cursor:``}}}let o=await p(n),s=o.loaded?d(o.videos,r):a.list,c=o.loaded?o.nextCursor:a.cursor||``;return{feedMode:i,data:{...a,list:s,icons:[],cursor:c}}}export{m as resolveHomeRecommendServerData};
2
+ import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{resolveHomeRecommendFeedMode as t}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as n}from"./home-recommend-preview.mjs";import{batchGetHomeRecommendVideoDetailMap as r}from"./home-recommend-video-detail.mjs";function i(e){return typeof e==`string`?e.trim():``}function a(e){return typeof e==`string`?e.trim():``}function o(e){return a(e)}function s(e){return Array.isArray(e)?e.map(e=>a(e)).filter(Boolean):[]}function c(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}function l(e,t){let n=e,r=i(n.video_id||e.id||e.mid)||t,a=c(n.play_count),o=c(n.like_count),s=c(n.collect_count),l=Array.isArray(n.episodes)?n.episodes.length:0,u=a!==void 0||o!==void 0||s!==void 0?{browse_cnt:a,like_cnt:o,collect_cnt:s}:void 0;return{id:r,mid:i(e.mid),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,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,time:e.time,money:e.money,source_username:e.source_username,task_id:e.task_id,error_msg:e.error_msg,file_status:e.file_status,score:c(e.score)??void 0,duration:c(e.duration)??void 0,episode_cnt:l>0?l:void 0,type:e.is_more_link?2:1,static:u}}function u(e){let t={showPlayCount:e.showPlayCount,playCountDelta:e.playCountDelta,showEpisode:e.showEpisode};if(!(t.showPlayCount===void 0&&t.playCountDelta===void 0&&t.showEpisode===void 0))return t}function d(e,t){let r=a(t.coverUrl),i=t.coverMode===`upload`||r&&t.coverMode!==`content`?r:e.img_y||e.img_x||``,o=a(t.title),s=t.titleMode===`custom`||o&&t.titleMode!==`content`?o:e.name||``,c=a(t.description),l=a(t.badge_url),d=u(t);return{...e,name:s||e.name,img_y:i||e.img_y||e.img_x,img_x:i||e.img_x||e.img_y,description:c||e.description,badge_url:l||e.badge_url,[n]:d}}function f(e){let t=i(e.contentId),n=a(e.coverUrl),r=a(e.title),o=a(e.description);return{id:t,mid:t,name:r||``,img_x:n,img_y:n,description:o,type:1}}function p(e,t){if(!Array.isArray(e)||e.length===0||!Array.isArray(t)||t.length===0)return e;let n=t.map(e=>({...e,contentId:i(e.contentId)})),r=new Map;return n.forEach(e=>{e.contentId&&r.set(e.contentId,e)}),e.map((e,t)=>{let a=i(e.id||e.mid),o=a?r.get(a):void 0,s=n[t],c=o||(s?.contentId?void 0:s);return c?d(e,c):e})}async function m(e){let t=(Array.isArray(e)?e:[]).map(e=>({...e,contentId:i(e.contentId)})).filter(e=>!!e.contentId);if(!t.length)return[];let n=await r(t.map(e=>({id:e.contentId})));return t.map(e=>{let t=n.get(e.contentId||``);return d(t?l(t,e.contentId||``):f(e),e)})}async function h(t,n,r){let a=Math.max(1,Math.floor(Number(t)||16)),c=s(n),l=o(r);try{let t=[],n=new Set,r=new Set,o=``;for(;t.length<a;){let s=o||`__first__`;if(r.has(s))break;r.add(s);let u=await e({cursor:o||void 0,page_size:a-t.length,tags:c.length>0?c:void 0,cat_id:l||void 0}),d=Array.isArray(u.data?.videos)?u.data.videos:[];d.forEach(e=>{let r=i(e?.id||e?.mid);r&&n.has(r)||(r&&n.add(r),t.push(e))});let f=u.data?.cursor||``;if(!f||!d.length){o=``;break}o=f}return{videos:t.slice(0,a),nextCursor:o,loaded:!0}}catch(e){return console.error(`推荐位获取热门视频失败(server)`,e),{videos:[],nextCursor:``,loaded:!1}}}async function g({smartTagEnabled:e,smartTagIds:n,catId:r,enableInfinite:i,pageSize:a=16,items:c=[]}){let l=t(e),u=e===!0?s(n):[],d=o(r),f={list:[],icons:[],title:``,cursor:``,show_style:void 0};if(l===`manual-with-video-detail`){let e=await h(a,u,d);if(e.loaded)return{feedMode:l,data:{...f,list:e.videos,cursor:e.nextCursor}};try{let e=await m(c);return{feedMode:l,data:{...f,list:e,cursor:``}}}catch(e){return console.error(`推荐位智能铺设补齐视频详情失败(server)`,e),{feedMode:l,data:{...f,list:[],cursor:``}}}}if(i===!0)try{let e=await m(c);return{feedMode:l,data:{...f,list:e,cursor:``}}}catch(e){return console.error(`推荐位配置数据补齐视频详情失败(server)`,e),{feedMode:l,data:{...f,list:[],cursor:``}}}let g=await h(a,void 0,d),_=g.loaded?p(g.videos,c):f.list,v=g.loaded?g.nextCursor:f.cursor||``;return{feedMode:l,data:{...f,list:_,icons:[],cursor:v}}}export{g as resolveHomeRecommendServerData};
@@ -1,28 +1,12 @@
1
1
 
2
2
  import { InferSchemaProps } from "../../../../utils/schema/schema.mjs";
3
3
  import "../../../../utils/schema/index.mjs";
4
- import { ContentShowVideoInfo } from "../../../../types.mjs";
5
4
  import { imageTextRecommendInspectorPropsSchema } from "./schema.mjs";
6
- import { ImageTextRecommendAnyVideo } from "../../../../hooks/image-text-recommend.mjs";
7
- import "../../../../hooks.mjs";
8
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
9
6
 
10
7
  //#region components/biz/business/image-text-recommend/client.d.ts
11
- type AnyVideo = ImageTextRecommendAnyVideo;
12
8
  type ImageTextRecommendProps = InferSchemaProps<typeof imageTextRecommendInspectorPropsSchema>;
13
- /** 服务端预取后传入的初始数据,有则客户端不再发起初次请求 */
14
- interface ImageTextRecommendInitialData {
15
- initialRemoteMap?: Record<string, AnyVideo | undefined>;
16
- initialSmartList?: ContentShowVideoInfo[];
17
- initialLoadedBatchIndex?: number;
18
- initialDataFromServer?: boolean;
19
- /** 智能铺设分批时,服务端首屏返回的下一页游标 */
20
- initialSmartNextCursor?: string;
21
- }
22
- interface ClientProps extends ImageTextRecommendProps, ImageTextRecommendInitialData {
23
- allEpisodesText?: string;
24
- updatedToText?: string;
25
- }
9
+ interface ClientProps extends ImageTextRecommendProps {}
26
10
  /**
27
11
  * 图文推荐物料组件 - 客户端部分
28
12
  * - 智能铺设开启:按标签调用热门列表接口,随机铺设推荐位,T+1 自动更新
@@ -30,4 +14,4 @@ interface ClientProps extends ImageTextRecommendProps, ImageTextRecommendInitial
30
14
  */
31
15
  declare function ImageTextRecommendClient(props: ClientProps): react_jsx_runtime0.JSX.Element | null;
32
16
  //#endregion
33
- export { ImageTextRecommendClient, ImageTextRecommendInitialData, ImageTextRecommendProps };
17
+ export { ImageTextRecommendClient, ImageTextRecommendProps };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../../utils/get-res-url.mjs";import{pContentBatchGetVideoDetail as t,pContentGetPopularVideoList as n}from"../../../../service/generated/client.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as r,buildImageTextRecommendChosenTags as i,buildImageTextRecommendRemoteMap as a,buildImageTextRecommendSmartPicked as o,getImageTextRecommendFixedIds as s,getImageTextRecommendLayoutTags as c,resolveImageTextRecommendVideoId as l}from"../../../../hooks/image-text-recommend.mjs";import u from"../../../../assets/images/frame.mjs";import ee from"../../../../assets/images/subscript.mjs";import{useCallback as d,useEffect as f,useMemo as p,useRef as te,useState as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import v from"next/image";import{useTranslations as ne}from"next-intl";import re from"next/link";const y=[];function b(t,n){if(!t||!t.trim())return n;if(t.startsWith(`http`)||t.startsWith(`//`)||t.startsWith(`data:`))return t;let r=e();return r?`${r}${t.startsWith(`/`)?t:`/${t}`}`:t}function x(e){if(e==null)return``;let t=e;return t.img_y||t.media?.img_y||``}function S(e){return e==null?``:e.name||``}function C(e){let t=e,n=t.type;return typeof n==`number`?n:t.is_more_link===!0||Number(t.episode_cnt||t.episode_count||t.episodes?.length||t.links?.length||0)>1?2:1}function w(e){if(!Number.isFinite(e)||e<=0)return``;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function T(e,t){let n=e,r=Number(n.episode_cnt??0);if(!Number.isFinite(r)||r<=0)return``;let i=n.update_status;return t(r,i===0||i===`0`)}function ie(e,t,n){return e?C(e)===2&&n?T(e,n):w(Number(e.duration??e.detail?.duration??0)):``}function ae(e,t){if(!(e??``).trim())return``;let n=encodeURIComponent((t??``).trim()||``);return`/video/${e.trim()}/${n}/episode/1`}function oe(e){if(!e)return``;let t=e,n=Number(t.static?.browse_cnt??0);if(!Number.isFinite(n)||n<=0)return``;if(n>=1e6){let e=(n/1e6).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}M`:`${e}M`}if(n>=1e3){let e=(n/1e3).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}k`:`${e}k`}return Math.floor(n).toString()}function se(){let e=new Date,t=new Date(e);return t.setHours(24,0,0,0),t.getTime()-e.getTime()}function E(e){let{title:C,items:w=y,commonPlayCount:T,commonEpisodes:E,layout:D,allEpisodesText:O,mode:k=`renderer`,initialRemoteMap:A,initialSmartList:j,initialLoadedBatchIndex:M,initialDataFromServer:N,initialSmartNextCursor:P}=e,F=ne(`components.biz.business.imageTextRecommend`),I=k===`editor`,[L,R]=m(N&&A!=null?A:{}),[z,B]=m(N&&j!=null?j:[]),[V,H]=m(N&&M!=null?M:0),[U,W]=m(P),G=te(null),K=!!D?.enabled,q=p(()=>c(D),[D]),J=w?.length??0,Y=p(()=>s(w,K),[K,w]),X=p(()=>K&&J>r?Math.ceil(J/r):Y.length>0?Math.ceil(Y.length/r):0,[K,J,Y.length]),Z=d((e,t)=>F(t?`updatedTo`:`allEpisodes`,{count:e}),[F]),Q=d(async(e,n)=>{if(e.length===0)return;let r=a((await t({ids:e})).data?.videos??[]);R(e=>n?{...e,...r}:r)},[]);f(()=>{if(I||N||!w||w.length===0)return;let e=!1;async function t(){if(Y.length===0){e||(R({}),H(0));return}if(Y.length<=r){await Q(Y,!1),e||H(1);return}await Q(Y.slice(0,r),!1),e||H(1)}async function a(){let t=i(q,J),a=r;if(J>a){let r=await n({page_size:a,tags:t.length?Array.from(new Set(t)):void 0}),i=(r.data?.videos??[]).slice(0,a);e||(B(i),W(r.data?.cursor),H(1))}else{let r=(await n({page_size:Math.max(20,J*10),tags:t.length?Array.from(new Set(t)):void 0})).data?.videos??[];e||B(o(r,t,J))}}return(async()=>{try{K?await a():await t()}catch{e||(R({}),B([]),H(0))}})(),()=>{e=!0}},[I,N,K,w,q,J,Y,Q]),f(()=>{if(I||X<1||V<1||V>=X)return;let e=G.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;if(!t?.isIntersecting)return;let a=V;if(K){let e=i(q,J);n({page_size:r,cursor:U,tags:e.length?Array.from(new Set(e)):void 0}).then(e=>{let t=e.data?.videos??[];B(e=>[...e,...t.slice(0,r)]),W(e.data?.cursor),H(a+1)}).catch(()=>{})}else{let e=a*r,t=Y.slice(e,e+r);t.length>0&&(Q(t,!0),H(a+1))}},{root:null,rootMargin:`0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[I,K,Y,V,X,q,J,U,Q]),f(()=>{if(I||!K||J<=0)return;let e,t=!1;function r(){e=window.setTimeout(()=>{let e=i(q,J);n({page_size:Math.max(20,J*10),tags:e.length?Array.from(new Set(e)):void 0}).then(n=>{t||B(o(n.data?.videos??[],e,J))}).catch(()=>{t||B([])}).finally(()=>{t||r()})},se())}return r(),()=>{t=!0,e!==void 0&&window.clearTimeout(e)}},[I,K,q,J]);let $=p(()=>!w||w.length===0?y:K&&J>r?w.slice(0,z.length):w,[w,K,J,z.length]),ce=p(()=>$.length?$.map((e,t)=>{let n=String(e?.contentId??``).trim(),r=K?z[t]:n?L[n]:void 0,i=K?r?S(r):(e?.title??``).trim():(e?.title??``).trim()||(r?S(r):``),a=(e?.cover??``).trim(),o=K?x(r)||a:a||(e?.useVideoPoster?x(r):``),s=K&&String(r?.description??r?.content_description??``).trim()||(e?.contentDescription??``).trim(),c=ie(r,O,Z),u=oe(r);return{...e,contentId:n||(r?l(r):``),title:i,cover:o,contentDescription:s,episodeOrDurationText:c,playCountText:u}}):y,[O,Z,K,$,L,z]);if(!w||w.length===0)return null;let le=V>=1&&V<X?K?z.length-2:V*r-2:-1;return _(`div`,{className:I?`bg-bg1 px-3 py-3 pointer-events-none`:`bg-bg1 px-3 py-3`,children:[C&&g(`div`,{className:`mb-3 flex items-center justify-between`,children:g(`h2`,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:C})}),g(`div`,{className:`flex overflow-x-auto pb-2 scrollbar-hide space-x-2`,children:ce.map((e,t)=>{let n=K?T:e.showPlayCount??!1,r=(e.playCountText??``).trim(),i=r!==``,a=K?E:e.showEpisodes??!1,o=(e.episodeOrDurationText??``).trim(),s=a&&o!==``,c=k===`renderer`?ae(e.contentId??``,e.title??``):``,l=_(h,{children:[_(`div`,{className:`relative aspect-[116.67/155.56] rounded-lg overflow-hidden bg-bg2`,children:[I||e.cover?g(v,{src:b(e.cover,u),alt:e.title??``,fill:!0,sizes:`116.67px`,className:`object-cover text-[10px] text-text3`,unoptimized:!0}):g(`div`,{className:`w-full h-full flex items-center justify-center text-text3 text-xs`,children:F(`noCover`)}),!K&&(e.badge??``).trim()?g(`div`,{className:`absolute top-0 right-0 w-8 h-8`,children:g(v,{src:(e.badge??``).trim()||ee,alt:``,fill:!0,sizes:`32px`,className:`object-contain object-right-top`,unoptimized:!0})}):null,_(`div`,{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pb-1 pt-3 px-1 flex justify-between items-center gap-1`,children:[g(`div`,{className:`flex items-center min-w-0 shrink`,children:n&&i?_(`div`,{className:`flex items-center gap-1 rounded bg-overlay px-1 py-0`,children:[g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`10`,viewBox:`0 0 12 10`,fill:`none`,className:`shrink-0`,"aria-hidden":!0,children:g(`path`,{d:`M7.56 5.18437L5.013 6.56737C4.893 6.63337 4.761 6.66937 4.638 6.66937C4.269 6.66937 4.002 6.38737 4.002 5.99737V3.28237C4.002 2.89237 4.269 2.61037 4.638 2.61037C4.764 2.61037 4.893 2.64637 5.013 2.70937L7.572 4.09237C7.803 4.21837 7.938 4.41637 7.938 4.63237C7.938 4.85137 7.8 5.05537 7.56 5.18437ZM9.807 9.27637L2.133 8.52937C0.954 8.52937 0 7.57537 0 6.39637V2.79937C0 1.62037 0.954 0.666368 2.133 0.666368L9.81 0.000367165C10.989 0.000367165 11.943 0.954367 11.943 2.13337V7.14337C11.9422 7.70935 11.7168 8.25188 11.3163 8.65181C10.9158 9.05174 10.373 9.27637 9.807 9.27637ZM10.875 2.13337C10.875 1.99351 10.8475 1.85502 10.7939 1.72581C10.7404 1.5966 10.662 1.47919 10.5631 1.3803C10.4642 1.2814 10.3468 1.20296 10.2176 1.14944C10.0883 1.09591 9.94986 1.06837 9.81 1.06837L2.133 1.73437C1.99314 1.73437 1.85465 1.76191 1.72544 1.81544C1.59623 1.86896 1.47883 1.9474 1.37993 2.0463C1.28104 2.14519 1.20259 2.2626 1.14907 2.39181C1.09555 2.52102 1.068 2.65951 1.068 2.79937V6.39637C1.068 6.67882 1.1802 6.94971 1.37993 7.14944C1.57966 7.34916 1.85054 7.46137 2.133 7.46137L9.807 8.20837C9.94686 8.20837 10.0853 8.18082 10.2146 8.1273C10.3438 8.07378 10.4612 7.99533 10.5601 7.89644C10.659 7.79754 10.7374 7.68014 10.7909 7.55093C10.8445 7.42171 10.872 7.28323 10.872 7.14337V2.13337H10.875Z`,fill:`white`})}),g(`span`,{className:`text-white text-[12px] leading-[20px]`,children:r})]}):null}),g(`div`,{className:`flex items-center shrink-0`,children:s?g(`span`,{className:`text-white text-[12px] leading-[20px]`,children:o}):null})]})]}),g(`div`,{className:`mt-2 py-2`,children:g(`h3`,{className:`text-[16px] text-text1 truncate font-bold leading-[24px]`,children:e.title})})]});return g(`div`,{ref:t===le?G:void 0,className:`flex-shrink-0 w-[116.67px]`,children:c?g(re,{href:c,className:`block rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-primary`,children:l}):l},t)})})]})}export{E as ImageTextRecommendClient};
2
+ "use client";import e from"../../../../utils/get-res-url.mjs";import{pContentBatchGetVideoDetail as t,pContentGetPopularVideoList as n}from"../../../../service/generated/client.mjs";import{pContentBatchGetVideoDetailKey as r,pContentGetPopularVideoListKey as i}from"../../../../service/generated/tanstack.mjs";import{Image as a}from"../../../ui/image.mjs";import{Box as o}from"../../../ui/box.mjs";import{Text as s}from"../../../ui/text.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as c,buildImageTextRecommendChosenTags as l,buildImageTextRecommendRemoteMap as u,buildImageTextRecommendSmartPicked as d,getImageTextRecommendFixedIds as f,getImageTextRecommendLayoutTags as ee,resolveImageTextRecommendVideoId as te}from"../../../../hooks/image-text-recommend.mjs";import{useRequest as p}from"../../../../hooks/query/use-query.mjs";import ne from"../../../../assets/images/frame.mjs";import re from"../../../../assets/images/subscript.mjs";import{buildSmartPopularQuery as ie,buildStableChosenTags as ae}from"./shared/query.mjs";import{useCallback as m,useEffect as h,useMemo as g,useRef as oe,useState as _}from"react";import{Fragment as se,jsx as v,jsxs as y}from"react/jsx-runtime";import{useTranslations as ce}from"next-intl";import le from"next/link";const b=[];function x(e){return typeof e==`string`?e:e.src}function ue(t,n){if(!t||!t.trim())return x(n);if(t.startsWith(`http`)||t.startsWith(`//`)||t.startsWith(`data:`))return t;let r=e();return r?`${r}${t.startsWith(`/`)?t:`/${t}`}`:t}function S(e){if(e==null)return``;let t=e;return t.img_y||t.media?.img_y||``}function C(e){return e==null?``:e.name||``}function w(e){let t=e,n=t.type;return typeof n==`number`?n:t.is_more_link===!0||Number(t.episode_cnt||t.episode_count||t.episodes?.length||t.links?.length||0)>1?2:1}function T(e){if(!Number.isFinite(e)||e<=0)return``;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function E(e,t){let n=e,r=Number(n.episode_cnt??0);if(!Number.isFinite(r)||r<=0)return``;let i=n.update_status;return t(r,i===0||i===`0`)}function de(e,t){return e?w(e)===2&&t?E(e,t):T(Number(e.duration??e.detail?.duration??0)):``}function fe(e,t){if(!(e??``).trim())return``;let n=encodeURIComponent((t??``).trim()||``);return`/video/${e.trim()}/${n}/episode/1`}function pe(e){if(!e)return``;let t=e,n=Number(t.static?.browse_cnt??0);if(!Number.isFinite(n)||n<=0)return``;if(n>=1e6){let e=(n/1e6).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}M`:`${e}M`}if(n>=1e3){let e=(n/1e3).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}k`:`${e}k`}return Math.floor(n).toString()}function me(){let e=new Date,t=new Date(e);return t.setHours(24,0,0,0),t.getTime()-e.getTime()}function D(e){let{title:w,items:T=b,commonPlayCount:E,commonEpisodes:D,layout:O,mode:k=`renderer`}=e,A=ce(`components.biz.business.imageTextRecommend`),j=k===`renderer`,M=k===`editor`,[N,P]=_({}),[F,I]=_([]),[L,R]=_(0),[z,B]=_(void 0),V=oe(null),H=!!O?.enabled,U=g(()=>ee(O),[O]),W=T?.length??0,G=g(()=>f(T,H),[H,T]),K=g(()=>G.slice(0,c),[G]),q=g(()=>ae(U,W),[U,W]),J=g(()=>ie(q,W),[q,W]),{data:Y}=p(i(J),()=>n(J),{enabled:j&&!M&&H&&T.length>0,staleTime:1/0}),{data:X}=p(r({ids:K}),()=>t({ids:K}),{enabled:j&&!M&&!H&&K.length>0,staleTime:1/0}),Z=g(()=>H&&W>c?Math.ceil(W/c):G.length>0?Math.ceil(G.length/c):0,[H,W,G.length]),Q=m((e,t)=>A(t?`updatedTo`:`allEpisodes`,{count:e}),[A]),he=m(async(e,n)=>{if(e.length===0)return;let r=u((await t({ids:e})).data?.videos??[]);P(e=>n?{...e,...r}:r)},[]);h(()=>{if(M)return;if(H){let e=Y?.data?.videos??[];W>c?(I(e.slice(0,c)),B(Y?.data?.cursor),R(e.length>0?1:0)):(I(d(e,q,W)),R(0)),P({});return}if(K.length===0){P({}),I([]),R(0),B(void 0);return}let e=X?.data?.videos??[];P(u(e)),I([]),B(void 0),R(e.length>0?1:0)},[M,H,Y,X,q,K,W]),h(()=>{if(M||Z<1||L<1||L>=Z)return;let e=V.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;if(!t?.isIntersecting)return;let r=L;if(H){let e=l(U,W);n({page_size:c,cursor:z,tags:e.length?Array.from(new Set(e)):void 0}).then(e=>{let t=e.data?.videos??[];I(e=>[...e,...t.slice(0,c)]),B(e.data?.cursor),R(r+1)}).catch(()=>{})}else{let e=r*c,t=G.slice(e,e+c);t.length>0&&(he(t,!0),R(r+1))}},{root:null,rootMargin:`0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[M,H,G,L,Z,U,W,z,he]),h(()=>{if(M||!H||W<=0)return;let e,t=!1;function r(){e=window.setTimeout(()=>{let e=l(U,W);n({page_size:Math.max(20,W*10),tags:e.length?Array.from(new Set(e)):void 0}).then(n=>{t||I(d(n.data?.videos??[],e,W))}).catch(()=>{t||I([])}).finally(()=>{t||r()})},me())}return r(),()=>{t=!0,e!==void 0&&window.clearTimeout(e)}},[M,H,U,W]);let $=g(()=>!T||T.length===0?b:M?T:H&&W>c?T.slice(0,F.length):T,[T,M,H,W,F.length]),ge=g(()=>$.length?$.map((e,t)=>{let n=String(e?.contentId??``).trim(),r=H?F[t]:n?N[n]:void 0,i=H?r?C(r):(e?.title??``).trim():(e?.title??``).trim()||(r?C(r):``),a=(e?.cover??``).trim(),o=H?S(r)||a:a||(e?.useVideoPoster?S(r):``),s=H&&String(r?.description??r?.content_description??``).trim()||(e?.contentDescription??``).trim(),c=de(r,Q),l=pe(r);return{...e,contentId:n||(r?te(r):``),title:i,cover:o,contentDescription:s,episodeOrDurationText:c,playCountText:l}}):b,[Q,H,$,N,F]);if(!T||T.length===0)return null;let _e=L>=1&&L<Z?H?F.length-2:L*c-2:-1;return y(o,{className:M?`bg-bg1 px-3 py-3 pointer-events-none`:`bg-bg1 px-3 py-3`,children:[w&&v(o,{className:`mb-3 flex items-center justify-between`,children:v(s,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:w})}),v(o,{className:`flex overflow-x-auto pb-2 scrollbar-hide space-x-2`,children:ge.map((e,t)=>{let n=H?E:e.showPlayCount??!1,r=(e.playCountText??``).trim(),i=r!==``,c=H?D:e.showEpisodes??!1,l=(e.episodeOrDurationText??``).trim(),u=c&&l!==``,d=k===`renderer`?fe(e.contentId??``,e.title??``):``,f=y(se,{children:[y(o,{className:`relative rounded-lg overflow-hidden bg-bg2 w-[116px] h-[134px]`,children:[M||e.cover?v(a,{src:ue(e.cover,ne),alt:e.title??``,fill:!0,className:`object-cover`}):v(o,{className:`w-full h-full flex items-center justify-center`,children:v(s,{className:`text-text3 text-xs`,children:A(`noCover`)})}),!H&&(e.badge??``).trim()?v(o,{className:`absolute top-0 right-0 w-8 h-8`,children:v(a,{src:(e.badge??``).trim()||x(re),alt:``,fill:!0,sizes:`32px`,className:`object-contain object-right-top`,unoptimized:!0})}):null,y(o,{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pb-1 pt-3 px-1 flex justify-between items-center gap-1`,children:[v(o,{className:`flex items-center min-w-0 shrink`,children:n&&i?y(o,{className:`flex items-center gap-1 rounded bg-overlay px-1 py-0`,children:[v(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`10`,viewBox:`0 0 12 10`,fill:`none`,className:`shrink-0`,"aria-hidden":!0,children:v(`path`,{d:`M7.56 5.18437L5.013 6.56737C4.893 6.63337 4.761 6.66937 4.638 6.66937C4.269 6.66937 4.002 6.38737 4.002 5.99737V3.28237C4.002 2.89237 4.269 2.61037 4.638 2.61037C4.764 2.61037 4.893 2.64637 5.013 2.70937L7.572 4.09237C7.803 4.21837 7.938 4.41637 7.938 4.63237C7.938 4.85137 7.8 5.05537 7.56 5.18437ZM9.807 9.27637L2.133 8.52937C0.954 8.52937 0 7.57537 0 6.39637V2.79937C0 1.62037 0.954 0.666368 2.133 0.666368L9.81 0.000367165C10.989 0.000367165 11.943 0.954367 11.943 2.13337V7.14337C11.9422 7.70935 11.7168 8.25188 11.3163 8.65181C10.9158 9.05174 10.373 9.27637 9.807 9.27637ZM10.875 2.13337C10.875 1.99351 10.8475 1.85502 10.7939 1.72581C10.7404 1.5966 10.662 1.47919 10.5631 1.3803C10.4642 1.2814 10.3468 1.20296 10.2176 1.14944C10.0883 1.09591 9.94986 1.06837 9.81 1.06837L2.133 1.73437C1.99314 1.73437 1.85465 1.76191 1.72544 1.81544C1.59623 1.86896 1.47883 1.9474 1.37993 2.0463C1.28104 2.14519 1.20259 2.2626 1.14907 2.39181C1.09555 2.52102 1.068 2.65951 1.068 2.79937V6.39637C1.068 6.67882 1.1802 6.94971 1.37993 7.14944C1.57966 7.34916 1.85054 7.46137 2.133 7.46137L9.807 8.20837C9.94686 8.20837 10.0853 8.18082 10.2146 8.1273C10.3438 8.07378 10.4612 7.99533 10.5601 7.89644C10.659 7.79754 10.7374 7.68014 10.7909 7.55093C10.8445 7.42171 10.872 7.28323 10.872 7.14337V2.13337H10.875Z`,fill:`white`})}),v(s,{className:`text-white text-[12px] leading-[20px]`,children:r})]}):null}),v(o,{className:`flex items-center shrink-0`,children:u?v(s,{className:`text-white text-[12px] leading-[20px]`,children:l}):null})]})]}),v(o,{className:`mt-2 py-2`,children:v(s,{className:`text-[16px] text-text1 font-bold leading-[24px] line-clamp-1`,children:e.title})})]});return v(o,{ref:t===_e?V:void 0,className:`flex-shrink-0 w-[116px]`,children:d?v(le,{href:d,className:`block`,children:f}):f},t)})})]})}export{D as ImageTextRecommendClient};
@@ -1,5 +1,5 @@
1
1
 
2
2
  import { imageTextRecommendInspectorPropsSchema } from "./schema.mjs";
3
- import { ImageTextRecommendClient, ImageTextRecommendInitialData, ImageTextRecommendProps } from "./client.mjs";
3
+ import { ImageTextRecommendClient, ImageTextRecommendProps } from "./client.mjs";
4
4
  import { ImageTextRecommendServer } from "./server.mjs";
5
5
  import { imageTextRecommendMaterial } from "./material.mjs";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({contentId:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue:``,description:`角标图片地址,可通过低代码平台配置上传;留空则使用默认角标图`})}),c=t({title:a({label:`推荐位名称`,defaultValue:`推荐视频`}),moduleCount:n({label:`推荐模块数`,defaultValue:1}),layout:r({enabled:i({label:`智能铺设`,defaultValue:!1}),tags:e(o.string(),{label:`取数范围标签`,defaultValue:[`电影`]})},{label:`组件铺设`,defaultValue:{enabled:!1,tags:[`电影`]}}),commonPlayCount:i({label:`通用播放量`,defaultValue:!0}),commonEpisodes:i({label:`通用集数`,defaultValue:!0}),items:e(s,{label:`推荐位模块`,defaultValue:[{contentId:`d6a35ba3279e6f0d`,title:`视频标题 1`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{contentId:`eaf60eab4938489d`,title:`视频标题 2`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{contentId:`c45fe58f91d1c986`,title:`视频标题 3`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``}]})});export{c as imageTextRecommendInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({contentId:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue:``,description:`角标图片地址,可通过低代码平台配置上传;留空则使用默认角标图`})}),c=t({title:a({label:`推荐位名称`,defaultValue:`推荐视频`}),moduleCount:n({label:`推荐模块数`,defaultValue:1}),layout:r({enabled:i({label:`智能铺设`,defaultValue:!1}),tags:e(o.string(),{label:`取数范围标签`,defaultValue:[`电影`]})},{label:`智能铺设`,defaultValue:{enabled:!1,tags:[`电影`]}}),commonPlayCount:i({label:`通用播放量`,defaultValue:!0}),commonEpisodes:i({label:`通用集数`,defaultValue:!0}),items:e(s,{label:`推荐位模块`,defaultValue:[{contentId:`d6a35ba3279e6f0d`,title:`视频标题 1`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{contentId:`eaf60eab4938489d`,title:`视频标题 2`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{contentId:`c45fe58f91d1c986`,title:`视频标题 3`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``}]})});export{c as imageTextRecommendInspectorPropsSchema};
@@ -4,9 +4,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region components/biz/business/image-text-recommend/server.d.ts
6
6
  /**
7
- * 图文推荐物料组件 - 服务端部分
8
- * 负责初次数据请求(与客户端共享同一套 schema 配置)、国际化文案预取和属性透传。
9
- * 关闭智能铺设时超过 8 条的「触底加载下一批」仍在客户端发起。
7
+ * 图文推荐物料组件
10
8
  */
11
9
  declare function ImageTextRecommendServer(props: ImageTextRecommendProps): Promise<react_jsx_runtime0.JSX.Element>;
12
10
  //#endregion
@@ -1,2 +1,2 @@
1
1
 
2
- import{pContentBatchGetVideoDetail as e,pContentGetPopularVideoList as t}from"../../../../service/generated/client.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as n,buildImageTextRecommendChosenTags as r,buildImageTextRecommendRemoteMap as i,buildImageTextRecommendSmartPicked as a,getImageTextRecommendFixedIds as o,getImageTextRecommendLayoutTags as s}from"../../../../hooks/image-text-recommend.mjs";import{ImageTextRecommendClient as c}from"./client.mjs";import{jsx as l}from"react/jsx-runtime";import{getTranslations as u}from"next-intl/server";const d=[];async function f(f){let{mode:p=`renderer`,items:m=d,layout:h,...g}=f,_,v,y,b,x=!1,S=``,C=``;try{let e=await u(`components.biz.business.imageTextRecommend`);S=e.raw(`allEpisodes`),C=e.raw(`updatedTo`)}catch{}let w=!!h?.enabled,T=o(m,w),E=s(h),D=m?.length??0;if(p===`renderer`&&m?.length)try{if(w){let e=r(E,D);if(D>n){let r=await t({page_size:n,tags:e.length?Array.from(new Set(e)):void 0});v=(r.data?.videos??[]).slice(0,n),b=r.data?.cursor,y=1}else v=a((await t({page_size:Math.max(20,D*10),tags:e.length?Array.from(new Set(e)):void 0})).data?.videos??[],e,D),y=0;_={},x=!0}else T.length>0&&(_=i((await e({ids:T.length<=n?T:T.slice(0,n)})).data?.videos??[]),v=[],y=1,x=!0)}catch{x=!1}return l(c,{...g,items:m,layout:h,mode:p,allEpisodesText:S,updatedToText:C,initialRemoteMap:_,initialSmartList:v,initialLoadedBatchIndex:y,initialDataFromServer:x,initialSmartNextCursor:b})}export{f as ImageTextRecommendServer};
2
+ import{pContentBatchGetVideoDetail as e,pContentGetPopularVideoList as t}from"../../../../service/generated/client.mjs";import{pContentBatchGetVideoDetailKey as n,pContentGetPopularVideoListKey as r}from"../../../../service/generated/tanstack.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as i,getImageTextRecommendFixedIds as a,getImageTextRecommendLayoutTags as o}from"../../../../hooks/image-text-recommend.mjs";import{HydrationBoundary as s}from"../../../../hooks/query/hydration-boundary.mjs";import{buildSmartPopularQuery as c,buildStableChosenTags as l}from"./shared/query.mjs";import{ImageTextRecommendClient as u}from"./client.mjs";import{jsx as d}from"react/jsx-runtime";const f=[];async function p(p){let{mode:m=`renderer`,...h}=p,g=h.items??f,_=h.layout,v=[],y=!!_?.enabled,b=a(g,y),x=o(_),S=g?.length??0;if(m===`renderer`&&g?.length)try{if(y){let e=c(l(x,S),S),n=await t(e);v.push({queryKey:r(e),queryFn:()=>Promise.resolve(n)})}else if(b.length>0){let t={ids:b.length<=i?b:b.slice(0,i)},r=await e(t);v.push({queryKey:n(t),queryFn:()=>Promise.resolve(r)})}}catch(e){console.warn(`[image-text-recommend] server prefetch failed:`,e)}return d(s,{prefetch:v,children:d(u,{...h,mode:m})})}export{p as ImageTextRecommendServer};
@@ -0,0 +1,2 @@
1
+
2
+ import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as e}from"../../../../../hooks/image-text-recommend.mjs";function t(e,t){let n=e.map(e=>String(e).trim()).filter(Boolean);if(!n.length||t<=0)return[];if(n.length>=t)return n.slice(0,t);let r=[...n];for(;r.length<t;)r.push(n[r.length%n.length]);return r}function n(t,n){return n>e?{page_size:e,tags:t.length?Array.from(new Set(t)):void 0}:{page_size:Math.max(20,n*10),tags:t.length?Array.from(new Set(t)):void 0}}export{n as buildSmartPopularQuery,t as buildStableChosenTags};
@@ -53,7 +53,7 @@ import { HomeRecommendWaterfall } from "./home-recommend/home-recommend-waterfal
53
53
  import { homeRecommendWaterfallMaterial } from "./home-recommend/home-recommend-waterfall/material.mjs";
54
54
  import "./home-recommend/index.mjs";
55
55
  import { imageTextRecommendInspectorPropsSchema } from "./image-text-recommend/schema.mjs";
56
- import { ImageTextRecommendClient, ImageTextRecommendInitialData, ImageTextRecommendProps } from "./image-text-recommend/client.mjs";
56
+ import { ImageTextRecommendClient, ImageTextRecommendProps } from "./image-text-recommend/client.mjs";
57
57
  import { ImageTextRecommendServer } from "./image-text-recommend/server.mjs";
58
58
  import { imageTextRecommendMaterial } from "./image-text-recommend/material.mjs";
59
59
  import "./image-text-recommend/index.mjs";
@@ -111,7 +111,7 @@ import { SearchHistoryClient, SearchHistoryProps } from "./search-history/client
111
111
  import { SearchHistoryServer } from "./search-history/server.mjs";
112
112
  import { searchHistoryMaterial } from "./search-history/material.mjs";
113
113
  import "./search-history/index.mjs";
114
- import { searchInputInspectorPropsSchema } from "./search-input/schema.mjs";
114
+ import { SearchInputInspectorProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema } from "./search-input/schema.mjs";
115
115
  import { SearchInputClient, SearchInputProps } from "./search-input/client.mjs";
116
116
  import { SearchInputServer } from "./search-input/server.mjs";
117
117
  import { searchInputMaterial } from "./search-input/material.mjs";
@@ -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{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-2 break-all 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 overflow-hidden whitespace-nowrap text-ellipsis font-bold `,children:Q}),ue]}),$&&x(c,{as:`p`,className:`text-sm py-1 line-clamp-2 break-all text-text1/66`,children:$})]})]})}export{k as UserProfileHeaderClient};
@@ -1,7 +1,7 @@
1
1
 
2
+ import { UserProfileHeaderAuthConfig, UserProfileHeaderClientProps } from "./schema.mjs";
2
3
  import { PrefetchItem } from "../../../../../hooks/query/hydration-boundary.mjs";
3
4
  import "../../../../../hooks.mjs";
4
- import { UserProfileHeaderAuthConfig, UserProfileHeaderClientProps } from "./schema.mjs";
5
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
7
7
  //#region components/biz/business/profile/profile-header/server.d.ts
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Button as e}from"../../../ui/button.mjs";import t from"../../../../utils/event-bus.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import{DeleteConfirmDialog as a}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useCallback as o,useEffect as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useTranslations as f}from"next-intl";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";function g(g){let _=f(`components.biz.business.searchHistory`),{title:v,rows:y=1,clearText:b,confirmDescription:x,storageKey:S=`guest`,onHistoryClick:C,mode:w=`renderer`}=g,T=b??_(`clear`),E=x??_(`confirmClearDescription`),D=c(()=>[_(`mockHistory1`),_(`mockHistory2`),_(`mockHistory3`)],[_]),[O,k]=l([]),[A,j]=l(!1),M=m(),N=p(),P=h(),F=`search_history_${S}`,I=o(()=>{let e=localStorage.getItem(F);if(e)try{k(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}else k([])},[F]);s(()=>{I()},[I]),s(()=>(t.on(i.SEARCH_HISTORY_UPDATE,I),()=>{t.off(i.SEARCH_HISTORY_UPDATE,I)}),[I]);let L=()=>{k([]),localStorage.removeItem(F),j(!1),t.emit(i.SEARCH_HISTORY_UPDATE)},R=c(()=>{let e=O.length>0?O:w===`editor`?D:[],t=y*10;return e.slice(0,t)},[O,w,D,y]);if(R.length===0)return null;let z=e=>{if(C)C(e);else{let t=new URLSearchParams(P.toString());t.set(`q`,e);let n=N.includes(`/search`)?N:`/search`;M.push(`${n}?${t.toString()}`)}};return d(n,{className:`px-4 py-2`,children:[d(n,{className:`flex justify-between items-center mb-2`,children:[u(r,{className:`text-[16px] font-bold text-text1`,children:v}),u(e,{variant:`ghost`,size:`sm`,className:`text-text3 text-[12px] p-0 h-auto`,onClick:()=>j(!0),children:T})]}),u(n,{className:`flex flex-wrap gap-2 overflow-hidden`,style:{maxHeight:`${y*40}px`},children:R.map((e,t)=>u(n,{className:`px-3 py-1 bg-bg2 rounded-full cursor-pointer`,onClick:()=>z(e),children:u(r,{className:`text-[14px] text-text2 truncate max-w-[150px]`,children:e})},t))}),u(a,{open:A,onOpenChange:j,onConfirm:()=>{L()},title:``,description:E})]})}export{g as SearchHistoryClient};
2
+ "use client";import{Button as e}from"../../../ui/button.mjs";import t from"../../../../utils/event-bus.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import{DeleteConfirmDialog as a}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useCallback as o,useEffect as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useTranslations as f}from"next-intl";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";function g(g){let _=f(`components.biz.business.searchHistory`),{title:v,rows:y=1,clearText:b,confirmDescription:x,storageKey:S=`guest`,onHistoryClick:C,mode:w=`renderer`}=g,T=b??_(`clear`),E=x??_(`confirmClearDescription`),D=c(()=>[_(`mockHistory1`),_(`mockHistory2`),_(`mockHistory3`)],[_]),[O,k]=l([]),[A,j]=l(!1),M=m(),N=p(),P=h(),F=`search_history_${S}`,I=o(()=>{let e=localStorage.getItem(F);if(e)try{k(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}else k([])},[F]);s(()=>{I()},[I]),s(()=>(t.on(i.SEARCH_HISTORY_UPDATE,I),()=>{t.off(i.SEARCH_HISTORY_UPDATE,I)}),[I]);let L=()=>{k([]),localStorage.removeItem(F),j(!1),t.emit(i.SEARCH_HISTORY_UPDATE)},R=c(()=>{let e=O.length>0?O:w===`editor`?D:[],t=y*10;return e.slice(0,t)},[O,w,D,y]);if(R.length===0)return null;let z=e=>{if(C)C(e);else{let t=new URLSearchParams(P.toString());t.set(`q`,e);let n=N.includes(`/search-result`)?N:`/search-result`;M.push(`${n}?${t.toString()}`)}};return d(n,{className:`px-4 py-2`,children:[d(n,{className:`flex justify-between items-center mb-2`,children:[u(r,{className:`text-[16px] font-bold text-text1`,children:v}),u(e,{variant:`ghost`,size:`sm`,className:`text-text3 text-[12px] p-0 h-auto`,onClick:()=>j(!0),children:T})]}),u(n,{className:`flex flex-wrap gap-2 overflow-hidden`,style:{maxHeight:`${y*40}px`},children:R.map((e,t)=>u(n,{className:`px-3 py-1 bg-bg2 rounded-full cursor-pointer`,onClick:()=>z(e),children:u(r,{className:`text-[14px] text-text2 truncate max-w-[150px]`,children:e})},t))}),u(a,{open:A,onOpenChange:j,onConfirm:()=>{L()},title:``,description:E})]})}export{g as SearchHistoryClient};
@@ -1,11 +1,9 @@
1
1
 
2
- import { InferSchemaProps } from "../../../../utils/schema/schema.mjs";
3
- import "../../../../utils/schema/index.mjs";
4
- import { searchInputInspectorPropsSchema } from "./schema.mjs";
2
+ import { SearchInputInspectorProps } from "./schema.mjs";
5
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
6
4
 
7
5
  //#region components/biz/business/search-input/client.d.ts
8
- type SearchInputProps = InferSchemaProps<typeof searchInputInspectorPropsSchema>;
6
+ type SearchInputProps = SearchInputInspectorProps;
9
7
  interface ClientProps extends SearchInputProps {
10
8
  /** 占位符,未配置时由服务端 defaultPlaceholder 兜底 */
11
9
  placeholder?: string;
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../../utils/event-bus.mjs";import{Box as t}from"../../../ui/box.mjs";import{Input as n}from"../../../ui/input.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import a from"../../../../assets/icons/left_arrow.mjs";import o from"../../../../assets/icons/search.mjs";import s from"../../../../assets/icons/clear.mjs";import{useCallback as c,useEffect as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as p}from"next-intl";import{usePathname as m,useRouter as h,useSearchParams as g}from"next/navigation";function _(_){let v=p(`components.pages.search`),{placeholder:y,defaultPlaceholder:b,searchLabel:x,storageKey:S=`guest`,onSearch:C,mode:w=`renderer`}=_,T=y||(b??v(`topHeader.placeholder`)),E=x??v(`topHeader.search`),D=w===`editor`,[O,k]=u(``),A=h(),j=m(),M=g(),N=`search_history_${S}`,P=c(t=>{if(!D&&t.trim()){try{let n=localStorage.getItem(N),r=n?JSON.parse(n):[];r=[t,...r.filter(e=>e!==t)],localStorage.setItem(N,JSON.stringify(r.slice(0,20))),e.emit(i.SEARCH_HISTORY_UPDATE)}catch(e){console.error(`Failed to save search history`,e)}if(C)C(t);else{let e=new URLSearchParams(M.toString());e.set(`q`,t);let n=j.includes(`/search`)?j:`/search`;A.push(`${n}?${e.toString()}`)}}},[N,D,C,j,A,M]);l(()=>{let e=M.get(`q`);e&&e!==O&&(k(e),P(e))},[M,P,O]),l(()=>{if(!D&&O===``){if(M.has(`q`)){let e=new URLSearchParams(M.toString());e.delete(`q`);let t=j.includes(`/search`)?j:`/search`;A.push(`${t}${e.toString()?`?${e.toString()}`:``}`)}e.emit(i.SEARCH_HISTORY_UPDATE)}},[D,O,j,A,M]);let F=()=>{P(O)};function I(){if(k(``),!D){if(M.has(`q`)){let e=new URLSearchParams(M.toString());e.delete(`q`);let t=j.includes(`/search`)?j:`/search`;A.push(`${t}${e.toString()?`?${e.toString()}`:``}`)}e.emit(i.SEARCH_HISTORY_UPDATE)}}return f(t,{className:D?`px-3 py-2 bg-bg1 flex items-center gap-3 w-full pointer-events-none`:`px-3 py-2 bg-bg1 flex items-center gap-3 w-full`,children:[d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:()=>{D||A.back()},children:d(a,{className:`w-4 h-4 text-text1`})}),f(t,{className:`flex-1 flex items-center gap-1 bg-bg2 border border-theme5 rounded-[20px] px-2 py-1.5 overflow-hidden`,children:[d(t,{className:`p-1 shrink-0`,children:d(o,{className:`w-[14px] h-[14px] text-text3`})}),d(n,{className:`flex-1 border-none bg-transparent p-0 h-auto text-[14px] leading-[22px] focus-visible:ring-0 text-text1 placeholder:text-text3`,placeholder:T,value:O,onChange:e=>k(e.target.value),onKeyDown:e=>e.key===`Enter`&&F()}),O&&d(s,{className:`w-[15px] h-[15px] text-text3 shrink-0 cursor-pointer active:opacity-70`,onClick:I})]}),d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:F,children:d(r,{className:`text-[16px] text-text1 leading-[24px] font-normal`,children:E})})]})}export{_ as SearchInputClient};
2
+ "use client";import e from"../../../../utils/event-bus.mjs";import{Box as t}from"../../../ui/box.mjs";import{Input as n}from"../../../ui/input.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import a from"../../../../assets/icons/left_arrow.mjs";import o from"../../../../assets/icons/search.mjs";import s from"../../../../assets/icons/clear.mjs";import{useCallback as c,useEffect as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as p}from"next-intl";import{usePathname as m,useRouter as h,useSearchParams as g}from"next/navigation";function _(_){let v=p(`components.pages.search`),{placeholder:y,defaultPlaceholder:b,searchLabel:x,storageKey:S=`guest`,onSearch:C,mode:w=`renderer`}=_,T=y||(b??v(`topHeader.placeholder`)),E=x??v(`topHeader.search`),D=w===`editor`,[O,k]=u(``),A=h(),j=m(),M=g(),N=`search_history_${S}`,P=c(t=>{if(!D&&t.trim()){try{let n=localStorage.getItem(N),r=n?JSON.parse(n):[];r=[t,...r.filter(e=>e!==t)],localStorage.setItem(N,JSON.stringify(r.slice(0,20))),e.emit(i.SEARCH_HISTORY_UPDATE)}catch(e){console.error(`Failed to save search history`,e)}if(C)C(t);else{let e=new URLSearchParams(M.toString());e.set(`q`,t);let n=j.includes(`/search-result`)?j:`/search-result`;A.push(`${n}?${e.toString()}`)}}},[N,D,C,j,A,M]);l(()=>{let e=M.get(`q`);e&&e!==O&&(k(e),P(e))},[M,P,O]),l(()=>{if(!D&&O===``){if(M.has(`q`)){let e=new URLSearchParams(M.toString());e.delete(`q`);let t=j.includes(`/search-result`)?j:`/search-result`;A.push(`${t}${e.toString()?`?${e.toString()}`:``}`)}e.emit(i.SEARCH_HISTORY_UPDATE)}},[D,O,j,A,M]);let F=()=>{P(O)};function I(){if(k(``),!D){if(M.has(`q`)){let e=new URLSearchParams(M.toString());e.delete(`q`);let t=j.includes(`/search-result`)?j:`/search-result`;A.push(`${t}${e.toString()?`?${e.toString()}`:``}`)}e.emit(i.SEARCH_HISTORY_UPDATE)}}return f(t,{className:D?`px-3 py-2 bg-bg1 flex items-center gap-3 w-full pointer-events-none`:`px-3 py-2 bg-bg1 flex items-center gap-3 w-full`,children:[d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:()=>{D||A.back()},children:d(a,{className:`w-4 h-4 text-text1`})}),f(t,{className:`flex-1 flex items-center gap-1 bg-bg2 border border-theme5 rounded-[20px] px-2 py-1.5 overflow-hidden`,children:[d(t,{className:`p-1 shrink-0`,children:d(o,{className:`w-[14px] h-[14px] text-text3`})}),d(n,{className:`flex-1 border-none bg-transparent p-0 h-auto text-[14px] leading-[22px] focus-visible:ring-0 text-text1 placeholder:text-text3`,placeholder:T,value:O,onChange:e=>k(e.target.value),onKeyDown:e=>e.key===`Enter`&&F()}),O&&d(s,{className:`w-[15px] h-[15px] text-text3 shrink-0 cursor-pointer active:opacity-70`,onClick:I})]}),d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:F,children:d(r,{className:`text-[16px] text-text1 leading-[24px] font-normal`,children:E})})]})}export{_ as SearchInputClient};
@@ -1,5 +1,5 @@
1
1
 
2
- import { searchInputInspectorPropsSchema } from "./schema.mjs";
2
+ import { SearchInputInspectorProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema } from "./schema.mjs";
3
3
  import { SearchInputClient, SearchInputProps } from "./client.mjs";
4
4
  import { SearchInputServer } from "./server.mjs";
5
5
  import { searchInputMaterial } from "./material.mjs";
@@ -1,11 +1,12 @@
1
1
 
2
+ import { InferSchemaProps } from "../../../../utils/schema/schema.mjs";
3
+ import "../../../../utils/schema/index.mjs";
2
4
  import * as zod from "zod";
3
5
  import * as zod_v4_core0 from "zod/v4/core";
4
6
 
5
7
  //#region components/biz/business/search-input/schema.d.ts
6
8
  /**
7
- * 搜索输入框物料属性定义
8
- * 无需配置,低代码平台不展示配置面板;占位符等由服务端 i18n 注入。
9
+ * 搜索输入框物料暂不对外开放配置,仅做占位展示;占位符等由服务端 i18n 注入。
9
10
  */
10
11
  declare const searchInputInspectorPropsSchema: zod.ZodObject<{
11
12
  mode: zod.ZodOptional<zod.ZodEnum<{
@@ -13,5 +14,7 @@ declare const searchInputInspectorPropsSchema: zod.ZodObject<{
13
14
  editor: "editor";
14
15
  }>>;
15
16
  }, zod_v4_core0.$strip>;
17
+ declare const searchInputInspectorDefaultProps: {};
18
+ type SearchInputInspectorProps = InferSchemaProps<typeof searchInputInspectorPropsSchema>;
16
19
  //#endregion
17
- export { searchInputInspectorPropsSchema };
20
+ export { SearchInputInspectorProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e}from"../../../../utils/schema/schema.mjs";const t=e({});export{t as searchInputInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../utils/schema/schema.mjs";const n=e({}),r=t(n);export{r as searchInputInspectorDefaultProps,n as searchInputInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useMemo as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{usePathname as o,useRouter as s}from"next/navigation";const c=[];function l(l){let{items:u=c,mode:d=`renderer`}=l,f=s(),p=o(),m=r(()=>d===`editor`?0:u.findIndex(e=>!!(e.domainId===`home`&&p===`/`||e.domainId===`mine`&&p.includes(`/mine`))),[u,p,d]),h=e=>{if(d!==`editor`)if(e.configType===1)switch(e.functionPageType){case`搜索`:f.push(`/search`);break;case`个人中心`:f.push(`/user/mine`);break;case`内容列表`:f.push(`/video-list?tags=${e.tags}&title=${e.title}`);break;default:f.push(`/`)}else f.push(`/domain/category/${e.categoryName}`)};return!u||u.length===0?null:i(t,{className:`fixed bottom-0 left-0 right-0 bg-bg1 border-t border-line safe-area-bottom z-50`,children:i(t,{className:`flex h-[50px] items-center justify-around`,children:u.map((r,o)=>{let s=m===o,c=r.icon;return s&&r.activeIcon&&(c=r.activeIcon),a(t,{className:`flex flex-col items-center justify-center flex-1 cursor-pointer`,onClick:h,children:[i(t,{className:`relative w-6 h-6`,children:c?i(e,{src:c,alt:r.label,fill:!0,className:`object-contain`}):i(t,{className:`w-full h-full rounded-sm ${s?`bg-theme5`:`bg-text3`}`})}),i(n,{className:`text-[10px] mt-1 truncate max-w-full px-1 ${s?`text-theme5 font-medium`:`text-text3`}`,children:r.label})]},o)})})})}export{l as TabBarClient};
2
+ "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useMemo as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{usePathname as o,useRouter as s}from"next/navigation";const c=[];function l(l){let{items:u=c,mode:d=`renderer`}=l,f=s(),p=o(),m=r(()=>d===`editor`?0:u.findIndex(e=>!!(e.domainId===`home`&&p===`/`||e.domainId===`mine`&&p.includes(`/mine`))),[u,p,d]),h=e=>{if(d!==`editor`)if(e.configType===1)switch(e.functionPageType){case`搜索`:f.push(`/search`);break;case`个人中心`:f.push(`/user/mine`);break;case`内容列表`:f.push(`/video-list?tags=${e.tags}&title=${e.title}`);break;default:f.push(`/`)}else{let t=(e.domainId??``).toString().trim();f.push(t?`/domain/category/${t}`:`/`)}};return!u||u.length===0?null:i(t,{className:`fixed bottom-0 left-0 right-0 bg-bg1 border-t border-line safe-area-bottom z-50`,children:i(t,{className:`flex h-[50px] items-center justify-around`,children:u.map((r,o)=>{let s=m===o,c=r.icon;return s&&r.activeIcon&&(c=r.activeIcon),a(t,{className:`flex flex-col items-center justify-center flex-1 cursor-pointer`,onClick:h,children:[i(t,{className:`relative w-6 h-6`,children:c?i(e,{src:c,alt:r.label,fill:!0,className:`object-contain`}):i(t,{className:`w-full h-full rounded-sm ${s?`bg-theme5`:`bg-text3`}`})}),i(n,{className:`text-[10px] mt-1 truncate max-w-full px-1 ${s?`text-theme5 font-medium`:`text-text3`}`,children:r.label})]},o)})})})}export{l as TabBarClient};
@@ -19,7 +19,6 @@ declare const tabBarMaterial: DefineMaterialOption<typeof TabBarServer, typeof T
19
19
  activeIcon: zod.ZodString & SchemaHasDefaultValue;
20
20
  configType: zod.ZodType<"function" | "product", unknown, zod_v4_core0.$ZodTypeInternals<"function" | "product", unknown>> & SchemaHasDefaultValue;
21
21
  functionPageType: zod.ZodType<"search" | "content_list" | "detail" | "profile", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "content_list" | "detail" | "profile", unknown>> & SchemaHasDefaultValue;
22
- selectData: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
23
22
  mode: zod.ZodOptional<zod.ZodEnum<{
24
23
  renderer: "renderer";
25
24
  editor: "editor";
@@ -16,7 +16,6 @@ declare const tabBarInspectorPropsSchema: zod.ZodObject<{
16
16
  activeIcon: zod.ZodString & SchemaHasDefaultValue;
17
17
  configType: zod.ZodType<"function" | "product", unknown, zod_v4_core0.$ZodTypeInternals<"function" | "product", unknown>> & SchemaHasDefaultValue;
18
18
  functionPageType: zod.ZodType<"search" | "content_list" | "detail" | "profile", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "content_list" | "detail" | "profile", unknown>> & SchemaHasDefaultValue;
19
- selectData: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
20
19
  mode: zod.ZodOptional<zod.ZodEnum<{
21
20
  renderer: "renderer";
22
21
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSelectEnumPropSchema as n,defineTextPropSchema as r}from"../../../../utils/schema/schema.mjs";const i=t({items:e(t({label:r({label:`导航入口名称`,defaultValue:`入口`,description:`支持输入,中/英/数/符,不支持Emoji,4个字符`}),domainId:r({label:`导航入口域名ID`,defaultValue:``,description:`输入,英/数,10个字符`}),icon:r({label:`导航外显图标`,defaultValue:``,description:`支持上传,尺寸为1:1,支持jpg/png,50KB左右`}),activeIcon:r({label:`导航外显图标(选中)`,defaultValue:``,description:`支持上传,尺寸为1:1,支持jpg/png,50KB左右`}),configType:n([`product`,`function`],{label:`配置类型`,defaultValue:`function`}),functionPageType:n([`detail`,`search`,`profile`,`content_list`],{label:`功能页面类型`,defaultValue:`search`}),selectData:r({label:`选择数据`,defaultValue:``,required:!1})}),{label:`底部导航入口`,description:`注最少2个,最多5个,自动居中`,defaultValue:[{label:`首页`,domainId:`home`,icon:``,activeIcon:``,configType:`function`,functionPageType:`search`,selectData:``},{label:`我的`,domainId:`mine`,icon:``,activeIcon:``,configType:`function`,functionPageType:`profile`,selectData:``}]})});export{i as tabBarInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSelectEnumPropSchema as n,defineTextPropSchema as r}from"../../../../utils/schema/schema.mjs";const i=t({items:e(t({label:r({label:`导航入口名称`,defaultValue:`入口`,description:`支持输入,中/英/数/符,不支持Emoji,4个字符`}),domainId:r({label:`导航入口域名ID`,defaultValue:``,description:`输入,英/数,10个字符`}),icon:r({label:`导航外显图标`,defaultValue:``,description:`支持上传,尺寸为1:1,支持jpg/png,50KB左右`}),activeIcon:r({label:`导航外显图标(选中)`,defaultValue:``,description:`支持上传,尺寸为1:1,支持jpg/png,50KB左右`}),configType:n([`product`,`function`],{label:`配置类型`,defaultValue:`function`}),functionPageType:n([`detail`,`search`,`profile`,`content_list`],{label:`功能页面类型`,defaultValue:`search`})}),{label:`底部导航入口`,description:`注最少2个,最多5个,自动居中`,defaultValue:[{label:`首页`,domainId:`home`,icon:``,activeIcon:``,configType:`function`,functionPageType:`search`},{label:`我的`,domainId:`mine`,icon:``,activeIcon:``,configType:`function`,functionPageType:`profile`}]})});export{i as tabBarInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- import{TabBarClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){console.log(`TabBarServer props`,n);let{mode:r=`renderer`,...i}=n;return t(e,{...i,mode:r})}export{n as TabBarServer};
2
+ import{TabBarClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){let{mode:r=`renderer`,...i}=n;return t(e,{...i,mode:r})}export{n as TabBarServer};
@@ -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 n from"../../../../assets/icons/refresh.mjs";import{useMemo as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useTranslations as s}from"next-intl";import{usePathname as c,useRouter as l,useSearchParams as u}from"next/navigation";const d=[];function f(f){let p=s(`components.biz.business.textRecommend`),{title:m,items:h=d,onItemClick:g,mode:_=`renderer`}=f,v=_===`editor`,y=l(),b=c(),x=u(),[S,C]=i(0),w=Math.ceil(h.length/6),T=r(()=>{if(h.length<=6)return h;let e=S%w*6;return h.slice(e,e+6)},[h,S,w]);if(h.length===0)return null;let E=e=>{e.stopPropagation(),C(e=>e+1)},D=e=>{if(g)g(e);else{let t=new URLSearchParams(x.toString());t.set(`q`,e);let n=b.includes(`/search`)?b:`/search`;y.push(`${n}?${t.toString()}`)}};return o(e,{className:v?`bg-bg1 p-3 flex flex-col gap-3 w-full pointer-events-none`:`bg-bg1 p-3 flex flex-col gap-3 w-full`,children:[o(e,{className:`flex items-center justify-between w-full`,children:[a(t,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:m||p(`defaultTitle`)}),o(e,{className:`flex items-center gap-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:E,children:[a(t,{className:`text-[14px] text-text3 leading-[22px]`,children:p(`refreshBatch`)}),a(n,{className:`w-3 h-3 text-text3`})]})]}),a(e,{className:`grid grid-cols-2 gap-x-1 gap-y-1 w-full`,children:T.map((n,r)=>a(e,{className:`flex items-center h-[32px] cursor-pointer active:opacity-70 transition-opacity overflow-hidden`,onClick:()=>D(n.label),children:a(t,{className:`text-[14px] text-text1 leading-[22px] truncate w-full`,children:n.label})},`${S}-${r}`))})]})}export{f as TextRecommendClient};
2
+ "use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import n from"../../../../assets/icons/refresh.mjs";import{useMemo as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useTranslations as s}from"next-intl";import{usePathname as c,useRouter as l,useSearchParams as u}from"next/navigation";const d=[];function f(f){let p=s(`components.biz.business.textRecommend`),{title:m,items:h=d,onItemClick:g,mode:_=`renderer`}=f,v=_===`editor`,y=l(),b=c(),x=u(),[S,C]=i(0),w=Math.ceil(h.length/6),T=r(()=>{if(h.length<=6)return h;let e=S%w*6;return h.slice(e,e+6)},[h,S,w]);if(h.length===0)return null;let E=e=>{e.stopPropagation(),C(e=>e+1)},D=e=>{if(g)g(e);else{let t=new URLSearchParams(x.toString());t.set(`q`,e);let n=b.includes(`/search-result`)?b:`/search-result`;y.push(`${n}?${t.toString()}`)}};return o(e,{className:v?`bg-bg1 p-3 flex flex-col gap-3 w-full pointer-events-none`:`bg-bg1 p-3 flex flex-col gap-3 w-full`,children:[o(e,{className:`flex items-center justify-between w-full`,children:[a(t,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:m||p(`defaultTitle`)}),o(e,{className:`flex items-center gap-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:E,children:[a(t,{className:`text-[14px] text-text3 leading-[22px]`,children:p(`refreshBatch`)}),a(n,{className:`w-3 h-3 text-text3`})]})]}),a(e,{className:`grid grid-cols-2 gap-x-1 gap-y-1 w-full`,children:T.map((n,r)=>a(e,{className:`flex items-center h-[32px] cursor-pointer active:opacity-70 transition-opacity overflow-hidden`,onClick:()=>D(n.label),children:a(t,{className:`text-[14px] text-text1 leading-[22px] truncate w-full`,children:n.label})},`${S}-${r}`))})]})}export{f as TextRecommendClient};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../ui/box.mjs";import{Sheet as t,SheetContent as n,SheetHeader as r,SheetTitle as i}from"../../ui/sheet.mjs";import{Switch as a}from"../../ui/switch.mjs";import{Text as o}from"../../ui/text.mjs";import{useKeepAliveState as s}from"../keep-scroll-position/index.mjs";import c from"../../../assets/icons/close.mjs";import l from"../../../assets/icons/common/right_arrow.mjs";import u from"../../ui/popup.mjs";import{useCardDecoration as d}from"../../../hooks/use-card-decoration.mjs";import{useCallback as f,useEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";function S(e,t,n){return(e||[]).map((e,r)=>{let i=Number.parseInt(e?.id||``,10),a=Number.isNaN(i)?r+1:i,o=e?.id||``,s=Number.isNaN(i)&&o||n(a);return{id:e?.id||`${t}-${a}`,series_num:a,title:s}})}function C(e,t,n){return(e||[]).map((e,r)=>{let i=Number(e?.id),a=Number.isNaN(i)?r+1:i,o=n(a);return{id:e?.id||`${t}-${a}`,series_num:a,title:o}})}function w(e,t,n){return e<=0?n(`singleContent`):n(t===`1`?`completedSeriesTotal`:`ongoingSeriesTotal`,{total:e})}function T(e){return e.mode===`detail`?v(D,{information:e.information,series_num:e.series_num,onEpisodeChange:e.onEpisodeChange}):v(E,{open:e.open,variant:e.variant,title:e.title,updateStatus:e.updateStatus,summaryText:e.summaryText,seriesList:e.seriesList,activeEpisodeId:e.activeEpisodeId,showEpisodeTitle:e.showEpisodeTitle,onToggleTitle:e.onToggleTitle,onClose:e.onClose,onSelectEpisode:e.onSelectEpisode,popupBodyStyle:e.popupBodyStyle})}function E({open:s,variant:l,title:d,updateStatus:f,summaryText:_,seriesList:b,activeEpisodeId:C,showEpisodeTitle:T=!1,onToggleTitle:E,onClose:D,onSelectEpisode:O,popupBodyStyle:k}){let A=x(`components.common.seriesEpisodes`),j=!!E,M=j&&T,N=h(null),P=h(null),F=m(()=>S(b,`episode`,e=>A(`episodeLabel`,{episode:e})),[b,A]),I=m(()=>{if(F.length===0)return[];let e=[];return F.forEach((t,n)=>{let r=Math.floor(n/50);e[r]||(e[r]=[]),e[r].push(t)}),e},[F]),L=m(()=>{if(!C)return 0;let e=F.findIndex(e=>e.id===C);return e<0?0:Math.floor(e/50)},[C,F]),[R,z]=g(L);p(()=>{z(L)},[L]);let B=m(()=>typeof _==`string`&&_.trim()?_:w(F.length,f,A),[F.length,_,A,f]),V=d||A(`selectorTitle`);function H(){let e=N.current;if(e){P.current&&=(window.cancelAnimationFrame(P.current),null),e.scrollTop=0;try{e.scrollTo({top:0,left:0,behavior:`auto`})}catch{}P.current=window.requestAnimationFrame(()=>{P.current=null;let e=N.current;e&&(e.scrollTop=0)})}}p(()=>{s&&H()},[s,T,R]);function U(e){E&&(E(e),H())}function W(e){O?.(e.id,e.series_num),D()}let G=M?2:5,K=I.length>1?v(`div`,{className:`w-full flex gap-[8px] overflow-x-auto`,children:I.map((e,t)=>{if(e.length===0)return null;let n=t===R,r=t*50+1,i=Math.min((t+1)*50,F.length);return y(`div`,{className:`shrink-0 px-[16px] py-[6px] rounded-[16px] text-[14px] transition-colors cursor-pointer relative overflow-hidden ${n?`text-theme5 bg-bg2`:`text-text2 bg-bg2`}`,onClick:()=>{z(t),H()},children:[r,`-`,i,n&&v(`div`,{className:`absolute w-full h-full top-0 left-0 opacity-20 bg-theme5`})]},`series-group-${t}`)})}):null,q=y(`div`,{className:`pb-[8px] flex justify-between`,children:[v(`span`,{className:`text-[16px] text-text1`,children:B}),j&&y(`div`,{className:`flex items-center gap-[4px]`,children:[v(a,{size:`sm`,className:`data-checked:bg-theme5 h-[20px] w-[33px]`,checked:T,onCheckedChange:e=>{U(!!e)}}),v(`button`,{type:`button`,className:`text-[16px] text-text1`,onClick:()=>{U(!T)},children:A(`episodeTitle`)})]})]}),J=v(`div`,{className:`grid w-full gap-2 ${G===2?`grid-cols-2`:`grid-cols-5`}`,children:(I[R]||[]).map((e,t)=>{let n=!!(C&&e.id===C);return v(`button`,{type:`button`,"data-episode-id":e.id,onClick:()=>{W(e)},className:`flex items-center justify-center w-full h-[60px] rounded-[8px] border border-line1 border-solid text-[16px] cursor-pointer select-none transition-colors relative overflow-hidden ${n?`text-theme5 bg-bg2 font-bold`:`text-text1`} ${M?`h-[72px] px-[10px] text-[14px]`:``} ${t%G===0?``:`border-l-0`}`,children:M?v(`span`,{className:`leading-[22px] line-clamp-2`,children:e.title}):e.series_num},e.id)})});return l===`sheet`?v(t,{open:s,onOpenChange:e=>!e&&D(),children:y(n,{side:`bottom`,showCloseButton:!0,className:`min-h-[50vh] max-h-[70vh] bg-bg1 text-text1 rounded-t-2xl border-t border-white/10`,children:[v(r,{className:`pt-3 pb-0`,children:v(i,{className:`flex items-center justify-between text-lg text-text1`,children:V})}),y(`div`,{className:`px-4 pb-2 flex flex-col gap-3`,children:[K,q]}),v(`div`,{ref:N,className:`flex-1 h-0 pt-[4px] pb-[12px] overflow-y-auto px-4`,children:J})]})}):v(u,{open:s,onOpenChange:e=>{e||D()},showCloseButton:!1,className:`border-0 bg-transparent p-0`,children:y(e,{className:`w-full flex flex-col bg-bg1 px-[12px] text-text1`,style:k,children:[y(e,{className:`flex justify-between items-center h-[48px]`,children:[v(o,{className:`text-[16px] font-bold text-text1`,children:V}),v(e,{className:`pl-[12px] h-full flex items-center`,onClick:D,children:v(c,{className:`w-[14px] h-[14px] text-text1 cursor-pointer`})})]}),y(e,{className:`flex-1 h-0 w-full pb-[12px] flex flex-col gap-3`,children:[K,q,v(e,{ref:N,className:`flex-1 h-0 pt-[4px] pb-[12px] overflow-y-auto`,children:J})]})]})})}function D({information:t,series_num:n,onEpisodeChange:r}){let i=x(`components.common`),{getTitleText:a}=d(),[c,u]=s(`detail-series-popup-${t.id}`,!1),[S,w]=s(`detail-series-title-toggle-${t.id}`,!1),T=m(()=>C((t.links||[]).map(e=>({id:e.id,name:e.name})),t.id||`episode`,e=>i(`seriesEpisodes.episodeLabel`,{episode:e})),[t.id,t.links,i]),D=t.update_status===`1`?i(`seriesEpisodes.completedSeriesTotal`,{total:t.links.length}):i(`seriesEpisodes.ongoingSeriesUpdatedTo`,{total:t.links.length}),O=m(()=>t.links[n-1]?.id||t.links[0]?.id||``,[t.links,n]);function k(e){if(typeof window>`u`)return;let{search:t,hash:n}=window.location;window.history.replaceState(window.history.state,``,`${e}${t}${n}`)}let A=h(null),j=f(e=>{let t=A.current?.querySelector(`[data-content-id="${e}"]`);t&&A.current&&A.current.scrollTo({left:t.offsetLeft-10,behavior:`smooth`})},[]);p(()=>{j(O)},[O,j]);let M=f(e=>{if(e!==n){if(!t.links[e-1]){b.error(i(`seriesEpisodes.episodeNotFound`));return}try{r(e);let n=a(t)||t.name||``,i=encodeURIComponent(n);k(`/video/${t.id}/${i}/episode/${e}`)}catch(e){console.error(`切换剧集失败`,e),b.error(i(`seriesEpisodes.episodeSwitchFailed`))}}},[a,t,r,n,i]),N=f(e=>{setTimeout(()=>{j(e)},200)},[j]),[P,F]=g(`auto`),I=f(()=>{if(typeof window>`u`)return;let e=document.getElementById(`selectPopupPosition`),t=window.visualViewport?.height||window.innerHeight;if(e){let n=Math.max(0,t-e.offsetTop);n>0&&F(`${n}px`)}},[]);return p(()=>{if(!c)return;I();let e=()=>{I()};return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[I,c]),T.length===0?null:y(_,{children:[y(e,{className:`w-full mt-[16px] flex flex-col items-end mb-[4px]`,children:[y(e,{className:`w-fit flex items-center px-[12px] h-[28px]`,onClick:()=>u(!0),children:[v(o,{className:`text-[14px] text-text2 leading-[20px]`,children:D}),v(l,{className:`w-[11px] h-[18px] ml-[4px] text-text2`})]}),v(`div`,{ref:A,className:`w-full mt-[12px] overflow-x-auto px-[12px] flex gap-x-[8px] ${S?`h-[76px]`:`h-[60px]`}`,children:T.map((e,t)=>v(`div`,{"data-content-id":e.id,className:`shrink-0 h-[full] px-[18px] rounded-[6px] border border-line1 flex items-center ${S?`w-[162px]`:`w-[60px] !px-[0] justify-center`} ${e.id===O?`!border-theme5 bg-bg2`:``}`,onClick:()=>M(t+1),children:v(o,{className:`text-[16px] text-text1 leading-[22px] line-clamp-2 ${e.id===O?`font-bold !text-theme5`:``}`,children:S?e.title:e.series_num})},e.id))})]}),v(E,{title:i(`seriesEpisodes.selectorTitle`),variant:`popup`,open:c,updateStatus:t.update_status,summaryText:D,seriesList:(t.links||[]).map(e=>({id:e.id,name:e.name})),activeEpisodeId:O,showEpisodeTitle:S,onToggleTitle:e=>{w(e),N(O)},onClose:()=>u(!1),onSelectEpisode:(e,t)=>{u(!1),M(t),j(e)},popupBodyStyle:{height:P}})]})}export{T as SeriesEpisodes};
2
+ "use client";import{Box as e}from"../../ui/box.mjs";import{Sheet as t,SheetContent as n,SheetHeader as r,SheetTitle as i}from"../../ui/sheet.mjs";import{Switch as a}from"../../ui/switch.mjs";import{Text as o}from"../../ui/text.mjs";import{useKeepAliveState as s}from"../keep-scroll-position/index.mjs";import c from"../../../assets/icons/close.mjs";import l from"../../../assets/icons/common/right_arrow.mjs";import u from"../../ui/popup.mjs";import{useCardDecoration as d}from"../../../hooks/use-card-decoration.mjs";import{useCallback as f,useEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";function S(e,t,n){return(e||[]).map((e,r)=>{let i=Number.parseInt(e?.id||``,10),a=Number.isNaN(i)?r+1:i,o=e?.id||``,s=Number.isNaN(i)&&o||n(a);return{id:e?.id||`${t}-${a}`,series_num:a,title:s}})}function C(e,t,n){return(e||[]).map((e,r)=>{let i=Number(e?.id),a=Number.isNaN(i)?r+1:i,o=n(a);return{id:e?.id||`${t}-${a}`,series_num:a,title:o}})}function w(e,t,n){return e<=0?n(`singleContent`):n(t===`1`?`completedSeriesTotal`:`ongoingSeriesTotal`,{total:e})}function T(e){return e.mode===`detail`?v(D,{information:e.information,series_num:e.series_num,onEpisodeChange:e.onEpisodeChange}):v(E,{open:e.open,variant:e.variant,title:e.title,updateStatus:e.updateStatus,summaryText:e.summaryText,seriesList:e.seriesList,activeEpisodeId:e.activeEpisodeId,showEpisodeTitle:e.showEpisodeTitle,onToggleTitle:e.onToggleTitle,onClose:e.onClose,onSelectEpisode:e.onSelectEpisode,popupBodyStyle:e.popupBodyStyle})}function E({open:s,variant:l,title:d,updateStatus:f,summaryText:_,seriesList:b,activeEpisodeId:C,showEpisodeTitle:T=!1,onToggleTitle:E,onClose:D,onSelectEpisode:O,popupBodyStyle:k}){let A=x(`components.common.seriesEpisodes`),j=!!E,M=j&&T,N=h(null),P=h(null),F=m(()=>S(b,`episode`,e=>A(`episodeLabel`,{episode:e})),[b,A]),I=m(()=>{if(F.length===0)return[];let e=[];return F.forEach((t,n)=>{let r=Math.floor(n/50);e[r]||(e[r]=[]),e[r].push(t)}),e},[F]),L=m(()=>{if(!C)return 0;let e=F.findIndex(e=>e.id===C);return e<0?0:Math.floor(e/50)},[C,F]),[R,z]=g(L);p(()=>{z(L)},[L]);let B=m(()=>typeof _==`string`&&_.trim()?_:w(F.length,f,A),[F.length,_,A,f]),V=d||A(`selectorTitle`);function H(){let e=N.current;if(e){P.current&&=(window.cancelAnimationFrame(P.current),null),e.scrollTop=0;try{e.scrollTo({top:0,left:0,behavior:`auto`})}catch{}P.current=window.requestAnimationFrame(()=>{P.current=null;let e=N.current;e&&(e.scrollTop=0)})}}p(()=>{s&&H()},[s,T,R]);function U(e){E&&(E(e),H())}function W(e){O?.(e.id,e.series_num),D()}let G=M?2:5,K=I.length>1?v(`div`,{className:`w-full flex gap-[8px] overflow-x-auto`,children:I.map((e,t)=>{if(e.length===0)return null;let n=t===R,r=t*50+1,i=Math.min((t+1)*50,F.length);return y(`div`,{className:`shrink-0 px-[16px] py-[6px] rounded-[16px] text-[14px] transition-colors cursor-pointer relative overflow-hidden ${n?`text-theme5 bg-bg2`:`text-text2 bg-bg2`}`,onClick:()=>{z(t),H()},children:[r,`-`,i,n&&v(`div`,{className:`absolute w-full h-full top-0 left-0 opacity-20 bg-theme5`})]},`series-group-${t}`)})}):null,q=y(`div`,{className:`pb-[8px] flex justify-between`,children:[v(`span`,{className:`text-[16px] text-text1`,children:B}),j&&y(`div`,{className:`flex items-center gap-[4px]`,children:[v(a,{size:`sm`,className:`data-checked:bg-theme5 h-[20px] w-[33px]`,checked:T,onCheckedChange:e=>{U(!!e)}}),v(`button`,{type:`button`,className:`text-[16px] text-text1`,onClick:()=>{U(!T)},children:A(`episodeTitle`)})]})]}),J=v(`div`,{className:`grid w-full gap-2 ${G===2?`grid-cols-2`:`grid-cols-5`}`,children:(I[R]||[]).map((e,t)=>{let n=!!(C&&e.id===C);return v(`button`,{type:`button`,"data-episode-id":e.id,onClick:()=>{W(e)},className:`flex items-center justify-center w-full h-[60px] rounded-[8px] border border-line1 border-solid text-[16px] cursor-pointer select-none transition-colors relative overflow-hidden ${n?`font-bold text-theme5 bg-line1`:`text-text1`} ${M?`h-[72px] px-[10px] text-[14px]`:``} ${t%G===0?``:`border-l-0`}`,children:M?v(`span`,{className:`leading-[22px] line-clamp-2`,children:e.title}):e.series_num},e.id)})});return l===`sheet`?v(t,{open:s,onOpenChange:e=>!e&&D(),children:y(n,{side:`bottom`,showCloseButton:!0,className:`min-h-[50vh] max-h-[70vh] bg-bg1 text-text1 rounded-t-2xl border-t border-white/10`,children:[v(r,{className:`pt-3 pb-0`,children:v(i,{className:`flex items-center justify-between text-lg text-text1`,children:V})}),y(`div`,{className:`px-4 pb-2 flex flex-col gap-3`,children:[K,q]}),v(`div`,{ref:N,className:`flex-1 h-0 pt-[4px] pb-[12px] overflow-y-auto px-4`,children:J})]})}):v(u,{open:s,onOpenChange:e=>{e||D()},showCloseButton:!1,className:`border-0 bg-transparent p-0`,children:y(e,{className:`w-full flex flex-col bg-bg1 px-[12px] text-text1`,style:{minHeight:`60vh`,...k},children:[y(e,{className:`flex justify-between items-center h-[48px]`,children:[v(o,{className:`text-[16px] font-bold text-text1`,children:V}),v(e,{className:`pl-[12px] h-full flex items-center`,onClick:D,children:v(c,{className:`w-[14px] h-[14px] text-text1 cursor-pointer`})})]}),y(e,{className:`flex-1 h-0 w-full pb-[12px] flex flex-col gap-3`,children:[K,q,v(e,{ref:N,className:`flex-1 h-0 pt-[4px] pb-[12px] overflow-y-auto`,children:J})]})]})})}function D({information:t,series_num:n,onEpisodeChange:r}){let i=x(`components.common`),{getTitleText:a}=d(),[c,u]=s(`detail-series-popup-${t.id}`,!1),[S,w]=s(`detail-series-title-toggle-${t.id}`,!1),T=m(()=>C((t.links||[]).map(e=>({id:e.id,name:e.name})),t.id||`episode`,e=>i(`seriesEpisodes.episodeLabel`,{episode:e})),[t.id,t.links,i]),D=t.update_status===`1`?i(`seriesEpisodes.completedSeriesTotal`,{total:t.links.length}):i(`seriesEpisodes.ongoingSeriesUpdatedTo`,{total:t.links.length}),O=m(()=>t.links[n-1]?.id||t.links[0]?.id||``,[t.links,n]);function k(e){if(typeof window>`u`)return;let{search:t,hash:n}=window.location;window.history.replaceState(window.history.state,``,`${e}${t}${n}`)}let A=h(null),j=f(e=>{let t=A.current?.querySelector(`[data-content-id="${e}"]`);t&&A.current&&A.current.scrollTo({left:t.offsetLeft-10,behavior:`smooth`})},[]);p(()=>{j(O)},[O,j]);let M=f(e=>{if(e!==n){if(!t.links[e-1]){b.error(i(`seriesEpisodes.episodeNotFound`));return}try{r(e);let n=a(t)||t.name||``,i=encodeURIComponent(n);k(`/video/${t.id}/${i}/episode/${e}`)}catch(e){console.error(`切换剧集失败`,e),b.error(i(`seriesEpisodes.episodeSwitchFailed`))}}},[a,t,r,n,i]),N=f(e=>{setTimeout(()=>{j(e)},200)},[j]),[P,F]=g(`auto`),I=f(()=>{if(typeof window>`u`)return;let e=document.getElementById(`selectPopupPosition`),t=window.visualViewport?.height||window.innerHeight;if(e){let n=Math.max(0,t-e.offsetTop);n>0&&F(`${n}px`)}},[]);return p(()=>{if(!c)return;I();let e=()=>{I()};return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[I,c]),T.length===0?null:y(_,{children:[y(e,{className:`w-full mt-[16px] flex flex-col items-end mb-[4px]`,children:[y(e,{className:`w-fit flex items-center px-[12px] h-[28px]`,onClick:()=>u(!0),children:[v(o,{className:`text-[14px] text-text2 leading-[20px]`,children:D}),v(l,{className:`w-[11px] h-[18px] ml-[4px] text-text2`})]}),v(`div`,{ref:A,className:`w-full mt-[12px] overflow-x-auto px-[12px] flex gap-x-[8px] ${S?`h-[76px]`:`h-[60px]`}`,children:T.map((e,t)=>v(`div`,{"data-content-id":e.id,className:`shrink-0 h-[full] px-[18px] rounded-[6px] border border-line1 flex items-center ${S?`w-[162px]`:`w-[60px] !px-[0] justify-center`} ${e.id===O?`!border-theme5 bg-line1`:``}`,onClick:()=>M(t+1),children:v(o,{className:`text-[16px] text-text1 leading-[22px] line-clamp-2 ${e.id===O?`font-bold !text-theme5`:``}`,children:S?e.title:e.series_num})},e.id))})]}),v(E,{title:i(`seriesEpisodes.selectorTitle`),variant:`popup`,open:c,updateStatus:t.update_status,summaryText:D,seriesList:(t.links||[]).map(e=>({id:e.id,name:e.name})),activeEpisodeId:O,showEpisodeTitle:S,onToggleTitle:e=>{w(e),N(O)},onClose:()=>u(!1),onSelectEpisode:(e,t)=>{u(!1),M(t),j(e)},popupBodyStyle:{height:P}})]})}export{T as SeriesEpisodes};
@@ -1,11 +1,11 @@
1
1
 
2
2
  import * as React from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import Image from "next/image";
4
+ import NextImage from "next/image";
5
5
 
6
6
  //#region components/ui/image.d.ts
7
7
  /** BaseImageProps 属性定义。 */
8
- type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
8
+ type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof NextImage>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
9
9
  type CommonImageProps = BaseImageProps & {
10
10
  /** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
11
11
  alt?: string; /** 图片类名。 */
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
27
27
  /** ImageProps 属性定义。 */
28
28
  type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
29
29
  /** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
30
- declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
30
+ declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
- export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
32
+ export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.63",
4
+ "version": "0.1.65",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"