cloudinary-video-player 3.13.0 → 3.13.1-edge.1

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 (63) hide show
  1. package/dist/134.min.js +4 -4
  2. package/dist/19.min.js +6 -0
  3. package/dist/309.min.js +3 -3
  4. package/dist/adaptive-streaming.js +2 -2
  5. package/dist/adaptive-streaming.min.js +2 -2
  6. package/dist/chapters.js +2 -2
  7. package/dist/chapters.min.js +2 -2
  8. package/dist/cld-player-core.js +2 -2
  9. package/dist/cld-player-core.min.js +2 -2
  10. package/dist/cld-video-player-lazy.js +5 -5
  11. package/dist/cld-video-player-lazy.min.js +3 -3
  12. package/dist/cld-video-player.css +2 -2
  13. package/dist/cld-video-player.js +10 -10
  14. package/dist/cld-video-player.light.js +10 -10
  15. package/dist/cld-video-player.light.min.js +4 -4
  16. package/dist/cld-video-player.min.css +2 -2
  17. package/dist/cld-video-player.min.js +4 -4
  18. package/dist/colors.js +2 -2
  19. package/dist/colors.min.js +3 -3
  20. package/dist/dash.js +2 -2
  21. package/dist/dash.min.js +2 -2
  22. package/dist/debug.js +2 -2
  23. package/dist/debug.min.js +2 -2
  24. package/dist/ima.js +2 -2
  25. package/dist/ima.min.js +2 -2
  26. package/dist/interaction-areas.js +2 -2
  27. package/dist/interaction-areas.min.js +3 -3
  28. package/dist/node_modules_lodash_throttle_js.js +2 -2
  29. package/dist/playlist.js +2 -2
  30. package/dist/playlist.min.js +2 -2
  31. package/dist/plugins_cloudinary_url-helpers_js-utils_object_js-utils_querystring_js-utils_utf8Base64_js-vi-555007.js +952 -0
  32. package/dist/recommendations-overlay.js +2 -2
  33. package/dist/recommendations-overlay.min.js +2 -2
  34. package/dist/share.js +2 -2
  35. package/dist/share.min.js +2 -2
  36. package/dist/shoppable.js +2 -2
  37. package/dist/shoppable.min.js +2 -2
  38. package/dist/utils_fetch-config_js.js +3 -47
  39. package/dist/video-player_js.js +13 -949
  40. package/dist/visual-search.js +2 -2
  41. package/dist/visual-search.min.js +2 -2
  42. package/lib/all.js +2 -1
  43. package/lib/chapters.js +2 -1
  44. package/lib/cld-video-player.min.css +2 -2
  45. package/lib/colors.js +2 -1
  46. package/lib/debug.js +2 -1
  47. package/lib/fetch-config.js +11 -3
  48. package/lib/index.js +2 -1
  49. package/lib/interaction-areas.service.js +2 -1
  50. package/lib/object.js +2805 -0
  51. package/lib/player.js +2 -1
  52. package/lib/playlist.js +2 -1
  53. package/lib/recommendations-overlay.js +2 -1
  54. package/lib/share.js +2 -1
  55. package/lib/shoppable-widget.js +3 -2
  56. package/lib/throttle.js +1 -1
  57. package/lib/toNumber.js +2 -2
  58. package/lib/validators-functions.js +3 -366
  59. package/lib/video-player.const.js +367 -0
  60. package/lib/video-player.js +80 -2803
  61. package/lib/videoPlayer.js +2 -1
  62. package/package.json +1 -1
  63. package/lib/querystring.js +0 -81
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:53.902Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:40.769Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:37.582Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:24.248Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[410],{7604(e,t,s){s.r(t),s.d(t,{default:()=>k});var i=s(6673),n=s.n(i);const o=n().getComponent("ClickableComponent");const r=class extends o{setItem(e){const{action:t,source:s}=e;this.source=s;const i=s.info();this.setTitle(i.title||s.publicId()),this.setPoster(this.source.poster().url({transformation:{aspect_ratio:"16:9",crop:"pad",background:"black"}})),this.setAction(t)}setTitle(e){this.title.innerText=e}setAction(e){this.action=e}handleClick(){super.handleClick(),this.player().trigger("recommendationshide"),this.action()}};var a=s(7878),c=s.n(a);const l=n().dom||n();const h=class extends r{setItem(e){super.setItem(e);const t=this.source.info();if(this.setTitle(t.title),this.setSubtitle(t.subtitle),t.description){const e=300,s=t.description.length>e?t.description.substring(0,e)+"...":t.description;this.setDescription(s)}}setPoster(e){this.poster.style.backgroundImage=`url('${e}')`}setTitle(e){c().setText(this.title,e),this.setAriaCheck(this.title,!!e)}setSubtitle(e){c().setText(this.subtitle,e),this.setAriaCheck(this.subtitle,!!e)}setDescription(e){c().setText(this.description,e),this.setAriaCheck(this.description,!!e)}setAriaCheck(e){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true")}clearItem(){this.setTitle(""),this.setSubtitle(""),this.setDescription(""),this.poster.style.backgroundImage=null}createEl(){const e=super.createEl("div",{className:"vjs-recommendations-overlay-item vjs-recommendations-overlay-item-primary"});return this.poster=l.createEl("div",{className:"vjs-recommendations-overlay-item-primary-image"}),this.title=l.createEl("h2",{ariaLabel:"Recmmendation Title"}),this.setAriaCheck(this.title,!1),this.title.innerHTML="",this.subtitle=l.createEl("h3",{ariaLabel:"Recmmendation Subtitle"}),this.setAriaCheck(this.subtitle,!1),this.subtitle.innerHTML="",this.description=l.createEl("p"),this.setAriaCheck(this.description,!1),this.description.innerHTML="",this.content=l.createEl("div",{className:"vjs-recommendations-overlay-item-info vjs-recommendations-overlay-item-primary-content"}),this.content.appendChild(this.title),this.content.appendChild(this.subtitle),this.content.appendChild(this.description),e.appendChild(this.poster),e.appendChild(this.content),e}},d=n().dom||n();const m=class extends r{setItem(e){super.setItem(e),this.setDuration("")}setPoster(e){this.el().style.backgroundImage=`url('${e}')`}setDuration(e){this.duration.innerText=e}createEl(){const e=super.createEl("div",{className:"vjs-recommendations-overlay-item vjs-recommendations-overlay-item-secondary"});this.title=d.createEl("span",{className:"vjs-recommendations-overlay-item-secondary-title"}),this.title.innerHTML="",this.duration=d.createEl("span",{className:"vjs-recommendations-overlay-item-secondary-duration"}),this.duration.innerHTML="";const t=d.createEl("div",{className:"vjs-recommendations-overlay-item-info"});return t.appendChild(this.title),t.appendChild(this.duration),e.appendChild(t),e}handleClick(){super.handleClick(),this.action()}},p=n().getComponent("Component");const u=class extends p{setItems(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];this.clearItems(),t&&t.forEach(e=>{const t=new m(this.player());t.setItem(e),this.addChild(t)})}clearItems(){this.children().forEach(()=>{this.removeChild(this.children()[0])})}createEl(){return super.createEl("div",{className:"vjs-recommendations-overlay-item-secondary-container"})}},v=n().getComponent("Component");class y extends v{constructor(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];super(e,...s),this._primary=new h(e),this._secondaryContainer=new u(e),this.addChild(this._primary),this.addChild(this._secondaryContainer)}setItems(e){this._primary.setItem(e);for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this._secondaryContainer.setItems(...s)}createEl(){return super.createEl("div",{className:"aspect-ratio-content"})}}const C=class extends v{constructor(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];super(e,...s),this._content=new y(e),this.addChild(this._content)}setItems(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this._content.setItems(e,...s)}clearItems(){this._content._primary.clearItem(),this._content._secondaryContainer.clearItems()}createEl(){return super.createEl("div",{className:"vjs-recommendations-overlay-content"})}},g=n().getComponent("ClickableComponent");const I=class extends g{createEl(){return super.createEl("span",{className:"vjs-recommendations-overlay-hide vjs-icon-close"})}handleClick(){this.options_.clickHandler()}},b=n().getComponent("Component");class E extends b{constructor(e,t){for(var s=arguments.length,i=new Array(s>2?s-2:0),n=2;n<s;n++)i[n-2]=arguments[n];super(e,...i),this._content=new C(e),this.addChild(this._content),this.addChild(new I(e,{clickHandler:()=>{this.close()}},...i)),this.setEvents(e),this.doNotOpen=!1}setEvents(e){this.on(e,"recommendationschanged",(e,t)=>{this.setItems(...t.items)}),this.on(e,"recommendationsnoshow",this.setDoNotOpen),this.on(e,"recommendationsshow",this.open),this.on(e,"recommendationshide",this.close),this.on(e,"cldsourcechanged",()=>{this.clearItems(),this.close()})}setDoNotOpen(){this.doNotOpen=!0}open(){this.doNotOpen||(this._showControlsOnClose=this.player().controls(),this.player().controls(!1),this.el().style.visibility="visible")}clearItems(){this._content.clearItems()}close(){this.el().style.visibility="hidden",this._showControlsOnClose&&this.player().controls(!0)}createEl(){const e="vjs-recommendations-overlay",t=super.createEl("div",{className:e});return n().dom.addClass(t,e),t}setItems(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.doNotOpen=!1,s=s.slice(0,3),this._content.setItems(e,...s)}handleClick(){this.stopPropagation()}dispose(){super.dispose()}}n().registerComponent("recommendationsOverlay",E);const k=E}}]);
package/dist/share.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:53.902Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:40.769Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";
package/dist/share.min.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:37.582Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:24.248Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[976],{2130(o,e,t){t.d(e,{default:()=>c});var n=t(6673),a=t.n(n);const r=a().getComponent("ClickableComponent");class i extends r{constructor(o){super(o,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}handleClick(o){super.handleClick(o),this.player().share&&"function"==typeof this.player().share.download&&this.player().share.download()}createEl(){const o=a().dom.createEl("button",{className:"vjs-control vjs-share-download-button vjs-button",ariaLabel:"Download video",title:"Download video"}),e=a().dom.createEl("span",{className:"vjs-icon-file-download vjs-icon-placeholder"});o.appendChild(e);const t=a().dom.createEl("span",{className:"vjs-loading-spinner"});return o.appendChild(t),o}setPreparing(o){const e=this.el();o?(e.classList.add("vjs-waiting"),e.setAttribute("title","Download is being prepared")):(e.classList.remove("vjs-waiting"),e.setAttribute("title","Download video"))}}a().registerComponent("ShareDownloadButton",i);var d=t(5770),l=t(4319),s=t.n(l);const c=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=(arguments.length>1?arguments[1]:void 0)||this;e.addClass("vjs-share");const t=()=>{const o=e.getChild("ControlBar");if(!o||o.getChild("ShareDownloadButton"))return;const t=o.children().findIndex(o=>"FullscreenToggle"===o.name_);o.addChild("ShareDownloadButton",{},-1!==t?t:void 0)};o.download&&t(),e.share={download:()=>{const o=(()=>{const o=e.currentSource?.();if(!o)return null;const t=["format","video_codec","streaming_profile"],n=o=>{if(Array.isArray(o))return o.map(n);if(o&&"object"==typeof o){const e=s()(o,t);return Object.keys(e).forEach(o=>{e[o]=n(e[o])}),e}return o},a=n(e.cloudinary.transformation()||{}),r=e.cloudinary.currentPublicId()?.split("/")?.pop(),i={...e.cloudinary.cloudinaryConfig(),...a,resource_type:"video",format:"mp4",video_codec:"h264",flags:`streaming_attachment:${r}`};return o.isAdaptive&&Object.assign(i,{crop:"limit",width:1920,height:1920}),"AudioSource"===e.cloudinary.source()?.getType()&&Object.assign(i,{format:"mp3",video_codec:void 0}),(0,d.KA)(e.cloudinary.currentPublicId(),i)})();if(!o)return void console.warn("Share plugin: Unable to resolve download URL.");const t=[423],n=e.controlBar?.getChild("ShareDownloadButton"),a=o=>{n?.setPreparing?.(o)},r=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const n=await fetch(o,{method:"HEAD"});if(t.includes(n.status)&&e<60)return await(i=1e4,new Promise(o=>setTimeout(o,i))),r(e+1);var i;a(!1),(()=>{const e=document.createElement("a");e.href=o,e.download="",document.body.appendChild(e),e.click(),document.body.removeChild(e)})()};a(!0),r()},addDownloadButton:t,removeDownloadButton:()=>{if(!e.controlBar)return;const o=e.controlBar.getChild("ShareDownloadButton");o&&e.controlBar.removeChild(o)}}}}}]);
package/dist/shoppable.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:53.902Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:40.769Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  "use strict";
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:37.582Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:24.248Z
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}}}]);
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Cloudinary Video Player v3.13.0
3
- * Built on 2026-03-30T12:23:53.902Z
2
+ * Cloudinary Video Player v3.13.1-edge.1
3
+ * Built on 2026-04-02T13:32:40.769Z
4
4
  * https://github.com/cloudinary/cloudinary-video-player
5
5
  */
6
6
  /*
@@ -13,28 +13,6 @@
13
13
  */
14
14
  (self["cloudinaryVideoPlayerChunkLoading"] = self["cloudinaryVideoPlayerChunkLoading"] || []).push([["utils_fetch-config_js"],{
15
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?\n}");
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?\n}");
35
-
36
- /***/ },
37
-
38
16
  /***/ "./utils/fetch-config.js"
39
17
  /*!*******************************!*\
40
18
  !*** ./utils/fetch-config.js ***!
@@ -42,29 +20,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
42
20
  (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43
21
 
44
22
  "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.13.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?\n}");
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?\n}");
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?\n}");
23
+ 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 lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ \"../node_modules/lodash/pick.js\");\n/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../plugins/cloudinary/url-helpers */ \"./plugins/cloudinary/url-helpers.js\");\n/* harmony import */ var _video_player_const__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../video-player.const */ \"./video-player.const.js\");\n/* harmony import */ var _utils_utf8Base64__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utf8Base64 */ \"./utils/utf8Base64.js\");\n/* harmony import */ var _querystring__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./querystring */ \"./utils/querystring.js\");\n/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./object */ \"./utils/object.js\");\n\n\n\n\n\n\n\nconst isDefaultProfile = profileName => !!cloudinary_video_player_profiles__WEBPACK_IMPORTED_MODULE_1__.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_1__.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 getCloudinaryConfigFromOptions = options => {\n if (options.cloudinaryConfig) {\n return options.cloudinaryConfig;\n }\n const snakeCaseCloudinaryConfig = lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()((0,_object__WEBPACK_IMPORTED_MODULE_6__.convertKeysToSnakeCase)(options), _video_player_const__WEBPACK_IMPORTED_MODULE_3__.CLOUDINARY_CONFIG_PARAM);\n return Object.assign({}, snakeCaseCloudinaryConfig);\n};\nconst fetchConfig = async options => {\n const {\n profile,\n publicId,\n type = 'upload',\n videoConfig,\n allowUsageReport = true\n } = options;\n if (profile && isDefaultProfile(profile)) {\n return getDefaultProfileConfig(profile);\n }\n const cloudinaryConfig = getCloudinaryConfigFromOptions(options);\n const urlPrefix = (0,_plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_2__.getCloudinaryUrlPrefix)(cloudinaryConfig) + '/_applet_/video_service';\n const queryParams = allowUsageReport ? {\n _s: `vp-${\"3.13.1-edge.1\"}`\n } : null;\n let configUrl;\n if (profile) {\n configUrl = (0,_plugins_cloudinary_url_helpers__WEBPACK_IMPORTED_MODULE_2__.isRawUrl)(profile) ? profile : (0,_querystring__WEBPACK_IMPORTED_MODULE_5__.appendQueryParams)(`${urlPrefix}/video_player_profiles/${profile.replaceAll(' ', '+')}.json`, queryParams);\n } else if (publicId && videoConfig !== false) {\n configUrl = (0,_querystring__WEBPACK_IMPORTED_MODULE_5__.appendQueryParams)(`${urlPrefix}/video_player_config/video/${type}/${(0,_utils_utf8Base64__WEBPACK_IMPORTED_MODULE_4__.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?\n}");
68
24
 
69
25
  /***/ },
70
26