New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@schukai/monster

Package Overview
Dependencies
Maintainers
1
Versions
333
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schukai/monster - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

dist/modules/math/namespace.js

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1000000000;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){const crypt=global["crypto"]||global["msCrypto"];if(!crypt){throw new Error("missing crypt")}let rval=0;const range=max-min;if(range<2){return min}const bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}const bytesNeeded=Math.ceil(bitsNeeded/8);const mask=Math.pow(2,bitsNeeded)-1;const byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);let p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}Monster.assignToNamespace("Monster.Math",random);export{Monster,random};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"./namespace.js";import"./types/id.js";import"./types/is.js";import"./types/object.js";import"./types/version.js";import"./types/observer.js";import"./types/observerlist.js";import"./types/validate.js";import"./math/random.js";import"./util/clone.js";import"./util/freeze.js";Monster.Util.deepFreeze(Monster);export{Monster};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';class Namespace{constructor(namespace){if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}getNamespace(){return this.namespace}toString(){return this.getNamespace()}}export const Monster=new Namespace("Monster");assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns,...obj){let current=namespaceFor(ns.split("."));for(let i=0,l=obj.length;i<l;i++){current[objectName(obj[i])]=obj[i]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){let s=fn.toString();let f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}let c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(let i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}export{assignToNamespace};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";import"../types/object.js";let internalCounter=0;class ID extends Monster.Types.Object{constructor(){super();internalCounter+=1;this.id=global.btoa(Monster.Math.random(1,10000)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter}toString(){return this.id}}Monster.assignToNamespace("Monster.Types",ID);export{Monster,ID};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";function isPrimitive(value){var type;if(value===undefined||value===null){return true}type=typeof value;if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="object"){return true}return false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction);export{Monster,isPrimitive,isBoolean,isString,isObject,isArray,isFunction};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";class Object{constructor(){}toString(){return JSON.stringify(this)}}Monster.assignToNamespace("Monster.Types",Object);export{Monster,Object};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class Observer extends Monster.Types.Object{constructor(callback,...args){super();if(typeof callback!=="function"){throw new Error("observer callback must be a function")}this.callback=callback;this.arguments=args;this.tags=new Set}addTag(tag){this.tags.add(tag);return this}removeTag(tag){this.tags.delete(tag);return this}getTags(){return this.tags}hasTag(tag){return this.tags.has(tag)}update(subject){let self=this;return new Promise(function(resolve,reject){if(!(subject instanceof Object)){reject("subject must be an object")}let result=self.callback.apply(subject,self.arguments);resolve(result)})}}Monster.assignToNamespace("Monster.Types",Observer);export{Monster,Observer};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class ObserverList extends Monster.Types.Object{constructor(){super();this.observers=[]}attach(observer){checkIsObserver(observer);this.observers.push(observer);return this}detach(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}contains(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}notify(subject){let pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}function checkIsObserver(observer){if(!(observer instanceof Monster.Types.Observer)){throw new Error("argument must be instance of observer")}return true}Monster.assignToNamespace("Monster.Types",ObserverList);export{Monster,ObserverList};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";function validatePrimitive(value){if(!Monster.Types.isPrimitive(value)){throw new TypeError("value is not a primitive")}}function validateBoolean(value){if(!Monster.Types.isBoolean(value)){throw new TypeError("value is not a boolean")}}function validateString(value){if(!Monster.Types.isString(value)){throw new TypeError("value is not a string")}}function validateObject(value){if(!Monster.Types.isObject(value)){throw new TypeError("value is not a object")}}function validateArray(value){if(!Monster.Types.isArray(value)){throw new TypeError("value is not not a array")}}function validateFunction(value){if(!Monster.Types.isFunction(value)){throw new TypeError("value is not a function")}}Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction);export{Monster,validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class Version extends Monster.Types.Object{constructor(major,minor,patch){super();if(typeof major==="string"&&minor===undefined&&patch===undefined){let parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}this.major=parseInt(major);this.minor=parseInt(minor);this.patch=parseInt(patch);if(isNaN(this.major)){throw new Error("major is not a number")}if(isNaN(this.minor)){throw new Error("minor is not a number")}if(isNaN(this.patch)){throw new Error("patch is not a number")}}toString(){return this.major+"."+this.minor+"."+this.patch}compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}let a=[this.major,this.minor,this.patch];let b=version.split(".");let len=Math.max(a.length,b.length);for(let i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}Monster.assignToNamespace("Monster.Types",Version);let monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.0.12");return monsterVersion}Monster.assignToNamespace("Monster",getVersion);export{Monster,Version,getVersion};
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";import"../types/object.js";class Version extends Monster.Types.Object{constructor(major,minor,patch){super();if(typeof major==="string"&&minor===undefined&&patch===undefined){let parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}this.major=parseInt(major);this.minor=parseInt(minor);this.patch=parseInt(patch);if(isNaN(this.major)){throw new Error("major is not a number")}if(isNaN(this.minor)){throw new Error("minor is not a number")}if(isNaN(this.patch)){throw new Error("patch is not a number")}}toString(){return this.major+"."+this.minor+"."+this.patch}compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}let a=[this.major,this.minor,this.patch];let b=version.split(".");let len=Math.max(a.length,b.length);for(let i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}Monster.assignToNamespace("Monster.Types",Version);let monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.0.13");return monsterVersion}Monster.assignToNamespace("Monster",getVersion);export{Monster,Version,getVersion};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";function clone(obj){var copy;if(null===obj||"object"!==typeof obj){return obj}if(obj instanceof Date){copy=new Date;copy.setTime(obj.getTime());return copy}if(Array.isArray(obj)){copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if(obj instanceof Element||obj instanceof HTMLDocument||obj instanceof DocumentFragment){return obj}if(obj instanceof Proxy){return obj}if(obj===globalContext||obj===window||obj===document||obj===navigator||obj===JSON){return obj}if(obj instanceof Object){if(typeof obj.hasOwnProperty("getClone")&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(let key in obj){if(!obj.hasOwnProperty(key)){continue}if(Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}throw new Error("unable to clone obj! its type isn't supported.")}Monster.assignToNamespace("Monster.Util",clone);export{Monster,clone};
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";function clone(obj){var copy;if(null===obj||"object"!==typeof obj){return obj}if(obj instanceof Date){copy=new Date;copy.setTime(obj.getTime());return copy}if(Array.isArray(obj)){copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if(obj instanceof Element||obj instanceof HTMLDocument||obj instanceof DocumentFragment){return obj}if(obj===globalContext||obj===window||obj===document||obj===navigator||obj===JSON){return obj}if(isObject(obj)&&obj instanceof Object){if(obj instanceof Proxy){return obj}if(typeof obj.hasOwnProperty("getClone")&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(let key in obj){if(!obj.hasOwnProperty(key)){continue}if(Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}throw new Error("unable to clone obj! its type isn't supported.")}Monster.assignToNamespace("Monster.Util",clone);export{Monster,clone};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';import{Monster}from"../namespace.js";import{validateObject}from"../types/validate.js";function deepFreeze(object){validateObject(object);var propNames=Object.getOwnPropertyNames(object);for(let name of propNames){let value=object[name];object[name]=value&&typeof value==="object"?deepFreeze(value):value}return Object.freeze(object)}Monster.assignToNamespace("Monster.Util",deepFreeze);export{Monster,deepFreeze};

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
'use strict';

@@ -28,3 +28,3 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/math/random.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/math/random.js';
* console.log(Monster.Math.random(1,10)) // ↦ 5

@@ -38,3 +38,3 @@ * </script>

* <script type="module">
* import {random} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/math/random.js';
* import {random} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/math/random.js';
* console.log(random(1,10)) // ↦ 5

@@ -256,24 +256,20 @@ * </script>

/**
* To create your own namespace, just call the method `Monster.assignToNamespace('my.name.space', {})`.
* To expand monster, the `Monster.assignToNamespace()` method can be used.
*
* This will then open an object tree my.name.space. Note that the Monster namespace is protected.
* you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.
*
* To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.
*
* you can call the method via the monster namespace `Monster.Types.isString()`.
*
* ```
* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/namespace.js';
* console.log(Monster.Types.assignToNamespace("Monster.Misc",{}))
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/namespace.js';
* function hello() {
* console.log('Hello World!');
* }
* Monster.assignToNamespace("Monster.X",hello)
* Monster.X.hello(); // ↦ Hello World!
* </script>
*
* ```
*
* Alternatively, you can also integrate this function individually.
*
* ```
* <script type="module">
* import {assignToNamespace} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/namespace.js';
* console.log(assignToNamespace("Monster.Misc",{}))
* </script>
* ```
*
* @param ns

@@ -410,3 +406,3 @@ * @param obj

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/id.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/id.js';
* console.log(new Monster.Types.ID())

@@ -421,3 +417,3 @@ * console.log(new Monster.Types.ID())

* <script type="module">
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/id.js';
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/id.js';
* console.log(new ID())

@@ -501,3 +497,3 @@ * console.log(new ID())

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isPrimitive('2')) // ↦ false

@@ -512,3 +508,3 @@ * console.log(Monster.Types.isPrimitive([])) // ↦ true

* <script type="module">
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isPrimitive('2')) // ↦ true

@@ -548,3 +544,3 @@ * console.log(isPrimitive([])) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isBoolean('2')) // ↦ false

@@ -559,3 +555,3 @@ * console.log(Monster.Types.isBoolean([])) // ↦ true

* <script type="module">
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isBoolean('2')) // ↦ true

@@ -589,3 +585,3 @@ * console.log(isBoolean([])) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isString('2')) // ↦ false

@@ -600,3 +596,3 @@ * console.log(Monster.Types.isString([])) // ↦ true

* <script type="module">
* import {isString} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isString} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isString('2')) // ↦ false

@@ -630,3 +626,3 @@ * console.log(isString([])) // ↦ true

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isObject('2')) // ↦ false

@@ -641,3 +637,3 @@ * console.log(Monster.Types.isObject([])) // ↦ false

* <script type="module">
* import {isObject} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isObject} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isObject('2')) // ↦ true

@@ -674,3 +670,3 @@ * console.log(isObject([])) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isArray('2')) // ↦ true

@@ -685,3 +681,3 @@ * console.log(Monster.Types.isArray([])) // ↦ false

* <script type="module">
* import {isArray} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isArray} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isArray('2')) // ↦ false

@@ -715,3 +711,3 @@ * console.log(isArray([])) // ↦ true

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isFunction(()=>{})) // ↦ true

@@ -727,3 +723,3 @@ * console.log(Monster.Types.isFunction('2')) // ↦ false

* <script type="module">
* import {isFunction} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isFunction} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isFunction(()=>{})) // ↦ true

@@ -789,3 +785,3 @@ * console.log(isFunction('2')) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/object.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/object.js';
* console.log(new Monster.Types.Object())

@@ -800,3 +796,3 @@ * console.log(new Monster.Types.Object())

* <script type="module">
* import {Object} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/object.js';
* import {Object} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/object.js';
* console.log(new Object())

@@ -889,3 +885,3 @@ * console.log(new Object())

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observer.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observer.js';
* console.log(new Monster.Types.Observer())

@@ -900,3 +896,3 @@ * console.log(new Monster.Types.Observer())

* <script type="module">
* import {Observer} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observer.js';
* import {Observer} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observer.js';
* console.log(Observer())

@@ -1033,3 +1029,3 @@ * console.log(Observer())

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observerlist.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observerlist.js';
* console.log(new Monster.Types.ObserverList())

@@ -1044,3 +1040,3 @@ * console.log(new Monster.Types.ObserverList())

* <script type="module">
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observerlist.js';
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observerlist.js';
* console.log(ObserverList())

@@ -1176,3 +1172,3 @@ * console.log(ObserverList())

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validatePrimitive('2')) // ↦ TypeError

@@ -1187,3 +1183,3 @@ * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError

* <script type="module">
* import {validatePrimitive} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validatePrimitive} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validatePrimitive('2')) // ↦ TypeError

@@ -1217,3 +1213,3 @@ * console.log(validatePrimitive([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError

@@ -1228,3 +1224,3 @@ * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError

* <script type="module">
* import {validateBoolean} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateBoolean} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateBoolean('2')) // ↦ TypeError

@@ -1257,3 +1253,3 @@ * console.log(validateBoolean([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateString('2')) // ↦ TypeError

@@ -1268,3 +1264,3 @@ * console.log(Monster.Types.validateString([])) // ↦ TypeError

* <script type="module">
* import {validateString} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateString} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateString('2')) // ↦ TypeError

@@ -1297,3 +1293,3 @@ * console.log(validateString([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateObject('2')) // ↦ TypeError

@@ -1308,3 +1304,3 @@ * console.log(Monster.Types.validateObject([])) // ↦ TypeError

* <script type="module">
* import {validateObject} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateObject} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateObject('2')) // ↦ TypeError

@@ -1337,3 +1333,3 @@ * console.log(validateObject([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateArray('2')) // ↦ TypeError

@@ -1348,3 +1344,3 @@ * console.log(Monster.Types.validateArray([])) // ↦ TypeError

* <script type="module">
* import {validateArray} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateArray} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateArray('2')) // ↦ TypeError

@@ -1377,3 +1373,3 @@ * console.log(validateArray([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateFunction('2')) // ↦ TypeError

@@ -1388,3 +1384,3 @@ * console.log(Monster.Types.validateFunction([])) // ↦ TypeError

* <script type="module">
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateFunction('2')) // ↦ TypeError

@@ -1461,3 +1457,3 @@ * console.log(validateFunction([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3

@@ -1472,3 +1468,3 @@ * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0

* <script type="module">
* import {Version} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {Version} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(new Version('1.2.3')) // ↦ 1.2.3

@@ -1617,3 +1613,3 @@ * console.log(new Version('1')) // ↦ 1.0.0

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(Monster.getVersion())

@@ -1628,3 +1624,3 @@ * console.log(Monster.getVersion())

* <script type="module">
* import {getVersion} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {getVersion} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(getVersion())

@@ -1650,3 +1646,3 @@ * console.log(getVersion())

monsterVersion = new Version('1.0.12');
monsterVersion = new Version('1.0.13');
/**#@-*/

@@ -1693,3 +1689,3 @@

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/clone.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/clone.js';
* console.log(Monster.Util.clone({}))

@@ -1703,3 +1699,3 @@ * </script>

* <script type="module">
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/clone.js';
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/clone.js';
* console.log(clone({}))

@@ -1719,3 +1715,3 @@ * </script>

function clone(obj) {
var copy; // Handle the 2 simple types, and null or undefined
var copy; // Handle the two simple types, null and undefined

@@ -1749,6 +1745,2 @@ if (null === obj || "object" !== _typeof(obj)) {

}
if (obj instanceof Proxy) {
return obj;
}
/** Do not clone global objects */

@@ -1762,4 +1754,9 @@

if (obj instanceof Object) {
if (isObject(obj) && obj instanceof Object) {
if (obj instanceof Proxy) {
return obj;
}
/** Object has clone method */
if (_typeof(obj.hasOwnProperty('getClone')) && obj.getClone === 'function') {

@@ -1832,3 +1829,3 @@ return obj.getClone();

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/freeze.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/freeze.js';
* console.log(Monster.Util.deepFreeze({}))

@@ -1842,3 +1839,3 @@ * </script>

* <script type="module">
* import {deepFreeze} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/freeze.js';
* import {deepFreeze} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/freeze.js';
* console.log(deepFreeze({}))

@@ -1845,0 +1842,0 @@ * </script>

@@ -1,2 +0,2 @@

/** Monster 1.0.12, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){(function(global){(function(){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.random=random;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1e9;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt=global["crypto"]||global["msCrypto"];if(!crypt){throw new Error("missing crypt")}var rval=0;var range=max-min;if(range<2){return min}var bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}var bytesNeeded=Math.ceil(bitsNeeded/8);var mask=Math.pow(2,bitsNeeded)-1;var byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);var p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}_namespace.Monster.assignToNamespace("Monster.Math",random)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("./namespace.js");require("./types/id.js");require("./types/is.js");require("./types/object.js");require("./types/version.js");require("./types/observer.js");require("./types/observerlist.js");require("./types/validate.js");require("./math/random.js");require("./util/clone.js");require("./util/freeze.js");_namespace.Monster.Util.deepFreeze(_namespace.Monster)},{"./math/random.js":1,"./namespace.js":3,"./types/id.js":4,"./types/is.js":5,"./types/object.js":6,"./types/observer.js":7,"./types/observerlist.js":8,"./types/validate.js":9,"./types/version.js":10,"./util/clone.js":11,"./util/freeze.js":12}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.assignToNamespace=assignToNamespace;exports.Monster=void 0;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Namespace=function(){function Namespace(namespace){_classCallCheck(this,Namespace);if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}_createClass(Namespace,[{key:"getNamespace",value:function getNamespace(){return this.namespace}},{key:"toString",value:function toString(){return this.getNamespace()}}]);return Namespace}();var Monster=new Namespace("Monster");exports.Monster=Monster;assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns){var current=namespaceFor(ns.split("."));for(var i=0,l=arguments.length<=1?0:arguments.length-1;i<l;i++){current[objectName(i+1<1||arguments.length<=i+1?undefined:arguments[i+1])]=i+1<1||arguments.length<=i+1?undefined:arguments[i+1]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){var s=fn.toString();var f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}var c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(var i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}},{}],4:[function(require,module,exports){(function(global){(function(){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ID=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=0;var ID=function(_Monster$Types$Object){_inherits(ID,_Monster$Types$Object);var _super=_createSuper(ID);function ID(){var _this;_classCallCheck(this,ID);_this=_super.call(this);internalCounter+=1;_this.id=global.btoa(_namespace.Monster.Math.random(1,1e4)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter;return _this}_createClass(ID,[{key:"toString",value:function toString(){return this.id}}]);return ID}(_namespace.Monster.Types.Object);exports.ID=ID;_namespace.Monster.assignToNamespace("Monster.Types",ID)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3,"../types/object.js":6}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPrimitive=isPrimitive;exports.isBoolean=isBoolean;exports.isString=isString;exports.isObject=isObject;exports.isArray=isArray;exports.isFunction=isFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function isPrimitive(value){var type;if(value===undefined||value===null){return true}type=_typeof(value);if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(_typeof(value)==="object"){return true}return false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}_namespace.Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction)},{"../namespace.js":3}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Object=void 0;var _namespace=require("../namespace.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var _Object=function(){function Object(){_classCallCheck(this,Object)}_createClass(Object,[{key:"toString",value:function toString(){return JSON.stringify(this)}}]);return Object}();exports.Object=_Object;_namespace.Monster.assignToNamespace("Monster.Types",_Object)},{"../namespace.js":3}],7:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Observer=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Observer=function(_Monster$Types$Object){_inherits(Observer,_Monster$Types$Object);var _super=_createSuper(Observer);function Observer(callback){var _this;_classCallCheck(this,Observer);_this=_super.call(this);if(typeof callback!=="function"){throw new Error("observer callback must be a function")}_this.callback=callback;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;_this.tags=new Set;return _this}_createClass(Observer,[{key:"addTag",value:function addTag(tag){this.tags.add(tag);return this}},{key:"removeTag",value:function removeTag(tag){this.tags["delete"](tag);return this}},{key:"getTags",value:function getTags(){return this.tags}},{key:"hasTag",value:function hasTag(tag){return this.tags.has(tag)}},{key:"update",value:function update(subject){var self=this;return new Promise(function(resolve,reject){if(!(subject instanceof Object)){reject("subject must be an object")}var result=self.callback.apply(subject,self.arguments);resolve(result)})}}]);return Observer}(_namespace.Monster.Types.Object);exports.Observer=Observer;_namespace.Monster.assignToNamespace("Monster.Types",Observer)},{"../namespace.js":3,"../types/object.js":6}],8:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ObserverList=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ObserverList=function(_Monster$Types$Object){_inherits(ObserverList,_Monster$Types$Object);var _super=_createSuper(ObserverList);function ObserverList(){var _this;_classCallCheck(this,ObserverList);_this=_super.call(this);_this.observers=[];return _this}_createClass(ObserverList,[{key:"attach",value:function attach(observer){checkIsObserver(observer);this.observers.push(observer);return this}},{key:"detach",value:function detach(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}},{key:"contains",value:function contains(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}},{key:"notify",value:function notify(subject){var pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}]);return ObserverList}(_namespace.Monster.Types.Object);exports.ObserverList=ObserverList;function checkIsObserver(observer){if(!(observer instanceof _namespace.Monster.Types.Observer)){throw new Error("argument must be instance of observer")}return true}_namespace.Monster.assignToNamespace("Monster.Types",ObserverList)},{"../namespace.js":3,"../types/object.js":6}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.validatePrimitive=validatePrimitive;exports.validateBoolean=validateBoolean;exports.validateString=validateString;exports.validateObject=validateObject;exports.validateArray=validateArray;exports.validateFunction=validateFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function validatePrimitive(value){if(!_namespace.Monster.Types.isPrimitive(value)){throw new TypeError("value is not a primitive")}}function validateBoolean(value){if(!_namespace.Monster.Types.isBoolean(value)){throw new TypeError("value is not a boolean")}}function validateString(value){if(!_namespace.Monster.Types.isString(value)){throw new TypeError("value is not a string")}}function validateObject(value){if(!_namespace.Monster.Types.isObject(value)){throw new TypeError("value is not a object")}}function validateArray(value){if(!_namespace.Monster.Types.isArray(value)){throw new TypeError("value is not not a array")}}function validateFunction(value){if(!_namespace.Monster.Types.isFunction(value)){throw new TypeError("value is not a function")}}_namespace.Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction)},{"../namespace.js":3}],10:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getVersion=getVersion;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Version=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Version=function(_Monster$Types$Object){_inherits(Version,_Monster$Types$Object);var _super=_createSuper(Version);function Version(major,minor,patch){var _this;_classCallCheck(this,Version);_this=_super.call(this);if(typeof major==="string"&&minor===undefined&&patch===undefined){var parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}_this.major=parseInt(major);_this.minor=parseInt(minor);_this.patch=parseInt(patch);if(isNaN(_this.major)){throw new Error("major is not a number")}if(isNaN(_this.minor)){throw new Error("minor is not a number")}if(isNaN(_this.patch)){throw new Error("patch is not a number")}return _this}_createClass(Version,[{key:"toString",value:function toString(){return this.major+"."+this.minor+"."+this.patch}},{key:"compareTo",value:function compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}var a=[this.major,this.minor,this.patch];var b=version.split(".");var len=Math.max(a.length,b.length);for(var i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}]);return Version}(_namespace.Monster.Types.Object);exports.Version=Version;_namespace.Monster.assignToNamespace("Monster.Types",Version);var monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.0.12");return monsterVersion}_namespace.Monster.assignToNamespace("Monster",getVersion)},{"../namespace.js":3,"../types/object.js":6}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clone=clone;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function clone(obj){var copy;if(null===obj||"object"!==_typeof(obj)){return obj}if(obj instanceof Date){copy=new Date;copy.setTime(obj.getTime());return copy}if(Array.isArray(obj)){copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if(obj instanceof Element||obj instanceof HTMLDocument||obj instanceof DocumentFragment){return obj}if(obj instanceof Proxy){return obj}if(obj===globalContext||obj===window||obj===document||obj===navigator||obj===JSON){return obj}if(obj instanceof Object){if(_typeof(obj.hasOwnProperty("getClone"))&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(var key in obj){if(!obj.hasOwnProperty(key)){continue}if(_namespace.Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}throw new Error("unable to clone obj! its type isn't supported.")}_namespace.Monster.assignToNamespace("Monster.Util",clone)},{"../namespace.js":3}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deepFreeze=deepFreeze;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function deepFreeze(object){(0,_validate.validateObject)(object);var propNames=Object.getOwnPropertyNames(object);var _iterator=_createForOfIteratorHelper(propNames),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var name=_step.value;var value=object[name];object[name]=value&&_typeof(value)==="object"?deepFreeze(value):value}}catch(err){_iterator.e(err)}finally{_iterator.f()}return Object.freeze(object)}_namespace.Monster.assignToNamespace("Monster.Util",deepFreeze)},{"../namespace.js":3,"../types/validate.js":9}]},{},[2]);
/** Monster 1.0.13, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){(function(global){(function(){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.random=random;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1e9;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt=global["crypto"]||global["msCrypto"];if(!crypt){throw new Error("missing crypt")}var rval=0;var range=max-min;if(range<2){return min}var bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}var bytesNeeded=Math.ceil(bitsNeeded/8);var mask=Math.pow(2,bitsNeeded)-1;var byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);var p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}_namespace.Monster.assignToNamespace("Monster.Math",random)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("./namespace.js");require("./types/id.js");require("./types/is.js");require("./types/object.js");require("./types/version.js");require("./types/observer.js");require("./types/observerlist.js");require("./types/validate.js");require("./math/random.js");require("./util/clone.js");require("./util/freeze.js");_namespace.Monster.Util.deepFreeze(_namespace.Monster)},{"./math/random.js":1,"./namespace.js":3,"./types/id.js":4,"./types/is.js":5,"./types/object.js":6,"./types/observer.js":7,"./types/observerlist.js":8,"./types/validate.js":9,"./types/version.js":10,"./util/clone.js":11,"./util/freeze.js":12}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.assignToNamespace=assignToNamespace;exports.Monster=void 0;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Namespace=function(){function Namespace(namespace){_classCallCheck(this,Namespace);if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}_createClass(Namespace,[{key:"getNamespace",value:function getNamespace(){return this.namespace}},{key:"toString",value:function toString(){return this.getNamespace()}}]);return Namespace}();var Monster=new Namespace("Monster");exports.Monster=Monster;assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns){var current=namespaceFor(ns.split("."));for(var i=0,l=arguments.length<=1?0:arguments.length-1;i<l;i++){current[objectName(i+1<1||arguments.length<=i+1?undefined:arguments[i+1])]=i+1<1||arguments.length<=i+1?undefined:arguments[i+1]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){var s=fn.toString();var f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}var c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(var i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}},{}],4:[function(require,module,exports){(function(global){(function(){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ID=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=0;var ID=function(_Monster$Types$Object){_inherits(ID,_Monster$Types$Object);var _super=_createSuper(ID);function ID(){var _this;_classCallCheck(this,ID);_this=_super.call(this);internalCounter+=1;_this.id=global.btoa(_namespace.Monster.Math.random(1,1e4)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter;return _this}_createClass(ID,[{key:"toString",value:function toString(){return this.id}}]);return ID}(_namespace.Monster.Types.Object);exports.ID=ID;_namespace.Monster.assignToNamespace("Monster.Types",ID)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../namespace.js":3,"../types/object.js":6}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPrimitive=isPrimitive;exports.isBoolean=isBoolean;exports.isString=isString;exports.isObject=isObject;exports.isArray=isArray;exports.isFunction=isFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function isPrimitive(value){var type;if(value===undefined||value===null){return true}type=_typeof(value);if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(_typeof(value)==="object"){return true}return false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}_namespace.Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction)},{"../namespace.js":3}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Object=void 0;var _namespace=require("../namespace.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var _Object=function(){function Object(){_classCallCheck(this,Object)}_createClass(Object,[{key:"toString",value:function toString(){return JSON.stringify(this)}}]);return Object}();exports.Object=_Object;_namespace.Monster.assignToNamespace("Monster.Types",_Object)},{"../namespace.js":3}],7:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Observer=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Observer=function(_Monster$Types$Object){_inherits(Observer,_Monster$Types$Object);var _super=_createSuper(Observer);function Observer(callback){var _this;_classCallCheck(this,Observer);_this=_super.call(this);if(typeof callback!=="function"){throw new Error("observer callback must be a function")}_this.callback=callback;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;_this.tags=new Set;return _this}_createClass(Observer,[{key:"addTag",value:function addTag(tag){this.tags.add(tag);return this}},{key:"removeTag",value:function removeTag(tag){this.tags["delete"](tag);return this}},{key:"getTags",value:function getTags(){return this.tags}},{key:"hasTag",value:function hasTag(tag){return this.tags.has(tag)}},{key:"update",value:function update(subject){var self=this;return new Promise(function(resolve,reject){if(!(subject instanceof Object)){reject("subject must be an object")}var result=self.callback.apply(subject,self.arguments);resolve(result)})}}]);return Observer}(_namespace.Monster.Types.Object);exports.Observer=Observer;_namespace.Monster.assignToNamespace("Monster.Types",Observer)},{"../namespace.js":3,"../types/object.js":6}],8:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ObserverList=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ObserverList=function(_Monster$Types$Object){_inherits(ObserverList,_Monster$Types$Object);var _super=_createSuper(ObserverList);function ObserverList(){var _this;_classCallCheck(this,ObserverList);_this=_super.call(this);_this.observers=[];return _this}_createClass(ObserverList,[{key:"attach",value:function attach(observer){checkIsObserver(observer);this.observers.push(observer);return this}},{key:"detach",value:function detach(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}},{key:"contains",value:function contains(observer){checkIsObserver(observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}},{key:"notify",value:function notify(subject){var pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}]);return ObserverList}(_namespace.Monster.Types.Object);exports.ObserverList=ObserverList;function checkIsObserver(observer){if(!(observer instanceof _namespace.Monster.Types.Observer)){throw new Error("argument must be instance of observer")}return true}_namespace.Monster.assignToNamespace("Monster.Types",ObserverList)},{"../namespace.js":3,"../types/object.js":6}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.validatePrimitive=validatePrimitive;exports.validateBoolean=validateBoolean;exports.validateString=validateString;exports.validateObject=validateObject;exports.validateArray=validateArray;exports.validateFunction=validateFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function validatePrimitive(value){if(!_namespace.Monster.Types.isPrimitive(value)){throw new TypeError("value is not a primitive")}}function validateBoolean(value){if(!_namespace.Monster.Types.isBoolean(value)){throw new TypeError("value is not a boolean")}}function validateString(value){if(!_namespace.Monster.Types.isString(value)){throw new TypeError("value is not a string")}}function validateObject(value){if(!_namespace.Monster.Types.isObject(value)){throw new TypeError("value is not a object")}}function validateArray(value){if(!_namespace.Monster.Types.isArray(value)){throw new TypeError("value is not not a array")}}function validateFunction(value){if(!_namespace.Monster.Types.isFunction(value)){throw new TypeError("value is not a function")}}_namespace.Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction)},{"../namespace.js":3}],10:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getVersion=getVersion;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Version=void 0;var _namespace=require("../namespace.js");require("../types/object.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Version=function(_Monster$Types$Object){_inherits(Version,_Monster$Types$Object);var _super=_createSuper(Version);function Version(major,minor,patch){var _this;_classCallCheck(this,Version);_this=_super.call(this);if(typeof major==="string"&&minor===undefined&&patch===undefined){var parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}_this.major=parseInt(major);_this.minor=parseInt(minor);_this.patch=parseInt(patch);if(isNaN(_this.major)){throw new Error("major is not a number")}if(isNaN(_this.minor)){throw new Error("minor is not a number")}if(isNaN(_this.patch)){throw new Error("patch is not a number")}return _this}_createClass(Version,[{key:"toString",value:function toString(){return this.major+"."+this.minor+"."+this.patch}},{key:"compareTo",value:function compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}var a=[this.major,this.minor,this.patch];var b=version.split(".");var len=Math.max(a.length,b.length);for(var i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}]);return Version}(_namespace.Monster.Types.Object);exports.Version=Version;_namespace.Monster.assignToNamespace("Monster.Types",Version);var monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.0.13");return monsterVersion}_namespace.Monster.assignToNamespace("Monster",getVersion)},{"../namespace.js":3,"../types/object.js":6}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clone=clone;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function clone(obj){var copy;if(null===obj||"object"!==_typeof(obj)){return obj}if(obj instanceof Date){copy=new Date;copy.setTime(obj.getTime());return copy}if(Array.isArray(obj)){copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if(obj instanceof Element||obj instanceof HTMLDocument||obj instanceof DocumentFragment){return obj}if(obj===globalContext||obj===window||obj===document||obj===navigator||obj===JSON){return obj}if(isObject(obj)&&obj instanceof Object){if(obj instanceof Proxy){return obj}if(_typeof(obj.hasOwnProperty("getClone"))&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(var key in obj){if(!obj.hasOwnProperty(key)){continue}if(_namespace.Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}throw new Error("unable to clone obj! its type isn't supported.")}_namespace.Monster.assignToNamespace("Monster.Util",clone)},{"../namespace.js":3}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deepFreeze=deepFreeze;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function deepFreeze(object){(0,_validate.validateObject)(object);var propNames=Object.getOwnPropertyNames(object);var _iterator=_createForOfIteratorHelper(propNames),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var name=_step.value;var value=object[name];object[name]=value&&_typeof(value)==="object"?deepFreeze(value):value}}catch(err){_iterator.e(err)}finally{_iterator.f()}return Object.freeze(object)}_namespace.Monster.assignToNamespace("Monster.Util",deepFreeze)},{"../namespace.js":3,"../types/validate.js":9}]},{},[2]);
{
"name": "@schukai/monster",
"version": "1.0.12",
"version": "1.0.13",
"description": "Monster is a simple library for creating fast, robust and lightweight websites.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -32,3 +32,3 @@ # Monster

<script type="module">
import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/monster.js';
import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/monster.js';
console.log(Module.getVersion())

@@ -42,3 +42,3 @@ </script>

<script type="module" src="module.mjs"></script>
<script nomodule src="https://unpkg.com/@schukai/monster@1.0.12/dist/monster.js"></script>
<script nomodule src="https://unpkg.com/@schukai/monster@1.0.13/dist/monster.js"></script>
```

@@ -45,0 +45,0 @@

@@ -17,3 +17,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/math/random.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/math/random.js';
* console.log(Monster.Math.random(1,10)) // ↦ 5

@@ -27,3 +27,3 @@ * </script>

* <script type="module">
* import {random} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/math/random.js';
* import {random} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/math/random.js';
* console.log(random(1,10)) // ↦ 5

@@ -30,0 +30,0 @@ * </script>

@@ -66,24 +66,20 @@ 'use strict';

/**
* To create your own namespace, just call the method `Monster.assignToNamespace('my.name.space', {})`.
* To expand monster, the `Monster.assignToNamespace()` method can be used.
*
* This will then open an object tree my.name.space. Note that the Monster namespace is protected.
* you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.
*
* To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.
*
* you can call the method via the monster namespace `Monster.Types.isString()`.
*
* ```
* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/namespace.js';
* console.log(Monster.Types.assignToNamespace("Monster.Misc",{}))
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/namespace.js';
* function hello() {
* console.log('Hello World!');
* }
* Monster.assignToNamespace("Monster.X",hello)
* Monster.X.hello(); // ↦ Hello World!
* </script>
*
* ```
*
* Alternatively, you can also integrate this function individually.
*
* ```
* <script type="module">
* import {assignToNamespace} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/namespace.js';
* console.log(assignToNamespace("Monster.Misc",{}))
* </script>
* ```
*
* @param ns

@@ -90,0 +86,0 @@ * @param obj

@@ -18,3 +18,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/id.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/id.js';
* console.log(new Monster.Types.ID())

@@ -29,3 +29,3 @@ * console.log(new Monster.Types.ID())

* <script type="module">
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/id.js';
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/id.js';
* console.log(new ID())

@@ -32,0 +32,0 @@ * console.log(new ID())

@@ -16,3 +16,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isPrimitive('2')) // ↦ false

@@ -27,3 +27,3 @@ * console.log(Monster.Types.isPrimitive([])) // ↦ true

* <script type="module">
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isPrimitive('2')) // ↦ true

@@ -64,3 +64,3 @@ * console.log(isPrimitive([])) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isBoolean('2')) // ↦ false

@@ -75,3 +75,3 @@ * console.log(Monster.Types.isBoolean([])) // ↦ true

* <script type="module">
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isPrimitive} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isBoolean('2')) // ↦ true

@@ -105,3 +105,3 @@ * console.log(isBoolean([])) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isString('2')) // ↦ false

@@ -116,3 +116,3 @@ * console.log(Monster.Types.isString([])) // ↦ true

* <script type="module">
* import {isString} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isString} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isString('2')) // ↦ false

@@ -144,3 +144,3 @@ * console.log(isString([])) // ↦ true

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isObject('2')) // ↦ false

@@ -155,3 +155,3 @@ * console.log(Monster.Types.isObject([])) // ↦ false

* <script type="module">
* import {isObject} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isObject} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isObject('2')) // ↦ true

@@ -188,3 +188,3 @@ * console.log(isObject([])) // ↦ false

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isArray('2')) // ↦ true

@@ -199,3 +199,3 @@ * console.log(Monster.Types.isArray([])) // ↦ false

* <script type="module">
* import {isArray} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isArray} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isArray('2')) // ↦ false

@@ -227,3 +227,3 @@ * console.log(isArray([])) // ↦ true

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(Monster.Types.isFunction(()=>{})) // ↦ true

@@ -239,3 +239,3 @@ * console.log(Monster.Types.isFunction('2')) // ↦ false

* <script type="module">
* import {isFunction} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/is.js';
* import {isFunction} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/is.js';
* console.log(isFunction(()=>{})) // ↦ true

@@ -242,0 +242,0 @@ * console.log(isFunction('2')) // ↦ false

@@ -17,3 +17,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/object.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/object.js';
* console.log(new Monster.Types.Object())

@@ -28,3 +28,3 @@ * console.log(new Monster.Types.Object())

* <script type="module">
* import {Object} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/object.js';
* import {Object} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/object.js';
* console.log(new Object())

@@ -31,0 +31,0 @@ * console.log(new Object())

@@ -17,3 +17,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observer.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observer.js';
* console.log(new Monster.Types.Observer())

@@ -28,3 +28,3 @@ * console.log(new Monster.Types.Observer())

* <script type="module">
* import {Observer} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observer.js';
* import {Observer} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observer.js';
* console.log(Observer())

@@ -31,0 +31,0 @@ * console.log(Observer())

@@ -17,3 +17,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observerlist.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observerlist.js';
* console.log(new Monster.Types.ObserverList())

@@ -28,3 +28,3 @@ * console.log(new Monster.Types.ObserverList())

* <script type="module">
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/observerlist.js';
* import {ObserverList} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/observerlist.js';
* console.log(ObserverList())

@@ -31,0 +31,0 @@ * console.log(ObserverList())

@@ -16,3 +16,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validatePrimitive('2')) // ↦ TypeError

@@ -27,3 +27,3 @@ * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError

* <script type="module">
* import {validatePrimitive} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validatePrimitive} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validatePrimitive('2')) // ↦ TypeError

@@ -58,3 +58,3 @@ * console.log(validatePrimitive([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError

@@ -69,3 +69,3 @@ * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError

* <script type="module">
* import {validateBoolean} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateBoolean} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateBoolean('2')) // ↦ TypeError

@@ -97,3 +97,3 @@ * console.log(validateBoolean([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateString('2')) // ↦ TypeError

@@ -108,3 +108,3 @@ * console.log(Monster.Types.validateString([])) // ↦ TypeError

* <script type="module">
* import {validateString} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateString} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateString('2')) // ↦ TypeError

@@ -137,3 +137,3 @@ * console.log(validateString([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateObject('2')) // ↦ TypeError

@@ -148,3 +148,3 @@ * console.log(Monster.Types.validateObject([])) // ↦ TypeError

* <script type="module">
* import {validateObject} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateObject} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateObject('2')) // ↦ TypeError

@@ -176,3 +176,3 @@ * console.log(validateObject([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateArray('2')) // ↦ TypeError

@@ -187,3 +187,3 @@ * console.log(Monster.Types.validateArray([])) // ↦ TypeError

* <script type="module">
* import {validateArray} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateArray} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateArray('2')) // ↦ TypeError

@@ -215,3 +215,3 @@ * console.log(validateArray([])) // ↦ TypeError

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(Monster.Types.validateFunction('2')) // ↦ TypeError

@@ -226,3 +226,3 @@ * console.log(Monster.Types.validateFunction([])) // ↦ TypeError

* <script type="module">
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/validate.js';
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/validate.js';
* console.log(validateFunction('2')) // ↦ TypeError

@@ -229,0 +229,0 @@ * console.log(validateFunction([])) // ↦ TypeError

@@ -13,3 +13,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3

@@ -24,3 +24,3 @@ * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0

* <script type="module">
* import {Version} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {Version} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(new Version('1.2.3')) // ↦ 1.2.3

@@ -156,3 +156,3 @@ * console.log(new Version('1')) // ↦ 1.0.0

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(Monster.getVersion())

@@ -167,3 +167,3 @@ * console.log(Monster.getVersion())

* <script type="module">
* import {getVersion} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/types/version.js';
* import {getVersion} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/types/version.js';
* console.log(getVersion())

@@ -186,3 +186,3 @@ * console.log(getVersion())

/**#@+ dont touch, replaced by make with package.json version */
monsterVersion = new Version('1.0.12')
monsterVersion = new Version('1.0.13')
/**#@-*/

@@ -189,0 +189,0 @@ return monsterVersion;

@@ -22,3 +22,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/clone.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/clone.js';
* console.log(Monster.Util.clone({}))

@@ -32,3 +32,3 @@ * </script>

* <script type="module">
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/clone.js';
* import {validateFunction} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/clone.js';
* console.log(clone({}))

@@ -50,3 +50,3 @@ * </script>

// Handle the 2 simple types, and null or undefined
// Handle the two simple types, null and undefined
if (null === obj || "object" !== typeof obj) {

@@ -80,6 +80,2 @@ return obj;

if (obj instanceof Proxy) {
return obj;
}
/** Do not clone global objects */

@@ -92,4 +88,8 @@ if (obj === globalContext || obj === window || obj === document || obj === navigator ||

// Handle Object
if (obj instanceof Object) {
if (isObject(obj) && obj instanceof Object) {
if (obj instanceof Proxy) {
return obj;
}
/** Object has clone method */

@@ -96,0 +96,0 @@ if (typeof obj.hasOwnProperty('getClone') && obj.getClone === 'function') {

@@ -17,3 +17,3 @@ 'use strict';

* <script type="module">
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/freeze.js';
* import {Monster} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/freeze.js';
* console.log(Monster.Util.deepFreeze({}))

@@ -27,3 +27,3 @@ * </script>

* <script type="module">
* import {deepFreeze} from 'https://unpkg.com/@schukai/monster@1.0.12/dist/modules/util/freeze.js';
* import {deepFreeze} from 'https://unpkg.com/@schukai/monster@1.0.13/dist/modules/util/freeze.js';
* console.log(deepFreeze({}))

@@ -30,0 +30,0 @@ * </script>

@@ -11,3 +11,3 @@ import * as assert from 'assert';

/**#@+ dont touch, replaced by make with package.json version */
monsterVersion = new Version('1.0.12')
monsterVersion = new Version('1.0.13')
/**#@-*/

@@ -14,0 +14,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc