/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/aowubrowser@1.0.2/dist/BrowserLib.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.BrowserLib=e()}("undefined"!=typeof globalThis?globalThis:window,(function(){"use strict";var t=Function.prototype.call.bind(Array.prototype.slice);function e(t){return(t=t||"id")+"_"+Math.random().toString(36).slice(2)+Date.now().toString(36)}function n(t,e,n,r){t.removeEventListener(e,n,r||!1)}function r(){this._ev=Object.create(null)}function o(t,e,n){var r,o,i,u,a=(n=n||{}).headers||{},s=n.body,c=n.timeout||15e3,l=n.parse||"auto";return(r=function(r){var o={method:t,headers:a,body:s,signal:r,credentials:n.credentials||"same-origin"};return fetch(e,o)},o=c,i=new AbortController,u=setTimeout((function(){i.abort()}),o),Promise.race([r(i.signal),new Promise((function(t,e){setTimeout((function(){e(new Error("RequestTimeout "+o+"ms"))}),o)}))]).finally((function(){clearTimeout(u)}))).then((function(t){if(!t.ok)throw new Error("HTTP "+t.status+" "+t.statusText);if("raw"===l)return t;if("text"===l)return t.text();if("blob"===l)return t.blob();if("json"===l)return t.json();var e=(t.headers.get("content-type")||"").toLowerCase();return e.indexOf("application/json")>-1?t.json():e.indexOf("text/")>-1?t.text():t.blob()}))}r.prototype.on=function(t,e){return(this._ev[t]||(this._ev[t]=[])).push(e),this},r.prototype.off=function(t,e){if(!this._ev[t])return this;var n=this._ev[t].indexOf(e);return n>-1&&this._ev[t].splice(n,1),this},r.prototype.emit=function(e){for(var n=t(arguments,1),r=this._ev[e]||[],o=0;o<r.length;o++)try{r[o].apply(null,n)}catch(t){setTimeout((function(){throw t}))}return this},r.prototype.once=function(t,e){var n=this;return this.on(t,(function r(){n.off(t,r),e.apply(null,arguments)}))};var i={version:"1.0.0",$:function(t,e){return(e||document).querySelector(t)},$$:function(e,n){return t((n||document).querySelectorAll(e))},on:function(t,e,r,o){return t.addEventListener(e,r,o||!1),function(){n(t,e,r,o)}},off:n,addClass:function(t,e){t&&t.classList.add(e)},removeClass:function(t,e){t&&t.classList.remove(e)},toggleClass:function(t,e,n){t&&t.classList.toggle(e,n)},ready:function(t){"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t,{once:!0})},debounce:function(t,e){var n,r,o;return function(){r=arguments,o=this,clearTimeout(n),n=setTimeout((function(){t.apply(o,r)}),e||0)}},throttle:function(t,e){var n,r,o=!1;return function(){if(o)return n=arguments,void(r=this);o=!0,t.apply(this,arguments),setTimeout((function(){o=!1,n&&(t.apply(r,n),n=r=null)}),e||0)}},sleep:function(t){return new Promise((function(e){return setTimeout(e,t)}))},clamp:function(t,e,n){return Math.min(Math.max(t,e),n)},uid:e,once:function(t){var e,n=!1;return function(){return n||(n=!0,e=t.apply(this,arguments)),e}},formatTime:function(t){var e=Math.floor(t/1e3),n=Math.floor(e/3600),r=Math.floor(e%3600/60),o=e%60,i=function(t){return(t<10?"0":"")+t};return(n?i(n)+":":"")+i(r)+":"+i(o)},randomId:function(){return e("rand")},EventBus:function(){return new r},http:{get:function(t,e){return o("GET",t,e)},post:function(t,e,n){n=n||{};var r,i=Object.assign({"Content-Type":"application/json"},n.headers||{});return o("POST",t,Object.assign({},n,{headers:i,body:(r=e,"[object Object]"===Object.prototype.toString.call(r)||Array.isArray(e)?JSON.stringify(e):e)}))},request:o},storage:function(t){var e="__aowu__"+(t=t||"aowu")+"__";function n(){return Date.now()}function r(){try{return JSON.parse(localStorage.getItem(e)||"{}")}catch(t){return{}}}function o(t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){}}return{set:function(t,e,i){var u=r();u[t]={v:e,e:i?n()+i:0},o(u)},get:function(t,e){var i=r(),u=i[t];return u?u.e&&u.e<n()?(delete i[t],o(i),e):u.v:e},remove:function(t){var e=r();delete e[t],o(e)},clear:function(){o({})},keys:function(){return Object.keys(r())}}},tmpl:function(t,e){return t.replace(/{{\s*([\w$.]+)\s*}}/g,(function(t,n){for(var r=n.split("."),o=e,i=0;i<r.length;i++){if(null==o)return"";o=o[r[i]]}return null==o?"":String(o)}))},cssVars:function(t){var e=document.documentElement;Object.keys(t||{}).forEach((function(n){e.style.setProperty("--"+n,t[n])}))},setBackground:function(t,e){e=Object.assign({selector:"body",size:"cover",position:"center",repeat:"no-repeat",attach:"fixed",darkMask:0,mobileBlur:0},e||{});var n="function"==typeof t?t():t,r="aowu-bg-container",o=document.getElementById(r);o||((o=document.createElement("div")).id=r,o.style.position="fixed",o.style.inset="0",o.style.zIndex="-1",o.style.pointerEvents="none",document.body.appendChild(o)),o.style.backgroundImage='url("'+String(n).replace(/\"/g,'\\"')+'")',o.style.backgroundSize=e.size,o.style.backgroundPosition=e.position,o.style.backgroundRepeat=e.repeat,o.style.backgroundAttachment=e.attach;var i="aowu-bg-mask",u=document.getElementById(i);return u||((u=document.createElement("div")).id=i,o.appendChild(u)),u.style.position="absolute",u.style.inset="0",u.style.background="rgba(0,0,0,"+Math.min(Math.max(Number(e.darkMask)||0,0),1)+")",/Mobi|Android/i.test(navigator.userAgent)&&e.mobileBlur&&(o.style.filter="blur("+Number(e.mobileBlur)+"px)",o.style.transform="scale(1.02)",o.style.transformOrigin="center"),o}};return i}));
//# sourceMappingURL=/sm/093af17b6a8029ace32d0f7e6db6ce6abea2b6958b7ec4b3581d17fec1276384.map