@funhub/platform 0.2.24 → 0.2.25

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 (117) hide show
  1. package/dist/biz.d.mts +6 -4
  2. package/dist/biz.mjs +1 -1
  3. package/dist/cli/init/create-client.mjs +1 -1
  4. package/dist/cli/init/shared/constants.mjs +1 -1
  5. package/dist/cli/init/shared/create-project.mjs +1 -1
  6. package/dist/cli/init/shared/prompts.mjs +1 -1
  7. package/dist/cli/init/shared/template.mjs +1 -1
  8. package/dist/cli.mjs +2 -2
  9. package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -1
  10. package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
  11. package/dist/components/biz/business/advertisement/ad-match.d.mts +0 -7
  12. package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
  13. package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -2
  14. package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +0 -3
  15. package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +0 -6
  16. package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
  17. package/dist/components/biz/business/channel-list/client.mjs +1 -1
  18. package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
  19. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  20. package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
  21. package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -1
  22. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
  23. package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -1
  24. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
  25. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.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/image-text-recommend/client.mjs +1 -1
  29. package/dist/components/biz/business/index.d.mts +5 -3
  30. package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
  31. package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
  32. package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
  33. package/dist/components/biz/business/marquee/client.mjs +1 -1
  34. package/dist/components/biz/business/profile/index.d.mts +5 -3
  35. package/dist/components/biz/business/profile/profile-header/client.d.mts +3 -2
  36. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  37. package/dist/components/biz/business/profile/profile-header/index.d.mts +4 -2
  38. package/dist/components/biz/business/profile/profile-header/material.d.mts +44 -1
  39. package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
  40. package/dist/components/biz/business/profile/profile-header/my-client.d.mts +12 -0
  41. package/dist/components/biz/business/profile/profile-header/my-client.mjs +2 -0
  42. package/dist/components/biz/business/profile/profile-header/my-profile-actions.mjs +2 -0
  43. package/dist/components/biz/business/profile/profile-header/my-profile-header.mjs +2 -0
  44. package/dist/components/biz/business/profile/profile-header/schema.d.mts +13 -5
  45. package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
  46. package/dist/components/biz/business/profile/profile-header/shared.mjs +2 -0
  47. package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
  48. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
  49. package/dist/components/biz/business/profile/profile-header/visitor-client.d.mts +12 -0
  50. package/dist/components/biz/business/profile/profile-header/visitor-client.mjs +2 -0
  51. package/dist/components/biz/business/profile/profile-header/visitor-profile-actions.mjs +2 -0
  52. package/dist/components/biz/business/profile/profile-header/visitor-profile-header.mjs +2 -0
  53. package/dist/components/biz/business/profile/profile-main/client.d.mts +1 -0
  54. package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
  55. package/dist/components/biz/business/profile/profile-main/index.d.mts +2 -2
  56. package/dist/components/biz/business/profile/profile-main/material.d.mts +3 -0
  57. package/dist/components/biz/business/profile/profile-main/schema.d.mts +7 -3
  58. package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
  59. package/dist/components/biz/business/profile/profile-main/shell.d.mts +4 -0
  60. package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
  61. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +1 -1
  62. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
  63. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
  64. package/dist/components/biz/business/profile/profile-main/variants.d.mts +22 -3
  65. package/dist/components/biz/business/profile/profile-main/variants.mjs +1 -1
  66. package/dist/components/biz/business/search-history/client.mjs +1 -1
  67. package/dist/components/biz/business/search-input/client.mjs +1 -1
  68. package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
  69. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  70. package/dist/components/biz/business/text-recommend/client.mjs +1 -1
  71. package/dist/components/common/analytics-init/page-lifecycle-tracker.mjs +1 -1
  72. package/dist/components/common/background-preview-modal/background-preview-modal.mjs +1 -1
  73. package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +1 -1
  74. package/dist/components/common/popup-video/index.mjs +1 -1
  75. package/dist/components/common/series-episodes/index.mjs +1 -1
  76. package/dist/components/common/tab-bar/index.mjs +1 -1
  77. package/dist/components/common/top-nav-bar/client.mjs +1 -1
  78. package/dist/components/common/video-player/style.module.mjs +0 -4
  79. package/dist/components/common/video-player/video-blind-ad-overlay.mjs +1 -1
  80. package/dist/components/common/video-player/video-preroll-ad-overlay.mjs +1 -1
  81. package/dist/components/pages/collection-add/page.mjs +1 -1
  82. package/dist/components/pages/edit/page.mjs +1 -1
  83. package/dist/components/pages/fullscreen-feed/page.mjs +1 -1
  84. package/dist/components/pages/post-detail/post-detail-client.mjs +1 -1
  85. package/dist/components/pages/search/hot-recommend.mjs +1 -1
  86. package/dist/components/pages/search/hot-search.mjs +1 -1
  87. package/dist/components/pages/search/page-client.mjs +1 -1
  88. package/dist/components/pages/search/search-result/search-all.mjs +1 -1
  89. package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
  90. package/dist/components/pages/search/top-header.mjs +1 -1
  91. package/dist/components/pages/search-result/page-client.mjs +1 -1
  92. package/dist/components/pages/search-result/search-all.mjs +1 -1
  93. package/dist/components/pages/search-result/search-tab.mjs +1 -1
  94. package/dist/components/pages/search-result/search-user.mjs +1 -1
  95. package/dist/components/pages/search-result/top-header.mjs +1 -1
  96. package/dist/components/pages/settings/_components/settings.mjs +1 -1
  97. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  98. package/dist/components/pages/video-list/video-list-client.mjs +1 -1
  99. package/dist/components/pages/video-list/video-list-recommend-item.mjs +1 -1
  100. package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -1
  101. package/dist/components/ui/badge.d.mts +1 -1
  102. package/dist/components/ui/button.d.mts +2 -2
  103. package/dist/components/ui/image.d.mts +4 -4
  104. package/dist/hooks/use-content-operate.mjs +1 -1
  105. package/dist/materials.d.mts +2 -2
  106. package/dist/materials.mjs +1 -1
  107. package/dist/service/advertisement.d.mts +0 -4
  108. package/dist/service/advertisement.mjs +1 -1
  109. package/dist/utils/common.mjs +1 -1
  110. package/dist/utils/http.mjs +1 -1
  111. package/dist/utils/tracking.d.mts +11 -3
  112. package/dist/utils/tracking.mjs +1 -1
  113. package/dist/utils/use-compatible-router.mjs +1 -1
  114. package/dist/utils.d.mts +2 -2
  115. package/dist/utils.mjs +1 -1
  116. package/package.json +1 -1
  117. package/theme.css +0 -47
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{gContentGetRecommendVideoList as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{EmptyState as n}from"../../../ui/empty.mjs";import{InfiniteScroll as r}from"../../../ui/infinite-scroll.mjs";import{Skeleton as i}from"../../../ui/skeleton.mjs";import{usePaginated as a}from"../../../../hooks/query/use-query.mjs";import o from"../../../../assets/icons/common/right_arrow_thin.mjs";import{WaterfallRecommend as s}from"../../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{trackSearchResultClick as c}from"../../search-result/tracking.mjs";import{buildSearchVideoWaterfallColumns as l}from"./shared.mjs";import{memo as u,useCallback as d,useMemo as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useTranslations as h}from"next-intl";function g(){return m(t,{className:`flex w-full gap-[15px] px-[16px]`,children:[m(t,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[p(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`})]}),m(t,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[p(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`})]})]})}const _=u(({list:e,title:t,onMoreClick:n,sectionClassName:r=`w-full`})=>{let i=f(()=>l(e),[e]),a=!!t;return e.length===0?null:p(s,{title:t||``,columns:i,sectionClassName:r,headerClassName:a?`mb-[16px] flex items-center justify-between no-vw-x-16`:`hidden`,titleClassName:`min-w-0 flex-1 text-[18px] leading-[24px] font-medium text-white`,moreLinkClassName:`ml-[8px] flex size-[24px] shrink-0 items-center justify-center text-white/50`,moreIcon:a&&n?p(o,{className:`size-[16px]`}):void 0,onMoreClick:n,containerClassName:`relative flex w-full gap-[8px] no-vw-x-16`,onItemClick:e=>{e.selectionId&&c(null,e.selectionId,`video`)}})});_.displayName=`SearchVideoWaterfall`;const v=u(({inputVal:i,sort:o,refreshVersion:s})=>{let c=h(`components.pages.search.searchResult`),l=d(async t=>await e({data_type:2,extra_params:JSON.stringify({type:3,keywords:i,sort:o}),page:t||1,page_size:20}),[i,o]),u=a({key:f(()=>[`search-result`,`video`,i,o,s],[i,s,o]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),v=f(()=>(u.data?.pages??[]).flatMap(e=>e.list??[]),[u.data?.pages]),y=!!((u.isPending||u.isFetching)&&v.length===0),b=d(async()=>{try{await u.fetchNextPage()}catch(e){console.error(`获取视频搜索结果失败`,e)}},[u]);return y?p(g,{}):v.length===0?p(n,{type:`nodata`,text:c(`searchVideoInfo.noRelevantContent`),className:`!pt-[72px]`}):m(t,{className:`w-full pb-[24px]`,children:[p(_,{list:v}),u.hasNextPage&&p(r,{loadMore:async e=>b(),hasMore:u.hasNextPage,className:`w-full`})]})});v.displayName=`SearchVideoInfo`;export{_ as SearchVideoWaterfall,v as default};
2
+ "use client";import{gContentGetRecommendVideoList as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{EmptyState as n}from"../../../ui/empty.mjs";import{InfiniteScroll as r}from"../../../ui/infinite-scroll.mjs";import{Skeleton as i}from"../../../ui/skeleton.mjs";import{usePaginated as a}from"../../../../hooks/query/use-query.mjs";import o from"../../../../assets/icons/common/right_arrow_thin.mjs";import{WaterfallRecommend as s}from"../../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{trackSearchResultClick as c}from"../../search-result/tracking.mjs";import{buildSearchVideoWaterfallColumns as l}from"./shared.mjs";import{memo as u,useCallback as d,useMemo as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useTranslations as h}from"next-intl";function g(){return m(t,{className:`flex w-full gap-[15px] px-[16px]`,children:[m(t,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[p(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`})]}),m(t,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[p(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),p(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`})]})]})}const _=u(({list:e,title:t,onMoreClick:n,sectionClassName:r=`w-full`})=>{let i=f(()=>l(e),[e]),a=!!t;return e.length===0?null:p(s,{title:t||``,columns:i,sectionClassName:r,headerClassName:a?`mb-[16px] flex items-center justify-between px-[16px]`:`hidden`,titleClassName:`min-w-0 flex-1 text-[18px] leading-[24px] font-medium text-white`,moreLinkClassName:`ml-[8px] flex size-[24px] shrink-0 items-center justify-center text-white/50`,moreIcon:a&&n?p(o,{className:`size-[16px]`}):void 0,onMoreClick:n,containerClassName:`relative flex w-full gap-[15px] px-[16px]`,onItemClick:e=>{e.selectionId&&c(null,e.selectionId,`video`)}})});_.displayName=`SearchVideoWaterfall`;const v=u(({inputVal:i,sort:o,refreshVersion:s})=>{let c=h(`components.pages.search.searchResult`),l=d(async t=>await e({data_type:2,extra_params:JSON.stringify({type:3,keywords:i,sort:o}),page:t||1,page_size:20}),[i,o]),u=a({key:f(()=>[`search-result`,`video`,i,o,s],[i,s,o]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),v=f(()=>(u.data?.pages??[]).flatMap(e=>e.list??[]),[u.data?.pages]),y=!!((u.isPending||u.isFetching)&&v.length===0),b=d(async()=>{try{await u.fetchNextPage()}catch(e){console.error(`获取视频搜索结果失败`,e)}},[u]);return y?p(g,{}):v.length===0?p(n,{type:`nodata`,text:c(`searchVideoInfo.noRelevantContent`),className:`!pt-[72px]`}):m(t,{className:`w-full pb-[24px]`,children:[p(_,{list:v}),u.hasNextPage&&p(r,{loadMore:async e=>b(),hasMore:u.hasNextPage,className:`w-full`})]})});v.displayName=`SearchVideoInfo`;export{_ as SearchVideoWaterfall,v as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{isPCEnv as a}from"../../../utils/tools.mjs";import{LeftArrowIcon as o}from"../../common/icons/left-arrow.mjs";import s from"../../../assets/icons/search.mjs";import c from"../../../assets/icons/clear.mjs";import{useSearchParams as l}from"next/navigation";import{memo as u,useCallback as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useTranslations as m}from"next-intl";function h(){}const g=u(({setSearchInputVal:u,initInputVal:g,initInputVersion:_,addSearchHistory:v,clearCallback:y=h})=>{let b=m(`components.pages.search`),x=e(),[S,C]=i(`search-input-val`,``),w=l().get(`q`),T=e=>{C(e.target.value)},E=d(e=>{u(e),v(e)},[v,u]);r(()=>{g&&(C(g),E(g))},[E,g,_,C],`search-init-input-effect`),r(()=>{w&&(C(w),E(w))},[E,C,w],`search-url-params-effect`);function D(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){x.push(`/`);return}x.back()}return f(`div`,{className:`app-top-nav relative h-[66px] w-full`,children:f(`header`,{className:`fixed left-0 right-0 top-0 z-50`,style:{willChange:`transform`,transform:`translateZ(0)`},children:p(`div`,{className:`mx-auto flex h-[66px] items-center gap-[8px] no-vw-x-16 pb-[16px] pt-[16px]`,children:[f(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:D,children:f(o,{className:`h-[16px] w-[16px]`})}),p(`div`,{className:`flex h-[34px] min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border border-[#E62AFF]/90 bg-black/40 backdrop-blur-[2px]`,children:[p(`div`,{className:`relative flex h-full min-w-0 flex-1 items-center pl-[12px] pr-[10px]`,children:[f(`span`,{className:`pointer-events-none absolute inset-y-0 left-[12px] flex items-center justify-center`,children:f(s,{className:`h-[14px] w-[14px] text-white/60`})}),f(t,{placeholder:b(`topHeader.placeholder`),maxLength:20,value:S,className:`!h-[20px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !pl-[22px] !pr-[18px] !py-0 !text-[14px] !leading-[20px] !text-white placeholder:!text-white/90`,onChange:T,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!S.trim())return;E(S.trim())}}}),S&&f(`span`,{className:`absolute inset-y-0 right-0 flex items-center justify-center`,children:f(c,{className:`h-[15px] w-[15px] text-white/50`,onClick:()=>{a()||(C(``),u(``),y())}})})]}),f(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{S.trim()&&E(S.trim())},children:b(`topHeader.search`)})]})]})})})});g.displayName=`SearchTopHeader`;export{g as default};
2
+ "use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{isPCEnv as a}from"../../../utils/tools.mjs";import{LeftArrowIcon as o}from"../../common/icons/left-arrow.mjs";import s from"../../../assets/icons/search.mjs";import c from"../../../assets/icons/clear.mjs";import{memo as l,useCallback as u}from"react";import{useSearchParams as d}from"next/navigation";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useTranslations as m}from"next-intl";function h(){}const g=l(({setSearchInputVal:l,initInputVal:g,initInputVersion:_,addSearchHistory:v,clearCallback:y=h})=>{let b=m(`components.pages.search`),x=e(),[S,C]=i(`search-input-val`,``),w=d().get(`q`),T=e=>{C(e.target.value)},E=u(e=>{l(e),v(e)},[v,l]);r(()=>{g&&(C(g),E(g))},[E,g,_,C],`search-init-input-effect`),r(()=>{w&&(C(w),E(w))},[E,C,w],`search-url-params-effect`);function D(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){x.push(`/`);return}x.back()}return f(`div`,{className:`app-top-nav relative h-[66px] w-full`,children:f(`header`,{className:`fixed left-0 right-0 top-0 z-50`,style:{willChange:`transform`,transform:`translateZ(0)`},children:p(`div`,{className:`mx-auto flex h-[66px] items-end gap-[8px] px-[16px] pb-[16px] pt-[16px]`,children:[f(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:D,children:f(o,{className:`h-[16px] w-[16px]`})}),p(`div`,{className:`flex h-[34px] min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border border-[#E62AFF]/90 bg-black/40 backdrop-blur-[2px]`,children:[p(`div`,{className:`relative flex h-full min-w-0 flex-1 items-center pl-[12px] pr-[10px]`,children:[f(`span`,{className:`pointer-events-none absolute inset-y-0 left-[12px] flex items-center justify-center`,children:f(s,{className:`h-[14px] w-[14px] text-white/60`})}),f(t,{placeholder:b(`topHeader.placeholder`),maxLength:20,value:S,className:`!h-[20px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !pl-[22px] !pr-[18px] !py-0 !text-[14px] !leading-[20px] !text-white placeholder:!text-white/90`,onChange:T,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!S.trim())return;E(S.trim())}}}),S&&f(`span`,{className:`absolute inset-y-0 right-0 flex items-center justify-center`,children:f(c,{className:`h-[15px] w-[15px] text-white/50`,onClick:()=>{a()||(C(``),l(``),y())}})})]}),f(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{S.trim()&&E(S.trim())},children:b(`topHeader.search`)})]})]})})})});g.displayName=`SearchTopHeader`;export{g as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{useRouter as r}from"../../../utils/use-compatible-router.mjs";import{Box as i}from"../../ui/box.mjs";import{eventKey as a}from"../../../constants/event-key.mjs";import{useSearchHistory as o}from"../../../hooks/use-search-history.mjs";import{trackSearchResultPageView as s}from"./tracking.mjs";import{SEARCH_RESULT_SORT_OPTIONS as c}from"./shared.mjs";import l from"./search-user.mjs";import u from"./search-video-info.mjs";import d from"./search-all.mjs";import{SearchTab as f}from"./search-tab.mjs";import p from"./top-header.mjs";import{useSearchParams as m}from"next/navigation";import{useEffect as h,useMemo as g,useState as _}from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{useTranslations as b}from"next-intl";const x=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.user`,value:`user`}];function S(){r();let S=b(`components.pages.search.pageClient`),{userInfo:C}=n(),w=C?.user_id||`guest`,T=m().get(`q`)?.toString()||``,[E,D]=_(T),[O,k]=_(0);h(()=>{D(T),k(e=>e+1)},[T]);let[A,j]=_(x[0].value),[M,N]=_(c[0].value),[P,F]=_(0),{addHistory:I}=o({storageKey:w}),L=g(()=>x.map(e=>({value:e.value,label:S(e.labelKey)})),[S]),R=g(()=>E.trim()!==``,[E]);return h(()=>(t.on(a.EXCHANGE_SEARCH_TYPE,j),()=>{t.off(a.EXCHANGE_SEARCH_TYPE,j)}),[j]),h(()=>{E.trim()&&s(A,E)},[A,E]),y(i,{className:`flex h-dvh w-full flex-col`,children:[v(i,{className:`shrink-0`,children:v(p,{setSearchInputVal:t=>{t!==E&&(D(t),e({q:t}))},initInputVal:T,initInputVersion:O,addSearchHistory:I})}),v(i,{className:`mt-[16px] min-h-0 flex-1 overflow-hidden rounded-t-[16px]`,children:R&&y(i,{className:`flex h-full flex-col bg-[linear-gradient(180deg,rgba(6,3,21,0.9)_0%,rgba(6,3,21,0)_100%)] backdrop-blur-[2px]`,children:[v(f,{searchType:A,tabList:L,onChange:e=>{j(e)},sort:M,onSortChange:e=>{N(e),F(e=>e+1)}}),y(`div`,{className:`min-h-0 flex-1 overflow-y-auto pb-[24px]`,children:[A===`user`&&v(l,{inputVal:E,sort:M,refreshVersion:P}),A===`all`&&v(d,{searchInputVal:E,sort:M,refreshVersion:P}),A===`video`&&v(u,{inputVal:E,sort:M,refreshVersion:P})]})]})})]})}export{S as default};
2
+ "use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{useRouter as r}from"../../../utils/use-compatible-router.mjs";import{Box as i}from"../../ui/box.mjs";import{eventKey as a}from"../../../constants/event-key.mjs";import{useSearchHistory as o}from"../../../hooks/use-search-history.mjs";import{trackSearchResultPageView as s}from"./tracking.mjs";import{SEARCH_RESULT_SORT_OPTIONS as c}from"./shared.mjs";import l from"./search-user.mjs";import u from"./search-video-info.mjs";import d from"./search-all.mjs";import{SearchTab as f}from"./search-tab.mjs";import p from"./top-header.mjs";import{useEffect as m,useMemo as h,useState as g}from"react";import{useSearchParams as _}from"next/navigation";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{useTranslations as b}from"next-intl";const x=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.user`,value:`user`}];function S(){r();let S=b(`components.pages.search.pageClient`),{userInfo:C}=n(),w=C?.user_id||`guest`,T=_().get(`q`)?.toString()||``,[E,D]=g(T),[O,k]=g(0);m(()=>{D(T),k(e=>e+1)},[T]);let[A,j]=g(x[0].value),[M,N]=g(c[0].value),[P,F]=g(0),{addHistory:I}=o({storageKey:w}),L=h(()=>x.map(e=>({value:e.value,label:S(e.labelKey)})),[S]),R=h(()=>E.trim()!==``,[E]);return m(()=>(t.on(a.EXCHANGE_SEARCH_TYPE,j),()=>{t.off(a.EXCHANGE_SEARCH_TYPE,j)}),[j]),m(()=>{E.trim()&&s(A,E)},[A,E]),y(i,{className:`flex h-dvh w-full flex-col`,children:[v(i,{className:`shrink-0`,children:v(p,{setSearchInputVal:t=>{t!==E&&(D(t),e({q:t}))},initInputVal:T,initInputVersion:O,addSearchHistory:I})}),v(i,{className:`mt-[16px] min-h-0 flex-1 overflow-hidden rounded-t-[16px]`,children:R&&y(i,{className:`flex h-full flex-col bg-[linear-gradient(180deg,rgba(6,3,21,0.9)_0%,rgba(6,3,21,0)_100%)] backdrop-blur-[2px]`,children:[v(f,{searchType:A,tabList:L,onChange:e=>{j(e)},sort:M,onSortChange:e=>{N(e),F(e=>e+1)}}),y(`div`,{className:`min-h-0 flex-1 overflow-y-auto pb-[24px]`,children:[A===`user`&&v(l,{inputVal:E,sort:M,refreshVersion:P}),A===`all`&&v(d,{searchInputVal:E,sort:M,refreshVersion:P}),A===`video`&&v(u,{inputVal:E,sort:M,refreshVersion:P})]})]})})]})}export{S as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../service/generated/client.mjs";import{gContentGetRecommendVideoListKey as n}from"../../../service/generated/tanstack.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{useRequest as o}from"../../../hooks/query/use-query.mjs";import{eventKey as s}from"../../../constants/event-key.mjs";import{SearchResultEmpty as c}from"./search-empty.mjs";import{SearchUserRowCard as l}from"./search-user.mjs";import{SearchVideoWaterfall as u}from"./search-video-info.mjs";import{useEffect as d,useMemo as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";function _({className:e}){return m(`svg`,{viewBox:`0 0 12.728 7.778`,fill:`currentColor`,"aria-hidden":!0,className:e,children:m(`path`,{d:`M6.36391 4.94972L11.3137 0L12.7279 1.41421L6.36391 7.77822L0 1.41421L1.41421 0L6.36391 4.94972Z`})})}function v(e,t){return JSON.stringify({type:1,keywords:e,sort:t})}function y(){return h(r,{className:`w-full`,children:[m(r,{className:`px-[16px]`,children:h(r,{className:`overflow-hidden rounded-[8px] bg-white/8`,children:[m(r,{className:`flex flex-col gap-[16px] px-[15px] pt-[16px]`,children:Array.from({length:3}).map((e,t)=>h(r,{className:`flex h-[66px] items-center gap-[8px]`,children:[m(a,{className:`size-[56px] rounded-full bg-white/10`}),h(r,{className:`min-w-0 flex-1`,children:[m(a,{className:`h-[20px] w-[96px] rounded-[4px] bg-white/10`}),m(a,{className:`mt-[2px] h-[20px] w-full rounded-[4px] bg-white/10`}),m(a,{className:`mt-[2px] h-[20px] w-[120px] rounded-[4px] bg-white/10`})]}),m(a,{className:`h-[24px] w-[64px] rounded-full bg-white/10`})]},`search-all-user-skeleton-${t}`))}),m(r,{className:`flex h-[48px] items-center justify-center`,children:m(a,{className:`h-[20px] w-[88px] rounded-[4px] bg-white/10`})})]})}),h(r,{className:`mt-[24px] flex w-full justify-between gap-[16px] px-[16px]`,children:[h(r,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[m(a,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),m(a,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`})]}),h(r,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[m(a,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),m(a,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`})]})]})]})}function b({searchInputVal:a,sort:b,refreshVersion:x}){let S=g(`components.pages.search.searchResult`),[C,w]=p(!1),[T,E]=p({});d(()=>{w(!1),E({})},[x,a,b]);let D=f(()=>v(a,b),[a,b]),{data:O,isFetching:k,isLoading:A}=o(f(()=>[...n({data_type:2,extra_params:D,page:1,page_size:10}),x],[x,D]),async()=>(await t({data_type:2,extra_params:D,page:1,page_size:10})).data??{}),j=f(()=>O?.users?.list??[],[O]),M=f(()=>j.map(e=>{let t=String(e.user_id||``).trim();return!t||T[t]===void 0?e:{...e,is_following:T[t]}}),[T,j]),N=f(()=>O?.videos?.list??[],[O]),P=f(()=>C?M:M.slice(0,3),[C,M]),F=!C&&M.length>3,I=!!((A||k)&&M.length===0&&N.length===0),L=!k&&M.length===0&&N.length===0;return I?m(y,{}):L?m(c,{text:S(`searchAll.emptyResult`)}):h(r,{className:`w-full pb-[24px]`,children:[P.length>0&&m(r,{className:`no-vw-x-16`,children:h(r,{className:`overflow-hidden rounded-[8px] bg-white/10`,children:[m(r,{className:`flex flex-col gap-[16px] px-[15px] pt-[16px] ${F?``:`pb-[16px]`}`.trim(),children:P.map((e,t)=>m(l,{item:e,onFollowChange:t=>{let n=String(e.user_id||``).trim();n&&E(e=>({...e,[n]:t?1:0}))}},String(e.user_id??t)))}),F&&h(`button`,{type:`button`,className:`flex h-[48px] w-full items-center justify-center gap-[4px] rounded-bl-[8px] rounded-br-[8px] text-[rgba(255,255,255,0.7)]`,onClick:()=>w(!0),children:[m(i,{className:`text-[14px] leading-[20px] font-normal`,children:`展开全部`}),m(r,{className:`flex size-[24px] items-center justify-center`,children:m(_,{className:`h-[7.778px] w-[12.728px] text-[rgba(255,255,255,0.7)]`})})]})]})}),N.length>0&&m(u,{list:N,title:`相似推荐`,onMoreClick:()=>{e.emit(s.EXCHANGE_SEARCH_TYPE,`video`)},sectionClassName:P.length>0?`mt-[24px] w-full`:`w-full`})]})}export{b as default};
2
+ "use client";import e from"../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../service/generated/client.mjs";import{gContentGetRecommendVideoListKey as n}from"../../../service/generated/tanstack.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{useRequest as o}from"../../../hooks/query/use-query.mjs";import{eventKey as s}from"../../../constants/event-key.mjs";import{SearchResultEmpty as c}from"./search-empty.mjs";import{SearchUserRowCard as l}from"./search-user.mjs";import{SearchVideoWaterfall as u}from"./search-video-info.mjs";import{useEffect as d,useMemo as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";function _({className:e}){return m(`svg`,{viewBox:`0 0 12.728 7.778`,fill:`currentColor`,"aria-hidden":!0,className:e,children:m(`path`,{d:`M6.36391 4.94972L11.3137 0L12.7279 1.41421L6.36391 7.77822L0 1.41421L1.41421 0L6.36391 4.94972Z`})})}function v(e,t){return JSON.stringify({type:1,keywords:e,sort:t})}function y(){return h(r,{className:`w-full`,children:[m(r,{className:`px-[16px]`,children:h(r,{className:`overflow-hidden rounded-[8px] bg-white/8`,children:[m(r,{className:`flex flex-col gap-[16px] px-[15px] pt-[16px]`,children:Array.from({length:3}).map((e,t)=>h(r,{className:`flex h-[66px] items-center gap-[8px]`,children:[m(a,{className:`size-[56px] rounded-full bg-white/10`}),h(r,{className:`min-w-0 flex-1`,children:[m(a,{className:`h-[20px] w-[96px] rounded-[4px] bg-white/10`}),m(a,{className:`mt-[2px] h-[20px] w-full rounded-[4px] bg-white/10`}),m(a,{className:`mt-[2px] h-[20px] w-[120px] rounded-[4px] bg-white/10`})]}),m(a,{className:`h-[24px] w-[64px] rounded-full bg-white/10`})]},`search-all-user-skeleton-${t}`))}),m(r,{className:`flex h-[48px] items-center justify-center`,children:m(a,{className:`h-[20px] w-[88px] rounded-[4px] bg-white/10`})})]})}),h(r,{className:`mt-[24px] flex w-full justify-between gap-[16px] px-[16px]`,children:[h(r,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[m(a,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),m(a,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`})]}),h(r,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[m(a,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),m(a,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`})]})]})]})}function b({searchInputVal:a,sort:b,refreshVersion:x}){let S=g(`components.pages.search.searchResult`),[C,w]=p(!1),[T,E]=p({});d(()=>{w(!1),E({})},[x,a,b]);let D=f(()=>v(a,b),[a,b]),{data:O,isFetching:k,isLoading:A}=o(f(()=>[...n({data_type:2,extra_params:D,page:1,page_size:10}),x],[x,D]),async()=>(await t({data_type:2,extra_params:D,page:1,page_size:10})).data??{}),j=f(()=>O?.users?.list??[],[O]),M=f(()=>j.map(e=>{let t=String(e.user_id||``).trim();return!t||T[t]===void 0?e:{...e,is_following:T[t]}}),[T,j]),N=f(()=>O?.videos?.list??[],[O]),P=f(()=>C?M:M.slice(0,3),[C,M]),F=!C&&M.length>3,I=!!((A||k)&&M.length===0&&N.length===0),L=!k&&M.length===0&&N.length===0;return I?m(y,{}):L?m(c,{text:S(`searchAll.emptyResult`)}):h(r,{className:`w-full pb-[24px]`,children:[P.length>0&&m(r,{className:`px-[16px]`,children:h(r,{className:`overflow-hidden rounded-[8px] bg-white/10`,children:[m(r,{className:`flex flex-col gap-[16px] px-[15px] pt-[16px] ${F?``:`pb-[16px]`}`.trim(),children:P.map((e,t)=>m(l,{item:e,onFollowChange:t=>{let n=String(e.user_id||``).trim();n&&E(e=>({...e,[n]:t?1:0}))}},String(e.user_id??t)))}),F&&h(`button`,{type:`button`,className:`flex h-[48px] w-full items-center justify-center gap-[4px] rounded-bl-[8px] rounded-br-[8px] text-[rgba(255,255,255,0.7)]`,onClick:()=>w(!0),children:[m(i,{className:`text-[14px] leading-[20px] font-normal`,children:`展开全部`}),m(r,{className:`flex size-[24px] items-center justify-center`,children:m(_,{className:`h-[7.778px] w-[12.728px] text-[rgba(255,255,255,0.7)]`})})]})]})}),N.length>0&&m(u,{list:N,title:`相似推荐`,onMoreClick:()=>{e.emit(s.EXCHANGE_SEARCH_TYPE,`video`)},sectionClassName:P.length>0?`mt-[24px] w-full`:`w-full`})]})}export{b as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../ui/box.mjs";import{Popover as t,PopoverContent as n,PopoverTrigger as r}from"../../ui/popover.mjs";import{SEARCH_RESULT_SORT_OPTIONS as i}from"./shared.mjs";import{memo as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({className:e}){return c(`svg`,{viewBox:`0 0 22 15`,fill:`currentColor`,"aria-hidden":!0,className:e,children:[s(`rect`,{x:`0`,y:`0`,width:`13.5`,height:`2`,rx:`1`}),s(`rect`,{x:`0`,y:`6.5`,width:`13.5`,height:`2`,rx:`1`}),s(`rect`,{x:`0`,y:`13`,width:`13.5`,height:`2`,rx:`1`}),s(`path`,{d:`M15 1C15 0.447715 15.4477 0 16 0C16.5523 0 17 0.447715 17 1V11.2969L18.2412 9.84961C18.6006 9.43028 19.2311 9.38179 19.6504 9.74121C20.0697 10.1006 20.1182 10.7311 19.7588 11.1504L16.7588 14.6504C16.4865 14.9681 16.0458 15.0826 15.6533 14.9375C15.2608 14.7923 15 14.4185 15 14V1Z`})]})}const u=a(({searchType:a,onChange:u,tabList:d,sort:f,onSortChange:p})=>{let[m,h]=o(!1);return s(e,{as:`nav`,className:`sticky top-0 z-40 no-vw-x-16 pb-[16px] pt-[12px]`,children:c(e,{className:`flex h-[24px] items-center justify-between`,children:[s(e,{className:`flex items-center gap-[10px]`,children:d.map(e=>s(`button`,{type:`button`,className:`text-[16px] leading-[24px] transition-colors ${a===e.value?`font-medium text-white`:`font-normal text-white/80`}`,onClick:()=>{a!==e.value&&u(e.value)},children:e.label},e.value))}),c(t,{open:m,onOpenChange:h,children:[s(r,{"aria-label":`排序筛选`,className:`flex size-[24px] items-center justify-center`,children:s(l,{className:`h-[15px] w-[20px] text-white/40`})}),s(n,{side:`bottom`,align:`end`,sideOffset:8,className:`w-[132px] border border-white/10 bg-[#10071E]/95 p-[8px] backdrop-blur-[18px]`,children:s(e,{className:`flex flex-col gap-[4px]`,children:i.map(e=>s(`button`,{type:`button`,className:`rounded-[8px] px-[12px] py-[8px] text-left text-[14px] leading-[20px] ${e.value===f?`bg-white/10 text-white`:`text-white/70`}`,onClick:()=>{p(e.value),h(!1)},children:e.label},e.value))})})]})]})})});u.displayName=`SearchTab`;export{u as SearchTab};
2
+ "use client";import{Box as e}from"../../ui/box.mjs";import{Popover as t,PopoverContent as n,PopoverTrigger as r}from"../../ui/popover.mjs";import{SEARCH_RESULT_SORT_OPTIONS as i}from"./shared.mjs";import{memo as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({className:e}){return c(`svg`,{viewBox:`0 0 22 15`,fill:`currentColor`,"aria-hidden":!0,className:e,children:[s(`rect`,{x:`0`,y:`0`,width:`13.5`,height:`2`,rx:`1`}),s(`rect`,{x:`0`,y:`6.5`,width:`13.5`,height:`2`,rx:`1`}),s(`rect`,{x:`0`,y:`13`,width:`13.5`,height:`2`,rx:`1`}),s(`path`,{d:`M15 1C15 0.447715 15.4477 0 16 0C16.5523 0 17 0.447715 17 1V11.2969L18.2412 9.84961C18.6006 9.43028 19.2311 9.38179 19.6504 9.74121C20.0697 10.1006 20.1182 10.7311 19.7588 11.1504L16.7588 14.6504C16.4865 14.9681 16.0458 15.0826 15.6533 14.9375C15.2608 14.7923 15 14.4185 15 14V1Z`})]})}const u=a(({searchType:a,onChange:u,tabList:d,sort:f,onSortChange:p})=>{let[m,h]=o(!1);return s(e,{as:`nav`,className:`sticky top-0 z-40 px-[16px] pb-[16px] pt-[12px]`,children:c(e,{className:`flex h-[24px] items-center justify-between`,children:[s(e,{className:`flex items-center gap-[10px]`,children:d.map(e=>s(`button`,{type:`button`,className:`text-[16px] leading-[24px] transition-colors ${a===e.value?`font-medium text-white`:`font-normal text-white/80`}`,onClick:()=>{a!==e.value&&u(e.value)},children:e.label},e.value))}),c(t,{open:m,onOpenChange:h,children:[s(r,{"aria-label":`排序筛选`,className:`flex size-[24px] items-center justify-center`,children:s(l,{className:`h-[15px] w-[20px] text-white/40`})}),s(n,{side:`bottom`,align:`end`,sideOffset:8,className:`w-[132px] border border-white/10 bg-[#10071E]/95 p-[8px] backdrop-blur-[18px]`,children:s(e,{className:`flex flex-col gap-[4px]`,children:i.map(e=>s(`button`,{type:`button`,className:`rounded-[8px] px-[12px] py-[8px] text-left text-[14px] leading-[20px] ${e.value===f?`bg-white/10 text-white`:`text-white/70`}`,onClick:()=>{p(e.value),h(!1)},children:e.label},e.value))})})]})]})})});u.displayName=`SearchTab`;export{u as SearchTab};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendVideoList as t,pInteractionFollow as n,pInteractionUnfollow as r}from"../../../service/generated/client.mjs";import{Image as i}from"../../ui/image.mjs";import{Box as a}from"../../ui/box.mjs";import{InfiniteScroll as o}from"../../ui/infinite-scroll.mjs";import{Text as s}from"../../ui/text.mjs";import{Skeleton as c}from"../../ui/skeleton.mjs";import{usePaginated as l}from"../../../hooks/query/use-query.mjs";import{useRequireLogin as u}from"../../../hooks/use-auth.mjs";import d from"../../../assets/images/user/default_avatar.mjs";import{SearchResultEmpty as f}from"./search-empty.mjs";import{formatSearchFollowerCount as p,resolveSearchUserDescription as m,resolveSearchUserName as h}from"./shared.mjs";import{toast as g}from"sonner";import{memo as _,useCallback as v,useEffect as y,useMemo as b,useState as x}from"react";import{Check as S,Plus as C}from"lucide-react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{useTranslations as E}from"next-intl";import D from"next/link";const O=typeof d==`string`?d:d.src;function k(e,t){return String(t||e?.user_id||e?.userId||``).trim()}function A({src:e,alt:t,variant:n}){let r=n===`row`?`size-[56px] p-[4.375px]`:`size-[40px] p-[3px]`,o=n===`row`?`border-[3px]`:`border-[2px]`;return w(a,{className:`rounded-full bg-white/20 ${r}`,children:w(a,{className:`relative size-full overflow-hidden rounded-full border-solid border-white/40 ${o}`,children:w(i,{src:e||O,fill:!0,objectFit:`cover`,alt:t})})})}function j({item:t,variant:i,onFollowChange:a}){let o=u(),{userInfo:c,userId:l}=e(),[d,f]=x(!1),p=k(c,l),m=p!==``&&p===String(t.user_id||``).trim(),h=!!t.is_following,_=v(()=>{!t.user_id||d||o(()=>{let i=k(e.getState().userInfo,e.getState().userId);if(!i){g.error(`请先登录`);return}(async()=>{f(!0);try{let e=h?await r({follower_id:i,followee_id:t.user_id}):await n({follower_id:i,followee_id:t.user_id});if(e.code!==0){g.error(e.message||(h?`取消关注失败`:`关注失败`));return}a?.(!h)}catch(e){console.error(`切换关注状态失败`,e),g.error(h?`取消关注失败`:`关注失败`)}finally{f(!1)}})()})},[h,t.user_id,a,d,o]);return m?null:i===`grid`?w(`button`,{type:`button`,"aria-label":h?`取消关注`:`关注`,className:`flex size-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`bg-white/15 text-white`:`bg-black/30 text-white/75`} ${d?`opacity-50`:``}`,onClick:_,children:w(h?S:C,{className:`size-[14px]`})}):T(`button`,{type:`button`,className:`flex h-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`border border-white/25 bg-white/10 px-[8px] text-white/85`:`w-[64px] border border-white/60 bg-black/20 text-white/60`} ${d?`opacity-50`:``}`,onClick:_,children:[!h&&w(C,{className:`mr-[2px] size-[16px]`}),w(s,{className:h?`text-[12px] leading-[18px]`:`text-[14px] leading-[20px]`,children:h?`已关注`:`关注`})]})}const M=_(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e),i=p(e.follower_count);return T(a,{className:`flex w-full items-center gap-[8px]`,children:[T(D,{href:`/profile/${e.user_id||``}`,className:`flex min-w-0 flex-1 items-center gap-[8px]`,children:[w(A,{src:e.avatar,alt:n||`用户头像`,variant:`row`}),T(a,{className:`min-w-0 max-w-[194px] flex-1`,children:[w(s,{className:`block truncate text-[14px] leading-[20px] font-normal text-white`,children:n}),w(s,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:r}),T(s,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:[`粉丝:`,i]})]})]}),w(j,{item:e,variant:`row`,onFollowChange:t})]})});M.displayName=`SearchUserRowCard`;const N=_(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e);return T(a,{className:`h-[170px] rounded-[8px] bg-white/10 px-[16px] py-[16px]`,children:[T(a,{className:`flex items-start justify-between`,children:[w(D,{href:`/profile/${e.user_id||``}`,className:`flex items-center`,children:w(A,{src:e.avatar,alt:n||`用户头像`,variant:`grid`})}),w(j,{item:e,variant:`grid`,onFollowChange:t})]}),T(D,{href:`/profile/${e.user_id||``}`,className:`mt-[16px] block`,children:[w(s,{className:`block truncate text-[14px] leading-[20px] font-medium text-white`,children:n}),w(s,{className:`mt-[8px] block text-[14px] leading-[20px] text-white/60 line-clamp-4`,children:r})]})]})});N.displayName=`SearchUserGridCard`;const P={background:`linear-gradient(180deg, rgba(255,30,255,0.8) 0%, rgba(108,67,238,0) 100%), linear-gradient(145deg, rgba(255,30,172,0.6) 2.9%, rgba(108,67,238,0) 100%), linear-gradient(180deg, rgba(151,86,227,1) 0%, rgba(108,67,238,1) 100%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`,padding:`0.5px`},F=_(({item:e,isFirst:t,onFollowChange:n})=>T(a,{className:`relative flex h-[88px] items-center rounded-[8px] bg-white/10 px-[12px] py-[8px]`,children:[t&&w(a,{className:`pointer-events-none absolute inset-0 rounded-[8px]`,style:P}),w(M,{item:e,onFollowChange:n})]}));F.displayName=`SearchUserCard`;function I(){return w(a,{className:`flex flex-col gap-[12px] px-[16px]`,children:Array.from({length:6}).map((e,t)=>T(a,{className:`flex h-[88px] items-center gap-[8px] rounded-[8px] bg-white/8 px-[12px] py-[8px]`,children:[w(c,{className:`size-[56px] shrink-0 rounded-full bg-white/10`}),T(a,{className:`min-w-0 flex-1`,children:[w(c,{className:`h-[20px] w-[100px] rounded-[4px] bg-white/10`}),w(c,{className:`mt-[4px] h-[20px] w-[160px] rounded-[4px] bg-white/10`}),w(c,{className:`mt-[4px] h-[20px] w-[80px] rounded-[4px] bg-white/10`})]}),w(c,{className:`h-[24px] w-[64px] shrink-0 rounded-full bg-white/10`})]},`search-user-row-skeleton-${t}`))})}const L=_(({inputVal:e,sort:n,refreshVersion:r})=>{let i=E(`components.pages.search.searchResult`),[s,c]=x({});y(()=>{c({})},[e,r,n]);let u=v(async r=>await t({data_type:2,extra_params:JSON.stringify({type:4,keywords:e,sort:n}),page:r||1,page_size:20}),[e,n]),d=l({key:b(()=>[`search-result`,`user`,e,n,r],[e,r,n]),initialPageParam:1,async queryFn(e){return(await u(e))?.data?.users??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),p=b(()=>(d.data?.pages??[]).flatMap(e=>e.list??[]).map(e=>{let t=String(e.user_id||``).trim();return!t||s[t]===void 0?e:{...e,is_following:s[t]}}),[s,d.data?.pages]),m=!!((d.isPending||d.isFetching)&&p.length===0),h=v((e,t)=>{e&&c(n=>({...n,[e]:t?1:0}))},[]),g=v(async()=>{try{await d.fetchNextPage()}catch(e){console.error(`获取用户搜索结果失败`,e)}},[d]);return m?w(I,{}):p.length===0?w(f,{text:i(`searchUser.emptyResult`)}):T(a,{className:`w-full pb-[24px]`,children:[w(a,{className:`flex flex-col gap-[12px] no-vw-x-16`,children:p.map((e,t)=>w(F,{item:e,isFirst:t===0,onFollowChange:t=>{h(String(e.user_id||``),t)}},String(e.user_id??t)))}),d.hasNextPage&&w(o,{loadMore:async e=>g(),hasMore:d.hasNextPage,className:`w-full`})]})});L.displayName=`SearchUser`;export{M as SearchUserRowCard,L as default};
2
+ "use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendVideoList as t,pInteractionFollow as n,pInteractionUnfollow as r}from"../../../service/generated/client.mjs";import{Image as i}from"../../ui/image.mjs";import{Box as a}from"../../ui/box.mjs";import{InfiniteScroll as o}from"../../ui/infinite-scroll.mjs";import{Text as s}from"../../ui/text.mjs";import{Skeleton as c}from"../../ui/skeleton.mjs";import{usePaginated as l}from"../../../hooks/query/use-query.mjs";import{useRequireLogin as u}from"../../../hooks/use-auth.mjs";import d from"../../../assets/images/user/default_avatar.mjs";import{SearchResultEmpty as f}from"./search-empty.mjs";import{formatSearchFollowerCount as p,resolveSearchUserDescription as m,resolveSearchUserName as h}from"./shared.mjs";import{toast as g}from"sonner";import{memo as _,useCallback as v,useEffect as y,useMemo as b,useState as x}from"react";import{Check as S,Plus as C}from"lucide-react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{useTranslations as E}from"next-intl";import D from"next/link";const O=typeof d==`string`?d:d.src;function k(e,t){return String(t||e?.user_id||e?.userId||``).trim()}function A({src:e,alt:t,variant:n}){let r=n===`row`?`size-[56px] p-[4.375px]`:`size-[40px] p-[3px]`,o=n===`row`?`border-[3px]`:`border-[2px]`;return w(a,{className:`rounded-full bg-white/20 ${r}`,children:w(a,{className:`relative size-full overflow-hidden rounded-full border-solid border-white/40 ${o}`,children:w(i,{src:e||O,fill:!0,objectFit:`cover`,alt:t})})})}function j({item:t,variant:i,onFollowChange:a}){let o=u(),{userInfo:c,userId:l}=e(),[d,f]=x(!1),p=k(c,l),m=p!==``&&p===String(t.user_id||``).trim(),h=!!t.is_following,_=v(()=>{!t.user_id||d||o(()=>{let i=k(e.getState().userInfo,e.getState().userId);if(!i){g.error(`请先登录`);return}(async()=>{f(!0);try{let e=h?await r({follower_id:i,followee_id:t.user_id}):await n({follower_id:i,followee_id:t.user_id});if(e.code!==0){g.error(e.message||(h?`取消关注失败`:`关注失败`));return}a?.(!h)}catch(e){console.error(`切换关注状态失败`,e),g.error(h?`取消关注失败`:`关注失败`)}finally{f(!1)}})()})},[h,t.user_id,a,d,o]);return m?null:i===`grid`?w(`button`,{type:`button`,"aria-label":h?`取消关注`:`关注`,className:`flex size-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`bg-white/15 text-white`:`bg-black/30 text-white/75`} ${d?`opacity-50`:``}`,onClick:_,children:w(h?S:C,{className:`size-[14px]`})}):T(`button`,{type:`button`,className:`flex h-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`border border-white/25 bg-white/10 px-[8px] text-white/85`:`w-[64px] border border-white/60 bg-black/20 text-white/60`} ${d?`opacity-50`:``}`,onClick:_,children:[!h&&w(C,{className:`mr-[2px] size-[16px]`}),w(s,{className:h?`text-[12px] leading-[18px]`:`text-[14px] leading-[20px]`,children:h?`已关注`:`关注`})]})}const M=_(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e),i=p(e.follower_count);return T(a,{className:`flex w-full items-center gap-[8px]`,children:[T(D,{href:`/profile/${e.user_id||``}`,className:`flex min-w-0 flex-1 items-center gap-[8px]`,children:[w(A,{src:e.avatar,alt:n||`用户头像`,variant:`row`}),T(a,{className:`min-w-0 max-w-[194px] flex-1`,children:[w(s,{className:`block truncate text-[14px] leading-[20px] font-normal text-white`,children:n}),w(s,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:r}),T(s,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:[`粉丝:`,i]})]})]}),w(j,{item:e,variant:`row`,onFollowChange:t})]})});M.displayName=`SearchUserRowCard`;const N=_(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e);return T(a,{className:`h-[170px] rounded-[8px] bg-white/10 px-[16px] py-[16px]`,children:[T(a,{className:`flex items-start justify-between`,children:[w(D,{href:`/profile/${e.user_id||``}`,className:`flex items-center`,children:w(A,{src:e.avatar,alt:n||`用户头像`,variant:`grid`})}),w(j,{item:e,variant:`grid`,onFollowChange:t})]}),T(D,{href:`/profile/${e.user_id||``}`,className:`mt-[16px] block`,children:[w(s,{className:`block truncate text-[14px] leading-[20px] font-medium text-white`,children:n}),w(s,{className:`mt-[8px] block text-[14px] leading-[20px] text-white/60 line-clamp-4`,children:r})]})]})});N.displayName=`SearchUserGridCard`;const P={background:`linear-gradient(180deg, rgba(255,30,255,0.8) 0%, rgba(108,67,238,0) 100%), linear-gradient(145deg, rgba(255,30,172,0.6) 2.9%, rgba(108,67,238,0) 100%), linear-gradient(180deg, rgba(151,86,227,1) 0%, rgba(108,67,238,1) 100%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`,padding:`0.5px`},F=_(({item:e,isFirst:t,onFollowChange:n})=>T(a,{className:`relative flex h-[88px] items-center rounded-[8px] bg-white/10 px-[12px] py-[8px]`,children:[t&&w(a,{className:`pointer-events-none absolute inset-0 rounded-[8px]`,style:P}),w(M,{item:e,onFollowChange:n})]}));F.displayName=`SearchUserCard`;function I(){return w(a,{className:`flex flex-col gap-[12px] px-[16px]`,children:Array.from({length:6}).map((e,t)=>T(a,{className:`flex h-[88px] items-center gap-[8px] rounded-[8px] bg-white/8 px-[12px] py-[8px]`,children:[w(c,{className:`size-[56px] shrink-0 rounded-full bg-white/10`}),T(a,{className:`min-w-0 flex-1`,children:[w(c,{className:`h-[20px] w-[100px] rounded-[4px] bg-white/10`}),w(c,{className:`mt-[4px] h-[20px] w-[160px] rounded-[4px] bg-white/10`}),w(c,{className:`mt-[4px] h-[20px] w-[80px] rounded-[4px] bg-white/10`})]}),w(c,{className:`h-[24px] w-[64px] shrink-0 rounded-full bg-white/10`})]},`search-user-row-skeleton-${t}`))})}const L=_(({inputVal:e,sort:n,refreshVersion:r})=>{let i=E(`components.pages.search.searchResult`),[s,c]=x({});y(()=>{c({})},[e,r,n]);let u=v(async r=>await t({data_type:2,extra_params:JSON.stringify({type:4,keywords:e,sort:n}),page:r||1,page_size:20}),[e,n]),d=l({key:b(()=>[`search-result`,`user`,e,n,r],[e,r,n]),initialPageParam:1,async queryFn(e){return(await u(e))?.data?.users??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),p=b(()=>(d.data?.pages??[]).flatMap(e=>e.list??[]).map(e=>{let t=String(e.user_id||``).trim();return!t||s[t]===void 0?e:{...e,is_following:s[t]}}),[s,d.data?.pages]),m=!!((d.isPending||d.isFetching)&&p.length===0),h=v((e,t)=>{e&&c(n=>({...n,[e]:t?1:0}))},[]),g=v(async()=>{try{await d.fetchNextPage()}catch(e){console.error(`获取用户搜索结果失败`,e)}},[d]);return m?w(I,{}):p.length===0?w(f,{text:i(`searchUser.emptyResult`)}):T(a,{className:`w-full pb-[24px]`,children:[w(a,{className:`flex flex-col gap-[12px] px-[16px]`,children:p.map((e,t)=>w(F,{item:e,isFirst:t===0,onFollowChange:t=>{h(String(e.user_id||``),t)}},String(e.user_id??t)))}),d.hasNextPage&&w(o,{loadMore:async e=>g(),hasMore:d.hasNextPage,className:`w-full`})]})});L.displayName=`SearchUser`;export{M as SearchUserRowCard,L as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{LeftArrowIcon as a}from"../../common/icons/left-arrow.mjs";import{useSearchParams as o}from"next/navigation";import{memo as s,useCallback as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";const f=s(({setSearchInputVal:s,initInputVal:f,initInputVersion:p,addSearchHistory:m})=>{let h=d(`components.pages.search`),g=e(),[_,v]=i(`search-input-val`,``),y=o().get(`q`),b=e=>{v(e.target.value)},x=c(e=>{s(e),m(e)},[m,s]);r(()=>{f&&(v(f),x(f))},[x,f,p,v],`search-init-input-effect`),r(()=>{y&&(v(y),x(y))},[x,v,y],`search-url-params-effect`);function S(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){g.push(`/`);return}g.back()}return l(`div`,{className:`app-top-nav w-full`,children:u(`header`,{className:`flex h-[60px] items-center gap-[8px] no-vw-x-16 pb-[10px] pt-[16px]`,children:[l(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:S,children:l(a,{className:`h-[16px] w-[16px]`})}),l(`div`,{className:`relative h-[34px] min-w-0 flex-1`,children:u(`div`,{className:`flex h-full min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border-[0.5px] border-[rgba(230,42,255,0.9)] bg-black/40 backdrop-blur-[2px]`,children:[l(`div`,{className:`flex h-full min-w-0 flex-1 items-center pl-[20px] pr-[8px]`,children:l(t,{placeholder:h(`topHeader.placeholder`),maxLength:20,value:_,className:`!h-[24px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !py-0 !text-[14px] !leading-[24px] !text-white/90 placeholder:!text-white/90`,onChange:b,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!_.trim())return;x(_.trim())}}})}),l(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{_.trim()&&x(_.trim())},children:h(`topHeader.search`)})]})})]})})});f.displayName=`SearchTopHeader`;export{f as default};
2
+ "use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{LeftArrowIcon as a}from"../../common/icons/left-arrow.mjs";import{memo as o,useCallback as s}from"react";import{useSearchParams as c}from"next/navigation";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";const f=o(({setSearchInputVal:o,initInputVal:f,initInputVersion:p,addSearchHistory:m})=>{let h=d(`components.pages.search`),g=e(),[_,v]=i(`search-input-val`,``),y=c().get(`q`),b=e=>{v(e.target.value)},x=s(e=>{o(e),m(e)},[m,o]);r(()=>{f&&(v(f),x(f))},[x,f,p,v],`search-init-input-effect`),r(()=>{y&&(v(y),x(y))},[x,v,y],`search-url-params-effect`);function S(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){g.push(`/`);return}g.back()}return l(`div`,{className:`app-top-nav w-full`,children:u(`header`,{className:`flex h-[60px] items-center gap-[8px] px-[16px] pb-[10px] pt-[16px]`,children:[l(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:S,children:l(a,{className:`h-[16px] w-[16px]`})}),l(`div`,{className:`relative h-[34px] min-w-0 flex-1`,children:u(`div`,{className:`flex h-full min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border-[0.5px] border-[rgba(230,42,255,0.9)] bg-black/40 backdrop-blur-[2px]`,children:[l(`div`,{className:`flex h-full min-w-0 flex-1 items-center pl-[20px] pr-[8px]`,children:l(t,{placeholder:h(`topHeader.placeholder`),maxLength:20,value:_,className:`!h-[24px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !py-0 !text-[14px] !leading-[24px] !text-white/90 placeholder:!text-white/90`,onChange:b,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!_.trim())return;x(_.trim())}}})}),l(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{_.trim()&&x(_.trim())},children:h(`topHeader.search`)})]})})]})})});f.displayName=`SearchTopHeader`;export{f as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as n}from"../../../../service/generated/client.mjs";import{Box as r}from"../../../ui/box.mjs";import{useLoginModalStore as i}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as a,useRequest as o}from"../../../../hooks/query/use-query.mjs";import{locales as s}from"../../../../i18n.mjs";import{DeleteConfirmDialog as c}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{HeaderNav as l}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as u}from"./reset-password-drawer.mjs";import{useRouter as d}from"next/navigation";import{useEffect as f,useRef as p,useState as m}from"react";import{ChevronRight as h}from"lucide-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{useLocale as v,useTranslations as y}from"next-intl";import b from"next/link";function x(e){return{collection:Number(e?.collections_open??0)>0,follower:Number(e?.follower_open??0)>0,following:Number(e?.following_open??0)>0,like:Number(e?.like_open??0)>0}}function S({className:h}={}){let S=y(`components.pages.settings.components`),w=v(),{open:T}=i(),E=t(e=>e.isLogin),D=t(e=>e.token),O=t(e=>e.logout),k=t(e=>e.userId),A=(E||!!D)&&!!k,j=x(),[M,N]=m(j),P=p(j),[F,I]=m(!1),[L,R]=m(!1);a();let z=[`user-privacy-settings`,k],B=w===`zh-CN`?`en`:`zh-CN`;s.find(e=>e.code===B)?.name;let{data:V}=o(z,()=>n({user_id:k}),{enabled:!!k}),H=V?.data;f(()=>{if(!H)return;let e=x(H);N(e),P.current=e},[H]),f(()=>{P.current=M},[M]);let U=a(),W=d();function G(){U([`user-profile`,`mine`]),O(),W.push(`/user/mine`)}function K(e){R(e)}function q(){R(!0)}function J(){R(!1)}function Y(){G()}function X(e){I(e)}function Z(){if(!A){T();return}I(!0)}function Q(e){A||(e.preventDefault(),e.stopPropagation(),T())}return _(r,{className:e(`min-h-dvh bg-[var(--color-surface-panel-dark)]`,h),children:[g(l,{className:`!bg-[var(--color-surface-panel-dark)] !border-transparent`,title:S(`settings.title`)}),g(u,{open:F,onOpenChange:X}),_(r,{className:`mx-4 mt-4 flex flex-col`,children:[g(`button`,{type:`button`,className:`block w-full text-left`,onClick:Z,children:g(C,{title:S(`settings.resetPasswordTitle`)})}),g(b,{href:`/feedback`,onClick:Q,className:`block`,children:g(C,{title:S(`settings.feedbackTitle`)})})]}),F||!A?null:g(r,{className:`fixed inset-x-0 bottom-0 z-40 flex flex-col pb-[env(safe-area-inset-bottom)]`,children:g(`div`,{className:`flex flex-col items-center px-4 py-2`,style:{background:`var(--color-overlay-panel-fade-start90)`,backdropFilter:`blur(var(--effect-backdrop-blur-detail-hero))`},children:g(`button`,{type:`button`,className:`flex h-12 w-full items-center justify-center rounded-[8px] text-base text-[var(--color-text-primary)] transition-opacity active:opacity-80`,style:{background:`var(--color-surface-white10)`},onClick:q,children:S(`settings.button`)})})}),g(c,{open:L,onOpenChange:K,onCancel:J,onConfirm:Y,title:``,description:S(`settings.logoutConfirmMessage`),confirmText:S(`settings.confirm`),cancelText:S(`settings.cancel`)})]})}function C({title:e}){return _(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[g(`span`,{className:`text-base text-[var(--color-text-primary)]`,children:e}),g(h,{className:`size-6 shrink-0 opacity-50 text-[var(--color-text-primary)]`})]})}export{S as Settings};
2
+ "use client";import{cn as e}from"../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as n}from"../../../../service/generated/client.mjs";import{Box as r}from"../../../ui/box.mjs";import{useLoginModalStore as i}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as a,useRequest as o}from"../../../../hooks/query/use-query.mjs";import{locales as s}from"../../../../i18n.mjs";import{DeleteConfirmDialog as c}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{HeaderNav as l}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as u}from"./reset-password-drawer.mjs";import{useEffect as d,useRef as f,useState as p}from"react";import{useRouter as m}from"next/navigation";import{ChevronRight as h}from"lucide-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{useLocale as v,useTranslations as y}from"next-intl";import b from"next/link";function x(e){return{collection:Number(e?.collections_open??0)>0,follower:Number(e?.follower_open??0)>0,following:Number(e?.following_open??0)>0,like:Number(e?.like_open??0)>0}}function S({className:h}={}){let S=y(`components.pages.settings.components`),w=v(),{open:T}=i(),E=t(e=>e.isLogin),D=t(e=>e.token),O=t(e=>e.logout),k=t(e=>e.userId),A=(E||!!D)&&!!k,j=x(),[M,N]=p(j),P=f(j),[F,I]=p(!1),[L,R]=p(!1);a();let z=[`user-privacy-settings`,k],B=w===`zh-CN`?`en`:`zh-CN`;s.find(e=>e.code===B)?.name;let{data:V}=o(z,()=>n({user_id:k}),{enabled:!!k}),H=V?.data;d(()=>{if(!H)return;let e=x(H);N(e),P.current=e},[H]),d(()=>{P.current=M},[M]);let U=a(),W=m();function G(){U([`user-profile`,`mine`]),O(),W.push(`/user/mine`)}function K(e){R(e)}function q(){R(!0)}function J(){R(!1)}function Y(){G()}function X(e){I(e)}function Z(){if(!A){T();return}I(!0)}function Q(e){A||(e.preventDefault(),e.stopPropagation(),T())}return _(r,{className:e(`min-h-dvh bg-[var(--color-surface-panel-dark)]`,h),children:[g(l,{className:`!bg-[var(--color-surface-panel-dark)] !border-transparent`,title:S(`settings.title`)}),g(u,{open:F,onOpenChange:X}),_(r,{className:`mx-4 mt-4 flex flex-col`,children:[g(`button`,{type:`button`,className:`block w-full text-left`,onClick:Z,children:g(C,{title:S(`settings.resetPasswordTitle`)})}),g(b,{href:`/feedback`,onClick:Q,className:`block`,children:g(C,{title:S(`settings.feedbackTitle`)})})]}),F||!A?null:g(r,{className:`fixed inset-x-0 bottom-0 z-40 flex flex-col pb-[env(safe-area-inset-bottom)]`,children:g(`div`,{className:`flex flex-col items-center px-4 py-2`,style:{background:`var(--color-overlay-panel-fade-start90)`,backdropFilter:`blur(var(--effect-backdrop-blur-detail-hero))`},children:g(`button`,{type:`button`,className:`flex h-12 w-full items-center justify-center rounded-[8px] text-base text-[var(--color-text-primary)] transition-opacity active:opacity-80`,style:{background:`var(--color-surface-white10)`},onClick:q,children:S(`settings.button`)})})}),g(c,{open:L,onOpenChange:K,onCancel:J,onConfirm:Y,title:``,description:S(`settings.logoutConfirmMessage`),confirmText:S(`settings.confirm`),cancelText:S(`settings.cancel`)})]})}function C({title:e}){return _(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[g(`span`,{className:`text-base text-[var(--color-text-primary)]`,children:e}),g(h,{className:`size-6 shrink-0 opacity-50 text-[var(--color-text-primary)]`})]})}export{S as Settings};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import{gContentGetAppChannels as n,gContentGetVideoDetail as r}from"../../../service/generated/client.mjs";import{trackAppPageView as i}from"../../../utils/tracking.mjs";import{useRouter as a}from"../../../utils/use-compatible-router.mjs";import{EmptyState as o}from"../../ui/empty.mjs";import{buildVideoPlayerSrc as s}from"../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as ee}from"../../../utils/login-modal-bridge.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{queryKey as l}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import p from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{VideoDetailMaterialRuntimeProvider as te}from"../../biz/business/detail/shared/runtime-context-provider.mjs";import{resolveMaterialProps as ne,videoDetailMaterials as m}from"../../biz/business/detail/shared/registry.mjs";import{DetailHero as re}from"../../biz/business/detail/shared/video-hero.mjs";import{useParams as ie,useSearchParams as ae}from"next/navigation";import{Fragment as h,useCallback as g,useEffect as _,useMemo as v,useRef as oe}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useTranslations as se}from"next-intl";const S=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-info-title-tags-episodes`,componentName:`video-detail-info-title-tags-episodes`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{title:`猜你喜欢`,rows:2,columns:3,smartTagEnabled:!1,smartTagIds:[`腐剧`],showPlayCount:!0,playCountDelta:0,showEpisode:!0,enableInfinite:!1,items:[{contentId:`d6a35ba3279e6f0d`,contentName:`贺总的私宠罪妻`,titleMode:`custom`,title:`贺总的私宠罪妻`,description:`简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百`,coverMode:`upload`,coverUrl:`/truss/20260227/69a136457d10f.jpgxxx`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`b0f42fed731239a7`,contentName:`少年江湖物语`,titleMode:`custom`,title:`少年江湖物语`,description:`网剧《少年江湖物语》讲述了一个江湖中邪不压正,青春正好,有情有爱的温暖故事。剧中有魔教教主,有天下第一剑客,有身世成谜的江湖大夫,有忠心耿耿的小丫鬟,更有艳压秦淮的当红花魁,众多看似完全没有交集的人物纷纷亮相登场,搅乱江湖一池春水。`,coverMode:`content`,coverUrl:`/md-204/uploads/default/other/2024-08-26/14664d2c31e61c201a29cd4abba267c5.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c2304e94ec0ba208`,contentName:`王的男人`,titleMode:`custom`,title:`王的男人`,description:`朝鲜第十代王燕山王君时期,艺人长生(甘宇成饰)和孔吉(李俊基饰)因为不肯加入当地的艺人团,来到京城汉阳谋生。此时暴君燕山君(郑镇荣饰)沉迷于宠妾张绿水(姜成妍饰),朝纲混乱,民不聊生。长生与孔吉二人在街头开始表演讽刺君主的喜剧,大受欢迎,却遭逮捕。后要求到王面前表演,求得一笑。结果,多亏孔吉的急中生智,燕山君才笑了出来。两人随即被留在宫中取乐,孔吉更是因为美色令王倍加宠爱。他们不停表演,大臣们却各自心怀鬼胎,导致了杀戮局面。最终,君王和艺人的命运又将如何呢?`,coverMode:`content`,coverUrl:`/md-204/resource/8c/8cb28f46831558fbeb2f34b2076c3b4e.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c7ffc6a558ae8683`,contentName:`怒`,titleMode:`custom`,title:`怒`,description:`炎炎夏日,东京八王子郊外社区,一对夫妇惨遭杀害。事后凶手用血在墙上写下大大的“怒”字,随后逃亡,销声匿迹长达一年之久。而在此期间,三个身份不明的男子和身边的人相遇了。曾自甘堕落的爱子(宫崎葵饰)被父亲(渡边谦饰)领回海滨小镇,邂逅了不善言辞的哲也(松山研一饰)。在东京工作的同性恋优马(妻夫木聪饰)将柔情似水的直人(绫野刚饰)带回了家,他不相信对方,却又尝试去相信。随母亲搬到冲绳的小泉(广濑铃饰)跟着同学辰哉(佐久本宝饰)登上一座荒岛,在废墟中遇到了背包客田中(森山未来饰),他们短暂成为朋友,而可怕的命运突然降临泉的头上。不久之后,通缉令遍布全国,三个男子的真实身份引人生疑……本片根据吉田修一的同名原作改编。`,coverMode:`content`,coverUrl:`/md-204/resource/24/24ef267eef2c35b5e4cf12dac8b55c14.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`98217427ed96ec51`,contentName:`熔炉`,titleMode:`custom`,title:`熔炉`,description:`来自首尔的哑语美术老师仁浩(孔宥饰)来到雾津,应聘慈爱聋哑人学校。天降大雾,他意外撞车,维修时邂逅了人权组织成员柔珍(郑有美饰)。仁浩妻子早亡,8岁女儿天生哮喘由祖母照看,所以他不辞辛苦谋职养家。然而,双胞胎的校长与教导主任竟逼仁浩索贿5千万韩元。同时,仁浩逐渐发现学校笼罩着一种紧张压抑的气氛,令人窒息。有三个孩子引人关注:聪颖的金妍斗(金贤秀饰)、贪吃的陈宥利(郑仁絮饰)和弟弟自杀身亡的全民秀(白承焕饰),民秀总是满脸淤青。下课后,仁浩还听到女厕所中有呼喊与哭泣,在门卫的阻拦下他未深究。之后。他意外目睹了校长行贿警察,教导员毒打民秀,宿导溺罚妍斗的行径。一个惊天的隐秘被慢慢揭开,真相令韩国震惊……本片取材于2005年光州一所聋哑障碍人学校的真实事件,改编自韩国作家孔枝泳的同名小说。`,coverMode:`content`,coverUrl:`/md-204/resource/b4/b410ccdcd86936455b9460a9152aaa47.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`caa2b4eb4eb40de0`,contentName:`再次来寻我`,titleMode:`custom`,title:`再次来寻我`,description:`在宇回到曾经与初恋志勋相遇的303号房,这里即将被拆迁,他在房间里回忆和志勋的点点滴滴,突然被书桌上的电话所吸引,一拿起话筒听到的竟是志勋的声音!在房子主人的同意下,在宇带着电话离开了303室,在回家的途中他发现自己像走在一个陌生的地方,而对面走来的竟是已消失已久的志勋…`,coverMode:`content`,coverUrl:`/md-204/resource/2b/2b43375f2248c1a012847d4507fd21a3.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0}]}}];function C(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function w({detailId:f,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=se(`components.pages.videoDetail`),O=a(),k=ie(),ce=ae(),A=oe(!1),j=k.level,M=Array.isArray(j)?j:typeof j==`string`?[j]:[],N=M.findIndex(e=>e===`episode`),le=N>=0?M[N+1]:M[2],P=Math.max(1,Number(le)||1),[ue,F]=d(`detail-current-series-num-${f}`,P);_(()=>{F(P)},[P,F]);let I=Math.max(1,Number(ue)||1),L=Math.max(0,I-1),{data:R,isPending:z,isFetching:B,isError:V,isSuccess:H}=c(v(()=>[`video-detail`,f],[f]),async()=>f?await r({id:f}):null,{enabled:!!f}),U=v(()=>{let e=R?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[R?.data?.video]),de=w??U??null,[W,G]=d(`detail-information-${f}`,de);_(()=>{!W?.id||A.current||(A.current=!0,i({page_key:`page_video_detail`,page_name:`详情页`}))},[W?.id]);let fe=W?.links?.[L]?.id||``,K=!!f&&!W&&(z||B),q=!f||!!W||V||H,[pe,me]=d(`info-detail-active-tab-${f}`,`video`),[J,Y]=d(`info-detail-comment-add-count-${f}`,0),[X,he]=d(`info-detail-comment-total-${f}`,void 0);_(()=>{!W&&U&&G(U)},[W,U,G]);let Z=g(e=>{G(t=>t&&{...t,...e})},[G]);u(()=>{W?.id&&W.id},[W?.id],`detail-page-report-${f}`),_(()=>{!W||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:W.id||f,author_id:W.up_user,object_type:W.content_type,object_category:W.content_type,object_tags:W.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,W]),_(()=>{Y(0)},[fe,Y]),v(()=>(typeof X==`number`?X:0)+J,[J,X]);let ge=g(()=>{},[!1,me]);g(()=>{Y(e=>e+1)},[Y]),_(()=>{},[!1,ge,W?.id,ce]);let Q=g(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(typeof window>`u`)return;let n=String(W?.id||f||``).trim();if(!n)return;let r=T||window.isWebView===!0,i=`/${r?`webview`:`video`}/${n}/${encodeURIComponent(W?.name||``)}/episode/${t}`,{search:a,hash:o,pathname:c}=window.location,l=`${i}${a}${o}`,u=`${c}${a}${o}`,d=C(c,n);if(u!==l){if(r){let e=W?.links?.[Math.max(0,t-1)],r=s(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());ee({poster:String(W?.img_y||W?.img_x||W?.preview_images?.[0]||``).trim(),src:r,title:String(W?.title||W?.name||``).trim(),contentId:n,episode:t}),I!==t&&F(t);return}d&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,l),F(t)):O.replace(l,{scroll:!1});return}I!==t&&F(t)},[I,f,W?.id,W?.img_x,W?.img_y,W?.links,W?.name,W?.preview_images,W?.title,T,O,F]);_(()=>{let e=Array.isArray(W?.links)?W.links.length:0;e<=0||I<=e||Q(1)},[I,Q,W?.links]);let $=W?.status===`1`,{data:_e}=c([l.CHANNEL],()=>n()),ve=e(_e?.data),ye=v(()=>{if(E!==void 0){let e=new Map(S.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return S},[E]),be=v(()=>({information:W??void 0,currentSeriesNum:I,onEpisodeChange:Q,onUpdateInformation:Z,detailId:f,episodeIndex:L,isShow:!0,isWebView:T,isInformationLoading:K,isInformationResolved:q}),[I,f,L,Q,Z,W,K,q,T,!0]),xe=g(e=>{if(!W)return null;let t=m[e.componentName];if(!t)return null;let n=t.clientComponent,r=ne(t,e.props);return r.isValid?b(n,{...r.props}):b(`div`,{children:`组件配置错误`})},[W]);return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${T?``:`pt-11`}`,children:[!T&&b(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:b(p,{data:{list:ve}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[W&&!$&&b(o,{type:`no-content`,text:D(`videoDetailClient.videoUnavailable`)}),W&&$&&x(y,{children:[!T&&b(re,{isVideo:!0,information:W,episodeIndex:L}),b(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,x(`div`,{className:t(`w-full`,!1),children:[b(te,{value:be,children:ye.map(e=>b(h,{children:xe(e)},e.id))}),!1]}),!1]}),!W&&b(o,{type:`no-content`,text:D(`videoDetailClient.videoDeleted`)})]})})]})}export{w as default};
2
+ "use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import{gContentGetAppChannels as n,gContentGetVideoDetail as r}from"../../../service/generated/client.mjs";import{trackAppPageView as i}from"../../../utils/tracking.mjs";import{useRouter as a}from"../../../utils/use-compatible-router.mjs";import{EmptyState as o}from"../../ui/empty.mjs";import{buildVideoPlayerSrc as ee}from"../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as s}from"../../../utils/login-modal-bridge.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{queryKey as l}from"../../../constants/query-key.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import p from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{VideoDetailMaterialRuntimeProvider as te}from"../../biz/business/detail/shared/runtime-context-provider.mjs";import{resolveMaterialProps as ne,videoDetailMaterials as m}from"../../biz/business/detail/shared/registry.mjs";import{DetailHero as re}from"../../biz/business/detail/shared/video-hero.mjs";import{Fragment as ie,useCallback as h,useEffect as g,useMemo as _,useRef as v}from"react";import{useParams as ae,useSearchParams as oe}from"next/navigation";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useTranslations as se}from"next-intl";const S=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-info-title-tags-episodes`,componentName:`video-detail-info-title-tags-episodes`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{title:`猜你喜欢`,rows:2,columns:3,smartTagEnabled:!1,smartTagIds:[`腐剧`],showPlayCount:!0,playCountDelta:0,showEpisode:!0,enableInfinite:!1,items:[{contentId:`d6a35ba3279e6f0d`,contentName:`贺总的私宠罪妻`,titleMode:`custom`,title:`贺总的私宠罪妻`,description:`简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百简介多少字是不是两百`,coverMode:`upload`,coverUrl:`/truss/20260227/69a136457d10f.jpgxxx`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`b0f42fed731239a7`,contentName:`少年江湖物语`,titleMode:`custom`,title:`少年江湖物语`,description:`网剧《少年江湖物语》讲述了一个江湖中邪不压正,青春正好,有情有爱的温暖故事。剧中有魔教教主,有天下第一剑客,有身世成谜的江湖大夫,有忠心耿耿的小丫鬟,更有艳压秦淮的当红花魁,众多看似完全没有交集的人物纷纷亮相登场,搅乱江湖一池春水。`,coverMode:`content`,coverUrl:`/md-204/uploads/default/other/2024-08-26/14664d2c31e61c201a29cd4abba267c5.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c2304e94ec0ba208`,contentName:`王的男人`,titleMode:`custom`,title:`王的男人`,description:`朝鲜第十代王燕山王君时期,艺人长生(甘宇成饰)和孔吉(李俊基饰)因为不肯加入当地的艺人团,来到京城汉阳谋生。此时暴君燕山君(郑镇荣饰)沉迷于宠妾张绿水(姜成妍饰),朝纲混乱,民不聊生。长生与孔吉二人在街头开始表演讽刺君主的喜剧,大受欢迎,却遭逮捕。后要求到王面前表演,求得一笑。结果,多亏孔吉的急中生智,燕山君才笑了出来。两人随即被留在宫中取乐,孔吉更是因为美色令王倍加宠爱。他们不停表演,大臣们却各自心怀鬼胎,导致了杀戮局面。最终,君王和艺人的命运又将如何呢?`,coverMode:`content`,coverUrl:`/md-204/resource/8c/8cb28f46831558fbeb2f34b2076c3b4e.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`c7ffc6a558ae8683`,contentName:`怒`,titleMode:`custom`,title:`怒`,description:`炎炎夏日,东京八王子郊外社区,一对夫妇惨遭杀害。事后凶手用血在墙上写下大大的“怒”字,随后逃亡,销声匿迹长达一年之久。而在此期间,三个身份不明的男子和身边的人相遇了。曾自甘堕落的爱子(宫崎葵饰)被父亲(渡边谦饰)领回海滨小镇,邂逅了不善言辞的哲也(松山研一饰)。在东京工作的同性恋优马(妻夫木聪饰)将柔情似水的直人(绫野刚饰)带回了家,他不相信对方,却又尝试去相信。随母亲搬到冲绳的小泉(广濑铃饰)跟着同学辰哉(佐久本宝饰)登上一座荒岛,在废墟中遇到了背包客田中(森山未来饰),他们短暂成为朋友,而可怕的命运突然降临泉的头上。不久之后,通缉令遍布全国,三个男子的真实身份引人生疑……本片根据吉田修一的同名原作改编。`,coverMode:`content`,coverUrl:`/md-204/resource/24/24ef267eef2c35b5e4cf12dac8b55c14.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`98217427ed96ec51`,contentName:`熔炉`,titleMode:`custom`,title:`熔炉`,description:`来自首尔的哑语美术老师仁浩(孔宥饰)来到雾津,应聘慈爱聋哑人学校。天降大雾,他意外撞车,维修时邂逅了人权组织成员柔珍(郑有美饰)。仁浩妻子早亡,8岁女儿天生哮喘由祖母照看,所以他不辞辛苦谋职养家。然而,双胞胎的校长与教导主任竟逼仁浩索贿5千万韩元。同时,仁浩逐渐发现学校笼罩着一种紧张压抑的气氛,令人窒息。有三个孩子引人关注:聪颖的金妍斗(金贤秀饰)、贪吃的陈宥利(郑仁絮饰)和弟弟自杀身亡的全民秀(白承焕饰),民秀总是满脸淤青。下课后,仁浩还听到女厕所中有呼喊与哭泣,在门卫的阻拦下他未深究。之后。他意外目睹了校长行贿警察,教导员毒打民秀,宿导溺罚妍斗的行径。一个惊天的隐秘被慢慢揭开,真相令韩国震惊……本片取材于2005年光州一所聋哑障碍人学校的真实事件,改编自韩国作家孔枝泳的同名小说。`,coverMode:`content`,coverUrl:`/md-204/resource/b4/b410ccdcd86936455b9460a9152aaa47.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0},{contentId:`caa2b4eb4eb40de0`,contentName:`再次来寻我`,titleMode:`custom`,title:`再次来寻我`,description:`在宇回到曾经与初恋志勋相遇的303号房,这里即将被拆迁,他在房间里回忆和志勋的点点滴滴,突然被书桌上的电话所吸引,一拿起话筒听到的竟是志勋的声音!在房子主人的同意下,在宇带着电话离开了303室,在回家的途中他发现自己像走在一个陌生的地方,而对面走来的竟是已消失已久的志勋…`,coverMode:`content`,coverUrl:`/md-204/resource/2b/2b43375f2248c1a012847d4507fd21a3.jpg`,showPlayCount:!0,playCountDelta:0,showEpisode:!0}]}}];function C(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function w({detailId:f,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=se(`components.pages.videoDetail`),O=a(),k=ae(),ce=oe(),A=v(!1),j=k.level,M=Array.isArray(j)?j:typeof j==`string`?[j]:[],N=M.findIndex(e=>e===`episode`),le=N>=0?M[N+1]:M[2],P=Math.max(1,Number(le)||1),[ue,F]=d(`detail-current-series-num-${f}`,P);g(()=>{F(P)},[P,F]);let I=Math.max(1,Number(ue)||1),L=Math.max(0,I-1),{data:R,isPending:z,isFetching:B,isError:V,isSuccess:H}=c(_(()=>[`video-detail`,f],[f]),async()=>f?await r({id:f}):null,{enabled:!!f}),U=_(()=>{let e=R?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[R?.data?.video]),de=w??U??null,[W,G]=d(`detail-information-${f}`,de);g(()=>{!W?.id||A.current||(A.current=!0,i({page_key:`page_video_detail`,page_name:`详情页`}))},[W?.id]);let fe=W?.links?.[L]?.id||``,K=!!f&&!W&&(z||B),q=!f||!!W||V||H,[pe,me]=d(`info-detail-active-tab-${f}`,`video`),[J,Y]=d(`info-detail-comment-add-count-${f}`,0),[X,he]=d(`info-detail-comment-total-${f}`,void 0);g(()=>{!W&&U&&G(U)},[W,U,G]);let Z=h(e=>{G(t=>t&&{...t,...e})},[G]);u(()=>{W?.id&&W.id},[W?.id],`detail-page-report-${f}`),g(()=>{!W||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:W.id||f,author_id:W.up_user,object_type:W.content_type,object_category:W.content_type,object_tags:W.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,W]),g(()=>{Y(0)},[fe,Y]),_(()=>(typeof X==`number`?X:0)+J,[J,X]);let ge=h(()=>{},[!1,me]);h(()=>{Y(e=>e+1)},[Y]),g(()=>{},[!1,ge,W?.id,ce]);let Q=h(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(typeof window>`u`)return;let n=String(W?.id||f||``).trim();if(!n)return;let r=T||window.isWebView===!0,i=`/${r?`webview`:`video`}/${n}/${encodeURIComponent(W?.name||``)}/episode/${t}`,{search:a,hash:o,pathname:c}=window.location,l=`${i}${a}${o}`,u=`${c}${a}${o}`,d=C(c,n);if(u!==l){if(r){let e=W?.links?.[Math.max(0,t-1)],r=ee(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());s({poster:String(W?.img_y||W?.img_x||W?.preview_images?.[0]||``).trim(),src:r,title:String(W?.title||W?.name||``).trim(),contentId:n,episode:t}),I!==t&&F(t);return}d&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,l),F(t)):O.replace(l,{scroll:!1});return}I!==t&&F(t)},[I,f,W?.id,W?.img_x,W?.img_y,W?.links,W?.name,W?.preview_images,W?.title,T,O,F]);g(()=>{let e=Array.isArray(W?.links)?W.links.length:0;e<=0||I<=e||Q(1)},[I,Q,W?.links]);let $=W?.status===`1`,{data:_e}=c([l.CHANNEL],()=>n()),ve=e(_e?.data),ye=_(()=>{if(E!==void 0){let e=new Map(S.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return S},[E]),be=_(()=>({information:W??void 0,currentSeriesNum:I,onEpisodeChange:Q,onUpdateInformation:Z,detailId:f,episodeIndex:L,isShow:!0,isWebView:T,isInformationLoading:K,isInformationResolved:q}),[I,f,L,Q,Z,W,K,q,T,!0]),xe=h(e=>{if(!W)return null;let t=m[e.componentName];if(!t)return null;let n=t.clientComponent,r=ne(t,e.props);return r.isValid?b(n,{...r.props}):b(`div`,{children:`组件配置错误`})},[W]);return x(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${T?``:`pt-11`}`,children:[!T&&b(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:b(p,{data:{list:ve}})}),b(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:x(y,{children:[W&&!$&&b(o,{type:`no-content`,text:D(`videoDetailClient.videoUnavailable`)}),W&&$&&x(y,{children:[!T&&b(re,{isVideo:!0,information:W,episodeIndex:L}),b(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,x(`div`,{className:t(`w-full`,!1),children:[b(te,{value:be,children:ye.map(e=>b(ie,{children:xe(e)},e.id))}),!1]}),!1]}),!W&&b(o,{type:`no-content`,text:D(`videoDetailClient.videoDeleted`)})]})})]})}export{w as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../utils/cn.mjs";import{pContentGetNewstVideoList as t,pContentGetTopRatedVideoList as n}from"../../../service/generated/client.mjs";import{pContentGetNewstVideoListKey as r,pContentGetTopRatedVideoListKey as i}from"../../../service/generated/tanstack.mjs";import{useRouter as a}from"../../../utils/use-compatible-router.mjs";import{Button as o}from"../../ui/button.mjs";import{Box as s}from"../../ui/box.mjs";import{InfiniteScroll as c}from"../../ui/infinite-scroll.mjs";import{Text as l}from"../../ui/text.mjs";import{usePaginated as u}from"../../../hooks/query/use-query.mjs";import d from"../../../assets/icons/left_arrow.mjs";import{getNextVideoListPageParam as f,resolveNextCursor as p}from"./types.mjs";import{VideoListRecommendItem as m}from"./video-list-recommend-item.mjs";import{VideoListSkeleton as h}from"./video-list-skeleton.mjs";import{useEffect as g,useMemo as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";const x=[];function S({title:S=`列表页`,tags:C=x}){let w=a(),[T,E]=v(`hot`),D=_(()=>({page_size:10,tags:C.length?C:void 0}),[C]),{data:O,fetchNextPage:k,hasNextPage:A,isPending:j,isFetching:M}=u({key:_(()=>T===`hot`?i(D):r(D),[D,T]),queryFn:async e=>{let r={page_size:10,cursor:e||void 0,tags:C.length?C:void 0},i=(T===`hot`?await n(r):await t(r)).data,a=Array.isArray(i?.videos)?i.videos:[];return{list:a,nextCursor:a.length<10?``:p(i)}},getNextPageParam:f,initialPageParam:``,options:{staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1,refetchOnReconnect:!1}}),N=_(()=>O?.pages?.flatMap(e=>e.list)??[],[O?.pages]),P=(O?.pages?.length??0)>0,F=_(()=>P?A??!1:!0,[P,A]),I=N.length===0&&(!P||j||M);g(()=>{typeof window>`u`||window.scrollTo({top:0,behavior:`auto`})},[T]);function L(){w.back()}let R=_(()=>N.map(e=>{let t=e.id??e.mid??``;return y(m,{item:e,href:`/video/${t}/${e.name??``}`},t)}),[N]);return I?y(h,{}):b(s,{as:`main`,className:`min-h-[100dvh] bg-[linear-gradient(180deg,#160320_0%,#2a0a56_100%)] text-white`,children:[b(s,{className:`sticky top-0 z-20 bg-[linear-gradient(180deg,rgba(22,3,32,0.98)_0%,rgba(22,3,32,0.92)_100%)] no-vw-x-16 pb-[12px] pt-[10px] backdrop-blur-[16px]`,children:[b(s,{as:`header`,className:`flex items-center justify-between`,children:[y(o,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:L,className:`h-[24px] w-[24px] rounded-none p-0 text-white hover:bg-transparent`,children:y(d,{className:`h-[16px] w-[16px]`})}),y(l,{as:`h1`,className:`min-w-0 flex-1 truncate px-[16px] text-center text-[18px] font-medium leading-[22px] text-white`,children:S}),y(s,{className:`h-[24px] w-[24px] shrink-0 opacity-0`,"aria-hidden":!0})]}),b(s,{as:`nav`,className:`mt-[12px] flex gap-[14px]`,children:[y(o,{type:`button`,variant:`ghost`,onClick:()=>E(`hot`),className:e(`h-[28px] min-w-[64px] rounded-[100px] px-[16px] text-[14px] font-normal leading-[20px] text-white`,T===`hot`?`bg-[linear-gradient(90deg,#9756e3_0%,#6c43ee_100%)] shadow-[0_8px_20px_rgba(122,76,255,0.35)] hover:bg-transparent`:`bg-white/20 hover:bg-white/25`),children:`最热`}),y(o,{type:`button`,variant:`ghost`,onClick:()=>E(`latest`),className:e(`h-[28px] min-w-[64px] rounded-[100px] px-[16px] text-[14px] font-normal leading-[20px] text-white`,T===`latest`?`bg-[linear-gradient(90deg,#9756e3_0%,#6c43ee_100%)] shadow-[0_8px_20px_rgba(122,76,255,0.35)] hover:bg-transparent`:`bg-white/20 hover:bg-white/25`),children:`最新`})]})]}),y(c,{loadMore:()=>k().then(()=>void 0),hasMore:F,noMoreText:`没有更多了`,threshold:300,className:`no-vw-x-16 pb-[24px]`,children:y(s,{as:`section`,className:`flex flex-col gap-[16px]`,children:R})},T)]})}export{S as default};
2
+ "use client";import{cn as e}from"../../../utils/cn.mjs";import{pContentGetNewstVideoList as t,pContentGetTopRatedVideoList as n}from"../../../service/generated/client.mjs";import{pContentGetNewstVideoListKey as r,pContentGetTopRatedVideoListKey as i}from"../../../service/generated/tanstack.mjs";import{useRouter as a}from"../../../utils/use-compatible-router.mjs";import{Button as o}from"../../ui/button.mjs";import{Box as s}from"../../ui/box.mjs";import{InfiniteScroll as c}from"../../ui/infinite-scroll.mjs";import{Text as l}from"../../ui/text.mjs";import{usePaginated as u}from"../../../hooks/query/use-query.mjs";import d from"../../../assets/icons/left_arrow.mjs";import{getNextVideoListPageParam as f,resolveNextCursor as p}from"./types.mjs";import{VideoListRecommendItem as m}from"./video-list-recommend-item.mjs";import{VideoListSkeleton as h}from"./video-list-skeleton.mjs";import{useEffect as g,useMemo as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";const x=[];function S({title:S=`列表页`,tags:C=x}){let w=a(),[T,E]=v(`hot`),D=_(()=>({page_size:10,tags:C.length?C:void 0}),[C]),{data:O,fetchNextPage:k,hasNextPage:A,isPending:j,isFetching:M}=u({key:_(()=>T===`hot`?i(D):r(D),[D,T]),queryFn:async e=>{let r={page_size:10,cursor:e||void 0,tags:C.length?C:void 0},i=(T===`hot`?await n(r):await t(r)).data,a=Array.isArray(i?.videos)?i.videos:[];return{list:a,nextCursor:a.length<10?``:p(i)}},getNextPageParam:f,initialPageParam:``,options:{staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1,refetchOnReconnect:!1}}),N=_(()=>O?.pages?.flatMap(e=>e.list)??[],[O?.pages]),P=(O?.pages?.length??0)>0,F=_(()=>P?A??!1:!0,[P,A]),I=N.length===0&&(!P||j||M);g(()=>{typeof window>`u`||window.scrollTo({top:0,behavior:`auto`})},[T]);function L(){w.back()}let R=_(()=>N.map(e=>{let t=e.id??e.mid??``;return y(m,{item:e,href:`/video/${t}/${e.name??``}`},t)}),[N]);return I?y(h,{}):b(s,{as:`main`,className:`min-h-[100dvh] bg-[linear-gradient(180deg,#160320_0%,#2a0a56_100%)] text-white`,children:[b(s,{className:`sticky top-0 z-20 bg-[linear-gradient(180deg,rgba(22,3,32,0.98)_0%,rgba(22,3,32,0.92)_100%)] px-[16px] pb-[12px] pt-[10px] backdrop-blur-[16px]`,children:[b(s,{as:`header`,className:`flex items-center justify-between`,children:[y(o,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:L,className:`h-[24px] w-[24px] rounded-none p-0 text-white hover:bg-transparent`,children:y(d,{className:`h-[16px] w-[16px]`})}),y(l,{as:`h1`,className:`min-w-0 flex-1 truncate px-[16px] text-center text-[18px] font-medium leading-[22px] text-white`,children:S}),y(s,{className:`h-[24px] w-[24px] shrink-0 opacity-0`,"aria-hidden":!0})]}),b(s,{as:`nav`,className:`mt-[12px] flex gap-[14px]`,children:[y(o,{type:`button`,variant:`ghost`,onClick:()=>E(`hot`),className:e(`h-[28px] min-w-[64px] rounded-[100px] px-[16px] text-[14px] font-normal leading-[20px] text-white`,T===`hot`?`bg-[linear-gradient(90deg,#9756e3_0%,#6c43ee_100%)] shadow-[0_8px_20px_rgba(122,76,255,0.35)] hover:bg-transparent`:`bg-white/20 hover:bg-white/25`),children:`最热`}),y(o,{type:`button`,variant:`ghost`,onClick:()=>E(`latest`),className:e(`h-[28px] min-w-[64px] rounded-[100px] px-[16px] text-[14px] font-normal leading-[20px] text-white`,T===`latest`?`bg-[linear-gradient(90deg,#9756e3_0%,#6c43ee_100%)] shadow-[0_8px_20px_rgba(122,76,255,0.35)] hover:bg-transparent`:`bg-white/20 hover:bg-white/25`),children:`最新`})]})]}),y(c,{loadMore:()=>k().then(()=>void 0),hasMore:F,noMoreText:`没有更多了`,threshold:300,className:`px-[16px] pb-[24px]`,children:y(s,{as:`section`,className:`flex flex-col gap-[16px]`,children:R})},T)]})}export{S as default};
@@ -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 r from"../../ui/link.mjs";import{memo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(e){return e.img_x??e.img_y??``}function c(e){return!Number.isFinite(e)||e==null||e<=0?``:(e>10?e/10:e).toFixed(1)}function l(e){return Array.isArray(e.tags)?e.tags.map(e=>String(e?.name??``).trim()).filter(Boolean):[]}function u(e){return String(e.description??``).trim()}function d({item:i,href:d=``}){let f=i.name,p=s(i),m=c(i.score),h=l(i),g=u(i);return o(r,{href:d,className:`block cursor-pointer rounded-[16px] border-[0.5px] border-[#ff1eff] bg-[rgba(255,255,255,0.1)] p-4`,"aria-label":f,children:[a(t,{className:`relative aspect-[326/207] w-full overflow-hidden rounded-[8px] bg-[linear-gradient(180deg,#2d1147_0%,#13031f_100%)]`,children:p?a(e,{src:p,alt:f,fill:!0,className:`object-cover`}):null}),o(t,{className:`mt-2 flex flex-col gap-2`,children:[o(t,{className:`flex items-start justify-between gap-3`,children:[a(n,{as:`h3`,className:`min-w-0 flex-1 truncate text-[18px] font-medium leading-normal text-white`,children:f}),m?a(n,{className:`shrink-0 pt-[1px] font-mono text-[20px] font-bold leading-5 text-[#ffc039] tabular-nums`,children:m}):null]}),h.length>0?a(t,{className:`flex flex-wrap gap-[6px]`,children:h.map(e=>a(t,{className:`flex h-[18px] shrink-0 items-center justify-center rounded bg-[rgba(217,217,217,0.2)] px-1 py-0.5`,children:a(n,{className:`text-[12px] leading-[14px] text-white`,children:e})},e))}):null,g?a(n,{className:`line-clamp-3 text-[14px] leading-6 text-white/50`,children:g}):null]})]})}const f=i(d);f.displayName=`VideoListRecommendItem`;export{f as VideoListRecommendItem};
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 r from"../../ui/link.mjs";import{memo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(e){return e.img_x??e.img_y??``}function c(e){return!Number.isFinite(e)||e==null||e<=0?``:(e>10?e/10:e).toFixed(1)}function l(e){return Array.isArray(e.tags)?e.tags.map(e=>String(e?.name??``).trim()).filter(Boolean).slice(0,5):[]}function u({item:i,href:u=``}){let d=i.name,f=s(i),p=c(i.score),m=l(i);return o(r,{href:u,className:`block cursor-pointer rounded-[16px] border-[0.5px] border-[#ff1eff] bg-[rgba(255,255,255,0.1)] p-4`,"aria-label":d,children:[a(t,{className:`relative aspect-[326/207] w-full overflow-hidden rounded-[8px] bg-[linear-gradient(180deg,#2d1147_0%,#13031f_100%)]`,children:f?a(e,{src:f,alt:d,fill:!0,className:`object-cover`}):null}),o(t,{className:`mt-2 flex flex-col gap-2`,children:[o(t,{className:`flex items-center justify-between gap-3`,children:[a(n,{as:`h3`,className:`min-w-0 flex-1 truncate text-[14px] font-medium leading-normal text-white`,children:d}),p?a(n,{className:`shrink-0 font-mono text-[18px] font-bold leading-5 text-[#ffc039] tabular-nums`,children:p}):null]}),m.length>0?a(t,{className:`flex flex-wrap gap-[6px]`,children:m.map(e=>a(t,{className:`flex h-[18px] shrink-0 items-center justify-center rounded bg-[rgba(217,217,217,0.2)] px-1 py-0.5`,children:a(n,{className:`text-[12px] leading-[14px] text-white`,children:e})},e))}):null]})]})}const d=i(u);d.displayName=`VideoListRecommendItem`;export{d as VideoListRecommendItem};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../ui/box.mjs";import{Skeleton as t}from"../../ui/skeleton.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({count:i=3}){return r(e,{as:`main`,className:`min-h-[100dvh] bg-[linear-gradient(180deg,#160320_0%,#2a0a56_100%)] text-white`,children:[r(e,{className:`sticky top-0 z-20 bg-[linear-gradient(180deg,rgba(22,3,32,0.98)_0%,rgba(22,3,32,0.92)_100%)] no-vw-x-16 pb-[12px] pt-[10px] backdrop-blur-[16px]`,children:[r(e,{as:`header`,className:`flex items-center justify-between`,children:[n(t,{className:`h-[24px] w-[24px] rounded-sm !bg-[rgba(255,255,255,0.12)]`,"aria-label":`back-icon-skeleton`}),n(e,{className:`flex flex-1 justify-center px-[16px]`,children:n(t,{className:`h-[22px] w-[96px] !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-list-title-skeleton`})}),n(e,{className:`h-[24px] w-[24px] shrink-0`})]}),r(e,{as:`nav`,className:`mt-[12px] flex gap-[14px]`,children:[n(t,{className:`h-[28px] w-[64px] rounded-[100px] !bg-[rgba(255,255,255,0.16)]`,"aria-label":`hot-tab-skeleton`}),n(t,{className:`h-[28px] w-[64px] rounded-[100px] !bg-[rgba(255,255,255,0.12)]`,"aria-label":`latest-tab-skeleton`})]})]}),n(e,{className:`flex flex-col gap-[16px] no-vw-x-16 pb-[24px]`,children:Array.from({length:i}).map((i,a)=>r(e,{className:`rounded-[16px] border-[0.5px] border-[#ff1eff] bg-[rgba(255,255,255,0.1)] p-4`,children:[n(t,{className:`aspect-[326/207] w-full rounded-[8px] !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-cover-skeleton`}),r(e,{className:`mt-2 flex flex-col gap-2`,children:[r(e,{className:`flex items-center justify-between gap-3`,children:[n(t,{className:`h-[14px] min-h-[14px] flex-1 rounded-sm !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-title-skeleton`}),n(t,{className:`h-5 w-9 shrink-0 rounded-sm !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-score-skeleton`})]}),r(e,{className:`flex flex-wrap gap-[6px]`,children:[n(t,{className:`h-[18px] w-14 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-1`}),n(t,{className:`h-[18px] w-9 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-2`}),n(t,{className:`h-[18px] w-12 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-3`}),n(t,{className:`h-[18px] w-16 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-4`})]})]})]},`video-list-skeleton-${a}`))})]})}export{i as VideoListSkeleton};
2
+ "use client";import{Box as e}from"../../ui/box.mjs";import{Skeleton as t}from"../../ui/skeleton.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({count:i=3}){return r(e,{as:`main`,className:`min-h-[100dvh] bg-[linear-gradient(180deg,#160320_0%,#2a0a56_100%)] text-white`,children:[r(e,{className:`sticky top-0 z-20 bg-[linear-gradient(180deg,rgba(22,3,32,0.98)_0%,rgba(22,3,32,0.92)_100%)] px-[16px] pb-[12px] pt-[10px] backdrop-blur-[16px]`,children:[r(e,{as:`header`,className:`flex items-center justify-between`,children:[n(t,{className:`h-[24px] w-[24px] rounded-sm !bg-[rgba(255,255,255,0.12)]`,"aria-label":`back-icon-skeleton`}),n(e,{className:`flex flex-1 justify-center px-[16px]`,children:n(t,{className:`h-[22px] w-[96px] !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-list-title-skeleton`})}),n(e,{className:`h-[24px] w-[24px] shrink-0`})]}),r(e,{as:`nav`,className:`mt-[12px] flex gap-[14px]`,children:[n(t,{className:`h-[28px] w-[64px] rounded-[100px] !bg-[rgba(255,255,255,0.16)]`,"aria-label":`hot-tab-skeleton`}),n(t,{className:`h-[28px] w-[64px] rounded-[100px] !bg-[rgba(255,255,255,0.12)]`,"aria-label":`latest-tab-skeleton`})]})]}),n(e,{className:`flex flex-col gap-[16px] px-[16px] pb-[24px]`,children:Array.from({length:i}).map((i,a)=>r(e,{className:`rounded-[16px] border-[0.5px] border-[#ff1eff] bg-[rgba(255,255,255,0.1)] p-4`,children:[n(t,{className:`aspect-[326/207] w-full rounded-[8px] !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-cover-skeleton`}),r(e,{className:`mt-2 flex flex-col gap-2`,children:[r(e,{className:`flex items-center justify-between gap-3`,children:[n(t,{className:`h-[14px] min-h-[14px] flex-1 rounded-sm !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-title-skeleton`}),n(t,{className:`h-5 w-9 shrink-0 rounded-sm !bg-[rgba(255,255,255,0.12)]`,"aria-label":`video-score-skeleton`})]}),r(e,{className:`flex flex-wrap gap-[6px]`,children:[n(t,{className:`h-[18px] w-14 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-1`}),n(t,{className:`h-[18px] w-9 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-2`}),n(t,{className:`h-[18px] w-12 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-3`}),n(t,{className:`h-[18px] w-16 shrink-0 rounded !bg-[rgba(217,217,217,0.2)]`,"aria-label":`video-tag-skeleton-4`})]})]})]},`video-list-skeleton-${a}`))})]})}export{i as VideoListSkeleton};
@@ -6,7 +6,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
6
6
  //#region components/ui/badge.d.ts
7
7
  /** badgeVariants 工具定义。 */
8
8
  declare const badgeVariants: (props?: ({
9
- variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
9
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
10
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  /** Badge 组件。 */
12
12
  declare function Badge({
@@ -7,8 +7,8 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
7
7
  //#region components/ui/button.d.ts
8
8
  /** buttonVariants 工具定义。 */
9
9
  declare const buttonVariants: (props?: ({
10
- variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
11
- size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
+ size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
12
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  /** Button 组件属性。 */
14
14
  type ButtonProps = Button.Props & VariantProps<typeof buttonVariants> & {
@@ -1,11 +1,11 @@
1
1
 
2
2
  import * as React from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import 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 };
@@ -1,2 +1,2 @@
1
1
 
2
- import{useUserStore as e}from"../store/modules/user-store.mjs";import{gCommunityGetUserCollections as t,pCommunityAddContentToCollection as n,pInteractionBatchQueryContentInteractions as r,pInteractionCancelDislike as i,pInteractionCancelLike as a,pInteractionDislike as o,pInteractionLike as s,pInteractionRemoveCollect as c}from"../service/generated/client.mjs";import{useRouter as l}from"../utils/use-compatible-router.mjs";import{useLoginModalStore as u}from"../store/modules/login-modal-store.mjs";import d from"../components/common/collection-popup/index.mjs";import f from"../components/common/share-popup/share-popup.mjs";import{useInteractionAnimation as p}from"./use-interaction-animation.mjs";import{toast as m}from"sonner";import{usePathname as h,useSearchParams as g}from"next/navigation";import{useCallback as _,useEffect as v,useMemo as y,useState as b}from"react";function x(e){let t=Number(e);if(Number.isFinite(t))return t===0?1:t}function S(){let t=e.getState().userId||e.getState().userInfo?.userId;if(!t){let{open:e}=u.getState();return e(),null}return t}async function C(t,n){try{let i=e.getState().userId||e.getState().userInfo?.userId;if(!i)return console.warn(`用户未登录,无法查询交互状态`),null;let a=await r({app_id:0,user_id:i,content_ids:t,content_type:n});return a.code===0?a.data:(console.error(`查询交互状态失败:`,a.message),null)}catch(e){return console.error(`查询交互状态异常:`,e),null}}async function ee(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await s({user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`点赞失败`}}catch(e){return console.error(`点赞失败:`,e),{success:!1,message:`点赞失败`}}}async function w(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await a({user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`取消点赞失败`}}catch(e){return console.error(`取消点赞失败:`,e),{success:!1,message:`取消点赞失败`}}}async function T(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await o({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`点踩失败`}}catch(e){return console.error(`点踩异常:`,e),{success:!1,message:`点踩异常`}}}async function E(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await i({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`取消点踩失败`}}catch(e){return console.error(`取消点踩异常:`,e),{success:!1,message:`取消点踩异常`}}}function D({id:r,isLike:i,isDislike:a,isCollect:o,likeCnt:s,dislikeCnt:S,contentType:C,animationClasses:D,copyUrl:O,prefetchDefaultCollection:k=!1}){let{isLogin:A,userInfo:j,userId:M}=e(),N=l(),P=h(),F=g()?.toString()||``,[I,L]=b(void 0),R=D?.like||`like-shake-animation`,z=D?.dislike||`dislike-shake-animation`,B=y(()=>String(M||j?.userId||``),[M,j?.userId]);v(()=>{L(void 0)},[B]);let[V,H]=b(!1),[U,W]=b(!1);v(()=>{f.clear(),d.clear()},[P,F]),v(()=>()=>{f.clear(),d.clear()},[]);let G=_(async()=>{if(!A||!B)return null;try{let e=await t({page:1,page_size:40});if(e.code!==0)return L(null),null;let n=(e.data?.data?.collections??[]).find(e=>e?.is_default),r=(typeof n?.title==`string`?n.title.trim():``)||null;return L(r),r}catch(e){return console.error(`获取默认收藏夹失败:`,e),L(null),null}},[A,B]);v(()=>{!A||!B||k&&I===void 0&&G()},[I,G,A,k,B]);let K=_(()=>{if(!A){let{open:e}=u.getState();return e(),!1}return!0},[A]),q=p(),J=p(),Y=_(async e=>{try{return e?await ee(r,C):await w(r,C)}catch(e){return console.error(`点赞操作失败`,e),{success:!1,message:`点赞操作失败`}}},[r,C]),X=_(async()=>{if(!(!K()||V)){H(!0);try{let e=!i;e&&q.trigger(R);let t={isLike:e,likeCnt:Math.max(0,s+(e?1:-1))};e&&a&&(t.isDislike=!1,t.dislikeCnt=Math.max(0,S-1));let n=await Y(e);if(!n.success){m.error(n.message||`点赞失败`);return}return t}finally{H(!1)}}},[q,i,a,s,S,Y,K,V,R]),Z=_(async e=>{try{return e?await T(r,C):await E(r,C)}catch(e){return console.error(`点踩操作失败`,e),{success:!1,message:`点踩操作失败`}}},[r,C]),te=_(async()=>{if(!(!K()||U)){W(!0);try{let e=!a;e&&J.trigger(z);let t={isDislike:e,dislikeCnt:Math.max(0,S+(e?1:-1))};e&&i&&(t.isLike=!1,t.likeCnt=Math.max(0,s-1));let n=await Z(e);if(!n.success){m.error(n.message||`操作失败`);return}return t}finally{W(!1)}}},[J,i,a,s,S,Z,K,U,z]),Q=_(async({currentId:e,isCancel:t,collectionIds:r})=>{try{if(t){let t=String(M||j?.userId||``);if(!t)return{success:!1};let n=await c({app_id:0,user_id:t,content_id:e,content_type:C});return n.code===0?{success:!0}:{success:!1,message:n.message}}if(!String(M||j?.userId||``))return{success:!1};let i=r?.[0],a=x(C),o=await n({...i?{collection_id:i}:{},content_id:e,...a===void 0?{}:{source_type:a}});return o.code===0?{success:!0}:{success:!1,message:o.message}}catch(e){return console.error(`取消收藏操作失败`,e),{success:!1,message:e?.message}}},[M,j?.userId,C]),$=_(({currentCollect:e,onUpdate:t})=>K()?(e?(async()=>{let e=await Q({currentId:r,isCancel:!0});if(!e?.success){m.error(e?.message||`操作失败`);return}t({isCollect:!1})})():(f.clear(),d.show({toCreateCollection:()=>{N.push(`/collection/create?information_id=${r}`)},onCollect:e=>{(async()=>{let n=await Q({currentId:r,isCancel:!1,collectionIds:[e]});if(!n?.success){m.error(n?.message||`操作失败`);return}t({isCollect:!0})})()}})),!0):!1,[r,N,K,Q]),ne=_(async({currentCollect:e,onUpdate:t})=>{if(!K())return;if(e){let e=await Q({currentId:r,isCancel:!0});return e?.success?(t({isCollect:!1}),{success:!0,isCollect:!1}):{success:!1,message:e?.message}}f.clear(),d.clear();let n=await Q({currentId:r,isCancel:!1});if(!n?.success)return{success:!1,message:n?.message};let i=I===void 0?await G():I;return t({isCollect:!0}),{success:!0,isCollect:!0,collectionTitle:i||void 0}},[I,G,Q,r,K]);return{likeAnimation:q,dislikeAnimation:J,handleLikeOperate:X,handleDislikeOperate:te,handleShareOperate:_((e,t)=>{let n=typeof t==`string`?{otherId:t}:t,i=n?.otherId||r,a=n?.shareUrl;f.show({copyUrl:O,data:{id:r,isCollect:o,parentId:i},...a?{shareUrl:a}:{},onCollect:t=>{$({currentCollect:t,onUpdate:e})}})},[r,o,$,O]),handleToCollectionOperate:$,handleDefaultCollectionOperate:ne}}export{C as batchQueryContentInteractions,D as useContentOperate};
2
+ import{useUserStore as e}from"../store/modules/user-store.mjs";import{gCommunityGetUserCollections as t,pCommunityAddContentToCollection as n,pInteractionBatchQueryContentInteractions as r,pInteractionCancelDislike as i,pInteractionCancelLike as a,pInteractionDislike as o,pInteractionLike as s,pInteractionRemoveCollect as c}from"../service/generated/client.mjs";import{useRouter as l}from"../utils/use-compatible-router.mjs";import{useLoginModalStore as u}from"../store/modules/login-modal-store.mjs";import d from"../components/common/collection-popup/index.mjs";import f from"../components/common/share-popup/share-popup.mjs";import{useInteractionAnimation as p}from"./use-interaction-animation.mjs";import{toast as m}from"sonner";import{useCallback as h,useEffect as g,useMemo as _,useState as v}from"react";import{usePathname as y,useSearchParams as b}from"next/navigation";function x(e){let t=Number(e);if(Number.isFinite(t))return t===0?1:t}function S(){let t=e.getState().userId||e.getState().userInfo?.userId;if(!t){let{open:e}=u.getState();return e(),null}return t}async function C(t,n){try{let i=e.getState().userId||e.getState().userInfo?.userId;if(!i)return console.warn(`用户未登录,无法查询交互状态`),null;let a=await r({app_id:0,user_id:i,content_ids:t,content_type:n});return a.code===0?a.data:(console.error(`查询交互状态失败:`,a.message),null)}catch(e){return console.error(`查询交互状态异常:`,e),null}}async function ee(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await s({user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`点赞失败`}}catch(e){return console.error(`点赞失败:`,e),{success:!1,message:`点赞失败`}}}async function w(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await a({user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`取消点赞失败`}}catch(e){return console.error(`取消点赞失败:`,e),{success:!1,message:`取消点赞失败`}}}async function T(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await o({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`点踩失败`}}catch(e){return console.error(`点踩异常:`,e),{success:!1,message:`点踩异常`}}}async function E(e,t){try{let n=S();if(!n)return{success:!1,message:`请先登录`};let r=await i({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`取消点踩失败`}}catch(e){return console.error(`取消点踩异常:`,e),{success:!1,message:`取消点踩异常`}}}function D({id:r,isLike:i,isDislike:a,isCollect:o,likeCnt:s,dislikeCnt:S,contentType:C,animationClasses:D,copyUrl:O,prefetchDefaultCollection:k=!1}){let{isLogin:A,userInfo:j,userId:M}=e(),N=l(),P=y(),F=b()?.toString()||``,[I,L]=v(void 0),R=D?.like||`like-shake-animation`,z=D?.dislike||`dislike-shake-animation`,B=_(()=>String(M||j?.userId||``),[M,j?.userId]);g(()=>{L(void 0)},[B]);let[V,H]=v(!1),[U,W]=v(!1);g(()=>{f.clear(),d.clear()},[P,F]),g(()=>()=>{f.clear(),d.clear()},[]);let G=h(async()=>{if(!A||!B)return null;try{let e=await t({page:1,page_size:40});if(e.code!==0)return L(null),null;let n=(e.data?.data?.collections??[]).find(e=>e?.is_default),r=(typeof n?.title==`string`?n.title.trim():``)||null;return L(r),r}catch(e){return console.error(`获取默认收藏夹失败:`,e),L(null),null}},[A,B]);g(()=>{!A||!B||k&&I===void 0&&G()},[I,G,A,k,B]);let K=h(()=>{if(!A){let{open:e}=u.getState();return e(),!1}return!0},[A]),q=p(),J=p(),Y=h(async e=>{try{return e?await ee(r,C):await w(r,C)}catch(e){return console.error(`点赞操作失败`,e),{success:!1,message:`点赞操作失败`}}},[r,C]),X=h(async()=>{if(!(!K()||V)){H(!0);try{let e=!i;e&&q.trigger(R);let t={isLike:e,likeCnt:Math.max(0,s+(e?1:-1))};e&&a&&(t.isDislike=!1,t.dislikeCnt=Math.max(0,S-1));let n=await Y(e);if(!n.success){m.error(n.message||`点赞失败`);return}return t}finally{H(!1)}}},[q,i,a,s,S,Y,K,V,R]),Z=h(async e=>{try{return e?await T(r,C):await E(r,C)}catch(e){return console.error(`点踩操作失败`,e),{success:!1,message:`点踩操作失败`}}},[r,C]),te=h(async()=>{if(!(!K()||U)){W(!0);try{let e=!a;e&&J.trigger(z);let t={isDislike:e,dislikeCnt:Math.max(0,S+(e?1:-1))};e&&i&&(t.isLike=!1,t.likeCnt=Math.max(0,s-1));let n=await Z(e);if(!n.success){m.error(n.message||`操作失败`);return}return t}finally{W(!1)}}},[J,i,a,s,S,Z,K,U,z]),Q=h(async({currentId:e,isCancel:t,collectionIds:r})=>{try{if(t){let t=String(M||j?.userId||``);if(!t)return{success:!1};let n=await c({app_id:0,user_id:t,content_id:e,content_type:C});return n.code===0?{success:!0}:{success:!1,message:n.message}}if(!String(M||j?.userId||``))return{success:!1};let i=r?.[0],a=x(C),o=await n({...i?{collection_id:i}:{},content_id:e,...a===void 0?{}:{source_type:a}});return o.code===0?{success:!0}:{success:!1,message:o.message}}catch(e){return console.error(`取消收藏操作失败`,e),{success:!1,message:e?.message}}},[M,j?.userId,C]),$=h(({currentCollect:e,onUpdate:t})=>K()?(e?(async()=>{let e=await Q({currentId:r,isCancel:!0});if(!e?.success){m.error(e?.message||`操作失败`);return}t({isCollect:!1})})():(f.clear(),d.show({toCreateCollection:()=>{N.push(`/collection/create?information_id=${r}`)},onCollect:e=>{(async()=>{let n=await Q({currentId:r,isCancel:!1,collectionIds:[e]});if(!n?.success){m.error(n?.message||`操作失败`);return}t({isCollect:!0})})()}})),!0):!1,[r,N,K,Q]),ne=h(async({currentCollect:e,onUpdate:t})=>{if(!K())return;if(e){let e=await Q({currentId:r,isCancel:!0});return e?.success?(t({isCollect:!1}),{success:!0,isCollect:!1}):{success:!1,message:e?.message}}f.clear(),d.clear();let n=await Q({currentId:r,isCancel:!1});if(!n?.success)return{success:!1,message:n?.message};let i=I===void 0?await G():I;return t({isCollect:!0}),{success:!0,isCollect:!0,collectionTitle:i||void 0}},[I,G,Q,r,K]);return{likeAnimation:q,dislikeAnimation:J,handleLikeOperate:X,handleDislikeOperate:te,handleShareOperate:h((e,t)=>{let n=typeof t==`string`?{otherId:t}:t,i=n?.otherId||r,a=n?.shareUrl;f.show({copyUrl:O,data:{id:r,isCollect:o,parentId:i},...a?{shareUrl:a}:{},onCollect:t=>{$({currentCollect:t,onUpdate:e})}})},[r,o,$,O]),handleToCollectionOperate:$,handleDefaultCollectionOperate:ne}}export{C as batchQueryContentInteractions,D as useContentOperate};
@@ -22,7 +22,7 @@ import { homeRecommendGridMaterial } from "./components/biz/business/home-recomm
22
22
  import { homeRecommendWaterfallMaterial } from "./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";
23
23
  import { imageTextRecommendMaterial } from "./components/biz/business/image-text-recommend/material.mjs";
24
24
  import { marqueeMaterial } from "./components/biz/business/marquee/material.mjs";
25
- import { profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground } from "./components/biz/business/profile/profile-header/material.mjs";
25
+ import { myProfileHeaderMaterial, visitorProfileHeaderMaterial } from "./components/biz/business/profile/profile-header/material.mjs";
26
26
  import { profileMainMaterial } from "./components/biz/business/profile/profile-main/material.mjs";
27
27
  import { searchHistoryMaterial } from "./components/biz/business/search-history/material.mjs";
28
28
  import { searchInputMaterial } from "./components/biz/business/search-input/material.mjs";
@@ -39,4 +39,4 @@ import { headerSearchMaterial } from "./components/biz/business/header-search/he
39
39
  import "./components/biz/business/header-search/index.mjs";
40
40
  import { largeFeatureGridMaterial } from "./components/biz/business/large-feature-grid/material.mjs";
41
41
  import { shortcutGridMaterial } from "./components/biz/business/shortcut-grid/material.mjs";
42
- export { BannerCarouselMaterial, bannerAdMaterial, channelListMaterial, exampleButtonMaterial, floatingAdMaterial, floatingBallMaterial, headerAvatarIconMaterial, headerAvatarLogoSearchIconMaterial, headerAvatarLogoSearchMaterial, headerLogoSearchMaterial, headerSearchMaterial, homeRecommendGridMaterial, homeRecommendWaterfallMaterial, iconAdMaterial, imageTextRecommendMaterial, largeFeatureGridMaterial, marqueeMaterial, popupAdMaterial, profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground, profileMainMaterial, searchHistoryMaterial, searchInputMaterial, shortcutGridMaterial, tabBarMaterial, textAdMaterial, textRecommendMaterial, videoDetailActionsMaterial, videoDetailInfoMaterial, videoDetailInfoTitleTagsEpisodesMaterial, videoDetailPlayerBridgeOnlyMaterial, videoDetailPlayerMaterial, videoDetailRecommendMaterial };
42
+ export { BannerCarouselMaterial, bannerAdMaterial, channelListMaterial, exampleButtonMaterial, floatingAdMaterial, floatingBallMaterial, headerAvatarIconMaterial, headerAvatarLogoSearchIconMaterial, headerAvatarLogoSearchMaterial, headerLogoSearchMaterial, headerSearchMaterial, homeRecommendGridMaterial, homeRecommendWaterfallMaterial, iconAdMaterial, imageTextRecommendMaterial, largeFeatureGridMaterial, marqueeMaterial, myProfileHeaderMaterial, popupAdMaterial, profileMainMaterial, searchHistoryMaterial, searchInputMaterial, shortcutGridMaterial, tabBarMaterial, textAdMaterial, textRecommendMaterial, videoDetailActionsMaterial, videoDetailInfoMaterial, videoDetailInfoTitleTagsEpisodesMaterial, videoDetailPlayerBridgeOnlyMaterial, videoDetailPlayerMaterial, videoDetailRecommendMaterial, visitorProfileHeaderMaterial };
@@ -1,2 +1,2 @@
1
1
 
2
- import{__exportAll as e}from"./_virtual/_rolldown/runtime.mjs";import{bannerAdMaterial as t}from"./components/biz/business/advertisement/banner-ad/material.mjs";import{floatingAdMaterial as n}from"./components/biz/business/advertisement/floating-ad/material.mjs";import{iconAdMaterial as r}from"./components/biz/business/advertisement/icon-ad/material.mjs";import{popupAdMaterial as i}from"./components/biz/business/advertisement/popup-ad/material.mjs";import{textAdMaterial as a}from"./components/biz/business/advertisement/text-ad/material.mjs";import{floatingBallMaterial as o}from"./components/biz/business/floating-ball/material.mjs";import{homeRecommendGridMaterial as s}from"./components/biz/business/home-recommend/home-recommend-grid/material.mjs";import{homeRecommendWaterfallMaterial as c}from"./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";import{imageTextRecommendMaterial as l}from"./components/biz/business/image-text-recommend/material.mjs";import{marqueeMaterial as u}from"./components/biz/business/marquee/material.mjs";import{profileHeaderMaterial as d,profileHeaderMaterialWithDisabledBackground as f}from"./components/biz/business/profile/profile-header/material.mjs";import{profileMainMaterial as p}from"./components/biz/business/profile/profile-main/material.mjs";import{searchHistoryMaterial as m}from"./components/biz/business/search-history/material.mjs";import{searchInputMaterial as h}from"./components/biz/business/search-input/material.mjs";import{tabBarMaterial as g}from"./components/biz/business/tab-bar/material.mjs";import{textRecommendMaterial as _}from"./components/biz/business/text-recommend/material.mjs";import{exampleButtonMaterial as v}from"./components/biz/example/button/material.mjs";import{BannerCarouselMaterial as y}from"./components/biz/business/banner-carousel/material.mjs";import{channelListMaterial as b}from"./components/biz/business/channel-list/material.mjs";import{videoDetailInfoMaterial as x}from"./components/biz/business/detail/video-detail-info/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as S}from"./components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as C}from"./components/biz/business/detail/video-detail-player/material.mjs";import{videoDetailPlayerBridgeOnlyMaterial as w}from"./components/biz/business/detail/video-detail-player-bridge-only/material.mjs";import{videoDetailRecommendMaterial as T}from"./components/biz/business/detail/video-detail-recommend/material.mjs";import{videoDetailActionsMaterial as E}from"./components/biz/business/detail/video-detail-actions/material.mjs";import{headerAvatarIconMaterial as D}from"./components/biz/business/header-search/header-avatar-icon/material.mjs";import{headerAvatarLogoSearchMaterial as O}from"./components/biz/business/header-search/header-avatar-logo-search/material.mjs";import{headerAvatarLogoSearchIconMaterial as k}from"./components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs";import{headerLogoSearchMaterial as A}from"./components/biz/business/header-search/header-logo-search/material.mjs";import{headerSearchMaterial as j}from"./components/biz/business/header-search/header-search/material.mjs";import{largeFeatureGridMaterial as M}from"./components/biz/business/large-feature-grid/material.mjs";import{shortcutGridMaterial as N}from"./components/biz/business/shortcut-grid/material.mjs";var P=e({BannerCarouselMaterial:()=>y,bannerAdMaterial:()=>t,channelListMaterial:()=>b,exampleButtonMaterial:()=>v,floatingAdMaterial:()=>n,floatingBallMaterial:()=>o,headerAvatarIconMaterial:()=>D,headerAvatarLogoSearchIconMaterial:()=>k,headerAvatarLogoSearchMaterial:()=>O,headerLogoSearchMaterial:()=>A,headerSearchMaterial:()=>j,homeRecommendGridMaterial:()=>s,homeRecommendWaterfallMaterial:()=>c,iconAdMaterial:()=>r,imageTextRecommendMaterial:()=>l,largeFeatureGridMaterial:()=>M,marqueeMaterial:()=>u,popupAdMaterial:()=>i,profileHeaderMaterial:()=>d,profileHeaderMaterialWithDisabledBackground:()=>f,profileMainMaterial:()=>p,searchHistoryMaterial:()=>m,searchInputMaterial:()=>h,shortcutGridMaterial:()=>N,tabBarMaterial:()=>g,textAdMaterial:()=>a,textRecommendMaterial:()=>_,videoDetailActionsMaterial:()=>E,videoDetailInfoMaterial:()=>x,videoDetailInfoTitleTagsEpisodesMaterial:()=>S,videoDetailPlayerBridgeOnlyMaterial:()=>w,videoDetailPlayerMaterial:()=>C,videoDetailRecommendMaterial:()=>T});export{y as BannerCarouselMaterial,t as bannerAdMaterial,b as channelListMaterial,v as exampleButtonMaterial,n as floatingAdMaterial,o as floatingBallMaterial,D as headerAvatarIconMaterial,k as headerAvatarLogoSearchIconMaterial,O as headerAvatarLogoSearchMaterial,A as headerLogoSearchMaterial,j as headerSearchMaterial,s as homeRecommendGridMaterial,c as homeRecommendWaterfallMaterial,r as iconAdMaterial,l as imageTextRecommendMaterial,M as largeFeatureGridMaterial,u as marqueeMaterial,P as materials_exports,i as popupAdMaterial,d as profileHeaderMaterial,f as profileHeaderMaterialWithDisabledBackground,p as profileMainMaterial,m as searchHistoryMaterial,h as searchInputMaterial,N as shortcutGridMaterial,g as tabBarMaterial,a as textAdMaterial,_ as textRecommendMaterial,E as videoDetailActionsMaterial,x as videoDetailInfoMaterial,S as videoDetailInfoTitleTagsEpisodesMaterial,w as videoDetailPlayerBridgeOnlyMaterial,C as videoDetailPlayerMaterial,T as videoDetailRecommendMaterial};
2
+ import{__exportAll as e}from"./_virtual/_rolldown/runtime.mjs";import{bannerAdMaterial as t}from"./components/biz/business/advertisement/banner-ad/material.mjs";import{floatingAdMaterial as n}from"./components/biz/business/advertisement/floating-ad/material.mjs";import{iconAdMaterial as r}from"./components/biz/business/advertisement/icon-ad/material.mjs";import{popupAdMaterial as i}from"./components/biz/business/advertisement/popup-ad/material.mjs";import{textAdMaterial as a}from"./components/biz/business/advertisement/text-ad/material.mjs";import{floatingBallMaterial as o}from"./components/biz/business/floating-ball/material.mjs";import{homeRecommendGridMaterial as s}from"./components/biz/business/home-recommend/home-recommend-grid/material.mjs";import{homeRecommendWaterfallMaterial as c}from"./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";import{imageTextRecommendMaterial as l}from"./components/biz/business/image-text-recommend/material.mjs";import{marqueeMaterial as u}from"./components/biz/business/marquee/material.mjs";import{myProfileHeaderMaterial as d,visitorProfileHeaderMaterial as f}from"./components/biz/business/profile/profile-header/material.mjs";import{profileMainMaterial as p}from"./components/biz/business/profile/profile-main/material.mjs";import{searchHistoryMaterial as m}from"./components/biz/business/search-history/material.mjs";import{searchInputMaterial as h}from"./components/biz/business/search-input/material.mjs";import{tabBarMaterial as g}from"./components/biz/business/tab-bar/material.mjs";import{textRecommendMaterial as _}from"./components/biz/business/text-recommend/material.mjs";import{exampleButtonMaterial as v}from"./components/biz/example/button/material.mjs";import{BannerCarouselMaterial as y}from"./components/biz/business/banner-carousel/material.mjs";import{channelListMaterial as b}from"./components/biz/business/channel-list/material.mjs";import{videoDetailInfoMaterial as x}from"./components/biz/business/detail/video-detail-info/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as S}from"./components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as C}from"./components/biz/business/detail/video-detail-player/material.mjs";import{videoDetailPlayerBridgeOnlyMaterial as w}from"./components/biz/business/detail/video-detail-player-bridge-only/material.mjs";import{videoDetailRecommendMaterial as T}from"./components/biz/business/detail/video-detail-recommend/material.mjs";import{videoDetailActionsMaterial as E}from"./components/biz/business/detail/video-detail-actions/material.mjs";import{headerAvatarIconMaterial as D}from"./components/biz/business/header-search/header-avatar-icon/material.mjs";import{headerAvatarLogoSearchMaterial as O}from"./components/biz/business/header-search/header-avatar-logo-search/material.mjs";import{headerAvatarLogoSearchIconMaterial as k}from"./components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs";import{headerLogoSearchMaterial as A}from"./components/biz/business/header-search/header-logo-search/material.mjs";import{headerSearchMaterial as j}from"./components/biz/business/header-search/header-search/material.mjs";import{largeFeatureGridMaterial as M}from"./components/biz/business/large-feature-grid/material.mjs";import{shortcutGridMaterial as N}from"./components/biz/business/shortcut-grid/material.mjs";var P=e({BannerCarouselMaterial:()=>y,bannerAdMaterial:()=>t,channelListMaterial:()=>b,exampleButtonMaterial:()=>v,floatingAdMaterial:()=>n,floatingBallMaterial:()=>o,headerAvatarIconMaterial:()=>D,headerAvatarLogoSearchIconMaterial:()=>k,headerAvatarLogoSearchMaterial:()=>O,headerLogoSearchMaterial:()=>A,headerSearchMaterial:()=>j,homeRecommendGridMaterial:()=>s,homeRecommendWaterfallMaterial:()=>c,iconAdMaterial:()=>r,imageTextRecommendMaterial:()=>l,largeFeatureGridMaterial:()=>M,marqueeMaterial:()=>u,myProfileHeaderMaterial:()=>d,popupAdMaterial:()=>i,profileMainMaterial:()=>p,searchHistoryMaterial:()=>m,searchInputMaterial:()=>h,shortcutGridMaterial:()=>N,tabBarMaterial:()=>g,textAdMaterial:()=>a,textRecommendMaterial:()=>_,videoDetailActionsMaterial:()=>E,videoDetailInfoMaterial:()=>x,videoDetailInfoTitleTagsEpisodesMaterial:()=>S,videoDetailPlayerBridgeOnlyMaterial:()=>w,videoDetailPlayerMaterial:()=>C,videoDetailRecommendMaterial:()=>T,visitorProfileHeaderMaterial:()=>f});export{y as BannerCarouselMaterial,t as bannerAdMaterial,b as channelListMaterial,v as exampleButtonMaterial,n as floatingAdMaterial,o as floatingBallMaterial,D as headerAvatarIconMaterial,k as headerAvatarLogoSearchIconMaterial,O as headerAvatarLogoSearchMaterial,A as headerLogoSearchMaterial,j as headerSearchMaterial,s as homeRecommendGridMaterial,c as homeRecommendWaterfallMaterial,r as iconAdMaterial,l as imageTextRecommendMaterial,M as largeFeatureGridMaterial,u as marqueeMaterial,P as materials_exports,d as myProfileHeaderMaterial,i as popupAdMaterial,p as profileMainMaterial,m as searchHistoryMaterial,h as searchInputMaterial,N as shortcutGridMaterial,g as tabBarMaterial,a as textAdMaterial,_ as textRecommendMaterial,E as videoDetailActionsMaterial,x as videoDetailInfoMaterial,S as videoDetailInfoTitleTagsEpisodesMaterial,w as videoDetailPlayerBridgeOnlyMaterial,C as videoDetailPlayerMaterial,T as videoDetailRecommendMaterial,f as visitorProfileHeaderMaterial};
@@ -106,10 +106,6 @@ interface AdsMatchMaterial {
106
106
  * 第三方广告类型枚举。
107
107
  */
108
108
  advertiseType?: number;
109
- /**
110
- * 视频素材地址。
111
- */
112
- advertiseVideo?: string;
113
109
  /**
114
110
  * 广告文案描述。
115
111
  */
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"../utils/http.mjs";async function t(t,n){let a=await e.request({...n??{},url:`/api/content/matchAds`,method:`POST`,data:i(t)});return{...a,data:r(a.data)??{}}}function n(e){return[`content-ads-match`,e.adType,e.componentId??``,e.sceneContext??{}]}function r(e){if(e)return{hit:e.hit,adType:e.adType??e.ad_type,advertiseLocationCode:e.advertiseLocationCode??e.advertise_location_code,config:o(e.config),materials:e.materials?.map(s)??[]}}function i(e){let t=a(e.sceneContext);return{ad_type:e.adType,component_id:e.componentId??`111111`,...t?{scene_context:t}:{}}}function a(e){if(e)return{startup_type:e.startupType,is_startup_hot:e.isStartupHot,background_durationMin:e.backgroundDurationMin,video_played_seconds:e.videoPlayedSeconds}}function o(e){if(e)return{skipSeconds:e.skipSeconds??e.skip_seconds,popupCount:e.popupCount??e.popup_count,dailyMaxShow:e.dailyMaxShow??e.daily_max_show,triggerVideoProgressMin:e.triggerVideoProgressMin??e.trigger_video_progress_min,switchInterval:e.switchInterval??e.switch_interval,displayCount:e.displayCount??e.display_count,styleSize:e.styleSize??e.style_size}}function s(e){return{advertiseCode:e.advertiseCode??e.advertise_code,advertiseName:e.advertiseName??e.advertise_name,advertiseUrl:e.advertiseUrl??e.advertise_url,advertiseIcon:e.advertiseIcon??e.advertise_icon,adPcAdvertiseIcon:e.adPcAdvertiseIcon??e.pc_advertise_icon,advertiseType:e.advertiseType??e.advertise_type,advertiseVideo:e.advertiseVideo??e.advertise_video,advertiseDesc:e.advertiseDesc??e.advertise_desc,sort:e.sort,startTimeStamp:e.startTimeStamp??e.start_timestamp,endTimeStamp:e.endTimeStamp??e.end_timestamp,adExtData:e.adExtData??e.ad_ext_data}}export{t as pContentAdsMatch,n as pContentAdsMatchKey};
2
+ import e from"../utils/http.mjs";async function t(t,n){let a=await e.request({...n??{},url:`/api/content/matchAds`,method:`POST`,data:i(t)});return{...a,data:r(a.data)??{}}}function n(e){return[`content-ads-match`,e.adType,e.componentId??``,e.sceneContext??{}]}function r(e){if(e)return{hit:e.hit,adType:e.adType??e.ad_type,advertiseLocationCode:e.advertiseLocationCode??e.advertise_location_code,config:o(e.config),materials:e.materials?.map(s)??[]}}function i(e){let t=a(e.sceneContext);return{ad_type:e.adType,component_id:e.componentId??`111111`,...t?{scene_context:t}:{}}}function a(e){if(e)return{startup_type:e.startupType,is_startup_hot:e.isStartupHot,background_durationMin:e.backgroundDurationMin,video_played_seconds:e.videoPlayedSeconds}}function o(e){if(e)return{skipSeconds:e.skipSeconds??e.skip_seconds,popupCount:e.popupCount??e.popup_count,dailyMaxShow:e.dailyMaxShow??e.daily_max_show,triggerVideoProgressMin:e.triggerVideoProgressMin??e.trigger_video_progress_min,switchInterval:e.switchInterval??e.switch_interval,displayCount:e.displayCount??e.display_count,styleSize:e.styleSize??e.style_size}}function s(e){return{advertiseCode:e.advertiseCode??e.advertise_code,advertiseName:e.advertiseName??e.advertise_name,advertiseUrl:e.advertiseUrl??e.advertise_url,advertiseIcon:e.advertiseIcon??e.advertise_icon,adPcAdvertiseIcon:e.adPcAdvertiseIcon??e.pc_advertise_icon,advertiseType:e.advertiseType??e.advertise_type,advertiseDesc:e.advertiseDesc??e.advertise_desc,sort:e.sort,startTimeStamp:e.startTimeStamp??e.start_timestamp,endTimeStamp:e.endTimeStamp??e.end_timestamp,adExtData:e.adExtData??e.ad_ext_data}}export{t as pContentAdsMatch,n as pContentAdsMatchKey};
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"crypto-js";function t(e=8){return Array.from({length:e},()=>Math.random().toString(36)[2]).join(``)}function n(){return typeof window<`u`}function r(){return typeof navigator>`u`?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function i(e){return e==null?`0`:String(e)}function a(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}function o(e){let t=typeof e==`string`?Number(String(e).trim()):Number(e??0);if(!Number.isFinite(t)||t<0)return`0`;let n=Math.floor(t);return n<1e3?String(n):n<1e6?`${(n/1e3).toFixed(1)}K`:`${(n/1e6).toFixed(1)}M`}function s(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function c(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function l(e){let t=0,n=0;try{if(e){let[r,i]=e.split(`x`);t=Number.parseInt(r||`0`,10)||0,n=Number.parseInt(i||`0`,10)||0}}catch(e){console.warn(`parseResolution failed`,e)}return{width:t,height:n}}function u(e,t=`yyyy-MM-dd hh:mm`){if(typeof e!=`number`||Number.isNaN(e)||e<0)return``;let n=new Date(e*1e3);if(Number.isNaN(n.getTime()))return``;let r=n.getFullYear().toString(),i=String(n.getMonth()+1).padStart(2,`0`),a=String(n.getDate()).padStart(2,`0`),o=String(n.getHours()).padStart(2,`0`),s=String(n.getMinutes()).padStart(2,`0`);return t.replace(`yyyy`,r).replace(`yy`,r.slice(-2)).replace(`MM`,i).replace(`dd`,a).replace(`hh`,o).replace(`mm`,s)}function d(){return Math.floor(Date.now()/1e3)}const f=/<span class="mention" contenteditable="false" data-id="(\w+)">(.*?)<\/span>/g,p=/<@_user>(\w+)<\/@_user>/g;function m(e){let t=[];if(!e)return t;let n;for(;(n=f.exec(e))!==null;)t.push(n[1]);return t}function h(e){return e?e.replace(f,`<@_user>$1</@_user>`):``}function g(e){let{text:t=``,atUsers:n=[]}=e;return t?t.replace(p,(e,t)=>`<span class="mention" data-id="${t}">@${n.find(e=>e.user_id===t||e.userId===t)?.name||``}</span>`):``}function _(e){return`<span class="mention" contenteditable="false" data-id="${e.user_id}">@${e.name}</span>`}function v(e){return e?e.replace(/<[^>]+>/g,``):``}function y(e,t){let n=null;return((...r)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...r),t)})}async function b(e){try{if(n()){let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`))?.split(`=`)[1];return t?decodeURIComponent(t):``}else{let{cookies:t}=await import(`next/headers`);return(await t()).get(e)?.value??``}}catch(t){return console.error(`获取 Cookie "${e}" 失败:`,t),``}}function x(e,t,n){let r=[`${e}=${encodeURIComponent(t)}`];if(n.expires)r.push(`expires=${n.expires.toUTCString()}`);else if(n.maxAge){let e=new Date(Date.now()+n.maxAge*1e3);r.push(`expires=${e.toUTCString()}`)}return n.path&&r.push(`path=${n.path}`),n.domain&&r.push(`domain=${n.domain}`),n.secure&&r.push(`secure`),n.sameSite&&r.push(`samesite=${n.sameSite}`),r.join(`; `)}function S(e,t,r={}){if(!n())throw Error(`setCookie 只能在客户端环境中使用`);let i={maxAge:360*24*60*60,httpOnly:!1,secure:process.env.NODE_ENV===`production`,sameSite:process.env.NODE_ENV===`production`?`none`:`lax`,path:`/`,...r};try{let n=x(e,t,i);document.cookie=n}catch(t){throw console.error(`设置 Cookie "${e}" 失败:`,t),Error(`无法设置 Cookie: ${t}`)}}function C(e){if(!n())throw Error(`removeCookie 只能在客户端环境中使用`);document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`}function w(t){if(!t||t.length<10)return``;let n=t.length,r=n%5+2,i=t.substring(0,r),a=t.substring(n-r);return e.MD5(`${i}gst#2026!idy_1-16${a}`).toString()}function T(t){return e.SHA256(t).toString(e.enc.Hex)}function E(){let e=window.localStorage.getItem(`user-store`);return e?JSON.parse(e)?.state?.userId:``}function D(e){let t=new URL(window.location.href);Object.entries(e).forEach(([e,n])=>{t.searchParams.set(e,n)}),window.history.replaceState({},``,t.toString())}export{y as debounceFun,o as formatCompactCount,c as formatVideoDuration,w as generateDynamicSign,s as generateUUID,_ as getAtUserElement,b as getCookie,d as getCurrentSecondTime,E as getUserId,T as hashPassword,n as isClient,r as isMobileDevice,i as numToString,l as parseResolution,m as parseTextAtUserIds,t as randomString,C as removeCookie,h as replaceAtUserElement,g as replaceAtUserElementHtmlStr,u as secondToTime,S as setCookie,a as stringToNumber,v as stripHtmlTags,D as updateUrlParams};
2
+ import e from"crypto-js";function t(e=8){return Array.from({length:e},()=>Math.random().toString(36)[2]).join(``)}function n(){return typeof window<`u`}function r(){return typeof navigator>`u`?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function i(e){return e==null?`0`:String(e)}function a(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}function o(e){let t=typeof e==`string`?Number(String(e).trim()):Number(e??0);if(!Number.isFinite(t)||t<0)return`0`;let n=Math.floor(t);return n<1e3?String(n):n<1e6?`${(n/1e3).toFixed(1)}k`:`${(n/1e6).toFixed(1)}m`}function s(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function c(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function l(e){let t=0,n=0;try{if(e){let[r,i]=e.split(`x`);t=Number.parseInt(r||`0`,10)||0,n=Number.parseInt(i||`0`,10)||0}}catch(e){console.warn(`parseResolution failed`,e)}return{width:t,height:n}}function u(e,t=`yyyy-MM-dd hh:mm`){if(typeof e!=`number`||Number.isNaN(e)||e<0)return``;let n=new Date(e*1e3);if(Number.isNaN(n.getTime()))return``;let r=n.getFullYear().toString(),i=String(n.getMonth()+1).padStart(2,`0`),a=String(n.getDate()).padStart(2,`0`),o=String(n.getHours()).padStart(2,`0`),s=String(n.getMinutes()).padStart(2,`0`);return t.replace(`yyyy`,r).replace(`yy`,r.slice(-2)).replace(`MM`,i).replace(`dd`,a).replace(`hh`,o).replace(`mm`,s)}function d(){return Math.floor(Date.now()/1e3)}const f=/<span class="mention" contenteditable="false" data-id="(\w+)">(.*?)<\/span>/g,p=/<@_user>(\w+)<\/@_user>/g;function m(e){let t=[];if(!e)return t;let n;for(;(n=f.exec(e))!==null;)t.push(n[1]);return t}function h(e){return e?e.replace(f,`<@_user>$1</@_user>`):``}function g(e){let{text:t=``,atUsers:n=[]}=e;return t?t.replace(p,(e,t)=>`<span class="mention" data-id="${t}">@${n.find(e=>e.user_id===t||e.userId===t)?.name||``}</span>`):``}function _(e){return`<span class="mention" contenteditable="false" data-id="${e.user_id}">@${e.name}</span>`}function v(e){return e?e.replace(/<[^>]+>/g,``):``}function y(e,t){let n=null;return((...r)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...r),t)})}async function b(e){try{if(n()){let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`))?.split(`=`)[1];return t?decodeURIComponent(t):``}else{let{cookies:t}=await import(`next/headers`);return(await t()).get(e)?.value??``}}catch(t){return console.error(`获取 Cookie "${e}" 失败:`,t),``}}function x(e,t,n){let r=[`${e}=${encodeURIComponent(t)}`];if(n.expires)r.push(`expires=${n.expires.toUTCString()}`);else if(n.maxAge){let e=new Date(Date.now()+n.maxAge*1e3);r.push(`expires=${e.toUTCString()}`)}return n.path&&r.push(`path=${n.path}`),n.domain&&r.push(`domain=${n.domain}`),n.secure&&r.push(`secure`),n.sameSite&&r.push(`samesite=${n.sameSite}`),r.join(`; `)}function S(e,t,r={}){if(!n())throw Error(`setCookie 只能在客户端环境中使用`);let i={maxAge:360*24*60*60,httpOnly:!1,secure:process.env.NODE_ENV===`production`,sameSite:process.env.NODE_ENV===`production`?`none`:`lax`,path:`/`,...r};try{let n=x(e,t,i);document.cookie=n}catch(t){throw console.error(`设置 Cookie "${e}" 失败:`,t),Error(`无法设置 Cookie: ${t}`)}}function C(e){if(!n())throw Error(`removeCookie 只能在客户端环境中使用`);document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`}function w(t){if(!t||t.length<10)return``;let n=t.length,r=n%5+2,i=t.substring(0,r),a=t.substring(n-r);return e.MD5(`${i}gst#2026!idy_1-16${a}`).toString()}function T(t){return e.SHA256(t).toString(e.enc.Hex)}function E(){let e=window.localStorage.getItem(`user-store`);return e?JSON.parse(e)?.state?.userId:``}function D(e){let t=new URL(window.location.href);Object.entries(e).forEach(([e,n])=>{t.searchParams.set(e,n)}),window.history.replaceState({},``,t.toString())}export{y as debounceFun,o as formatCompactCount,c as formatVideoDuration,w as generateDynamicSign,s as generateUUID,_ as getAtUserElement,b as getCookie,d as getCurrentSecondTime,E as getUserId,T as hashPassword,n as isClient,r as isMobileDevice,i as numToString,l as parseResolution,m as parseTextAtUserIds,t as randomString,C as removeCookie,h as replaceAtUserElement,g as replaceAtUserElementHtmlStr,u as secondToTime,S as setCookie,a as stringToNumber,v as stripHtmlTags,D as updateUrlParams};
@@ -1,2 +1,2 @@
1
1
 
2
- import{getCookie as e,isClient as t}from"./common.mjs";import{getOrCreateDeviceId as n}from"./device-id.mjs";import{useBlockedModalStore as r}from"../store/modules/blocked-modal-store.mjs";import{useUserStore as i}from"../store/modules/user-store.mjs";import{resolveRequestUserId as a}from"./request-user-id.mjs";import{toast as o}from"sonner";const s=process.env.NEXT_PUBLIC_API_BASE||``;let c=!1,l=!1,u=null;var d=class extends Error{constructor(e,t,n){super(t),this.status=e,this.response=n}};function f(e){if(!e)return``;let t=new URLSearchParams;Object.entries(e).forEach(([e,n])=>{n!=null&&t.append(e,String(n))});let n=t.toString();return n?`?${n}`:``}function p(e=1e4,t){let n=new AbortController,r=setTimeout(()=>n.abort(),e);return t&&t.addEventListener(`abort`,()=>n.abort()),{signal:n.signal,clear:()=>clearTimeout(r)}}function m(){t()&&(l||(l=!0,i.getState().logout(),setTimeout(()=>{l=!1},1e3)))}var h=class{constructor(){this.baseURL=s,this.defaultConfig={method:`GET`,timeout:1e4,cache:`default`}}async buildHeaders(e){return{"Content-Type":`application/json`,...e}}buildURL(e,t){return`${e.startsWith(`http`)?e:`${this.baseURL}${e.startsWith(`/`)?``:`/`}${e}`}${f(t)}`}async executeOnce(s){let{url:l,method:f=`GET`,data:h,params:g,timeout:_,cache:v,revalidate:y,tags:b,signal:x}=s,S=await this.buildHeaders(s.headers),C=``,w=f===`GET`||f===`HEAD`;if(t()){if(!S[`x-device-id`]){let e=await n();e&&(S[`x-device-id`]=e)}C=await e(`token`);let t=await e(`userId`),r=await e(`guestUserId`);C&&(S.Authorization=`Bearer ${C}`);let i=a(t,r);if(i&&(S[`x-user-id`]=i),u?.token&&u.token!==C&&(u=null),C&&u?.token===C)throw m(),new d(403,`账号已被封禁`,{code:403,message:`账号已被封禁`,data:{blocked_remark:u.blockedRemark,blocked_end_time:u.blockedEndTime}})}let T;!w&&h!==void 0&&(h instanceof FormData?(delete S[`Content-Type`],T=h):T=JSON.stringify(h));let{signal:E,clear:D}=p(_,x),O=this.buildURL(l,g);try{let e=await fetch(O,{method:f,headers:S,body:T,cache:v,signal:E,next:{revalidate:y??0,tags:b}}),n=e.status===401||e.status===403;if(!e.ok&&!n)throw new d(e.status,e.statusText,await e.text());let a=await e.json(),s=n&&e.status===401||a?.code===401,l=n&&e.status===403||a?.code===403;if(s)if(t())c||(c=!0,o.error(`登录已过期,请重新登录`),i.getState().logout(),setTimeout(()=>{c=!1},3e3));else throw new d(a.code,a.message,a);if(l){let e=typeof a?.data?.blocked_remark==`string`?a.data.blocked_remark:``,n=Number(a?.data?.blocked_end_time),i={blockedRemark:e,blockedEndTime:Number.isFinite(n)&&n>0?Math.floor(n):0};if(t()){let e=C,t=u?.token===e;e&&(u={token:e,...i}),t||r.getState().open(i),m()}throw new d(a.code,a.message,a)}if(a.code!==0)throw new d(a.code,a.message,a);return a}finally{D()}}async request(e){let t={...this.defaultConfig,...e};return await this.executeOnce(t)}get(e,t){return this.request({...t,method:`GET`,url:e})}post(e,t){return this.request({...t,method:`POST`,url:e})}put(e,t){return this.request({...t,method:`PUT`,url:e})}delete(e,t){return this.request({...t,method:`DELETE`,url:e})}patch(e,t){return this.request({...t,method:`PATCH`,url:e})}};const g=new h;export{h as HttpClient,d as HttpError,g as default};
2
+ import{getCookie as e,isClient as t}from"./common.mjs";import{getOrCreateDeviceId as n}from"./device-id.mjs";import{useBlockedModalStore as r}from"../store/modules/blocked-modal-store.mjs";import{useUserStore as i}from"../store/modules/user-store.mjs";import{resolveRequestUserId as a}from"./request-user-id.mjs";import{toast as o}from"sonner";const s=process.env.NEXT_PUBLIC_API_BASE||``;let c=!1,l=!1,u=null;var d=class extends Error{constructor(e,t,n){super(t),this.status=e,this.response=n}};function f(e){if(!e)return``;let t=new URLSearchParams;Object.entries(e).forEach(([e,n])=>{n!=null&&t.append(e,String(n))});let n=t.toString();return n?`?${n}`:``}function p(e=1e4,t){let n=new AbortController,r=setTimeout(()=>n.abort(),e);return t&&t.addEventListener(`abort`,()=>n.abort()),{signal:n.signal,clear:()=>clearTimeout(r)}}function m(){t()&&(l||(l=!0,i.getState().logout(),setTimeout(()=>{l=!1},1e3)))}var h=class{constructor(){this.baseURL=s,this.defaultConfig={method:`GET`,timeout:1e4,cache:`default`}}async buildHeaders(e){return{"Content-Type":`application/json`,...e}}buildURL(e,t){return`${e.startsWith(`http`)?e:`${this.baseURL}${e.startsWith(`/`)?``:`/`}${e}`}${f(t)}`}async executeOnce(s){let{url:l,method:f=`GET`,data:h,params:g,timeout:_,cache:v,revalidate:y,tags:b,signal:x}=s,S=await this.buildHeaders(s.headers),C=``,w=f===`GET`||f===`HEAD`;if(t()&&!S[`x-device-id`]){let e=await n();e&&(S[`x-device-id`]=e)}C=await e(`token`);let T=await e(`userId`),E=await e(`guestUserId`);C&&(S.Authorization=`Bearer ${C}`);let D=a(T,E);if(D&&(S[`x-user-id`]=D),t()&&(u?.token&&u.token!==C&&(u=null),C&&u?.token===C))throw m(),new d(403,`账号已被封禁`,{code:403,message:`账号已被封禁`,data:{blocked_remark:u.blockedRemark,blocked_end_time:u.blockedEndTime}});let O;!w&&h!==void 0&&(h instanceof FormData?(delete S[`Content-Type`],O=h):O=JSON.stringify(h));let{signal:k,clear:A}=p(_,x),j=this.buildURL(l,g);try{let e=await fetch(j,{method:f,headers:S,body:O,cache:v,signal:k,next:{revalidate:y??0,tags:b}}),n=e.status===401||e.status===403;if(!e.ok&&!n)throw new d(e.status,e.statusText,await e.text());let a=await e.json(),s=n&&e.status===401||a?.code===401,l=n&&e.status===403||a?.code===403;if(s)if(t())c||(c=!0,o.error(`登录已过期,请重新登录`),i.getState().logout(),setTimeout(()=>{c=!1},3e3));else throw new d(a.code,a.message,a);if(l){let e=typeof a?.data?.blocked_remark==`string`?a.data.blocked_remark:``,n=Number(a?.data?.blocked_end_time),i={blockedRemark:e,blockedEndTime:Number.isFinite(n)&&n>0?Math.floor(n):0};if(t()){let e=C,t=u?.token===e;e&&(u={token:e,...i}),t||r.getState().open(i),m()}throw new d(a.code,a.message,a)}if(a.code!==0)throw new d(a.code,a.message,a);return a}finally{A()}}async request(e){let t={...this.defaultConfig,...e};return await this.executeOnce(t)}get(e,t){return this.request({...t,method:`GET`,url:e})}post(e,t){return this.request({...t,method:`POST`,url:e})}put(e,t){return this.request({...t,method:`PUT`,url:e})}delete(e,t){return this.request({...t,method:`DELETE`,url:e})}patch(e,t){return this.request({...t,method:`PATCH`,url:e})}};const g=new h;export{h as HttpClient,d as HttpError,g as default};
@@ -209,8 +209,6 @@ interface PageLifecyclePayload {
209
209
  page_key: string;
210
210
  /** 页面名称,如 首页、我的。 */
211
211
  page_name: string;
212
- /** 页面路径(可选),如 /category/drama。 */
213
- page_path?: string;
214
212
  /** 页面停留时长(秒);show 事件固定为 0。 */
215
213
  duration: number;
216
214
  }
@@ -219,5 +217,15 @@ interface PageLifecyclePayload {
219
217
  * @param payload 页面生命周期 payload。
220
218
  */
221
219
  declare function trackPageLifecycle(payload: PageLifecyclePayload): void;
220
+ /**
221
+ * 页面生命周期追踪 Hook。
222
+ * - 挂载时上报 show(duration: 0)
223
+ * - 页面可见期间每隔 1 分钟上报一次 show(附带当前累计停留秒数)
224
+ * - visibilitychange 隐藏时上报 hide;重新可见时重置计时并上报 show
225
+ * - 卸载时(页面仍可见)补报 hide
226
+ * @param pageKey 页面标识键。
227
+ * @param pageName 页面名称。
228
+ */
229
+ declare function usePageLifecycle(pageKey: string, pageName: string): void;
222
230
  //#endregion
223
- export { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, KeywordClickPayload, NavigationPayload, PageLifecyclePayload, RecommendListClickPayload, VideoEventPayload, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent };
231
+ export { AdClickPayload, AdImpressionPayload, AdvertisingPayload, AppPageViewPayload, ClickPosition, KeywordClickPayload, NavigationPayload, PageLifecyclePayload, RecommendListClickPayload, VideoEventPayload, trackAdClick, trackAdImpression, trackAdvertising, trackAppPageView, trackKeywordClick, trackNavigation, trackPageClick, trackPageLifecycle, trackRecommendListClick, trackVideoEvent, usePageLifecycle };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";function e(e,t,n,r,i){if(typeof window>`u`)return;let a=n?.pageX??0,o=n?.pageY??0,s=window.innerWidth||1,c=window.innerHeight||1,l={page_key:e,page_name:t,element_name:r,click_page_x:Math.round(a),click_page_y:Math.round(o),click_x_percent:Math.round(a/s*100),click_y_percent:Math.round(o/c*100),screen_width:window.screen.width,screen_height:window.screen.height,recommend_trace_id:``,...i};window.WebSDK?.track?.({event:`page_click`,payload:l}),window.sensors?.track?.(`page_click`,l)}function t(e){if(typeof window>`u`)return;let t={recommend_trace_id:``,recommend_id:``,recommend_trace_info:``,...e};window.WebSDK?.track?.({event:`recommend_list_click`,payload:t}),window.sensors?.track?.(`recommend_list_click`,t)}const n=new Set;function r(e){if(typeof window>`u`)return;let t=e.ad_id.split(`,`).map(e=>e.trim()).filter(Boolean),r=(e.creative_id??``).split(`,`).map(e=>e.trim()),i=t.reduce((t,r,i)=>(n.has(`${e.ad_slot_key}::${r}`)||t.push(i),t),[]);if(i.length===0)return;for(let r of i)n.add(`${e.ad_slot_key}::${t[r]}`);let a={...e,ad_id:i.map(e=>t[e]).join(`,`),creative_id:i.map(e=>r[e]??``).join(`,`)};window.WebSDK?.track?.({event:`ad_impression`,payload:a}),window.sensors?.track?.(`ad_impression`,a)}function i(e){typeof window>`u`||(window.WebSDK?.track?.({event:`advertising`,payload:e}),window.sensors?.track?.(`advertising`,e))}function a(e){typeof window>`u`||(window.WebSDK?.track?.({event:`navigation`,payload:e}),window.sensors?.track?.(`navigation`,e))}function o(e){typeof window>`u`||(window.WebSDK?.track?.({event:`video_event`,payload:e}),window.sensors?.track?.(`video_event`,e))}function s(e){typeof window>`u`||(window.WebSDK?.track?.({event:`keyword_click`,payload:e}),window.sensors?.track?.(`keyword_click`,e))}function c(e){if(typeof window>`u`)return;let t={creative_id:``,...e};window.WebSDK?.track?.({event:`ad_click`,payload:t}),window.sensors?.track?.(`ad_click`,t)}function l(e){if(typeof window>`u`)return;let t={user_type:`normal`,referrer_page_key:``,referrer_page_name:``,page_load_time:0,recommend_trace_id:``,...e};window.WebSDK?.track?.({event:`app_page_view`,payload:t}),window.sensors?.track?.(`app_page_view`,t)}function u(e){typeof window>`u`||(window.WebSDK?.track?.({event:`page_lifecycle`,payload:e}),window.sensors?.track?.(`page_lifecycle`,e))}export{c as trackAdClick,r as trackAdImpression,i as trackAdvertising,l as trackAppPageView,s as trackKeywordClick,a as trackNavigation,e as trackPageClick,u as trackPageLifecycle,t as trackRecommendListClick,o as trackVideoEvent};
2
+ "use client";import{useEffect as e}from"react";function t(e,t,n,r,i){if(typeof window>`u`)return;console.log(`trackPageClick${r}`);let a=n?.pageX??0,o=n?.pageY??0,s=window.innerWidth||1,c=window.innerHeight||1,l={page_key:e,page_name:t,element_name:r,click_page_x:Math.round(a),click_page_y:Math.round(o),click_x_percent:Math.round(a/s*100),click_y_percent:Math.round(o/c*100),screen_width:window.screen.width,screen_height:window.screen.height,recommend_trace_id:``,...i};window.WebSDK?.track?.({event:`page_click`,payload:l}),window.sensors?.track?.(`page_click`,l)}function n(e){if(console.log(`trackrecommend_list_click`,e.page_name),typeof window>`u`)return;let t={recommend_trace_id:``,recommend_id:``,recommend_trace_info:``,...e};window.WebSDK?.track?.({event:`recommend_list_click`,payload:t}),window.sensors?.track?.(`recommend_list_click`,t)}const r=new Set;function i(e){if(typeof window>`u`)return;let t=e.ad_id.split(`,`).map(e=>e.trim()).filter(Boolean),n=(e.creative_id??``).split(`,`).map(e=>e.trim()),i=t.reduce((t,n,i)=>(r.has(`${e.ad_slot_key}::${n}`)||t.push(i),t),[]);if(i.length===0)return;for(let n of i)r.add(`${e.ad_slot_key}::${t[n]}`);let a={...e,ad_id:i.map(e=>t[e]).join(`,`),creative_id:i.map(e=>n[e]??``).join(`,`)};console.log(`[trackAdImpression]`,a.ad_slot_key,a.ad_id),window.WebSDK?.track?.({event:`ad_impression`,payload:a}),window.sensors?.track?.(`ad_impression`,a)}function a(e){typeof window>`u`||(console.log(`[trackAdvertising]`,e.advertising_key,e.event_type),window.WebSDK?.track?.({event:`advertising`,payload:e}),window.sensors?.track?.(`advertising`,e))}function o(e){typeof window>`u`||(console.log(`navigaition`,e.navigation_name),window.WebSDK?.track?.({event:`navigation`,payload:e}),window.sensors?.track?.(`navigation`,e))}function s(e){typeof window>`u`||(console.log(`[trackVideoEvent]`,e.video_behavior_key,e.video_id),window.WebSDK?.track?.({event:`video_event`,payload:e}),window.sensors?.track?.(`video_event`,e))}function c(e){typeof window>`u`||(console.log(`keywordclick`,e.keyword),window.WebSDK?.track?.({event:`keyword_click`,payload:e}),window.sensors?.track?.(`keyword_click`,e))}function l(e){if(typeof window>`u`)return;let t={creative_id:``,...e};console.log(`[trackAdClick]`,t.ad_slot_key,t.ad_id),window.WebSDK?.track?.({event:`ad_click`,payload:t}),window.sensors?.track?.(`ad_click`,t)}function u(e){if(console.log(`trackPageView`,e.page_name),typeof window>`u`)return;let t={user_type:`normal`,referrer_page_key:``,referrer_page_name:``,page_load_time:0,recommend_trace_id:``,...e};window.WebSDK?.track?.({event:`app_page_view`,payload:t}),window.sensors?.track?.(`app_page_view`,t)}function d(e){typeof window>`u`||(console.log(`[trackPageLifecycle]`,e.page_name,e.duration,e.lifecycle_status),window.WebSDK?.track?.({event:`page_lifecycle`,payload:e}),window.sensors?.track?.(`page_lifecycle`,e))}function f(t,n){e(()=>{let e=Date.now();d({lifecycle_status:`show`,page_key:t,page_name:n,duration:0});let r=setInterval(()=>{document.visibilityState!==`hidden`&&d({lifecycle_status:`show`,page_key:t,page_name:n,duration:Math.floor((Date.now()-e)/1e3)})},600*1e3);return()=>{clearInterval(r)}},[])}export{l as trackAdClick,i as trackAdImpression,a as trackAdvertising,u as trackAppPageView,c as trackKeywordClick,o as trackNavigation,t as trackPageClick,d as trackPageLifecycle,n as trackRecommendListClick,s as trackVideoEvent,f as usePageLifecycle};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useRouter as e}from"next/navigation";import{useCallback as t,useMemo as n}from"react";function r(){let r=e(),i=typeof window<`u`&&window.isWebView===!0,a=t(e=>{if(!i||typeof window>`u`)return e;try{let t=new URL(e,window.location.origin),n=t.pathname.split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`);return r<0?e:(n[r]=`webview`,t.pathname=`/${n.join(`/`)}`,`${t.pathname}${t.search}${t.hash}`)}catch{return e}},[i]),o=t(e=>{if(typeof window>`u`)return{isSameOrigin:!0,path:e};try{let t=new URL(e,window.location.href);return t.origin===window.location.origin?{isSameOrigin:!0,path:a(`${t.pathname}${t.search}${t.hash}`)}:{isSameOrigin:!1,path:e}}catch{return{isSameOrigin:!0,path:a(e)}}},[a]),s=t((e,t)=>{let n=o(e);if(!n.isSameOrigin&&typeof window<`u`){window.location.href=n.path;return}r.push(n.path,t)},[o,r]),c=t((e,t)=>{let n=o(e);if(!n.isSameOrigin&&typeof window<`u`){window.location.replace(n.path);return}r.replace(n.path,t)},[o,r]);return n(()=>({...r,push:s,replace:c}),[s,c,r])}export{r as useRouter};
2
+ "use client";import{useCallback as e,useMemo as t}from"react";import{useRouter as n}from"next/navigation";function r(){let r=n(),i=typeof window<`u`&&window.isWebView===!0,a=e(e=>{if(!i||typeof window>`u`)return e;try{let t=new URL(e,window.location.origin),n=t.pathname.split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`);return r<0?e:(n[r]=`webview`,t.pathname=`/${n.join(`/`)}`,`${t.pathname}${t.search}${t.hash}`)}catch{return e}},[i]),o=e(e=>{if(typeof window>`u`)return{isSameOrigin:!0,path:e};try{let t=new URL(e,window.location.href);return t.origin===window.location.origin?{isSameOrigin:!0,path:a(`${t.pathname}${t.search}${t.hash}`)}:{isSameOrigin:!1,path:e}}catch{return{isSameOrigin:!0,path:a(e)}}},[a]),s=e((e,t)=>{let n=o(e);if(!n.isSameOrigin&&typeof window<`u`){window.location.href=n.path;return}r.push(n.path,t)},[o,r]),c=e((e,t)=>{let n=o(e);if(!n.isSameOrigin&&typeof window<`u`){window.location.replace(n.path);return}r.replace(n.path,t)},[o,r]);return t(()=>({...r,push:s,replace:c}),[s,c,r])}export{r as useRouter};