/*! Built with http://stenciljs.com */
const{h:e}=window.webcomponents;var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},n=function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function c(e){try{s(o.next(e))}catch(e){i(e)}}function a(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(c,a)}s((o=o.apply(e,t||[])).next())})};class o{static copy(e){return JSON.parse(JSON.stringify(e))}static castToType(e){let t=e;return Number(t)&&"true"!==t&&"false"!==t&&(t=Number(t)),"0"===t&&(t=0),"true"===t&&(t=!0),"false"===t&&(t=!1),t}static deepAssign(e,...t){if(!t.length)return e;const n=t.shift();return void 0===n?e:(o.isMergebleObject(e)&&o.isMergebleObject(n)&&Object.keys(n).forEach(function(t){o.isMergebleObject(n[t])?(e[t]||(e[t]={}),o.deepAssign(e[t],n[t])):e[t]=n[t]}),o.deepAssign(e,...t))}static fetchJson(e){return n(this,void 0,void 0,function*(){return yield(yield fetch(e).catch(e=>{console.error(e)})).json()})}static getTimeStamp(e=null){return e?"string"==typeof e?Math.round(+new Date(e)/1e3):Math.round(+e/1e3):Math.round(+new Date/1e3)}static getGlobal(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}static isOnline(){return!("undefined"==typeof window||!window.navigator.onLine)}static isBrowser(){return"undefined"!=typeof window}static getUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:7&n|8).toString(16)})}static copyToClipboard(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);t.select(),document.execCommand("copy"),document.body.removeChild(t),n&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n))}static isObject(e){return null!==e&&"object"==typeof e}static isMergebleObject(e){return o.isObject(e)&&!Array.isArray(e)}}export{o as a,t as b};