import"./lang-handle.78cb8d32.js";import{b as p,c as f,a as O,d as r,S as V,P as T,e as P,I as L,f as b,C as Y,i as B,h as J,j as l,k as K,m as W,E as Q,g as X,N as Z}from"./report.dea9e678.js";let ee=$(".nav-wrap .language-item");ee.each((t,e)=>{$(e).click(()=>{let n=$(e).html();p({events:"office_sub_tab_btn",optional_params:{tab_name:n}})})});$(".btn-reserve-wrap .btn-reserve").click(()=>{p({events:"office_preregister_btn"})});$(".channel-discord").click(()=>{p({events:"office_follow_us_btn",optional_params:{channel_name:"discord"}})});$(".channel-facebook").click(()=>{p({events:"office_follow_us_btn",optional_params:{channel_name:"fb"}})});$(".channel-twitter").click(()=>{p({events:"office_follow_us_btn",optional_params:{channel_name:"twitter"}})});$(".channel-youtube").click(()=>{p({events:"office_follow_us_btn",optional_params:{channel_name:"youtube"}})});$(".btn-follow-discord").click(()=>{p({events:"office_follow_discord_btn"})});$(document).ready(function(){$(".m-loading").is(":visible")&&f("office_loading_page","cms_vshow")});const te=O(),w=location.pathname.match("/m.html");let d=!1;$(".dia-btn4").addClass("lock");$(".top-invite").off("click");$(".slide1-btn1").off("click");$(".nav-center").off("click");$(".top-invite").attr("href","javascript:;");$(".slide1-btn1").attr("href","https://www.playdeltaforce.com/download/DeltaForceMiniloader.official.exe");$(".nav-center").attr("href","javascript:;");$(".top-invite").on("click",R);$(".nav-center").on("click",R);let h=!1;function R(){h=!1,ne()}function k(){if(!oe()){w?window==null||window.openDialog("pop10"):window==null||window.openDialog("pop8");return}}async function ne(){if(d)h&&k();else if(r.checkLogin()||await r.login(),r.checkLogin()){if(v(),await M(),y(),d){h?k():ae();return}const n=r.getUser().channel_info.account,i=document.getElementById("unbindphone");i&&(i.value=n),w?window==null||window.openDialog("pop7"):window==null||window.openDialog("pop5")}}let D=null;function x(){D=setTimeout(()=>{N(!1)?$(".dia-btn4").removeClass("lock"):$(".dia-btn4").addClass("lock")},200)}$(".dia-input1").on("blur input propertychange",function(t){const e=$(".dia-input1").val().toString();$(".dia-input1").val($.trim(e)),clearTimeout(D),x()});$(".dia-radio a").on("click",function(t){$(t.target).toggleClass("on"),clearTimeout(D),x()});function N(t=!0){const e=$(".dia-input1").val().toString();return!e||e.length>75||e.match(/[\uD83C-\uDBFF\uDC00-\uDFFF]+/g)||!J(e)?(t&&g("reserve-fail-email"),!1):!!$(".dia-radio a.on").length}let E=!1;$(".dia-btn4").click(()=>{if(N()){if(E)return;E=!0;const e=$(".dia-input1").val().toString(),n=[];$(".dia-radio a").each((i,a)=>{a.classList.contains("on")&&n.push(i+1)}),f("office_email_submit_btn","cm_click",{email:e,game_mode:n}),F(e,{source:"homePage",gameModes:n})}});async function F(t,e){var i;m||await q();const n={biz_id:"1",content:{email:t,modify_ts:new Date().getTime(),location:m,language:V[T]||"en",source:"officialWeb",tags:P,subscribe:1,attributes:{game_mode:e==null?void 0:e.gameModes.map(a=>String(a))}}};try{const a=r.getUser(),o={channel_id:(i=a==null?void 0:a.channel_info)==null?void 0:i.channelId,login_res:a,intl_game_id:L},{data:s}=await b.smartlinkSyncUserByEmail(Object.assign(n,{authParams:o}));if(s.need_captcha){(await te.verifyTXCaptcha({lang:T,appid:Y})).data.result===0?F(t,e):(g("reserve-submit-fail"),E=!1);return}return f("office_reserve_ret","cm_click",{ret:s.result,email:t,game_mode:e==null?void 0:e.gameModes}),s.result===0&&await G(t,n.content)?(d=!0,y(),g("reserve-success-msg"),setTimeout(function(){window==null||window.closeDialog(),h&&k(),w?window==null||window.openDialog("pop8"):window==null||window.openDialog("pop6")},500),!0):(g("reserve-submit-fail"),!1)}catch(a){console.log(a)}}function ae(t=""){const e=document.querySelectorAll(".comm-error")[0];if(e){e.classList.add("top","active");const n=(window==null?void 0:window.GLanguage[localStorage.getItem("lang")||"en"])||{};if(w){const i=e.querySelector("span");i.innerText=t||n.lang7}else e.innerText=t||n.lang7;e.style.display="flex",setTimeout(function(){e.style.display="none"},2e3)}}function g(t){["reserve-success-msg","reserve-submit-fail","reserve-fail-privacy","reserve-fail-age","reserve-fail-email"].forEach(n=>{n!==t&&$(`.${t}`).hide()}),$(`.${t}`).addClass("top active"),$(`.${t}`).show(),setTimeout(function(){$(`.${t}`).hide()},2e3)}async function ie(){await r.login(),v(),await M(),y()}window.liPassLogin=ie;async function H(){await r.logout(),v(),window.location.reload()}window.liPassSignOut=H;function v(){if(r.checkLogin()){const e=r.getUser().channel_info.account;$("#login_nickname_span").text(e),$("#unlogin").hide(),$("#logined").show()}else $("#login_nickname_span").text(""),$("#unlogin").show(),$("#logined").hide()}function y(){d?($(".nav-center").addClass("on").css("cursor","unset"),$(".top-invite").addClass("on"),$("a[data-login='logined']").show(),$("a[data-login='unlogin']").hide()):($(".nav-center").removeClass("on"),$(".top-invite").removeClass("on"),$("a[data-login='logined']").hide(),$("a[data-login='unlogin']").show())}let m="";async function q(){const t=await B.queryMyRegion();m="999",t.region&&(m=t.region)}async function G(t,e){var o;if(!r.checkLogin())return!1;const n=r.getUser(),i={channel_id:(o=n==null?void 0:n.channel_info)==null?void 0:o.channelId,login_res:n,intl_game_id:L},a=await b.register(Object.assign({type:1,opt_type:0,info:{email:t,ext_info:JSON.stringify({location:e.location,game_mode:e.attributes.game_mode})}},{authParams:i}));return a&&a.data.result==0}async function M(){var t;if(d)return!0;if(r.checkLogin()){const e=r.getUser(),n={channel_id:(t=e==null?void 0:e.channel_info)==null?void 0:t.channelId,login_res:e,intl_game_id:L};let i=null;try{i=await b.getUserInfoV2({type:1,opt_type:0,authParams:n})}catch(s){H();return}d=i&&i.data&&i.data.register_status===1;let a=!1,o={location:"",attributes:{}};try{const s=await b.smartlinkUserInfo({authParams:n,biz_id:1,type:2,value:e.channel_info.account});if(a=s.tag?s.tag.includes(P[0]):!1,s.extra&&s.extra.length)for(let S in s.extra){const C=s.extra[S];o.attributes[C.field_name]=C.field_value}s.country?o.location=s.country:(await q(),o.location=m),console.log(s)}catch(s){console.log(s)}return a&&!d&&G(e.channel_info.account,o),d=d||a,d}}function oe(){var t,e;if(r.checkLogin()){const n=r.getUser();return((e=(t=n==null?void 0:n.extra_json)==null?void 0:t.get_status_rsp)==null?void 0:e.adult_check_status)===1}return!0}async function se(){r.checkLogin()&&(v(),await M(),y())}se();$(function(){f("office_web_home_page","cm_vshow"),$(".nav-list a").on("click",t=>{f("office_web_home_sub_tab","cm_click",{btn_name:$(t.currentTarget).find("span").text()})}),$(".nav-center").on("click",()=>{f("office_preregister_btn","cm_click")}),$(".video-box").on("click",()=>{f("office_video_btn","cm_click")}),$(".slide1-btn1").on("click",()=>{f("office_preregister_now_btn","cm_click")}),l(".comm-list a",t=>({events:"office_web_follow_us_btn",optional_params:{channel_name:W(t==null?void 0:t.href)}})),l(".join-test",()=>({events:"office_franchise_btn"})),l("#pop6 .dia-btn1",()=>({events:"office_discord_btn"})),K()&&l("#pop8 .dia-btn1",()=>({events:"office_discord_btn"})),l(".slide1-btn2",()=>({events:"office_steam_wishlist_btn"})),l(".slide1-btn3",()=>({events:"office_ps_wishlist_btn"})),l(".slide1-btn4",()=>({events:"office_download_launcher_btn"})),l(".top_btn a:nth-child(1)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Customer Service"}})),l(".top_btn a:nth-child(2)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"G.T.I Security"}})),l(".top_btn a:nth-child(3)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Redemption Center"}})),l(".top_btn a:nth-child(4)",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Access Enquiry"}})),l(".page-main .service",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Customer Service"}})),l(".page-main .security",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"G.T.I Security"}})),l(".page-main .center",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Redemption Center"}})),l(".page-main .access",()=>({events:"office_top_sub_item_btn",optional_params:{tab_name:"Access Enquiry"}})),l(".slide1-down a",t=>({events:{"slide1-down1":"office_pc_download_btn","slide1-down2":"office_epic_download_btn","slide1-down3":"office_appstore_download_btn","slide1-down4":"office_steam_download_btn","slide1-down5":"office_googleplaygames_download_btn","slide1-down6":"office_googleplay_download_btn"}[t.className]||""}))});const le='<iframe id="yt_v" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" title="Delta Force | Official "Genesis" Season Trailer" width="100%" height="100%" src="https://www.youtube-nocookie.com/embed/PPB6D2HNx1I?rel=0&autoplay=0&origin=https%3A%2F%2Fwww.playdeltaforce.com&enablejsapi=1&widgetid=1"></iframe>',re=function(){window.playVideo=function(){document.querySelector("#vplay-con").innerHTML=le,window.openDialog("vindex-play")},window.hideVideo=function(){document.querySelector("#vplay-con").innerHTML="",window.closeDialog()}},ce={Taiwan:158,Indonesia:360,Singapore:702,Malaysia:458,"the Philippines":608,Thailand:764,"Antigua and Barbuda":28,Aruba:533,Bahamas:44,Barbados:52,Belize:84,Bermuda:60,"British Virgin Islands":92,"Cayman Islands":136,"Costa Rica":188,Cuba:192,Dominica:212,"Dominican Republic":214,"El Salvador":222,Grenada:308,Guadeloupe:312,Guatemala:320,Haiti:332,Honduras:340,Jamaica:388,Mexico:484,Montserrat:500,Nicaragua:558,Panama:591,"Puerto Rico":630,"Saint Kitts and Nevis":659,"Saint Lucia":662,"French Saint Martin":534,"Trinidad and Tobago":780,"U.S. Virgin Islands":850,Argentina:32,Bolivia:68,Brazil:76,Chile:152,Colombia:170,Ecuador:218,"Falkland Islands":238,"Guiana (French)":254,Guyana:328,Paraguay:600,Peru:604,Suriname:740,Uruguay:858,Venezuela:862,Curacao:531,"Caribbean Netherlands":534,Anguilla:660,Martinique:474,"Saint Barthelemy":652,"Saint Pierre and Miquelon":666,"Saint Vincent and the Grenadines":670,"Turks and Caicos Islands":796,"Sint Maarten":534,Bonaire:535,"Sint Eustatius":539,Turkey:792,"Saudi Arabia":682,Algeria:12,Morocco:504,Tunisia:788,Egypt:818,Iraq:368,Oman:512,Kuwait:414,Libya:434,Jordan:400,"United Arab Emirates":784,Bahrain:48,Qatar:634,Lebanon:422},I=(t,e)=>{let n=String(t);for(;n.length<e;)n=`0${n}`;return n};async function ue(){try{const t=await B.queryMyRegion(),n=(Q!=="prod"?window.Cmssdk.getQuery("region"):"")||(t==null?void 0:t.region);if(Object.values(ce).map(a=>I(a,3)).includes(I(n,3)))return location.replace("https://df.garena.com"),!0}finally{return!1}}ue();const j=X(),_=location.pathname.match("/m.html");async function de(){let t=0;const e=await j.getPreRegUserCount();e.data&&e.data.reserve_number&&(t=e.data.reserve_number),U(t)}function U(t){$(".slide7_num p").text(t.toLocaleString());const e=[0,1e5,5e5,1e6,2e6,4e6,5e6,1e7,15e6],n=_?[0,7,20,32,45,58,70,84,97]:[0,9,21.2,33.5,45.8,58.2,70.4,82,92.6];let i=0;for(let a=e.length-1;a>=0;a--)if(t>=e[a]){if(i=n[a],a<e.length-1){const o=Math.floor((t-e[a])/(e[a+1]-e[a])*(n[a+1]-n[a]));i+=o}a===e.length-1&&(i=_?97:92.6);for(let o=0;o<a;o++)$(".slide7_line .prize_li")[o]&&$(".slide7_line .prize_li")[o].classList.add("on");break}$(".slide7-main .line").css(_?"height":"width",i+"%")}window.setReserveNum=U;let u=null;const c={total:0,perpage:20,page:0,totalPage:0};async function fe(){const t={column_name:Z,use_all:!0,all_label_name:"GENERAL",manager_type:"page",perpage:c.perpage,disable_use_default_language:!0};if(u=await j.getNewsManager(t),!u)return;await(u==null?void 0:u.setPage(0)),c.totalPage=u.total_page,_e(u),z(u,!0);const e=document.querySelector(".s2-list-load");e&&(c.totalPage<=1&&(e.style.display="none"),e.addEventListener("click",()=>{pe()}))}const A={en:"Read More",fr:"En savoir plus",es:"Saber m\xE1s",ru:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435",de:"Mehr erfahren",ar:"\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0642\u0631\u0627\u0621\u0629","zh-tw":"\u95B1\u8B80\u66F4\u591A","zh-cn":"\u9605\u8BFB\u66F4\u591A",th:"\u0E2D\u0E48\u0E32\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21",vi:"\u0110\u1ECDc th\xEAm",id:"Baca Lebih Lanjut",pt:"Saiba mais",ko:"\uC790\uC138\uD788\uBCF4\uAE30",ja:"\u3082\u3063\u3068\u898B\u308B",tr:"Daha Fazla",ms:"Baca Lagi"};async function _e(t){const e=document.querySelector(".slide2-list"),n=localStorage.getItem("lang")||"en",a=t.getNewsListHtml({get_template:o=>` <li> <a href="[link]" target="_blank"> <div class="slide2-bg-box"><img src="[cover]" alt=""></div> <div class="news-type sprites type1"></div> <p class="news-time">[date]</p> <p class="news-title">[title]</p> <p class="news-desc">${o.content_part}</p> <p class="news-more">${A[n]||A.en}</p> </a> </li> `,dateformat:"YYYY/MM/DD",href:"./detail.html"}).opt_list_dom_str_arr.slice(0,3);e.innerHTML=a.join("")}async function z(t,e=!1){const n=_?document.querySelector(".slide2-main ul.slide2-item-list"):document.querySelector(".slide2-news-list ul");e&&(n.innerHTML="");const i=(window==null?void 0:window.GLanguage[localStorage.getItem("lang")||"en"])||{},o=t.getNewsListHtml({get_template:s=>_?` <li class="slide2-news-item"> <a href="[link]" target="_blank"> <p class="title">[title]</p> <p class="time">[date]</p> </a> </li> `:` <li> <a href="[link]" target="_blank"> <div class="img-box"> <img src="[cover]" alt=""></div> <p class="type">${i.lang8}</p> <p class="title">[title]</p> <p class="desc">${s.content_part}</p> <p class="time">[date]</p> </a> </li> `,dateformat:"YYYY/MM/DD",href:_?"./m_detail.html":"./detail.html"}).opt_list_dom_str_arr||[];e?n.innerHTML=o.join(""):$(n).append(o.join(""))}async function pe(){const t=c.page+1;if(t>=0&&t<c.totalPage&&c.page!==t)c.page=t;else return;await u.setPage(c.page),c.page=u.current_page,console.log(c.page);const e=document.querySelector(".s2-list-load");e&&c.totalPage-c.page===1&&(e.style.display="none"),await z(u,!1),setTimeout(()=>{const n=_?document.querySelector(".slide2-main ul.slide2-item-list"):document.querySelector(".slide2-news-list ul");n.scrollTop=n.scrollTop+10})}async function ge(){de(),fe()}$(function(){ge(),re()});