/*! Built with http://stenciljs.com */
const{h:t}=window.webcomponents;import{b as e}from"./chunk-4bbd7b7f.js";import{I as n}from"./chunk-d3862f1e.js";var r=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function c(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(c,s)}u((r=r.apply(t,e||[])).next())})};class i{static arrayRemoveValue(t,e){return t.filter(function(t){return t!=e})}static arraySetUnique(t){let e={};for(let n=0;n<t.length;n++)e[t[n]]=!0;let n=[];for(let t in e)n.push(t);return n}static castToType(t){let e=t;return Number(e)&&"true"!==e&&"false"!==e&&(e=Number(e)),"0"===e&&(e=0),"true"===e&&(e=!0),"false"===e&&(e=!1),e}static copy(t){return JSON.parse(JSON.stringify(t))}static deepAssign(t,...e){if(!e.length)return t;const n=e.shift();return void 0===n?t:(i.isMergebleObject(t)&&i.isMergebleObject(n)&&Object.keys(n).forEach(function(e){i.isMergebleObject(n[e])?(t[e]||(t[e]={}),i.deepAssign(t[e],n[e])):t[e]=n[e]}),i.deepAssign(t,...e))}static fetchJson(t){return r(this,void 0,void 0,function*(){return yield(yield fetch(t).catch(t=>{console.error(t)})).json()})}static getGlobal(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}static getTimeStamp(t=null){return t?"string"==typeof t?Math.round(+new Date(t)/1e3):Math.round(+t/1e3):Math.round(+new Date/1e3)}static getUUID(){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:7&n|8).toString(16)})}static isBrowser(){return"undefined"!=typeof window}static isOnline(){return!("undefined"==typeof window||!window.navigator.onLine)}static isMergebleObject(t){return i.isObject(t)&&!Array.isArray(t)}static isObject(t){return null!==t&&"object"==typeof t}}var o=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function c(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(c,s)}u((r=r.apply(t,e||[])).next())})};class c{constructor(){this.base=n.instance}fetchJson(t){return o(this,void 0,void 0,function*(){return i.fetchJson(t)})}}export{c as a};