\n \n \n `)))),keynapCard();var n=localStorage.getItem("channel-custom-"+t);let a=JSON.parse(n),o=[];for(const e of o)2!==a?.[e]&&$(`#ch-${e}`).hide();for(const e in a){const n=a[e],t=$(`#ch-${e}`);1===n&&t.hide()}}}})}function tabChannelByCustomApi(){$("#jessibucaPlay").addClass("sembunyi"),$("#myVideo").removeClass("sembunyi"),$.ajax({type:"POST",url:"/m/api/getVodGroups",success:function(e){let n="";e.success?($("#tabCategory").html(e.data?.map(((e,a)=>(n=0===a?"active":"",`\n
\n ${e.group_name}\n \n `)))),getVods(e.data[0].group_name)):$("#tabCategory").html('')},error:function(e){Swal.fire("",e,"warning")}})}function getVods(e){$.ajax({type:"POST",url:"/m/api/getVods",data:{group_name:e},success:function(n){n.success&&($("#group-icon").html(n.data?.map(((n,a)=>`\n \n
\n
\n
\n
\n `))),keynapCard())},error:function(e){Swal.fire("",e,"warning")}})}async function getLocationServer(e){let n=null;try{let a=new URL(e);a.pathname="/locate/"+a.pathname.split("/").pop(),a=a.toString();let t=await axios.head(a,{timeout:3e3});200==t.status?n="":204==t.status?n="Gedung Cyber":404==t.status&&(n="Local")}catch(e){404==e?.response?.status?n="Local":console.error(e)}return n}let selectedValue=localStorage.getItem("playerName")||"";function keynapCard(){$("body .card").keynav(),$(".card").click((function(){let e=$(this).attr("data-url"),n=$(this).attr("data-channel_group_name");e&&changeVideo(e,n)}))}Cookies.set("playerName",selectedValue,{expires:365}),keynapCard()