var checkExist=setInterval(function(){function n(n){var t=document.createElement("link");t.rel="text/css";t.rel="stylesheet";t.href=n;t.readyState&&(t.onreadystatechange=function(){(t.readyState==="loaded"||t.readyState==="complete")&&(t.onreadystatechange=null)});t.src=n;document.getElementsByTagName("head")[0].appendChild(t)}typeof dcPath!="undefined"&&(console.log("Exists!"),clearInterval(checkExist),n(`${baseUrl}Content/styles/modules/standalone/_youtube.css?v=${(new Date).getUTCMonth()+1}${(new Date).getUTCFullYear().toString().substring(2,4)}`),window.YitVideo.videoApi=Xmlbase+"3rdparty/mobile/json/video/#video_id#/#article_id#/",window.YitVideo.version="9.81",window.YitVideo.Constructor({containerAttrPrefix:"calcalistVideo",dynamicPlayerType:!1,flaotOnScroll:!1,nextVideo:!1,popularity:!1,siteName:"calcalist",dcPath:dcPath.dcPath,autoplay:!1,disableStyle:!0,callback:function(){document.querySelectorAll(".o-media-id__LiveStream").forEach(function(n){let t=n.querySelector(".yit-playplayer").id,i=`${n.querySelector(".yit-playplayer").getAttribute("poster")}`;document.getElementById(t).style.backgroundImage="url("+i+")"})},adTagUrl:dcPath.dcPath.indexOf("3847")>-1||dcPath.dcPath.indexOf("5144")>-1?"":this.YitVideo.adTagUrl="https://pubads.g.doubleclick.net/gampad/ads?iu=/"+dfpRoute+"/Network.video/video.calcalist/mobileweb/video.calcalist.vast&description_url=https://www.calcalist.co.il&tfcd=0&npa=0&sz=400x300|640x360&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=&vpos=preroll&cust_params="+encodeURIComponent($.param(dcPath))+"&permutive="+encodeURIComponent(localStorage.getItem("_psegs").replace("[","").replace("]",""))}),yitvideotoken?this.YitVideo.fpTokens={calcalist:yitvideotoken}:null,this.YitVideo.logo="",this.YitVideo.GenerateFooter=function(n){let t=document.createElement("div");t.classList.add("c-article__share");t.setAttribute("data-itemtype","news");t.setAttribute("data-title",n.data.title);t.setAttribute("data-image",n.data.poster_image);t.setAttribute("data-articleid",n.container.parentElement.id.replace("o-media-id__",""));t.setAttribute("data-base",baseUrl);let u=document.createElement("div");u.classList.add("c-article__share-elements","is-hidden");let i=document.createElement("div");i.classList.add("c-player-share");i.appendChild(t);i.appendChild(u);let e=new Share;e.Init(i);var r=document.createElement("div");r.classList.add("youtube-credit");r.innerHTML=footerOverwrite=n.data.title;n.data.credits&&(footerOverwrite+=" ("+n.data.credits.valueOf()+")");r.innerHTML=footerOverwrite;setTimeout(()=>{n.container.parentElement.querySelector(".video-wrap").appendChild(r)},1e3);let f=document.getElementById("custom_skin");return f!==null?f.remove():null,i},this.YitVideo.BuildFallbackContainer=function(n){function u(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)})}var r=`${n.container.attributes[this.options.containerAttrPrefix].value}_${u()}`,t,i;this.fallbackPlayer=!0;n.container.classList.add("video-wrap");n.container.setAttribute("type",this.ContentType(n.data.desktop.split(".").pop()));n.container.classList.add("video-wrap2");n.container.setAttribute("fallback-player",r);(n.container.attributes[this.options.containerAttrPrefix].value=="live"||n.container.attributes[this.options.containerAttrPrefix].value=="external")&&n.container.setAttribute("fallback-player",n.data.id);this.players[n.container.getAttribute("fallback-player")]||(this.players[n.container.getAttribute("fallback-player")]=n);t=document.createElement("div");t.id="player_"+r;(n.container.attributes[this.options.containerAttrPrefix].value=="live"||n.container.attributes[this.options.containerAttrPrefix].value=="external")&&(t.id="player_"+n.data.id);t.classList.add("yit-playplayer");t.setAttribute("type",this.ContentType(n.data.desktop.split(".").pop()));n.data.poster_image&&t.setAttribute("poster",n.data.poster_image);n.container.attributes.poster&&t.setAttribute("poster",n.container.attributes.poster.value);t.classList.add("video");n.container.setAttribute("at-play",this.options.autoplay?!0:this.atf(n)?!0:!1);t.setAttribute("controls","");t.setAttribute("playsinline","");t.setAttribute("width","100%");t.style.maxWidth="unset";i=document.createElement("source");i.setAttribute("type",this.ContentType(n.data.desktop.split(".").pop()));n.data.desktop.split(".").pop();i.src=n.data.desktop;t.appendChild(i);n.container.appendChild(t);n.container.appendChild(this.GenerateFooter(n))},this.YitVideo.adtagurlBuild=function(n){var t,i;if(!this.options.adTagUrl)return!1;t=this.URLToArray(this.URLToArray(this.options.adTagUrl).cust_params);t.autoplay=n.intent;t.VideoPosition_autoplay="Preroll_"+n.intent;t.PositionInPage_Autoplay=n.AtforBtf+n.intent;t.user_intent=n.intent;t.autoplay=n.intent;i=this.URLToArray(this.options.adTagUrl);i.output="xml_vmap1";i.vpi="1";i.cust_params=encodeURIComponent(this.ArrayToURL(t));this.adTagUrl=this.options.adTagUrl},this.YitVideo.InitPlayers=function(){var t=[],n=this,i=document.querySelectorAll("[fallback-player]");[].forEach.call(i,function(i){var u,e,r,f;if(i.getAttribute("player-type")=="flowplayer"||!0){if(u=n.players[i.attributes["fallback-player"].value],i.hasAttribute("initialized")&&i.getAttribute("initialized")=="true")return!0;e="player_"+i.attributes["fallback-player"].value;let o=[];try{ga.getAll().forEach(n=>o.push(n.get("trackingId")));o=o.filter((n,t)=>o.indexOf(n)===t)}catch(o){}if(r={src:[{src:u.data.desktop,type:"application/x-mpegurl"}],autoplay:0,poster:u.data.poster_image,lang:YitVideo.lang,share:!1,logo:YitVideo.logobrand(n.options.icon),float_on_scroll:!1,ga:{trackEvents:!1,ga_instances:o,media_title:u.data.title,event_categories:{live:" Video",videos:"Video"},event_actions:{video_player_load:"Video Player Loaded",fullscreen_enter:"Enter Fullscreen",fullscreen_exit:"Exit Fullscreen",video_start:"Play - Video Starts",video_click_play:"Play - Video Starts",video_pause:"Pause",video_resume:"Resume",video_mute:"Mute",video_unmute:"Unmute",video_25_percent:"Played - 25%",video_50_percent:"Played - 50%",video_75_percent:"Played - 75%",video_complete:"Video Completed",live_start:"Play - Video Starts",live_click_play:"Play - Video Starts ",live_pause:"Pause",live_resume:"Resume",live_mute:"Mute",live_unmute:"Unmute",live_complete:"Video Completed",ad_start_preroll:"Preroll Ad Start",ad_start_midroll:"Midroll Ad Start",ad_start_postroll:"Postroll Ad Start",ad_completed_preroll:"Preroll Ad Completed",ad_completed_midroll:"Mideroll Ad Completed",ad_completed_postroll:"Postroll Ad Completed",ad_skipped_preroll:"Preroll Ad Skipped",ad_skipped_midroll:"Midroll Ad Skipped",ad_skipped_postroll:"Postroll Ad Skipped"}},ratio:"16:9",qsel:!1,token:n.fpTokens[n.options.siteName]},Array.from(i.attributes).forEach(function(t){var u,f,e;t.name.search("data-")>-1&&(t.name.toLowerCase()=="data-adtag"?(n.options.adTagUrl=t.value,n.adTagUrl=t.value,ref=!1,window.top.document.referrer!=""&&parent.performance.navigation.type!=parent.PerformanceNavigation.TYPE_RELOAD&&(ref=new URL(window.top.document.referrer).origin),iframeEl=i,AtforBtf=window.parent.innerHeight>iframeEl.offsetTop?"ATF_":"BTF_",rfrr=ref?ref==window.location.origin&&window.top.location.href.search("#autoplay")>0?!0:!1:!1,intent=rfrr?AtforBtf=="ATF_"?"intent":!1:!1,autoplay=rfrr?AtforBtf=="ATF_"?!0:!1:!1,window.autoplayFirstVideo&&(autoplay=!1),!window.autoplayFirstVideo&&autoplay&&(u=i.getBoundingClientRect(),f=Math.max(document.documentElement.clientHeight,window.innerHeight),autoplay=!(u.bottom<0||u.top-f>=0),window.autoplayFirstVideo=!0),ref||(autoplay=!1),e={intent:intent,AtforBtf:AtforBtf,autoplay:autoplay},r.autoplay=autoplay,n.adtagurlBuild(e)):(k=t.name.replace("data-",""),val=t.value,r[k]=n.ParseBoolian(val)))}),typeof r.controls!==undefined&&r.controls==!1&&document.head.insertAdjacentHTML("beforeend",`<style>
            #${e} .fp-ui {
              display: none;
            }
          </style>`),(typeof r.ads!==undefined&&r.ads=="1"||u.data.ads)&&(r.ima={Locale:YitVideo.lang,ads:[{time:0,adTag:YitVideo.adTagUrl}]}),f=flowplayer(`#${e}`,r),typeof n.options.eventsCallback=="function"&&!1)try{}catch(o){console.log(o)}f.on("playing",function(){var t=this;n.pageRefreshEnableDisable("pageRefreshDisable");n.options.popularity&&n.options.popularity==!0&&!t.popularity&&(n.SendPixel(i,t),t.popularity=!0)});t.push(f);i.setAttribute("initialized","true");n.debug_mode&&n.cnslt(n.options.adTagUrl,f.options_)}});n.videoJsPlayers=t;YitVideo.options&&typeof YitVideo.options.callback=="function"&&YitVideo.options.callback()})},500)