pb-sxp-ui 1.16.24-alpha.2 → 1.16.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 (33) hide show
  1. package/dist/index.cjs +193 -138
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +193 -138
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +6 -6
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +6 -6
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +193 -138
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +18 -16
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +39 -13
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +32 -45
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +53 -37
  20. package/es/core/context/SxpDataSourceProvider.d.ts +5 -12
  21. package/es/core/context/SxpDataSourceProvider.js +32 -10
  22. package/es/core/hooks/useEventReport.js +6 -5
  23. package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  24. package/lib/core/components/SxpPageRender/LikeButton/index.js +18 -16
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +38 -12
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +32 -45
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  29. package/lib/core/components/SxpPageRender/index.js +53 -37
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +5 -12
  31. package/lib/core/context/SxpDataSourceProvider.js +32 -10
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -622,6 +622,7 @@ const DEFAULT_TAG = 'FOR U';
622
622
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
623
623
  var _a, _b, _c, _d, _e;
624
624
  const [rtcList, setRtcList] = useState([]);
625
+ const [firstRtcList, setFirstRtcList] = useState([]);
625
626
  const [tagList, setTagList] = useState([]);
626
627
  const [loading, setLoading] = useState(true);
627
628
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -715,7 +716,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
715
716
  }, [bffDataSource]);
716
717
  // bff API 请求方法
717
718
  const bffFetch = useCallback((path, options, isBota = true) => {
718
- var _a;
719
+ var _a, _b;
719
720
  if (!bffDataSource)
720
721
  return;
721
722
  const url = bffDataSource.url;
@@ -728,8 +729,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
728
729
  val.split('=')[0];
729
730
  val.split('=')[1];
730
731
  });
732
+ options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
731
733
  return window
732
- .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
734
+ .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, 'tenant-id': (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
733
735
  ? JSON.stringify({
734
736
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
735
737
  })
@@ -1004,6 +1006,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1004
1006
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
1005
1007
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1006
1008
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1009
+ if (isDiyH5) {
1010
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1011
+ }
1007
1012
  }
1008
1013
  const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1009
1014
  if (isNotNullList) {
@@ -1043,12 +1048,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1043
1048
  if (rtcList.length <= 0) {
1044
1049
  return;
1045
1050
  }
1051
+ if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1052
+ setRtcList(rtcList.concat(firstRtcList));
1053
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1054
+ return;
1055
+ }
1046
1056
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1047
1057
  const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
1048
1058
  setRtcList(rtcList.concat(getFilterRecList(data)));
1049
1059
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1050
1060
  return data;
1051
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1061
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
1052
1062
  const refreshFeSession = useCallback((enableReSid, event) => {
1053
1063
  var _a, _b, _c, _d, _e;
1054
1064
  let expire = false;
@@ -1079,8 +1089,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1079
1089
  // 用户信息都是公共的
1080
1090
  if (!userInfo) {
1081
1091
  userInfo = {
1082
- // productUserId: fakeUserId, // 后端逻辑会从请求头获取,所以不需要传
1083
- // tpChannelId: 'H5' // 后端处理
1092
+ productUserId: fakeUserId // 后端逻辑会从请求头获取,所以不需要传
1093
+ // tpChannelId: 'H5' // 后端处理
1084
1094
  };
1085
1095
  }
1086
1096
  const sessionID = storeAndLoadFeSessionId();
@@ -1114,7 +1124,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1114
1124
  layoutVariantId,
1115
1125
  globalConfig,
1116
1126
  playbookType,
1117
- bffDataSource
1127
+ bffDataSource,
1128
+ fakeUserId
1118
1129
  ]);
1119
1130
  const getEventParamsByJson = useCallback((json, product) => {
1120
1131
  var _a, _b, _c;
@@ -1247,13 +1258,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1247
1258
  }
1248
1259
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
1249
1260
  const bffMutateLike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1261
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1250
1262
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
1251
1263
  return res === null || res === void 0 ? void 0 : res.success;
1252
- }), [bffFetch]);
1264
+ }), [bffFetch, fakeUserId]);
1253
1265
  const bffMutateUnlike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1266
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1254
1267
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
1255
1268
  return res === null || res === void 0 ? void 0 : res.success;
1256
- }), [bffFetch]);
1269
+ }), [bffFetch, fakeUserId]);
1257
1270
  const bffSubmitForm = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1258
1271
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
1259
1272
  return res === null || res === void 0 ? void 0 : res.success;
@@ -1278,7 +1291,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1278
1291
  }
1279
1292
  }), [bffFetch, utmVal]);
1280
1293
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
1281
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
1294
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
1282
1295
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1283
1296
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
1284
1297
  let fromKName = '';
@@ -1296,7 +1309,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1296
1309
  }
1297
1310
  const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
1298
1311
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1299
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
1312
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', sceneId: (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_13 = (_10 = (_5 = (_1 = (_y = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_4 = (_3 = (_2 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.bindCta) === null || _4 === void 0 ? void 0 : _4.traceInfo) !== null && _5 !== void 0 ? _5 : (_9 = (_8 = (_7 = (_6 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _6 === void 0 ? void 0 : _6.bindProducts) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '', fromKName, fromKPage: (_14 = location === null || location === void 0 ? void 0 : location.href) !== null && _14 !== void 0 ? _14 : '', contentFormat })
1300
1313
  });
1301
1314
  }, [bffEventReport, isFromHashtag]);
1302
1315
  const h5EnterLink = useCallback(() => {
@@ -1398,6 +1411,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1398
1411
  }
1399
1412
  setRtcList(list);
1400
1413
  setCacheRtcList(list);
1414
+ if (isDiyH5) {
1415
+ setFirstRtcList(list);
1416
+ }
1401
1417
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1402
1418
  if (channel) {
1403
1419
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1433,6 +1449,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1433
1449
  }
1434
1450
  setRtcList(list);
1435
1451
  setCacheRtcList(list);
1452
+ if (isDiyH5) {
1453
+ setFirstRtcList(list);
1454
+ }
1436
1455
  }
1437
1456
  })
1438
1457
  .finally(() => {
@@ -1496,7 +1515,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1496
1515
  refreshFeSession,
1497
1516
  getAccount,
1498
1517
  accountSonsent,
1499
- isDiyH5
1518
+ isDiyH5,
1519
+ firstRtcList
1500
1520
  } }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
1501
1521
  rtcList,
1502
1522
  mutateLike: bffMutateLike,
@@ -1957,14 +1977,14 @@ var settingRender$f = [
1957
1977
  * @Author: binruan@chatlabs.com
1958
1978
  * @Date: 2024-03-12 10:59:06
1959
1979
  * @LastEditors: binruan@chatlabs.com
1960
- * @LastEditTime: 2024-11-28 11:17:16
1980
+ * @LastEditTime: 2025-05-09 15:30:59
1961
1981
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1962
1982
  *
1963
1983
  */
1964
1984
  function useEventReport() {
1965
1985
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1966
1986
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
1967
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
1987
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
1968
1988
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1969
1989
  if (i !== -1) {
1970
1990
  return;
@@ -1997,11 +2017,11 @@ function useEventReport() {
1997
2017
  contentFormat = 'image';
1998
2018
  }
1999
2019
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
2000
- eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
2020
+ eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', sceneId: (_2 = (_1 = (_0 = data === null || data === void 0 ? void 0 : data.video) === null || _0 === void 0 ? void 0 : _0.scene) === null || _1 === void 0 ? void 0 : _1.sceneId) !== null && _2 !== void 0 ? _2 : '', ctatId: (_3 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _3 !== void 0 ? _3 : '', traceInfo: (_16 = (_13 = (_11 = (_7 = (_4 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _4 !== void 0 ? _4 : (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProduct) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.video) === null || _8 === void 0 ? void 0 : _8.bindProducts) === null || _9 === void 0 ? void 0 : _9[0]) === null || _10 === void 0 ? void 0 : _10.traceInfo) !== null && _11 !== void 0 ? _11 : (_12 = data === null || data === void 0 ? void 0 : data.product) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_15 = (_14 = data === null || data === void 0 ? void 0 : data.video) === null || _14 === void 0 ? void 0 : _14.bindCta) === null || _15 === void 0 ? void 0 : _15.traceInfo) !== null && _16 !== void 0 ? _16 : '' }, (contentFormat && { contentFormat }))
2001
2021
  });
2002
2022
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
2003
2023
  const productView = useCallback((data, product, cta, viewTime, position) => {
2004
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2024
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2005
2025
  let fromKName = '';
2006
2026
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
2007
2027
  fromKName = 'pdpPage';
@@ -2020,8 +2040,9 @@ function useEventReport() {
2020
2040
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2021
2041
  position: position + '',
2022
2042
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2043
+ sceneId: (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
2023
2044
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2024
- traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
2045
+ traceInfo: (_s = (_q = (_l = (_h = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_p = (_o = (_m = data === null || data === void 0 ? void 0 : data.video) === null || _m === void 0 ? void 0 : _m.bindProducts) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_r = data === null || data === void 0 ? void 0 : data.product) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : '',
2025
2046
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2026
2047
  eventSubject: 'productView',
2027
2048
  eventDescription: 'User browsed the product'
@@ -15836,7 +15857,7 @@ function WaterfallList(_a) {
15836
15857
  * @Author: binruan@chatlabs.com
15837
15858
  * @Date: 2024-01-10 10:58:24
15838
15859
  * @LastEditors: binruan@chatlabs.com
15839
- * @LastEditTime: 2025-02-28 10:00:31
15860
+ * @LastEditTime: 2025-05-09 15:30:41
15840
15861
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15841
15862
  *
15842
15863
  */
@@ -15874,7 +15895,7 @@ const WaterFall = (props) => {
15874
15895
  }
15875
15896
  }, [waterFallData]);
15876
15897
  const reportTagsView = useCallback(() => {
15877
- var _a, _b, _c, _d, _e, _f;
15898
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15878
15899
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15879
15900
  if (!rec)
15880
15901
  return;
@@ -15894,9 +15915,10 @@ const WaterFall = (props) => {
15894
15915
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15895
15916
  eventInfo: {
15896
15917
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15918
+ sceneId: (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
15897
15919
  position: cacheActiveIndex + '',
15898
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15899
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15920
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15921
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15900
15922
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15901
15923
  fromKName,
15902
15924
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17978,21 +18000,22 @@ const LikeButton = (_a) => {
17978
18000
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17979
18001
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17980
18002
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17981
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
18003
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
17982
18004
  if (state) {
17983
18005
  // 先设置状态
17984
18006
  setState(false);
17985
- const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
18007
+ const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ itemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
17986
18008
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17987
18009
  eventInfo: {
17988
18010
  eventSubject: 'favoriteContentCanceled',
17989
18011
  eventDescription: 'This content was unfavorite by the user',
17990
18012
  contentId: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
17991
- contentName: (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '',
17992
- contentTags: JSON.stringify((_l = (_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.tags) !== null && _l !== void 0 ? _l : []),
18013
+ sceneId: (_k = (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.scene) === null || _j === void 0 ? void 0 : _j.sceneId) !== null && _k !== void 0 ? _k : '',
18014
+ contentName: (_m = (_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '',
18015
+ contentTags: JSON.stringify((_p = (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []),
17993
18016
  position: position + '',
17994
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17995
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18017
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18018
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17996
18019
  }
17997
18020
  });
17998
18021
  // 如果接口调用失败,则回滚状态
@@ -18000,40 +18023,41 @@ const LikeButton = (_a) => {
18000
18023
  setState(true);
18001
18024
  }
18002
18025
  else {
18003
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18026
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18004
18027
  if (index === position) {
18005
18028
  item.isCollected = false;
18006
18029
  }
18007
18030
  return item;
18008
- })) !== null && _p !== void 0 ? _p : [];
18031
+ })) !== null && _s !== void 0 ? _s : [];
18009
18032
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18010
18033
  }
18011
18034
  }
18012
18035
  else {
18013
18036
  setState(true);
18014
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18037
+ const result = (_v = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData), itemId: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '' })))) !== null && _v !== void 0 ? _v : false;
18015
18038
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18016
18039
  eventInfo: {
18017
18040
  eventSubject: 'favoriteContent',
18018
18041
  eventDescription: 'This content was favorite by the user',
18019
- contentId: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
18020
- contentName: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.title) !== null && _u !== void 0 ? _u : '',
18021
- contentTags: JSON.stringify((_w = (_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.tags) !== null && _w !== void 0 ? _w : []),
18042
+ contentId: (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
18043
+ sceneId: (_0 = (_z = (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.scene) === null || _z === void 0 ? void 0 : _z.sceneId) !== null && _0 !== void 0 ? _0 : '',
18044
+ contentName: (_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.title) !== null && _2 !== void 0 ? _2 : '',
18045
+ contentTags: JSON.stringify((_4 = (_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.tags) !== null && _4 !== void 0 ? _4 : []),
18022
18046
  position: position + '',
18023
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18024
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18047
+ contentFormat: ((_5 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _5 === void 0 ? void 0 : _5.url) ? 'video' : 'image',
18048
+ traceInfo: (_6 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _6 === void 0 ? void 0 : _6.traceInfo
18025
18049
  }
18026
18050
  });
18027
18051
  if (!result) {
18028
18052
  setState(false);
18029
18053
  }
18030
18054
  else {
18031
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18055
+ const nRtcList = (_7 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18032
18056
  if (index === position) {
18033
18057
  item.isCollected = true;
18034
18058
  }
18035
18059
  return item;
18036
- })) !== null && _z !== void 0 ? _z : [];
18060
+ })) !== null && _7 !== void 0 ? _7 : [];
18037
18061
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18038
18062
  }
18039
18063
  }
@@ -18070,7 +18094,7 @@ const mountVideoPlayerAtNode = (() => {
18070
18094
  const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
18071
18095
  var _a, _b;
18072
18096
  const [isPauseVideo, setIsPauseVideo] = useState(false);
18073
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18097
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18074
18098
  const videoStartTime = useRef(0);
18075
18099
  const [isLoadFinish, setIsLoadFinish] = useState(false);
18076
18100
  const { isActive } = useSwiperSlide();
@@ -18136,6 +18160,23 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18136
18160
  return;
18137
18161
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18138
18162
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18163
+ const handleEnd = () => {
18164
+ var _a, _b, _c, _d, _e, _f;
18165
+ if (!videoRef.current)
18166
+ return;
18167
+ if (isDiyH5) {
18168
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18169
+ if (!loopPlayRef.current)
18170
+ return;
18171
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18172
+ const i = (_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.activeIndex;
18173
+ (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(i + 1);
18174
+ }
18175
+ }
18176
+ else {
18177
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18178
+ }
18179
+ };
18139
18180
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18140
18181
  const handlePlaying = useCallback(() => {
18141
18182
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18144,7 +18185,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18144
18185
  setIsLoadFinish(true);
18145
18186
  }, []);
18146
18187
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18147
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18188
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18148
18189
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18149
18190
  return;
18150
18191
  setIsPauseVideo(false);
@@ -18155,16 +18196,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18155
18196
  const videoCurrentTime = ((_h = (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) !== null && _h !== void 0 ? _h : 0).toFixed(2);
18156
18197
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18157
18198
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18158
- eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', contentName: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []), position: index + '', contentFormat: 'video', traceInfo: (_q = item === null || item === void 0 ? void 0 : item.video) === null || _q === void 0 ? void 0 : _q.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
18199
+ eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', sceneId: (_o = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.scene) === null || _m === void 0 ? void 0 : _m.sceneId) !== null && _o !== void 0 ? _o : '', contentName: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.title) !== null && _q !== void 0 ? _q : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []), position: index + '', contentFormat: 'video', traceInfo: (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
18159
18200
  });
18160
18201
  isFirstPlayRef.current = false;
18161
18202
  }
18162
18203
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18163
- const setCurrentTimeByStartTime = useCallback(() => {
18164
- if (isDiyH5) {
18165
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18166
- }
18167
- }, []);
18168
18204
  const handLoadeddata = useCallback(() => {
18169
18205
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18170
18206
  return;
@@ -18189,13 +18225,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18189
18225
  const handleLoadedmetadata = useCallback(() => {
18190
18226
  if (!videoRef.current)
18191
18227
  return;
18192
- setCurrentTimeByStartTime();
18193
18228
  loadedTimeRef.current = new Date();
18194
18229
  handleStartPlay();
18195
18230
  handLoadeddata();
18196
18231
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18197
18232
  const handleClickVideo = useCallback((type) => () => {
18198
- var _a, _b, _c, _d, _e, _f;
18233
+ var _a, _b, _c, _d, _e;
18199
18234
  if (!videoRef.current)
18200
18235
  return;
18201
18236
  if (!isLoadFinish)
@@ -18216,20 +18251,17 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18216
18251
  break;
18217
18252
  default:
18218
18253
  if (isPause) {
18219
- if (isDiyH5 && Math.round((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.currentTime) >= (scene === null || scene === void 0 ? void 0 : scene.endTime)) {
18220
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18221
- }
18222
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18254
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18223
18255
  }
18224
18256
  else {
18225
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18257
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18226
18258
  }
18227
18259
  setIsPauseVideo(!isPause);
18228
18260
  break;
18229
18261
  }
18230
18262
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18231
18263
  const handlePause = useCallback(() => {
18232
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18264
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18233
18265
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18234
18266
  return;
18235
18267
  if (activeIndex !== index)
@@ -18245,14 +18277,15 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18245
18277
  eventSubject: 'playOverVideo',
18246
18278
  eventDescription: 'User finished playing the video',
18247
18279
  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 : '',
18248
- 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 : '',
18280
+ sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
18281
+ contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
18249
18282
  endTime: videoCurrentTime,
18250
18283
  videoDuration,
18251
18284
  playDuration,
18252
- 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 : []),
18285
+ contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
18253
18286
  position: index + '',
18254
18287
  contentFormat: 'video',
18255
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18288
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18256
18289
  }
18257
18290
  });
18258
18291
  }
@@ -18260,27 +18293,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18260
18293
  const handleWaiting = useCallback(() => {
18261
18294
  setWaiting(true);
18262
18295
  }, []);
18263
- const handleTimeUpload = () => {
18264
- if (!videoRef.current || !isDiyH5)
18265
- return;
18266
- setTimeout(() => {
18267
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18268
- if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
18269
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18270
- if (!loopPlayRef.current)
18271
- return;
18272
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18273
- (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
18274
- }
18275
- else {
18276
- const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
18277
- (_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
18278
- }
18279
- }
18280
- });
18281
- };
18282
18296
  useEffect(() => {
18283
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18297
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18284
18298
  if (!isActive)
18285
18299
  return;
18286
18300
  const videoSrc = videoUrl;
@@ -18301,7 +18315,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18301
18315
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18302
18316
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18303
18317
  var _a;
18304
- setCurrentTimeByStartTime();
18305
18318
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18306
18319
  });
18307
18320
  }
@@ -18315,12 +18328,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18315
18328
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18316
18329
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18317
18330
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18318
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18331
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18319
18332
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18320
18333
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18321
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18322
18334
  return () => {
18323
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18335
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18324
18336
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18325
18337
  if (!isPause)
18326
18338
  handlePause();
@@ -18332,10 +18344,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18332
18344
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18333
18345
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18334
18346
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18335
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18347
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18336
18348
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18337
18349
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18338
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18339
18350
  };
18340
18351
  }, [isActive]);
18341
18352
  useEffect(() => {
@@ -18546,19 +18557,45 @@ const Picture = (props) => {
18546
18557
  }, onLoad: onShowFirstImage }))));
18547
18558
  };
18548
18559
 
18549
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18560
+ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18550
18561
  var _a, _b;
18551
18562
  const { isActive } = useSwiperSlide();
18552
- const { sxpParameter, openHashtag } = useSxpDataSource();
18563
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18553
18564
  const [isLoad, setIsLoad] = useState(false);
18554
18565
  const [imgInfo, setImgInfo] = useState();
18555
18566
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18556
- const swiperRef = useRef();
18567
+ const imgsSwiperRef = useRef();
18557
18568
  const isFirstPlayRef = useRef(true);
18569
+ const loopPlayRef = useRef(true);
18558
18570
  const initTime = new Date();
18571
+ useImperativeHandle(ref, () => {
18572
+ return {
18573
+ setLoopPlay(v) {
18574
+ loopPlayRef.current = v;
18575
+ }
18576
+ };
18577
+ });
18578
+ useEffect(() => {
18579
+ let timerId;
18580
+ if (isLoad && isActive && isDiyH5) {
18581
+ timerId = setTimeout(() => {
18582
+ var _a, _b, _c, _d;
18583
+ if (!loopPlayRef.current)
18584
+ return;
18585
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18586
+ const i = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
18587
+ (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(i + 1);
18588
+ }
18589
+ }, 3000);
18590
+ }
18591
+ return () => {
18592
+ if (timerId)
18593
+ clearTimeout(timerId);
18594
+ };
18595
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18559
18596
  useEffect(() => {
18560
18597
  if (isLoad && isActive) {
18561
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18598
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18562
18599
  if (openHashtag) {
18563
18600
  onViewImageEndEvent(rec);
18564
18601
  }
@@ -18568,7 +18605,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18568
18605
  }
18569
18606
  }
18570
18607
  else {
18571
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18608
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18572
18609
  }
18573
18610
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18574
18611
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18595,13 +18632,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18595
18632
  };
18596
18633
  }, [isActive, imgInfo]);
18597
18634
  const handleMouseEnter = useCallback(() => {
18598
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18599
- swiperRef.current.swiper.autoplay.stop();
18635
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18636
+ imgsSwiperRef.current.swiper.autoplay.stop();
18600
18637
  }
18601
18638
  }, []);
18602
18639
  const handleMouseLeave = useCallback(() => {
18603
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18604
- swiperRef.current.swiper.autoplay.start();
18640
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18641
+ imgsSwiperRef.current.swiper.autoplay.start();
18605
18642
  }
18606
18643
  }, []);
18607
18644
  const handleSlideChange = useCallback((swiper) => {
@@ -18622,7 +18659,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18622
18659
  enabled: true
18623
18660
  }
18624
18661
  }
18625
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18662
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18626
18663
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18627
18664
  fontSize: '14px'
18628
18665
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18639,7 +18676,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18639
18676
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18640
18677
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18641
18678
  }))));
18642
- };
18679
+ });
18643
18680
  var PictureGroup$5 = memo(PictureGroup$4);
18644
18681
 
18645
18682
  /*
@@ -18919,7 +18956,7 @@ var NavBack$1 = memo(NavBack);
18919
18956
  * @Author: binruan@chatlabs.com
18920
18957
  * @Date: 2024-03-20 10:27:31
18921
18958
  * @LastEditors: binruan@chatlabs.com
18922
- * @LastEditTime: 2025-05-09 15:51:40
18959
+ * @LastEditTime: 2025-05-12 14:26:15
18923
18960
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18924
18961
  *
18925
18962
  */
@@ -18939,6 +18976,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18939
18976
  const skipLinkRef = useRef(false);
18940
18977
  const [pageNum, setPageNum] = useState(2);
18941
18978
  const videoWidgetRef = useRef(null);
18979
+ const pictureGroupRef = useRef(null);
18942
18980
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
18943
18981
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18944
18982
  const isShowFingerTip = useMemo(() => {
@@ -18986,7 +19024,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18986
19024
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18987
19025
  }, [data, ctaType, swiperRef]);
18988
19026
  const handleSessionCompleted = useCallback((fk) => {
18989
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
19027
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18990
19028
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18991
19029
  let fromKName = '';
18992
19030
  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))) {
@@ -19013,12 +19051,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19013
19051
  eventSubject: 'sessionCompleted',
19014
19052
  eventDescription: 'Session completed',
19015
19053
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19016
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19054
+ sceneId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.scene) === null || _p === void 0 ? void 0 : _p.sceneId) !== null && _q !== void 0 ? _q : '',
19055
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19017
19056
  position: activeIndex + '',
19018
19057
  fromKName: fk || fromKName,
19019
19058
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19020
- ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19021
- traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
19059
+ ctatId: (_u = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
19060
+ traceInfo: (_y = (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = item === null || item === void 0 ? void 0 : item.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : ''
19022
19061
  }
19023
19062
  });
19024
19063
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -19077,8 +19116,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19077
19116
  refreshFeSession
19078
19117
  ]);
19079
19118
  const handleSessionExpire = useCallback(debounce(() => {
19080
- var _a;
19119
+ var _a, _b;
19081
19120
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19121
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19082
19122
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19083
19123
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19084
19124
  useEffect(() => {
@@ -19148,18 +19188,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19148
19188
  return null;
19149
19189
  }, [globalConfig, activeIndex, visList]);
19150
19190
  const renderContent = useCallback((rec, index) => {
19151
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19191
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19152
19192
  if (rec === 'organic menu') {
19153
19193
  return (React.createElement(MultiPosts$2, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
19154
19194
  }
19155
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19195
+ if (((_h = (_g = rec.video) === null || _g === void 0 ? void 0 : _g.scene) === null || _h === void 0 ? void 0 : _h.mediaUrl) || ((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.url)) {
19156
19196
  return (React.createElement(VideoWidget$5, Object.assign({ key: isReload }, (activeIndex === index && { ref: videoWidgetRef }), { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon, loopPlay: true, swiperRef: swiperRef })));
19157
19197
  }
19158
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19159
- return (React.createElement(PictureGroup$5, { 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, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
19198
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19199
+ return (React.createElement(PictureGroup$5, Object.assign({ data: data }, (activeIndex === index && { ref: pictureGroupRef }), { 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, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, swiperRef: swiperRef })));
19160
19200
  }
19161
- if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
19162
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19201
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _l === void 0 ? void 0 : _l.length) > 0) {
19202
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19163
19203
  var _a, _b, _c, _d, _e, _f, _g, _h;
19164
19204
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19165
19205
  const Component = withBindDataSource(t);
@@ -19197,7 +19237,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19197
19237
  };
19198
19238
  }, [isShowMore]);
19199
19239
  const renderBottom = useCallback((rec, index) => {
19200
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19240
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19201
19241
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19202
19242
  let cta = null;
19203
19243
  if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
@@ -19206,24 +19246,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19206
19246
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19207
19247
  cta = '商品CTA';
19208
19248
  }
19249
+ else if (tempMap && ((_d = Object.keys(tempMap)) === null || _d === void 0 ? void 0 : _d.includes('服务CTA')) && ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId)) {
19250
+ cta = '服务CTA';
19251
+ }
19209
19252
  else {
19210
- cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
19253
+ cta = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindCta) === null || _h === void 0 ? void 0 : _h.itemId;
19211
19254
  }
19212
19255
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19213
19256
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19214
19257
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19215
- ((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
19258
+ ((_j = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _j === void 0 ? void 0 : _j.includes((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type));
19216
19259
  return (React.createElement(React.Fragment, null,
19217
19260
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19218
- ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19219
- React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
19261
+ ((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19262
+ React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _m !== void 0 ? _m : 40}px` } },
19220
19263
  React.createElement(Nudge, { nudge: nudge }),
19221
19264
  ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
19222
19265
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19223
19266
  React.createElement("div", null,
19224
- 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: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', 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 }),
19267
+ 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: (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : '', 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 }),
19225
19268
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19226
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
19269
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.hashTags) !== null && _r !== void 0 ? _r : [], itemId: (_s = rec === null || rec === void 0 ? void 0 : rec.video) === null || _s === void 0 ? void 0 : _s.itemId, itemType: ((_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
19227
19270
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19228
19271
  }
19229
19272
  return null;
@@ -19262,7 +19305,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19262
19305
  return null;
19263
19306
  }, [globalConfig, waterFallData]);
19264
19307
  const handleViewImageStartEnd = (item) => {
19265
- var _a, _b, _c, _d, _e, _f;
19308
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19266
19309
  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)) {
19267
19310
  const endTime = Date.now();
19268
19311
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19271,10 +19314,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19271
19314
  eventSubject: 'viewImageCarouselEnd',
19272
19315
  eventDescription: 'User end view the image carousel',
19273
19316
  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 : '',
19274
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19317
+ sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
19318
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19275
19319
  imageEndTime: `${endTime}`,
19276
19320
  playDuration: `${duration}`,
19277
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19321
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19278
19322
  position: activeIndex + '',
19279
19323
  contentFormat: 'image',
19280
19324
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19283,7 +19327,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19283
19327
  }
19284
19328
  };
19285
19329
  const handleSlideSkip = (item, position) => {
19286
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
19287
19331
  if (isPreview || waterFallData)
19288
19332
  return;
19289
19333
  const t = new Date() - curTime.current;
@@ -19309,7 +19353,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19309
19353
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19310
19354
  position: position + '',
19311
19355
  contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
19312
- traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
19356
+ sceneId: (_w = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.scene) === null || _v === void 0 ? void 0 : _v.sceneId) !== null && _w !== void 0 ? _w : '',
19357
+ traceInfo: (_0 = (_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_z = item === null || item === void 0 ? void 0 : item.product) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : '',
19313
19358
  contentFormat
19314
19359
  }
19315
19360
  });
@@ -19319,7 +19364,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19319
19364
  }
19320
19365
  };
19321
19366
  const handleScrollEvent = (swiper) => {
19322
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19367
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
19323
19368
  const item = data[swiper.previousIndex];
19324
19369
  if (!item)
19325
19370
  return;
@@ -19336,11 +19381,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19336
19381
  eventSubject: 'scrollDown',
19337
19382
  eventDescription: 'User scroll down',
19338
19383
  contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
19339
- productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
19384
+ sceneId: (_h = (_g = (_f = item === null || item === void 0 ? void 0 : item.video) === null || _f === void 0 ? void 0 : _f.scene) === null || _g === void 0 ? void 0 : _g.sceneId) !== null && _h !== void 0 ? _h : '',
19385
+ productId: (_k = (_j = item === null || item === void 0 ? void 0 : item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
19340
19386
  requestId: null,
19341
- traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
19387
+ traceInfo: (_p = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
19342
19388
  contentFormat,
19343
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19389
+ position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19344
19390
  }
19345
19391
  });
19346
19392
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19352,12 +19398,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19352
19398
  eventInfo: {
19353
19399
  eventSubject: 'scrollUp',
19354
19400
  eventDescription: 'User scroll up',
19355
- contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
19356
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19401
+ contentId: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
19402
+ sceneId: (_v = (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.scene) === null || _u === void 0 ? void 0 : _u.sceneId) !== null && _v !== void 0 ? _v : '',
19403
+ productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19357
19404
  requestId: null,
19358
- traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : '',
19405
+ traceInfo: (_1 = (_z = (_y = item === null || item === void 0 ? void 0 : item.video) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_0 = item === null || item === void 0 ? void 0 : item.product) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '',
19359
19406
  contentFormat,
19360
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19407
+ position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19361
19408
  }
19362
19409
  });
19363
19410
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19383,7 +19430,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19383
19430
  }
19384
19431
  }, [openHashtag, data, activeIndex]);
19385
19432
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19386
- var _a, _b, _c, _d, _e, _f, _g, _h;
19433
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19387
19434
  const item = data[activeIndex];
19388
19435
  // 如果是图片集则上报事件
19389
19436
  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)) {
@@ -19394,9 +19441,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19394
19441
  eventSubject: 'viewImageCarouselStart',
19395
19442
  eventDescription: 'User start view the image carousel',
19396
19443
  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 : '',
19397
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19444
+ sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
19445
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19398
19446
  imageStartTime: `${startTime}`,
19399
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19447
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19400
19448
  position: activeIndex + '',
19401
19449
  contentFormat: 'image',
19402
19450
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19406,11 +19454,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19406
19454
  if (enableCapi) {
19407
19455
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19408
19456
  eventName: 'ViewContent',
19409
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19457
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19410
19458
  });
19411
19459
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19412
19460
  eventName: 'PageView',
19413
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19461
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19414
19462
  });
19415
19463
  }
19416
19464
  }
@@ -19502,15 +19550,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19502
19550
  swiperRef.current.swiper.allowTouchMove = true;
19503
19551
  }, 500);
19504
19552
  }, onActiveIndexChange: (swiper) => {
19553
+ var _a, _b;
19505
19554
  setActiveIndex(swiper.activeIndex);
19506
19555
  if (openHashtag)
19507
19556
  return;
19508
19557
  // 处理上滑下滑事件
19509
19558
  handleScrollEvent(swiper);
19510
- if (waterFallData || isEditor || isDiyH5)
19559
+ if (waterFallData || isEditor)
19511
19560
  return;
19512
19561
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19513
19562
  if (!isLoadMore) {
19563
+ if (isDiyH5) {
19564
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19565
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19566
+ }
19514
19567
  setIsLoadMore(true);
19515
19568
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19516
19569
  var _a;
@@ -19563,7 +19616,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19563
19616
  }, []);
19564
19617
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19565
19618
  const handlePlaying = useCallback(() => {
19566
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19619
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19567
19620
  setIsPauseVideo(false);
19568
19621
  const item = data[index];
19569
19622
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19576,14 +19629,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19576
19629
  eventSubject: 'playVideo',
19577
19630
  eventDescription: 'User played the video',
19578
19631
  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 : '',
19579
- 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 : '',
19632
+ sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
19633
+ contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
19580
19634
  playType,
19581
19635
  startTime: videoCurrentTime,
19582
19636
  videoDuration,
19583
- 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 : []),
19637
+ contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
19584
19638
  position: index + '',
19585
19639
  contentFormat: 'video',
19586
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19640
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19587
19641
  }
19588
19642
  });
19589
19643
  setIsFirstPlay(false);
@@ -19622,7 +19676,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19622
19676
  }
19623
19677
  }, [isLoadFinish]);
19624
19678
  const onPause = useCallback(() => {
19625
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19679
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19626
19680
  const item = data[index];
19627
19681
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19628
19682
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19633,14 +19687,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19633
19687
  eventSubject: 'playOverVideo',
19634
19688
  eventDescription: 'User finished playing the video',
19635
19689
  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 : '',
19636
- 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 : '',
19690
+ sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
19691
+ contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
19637
19692
  endTime: videoCurrentTime,
19638
19693
  videoDuration,
19639
19694
  playDuration,
19640
- 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 : []),
19695
+ contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
19641
19696
  position: index + '',
19642
19697
  contentFormat: 'video',
19643
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19698
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19644
19699
  }
19645
19700
  });
19646
19701
  }