'use strict';((k,c)=>{let Y=!1;const t=k.isTouch?window.PointerEvent?"pointerdown":"touchstart":"click",S=/iPhone|iPad|iPod|Mac OS/i.test(window.navigator.userAgent),C=a=>{a=Infinity===a?0:a;a=(new Date(1E3*a)).toISOString().substr(11,8).split(":");"00"===a[0]&&a.splice(0,1);return a.join(":")},Z=a=>{try{if(a.requestFullscreen)return a.requestFullscreen();if(a.webkitEnterFullscreen)return a.webkitEnterFullscreen();if(a.webkitrequestFullscreen)return a.webkitRequestFullscreen();if(a.mozRequestFullscreen)return a.mozRequestFullScreen()}catch(f){return console.error(f),
!1}},aa=()=>{try{return c.exitFullscreen?c.exitFullscreen():c.webkitExitFullscreen||c.webkitExitFullscreen?c.webkitExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.msExitFullscreen?c.msExitFullscreen():!1}catch(a){return console.error(a),!1}},ba=a=>c.exitFullscreen?"":c.webkitExitFullscreen||a.webkitSupportsFullscreen?"webkit":c.mozCancelFullScreen?"moz":c.msExitFullscreen?"ms":!1,T=a=>{const f=ba(a);return!1===f?!1:a.hasOwnProperty("webkitDisplayingFullscreen")?a.webkitDisplayingFullscreen:
""===f?c.fullscreenElement:c[f+"FullscreenElement"]},q=(a,f)=>{const g=c.createElementNS("http://www.w3.org/2000/svg","use"),d=c.createElementNS("http://www.w3.org/2000/svg","svg");a="tf-"+a;d.setAttribute("class","tf_fa "+(f?a+" "+f:a));g.setAttributeNS(null,"href","#"+a);d.appendChild(g);return d},ca=a=>{a="tf_video_"+a+"=";for(let f=c.cookie.split(";"),g=f.length-1;-1<g;--g){let d=f[g];for(;" "===d[0];)d=d.substring(1,d.length);if(0===d.indexOf(a))return d.substring(a.length,d.length)}return null},
da=(a,f,g)=>{var d="";a="tf_video_"+a;g&&(d=new Date,d.setTime(d.getTime()+864E5*g),d=";expires="+d.toUTCString());c.cookie=a+"="+(f||"")+d+"; path=/"},ja=a=>{const f=c.createDocumentFragment();var g=ba(a);const d=k.hash(a.currentSrc.split(".").slice(0,-1).join(".")),D=parseFloat(ca(d))||0;var l=ca("vol_"+d)||-1;const u=a.parentNode;var x=c.createElement("div");const y=c.createElement("div"),ea=c.createElement("div"),z=c.createElement("div"),U=c.createElement("div"),V=c.createElement("div"),A=c.createElement("div"),
L=c.createElement("div"),M=c.createElement("div"),E=c.createElement("div"),W=c.createElement("div"),N=c.createElement("div"),O=c.createElement("div"),r=c.createElement("button"),P=c.createElement("button"),F=c.createElement("button"),B=c.createElement("button"),G=c.createElement("button"),H=c.createElement("button"),v=c.createElement("input"),w=c.createElement("input"),fa=!1===S||"mobile"!==k.device,h=u.classList;let Q=!0,R=!1,I=!1,X;ea.className="tf_loader tf_abs_c";x.className="tf_video_container tf_w tf_rel tf_box";
y.className="tf_video_wrap tf_w tf_mw tf_box";W.className="tf_play_wrap";E.className="tf_video_controls";z.className="tf_video_progress_wrap tf_rel tf_textl";U.className="tf_video_progress_loaded tf_w tf_h tf_abs";V.className="tf_video_progress_current tf_w tf_h tf_abs";v.className="tf_video_progress_range tf_h tf_abs";v.value=0;v.type="range";v.min=0;v.max=100;F.className="tf_video_play";P.className="tf_video_play tf_big_video_play tf_abs_c";F.appendChild(q("fas-undo-alt","tf_hide"));P.appendChild(q("fas-undo-alt",
"tf_hide"));u.tabIndex=0;-1!==l&&(l?a.volume=l:a.muted=0);r.type=P.type=F.type=B.type=G.type=H.type="button";G.className="tf_video_seek tf_video_seek_left tf_abs";H.className="tf_video_seek tf_video_seek_right tf_abs";N.className="tf_video_current_time";O.className="tf_video_total_time";A.className="tf_video_hover tf_abs tf_hide tf_box tf_textc";B.className="tf_video_fullscreen";N.textContent=C(a.currentTime);O.textContent=C(a.duration);x=function(b){h.add("tf_video_waiting");this.addEventListener("seeking"===
b.type?"seeked":"playing",()=>{h.remove("tf_video_waiting")},{passive:!0,once:!0})};const ha=function(){try{a.webkitSupportsPresentationMode?a.webkitSetPresentationMode("picture-in-picture"===a.webkitPresentationMode?"inline":"picture-in-picture"):(T(a)&&aa(),a!==c.pictureInPictureElement?a.requestPictureInPicture():c.exitPictureInPicture())}catch(b){console.error(b)}},ka=()=>{h.add("tf_video_touched");h.remove("tf_hide_controls");X&&clearTimeout(X);X=setTimeout(()=>{h.remove("tf_video_touched")},
2500)},ia=function(){!1===I&&(I=!0,"desktop"!==k.device&&(a.muted=!0));a.play()};y.addEventListener(t,b=>{b.stopPropagation()},{passive:!0});u.addEventListener(t,function(b){const e=b.target.closest(".tf_video_seek");b.stopImmediatePropagation();a.paused||!1===I||!k.isTouch||!e&&this.classList.contains("tf_video_touched")?(this.classList.remove("tf_video_touched"),a.paused||!1===I?ia():a.pause()):(ka(),e&&(a.currentTime+=e.classList.contains("tf_video_seek_left")?-15:15))},{passive:!0});F.addEventListener(t,
function(b){b.stopPropagation();a.paused||!1===I?ia():a.pause()},{passive:!0});if(!k.isTouch)z.addEventListener("mouseenter",function(b){if(!isNaN(a.duration)){A.classList.remove("tf_hide");const e=this.clientWidth,n=parseFloat(A.clientWidth/2),J=a.duration,m=function(p){p=void 0!==p.layerX?p.layerX:p.offsetX;0<p-n&&p<=e&&(A.style.transform="translateX("+(p-n)+"px)",!1===R&&(A.textContent=C(parseFloat(p/e)*J)))};this.addEventListener("mouseleave",function(){A.classList.add("tf_hide");this.removeEventListener("mousemove",
m,{passive:!0})},{passive:!0,once:!0});this.addEventListener("mousemove",m,{passive:!0})}},{passive:!0});else if(!0===S){var K=window.navigator.userAgent;13.5>parseFloat(K.substr(K.indexOf("OS ")+3,4).replace("_","."))&&(K=function(b){var e="touchstart"===b.type?b.touches[0]?b.touches[0]:b.changedTouches[0]:b;b=this.getElementsByTagName("input")[0];const n=this.getBoundingClientRect();e=b.classList.contains("tf_video_volumn_range")?(e.clientY-n.top)/n.height:(e.clientX-n.left)/n.width;b.value=parseInt(100*
e);k.triggerEvent(b,"input");k.triggerEvent(b,"change")},z.addEventListener(t,K,{passive:!0}),!0===fa&&M.addEventListener(t,K,{passive:!0}))}v.addEventListener("input",function(b){b.preventDefault();isNaN(a.duration)||(a.paused||!0!==Q||a.pause(),R=!0,b=parseInt(this.value),b=100===b?a.duration-1:parseFloat(b*a.duration/100).toFixed(4),a.currentTime=b,k.isTouch||(A.textContent=C(b)))});v.addEventListener("change",function(b){b.preventDefault();isNaN(a.duration)||(R=Q=!1,a.paused&&a.play().then(e=>
{Q=!0}).catch(e=>{Q=!0}))});a.addEventListener("progress",function(){0<this.buffered.length&&(U.style.transform="scaleX("+parseFloat(this.buffered.end(0)/this.duration).toFixed(4)+")")},{passive:!0});a.addEventListener("durationchange",function(){O.textContent=C(this.duration)},{passive:!0});a.addEventListener("seeking",x,{passive:!0});a.addEventListener("waiting",x,{passive:!0});a.addEventListener("emptied",x,{passive:!0});a.addEventListener("pause",function(){h.remove("tf_video_is_playing")},{passive:!0});
a.addEventListener("play",function(){h.add("tf_video_is_playing");for(let b=c.getElementsByTagName("video"),e=b.length-1;-1<e;--e)b[e]!==this&&b[e].pause()},{passive:!0});a.addEventListener("playing",function(){h.remove("tf_video_ended")},{passive:!0});a.addEventListener("ended",function(){h.add("tf_video_ended")},{passive:!0});a.addEventListener("timeupdate",function(){if(!isNaN(this.duration)){N.textContent=C(this.currentTime);const b=parseFloat(this.currentTime/a.duration);V.style.transform="scaleX("+
b.toFixed(4)+")";!1===R&&(v.value=parseInt(100*b));da(d,this.currentTime,30)}},{passive:!0});if(!1!==g){let b=!1,e=!1;const n=()=>{J(!0);e&&clearTimeout(e);e=setTimeout(J,3E3)},J=m=>{!0===b||!0===m?(b=!1,h.remove("tf_hide_controls")):(b=!0,h.add("tf_hide_controls"))};x=function(m){const p=m.touches?m.touches[0].target:m.target;if("dblclick"!==m.type||p&&!p.closest(".tf_video_wrap"))m.preventDefault(),T(a)?aa(a):(m=()=>{Z(u)||Z(a)},c.pictureInPictureElement||"picture-in-picture"===a.webkitPresentationMode?
(ha(),setTimeout(m,80)):m())};B.addEventListener(t,x);k.isTouch||u.addEventListener("dblclick",x);u.addEventListener(g+"fullscreenchange",function(m){T(a)?(h.add("tf_is_fullscreen"),u.addEventListener("mousemove",n,{passive:!0}),a.addEventListener("pause",n,{passive:!0}),e&&clearTimeout(e),e=setTimeout(J,3E3)):(h.remove("tf_is_fullscreen","tf_hide_controls"),e&&clearTimeout(e),a.removeEventListener("pause",n,{passive:!0}),u.removeEventListener("mousemove",n,{passive:!0}))},{passive:!0})}else B.className+=
" tf_fullscreen_disabled tf_play_disabled";B.appendChild(q("fas-expand"));z.appendChild(U);z.appendChild(v);z.appendChild(V);z.appendChild(A);a.hasAttribute("data-download")&&(g=c.createElement("a"),g.setAttribute("download",""),g.href=a.src,g.className="tf_video_download",g.appendChild(q("fas-download")),E.appendChild(g));!0===fa&&(w.addEventListener("input",function(b){b.preventDefault();b=parseFloat(this.value/100).toFixed(3);a.volume=b;a.muted=0<b?!1:!0}),a.addEventListener("volumechange",function(){!0===
this.muted||0===this.volume?r.classList.add("tf_muted"):r.classList.remove("tf_muted");da("vol_"+d,this.volume,120)},{passive:!0}),r.addEventListener(t,()=>{a.muted=!a.muted;a.muted||0!==a.volume||(w.value=50,k.triggerEvent(w,"input"))},{passive:!0}),r.appendChild(q("fas-volume-up","tf_abs_t")),r.appendChild(q("fas-volume-mute","tf_abs_t tf_h")),L.appendChild(r),w.min=0,w.max=100,w.type="range",w.value=-1<l?100*l:50,M.className="tf_video_volumn_inner",w.className="tf_video_volumn_range tf_h tf_overflow",
L.className="tf_video_volumn_wrap tf_rel",r.className="tf_video_mute tf_rel tf_overflow",a.muted&&(r.className+=" tf_muted"),M.appendChild(w),L.appendChild(M),E.appendChild(L));!a.hasAttribute("disablePictureInPicture")&&c.pictureInPictureEnabled&&(l=c.createElement("button"),l.addEventListener(t,ha,{passive:!0}),l.className="tf_video_pip",a.addEventListener("enterpictureinpicture",()=>{h.add("tf_is_pip")},{passive:!0}),a.addEventListener("leavepictureinpicture",()=>{h.remove("tf_is_pip")},{passive:!0}),
l.appendChild(q("fas-external-link-alt")),E.appendChild(l));E.appendChild(B);W.appendChild(F);y.appendChild(W);y.appendChild(N);y.appendChild(z);y.appendChild(O);y.appendChild(E);H.innerHTML=G.innerHTML='<span class="tf_abs_c">15</span>';H.appendChild(q("fas-redo-alt","tf_abs_c"));G.appendChild(q("fas-undo-alt","tf_abs_c"));f.appendChild(G);f.appendChild(H);f.appendChild(y);f.appendChild(P);f.appendChild(ea);u.appendChild(f);window.WebKitPlaybackTargetAvailabilityEvent&&a.addEventListener("webkitplaybacktargetavailabilitychanged",
b=>{"available"===b.availability&&(b=c.createElement("button"),b.className="tf_video_airplay",b.addEventListener(t,()=>{a.webkitShowPlaybackTargetPicker()},{passive:!0}),b.appendChild(q("fas-airplay")),B.before(b))},{passive:!0,once:!0});0<D&&D<a.duration&&(a.currentTime=D);a.autoplay&&h.add("tf_video_is_playing");a.setAttribute("webkit-playsinline","1");a.setAttribute("playsinline","1");a.removeAttribute("controls");h.remove("tf_lazy")},la=(a,f)=>{for(let g=a.length-1;-1<g;--g){let d=a[g],D=d.parentNode;
if(!D.classList.contains("tf_video_lazy")){let l=c.createElement("div");l.className="tf_video_lazy tf_w tf_h tf_box tf_rel tf_overflow tf_lazy";l.appendChild(d);D.appendChild(l)}4===d.readyState?ja(d,f):k.requestIdleCallback(()=>{d.addEventListener("loadedmetadata",function(){ja(this)},{passive:!0,once:!0});d.setAttribute("preload","metadata");!0===S&&d.load()},200)}};k.on("tf_video_init",a=>{!1===Y&&(Y=!0,k.fontAwesome("tf-fas-volume-mute tf-fas-volume-up tf-fas-undo-alt tf-fas-redo-alt tf-fas-external-link-alt tf-fas-airplay tf-far-closed-captioning tf-fas-expand".split(" ")));
a instanceof jQuery?a=a.get():void 0===a.length&&(a=[a]);la(a)})})(Themify,document);
