"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _defineReactive=_interopRequireDefault(require("./define-reactive"));exports.__esModule=!0,exports.createUUid=createUUid,exports.extend=extend,exports.getElement=getElement,exports.getUrlParams=getUrlParams,exports.isDebugger=isDebugger,exports.randomString=randomString,exports.toArray=toArray,exports.toNumber=toNumber;function extend(a,b){return Object.setPrototypeOf(a,b),(0,_defineReactive.default)(a,{set(c,d,e){if(!Object.prototype.hasOwnProperty.call(a,d))return Reflect.set(b,d,e,b)}})}function toArray(a){return Array.isArray(a)?a:[a]}function getElement(a){if("string"==typeof a){const b=document.getElementById(a);return b}return a}function toNumber(a,b=0){return+a||b}function createUUid(){let a=16;const b=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],c=[];let d;for(a=a||b.length,d=0;d<32;d++)c[d]=b[0|Math.random()*a];return c.join("")}function randomString(a,b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let c="";for(let d=a;0<d;--d)c+=b[Math.floor(Math.random()*b.length)];return c}function getUrlParams(){const a=window.location.search.substring(1),b={};return a.split("&").forEach(a=>{const[c,d]=a.split("=");b[decodeURIComponent(c)]=decodeURIComponent(d)}),b}function isDebugger(){const a=getUrlParams();return a.debug}