[
  {
    "__docId__": 1,
    "kind": "external",
    "name": "Infinity",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Infinity",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 2,
    "kind": "external",
    "name": "NaN",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~NaN",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 3,
    "kind": "external",
    "name": "undefined",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~undefined",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 4,
    "kind": "external",
    "name": "null",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~null",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 5,
    "kind": "external",
    "name": "Object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Object",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 6,
    "kind": "external",
    "name": "object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~object",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 7,
    "kind": "external",
    "name": "Function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Function",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 8,
    "kind": "external",
    "name": "function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~function",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 9,
    "kind": "external",
    "name": "Boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Boolean",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 10,
    "kind": "external",
    "name": "boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~boolean",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 11,
    "kind": "external",
    "name": "Symbol",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Symbol",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 12,
    "kind": "external",
    "name": "Error",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Error",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 13,
    "kind": "external",
    "name": "EvalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~EvalError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 14,
    "kind": "external",
    "name": "InternalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~InternalError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 15,
    "kind": "external",
    "name": "RangeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~RangeError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 16,
    "kind": "external",
    "name": "ReferenceError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~ReferenceError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 17,
    "kind": "external",
    "name": "SyntaxError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~SyntaxError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 18,
    "kind": "external",
    "name": "TypeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~TypeError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 19,
    "kind": "external",
    "name": "URIError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~URIError",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 20,
    "kind": "external",
    "name": "Number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Number",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 21,
    "kind": "external",
    "name": "number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~number",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 22,
    "kind": "external",
    "name": "Date",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Date",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 23,
    "kind": "external",
    "name": "String",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~String",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 24,
    "kind": "external",
    "name": "string",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~string",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 25,
    "kind": "external",
    "name": "RegExp",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~RegExp",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 26,
    "kind": "external",
    "name": "Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 27,
    "kind": "external",
    "name": "Int8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Int8Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 28,
    "kind": "external",
    "name": "Uint8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Uint8Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 29,
    "kind": "external",
    "name": "Uint8ClampedArray",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Uint8ClampedArray",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 30,
    "kind": "external",
    "name": "Int16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Int16Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 31,
    "kind": "external",
    "name": "Uint16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Uint16Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 32,
    "kind": "external",
    "name": "Int32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Int32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 33,
    "kind": "external",
    "name": "Uint32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Uint32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 34,
    "kind": "external",
    "name": "Float32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Float32Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 35,
    "kind": "external",
    "name": "Float64Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Float64Array",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 36,
    "kind": "external",
    "name": "Map",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Map",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 37,
    "kind": "external",
    "name": "Set",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Set",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 38,
    "kind": "external",
    "name": "WeakMap",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~WeakMap",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 39,
    "kind": "external",
    "name": "WeakSet",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~WeakSet",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 40,
    "kind": "external",
    "name": "ArrayBuffer",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~ArrayBuffer",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 41,
    "kind": "external",
    "name": "DataView",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~DataView",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 42,
    "kind": "external",
    "name": "JSON",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~JSON",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 43,
    "kind": "external",
    "name": "Promise",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Promise",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 44,
    "kind": "external",
    "name": "Generator",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Generator",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 45,
    "kind": "external",
    "name": "GeneratorFunction",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~GeneratorFunction",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 46,
    "kind": "external",
    "name": "Reflect",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Reflect",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 47,
    "kind": "external",
    "name": "Proxy",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
    "memberof": "scripts/.external-ecmascript.js",
    "static": true,
    "longname": "scripts/.external-ecmascript.js~Proxy",
    "access": "public",
    "description": "",
    "builtinExternal": true
  },
  {
    "__docId__": 48,
    "kind": "file",
    "name": "scripts/index.js",
    "content": "'use strict'\n\nimport { Router } from './libs/router.js'\n\nimport { Component } from './libs/component.js'\nimport { Module } from './libs/module.js'\n\nimport { approx } from './utils/approx.js'\nimport { Communication } from './utils/communication.js'\nimport { Cookie } from './utils/cookie.js'\nimport { DateTime } from './utils/datetime.js'\nimport { Device } from './utils/device.js'\nimport { extend } from './utils/extend.js'\nimport { Font } from './utils/font.js'\nimport { html } from './utils/html.js'\nimport { isNumber } from './utils/isnumber.js'\nimport { isObject } from './utils/isobject.js'\nimport { loader } from './utils/loader.js'\nimport { logger } from './utils/logger.js'\nimport { loop } from './utils/loop.js'\nimport { radians } from './utils/radians.js'\nimport { rnd } from './utils/rnd.js'\nimport { scroll } from './utils/scroll.js'\nimport { sounds } from './utils/sounds.js'\nimport { uid } from './utils/uid.js'\nimport { Url } from './utils/url.js'\n\nexport {\n  Router,\n\n  Component,\n  Module,\n\n  approx, Communication, Cookie, DateTime, Device, extend, Font, html, isNumber, isObject, loader, logger, loop, radians, rnd, scroll, sounds, uid, Url\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/index.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 49,
    "kind": "file",
    "name": "scripts/libs/component.js",
    "content": "'use strict'\n\nimport { html } from './../utils/html.js'\nimport { uid } from './../utils/uid.js'\nimport { Router } from './router.js'\n\n/**\n * This class is used to create web components\n */\nexport class Component {\n  /**\n   * The html string or HTMLElement that becomes the view for this component\n   */\n  get template () {\n    return ''\n  }\n\n  /**\n   * The method gets called whenever the state changes\n   * @param {URL} url The current url\n   */\n  onStateChange ( url ) {}\n\n  /**\n   * The method gets called before the template is attached. This is useful for modifing the template before the MutationObserver starts tracking it or add dependencies for template elements\n   */\n  init () {}\n\n  /**\n   * The method gets called when the component gets created in the page. It is the main method of the class\n   */\n  execute () {}\n\n  /**\n   * The method gets called when the component calls destroy(). It can be used to remove handlers or clear timeouts\n   */\n  terminate () {}\n\n  /**\n   * Creates an instance of Component\n   * @param {HTMLElement} parent The parent wrapper\n   * @param {Module} module The parent module instance\n   * @param {Store} store An instance of @crispcode/pushstore, see https://www.npmjs.com/package/@crispcode/pushstore\n   */\n  constructor ( parent, module, store ) {\n    /**\n     * A unique identifier\n     * @type {String}\n     * @public\n     */\n    this.uid = uid()\n\n    /**\n     * The parent wrapper\n     * @type {HTMLElement}\n     * @public\n     */\n    this.parent = parent\n\n    /**\n     * The parent module instance\n     * @type {Module}\n     * @public\n     */\n    this.module = module\n    /**\n     * The pushstore instance of the module parent\n     * @type {Store}\n     * @public\n     */\n    this.store = store\n\n    /**\n     * The component view\n     * @type {HTMLElement}\n     * @public\n     */\n    this.element = ( typeof this.template === 'string' ) ? html( this.template ) : this.template\n\n    // Call the init method before the template is attached to the parent element\n    this.init()\n\n    // Append element to the dom\n    this.parent.appendChild( this.element )\n\n    /**\n     * The __stateWatcher is a handler for the router, it gets destroyed when the component gets destroyed\n     * @type {String}\n     * @private\n     */\n    this.__stateWatcher = Router.onStateChange( ( url ) => {\n      this.onStateChange( url )\n    } )\n  }\n\n  /**\n   * The method gets called when the component is destroyed\n   * @private\n   */\n  __destroy () {\n    this.__stateWatcher()\n    this.terminate()\n    try {\n      this.element.remove()\n    } catch ( e ) {}\n    delete this.parent.moduxComponent\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/libs/component.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 50,
    "kind": "class",
    "name": "Component",
    "memberof": "scripts/libs/component.js",
    "static": true,
    "longname": "scripts/libs/component.js~Component",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/libs/component.js",
    "importStyle": "{Component}",
    "description": "This class is used to create web components",
    "lineNumber": 10,
    "interface": false
  },
  {
    "__docId__": 51,
    "kind": "get",
    "name": "template",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#template",
    "access": "public",
    "description": "The html string or HTMLElement that becomes the view for this component",
    "lineNumber": 14,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 52,
    "kind": "method",
    "name": "onStateChange",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#onStateChange",
    "access": "public",
    "description": "The method gets called whenever the state changes",
    "lineNumber": 22,
    "params": [
      {
        "nullable": null,
        "types": [
          "URL"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The current url"
      }
    ],
    "return": null
  },
  {
    "__docId__": 53,
    "kind": "method",
    "name": "init",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#init",
    "access": "public",
    "description": "The method gets called before the template is attached. This is useful for modifing the template before the MutationObserver starts tracking it or add dependencies for template elements",
    "lineNumber": 27,
    "params": [],
    "return": null
  },
  {
    "__docId__": 54,
    "kind": "method",
    "name": "execute",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#execute",
    "access": "public",
    "description": "The method gets called when the component gets created in the page. It is the main method of the class",
    "lineNumber": 32,
    "params": [],
    "return": null
  },
  {
    "__docId__": 55,
    "kind": "method",
    "name": "terminate",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#terminate",
    "access": "public",
    "description": "The method gets called when the component calls destroy(). It can be used to remove handlers or clear timeouts",
    "lineNumber": 37,
    "params": [],
    "return": null
  },
  {
    "__docId__": 56,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#constructor",
    "access": "public",
    "description": "Creates an instance of Component",
    "lineNumber": 45,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "parent",
        "description": "The parent wrapper"
      },
      {
        "nullable": null,
        "types": [
          "Module"
        ],
        "spread": false,
        "optional": false,
        "name": "module",
        "description": "The parent module instance"
      },
      {
        "nullable": null,
        "types": [
          "Store"
        ],
        "spread": false,
        "optional": false,
        "name": "store",
        "description": "An instance of @crispcode/pushstore, see https://www.npmjs.com/package/@crispcode/pushstore"
      }
    ]
  },
  {
    "__docId__": 57,
    "kind": "member",
    "name": "uid",
    "memberof": "scripts/libs/component.js~Component",
    "static": false,
    "longname": "scripts/libs/component.js~Component#uid",
    "access": "public",
    "description": "A unique identifier",
    "lineNumber": 51,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    }
  },
  {
    "__docId__": 58,
    "kind": "member",
    "name": "parent",
    "memberof": "scripts/libs/component.js~Component",
    "static": false,
    "longname": "scripts/libs/component.js~Component#parent",
    "access": "public",
    "description": "The parent wrapper",
    "lineNumber": 58,
    "type": {
      "nullable": null,
      "types": [
        "HTMLElement"
      ],
      "spread": false,
      "description": null
    }
  },
  {
    "__docId__": 59,
    "kind": "member",
    "name": "module",
    "memberof": "scripts/libs/component.js~Component",
    "static": false,
    "longname": "scripts/libs/component.js~Component#module",
    "access": "public",
    "description": "The parent module instance",
    "lineNumber": 65,
    "type": {
      "nullable": null,
      "types": [
        "Module"
      ],
      "spread": false,
      "description": null
    }
  },
  {
    "__docId__": 60,
    "kind": "member",
    "name": "store",
    "memberof": "scripts/libs/component.js~Component",
    "static": false,
    "longname": "scripts/libs/component.js~Component#store",
    "access": "public",
    "description": "The pushstore instance of the module parent",
    "lineNumber": 71,
    "type": {
      "nullable": null,
      "types": [
        "Store"
      ],
      "spread": false,
      "description": null
    }
  },
  {
    "__docId__": 61,
    "kind": "member",
    "name": "element",
    "memberof": "scripts/libs/component.js~Component",
    "static": false,
    "longname": "scripts/libs/component.js~Component#element",
    "access": "public",
    "description": "The component view",
    "lineNumber": 78,
    "type": {
      "nullable": null,
      "types": [
        "HTMLElement"
      ],
      "spread": false,
      "description": null
    }
  },
  {
    "__docId__": 62,
    "kind": "member",
    "name": "__stateWatcher",
    "memberof": "scripts/libs/component.js~Component",
    "static": false,
    "longname": "scripts/libs/component.js~Component#__stateWatcher",
    "access": "private",
    "description": "The __stateWatcher is a handler for the router, it gets destroyed when the component gets destroyed",
    "lineNumber": 91,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 63,
    "kind": "method",
    "name": "__destroy",
    "memberof": "scripts/libs/component.js~Component",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/component.js~Component#__destroy",
    "access": "private",
    "description": "The method gets called when the component is destroyed",
    "lineNumber": 100,
    "ignore": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 64,
    "kind": "file",
    "name": "scripts/libs/module.js",
    "content": "/* globals MutationObserver, HTMLElement */\n\n'use strict'\n\nimport { loop } from './../utils/loop.js'\nimport { Router } from './router.js'\n\nimport { store } from '@crispcode/pushstore'\n\n/**\n * The attribute name used to determine if an HTMLElement is a component\n * @type {String}\n * @private\n */\nconst _attrComponent = 'data-modux-component'\n/**\n * The attribute name used to determine if an HTMLElement ( usually an anchor tag ) is a state change component. This will prevent server reload on anchor tags.\n * @type {String}\n * @private\n */\nconst _attrLink = 'data-modux-link'\n\n/**\n * A shorthand for the link element handler\n * @param {Event} e\n * @private\n */\nconst linkHandler = function ( e ) {\n  let url = this.getAttribute( 'href' )\n  if ( url ) {\n    Router.redirect( url )\n    e.preventDefault()\n  }\n}\n\n/**\n * The main class, used to create a Modux module. You can think of this as the main application\n */\nexport class Module {\n  /**\n   * A method used to add components to the Module\n   * @param {String} name The name under which the Component will be known as\n   * @param {Component} dependency The Component to be added\n   * @return {Module} The instance of Module\n   */\n  addDependency ( name, dependency ) {\n    this.__dependencies[ name ] = dependency\n    return this\n  }\n  /**\n   * A method used to remove components from the Module\n   * @param {String} name The name of the Component to be removed\n   * @return {Module} The instance of Module\n   */\n  removeDependency ( name ) {\n    if ( this.__dependencies[ name ] ) {\n      delete this.__dependencies[ name ]\n    }\n    return this\n  }\n\n  /**\n   * Creates an instance of Module\n   * @param {String} [name] A unique name for the module, for easier management\n   */\n  constructor ( name ) {\n    /**\n     * A unique name for the module, for easier management\n     * @type {String}\n     * @private\n     */\n    this.__name = name\n    /**\n     * Contains all the components added to the module\n     * @type {Object}\n     * @private\n     */\n    this.__dependencies = {}\n    /**\n     * Contains a new instance of @crispcode/pushstore which is passed on to all components. See https://www.npmjs.com/package/@crispcode/pushstore\n     * @type {Store}\n     * @public\n     */\n    this.store = store.create()\n  }\n\n  /**\n   * Creates a component on an HTMLElement if it doesn't have one already\n   * @param {HTMLElement} element The HTMLElement to bind the Component to\n   * @param {Component} Component The Component to be bound\n   * @private\n   */\n  __createComponent ( element, Component ) {\n    if ( !element.moduxComponent ) {\n      element.moduxComponent = new Component( element, this, this.store )\n      element.moduxComponent.execute()\n    }\n  }\n\n  /**\n   * Removes a component from an HTMLElement if it has one, and removes all subcomponents\n   * @param {HTMLElement} element The HTMLElement for which we want to remove the Component\n   * @private\n   */\n  __removeComponent ( element ) {\n    if ( element.moduxComponent ) {\n      // Destroy all children to prevent memory leak\n      const _destroyChildren = ( parent ) => {\n        loop( parent.children, ( child ) => {\n          if ( child.children.length > 0 ) {\n            _destroyChildren( child )\n          }\n          if ( child.moduxComponent ) {\n            child.moduxComponent.__destroy()\n          }\n        } )\n      }\n      _destroyChildren( element )\n      element.moduxComponent.__destroy()\n    }\n  }\n\n  /**\n   * Creates a link component on an HTMLElement if it doesn't have one already\n   * @param {HTMLElement} element The HTMLElement to bind the link to\n   * @private\n   */\n  __createComponentLink ( element ) {\n    if ( !element.moduxLink ) {\n      element.addEventListener( 'click', linkHandler )\n      element.moduxLink = true\n    }\n  }\n  /**\n   * Removes a link component from an HTMLElement if it has one\n   * @param {HTMLElement} element The HTMLElement for which we want to remove the link\n   * @private\n   */\n  __removeComponentLink ( element ) {\n    if ( element.moduxLink ) {\n      element.removeEventListener( 'click', linkHandler )\n      delete element.moduxLink\n    }\n  }\n\n  /**\n   * Checks if the current element needs a Component instance\n   * @param {HTMLElement} node HTMLElement what we are checking\n   * @param {String} attr The attribute to watch out for\n   * @param {Function} handler The callback function which will be called after the checks are made\n   * @private\n   */\n  __loopOnElements ( node, attr, handler ) {\n    if ( !( node instanceof HTMLElement ) ) {\n      return\n    }\n    let name = node.getAttribute( attr )\n    if ( name ) {\n      handler( node, name )\n    }\n    loop( node.querySelectorAll( '*[' + attr + ']' ), ( element ) => {\n      handler( element, element.getAttribute( attr ) )\n    } )\n  }\n\n  /**\n   * Renders an HTMLElement to a Component as if it was a part of this module\n   * @param {HTMLElement} node The HTMLElement to be converted to a Component\n   */\n  createComponent ( node ) {\n    this.__loopOnElements( node, _attrComponent, ( e, attr ) => {\n      if ( this.__dependencies[ attr ] ) {\n        this.__createComponent( e, this.__dependencies[ attr ] )\n      }\n    } )\n    this.__loopOnElements( node, _attrLink, ( e ) => {\n      this.__createComponentLink( e )\n    } )\n  }\n\n  /**\n   * Initializes the Module on a specific HTMLElement and loads the specified Component for it\n   * @param {HTMLElement} element The HTMLElement used as the wrapper for the Module\n   * @param {Component} component The Component to be used as the main Component\n   */\n  bootstrap ( element, component ) {\n    /**\n     * Holds the MutationObserver which is used to check for changes in the DOM\n     */\n    this.__htmlWatcher = new MutationObserver( ( mutations ) => {\n      mutations.forEach( ( mutation ) => {\n        if ( mutation.type === 'attributes' ) {\n          if ( mutation.attributeName === _attrComponent ) {\n            this.__removeComponent( mutation.target )\n            this.__createComponent( mutation.target, this.__dependencies[ mutation.target.getAttribute( _attrComponent ) ] )\n          }\n          if ( mutation.attributeName === _attrLink ) {\n            this.__removeComponentLink( mutation.target )\n            this.__createComponentLink( mutation.target )\n          }\n        }\n        if ( mutation.type === 'childList' ) {\n          if ( mutation.addedNodes.length > 0 ) {\n            // Nodes that were added\n            loop( mutation.addedNodes, ( node ) => {\n              this.__loopOnElements( node, _attrComponent, ( e, attr ) => {\n                if ( this.__dependencies[ attr ] ) {\n                  this.__createComponent( e, this.__dependencies[ attr ] )\n                }\n              } )\n              this.__loopOnElements( node, _attrLink, ( e ) => {\n                this.__createComponentLink( e )\n              } )\n            } )\n          }\n          if ( mutation.removedNodes.length > 0 ) {\n            // Nodes that were removed\n            loop( mutation.removedNodes, ( node ) => {\n              this.__loopOnElements( node, _attrComponent, ( e ) => {\n                this.__removeComponent( e )\n              } )\n              this.__loopOnElements( node, _attrLink, ( e ) => {\n                this.__removeComponentLink( e )\n              } )\n            } )\n          }\n        }\n      } )\n    } )\n    this.__htmlWatcher.observe( element, { attributes: true, childList: true, characterData: false, subtree: true } )\n\n    if ( !this.__dependencies[ component ] ) {\n      throw new Error( 'Initial component cannot be found in dependency list' )\n    }\n    /**\n     * Holds the main Component which is used for the Module.\n     */\n    this.__component = new this.__dependencies[ component ]( element, this, this.store )\n    element.moduxComponent = this.__component\n    element.moduxComponent.execute()\n  }\n\n  /**\n   * Destroy the current module. This will also destroy all the components created and disconnect the MutationObserver\n   */\n  destroy () {\n    this.__component.__destroy()\n    this.__htmlWatcher.disconnect()\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/libs/module.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 65,
    "kind": "variable",
    "name": "_attrComponent",
    "memberof": "scripts/libs/module.js",
    "static": true,
    "longname": "scripts/libs/module.js~_attrComponent",
    "access": "private",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/module.js",
    "importStyle": null,
    "description": "The attribute name used to determine if an HTMLElement is a component",
    "lineNumber": 15,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 66,
    "kind": "variable",
    "name": "_attrLink",
    "memberof": "scripts/libs/module.js",
    "static": true,
    "longname": "scripts/libs/module.js~_attrLink",
    "access": "private",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/module.js",
    "importStyle": null,
    "description": "The attribute name used to determine if an HTMLElement ( usually an anchor tag ) is a state change component. This will prevent server reload on anchor tags.",
    "lineNumber": 21,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 67,
    "kind": "function",
    "name": "linkHandler",
    "memberof": "scripts/libs/module.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/libs/module.js~linkHandler",
    "access": "private",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/module.js",
    "importStyle": null,
    "description": "A shorthand for the link element handler",
    "lineNumber": 28,
    "params": [
      {
        "nullable": null,
        "types": [
          "Event"
        ],
        "spread": false,
        "optional": false,
        "name": "e",
        "description": ""
      }
    ],
    "ignore": true,
    "return": null
  },
  {
    "__docId__": 68,
    "kind": "class",
    "name": "Module",
    "memberof": "scripts/libs/module.js",
    "static": true,
    "longname": "scripts/libs/module.js~Module",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/libs/module.js",
    "importStyle": "{Module}",
    "description": "The main class, used to create a Modux module. You can think of this as the main application",
    "lineNumber": 39,
    "interface": false
  },
  {
    "__docId__": 69,
    "kind": "method",
    "name": "addDependency",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#addDependency",
    "access": "public",
    "description": "A method used to add components to the Module",
    "lineNumber": 46,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "The name under which the Component will be known as"
      },
      {
        "nullable": null,
        "types": [
          "Component"
        ],
        "spread": false,
        "optional": false,
        "name": "dependency",
        "description": "The Component to be added"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Module"
      ],
      "spread": false,
      "description": "The instance of Module"
    }
  },
  {
    "__docId__": 70,
    "kind": "method",
    "name": "removeDependency",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#removeDependency",
    "access": "public",
    "description": "A method used to remove components from the Module",
    "lineNumber": 55,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "The name of the Component to be removed"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Module"
      ],
      "spread": false,
      "description": "The instance of Module"
    }
  },
  {
    "__docId__": 71,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#constructor",
    "access": "public",
    "description": "Creates an instance of Module",
    "lineNumber": 66,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": true,
        "name": "name",
        "description": "A unique name for the module, for easier management"
      }
    ]
  },
  {
    "__docId__": 72,
    "kind": "member",
    "name": "__name",
    "memberof": "scripts/libs/module.js~Module",
    "static": false,
    "longname": "scripts/libs/module.js~Module#__name",
    "access": "private",
    "description": "A unique name for the module, for easier management",
    "lineNumber": 72,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 73,
    "kind": "member",
    "name": "__dependencies",
    "memberof": "scripts/libs/module.js~Module",
    "static": false,
    "longname": "scripts/libs/module.js~Module#__dependencies",
    "access": "private",
    "description": "Contains all the components added to the module",
    "lineNumber": 78,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 74,
    "kind": "member",
    "name": "store",
    "memberof": "scripts/libs/module.js~Module",
    "static": false,
    "longname": "scripts/libs/module.js~Module#store",
    "access": "public",
    "description": "Contains a new instance of @crispcode/pushstore which is passed on to all components. See https://www.npmjs.com/package/@crispcode/pushstore",
    "lineNumber": 84,
    "type": {
      "nullable": null,
      "types": [
        "Store"
      ],
      "spread": false,
      "description": null
    }
  },
  {
    "__docId__": 75,
    "kind": "method",
    "name": "__createComponent",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#__createComponent",
    "access": "private",
    "description": "Creates a component on an HTMLElement if it doesn't have one already",
    "lineNumber": 93,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "element",
        "description": "The HTMLElement to bind the Component to"
      },
      {
        "nullable": null,
        "types": [
          "Component"
        ],
        "spread": false,
        "optional": false,
        "name": "Component",
        "description": "The Component to be bound"
      }
    ],
    "ignore": true,
    "return": null
  },
  {
    "__docId__": 76,
    "kind": "method",
    "name": "__removeComponent",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#__removeComponent",
    "access": "private",
    "description": "Removes a component from an HTMLElement if it has one, and removes all subcomponents",
    "lineNumber": 105,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "element",
        "description": "The HTMLElement for which we want to remove the Component"
      }
    ],
    "ignore": true,
    "return": null
  },
  {
    "__docId__": 77,
    "kind": "method",
    "name": "__createComponentLink",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#__createComponentLink",
    "access": "private",
    "description": "Creates a link component on an HTMLElement if it doesn't have one already",
    "lineNumber": 128,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "element",
        "description": "The HTMLElement to bind the link to"
      }
    ],
    "ignore": true,
    "return": null
  },
  {
    "__docId__": 78,
    "kind": "method",
    "name": "__removeComponentLink",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#__removeComponentLink",
    "access": "private",
    "description": "Removes a link component from an HTMLElement if it has one",
    "lineNumber": 139,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "element",
        "description": "The HTMLElement for which we want to remove the link"
      }
    ],
    "ignore": true,
    "return": null
  },
  {
    "__docId__": 79,
    "kind": "method",
    "name": "__loopOnElements",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#__loopOnElements",
    "access": "private",
    "description": "Checks if the current element needs a Component instance",
    "lineNumber": 153,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "node",
        "description": "HTMLElement what we are checking"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "attr",
        "description": "The attribute to watch out for"
      },
      {
        "nullable": null,
        "types": [
          "Function"
        ],
        "spread": false,
        "optional": false,
        "name": "handler",
        "description": "The callback function which will be called after the checks are made"
      }
    ],
    "ignore": true,
    "return": null
  },
  {
    "__docId__": 80,
    "kind": "method",
    "name": "createComponent",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#createComponent",
    "access": "public",
    "description": "Renders an HTMLElement to a Component as if it was a part of this module",
    "lineNumber": 170,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "node",
        "description": "The HTMLElement to be converted to a Component"
      }
    ],
    "return": null
  },
  {
    "__docId__": 81,
    "kind": "method",
    "name": "bootstrap",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#bootstrap",
    "access": "public",
    "description": "Initializes the Module on a specific HTMLElement and loads the specified Component for it",
    "lineNumber": 186,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "element",
        "description": "The HTMLElement used as the wrapper for the Module"
      },
      {
        "nullable": null,
        "types": [
          "Component"
        ],
        "spread": false,
        "optional": false,
        "name": "component",
        "description": "The Component to be used as the main Component"
      }
    ],
    "return": null
  },
  {
    "__docId__": 82,
    "kind": "member",
    "name": "__htmlWatcher",
    "memberof": "scripts/libs/module.js~Module",
    "static": false,
    "longname": "scripts/libs/module.js~Module#__htmlWatcher",
    "access": "private",
    "description": "Holds the MutationObserver which is used to check for changes in the DOM",
    "lineNumber": 190,
    "ignore": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 83,
    "kind": "member",
    "name": "__component",
    "memberof": "scripts/libs/module.js~Module",
    "static": false,
    "longname": "scripts/libs/module.js~Module#__component",
    "access": "private",
    "description": "Holds the main Component which is used for the Module.",
    "lineNumber": 238,
    "ignore": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 84,
    "kind": "method",
    "name": "destroy",
    "memberof": "scripts/libs/module.js~Module",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/libs/module.js~Module#destroy",
    "access": "public",
    "description": "Destroy the current module. This will also destroy all the components created and disconnect the MutationObserver",
    "lineNumber": 246,
    "params": [],
    "return": null
  },
  {
    "__docId__": 85,
    "kind": "file",
    "name": "scripts/libs/router.js",
    "content": "/* globals window, history */\n\n'use strict'\n\nimport { loop } from './../utils/loop.js'\nimport { uid } from './../utils/uid.js'\n\n/**\n * Holds all the handlers bound to the router class. Since the class is static, all imports will point to the same class\n * @type {Object}\n */\nlet listeners = {}\n\n/**\n * This function is used to call all handlers on url or state change\n * @type {Function}\n */\nconst handler = function () {\n  const url = window.location.toString()\n\n  loop( listeners, ( listener ) => {\n    listener( url )\n  } )\n}\n\nwindow.addEventListener( 'pageshow', () => { handler() } )\nwindow.addEventListener( 'hashchage', () => { handler() } )\nwindow.addEventListener( 'popstate', () => { handler() } )\nhistory.onpushstate = () => { handler() }\n\n// Create the `pushstate` event\n/**\n * This variable is a shorthand for history.pushState\n * @type {String}\n */\nlet pushState = history.pushState\n/**\n * Add a new method to history, to call use when the state or url changes\n */\nhistory.pushState = function () {\n  let next = pushState.apply( history, arguments )\n  if ( typeof history.onpushstate === 'function' ) {\n    history.onpushstate()\n  }\n  return next\n}\n\n/**\n * A static class which is responsible for handling state and url change\n * Remember to remove <base/> in most common scenarios\n */\nexport class Router {\n  /**\n   * A static method used to push a new state\n   * @param {String} url The new url\n   */\n  static redirect ( url ) {\n    history.pushState( { url: url }, '', url )\n  }\n\n  /**\n   * A static method used to attach a handler to the state change. It returns a function that can be called to remove the handler when it is no longer used\n   * @param {Function} listener The state change handler\n   * @return {Function}\n   */\n  static onStateChange ( listener ) {\n    let id = uid()\n    listeners[ id ] = listener\n    return () => {\n      delete listeners[ id ]\n    }\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/libs/router.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 86,
    "kind": "variable",
    "name": "listeners",
    "memberof": "scripts/libs/router.js",
    "static": true,
    "longname": "scripts/libs/router.js~listeners",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/router.js",
    "importStyle": null,
    "description": "Holds all the handlers bound to the router class. Since the class is static, all imports will point to the same class",
    "lineNumber": 12,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 87,
    "kind": "function",
    "name": "handler",
    "memberof": "scripts/libs/router.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/libs/router.js~handler",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/router.js",
    "importStyle": null,
    "description": "This function is used to call all handlers on url or state change",
    "lineNumber": 18,
    "type": {
      "nullable": null,
      "types": [
        "Function"
      ],
      "spread": false,
      "description": null
    },
    "params": [],
    "return": null,
    "ignore": true
  },
  {
    "__docId__": 88,
    "kind": "variable",
    "name": "pushState",
    "memberof": "scripts/libs/router.js",
    "static": true,
    "longname": "scripts/libs/router.js~pushState",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/router.js",
    "importStyle": null,
    "description": "This variable is a shorthand for history.pushState",
    "lineNumber": 36,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 89,
    "kind": "function",
    "name": "pushState",
    "memberof": "scripts/libs/router.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/libs/router.js~pushState",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/libs/router.js",
    "importStyle": null,
    "description": "Add a new method to history, to call use when the state or url changes",
    "lineNumber": 40,
    "params": [],
    "return": {
      "types": [
        "*"
      ]
    },
    "ignore": true
  },
  {
    "__docId__": 90,
    "kind": "class",
    "name": "Router",
    "memberof": "scripts/libs/router.js",
    "static": true,
    "longname": "scripts/libs/router.js~Router",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/libs/router.js",
    "importStyle": "{Router}",
    "description": "A static class which is responsible for handling state and url change\nRemember to remove <base/> in most common scenarios",
    "lineNumber": 52,
    "interface": false
  },
  {
    "__docId__": 91,
    "kind": "method",
    "name": "redirect",
    "memberof": "scripts/libs/router.js~Router",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/libs/router.js~Router.redirect",
    "access": "public",
    "description": "A static method used to push a new state",
    "lineNumber": 57,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The new url"
      }
    ],
    "return": null
  },
  {
    "__docId__": 92,
    "kind": "method",
    "name": "onStateChange",
    "memberof": "scripts/libs/router.js~Router",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/libs/router.js~Router.onStateChange",
    "access": "public",
    "description": "A static method used to attach a handler to the state change. It returns a function that can be called to remove the handler when it is no longer used",
    "lineNumber": 66,
    "params": [
      {
        "nullable": null,
        "types": [
          "Function"
        ],
        "spread": false,
        "optional": false,
        "name": "listener",
        "description": "The state change handler"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Function"
      ],
      "spread": false,
      "description": ""
    }
  },
  {
    "__docId__": 93,
    "kind": "file",
    "name": "scripts/utils/approx.js",
    "content": "'use strict'\n\n/**\n * Used to approximate a number to a certain number of decimals\n * @param {Numeric} num The number to be approximated\n * @param {Numeric} decimals The number of decimals to approximate to\n * @return {Numeric} A new number\n */\nexport let approx = ( num, decimals ) => {\n  return parseFloat( parseFloat( num ).toFixed( decimals ) )\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/approx.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 94,
    "kind": "function",
    "name": "approx",
    "memberof": "scripts/utils/approx.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/approx.js~approx",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/approx.js",
    "importStyle": "{approx}",
    "description": "Used to approximate a number to a certain number of decimals",
    "lineNumber": 9,
    "params": [
      {
        "nullable": null,
        "types": [
          "Numeric"
        ],
        "spread": false,
        "optional": false,
        "name": "num",
        "description": "The number to be approximated"
      },
      {
        "nullable": null,
        "types": [
          "Numeric"
        ],
        "spread": false,
        "optional": false,
        "name": "decimals",
        "description": "The number of decimals to approximate to"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Numeric"
      ],
      "spread": false,
      "description": "A new number"
    }
  },
  {
    "__docId__": 95,
    "kind": "file",
    "name": "scripts/utils/communication.js",
    "content": "/* globals XMLHttpRequest, FormData, document */\n\nimport { extend } from './extend.js'\n\n/**\n * This class is responsible for server communication using http requests\n */\nexport class Communication {\n  /**\n   * Creates an instance of Communication\n   * @param {FormData} [form] An existing form that would be sent\n   */\n  constructor ( form ) {\n    /**\n     * The FormData to use when sending the request, see https://developer.mozilla.org/en-US/docs/Web/API/FormData\n     * @type {FormData}\n     * @private\n     */\n    this.__form = new FormData( form )\n    /**\n     * The XMLHttpRequest to use in the request\n     * @type {XMLHttpRequest}\n     * @private\n     */\n    this.__request = new XMLHttpRequest()\n    /**\n     * Contains all the headers for the request\n     * @type {Object}\n     * @private\n     */\n    this.__headers = {}\n  }\n\n  /**\n   * Returns the FormData object attached to the request. This makes it easier to control the fields.\n   * @return {FormData} FormData attached to the request\n   */\n  get form () {\n    return this.__form\n  }\n\n  /**\n   * Sets a header to the request\n   * @param {String} name Header name\n   * @param {String} value Header value\n   */\n  setHeader ( name, value ) {\n    this.__headers[ name ] = value\n  }\n\n  /**\n   * Gets a header by key\n   * @param {String} name Header name\n   * @return {String} Header value\n   */\n  getHeader ( name ) {\n    return this.__headers[ name ]\n  }\n\n  /**\n   * Delete a header by key\n   * @param {String} name Header name\n   */\n  deleteHeader ( name ) {\n    delete this.__headers[ name ]\n  }\n\n  /**\n   * Returns an object containing all the headers sets\n   * @return {Object} Object containing all the headers\n   */\n  getHeaders () {\n    return extend( {}, this.__headers )\n  }\n\n  /**\n   * Clears all the set headers\n   */\n  clearHeaders () {\n    this.__headers = {}\n  }\n\n  /**\n   * Sets a listener to track the progress of the request\n   * @param {Function} [progress=null] This function has two parameters, one parameter represents the progress value and the second is the event for onprogress\n   * @param {Function} end This function has three parameters, one parameter is the error and one which contains the responseText, and the third one will contain the entire event of onloadend\n   */\n  listener ( progress, end ) {\n    const self = this\n    this.__request.onloadend = function ( ev ) {\n      if ( self.__request.status === 200 ) {\n        end( null, ev.target.responseText, ev )\n      } else {\n        end( self.__request.status, ev.target.responseText, ev )\n      }\n    }\n    if ( progress ) {\n      this.__request.onprogress = function ( ev ) {\n        if ( ev.lengthComputable ) {\n          progress( ev.loaded / ev.total, ev )\n        } else {\n          progress( null, ev )\n        }\n      }\n    }\n  }\n\n  /**\n   * Parse a url to the correct format\n   * @param {String} url The url to request to\n   */\n  parseUrl ( url ) {\n    let div = document.createElement( 'div' )\n    div.innerHTML = '<a></a>'\n    div.firstChild.href = url // Ensures that the href is properly escaped\n    return div.firstChild.href\n  }\n\n  /**\n   * Abort a request\n   */\n  cancel () {\n    this.__request.abort()\n  }\n\n  /**\n   * Initiate the request\n   * @param {String} url The url to request to\n   * @param {String} method Either POST or GET\n   */\n  send ( url, method ) {\n    url = this.parseUrl( url )\n    this.__request.open( method.toUpperCase(), url )\n    for ( let i = 0, k = Object.keys( this.__headers ), l = k.length; i < l; i++ ) {\n      this.__request.setRequestHeader( k[ i ], this.__headers[ k[ i ] ] )\n    }\n    this.__request.send( this.__form )\n  }\n\n  /**\n   * Initiate a POST request\n   * @param {String} url The url to request to\n   */\n  post ( url ) {\n    this.send( url, 'POST' )\n  }\n\n  /**\n   * Initiate a GET request\n   * @param {String} url The url to request to\n   */\n  get ( url ) {\n    this.send( url, 'GET' )\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/communication.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 96,
    "kind": "class",
    "name": "Communication",
    "memberof": "scripts/utils/communication.js",
    "static": true,
    "longname": "scripts/utils/communication.js~Communication",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/communication.js",
    "importStyle": "{Communication}",
    "description": "This class is responsible for server communication using http requests",
    "lineNumber": 8,
    "interface": false
  },
  {
    "__docId__": 97,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#constructor",
    "access": "public",
    "description": "Creates an instance of Communication",
    "lineNumber": 13,
    "params": [
      {
        "nullable": null,
        "types": [
          "FormData"
        ],
        "spread": false,
        "optional": true,
        "name": "form",
        "description": "An existing form that would be sent"
      }
    ]
  },
  {
    "__docId__": 98,
    "kind": "member",
    "name": "__form",
    "memberof": "scripts/utils/communication.js~Communication",
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#__form",
    "access": "private",
    "description": "The FormData to use when sending the request, see https://developer.mozilla.org/en-US/docs/Web/API/FormData",
    "lineNumber": 19,
    "type": {
      "nullable": null,
      "types": [
        "FormData"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 99,
    "kind": "member",
    "name": "__request",
    "memberof": "scripts/utils/communication.js~Communication",
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#__request",
    "access": "private",
    "description": "The XMLHttpRequest to use in the request",
    "lineNumber": 25,
    "type": {
      "nullable": null,
      "types": [
        "XMLHttpRequest"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 100,
    "kind": "member",
    "name": "__headers",
    "memberof": "scripts/utils/communication.js~Communication",
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#__headers",
    "access": "private",
    "description": "Contains all the headers for the request",
    "lineNumber": 31,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 101,
    "kind": "get",
    "name": "form",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#form",
    "access": "public",
    "description": "Returns the FormData object attached to the request. This makes it easier to control the fields.",
    "lineNumber": 38,
    "return": {
      "nullable": null,
      "types": [
        "FormData"
      ],
      "spread": false,
      "description": "FormData attached to the request"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 102,
    "kind": "method",
    "name": "setHeader",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#setHeader",
    "access": "public",
    "description": "Sets a header to the request",
    "lineNumber": 47,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "Header name"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Header value"
      }
    ],
    "return": null
  },
  {
    "__docId__": 103,
    "kind": "method",
    "name": "getHeader",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#getHeader",
    "access": "public",
    "description": "Gets a header by key",
    "lineNumber": 56,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "Header name"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "Header value"
    }
  },
  {
    "__docId__": 104,
    "kind": "method",
    "name": "deleteHeader",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#deleteHeader",
    "access": "public",
    "description": "Delete a header by key",
    "lineNumber": 64,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "Header name"
      }
    ],
    "return": null
  },
  {
    "__docId__": 105,
    "kind": "method",
    "name": "getHeaders",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#getHeaders",
    "access": "public",
    "description": "Returns an object containing all the headers sets",
    "lineNumber": 72,
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "Object containing all the headers"
    },
    "params": []
  },
  {
    "__docId__": 106,
    "kind": "method",
    "name": "clearHeaders",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#clearHeaders",
    "access": "public",
    "description": "Clears all the set headers",
    "lineNumber": 79,
    "params": [],
    "return": null
  },
  {
    "__docId__": 108,
    "kind": "method",
    "name": "listener",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#listener",
    "access": "public",
    "description": "Sets a listener to track the progress of the request",
    "lineNumber": 88,
    "params": [
      {
        "nullable": null,
        "types": [
          "Function"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "null",
        "defaultRaw": null,
        "name": "progress",
        "description": "This function has two parameters, one parameter represents the progress value and the second is the event for onprogress"
      },
      {
        "nullable": null,
        "types": [
          "Function"
        ],
        "spread": false,
        "optional": false,
        "name": "end",
        "description": "This function has three parameters, one parameter is the error and one which contains the responseText, and the third one will contain the entire event of onloadend"
      }
    ],
    "return": null
  },
  {
    "__docId__": 109,
    "kind": "method",
    "name": "parseUrl",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#parseUrl",
    "access": "public",
    "description": "Parse a url to the correct format",
    "lineNumber": 112,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The url to request to"
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 110,
    "kind": "method",
    "name": "cancel",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#cancel",
    "access": "public",
    "description": "Abort a request",
    "lineNumber": 122,
    "params": [],
    "return": null
  },
  {
    "__docId__": 111,
    "kind": "method",
    "name": "send",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#send",
    "access": "public",
    "description": "Initiate the request",
    "lineNumber": 131,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The url to request to"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "method",
        "description": "Either POST or GET"
      }
    ],
    "return": null
  },
  {
    "__docId__": 112,
    "kind": "method",
    "name": "post",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#post",
    "access": "public",
    "description": "Initiate a POST request",
    "lineNumber": 144,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The url to request to"
      }
    ],
    "return": null
  },
  {
    "__docId__": 113,
    "kind": "method",
    "name": "get",
    "memberof": "scripts/utils/communication.js~Communication",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/communication.js~Communication#get",
    "access": "public",
    "description": "Initiate a GET request",
    "lineNumber": 152,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The url to request to"
      }
    ],
    "return": null
  },
  {
    "__docId__": 114,
    "kind": "file",
    "name": "scripts/utils/cookie.js",
    "content": "/* globals document */\n\n'use strict'\n\n/**\n * Static cookie class\n */\nexport class Cookie {\n  /**\n   * Set a browser cookie\n   * @param {String} name Name of the cookie\n   * @param {String} value Value of the cookie\n   * @param {String} path The cookie path\n   * @param {Numeric} seconds The cookie lifetime\n   */\n  static set ( name, value, path, seconds ) {\n    let expires\n    if ( seconds ) {\n      let date = new Date()\n      date.setTime( date.getTime() + ( seconds * 1000 ) )\n      expires = '; expires=' + date.toGMTString()\n    } else {\n      expires = ''\n    }\n    document.cookie = name + '=' + value + expires + '; path=' + ( path || '/' )\n  }\n\n  /**\n   * Returns the value of a browser cookie\n   * @param {String} name Name of the cookie to be retrieved\n   * @return {String} Returns the value of the cookie\n   */\n  static get ( name ) {\n    name = name + '='\n    let decodedCookie = decodeURIComponent( document.cookie )\n    let cookies = decodedCookie.split( ';' )\n    for ( let i = 0; i < cookies.length; i++ ) {\n      let cookie = cookies[ i ]\n      while ( cookie.charAt( 0 ) === ' ' ) {\n        cookie = cookie.substring( 1 )\n      }\n      if ( cookie.indexOf( name ) === 0 ) {\n        return cookie.substring( name.length, cookie.length )\n      }\n    }\n    return ''\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/cookie.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 115,
    "kind": "class",
    "name": "Cookie",
    "memberof": "scripts/utils/cookie.js",
    "static": true,
    "longname": "scripts/utils/cookie.js~Cookie",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/cookie.js",
    "importStyle": "{Cookie}",
    "description": "Static cookie class",
    "lineNumber": 8,
    "interface": false
  },
  {
    "__docId__": 116,
    "kind": "method",
    "name": "set",
    "memberof": "scripts/utils/cookie.js~Cookie",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/cookie.js~Cookie.set",
    "access": "public",
    "description": "Set a browser cookie",
    "lineNumber": 16,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "Name of the cookie"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Value of the cookie"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "path",
        "description": "The cookie path"
      },
      {
        "nullable": null,
        "types": [
          "Numeric"
        ],
        "spread": false,
        "optional": false,
        "name": "seconds",
        "description": "The cookie lifetime"
      }
    ],
    "return": null
  },
  {
    "__docId__": 117,
    "kind": "method",
    "name": "get",
    "memberof": "scripts/utils/cookie.js~Cookie",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/cookie.js~Cookie.get",
    "access": "public",
    "description": "Returns the value of a browser cookie",
    "lineNumber": 33,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "Name of the cookie to be retrieved"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "Returns the value of the cookie"
    }
  },
  {
    "__docId__": 118,
    "kind": "file",
    "name": "scripts/utils/datetime.js",
    "content": "'use strict'\n\n/**\n * An extenion of Date to DateTime\n */\nexport class DateTime extends Date {\n  /**\n   * Return the date and time in the YYYY-mm-DD HH:MM:ss format\n   * @return {String}\n   */\n  toString () {\n    return '' +\n      this.getFullYear() +\n      '-' +\n      ( this.getMonth() + 1 ).toString().padStart( 2, '0' ) +\n      '-' +\n      this.getDate().toString().padStart( 2, '0' ) +\n      ' ' +\n      this.getHours().toString().padStart( 2, '0' ) +\n      ':' +\n      this.getMinutes().toString().padStart( 2, '0' ) +\n      ':' +\n      this.getSeconds().toString().padStart( 2, '0' )\n  }\n\n  /**\n   * Returns the date and time in the HH:MM:ss format\n   * @return {String}\n   */\n  toTime () {\n    return '' +\n      this.getHours().toString().padStart( 2, '0' ) +\n      ':' +\n      this.getMinutes().toString().padStart( 2, '0' ) +\n      ':' +\n      this.getSeconds().toString().padStart( 2, '0' ) +\n      '.' +\n      this.getMilliseconds().toString().padStart( 3, '0' )\n  }\n\n  /**\n   * Returns the date and time in the YYYY-mm-DD format\n   * @return {String}\n   */\n  toDate () {\n    return '' +\n      this.getFullYear() +\n      '-' +\n      ( this.getMonth() + 1 ).toString().padStart( 2, '0' ) +\n      '-' +\n      this.getDate().toString().padStart( 2, '0' )\n  }\n\n  /**\n   * Returns the milliseconds since the date was created to now\n   * @return {String}\n   */\n  elapsedTime () {\n    return Date.now() - this.getTime()\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/datetime.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 119,
    "kind": "class",
    "name": "DateTime",
    "memberof": "scripts/utils/datetime.js",
    "static": true,
    "longname": "scripts/utils/datetime.js~DateTime",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/datetime.js",
    "importStyle": "{DateTime}",
    "description": "An extenion of Date to DateTime",
    "lineNumber": 6,
    "interface": false,
    "extends": [
      "Date"
    ]
  },
  {
    "__docId__": 120,
    "kind": "method",
    "name": "toString",
    "memberof": "scripts/utils/datetime.js~DateTime",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/datetime.js~DateTime#toString",
    "access": "public",
    "description": "Return the date and time in the YYYY-mm-DD HH:MM:ss format",
    "lineNumber": 11,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 121,
    "kind": "method",
    "name": "toTime",
    "memberof": "scripts/utils/datetime.js~DateTime",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/datetime.js~DateTime#toTime",
    "access": "public",
    "description": "Returns the date and time in the HH:MM:ss format",
    "lineNumber": 30,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 122,
    "kind": "method",
    "name": "toDate",
    "memberof": "scripts/utils/datetime.js~DateTime",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/datetime.js~DateTime#toDate",
    "access": "public",
    "description": "Returns the date and time in the YYYY-mm-DD format",
    "lineNumber": 45,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 123,
    "kind": "method",
    "name": "elapsedTime",
    "memberof": "scripts/utils/datetime.js~DateTime",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/datetime.js~DateTime#elapsedTime",
    "access": "public",
    "description": "Returns the milliseconds since the date was created to now",
    "lineNumber": 58,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 124,
    "kind": "file",
    "name": "scripts/utils/device.js",
    "content": "/* globals navigator, window */\n\n'use strict'\n\n/**\n * Returns the device type based on user agent\n * @return {String}\n */\nconst getDeviceTypeByUa = () => {\n  const ua = navigator.userAgent || navigator.vendor || window.opera\n\n  let type = 'other'\n\n  // get device\n  if ( ua.match( /(iPhone)/ ) ) {\n    type = 'iPhone'\n  } else if ( ua.match( /(iPad)/ ) ) {\n    type = 'iPad'\n  } else if ( ua.match( /(iPod)/ ) ) {\n    type = 'iPod'\n  } else if ( ua.match( /(BlackBerry|BB10)/ ) ) {\n    type = 'BlackBerry'\n  } else if ( ua.match( /(IEMobile|windows phone)/ ) ) {\n    type = 'WindowsMobile'\n  } else if ( ua.match( /(Android)/ ) ) {\n    type = 'Android'\n  } else if ( ua.match( /(Macintosh)/ ) ) {\n    type = 'Macintosh'\n  } else if ( ua.match( /(Windows)/ ) ) {\n    type = 'Windows'\n  } else if ( ua.match( /(Linux)/ ) ) {\n    type = 'Linux'\n  }\n\n  return type\n}\n\n/**\n * A static class which is used to get device information\n */\nexport class Device {\n  /**\n   * Returns the device name\n   * @return {String}\n   */\n  static type () {\n    return getDeviceTypeByUa()\n  }\n\n  /**\n   * Returns true if the device is a desktop\n   * @return {Boolean}\n   */\n  static isDesktop () {\n    return [ 'Windows', 'Linux', 'Macintosh', 'other' ].indexOf( getDeviceTypeByUa() ) !== -1\n  }\n\n  /**\n   * Returns true if the device is a mobile device\n   * @return {Boolean}\n   */\n  static isMobile () {\n    return [ 'Windows', 'Linux', 'Macintosh', 'other' ].indexOf( getDeviceTypeByUa() ) === -1\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/device.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 125,
    "kind": "function",
    "name": "getDeviceTypeByUa",
    "memberof": "scripts/utils/device.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/device.js~getDeviceTypeByUa",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/device.js",
    "importStyle": null,
    "description": "Returns the device type based on user agent",
    "lineNumber": 9,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": ""
    },
    "params": [],
    "ignore": true
  },
  {
    "__docId__": 126,
    "kind": "class",
    "name": "Device",
    "memberof": "scripts/utils/device.js",
    "static": true,
    "longname": "scripts/utils/device.js~Device",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/device.js",
    "importStyle": "{Device}",
    "description": "A static class which is used to get device information",
    "lineNumber": 41,
    "interface": false
  },
  {
    "__docId__": 127,
    "kind": "method",
    "name": "type",
    "memberof": "scripts/utils/device.js~Device",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/device.js~Device.type",
    "access": "public",
    "description": "Returns the device name",
    "lineNumber": 46,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 128,
    "kind": "method",
    "name": "isDesktop",
    "memberof": "scripts/utils/device.js~Device",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/device.js~Device.isDesktop",
    "access": "public",
    "description": "Returns true if the device is a desktop",
    "lineNumber": 54,
    "return": {
      "nullable": null,
      "types": [
        "Boolean"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 129,
    "kind": "method",
    "name": "isMobile",
    "memberof": "scripts/utils/device.js~Device",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/device.js~Device.isMobile",
    "access": "public",
    "description": "Returns true if the device is a mobile device",
    "lineNumber": 62,
    "return": {
      "nullable": null,
      "types": [
        "Boolean"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 130,
    "kind": "file",
    "name": "scripts/utils/extend.js",
    "content": "'use strict'\n\nimport { isObject } from './isobject.js'\n\n/**\n * Extends an object with another object\n * @param {Object} o1 The object to be extended\n * @param {Object} o2 The object to extend with\n * @return {Object} Returns the source object\n */\nexport let extend = ( o1, o2 ) => {\n  if ( isObject( o1 ) && isObject( o2 ) ) {\n    let keys = Object.keys( Object.assign( {}, o1, o2 ) )\n    for ( let i = 0; i < keys.length; i++ ) {\n      o1[ keys[i] ] = extend( o1[ keys[ i ] ], o2[ keys[ i ] ] )\n    }\n  } else if ( o2 !== undefined ) {\n    return o2\n  }\n  return o1\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/extend.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 131,
    "kind": "function",
    "name": "extend",
    "memberof": "scripts/utils/extend.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/extend.js~extend",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/extend.js",
    "importStyle": "{extend}",
    "description": "Extends an object with another object",
    "lineNumber": 11,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "o1",
        "description": "The object to be extended"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "o2",
        "description": "The object to extend with"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "Returns the source object"
    }
  },
  {
    "__docId__": 132,
    "kind": "file",
    "name": "scripts/utils/font.js",
    "content": "/* globals document */\n'use strict'\n\nimport { html } from './html.js'\nimport { loop } from './loop.js'\n\n/**\n * Contains the Adobe Blank font code to be used in testing\n * @external {Adobe Blank} https://github.com/adobe-fonts/adobe-blank\n */\nimport AdobeBlankCss from './../../styles/adobe-blank.inline.scss'\n\n/**\n * Creates a font test container\n * @param {String} name The name of the container\n * @return {HTMLElement} The html tag containing the test text\n */\nlet createContainer = ( name ) => {\n  return html( `\n    <span id=\"modux-font-` + name + `\" style=\"position: absolute; top: -500px\">\n      abcdefghijklmnopqrstuvwxyz\n      1234567890\n      ABCDEFGHIGKLMNOPQRSTUVWXYZ\n      !? -_\n    </span>\n  ` )\n}\n\n/**\n * A class used to load fonts\n */\nexport class Font {\n  /**\n   * Creates a new instance of Font\n   * @param {String} font Holds the font name\n   * @param {Object} styles Holds the font styles as object properties\n   */\n  constructor ( font, styles ) {\n    /**\n     * Holds the font name\n     * @type {String}\n     * @private\n     */\n    this.__font = font\n    /**\n     * Holds the font styles as object properties\n     * @type {Object}\n     * @private\n     */\n    this.__styles = styles\n  }\n\n  /**\n   * Returns a new instance of Font\n   * @param {String} font Holds the font name\n   * @param {Object} styles Holds the font styles as object properties\n   * @return {Font} The newly created Font instance\n   */\n  static create ( font, styles ) {\n    return new Font( font, styles )\n  }\n\n  /**\n   * Loads the font into the html document\n   * @param {Array} srcs An array of sources pointing to the font file ( ttf, otf, etc )\n   * @return {Font} Returns the current instance of the class\n   */\n  get ( srcs ) {\n    /**\n     * Holds the fontfile css source\n     * @type {HTMLElement}\n     * @private\n     */\n    this.__fontfile = html( '<style></style>' )\n    document.head.appendChild( this.__fontfile )\n    let data = 'src: ' + srcs.join( ', ' ) + ';\\n'\n    loop( this.__styles, ( value, key ) => {\n      data += key + ': ' + value + ';\\n'\n    } )\n    this.__fontfile.innerHTML = `\n    @font-face {\n      font-family: '` + this.__font + `';\n      ` + data + `\n    }\n    `\n    return this\n  }\n\n  /**\n   * Destroy font related tags\n   */\n  destroy () {\n    if ( this.__fontfile ) {\n      this.__fontfile.remove()\n    }\n  }\n\n  /**\n   * A method to check if a font has been loaded\n   * @param {Number} [attempts=-1] The number of attempts before the promise is rejected. Default is infinite.\n   * @param {Number} [interval=100] The time in milliseconds it takes to retry the load\n   * @return {Promise} A promise that is resolved when the font is loaded\n  */\n  load ( attempts, interval ) {\n    attempts = attempts || -1\n\n    let blankFontStyle = html( '<style></style>' )\n    document.head.appendChild( blankFontStyle )\n    blankFontStyle.innerHTML = AdobeBlankCss\n\n    let container = createContainer( this.__font )\n    document.body.appendChild( container )\n\n    container.style.fontFamily = '\"' + this.__font + '\", \"AdobeBlank\"'\n\n    loop( this.__styles, ( value, key ) => {\n      container.style[ key ] = value\n    } )\n\n    let count = 0\n\n    return new Promise( ( resolve, reject ) => {\n      let cleanUp = () => {\n        container.parentNode.removeChild( container )\n        blankFontStyle.remove()\n      }\n      let timer = () => {\n        if ( container.offsetWidth > 0 ) {\n          cleanUp()\n          resolve()\n        } else {\n          count++\n          if ( count === attempts ) {\n            cleanUp()\n            reject()\n          } else {\n            setTimeout( timer, interval || 100 )\n          }\n        }\n      }\n\n      setTimeout( () => {\n        timer()\n      }, interval || 100 )\n    } )\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/font.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 133,
    "kind": "external",
    "name": "Adobe Blank",
    "externalLink": "https://github.com/adobe-fonts/adobe-blank",
    "memberof": "scripts/utils/font.js",
    "static": true,
    "longname": "scripts/utils/font.js~Adobe Blank",
    "access": "public",
    "description": "Contains the Adobe Blank font code to be used in testing",
    "lineNumber": 11
  },
  {
    "__docId__": 134,
    "kind": "function",
    "name": "createContainer",
    "memberof": "scripts/utils/font.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/font.js~createContainer",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/font.js",
    "importStyle": null,
    "description": "Creates a font test container",
    "lineNumber": 18,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "The name of the container"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "HTMLElement"
      ],
      "spread": false,
      "description": "The html tag containing the test text"
    },
    "ignore": true
  },
  {
    "__docId__": 135,
    "kind": "class",
    "name": "Font",
    "memberof": "scripts/utils/font.js",
    "static": true,
    "longname": "scripts/utils/font.js~Font",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/font.js",
    "importStyle": "{Font}",
    "description": "A class used to load fonts",
    "lineNumber": 32,
    "interface": false
  },
  {
    "__docId__": 136,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/font.js~Font",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/font.js~Font#constructor",
    "access": "public",
    "description": "Creates a new instance of Font",
    "lineNumber": 38,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "font",
        "description": "Holds the font name"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "styles",
        "description": "Holds the font styles as object properties"
      }
    ]
  },
  {
    "__docId__": 137,
    "kind": "member",
    "name": "__font",
    "memberof": "scripts/utils/font.js~Font",
    "static": false,
    "longname": "scripts/utils/font.js~Font#__font",
    "access": "private",
    "description": "Holds the font name",
    "lineNumber": 44,
    "type": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 138,
    "kind": "member",
    "name": "__styles",
    "memberof": "scripts/utils/font.js~Font",
    "static": false,
    "longname": "scripts/utils/font.js~Font#__styles",
    "access": "private",
    "description": "Holds the font styles as object properties",
    "lineNumber": 50,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 139,
    "kind": "method",
    "name": "create",
    "memberof": "scripts/utils/font.js~Font",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/font.js~Font.create",
    "access": "public",
    "description": "Returns a new instance of Font",
    "lineNumber": 59,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "font",
        "description": "Holds the font name"
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "styles",
        "description": "Holds the font styles as object properties"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Font"
      ],
      "spread": false,
      "description": "The newly created Font instance"
    }
  },
  {
    "__docId__": 140,
    "kind": "method",
    "name": "get",
    "memberof": "scripts/utils/font.js~Font",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/font.js~Font#get",
    "access": "public",
    "description": "Loads the font into the html document",
    "lineNumber": 68,
    "params": [
      {
        "nullable": null,
        "types": [
          "Array"
        ],
        "spread": false,
        "optional": false,
        "name": "srcs",
        "description": "An array of sources pointing to the font file ( ttf, otf, etc )"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Font"
      ],
      "spread": false,
      "description": "Returns the current instance of the class"
    }
  },
  {
    "__docId__": 141,
    "kind": "member",
    "name": "__fontfile",
    "memberof": "scripts/utils/font.js~Font",
    "static": false,
    "longname": "scripts/utils/font.js~Font#__fontfile",
    "access": "private",
    "description": "Holds the fontfile css source",
    "lineNumber": 74,
    "type": {
      "nullable": null,
      "types": [
        "HTMLElement"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 142,
    "kind": "method",
    "name": "destroy",
    "memberof": "scripts/utils/font.js~Font",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/font.js~Font#destroy",
    "access": "public",
    "description": "Destroy font related tags",
    "lineNumber": 92,
    "params": [],
    "return": null
  },
  {
    "__docId__": 143,
    "kind": "method",
    "name": "load",
    "memberof": "scripts/utils/font.js~Font",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/font.js~Font#load",
    "access": "public",
    "description": "A method to check if a font has been loaded",
    "lineNumber": 104,
    "params": [
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "-1",
        "defaultRaw": -1,
        "name": "attempts",
        "description": "The number of attempts before the promise is rejected. Default is infinite."
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "100",
        "defaultRaw": 100,
        "name": "interval",
        "description": "The time in milliseconds it takes to retry the load"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "A promise that is resolved when the font is loaded"
    }
  },
  {
    "__docId__": 144,
    "kind": "file",
    "name": "scripts/utils/html.js",
    "content": "/* globals document */\n'use strict'\n\n/**\n * Convert string to html\n * @param {String} text HTML code represented as String\n * @return {HTMLElement}\n */\nexport let html = ( text ) => {\n  let container = document.createElement( 'section' )\n  container.innerHTML = ( text.default ) ? text.default : text.trim()\n  return container.firstChild\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/html.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 145,
    "kind": "function",
    "name": "html",
    "memberof": "scripts/utils/html.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/html.js~html",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/html.js",
    "importStyle": "{html}",
    "description": "Convert string to html",
    "lineNumber": 9,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "HTML code represented as String"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "HTMLElement"
      ],
      "spread": false,
      "description": ""
    }
  },
  {
    "__docId__": 146,
    "kind": "file",
    "name": "scripts/utils/isnumber.js",
    "content": "'use strict'\n\n/**\n * Checks if the value is a number\n * @param {mixed} value The value to be checked if it's a number\n * @return {Boolean} Returns true if value is a number\n */\nexport let isNumber = value => ( Number( parseFloat( value ) ) === value )\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/isnumber.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 147,
    "kind": "function",
    "name": "isNumber",
    "memberof": "scripts/utils/isnumber.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/isnumber.js~isNumber",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/isnumber.js",
    "importStyle": "{isNumber}",
    "description": "Checks if the value is a number",
    "lineNumber": 8,
    "params": [
      {
        "nullable": null,
        "types": [
          "mixed"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "The value to be checked if it's a number"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Boolean"
      ],
      "spread": false,
      "description": "Returns true if value is a number"
    }
  },
  {
    "__docId__": 148,
    "kind": "file",
    "name": "scripts/utils/isobject.js",
    "content": "'use strict'\n\n/**\n * Checks if the object is an Object\n * @param {mixed} o The value to be checked if its an Object\n * @return {Boolean} Returns true if the value is an Object\n */\nexport let isObject = o => !Array.isArray( o ) && o !== null && typeof o === 'object' && Object.prototype.toString.call( o ) === '[object Object]'\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/isobject.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 149,
    "kind": "function",
    "name": "isObject",
    "memberof": "scripts/utils/isobject.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/isobject.js~isObject",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/isobject.js",
    "importStyle": "{isObject}",
    "description": "Checks if the object is an Object",
    "lineNumber": 8,
    "params": [
      {
        "nullable": null,
        "types": [
          "mixed"
        ],
        "spread": false,
        "optional": false,
        "name": "o",
        "description": "The value to be checked if its an Object"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Boolean"
      ],
      "spread": false,
      "description": "Returns true if the value is an Object"
    }
  },
  {
    "__docId__": 150,
    "kind": "file",
    "name": "scripts/utils/loader.js",
    "content": "/* globals XMLHttpRequest, Image, Audio */\n\n'use strict'\n\nimport { loop } from './loop.js'\nimport { isObject } from './isobject.js'\n\n/**\n * The Loader class is used to preload files\n */\nclass Loader {\n  /**\n   * Creates an instance of the Loader class\n   */\n  constructor () {\n    /**\n     * Contains a cache of files\n     * @type {Object}\n     * @private\n     */\n    this.__cache = {}\n  }\n\n  /**\n   * Create a new instance of the Loader\n   * @return {Loader} The new Loader instance\n   */\n  create () {\n    return new Loader()\n  }\n\n  /**\n   * Preload an image\n   * @param {String} id A unique identifier for this file\n   * @param {String} url The image url to load\n   * @param {Image} image The image oject used to load the asset. If null a new one will be created.\n   * @return {Promise} Returns a promise which is resolved upon loading\n   */\n  preloadImage ( id, url, image ) {\n    let img = image || new Image()\n    return new Promise( ( resolve, reject ) => {\n      img.onload = () => {\n        this.__cache[ id ] = img\n        resolve( this.__cache[ id ] )\n      }\n      img.onerror = ( err ) => {\n        reject( err )\n      }\n      img.src = url\n    } )\n  }\n\n  /**\n   * Preload an audio file\n   * @param {String} id A unique identifier for this file\n   * @param {String} url The audio url to load\n   * @param {Audio} audio The audio oject used to load the asset. If null a new one will be created.\n   * @return {Promise} Returns a promise which is resolved upon loading\n   */\n  preloadAudio ( id, url, audio ) {\n    let sound = audio || new Audio()\n    return new Promise( ( resolve, reject ) => {\n      sound.addEventListener( 'canplay', () => {\n        this.__cache[ id ] = sound\n        resolve( this.__cache[ id ] )\n      } )\n      sound.onerror = ( err ) => {\n        reject( err )\n      }\n      sound.src = url\n    } )\n  }\n\n  /**\n   * Preload a file using HTTPRequest\n   * @param {String} id A unique identifier for this file\n   * @param {String} url The file url to load\n   * @param {XMLHttpRequest} request The xhr oject used to load the asset. If null a new one will be created.\n   * @return {Promise} Returns a promise which is resolved upon loading\n   */\n  preloadFile ( id, url, request ) {\n    let xhr = request || new XMLHttpRequest()\n    return new Promise( ( resolve, reject ) => {\n      xhr.open( 'GET', url )\n      xhr.onload = () => {\n        this.__cache[ id ] = xhr.responseText\n        resolve( this.__cache[ id ] )\n      }\n      xhr.onerror = ( err ) => {\n        reject( err )\n      }\n      xhr.send()\n    } )\n  }\n\n  /**\n   * Load a list of files\n   * @param {Object} files Contains a list of files to load with the following structure: { \"file1\": \"url1\", \"file2\": \"url2\" } or { \"file1\": { type: \"image|audio|file\", url: \"url1\", obj: objectLoader|null } }\n   * @param {Function} progress A callback function with the parameters: \"err, id, data, loaded, total\"\n   * @return {Promise} Returns a promise which is resolved upon loading all files, doesn't matter if they failed or not\n   */\n  preload ( files, progress ) {\n    return new Promise( ( resolve ) => {\n      let total = Object.keys( files ).length\n      let loaded = 0\n      let index = 0\n\n      let process = ( err, id, data, loaded, total ) => {\n        if ( typeof progress === 'function' ) {\n          progress( err, id, data, loaded, total )\n        }\n        index++\n        if ( total === index ) {\n          resolve( total - loaded )\n        }\n      }\n\n      if ( total === 0 ) {\n        resolve( 0 )\n      }\n\n      loop( files, ( file, id ) => {\n        let type = 'file'\n        let obj = null\n        let url = file\n        if ( isObject( file ) ) {\n          type = file.type\n          url = file.url\n          obj = file.obj || null\n        }\n        let loader = this[ 'preload' + type.charAt( 0 ).toUpperCase() + type.slice( 1 ).toLowerCase() ]\n        loader.call( this, id, url, obj )\n          .then( ( data ) => {\n            loaded++\n            process( null, id, data, loaded, total )\n          } )\n          .catch( ( err ) => {\n            process( err, id, null, loaded, total )\n          } )\n      } )\n    } )\n  }\n\n  /**\n   * Returns the cache containing the preloaded files\n   * @return {Object}\n   */\n  getCache () {\n    return this.__cache\n  }\n\n  /**\n   * Returns a load file by id\n   * @param {String} id\n   * @return {Object}\n   */\n  get ( id ) {\n    return this.__cache[ id ]\n  }\n}\n\n/**\n * Returns a singleton of the Loader\n */\nexport let loader = new Loader()\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/loader.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 151,
    "kind": "variable",
    "name": "loader",
    "memberof": "scripts/utils/loader.js",
    "static": true,
    "longname": "scripts/utils/loader.js~loader",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/loader.js",
    "importStyle": "{loader}",
    "description": "Returns a singleton of the Loader",
    "lineNumber": 165,
    "type": {
      "types": [
        "scripts/utils/loader.js~Loader"
      ]
    }
  },
  {
    "__docId__": 152,
    "kind": "class",
    "name": "Loader",
    "memberof": "scripts/utils/loader.js",
    "static": true,
    "longname": "scripts/utils/loader.js~Loader",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/loader.js",
    "importStyle": null,
    "description": "The Loader class is used to preload files",
    "lineNumber": 11,
    "pseudoExport": true,
    "interface": false
  },
  {
    "__docId__": 153,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#constructor",
    "access": "public",
    "description": "Creates an instance of the Loader class",
    "lineNumber": 15
  },
  {
    "__docId__": 154,
    "kind": "member",
    "name": "__cache",
    "memberof": "scripts/utils/loader.js~Loader",
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#__cache",
    "access": "private",
    "description": "Contains a cache of files",
    "lineNumber": 21,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 155,
    "kind": "method",
    "name": "create",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#create",
    "access": "public",
    "description": "Create a new instance of the Loader",
    "lineNumber": 28,
    "return": {
      "nullable": null,
      "types": [
        "Loader"
      ],
      "spread": false,
      "description": "The new Loader instance"
    },
    "params": []
  },
  {
    "__docId__": 156,
    "kind": "method",
    "name": "preloadImage",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#preloadImage",
    "access": "public",
    "description": "Preload an image",
    "lineNumber": 39,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "id",
        "description": "A unique identifier for this file"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The image url to load"
      },
      {
        "nullable": null,
        "types": [
          "Image"
        ],
        "spread": false,
        "optional": false,
        "name": "image",
        "description": "The image oject used to load the asset. If null a new one will be created."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise which is resolved upon loading"
    }
  },
  {
    "__docId__": 157,
    "kind": "method",
    "name": "preloadAudio",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#preloadAudio",
    "access": "public",
    "description": "Preload an audio file",
    "lineNumber": 60,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "id",
        "description": "A unique identifier for this file"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The audio url to load"
      },
      {
        "nullable": null,
        "types": [
          "Audio"
        ],
        "spread": false,
        "optional": false,
        "name": "audio",
        "description": "The audio oject used to load the asset. If null a new one will be created."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise which is resolved upon loading"
    }
  },
  {
    "__docId__": 158,
    "kind": "method",
    "name": "preloadFile",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#preloadFile",
    "access": "public",
    "description": "Preload a file using HTTPRequest",
    "lineNumber": 81,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "id",
        "description": "A unique identifier for this file"
      },
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The file url to load"
      },
      {
        "nullable": null,
        "types": [
          "XMLHttpRequest"
        ],
        "spread": false,
        "optional": false,
        "name": "request",
        "description": "The xhr oject used to load the asset. If null a new one will be created."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise which is resolved upon loading"
    }
  },
  {
    "__docId__": 159,
    "kind": "method",
    "name": "preload",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#preload",
    "access": "public",
    "description": "Load a list of files",
    "lineNumber": 102,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "files",
        "description": "Contains a list of files to load with the following structure: { \"file1\": \"url1\", \"file2\": \"url2\" } or { \"file1\": { type: \"image|audio|file\", url: \"url1\", obj: objectLoader|null } }"
      },
      {
        "nullable": null,
        "types": [
          "Function"
        ],
        "spread": false,
        "optional": false,
        "name": "progress",
        "description": "A callback function with the parameters: \"err, id, data, loaded, total\""
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Returns a promise which is resolved upon loading all files, doesn't matter if they failed or not"
    }
  },
  {
    "__docId__": 160,
    "kind": "method",
    "name": "getCache",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#getCache",
    "access": "public",
    "description": "Returns the cache containing the preloaded files",
    "lineNumber": 148,
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": ""
    },
    "params": []
  },
  {
    "__docId__": 161,
    "kind": "method",
    "name": "get",
    "memberof": "scripts/utils/loader.js~Loader",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/loader.js~Loader#get",
    "access": "public",
    "description": "Returns a load file by id",
    "lineNumber": 157,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "id",
        "description": ""
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": ""
    }
  },
  {
    "__docId__": 162,
    "kind": "file",
    "name": "scripts/utils/logger.js",
    "content": "'use strict'\n\n/**\n * A class to mimic window.console\n */\nclass Logger {\n  /**\n   * Creates an instance of Logger\n   * @param {String} [id] The identifier to appear before every output\n   */\n  constructor ( id ) {\n    /**\n     * Stores a unique identifier to pass to the begning of outputs\n     * @private\n     */\n    this.__id = id || '[ APP ]'\n    /**\n     * Stores a boolean value which determines if output will be done or not\n     * @private\n     */\n    this.__debug = false\n  }\n\n  /**\n   * Create a new instance of the Logger\n   * @return {Logger} The new Logger instance\n   */\n  create ( id ) {\n    return new Logger( id )\n  }\n\n  /**\n   * Used to give an identifier to the output\n   * @param {String} id The identifier to appear before every output\n   */\n  setId ( id ) {\n    this.__id = id\n  }\n\n  /**\n   * Enable or disable the console output\n   * @param {Boolean=false} [enabled] Use true if you want the output to appear\n   */\n  enabled ( enabled ) {\n    this.__debug = enabled\n  }\n\n  /**\n   * Wrapper for console.log\n   */\n  log () {\n    if ( this.__debug ) {\n      try {\n        console.log.apply( this, [ this.__id, ...arguments ] )\n      } catch ( e ) {}\n    }\n  }\n\n  /**\n   * Wrapper for console.info\n   */\n  info () {\n    if ( this.__debug ) {\n      try {\n        console.info.apply( this, [ this.__id, ...arguments ] )\n      } catch ( e ) {}\n    }\n  }\n\n  /**\n   * Wrapper for console.warn\n   */\n  warn () {\n    if ( this.__debug ) {\n      try {\n        console.warn.apply( this, [ this.__id, ...arguments ] )\n      } catch ( e ) {}\n    }\n  }\n\n  /**\n   * Wrapper for console.error\n   */\n  error () {\n    if ( this.__debug ) {\n      try {\n        console.error.apply( this, [ this.__id, ...arguments ] )\n      } catch ( e ) {}\n    }\n  }\n}\n\n/**\n * Returns a singleton of Logger\n */\nexport let logger = new Logger()\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/logger.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 163,
    "kind": "variable",
    "name": "logger",
    "memberof": "scripts/utils/logger.js",
    "static": true,
    "longname": "scripts/utils/logger.js~logger",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/logger.js",
    "importStyle": "{logger}",
    "description": "Returns a singleton of Logger",
    "lineNumber": 96,
    "type": {
      "types": [
        "scripts/utils/logger.js~Logger"
      ]
    }
  },
  {
    "__docId__": 164,
    "kind": "class",
    "name": "Logger",
    "memberof": "scripts/utils/logger.js",
    "static": true,
    "longname": "scripts/utils/logger.js~Logger",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/logger.js",
    "importStyle": null,
    "description": "A class to mimic window.console",
    "lineNumber": 6,
    "pseudoExport": true,
    "interface": false
  },
  {
    "__docId__": 165,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#constructor",
    "access": "public",
    "description": "Creates an instance of Logger",
    "lineNumber": 11,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": true,
        "name": "id",
        "description": "The identifier to appear before every output"
      }
    ]
  },
  {
    "__docId__": 166,
    "kind": "member",
    "name": "__id",
    "memberof": "scripts/utils/logger.js~Logger",
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#__id",
    "access": "private",
    "description": "Stores a unique identifier to pass to the begning of outputs",
    "lineNumber": 16,
    "ignore": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 167,
    "kind": "member",
    "name": "__debug",
    "memberof": "scripts/utils/logger.js~Logger",
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#__debug",
    "access": "private",
    "description": "Stores a boolean value which determines if output will be done or not",
    "lineNumber": 21,
    "ignore": true,
    "type": {
      "types": [
        "boolean"
      ]
    }
  },
  {
    "__docId__": 168,
    "kind": "method",
    "name": "create",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#create",
    "access": "public",
    "description": "Create a new instance of the Logger",
    "lineNumber": 28,
    "return": {
      "nullable": null,
      "types": [
        "Logger"
      ],
      "spread": false,
      "description": "The new Logger instance"
    },
    "params": [
      {
        "name": "id",
        "types": [
          "*"
        ]
      }
    ]
  },
  {
    "__docId__": 169,
    "kind": "method",
    "name": "setId",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#setId",
    "access": "public",
    "description": "Used to give an identifier to the output",
    "lineNumber": 36,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "id",
        "description": "The identifier to appear before every output"
      }
    ],
    "return": null
  },
  {
    "__docId__": 171,
    "kind": "method",
    "name": "enabled",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#enabled",
    "access": "public",
    "description": "Enable or disable the console output",
    "lineNumber": 44,
    "params": [
      {
        "nullable": null,
        "types": [
          "Boolean=false"
        ],
        "spread": false,
        "optional": true,
        "name": "enabled",
        "description": "Use true if you want the output to appear"
      }
    ],
    "return": null
  },
  {
    "__docId__": 173,
    "kind": "method",
    "name": "log",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#log",
    "access": "public",
    "description": "Wrapper for console.log",
    "lineNumber": 51,
    "params": [],
    "return": null
  },
  {
    "__docId__": 174,
    "kind": "method",
    "name": "info",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#info",
    "access": "public",
    "description": "Wrapper for console.info",
    "lineNumber": 62,
    "params": [],
    "return": null
  },
  {
    "__docId__": 175,
    "kind": "method",
    "name": "warn",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#warn",
    "access": "public",
    "description": "Wrapper for console.warn",
    "lineNumber": 73,
    "params": [],
    "return": null
  },
  {
    "__docId__": 176,
    "kind": "method",
    "name": "error",
    "memberof": "scripts/utils/logger.js~Logger",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/logger.js~Logger#error",
    "access": "public",
    "description": "Wrapper for console.error",
    "lineNumber": 84,
    "params": [],
    "return": null
  },
  {
    "__docId__": 177,
    "kind": "file",
    "name": "scripts/utils/loop.js",
    "content": "'use strict'\n\n/**\n * Loop through a collection Object or Array. If the function returns a value other then undefined, the loop stops.\n * @param {Object|Array} collection The collection to loop through\n * @param {Function} cb The callback which is called for every element in collection\n * @return If a value other than `undefined` is returned in the callback, it will be passed on to the return of the function and stop the loop\n */\nexport let loop = ( collection = {}, cb ) => {\n  if ( collection ) {\n    for ( let i = 0, k = Object.keys( collection ), l = k.length; i < l; i++ ) {\n      let result = cb( collection[ k[ i ] ], Array.isArray( collection ) ? parseInt( k[ i ] ) : k[ i ] )\n      if ( result !== undefined ) {\n        return result\n      }\n    }\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/loop.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 178,
    "kind": "function",
    "name": "loop",
    "memberof": "scripts/utils/loop.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/loop.js~loop",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/loop.js",
    "importStyle": "{loop}",
    "description": "Loop through a collection Object or Array. If the function returns a value other then undefined, the loop stops.",
    "lineNumber": 9,
    "params": [
      {
        "nullable": null,
        "types": [
          "Object",
          "Array"
        ],
        "spread": false,
        "optional": false,
        "name": "collection",
        "description": "The collection to loop through"
      },
      {
        "nullable": null,
        "types": [
          "Function"
        ],
        "spread": false,
        "optional": false,
        "name": "cb",
        "description": "The callback which is called for every element in collection"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "*"
      ],
      "spread": false,
      "description": "If a value other than `undefined` is returned in the callback, it will be passed on to the return of the function and stop the loop"
    }
  },
  {
    "__docId__": 179,
    "kind": "file",
    "name": "scripts/utils/radians.js",
    "content": "'use strict'\n\n/**\n * Convert an angle from degrees to radians\n * @param {Numeric} angle The angle in degrees\n * @return {Numeric} The angle in radians\n */\nexport let radians = ( angle ) => angle * Math.PI / 180\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/radians.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 180,
    "kind": "function",
    "name": "radians",
    "memberof": "scripts/utils/radians.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/radians.js~radians",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/radians.js",
    "importStyle": "{radians}",
    "description": "Convert an angle from degrees to radians",
    "lineNumber": 8,
    "params": [
      {
        "nullable": null,
        "types": [
          "Numeric"
        ],
        "spread": false,
        "optional": false,
        "name": "angle",
        "description": "The angle in degrees"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Numeric"
      ],
      "spread": false,
      "description": "The angle in radians"
    }
  },
  {
    "__docId__": 181,
    "kind": "file",
    "name": "scripts/utils/rnd.js",
    "content": "'use strict'\n\n/**\n * Generate a random number between two values\n * @param {Number} min The minimum value\n * @param {Number} max The maximum value\n * @return {Number} The random number generated\n */\nexport let rnd = ( min, max ) => {\n  return Math.floor( Math.random() * ( Math.floor( max ) - Math.ceil( min ) + 1 ) ) + Math.ceil( min )\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/rnd.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 182,
    "kind": "function",
    "name": "rnd",
    "memberof": "scripts/utils/rnd.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/rnd.js~rnd",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/rnd.js",
    "importStyle": "{rnd}",
    "description": "Generate a random number between two values",
    "lineNumber": 9,
    "params": [
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "min",
        "description": "The minimum value"
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "max",
        "description": "The maximum value"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Number"
      ],
      "spread": false,
      "description": "The random number generated"
    }
  },
  {
    "__docId__": 183,
    "kind": "file",
    "name": "scripts/utils/scroll.js",
    "content": "/* globals window, requestAnimationFrame */\n\n'use strict'\n\nimport { approx } from './approx.js'\n\n/**\n * Scroll window to position\n * @param {Number} x The x position\n * @param {Number} y The y position\n * @param {Number} cycles The scroll cycles needed to reach destination\n */\nlet scrollTo = ( x, y, cycles ) => {\n  let positionX = window.scrollX\n  let positionY = window.scrollY\n\n  cycles = cycles || 1 // Default value is instant scroll\n\n  let speedLeft = ( x - positionX ) / cycles\n  let speedTop = ( y - positionY ) / cycles\n\n  let scroll = () => {\n    cycles--\n    if ( cycles >= 0 ) {\n      positionX += speedLeft\n      positionY += speedTop\n      window.scrollTo( approx( positionX, 0 ), approx( positionY, 0 ) )\n      requestAnimationFrame( scroll )\n    } else {\n      window.scrollTo( x, y )\n    }\n  }\n  scroll()\n}\n\n/**\n * Scrolls an element to position\n * @param {HTMLElement} element\n * @param {Number} x The x position\n * @param {Number} y The y position\n * @param {Number} cycles The scroll cycles needed to reach destination\n */\nlet elementScrollTo = ( element, x, y, cycles ) => {\n  let positionX = element.scrollLeft\n  let positionY = element.scrollTop\n  cycles = cycles || 1 // Default value is instant scroll\n\n  let speedLeft = ( x - positionX ) / cycles\n  let speedTop = ( y - positionY ) / cycles\n\n  let scroll = () => {\n    cycles--\n    if ( cycles >= 0 ) {\n      positionX += speedLeft\n      positionY += speedTop\n      element.scrollLeft = approx( positionX, 0 )\n      element.scrollTop = approx( positionY, 0 )\n      requestAnimationFrame( scroll )\n    } else {\n      element.scrollLeft = x\n      element.scrollTop = y\n    }\n  }\n  scroll()\n}\n\n/**\n * A library used for scrolling window or an element\n */\nexport let scroll = {\n  scrollToTop: ( speed ) => {\n    scrollTo( 0, 0, speed )\n  },\n  elementScrollTo: elementScrollTo,\n  scrollTo: scrollTo\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/scroll.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 184,
    "kind": "function",
    "name": "scrollTo",
    "memberof": "scripts/utils/scroll.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/scroll.js~scrollTo",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/scroll.js",
    "importStyle": null,
    "description": "Scroll window to position",
    "lineNumber": 13,
    "params": [
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "x",
        "description": "The x position"
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "y",
        "description": "The y position"
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "cycles",
        "description": "The scroll cycles needed to reach destination"
      }
    ],
    "return": null,
    "ignore": true
  },
  {
    "__docId__": 185,
    "kind": "function",
    "name": "elementScrollTo",
    "memberof": "scripts/utils/scroll.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/scroll.js~elementScrollTo",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/scroll.js",
    "importStyle": null,
    "description": "Scrolls an element to position",
    "lineNumber": 43,
    "params": [
      {
        "nullable": null,
        "types": [
          "HTMLElement"
        ],
        "spread": false,
        "optional": false,
        "name": "element",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "x",
        "description": "The x position"
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "y",
        "description": "The y position"
      },
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "cycles",
        "description": "The scroll cycles needed to reach destination"
      }
    ],
    "return": null,
    "ignore": true
  },
  {
    "__docId__": 186,
    "kind": "variable",
    "name": "scroll",
    "memberof": "scripts/utils/scroll.js",
    "static": true,
    "longname": "scripts/utils/scroll.js~scroll",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/scroll.js",
    "importStyle": "{scroll}",
    "description": "A library used for scrolling window or an element",
    "lineNumber": 70,
    "type": {
      "types": [
        "{\"scrollToTop\": *, \"elementScrollTo\": *, \"scrollTo\": *}"
      ]
    }
  },
  {
    "__docId__": 187,
    "kind": "file",
    "name": "scripts/utils/sounds.js",
    "content": "/* globals document, Audio */\n\n'use strict'\n\nimport { loop } from './loop.js'\n\n/**\n * An audio wrapper\n */\nclass Sound {\n  /**\n   * Creates a Sound instance\n   * @param {Audio} audio The Audio element to wrap\n   */\n  constructor ( audio ) {\n    /**\n     * The Audio element\n     * @type {Audio}\n     * @private\n     */\n    this.__audio = audio\n    /**\n     * Determines if audio is enabled\n     * @type {Boolean=false}\n     * @private\n     */\n    this.__enabled = false\n    /**\n     * Determines if the audio should loop infinitly\n     * @type {Boolean=false}\n     * @private\n     */\n    this.__looped = false\n\n    audio.addEventListener( 'ended', () => {\n      audio.currentTime = 0\n      if ( this.__looped ) {\n        audio.play()\n      }\n    } )\n  }\n\n  /**\n   * Sets the Sound to enabled or disabled\n   * @param {Boolean} enabled If true the Sound class will be enabled\n   */\n  enabled ( enabled ) {\n    this.__enabled = enabled\n  }\n\n  /**\n   * Sets the volume of the Sound instance\n   * @param {Number} volume\n   */\n  volume ( volume ) {\n    this.__audio.volume = volume\n  }\n\n  /**\n   * Play the Sound instance\n   * @return {Promise} The promise is resolved once the Sound is played\n   */\n  play () {\n    if ( !this.__enabled ) {\n      return Promise.resolve()\n    }\n\n    let result = this.__audio.play()\n\n    // Old browsers don't return a promise for play(), so we create one\n    if ( !( result instanceof Promise ) ) {\n      return Promise.resolve()\n    }\n\n    return result\n  }\n\n  /**\n   * Pause the Sound instance\n   * @return {Promise} The promise is resolved once the Sound is paused\n   */\n  pause () {\n    if ( !this.__audio.paused ) {\n      this.__audio.pause()\n    }\n    return Promise.resolve()\n  }\n\n  /**\n   * Sets the Sound to muted or unmuted\n   * @param {Boolean} mute If true the Sound class will be muted\n   */\n  mute ( mute ) {\n    this.__audio.muted = mute\n  }\n\n  /**\n   * Sets the Sound to looped or single play\n   * @param {Boolean} looped If true the Sound class will be looped infinitely\n   */\n  loop ( looped ) {\n    this.__looped = looped\n  }\n}\n\n/**\n * A class containing multiple Sound instances\n */\nclass Sounds {\n  /**\n   * Create an instance of Sounds\n   */\n  constructor () {\n    /**\n     * Holds the Sound instances\n     * @type {Object}\n     * @private\n     */\n    this.__collection = {}\n    /**\n     * Determines if the Sounds are enabled\n     * @type {Boolean=false}\n     * @private\n     */\n    this.__enabled = false\n  }\n\n  /**\n   * Returns a new instance of Sounds\n   * @return {Sounds} The newly created Sounds instance\n   */\n  create () {\n    return new Sounds()\n  }\n\n  /**\n   * Initializes the Sounds class. This is needed to enable Audio on some devices\n   * @return {Promise} The promise is resolved once audio is available\n   */\n  init () {\n    return new Promise( ( resolve, reject ) => {\n      let audio = new Audio( 'data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV' )\n\n      let result = audio.play()\n      if ( !( result instanceof Promise ) ) {\n        resolve( false )\n        return\n      }\n\n      let unlock = () => {\n        audio.play()\n          .then( () => {\n            document.body.removeEventListener( 'click', unlock )\n            // Enabled\n            this.enable( true )\n            resolve( this )\n          } )\n          .catch( ( reason ) => {\n            reject( reason )\n          } )\n      }\n\n      result\n        .then( () => {\n          // Enabled\n          this.enable( true )\n          resolve( this )\n        } )\n        .catch( () => {\n          document.body.addEventListener( 'click', unlock, false )\n          // Disabled\n          this.enable( false )\n        } )\n    } )\n  }\n\n  /**\n   * Sets the Sounds class to enabled or disabled\n   * @param {Boolean} enable If true the Sound instances will be enabled\n   */\n  enable ( enable ) {\n    this.__enabled = enable\n\n    loop( this.__collection, ( sound ) => {\n      sound.enabled( enable )\n    } )\n  }\n\n  /**\n   * Sets the Sounds class to muted or unmuted\n   * @param {Boolean} mute If true the Sound instances will be muted\n   */\n  mute ( mute ) {\n    loop( this.__collection, ( sound ) => {\n      sound.mute( mute )\n    } )\n  }\n\n  /**\n   * Adds a Sound instance to the Sounds\n   * @param {String} name An identifer to represent the Audio added\n   * @param {Audio|String} audio An Audio instance or an url to an audio file\n   * @return {Sound} Returns the Sound instance\n   */\n  add ( name, audio ) {\n    if ( typeof audio === 'string' ) {\n      audio = new Audio( audio )\n    }\n    this.__collection[ name ] = new Sound( audio )\n    this.__collection[ name ].enabled( this.__enabled )\n    return this.__collection[ name ]\n  }\n\n  /**\n   * Remove a Sound instance from the Sounds\n   * @param {String} name An identifer to represent the Audio to be removed\n   */\n  remove ( name ) {\n    if ( this.__collection[name] ) {\n      this.__collection[ name ].enabled( false )\n      this.__collection[ name ].pause()\n        .then( () => {\n          delete this.__collection[ name ]\n        } )\n    }\n  }\n\n  /**\n   * Returns a specific Sound instance\n   * @param {String} name The Sound identifier\n   * @return {Sound} The Sound which is represented by the identifier\n   */\n  get ( name ) {\n    return this.__collection[ name ]\n  }\n}\n\n/**\n * Returns a singleton of the Sounds\n */\nexport let sounds = new Sounds()\n\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/sounds.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 188,
    "kind": "class",
    "name": "Sound",
    "memberof": "scripts/utils/sounds.js",
    "static": true,
    "longname": "scripts/utils/sounds.js~Sound",
    "access": "public",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/sounds.js",
    "importStyle": null,
    "description": "An audio wrapper",
    "lineNumber": 10,
    "interface": false,
    "ignore": true
  },
  {
    "__docId__": 189,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#constructor",
    "access": "public",
    "description": "Creates a Sound instance",
    "lineNumber": 15,
    "params": [
      {
        "nullable": null,
        "types": [
          "Audio"
        ],
        "spread": false,
        "optional": false,
        "name": "audio",
        "description": "The Audio element to wrap"
      }
    ]
  },
  {
    "__docId__": 190,
    "kind": "member",
    "name": "__audio",
    "memberof": "scripts/utils/sounds.js~Sound",
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#__audio",
    "access": "private",
    "description": "The Audio element",
    "lineNumber": 21,
    "type": {
      "nullable": null,
      "types": [
        "Audio"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 191,
    "kind": "member",
    "name": "__enabled",
    "memberof": "scripts/utils/sounds.js~Sound",
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#__enabled",
    "access": "private",
    "description": "Determines if audio is enabled",
    "lineNumber": 27,
    "type": {
      "nullable": null,
      "types": [
        "Boolean=false"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 192,
    "kind": "member",
    "name": "__looped",
    "memberof": "scripts/utils/sounds.js~Sound",
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#__looped",
    "access": "private",
    "description": "Determines if the audio should loop infinitly",
    "lineNumber": 33,
    "type": {
      "nullable": null,
      "types": [
        "Boolean=false"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 193,
    "kind": "method",
    "name": "enabled",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#enabled",
    "access": "public",
    "description": "Sets the Sound to enabled or disabled",
    "lineNumber": 47,
    "params": [
      {
        "nullable": null,
        "types": [
          "Boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "enabled",
        "description": "If true the Sound class will be enabled"
      }
    ],
    "return": null
  },
  {
    "__docId__": 195,
    "kind": "method",
    "name": "volume",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#volume",
    "access": "public",
    "description": "Sets the volume of the Sound instance",
    "lineNumber": 55,
    "params": [
      {
        "nullable": null,
        "types": [
          "Number"
        ],
        "spread": false,
        "optional": false,
        "name": "volume",
        "description": ""
      }
    ],
    "return": null
  },
  {
    "__docId__": 196,
    "kind": "method",
    "name": "play",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#play",
    "access": "public",
    "description": "Play the Sound instance",
    "lineNumber": 63,
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "The promise is resolved once the Sound is played"
    },
    "params": []
  },
  {
    "__docId__": 197,
    "kind": "method",
    "name": "pause",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#pause",
    "access": "public",
    "description": "Pause the Sound instance",
    "lineNumber": 82,
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "The promise is resolved once the Sound is paused"
    },
    "params": []
  },
  {
    "__docId__": 198,
    "kind": "method",
    "name": "mute",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#mute",
    "access": "public",
    "description": "Sets the Sound to muted or unmuted",
    "lineNumber": 93,
    "params": [
      {
        "nullable": null,
        "types": [
          "Boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "mute",
        "description": "If true the Sound class will be muted"
      }
    ],
    "return": null
  },
  {
    "__docId__": 199,
    "kind": "method",
    "name": "loop",
    "memberof": "scripts/utils/sounds.js~Sound",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sound#loop",
    "access": "public",
    "description": "Sets the Sound to looped or single play",
    "lineNumber": 101,
    "params": [
      {
        "nullable": null,
        "types": [
          "Boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "looped",
        "description": "If true the Sound class will be looped infinitely"
      }
    ],
    "return": null
  },
  {
    "__docId__": 201,
    "kind": "variable",
    "name": "sounds",
    "memberof": "scripts/utils/sounds.js",
    "static": true,
    "longname": "scripts/utils/sounds.js~sounds",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/sounds.js",
    "importStyle": "{sounds}",
    "description": "Returns a singleton of the Sounds",
    "lineNumber": 241,
    "type": {
      "types": [
        "scripts/utils/sounds.js~Sounds"
      ]
    }
  },
  {
    "__docId__": 202,
    "kind": "class",
    "name": "Sounds",
    "memberof": "scripts/utils/sounds.js",
    "static": true,
    "longname": "scripts/utils/sounds.js~Sounds",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/sounds.js",
    "importStyle": null,
    "description": "A class containing multiple Sound instances",
    "lineNumber": 109,
    "pseudoExport": true,
    "interface": false
  },
  {
    "__docId__": 203,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#constructor",
    "access": "public",
    "description": "Create an instance of Sounds",
    "lineNumber": 113
  },
  {
    "__docId__": 204,
    "kind": "member",
    "name": "__collection",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#__collection",
    "access": "private",
    "description": "Holds the Sound instances",
    "lineNumber": 119,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 205,
    "kind": "member",
    "name": "__enabled",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#__enabled",
    "access": "private",
    "description": "Determines if the Sounds are enabled",
    "lineNumber": 125,
    "type": {
      "nullable": null,
      "types": [
        "Boolean=false"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 206,
    "kind": "method",
    "name": "create",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#create",
    "access": "public",
    "description": "Returns a new instance of Sounds",
    "lineNumber": 132,
    "return": {
      "nullable": null,
      "types": [
        "Sounds"
      ],
      "spread": false,
      "description": "The newly created Sounds instance"
    },
    "params": []
  },
  {
    "__docId__": 207,
    "kind": "method",
    "name": "init",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#init",
    "access": "public",
    "description": "Initializes the Sounds class. This is needed to enable Audio on some devices",
    "lineNumber": 140,
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "The promise is resolved once audio is available"
    },
    "params": []
  },
  {
    "__docId__": 208,
    "kind": "method",
    "name": "enable",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#enable",
    "access": "public",
    "description": "Sets the Sounds class to enabled or disabled",
    "lineNumber": 181,
    "params": [
      {
        "nullable": null,
        "types": [
          "Boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "enable",
        "description": "If true the Sound instances will be enabled"
      }
    ],
    "return": null
  },
  {
    "__docId__": 210,
    "kind": "method",
    "name": "mute",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#mute",
    "access": "public",
    "description": "Sets the Sounds class to muted or unmuted",
    "lineNumber": 193,
    "params": [
      {
        "nullable": null,
        "types": [
          "Boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "mute",
        "description": "If true the Sound instances will be muted"
      }
    ],
    "return": null
  },
  {
    "__docId__": 211,
    "kind": "method",
    "name": "add",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#add",
    "access": "public",
    "description": "Adds a Sound instance to the Sounds",
    "lineNumber": 205,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "An identifer to represent the Audio added"
      },
      {
        "nullable": null,
        "types": [
          "Audio",
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "audio",
        "description": "An Audio instance or an url to an audio file"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Sound"
      ],
      "spread": false,
      "description": "Returns the Sound instance"
    }
  },
  {
    "__docId__": 212,
    "kind": "method",
    "name": "remove",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#remove",
    "access": "public",
    "description": "Remove a Sound instance from the Sounds",
    "lineNumber": 218,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "An identifer to represent the Audio to be removed"
      }
    ],
    "return": null
  },
  {
    "__docId__": 213,
    "kind": "method",
    "name": "get",
    "memberof": "scripts/utils/sounds.js~Sounds",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/sounds.js~Sounds#get",
    "access": "public",
    "description": "Returns a specific Sound instance",
    "lineNumber": 233,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "The Sound identifier"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Sound"
      ],
      "spread": false,
      "description": "The Sound which is represented by the identifier"
    }
  },
  {
    "__docId__": 214,
    "kind": "file",
    "name": "scripts/utils/uid.js",
    "content": "'use strict'\n\n/**\n * The cache variable\n * @type {Number}\n * @private\n */\nlet cache = 0\n/**\n * The lastreset variable, since uid resets every milliseconds\n * @type {Date}\n * @private\n */\nlet lastReset = Date.now()\n\n/**\n * Generates a random unique identifier\n * @return {String} A random unique identifier\n */\nexport const uid = () => {\n  if ( lastReset !== Date.now() ) {\n    cache = 0\n    lastReset = Date.now()\n  }\n  cache++\n  return Date.now() + '' + cache\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/uid.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 215,
    "kind": "variable",
    "name": "cache",
    "memberof": "scripts/utils/uid.js",
    "static": true,
    "longname": "scripts/utils/uid.js~cache",
    "access": "private",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/uid.js",
    "importStyle": null,
    "description": "The cache variable",
    "lineNumber": 8,
    "type": {
      "nullable": null,
      "types": [
        "Number"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 216,
    "kind": "variable",
    "name": "lastReset",
    "memberof": "scripts/utils/uid.js",
    "static": true,
    "longname": "scripts/utils/uid.js~lastReset",
    "access": "private",
    "export": false,
    "importPath": "@crispcode/modux/scripts/utils/uid.js",
    "importStyle": null,
    "description": "The lastreset variable, since uid resets every milliseconds",
    "lineNumber": 14,
    "type": {
      "nullable": null,
      "types": [
        "Date"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 217,
    "kind": "function",
    "name": "uid",
    "memberof": "scripts/utils/uid.js",
    "generator": false,
    "async": false,
    "static": true,
    "longname": "scripts/utils/uid.js~uid",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/uid.js",
    "importStyle": "{uid}",
    "description": "Generates a random unique identifier",
    "lineNumber": 20,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "A random unique identifier"
    },
    "params": []
  },
  {
    "__docId__": 218,
    "kind": "file",
    "name": "scripts/utils/url.js",
    "content": "/* globals window, document */\n\n'use strict'\n\nimport { loop } from './loop'\n\n/**\n * This class is responsible for parsing and matching urls\n */\nexport class Url {\n  /**\n   * Creates an instance of Url\n   * @param {String} url A url string. If no url is provided window.location.href is used\n   */\n  constructor ( url ) {\n    /**\n     * Contains regular expressions used for splitting the url\n     * @type {Object}\n     * @private\n     */\n    this.__regexp = {\n      protocol: '(?<protocol>[^:]+):\\\\/\\\\/',\n      host: '(?<host>[^\\\\/\\\\?#]+)',\n      path: '(?<path>\\\\/[^\\\\?#]*)?',\n      parameters: '(?<parameters>\\\\?[^#]*)?',\n      hash: '(?<hash>#.*)?'\n    }\n\n    /**\n     * Contains the url provided\n     * @type {String}\n     * @private\n     */\n    this.__url = ''\n\n    /**\n     * Contains all the parts of the url\n     * @type {Object}\n     * @private\n     */\n    this.__parts = {\n      protocol: null,\n      host: null,\n      path: null,\n      parameters: null,\n      hash: null,\n      username: null,\n      password: null\n    }\n\n    this.set( url )\n  }\n\n  /**\n   * Parse a url to the correct format\n   * @param {String} url The url string to be parsed\n   * @return {String} The parsed version of the url\n   * @private\n   */\n  __parseUrl ( url ) {\n    let div = document.createElement( 'div' )\n    div.innerHTML = '<a></a>'\n    div.firstChild.href = url // Ensures that the href is properly escaped\n    return div.firstChild.href\n  }\n\n  /**\n   * Split the url into parts based on the url regular expression\n   * @private\n   */\n  __split () {\n    let regexp = new RegExp( '^' + this.__regexp.protocol + this.__regexp.host + this.__regexp.path + this.__regexp.parameters + this.__regexp.hash + '$', 'i' )\n    let parts = this.__url.match( regexp )\n    if ( parts ) {\n      this.__parts.protocol = parts.groups[ 'protocol' ] || null\n      this.__parts.path = parts.groups[ 'path' ] || null\n      this.__parts.hash = ( parts.groups[ 'hash' ] ) ? parts.groups[ 'hash' ].substring( 1 ) : null\n\n      this.__parts.host = parts.groups[ 'host' ] || null\n      // Split host, username and password if needed\n      if ( this.__parts.host ) {\n        let hostParts = this.__parts.host.split( '@' )\n        if ( hostParts[ 1 ] ) {\n          // We have a username and password so we need to update those parts\n          let authentication = hostParts[ 0 ].split( ':' )\n          this.__parts.username = authentication[ 0 ]\n          this.__parts.password = authentication[ 1 ]\n          this.__parts.host = hostParts[ 1 ]\n        } else {\n          // We dont have a username and password so we need to update those parts\n          this.__parts.username = null\n          this.__parts.password = null\n          this.__parts.host = hostParts[ 0 ]\n        }\n      }\n\n      this.__parts.parameters = parts.groups[ 'parameters' ] || null\n      // Split the parameters into an object\n      if ( this.__parts.parameters ) {\n        let parameters = {}\n        let groups = this.__parts.parameters.split( '?' )[ 1 ].split( '&' )\n        loop( groups, ( group ) => {\n          let pair = group.split( '=' )\n          if ( pair[ 0 ] !== '' ) {\n            parameters[ pair[ 0 ] ] = ( pair[ 1 ] !== undefined ) ? pair[ 1 ] : true\n          }\n        } )\n        this.__parts.parameters = parameters\n      } else {\n        this.__parts.parameters = {}\n      }\n    }\n  }\n\n  /**\n   * Returns the protocol of the url\n   * @return {String} The string containing the protocol\n   */\n  get protocol () {\n    return this.__parts.protocol\n  }\n  /**\n   * Returns the host and port of the url\n   * @return {String} The string containing the hostname and port\n   */\n  get host () {\n    return this.__parts.host\n  }\n  /**\n   * Returns the path of the url\n   * @return {String} The string containing the path\n   */\n  get path () {\n    return this.__parts.path\n  }\n  /**\n   * Returns the parameters of the url\n   * @return {Object} The query string parameters of the url\n   */\n  get parameters () {\n    return this.__parts.parameters\n  }\n  /**\n   * Returns the hash of the url\n   * @return {String} The hash of the url\n   */\n  get hash () {\n    return this.__parts.hash\n  }\n  /**\n   * Returns the username from the url\n   * @return {String} The username from the url\n   */\n  get username () {\n    return this.__parts.username\n  }\n  /**\n   * Returns the password from the url\n   * @return {String} The password from the url\n   */\n  get password () {\n    return this.__parts.password\n  }\n  /**\n   * Returns all the parts of the url\n   * @return {Object} The object containing all the url parts\n   */\n  get parts () {\n    return this.__parts\n  }\n\n  /**\n   * Return the url\n   * @return {String} The provided url\n   */\n  toString () {\n    return this.__url\n  }\n\n  /**\n   * Set the url string\n   * @param {String} url The url string\n   * @return {Url} The instance of the Url class\n   */\n  set ( url ) {\n    this.__url = ( url ) ? this.__parseUrl( url ) : window.location.href\n    this.__split()\n    return this\n  }\n}\n",
    "static": true,
    "longname": "/Users/vladfilip/projects/modux/src/scripts/utils/url.js",
    "access": "public",
    "description": null,
    "lineNumber": 1
  },
  {
    "__docId__": 219,
    "kind": "class",
    "name": "Url",
    "memberof": "scripts/utils/url.js",
    "static": true,
    "longname": "scripts/utils/url.js~Url",
    "access": "public",
    "export": true,
    "importPath": "@crispcode/modux/scripts/utils/url.js",
    "importStyle": "{Url}",
    "description": "This class is responsible for parsing and matching urls",
    "lineNumber": 10,
    "interface": false
  },
  {
    "__docId__": 220,
    "kind": "constructor",
    "name": "constructor",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#constructor",
    "access": "public",
    "description": "Creates an instance of Url",
    "lineNumber": 15,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "A url string. If no url is provided window.location.href is used"
      }
    ]
  },
  {
    "__docId__": 221,
    "kind": "member",
    "name": "__regexp",
    "memberof": "scripts/utils/url.js~Url",
    "static": false,
    "longname": "scripts/utils/url.js~Url#__regexp",
    "access": "private",
    "description": "Contains regular expressions used for splitting the url",
    "lineNumber": 21,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 222,
    "kind": "member",
    "name": "__url",
    "memberof": "scripts/utils/url.js~Url",
    "static": false,
    "longname": "scripts/utils/url.js~Url#__url",
    "access": "private",
    "description": null,
    "lineNumber": 34,
    "undocument": true,
    "ignore": true,
    "type": {
      "types": [
        "string"
      ]
    }
  },
  {
    "__docId__": 223,
    "kind": "member",
    "name": "__parts",
    "memberof": "scripts/utils/url.js~Url",
    "static": false,
    "longname": "scripts/utils/url.js~Url#__parts",
    "access": "private",
    "description": "Contains all the parts of the url",
    "lineNumber": 41,
    "type": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": null
    },
    "ignore": true
  },
  {
    "__docId__": 224,
    "kind": "method",
    "name": "__parseUrl",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#__parseUrl",
    "access": "private",
    "description": "Parse a url to the correct format",
    "lineNumber": 60,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The url string to be parsed"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The parsed version of the url"
    },
    "ignore": true
  },
  {
    "__docId__": 225,
    "kind": "method",
    "name": "__split",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#__split",
    "access": "private",
    "description": "Split the url into parts based on the url regular expression",
    "lineNumber": 71,
    "ignore": true,
    "params": [],
    "return": null
  },
  {
    "__docId__": 226,
    "kind": "get",
    "name": "protocol",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#protocol",
    "access": "public",
    "description": "Returns the protocol of the url",
    "lineNumber": 119,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The string containing the protocol"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 227,
    "kind": "get",
    "name": "host",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#host",
    "access": "public",
    "description": "Returns the host and port of the url",
    "lineNumber": 126,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The string containing the hostname and port"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 228,
    "kind": "get",
    "name": "path",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#path",
    "access": "public",
    "description": "Returns the path of the url",
    "lineNumber": 133,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The string containing the path"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 229,
    "kind": "get",
    "name": "parameters",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#parameters",
    "access": "public",
    "description": "Returns the parameters of the url",
    "lineNumber": 140,
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "The query string parameters of the url"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 230,
    "kind": "get",
    "name": "hash",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#hash",
    "access": "public",
    "description": "Returns the hash of the url",
    "lineNumber": 147,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The hash of the url"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 231,
    "kind": "get",
    "name": "username",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#username",
    "access": "public",
    "description": "Returns the username from the url",
    "lineNumber": 154,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The username from the url"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 232,
    "kind": "get",
    "name": "password",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#password",
    "access": "public",
    "description": "Returns the password from the url",
    "lineNumber": 161,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The password from the url"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 233,
    "kind": "get",
    "name": "parts",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#parts",
    "access": "public",
    "description": "Returns all the parts of the url",
    "lineNumber": 168,
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "The object containing all the url parts"
    },
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 234,
    "kind": "method",
    "name": "toString",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#toString",
    "access": "public",
    "description": "Return the url",
    "lineNumber": 176,
    "return": {
      "nullable": null,
      "types": [
        "String"
      ],
      "spread": false,
      "description": "The provided url"
    },
    "params": []
  },
  {
    "__docId__": 235,
    "kind": "method",
    "name": "set",
    "memberof": "scripts/utils/url.js~Url",
    "generator": false,
    "async": false,
    "static": false,
    "longname": "scripts/utils/url.js~Url#set",
    "access": "public",
    "description": "Set the url string",
    "lineNumber": 185,
    "params": [
      {
        "nullable": null,
        "types": [
          "String"
        ],
        "spread": false,
        "optional": false,
        "name": "url",
        "description": "The url string"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Url"
      ],
      "spread": false,
      "description": "The instance of the Url class"
    }
  },
  {
    "kind": "index",
    "content": "# MODUX\nA framework used in front end application creation\n\n## Installation\n\n```sh\nnpm install @crispcode/modux --save-dev\n```\n\nYou can also create a basic project structure without the need to install modux, by using the npx command:\n```sh\nnpx --package=@crispcode/modux -c \"modux boilerplate basic create\"\n```\n\n## How to use\n\nModux has the following commands available from the command line:\nCommand|Description\n-|-\n`modux start` | Starts the local modux project in development mode\n`modux build` | Compiles the project for production. Output will be in the `build` directory\n`modux boilerplate` | Provides information on modux boilerplate. This is used to create project structures based on a template\n\n\nAdd to your package.json scripts:\n```\n  \"scripts\": {\n    \"start\": \"modux start\",\n    \"build\": \"modux build\"\n  }\n```\n\nTo run use: `npm start` or `npm run build`\n\n## Documentation & Testing\n\nClone the modux repository to your machine and use the following commands:\n\nTo generate a documentation use `npm run docs`\nIf you want to check functionality you can use `npm run test` \n\n## Getting started\n\nYou can check the manual files for a quick introduction into modux. You can get started [here](https://github.com/CrispCode/modux/blob/master/manual/getting-started.md).\n\n## Polyfill\n\nIn order to support older versions of browsers, you can use [polyfill.io](https://polyfill.io/)\n\n## Modux classes\n\n  |Name|Usage|Description|\n  |:---:|---|---|\n  | Router | `import { Router } from '@crispcode/modux'` | A static class used to manipulate states and urls |\n  | Component | `import { Component } from '@crispcode/modux'` | The Component class. Components are the backbone of the application |\n  | Module | `import { Module } from '@crispcode/modux'` | The Module class. Modules are the main part of modux |\n\n## Utils classes\n\n  |Name|Usage|Description|\n  |:---:|---|---|\n  | approx | `import { approx } from '@crispcode/modux'` | Used to approximate a number to a certain number of decimals |\n  | Communication | `import { Communication } from '@crispcode/modux'` | The Communication class, used to handle http requests |\n  | Cookie | `import { Cookie } from '@crispcode/modux'` | A static class used to manipulate cookies |\n  | DateTime | `import { DateTime } from '@crispcode/modux'` | A Date class wrapper |\n  | Device | `import { Device } from '@crispcode/modux'` | A static class used to get device information |\n  | extend | `import { extend } from '@crispcode/modux'` | Extends an object with another object |\n  | font | `import { font } from '@crispcode/modux'` | A font loader |\n  | html | `import { html } from '@crispcode/modux'` | Convert string to html |\n  | isNumber | `import { isNumber } from '@crispcode/modux'` | Checks if the value is a number |\n  | isObject | `import { isObject } from '@crispcode/modux'` | Checks if the object is an Object |\n  | loader | `import { loader } from '@crispcode/modux'` | The Loader class is used to preload files |\n  | logger | `import { logger } from '@crispcode/modux'` | A class to mimic window.console |\n  | loop | `import { loop } from '@crispcode/modux'` | Loop through a collection Object or Array |\n  | radians | `import { radians } from '@crispcode/modux'` | Convert an angle from degrees to radians |\n  | rnd | `import { rnd } from '@crispcode/modux'` | Generate a random number between two values |\n  | scroll | `import { scroll } from '@crispcode/modux'` | A library used for scrolling window or an element |\n  | sounds | `import { sounds } from '@crispcode/modux'` | A class used to manipulate Sounds |\n  | uid | `import { uid } from '@crispcode/modux'` | Generates a random unique identifier |\n  | Url | `import { Url } from '@crispcode/modux'` | A class used to manipulate urls |\n\n## Configuration\n\n  You can create a file called ```modux.config.js``` in the root of your folder, which needs to contain a function with one parameter and returns an object. The parameter of the function will be filled with the current webpack configuration. This gives the user a chance to modify the default webpack configuration based on their needs.\n\n## Change Log\n\n  We're using the GitHub [releases](https://github.com/CrispCode/modux/releases) for changelog entries.",
    "longname": "/Users/vladfilip/projects/modux/README.md",
    "name": "./README.md",
    "static": true,
    "access": "public"
  },
  {
    "kind": "packageJSON",
    "content": "{\n  \"name\": \"@crispcode/modux\",\n  \"version\": \"5.1.4\",\n  \"description\": \"A framework used in front end application creation\",\n  \"author\": \"Crisp Code ( contact@crispcode.ro )\",\n  \"keywords\": [\n    \"modux\",\n    \"framework\",\n    \"frontend\",\n    \"library\",\n    \"architecture\",\n    \"react alternative\",\n    \"angular alternative\",\n    \"lightweight framework\",\n    \"webpack\"\n  ],\n  \"access\": \"public\",\n  \"engines\": {\n    \"node\": \">=16.15.0\",\n    \"npm\": \">=8.5.5\"\n  },\n  \"license\": \"SEE LICENSE IN LICENSE\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/CrispCode/modux.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/CrispCode/modux/issues\"\n  },\n  \"dependencies\": {\n    \"@babel/core\": \"^7.21.0\",\n    \"@babel/plugin-proposal-object-rest-spread\": \"^7.20.7\",\n    \"@babel/preset-env\": \"^7.20.2\",\n    \"@babel/register\": \"^7.21.0\",\n    \"@crispcode/pushstore\": \"^1.1.0\",\n    \"babel-loader\": \"^9.1.2\",\n    \"copy-webpack-plugin\": \"^11.0.0\",\n    \"css-loader\": \"^6.7.3\",\n    \"eslint\": \"^8.34.0\",\n    \"file-loader\": \"^6.2.0\",\n    \"html-webpack-plugin\": \"^5.5.0\",\n    \"image-minimizer-webpack-plugin\": \"^3.8.1\",\n    \"imagemin-gifsicle\": \"^7.0.0\",\n    \"imagemin-jpegtran\": \"^7.0.0\",\n    \"imagemin-optipng\": \"^8.0.0\",\n    \"imagemin-svgo\": \"^10.0.1\",\n    \"imagemin-webp\": \"^8.0.0\",\n    \"mini-css-extract-plugin\": \"^2.7.2\",\n    \"ncp\": \"^2.0.0\",\n    \"raw-loader\": \"^4.0.2\",\n    \"sass\": \"^1.58.3\",\n    \"sass-loader\": \"13.2.0\",\n    \"url-loader\": \"^4.1.1\",\n    \"webpack\": \"^5.74.0\",\n    \"webpack-cli\": \"^5.0.1\",\n    \"webpack-dev-server\": \"^4.11.1\"\n  },\n  \"devDependencies\": {\n    \"esdoc\": \"^1.1.0\",\n    \"esdoc-standard-plugin\": \"^1.0.0\"\n  },\n  \"bin\": {\n    \"modux\": \"./cli.js\"\n  },\n  \"main\": \"./src/scripts/index.js\",\n  \"scripts\": {\n    \"test\": \"cd test && node ./../cli.js start\",\n    \"test-build\": \"cd test && node ./../cli.js build\",\n    \"docs\": \"rm -rf ./docs && ./node_modules/.bin/esdoc && open ./docs/index.html\"\n  }\n}\n",
    "longname": "/Users/vladfilip/projects/modux/package.json",
    "name": "package.json",
    "static": true,
    "access": "public"
  },
  {
    "kind": "manualIndex",
    "globalIndex": true,
    "content": "# MODUX\nA framework used in front end application creation\n\n## Installation\n\n```sh\nnpm install @crispcode/modux --save-dev\n```\n\nYou can also create a basic project structure without the need to install modux, by using the npx command:\n```sh\nnpx --package=@crispcode/modux -c \"modux boilerplate basic create\"\n```\n\n## How to use\n\nModux has the following commands available from the command line:\nCommand|Description\n-|-\n`modux start` | Starts the local modux project in development mode\n`modux build` | Compiles the project for production. Output will be in the `build` directory\n`modux boilerplate` | Provides information on modux boilerplate. This is used to create project structures based on a template\n\n\nAdd to your package.json scripts:\n```\n  \"scripts\": {\n    \"start\": \"modux start\",\n    \"build\": \"modux build\"\n  }\n```\n\nTo run use: `npm start` or `npm run build`\n\n## Documentation & Testing\n\nClone the modux repository to your machine and use the following commands:\n\nTo generate a documentation use `npm run docs`\nIf you want to check functionality you can use `npm run test` \n\n## Getting started\n\nYou can check the manual files for a quick introduction into modux. You can get started [here](https://github.com/CrispCode/modux/blob/master/manual/getting-started.md).\n\n## Polyfill\n\nIn order to support older versions of browsers, you can use [polyfill.io](https://polyfill.io/)\n\n## Modux classes\n\n  |Name|Usage|Description|\n  |:---:|---|---|\n  | Router | `import { Router } from '@crispcode/modux'` | A static class used to manipulate states and urls |\n  | Component | `import { Component } from '@crispcode/modux'` | The Component class. Components are the backbone of the application |\n  | Module | `import { Module } from '@crispcode/modux'` | The Module class. Modules are the main part of modux |\n\n## Utils classes\n\n  |Name|Usage|Description|\n  |:---:|---|---|\n  | approx | `import { approx } from '@crispcode/modux'` | Used to approximate a number to a certain number of decimals |\n  | Communication | `import { Communication } from '@crispcode/modux'` | The Communication class, used to handle http requests |\n  | Cookie | `import { Cookie } from '@crispcode/modux'` | A static class used to manipulate cookies |\n  | DateTime | `import { DateTime } from '@crispcode/modux'` | A Date class wrapper |\n  | Device | `import { Device } from '@crispcode/modux'` | A static class used to get device information |\n  | extend | `import { extend } from '@crispcode/modux'` | Extends an object with another object |\n  | font | `import { font } from '@crispcode/modux'` | A font loader |\n  | html | `import { html } from '@crispcode/modux'` | Convert string to html |\n  | isNumber | `import { isNumber } from '@crispcode/modux'` | Checks if the value is a number |\n  | isObject | `import { isObject } from '@crispcode/modux'` | Checks if the object is an Object |\n  | loader | `import { loader } from '@crispcode/modux'` | The Loader class is used to preload files |\n  | logger | `import { logger } from '@crispcode/modux'` | A class to mimic window.console |\n  | loop | `import { loop } from '@crispcode/modux'` | Loop through a collection Object or Array |\n  | radians | `import { radians } from '@crispcode/modux'` | Convert an angle from degrees to radians |\n  | rnd | `import { rnd } from '@crispcode/modux'` | Generate a random number between two values |\n  | scroll | `import { scroll } from '@crispcode/modux'` | A library used for scrolling window or an element |\n  | sounds | `import { sounds } from '@crispcode/modux'` | A class used to manipulate Sounds |\n  | uid | `import { uid } from '@crispcode/modux'` | Generates a random unique identifier |\n  | Url | `import { Url } from '@crispcode/modux'` | A class used to manipulate urls |\n\n## Configuration\n\n  You can create a file called ```modux.config.js``` in the root of your folder, which needs to contain a function with one parameter and returns an object. The parameter of the function will be filled with the current webpack configuration. This gives the user a chance to modify the default webpack configuration based on their needs.\n\n## Change Log\n\n  We're using the GitHub [releases](https://github.com/CrispCode/modux/releases) for changelog entries.",
    "longname": "/Users/vladfilip/projects/modux/README.md",
    "name": "./README.md",
    "static": true,
    "access": "public"
  },
  {
    "kind": "manual",
    "longname": "/Users/vladfilip/projects/modux/manual/getting-started.md",
    "name": "./manual/getting-started.md",
    "content": "# Getting started\n\n## Understanding modux architecture\n\n```\n\n-- Module -------- [ PushStore ] ------------------\n|                   /         \\                   |\n|                  /           \\                  |\n|                 /             \\                 |\n|   -------------------     -------------------   |\n|   |   Component 1   |     |   Component 2   |   |\n|   -------------------     -------------------   |\n---------------------------------------------------\n\n```\n\n\n### What is a Component ?\n - Everything in the modux architecture revolves around components.\n - A component is defined by extending the Component class.\n - You can think of it as a controller for an html tag.\n - The component is initialized as soon as the html tag for it is appended to the application.\n\n### What is a Module ?\n - A module is what brings all components together. When we say application, we generally refer to the module and its components. But in reality an application can be created from multiple modules.\n - You can think of a module as a super component.\n - Modules are bound to an existing view by the user.\n - Once a module has been bound, any activity on its view's children will be monitored, and components will be created / modified / destroyed when changes occur in the DOM.\n\n ### What is a PushStore ?\n - See [@crispcode/pushstore](https://www.npmjs.com/package/@crispcode/pushstore)\n - We use the pushstore as a way of comunicating information between components.\n - An instance of PushStore is created when the module is created, and it is then shared with all its defined components.\n - It works in a similar way to events, but with the added bonus of not being dependent on the race between emitters and listeners.\n - The PushStore instance is also used as a way of storing information for all components of a module.\n - Any data stored by any component or the module itself can be accessed by any other component or the module itself.\n\n\n\n## Building your first component\n\n Lets create a component called ```header```. For this we will create a folder called ```header``` in our application folder, under the ```components``` folder. ( Note the folder structure of the application is not mandatory, we are just using this structure for visibility ). Here we will add 1 js file, 1 scss file and 1 html file.\n\n```\n/application\n    /components\n        /header\n            index.js\n            style.scss\n            template.html\n```\n\n The contents of ```index.js``` will look something like this:\n\n```js\n\n    import { Component } from '@crispcode/modux'\n    \n    // We are loading the html file as string ( handled by the default webpack configuration of modux )\n    import template from './template.html'\n\n     // We are loading the style sheet for this component ( handled by the default webpack configuration of modux )\n    import './style.scss'\n\n    export class ComponentHeader extends Component {\n        get template () { \n            // The template getter should return a string that can be converted to HTML or an HTMLElement\n            // NOTE: The string must have 1 wrapping element. See in template.html\n            return template\n        }\n\n        // The execute() method is the component constructor.\n        // This will be called when an instance of the ComponentHeader needs to be created.\n        execute () {\n\n            // this.element will always have the result of this.template converted to html, for easy access to the view\n            this.element.querySelector('h1').innerHTML = 'Hello World!'\n        }\n\n    }\n\n```\n\n The contents of ```template.html``` can look something like this:\n\n ```html\n    <!-- \n        Remember that templates need to have a wrapping element.\n        In this case it's div[class=\"component-header\"] tag\n    -->\n    <div class=\"component-header\">\n        <h1> This text will be replaced when the component is created </h1>\n        <span> This is some static html stuff that we don't really focus on right now.</span>\n    </div>\n ```\n\nThe contents of ```style.scss``` can look something like this:\n\n```css\n    .component-header {\n        background-color: #000000;\n\n        h1 {\n            color: #ffffff;\n        }\n    }\n```\n\n That's it! You have now created your fist component.\n\n\n\n ## Building your first application\n\n Now that we know how to create a component, lets see how it will all come together in a simple application.\n\n First, lets create our folder structure:\n\n```\n/application\n    /public\n        - any file added here will be copied as is by webpack\n    /components\n        /header\n            index.js\n            style.scss\n            template.html\n        /footer\n            index.js\n            style.scss\n            template.html\n        /layout\n            index.js\n            template.html\n    app.js\n    app.scss\n    app.html\n```\n\n Once the folder structure is complete, lets install modux, by running this command in the folder root: ```npm install @crispcode/modux --save-dev```.\n Now that we have modux in our project, we can focus on creating the base html page. Which is defined in ```app.html```. The entry files are all controlled by the default webpack configuration for modux, so we don't need to worry about that.\n\n The contents of ```app.html``` can look something like this: \n```html\n    <html>\n\n        <head>\n            <title> My application <title>\n            \n            <!-- We add this as recommended by modux to polyfill unsupported js functionality in certain browsers -->\n            <script crossorigin=\"anonymous\" src=\"https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CMutationObserver%2CString.prototype.padStart%2Cconsole.info\"></script>    \n        \n            <!-- This will be the file that webpack will output containing all our style sheets -->\n            <link rel=\"stylesheet\" href=\"app.min.css\" />\n\n        </head>\n        \n        <body>\n            <!-- We will use this tag to create our application -->\n            <div class=\"content\"></div>\n\n            <!-- This will be the file that webpack will output containing all our code -->\n            <script src=\"app.min.js\"></script>\n        </body>\n\n    </html>\n```\n\n Now that we have an html entry, lets create the 2 components:\n\n 1. First we create the header component, similar to how we did it above\n\n    The contents of ``` /application/components/header/template.html```\n    ```html\n        <!-- \n            Remember that templates need to have a wrapping element.\n            In this case it's div[class=\"component-header\"] tag\n        -->\n        <div class=\"component-header\">\n            <h1> This text will be replaced when the component is created </h1>\n        </div>\n    ```\n\n    The contents of ``` /application/components/header/index.css```\n    ```css\n        .component-header {\n            background-color: #000000;\n\n            h1 {\n                color: #ffffff;\n            }\n        }\n    ```\n\n    The contents of ``` /application/components/header/index.js```\n    ```js\n\n        import { Component } from '@crispcode/modux'\n        \n        // We are loading the html file as string ( handled by the default webpack configuration of modux )\n        import template from './template.html'\n\n        // We are loading the style sheet for this component ( handled by the default webpack configuration of modux )\n        import './style.scss'\n\n        export class ComponentHeader extends Component {\n            get template () { \n                // The template getter should return a string that can be converted to HTML or an HTMLElement\n                // NOTE: The string must have 1 wrapping element. See in template.html\n                return template\n            }\n\n            // The execute() method is the component constructor.\n            // This will be called when an instance of the ComponentHeader needs to be created.\n            execute () {\n\n                // this.element will always have the result of this.template converted to html, for easy access to the view\n                // We will update the message in H1 based on our configuration\n                this.element.querySelector('h1').innerHTML = this.store.get('message-header')\n            }\n\n        }\n\n    ```\n\n 2. Then we create the footer component, similar to the header\n\n    The contents of ``` /application/components/footer/template.html```\n    ```html\n        <!-- \n            Remember that templates need to have a wrapping element.\n            In this case it's div[class=\"component-footer\"] tag\n        -->\n        <div class=\"component-footer\">\n            <span class=\"copyright\"> This text will be replaced when the component is created </span>\n        </div>\n    ```\n\n    The contents of ``` /application/components/footer/index.css```\n    ```css\n        .component-footer {\n            background-color: #000000;\n\n            .copyright {\n                color: #ffffff;\n            }\n        }\n    ```\n\n    The contents of ``` /application/components/footer/index.js```\n    ```js\n\n        import { Component } from '@crispcode/modux'\n        \n        // We are loading the html file as string ( handled by the default webpack configuration of modux )\n        import template from './template.html'\n\n        // We are loading the style sheet for this component ( handled by the default webpack configuration of modux )\n        import './style.scss'\n\n        export class ComponentFooter extends Component {\n            get template () { \n                return template\n            }\n\n            execute () {\n                this.element.querySelector('.copyright').innerHTML = this.store.get('copyright')\n            }\n\n        }\n\n    ```\n\n We have now the two components, but let's group them under one parent component. This will be the layout component and we will skip the styles for it.\n\n The contents of ``` /application/components/layout/template.html```\n ```html\n    <div class=\"component-layout\">\n        <!-- \n            This is how we define the position of a component in a page.\n            As soon as an element with the attribute data-modux-component is found,\n            the application will create an instance of that component ( if defined in its dependency ),\n            and insert it's template as a child of that parent element.\n        -->\n        <section data-modux-component=\"header\"></section>\n        <section data-modux-component=\"footer\"></section>\n    </div>\n ```\n\n The contents of ``` /application/components/layout/index.js```\n```js\n\n    import { Component } from '@crispcode/modux'\n    \n    import template from './template.html'\n\n    // We don't really want this component to do anything aside from holding the other two components\n    export class ComponentLayout extends Component {\n        get template () { \n            return template\n        }\n    }\n\n```\n\n Now lets bind it all together in a module. Since ```app.js``` is the main entry point for wepback config, here is were we create our module.\n\n The contents of ``` /application/app.js```\n```js\n\n    /* globals window, document */\n\n    'use strict'\n\n    import { Module, logger } from '@crispcode/modux'\n\n    import { ComponentLayout } from './components/layout'\n\n    import { ComponentHeader } from './components/header'\n    import { ComponentFooter } from './components/footer'\n\n    let initialize = () => {\n        // This is information that will be used in the header and footer components\n        store.set( 'message-header', 'Hello World! I am data stored in the application config' )\n        store.set( 'copyright', '&copy; CrispCode' )\n\n        // Just so that we have some details about what is happening we are going to set logger to debug mode.\n        logger.enabled( true )\n\n        logger.info( 'Application start' )\n\n        // Create application\n        let app = new Module( 'app' )\n        app\n            .addDependency( 'layout', ComponentLayout )\n            .addDependency( 'header', ComponentHeader )\n            .addDependency( 'footer', ComponentFooter )\n\n        // Start application bound to the content element\n        app.bootstrap( document.body.querySelector( '.content' ), 'layout' )\n    }\n\n    // We will start the application as soon as the page is loaded.\n    window.addEventListener( 'load', () => {\n        initialize()\n    } )\n\n```\n\n GREAT! We are almost finished. All we need now is to add a build script to package json. This is as easy as adding the following properties to ```package.json```\n\n ```json\n    {\n        \"name\": \"myapp\",\n        \"version\": \"1.0.0\",\n        \"devDependencies\": {\n            ...\n        },\n        \n        .\n        .\n        .\n        \n        \"scripts\": {\n            \"test\": \"modux start\",\n            \"build\": \"modux build\",\n        }\n    }\n ```\n\n\n Let's see what we've created. Run ```npm test```.\n\n There are a lot of features available in modux, such as a lot of utilities, as well as a router class for managing url changes. You can always clone the modux repository and run ```npm run docs``` to get the full documentation for it.\n\n If you have any issues or questions please feel free to refer to the issues page in github. Bye!",
    "static": true,
    "access": "public"
  },
  {
    "kind": "manual",
    "longname": "/Users/vladfilip/projects/modux/manual/basic-usage.md",
    "name": "./manual/basic-usage.md",
    "content": "# Basic usage\n\n#### /components/layout/template.html\n\n```html\n<section class=\"layout\"></section>\n```\n\n#### /components/layout/index.js\n\n```js\n\n'use strict'\n\nimport { Component } from '@crispcode/modux'\n\nimport template from './template.html'\nimport './index.scss'\n\nexport class Layout extends Component {\n  get template () {\n    return template\n  }\n\n  execute() {\n    this.element.innerHTML = \"Layout loaded\"\n  }\n}\n\n```\n\n#### /app.js\n\n```js\n\n/* globals window, document */\n\n'use strict'\n\nimport { Module, logger } from '@crispcode/modux'\n\nimport { Layout } from './components/layout'\n\nlet initialize = () => {\n  // Configure logger\n  logger.enabled( true )\n\n  logger.info( 'Application start' )\n\n  // Create application\n  let app = new Module( 'app' )\n  app\n    .addDependency( 'layout', Layout )\n\n  // Start application\n  app.bootstrap( document.querySelector( 'body' ), 'layout' )\n}\n\nwindow.addEventListener( 'load', () => {\n  initialize()\n} )\n\n```\n\n#### /app.html\n\n```html\n<!DOCTYPE html>\n<head>\n    <title> App </title>\n\n    <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1, user-scalable=no\">\n    \n    <script crossorigin=\"anonymous\" src=\"https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CMutationObserver%2CString.prototype.padStart%2Cconsole.info\"></script>    \n\n    <base href=\"/\" />\n        \n    <link rel=\"stylesheet\" href=\"app.min.css\" />\n</head>\n<body>\n    <script src=\"app.min.js\"></script>\n</body>\n</html>\n```",
    "static": true,
    "access": "public"
  },
  {
    "kind": "manual",
    "longname": "/Users/vladfilip/projects/modux/manual/basic-usage-router.md",
    "name": "./manual/basic-usage-router.md",
    "content": "# Basic usage router\n\n#### /components/layout/template.html\n\n```html\n<section class=\"layout\">\n  <span class=\"url\"></span>\n  <a href=\"/link1\" data-modux-link=\"\">LINK 1</a>\n  <a href=\"/link2\" data-modux-link=\"\">LINK 2</a>\n  <a href=\"/link3\" data-modux-link=\"\">LINK 3</a>\n</section>\n```\n\n#### /components/layout/index.js\n\n```js\n\n'use strict'\n\nimport { Component } from '@crispcode/modux'\n\nimport template from './template.html'\n\nexport class Layout extends Component {\n  get template () {\n    return template\n  }\n\n  onStateChange ( url ) {\n    this.element.querySelector('.url').innerHTML = url.toString()\n  }\n}\n\n```\n\n#### /app.js\n\n```js\n\n/* globals window, document */\n\n'use strict'\n\nimport { Module } from '@crispcode/modux'\n\nimport { Layout } from './components/layout'\n\nlet initialize = () => {\n\n  // Create application\n  let app = new Module( 'app' )\n  app\n    .addDependency( 'layout', Layout )\n\n  // Start application\n  app.bootstrap( document.querySelector( 'body' ), 'layout' )\n}\n\nwindow.addEventListener( 'load', () => {\n  initialize()\n} )\n\n```",
    "static": true,
    "access": "public"
  }
]