@covet-pics/covet-pics-widget 0.115.1 → 0.115.3

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 (59) hide show
  1. package/dist/cjs/{lazy-514fc6ab.js → a11y-ec6649c6.js} +351 -0
  2. package/dist/cjs/covet-pics-direct-buy_6.cjs.entry.js +41 -17
  3. package/dist/cjs/covet-pics-gallery-grid_3.cjs.entry.js +39 -36
  4. package/dist/cjs/covet-pics-gallery-header_3.cjs.entry.js +7 -7
  5. package/dist/cjs/covet-pics-highlighted-hotspots_2.cjs.entry.js +257 -30
  6. package/dist/cjs/slider-c7104397.js +17 -0
  7. package/dist/collection/components/covet-pics-direct-buy/covet-pics-direct-buy.js +17 -5
  8. package/dist/collection/components/covet-pics-gallery-grid/covet-pics-gallery-grid.js +11 -9
  9. package/dist/collection/components/covet-pics-gallery-item/covet-pics-gallery-item.js +3 -3
  10. package/dist/collection/components/covet-pics-gallery-item-detail/covet-pics-gallery-item-detail.js +4 -4
  11. package/dist/collection/components/covet-pics-gallery-slider/covet-pics-gallery-slider.js +21 -11
  12. package/dist/collection/components/covet-pics-highlighted/covet-pics-highlighted-page.js +70 -20
  13. package/dist/collection/components/covet-pics-highlighted/covet-pics-highlighted.js +2 -11
  14. package/dist/collection/components/covet-pics-popup/covet-pics-popup.js +22 -9
  15. package/dist/collection/components/covet-pics-popup-links/covet-pics-popup-links.js +2 -2
  16. package/dist/collection/utils/slider.js +13 -0
  17. package/dist/covet-pics-widget/covet-pics-widget.esm.js +1 -1
  18. package/dist/covet-pics-widget/{p-9c18decb.js → p-0b45bebd.js} +1 -1
  19. package/dist/covet-pics-widget/p-0f1df4a0.system.entry.js +40 -0
  20. package/dist/covet-pics-widget/p-104d9744.entry.js +4 -0
  21. package/dist/covet-pics-widget/{p-9f44deb4.entry.js → p-3a78600b.entry.js} +3 -3
  22. package/dist/covet-pics-widget/p-560f1b11.entry.js +4 -0
  23. package/dist/covet-pics-widget/p-5e112b9f.js +4 -0
  24. package/dist/covet-pics-widget/p-92ebf89e.system.js +1 -1
  25. package/dist/covet-pics-widget/p-9f687d29.system.entry.js +4 -0
  26. package/dist/covet-pics-widget/p-a743a997.system.js +4 -0
  27. package/dist/covet-pics-widget/p-c6f4a918.system.entry.js +4 -0
  28. package/dist/covet-pics-widget/p-e6050d54.system.js +4 -0
  29. package/dist/covet-pics-widget/{p-855066ec.system.entry.js → p-eea36aac.system.entry.js} +5 -5
  30. package/dist/covet-pics-widget/p-f5c2a18b.entry.js +40 -0
  31. package/dist/esm/{lazy-3e04cfe7.js → a11y-61b12420.js} +351 -1
  32. package/dist/esm/covet-pics-direct-buy_6.entry.js +39 -15
  33. package/dist/esm/covet-pics-gallery-grid_3.entry.js +34 -31
  34. package/dist/esm/covet-pics-gallery-header_3.entry.js +7 -7
  35. package/dist/esm/covet-pics-highlighted-hotspots_2.entry.js +248 -21
  36. package/dist/esm/slider-d4abfa66.js +15 -0
  37. package/dist/esm-es5/a11y-61b12420.js +4 -0
  38. package/dist/esm-es5/covet-pics-direct-buy_6.entry.js +5 -5
  39. package/dist/esm-es5/covet-pics-gallery-grid_3.entry.js +2 -2
  40. package/dist/esm-es5/covet-pics-gallery-header_3.entry.js +1 -1
  41. package/dist/esm-es5/covet-pics-highlighted-hotspots_2.entry.js +1 -1
  42. package/dist/esm-es5/slider-d4abfa66.js +4 -0
  43. package/dist/types/components/covet-pics-highlighted/covet-pics-highlighted.d.ts +0 -1
  44. package/dist/types/components/covet-pics-popup-links/covet-pics-popup-links.d.ts +2 -2
  45. package/dist/types/utils/slider.d.ts +1 -0
  46. package/package.json +1 -1
  47. package/dist/cjs/effect-fade-23f01c22.js +0 -184
  48. package/dist/covet-pics-widget/p-06217c85.system.js +0 -4
  49. package/dist/covet-pics-widget/p-2d19f57c.system.entry.js +0 -4
  50. package/dist/covet-pics-widget/p-78054d08.system.entry.js +0 -40
  51. package/dist/covet-pics-widget/p-79c455aa.entry.js +0 -40
  52. package/dist/covet-pics-widget/p-79dc98ba.entry.js +0 -4
  53. package/dist/covet-pics-widget/p-a1b9fb06.entry.js +0 -4
  54. package/dist/covet-pics-widget/p-b07fad21.system.entry.js +0 -4
  55. package/dist/covet-pics-widget/p-d8cc6267.js +0 -4
  56. package/dist/covet-pics-widget/p-e0568bb1.system.js +0 -4
  57. package/dist/esm/effect-fade-003f6689.js +0 -182
  58. package/dist/esm-es5/effect-fade-003f6689.js +0 -4
  59. package/dist/esm-es5/lazy-3e04cfe7.js +0 -4
@@ -5763,6 +5763,357 @@ function Lazy({
5763
5763
  });
5764
5764
  }
5765
5765
 
5766
+ function A11y({
5767
+ swiper,
5768
+ extendParams,
5769
+ on
5770
+ }) {
5771
+ extendParams({
5772
+ a11y: {
5773
+ enabled: true,
5774
+ notificationClass: 'swiper-notification',
5775
+ prevSlideMessage: 'Previous slide',
5776
+ nextSlideMessage: 'Next slide',
5777
+ firstSlideMessage: 'This is the first slide',
5778
+ lastSlideMessage: 'This is the last slide',
5779
+ paginationBulletMessage: 'Go to slide {{index}}',
5780
+ slideLabelMessage: '{{index}} / {{slidesLength}}',
5781
+ containerMessage: null,
5782
+ containerRoleDescriptionMessage: null,
5783
+ itemRoleDescriptionMessage: null,
5784
+ slideRole: 'group',
5785
+ id: null
5786
+ }
5787
+ });
5788
+ swiper.a11y = {
5789
+ clicked: false
5790
+ };
5791
+ let liveRegion = null;
5792
+
5793
+ function notify(message) {
5794
+ const notification = liveRegion;
5795
+ if (notification.length === 0) return;
5796
+ notification.html('');
5797
+ notification.html(message);
5798
+ }
5799
+
5800
+ function getRandomNumber(size = 16) {
5801
+ const randomChar = () => Math.round(16 * Math.random()).toString(16);
5802
+
5803
+ return 'x'.repeat(size).replace(/x/g, randomChar);
5804
+ }
5805
+
5806
+ function makeElFocusable($el) {
5807
+ $el.attr('tabIndex', '0');
5808
+ }
5809
+
5810
+ function makeElNotFocusable($el) {
5811
+ $el.attr('tabIndex', '-1');
5812
+ }
5813
+
5814
+ function addElRole($el, role) {
5815
+ $el.attr('role', role);
5816
+ }
5817
+
5818
+ function addElRoleDescription($el, description) {
5819
+ $el.attr('aria-roledescription', description);
5820
+ }
5821
+
5822
+ function addElControls($el, controls) {
5823
+ $el.attr('aria-controls', controls);
5824
+ }
5825
+
5826
+ function addElLabel($el, label) {
5827
+ $el.attr('aria-label', label);
5828
+ }
5829
+
5830
+ function addElId($el, id) {
5831
+ $el.attr('id', id);
5832
+ }
5833
+
5834
+ function addElLive($el, live) {
5835
+ $el.attr('aria-live', live);
5836
+ }
5837
+
5838
+ function disableEl($el) {
5839
+ $el.attr('aria-disabled', true);
5840
+ }
5841
+
5842
+ function enableEl($el) {
5843
+ $el.attr('aria-disabled', false);
5844
+ }
5845
+
5846
+ function onEnterOrSpaceKey(e) {
5847
+ if (e.keyCode !== 13 && e.keyCode !== 32) return;
5848
+ const params = swiper.params.a11y;
5849
+ const $targetEl = $(e.target);
5850
+
5851
+ if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
5852
+ if (!(swiper.isEnd && !swiper.params.loop)) {
5853
+ swiper.slideNext();
5854
+ }
5855
+
5856
+ if (swiper.isEnd) {
5857
+ notify(params.lastSlideMessage);
5858
+ } else {
5859
+ notify(params.nextSlideMessage);
5860
+ }
5861
+ }
5862
+
5863
+ if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
5864
+ if (!(swiper.isBeginning && !swiper.params.loop)) {
5865
+ swiper.slidePrev();
5866
+ }
5867
+
5868
+ if (swiper.isBeginning) {
5869
+ notify(params.firstSlideMessage);
5870
+ } else {
5871
+ notify(params.prevSlideMessage);
5872
+ }
5873
+ }
5874
+
5875
+ if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) {
5876
+ $targetEl[0].click();
5877
+ }
5878
+ }
5879
+
5880
+ function updateNavigation() {
5881
+ if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
5882
+ const {
5883
+ $nextEl,
5884
+ $prevEl
5885
+ } = swiper.navigation;
5886
+
5887
+ if ($prevEl && $prevEl.length > 0) {
5888
+ if (swiper.isBeginning) {
5889
+ disableEl($prevEl);
5890
+ makeElNotFocusable($prevEl);
5891
+ } else {
5892
+ enableEl($prevEl);
5893
+ makeElFocusable($prevEl);
5894
+ }
5895
+ }
5896
+
5897
+ if ($nextEl && $nextEl.length > 0) {
5898
+ if (swiper.isEnd) {
5899
+ disableEl($nextEl);
5900
+ makeElNotFocusable($nextEl);
5901
+ } else {
5902
+ enableEl($nextEl);
5903
+ makeElFocusable($nextEl);
5904
+ }
5905
+ }
5906
+ }
5907
+
5908
+ function hasPagination() {
5909
+ return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
5910
+ }
5911
+
5912
+ function hasClickablePagination() {
5913
+ return hasPagination() && swiper.params.pagination.clickable;
5914
+ }
5915
+
5916
+ function updatePagination() {
5917
+ const params = swiper.params.a11y;
5918
+ if (!hasPagination()) return;
5919
+ swiper.pagination.bullets.each(bulletEl => {
5920
+ const $bulletEl = $(bulletEl);
5921
+
5922
+ if (swiper.params.pagination.clickable) {
5923
+ makeElFocusable($bulletEl);
5924
+
5925
+ if (!swiper.params.pagination.renderBullet) {
5926
+ addElRole($bulletEl, 'button');
5927
+ addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
5928
+ }
5929
+ }
5930
+
5931
+ if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {
5932
+ $bulletEl.attr('aria-current', 'true');
5933
+ } else {
5934
+ $bulletEl.removeAttr('aria-current');
5935
+ }
5936
+ });
5937
+ }
5938
+
5939
+ const initNavEl = ($el, wrapperId, message) => {
5940
+ makeElFocusable($el);
5941
+
5942
+ if ($el[0].tagName !== 'BUTTON') {
5943
+ addElRole($el, 'button');
5944
+ $el.on('keydown', onEnterOrSpaceKey);
5945
+ }
5946
+
5947
+ addElLabel($el, message);
5948
+ addElControls($el, wrapperId);
5949
+ };
5950
+
5951
+ const handlePointerDown = () => {
5952
+ swiper.a11y.clicked = true;
5953
+ };
5954
+
5955
+ const handlePointerUp = () => {
5956
+ requestAnimationFrame(() => {
5957
+ requestAnimationFrame(() => {
5958
+ if (!swiper.destroyed) {
5959
+ swiper.a11y.clicked = false;
5960
+ }
5961
+ });
5962
+ });
5963
+ };
5964
+
5965
+ const handleFocus = e => {
5966
+ if (swiper.a11y.clicked) return;
5967
+ const slideEl = e.target.closest(`.${swiper.params.slideClass}`);
5968
+ if (!slideEl || !swiper.slides.includes(slideEl)) return;
5969
+ const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex;
5970
+ const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
5971
+ if (isActive || isVisible) return;
5972
+ if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
5973
+
5974
+ if (swiper.isHorizontal()) {
5975
+ swiper.el.scrollLeft = 0;
5976
+ } else {
5977
+ swiper.el.scrollTop = 0;
5978
+ }
5979
+
5980
+ swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
5981
+ };
5982
+
5983
+ const initSlides = () => {
5984
+ const params = swiper.params.a11y;
5985
+
5986
+ if (params.itemRoleDescriptionMessage) {
5987
+ addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);
5988
+ }
5989
+
5990
+ if (params.slideRole) {
5991
+ addElRole($(swiper.slides), params.slideRole);
5992
+ }
5993
+
5994
+ const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length;
5995
+
5996
+ if (params.slideLabelMessage) {
5997
+ swiper.slides.each((slideEl, index) => {
5998
+ const $slideEl = $(slideEl);
5999
+ const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index;
6000
+ const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength);
6001
+ addElLabel($slideEl, ariaLabelMessage);
6002
+ });
6003
+ }
6004
+ };
6005
+
6006
+ const init = () => {
6007
+ const params = swiper.params.a11y;
6008
+ swiper.$el.append(liveRegion); // Container
6009
+
6010
+ const $containerEl = swiper.$el;
6011
+
6012
+ if (params.containerRoleDescriptionMessage) {
6013
+ addElRoleDescription($containerEl, params.containerRoleDescriptionMessage);
6014
+ }
6015
+
6016
+ if (params.containerMessage) {
6017
+ addElLabel($containerEl, params.containerMessage);
6018
+ } // Wrapper
6019
+
6020
+
6021
+ const $wrapperEl = swiper.$wrapperEl;
6022
+ const wrapperId = params.id || $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`;
6023
+ const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
6024
+ addElId($wrapperEl, wrapperId);
6025
+ addElLive($wrapperEl, live); // Slide
6026
+
6027
+ initSlides(); // Navigation
6028
+
6029
+ let $nextEl;
6030
+ let $prevEl;
6031
+
6032
+ if (swiper.navigation && swiper.navigation.$nextEl) {
6033
+ $nextEl = swiper.navigation.$nextEl;
6034
+ }
6035
+
6036
+ if (swiper.navigation && swiper.navigation.$prevEl) {
6037
+ $prevEl = swiper.navigation.$prevEl;
6038
+ }
6039
+
6040
+ if ($nextEl && $nextEl.length) {
6041
+ initNavEl($nextEl, wrapperId, params.nextSlideMessage);
6042
+ }
6043
+
6044
+ if ($prevEl && $prevEl.length) {
6045
+ initNavEl($prevEl, wrapperId, params.prevSlideMessage);
6046
+ } // Pagination
6047
+
6048
+
6049
+ if (hasClickablePagination()) {
6050
+ swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
6051
+ } // Tab focus
6052
+
6053
+
6054
+ swiper.$el.on('focus', handleFocus, true);
6055
+ swiper.$el.on('pointerdown', handlePointerDown, true);
6056
+ swiper.$el.on('pointerup', handlePointerUp, true);
6057
+ };
6058
+
6059
+ function destroy() {
6060
+ if (liveRegion && liveRegion.length > 0) liveRegion.remove();
6061
+ let $nextEl;
6062
+ let $prevEl;
6063
+
6064
+ if (swiper.navigation && swiper.navigation.$nextEl) {
6065
+ $nextEl = swiper.navigation.$nextEl;
6066
+ }
6067
+
6068
+ if (swiper.navigation && swiper.navigation.$prevEl) {
6069
+ $prevEl = swiper.navigation.$prevEl;
6070
+ }
6071
+
6072
+ if ($nextEl) {
6073
+ $nextEl.off('keydown', onEnterOrSpaceKey);
6074
+ }
6075
+
6076
+ if ($prevEl) {
6077
+ $prevEl.off('keydown', onEnterOrSpaceKey);
6078
+ } // Pagination
6079
+
6080
+
6081
+ if (hasClickablePagination()) {
6082
+ swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
6083
+ } // Tab focus
6084
+
6085
+
6086
+ swiper.$el.off('focus', handleFocus, true);
6087
+ swiper.$el.off('pointerdown', handlePointerDown, true);
6088
+ swiper.$el.off('pointerup', handlePointerUp, true);
6089
+ }
6090
+
6091
+ on('beforeInit', () => {
6092
+ liveRegion = $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`);
6093
+ });
6094
+ on('afterInit', () => {
6095
+ if (!swiper.params.a11y.enabled) return;
6096
+ init();
6097
+ });
6098
+ on('slidesLengthChange snapGridLengthChange slidesGridLengthChange', () => {
6099
+ if (!swiper.params.a11y.enabled) return;
6100
+ initSlides();
6101
+ });
6102
+ on('fromEdge toEdge afterInit lock unlock', () => {
6103
+ if (!swiper.params.a11y.enabled) return;
6104
+ updateNavigation();
6105
+ });
6106
+ on('paginationUpdate', () => {
6107
+ if (!swiper.params.a11y.enabled) return;
6108
+ updatePagination();
6109
+ });
6110
+ on('destroy', () => {
6111
+ if (!swiper.params.a11y.enabled) return;
6112
+ destroy();
6113
+ });
6114
+ }
6115
+
6116
+ exports.A11y = A11y;
5766
6117
  exports.Lazy = Lazy;
5767
6118
  exports.Navigation = Navigation;
5768
6119
  exports.Pagination = Pagination;
@@ -7,7 +7,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-65c0de9a.js');
9
9
  const utils = require('./utils-85481438.js');
10
- const lazy = require('./lazy-514fc6ab.js');
10
+ const a11y = require('./a11y-ec6649c6.js');
11
+ const slider = require('./slider-c7104397.js');
11
12
  const fragment = require('./fragment-29c21ac8.js');
12
13
  const storeUtils = require('./storeUtils-6e9b9011.js');
13
14
  const getters = require('./getters-c3c47af0.js');
@@ -141,17 +142,28 @@ const CovetPicsDirectBuy = class {
141
142
  };
142
143
  }
143
144
  initSwiper() {
145
+ // TODO add exception for slides length == 1
144
146
  const galleryMainEl = this.el.shadowRoot.querySelector(".main-gallery");
145
147
  const paginationEl = this.el.shadowRoot.querySelector(".swiper-pagination");
146
- return this.mainGallery = new lazy.Swiper(galleryMainEl, {
147
- modules: [lazy.Pagination],
148
+ return this.mainGallery = new a11y.Swiper(galleryMainEl, {
149
+ modules: [a11y.Pagination, a11y.A11y],
150
+ on: {
151
+ init: (e) => slider.swiperUpdateTabIndex(e),
152
+ update: (e) => slider.swiperUpdateTabIndex(e),
153
+ realIndexChange: (e) => slider.swiperUpdateTabIndex(e)
154
+ },
148
155
  pagination: {
149
156
  el: paginationEl,
150
157
  modifierClass: "swiper-pagination-",
151
158
  clickable: true,
152
- renderBullet: (index, className) => {
153
- return `<button class="dot ${className}" type="button" aria-label="Goto image #${index}" tabindex="0"></button>`;
154
- },
159
+ },
160
+ a11y: {
161
+ enabled: true,
162
+ containerMessage: "Product images slider",
163
+ containerRoleDescriptionMessage: "Product images slider inside popup",
164
+ paginationBulletMessage: "Go to product image #{{index}}",
165
+ slideRole: "group",
166
+ slideLabelMessage: "Product image {{index}}/{{slidesLength}}"
155
167
  },
156
168
  });
157
169
  }
@@ -4017,21 +4029,33 @@ const CovetPicsPopup = class {
4017
4029
  // if swiper exists then first destroy it
4018
4030
  if (typeof this.swiper !== "undefined")
4019
4031
  this.clearSwiper();
4020
- this.swiper = new lazy.Swiper(carouselMediaEl, {
4032
+ this.swiper = new a11y.Swiper(carouselMediaEl, {
4021
4033
  slidesPerView: 1,
4022
4034
  loop: true,
4023
- modules: [lazy.Navigation, lazy.Pagination, lazy.Lazy],
4035
+ modules: [a11y.Navigation, a11y.Pagination, a11y.Lazy, a11y.A11y],
4036
+ on: {
4037
+ init: (e) => slider.swiperUpdateTabIndex(e),
4038
+ update: (e) => slider.swiperUpdateTabIndex(e),
4039
+ realIndexChange: (e) => slider.swiperUpdateTabIndex(e)
4040
+ },
4024
4041
  pagination: {
4025
4042
  el: paginationEl,
4026
4043
  clickable: true,
4027
- renderBullet: (index, className) => {
4028
- return `<button class="dot ${className}" type="button" aria-label="Goto image #${index} inside popup carousel item"></button>`;
4029
- }
4030
4044
  },
4031
4045
  navigation: {
4032
4046
  nextEl: nextEl,
4033
4047
  prevEl: prevEl,
4034
- }
4048
+ },
4049
+ a11y: {
4050
+ enabled: true,
4051
+ prevSlideMessage: "Previous image inside popup carousel item",
4052
+ nextSlideMessage: "Next image inside popup carousel item",
4053
+ containerMessage: "Popup thumbnail image slider",
4054
+ containerRoleDescriptionMessage: "Popup thumbnail image slider",
4055
+ paginationBulletMessage: "Goto image #{{index}} inside popup carousel item",
4056
+ slideRole: "group",
4057
+ slideLabelMessage: `Popup carousel item ${this.item.caption !== null ? this.item.caption : ""} {{index}}/{{slidesLength}}`
4058
+ },
4035
4059
  });
4036
4060
  if (this.item && this.item.id)
4037
4061
  this.swiper.covetId = this.item.id;
@@ -4104,15 +4128,15 @@ const CovetPicsPopup = class {
4104
4128
  }
4105
4129
  renderImageElements() {
4106
4130
  if (this.item.carousel_media && this.item.carousel_media.length > 0) {
4107
- return (index.h("div", { id: "covet-popup-content-image-carousel", class: "carousel-media swiper" }, index.h("section", { class: "swiper-wrapper", role: "region", "aria-label": "popup thumbnail image slider" }, this.item.carousel_media.map((media_item, idx) => index.h("div", { class: "carousel-cell swiper-slide" }, media_item.type === "image" &&
4131
+ return (index.h("div", { id: "covet-popup-content-image-carousel", class: "carousel-media swiper" }, index.h("section", { class: "swiper-wrapper" }, this.item.carousel_media.map((media_item, idx) => index.h("div", { class: "carousel-cell swiper-slide" }, media_item.type === "image" &&
4108
4132
  index.h("img", { src: media_item.standard_resolution, alt: this.imgAltTag(this.item.caption, idx, this.item.carousel_media.length, this.item.created_time) }), media_item.type === "video" &&
4109
- index.h("div", { class: "post-video-element" }, index.h("video", { playsinline: true, loop: true, poster: (idx === 0) ? this.item.cover_images.high_resolution : null, key: media_item.standard_resolution }, index.h("source", { src: media_item.standard_resolution, type: "video/mp4" })), index.h("button", { type: "button", class: "post-video-play", onClick: this.playPauseVideoClickHandler }), index.h("button", { type: "button", class: "post-video-pause", onClick: this.playPauseVideoClickHandler }))))), index.h("div", { class: "swiper-pagination swiper-pagination-white" }), index.h("button", { class: "swiper-button-next", type: "button", "aria-controls": "covet-popup-content-image-carousel", "aria-label": "Previous image inside popup carousel item" }, index.h("svg", { viewBox: "0 0 100 100", role: "img" }, index.h("title", null, "arrow next"), index.h("path", { d: "M35.5992906,51.1028539 L41.7768136,57.2847304 L41.7768136,61.570226 L30,49.785113 L41.7768136,38 L41.7768136,42.2854956 L35.9938338,48.0725509 L69.1769366,48.0725509 L69.1769366,51.1028539 L35.5992906,51.1028539 Z", class: "arrow", transform: "translate(100, 100) rotate(180) " }))), index.h("button", { class: "swiper-button-prev", type: "button", "aria-controls": "covet-popup-content-image-carousel", "aria-label": "Next image inside popup carousel item" }, index.h("svg", { viewBox: "0 0 100 100", role: "img" }, index.h("title", null, "arrow previous"), index.h("path", { d: "M35.5992906,51.1028539 L41.7768136,57.2847304 L41.7768136,61.570226 L30,49.785113 L41.7768136,38 L41.7768136,42.2854956 L35.9938338,48.0725509 L69.1769366,48.0725509 L69.1769366,51.1028539 L35.5992906,51.1028539 Z", class: "arrow", transform: "translate(100, 100) rotate(180) " })))));
4133
+ index.h("div", { class: "post-video-element" }, index.h("video", { playsinline: true, loop: true, poster: (idx === 0) ? this.item.cover_images.high_resolution : null, key: media_item.standard_resolution }, index.h("source", { src: media_item.standard_resolution, type: "video/mp4" })), index.h("button", { type: "button", class: "post-video-play", "aria-label": "Play video", onClick: this.playPauseVideoClickHandler }), index.h("button", { type: "button", class: "post-video-pause", "aria-label": "Pause video", onClick: this.playPauseVideoClickHandler }))))), index.h("div", { class: "swiper-pagination swiper-pagination-white" }), index.h("button", { class: "swiper-button-next", type: "button" }, index.h("svg", { viewBox: "0 0 100 100", role: "img" }, index.h("title", null, "arrow next"), index.h("path", { d: "M35.5992906,51.1028539 L41.7768136,57.2847304 L41.7768136,61.570226 L30,49.785113 L41.7768136,38 L41.7768136,42.2854956 L35.9938338,48.0725509 L69.1769366,48.0725509 L69.1769366,51.1028539 L35.5992906,51.1028539 Z", class: "arrow", transform: "translate(100, 100) rotate(180) " }))), index.h("button", { class: "swiper-button-prev", type: "button" }, index.h("svg", { viewBox: "0 0 100 100", role: "img" }, index.h("title", null, "arrow previous"), index.h("path", { d: "M35.5992906,51.1028539 L41.7768136,57.2847304 L41.7768136,61.570226 L30,49.785113 L41.7768136,38 L41.7768136,42.2854956 L35.9938338,48.0725509 L69.1769366,48.0725509 L69.1769366,51.1028539 L35.5992906,51.1028539 Z", class: "arrow", transform: "translate(100, 100) rotate(180) " })))));
4110
4134
  }
4111
4135
  else {
4112
4136
  if (this.item.data_type === "image" || this.item.data_type === "carousel")
4113
4137
  return (index.h("img", { class: "post-image-element", src: this.item.images.high_resolution, alt: this.imgAltTag(this.item.caption, -1, this.item.carousel_media.length, this.item.created_time) }));
4114
4138
  else if (this.item.data_type === "video") {
4115
- return (index.h("div", { class: "post-video-element" }, index.h("video", { playsinline: true, loop: true, poster: this.item.cover_images.high_resolution, key: this.item.video }, index.h("source", { src: this.item.video, type: "video/mp4" })), index.h("button", { type: "button", class: "post-video-play", onClick: this.playPauseVideoClickHandler }), index.h("button", { type: "button", class: "post-video-pause", onClick: this.playPauseVideoClickHandler })));
4139
+ return (index.h("div", { class: "post-video-element" }, index.h("video", { playsinline: true, loop: true, poster: this.item.cover_images.high_resolution, key: this.item.video }, index.h("source", { src: this.item.video, type: "video/mp4" })), index.h("button", { type: "button", class: "post-video-play", "aria-label": "Play video", onClick: this.playPauseVideoClickHandler }), index.h("button", { type: "button", class: "post-video-pause", "aria-label": "Pause video", onClick: this.playPauseVideoClickHandler })));
4116
4140
  }
4117
4141
  }
4118
4142
  }
@@ -4437,9 +4461,9 @@ const CovetPicsPopupLinks = class {
4437
4461
  }
4438
4462
  }
4439
4463
  render() {
4440
- return (index.h("ul", { class: `links ${this.linkStyle} ${this.greyBorderClass} links-${this.links.length.toString()}`, style: this.getItemCSSVariables() }, this.links.map((link, idx) => index.h("li", { class: "product", "data-link-id": link.id, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler }, index.h("a", { class: "product-link", target: link.new_tab ? "_blank" : "_top", "data-ga-campaign": link.title, href: link.link, "aria-label": `Link to '${link.title}'` }, index.h("div", { class: "img-wrap" }, this.renderLinkImage(link, idx, this.links.length)), index.h("div", { class: "product-details" }, index.h("span", { class: "product-title" }, link.title), this.showPrice && link.prices &&
4464
+ return (index.h("ul", { class: `links ${this.linkStyle} ${this.greyBorderClass} links-${this.links.length.toString()}`, style: this.getItemCSSVariables(), role: "list" }, this.links.map((link, idx) => index.h("li", { class: "product", "data-link-id": link.id, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, role: "listitem" }, index.h("a", { class: "product-link", target: link.new_tab ? "_blank" : "_top", "data-ga-campaign": link.title, href: link.link, "aria-label": `Link to '${link.title}'`, role: "link" }, index.h("div", { class: "img-wrap" }, this.renderLinkImage(link, idx, this.links.length)), index.h("div", { class: "product-details" }, index.h("span", { class: "product-title" }, link.title), this.showPrice && link.prices &&
4441
4465
  index.h("span", { class: "product-price", innerHTML: link.prices.price_label }), this.showPrice && link.prices && link.prices.is_on_sale &&
4442
- index.h("span", { class: "product-price product-sale", innerHTML: link.prices.sale_price }))), index.h("a", { class: `btn-buy ${this.buttonStyle}`, href: link.link, target: link.new_tab ? "_blank" : "_top", "data-ga-campaign": link.title, onClick: this.buyButtonClickHandler, "data-product-id": link.shopify_product_id, "aria-label": "Link to direct buy" }, this.buttonStyle === "style-5" &&
4466
+ index.h("span", { class: "product-price product-sale", innerHTML: link.prices.sale_price }))), index.h("a", { class: `btn-buy ${this.buttonStyle}`, href: link.link, target: link.new_tab ? "_blank" : "_top", "data-ga-campaign": link.title, onClick: this.buyButtonClickHandler, "data-product-id": link.shopify_product_id, "aria-label": "Link to direct buy", role: "link" }, this.buttonStyle === "style-5" &&
4443
4467
  index.h("svg", { class: "icon-buy", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("g", { fill: "none", "fill-rule": "evenodd" }, index.h("path", { d: "M0 0h14v14H0z" }), index.h("path", { class: "dynamic-fill", d: "M6.855 1.575c1.323 0 2.405 1.03 2.405 2.315v.352h1.57l.95 8.24H1.896l.95-8.24H4.45V3.89c0-1.23.994-2.229 2.241-2.31zM9.94 5.242h-.68l.001.262a.5.5 0 01-.41.492l-.09.008a.5.5 0 01-.5-.5v-.262H5.45v.262a.5.5 0 01-.41.492l-.09.008a.5.5 0 01-.5-.5v-.262h-.714l-.72 6.24h7.643l-.72-6.24zM6.855 2.575c-.781 0-1.405.594-1.405 1.315v.352h2.81V3.89c0-.679-.552-1.245-1.269-1.31z", fill: "#FFF", "fill-rule": "nonzero" }))), index.h("span", { class: "btn-title" }, this.getLinkLabel(link)))))));
4444
4468
  }
4445
4469
  get el() { return index.getElement(this); }