var CoviOaid = '';
/*!
* Covi Sdk v1.0
*
* Date : 20211124_1356
*
*/
var CoviUtil={getXML:function(e,t,n){"function"!=typeof n&&(n=!1);var i=new window.XMLHttpRequest;i.open("GET",e),i.timeout=t.timeout||0,i.withCredentials=t.withCredentials||!1,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status)n&&n(i.responseXML);else if(0===i.status){var e=(new DOMParser).parseFromString('',"text/xml");n(e)}},i.send()},getJSON:function(e,t,n){"function"!=typeof n&&(n=!1);var i=new window.XMLHttpRequest;i.open("GET",e),i.timeout=t.timeout||0,i.withCredentials=t.withCredentials||!1,i.overrideMimeType&&i.overrideMimeType("application/json"),i.onreadystatechange=function(){4===i.readyState&&200===i.status&&n&&n(JSON.parse(i.responseText))},i.send()},sendLog:function(e){var t=new window.XMLHttpRequest;t.open("GET",e),t.timeout=3e3,t.send()},sendLog2:function(e,t){var n=new window.XMLHttpRequest;n.open("GET",e),n.timeout=3e3,n.onreadystatechange=function(){4===n.readyState&&200===n.status&&t&&t()},n.send()},trimString:function(e){return e.replace(/(^\s+|\s+$)/g,"")},convertTimeStringToSeconds:function(e){var t=e.split(":");return 3600*parseInt(t[0],10)+60*parseInt(t[1],10)+parseInt(t[2],10)},loadJS:function(e,t,n){var i=document.createElement("script");i.src=e,i.onload=t,i.onreadystatechange=t,n.appendChild(i)},parseDuration:function(e){if(null==e)return-1;if(CoviUtil.isNumeric(e))return e;var t=e.split(":");if(3!==t.length)return-1;var n=t[2].split("."),i=parseInt(n[0]);2===n.length&&(i+=parseFloat("0."+n[1]));var o=parseInt(60*t[1]),r=parseInt(60*t[0]*60);return isNaN(r)||isNaN(o)||isNaN(i)||o>3600||i>60?-1:r+o+i},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},sleep:function(e){for(var t=(new Date).getTime();(new Date).getTime()12?"오후":"오전")+" ",o+=(t=(t%=12)?t+"":"12")+":",o+=(n=n<10?"0"+n:n+"")+":",o+=i=i<10?"0"+i:i+""},setCookie:function(e,t,n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),document.cookie=e+"="+t+";expires="+i.toUTCString()+";path=/;Secure;SameSite=None"},getCookie:function(e){for(var t=e+"=",n=decodeURIComponent(document.cookie).split(";"),i=0;i")}};!function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(){function e(){window.URL=function(e,t){var n,i,o,r,a,s,u,c;function d(e,t,n){return"@"===n?"":n}if(Object.defineProperty(this,"hash",{get:function(){return n},set:function(e){return n=e.length>0?"#"+e.match(/^#*(.*)/)[1]:"",e}}),Object.defineProperty(this,"host",{get:function(){return a.length>0?i+":"+a:i},set:function(e){var t=e.split(":");return this.hostname=t[0],this.port=t[1],e}}),Object.defineProperty(this,"hostname",{get:function(){return i},set:function(e){return i=e.length>0?encodeURIComponent(e):i,e}}),Object.defineProperty(this,"href",{get:function(){var e=s+"//";return(c.length>0||o.length>0)&&(c.length>0&&(e+=c),o.length>0&&(e+=":"+o),e+="@"),e+=i,a.length>0&&(e+=":"+a),e+=r+u+n},set:function(e){this.protocol=e;var t=(e=e.replace(/.*?:\/*/,"")).match(/([^:]*).*@/);this.username=t?t[1]:"";var n=(e=e.replace(/([^:]*):?(.*@)/,d)).match(/.*(?=@)/);this.password=n?n[0]:"",e=e.replace(/.*@/,""),this.hostname=e.match(/[^:/?]*/);var i=e.match(/:(\d+)/);this.port=i?i[1]:"";var o=e.match(/\/([^?#]*)/);this.pathname=o?o[1]:"";var r=e.match(/\?[^#]*/);this.search=r?r[0]:"";var a=e.match(/\#.*/);this.hash=a?a[0]:""}}),Object.defineProperty(this,"origin",{get:function(){var e=s+"//"+i;return a.length>0&&(e+=":"+a),e},set:function(e){this.protocol=e,e=e.replace(/.*?:\/*/,""),this.hostname=e.match(/[^:/?]*/);var t=e.match(/:(\d+)/);this.port=t?t[1]:""}}),Object.defineProperty(this,"password",{get:function(){return o},set:function(e){return o=encodeURIComponent(e),e}}),Object.defineProperty(this,"pathname",{get:function(){return r},set:function(e){return r="/"+e.match(/\/?(.*)/)[1],e}}),Object.defineProperty(this,"port",{get:function(){return a},set:function(e){return a=isNaN(e)||""===e?"":Math.min(65535,e).toString(),e}}),Object.defineProperty(this,"protocol",{get:function(){return s},set:function(e){return s=e.match(/[^/:]*/)[0]+":",e}}),Object.defineProperty(this,"search",{get:function(){return u},set:function(e){return u=e.length>0?"?"+e.match(/\??(.*)/)[1]:"",e}}),Object.defineProperty(this,"username",{get:function(){return c},set:function(e){c=e}}),"string"==typeof e){var f=/^[a-zA-z]+:\/\/.*/.test(e),l=/^[a-zA-z]+:\/\/.*/.test(t);if(f)this.href=e;else{if(!l)throw new TypeError('URL string is not valid. If using a relative url, a second argument needs to be passed representing the base URL. Example: new URL("relative/path", "http://www.example.com");');this.href=t+e}}else n=e.hash,i=e.hostname,o=e.password?e.password:"",r=e.pathname,a=e.port,s=e.protocol,u=e.search,c=e.username?e.username:"";this.searchParams=function(e){var t=[],n=[];e.search.length>0&&e.search.slice(1).split("&").forEach(function(e){var i=e.split("=");t.push(i[0]),n.push(i[1])});function i(){0===t.length?e.search="":e.search=t.map(function(e,t){return e+"="+n[t]}).join("&")}return{append:function(e,o){t.push(e),n.push(o),i()},delete:function(e){for(;t.indexOf(e)>-1;)n.splice(t.indexOf(e),1),t.splice(t.indexOf(e),1);i()},entries:function(){return t.map(function(e,t){return[e,n[t]]})},get:function(e){return n[t.indexOf(e)]},getAll:function(e){return n.filter(function(n,i){return t[i]===e})},has:function(e){return t.indexOf(e)>-1},keys:function(){return t},set:function(e,o){if(-1===t.indexOf(e))this.append(e,o);else{var r=!0,a=[];t=t.filter(function(t,i){return t!==e?(a.push(n[i]),!0):!!r&&(r=!1,a.push(o),!0)}),n=a,i()}},sort:function(){var e=this.entries().sort();t=[],n=[],e.forEach(function(e){t.push(e[0]),n.push(e[1])}),i()},toString:function(){return e.search.slice(1)},values:function(){return n}}}(this)}}"function"!=typeof URL?e():"searchParams"in new URL(window.location)||e()}();var CoviSdk=function(e,t,n){var i,o,r,a,s,u,c,d,f,l,v,p,h,m,g,y,C,w,E,k=this,b=e,T=t,L=n,S=function(e){switch(e.detail.event){case 110:U();break;case 120:N();break;case 100:x();break;case 130:A();break;case 140:he();break;case 150:me();break;case 160:R();break;case 170:le("SDK_RUN_COMPLETE")}},O=function(e){switch(e){case 100:if(!I())return void R(m={code:"E005",message:"video 요소가 정의되지 않았습니다."});break;case 110:"E000"===m.code&&D(A,R)}},U=function(){D()},N=function(){d&&(M(f)?(le("SDK_VAST_LOADED"),g?Ee({event:100}):y&&Ee({event:130})):(le("SDK_ERROR"),Ee({event:160})))},x=function(){I()?b.videoPlayCheck&&Ee({event:130}):R(m={code:"E005",message:"video 요소가 정의되지 않았습니다."})},A=function(){a.src=b.mediafile,"autoplay"===b.videoPlayType?(ve("Start Autoplay"),ee()):(ve("Start Manualplay"),ge(),re())},R=function(e){void 0===e&&(e=m);var t=new CustomEvent("CoviSdkException",{detail:{code:e.code,message:e.message}});document.dispatchEvent(t)},I=function(){var e=0;if((a=Y(document,b.videoElementId))&&(e+=1),0===e){var t=b.videoElementClass.split(","),n=t[0],i=0;void 0!==t[1]&&(i=parseInt(t[1],10)),(a=b.rootElem?$(b.rootElem,n,i):$(document,n,i))&&(e+=1)}return e>0},_=function(e){if(void 0!==e)for(var t in i)e.hasOwnProperty(t)?b[t]=e[t]:b[t]=i[t];else b=i},P=function(e,t){if(void 0!==o){var n,i,r,u,d;if("imp"===t&&!l)return r=b.impression,CoviUtil.sendLog(r),l=!0,g&&(a.currentTime=0),void ve("event : imp.");if(c)for(n in o)u=(i=o[n]).offset,d=i.count,e>=u&&(1===(d+=1)&&("start"===n&&(l||(r=b.impression,CoviUtil.sendLog(r),l=!0,g&&(a.currentTime=0),ve("event : imp.."))),r=i.url,CoviUtil.sendLog(r),"start"===n?s?ve("event : "+n+" (atp)"):(ve("event : "+n+" (ctp)"),v=!0):ve("event : "+n)),i.count=d)}},D=function(){var e=function(){var e="//cnp-vast.covi.co.kr/vast/vast.covi";return e+="?type="+b.type,e+="&pcode="+b.pcode,e+="&category="+b.category,b.platform&&(e+="&platform="+b.platform),b.ad_vid&&(e+="&ad_vid="+b.ad_vid),b.gender&&(e+="&gender="+b.gender),b.age&&(e+="&age="+b.age),""!==CoviOaid&&(e+="&tgid="+CoviOaid),e+="&browser="+be(E),e+="&dty=W",e+="&ua="+encodeURIComponent(E)}();CoviUtil.getXML(e,{timeout:5e3,withCredentials:!1},function(e){d=!0,f=e,Ee({event:120})})},M=function(e){if(""===CoviOaid){var t="https://algd.widerplanet.com/delivery/moleculeid?dest="+encodeURIComponent("http://dmpapi.covi.co.kr/syncMoleculeId?moleculeId={OAID}"),n=document.createElement("img");n.src=t,n.style.width="1px",n.style.height="1px",n.style.visibility="hidden",document.body.appendChild(n)}else{CoviUtil.getCookie("oaid").length<1&&CoviUtil.setCookie("oaid",CoviOaid,7)}var i=W(e,"InLine");if(void 0!==i&&i.length){var o=W(i[0],"Creatives"),a=W(o[0],"Creative"),s=W(a[0],"Linear");b.impression=H(i[0]),b.duration=X(s[0]),b.mediafile=B(s[0]),b.trackings=q(s[0],b.duration),b.videoClick=z(s[0]);var u=W(i[0],"Extensions");return r=G(u[0]),b.customTrackings=Q(u[0]),b.videoAspectRatio=J(u[0]),K(),F(b.trackings),w||(w=ke(b.impression))&&(b.ad_vid=w,CoviUtil.setCookie("_covi_advid",w,365)),!0}var c=W(e,"Error")[0],d=W(c,"Code")[0].childNodes[0].nodeValue,f=W(c,"Message")[0].childNodes[0].nodeValue;return m={code:d,message:f},!1};this.getNativeItems=function(){return r};var V=function(e,t){return void 0===t&&(t=b.videoPlayableViewRate),100*j(e)>=t},j=function(e){var t=window.innerHeight||document.documentElement.clientHeight,n=e.getBoundingClientRect(),i=n.top,o=n.bottom,r=o-i;return i>t?0:o<=0?0:i>=0&&o<=t?1:i<0&&o>t?t/r:i<0&&o<=t?o/r:i>=0&&o>t?(t-i)/r:0},K=function(){o={}},F=function(e){var t,n,i;for(i in e)e.hasOwnProperty(i)&&(t=e[i].url,n=e[i].offset,o[i]={url:t,offset:n,count:0})},H=function(e){var t=W(e,"Impression");if(t.length>0){var n=t[0].childNodes[0];if(void 0!==n)return CoviUtil.trimString(n.nodeValue)}},X=function(e){var t=W(e,"Duration");if(t.length>0){var n=t[0].childNodes[0];if(void 0!==n){var i=CoviUtil.trimString(n.nodeValue);return CoviUtil.convertTimeStringToSeconds(i)}}return!1},q=function(e,t){var n=W(e,"TrackingEvents");if(n.length>0){for(var i,o=W(n[0],"Tracking"),r="",a={},s=0;s0){var n=W(t[0],"MediaFile");if(n.length){var i=n[0].childNodes[0];if(void 0!==i)return CoviUtil.trimString(i.nodeValue)}}},z=function(e){var t,n,i=W(e,"VideoClicks");if(i.length>0){t={};var o=W(i[0],"ClickThrough");o.length&&void 0!==(n=o[0].childNodes[0])&&(t.through=CoviUtil.trimString(n.nodeValue));var r=W(i[0],"ClickTracking");r.length&&void 0!==(n=r[0].childNodes[0])&&(t.tracking=CoviUtil.trimString(n.nodeValue))}return t},G=function(e){for(var t={},n=W(e,"Extension"),i=0;i=0?2:e.indexOf("iphone")>=0?3:e.indexOf("ipad")>=0?3:e.indexOf("ipod")>=0?3:e.indexOf("windows")>=0?1:e.indexOf("mac")>=0?1:void 0};this.run=function(){Ee({event:110})},this.run2=function(e){void 0===e?(O(100),O(110)):O(e)},this.release=function(){a&&(a.removeEventListener("pause",se),a.removeEventListener("ended",ue),a.removeEventListener("loadedmetadata",ce),a.removeEventListener("timeupdate",de),a.removeEventListener("play",fe),a.pause(),a.src="",ve("SDK released"))},this.onClickLandingButton=function(e,t){!function(e,t){var n,i;"function"!=typeof e&&(e=!1),void 0!==b.videoClick&&(n=b.videoClick.through,i=b.videoClick.tracking,CoviUtil.sendLog2(i,function(){t&&a&&a.pause(),e&&e(n)}))}(e,t)},this.requestVast=function(e){"function"!=typeof e&&(e=!1),"E000"===m.code&&D(function(){A(),e&&e()},R)},this.getLastError=function(){return m},this.getMediaUrl=function(e){return b.mediafile},this.getPlayUrl=function(){return"//play.wecandeo.com/video/v/?key="+b.mediafile.replace("http://api.wecandeo.com/video/default/","").replace("https://api.wecandeo.com/video/default/","")},this.replayVideo=function(){a&&a.play()},this.sendTrackingLog=function(e,t){P(e,t)},this.changeCanVideoPlay=function(){c=!0},this.changeAutoplayAllowed=function(){s=!0},this.getRootElem=function(){return b.rootElem},this.videoEnded=function(){ue()},this.checkViewability=function(e){return V(e)},this.getAdvid=function(){return w},this.getVideoAspectRatio=function(){return b.videoAspectRatio},this.getTrackingEvents=function(){return o},this.getImpression=function(){return b.impression},function(e){i={type:"",pcode:"",category:"",platform:"",videoElementId:"",videoElementClass:"",videoPlayType:"manualplay",videoPlayableViewRate:100,sdkStandalone:!0,videoElementCheck:!0,videoPlayCheck:!0,gender:"",age:"",ad_vid:"",idx:0,rootElem:"",coviw:!1},"function"!=typeof T&&(T=!1),"function"!=typeof L&&(L=!1),v=!1,s=!1,u=!1,c=!1,!1,d=!1,l=!1,p=!1,h=!1,_(e),pe(),g=b.videoElementCheck,y=b.videoPlayCheck,C="CoviSdkEvent_"+b.idx,document.addEventListener(C,S,!1),b.coviw||(window.addEventListener("blur",Ce),window.addEventListener("focus",we)),(w=CoviUtil.getCookie("_covi_advid"))&&(b.ad_vid=w),E=window.navigator.userAgent,ve("Covi SDK loaded")}(e)};
/*!
* Covi Player v1.0
*
* Date : 20211124_1357
*
*/
var CoviPlayer=function(e,n,i){var t,a,c,s,o,l,r,d,u,v,y,p,k,b,m,f,_,E,g,h,L,C,T,w,D,R,N,P,A,S,x,O=e,V=n,F=i,I=(new Date).getTime(),M=function(e){switch(e.detail.event){case 100:K();break;case 110:q();break;case 120:B(),O.layout?J({event:130}):J({event:150});break;case 150:j();break;case 170:G();break;case 180:$()}},K=function(){var e=O.containerClassName.split(","),n=e[0],i=0;void 0!==e[1]&&(i=parseInt(e[1],10)),(a=_e(document,n,i))?J({event:110}):Q({code:"E010",message:"containerClassName 값이 정의되지 않았습니다."})},q=function(){N=new CoviSdk(O,Z,F),J({event:120})},B=function(){if(""!==O.style){var e=U(O.style),n=fe(document,"head",0),i=Ee("link");i.type="text/css",i.rel="stylesheet",i.href=e,n.appendChild(i)}},U=function(e){return e.indexOf("//")>=0?e+"?"+I:X()+e+".css?"+I},Y=function(e){z(e)},H=function(e){e.preventDefault(),z(e)},z=function(e){window.clearTimeout(P),A?(he(),A=!1):(ge(),A=!0,c.paused||(P=window.setTimeout(function(){he(),A=!1},4e3)))},j=function(){var e,n,i="coviClickLandingButton("+O.idx;for(n in a.innerHTML=CoviEmbedHtml.replace("coviClickLandingButton(",i),D=CoviNativeItemsMapping,R=CoviNativeElements){e=_e(a,n,0);var t=R[n];switch(n){case"covi_player":(c=e).addEventListener("mousedown",Y,!1),c.addEventListener("touchend",H,!1),c.addEventListener("pause",ne),c.addEventListener("durationchange",oe),c.addEventListener("canplay",ae),c.addEventListener("timeupdate",oe);break;case"covi_playback":s=e;break;case"covi_playback_fullscreen":(m=e)&&"onFullscreen"===t.eventFunc&&m.addEventListener("click",de);break;case"covi_playback_fullscreen-img":(f=e)&&(f.src=Le(t.src));break;case"covi_playback_muteunmute":"onMuteUnmute"===t.eventFunc&&e.addEventListener("click",re);break;case"covi_playback_mute-img":(o=e)&&(o.src=Le(t.src),o.style.display="none");break;case"covi_playback_unmute-img":(l=e)&&(l.src=Le(t.src),l.style.display="inline-block");break;case"covi_playback_seek":(r=e)&&(r.setAttribute("value",0),r.setAttribute("min",0),r.setAttribute("max",100),r.setAttribute("step",1),"onSeek"===t.eventFunc&&r.addEventListener("click",ce));break;case"covi_playback_small_playpause":(_=e)&&"onPlayPauseSmall"===t.eventFunc&&_.addEventListener("click",se);break;case"covi_playback_small_play-img":(E=e)&&(E.src=Le(t.src));break;case"covi_playback_small_pause-img":(g=e)&&(g.src=Le(t.src));break;case"covi_playback_playpause":(v=e)&&"onPlayPause"===t.eventFunc&&v.addEventListener("click",ye);break;case"covi_playback_play-img":(y=e)&&(y.src=Le(t.src));break;case"covi_playback_pause-img":(p=e)&&(p.src=Le(t.src));break;case"covi_playback_replay":(T=e)&&"onReplay"===t.eventFunc&&T.addEventListener("click",ve);break;case"covi_playback_replay-img":(w=e)&&(w.src=Le(t.src));break;case"covi_playback_currenttime":(d=e)&&(d.innerText="0:00");break;case"covi_playback_durationtime":(u=e)&&(u.innerText="/ 0:00");break;case"covi_adidentity":h=e;break;case"covi_bi-img":(k=e)&&(k.src=Le(t.src));break;case"covi_logo":b=e;break;case"covi_landing_title":e;break;case"covi_bodycopy":L=e;break;case"covi_title":C=e}}var N=R.covi_player.className;O.videoElementClass=N+",0",J({event:170})},G=function(){le(),N.run()},J=function(e){var n=new CustomEvent(S,{detail:{event:e.event},bubbles:!0});document.dispatchEvent(n)},Q=function(e){var n=new CustomEvent("CoviPlayerException",{detail:{code:e.code,message:e.message}});document.dispatchEvent(n)},W=function(e){if(void 0!==e)for(var n in t)e.hasOwnProperty(n)?O[n]=e[n]:O[n]=t[n];else O=t},X=function(){return"//cnp-file.covi.co.kr/player/publisher/"},Z=function(e){switch(e){case"SDK_VIDEO_PLAY":ie(),ee();break;case"SDK_VIDEO_PAUSE":ne();break;case"SDK_VIDEO_ENDED":te();break;case"SDK_VIDEO_START_AUTOPLAY":P=window.setTimeout(function(){he(),A=!1},2e3);break;case"SDK_VAST_LOADED":var n,i,t,s,o=N.getNativeItems();for(t in c&&c.setAttribute("poster",o.thumbnail),"N"===o.ad_identity&&h&&(h.style.display="none"),D){n=D[t],"+"===t[0]?(i=R[n["native-element"]],s=!0):(i=R[n],s=!1);var l=i.className,r=_e(a,l,0);switch(i.type){case"div":r.classList.contains("covi_category")&&(r.innerText=n.value);break;case"p":case"h2":s?""!==n.value&&(r.innerText=n.value):r.innerText=o[t];break;case"span":r.innerText=o[t];break;case"a":s&&""!==n.value&&(r.innerText=n.value,r.setAttribute("onclick",n.onclick));break;case"img":r.classList.contains("covi_logo")&&b&&(b.src=o.logo,""!==o.logo&&"http://"!==o.logo&&"https://"!==o.logo||(b.parentNode.removeChild(b),L&&L.classList.add("nologo"),C&&C.classList.add("nologo")))}}x=N.getVideoAspectRatio(),J({event:180});break;case"SDK_ERROR":var d=N.getLastError();switch(d.code){case"E001":case"E002":case"E003":case"E004":case"E005":case"E100":!function(){for(;a.firstChild;)a.removeChild(a.firstChild);a.style.display="none"}()}"E100"===d.code?be("PLAYER_NO_ADS"):be("SDK_ERROR");break;case"SDK_RUN_COMPLETE":be("SDK_RUN_COMPLETE")}},$=function(){if(void 0!==x){var e=_e(a,"covi_player-container",0),n="";switch(x){case"9:16":n="videoratio916";break;case"9:12":n="videoratio912";break;case"4:5":n="videoratio45";break;case"1:1":n="videoratio11"}""!==n&&e.classList.add(n)}},ee=function(){be("PLAYER_VIDEO_PLAY")},ne=function(){be("PLAYER_VIDEO_PAUSE")},ie=function(){var e=_e(a,"covi_player_endscreen-container",0);e&&(e.style.visibility="hidden")},te=function(){!function(){var e=_e(a,"covi_player_endscreen-container",0);if(e){e.style.visibility="visible";var n=_e(a,"covi_player_endscreen-img",0);if(n){var i=N.getNativeItems();if(""!==i.end_card?n.src=i.end_card:n.src=i.thumbnail,c){var t=c.getBoundingClientRect();n.style.height=t.height+"px"}}}}(),be("PLAYER_VIDEO_ENDED")},ae=function(){c.src.indexOf("data:video")<0&&(c.paused||(ue(),le()))},ce=function(){var e,n;e=R.covi_playback_seek.className,n=_e(a,e,0);var i=c.duration*(n.value/100);c.currentTime=i},se=function(){ye()},oe=function(){var e=c.currentTime,n=c.duration,i=e,t=e*(100/n);r&&(r.value=t),-1===O.elapsedTime&&(e=n-e);var a=Math.floor(e/60),s=Math.floor(e-60*a),o=Math.floor(n/60),l=Math.floor(n-60*o);s<10&&(s="0"+s),l<10&&(l="0"+l),-1===O.elapsedTime&&a<10&&(a="0"+a);var v=!1;d&&i>.5&&(v=!0),d.innerHTML=a+":"+s,v&&(d.style.display="block"),u&&(isNaN(o)||isNaN(l)?u.innerText="/ 0:00":u.innerHTML="/ "+o+":"+l),c.controls&&(c.controls=!1)},le=function(){c.muted=!0,c.muted?(o&&(o.style.display="none"),l&&(l.style.display="inline-block")):(o&&(o.style.display="inline-block"),l&&(l.style.display="none"))},re=function(){c.muted?(c.muted=!1,o&&(o.style.display="inline-block"),l&&(l.style.display="none")):(c.muted=!0,o&&(o.style.display="none"),l&&(l.style.display="inline-block"))},de=function(){c.requestFullscreen?c.requestFullscreen():c.mozRequestFullScreen?c.mozRequestFullScreen():c.webkitRequestFullscreen?c.webkitRequestFullscreen():c.msRequestFullscreen&&c.msRequestFullscreen()},ue=function(){c.paused?(y&&(y.style.display="inline-block"),p&&(p.style.display="none")):(y&&(y.style.display="none"),p&&(p.style.display="inline-block"))},ve=function(){c.paused&&pe()},ye=function(){c.paused?(pe(),y&&(y.style.display="none"),p&&(p.style.display="inline-block"),E&&(E.style.display="none"),g&&(g.style.display="inline-block")):(ke(),y&&(y.style.display="inline-block"),p&&(p.style.display="none"),E&&(E.style.display="inline-block"),g&&(g.style.display="none"))},pe=function(){c.play(),P=window.setTimeout(function(){he()},2e3)},ke=function(){c.pause(),ge(),window.clearTimeout(P)},be=function(e){V&&V(e)},me=function(e){if(F){var n=CoviUtil.getTimes();F(e="("+n+") "+e)}},fe=function(e,n,i){return e.getElementsByTagName(n)[i]},_e=function(e,n,i){return e.getElementsByClassName(n)[i]},Ee=function(e){return document.createElement(e)},ge=function(){s&&(s.style.display="block"),v&&(v.style.display="block")},he=function(){s&&(s.style.display="none"),v&&(v.style.display="none")},Le=function(e){return e.indexOf("//")>=0?e:"//cnp-file.covi.co.kr/player/img/"+e};this.checkViewability=function(){return N.checkViewability(c)},this.playVideo=function(){pe()},this.stopVideo=function(){ke()},this.run=function(){J({event:100})},this.onClickVideoReplayButton=function(e){ie(),N.replayVideo()},this.onClickLandingButton=function(e){"function"==typeof e&&N.onClickLandingButton(e,!0)},function(e){t={containerClassName:"",layout:"",style:"",type:"",pcode:"",category:"",platform:"",videoElementId:"",videoElementClass:"",videoPlayType:"manualplay",videoPlayableViewRate:"100",sdkStandalone:!1,videoElementCheck:!0,coviw:!1,elapsedTime:0,durationTime:!0},"function"!=typeof V&&(V=!1),"function"!=typeof F&&(F=!1),S="CoviPlayerEvent_"+O.idx,document.addEventListener(S,M,!1),document.addEventListener("CoviSdkException",function(e){var n=e.detail;Q(n)},!1),W(e),A=!0,me("Covi Player loaded")}(e)};