!function(){window.asus=window.asus||{},asus=asus||{},window.dataLayer=window.dataLayer||[];const e=window.AsusAPIConfig?window.AsusAPIConfig.websitePath.toLowerCase():"global",t=window.AsusAPIConfig?window.AsusAPIConfig.system:"asus";let n="https://www.asus.com/geo/",o="https://odinapi.asus.com/",i="https://odinapi.asus.com/";const s=["il","eg","me-ar","nafr-ar","sa-ar"];let r=!1;const a=function(){"asus"!==t&&"proart"!==t&&"commercial"!==t||"cn"!==e?"rog"===t&&"cn"===e?(n="https://geo.asus.com/rogcngeo/",o="https://odinapi.asus.com.cn/"):"rog"===t?n="https://rog.asus.com/geo/":"iot"===t&&"cn"===e?(n="https://geo.asus.com/iotcngeo/",o="https://odinapi.asus.com.cn/",i="https://api-iot.asus.com.cn/"):"iot"===t?(n="https://geo.asus.com/iot/",i="https://api-iot.asus.com/"):"healthcare"===t&&"cn"===e?(n="https://geo.asus.com/healthcarecngeo/",o="https://odinapi.asus.com.cn/",i="https://api-healthcare.asus.com.cn/"):"healthcare"===t?(n="https://geo.asus.com/healthcare/",i="https://api-healthcare.asus.com/"):"proart"===t&&(i="https://api-proart.asus.com/"):(n=window.location.host.indexOf("w3.asus.com.cn")>-1?"https://geo.asus.com/w3cngeo/":"https://geo.asus.com/wwwcngeo/",o="https://odinapi.asus.com.cn/","proart"===t&&(i="https://api-proart.asus.com.cn/"));const a=function(n){fetch(n,{method:"GET"}).then((e=>e.json())).then((n=>{if(n){const i=sessionStorage.getItem("locationReminder");var o=n.Result.GeoWebsiteCode;if(void 0!==o){const a=-1!==e.indexOf("-")?e.split("-")[0]:e,c=-1!==o.indexOf("-")?o.split("-")[0]:o;r=c.includes(s),c!==a&&null===i&&function(n){d({event:"data_layer_event",event_name_ga4:"display_location_reminder_banner",event_category_DL:"location_reminder_banner",event_action_DL:"displayed",event_label_DL:`current_${n.currentWebsiteCode}_suggestion_${n.reminderWebsiteCode}`});let o="";"asus"!==t&&"commercial"!==t&&(o="_"+t);const i=document.getElementsByTagName("head")[0],s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.href="cn"!==e?`https://dlcdnimgs.asus.com/vendor/location-reminder/css/locationreminder${o}.css`:`https://www.asus.com.cn/vendor/location-reminder/css/locationreminder${o}.css`;s.media="all",i.appendChild(s);const a="yes"===sessionStorage.getItem("locationReminder");""!=a&&null!=a&&"Yes"==a||(c=window,l=document,u="script",m="https://www.google-analytics.com/analytics.js",h="ga",c.GoogleAnalyticsObject=h,c[h]=c[h]||function(){(c[h].q=c[h].q||[]).push(arguments)},c[h].l=1*new Date,g=l.createElement(u),w=l.getElementsByTagName(u)[0],g.async=1,g.src=m,w.parentNode.insertBefore(g,w));var c,l,u,m,h,g,w;let p="";const _=""!==n.currentReminder?"

"+n.currentReminder+"

":"";p="
"+_+"

"+n.geoReminder+"

",s.onload=function(){function e(){sessionStorage.setItem("locationReminder","yes"),document.querySelector("#reminder-info").remove(),d({event:"data_layer_event",event_name_ga4:"stay_location_reminder_banner",event_category_DL:"location_reminder_banner",event_action_DL:"clicked",event_label_DL:`current_${n.currentWebsiteCode}_suggestion_${n.reminderWebsiteCode}_stay`})}window.AsusAPIConfig&&window.AsusAPIConfig.reminderHold?document.addEventListener("DOMContentLoaded",window.insertLocationReminder(p)):window.insertLocationReminder(p),document.querySelector("#stayButton").addEventListener("click",e),document.querySelector("#reminderIconClose").addEventListener("click",e),document.querySelector("#switchButton").addEventListener("click",(function(e){window.AsusAPIConfig.reminder(n.reminderWebsiteCode).then((e=>window.location.href=e.reminderURL)),d({event:"data_layer_event",event_name_ga4:"redirect_location_reminder_banner",event_category_DL:"location_reminder_banner",event_action_DL:"clicked",event_label_DL:`current_${n.currentWebsiteCode}_suggestion_${n.reminderWebsiteCode}_redirect`})}))}}({currentButton:n.Result.CurrentButton,currentReminder:n.Result.CurrentReminder,geoButton:n.Result.GeoButton,geoReminder:n.Result.GeoReminder,currentWebsiteCode:a,reminderWebsiteCode:n.Result.GeoWebsiteCode})}}}))};fetch(n).then((n=>{if(n){const r=[...n.headers];let c=location.host.match(/^(dev|stage)/)?"tw":"";for(var s=0;se.json())).then((e=>{void 0!==e.result&&e.result.websites[0].list.length>0&&a(d)}));else if("commercial"===t||"iot"===t||"healthcare"===t){let e="";"commercial"===t?e=r:"iot"===t?e=n:"healthcare"===t&&(e=s),fetch(e,{method:"GET"}).then((e=>e.json())).then((e=>{void 0!==e.Result&&e.Result.isGeoExists&&a(d)}))}else a(d)}}}))};function c(e){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild}function d(e){window.innerWidth<=1023?setTimeout((()=>{dataLayer.push(e)}),200):dataLayer.push(e)}document.querySelector("body")?a():document.addEventListener("DOMContentLoaded",a),window.insertLocationReminder=function(e){null===document.getElementById("locationReminder")&&(window.AsusAPIConfig&&window.AsusAPIConfig.reminderElement&&window.AsusAPIConfig.reminderElement!=document.body?window.AsusAPIConfig.reminderElement.insertBefore(c(e),window.AsusAPIConfig.reminderElement.firstChild):document.querySelector("#cookie-policy-info")?document.querySelector("#cookie-policy-info").insertAdjacentElement("afterend",c(e)):document.querySelector("body").insertBefore(c(e),document.querySelector("body").firstChild))}}();