pb-sxp-ui 1.0.40 → 1.0.42

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 (60) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +560 -156
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +56 -4
  6. package/dist/index.js +559 -156
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +3 -3
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +3 -3
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +563 -160
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +3 -3
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
  17. package/es/core/components/DiyPortalPreview/PictureGroup.js +11 -0
  18. package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
  19. package/es/core/components/DiyPortalPreview/VideoWidget.js +236 -0
  20. package/es/core/components/DiyPortalPreview/index.d.ts +6 -0
  21. package/es/core/components/DiyPortalPreview/index.js +127 -0
  22. package/es/core/components/SxpPageCore/index.js +2 -2
  23. package/es/core/components/SxpPageRender/Nudge/index.js +6 -5
  24. package/es/core/components/SxpPageRender/PictureGroup/Picture.js +1 -0
  25. package/es/core/components/SxpPageRender/Tagbar.d.ts +7 -0
  26. package/es/core/components/SxpPageRender/Tagbar.js +37 -0
  27. package/es/core/components/SxpPageRender/VideoWidget/index.js +46 -79
  28. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
  29. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  30. package/es/core/components/SxpPageRender/index.js +22 -18
  31. package/es/core/context/SxpDataSourceProvider.d.ts +3 -0
  32. package/es/core/context/SxpDataSourceProvider.js +29 -5
  33. package/es/core/hooks/useEventReport.js +4 -4
  34. package/es/index.d.ts +1 -0
  35. package/es/index.js +1 -0
  36. package/es/materials/sxp/popup/CommodityDetail/index.js +10 -10
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
  38. package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
  39. package/lib/core/components/DiyPortalPreview/PictureGroup.js +14 -0
  40. package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
  41. package/lib/core/components/DiyPortalPreview/VideoWidget.js +239 -0
  42. package/lib/core/components/DiyPortalPreview/index.d.ts +6 -0
  43. package/lib/core/components/DiyPortalPreview/index.js +130 -0
  44. package/lib/core/components/SxpPageCore/index.js +2 -2
  45. package/lib/core/components/SxpPageRender/Nudge/index.js +6 -5
  46. package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +1 -0
  47. package/lib/core/components/SxpPageRender/Tagbar.d.ts +7 -0
  48. package/lib/core/components/SxpPageRender/Tagbar.js +40 -0
  49. package/lib/core/components/SxpPageRender/VideoWidget/index.js +46 -79
  50. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
  51. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  52. package/lib/core/components/SxpPageRender/index.js +22 -18
  53. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -0
  54. package/lib/core/context/SxpDataSourceProvider.js +29 -5
  55. package/lib/core/hooks/useEventReport.js +4 -4
  56. package/lib/index.d.ts +1 -0
  57. package/lib/index.js +3 -1
  58. package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -10
  59. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
  60. package/package.json +115 -114
package/dist/pb-ui.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom'), require('eventemitter3')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', '@emotion/css', '@ant-design/pro-components', 'react-dom', 'eventemitter3'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.css, global.proComponents, global.ReactDOM, global.EventEmitter));
5
- })(this, (function (exports, lodash, uuid$1, pako, React, qs, css, proComponents, ReactDOM, EventEmitter) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom'), require('eventemitter3'), require('hls.js')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', '@emotion/css', '@ant-design/pro-components', 'react-dom', 'eventemitter3', 'hls.js'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.css, global.proComponents, global.ReactDOM, global.EventEmitter, global.Hls));
5
+ })(this, (function (exports, lodash, uuid$1, pako, React, qs, css, proComponents, ReactDOM, EventEmitter, Hls) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -422,7 +422,8 @@
422
422
  }
423
423
 
424
424
  const SxpDataSourceContext = React.createContext({
425
- rtcList: []
425
+ rtcList: [],
426
+ tagList: []
426
427
  });
427
428
  var DataSourceType;
428
429
  (function (DataSourceType) {
@@ -431,6 +432,7 @@
431
432
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
432
433
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
433
434
  const [rtcList, setRtcList] = React.useState([]);
435
+ const [tagList, setTagList] = React.useState([]);
434
436
  const [loading, setLoading] = React.useState(false);
435
437
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
436
438
  const swiperRef = React.useRef(null);
@@ -554,6 +556,19 @@
554
556
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
555
557
  return res === null || res === void 0 ? void 0 : res.success;
556
558
  }), [bffFetch]);
559
+ // 获取 Tag
560
+ const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
561
+ var _g, _h;
562
+ if (!utmVal)
563
+ return;
564
+ try {
565
+ const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: utmVal } }));
566
+ setTagList((_h = (_g = result === null || result === void 0 ? void 0 : result.data) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []);
567
+ }
568
+ catch (e) {
569
+ console.log('e', e);
570
+ }
571
+ }), [bffFetch, utmVal]);
557
572
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
558
573
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
559
574
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -569,11 +584,12 @@
569
584
  fromKName = 'imagePage';
570
585
  }
571
586
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
572
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
587
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
573
588
  });
574
589
  }, [bffEventReport, isFromHashtag]);
575
590
  React.useEffect(() => {
576
591
  setLoading(true);
592
+ bffGetTagList();
577
593
  getRecommendVideos()
578
594
  .then((data) => {
579
595
  var _a, _b;
@@ -589,6 +605,7 @@
589
605
  if (!isInit.current)
590
606
  return;
591
607
  setLoading(true);
608
+ bffGetTagList();
592
609
  getRecommendVideos()
593
610
  .then((data) => {
594
611
  var _a, _b;
@@ -598,7 +615,7 @@
598
615
  .finally(() => {
599
616
  setLoading(false);
600
617
  });
601
- }, [getRecommendVideos]);
618
+ }, [getRecommendVideos, bffGetTagList]);
602
619
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
603
620
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
604
621
  rtcList,
@@ -630,8 +647,16 @@
630
647
  appDomain,
631
648
  hashTagSize,
632
649
  loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage,
633
- isOpenHashTag
634
- } }, render({ rtcList, mutateLike: bffMutateLike, mutateUnlike: bffMutateUnlike, submitForm: bffSubmitForm })));
650
+ isOpenHashTag,
651
+ tagList,
652
+ setLoading
653
+ } }, render({
654
+ rtcList,
655
+ mutateLike: bffMutateLike,
656
+ mutateUnlike: bffMutateUnlike,
657
+ submitForm: bffSubmitForm,
658
+ tagList
659
+ })));
635
660
  };
636
661
  var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
637
662
 
@@ -856,7 +881,7 @@
856
881
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
857
882
  });
858
883
 
859
- var index$1 = /*#__PURE__*/Object.freeze({
884
+ var index$2 = /*#__PURE__*/Object.freeze({
860
885
  __proto__: null,
861
886
  EditorCore: EditorCore
862
887
  });
@@ -8142,8 +8167,8 @@
8142
8167
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8143
8168
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8144
8169
  position: position + '',
8145
- relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8146
- relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8170
+ contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8171
+ ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8147
8172
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8148
8173
  }
8149
8174
  });
@@ -8167,8 +8192,8 @@
8167
8192
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8168
8193
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8169
8194
  position: position + '',
8170
- relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8171
- relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8195
+ contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8196
+ ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8172
8197
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8173
8198
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8174
8199
  eventSubject: 'productView',
@@ -8331,7 +8356,7 @@
8331
8356
  var FormatImage$1 = React.memo(FormatImage);
8332
8357
 
8333
8358
  const CommodityDetail$1 = (_a) => {
8334
- var _b, _c, _d, _e, _f, _g, _h, _j;
8359
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8335
8360
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
8336
8361
  const { sxpParameter } = useSxpDataSource();
8337
8362
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
@@ -8372,7 +8397,7 @@
8372
8397
  return '$7,000';
8373
8398
  }
8374
8399
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8375
- const width = isPreview ? 375 : window.innerWidth;
8400
+ const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8376
8401
  const renderContent = ({ isPost }) => {
8377
8402
  var _a, _b, _c;
8378
8403
  return (React.createElement("div", null,
@@ -8380,10 +8405,10 @@
8380
8405
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8381
8406
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8382
8407
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8383
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8384
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8385
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8386
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8408
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8409
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8410
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8411
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8387
8412
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8388
8413
  };
8389
8414
  const renderBtn = () => {
@@ -8392,7 +8417,7 @@
8392
8417
  };
8393
8418
  return (React.createElement("div", { className: 'pb-commondity' },
8394
8419
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
8395
- product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8420
+ product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8396
8421
  clickable: true,
8397
8422
  bulletActiveClass: 'swipe-item-active-bullet',
8398
8423
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8400,7 +8425,7 @@
8400
8425
  : 'commondityDetail-swiper-clickable-center'
8401
8426
  }, loop: true, autoplay: {
8402
8427
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8403
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8428
+ } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8404
8429
  return (React.createElement(SwiperSlide, { key: src },
8405
8430
  React.createElement("div", { style: {
8406
8431
  overflow: 'hidden',
@@ -8409,7 +8434,7 @@
8409
8434
  } },
8410
8435
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8411
8436
  }))),
8412
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8437
+ !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8413
8438
  position: 'relative',
8414
8439
  height: 0,
8415
8440
  width: '100%',
@@ -8422,7 +8447,7 @@
8422
8447
  top: 0,
8423
8448
  objectFit: 'cover',
8424
8449
  width: '100%'
8425
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8450
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8426
8451
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8427
8452
  renderBtn(),
8428
8453
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
@@ -8782,7 +8807,7 @@
8782
8807
  ];
8783
8808
 
8784
8809
  const CommodityDetailDiroNew$1 = (_a) => {
8785
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8810
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
8786
8811
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
8787
8812
  React.useState(true);
8788
8813
  const { sxpParameter } = useSxpDataSource();
@@ -8830,16 +8855,16 @@
8830
8855
  return '£102,300.00';
8831
8856
  }
8832
8857
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8833
- const width = isPreview ? 375 : window.innerWidth;
8858
+ const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8834
8859
  const productInfoText = ({ isPost }) => {
8835
8860
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8836
8861
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8837
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8862
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8838
8863
  Made in Italy` })));
8839
8864
  };
8840
8865
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8841
8866
  React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
8842
- product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8867
+ product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8843
8868
  clickable: true,
8844
8869
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8845
8870
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8847,7 +8872,7 @@ Made in Italy` })));
8847
8872
  : 'commondityDiroNew-swiper-clickable-center'
8848
8873
  }, loop: true, autoplay: {
8849
8874
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8850
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8875
+ } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8851
8876
  return (React.createElement(SwiperSlide, { key: src },
8852
8877
  React.createElement("div", { style: {
8853
8878
  overflow: 'hidden',
@@ -8856,7 +8881,7 @@ Made in Italy` })));
8856
8881
  } },
8857
8882
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8858
8883
  }))),
8859
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8884
+ !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
8860
8885
  position: 'relative',
8861
8886
  height: 0,
8862
8887
  width: '100%',
@@ -8869,16 +8894,16 @@ Made in Italy` })));
8869
8894
  top: 0,
8870
8895
  objectFit: 'cover',
8871
8896
  width: '100%'
8872
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8897
+ }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8873
8898
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8874
8899
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8875
8900
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
8876
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
8901
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours Bag'),
8877
8902
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin')),
8878
8903
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
8879
8904
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8880
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
8881
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
8905
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
8906
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
8882
8907
  productInfoText({ isPost }))),
8883
8908
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8884
8909
  };
@@ -11786,7 +11811,7 @@ Made in Italy` })));
11786
11811
  }
11787
11812
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11788
11813
  eventInfo: {
11789
- relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11814
+ contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11790
11815
  position: cacheActiveIndex + '',
11791
11816
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11792
11817
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
@@ -11919,14 +11944,14 @@ Made in Italy` })));
11919
11944
  Prompt: Prompt
11920
11945
  });
11921
11946
 
11922
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11923
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11947
+ const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11948
+ const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11924
11949
  const LikeButton = (_a) => {
11925
11950
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11926
11951
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11927
11952
  const [state, setState] = React.useState(active);
11928
- const likeIcon = useIconLink(defaultLikeIconPath);
11929
- const unlikeIcon = useIconLink(defaultUnLikeIconPath);
11953
+ const likeIcon = useIconLink(defaultLikeIconPath$1);
11954
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
11930
11955
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
11931
11956
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
11932
11957
  if (state) {
@@ -11982,7 +12007,7 @@ Made in Italy` })));
11982
12007
  SXP_EVENT_TYPE["PAGE_DID_HIDE"] = "pageDidHide";
11983
12008
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
11984
12009
 
11985
- const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
12010
+ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11986
12011
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
11987
12012
  const videoRef = React.useRef(null);
11988
12013
  const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
@@ -11992,13 +12017,12 @@ Made in Italy` })));
11992
12017
  const { isActive } = useSwiperSlide();
11993
12018
  const canvasRef = React.useRef(null);
11994
12019
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
11995
- const videoId = `pb-video-${index}`;
11996
12020
  React.useEffect(() => {
11997
12021
  if (!videoRef.current)
11998
12022
  return;
11999
- videoRef.current.muted(muted);
12023
+ videoRef.current.muted = muted;
12000
12024
  }, [muted]);
12001
- const handleEnded = React.useCallback(() => {
12025
+ const handleVideoStart = React.useCallback(() => {
12002
12026
  var _a;
12003
12027
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12004
12028
  }, []);
@@ -12007,10 +12031,10 @@ Made in Italy` })));
12007
12031
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12008
12032
  setIsPauseVideo(false);
12009
12033
  const item = data[index];
12010
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration())) {
12011
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime()) || 0;
12012
- const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12013
- const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime()) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12034
+ if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
12035
+ videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
12036
+ const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12037
+ const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12014
12038
  const playType = isFirstPlay ? '0' : '1';
12015
12039
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12016
12040
  eventInfo: {
@@ -12030,15 +12054,14 @@ Made in Italy` })));
12030
12054
  setIsFirstPlay(false);
12031
12055
  }
12032
12056
  }, [bffEventReport, data, index, isFirstPlay]);
12033
- const handleCanplay = React.useCallback(() => {
12034
- handLoadeddata();
12057
+ const handleLoadedMetadata = React.useCallback(() => {
12035
12058
  setIsLoadFinish(true);
12036
12059
  }, []);
12037
12060
  const handleClickVideo = React.useCallback((type) => () => {
12038
12061
  var _a, _b, _c, _d, _e;
12039
12062
  if (!isLoadFinish)
12040
12063
  return;
12041
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused();
12064
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
12042
12065
  switch (type) {
12043
12066
  case 'start':
12044
12067
  if (!isPause)
@@ -12063,13 +12086,13 @@ Made in Italy` })));
12063
12086
  break;
12064
12087
  }
12065
12088
  }, [isLoadFinish]);
12066
- const handlePause = React.useCallback(() => {
12089
+ const onPause = React.useCallback(() => {
12067
12090
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12068
12091
  const item = data[index];
12069
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration()) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12070
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12071
- if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration()) {
12072
- const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime()) - videoStartTime.current).toFixed(2);
12092
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12093
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12094
+ if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
12095
+ const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
12073
12096
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12074
12097
  eventInfo: {
12075
12098
  eventSubject: 'playOverVideo',
@@ -12101,66 +12124,56 @@ Made in Italy` })));
12101
12124
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12102
12125
  }, [firstFrameSrc, rec]);
12103
12126
  const handLoadeddata = React.useCallback(() => {
12104
- var _a;
12105
- const videoDomRef = document.getElementById(`${videoId}_html5_api`);
12106
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
12127
+ if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
12107
12128
  return;
12108
- const setFrameImg = () => {
12109
- const video = videoDomRef;
12110
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12111
- const ctx = canvas.getContext('2d');
12112
- const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
12113
- const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
12114
- canvas.height = targetHeight;
12115
- canvas.width = targetWidth;
12116
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12117
- setFirstFrameSrc(canvas.toDataURL());
12118
- };
12119
- setFrameImg();
12120
- setTimeout(() => {
12121
- setFrameImg();
12122
- }, 500);
12129
+ const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
12130
+ const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12131
+ const ctx = canvas.getContext('2d');
12132
+ const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
12133
+ const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
12134
+ canvas.height = targetHeight;
12135
+ canvas.width = targetWidth;
12136
+ ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12137
+ setFirstFrameSrc(canvas.toDataURL());
12123
12138
  }, []);
12124
12139
  React.useEffect(() => {
12125
- var _a, _b, _c, _d, _e;
12140
+ var _a, _b, _c, _d;
12141
+ if (!videoRef.current)
12142
+ return;
12126
12143
  setIsPauseVideo(false);
12127
- const videoSrc = rec.video.url;
12128
- if (videoSrc && typeof TCPlayer === 'function') {
12129
- videoRef.current = TCPlayer(videoId, {
12130
- sources: [
12131
- {
12132
- src: videoSrc // 播放地址
12133
- }
12134
- ],
12135
- licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1325816236_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12136
- controls: false,
12137
- autoplay: false,
12138
- loop: false,
12139
- muted: true,
12140
- preload: 'auto',
12141
- posterImage: false,
12142
- bigPlayButton: true
12143
- });
12144
- videoRef.current.play();
12145
- videoRef.current.pause();
12146
- }
12147
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.on('loadedmetadata', handleCanplay);
12148
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.on('canplay', handleCanplay);
12149
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.on('playing', handlePlaying);
12150
- // videoRef.current?.on('loadeddata', handLoadeddata);
12151
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.on('pause', handlePause);
12152
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.on('ended', handleEnded);
12144
+ if (!videoRef.current.src) {
12145
+ const videoSrc = rec.video.url;
12146
+ // if (videoSrc.includes('.m3u8')) {
12147
+ // if (Hls.isSupported()) {
12148
+ // const hls = new Hls();
12149
+ // hls.loadSource(videoSrc);
12150
+ // hls.attachMedia(videoRef.current);
12151
+ // hls.on(Hls.Events.MANIFEST_PARSED, function () {
12152
+ // videoRef?.current?.play();
12153
+ // });
12154
+ // } else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
12155
+ // videoRef.current.src = videoSrc;
12156
+ // } else {
12157
+ // videoRef.current.src = videoSrc;
12158
+ // }
12159
+ // } else {
12160
+ videoRef.current.src = videoSrc;
12161
+ // }
12162
+ videoRef.current.setAttribute('x5-playsinline', 'true');
12163
+ videoRef.current.setAttribute('webkit-playsinline', 'true');
12164
+ }
12165
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
12166
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
12167
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
12168
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
12153
12169
  return () => {
12154
- var _a, _b, _c, _d, _e;
12155
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.off('loadedmetadata', handleCanplay);
12156
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.off('canplay', handleCanplay);
12157
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.off('playing', handlePlaying);
12158
- // videoRef.current?.off('loadeddata', handLoadeddata);
12159
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.off('pause', handlePause);
12160
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.off('ended', handleEnded);
12161
- videoRef.current.dispose();
12170
+ var _a, _b, _c, _d;
12171
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
12172
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
12173
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
12174
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
12162
12175
  };
12163
- }, []);
12176
+ }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
12164
12177
  React.useEffect(() => {
12165
12178
  var _a;
12166
12179
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -12246,31 +12259,23 @@ Made in Italy` })));
12246
12259
  right: 0
12247
12260
  } },
12248
12261
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12249
- React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12262
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
12250
12263
  width: '100%',
12251
12264
  height: '100%',
12252
- objectFit: 'contain',
12253
- backgroundColor: 'transparent',
12254
- pointerEvents: 'none'
12265
+ objectFit: 'contain'
12255
12266
  } }),
12256
12267
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
12257
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12268
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
12258
12269
  position: 'relative',
12259
12270
  width: '100%',
12260
12271
  height,
12261
12272
  overflow: 'hidden'
12262
- }, onClick: handleClickVideo() },
12263
- React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12264
- backgroundColor: 'transparent',
12265
- width: '100%',
12266
- height: '100%',
12267
- objectFit: 'cover',
12268
- pointerEvents: 'none'
12269
- } }),
12273
+ } },
12274
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
12270
12275
  renderPoster,
12271
12276
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
12272
12277
  };
12273
- var VideoWidget$1 = React.memo(VideoWidget);
12278
+ var VideoWidget$3 = React.memo(VideoWidget$2);
12274
12279
 
12275
12280
  /*
12276
12281
  * @Author: binruan@chatlabs.com
@@ -12321,7 +12326,7 @@ Made in Italy` })));
12321
12326
  * @Author: binruan@chatlabs.com
12322
12327
  * @Date: 2024-03-20 10:27:31
12323
12328
  * @LastEditors: binruan@chatlabs.com
12324
- * @LastEditTime: 2024-04-22 14:04:00
12329
+ * @LastEditTime: 2024-04-26 14:33:25
12325
12330
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\Picture.tsx
12326
12331
  *
12327
12332
  */
@@ -12353,6 +12358,7 @@ Made in Italy` })));
12353
12358
  React.createElement(FormatImage$1, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
12354
12359
  blur && (React.createElement(FormatImage$1, { src: src, style: {
12355
12360
  width: '100%',
12361
+ height: '100%',
12356
12362
  objectFit: 'contain',
12357
12363
  position: 'absolute',
12358
12364
  top: '50%',
@@ -12369,7 +12375,7 @@ Made in Italy` })));
12369
12375
  * @LastEditTime: 2024-04-18 19:56:22
12370
12376
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
12371
12377
  */
12372
- const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12378
+ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12373
12379
  var _a;
12374
12380
  const ref = React.useRef();
12375
12381
  const { isActive } = useSwiperSlide();
@@ -12398,7 +12404,7 @@ Made in Italy` })));
12398
12404
  React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12399
12405
  })));
12400
12406
  };
12401
- var PictureGroup$1 = React.memo(PictureGroup);
12407
+ var PictureGroup$3 = React.memo(PictureGroup$2);
12402
12408
 
12403
12409
  /*
12404
12410
  * @Author: binruan@chatlabs.com
@@ -12562,26 +12568,63 @@ Made in Italy` })));
12562
12568
  *
12563
12569
  */
12564
12570
  const Nudge = ({ nudge }) => {
12571
+ var _a, _b, _c, _d, _e, _f, _g;
12565
12572
  return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
12566
- marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
12567
- width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
12568
- height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
12573
+ marginBottom: (_a = nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom) !== null && _a !== void 0 ? _a : 5,
12574
+ width: (_c = (_b = nudge === null || nudge === void 0 ? void 0 : nudge.size) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : 212,
12575
+ height: (_e = (_d = nudge === null || nudge === void 0 ? void 0 : nudge.size) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 38,
12569
12576
  backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
12570
- borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12577
+ borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
12571
12578
  } },
12572
12579
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12573
- React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
12580
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12574
12581
  };
12575
12582
 
12583
+ const DEFAULT_TAG = 'FOR U';
12584
+ const Tagbar = ({ tagList = [], setActiveIndex }) => {
12585
+ const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
12586
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
12587
+ const realTagList = React.useMemo(() => {
12588
+ return [DEFAULT_TAG, ...tagList];
12589
+ }, [tagList]);
12590
+ const handleSelectTag = (tag) => () => {
12591
+ if (tag === selectTag)
12592
+ return;
12593
+ let hashTag;
12594
+ if (tag !== DEFAULT_TAG) {
12595
+ hashTag = tag;
12596
+ }
12597
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
12598
+ getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
12599
+ var _a, _b, _c, _d;
12600
+ setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
12601
+ setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
12602
+ setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
12603
+ setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
12604
+ (_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(0);
12605
+ }).finally(() => {
12606
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
12607
+ });
12608
+ setSelectTag(tag);
12609
+ };
12610
+ if (tagList.length <= 0)
12611
+ return null;
12612
+ return (React.createElement("div", { className: 'clc-sxp-tagbar', style: { height: 45 } },
12613
+ React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
12614
+ return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
12615
+ }))));
12616
+ };
12617
+ var Tagbar$1 = React.memo(Tagbar);
12618
+
12576
12619
  /*
12577
12620
  * @Author: binruan@chatlabs.com
12578
12621
  * @Date: 2024-01-15 19:03:09
12579
12622
  * @LastEditors: binruan@chatlabs.com
12580
- * @LastEditTime: 2024-04-25 17:03:41
12623
+ * @LastEditTime: 2024-04-23 15:48:32
12581
12624
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12582
12625
  *
12583
12626
  */
12584
- const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle }) => {
12627
+ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
12585
12628
  var _a, _b, _c, _d, _e, _f, _g;
12586
12629
  const { schema } = useEditor();
12587
12630
  const [activeIndex, setActiveIndex] = React.useState(0);
@@ -12659,8 +12702,8 @@ Made in Italy` })));
12659
12702
  // sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
12660
12703
  // eventSubject: 'sessionCompleted',
12661
12704
  // eventDescription: 'Session completed',
12662
- // relatedContentId: item?.video?.itemId,
12663
- // relatedProductId: item?.product?.itemId,
12705
+ // contentId: item?.video?.itemId,
12706
+ // productId: item?.product?.itemId,
12664
12707
  // position: item?.position
12665
12708
  // }
12666
12709
  // });
@@ -12704,12 +12747,12 @@ Made in Italy` })));
12704
12747
  sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
12705
12748
  eventSubject: 'sessionCompleted',
12706
12749
  eventDescription: 'Session completed',
12707
- relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12708
- relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12750
+ contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12751
+ productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12709
12752
  position: activeIndex + '',
12710
12753
  fromKName,
12711
12754
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12712
- relatedCtatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12755
+ ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12713
12756
  }
12714
12757
  });
12715
12758
  }
@@ -12726,8 +12769,15 @@ Made in Italy` })));
12726
12769
  };
12727
12770
  }, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
12728
12771
  const height = React.useMemo(() => {
12729
- return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
12730
- }, [globalConfig, containerHeight]);
12772
+ let minusHeight = 0;
12773
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
12774
+ minusHeight += 45;
12775
+ }
12776
+ if (tagList.length > 0) {
12777
+ minusHeight += 45;
12778
+ }
12779
+ return containerHeight - minusHeight;
12780
+ }, [globalConfig, containerHeight, tagList]);
12731
12781
  const renderLogo = React.useMemo(() => {
12732
12782
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
12733
12783
  return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
@@ -12738,10 +12788,10 @@ Made in Italy` })));
12738
12788
  const renderContent = React.useCallback((rec, index) => {
12739
12789
  var _a, _b, _c, _d;
12740
12790
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
12741
- return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
12791
+ return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
12742
12792
  }
12743
12793
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
12744
- return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
12794
+ return (React.createElement(PictureGroup$3, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
12745
12795
  }
12746
12796
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
12747
12797
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -12775,8 +12825,8 @@ Made in Italy` })));
12775
12825
  ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
12776
12826
  React.createElement("div", { className: 'clc-sxp-bottom' },
12777
12827
  React.createElement(Nudge, { nudge: nudge }),
12778
- React.createElement("div", { className: 'clc-sxp-bottom-card' },
12779
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
12828
+ (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
12829
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
12780
12830
  React.createElement("div", null,
12781
12831
  React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
12782
12832
  React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
@@ -12843,8 +12893,8 @@ Made in Italy` })));
12843
12893
  eventInfo: {
12844
12894
  eventSubject: 'scrollDown',
12845
12895
  eventDescription: 'User scroll down',
12846
- relatedContentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12847
- relatedProductId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12896
+ contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12897
+ productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12848
12898
  requestId: null
12849
12899
  }
12850
12900
  });
@@ -12856,8 +12906,8 @@ Made in Italy` })));
12856
12906
  eventInfo: {
12857
12907
  eventSubject: 'scrollUp',
12858
12908
  eventDescription: 'User scroll up',
12859
- relatedContentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12860
- relatedProductId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12909
+ contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12910
+ productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12861
12911
  requestId: null
12862
12912
  }
12863
12913
  });
@@ -12937,13 +12987,9 @@ Made in Italy` })));
12937
12987
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
12938
12988
  } })),
12939
12989
  renderLogo,
12990
+ React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
12940
12991
  isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
12941
- React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
12942
- swiperRef.current.swiper.allowTouchMove = false;
12943
- setTimeout(() => {
12944
- swiperRef.current.swiper.allowTouchMove = true;
12945
- }, 500);
12946
- }, onActiveIndexChange: (swiper) => {
12992
+ React.createElement(Swiper, { ref: swiperRef, onActiveIndexChange: (swiper) => {
12947
12993
  setActiveIndex(swiper.activeIndex);
12948
12994
  if (openHashtag)
12949
12995
  return;
@@ -12960,9 +13006,6 @@ Made in Italy` })));
12960
13006
  }
12961
13007
  }
12962
13008
  },
12963
- // style={{
12964
- // pointerEvents: canSwiper ? 'auto' : 'none'
12965
- // }}
12966
13009
  // onReachEnd={() => {
12967
13010
  // // 由hashtaglist跳转过来时不执行下面的方法
12968
13011
  // if (waterFallData) return;
@@ -12988,6 +13031,365 @@ Made in Italy` })));
12988
13031
  React.createElement(WaterFall$1, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))));
12989
13032
  };
12990
13033
 
13034
+ const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
13035
+ return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
13036
+ return (React.createElement(SwiperSlide, { key: url },
13037
+ React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
13038
+ })));
13039
+ };
13040
+ var PictureGroup$1 = React.memo(PictureGroup);
13041
+
13042
+ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, width }) => {
13043
+ const [isPauseVideo, setIsPauseVideo] = React.useState(false);
13044
+ const videoRef = React.useRef(null);
13045
+ const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
13046
+ const videoStartTime = React.useRef(0);
13047
+ const [isLoadFinish, setIsLoadFinish] = React.useState(false);
13048
+ const [isFirstPlay, setIsFirstPlay] = React.useState(true);
13049
+ const canvasRef = React.useRef(null);
13050
+ const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
13051
+ React.useEffect(() => {
13052
+ if (!videoRef.current)
13053
+ return;
13054
+ videoRef.current.muted = muted;
13055
+ }, [muted]);
13056
+ const handleVideoStart = React.useCallback(() => {
13057
+ var _a;
13058
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
13059
+ }, []);
13060
+ const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
13061
+ const handlePlaying = React.useCallback(() => {
13062
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13063
+ setIsPauseVideo(false);
13064
+ const item = data[index];
13065
+ if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
13066
+ videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
13067
+ const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13068
+ const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
13069
+ const playType = isFirstPlay ? '0' : '1';
13070
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13071
+ eventInfo: {
13072
+ eventSubject: 'playVideo',
13073
+ eventDescription: 'User played the video',
13074
+ contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13075
+ contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13076
+ playType,
13077
+ startTime: videoCurrentTime,
13078
+ videoDuration,
13079
+ contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13080
+ position: index + '',
13081
+ contentFormat: 'video',
13082
+ traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13083
+ }
13084
+ });
13085
+ setIsFirstPlay(false);
13086
+ }
13087
+ }, [bffEventReport, data, index, isFirstPlay]);
13088
+ const handleLoadedMetadata = React.useCallback(() => {
13089
+ setIsLoadFinish(true);
13090
+ }, []);
13091
+ const handleClickVideo = React.useCallback((type) => () => {
13092
+ var _a, _b, _c, _d, _e;
13093
+ if (!isLoadFinish)
13094
+ return;
13095
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
13096
+ switch (type) {
13097
+ case 'start':
13098
+ if (!isPause)
13099
+ return;
13100
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
13101
+ setIsPauseVideo(false);
13102
+ break;
13103
+ case 'pause':
13104
+ if (isPause)
13105
+ return;
13106
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
13107
+ setIsPauseVideo(true);
13108
+ break;
13109
+ default:
13110
+ if (isPause) {
13111
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
13112
+ }
13113
+ else {
13114
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
13115
+ }
13116
+ setIsPauseVideo(!isPause);
13117
+ break;
13118
+ }
13119
+ }, [isLoadFinish]);
13120
+ const onPause = React.useCallback(() => {
13121
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13122
+ const item = data[index];
13123
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
13124
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13125
+ if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
13126
+ const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
13127
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13128
+ eventInfo: {
13129
+ eventSubject: 'playOverVideo',
13130
+ eventDescription: 'User finished playing the video',
13131
+ contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13132
+ contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13133
+ endTime: videoCurrentTime,
13134
+ videoDuration,
13135
+ playDuration,
13136
+ contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13137
+ position: index + '',
13138
+ contentFormat: 'video',
13139
+ traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13140
+ }
13141
+ });
13142
+ }
13143
+ }, [data, index, bffEventReport]);
13144
+ const blur = React.useMemo(() => {
13145
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
13146
+ }, [videoPostConfig]);
13147
+ const translateY = React.useMemo(() => {
13148
+ var _a;
13149
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
13150
+ ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
13151
+ : 'translateY(-50%)';
13152
+ }, [videoPostConfig]);
13153
+ const blurBgSrc = React.useMemo(() => {
13154
+ var _a;
13155
+ return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
13156
+ }, [firstFrameSrc, rec]);
13157
+ const handLoadeddata = React.useCallback(() => {
13158
+ if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
13159
+ return;
13160
+ const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
13161
+ const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
13162
+ const ctx = canvas.getContext('2d');
13163
+ const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
13164
+ const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
13165
+ canvas.height = targetHeight;
13166
+ canvas.width = targetWidth;
13167
+ ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
13168
+ setFirstFrameSrc(canvas.toDataURL());
13169
+ }, []);
13170
+ React.useEffect(() => {
13171
+ var _a, _b, _c, _d;
13172
+ if (!videoRef.current)
13173
+ return;
13174
+ setIsPauseVideo(false);
13175
+ if (!videoRef.current.src) {
13176
+ const videoSrc = rec.video.url;
13177
+ if (videoSrc.includes('.m3u8')) {
13178
+ if (Hls.isSupported()) {
13179
+ const hls = new Hls();
13180
+ hls.loadSource(videoSrc);
13181
+ hls.attachMedia(videoRef.current);
13182
+ }
13183
+ else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
13184
+ videoRef.current.src = videoSrc;
13185
+ }
13186
+ else {
13187
+ videoRef.current.src = videoSrc;
13188
+ }
13189
+ }
13190
+ else {
13191
+ videoRef.current.src = videoSrc;
13192
+ }
13193
+ videoRef.current.setAttribute('x5-playsinline', 'true');
13194
+ videoRef.current.setAttribute('webkit-playsinline', 'true');
13195
+ }
13196
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
13197
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
13198
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
13199
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
13200
+ return () => {
13201
+ var _a, _b, _c, _d;
13202
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
13203
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
13204
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13205
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13206
+ };
13207
+ }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13208
+ const renderPoster = React.useMemo(() => {
13209
+ if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13210
+ return null;
13211
+ }
13212
+ return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
13213
+ }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
13214
+ React.useEffect(() => {
13215
+ const handleBeforeUnload = () => {
13216
+ var _a, _b;
13217
+ if (activeIndex === index && ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.src) && !isPauseVideo) {
13218
+ handleClickVideo('pause')();
13219
+ }
13220
+ };
13221
+ window.addEventListener('beforeunload', handleBeforeUnload);
13222
+ return () => {
13223
+ window.removeEventListener('beforeunload', handleBeforeUnload);
13224
+ };
13225
+ }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
13226
+ const blurStyle = React.useMemo(() => {
13227
+ return blur
13228
+ ? {
13229
+ filter: 'blur(10px)',
13230
+ transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
13231
+ }
13232
+ : {};
13233
+ }, [blur]);
13234
+ if (!rec.video) {
13235
+ return null;
13236
+ }
13237
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13238
+ position: 'relative',
13239
+ width,
13240
+ height,
13241
+ overflow: 'hidden'
13242
+ } },
13243
+ React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height,
13244
+ width, objectFit: 'cover' }, blurStyle) }),
13245
+ React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
13246
+ React.createElement("div", { style: {
13247
+ position: 'absolute',
13248
+ width,
13249
+ height,
13250
+ top: '50%',
13251
+ transform: translateY,
13252
+ left: 0,
13253
+ right: 0
13254
+ } },
13255
+ React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
13256
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
13257
+ width: '100%',
13258
+ height,
13259
+ objectFit: 'contain'
13260
+ } }),
13261
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13262
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13263
+ position: 'relative',
13264
+ width,
13265
+ height,
13266
+ overflow: 'hidden'
13267
+ } },
13268
+ React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
13269
+ renderPoster,
13270
+ React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13271
+ };
13272
+ var VideoWidget$1 = React.memo(VideoWidget);
13273
+
13274
+ const RESOLVER$1 = {};
13275
+ Object.values(_materials_).forEach((v) => {
13276
+ RESOLVER$1[v.extend.type] = v;
13277
+ });
13278
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
13279
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
13280
+ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [] }) => {
13281
+ const height = React.useMemo(() => {
13282
+ let minusHeight = 0;
13283
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13284
+ minusHeight += 45;
13285
+ }
13286
+ if (tagList.length > 0) {
13287
+ minusHeight += 45;
13288
+ }
13289
+ return containerHeight - minusHeight;
13290
+ }, [globalConfig, containerHeight, tagList]);
13291
+ const renderContent = (rec, index) => {
13292
+ var _a, _b, _c, _d;
13293
+ if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13294
+ return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: data !== null && data !== void 0 ? data : [], height: height, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
13295
+ }
13296
+ if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13297
+ return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13298
+ }
13299
+ if (rec.product) {
13300
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
13301
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
13302
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13303
+ const t = RESOLVER$1[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13304
+ const Component = withBindDataSource(t);
13305
+ const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
13306
+ return (React.createElement(Component, Object.assign({ key: `${index}${idx}`, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {},
13307
+ // schema={schema}
13308
+ id: value === null || value === void 0 ? void 0 : value.id,
13309
+ // viewTime={viewTime.current}
13310
+ rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { width: containerWidth, height, overflow: 'auto' }), index: index })));
13311
+ });
13312
+ }
13313
+ }
13314
+ };
13315
+ const renderLogo = React.useMemo(() => {
13316
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13317
+ return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
13318
+ React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
13319
+ }
13320
+ return null;
13321
+ }, [globalConfig]);
13322
+ const CTA = (rec, index) => {
13323
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
13324
+ return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13325
+ React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
13326
+ }
13327
+ return null;
13328
+ };
13329
+ const renderBottom = (rec, index) => {
13330
+ var _a, _b, _c, _d, _e, _f, _g;
13331
+ if (rec.video) {
13332
+ return (React.createElement(React.Fragment, null,
13333
+ ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13334
+ React.createElement("div", { className: 'clc-sxp-bottom' },
13335
+ React.createElement(Nudge, { nudge: nudge }),
13336
+ CTA(rec, index),
13337
+ React.createElement("div", null,
13338
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13339
+ React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13340
+ }
13341
+ return null;
13342
+ };
13343
+ const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
13344
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
13345
+ const renderLikeButton = (rec, index) => {
13346
+ var _a, _b, _c, _d;
13347
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13348
+ return;
13349
+ let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
13350
+ if (top < 40) {
13351
+ top += 40;
13352
+ }
13353
+ if (rec.video) {
13354
+ return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13355
+ top,
13356
+ right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
13357
+ } }));
13358
+ }
13359
+ return null;
13360
+ };
13361
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
13362
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
13363
+ const renderView = (rec, index) => {
13364
+ var _a, _b, _c, _d;
13365
+ return (React.createElement("div", { style: { position: 'relative', border: '1px solid #e1e1e1' } },
13366
+ renderLogo,
13367
+ React.createElement(Tagbar$1, { tagList: tagList }),
13368
+ React.createElement(ToggleButton$1, { style: {
13369
+ position: 'absolute',
13370
+ right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
13371
+ visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[index]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
13372
+ bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
13373
+ zIndex: 999
13374
+ }, defaultValue: true, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon }),
13375
+ renderContent(rec, index),
13376
+ renderBottom(rec, index),
13377
+ renderLikeButton(rec, index)));
13378
+ };
13379
+ return (React.createElement("div", { style: {
13380
+ width: '100%',
13381
+ height: containerHeight,
13382
+ display: 'flex',
13383
+ boxSizing: 'border-box',
13384
+ gap: 16,
13385
+ pointerEvents: 'none',
13386
+ userSelect: 'none'
13387
+ } }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
13388
+ return renderView(rec, index);
13389
+ })));
13390
+ };
13391
+ var index$1 = React.memo(DiyPortalPreview);
13392
+
12991
13393
  /*
12992
13394
  * @Author: binruan@chatlabs.com
12993
13395
  * @Date: 2023-10-31 10:56:01
@@ -13081,10 +13483,10 @@ Made in Italy` })));
13081
13483
  return searchParams;
13082
13484
  }, []);
13083
13485
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13084
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList }) => {
13486
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList, tagList }) => {
13085
13487
  var _a;
13086
13488
  return (React.createElement(React.Fragment, null,
13087
- React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
13489
+ React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
13088
13490
  React.createElement(Popup, null)));
13089
13491
  } })));
13090
13492
  };
@@ -13128,12 +13530,13 @@ Made in Italy` })));
13128
13530
  * @FilePath: \pb-sxp-ui\src\index.ts
13129
13531
  */
13130
13532
 
13533
+ exports.DiyPortalPreview = index$1;
13131
13534
  exports.EditorDataProvider = EditorDataProvider;
13132
13535
  exports.Modal = Modal$1;
13133
13536
  exports.SxpDataSourceProvider = SxpDataSourceProvider$1;
13134
13537
  exports.SxpPageCore = index;
13135
13538
  exports.SxpPageRender = SxpPageRender;
13136
- exports.core = index$1;
13539
+ exports.core = index$2;
13137
13540
  exports.default = Pagebuilder;
13138
13541
  exports.defaultSetting = defaultSetting;
13139
13542
  exports.materials = _materials_;