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.js CHANGED
@@ -622,7 +622,6 @@ const DEFAULT_TAG = 'FOR U';
622
622
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
623
623
  var _a, _b, _c, _d, _e;
624
624
  const [rtcList, setRtcList] = useState([]);
625
- const [firstRtcList, setFirstRtcList] = useState([]);
626
625
  const [tagList, setTagList] = useState([]);
627
626
  const [loading, setLoading] = useState(true);
628
627
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -716,7 +715,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
716
715
  }, [bffDataSource]);
717
716
  // bff API 请求方法
718
717
  const bffFetch = useCallback((path, options, isBota = true) => {
719
- var _a, _b;
718
+ var _a;
720
719
  if (!bffDataSource)
721
720
  return;
722
721
  const url = bffDataSource.url;
@@ -730,7 +729,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
730
729
  val.split('=')[1];
731
730
  });
732
731
  return window
733
- .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
732
+ .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
734
733
  ? JSON.stringify({
735
734
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
736
735
  })
@@ -865,50 +864,66 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
865
864
  console.error('解析请求URL失败:', error);
866
865
  return _originalFetch.apply(this, arguments_1);
867
866
  }
868
- // 非GA4请求直接放行
869
- if (!url.includes('https://www.google-analytics.com/g/collect')) {
870
- return _originalFetch.apply(this, arguments_1);
871
- }
872
- // 检查是否是 GA4 收集端点
873
867
  try {
874
868
  // 1. 先执行原始请求
875
869
  const response = _originalFetch.apply(this, arguments_1);
876
- // 2. 检查请求是否成功 (HTTP 200-299)
877
- // 安全解析 URL
878
- const urlObj = new URL(url);
879
- const params = Object.fromEntries(urlObj.searchParams.entries());
880
- const body = (_a = arguments_1[1]) === null || _a === void 0 ? void 0 : _a.body;
881
- if (params === null || params === void 0 ? void 0 : params.en) {
882
- bffCollectEvent({
883
- eventName: params === null || params === void 0 ? void 0 : params.en,
884
- eventSource: 'Google Analytics'
885
- });
886
- }
887
- else if (body) {
888
- function extractAllEnValuesSplit(queryString) {
889
- if (typeof queryString !== 'string') {
890
- return [];
870
+ if (url.includes('https://i.giesswein.com/nb-collector')) {
871
+ if ((init === null || init === void 0 ? void 0 : init.method) === 'POST' && typeof (init === null || init === void 0 ? void 0 : init.body) === 'string') {
872
+ try {
873
+ const payload = JSON.parse(init.body);
874
+ if (payload && Array.isArray(payload.data)) {
875
+ payload.data.forEach((item) => {
876
+ if (item && item.e) {
877
+ bffCollectEvent({
878
+ eventName: item.e,
879
+ eventSource: 'Northbeam Pixel'
880
+ });
881
+ }
882
+ });
883
+ }
891
884
  }
892
- const matches = [];
893
- const regex = /en=([^&\r\n]*)/g;
894
- let match;
895
- while ((match = regex.exec(queryString)) !== null) {
896
- matches.push(decodeURIComponent(match[1]));
885
+ catch (e) {
886
+ console.error('Failed to parse Northbeam event', e);
897
887
  }
898
- return matches;
899
888
  }
900
- const enValues = extractAllEnValuesSplit(body);
901
- enValues === null || enValues === void 0 ? void 0 : enValues.forEach((en) => {
889
+ }
890
+ // 检查是否是 GA4 收集端点
891
+ if (url.includes('https://www.google-analytics.com/g/collect')) {
892
+ const urlObj = new URL(url);
893
+ const params = Object.fromEntries(urlObj.searchParams.entries());
894
+ const body = (_a = arguments_1[1]) === null || _a === void 0 ? void 0 : _a.body;
895
+ if (params === null || params === void 0 ? void 0 : params.en) {
902
896
  bffCollectEvent({
903
- eventName: en,
897
+ eventName: params === null || params === void 0 ? void 0 : params.en,
904
898
  eventSource: 'Google Analytics'
905
899
  });
906
- });
900
+ }
901
+ else if (body) {
902
+ function extractAllEnValuesSplit(queryString) {
903
+ if (typeof queryString !== 'string') {
904
+ return [];
905
+ }
906
+ const matches = [];
907
+ const regex = /en=([^&\r\n]*)/g;
908
+ let match;
909
+ while ((match = regex.exec(queryString)) !== null) {
910
+ matches.push(decodeURIComponent(match[1]));
911
+ }
912
+ return matches;
913
+ }
914
+ const enValues = extractAllEnValuesSplit(body);
915
+ enValues === null || enValues === void 0 ? void 0 : enValues.forEach((en) => {
916
+ bffCollectEvent({
917
+ eventName: en,
918
+ eventSource: 'Google Analytics'
919
+ });
920
+ });
921
+ }
907
922
  }
908
923
  return response;
909
924
  }
910
925
  catch (error) {
911
- console.error('处理 GA4 请求时出错:', error);
926
+ console.error(error);
912
927
  throw error;
913
928
  }
914
929
  });
@@ -974,9 +989,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
974
989
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
975
990
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
976
991
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
977
- if (isDiyH5) {
978
- setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
979
- }
980
992
  }
981
993
  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));
982
994
  if (isNotNullList) {
@@ -1016,17 +1028,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1016
1028
  if (rtcList.length <= 0) {
1017
1029
  return;
1018
1030
  }
1019
- if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1020
- setRtcList(rtcList.concat(firstRtcList));
1021
- setCacheRtcList(cacheRtcList.concat(firstRtcList));
1022
- return;
1023
- }
1024
1031
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1025
1032
  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 })));
1026
1033
  setRtcList(rtcList.concat(getFilterRecList(data)));
1027
1034
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1028
1035
  return data;
1029
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
1036
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1030
1037
  const refreshFeSession = useCallback((enableReSid, event) => {
1031
1038
  var _a, _b, _c, _d, _e;
1032
1039
  let expire = false;
@@ -1156,7 +1163,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1156
1163
  return jsonParams;
1157
1164
  }, [fakeUserId]);
1158
1165
  const bffFbReport = useCallback(({ eventName, product }) => {
1159
- var _a, _b, _c, _d, _e, _f, _g, _h;
1166
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1160
1167
  if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
1161
1168
  return;
1162
1169
  }
@@ -1203,18 +1210,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1203
1210
  if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
1204
1211
  window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
1205
1212
  }
1206
- const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
1213
+ 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') {
1214
+ window === null || window === void 0 ? void 0 : window.Northbeam.trackPageView();
1215
+ }
1216
+ const converApiEventParamsJson = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _g === void 0 ? void 0 : _g[eventName];
1207
1217
  if (enabledMetaConversionApi && converApiEventParamsJson) {
1208
1218
  const body = getEventParamsByJson(converApiEventParamsJson, product);
1209
1219
  const params = {};
1210
1220
  const queryString = location.search.slice(1);
1211
- (_g = splitUrlParams(queryString)) === null || _g === void 0 ? void 0 : _g.forEach((val) => {
1221
+ (_h = splitUrlParams(queryString)) === null || _h === void 0 ? void 0 : _h.forEach((val) => {
1212
1222
  const key = val.split('=')[0];
1213
1223
  const value = val.split('=')[1];
1214
1224
  params[key] = value;
1215
1225
  });
1216
1226
  const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
1217
- 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)}` : ''}`, {
1227
+ 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)}` : ''}`, {
1218
1228
  method: 'POST',
1219
1229
  body,
1220
1230
  type: 'beacon'
@@ -1253,7 +1263,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1253
1263
  }
1254
1264
  }), [bffFetch, utmVal]);
1255
1265
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
1256
- 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;
1266
+ 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;
1257
1267
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1258
1268
  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);
1259
1269
  let fromKName = '';
@@ -1271,7 +1281,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1271
1281
  }
1272
1282
  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;
1273
1283
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1274
- 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 })
1284
+ 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 })
1275
1285
  });
1276
1286
  }, [bffEventReport, isFromHashtag]);
1277
1287
  const h5EnterLink = useCallback(() => {
@@ -1373,9 +1383,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1373
1383
  }
1374
1384
  setRtcList(list);
1375
1385
  setCacheRtcList(list);
1376
- if (isDiyH5) {
1377
- setFirstRtcList(list);
1378
- }
1379
1386
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1380
1387
  if (channel) {
1381
1388
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1411,9 +1418,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1411
1418
  }
1412
1419
  setRtcList(list);
1413
1420
  setCacheRtcList(list);
1414
- if (isDiyH5) {
1415
- setFirstRtcList(list);
1416
- }
1417
1421
  }
1418
1422
  })
1419
1423
  .finally(() => {
@@ -1477,8 +1481,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1477
1481
  refreshFeSession,
1478
1482
  getAccount,
1479
1483
  accountSonsent,
1480
- isDiyH5,
1481
- firstRtcList
1484
+ isDiyH5
1482
1485
  } }, 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({
1483
1486
  rtcList,
1484
1487
  mutateLike: bffMutateLike,
@@ -1939,14 +1942,14 @@ var settingRender$f = [
1939
1942
  * @Author: binruan@chatlabs.com
1940
1943
  * @Date: 2024-03-12 10:59:06
1941
1944
  * @LastEditors: binruan@chatlabs.com
1942
- * @LastEditTime: 2025-05-09 15:30:59
1945
+ * @LastEditTime: 2024-11-28 11:17:16
1943
1946
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1944
1947
  *
1945
1948
  */
1946
1949
  function useEventReport() {
1947
1950
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1948
1951
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
1949
- 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;
1952
+ 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;
1950
1953
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1951
1954
  if (i !== -1) {
1952
1955
  return;
@@ -1979,11 +1982,11 @@ function useEventReport() {
1979
1982
  contentFormat = 'image';
1980
1983
  }
1981
1984
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1982
- 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 }))
1985
+ 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 }))
1983
1986
  });
1984
1987
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1985
1988
  const productView = useCallback((data, product, cta, viewTime, position) => {
1986
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1989
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1987
1990
  let fromKName = '';
1988
1991
  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))) {
1989
1992
  fromKName = 'pdpPage';
@@ -2002,9 +2005,8 @@ function useEventReport() {
2002
2005
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2003
2006
  position: position + '',
2004
2007
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2005
- 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 : '',
2006
2008
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2007
- 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 : '',
2009
+ 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 : '',
2008
2010
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2009
2011
  eventSubject: 'productView',
2010
2012
  eventDescription: 'User browsed the product'
@@ -15819,7 +15821,7 @@ function WaterfallList(_a) {
15819
15821
  * @Author: binruan@chatlabs.com
15820
15822
  * @Date: 2024-01-10 10:58:24
15821
15823
  * @LastEditors: binruan@chatlabs.com
15822
- * @LastEditTime: 2025-05-09 15:30:41
15824
+ * @LastEditTime: 2025-02-28 10:00:31
15823
15825
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15824
15826
  *
15825
15827
  */
@@ -15857,7 +15859,7 @@ const WaterFall = (props) => {
15857
15859
  }
15858
15860
  }, [waterFallData]);
15859
15861
  const reportTagsView = useCallback(() => {
15860
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15862
+ var _a, _b, _c, _d, _e, _f;
15861
15863
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15862
15864
  if (!rec)
15863
15865
  return;
@@ -15877,10 +15879,9 @@ const WaterFall = (props) => {
15877
15879
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15878
15880
  eventInfo: {
15879
15881
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15880
- 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 : '',
15881
15882
  position: cacheActiveIndex + '',
15882
- contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15883
- traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15883
+ contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15884
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15884
15885
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15885
15886
  fromKName,
15886
15887
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17962,7 +17963,7 @@ const LikeButton = (_a) => {
17962
17963
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17963
17964
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17964
17965
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17965
- 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;
17966
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17966
17967
  if (state) {
17967
17968
  // 先设置状态
17968
17969
  setState(false);
@@ -17972,12 +17973,11 @@ const LikeButton = (_a) => {
17972
17973
  eventSubject: 'favoriteContentCanceled',
17973
17974
  eventDescription: 'This content was unfavorite by the user',
17974
17975
  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 : '',
17975
- 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 : '',
17976
- 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 : '',
17977
- 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 : []),
17976
+ 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 : '',
17977
+ 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 : []),
17978
17978
  position: position + '',
17979
- contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
17980
- traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17979
+ contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17980
+ traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
17981
17981
  }
17982
17982
  });
17983
17983
  // 如果接口调用失败,则回滚状态
@@ -17985,41 +17985,40 @@ const LikeButton = (_a) => {
17985
17985
  setState(true);
17986
17986
  }
17987
17987
  else {
17988
- const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17988
+ const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17989
17989
  if (index === position) {
17990
17990
  item.isCollected = false;
17991
17991
  }
17992
17992
  return item;
17993
- })) !== null && _s !== void 0 ? _s : [];
17993
+ })) !== null && _p !== void 0 ? _p : [];
17994
17994
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17995
17995
  }
17996
17996
  }
17997
17997
  else {
17998
17998
  setState(true);
17999
- const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
17999
+ const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18000
18000
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18001
18001
  eventInfo: {
18002
18002
  eventSubject: 'favoriteContent',
18003
18003
  eventDescription: 'This content was favorite by the user',
18004
- 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 : '',
18005
- 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 : '',
18006
- 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 : '',
18007
- 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 : []),
18004
+ 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 : '',
18005
+ 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 : '',
18006
+ 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 : []),
18008
18007
  position: position + '',
18009
- contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
18010
- traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
18008
+ contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18009
+ traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18011
18010
  }
18012
18011
  });
18013
18012
  if (!result) {
18014
18013
  setState(false);
18015
18014
  }
18016
18015
  else {
18017
- const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18016
+ const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18018
18017
  if (index === position) {
18019
18018
  item.isCollected = true;
18020
18019
  }
18021
18020
  return item;
18022
- })) !== null && _5 !== void 0 ? _5 : [];
18021
+ })) !== null && _z !== void 0 ? _z : [];
18023
18022
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18024
18023
  }
18025
18024
  }
@@ -18056,7 +18055,7 @@ const mountVideoPlayerAtNode = (() => {
18056
18055
  const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
18057
18056
  var _a, _b;
18058
18057
  const [isPauseVideo, setIsPauseVideo] = useState(false);
18059
- const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18058
+ const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18060
18059
  const videoStartTime = useRef(0);
18061
18060
  const [isLoadFinish, setIsLoadFinish] = useState(false);
18062
18061
  const { isActive } = useSwiperSlide();
@@ -18122,23 +18121,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18122
18121
  return;
18123
18122
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18124
18123
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18125
- const handleEnd = () => {
18126
- var _a, _b, _c, _d, _e, _f;
18127
- if (!videoRef.current)
18128
- return;
18129
- if (isDiyH5) {
18130
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18131
- if (!loopPlayRef.current)
18132
- return;
18133
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18134
- 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;
18135
- (_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);
18136
- }
18137
- }
18138
- else {
18139
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18140
- }
18141
- };
18142
18124
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18143
18125
  const handlePlaying = useCallback(() => {
18144
18126
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18147,7 +18129,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18147
18129
  setIsLoadFinish(true);
18148
18130
  }, []);
18149
18131
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18150
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18132
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18151
18133
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18152
18134
  return;
18153
18135
  setIsPauseVideo(false);
@@ -18158,11 +18140,16 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18158
18140
  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);
18159
18141
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18160
18142
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18161
- 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) + '' }))
18143
+ 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) + '' }))
18162
18144
  });
18163
18145
  isFirstPlayRef.current = false;
18164
18146
  }
18165
18147
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18148
+ const setCurrentTimeByStartTime = useCallback(() => {
18149
+ if (isDiyH5) {
18150
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18151
+ }
18152
+ }, []);
18166
18153
  const handLoadeddata = useCallback(() => {
18167
18154
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18168
18155
  return;
@@ -18187,12 +18174,13 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18187
18174
  const handleLoadedmetadata = useCallback(() => {
18188
18175
  if (!videoRef.current)
18189
18176
  return;
18177
+ setCurrentTimeByStartTime();
18190
18178
  loadedTimeRef.current = new Date();
18191
18179
  handleStartPlay();
18192
18180
  handLoadeddata();
18193
18181
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18194
18182
  const handleClickVideo = useCallback((type) => () => {
18195
- var _a, _b, _c, _d, _e;
18183
+ var _a, _b, _c, _d, _e, _f;
18196
18184
  if (!videoRef.current)
18197
18185
  return;
18198
18186
  if (!isLoadFinish)
@@ -18213,17 +18201,20 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18213
18201
  break;
18214
18202
  default:
18215
18203
  if (isPause) {
18216
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18204
+ 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)) {
18205
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18206
+ }
18207
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18217
18208
  }
18218
18209
  else {
18219
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18210
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18220
18211
  }
18221
18212
  setIsPauseVideo(!isPause);
18222
18213
  break;
18223
18214
  }
18224
18215
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18225
18216
  const handlePause = useCallback(() => {
18226
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18217
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18227
18218
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18228
18219
  return;
18229
18220
  if (activeIndex !== index)
@@ -18239,15 +18230,14 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18239
18230
  eventSubject: 'playOverVideo',
18240
18231
  eventDescription: 'User finished playing the video',
18241
18232
  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 : '',
18242
- 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 : '',
18243
- 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 : '',
18233
+ 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 : '',
18244
18234
  endTime: videoCurrentTime,
18245
18235
  videoDuration,
18246
18236
  playDuration,
18247
- 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 : []),
18237
+ 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 : []),
18248
18238
  position: index + '',
18249
18239
  contentFormat: 'video',
18250
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18240
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18251
18241
  }
18252
18242
  });
18253
18243
  }
@@ -18255,8 +18245,27 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18255
18245
  const handleWaiting = useCallback(() => {
18256
18246
  setWaiting(true);
18257
18247
  }, []);
18248
+ const handleTimeUpload = () => {
18249
+ if (!videoRef.current || !isDiyH5)
18250
+ return;
18251
+ setTimeout(() => {
18252
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18253
+ 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)) {
18254
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18255
+ if (!loopPlayRef.current)
18256
+ return;
18257
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18258
+ (_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);
18259
+ }
18260
+ else {
18261
+ 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;
18262
+ (_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);
18263
+ }
18264
+ }
18265
+ });
18266
+ };
18258
18267
  useEffect(() => {
18259
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18268
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18260
18269
  if (!isActive)
18261
18270
  return;
18262
18271
  const videoSrc = videoUrl;
@@ -18277,6 +18286,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18277
18286
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18278
18287
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18279
18288
  var _a;
18289
+ setCurrentTimeByStartTime();
18280
18290
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18281
18291
  });
18282
18292
  }
@@ -18290,11 +18300,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18290
18300
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18291
18301
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18292
18302
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18293
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18303
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18294
18304
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18295
18305
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18306
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18296
18307
  return () => {
18297
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18308
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18298
18309
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18299
18310
  if (!isPause)
18300
18311
  handlePause();
@@ -18306,9 +18317,10 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18306
18317
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18307
18318
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18308
18319
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18309
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18320
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18310
18321
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18311
18322
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18323
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18312
18324
  };
18313
18325
  }, [isActive]);
18314
18326
  useEffect(() => {
@@ -18519,45 +18531,19 @@ const Picture = (props) => {
18519
18531
  }, onLoad: onShowFirstImage }))));
18520
18532
  };
18521
18533
 
18522
- const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18534
+ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18523
18535
  var _a, _b;
18524
18536
  const { isActive } = useSwiperSlide();
18525
- const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18537
+ const { sxpParameter, openHashtag } = useSxpDataSource();
18526
18538
  const [isLoad, setIsLoad] = useState(false);
18527
18539
  const [imgInfo, setImgInfo] = useState();
18528
18540
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18529
- const imgsSwiperRef = useRef();
18541
+ const swiperRef = useRef();
18530
18542
  const isFirstPlayRef = useRef(true);
18531
- const loopPlayRef = useRef(true);
18532
18543
  const initTime = new Date();
18533
- useImperativeHandle(ref, () => {
18534
- return {
18535
- setLoopPlay(v) {
18536
- loopPlayRef.current = v;
18537
- }
18538
- };
18539
- });
18540
- useEffect(() => {
18541
- let timerId;
18542
- if (isLoad && isActive && isDiyH5) {
18543
- timerId = setTimeout(() => {
18544
- var _a, _b, _c, _d;
18545
- if (!loopPlayRef.current)
18546
- return;
18547
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18548
- 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;
18549
- (_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);
18550
- }
18551
- }, 3000);
18552
- }
18553
- return () => {
18554
- if (timerId)
18555
- clearTimeout(timerId);
18556
- };
18557
- }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18558
18544
  useEffect(() => {
18559
18545
  if (isLoad && isActive) {
18560
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18546
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18561
18547
  if (openHashtag) {
18562
18548
  onViewImageEndEvent(rec);
18563
18549
  }
@@ -18567,7 +18553,7 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18567
18553
  }
18568
18554
  }
18569
18555
  else {
18570
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18556
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18571
18557
  }
18572
18558
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18573
18559
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18594,13 +18580,13 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18594
18580
  };
18595
18581
  }, [isActive, imgInfo]);
18596
18582
  const handleMouseEnter = useCallback(() => {
18597
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18598
- imgsSwiperRef.current.swiper.autoplay.stop();
18583
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18584
+ swiperRef.current.swiper.autoplay.stop();
18599
18585
  }
18600
18586
  }, []);
18601
18587
  const handleMouseLeave = useCallback(() => {
18602
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18603
- imgsSwiperRef.current.swiper.autoplay.start();
18588
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18589
+ swiperRef.current.swiper.autoplay.start();
18604
18590
  }
18605
18591
  }, []);
18606
18592
  const handleSlideChange = useCallback((swiper) => {
@@ -18621,7 +18607,7 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18621
18607
  enabled: true
18622
18608
  }
18623
18609
  }
18624
- : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18610
+ : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18625
18611
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18626
18612
  fontSize: '14px'
18627
18613
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18638,7 +18624,7 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18638
18624
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18639
18625
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18640
18626
  }))));
18641
- });
18627
+ };
18642
18628
  var PictureGroup$5 = memo(PictureGroup$4);
18643
18629
 
18644
18630
  /*
@@ -18918,7 +18904,7 @@ var NavBack$1 = memo(NavBack);
18918
18904
  * @Author: binruan@chatlabs.com
18919
18905
  * @Date: 2024-03-20 10:27:31
18920
18906
  * @LastEditors: binruan@chatlabs.com
18921
- * @LastEditTime: 2025-05-12 14:26:15
18907
+ * @LastEditTime: 2025-05-09 15:51:40
18922
18908
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18923
18909
  *
18924
18910
  */
@@ -18938,7 +18924,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18938
18924
  const skipLinkRef = useRef(false);
18939
18925
  const [pageNum, setPageNum] = useState(2);
18940
18926
  const videoWidgetRef = useRef(null);
18941
- const pictureGroupRef = useRef(null);
18942
18927
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
18943
18928
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18944
18929
  const isShowFingerTip = useMemo(() => {
@@ -18986,7 +18971,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18986
18971
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18987
18972
  }, [data, ctaType, swiperRef]);
18988
18973
  const handleSessionCompleted = useCallback((fk) => {
18989
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18974
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
18990
18975
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18991
18976
  let fromKName = '';
18992
18977
  if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
@@ -19013,13 +18998,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19013
18998
  eventSubject: 'sessionCompleted',
19014
18999
  eventDescription: 'Session completed',
19015
19000
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19016
- 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 : '',
19017
- productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19001
+ productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19018
19002
  position: activeIndex + '',
19019
19003
  fromKName: fk || fromKName,
19020
19004
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19021
- 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 : '',
19022
- 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 : ''
19005
+ 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 : '',
19006
+ 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 : ''
19023
19007
  }
19024
19008
  });
19025
19009
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -19078,9 +19062,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19078
19062
  refreshFeSession
19079
19063
  ]);
19080
19064
  const handleSessionExpire = useCallback(debounce(() => {
19081
- var _a, _b;
19065
+ var _a;
19082
19066
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19083
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19084
19067
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19085
19068
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19086
19069
  useEffect(() => {
@@ -19150,18 +19133,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19150
19133
  return null;
19151
19134
  }, [globalConfig, activeIndex, visList]);
19152
19135
  const renderContent = useCallback((rec, index) => {
19153
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19136
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19154
19137
  if (rec === 'organic menu') {
19155
19138
  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)));
19156
19139
  }
19157
- 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)) {
19140
+ if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19158
19141
  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 })));
19159
19142
  }
19160
- if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19161
- 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 })));
19143
+ if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19144
+ 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 }));
19162
19145
  }
19163
- 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) {
19164
- return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19146
+ 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) {
19147
+ return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19165
19148
  var _a, _b, _c, _d, _e, _f, _g, _h;
19166
19149
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19167
19150
  const Component = withBindDataSource(t);
@@ -19199,7 +19182,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19199
19182
  };
19200
19183
  }, [isShowMore]);
19201
19184
  const renderBottom = useCallback((rec, index) => {
19202
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19185
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19203
19186
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19204
19187
  let cta = null;
19205
19188
  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) {
@@ -19208,27 +19191,24 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19208
19191
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19209
19192
  cta = '商品CTA';
19210
19193
  }
19211
- 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)) {
19212
- cta = '服务CTA';
19213
- }
19214
19194
  else {
19215
- 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;
19195
+ 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;
19216
19196
  }
19217
19197
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19218
19198
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19219
19199
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19220
- ((_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));
19200
+ ((_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));
19221
19201
  return (React.createElement(React.Fragment, null,
19222
19202
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19223
- ((_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' }),
19224
- 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` } },
19203
+ ((_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' }),
19204
+ 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` } },
19225
19205
  React.createElement(Nudge, { nudge: nudge }),
19226
19206
  ((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' },
19227
19207
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19228
19208
  React.createElement("div", null,
19229
- 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 }),
19209
+ 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 }),
19230
19210
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19231
- 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) }))),
19211
+ 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) }))),
19232
19212
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19233
19213
  }
19234
19214
  return null;
@@ -19267,7 +19247,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19267
19247
  return null;
19268
19248
  }, [globalConfig, waterFallData]);
19269
19249
  const handleViewImageStartEnd = (item) => {
19270
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19250
+ var _a, _b, _c, _d, _e, _f;
19271
19251
  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)) {
19272
19252
  const endTime = Date.now();
19273
19253
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19276,11 +19256,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19276
19256
  eventSubject: 'viewImageCarouselEnd',
19277
19257
  eventDescription: 'User end view the image carousel',
19278
19258
  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 : '',
19279
- 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 : '',
19280
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19259
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19281
19260
  imageEndTime: `${endTime}`,
19282
19261
  playDuration: `${duration}`,
19283
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19262
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19284
19263
  position: activeIndex + '',
19285
19264
  contentFormat: 'image',
19286
19265
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19289,7 +19268,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19289
19268
  }
19290
19269
  };
19291
19270
  const handleSlideSkip = (item, position) => {
19292
- 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;
19271
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19293
19272
  if (isPreview || waterFallData)
19294
19273
  return;
19295
19274
  const t = new Date() - curTime.current;
@@ -19315,8 +19294,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19315
19294
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19316
19295
  position: position + '',
19317
19296
  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 : '',
19318
- 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 : '',
19319
- 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 : '',
19297
+ 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 : '',
19320
19298
  contentFormat
19321
19299
  }
19322
19300
  });
@@ -19326,7 +19304,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19326
19304
  }
19327
19305
  };
19328
19306
  const handleScrollEvent = (swiper) => {
19329
- 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;
19307
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19330
19308
  const item = data[swiper.previousIndex];
19331
19309
  if (!item)
19332
19310
  return;
@@ -19343,12 +19321,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19343
19321
  eventSubject: 'scrollDown',
19344
19322
  eventDescription: 'User scroll down',
19345
19323
  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 : '',
19346
- 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 : '',
19347
- 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 : '',
19324
+ 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 : '',
19348
19325
  requestId: null,
19349
- 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 : '',
19326
+ 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 : '',
19350
19327
  contentFormat,
19351
- position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19328
+ position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19352
19329
  }
19353
19330
  });
19354
19331
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19360,13 +19337,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19360
19337
  eventInfo: {
19361
19338
  eventSubject: 'scrollUp',
19362
19339
  eventDescription: 'User scroll up',
19363
- 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 : '',
19364
- 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 : '',
19365
- productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19340
+ 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 : '',
19341
+ productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19366
19342
  requestId: null,
19367
- 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 : '',
19343
+ 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 : '',
19368
19344
  contentFormat,
19369
- position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19345
+ position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19370
19346
  }
19371
19347
  });
19372
19348
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19392,7 +19368,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19392
19368
  }
19393
19369
  }, [openHashtag, data, activeIndex]);
19394
19370
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19395
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19371
+ var _a, _b, _c, _d, _e, _f, _g, _h;
19396
19372
  const item = data[activeIndex];
19397
19373
  // 如果是图片集则上报事件
19398
19374
  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)) {
@@ -19403,10 +19379,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19403
19379
  eventSubject: 'viewImageCarouselStart',
19404
19380
  eventDescription: 'User start view the image carousel',
19405
19381
  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 : '',
19406
- 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 : '',
19407
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19382
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19408
19383
  imageStartTime: `${startTime}`,
19409
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19384
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19410
19385
  position: activeIndex + '',
19411
19386
  contentFormat: 'image',
19412
19387
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19416,11 +19391,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19416
19391
  if (enableCapi) {
19417
19392
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19418
19393
  eventName: 'ViewContent',
19419
- product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19394
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19420
19395
  });
19421
19396
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19422
19397
  eventName: 'PageView',
19423
- product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19398
+ product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19424
19399
  });
19425
19400
  }
19426
19401
  }
@@ -19512,20 +19487,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19512
19487
  swiperRef.current.swiper.allowTouchMove = true;
19513
19488
  }, 500);
19514
19489
  }, onActiveIndexChange: (swiper) => {
19515
- var _a, _b;
19516
19490
  setActiveIndex(swiper.activeIndex);
19517
19491
  if (openHashtag)
19518
19492
  return;
19519
19493
  // 处理上滑下滑事件
19520
19494
  handleScrollEvent(swiper);
19521
- if (waterFallData || isEditor)
19495
+ if (waterFallData || isEditor || isDiyH5)
19522
19496
  return;
19523
19497
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19524
19498
  if (!isLoadMore) {
19525
- if (isDiyH5) {
19526
- (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19527
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19528
- }
19529
19499
  setIsLoadMore(true);
19530
19500
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19531
19501
  var _a;
@@ -19578,7 +19548,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19578
19548
  }, []);
19579
19549
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19580
19550
  const handlePlaying = useCallback(() => {
19581
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19551
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19582
19552
  setIsPauseVideo(false);
19583
19553
  const item = data[index];
19584
19554
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19591,15 +19561,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19591
19561
  eventSubject: 'playVideo',
19592
19562
  eventDescription: 'User played the video',
19593
19563
  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 : '',
19594
- 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 : '',
19595
- 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 : '',
19564
+ 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 : '',
19596
19565
  playType,
19597
19566
  startTime: videoCurrentTime,
19598
19567
  videoDuration,
19599
- 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 : []),
19568
+ 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 : []),
19600
19569
  position: index + '',
19601
19570
  contentFormat: 'video',
19602
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19571
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19603
19572
  }
19604
19573
  });
19605
19574
  setIsFirstPlay(false);
@@ -19638,7 +19607,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19638
19607
  }
19639
19608
  }, [isLoadFinish]);
19640
19609
  const onPause = useCallback(() => {
19641
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19610
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19642
19611
  const item = data[index];
19643
19612
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19644
19613
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19649,15 +19618,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19649
19618
  eventSubject: 'playOverVideo',
19650
19619
  eventDescription: 'User finished playing the video',
19651
19620
  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 : '',
19652
- 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 : '',
19653
- 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 : '',
19621
+ 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 : '',
19654
19622
  endTime: videoCurrentTime,
19655
19623
  videoDuration,
19656
19624
  playDuration,
19657
- 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 : []),
19625
+ 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 : []),
19658
19626
  position: index + '',
19659
19627
  contentFormat: 'video',
19660
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19628
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19661
19629
  }
19662
19630
  });
19663
19631
  }