pb-sxp-ui 1.16.18 → 1.16.20

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 +186 -218
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +186 -218
  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 +186 -218
  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 +8 -10
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +15 -17
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +13 -39
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +45 -32
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +3 -4
  19. package/es/core/components/SxpPageRender/index.js +37 -53
  20. package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
  21. package/es/core/context/SxpDataSourceProvider.js +59 -53
  22. package/es/core/hooks/useEventReport.js +5 -6
  23. package/lib/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  24. package/lib/core/components/SxpPageRender/LikeButton/index.js +15 -17
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +12 -38
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +45 -32
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -4
  29. package/lib/core/components/SxpPageRender/index.js +37 -53
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
  31. package/lib/core/context/SxpDataSourceProvider.js +59 -53
  32. package/lib/core/hooks/useEventReport.js +5 -6
  33. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -644,7 +644,6 @@ const DEFAULT_TAG = 'FOR U';
644
644
  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 }) => {
645
645
  var _a, _b, _c, _d, _e;
646
646
  const [rtcList, setRtcList] = React.useState([]);
647
- const [firstRtcList, setFirstRtcList] = React.useState([]);
648
647
  const [tagList, setTagList] = React.useState([]);
649
648
  const [loading, setLoading] = React.useState(true);
650
649
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
@@ -738,7 +737,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
738
737
  }, [bffDataSource]);
739
738
  // bff API 请求方法
740
739
  const bffFetch = React.useCallback((path, options, isBota = true) => {
741
- var _a, _b;
740
+ var _a;
742
741
  if (!bffDataSource)
743
742
  return;
744
743
  const url = bffDataSource.url;
@@ -752,7 +751,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
752
751
  val.split('=')[1];
753
752
  });
754
753
  return window
755
- .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
754
+ .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
756
755
  ? JSON.stringify({
757
756
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
758
757
  })
@@ -887,50 +886,66 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
887
886
  console.error('解析请求URL失败:', error);
888
887
  return _originalFetch.apply(this, arguments_1);
889
888
  }
890
- // 非GA4请求直接放行
891
- if (!url.includes('https://www.google-analytics.com/g/collect')) {
892
- return _originalFetch.apply(this, arguments_1);
893
- }
894
- // 检查是否是 GA4 收集端点
895
889
  try {
896
890
  // 1. 先执行原始请求
897
891
  const response = _originalFetch.apply(this, arguments_1);
898
- // 2. 检查请求是否成功 (HTTP 200-299)
899
- // 安全解析 URL
900
- const urlObj = new URL(url);
901
- const params = Object.fromEntries(urlObj.searchParams.entries());
902
- const body = (_a = arguments_1[1]) === null || _a === void 0 ? void 0 : _a.body;
903
- if (params === null || params === void 0 ? void 0 : params.en) {
904
- bffCollectEvent({
905
- eventName: params === null || params === void 0 ? void 0 : params.en,
906
- eventSource: 'Google Analytics'
907
- });
908
- }
909
- else if (body) {
910
- function extractAllEnValuesSplit(queryString) {
911
- if (typeof queryString !== 'string') {
912
- return [];
892
+ if (url.includes('https://i.giesswein.com/nb-collector')) {
893
+ if ((init === null || init === void 0 ? void 0 : init.method) === 'POST' && typeof (init === null || init === void 0 ? void 0 : init.body) === 'string') {
894
+ try {
895
+ const payload = JSON.parse(init.body);
896
+ if (payload && Array.isArray(payload.data)) {
897
+ payload.data.forEach((item) => {
898
+ if (item && item.e) {
899
+ bffCollectEvent({
900
+ eventName: item.e,
901
+ eventSource: 'Northbeam Pixel'
902
+ });
903
+ }
904
+ });
905
+ }
913
906
  }
914
- const matches = [];
915
- const regex = /en=([^&\r\n]*)/g;
916
- let match;
917
- while ((match = regex.exec(queryString)) !== null) {
918
- matches.push(decodeURIComponent(match[1]));
907
+ catch (e) {
908
+ console.error('Failed to parse Northbeam event', e);
919
909
  }
920
- return matches;
921
910
  }
922
- const enValues = extractAllEnValuesSplit(body);
923
- enValues === null || enValues === void 0 ? void 0 : enValues.forEach((en) => {
911
+ }
912
+ // 检查是否是 GA4 收集端点
913
+ if (url.includes('https://www.google-analytics.com/g/collect')) {
914
+ const urlObj = new URL(url);
915
+ const params = Object.fromEntries(urlObj.searchParams.entries());
916
+ const body = (_a = arguments_1[1]) === null || _a === void 0 ? void 0 : _a.body;
917
+ if (params === null || params === void 0 ? void 0 : params.en) {
924
918
  bffCollectEvent({
925
- eventName: en,
919
+ eventName: params === null || params === void 0 ? void 0 : params.en,
926
920
  eventSource: 'Google Analytics'
927
921
  });
928
- });
922
+ }
923
+ else if (body) {
924
+ function extractAllEnValuesSplit(queryString) {
925
+ if (typeof queryString !== 'string') {
926
+ return [];
927
+ }
928
+ const matches = [];
929
+ const regex = /en=([^&\r\n]*)/g;
930
+ let match;
931
+ while ((match = regex.exec(queryString)) !== null) {
932
+ matches.push(decodeURIComponent(match[1]));
933
+ }
934
+ return matches;
935
+ }
936
+ const enValues = extractAllEnValuesSplit(body);
937
+ enValues === null || enValues === void 0 ? void 0 : enValues.forEach((en) => {
938
+ bffCollectEvent({
939
+ eventName: en,
940
+ eventSource: 'Google Analytics'
941
+ });
942
+ });
943
+ }
929
944
  }
930
945
  return response;
931
946
  }
932
947
  catch (error) {
933
- console.error('处理 GA4 请求时出错:', error);
948
+ console.error(error);
934
949
  throw error;
935
950
  }
936
951
  });
@@ -996,9 +1011,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
996
1011
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
997
1012
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
998
1013
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
999
- if (isDiyH5) {
1000
- setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1001
- }
1002
1014
  }
1003
1015
  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));
1004
1016
  if (isNotNullList) {
@@ -1038,17 +1050,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1038
1050
  if (rtcList.length <= 0) {
1039
1051
  return;
1040
1052
  }
1041
- if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1042
- setRtcList(rtcList.concat(firstRtcList));
1043
- setCacheRtcList(cacheRtcList.concat(firstRtcList));
1044
- return;
1045
- }
1046
1053
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1047
1054
  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
1055
  setRtcList(rtcList.concat(getFilterRecList(data)));
1049
1056
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1050
1057
  return data;
1051
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
1058
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1052
1059
  const refreshFeSession = React.useCallback((enableReSid, event) => {
1053
1060
  var _a, _b, _c, _d, _e;
1054
1061
  let expire = false;
@@ -1178,7 +1185,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1178
1185
  return jsonParams;
1179
1186
  }, [fakeUserId]);
1180
1187
  const bffFbReport = React.useCallback(({ eventName, product }) => {
1181
- var _a, _b, _c, _d, _e, _f, _g, _h;
1188
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1182
1189
  if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
1183
1190
  return;
1184
1191
  }
@@ -1225,18 +1232,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1225
1232
  if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
1226
1233
  window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
1227
1234
  }
1228
- const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
1235
+ if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.Northbeam) === 'object' && typeof ((_f = window === null || window === void 0 ? void 0 : window.Northbeam) === null || _f === void 0 ? void 0 : _f.trackPageView) === 'function') {
1236
+ window === null || window === void 0 ? void 0 : window.Northbeam.trackPageView();
1237
+ }
1238
+ const converApiEventParamsJson = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _g === void 0 ? void 0 : _g[eventName];
1229
1239
  if (enabledMetaConversionApi && converApiEventParamsJson) {
1230
1240
  const body = getEventParamsByJson(converApiEventParamsJson, product);
1231
1241
  const params = {};
1232
1242
  const queryString = location.search.slice(1);
1233
- (_g = splitUrlParams(queryString)) === null || _g === void 0 ? void 0 : _g.forEach((val) => {
1243
+ (_h = splitUrlParams(queryString)) === null || _h === void 0 ? void 0 : _h.forEach((val) => {
1234
1244
  const key = val.split('=')[0];
1235
1245
  const value = val.split('=')[1];
1236
1246
  params[key] = value;
1237
1247
  });
1238
1248
  const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
1239
- bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_h = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _h === void 0 ? void 0 : _h['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
1249
+ bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_j = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _j === void 0 ? void 0 : _j['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
1240
1250
  method: 'POST',
1241
1251
  body,
1242
1252
  type: 'beacon'
@@ -1275,7 +1285,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1275
1285
  }
1276
1286
  }), [bffFetch, utmVal]);
1277
1287
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
1278
- 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;
1288
+ 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;
1279
1289
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1280
1290
  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);
1281
1291
  let fromKName = '';
@@ -1293,7 +1303,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1293
1303
  }
1294
1304
  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;
1295
1305
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1296
- 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 })
1306
+ 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 })
1297
1307
  });
1298
1308
  }, [bffEventReport, isFromHashtag]);
1299
1309
  const h5EnterLink = React.useCallback(() => {
@@ -1395,9 +1405,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1395
1405
  }
1396
1406
  setRtcList(list);
1397
1407
  setCacheRtcList(list);
1398
- if (isDiyH5) {
1399
- setFirstRtcList(list);
1400
- }
1401
1408
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1402
1409
  if (channel) {
1403
1410
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1433,9 +1440,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1433
1440
  }
1434
1441
  setRtcList(list);
1435
1442
  setCacheRtcList(list);
1436
- if (isDiyH5) {
1437
- setFirstRtcList(list);
1438
- }
1439
1443
  }
1440
1444
  })
1441
1445
  .finally(() => {
@@ -1499,8 +1503,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1499
1503
  refreshFeSession,
1500
1504
  getAccount,
1501
1505
  accountSonsent,
1502
- isDiyH5,
1503
- firstRtcList
1506
+ isDiyH5
1504
1507
  } }, 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({
1505
1508
  rtcList,
1506
1509
  mutateLike: bffMutateLike,
@@ -1961,14 +1964,14 @@ var settingRender$f = [
1961
1964
  * @Author: binruan@chatlabs.com
1962
1965
  * @Date: 2024-03-12 10:59:06
1963
1966
  * @LastEditors: binruan@chatlabs.com
1964
- * @LastEditTime: 2025-05-09 15:30:59
1967
+ * @LastEditTime: 2024-11-28 11:17:16
1965
1968
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1966
1969
  *
1967
1970
  */
1968
1971
  function useEventReport() {
1969
1972
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1970
1973
  const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
1971
- 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;
1974
+ 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;
1972
1975
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1973
1976
  if (i !== -1) {
1974
1977
  return;
@@ -2001,11 +2004,11 @@ function useEventReport() {
2001
2004
  contentFormat = 'image';
2002
2005
  }
2003
2006
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
2004
- 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 }))
2007
+ 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 }))
2005
2008
  });
2006
2009
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
2007
2010
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
2008
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2011
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2009
2012
  let fromKName = '';
2010
2013
  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))) {
2011
2014
  fromKName = 'pdpPage';
@@ -2024,9 +2027,8 @@ function useEventReport() {
2024
2027
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2025
2028
  position: position + '',
2026
2029
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2027
- 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 : '',
2028
2030
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2029
- 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 : '',
2031
+ 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 : '',
2030
2032
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2031
2033
  eventSubject: 'productView',
2032
2034
  eventDescription: 'User browsed the product'
@@ -15841,7 +15843,7 @@ function WaterfallList(_a) {
15841
15843
  * @Author: binruan@chatlabs.com
15842
15844
  * @Date: 2024-01-10 10:58:24
15843
15845
  * @LastEditors: binruan@chatlabs.com
15844
- * @LastEditTime: 2025-05-09 15:30:41
15846
+ * @LastEditTime: 2025-02-28 10:00:31
15845
15847
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15846
15848
  *
15847
15849
  */
@@ -15879,7 +15881,7 @@ const WaterFall = (props) => {
15879
15881
  }
15880
15882
  }, [waterFallData]);
15881
15883
  const reportTagsView = React.useCallback(() => {
15882
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15884
+ var _a, _b, _c, _d, _e, _f;
15883
15885
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15884
15886
  if (!rec)
15885
15887
  return;
@@ -15899,10 +15901,9 @@ const WaterFall = (props) => {
15899
15901
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15900
15902
  eventInfo: {
15901
15903
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15902
- 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 : '',
15903
15904
  position: cacheActiveIndex + '',
15904
- contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15905
- traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15905
+ contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15906
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15906
15907
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15907
15908
  fromKName,
15908
15909
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17984,7 +17985,7 @@ const LikeButton = (_a) => {
17984
17985
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17985
17986
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17986
17987
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17987
- 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;
17988
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17988
17989
  if (state) {
17989
17990
  // 先设置状态
17990
17991
  setState(false);
@@ -17994,12 +17995,11 @@ const LikeButton = (_a) => {
17994
17995
  eventSubject: 'favoriteContentCanceled',
17995
17996
  eventDescription: 'This content was unfavorite by the user',
17996
17997
  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 : '',
17997
- 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 : '',
17998
- 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 : '',
17999
- 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 : []),
17998
+ 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 : '',
17999
+ 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 : []),
18000
18000
  position: position + '',
18001
- contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18002
- traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18001
+ contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
18002
+ traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18003
18003
  }
18004
18004
  });
18005
18005
  // 如果接口调用失败,则回滚状态
@@ -18007,41 +18007,40 @@ const LikeButton = (_a) => {
18007
18007
  setState(true);
18008
18008
  }
18009
18009
  else {
18010
- const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18010
+ const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18011
18011
  if (index === position) {
18012
18012
  item.isCollected = false;
18013
18013
  }
18014
18014
  return item;
18015
- })) !== null && _s !== void 0 ? _s : [];
18015
+ })) !== null && _p !== void 0 ? _p : [];
18016
18016
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18017
18017
  }
18018
18018
  }
18019
18019
  else {
18020
18020
  setState(true);
18021
- const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
18021
+ const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18022
18022
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18023
18023
  eventInfo: {
18024
18024
  eventSubject: 'favoriteContent',
18025
18025
  eventDescription: 'This content was favorite by the user',
18026
- contentId: (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
18027
- sceneId: (_y = (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.scene) === null || _x === void 0 ? void 0 : _x.sceneId) !== null && _y !== void 0 ? _y : '',
18028
- contentName: (_0 = (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.title) !== null && _0 !== void 0 ? _0 : '',
18029
- contentTags: JSON.stringify((_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.tags) !== null && _2 !== void 0 ? _2 : []),
18026
+ 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 : '',
18027
+ 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 : '',
18028
+ 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 : []),
18030
18029
  position: position + '',
18031
- contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
18032
- traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
18030
+ contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18031
+ traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18033
18032
  }
18034
18033
  });
18035
18034
  if (!result) {
18036
18035
  setState(false);
18037
18036
  }
18038
18037
  else {
18039
- const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18038
+ const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18040
18039
  if (index === position) {
18041
18040
  item.isCollected = true;
18042
18041
  }
18043
18042
  return item;
18044
- })) !== null && _5 !== void 0 ? _5 : [];
18043
+ })) !== null && _z !== void 0 ? _z : [];
18045
18044
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18046
18045
  }
18047
18046
  }
@@ -18078,7 +18077,7 @@ const mountVideoPlayerAtNode = (() => {
18078
18077
  const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
18079
18078
  var _a, _b;
18080
18079
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
18081
- const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18080
+ const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18082
18081
  const videoStartTime = React.useRef(0);
18083
18082
  const [isLoadFinish, setIsLoadFinish] = React.useState(false);
18084
18083
  const { isActive } = useSwiperSlide();
@@ -18144,23 +18143,6 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18144
18143
  return;
18145
18144
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18146
18145
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18147
- const handleEnd = () => {
18148
- var _a, _b, _c, _d, _e, _f;
18149
- if (!videoRef.current)
18150
- return;
18151
- if (isDiyH5) {
18152
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18153
- if (!loopPlayRef.current)
18154
- return;
18155
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18156
- 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;
18157
- (_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);
18158
- }
18159
- }
18160
- else {
18161
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18162
- }
18163
- };
18164
18146
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18165
18147
  const handlePlaying = React.useCallback(() => {
18166
18148
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18169,7 +18151,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18169
18151
  setIsLoadFinish(true);
18170
18152
  }, []);
18171
18153
  const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18172
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18154
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18173
18155
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18174
18156
  return;
18175
18157
  setIsPauseVideo(false);
@@ -18180,11 +18162,16 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18180
18162
  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);
18181
18163
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18182
18164
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18183
- 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) + '' }))
18165
+ 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) + '' }))
18184
18166
  });
18185
18167
  isFirstPlayRef.current = false;
18186
18168
  }
18187
18169
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18170
+ const setCurrentTimeByStartTime = React.useCallback(() => {
18171
+ if (isDiyH5) {
18172
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18173
+ }
18174
+ }, []);
18188
18175
  const handLoadeddata = React.useCallback(() => {
18189
18176
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18190
18177
  return;
@@ -18209,12 +18196,13 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18209
18196
  const handleLoadedmetadata = React.useCallback(() => {
18210
18197
  if (!videoRef.current)
18211
18198
  return;
18199
+ setCurrentTimeByStartTime();
18212
18200
  loadedTimeRef.current = new Date();
18213
18201
  handleStartPlay();
18214
18202
  handLoadeddata();
18215
18203
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18216
18204
  const handleClickVideo = React.useCallback((type) => () => {
18217
- var _a, _b, _c, _d, _e;
18205
+ var _a, _b, _c, _d, _e, _f;
18218
18206
  if (!videoRef.current)
18219
18207
  return;
18220
18208
  if (!isLoadFinish)
@@ -18235,17 +18223,20 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18235
18223
  break;
18236
18224
  default:
18237
18225
  if (isPause) {
18238
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18226
+ 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)) {
18227
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18228
+ }
18229
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18239
18230
  }
18240
18231
  else {
18241
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18232
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18242
18233
  }
18243
18234
  setIsPauseVideo(!isPause);
18244
18235
  break;
18245
18236
  }
18246
18237
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18247
18238
  const handlePause = React.useCallback(() => {
18248
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18239
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18249
18240
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18250
18241
  return;
18251
18242
  if (activeIndex !== index)
@@ -18261,15 +18252,14 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18261
18252
  eventSubject: 'playOverVideo',
18262
18253
  eventDescription: 'User finished playing the video',
18263
18254
  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 : '',
18264
- 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 : '',
18265
- 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 : '',
18255
+ 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 : '',
18266
18256
  endTime: videoCurrentTime,
18267
18257
  videoDuration,
18268
18258
  playDuration,
18269
- 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 : []),
18259
+ 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 : []),
18270
18260
  position: index + '',
18271
18261
  contentFormat: 'video',
18272
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18262
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18273
18263
  }
18274
18264
  });
18275
18265
  }
@@ -18277,8 +18267,27 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18277
18267
  const handleWaiting = React.useCallback(() => {
18278
18268
  setWaiting(true);
18279
18269
  }, []);
18270
+ const handleTimeUpload = () => {
18271
+ if (!videoRef.current || !isDiyH5)
18272
+ return;
18273
+ setTimeout(() => {
18274
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18275
+ 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)) {
18276
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18277
+ if (!loopPlayRef.current)
18278
+ return;
18279
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18280
+ (_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);
18281
+ }
18282
+ else {
18283
+ 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;
18284
+ (_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);
18285
+ }
18286
+ }
18287
+ });
18288
+ };
18280
18289
  React.useEffect(() => {
18281
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18290
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18282
18291
  if (!isActive)
18283
18292
  return;
18284
18293
  const videoSrc = videoUrl;
@@ -18299,6 +18308,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18299
18308
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18300
18309
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18301
18310
  var _a;
18311
+ setCurrentTimeByStartTime();
18302
18312
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18303
18313
  });
18304
18314
  }
@@ -18312,11 +18322,12 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18312
18322
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18313
18323
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18314
18324
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18315
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18325
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18316
18326
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18317
18327
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18328
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18318
18329
  return () => {
18319
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18320
18331
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18321
18332
  if (!isPause)
18322
18333
  handlePause();
@@ -18328,9 +18339,10 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18328
18339
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18329
18340
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18330
18341
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18331
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18342
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18332
18343
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18333
18344
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18345
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18334
18346
  };
18335
18347
  }, [isActive]);
18336
18348
  React.useEffect(() => {
@@ -18541,45 +18553,19 @@ const Picture = (props) => {
18541
18553
  }, onLoad: onShowFirstImage }))));
18542
18554
  };
18543
18555
 
18544
- const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18556
+ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18545
18557
  var _a, _b;
18546
18558
  const { isActive } = useSwiperSlide();
18547
- const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18559
+ const { sxpParameter, openHashtag } = useSxpDataSource();
18548
18560
  const [isLoad, setIsLoad] = React.useState(false);
18549
18561
  const [imgInfo, setImgInfo] = React.useState();
18550
18562
  const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
18551
- const imgsSwiperRef = React.useRef();
18563
+ const swiperRef = React.useRef();
18552
18564
  const isFirstPlayRef = React.useRef(true);
18553
- const loopPlayRef = React.useRef(true);
18554
18565
  const initTime = new Date();
18555
- React.useImperativeHandle(ref, () => {
18556
- return {
18557
- setLoopPlay(v) {
18558
- loopPlayRef.current = v;
18559
- }
18560
- };
18561
- });
18562
- React.useEffect(() => {
18563
- let timerId;
18564
- if (isLoad && isActive && isDiyH5) {
18565
- timerId = setTimeout(() => {
18566
- var _a, _b, _c, _d;
18567
- if (!loopPlayRef.current)
18568
- return;
18569
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18570
- 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;
18571
- (_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);
18572
- }
18573
- }, 3000);
18574
- }
18575
- return () => {
18576
- if (timerId)
18577
- clearTimeout(timerId);
18578
- };
18579
- }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18580
18566
  React.useEffect(() => {
18581
18567
  if (isLoad && isActive) {
18582
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18568
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18583
18569
  if (openHashtag) {
18584
18570
  onViewImageEndEvent(rec);
18585
18571
  }
@@ -18589,7 +18575,7 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
18589
18575
  }
18590
18576
  }
18591
18577
  else {
18592
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18578
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18593
18579
  }
18594
18580
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18595
18581
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18616,13 +18602,13 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
18616
18602
  };
18617
18603
  }, [isActive, imgInfo]);
18618
18604
  const handleMouseEnter = React.useCallback(() => {
18619
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18620
- imgsSwiperRef.current.swiper.autoplay.stop();
18605
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18606
+ swiperRef.current.swiper.autoplay.stop();
18621
18607
  }
18622
18608
  }, []);
18623
18609
  const handleMouseLeave = React.useCallback(() => {
18624
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18625
- imgsSwiperRef.current.swiper.autoplay.start();
18610
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18611
+ swiperRef.current.swiper.autoplay.start();
18626
18612
  }
18627
18613
  }, []);
18628
18614
  const handleSlideChange = React.useCallback((swiper) => {
@@ -18643,7 +18629,7 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
18643
18629
  enabled: true
18644
18630
  }
18645
18631
  }
18646
- : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
18632
+ : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
18647
18633
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18648
18634
  fontSize: '14px'
18649
18635
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18660,7 +18646,7 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
18660
18646
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18661
18647
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18662
18648
  }))));
18663
- });
18649
+ };
18664
18650
  var PictureGroup$5 = React.memo(PictureGroup$4);
18665
18651
 
18666
18652
  /*
@@ -18940,7 +18926,7 @@ var NavBack$1 = React.memo(NavBack);
18940
18926
  * @Author: binruan@chatlabs.com
18941
18927
  * @Date: 2024-03-20 10:27:31
18942
18928
  * @LastEditors: binruan@chatlabs.com
18943
- * @LastEditTime: 2025-05-12 14:26:15
18929
+ * @LastEditTime: 2025-05-09 15:51:40
18944
18930
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18945
18931
  *
18946
18932
  */
@@ -18960,7 +18946,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18960
18946
  const skipLinkRef = React.useRef(false);
18961
18947
  const [pageNum, setPageNum] = React.useState(2);
18962
18948
  const videoWidgetRef = React.useRef(null);
18963
- const pictureGroupRef = React.useRef(null);
18964
18949
  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();
18965
18950
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18966
18951
  const isShowFingerTip = React.useMemo(() => {
@@ -19008,7 +18993,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19008
18993
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
19009
18994
  }, [data, ctaType, swiperRef]);
19010
18995
  const handleSessionCompleted = React.useCallback((fk) => {
19011
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18996
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
19012
18997
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
19013
18998
  let fromKName = '';
19014
18999
  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))) {
@@ -19035,13 +19020,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19035
19020
  eventSubject: 'sessionCompleted',
19036
19021
  eventDescription: 'Session completed',
19037
19022
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19038
- 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 : '',
19039
- productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19023
+ productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19040
19024
  position: activeIndex + '',
19041
19025
  fromKName: fk || fromKName,
19042
19026
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19043
- 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 : '',
19044
- 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 : ''
19027
+ 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 : '',
19028
+ 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 : ''
19045
19029
  }
19046
19030
  });
19047
19031
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -19100,9 +19084,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19100
19084
  refreshFeSession
19101
19085
  ]);
19102
19086
  const handleSessionExpire = React.useCallback(lodash.debounce(() => {
19103
- var _a, _b;
19087
+ var _a;
19104
19088
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19105
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19106
19089
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19107
19090
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19108
19091
  React.useEffect(() => {
@@ -19172,18 +19155,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19172
19155
  return null;
19173
19156
  }, [globalConfig, activeIndex, visList]);
19174
19157
  const renderContent = React.useCallback((rec, index) => {
19175
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19158
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19176
19159
  if (rec === 'organic menu') {
19177
19160
  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)));
19178
19161
  }
19179
- 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)) {
19162
+ if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19180
19163
  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 })));
19181
19164
  }
19182
- if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19183
- 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 })));
19165
+ if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19166
+ 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 }));
19184
19167
  }
19185
- 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) {
19186
- return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19168
+ 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) {
19169
+ return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19187
19170
  var _a, _b, _c, _d, _e, _f, _g, _h;
19188
19171
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19189
19172
  const Component = withBindDataSource(t);
@@ -19221,7 +19204,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19221
19204
  };
19222
19205
  }, [isShowMore]);
19223
19206
  const renderBottom = React.useCallback((rec, index) => {
19224
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19207
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19225
19208
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19226
19209
  let cta = null;
19227
19210
  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) {
@@ -19230,27 +19213,24 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19230
19213
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19231
19214
  cta = '商品CTA';
19232
19215
  }
19233
- 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)) {
19234
- cta = '服务CTA';
19235
- }
19236
19216
  else {
19237
- 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;
19217
+ 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;
19238
19218
  }
19239
19219
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19240
19220
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19241
19221
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19242
- ((_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));
19222
+ ((_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));
19243
19223
  return (React.createElement(React.Fragment, null,
19244
19224
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19245
- ((_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' }),
19246
- 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` } },
19225
+ ((_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' }),
19226
+ 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` } },
19247
19227
  React.createElement(Nudge, { nudge: nudge }),
19248
19228
  ((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' },
19249
19229
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19250
19230
  React.createElement("div", null,
19251
- 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 }),
19231
+ 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 }),
19252
19232
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19253
- 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) }))),
19233
+ 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) }))),
19254
19234
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19255
19235
  }
19256
19236
  return null;
@@ -19289,7 +19269,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19289
19269
  return null;
19290
19270
  }, [globalConfig, waterFallData]);
19291
19271
  const handleViewImageStartEnd = (item) => {
19292
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19272
+ var _a, _b, _c, _d, _e, _f;
19293
19273
  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)) {
19294
19274
  const endTime = Date.now();
19295
19275
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19298,11 +19278,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19298
19278
  eventSubject: 'viewImageCarouselEnd',
19299
19279
  eventDescription: 'User end view the image carousel',
19300
19280
  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 : '',
19301
- 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 : '',
19302
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19281
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19303
19282
  imageEndTime: `${endTime}`,
19304
19283
  playDuration: `${duration}`,
19305
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19284
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19306
19285
  position: activeIndex + '',
19307
19286
  contentFormat: 'image',
19308
19287
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19311,7 +19290,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19311
19290
  }
19312
19291
  };
19313
19292
  const handleSlideSkip = (item, position) => {
19314
- 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;
19293
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19315
19294
  if (isPreview || waterFallData)
19316
19295
  return;
19317
19296
  const t = new Date() - curTime.current;
@@ -19337,8 +19316,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19337
19316
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19338
19317
  position: position + '',
19339
19318
  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 : '',
19340
- 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 : '',
19341
- 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 : '',
19319
+ 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 : '',
19342
19320
  contentFormat
19343
19321
  }
19344
19322
  });
@@ -19348,7 +19326,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19348
19326
  }
19349
19327
  };
19350
19328
  const handleScrollEvent = (swiper) => {
19351
- 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;
19329
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19352
19330
  const item = data[swiper.previousIndex];
19353
19331
  if (!item)
19354
19332
  return;
@@ -19365,12 +19343,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19365
19343
  eventSubject: 'scrollDown',
19366
19344
  eventDescription: 'User scroll down',
19367
19345
  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 : '',
19368
- 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 : '',
19369
- 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 : '',
19346
+ 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 : '',
19370
19347
  requestId: null,
19371
- 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 : '',
19348
+ 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 : '',
19372
19349
  contentFormat,
19373
- position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19350
+ position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19374
19351
  }
19375
19352
  });
19376
19353
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19382,13 +19359,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19382
19359
  eventInfo: {
19383
19360
  eventSubject: 'scrollUp',
19384
19361
  eventDescription: 'User scroll up',
19385
- 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 : '',
19386
- 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 : '',
19387
- productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19362
+ 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 : '',
19363
+ productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19388
19364
  requestId: null,
19389
- 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 : '',
19365
+ 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 : '',
19390
19366
  contentFormat,
19391
- position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19367
+ position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19392
19368
  }
19393
19369
  });
19394
19370
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19414,7 +19390,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19414
19390
  }
19415
19391
  }, [openHashtag, data, activeIndex]);
19416
19392
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19417
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19393
+ var _a, _b, _c, _d, _e, _f, _g, _h;
19418
19394
  const item = data[activeIndex];
19419
19395
  // 如果是图片集则上报事件
19420
19396
  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)) {
@@ -19425,10 +19401,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19425
19401
  eventSubject: 'viewImageCarouselStart',
19426
19402
  eventDescription: 'User start view the image carousel',
19427
19403
  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 : '',
19428
- 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 : '',
19429
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19404
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19430
19405
  imageStartTime: `${startTime}`,
19431
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19406
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19432
19407
  position: activeIndex + '',
19433
19408
  contentFormat: 'image',
19434
19409
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19438,11 +19413,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19438
19413
  if (enableCapi) {
19439
19414
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19440
19415
  eventName: 'ViewContent',
19441
- product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19416
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19442
19417
  });
19443
19418
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19444
19419
  eventName: 'PageView',
19445
- product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19420
+ product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19446
19421
  });
19447
19422
  }
19448
19423
  }
@@ -19534,20 +19509,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19534
19509
  swiperRef.current.swiper.allowTouchMove = true;
19535
19510
  }, 500);
19536
19511
  }, onActiveIndexChange: (swiper) => {
19537
- var _a, _b;
19538
19512
  setActiveIndex(swiper.activeIndex);
19539
19513
  if (openHashtag)
19540
19514
  return;
19541
19515
  // 处理上滑下滑事件
19542
19516
  handleScrollEvent(swiper);
19543
- if (waterFallData || isEditor)
19517
+ if (waterFallData || isEditor || isDiyH5)
19544
19518
  return;
19545
19519
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19546
19520
  if (!isLoadMore) {
19547
- if (isDiyH5) {
19548
- (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19549
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19550
- }
19551
19521
  setIsLoadMore(true);
19552
19522
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19553
19523
  var _a;
@@ -19600,7 +19570,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19600
19570
  }, []);
19601
19571
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19602
19572
  const handlePlaying = React.useCallback(() => {
19603
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19573
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19604
19574
  setIsPauseVideo(false);
19605
19575
  const item = data[index];
19606
19576
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19613,15 +19583,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19613
19583
  eventSubject: 'playVideo',
19614
19584
  eventDescription: 'User played the video',
19615
19585
  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 : '',
19616
- 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 : '',
19617
- 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 : '',
19586
+ 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 : '',
19618
19587
  playType,
19619
19588
  startTime: videoCurrentTime,
19620
19589
  videoDuration,
19621
- 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 : []),
19590
+ 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 : []),
19622
19591
  position: index + '',
19623
19592
  contentFormat: 'video',
19624
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19593
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19625
19594
  }
19626
19595
  });
19627
19596
  setIsFirstPlay(false);
@@ -19660,7 +19629,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19660
19629
  }
19661
19630
  }, [isLoadFinish]);
19662
19631
  const onPause = React.useCallback(() => {
19663
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19632
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19664
19633
  const item = data[index];
19665
19634
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19666
19635
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19671,15 +19640,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19671
19640
  eventSubject: 'playOverVideo',
19672
19641
  eventDescription: 'User finished playing the video',
19673
19642
  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 : '',
19674
- 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 : '',
19675
- 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 : '',
19643
+ 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 : '',
19676
19644
  endTime: videoCurrentTime,
19677
19645
  videoDuration,
19678
19646
  playDuration,
19679
- 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 : []),
19647
+ 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 : []),
19680
19648
  position: index + '',
19681
19649
  contentFormat: 'video',
19682
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19650
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19683
19651
  }
19684
19652
  });
19685
19653
  }