!function(){var o="63108422-ae8d-41df-ad9b-24498d47ce57",t=document.location.href,e=document.location.host,n=e.split(".");function a(t,e,n){e=new RegExp("^https?://"+e,"i");return 0!==t.length&&!(n||!t.match(e))}(4==n.length||3==n.length&&3 cross
',document.getElementsByTagName("body")[0].insertAdjacentElement("beforeend",n),(n=document.createElement("iframe")).id="pg-modal-content",JSON.parse("false")?F.getSeconds()%2==0?n.src=`https://cdn.chichat.tw/clients/63108422-ae8d-41df-ad9b-24498d47ce57/public/static/banner_a.html?action=${e}&imageName=None`:n.src=`https://cdn.chichat.tw/clients/63108422-ae8d-41df-ad9b-24498d47ce57/public/static/banner_b.html?action=${e}&imageName=None`:n.src=`https://cdn.chichat.tw/clients/63108422-ae8d-41df-ad9b-24498d47ce57/public/static/banner.html?action=${e}&imageName=%E5%8F%B0%E7%81%A3%E7%A7%9F%E5%80%9Fwifi_popup_230117.gif`,n.scrolling="no",n.frameBorder="0",n.marginWidth="0",n.marginHeight="0",document.getElementById("pg-modal__content").insertAdjacentElement("beforeend",n)}p(),document.getElementById("pg-modal__close").addEventListener("click",function(){document.getElementById("pg-modal").remove()},!1),r=!0,s=!0}function V(){const e=document.body.scrollHeight*Number("2.0");let n=!1;function o(t){window.scrollY>=e&&!n&&(t.preventDefault(),_0||s||r||q||(c("scroll"),window.removeEventListener("scroll",o)),n=!0)}window.addEventListener("scroll",o,!1)}if(JSON.parse("false")&&("48089029-eb6c-40d3-bbef-843ec6e52433"===o?document.addEventListener("DOMContentLoaded",function(){V()}):V()),JSON.parse("true")){let t=!1;function G(){setTimeout(()=>{document.hidden&&!t&&(_0||s||r||D||(c("visibility"),window.removeEventListener("visibilitychange",G)),t=!0)},0)}document.addEventListener("visibilitychange",G,!1)}var R=60*Number("60");function p(){document.cookie=`pgmodal2=true; max-age=${R}; path=/; Secure`}var F=new Date,U="defaultSize";var s=!1;function W(){_0||s||r||J||c("wait")}var X,K,Q=JSON.parse("true"),Z=Number("15000");function m(){Q&&(clearInterval(X),X=setInterval(W,Z))}function h(t,e,n=3e3){setInterval(function(){t()&&(e(),console.log("condition fulfilled, clear"))},n)}function t0(){var t=document.querySelector("iframe");return!!t&&!!(t.contentDocument||t.contentWindow.document).querySelector(".chamo-main-customer")}Q&&(X=setInterval(W,Z)),"0f6579ed-f3c8-4dcd-b21d-cccd04e25e06"!==o&&"b0d822d7-8346-4015-a629-c15751efe261"!==o||h(function(){var t=document.querySelector(".wc-webchat-ctn");return t&&"open"===t.getAttribute("status")},m),"455d4413-35f0-403b-bced-da8add47dc90"===o&&h(function(){var t=document.getElementById("__cho_div");return t&&"cho_elm_show"===window.getComputedStyle(t).animationName},m),"94f0a845-2421-4ad9-bc47-e745757d8d53"===o&&h(function(){return"#chatform"===window.location.hash},m),"1429ad9b-29b0-4edc-b123-de663402d9be"===o&&h(function(){var t=document.querySelector('iframe[title="YouTube video player"]');return t?0<=(t=t.getBoundingClientRect()).top&&t.bottom<=window.innerHeight:(console.log("iframe not found"),!1)},m),"1b4ebbd9-d21a-469f-9568-6be948d3ae85"===o&&h(t0,m),"1b4ebbd9-d21a-469f-9568-6be948d3ae85"===o&&h(t0,m),"1b4ebbd9-d21a-469f-9568-6be948d3ae85"===o&&h(t0,m),"f61622da-c71f-4ef9-8c76-71286617b8ef"!==o&&"5c7c153e-9b28-4242-9b62-96130d5ae0a7"!==o||h(function(){return!!document.querySelector("div#smart-dialog.chat-running")},m),"b434780b-56a7-4be4-b515-9892e98a24e6"===o&&(K=navigator.userAgent,["CriOS","FxiOS","EdgiOS","SamsungBrowser","Mobile Safari","Chrome","Firefox","Edge","Opera"].some(t=>K.includes(t))||(p(),r=!0)),"750e838b-a1dd-4211-aaa6-a45f053a561f"===o&&document.getElementById("pg-modal-content").addEventListener("click",function(){window.parent.postMessage("elementClicked","*")}),"5de2da83-43f5-40ce-83fd-2aaf08d5d15f"===o&&h(function(){if(document.querySelector("#smart-dialog").classList.contains("chat-running"))return 1},m);var g=0,u=0,f=0,e0=0,n0=0,o0=0,a0=0,i0=0,d0=0,r0=0,l0=0,c0=0,p0=0,s0=0,m0=0,h0=0,g0=0,u0=0,f0=0,x0=0,b0=0,v0=0,w0=location.pathname,i=location.search,x=(w0+=i,window.pageYOffset),_0=!1;function k0(){var t=window.pageYOffset;0