!function(){"use strict";var e={19567:function(e){e.exports=window.jQuery},80967:function(e){e.exports=window.divi.scriptLibrary}},t={};function o(i){var n=t[i];if(void 0!==n)return n.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};!function(){o.r(i),o.d(i,{adjustBackgroundVideoMargin:function(){return e},backgroundVideoInit:function(){return s},backgroundVideoOnHover:function(){return c},backgroundVideoWaypoints:function(){return u},centerBackgroundVideo:function(){return r},resizeBackgroundVideo:function(){return a}});const e=e=>{if(void 0===e||!e.length)return;const t=0-e.width()/2;e.css("margin-left",`${t}px`)};var t=o(19567),n=o.n(t);const r=t=>{void 0!==t&&t.length&&t.each(((o,i)=>{const r=n()(i);if(e(r),r.closest("#et-fb-app").length>0&&setTimeout((()=>{e(r)}),0),void 0!==t&&t.closest(".et_pb_slider").length&&!t.closest(".et_pb_first_video").length)return!1}))};var d=o(80967);const a=e=>{if(void 0===e||!e.length)return;const t=e.closest(".et-pb-background-video");t.length&&t.each(((t,o)=>{const i=n()(o);i.closest("#et-fb-app").length&&(i.removeAttr("data-ratio"),i.find("video").removeAttr("style"));const r=i.find("video"),a=(e?.prop("videoWidth")||r.width())/(e?.prop("videoHeight")||r.height()),s=i.find(".mejs-video, video, object").css("margin","0px"),c=i.closest(".et-pb-has-background-video").length?i.closest(".et-pb-has-background-video"):i.closest(".et_pb_slides"),u=c.innerWidth(),l=c.innerHeight();let p,_;void 0!==i.attr("data-ratio")||Number.isNaN(a)||i.attr("data-ratio",a),u/l<a?(p=l*a,_=l):(p=u,_=u/a),s.width(p).height(_),d.isBuilder&&setTimeout((()=>{s.width(p).height(_)}),0)}))},s=e=>{void 0!==e&&e.length&&"mediaelementplayer"in n().fn&&"function"==typeof n().fn.mediaelementplayer&&e.mediaelementplayer({pauseOtherPlayers:!1,success(e,t){const o=n()(t);e.addEventListener("loadeddata",(()=>{a(o),r(o.closest(".mejs-video"))}),!1),e.addEventListener("canplay",(()=>{o.closest(".et_pb_preload").removeClass("et_pb_preload")}),!1)}})},c=e=>{if(!e?.length)return;const t=e.closest(".et-pb-has-background-video__hover");if(!t.length||t.data("et_pb_bg_video_hover_bound"))return;t.data("et_pb_bg_video_hover_bound",!0);let o=!1;t.on("mouseenter",(()=>{o||(o=!0,t.find(".et-pb-background-video__hover video").each(((e,t)=>{const o=n()(t);o.find("source[data-src]").each(((e,t)=>{const o=n()(t).attr("data-src");o&&n()(t).attr("src",o)}));const i=()=>{o.closest(".et-pb-background-video__hover").find(".mejs-video video, video").trigger("play")};!o.closest(".mejs-container").length&&"et_pb_video_section_init"in window?(o.one("canplay",i),window.et_pb_video_section_init(o)):i()})))})),t.on("mouseleave",(()=>{o=!1}))},u=(e,t)=>{if(void 0===e||!e.length||!n().fn.waypoint)return;const o=e.closest(".et-pb-background-video");if(!o.length)return;let i=!1,r=!0;t.onplaying=()=>{i=!0,r=!1},t.onpause=()=>{i=!1,r=!0},(0,d.waypointExtended)(o,{offset:"100%",handler(n){const d=o.hasClass("et-pb-background-video--play-outside-viewport");e.is(":visible")&&"down"===n?t.paused&&!i&&t.play():e.is(":visible")&&"up"===n&&(t.paused||r||d||t.pause())}},2),(0,d.waypointExtended)(o,{offset(){const e=this.element.clientHeight;let t=Math.ceil(window.innerHeight/2);return e>t&&(t=e),-1*t},handler(n){const d=o.hasClass("et-pb-background-video--play-outside-viewport");e.is(":visible")&&"up"===n?t.paused&&!i&&t.play():e.is(":visible")&&"down"===n&&(t.paused||r||d||t.pause())}},2)};"et_pb_video_section_init"in window||Object.defineProperty(window,"et_pb_video_section_init",{value:s,writable:!1}),"et_pb_video_background_init"in window||Object.defineProperty(window,"et_pb_video_background_init",{value:u,writable:!1}),"et_pb_resize_section_video_bg"in window||Object.defineProperty(window,"et_pb_resize_section_video_bg",{value:a,writable:!1}),"et_pb_adjust_video_margin"in window||Object.defineProperty(window,"et_pb_adjust_video_margin",{value:e,writable:!1}),"et_pb_center_video"in window||Object.defineProperty(window,"et_pb_center_video",{value:r,writable:!1}),"et_pb_background_video_on_hover"in window||Object.defineProperty(window,"et_pb_background_video_on_hover",{value:c,writable:!1})}(),((window.divi=window.divi||{}).module=window.divi.module||{}).moduleScriptBackgroundVideo=i}();