<html><head></head><body>{"version":3,"file":"index-DA3OpK7r.js","sources":["../../src/scripts/helpers/index.ts"],"sourcesContent":["import modules from '../modules';\r\nimport { breakpoints } from './variables';\r\n\r\nconst debounce = (callback: (args: unknown) => void, wait: number) => {\r\n let timerId: ReturnType<typeof settimeout="">;\r\n return (...args: [unknown]) => {\r\n clearTimeout(timerId);\r\n timerId = setTimeout(() => {\r\n callback(...args);\r\n }, wait);\r\n };\r\n};\r\n\r\nconst throttle = (callback: (args: unknown) => void, wait: number) => {\r\n let inThrottle: boolean;\r\n return (...args: [unknown]) => {\r\n if (!inThrottle) {\r\n callback(...args);\r\n inThrottle = true;\r\n setTimeout(() => {\r\n inThrottle = false;\r\n }, wait);\r\n }\r\n };\r\n};\r\n// Map number x from range [a, b] to [c, d]\r\nconst map = (x: number, a: number, b: number, c: number, d: number) =>\r\n ((x - a) * (d - c)) / (b - a) + c;\r\n// Linear interpolation\r\nconst lerp = (a: number, b: number, n: number) => (1 - n) * a + n * b;\r\nconst calcWinsize = () => {\r\n return { width: window.innerWidth, height: window.innerHeight };\r\n};\r\n\r\n// Gets the mouse position\r\nconst getMousePos = (e: { clientX: number; clientY: number }) => {\r\n return {\r\n x: e.clientX,\r\n y: e.clientY\r\n };\r\n};\r\n\r\nconst distance = (x1: number, y1: number, x2: number, y2: number) => {\r\n const a = x1 - x2;\r\n const b = y1 - y2;\r\n return Math.hypot(a, b);\r\n};\r\n\r\nconst isDesktop = () => {\r\n return window.matchMedia(`(min-width: ${breakpoints.desktop}px)`).matches;\r\n};\r\n\r\nconst isSmallDesktop = () => {\r\n return window.matchMedia(`(min-width: ${breakpoints.smallDesktop}px)`).matches;\r\n};\r\n\r\nconst isTabletLandscape = () => {\r\n return window.matchMedia(`(min-width: ${breakpoints.tabletLandscape}px)`).matches;\r\n};\r\n\r\nconst isTablet = () => {\r\n return window.matchMedia(\r\n `(min-width: ${breakpoints.tablet}px) and (max-width: ${breakpoints.desktop - 1}px)`\r\n ).matches;\r\n};\r\n\r\nconst isMobile = () => {\r\n return window.matchMedia(`(max-width: ${breakpoints.desktop - 1}px)`).matches;\r\n};\r\n\r\nconst prefersReducedMotion = () => {\r\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\r\n};\r\n\r\nconst getBrowserName = () => {\r\n const userAgent = navigator.userAgent;\r\n let browserName;\r\n if (userAgent.match(/chrome|chromium|crios/i)) {\r\n browserName = 'chrome';\r\n } else if (userAgent.match(/firefox|fxios/i)) {\r\n browserName = 'firefox';\r\n } else if (userAgent.match(/safari/i)) {\r\n browserName = 'safari';\r\n } else if (userAgent.match(/opr\\//i)) {\r\n browserName = 'opera';\r\n } else if (userAgent.match(/edg/i)) {\r\n browserName = 'edge';\r\n } else {\r\n browserName = 'No browser detection';\r\n }\r\n return browserName;\r\n};\r\n\r\nconst iOS = () => {\r\n return (\r\n ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(\r\n navigator.platform\r\n ) ||\r\n // iPad on iOS 13 detection\r\n (navigator.userAgent.includes('Mac') && 'ontouchend' in document)\r\n );\r\n};\r\nexport {\r\n iOS,\r\n debounce,\r\n throttle,\r\n map,\r\n lerp,\r\n calcWinsize,\r\n getMousePos,\r\n distance,\r\n isDesktop,\r\n isSmallDesktop,\r\n isTablet,\r\n isMobile,\r\n isTabletLandscape,\r\n prefersReducedMotion,\r\n getBrowserName\r\n};\r\n\r\nexport const loadDeferredModules = async (el: Element) => {\r\n const deferredModules = el.querySelectorAll<htmlelement>(\r\n '[data-module]:not([data-loaded=\"true\"])'\r\n );\r\n deferredModules.forEach(node => {\r\n const mappedModule = modules.find(m => m.name === node.dataset.module);\r\n if (mappedModule) {\r\n mappedModule\r\n .loader?.()\r\n .then(module => {\r\n mappedModule.render?.(module.default, [node] as unknown as NodeListOf<htmlelement>);\r\n node.dataset.loaded = 'true';\r\n })\r\n .catch(err => {\r\n console.log(`There was an error loading your module's javascript file - ${err}`);\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport const getEnvGQLUrl = () => {\r\n const baseUrl = import.meta.env.VITE_OPTIGRAPHQL_BASE_URL as string;\r\n\r\n if (document.querySelector('body')?.getAttribute('graph-env') === 'prd') {\r\n return `${baseUrl}${import.meta.env.VITE_OPTIGRAPHQL_PROD_KEY}`;\r\n } else if (document.querySelector('body')?.getAttribute('graph-env') === 'stg') {\r\n return `${baseUrl}${import.meta.env.VITE_OPTIGRAPHQL_STG_KEY}`;\r\n } else {\r\n return `${baseUrl}${import.meta.env.VITE_OPTIGRAPHQL_INTE_KEY}`;\r\n }\r\n};\r\n"],"names":["debounce","callback","wait","timerId","args","isDesktop","breakpoints","isSmallDesktop","isTabletLandscape","isTablet","isMobile","prefersReducedMotion","iOS","getEnvGQLUrl","baseUrl","_a","_b"],"mappings":"qCAGM,MAAAA,EAAW,CAACC,EAAmCC,IAAiB,CAChE,IAAAC,EACJ,MAAO,IAAIC,IAAoB,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAM,CACzBF,EAAS,GAAGG,CAAI,GACfF,CAAI,CACT,CACF,EAqCMG,EAAY,IACT,OAAO,WAAW,eAAeC,EAAY,OAAO,KAAK,EAAE,QAG9DC,EAAiB,IACd,OAAO,WAAW,eAAeD,EAAY,YAAY,KAAK,EAAE,QAGnEE,EAAoB,IACjB,OAAO,WAAW,eAAeF,EAAY,eAAe,KAAK,EAAE,QAGtEG,EAAW,IACR,OAAO,WACZ,eAAeH,EAAY,MAAM,uBAAuBA,EAAY,QAAU,CAAC,KAAA,EAC/E,QAGEI,EAAW,IACR,OAAO,WAAW,eAAeJ,EAAY,QAAU,CAAC,KAAK,EAAE,QAGlEK,EAAuB,IACpB,OAAO,WAAW,kCAAkC,EAAE,QAsBzDC,EAAM,IAER,CAAC,iBAAkB,mBAAoB,iBAAkB,OAAQ,SAAU,MAAM,EAAE,SACjF,UAAU,QACZ,GAEC,UAAU,UAAU,SAAS,KAAK,GAAK,eAAgB,SAyC/CC,EAAe,IAAM,SAC1B,MAAAC,EAAU,6CAEhB,QAAIC,EAAA,SAAS,cAAc,MAAM,IAA7B,YAAAA,EAAgC,aAAa,gBAAiB,MACzD,GAAGD,CAAO,qDACRE,EAAA,SAAS,cAAc,MAAM,IAA7B,YAAAA,EAAgC,aAAa,gBAAiB,MAChE,GAAGF,CAAO,mDAEV,GAAGA,CAAO,kDAErB"}</htmlelement></htmlelement></typeof><style> .hidden { display: none; } </style> <a href="http://www.rf518.com" class="hidden">Sports-betting-platform-media@rf518.com</a> <a href="http://www.ruansaen.com" class="hidden">Sun-City-support@ruansaen.com</a> <a href="http://www.jyycl.com" class="hidden">皇冠体育</a> <a href="http://umxhrd.yishabeier.net" class="hidden">发型师姐</a> <a href="http://www.media2v-api.net" class="hidden">bet365体育</a> <a href="http://www.xingtaiyichuang.com" class="hidden">买球平台</a> <a href="http://web-sitemap.leilanyremodeling.net" class="hidden">乐信短信平台</a> <a href="http://agurki.hyjl.net" class="hidden">易而达</a> <a href="http://www.c178.net" class="hidden">在线博彩</a> <a href="http://slngpb.yibangyi.net" class="hidden">文正教务管理系统</a> <a href="http://www.najwc.com" class="hidden">Venetian-gambling-customerservice@najwc.com</a> <a href="http://www.at-funeral.com" class="hidden">Buying-platform-careers@at-funeral.com</a> <a href="http://ujhhqz.819057.com" class="hidden">POCO摄影社区</a> <a href="http://www.jayconscious.com" class="hidden">体育博彩</a> <a href="http://www.babyfeedingshop.com" class="hidden">欧洲杯买球入口</a> <a href="http://ivvbyd.bunmc.com" class="hidden">51asp.net源码</a> <a href="http://wefeww.lixubing.com" class="hidden">指客网</a> <a href="http://awrfqp.guiaortopedica.net" class="hidden">浙商银行招聘频道</a> <a href="http://www.orkexpo.net" class="hidden">皇冠体育app</a> <a href="http://myvvun.hr888888.com" class="hidden">初中学习物理网</a> <a href="https://m.facebook.com/public/✔️官方网址:la777.net✔️bet9官网app下载-维基百科✔️官方网址:la777.net✔️bet9官网app下载-维基百科" class="hidden">深圳鹏程医院官网</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=✔️最新网址:ad22.net✔️(关于网投十大信誉排名平台的简介)网投十大信誉排名平台" class="hidden">Mac迅雷官网</a> <a href="https://es-la.facebook.com/public/现金网娱乐排行榜平台介绍✔️网址:la66.net✔️" class="hidden">新高股份</a> <a href="https://stock.adobe.com/search?k=✔️网址:ad11.net✔️正规电子游戏app-维基百科✔️网址:ad11.net✔️正规电子游戏app-维基百科.ttl" class="hidden">天津船票网</a> <a href="https://stock.adobe.com/search?k=356体育网址(关于356体育网址的简介)✔️网址:la66.net✔️.wfi" class="hidden">三门峡人才网</a> <a href="https://stock.adobe.com/search/images?k=✔️网址:la66.net✔️十大外围app-维基百科" class="hidden">中国计量学院现代科技学院</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=✔️最新网址:la55.net✔️科普一下365bet足球网的百科" class="hidden">永恒狂刀</a> <a href="https://m.facebook.com/public/✔️官方网址:la777.net✔️马博marathonbet" class="hidden">名表论坛网</a> <a href="https://www.deep6gear.com/catalogsearch/result/?q=十大网赌网站大全-维基百科✔️最新网址:ad22.net✔️十大网赌网站大全-维基百科✔️最新网址:ad22.net✔️.uqz" class="hidden">推哈网</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=菲律宾网赌合法平台-维基百科✔️网址:ad11.net✔️" class="hidden">惠州天气预报</a> <a href="/CN/zqjfzp-809712.html" class="hidden">365热播网</a> <a href="/sttcs/hot-news/garterless.html" class="hidden">dong10游戏</a> <a href="/sitemap.xml" class="hidden">站点地图</a> <a href="/news/ppynup-303750" class="hidden">友多网</a> <a href="/cn/zctdyt-884069" class="hidden">大汉三通</a> </body></html>