cloudinary-video-player 3.12.1 → 3.12.2-edge.0

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 (86) hide show
  1. package/dist/134.min.js +8 -0
  2. package/dist/309.min.js +6 -0
  3. package/dist/adaptive-streaming.js +9 -9
  4. package/dist/adaptive-streaming.min.js +2 -2
  5. package/dist/chapters.js +4 -4
  6. package/dist/chapters.min.js +3 -3
  7. package/dist/cld-player-core.js +37 -0
  8. package/dist/cld-player-core.min.js +6 -0
  9. package/dist/cld-video-player-lazy.js +494 -0
  10. package/dist/cld-video-player-lazy.min.js +6 -0
  11. package/dist/cld-video-player.css +2 -2
  12. package/dist/cld-video-player.js +366 -332
  13. package/dist/cld-video-player.light.js +366 -332
  14. package/dist/cld-video-player.light.min.js +4 -4
  15. package/dist/cld-video-player.min.css +2 -2
  16. package/dist/cld-video-player.min.js +4 -4
  17. package/dist/colors.js +4 -4
  18. package/dist/colors.min.js +2 -2
  19. package/dist/dash.js +6 -6
  20. package/dist/dash.min.js +2 -2
  21. package/dist/debug.js +8 -8
  22. package/dist/debug.min.js +3 -3
  23. package/dist/ima.js +9 -9
  24. package/dist/ima.min.js +2 -2
  25. package/dist/interaction-areas.js +11 -11
  26. package/dist/interaction-areas.min.js +2 -2
  27. package/dist/node_modules_lodash_throttle_js.js +8 -8
  28. package/dist/playlist.js +31 -31
  29. package/dist/playlist.min.js +3 -3
  30. package/dist/recommendations-overlay.js +10 -10
  31. package/dist/recommendations-overlay.min.js +2 -2
  32. package/dist/schema.json +19 -0
  33. package/dist/share.js +5 -5
  34. package/dist/share.min.js +3 -3
  35. package/dist/shoppable.js +12 -12
  36. package/dist/shoppable.min.js +2 -2
  37. package/dist/utils_fetch-config_js.js +81 -0
  38. package/dist/video-player_js.js +3111 -0
  39. package/dist/visual-search.js +7 -7
  40. package/dist/visual-search.min.js +2 -2
  41. package/lib/_commonjsHelpers.js +7 -0
  42. package/lib/_videojs-proxy.js +30294 -0
  43. package/lib/abr-strategies.js +31 -0
  44. package/lib/adaptive-streaming.js +468 -2
  45. package/lib/all.js +25 -2
  46. package/lib/chapters.js +205 -1
  47. package/lib/cld-video-player.min.css +5 -22
  48. package/lib/colors.js +59 -1
  49. package/lib/{schema.json → config/configSchema.json} +19 -0
  50. package/lib/dash.js +69943 -2
  51. package/lib/debug.js +322 -1
  52. package/lib/document.js +770 -0
  53. package/lib/download-button.js +48 -0
  54. package/lib/fetch-config.js +93 -0
  55. package/lib/ima.js +6851 -1
  56. package/lib/index.js +27 -0
  57. package/lib/interaction-areas.const.js +24 -0
  58. package/lib/interaction-areas.service.js +469 -0
  59. package/lib/lazy.js +20 -0
  60. package/lib/noop.js +33 -0
  61. package/lib/player-api.js +469 -0
  62. package/lib/player.js +7 -2
  63. package/lib/playlist-panel.js +602 -0
  64. package/lib/playlist.js +637 -1
  65. package/lib/querystring.js +81 -0
  66. package/lib/recommendations-overlay.js +320 -1
  67. package/lib/share.js +129 -1
  68. package/lib/shoppable-post-widget.js +572 -0
  69. package/lib/shoppable-widget.js +77 -0
  70. package/lib/throttle.js +318 -0
  71. package/lib/toNumber.js +134 -0
  72. package/lib/validators-functions.js +485 -0
  73. package/lib/video-player.js +16241 -0
  74. package/lib/videoPlayer.js +7 -2
  75. package/lib/videojs-contrib-hlsjs.js +37638 -0
  76. package/lib/visual-search.js +235 -1
  77. package/package.json +31 -15
  78. package/lib/adaptive-streaming.js.LICENSE.txt +0 -3
  79. package/lib/all.js.LICENSE.txt +0 -25
  80. package/lib/cld-video-player.js +0 -2
  81. package/lib/cld-video-player.js.LICENSE.txt +0 -21
  82. package/lib/dash.js.LICENSE.txt +0 -1842
  83. package/lib/interaction-areas.js +0 -1
  84. package/lib/player.js.LICENSE.txt +0 -21
  85. package/lib/shoppable.js +0 -1
  86. package/lib/videoPlayer.js.LICENSE.txt +0 -21
package/dist/shoppable.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.12.1
3
- * Built on 2026-03-17T08:20:36.548Z
2
+ * Cloudinary Video Player v3.12.2-edge.0
3
+ * Built on 2026-03-19T13:14:48.809Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";
@@ -20,7 +20,7 @@
20
20
  \*******************************************************/
21
21
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22
22
 
23
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _shoppable_products_overlay__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shoppable-products-overlay */ \"./components/shoppable-bar/layout/shoppable-products-overlay.js\");\n/* harmony import */ var _shoppable_panel_toggle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shoppable-panel-toggle */ \"./components/shoppable-bar/layout/shoppable-panel-toggle.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\nconst Component = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('Component');\n\n\n\n\nclass ShoppableBarLayout extends Component {\n constructor(player, options) {\n super(player, options);\n this.player_ = player;\n this.player().addClass('cld-shoppable-panel');\n this.player().addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.contentWrpEl_ = dom.createEl('div', {\n className: 'cld-spbl-bar'\n });\n this.contentBannerEl_ = dom.createEl('div', {\n className: 'cld-spbl-banner-msg base-color-text'\n }, {}, this.options_.bannerMsg || 'Shop the Video');\n this.contentWrpEl_.appendChild(this.contentBannerEl_);\n const productsOverlay = new _shoppable_products_overlay__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.player_, this.options_);\n this.contentWrpEl_.appendChild(productsOverlay.el_);\n this.contentEl_ = dom.createEl('div', {\n className: _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.CLD_SPBL_INNER_BAR\n });\n this.contentWrpEl_.appendChild(this.contentEl_);\n this.player().el().appendChild(this.contentWrpEl_);\n this.addChild(new _shoppable_panel_toggle__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.player_, {\n toggleIcon: this.options_.toggleIcon,\n clickHandler: () => {\n this.togglePanel();\n }\n }));\n this.addChild('ShoppablePanel', this.options_);\n this.dispose = () => {\n this.removeLayout();\n super.dispose();\n };\n this.togglePanel = open => {\n if (open === true) {\n // Open\n this.player().removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player().addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n } else if (open === false) {\n // Close\n this.player().removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n this.player().addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n } else {\n // Toggle\n this.player().toggleClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player().toggleClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n }\n let eventName = this.player().hasClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS) ? 'productBarMax' : 'productBarMin';\n this.player().trigger(eventName);\n };\n\n // Open shoppable\n if (this.options_.startState === 'open') {\n this.togglePanel(true);\n }\n\n // On play start\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.PLAY, () => {\n if (this.player_.currentTime() < 0.01) {\n // Open shoppable on-play\n if (this.options_.startState === 'openOnPlay') {\n this.togglePanel(true, this.options_.autoClose);\n }\n\n // Auto-close shoppable\n if (this.options_.autoClose && this.options_.startState.indexOf('open') !== -1) {\n setTimeout(() => {\n // Keep it open while hovered\n if (!this.contentEl_.matches(':hover')) {\n this.togglePanel(false);\n } else {\n this.contentEl_.addEventListener('mouseleave', () => {\n this.togglePanel(false);\n }, {\n once: true\n });\n }\n }, this.options_.autoClose * 1000);\n }\n }\n });\n }\n createEl() {\n const el = super.createEl('div');\n return el;\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppableBarLayout', ShoppableBarLayout);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppableBarLayout);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/layout/bar-layout.js?");
23
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _shoppable_products_overlay__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shoppable-products-overlay */ \"./components/shoppable-bar/layout/shoppable-products-overlay.js\");\n/* harmony import */ var _shoppable_panel_toggle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shoppable-panel-toggle */ \"./components/shoppable-bar/layout/shoppable-panel-toggle.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\nconst Component = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('Component');\n\n\n\n\nclass ShoppableBarLayout extends Component {\n constructor(player, options) {\n super(player, options);\n this.player_ = player;\n this.player().addClass('cld-shoppable-panel');\n this.player().addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.contentWrpEl_ = dom.createEl('div', {\n className: 'cld-spbl-bar'\n });\n this.contentBannerEl_ = dom.createEl('div', {\n className: 'cld-spbl-banner-msg base-color-text'\n }, {}, this.options_.bannerMsg || 'Shop the Video');\n this.contentWrpEl_.appendChild(this.contentBannerEl_);\n const productsOverlay = new _shoppable_products_overlay__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.player_, this.options_);\n this.contentWrpEl_.appendChild(productsOverlay.el_);\n this.contentEl_ = dom.createEl('div', {\n className: _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.CLD_SPBL_INNER_BAR\n });\n this.contentWrpEl_.appendChild(this.contentEl_);\n this.player().el().appendChild(this.contentWrpEl_);\n this.addChild(new _shoppable_panel_toggle__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.player_, {\n toggleIcon: this.options_.toggleIcon,\n clickHandler: () => {\n this.togglePanel();\n }\n }));\n this.addChild('ShoppablePanel', this.options_);\n this.dispose = () => {\n this.removeLayout();\n super.dispose();\n };\n this.togglePanel = open => {\n if (open === true) {\n // Open\n this.player().removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player().addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n } else if (open === false) {\n // Close\n this.player().removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n this.player().addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n } else {\n // Toggle\n this.player().toggleClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player().toggleClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n }\n let eventName = this.player().hasClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS) ? 'productBarMax' : 'productBarMin';\n this.player().trigger(eventName);\n };\n\n // Open shoppable\n if (this.options_.startState === 'open') {\n this.togglePanel(true);\n }\n\n // On play start\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.PLAY, () => {\n if (this.player_.currentTime() < 0.01) {\n // Open shoppable on-play\n if (this.options_.startState === 'openOnPlay') {\n this.togglePanel(true, this.options_.autoClose);\n }\n\n // Auto-close shoppable\n if (this.options_.autoClose && this.options_.startState.indexOf('open') !== -1) {\n setTimeout(() => {\n // Keep it open while hovered\n if (!this.contentEl_.matches(':hover')) {\n this.togglePanel(false);\n } else {\n this.contentEl_.addEventListener('mouseleave', () => {\n this.togglePanel(false);\n }, {\n once: true\n });\n }\n }, this.options_.autoClose * 1000);\n }\n }\n });\n }\n createEl() {\n const el = super.createEl('div');\n return el;\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppableBarLayout', ShoppableBarLayout);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppableBarLayout);\n\n//# sourceURL=webpack:///./components/shoppable-bar/layout/bar-layout.js?");
24
24
 
25
25
  /***/ }),
26
26
 
@@ -30,7 +30,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
30
30
  \*******************************************************************/
31
31
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32
32
 
33
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\n\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\nconst ClickableComponent = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('ClickableComponent');\nclass ShoppablePanelToggle extends ClickableComponent {\n constructor(player, options) {\n super(player, options);\n this.options_ = options;\n }\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n this.options_.clickHandler();\n }\n createEl() {\n let iconProps = {};\n let iconAttrs = {};\n if (this.options_.toggleIcon) {\n iconProps = {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_ICON_CLASS} ${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS} ${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLOSE_ICON_CLASS}`\n };\n iconAttrs = {\n style: `background-image: url(${this.options_.toggleIcon})`\n };\n } else {\n iconProps = {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_ICON_CLASS} ${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.ICON_CART_CLASS}`\n };\n }\n const icon = dom.createEl('span', iconProps, iconAttrs);\n const el = super.createEl('a', {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_CLASS} base-color-bg`\n });\n el.appendChild(icon);\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_2__.PLAYER_EVENT.PRODUCT_BAR_MIN, () => {\n setTimeout(() => {\n icon.classList.add(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.SHOPPABLE_ANIMATION_CLASS);\n setTimeout(() => {\n icon.classList.remove(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.SHOPPABLE_ANIMATION_CLASS);\n }, 1000);\n }, 500);\n });\n return el;\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppablePanelToggle', ShoppablePanelToggle);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePanelToggle);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/layout/shoppable-panel-toggle.js?");
33
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\n\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\nconst ClickableComponent = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('ClickableComponent');\nclass ShoppablePanelToggle extends ClickableComponent {\n constructor(player, options) {\n super(player, options);\n this.options_ = options;\n }\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n this.options_.clickHandler();\n }\n createEl() {\n let iconProps = {};\n let iconAttrs = {};\n if (this.options_.toggleIcon) {\n iconProps = {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_ICON_CLASS} ${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS} ${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLOSE_ICON_CLASS}`\n };\n iconAttrs = {\n style: `background-image: url(${this.options_.toggleIcon})`\n };\n } else {\n iconProps = {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_ICON_CLASS} ${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.ICON_CART_CLASS}`\n };\n }\n const icon = dom.createEl('span', iconProps, iconAttrs);\n const el = super.createEl('a', {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.CLD_SPBL_TOGGLE_CLASS} base-color-bg`\n });\n el.appendChild(icon);\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_2__.PLAYER_EVENT.PRODUCT_BAR_MIN, () => {\n setTimeout(() => {\n icon.classList.add(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.SHOPPABLE_ANIMATION_CLASS);\n setTimeout(() => {\n icon.classList.remove(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_1__.SHOPPABLE_ANIMATION_CLASS);\n }, 1000);\n }, 500);\n });\n return el;\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppablePanelToggle', ShoppablePanelToggle);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePanelToggle);\n\n//# sourceURL=webpack:///./components/shoppable-bar/layout/shoppable-panel-toggle.js?");
34
34
 
35
35
  /***/ }),
36
36
 
@@ -40,7 +40,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
40
40
  \***********************************************************************/
41
41
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
42
42
 
43
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var utils_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/time */ \"./utils/time.js\");\n/* harmony import */ var utils_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/find */ \"./utils/find.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\n\n\n\n\nconst Component = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('Component');\nclass ShoppableProductsOverlay extends Component {\n constructor(player) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(player, options);\n this.options_ = options;\n this.player_ = player;\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.SHOW_PRODUCTS_OVERLAY, this.renderProducts);\n this.dispose = () => {\n this.layout_.dispose();\n };\n }\n renderProducts = () => {\n // Close products side-panel\n this.player_.removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PRODUCTS_OVERLAY_CLASS);\n this.layout_.innerHTML = '';\n\n // Filter products with appearance on currentTime\n const currentTime = this.player_.currentTime();\n const currentProducts = this.options_.products.filter(product => product.hotspots && product.hotspots.some(a => (0,utils_time__WEBPACK_IMPORTED_MODULE_1__.parseTime)(a.time) === currentTime));\n currentProducts.forEach(product => {\n const hotspot = (0,utils_find__WEBPACK_IMPORTED_MODULE_2__.find)(product.hotspots, hs => (0,utils_time__WEBPACK_IMPORTED_MODULE_1__.parseTime)(hs.time) === currentTime);\n const productName = dom.createEl('div', {\n className: 'cld-spbl-product-hotspot-name'\n }, {}, product.productName);\n const productTooltip = dom.createEl('div', {\n className: 'cld-spbl-product-tooltip cld-spbl-product-tooltip-' + hotspot.tooltipPosition\n }, {}, productName);\n const productHotSpot = dom.createEl('a', {\n className: 'cld-spbl-product-hotspot accent-color-text',\n href: hotspot.clickUrl,\n target: '_blank'\n }, {\n style: 'left:' + hotspot.x + '; top:' + hotspot.y + ';'\n }, productTooltip);\n this.layout_.appendChild(productHotSpot);\n });\n\n // Remove\n this.player_.one(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.SEEKING, this.clearLayout);\n this.player_.one(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.PLAY, this.clearLayout);\n };\n clearLayout = () => {\n this.layout_.innerHTML = '';\n this.player_.removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PRODUCTS_OVERLAY_CLASS);\n };\n createEl() {\n const dimensions = this.player_.currentDimensions();\n this.layout_ = dom.createEl('div', {\n className: 'cld-spbl-products-overlay',\n style: `padding-top: ${dimensions.height / dimensions.width * 100}%;`\n });\n return this.layout_;\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('ShoppableProductsOverlay', ShoppableProductsOverlay);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppableProductsOverlay);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/layout/shoppable-products-overlay.js?");
43
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ~/utils/time */ \"./utils/time.js\");\n/* harmony import */ var _utils_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ~/utils/find */ \"./utils/find.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\n\n\n\n\nconst Component = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('Component');\nclass ShoppableProductsOverlay extends Component {\n constructor(player) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(player, options);\n this.options_ = options;\n this.player_ = player;\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.SHOW_PRODUCTS_OVERLAY, this.renderProducts);\n this.dispose = () => {\n this.layout_.dispose();\n };\n }\n renderProducts = () => {\n // Close products side-panel\n this.player_.removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PRODUCTS_OVERLAY_CLASS);\n this.layout_.innerHTML = '';\n\n // Filter products with appearance on currentTime\n const currentTime = this.player_.currentTime();\n const currentProducts = this.options_.products.filter(product => product.hotspots && product.hotspots.some(a => (0,_utils_time__WEBPACK_IMPORTED_MODULE_1__.parseTime)(a.time) === currentTime));\n currentProducts.forEach(product => {\n const hotspot = (0,_utils_find__WEBPACK_IMPORTED_MODULE_2__.find)(product.hotspots, hs => (0,_utils_time__WEBPACK_IMPORTED_MODULE_1__.parseTime)(hs.time) === currentTime);\n const productName = dom.createEl('div', {\n className: 'cld-spbl-product-hotspot-name'\n }, {}, product.productName);\n const productTooltip = dom.createEl('div', {\n className: 'cld-spbl-product-tooltip cld-spbl-product-tooltip-' + hotspot.tooltipPosition\n }, {}, productName);\n const productHotSpot = dom.createEl('a', {\n className: 'cld-spbl-product-hotspot accent-color-text',\n href: hotspot.clickUrl,\n target: '_blank'\n }, {\n style: 'left:' + hotspot.x + '; top:' + hotspot.y + ';'\n }, productTooltip);\n this.layout_.appendChild(productHotSpot);\n });\n\n // Remove\n this.player_.one(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.SEEKING, this.clearLayout);\n this.player_.one(_utils_consts__WEBPACK_IMPORTED_MODULE_4__.PLAYER_EVENT.PLAY, this.clearLayout);\n };\n clearLayout = () => {\n this.layout_.innerHTML = '';\n this.player_.removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_3__.SHOPPABLE_PRODUCTS_OVERLAY_CLASS);\n };\n createEl() {\n const dimensions = this.player_.currentDimensions();\n this.layout_ = dom.createEl('div', {\n className: 'cld-spbl-products-overlay',\n style: `padding-top: ${dimensions.height / dimensions.width * 100}%;`\n });\n return this.layout_;\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('ShoppableProductsOverlay', ShoppableProductsOverlay);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppableProductsOverlay);\n\n//# sourceURL=webpack:///./components/shoppable-bar/layout/shoppable-products-overlay.js?");
44
44
 
45
45
  /***/ }),
46
46
 
@@ -50,7 +50,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
50
50
  \****************************************************************/
51
51
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52
52
 
53
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \"./plugins/cloudinary/models/image-source.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n\nconst ClickableComponent = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('ClickableComponent');\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\n\n\nconst widthTransformation = {\n width: 132\n};\nclass ShoppablePanelItem extends ClickableComponent {\n constructor(player, initOptions) {\n super(player, initOptions);\n this.options_ = initOptions;\n this.isDragged = false;\n }\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n if (!this.el_.matches(`.dragged .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_ITEM}`)) {\n // Prevent click event if dragged\n this.options_.clickHandler(event);\n }\n this.isDragged = false;\n }\n getTitle() {\n return this.options_.conf.title;\n }\n createEl() {\n const el = super.createEl('a', {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_ITEM} base-color-bg accent-color-text`,\n href: '#'\n });\n el.setAttribute('data-product-id', this.options_.conf.productId || '');\n el.setAttribute('data-product-name', this.options_.conf.productName || '');\n if (this.options_.conf.onHover) {\n addOnHover(el, this.options_.conf.onHover, this.options_.item.cloudinaryConfig());\n }\n if (this.options_.conf.onClick) {\n addOnClick(el, this.options_.conf.onClick);\n }\n const img = super.createEl('img', {\n className: _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_IMAGE\n }, {\n src: this.options_.item.url(widthTransformation)\n });\n el.appendChild(img);\n if (this.getTitle()) {\n const info = dom.createEl('div', {\n className: 'cld-spbl-item-info base-color-semi-bg text-color-text'\n });\n const title = dom.createEl('span', {\n className: 'cld-spbl-item-title'\n }, {}, this.getTitle());\n info.appendChild(title);\n el.appendChild(info);\n }\n return el;\n }\n}\nconst addOnHover = (el, conf, cldConf) => {\n el.setAttribute('data-hover-action', conf.action);\n if (conf.action === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.SHOPPABLE_HOVER_ACTIONS.OVERLAY) {\n const overlayText = dom.createEl('span', {\n className: 'cld-spbl-overlay-text base-color-text'\n }, {}, conf.args);\n const overlay = dom.createEl('span', {\n className: 'cld-spbl-overlay text-color-semi-bg base-color-text'\n }, {\n title: conf.args\n }, overlayText);\n el.appendChild(overlay);\n } else {\n const switchImgSource = new _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_1__[\"default\"](conf.args.publicId, {\n cloudinaryConfig: cldConf,\n transformation: conf.args.transformation\n });\n const hoverImg = dom.createEl('img', {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_IMAGE} cld-spbl-hover-img`\n }, {\n src: switchImgSource.url(widthTransformation)\n });\n el.appendChild(hoverImg);\n }\n};\nconst addOnClick = (el, conf) => {\n el.setAttribute('data-click-action', conf.action);\n el.setAttribute('data-pause', conf.pause);\n if (conf.action === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.SHOPPABLE_CLICK_ACTIONS.SEEk) {\n el.setAttribute('data-seek', conf.args.time);\n } else if (conf.action === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.SHOPPABLE_CLICK_ACTIONS.GO_TO) {\n el.setAttribute('data-goto-url', conf.args.url);\n }\n};\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppablePanelItem', ShoppablePanelItem);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePanelItem);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/panel/shoppable-panel-item.js?");
53
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \"./plugins/cloudinary/models/image-source.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n\nconst ClickableComponent = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('ClickableComponent');\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\n\n\nconst widthTransformation = {\n width: 132\n};\nclass ShoppablePanelItem extends ClickableComponent {\n constructor(player, initOptions) {\n super(player, initOptions);\n this.options_ = initOptions;\n this.isDragged = false;\n }\n handleClick(event) {\n event.preventDefault();\n event.stopPropagation();\n if (!this.el_.matches(`.dragged .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_ITEM}`)) {\n // Prevent click event if dragged\n this.options_.clickHandler(event);\n }\n this.isDragged = false;\n }\n getTitle() {\n return this.options_.conf.title;\n }\n createEl() {\n const el = super.createEl('a', {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_ITEM} base-color-bg accent-color-text`,\n href: '#'\n });\n el.setAttribute('data-product-id', this.options_.conf.productId || '');\n el.setAttribute('data-product-name', this.options_.conf.productName || '');\n if (this.options_.conf.onHover) {\n addOnHover(el, this.options_.conf.onHover, this.options_.item.cloudinaryConfig());\n }\n if (this.options_.conf.onClick) {\n addOnClick(el, this.options_.conf.onClick);\n }\n const img = super.createEl('img', {\n className: _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_IMAGE\n }, {\n src: this.options_.item.url(widthTransformation)\n });\n el.appendChild(img);\n if (this.getTitle()) {\n const info = dom.createEl('div', {\n className: 'cld-spbl-item-info base-color-semi-bg text-color-text'\n });\n const title = dom.createEl('span', {\n className: 'cld-spbl-item-title'\n }, {}, this.getTitle());\n info.appendChild(title);\n el.appendChild(info);\n }\n return el;\n }\n}\nconst addOnHover = (el, conf, cldConf) => {\n el.setAttribute('data-hover-action', conf.action);\n if (conf.action === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.SHOPPABLE_HOVER_ACTIONS.OVERLAY) {\n const overlayText = dom.createEl('span', {\n className: 'cld-spbl-overlay-text base-color-text'\n }, {}, conf.args);\n const overlay = dom.createEl('span', {\n className: 'cld-spbl-overlay text-color-semi-bg base-color-text'\n }, {\n title: conf.args\n }, overlayText);\n el.appendChild(overlay);\n } else {\n const switchImgSource = new _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_1__[\"default\"](conf.args.publicId, {\n cloudinaryConfig: cldConf,\n transformation: conf.args.transformation\n });\n const hoverImg = dom.createEl('img', {\n className: `${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_IMAGE} cld-spbl-hover-img`\n }, {\n src: switchImgSource.url(widthTransformation)\n });\n el.appendChild(hoverImg);\n }\n};\nconst addOnClick = (el, conf) => {\n el.setAttribute('data-click-action', conf.action);\n el.setAttribute('data-pause', conf.pause);\n if (conf.action === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.SHOPPABLE_CLICK_ACTIONS.SEEk) {\n el.setAttribute('data-seek', conf.args.time);\n } else if (conf.action === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.SHOPPABLE_CLICK_ACTIONS.GO_TO) {\n el.setAttribute('data-goto-url', conf.args.url);\n }\n};\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppablePanelItem', ShoppablePanelItem);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePanelItem);\n\n//# sourceURL=webpack:///./components/shoppable-bar/panel/shoppable-panel-item.js?");
54
54
 
55
55
  /***/ }),
56
56
 
@@ -60,7 +60,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
60
60
  \***********************************************************/
61
61
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
62
62
 
63
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/throttle */ \"../node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var utils_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! utils/time */ \"./utils/time.js\");\n/* harmony import */ var _shoppable_panel_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shoppable-panel-item */ \"./components/shoppable-bar/panel/shoppable-panel-item.js\");\n/* harmony import */ var _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \"./plugins/cloudinary/models/image-source.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\n\n\n\n\n\n\nconst Component = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('Component');\nclass ShoppablePanel extends Component {\n constructor(player) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(player, options);\n this.options = options;\n const itemChangeHandler = () => {\n this.render();\n };\n player.on(_utils_consts__WEBPACK_IMPORTED_MODULE_6__.PLAYER_EVENT.SHOPPABLE_ITEM_CHANGED, itemChangeHandler);\n this.render();\n this.dispose = () => {\n super.dispose();\n player.off(_utils_consts__WEBPACK_IMPORTED_MODULE_6__.PLAYER_EVENT.SHOPPABLE_ITEM_CHANGED, itemChangeHandler);\n };\n }\n createEl() {\n const el = super.createEl();\n [_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.CLD_SPBL_PANEL_CLASS, 'base-color-bg'].map(cls => el.classList.add(cls));\n return el;\n }\n removeAll() {\n const childrens = this.children();\n for (let i = childrens.length - 1; i >= 0; --i) {\n this.removeChild(childrens[i]);\n }\n }\n getItems() {\n const cloudinaryConfig = this.player_.cloudinary.cloudinaryConfig();\n return this.options.products.map(product => {\n if (product.onHover && typeof product.onHover.args === 'object') {\n product.onHover.args.transformation = Object.assign({}, this.options.transformation, product.onHover.args.transformation);\n }\n const conf = {\n productId: product.productId,\n productName: product.productName,\n title: product.title,\n onHover: product.onHover,\n onClick: product.onClick,\n startTime: product.startTime,\n endTime: product.endTime\n };\n const imageSource = new _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_4__[\"default\"](product.publicId, {\n cloudinaryConfig: cloudinaryConfig,\n transformation: Object.assign({}, this.options.transformation, product.transformation)\n });\n return {\n imageSrc: imageSource,\n conf: conf\n };\n });\n }\n scrollToActiveItem() {\n const activeItems = this.el_.getElementsByClassName('active');\n if (activeItems.length > 0) {\n const toScroll = activeItems[0].offsetTop - 12;\n // Test for native scrollTo support (IE will fail)\n if ('scrollBehavior' in document.documentElement.style) {\n this.el_.scrollTo({\n top: toScroll,\n behavior: 'smooth'\n });\n } else {\n this.el_.scrollTop = toScroll;\n }\n }\n }\n render() {\n this.removeAll();\n const items = this.getItems();\n const throttledScrollToActiveItem = lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(() => this.scrollToActiveItem(), 1000);\n items.forEach((item, index) => {\n const shoppablePanelItem = new _shoppable_panel_item__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.player(), {\n item: item.imageSrc,\n conf: item.conf,\n next: index === 1,\n current: index === 0,\n clickHandler: e => {\n let target = e.currentTarget || e.target;\n let evName = this.player_.ended() ? 'productClickPost' : 'productClick';\n this.player_.trigger(evName, {\n productId: target.dataset.productId,\n productName: target.dataset.productName\n });\n\n // Go to URL, or seek video (set currentTime)\n if (target.dataset.clickAction === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_CLICK_ACTIONS.GO_TO) {\n window.open(target.dataset.gotoUrl, '_blank');\n } else if (target.dataset.clickAction === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_CLICK_ACTIONS.SEEk) {\n const gotoSecs = (0,utils_time__WEBPACK_IMPORTED_MODULE_2__.parseTime)(target.dataset.seek);\n if (gotoSecs !== null) {\n this.player_.addClass('vjs-has-started'); // Hide the poster image\n if (this.player_.postModal) {\n this.player_.postModal.close();\n }\n this.player_.currentTime(gotoSecs);\n // Close products side-panel\n this.player_.removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_PRODUCTS_OVERLAY_CLASS);\n // Wait for the time update and show the tooltips\n this.player_.one('seeked', () => this.player_.trigger('showProductsOverlay'));\n }\n }\n\n // pause - true (default), false, or number of seconds\n if (target.dataset.pause !== 'false') {\n this.player_.pause();\n if ((0,utils_time__WEBPACK_IMPORTED_MODULE_2__.parseTime)(target.dataset.pause)) {\n setTimeout(() => {\n this.player_.play();\n }, (0,utils_time__WEBPACK_IMPORTED_MODULE_2__.parseTime)(target.dataset.pause) * 1000);\n }\n }\n }\n });\n shoppablePanelItem.on('mouseover', e => {\n let target = e.currentTarget || e.target;\n let evName = this.player_.ended() ? 'productHoverPost' : 'productHover';\n this.player_.trigger(evName, {\n productId: target.dataset.productId,\n productName: target.dataset.productName\n });\n });\n if (typeof item.conf.startTime !== 'undefined' && typeof item.conf.endTime !== 'undefined') {\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_6__.PLAYER_EVENT.TIME_UPDATE, () => {\n const time = this.player_.currentTime();\n if (time >= item.conf.startTime && time < item.conf.endTime) {\n shoppablePanelItem.el_.classList.add('active');\n throttledScrollToActiveItem();\n } else if (shoppablePanelItem.el_.classList.contains('active')) {\n shoppablePanelItem.el_.classList.remove('active');\n }\n });\n }\n this.addChild(shoppablePanelItem);\n });\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppablePanel', ShoppablePanel);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePanel);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/panel/shoppable-panel.js?");
63
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/throttle */ \"../node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ~/utils/time */ \"./utils/time.js\");\n/* harmony import */ var _shoppable_panel_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shoppable-panel-item */ \"./components/shoppable-bar/panel/shoppable-panel-item.js\");\n/* harmony import */ var _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \"./plugins/cloudinary/models/image-source.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/consts */ \"./utils/consts.js\");\n\n\n\n\n\n\n\nconst Component = video_js__WEBPACK_IMPORTED_MODULE_0___default().getComponent('Component');\nclass ShoppablePanel extends Component {\n constructor(player) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(player, options);\n this.options = options;\n const itemChangeHandler = () => {\n this.render();\n };\n player.on(_utils_consts__WEBPACK_IMPORTED_MODULE_6__.PLAYER_EVENT.SHOPPABLE_ITEM_CHANGED, itemChangeHandler);\n this.render();\n this.dispose = () => {\n super.dispose();\n player.off(_utils_consts__WEBPACK_IMPORTED_MODULE_6__.PLAYER_EVENT.SHOPPABLE_ITEM_CHANGED, itemChangeHandler);\n };\n }\n createEl() {\n const el = super.createEl();\n [_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.CLD_SPBL_PANEL_CLASS, 'base-color-bg'].map(cls => el.classList.add(cls));\n return el;\n }\n removeAll() {\n const childrens = this.children();\n for (let i = childrens.length - 1; i >= 0; --i) {\n this.removeChild(childrens[i]);\n }\n }\n getItems() {\n const cloudinaryConfig = this.player_.cloudinary.cloudinaryConfig();\n return this.options.products.map(product => {\n if (product.onHover && typeof product.onHover.args === 'object') {\n product.onHover.args.transformation = Object.assign({}, this.options.transformation, product.onHover.args.transformation);\n }\n const conf = {\n productId: product.productId,\n productName: product.productName,\n title: product.title,\n onHover: product.onHover,\n onClick: product.onClick,\n startTime: product.startTime,\n endTime: product.endTime\n };\n const imageSource = new _plugins_cloudinary_models_image_source__WEBPACK_IMPORTED_MODULE_4__[\"default\"](product.publicId, {\n cloudinaryConfig: cloudinaryConfig,\n transformation: Object.assign({}, this.options.transformation, product.transformation)\n });\n return {\n imageSrc: imageSource,\n conf: conf\n };\n });\n }\n scrollToActiveItem() {\n const activeItems = this.el_.getElementsByClassName('active');\n if (activeItems.length > 0) {\n const toScroll = activeItems[0].offsetTop - 12;\n // Test for native scrollTo support (IE will fail)\n if ('scrollBehavior' in document.documentElement.style) {\n this.el_.scrollTo({\n top: toScroll,\n behavior: 'smooth'\n });\n } else {\n this.el_.scrollTop = toScroll;\n }\n }\n }\n render() {\n this.removeAll();\n const items = this.getItems();\n const throttledScrollToActiveItem = lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(() => this.scrollToActiveItem(), 1000);\n items.forEach((item, index) => {\n const shoppablePanelItem = new _shoppable_panel_item__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.player(), {\n item: item.imageSrc,\n conf: item.conf,\n next: index === 1,\n current: index === 0,\n clickHandler: e => {\n let target = e.currentTarget || e.target;\n let evName = this.player_.ended() ? 'productClickPost' : 'productClick';\n this.player_.trigger(evName, {\n productId: target.dataset.productId,\n productName: target.dataset.productName\n });\n\n // Go to URL, or seek video (set currentTime)\n if (target.dataset.clickAction === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_CLICK_ACTIONS.GO_TO) {\n window.open(target.dataset.gotoUrl, '_blank');\n } else if (target.dataset.clickAction === _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_CLICK_ACTIONS.SEEk) {\n const gotoSecs = (0,_utils_time__WEBPACK_IMPORTED_MODULE_2__.parseTime)(target.dataset.seek);\n if (gotoSecs !== null) {\n this.player_.addClass('vjs-has-started'); // Hide the poster image\n if (this.player_.postModal) {\n this.player_.postModal.close();\n }\n this.player_.currentTime(gotoSecs);\n // Close products side-panel\n this.player_.removeClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_PANEL_VISIBLE_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_PANEL_HIDDEN_CLASS);\n this.player_.addClass(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_5__.SHOPPABLE_PRODUCTS_OVERLAY_CLASS);\n // Wait for the time update and show the tooltips\n this.player_.one('seeked', () => this.player_.trigger('showProductsOverlay'));\n }\n }\n\n // pause - true (default), false, or number of seconds\n if (target.dataset.pause !== 'false') {\n this.player_.pause();\n if ((0,_utils_time__WEBPACK_IMPORTED_MODULE_2__.parseTime)(target.dataset.pause)) {\n setTimeout(() => {\n this.player_.play();\n }, (0,_utils_time__WEBPACK_IMPORTED_MODULE_2__.parseTime)(target.dataset.pause) * 1000);\n }\n }\n }\n });\n shoppablePanelItem.on('mouseover', e => {\n let target = e.currentTarget || e.target;\n let evName = this.player_.ended() ? 'productHoverPost' : 'productHover';\n this.player_.trigger(evName, {\n productId: target.dataset.productId,\n productName: target.dataset.productName\n });\n });\n if (typeof item.conf.startTime !== 'undefined' && typeof item.conf.endTime !== 'undefined') {\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_6__.PLAYER_EVENT.TIME_UPDATE, () => {\n const time = this.player_.currentTime();\n if (time >= item.conf.startTime && time < item.conf.endTime) {\n shoppablePanelItem.el_.classList.add('active');\n throttledScrollToActiveItem();\n } else if (shoppablePanelItem.el_.classList.contains('active')) {\n shoppablePanelItem.el_.classList.remove('active');\n }\n });\n }\n this.addChild(shoppablePanelItem);\n });\n }\n}\nvideo_js__WEBPACK_IMPORTED_MODULE_0___default().registerComponent('shoppablePanel', ShoppablePanel);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePanel);\n\n//# sourceURL=webpack:///./components/shoppable-bar/panel/shoppable-panel.js?");
64
64
 
65
65
  /***/ }),
66
66
 
@@ -70,7 +70,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
70
70
  \***********************************************************/
71
71
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
72
72
 
73
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _panel_shoppable_panel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./panel/shoppable-panel.js */ \"./components/shoppable-bar/panel/shoppable-panel.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n\n\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\nclass ShoppablePostWidget {\n constructor(player) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.options_ = {\n ...options,\n postPlay: true\n };\n this.player_ = player;\n this.render();\n\n // Handle drag-to-scroll\n this.handleDragToScroll();\n this.dispose = () => {\n this.layout_.dispose();\n };\n }\n handleDragToScroll() {\n const postModal = this.player_.postModal.el_;\n const slider = postModal.querySelector(`.${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_PANEL_CLASS}`);\n let isDown = false;\n let startX = 0;\n let scrollLeft = 0;\n slider.addEventListener('mousedown', e => {\n isDown = true;\n startX = e.pageX - slider.offsetLeft;\n scrollLeft = slider.scrollLeft;\n });\n document.addEventListener('mouseup', e => {\n isDown = false;\n setTimeout(() => {\n slider.classList.remove('dragged');\n }, 300);\n const x = e.pageX - slider.offsetLeft;\n const walk = x - startX;\n if (Math.abs(walk) > 5) {\n e.preventDefault();\n }\n });\n document.addEventListener('mousemove', e => {\n if (!isDown) {\n return;\n }\n e.preventDefault();\n const x = e.pageX - slider.offsetLeft;\n const walk = x - startX;\n slider.scrollLeft = scrollLeft - walk;\n if (Math.abs(walk) > 5 && !slider.classList.contains('dragged')) {\n slider.classList.add('dragged');\n }\n });\n }\n render() {\n this.player_.postModal = null;\n const el = dom.createEl('div', {\n className: 'cld-spbl-post-play'\n });\n const panel = new _panel_shoppable_panel_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.player_, this.options_);\n const title = dom.createEl('div', {\n className: 'cld-spbl-post-title base-color-text'\n }, {}, this.options_.bannerMsg || 'Shop the Video');\n\n // Background - poster + blur effect\n const bgSrc = this.player_.cloudinary.currentPoster();\n bgSrc.transformation([bgSrc.transformation().toOptions ? bgSrc.transformation().toOptions() : {}, {\n effect: 'blur:3000'\n }]);\n const panelBg = dom.createEl('div', {\n className: 'cld-spbl-post-play-bg',\n style: `background-image: url(\"${bgSrc.url()}\")`\n });\n const replayBtn = dom.createEl('button', {\n className: 'cld-spbl-replay-btn base-color-bg vjs-icon-replay',\n onclick: () => {\n this.player_.trigger('replay');\n this.player_.postModal.close();\n this.player_.play();\n }\n }, {}, 'Replay');\n el.appendChild(panelBg);\n el.appendChild(title);\n el.appendChild(panel.el());\n el.appendChild(replayBtn);\n this.player_.postModal = this.player_.createModal(el, {\n name: 'postModal',\n uncloseable: true\n });\n this.player_.addClass('cld-spbl-post-modal');\n this.player_.postModal.on('beforemodalclose', () => {\n this.player_.removeClass('cld-spbl-post-modal');\n });\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePostWidget);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/shoppable-post-widget.js?");
73
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _panel_shoppable_panel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./panel/shoppable-panel.js */ \"./components/shoppable-bar/panel/shoppable-panel.js\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n\n\n\nconst dom = (video_js__WEBPACK_IMPORTED_MODULE_0___default().dom) || (video_js__WEBPACK_IMPORTED_MODULE_0___default());\nclass ShoppablePostWidget {\n constructor(player) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.options_ = {\n ...options,\n postPlay: true\n };\n this.player_ = player;\n this.render();\n\n // Handle drag-to-scroll\n this.handleDragToScroll();\n this.dispose = () => {\n this.layout_.dispose();\n };\n }\n handleDragToScroll() {\n const postModal = this.player_.postModal.el_;\n const slider = postModal.querySelector(`.${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_2__.CLD_SPBL_PANEL_CLASS}`);\n let isDown = false;\n let startX = 0;\n let scrollLeft = 0;\n slider.addEventListener('mousedown', e => {\n isDown = true;\n startX = e.pageX - slider.offsetLeft;\n scrollLeft = slider.scrollLeft;\n });\n document.addEventListener('mouseup', e => {\n isDown = false;\n setTimeout(() => {\n slider.classList.remove('dragged');\n }, 300);\n const x = e.pageX - slider.offsetLeft;\n const walk = x - startX;\n if (Math.abs(walk) > 5) {\n e.preventDefault();\n }\n });\n document.addEventListener('mousemove', e => {\n if (!isDown) {\n return;\n }\n e.preventDefault();\n const x = e.pageX - slider.offsetLeft;\n const walk = x - startX;\n slider.scrollLeft = scrollLeft - walk;\n if (Math.abs(walk) > 5 && !slider.classList.contains('dragged')) {\n slider.classList.add('dragged');\n }\n });\n }\n render() {\n this.player_.postModal = null;\n const el = dom.createEl('div', {\n className: 'cld-spbl-post-play'\n });\n const panel = new _panel_shoppable_panel_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.player_, this.options_);\n const title = dom.createEl('div', {\n className: 'cld-spbl-post-title base-color-text'\n }, {}, this.options_.bannerMsg || 'Shop the Video');\n\n // Background - poster + blur effect\n const bgSrc = this.player_.cloudinary.currentPoster();\n bgSrc.transformation([bgSrc.transformation().toOptions ? bgSrc.transformation().toOptions() : {}, {\n effect: 'blur:3000'\n }]);\n const panelBg = dom.createEl('div', {\n className: 'cld-spbl-post-play-bg',\n style: `background-image: url(\"${bgSrc.url()}\")`\n });\n const replayBtn = dom.createEl('button', {\n className: 'cld-spbl-replay-btn base-color-bg vjs-icon-replay',\n onclick: () => {\n this.player_.trigger('replay');\n this.player_.postModal.close();\n this.player_.play();\n }\n }, {}, 'Replay');\n el.appendChild(panelBg);\n el.appendChild(title);\n el.appendChild(panel.el());\n el.appendChild(replayBtn);\n this.player_.postModal = this.player_.createModal(el, {\n name: 'postModal',\n uncloseable: true\n });\n this.player_.addClass('cld-spbl-post-modal');\n this.player_.postModal.on('beforemodalclose', () => {\n this.player_.removeClass('cld-spbl-post-modal');\n });\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppablePostWidget);\n\n//# sourceURL=webpack:///./components/shoppable-bar/shoppable-post-widget.js?");
74
74
 
75
75
  /***/ }),
76
76
 
@@ -80,7 +80,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
80
80
  \************************************************************/
81
81
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
82
82
 
83
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CLD_SPBL_IMAGE: () => (/* binding */ CLD_SPBL_IMAGE),\n/* harmony export */ CLD_SPBL_INNER_BAR: () => (/* binding */ CLD_SPBL_INNER_BAR),\n/* harmony export */ CLD_SPBL_ITEM: () => (/* binding */ CLD_SPBL_ITEM),\n/* harmony export */ CLD_SPBL_PANEL_CLASS: () => (/* binding */ CLD_SPBL_PANEL_CLASS),\n/* harmony export */ CLD_SPBL_TOGGLE_CLASS: () => (/* binding */ CLD_SPBL_TOGGLE_CLASS),\n/* harmony export */ CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS: () => (/* binding */ CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS),\n/* harmony export */ CLD_SPBL_TOGGLE_ICON_CLASS: () => (/* binding */ CLD_SPBL_TOGGLE_ICON_CLASS),\n/* harmony export */ CLOSE_ICON_CLASS: () => (/* binding */ CLOSE_ICON_CLASS),\n/* harmony export */ ICON_CART_CLASS: () => (/* binding */ ICON_CART_CLASS),\n/* harmony export */ SHOPPABLE_ANIMATION_CLASS: () => (/* binding */ SHOPPABLE_ANIMATION_CLASS),\n/* harmony export */ SHOPPABLE_CLICK_ACTIONS: () => (/* binding */ SHOPPABLE_CLICK_ACTIONS),\n/* harmony export */ SHOPPABLE_HOVER_ACTIONS: () => (/* binding */ SHOPPABLE_HOVER_ACTIONS),\n/* harmony export */ SHOPPABLE_PANEL_HIDDEN_CLASS: () => (/* binding */ SHOPPABLE_PANEL_HIDDEN_CLASS),\n/* harmony export */ SHOPPABLE_PANEL_VISIBLE_CLASS: () => (/* binding */ SHOPPABLE_PANEL_VISIBLE_CLASS),\n/* harmony export */ SHOPPABLE_PRODUCTS_OVERLAY_CLASS: () => (/* binding */ SHOPPABLE_PRODUCTS_OVERLAY_CLASS),\n/* harmony export */ SHOPPABLE_WIDGET_OPTIONS_DEFAULTS: () => (/* binding */ SHOPPABLE_WIDGET_OPTIONS_DEFAULTS)\n/* harmony export */ });\nconst SHOPPABLE_WIDGET_OPTIONS_DEFAULTS = {\n location: 'right',\n toggleIcon: '',\n width: '20%',\n startState: 'openOnPlay',\n autoClose: 2,\n transformation: {\n quality: 'auto',\n width: 'auto',\n fetch_format: 'auto',\n crop: 'scale'\n },\n products: [],\n showPostPlayOverlay: false\n};\nconst SHOPPABLE_CLICK_ACTIONS = {\n GO_TO: 'goto',\n SEEk: 'seek'\n};\nconst SHOPPABLE_HOVER_ACTIONS = {\n OVERLAY: 'overlay'\n};\nconst SHOPPABLE_PANEL_VISIBLE_CLASS = 'shoppable-panel-visible';\nconst SHOPPABLE_PANEL_HIDDEN_CLASS = 'shoppable-panel-hidden';\nconst SHOPPABLE_PRODUCTS_OVERLAY_CLASS = 'shoppable-products-overlay';\nconst CLD_SPBL_PANEL_CLASS = 'cld-spbl-panel';\nconst CLD_SPBL_TOGGLE_CLASS = 'cld-spbl-toggle';\nconst CLD_SPBL_TOGGLE_ICON_CLASS = 'cld-spbl-toggle-icon';\nconst CLD_SPBL_INNER_BAR = 'cld-spbl-bar-inner';\nconst CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS = 'cld-spbl-toggle-custom-icon';\nconst ICON_CART_CLASS = 'vjs-icon-cart';\nconst CLOSE_ICON_CLASS = 'vjs-icon-close';\nconst SHOPPABLE_ANIMATION_CLASS = 'animate';\nconst CLD_SPBL_ITEM = 'cld-spbl-item';\nconst CLD_SPBL_IMAGE = 'cld-spbl-img';\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/shoppable-widget.const.js?");
83
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CLD_SPBL_IMAGE: () => (/* binding */ CLD_SPBL_IMAGE),\n/* harmony export */ CLD_SPBL_INNER_BAR: () => (/* binding */ CLD_SPBL_INNER_BAR),\n/* harmony export */ CLD_SPBL_ITEM: () => (/* binding */ CLD_SPBL_ITEM),\n/* harmony export */ CLD_SPBL_PANEL_CLASS: () => (/* binding */ CLD_SPBL_PANEL_CLASS),\n/* harmony export */ CLD_SPBL_TOGGLE_CLASS: () => (/* binding */ CLD_SPBL_TOGGLE_CLASS),\n/* harmony export */ CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS: () => (/* binding */ CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS),\n/* harmony export */ CLD_SPBL_TOGGLE_ICON_CLASS: () => (/* binding */ CLD_SPBL_TOGGLE_ICON_CLASS),\n/* harmony export */ CLOSE_ICON_CLASS: () => (/* binding */ CLOSE_ICON_CLASS),\n/* harmony export */ ICON_CART_CLASS: () => (/* binding */ ICON_CART_CLASS),\n/* harmony export */ SHOPPABLE_ANIMATION_CLASS: () => (/* binding */ SHOPPABLE_ANIMATION_CLASS),\n/* harmony export */ SHOPPABLE_CLICK_ACTIONS: () => (/* binding */ SHOPPABLE_CLICK_ACTIONS),\n/* harmony export */ SHOPPABLE_HOVER_ACTIONS: () => (/* binding */ SHOPPABLE_HOVER_ACTIONS),\n/* harmony export */ SHOPPABLE_PANEL_HIDDEN_CLASS: () => (/* binding */ SHOPPABLE_PANEL_HIDDEN_CLASS),\n/* harmony export */ SHOPPABLE_PANEL_VISIBLE_CLASS: () => (/* binding */ SHOPPABLE_PANEL_VISIBLE_CLASS),\n/* harmony export */ SHOPPABLE_PRODUCTS_OVERLAY_CLASS: () => (/* binding */ SHOPPABLE_PRODUCTS_OVERLAY_CLASS),\n/* harmony export */ SHOPPABLE_WIDGET_OPTIONS_DEFAULTS: () => (/* binding */ SHOPPABLE_WIDGET_OPTIONS_DEFAULTS)\n/* harmony export */ });\nconst SHOPPABLE_WIDGET_OPTIONS_DEFAULTS = {\n location: 'right',\n toggleIcon: '',\n width: '20%',\n startState: 'openOnPlay',\n autoClose: 2,\n transformation: {\n quality: 'auto',\n width: 'auto',\n fetch_format: 'auto',\n crop: 'scale'\n },\n products: [],\n showPostPlayOverlay: false\n};\nconst SHOPPABLE_CLICK_ACTIONS = {\n GO_TO: 'goto',\n SEEk: 'seek'\n};\nconst SHOPPABLE_HOVER_ACTIONS = {\n OVERLAY: 'overlay'\n};\nconst SHOPPABLE_PANEL_VISIBLE_CLASS = 'shoppable-panel-visible';\nconst SHOPPABLE_PANEL_HIDDEN_CLASS = 'shoppable-panel-hidden';\nconst SHOPPABLE_PRODUCTS_OVERLAY_CLASS = 'shoppable-products-overlay';\nconst CLD_SPBL_PANEL_CLASS = 'cld-spbl-panel';\nconst CLD_SPBL_TOGGLE_CLASS = 'cld-spbl-toggle';\nconst CLD_SPBL_TOGGLE_ICON_CLASS = 'cld-spbl-toggle-icon';\nconst CLD_SPBL_INNER_BAR = 'cld-spbl-bar-inner';\nconst CLD_SPBL_TOGGLE_CUSTOM_ICON_CLASS = 'cld-spbl-toggle-custom-icon';\nconst ICON_CART_CLASS = 'vjs-icon-cart';\nconst CLOSE_ICON_CLASS = 'vjs-icon-close';\nconst SHOPPABLE_ANIMATION_CLASS = 'animate';\nconst CLD_SPBL_ITEM = 'cld-spbl-item';\nconst CLD_SPBL_IMAGE = 'cld-spbl-img';\n\n//# sourceURL=webpack:///./components/shoppable-bar/shoppable-widget.const.js?");
84
84
 
85
85
  /***/ }),
86
86
 
@@ -90,7 +90,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
90
90
  \******************************************************/
91
91
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
92
92
 
93
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _layout_bar_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout/bar-layout */ \"./components/shoppable-bar/layout/bar-layout.js\");\n/* harmony import */ var _shoppable_post_widget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shoppable-post-widget */ \"./components/shoppable-bar/shoppable-post-widget.js\");\n/* harmony import */ var _shoppable_widget_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shoppable-widget.scss */ \"./components/shoppable-bar/shoppable-widget.scss\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/consts */ \"./utils/consts.js\");\n\n\n\n\n\n\nclass ShoppableWidget {\n constructor(player) {\n let initOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.options_ = video_js__WEBPACK_IMPORTED_MODULE_0___default().obj.merge(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.SHOPPABLE_WIDGET_OPTIONS_DEFAULTS, initOptions);\n this.player_ = player;\n if (this.options_.showPostPlayOverlay) {\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_5__.PLAYER_EVENT.ENDED, () => {\n this.player_.addChild(new _shoppable_post_widget__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.player_, this.options_));\n });\n }\n const width = this.options_.width;\n this._injectCSS(`\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.CLD_SPBL_INNER_BAR} {\n transform: translateX(${width});\n }\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.SHOPPABLE_PANEL_VISIBLE_CLASS} .vjs-control-bar {\n width: calc(100% - ${width});\n }\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.CLD_SPBL_TOGGLE_CLASS} {\n right: ${width};\n }\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.CLD_SPBL_PANEL_CLASS}{\n width: ${width};\n }\n `);\n this._setListeners();\n }\n _setListeners() {\n const resizeHandler = this._resizeHandler.bind(this);\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_5__.PLAYER_EVENT.RESIZE, resizeHandler);\n window.addEventListener('resize', resizeHandler);\n this.dispose = () => {\n this.player_.off(_utils_consts__WEBPACK_IMPORTED_MODULE_5__.PLAYER_EVENT.RESIZE, resizeHandler);\n window.removeEventListener('resize', resizeHandler);\n this.layout_.dispose();\n };\n }\n _injectCSS(css) {\n const style = document.createElement('style');\n style.innerHTML = css;\n this.player_.el_.appendChild(style);\n }\n _resizeHandler() {\n const shoppableBarBreakpoints = [['sm', 0, 80], ['md', 81, 110], ['lg', 111, 170]];\n const shoppableBarWidth = parseFloat(this.options_.width) / 100.0 * this.player_.el_.clientWidth;\n let inRange = false;\n if (shoppableBarWidth) {\n for (const [name, min, max] of shoppableBarBreakpoints) {\n if (shoppableBarWidth > min && shoppableBarWidth <= max) {\n this.layout_.contentWrpEl_.setAttribute('size', name);\n inRange = name;\n }\n }\n if (!inRange) {\n this.layout_.contentWrpEl_.removeAttribute('size');\n }\n }\n }\n init() {\n this.render();\n }\n render() {\n this.layout_ = new _layout_bar_layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.player_, this.options_);\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppableWidget);\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/shoppable-widget.js?");
93
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/alt/video.core-exposed.js\");\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _layout_bar_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./layout/bar-layout */ \"./components/shoppable-bar/layout/bar-layout.js\");\n/* harmony import */ var _shoppable_post_widget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shoppable-post-widget */ \"./components/shoppable-bar/shoppable-post-widget.js\");\n/* harmony import */ var _shoppable_widget_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shoppable-widget.scss */ \"./components/shoppable-bar/shoppable-widget.scss\");\n/* harmony import */ var _shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shoppable-widget.const */ \"./components/shoppable-bar/shoppable-widget.const.js\");\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/consts */ \"./utils/consts.js\");\n\n\n\n\n\n\nclass ShoppableWidget {\n constructor(player) {\n let initOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.options_ = video_js__WEBPACK_IMPORTED_MODULE_0___default().obj.merge(_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.SHOPPABLE_WIDGET_OPTIONS_DEFAULTS, initOptions);\n this.player_ = player;\n if (this.options_.showPostPlayOverlay) {\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_5__.PLAYER_EVENT.ENDED, () => {\n this.player_.addChild(new _shoppable_post_widget__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.player_, this.options_));\n });\n }\n const width = this.options_.width;\n this._injectCSS(`\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.CLD_SPBL_INNER_BAR} {\n transform: translateX(${width});\n }\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.SHOPPABLE_PANEL_VISIBLE_CLASS} .vjs-control-bar {\n width: calc(100% - ${width});\n }\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.CLD_SPBL_TOGGLE_CLASS} {\n right: ${width};\n }\n .${_shoppable_widget_const__WEBPACK_IMPORTED_MODULE_4__.CLD_SPBL_PANEL_CLASS}{\n width: ${width};\n }\n `);\n this._setListeners();\n }\n _setListeners() {\n const resizeHandler = this._resizeHandler.bind(this);\n this.player_.on(_utils_consts__WEBPACK_IMPORTED_MODULE_5__.PLAYER_EVENT.RESIZE, resizeHandler);\n window.addEventListener('resize', resizeHandler);\n this.dispose = () => {\n this.player_.off(_utils_consts__WEBPACK_IMPORTED_MODULE_5__.PLAYER_EVENT.RESIZE, resizeHandler);\n window.removeEventListener('resize', resizeHandler);\n this.layout_.dispose();\n };\n }\n _injectCSS(css) {\n const style = document.createElement('style');\n style.innerHTML = css;\n this.player_.el_.appendChild(style);\n }\n _resizeHandler() {\n const shoppableBarBreakpoints = [['sm', 0, 80], ['md', 81, 110], ['lg', 111, 170]];\n const shoppableBarWidth = parseFloat(this.options_.width) / 100.0 * this.player_.el_.clientWidth;\n let inRange = false;\n if (shoppableBarWidth) {\n for (const [name, min, max] of shoppableBarBreakpoints) {\n if (shoppableBarWidth > min && shoppableBarWidth <= max) {\n this.layout_.contentWrpEl_.setAttribute('size', name);\n inRange = name;\n }\n }\n if (!inRange) {\n this.layout_.contentWrpEl_.removeAttribute('size');\n }\n }\n }\n init() {\n this.render();\n }\n render() {\n this.layout_ = new _layout_bar_layout__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.player_, this.options_);\n }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShoppableWidget);\n\n//# sourceURL=webpack:///./components/shoppable-bar/shoppable-widget.js?");
94
94
 
95
95
  /***/ }),
96
96
 
@@ -100,7 +100,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
100
100
  \***********************/
101
101
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
102
102
 
103
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ parseTime: () => (/* binding */ parseTime)\n/* harmony export */ });\n// Convert time string i.e. '2:40' to seconds number (160)\n// Also allows h:m:s format and mm:ss, m:s etc.\nconst parseTime = function (hms) {\n const [seconds, minutes, hours] = hms.split(':').reverse();\n let sum = null;\n if (!isNaN(seconds)) {\n sum = (+hours || 0) * 60 * 60 + (+minutes || 0) * 60 + +seconds;\n }\n return sum;\n};\n\n\n//# sourceURL=webpack://cloudinary-video-player/./utils/time.js?");
103
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ parseTime: () => (/* binding */ parseTime)\n/* harmony export */ });\n// Convert time string i.e. '2:40' to seconds number (160)\n// Also allows h:m:s format and mm:ss, m:s etc.\nconst parseTime = function (hms) {\n const [seconds, minutes, hours] = hms.split(':').reverse();\n let sum = null;\n if (!isNaN(seconds)) {\n sum = (+hours || 0) * 60 * 60 + (+minutes || 0) * 60 + +seconds;\n }\n return sum;\n};\n\n\n//# sourceURL=webpack:///./utils/time.js?");
104
104
 
105
105
  /***/ }),
106
106
 
@@ -110,7 +110,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
110
110
  \********************************************************/
111
111
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
112
112
 
113
- eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://cloudinary-video-player/./components/shoppable-bar/shoppable-widget.scss?");
113
+ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack:///./components/shoppable-bar/shoppable-widget.scss?");
114
114
 
115
115
  /***/ })
116
116
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.12.1
3
- * Built on 2026-03-17T08:20:21.701Z
2
+ * Cloudinary Video Player v3.12.2-edge.0
3
+ * Built on 2026-03-19T13:14:32.913Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  (self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[525],{9987:(t,e,s)=>{"use strict";s.d(e,{default:()=>Z});var o=s(6673),a=s.n(o);const i=function(t){const[e,s,o]=t.split(":").reverse();let a=null;return isNaN(e)||(a=60*(+o||0)*60+60*(+s||0)+ +e),a};var r=s(9339);const n={location:"right",toggleIcon:"",width:"20%",startState:"openOnPlay",autoClose:2,transformation:{quality:"auto",width:"auto",fetch_format:"auto",crop:"scale"},products:[],showPostPlayOverlay:!1},l="goto",c="seek",p="overlay",d="shoppable-panel-visible",h="shoppable-panel-hidden",u="shoppable-products-overlay",m="cld-spbl-panel",g="cld-spbl-toggle",_="cld-spbl-toggle-icon",y="cld-spbl-bar-inner",f="animate",v="cld-spbl-item",b="cld-spbl-img";var C=s(1104);const E=a().dom||a(),T=a().getComponent("Component");class N extends T{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.options_=e,this.player_=t,this.player_.on(C.f.SHOW_PRODUCTS_OVERLAY,this.renderProducts),this.dispose=()=>{this.layout_.dispose()}}renderProducts=()=>{this.player_.removeClass(d),this.player_.addClass(h),this.player_.addClass(u),this.layout_.innerHTML="";const t=this.player_.currentTime();this.options_.products.filter(e=>e.hotspots&&e.hotspots.some(e=>i(e.time)===t)).forEach(e=>{const s=(0,r.I)(e.hotspots,e=>i(e.time)===t),o=E.createEl("div",{className:"cld-spbl-product-hotspot-name"},{},e.productName),a=E.createEl("div",{className:"cld-spbl-product-tooltip cld-spbl-product-tooltip-"+s.tooltipPosition},{},o),n=E.createEl("a",{className:"cld-spbl-product-hotspot accent-color-text",href:s.clickUrl,target:"_blank"},{style:"left:"+s.x+"; top:"+s.y+";"},a);this.layout_.appendChild(n)}),this.player_.one(C.f.SEEKING,this.clearLayout),this.player_.one(C.f.PLAY,this.clearLayout)};clearLayout=()=>{this.layout_.innerHTML="",this.player_.removeClass(u)};createEl(){const t=this.player_.currentDimensions();return this.layout_=E.createEl("div",{className:"cld-spbl-products-overlay",style:`padding-top: ${t.height/t.width*100}%;`}),this.layout_}}a().registerComponent("ShoppableProductsOverlay",N);const P=N,L=a().dom||a(),x=a().getComponent("ClickableComponent");class w extends x{constructor(t,e){super(t,e),this.options_=e}handleClick(t){t.preventDefault(),t.stopPropagation(),this.options_.clickHandler()}createEl(){let t={},e={};this.options_.toggleIcon?(t={className:`${_} cld-spbl-toggle-custom-icon vjs-icon-close`},e={style:`background-image: url(${this.options_.toggleIcon})`}):t={className:`${_} vjs-icon-cart`};const s=L.createEl("span",t,e),o=super.createEl("a",{className:`${g} base-color-bg`});return o.appendChild(s),this.player_.on(C.f.PRODUCT_BAR_MIN,()=>{setTimeout(()=>{s.classList.add(f),setTimeout(()=>{s.classList.remove(f)},1e3)},500)}),o}}a().registerComponent("shoppablePanelToggle",w);const k=w,I=a().dom||a(),A=a().getComponent("Component");class H extends A{constructor(t,e){super(t,e),this.player_=t,this.player().addClass("cld-shoppable-panel"),this.player().addClass(h),this.contentWrpEl_=I.createEl("div",{className:"cld-spbl-bar"}),this.contentBannerEl_=I.createEl("div",{className:"cld-spbl-banner-msg base-color-text"},{},this.options_.bannerMsg||"Shop the Video"),this.contentWrpEl_.appendChild(this.contentBannerEl_);const s=new P(this.player_,this.options_);this.contentWrpEl_.appendChild(s.el_),this.contentEl_=I.createEl("div",{className:y}),this.contentWrpEl_.appendChild(this.contentEl_),this.player().el().appendChild(this.contentWrpEl_),this.addChild(new k(this.player_,{toggleIcon:this.options_.toggleIcon,clickHandler:()=>{this.togglePanel()}})),this.addChild("ShoppablePanel",this.options_),this.dispose=()=>{this.removeLayout(),super.dispose()},this.togglePanel=t=>{!0===t?(this.player().removeClass(h),this.player().addClass(d)):!1===t?(this.player().removeClass(d),this.player().addClass(h)):(this.player().toggleClass(h),this.player().toggleClass(d));let e=this.player().hasClass(d)?"productBarMax":"productBarMin";this.player().trigger(e)},"open"===this.options_.startState&&this.togglePanel(!0),this.player_.on(C.f.PLAY,()=>{this.player_.currentTime()<.01&&("openOnPlay"===this.options_.startState&&this.togglePanel(!0,this.options_.autoClose),this.options_.autoClose&&-1!==this.options_.startState.indexOf("open")&&setTimeout(()=>{this.contentEl_.matches(":hover")?this.contentEl_.addEventListener("mouseleave",()=>{this.togglePanel(!1)},{once:!0}):this.togglePanel(!1)},1e3*this.options_.autoClose))})}createEl(){return super.createEl("div")}}a().registerComponent("shoppableBarLayout",H);const M=H;var S=s(2858),$=s.n(S),O=s(4650);const D=a().getComponent("ClickableComponent"),W=a().dom||a(),j={width:132};class B extends D{constructor(t,e){super(t,e),this.options_=e,this.isDragged=!1}handleClick(t){t.preventDefault(),t.stopPropagation(),this.el_.matches(`.dragged .${v}`)||this.options_.clickHandler(t),this.isDragged=!1}getTitle(){return this.options_.conf.title}createEl(){const t=super.createEl("a",{className:`${v} base-color-bg accent-color-text`,href:"#"});t.setAttribute("data-product-id",this.options_.conf.productId||""),t.setAttribute("data-product-name",this.options_.conf.productName||""),this.options_.conf.onHover&&R(t,this.options_.conf.onHover,this.options_.item.cloudinaryConfig()),this.options_.conf.onClick&&z(t,this.options_.conf.onClick);const e=super.createEl("img",{className:b},{src:this.options_.item.url(j)});if(t.appendChild(e),this.getTitle()){const e=W.createEl("div",{className:"cld-spbl-item-info base-color-semi-bg text-color-text"}),s=W.createEl("span",{className:"cld-spbl-item-title"},{},this.getTitle());e.appendChild(s),t.appendChild(e)}return t}}const R=(t,e,s)=>{if(t.setAttribute("data-hover-action",e.action),e.action===p){const s=W.createEl("span",{className:"cld-spbl-overlay-text base-color-text"},{},e.args),o=W.createEl("span",{className:"cld-spbl-overlay text-color-semi-bg base-color-text"},{title:e.args},s);t.appendChild(o)}else{const o=new O.A(e.args.publicId,{cloudinaryConfig:s,transformation:e.args.transformation}),a=W.createEl("img",{className:`${b} cld-spbl-hover-img`},{src:o.url(j)});t.appendChild(a)}},z=(t,e)=>{t.setAttribute("data-click-action",e.action),t.setAttribute("data-pause",e.pause),e.action===c?t.setAttribute("data-seek",e.args.time):e.action===l&&t.setAttribute("data-goto-url",e.args.url)};a().registerComponent("shoppablePanelItem",B);const U=B,V=a().getComponent("Component");class X extends V{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t,e),this.options=e;const s=()=>{this.render()};t.on(C.f.SHOPPABLE_ITEM_CHANGED,s),this.render(),this.dispose=()=>{super.dispose(),t.off(C.f.SHOPPABLE_ITEM_CHANGED,s)}}createEl(){const t=super.createEl();return[m,"base-color-bg"].map(e=>t.classList.add(e)),t}removeAll(){const t=this.children();for(let e=t.length-1;e>=0;--e)this.removeChild(t[e])}getItems(){const t=this.player_.cloudinary.cloudinaryConfig();return this.options.products.map(e=>{e.onHover&&"object"==typeof e.onHover.args&&(e.onHover.args.transformation=Object.assign({},this.options.transformation,e.onHover.args.transformation));const s={productId:e.productId,productName:e.productName,title:e.title,onHover:e.onHover,onClick:e.onClick,startTime:e.startTime,endTime:e.endTime};return{imageSrc:new O.A(e.publicId,{cloudinaryConfig:t,transformation:Object.assign({},this.options.transformation,e.transformation)}),conf:s}})}scrollToActiveItem(){const t=this.el_.getElementsByClassName("active");if(t.length>0){const e=t[0].offsetTop-12;"scrollBehavior"in document.documentElement.style?this.el_.scrollTo({top:e,behavior:"smooth"}):this.el_.scrollTop=e}}render(){this.removeAll();const t=this.getItems(),e=$()(()=>this.scrollToActiveItem(),1e3);t.forEach((t,s)=>{const o=new U(this.player(),{item:t.imageSrc,conf:t.conf,next:1===s,current:0===s,clickHandler:t=>{let e=t.currentTarget||t.target,s=this.player_.ended()?"productClickPost":"productClick";if(this.player_.trigger(s,{productId:e.dataset.productId,productName:e.dataset.productName}),e.dataset.clickAction===l)window.open(e.dataset.gotoUrl,"_blank");else if(e.dataset.clickAction===c){const t=i(e.dataset.seek);null!==t&&(this.player_.addClass("vjs-has-started"),this.player_.postModal&&this.player_.postModal.close(),this.player_.currentTime(t),this.player_.removeClass(d),this.player_.addClass(h),this.player_.addClass(u),this.player_.one("seeked",()=>this.player_.trigger("showProductsOverlay")))}"false"!==e.dataset.pause&&(this.player_.pause(),i(e.dataset.pause)&&setTimeout(()=>{this.player_.play()},1e3*i(e.dataset.pause)))}});o.on("mouseover",t=>{let e=t.currentTarget||t.target,s=this.player_.ended()?"productHoverPost":"productHover";this.player_.trigger(s,{productId:e.dataset.productId,productName:e.dataset.productName})}),void 0!==t.conf.startTime&&void 0!==t.conf.endTime&&this.player_.on(C.f.TIME_UPDATE,()=>{const s=this.player_.currentTime();s>=t.conf.startTime&&s<t.conf.endTime?(o.el_.classList.add("active"),e()):o.el_.classList.contains("active")&&o.el_.classList.remove("active")}),this.addChild(o)})}}a().registerComponent("shoppablePanel",X);const G=X,Y=a().dom||a();const q=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options_={...e,postPlay:!0},this.player_=t,this.render(),this.handleDragToScroll(),this.dispose=()=>{this.layout_.dispose()}}handleDragToScroll(){const t=this.player_.postModal.el_.querySelector(`.${m}`);let e=!1,s=0,o=0;t.addEventListener("mousedown",a=>{e=!0,s=a.pageX-t.offsetLeft,o=t.scrollLeft}),document.addEventListener("mouseup",o=>{e=!1,setTimeout(()=>{t.classList.remove("dragged")},300);const a=o.pageX-t.offsetLeft-s;Math.abs(a)>5&&o.preventDefault()}),document.addEventListener("mousemove",a=>{if(!e)return;a.preventDefault();const i=a.pageX-t.offsetLeft-s;t.scrollLeft=o-i,Math.abs(i)>5&&!t.classList.contains("dragged")&&t.classList.add("dragged")})}render(){this.player_.postModal=null;const t=Y.createEl("div",{className:"cld-spbl-post-play"}),e=new G(this.player_,this.options_),s=Y.createEl("div",{className:"cld-spbl-post-title base-color-text"},{},this.options_.bannerMsg||"Shop the Video"),o=this.player_.cloudinary.currentPoster();o.transformation([o.transformation().toOptions?o.transformation().toOptions():{},{effect:"blur:3000"}]);const a=Y.createEl("div",{className:"cld-spbl-post-play-bg",style:`background-image: url("${o.url()}")`}),i=Y.createEl("button",{className:"cld-spbl-replay-btn base-color-bg vjs-icon-replay",onclick:()=>{this.player_.trigger("replay"),this.player_.postModal.close(),this.player_.play()}},{},"Replay");t.appendChild(a),t.appendChild(s),t.appendChild(e.el()),t.appendChild(i),this.player_.postModal=this.player_.createModal(t,{name:"postModal",uncloseable:!0}),this.player_.addClass("cld-spbl-post-modal"),this.player_.postModal.on("beforemodalclose",()=>{this.player_.removeClass("cld-spbl-post-modal")})}};const Z=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options_=a().obj.merge(n,e),this.player_=t,this.options_.showPostPlayOverlay&&this.player_.on(C.f.ENDED,()=>{this.player_.addChild(new q(this.player_,this.options_))});const s=this.options_.width;this._injectCSS(`\n .${y} {\n transform: translateX(${s});\n }\n .${d} .vjs-control-bar {\n width: calc(100% - ${s});\n }\n .${g} {\n right: ${s};\n }\n .${m}{\n width: ${s};\n }\n `),this._setListeners()}_setListeners(){const t=this._resizeHandler.bind(this);this.player_.on(C.f.RESIZE,t),window.addEventListener("resize",t),this.dispose=()=>{this.player_.off(C.f.RESIZE,t),window.removeEventListener("resize",t),this.layout_.dispose()}}_injectCSS(t){const e=document.createElement("style");e.innerHTML=t,this.player_.el_.appendChild(e)}_resizeHandler(){const t=[["sm",0,80],["md",81,110],["lg",111,170]],e=parseFloat(this.options_.width)/100*this.player_.el_.clientWidth;let s=!1;if(e){for(const[o,a,i]of t)e>a&&e<=i&&(this.layout_.contentWrpEl_.setAttribute("size",o),s=o);s||this.layout_.contentWrpEl_.removeAttribute("size")}}init(){this.render()}render(){this.layout_=new M(this.player_,this.options_)}}},8812:(t,e,s)=>{var o=s(2140),a=/^\s+/;t.exports=function(t){return t?t.slice(0,o(t)+1).replace(a,""):t}},2140:t=>{var e=/\s/;t.exports=function(t){for(var s=t.length;s--&&e.test(t.charAt(s)););return s}},6177:(t,e,s)=>{var o=s(8953),a=s(3664),i=s(5378),r=Math.max,n=Math.min;t.exports=function(t,e,s){var l,c,p,d,h,u,m=0,g=!1,_=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var s=l,o=c;return l=c=void 0,m=e,d=t.apply(o,s)}function v(t){var s=t-u;return void 0===u||s>=e||s<0||_&&t-m>=p}function b(){var t=a();if(v(t))return C(t);h=setTimeout(b,function(t){var s=e-(t-u);return _?n(s,p-(t-m)):s}(t))}function C(t){return h=void 0,y&&l?f(t):(l=c=void 0,d)}function E(){var t=a(),s=v(t);if(l=arguments,c=this,u=t,s){if(void 0===h)return function(t){return m=t,h=setTimeout(b,e),g?f(t):d}(u);if(_)return clearTimeout(h),h=setTimeout(b,e),f(u)}return void 0===h&&(h=setTimeout(b,e)),d}return e=i(e)||0,o(s)&&(g=!!s.leading,p=(_="maxWait"in s)?r(i(s.maxWait)||0,e):p,y="trailing"in s?!!s.trailing:y),E.cancel=function(){void 0!==h&&clearTimeout(h),m=0,l=u=c=h=void 0},E.flush=function(){return void 0===h?d:C(a())},E}},3664:(t,e,s)=>{var o=s(1433);t.exports=function(){return o.Date.now()}},2858:(t,e,s)=>{var o=s(6177),a=s(8953);t.exports=function(t,e,s){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return a(s)&&(i="leading"in s?!!s.leading:i,r="trailing"in s?!!s.trailing:r),o(t,e,{leading:i,maxWait:e,trailing:r})}},5378:(t,e,s)=>{var o=s(8812),a=s(8953),i=s(5414),r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=o(t);var s=n.test(t);return s||l.test(t)?c(t.slice(2),s?2:8):r.test(t)?NaN:+t}}}]);
@@ -0,0 +1,81 @@
1
+ /*!
2
+ * Cloudinary Video Player v3.12.2-edge.0
3
+ * Built on 2026-03-19T13:14:48.809Z
4
+ * https://github.com/cloudinary/cloudinary-video-player
5
+ */
6
+ /*
7
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
8
+ * This devtool is neither made for production nor for readable output files.
9
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
10
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
11
+ * or disable the default devtool with "devtool: false".
12
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
13
+ */
14
+ (self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []).push([["utils_fetch-config_js"],{
15
+
16
+ /***/ "./plugins/cloudinary/models/video-source/video-source.const.js":
17
+ /*!**********************************************************************!*\
18
+ !*** ./plugins/cloudinary/models/video-source/video-source.const.js ***!
19
+ \**********************************************************************/
20
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21
+
22
+ "use strict";
23
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADAPTIVE_SOURCETYPES: () => (/* binding */ ADAPTIVE_SOURCETYPES),\n/* harmony export */ CONTAINER_MIME_TYPES: () => (/* binding */ CONTAINER_MIME_TYPES),\n/* harmony export */ DEFAULT_DPR: () => (/* binding */ DEFAULT_DPR),\n/* harmony export */ DEFAULT_POSTER_PARAMS: () => (/* binding */ DEFAULT_POSTER_PARAMS),\n/* harmony export */ DEFAULT_VIDEO_PARAMS: () => (/* binding */ DEFAULT_VIDEO_PARAMS),\n/* harmony export */ FORMAT_MAPPINGS: () => (/* binding */ FORMAT_MAPPINGS),\n/* harmony export */ RENDITIONS: () => (/* binding */ RENDITIONS),\n/* harmony export */ URL_PATTERN: () => (/* binding */ URL_PATTERN),\n/* harmony export */ VIDEO_SUFFIX_REMOVAL_PATTERN: () => (/* binding */ VIDEO_SUFFIX_REMOVAL_PATTERN)\n/* harmony export */ });\nconst DEFAULT_POSTER_PARAMS = {\n format: 'jpg',\n resource_type: 'video'\n};\nconst DEFAULT_VIDEO_PARAMS = {\n resource_type: 'video',\n type: 'upload',\n hdr: false,\n transformation: [],\n sourceTransformation: {},\n sourceTypes: ['auto'],\n recommendations: null,\n info: {},\n interactionAreas: {},\n chapters: {}\n};\nconst COMMON_VIDEO_EXTENSIONS = ['3g2', '3gp', 'avi', 'flv', 'm3u8', 'ts', 'm2ts', 'mts', 'mov', 'mkv', 'mp4', 'mpeg', 'mpd', 'mxf', 'ogv', 'webm', 'wmv']; // https://cloudinary.com/documentation/video_manipulation_and_delivery#supported_video_formats\n\nconst VIDEO_SUFFIX_REMOVAL_PATTERN = RegExp(`\\\\.(${COMMON_VIDEO_EXTENSIONS.join('|')})$$`);\n\n// eslint-disable-next-line no-control-regex\nconst URL_PATTERN = RegExp('https?:\\\\/\\\\/(www\\\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\\\.[a-zA-Z0-9()]{1,6}\\\\b([-a-zA-Z0-9()@:%_\\+.~#?&/=]*)');\nconst CONTAINER_MIME_TYPES = {\n hls: 'application/x-mpegURL',\n dash: 'application/dash+xml',\n // See: https://docs.videojs.com/utils_mimetypes.js.html\n opus: 'video/ogg',\n ogv: 'video/ogg',\n mp4: 'video/mp4',\n mov: 'video/mp4',\n m4v: 'video/mp4',\n mkv: 'video/x-matroska',\n m4a: 'audio/mp4',\n mp3: 'audio/mpeg',\n aac: 'audio/aac',\n caf: 'audio/x-caf',\n flac: 'audio/flac',\n oga: 'audio/ogg',\n wav: 'audio/wav',\n m3u8: 'application/x-mpegURL',\n mpd: 'application/dash+xml',\n jpg: 'image/jpeg',\n jpeg: 'image/jpeg',\n gif: 'image/gif',\n png: 'image/png',\n svg: 'image/svg+xml',\n webp: 'image/webp'\n};\nconst ADAPTIVE_SOURCETYPES = ['hls', 'dash', 'mpd', 'm3u8'];\nconst FORMAT_MAPPINGS = {\n hls: 'm3u8',\n dash: 'mpd'\n};\n\n// Breakpoints constants\nconst DEFAULT_DPR = 2.0;\nconst RENDITIONS = [640, 848, 1280, 1920, 2560, 3840];\n\n//# sourceURL=webpack:///./plugins/cloudinary/models/video-source/video-source.const.js?");
24
+
25
+ /***/ }),
26
+
27
+ /***/ "./plugins/cloudinary/url-helpers.js":
28
+ /*!*******************************************!*\
29
+ !*** ./plugins/cloudinary/url-helpers.js ***!
30
+ \*******************************************/
31
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32
+
33
+ "use strict";
34
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getCloudinaryUrlPrefix: () => (/* reexport safe */ _utils_cloudinary_url_prefix__WEBPACK_IMPORTED_MODULE_1__.getCloudinaryUrlPrefix),\n/* harmony export */ isRawUrl: () => (/* binding */ isRawUrl)\n/* harmony export */ });\n/* harmony import */ var _models_video_source_video_source_const__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./models/video-source/video-source.const */ \"./plugins/cloudinary/models/video-source/video-source.const.js\");\n/* harmony import */ var _utils_cloudinary_url_prefix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/cloudinary-url-prefix */ \"./utils/cloudinary-url-prefix.js\");\n\n\nconst isRawUrl = publicId => _models_video_source_video_source_const__WEBPACK_IMPORTED_MODULE_0__.URL_PATTERN.test(publicId);\n\n//# sourceURL=webpack:///./plugins/cloudinary/url-helpers.js?");
35
+
36
+ /***/ }),
37
+
38
+ /***/ "./utils/fetch-config.js":
39
+ /*!*******************************!*\
40
+ !*** ./utils/fetch-config.js ***!
41
+ \*******************************/
42
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
43
+
44
+ "use strict";
45
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fetchAndMergeConfig: () => (/* binding */ fetchAndMergeConfig)\n/* harmony export */ });\n/* harmony import */ var cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cloudinary-video-player-profiles */ \"../node_modules/cloudinary-video-player-profiles/dist/index.js\");\n/* harmony import */ var cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../plugins/cloudinary/url-helpers */ \"./plugins/cloudinary/url-helpers.js\");\n/* harmony import */ var _utils_utf8Base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utf8Base64 */ \"./utils/utf8Base64.js\");\n/* harmony import */ var _querystring__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./querystring */ \"./utils/querystring.js\");\n\n\n\n\nconst isDefaultProfile = profileName => !!cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__.defaultProfiles.find(_ref => {\n let {\n name\n } = _ref;\n return profileName === name;\n});\nconst getDefaultProfileConfig = profileName => {\n const profile = cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_0__.defaultProfiles.find(_ref2 => {\n let {\n name\n } = _ref2;\n return profileName === name;\n });\n if (!profile) {\n throw new Error(`Default profile with name ${profileName} does not exist`);\n }\n return profile.config;\n};\nconst fetchConfig = async options => {\n const {\n profile,\n publicId,\n cloudinaryConfig,\n type = 'upload',\n videoConfig,\n allowUsageReport = true\n } = options;\n if (profile && isDefaultProfile(profile)) {\n return getDefaultProfileConfig(profile);\n }\n const urlPrefix = (0,_plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_1__.getCloudinaryUrlPrefix)(cloudinaryConfig) + '/_applet_/video_service';\n const queryParams = allowUsageReport ? {\n _s: `vp-${\"3.12.2-edge.0\"}`\n } : null;\n let configUrl;\n if (profile) {\n configUrl = (0,_plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_1__.isRawUrl)(profile) ? profile : (0,_querystring__WEBPACK_IMPORTED_MODULE_3__.appendQueryParams)(`${urlPrefix}/video_player_profiles/${profile.replaceAll(' ', '+')}.json`, queryParams);\n } else if (publicId && videoConfig !== false) {\n configUrl = (0,_querystring__WEBPACK_IMPORTED_MODULE_3__.appendQueryParams)(`${urlPrefix}/video_player_config/video/${type}/${(0,_utils_utf8Base64__WEBPACK_IMPORTED_MODULE_2__.utf8ToBase64)(publicId)}.json`, queryParams);\n } else {\n return {};\n }\n return fetch(configUrl, {\n method: 'GET'\n }).then(res => {\n if (!res.ok) {\n // fail silently\n return {};\n }\n return res.json();\n });\n};\nconst fetchAndMergeConfig = async options => {\n const profileOptions = await fetchConfig(options);\n const fetchedConfig = profileOptions.playerOptions ? Object.keys(profileOptions.playerOptions) : [];\n const profileAnalytics = {\n _internalAnalyticsMetadata: {\n newPlayerMethod: true,\n ...(options.profile ? {\n profile: isDefaultProfile(options.profile) ? options.profile : true\n } : {}),\n ...(!options.profile && options.videoConfig !== false && options.publicId ? {\n videoConfig: true\n } : {}),\n ...(fetchedConfig.length > 0 ? {\n fetchedConfig: fetchedConfig.join(',')\n } : {})\n }\n };\n return Object.assign({}, profileOptions.playerOptions || {}, profileOptions.sourceOptions || {}, options, profileAnalytics);\n};\n\n//# sourceURL=webpack:///./utils/fetch-config.js?");
46
+
47
+ /***/ }),
48
+
49
+ /***/ "./utils/querystring.js":
50
+ /*!******************************!*\
51
+ !*** ./utils/querystring.js ***!
52
+ \******************************/
53
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
54
+
55
+ "use strict";
56
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ appendQueryParams: () => (/* binding */ appendQueryParams)\n/* harmony export */ });\nconst appendQueryParams = (url, params) => {\n if (!params || !Object.keys(params).length) {\n return url;\n }\n const urlObj = new URL(url);\n Object.entries(params).forEach(_ref => {\n let [key, value] = _ref;\n if (value != null) {\n urlObj.searchParams.append(key, value);\n }\n });\n return urlObj.href;\n};\n\n\n//# sourceURL=webpack:///./utils/querystring.js?");
57
+
58
+ /***/ }),
59
+
60
+ /***/ "./utils/utf8Base64.js":
61
+ /*!*****************************!*\
62
+ !*** ./utils/utf8Base64.js ***!
63
+ \*****************************/
64
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
65
+
66
+ "use strict";
67
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ utf8ToBase64: () => (/* binding */ utf8ToBase64)\n/* harmony export */ });\nfunction utf8ToBase64(str) {\n const utf8Bytes = new TextEncoder().encode(str);\n const binaryStr = String.fromCharCode(...utf8Bytes);\n return btoa(binaryStr);\n}\n\n//# sourceURL=webpack:///./utils/utf8Base64.js?");
68
+
69
+ /***/ }),
70
+
71
+ /***/ "../node_modules/cloudinary-video-player-profiles/dist/index.js":
72
+ /*!**********************************************************************!*\
73
+ !*** ../node_modules/cloudinary-video-player-profiles/dist/index.js ***!
74
+ \**********************************************************************/
75
+ /***/ ((__unused_webpack_module, exports) => {
76
+
77
+ eval("var e={607:function(e,o,t){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,\"__esModule\",{value:!0}),o.defaultProfiles=o.cldLiveStreamingProfile=o.cldAdaptiveStreamProfile=o.cldLoopingProfile=o.cldDefaultProfile=void 0;const r=l(t(704)),i=l(t(83)),a=l(t(832)),s=l(t(877));o.cldDefaultProfile={name:\"cld-default\",isDefault:!0,config:r.default},o.cldLoopingProfile={name:\"cld-looping\",isDefault:!0,config:i.default},o.cldAdaptiveStreamProfile={name:\"cld-adaptive-stream\",isDefault:!0,config:a.default},o.cldLiveStreamingProfile={name:\"cld-live-streaming\",isDefault:!0,config:s.default},o.defaultProfiles=[o.cldDefaultProfile,o.cldLoopingProfile,o.cldAdaptiveStreamProfile,o.cldLiveStreamingProfile]},832:e=>{e.exports=JSON.parse('{\"playerOptions\":{\"fluid\":true,\"controls\":true,\"controlBar\":{\"fullscreenToggle\":false},\"showJumpControls\":true,\"hideContextMenu\":false,\"floatingWhenNotVisible\":\"none\"},\"sourceOptions\":{\"chapters\":true,\"sourceTypes\":[\"hls\"]}}')},704:e=>{e.exports=JSON.parse('{\"playerOptions\":{},\"sourceOptions\":{}}')},877:e=>{e.exports=JSON.parse('{\"playerOptions\":{},\"sourceOptions\":{\"type\":\"live\",\"sourceTypes\":[\"hls\"]}}')},83:e=>{e.exports=JSON.parse('{\"playerOptions\":{\"fluid\":true,\"controls\":false,\"muted\":true,\"floatingWhenNotVisible\":\"none\",\"hideContextMenu\":false,\"autoplay\":true,\"loop\":true},\"sourceOptions\":{}}')}},o={},t=function t(l){var r=o[l];if(void 0!==r)return r.exports;var i=o[l]={exports:{}};return e[l].call(i.exports,i,i.exports,t),i.exports}(607),l=exports;for(var r in t)l[r]=t[r];t.__esModule&&Object.defineProperty(l,\"__esModule\",{value:!0});\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///../node_modules/cloudinary-video-player-profiles/dist/index.js?");
78
+
79
+ /***/ })
80
+
81
+ }]);