pb-sxp-ui 1.0.71 → 1.0.72

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 (31) hide show
  1. package/dist/index.cjs +111 -82
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +111 -82
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +115 -85
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +15 -16
  14. package/es/core/components/DiyPortalPreview/index.js +8 -8
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/FormatImage.js +2 -1
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +11 -11
  18. package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -13
  19. package/es/core/components/SxpPageRender/index.js +32 -26
  20. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  21. package/es/core/context/SxpDataSourceProvider.js +3 -3
  22. package/lib/core/components/DiyPortalPreview/VideoWidget.js +15 -16
  23. package/lib/core/components/DiyPortalPreview/index.js +8 -8
  24. package/lib/core/components/SxpPageCore/index.js +2 -2
  25. package/lib/core/components/SxpPageRender/FormatImage.js +1 -0
  26. package/lib/core/components/SxpPageRender/LikeButton/index.js +11 -11
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -13
  28. package/lib/core/components/SxpPageRender/index.js +32 -26
  29. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  30. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  31. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -6,7 +6,6 @@ import qs from 'qs';
6
6
  import EventEmitter from 'eventemitter3';
7
7
  import { css } from '@emotion/css';
8
8
  import * as ReactDOM from 'react-dom';
9
- import Hls from 'hls.js';
10
9
 
11
10
  /******************************************************************************
12
11
  Copyright (c) Microsoft Corporation.
@@ -423,7 +422,7 @@ var DataSourceType;
423
422
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
424
423
  })(DataSourceType || (DataSourceType = {}));
425
424
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
426
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
425
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
427
426
  const [rtcList, setRtcList] = useState([]);
428
427
  const [tagList, setTagList] = useState([]);
429
428
  const [loading, setLoading] = useState(false);
@@ -585,7 +584,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
585
584
  // 获取 Tag
586
585
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
587
586
  var _h, _j, _k, _l, _m;
588
- if (!utmVal)
587
+ if (!utmVal || !isShowTag)
589
588
  return;
590
589
  try {
591
590
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -598,7 +597,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
598
597
  catch (e) {
599
598
  console.log('e', e);
600
599
  }
601
- }), [bffFetch, utmVal]);
600
+ }), [bffFetch, utmVal, isShowTag]);
602
601
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
603
602
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
604
603
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -8424,7 +8423,7 @@ var ExpandableText$1 = memo(ExpandableText);
8424
8423
  * @Author: binruan@chatlabs.com
8425
8424
  * @Date: 2024-03-20 10:27:31
8426
8425
  * @LastEditors: binruan@chatlabs.com
8427
- * @LastEditTime: 2024-04-19 14:12:55
8426
+ * @LastEditTime: 2024-05-20 15:53:04
8428
8427
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8429
8428
  *
8430
8429
  */
@@ -8439,6 +8438,30 @@ const FormatImage = forwardRef((props, ref) => {
8439
8438
  useEffect(() => {
8440
8439
  setImgSrc(src);
8441
8440
  }, [src]);
8441
+ useRef(null);
8442
+ // useEffect(() => {
8443
+ // let observer: any = null;
8444
+ // const { current } = imgRef;
8445
+ // if (current) {
8446
+ // observer = new IntersectionObserver(
8447
+ // (entries) => {
8448
+ // entries.forEach((entry) => {
8449
+ // if (entry.isIntersecting) {
8450
+ // setImgSrc(src);
8451
+ // observer.unobserve(current);
8452
+ // }
8453
+ // });
8454
+ // },
8455
+ // { threshold: 0.1 } // 触发阈值,可根据需要调整
8456
+ // );
8457
+ // observer.observe(current);
8458
+ // }
8459
+ // return () => {
8460
+ // if (observer && current) {
8461
+ // observer.unobserve(current);
8462
+ // }
8463
+ // };
8464
+ // }, [src]);
8442
8465
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8443
8466
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8444
8467
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -12219,17 +12242,17 @@ const LikeButton = (_a) => {
12219
12242
  if (state) {
12220
12243
  // 先设置状态
12221
12244
  setState(false);
12222
- const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
12245
+ const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
12223
12246
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12224
12247
  eventInfo: {
12225
12248
  eventSubject: 'favoriteContentCanceled',
12226
12249
  eventDescription: 'This content was unfavorite by the user',
12227
- contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12228
- contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
12229
- contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
12250
+ contentId: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12251
+ contentName: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
12252
+ contentTags: JSON.stringify((_k = (_j = recData === null || recData === void 0 ? void 0 : recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
12230
12253
  position: position + '',
12231
- contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
12232
- traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
12254
+ contentFormat: ((_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
12255
+ traceInfo: (_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
12233
12256
  }
12234
12257
  });
12235
12258
  // 如果接口调用失败,则回滚状态
@@ -12244,12 +12267,12 @@ const LikeButton = (_a) => {
12244
12267
  eventInfo: {
12245
12268
  eventSubject: 'favoriteContent',
12246
12269
  eventDescription: 'This content was favorite by the user',
12247
- contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
12248
- contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
12249
- contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
12270
+ contentId: (_q = (_p = recData === null || recData === void 0 ? void 0 : recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
12271
+ contentName: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
12272
+ contentTags: JSON.stringify((_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
12250
12273
  position: position + '',
12251
- contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
12252
- traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
12274
+ contentFormat: ((_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
12275
+ traceInfo: (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
12253
12276
  }
12254
12277
  });
12255
12278
  if (!result) {
@@ -12327,15 +12350,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12327
12350
  eventInfo: {
12328
12351
  eventSubject: 'playVideo',
12329
12352
  eventDescription: 'User played the video',
12330
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12331
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12353
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12354
+ contentName: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12332
12355
  playType,
12333
12356
  startTime: videoCurrentTime,
12334
12357
  videoDuration,
12335
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12358
+ contentTags: JSON.stringify((_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12336
12359
  position: index + '',
12337
12360
  contentFormat: 'video',
12338
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12361
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12339
12362
  }
12340
12363
  });
12341
12364
  setIsFirstPlay(false);
@@ -12425,15 +12448,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12425
12448
  eventInfo: {
12426
12449
  eventSubject: 'playOverVideo',
12427
12450
  eventDescription: 'User finished playing the video',
12428
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12429
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12451
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12452
+ contentName: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12430
12453
  endTime: videoCurrentTime,
12431
12454
  videoDuration,
12432
12455
  playDuration,
12433
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12456
+ contentTags: JSON.stringify((_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12434
12457
  position: index + '',
12435
12458
  contentFormat: 'video',
12436
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12459
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12437
12460
  }
12438
12461
  });
12439
12462
  }
@@ -12441,9 +12464,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12441
12464
  useEffect(() => {
12442
12465
  if (!isActive || !videoRef)
12443
12466
  return;
12444
- const videoSrc = rec.video.url;
12467
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
12445
12468
  if (!videoSrc)
12446
12469
  return;
12470
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12447
12471
  setIsPauseVideo(false);
12448
12472
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
12449
12473
  const dom = document.querySelector('#player-container-id');
@@ -12451,7 +12475,6 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12451
12475
  if (!dom && !dom2)
12452
12476
  return;
12453
12477
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12454
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12455
12478
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12456
12479
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
12457
12480
  // videoRef?.on('canplay', handleCanplay);
@@ -12532,10 +12555,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12532
12555
  window.removeEventListener('beforeunload', handleBeforeUnload);
12533
12556
  };
12534
12557
  }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
12535
- if (!rec.video) {
12558
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
12536
12559
  return null;
12537
12560
  }
12538
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12561
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12539
12562
  !isBgColor && (React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
12540
12563
  React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
12541
12564
  React.createElement("div", { style: {
@@ -12550,7 +12573,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12550
12573
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12551
12574
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
12552
12575
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
12553
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12576
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
12554
12577
  position: 'relative',
12555
12578
  width: '100%',
12556
12579
  height,
@@ -12907,7 +12930,7 @@ var Tagbar$1 = memo(Tagbar);
12907
12930
  * @Author: binruan@chatlabs.com
12908
12931
  * @Date: 2024-01-15 19:03:09
12909
12932
  * @LastEditors: binruan@chatlabs.com
12910
- * @LastEditTime: 2024-05-23 10:41:27
12933
+ * @LastEditTime: 2024-05-24 16:32:06
12911
12934
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12912
12935
  *
12913
12936
  */
@@ -12967,23 +12990,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12967
12990
  };
12968
12991
  const firstRef = useRef();
12969
12992
  useEffect(() => {
12970
- if (!firstRef.current && !videoRef) {
12993
+ var _a, _b, _c;
12994
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12971
12995
  firstRef.current = true;
12972
12996
  const player = TCPlayer('player-container-id', {
12973
12997
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12974
12998
  controls: false,
12975
- autoplay: false,
12976
12999
  loop: false,
13000
+ autoplay: true,
12977
13001
  muted: true,
12978
13002
  preload: 'auto',
12979
13003
  posterImage: false,
12980
- bigPlayButton: true
13004
+ bigPlayButton: true,
13005
+ sources: [
13006
+ {
13007
+ src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
13008
+ }
13009
+ ]
12981
13010
  });
12982
13011
  player === null || player === void 0 ? void 0 : player.ready(() => {
12983
13012
  setVideoRef(player);
12984
13013
  });
12985
13014
  }
12986
- }, [videoRef, licenseUrl]);
13015
+ }, [videoRef, licenseUrl, data]);
12987
13016
  useEffect(() => {
12988
13017
  if (!isInit)
12989
13018
  handleH5EnterLink();
@@ -13038,7 +13067,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13038
13067
  if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
13039
13068
  fromKName = 'pdpPage';
13040
13069
  }
13041
- else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
13070
+ else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
13042
13071
  fromKName = 'formPage';
13043
13072
  }
13044
13073
  else if (isFromHashtag) {
@@ -13063,7 +13092,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13063
13092
  position: activeIndex + '',
13064
13093
  fromKName,
13065
13094
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
13066
- ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
13095
+ ctatId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
13067
13096
  }
13068
13097
  });
13069
13098
  }
@@ -13101,11 +13130,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13101
13130
  }, [globalConfig]);
13102
13131
  const renderContent = useCallback((rec, index) => {
13103
13132
  var _a, _b, _c, _d;
13104
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13133
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13105
13134
  return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoRef: videoRef }));
13106
13135
  }
13107
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13108
- return (React.createElement(PictureGroup$3, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13136
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13137
+ return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13109
13138
  }
13110
13139
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
13111
13140
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -13146,16 +13175,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13146
13175
  }, [isShowMore]);
13147
13176
  const renderBottom = useCallback((rec, index) => {
13148
13177
  var _a, _b, _c, _d, _e, _f, _g;
13149
- if (rec.video) {
13178
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13150
13179
  return (React.createElement(React.Fragment, null,
13151
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13180
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13152
13181
  React.createElement("div", { className: 'clc-sxp-bottom' },
13153
13182
  React.createElement(Nudge, { nudge: nudge }),
13154
13183
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13155
13184
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
13156
13185
  React.createElement("div", null,
13157
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
13158
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
13186
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
13187
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
13159
13188
  }
13160
13189
  return null;
13161
13190
  }, [
@@ -13179,7 +13208,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13179
13208
  if (waterFallData && top < 40) {
13180
13209
  top += 40;
13181
13210
  }
13182
- if (rec.video) {
13211
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13183
13212
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13184
13213
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
13185
13214
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
@@ -13189,21 +13218,21 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13189
13218
  }, [globalConfig, waterFallData]);
13190
13219
  const handleReportViewImageEnd = (item) => {
13191
13220
  var _a, _b, _c, _d, _e, _f;
13192
- if (!((_a = item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
13221
+ if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
13193
13222
  const endTime = Date.now();
13194
13223
  const duration = (endTime - viewImageStartTime.current) / 1000;
13195
13224
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13196
13225
  eventInfo: {
13197
13226
  eventSubject: 'viewImageCarouselEnd',
13198
13227
  eventDescription: 'User end view the image carousel',
13199
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13200
- contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
13228
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13229
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
13201
13230
  imageEndTime: `${endTime}`,
13202
13231
  playDuration: `${duration}`,
13203
- contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
13232
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
13204
13233
  position: activeIndex + '',
13205
13234
  contentFormat: 'image',
13206
- traceInfo: item.video.traceInfo
13235
+ traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
13207
13236
  }
13208
13237
  });
13209
13238
  }
@@ -13219,8 +13248,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13219
13248
  eventInfo: {
13220
13249
  eventSubject: 'scrollDown',
13221
13250
  eventDescription: 'User scroll down',
13222
- contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
13223
- productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13251
+ contentId: (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
13252
+ productId: (_d = (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13224
13253
  requestId: null
13225
13254
  }
13226
13255
  });
@@ -13232,7 +13261,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13232
13261
  eventInfo: {
13233
13262
  eventSubject: 'scrollUp',
13234
13263
  eventDescription: 'User scroll up',
13235
- contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
13264
+ contentId: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
13236
13265
  productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13237
13266
  requestId: null
13238
13267
  }
@@ -13271,13 +13300,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13271
13300
  eventInfo: {
13272
13301
  eventSubject: 'viewImageCarouselStart',
13273
13302
  eventDescription: 'User start view the image carousel',
13274
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13275
- contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
13303
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13304
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
13276
13305
  imageStartTime: `${startTime}`,
13277
- contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
13306
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
13278
13307
  position: activeIndex + '',
13279
13308
  contentFormat: 'image',
13280
- traceInfo: item.video.traceInfo
13309
+ traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
13281
13310
  }
13282
13311
  });
13283
13312
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
@@ -13423,15 +13452,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13423
13452
  eventInfo: {
13424
13453
  eventSubject: 'playVideo',
13425
13454
  eventDescription: 'User played the video',
13426
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13427
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13455
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13456
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13428
13457
  playType,
13429
13458
  startTime: videoCurrentTime,
13430
13459
  videoDuration,
13431
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13460
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13432
13461
  position: index + '',
13433
13462
  contentFormat: 'video',
13434
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13463
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13435
13464
  }
13436
13465
  });
13437
13466
  setIsFirstPlay(false);
@@ -13480,15 +13509,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13480
13509
  eventInfo: {
13481
13510
  eventSubject: 'playOverVideo',
13482
13511
  eventDescription: 'User finished playing the video',
13483
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13484
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13512
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13513
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13485
13514
  endTime: videoCurrentTime,
13486
13515
  videoDuration,
13487
13516
  playDuration,
13488
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13517
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13489
13518
  position: index + '',
13490
13519
  contentFormat: 'video',
13491
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13520
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13492
13521
  }
13493
13522
  });
13494
13523
  }
@@ -13525,10 +13554,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13525
13554
  return;
13526
13555
  setIsPauseVideo(false);
13527
13556
  if (!videoRef.current.src) {
13528
- const videoSrc = rec.video.url;
13557
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
13529
13558
  if (videoSrc.includes('.m3u8')) {
13530
- if (Hls.isSupported()) {
13531
- const hls = new Hls();
13559
+ if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
13560
+ const hls = new window.Hls();
13532
13561
  hls.loadSource(videoSrc);
13533
13562
  hls.attachMedia(videoRef.current);
13534
13563
  }
@@ -13556,7 +13585,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13556
13585
  (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13557
13586
  (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13558
13587
  };
13559
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13588
+ }, [handleLoadedMetadata, handlePlaying, rec === null || rec === void 0 ? void 0 : rec.video, handLoadeddata]);
13560
13589
  const renderPoster = useMemo(() => {
13561
13590
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13562
13591
  return null;
@@ -13583,10 +13612,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13583
13612
  }
13584
13613
  : {};
13585
13614
  }, [blur]);
13586
- if (!rec.video) {
13615
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
13587
13616
  return null;
13588
13617
  }
13589
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13618
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
13590
13619
  position: 'relative',
13591
13620
  width,
13592
13621
  height,
@@ -13611,7 +13640,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13611
13640
  objectFit: 'contain'
13612
13641
  } }),
13613
13642
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13614
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13643
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
13615
13644
  position: 'relative',
13616
13645
  width,
13617
13646
  height,
@@ -13642,11 +13671,11 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13642
13671
  }, [globalConfig, containerHeight, tagList]);
13643
13672
  const renderContent = (rec, index) => {
13644
13673
  var _a, _b, _c, _d;
13645
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13674
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13646
13675
  return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: data !== null && data !== void 0 ? data : [], height: height, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
13647
13676
  }
13648
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13649
- return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13677
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13678
+ return (React.createElement(PictureGroup$1, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13650
13679
  }
13651
13680
  if (rec.product) {
13652
13681
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
@@ -13680,15 +13709,15 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13680
13709
  };
13681
13710
  const renderBottom = (rec, index) => {
13682
13711
  var _a, _b, _c, _d, _e, _f, _g;
13683
- if (rec.video) {
13712
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13684
13713
  return (React.createElement(React.Fragment, null,
13685
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13714
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13686
13715
  React.createElement("div", { className: 'clc-sxp-bottom' },
13687
13716
  React.createElement(Nudge, { nudge: nudge }),
13688
13717
  CTA(rec, index),
13689
13718
  React.createElement("div", null,
13690
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13691
- React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13719
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13720
+ React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13692
13721
  }
13693
13722
  return null;
13694
13723
  };
@@ -13702,7 +13731,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13702
13731
  if (top < 40) {
13703
13732
  top += 40;
13704
13733
  }
13705
- if (rec.video) {
13734
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13706
13735
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13707
13736
  top,
13708
13737
  right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
@@ -13814,7 +13843,7 @@ const Popup = () => {
13814
13843
  * @Author: binruan@chatlabs.com
13815
13844
  * @Date: 2024-01-15 19:03:09
13816
13845
  * @LastEditors: binruan@chatlabs.com
13817
- * @LastEditTime: 2024-05-06 17:26:37
13846
+ * @LastEditTime: 2024-05-17 18:41:05
13818
13847
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13819
13848
  *
13820
13849
  */
@@ -13831,14 +13860,14 @@ Object.values(_materials_).forEach((v) => {
13831
13860
  RESOLVER[v.extend.type] = v;
13832
13861
  });
13833
13862
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13834
- var _a, _b, _c, _d, _e, _f;
13863
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13835
13864
  const utmVal = useMemo(() => {
13836
13865
  var _a;
13837
13866
  const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
13838
13867
  return searchParams;
13839
13868
  }, []);
13840
13869
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13841
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, render: ({ rtcList, tagList }) => {
13870
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
13842
13871
  var _a;
13843
13872
  return (React.createElement(React.Fragment, null,
13844
13873
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),