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KAAK,SAAS,aACpC,WAAW,UAAW,GAGxB,QACA,oBACA,kBAAkB,QAAQ,OAAO,GAAG,KAAM,mBAAoB,uBAAuB,EAMvF,UAAU,UAAU,YAAc,IAAe,QACjD,cAES,QAAS,WAAY,cAAe,QAAS,OAAQ,uBAAwB,aAAc,SAAU,iBAAkB,aAAc,gBAAiB,aAAc","file":"/npm/strudel@1.0.5/dist/strudel.esm.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/strudel@1.0.5/dist/strudel.esm.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!\n * Strudel.js v1.0.5\n * (c) 2016-2019 Mateusz Łuczak\n * Released under the MIT License.\n */\nlet warn = () => {};\nlet error = () => {};\n\nif (process.env.NODE_ENV !== 'production') {\n  const generateTrace = (vm) => {\n    const componentName = vm.prototype ? vm.prototype.name || vm.name : vm.constructor.name;\n    return ` (found in ${componentName})`;\n  };\n  warn = (msg, vm) => {\n    const trace = vm ? generateTrace(vm) : '';\n    console.warn(`[Strudel]: ${msg}${trace}`);\n  };\n  error = (msg, vm) => {\n    const trace = vm ? generateTrace(vm) : '';\n    console.error(`[Strudel]: ${msg}${trace}`);\n  };\n}\n\nconst handleError = (err, vm, info) => {\n  if (process.env.NODE_ENV !== 'production') {\n    error(`Error in ${info}: \"${err.toString()}\"`, vm);\n  }\n\n  console.error(err);\n};\n\n/* eslint-disable */\n\nconst selectors = {};\n\nselectors[/^\\.[\\w\\-]+$/] = function (param) {\n  return document.getElementsByClassName(param.substring(1));\n};\n\nselectors[/^\\w+$/] = function (param) {\n  return document.getElementsByTagName(param);\n};\n\nselectors[/^\\#[\\w\\-]+$/] = function (param) {\n  return document.getElementById(param.substring(1));\n};\n\nselectors[/^</] = function (param) {\n  return new Element().generate(param);\n};\n\n/**\n * Wrapper for query selector\n * @param {String} selector - CSS selector\n * @param {Node} context - Node to select from\n * @returns {NodeList}\n */\nconst byCss = (selector, context) => {\n  return (context || document).querySelectorAll(selector);\n};\n\n/**\n * Wrapper for byCss\n * @param {String} selector\n * @param {Node} context\n * @returns {NodeList}\n */\nconst select = (selector, context) => {\n  selector = selector.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\n  if (context) {\n    return byCss(selector, context);\n  }\n\n  for (var key in selectors) {\n    context = key.split('/');\n    if ((new RegExp(context[1], context[2])).test(selector)) {\n      return selectors[key](selector);\n    }\n  }\n\n  return byCss(selector);\n};\n\n// Store all of the operations to perform when cloning elements\nconst mirror = {\n  /**\n   * Copy all JavaScript events of source node to destination node.\n   */\n  events: function (src, dest) {\n    if (!src._e) return;\n\n    for (var type in src._e) {\n      src._e[type].forEach(function (event) {\n        new Element(dest).on(type, event);\n      });\n    }\n  },\n\n  /**\n   * Copy select input value to its clone.\n   */\n  select: function (src, dest) {\n    if (new Element(src).is('select')) {\n      dest.value = src.value;\n    }\n  },\n\n  /**\n   * Copy textarea input value to its clone\n   */\n  textarea: function (src, dest) {\n    if (new Element(src).is('textarea')) {\n      dest.value = src.value;\n    }\n  }\n};\n\n/**\n * @classdesc Element class used for DOM manipulation\n * @class\n */\nclass Element {\n  /**\n   * @constructor\n   * @param {string} selector - CSS selector\n   * @param {Node} context - Node to wrap into Element\n   * @returns {Element}\n   */\n  constructor(selector, context) {\n    if (selector instanceof Element) {\n      return selector;\n    }\n\n    if (typeof selector === 'string') {\n      selector = select(selector, context);\n    }\n\n    if (selector && selector.nodeName || selector && selector === window) {\n      selector = [selector];\n    }\n\n    this._nodes = this.slice(selector);\n  }\n\n  /**\n   * Returns size of nodes\n   */\n  get length() {\n    return this._nodes.length;\n  }\n\n  /**\n   * Extracts structured data from DOM\n   * @param {Function} callback - A callback to be called on each node. Returned value is added to the set\n   * @returns {*}\n   */\n  array(callback) {\n    let self = this;\n    return this._nodes.reduce(function (list, node, i) {\n      let val;\n      if (callback) {\n        val = callback.call(self, node, i);\n        if (!val) val = false;\n        if (typeof val === 'string') val = new Element(val);\n        if (val instanceof Element) val = val._nodes;\n      } else {\n        val = node.innerHTML;\n      }\n      return list.concat(val !== false ? val : []);\n    }, []);\n  }\n\n  /**\n   * Create a string from different things\n   * @private\n   */\n  str(node, i) {\n    return function (arg) {\n      if (typeof arg === 'function') {\n        return arg.call(this, node, i);\n      }\n\n      return arg.toString();\n    };\n  }\n\n  /**\n   * Check the current matched set of elements against a selector and return true if at least one of these elements matches the given arguments.\n   * @param {selector} selector - A string containing a selector expression to match elements against.\n   * @returns {boolean}\n   */\n  is(selector) {\n    return this.filter(selector).length > 0;\n  }\n\n  /**\n   * Reduce the set of matched elements to those that match the selector or pass the function's test.\n   * @param {selector} selector A string containing a selector expression to match elements against.\n   * @returns {Element}\n   */\n  filter(selector) {\n    let callback = function (node) {\n      node.matches = node.matches || node.msMatchesSelector || node.webkitMatchesSelector;\n      return node.matches(selector || '*');\n    };\n\n    if (typeof selector === 'function') callback = selector;\n\n    if (selector instanceof Element) {\n      callback = function (node) {\n        return (selector._nodes).indexOf(node) !== -1;\n      };\n    }\n\n    return new Element(this._nodes.filter(callback));\n  }\n\n  /**\n   * Reduce the set of matched elements to the one at the specified index.\n   * @param {Number} index - An integer indicating the 0-based position of the element.\n   * @returns {Element|boolean}\n   */\n  eq(index) {\n    return new Element(this._nodes[index]) || false;\n  }\n\n  /**\n   * Reduce the set of matched elements to the HTMLElement at the specified index.\n   * @param {Number} index - An integer indicating the 0-based position of the element.\n   * @returns {HTMLElement}\n   */\n  get(index) {\n    return ((index || index === 0) && index <= this._nodes.length) ? this._nodes[index] : this._nodes;\n  }\n\n  /**\n   * Reduce the set of matched elements to the first in the set.\n   * @returns {HTMLElement}\n   */\n  first() {\n    return this._nodes[0] || false;\n  }\n\n  /**\n   * Returns index of a given element\n   * @param {HTMLElement|Element} element\n   * @returns {Number}\n   */\n  index(element) {\n    const siblings = this.children()._nodes;\n    const node = element instanceof HTMLElement ? element : element.first();\n    return Array.prototype.indexOf.call(siblings, node);\n  }\n\n  /**\n   * Converts Arraylike to array\n   * @private\n   */\n  slice(pseudo) {\n    if (!pseudo ||\n      pseudo.length === 0 ||\n      typeof pseudo === 'string' ||\n      pseudo.toString() === '[object Function]') return [];\n\n    return pseudo.length ? [].slice.call(pseudo._nodes || pseudo) : [pseudo];\n  }\n\n  /**\n   * Removes duplicated nodes\n   * @private\n   */\n  unique() {\n    return new Element(this._nodes.reduce(function (clean, node) {\n      let isTruthy = node !== null && node !== undefined && node !== false;\n      return (isTruthy && clean.indexOf(node) === -1) ? clean.concat(node) : clean;\n    }, []));\n  }\n\n  /**\n   * Get the direct children of all of the nodes with an optional filter\n   * @param [string] selector - Filter what children to get\n   * @returns {Element}\n   */\n  children(selector) {\n    return this.map(function (node) {\n      return this.slice(node.children);\n    }).filter(selector);\n  }\n\n  /**\n   * Generates element from htmlString\n   * @private\n   */\n  generate(html) {\n    if (/^\\s*<t(h|r|d)/.test(html)) {\n      return new Element(document.createElement('table')).html(html).children()._nodes;\n    } else if (/^\\s*</.test(html)) {\n      return new Element(document.createElement('div')).html(html).children()._nodes;\n    } else {\n      return document.createTextNode(html);\n    }\n  }\n\n  /**\n   * Normalize the arguments to an array of strings\n   * @private\n   */\n  args(args, node, i) {\n    if (typeof args === 'function') {\n      args = args(node, i);\n    }\n\n    if (typeof args !== 'string') {\n      args = this.slice(args).map(this.str(node, i));\n    }\n\n    return args.toString().split(/[\\s,]+/).filter(function (e) {\n      return e.length;\n    });\n  }\n\n  /**\n   * Loops through the nodes and executes callback for each\n   * @param {Function} callback - The function that will be called\n   * @returns {Element}\n   */\n  each(callback) {\n    this._nodes.forEach(callback.bind(this));\n    return this;\n  }\n\n  /**\n   * Loop through the combination of every node and every argument passed\n   * @private\n   */\n  eacharg(args, callback) {\n    return this.each(function (node, i) {\n      this.args(args, node, i).forEach(function (arg) {\n        callback.call(this, node, arg);\n      }, this);\n    });\n  }\n\n  /**\n   * Checks if node exists on a page\n   * @private\n   */\n  isInPage(node) {\n    return (node === document.body) ? false : document.body.contains(node);\n  }\n\n  /**\n   * Changes the content of the current instance by running a callback for each Element\n   * @param {Function} callback - A callback that returns an element that are going to be kept\n   * @returns {Element}\n   */\n  map(callback) {\n    return callback ? new Element(this.array(callback)).unique() : this;\n  }\n\n  /**\n   * Add texts in specific position\n   * @private\n   */\n  adjacent(html, data, callback) {\n    if (typeof data === 'number') {\n      if (data === 0) {\n        data = [];\n      } else {\n        data = new Array(data).join().split(',').map(Number.call, Number);\n      }\n    }\n\n    return this.each(function (node, j) {\n      let fragment = document.createDocumentFragment();\n\n      new Element(data || {}).map(function (el, i) {\n        let part = (typeof html === 'function') ? html.call(this, el, i, node, j) : html;\n\n        if (typeof part === 'string') {\n          return this.generate(part);\n        }\n\n        return new Element(part);\n      }).each(function (n) {\n        this.isInPage(n)\n          ? fragment.appendChild(new Element(n).clone().first())\n          : fragment.appendChild(n);\n      });\n\n      callback.call(this, node, fragment);\n    });\n  }\n\n  /**\n   * Return an array of DOM nodes of a source node and its children.\n   * @private\n   */\n  getAll(context) {\n    return new Element([context].concat(new Element('*', context)._nodes));\n  }\n\n  /**\n   * Deep clone a DOM node and its descendants.\n   * @returns {Element}\n   */\n  clone() {\n    return this.map(function (node) {\n      var clone = node.cloneNode(true);\n      var dest = this.getAll(clone);\n\n      this.getAll(node).each(function (src, i) {\n        for (var key in mirror) {\n          mirror[key](src, dest._nodes[i]);\n        }\n      });\n\n      return clone;\n    });\n  }\n\n  /**\n   * Gets the HTML contents of the first element in a set.\n   * When parameter is provided set the HTML contents of each element in the set.\n   * @param {htmlString} [text] - A string of HTML to set as the content of each matched element\n   * @returns {htmlString|Element}\n   */\n  html(text) {\n    if (text === undefined) {\n      return this.first().innerHTML || '';\n    }\n\n    return this.each(function (node) {\n      node.innerHTML = text;\n    });\n  }\n\n  /**\n   * Gets the text contents of the first element in a set.\n   * When parameter is provided set the text contents of each element in the set.\n   * @param {string} [text] - A string to set as the text content of each matched element.\n   * @returns {string|Element}\n   */\n  text(text) {\n    if (text === undefined) {\n      return this.first().textContent || '';\n    }\n\n    return this.each(function (node) {\n      node.textContent = text;\n    });\n  }\n\n  /**\n   * Remove the set of matched elements from the DOM.\n   * @returns {Element}\n   */\n  remove() {\n    return this.each(function (node) {\n      node.parentNode.removeChild(node);\n    });\n  }\n\n  /**\n   * Travel the matched elements one node up\n   * @param {selector} CSS Selector\n   * @returns {Element}\n   */\n  parent(selector) {\n    return this.map(function (node) {\n      return node.parentNode;\n    }).filter(selector);\n  }\n\n  /**\n   * Find the first ancestor that matches the selector for each node\n   * @param {selector} CSS Selector\n   * @returns {Element}\n   */\n  closest(selector) {\n    return this.map(function (node) {\n      do {\n        if (new Element(node).is(selector)) {\n          return node;\n        }\n      } while ((node = node.parentNode) && node !== document);\n    });\n  }\n\n  /**\n   * Insert content, specified by the parameter, to the end of each element in the set of matched elements\n   * Additional data can be provided, which will be used for populating the html\n   * @param {string|Element} html - Html string or Element\n   * @param [data]\n   * @returns {Element}\n   */\n  append(html, data) {\n    return this.adjacent(html, data, function (node, fragment) {\n      node.appendChild(fragment);\n    });\n  }\n\n  /**\n   * Insert content, specified by the parameter, to the begining of each element in the set of matched elements\n   * Additional data can be provided, which will be used for populating the html\n   * @param {string|Element} html - Html string or Element\n   * @param [data]\n   * @returns {Element}\n   */\n  prepend(html, data) {\n    return this.adjacent(html, data, function (node, fragment) {\n      node.insertBefore(fragment, node.firstChild);\n    });\n  }\n\n  /**\n   * Get the descendants of each element in the current set of matched elements, filtered by a selector.\n   * @param {selector} selector - A string containing a selector expression to match elements against.\n   * @returns {Element}\n   */\n  find(selector) {\n    return this.map(function (node) {\n      const startsWithImmediateChildrenSelector = selector[0] === '>';\n      let hadId;\n\n      if (startsWithImmediateChildrenSelector) {\n        hadId = true;\n\n        if (!node.id) {\n          hadId = false;\n          node.id = `strudel-${Math.random().toString(36).substr(2, 9)}`;\n        }\n\n        selector = `#${node.id}${selector}`;\n      }\n\n      const result = new Element(selector || '*', node);\n\n      if (startsWithImmediateChildrenSelector && !hadId) {\n        node.removeAttribute('id');\n      }\n\n      return result;\n    });\n  }\n\n  /**\n   * Adds the specified class(es) to each element in the set of matched elements.\n   * @param {...string} className - Class(es) to be added\n   * @returns {Element}\n   */\n  addClass(className) {\n    return this.eacharg(arguments, function (el, name) {\n      el.classList.add(name);\n    });\n  }\n\n  /**\n   * Toggles the specified class(es) to each element in the set of matched elements.\n   * @param {...string} className - Class(es) to be toggled\n   * @returns {Element}\n   */\n  toggleClass(className) {\n    return this.eacharg(arguments, function (el, name) {\n      el.classList.toggle(name);\n    });\n  }\n\n  /**\n   * Removes the specified class(es) from each element in the set of matched elements.\n   * @param {...string} className - Class(es) to be removed\n   * @returns {Element}\n   */\n  removeClass(className) {\n    return this.eacharg(arguments, function (el, name) {\n      el.classList.remove(name);\n    });\n  }\n\n  /**\n   * Attach event handlers\n   * @param {string} events - Events to attach handlers for - can be space separated or comma separated list, or array of strings\n   * @param {string|Function} cb - Callback or CSS selector\n   * @param [Function] cb2 - Callback when second parameter is a selector\n   * @returns {Element}\n   */\n  on(events, cb, cb2) {\n    let providedHandler = cb;\n    if (typeof cb === 'string') {\n      let sel = cb;\n      cb = function (e) {\n        let args = arguments;\n        let el = new Element(e.currentTarget);\n        let set = el.is(sel) ? el : el.find(sel);\n        set.each(function (target) {\n          if (target === e.target || target.contains(e.target)) {\n            try {\n              Object.defineProperty(e, 'currentTarget', {\n                get: function () {\n                  return target;\n                }\n              });\n            } catch (err) { }\n            cb2.apply(target, args);\n          }\n        });\n      };\n      providedHandler = cb2;\n    }\n\n    let eventHandler = function (e) {\n      return cb.apply(this, [e].concat(e.detail || []));\n    };\n\n    return this.eacharg(events, function (node, event) {\n      node.addEventListener(event, eventHandler);\n\n      node._e = node._e || {};\n      node._e[event] = node._e[event] || [];\n      node._e[event].push({\n        providedHandler,\n        eventHandler,\n      });\n    });\n  }\n\n  /**\n   * Remove an event handler\n   * @param {string} events\n   * @param {function} handler to be removed\n   */\n  off(events, handler) {\n    if (events === undefined && handler === undefined) {\n      this.each(function (node) {\n        for (let event in node._e) {\n          node._e[event].forEach(function ({eventHandler}) {\n            node.removeEventListener(event, eventHandler);\n          });\n        }\n        node._e = {};\n      });\n    }\n\n    return this.eacharg(events, function (node, event) {\n      new Element(node._e ? node._e[event] : []).each(function ({providedHandler, eventHandler}, index) {\n        if(handler) {\n          if (handler === providedHandler) {\n            node.removeEventListener(event, eventHandler);\n            node._e[event] = [\n              ...node._e[event].slice(0, index),\n              ...node._e[event].slice(index + 1),\n            ];\n          }\n        } else {\n          node.removeEventListener(event, eventHandler);\n          node._e[event] = [];\n        }\n      });\n    });\n  }\n\n  /**\n   * Execute all handlers attached to the event type\n   * @param {string} events - Event types to be executed\n   * @returns {*}\n   */\n  trigger(events) {\n    let data = this.slice(arguments).slice(1);\n\n    return this.eacharg(events, function (node, event) {\n      let ev;\n      let opts = { bubbles: true, cancelable: true, detail: data };\n\n      try {\n        ev = new window.CustomEvent(event, opts);\n      } catch (e) {\n        ev = document.createEvent('CustomEvent');\n        ev.initCustomEvent(event, true, true, data);\n      }\n\n      node.dispatchEvent(ev);\n    });\n  }\n\n  /**\n   * Get the value of an attribute for the first element in the set.\n   * When parameter is provided set the text contents of each element in the set.\n   * @param [string|object] name - Name of the attribute to be retrieved/set. Can be object of attributes/values.\n   * @param [string] value - Value of the attribute to be set.\n   * @returns {string|Element}\n   */\n  attr(name, value, data) {\n    data = data ? 'data-' : '';\n\n    if (value !== undefined) {\n      let nm = name;\n      name = {};\n      name[nm] = value;\n    }\n\n    if (typeof name === 'object') {\n      return this.each(function (node) {\n        for (let key in name) {\n          if (name[key] !== null) {\n            node.setAttribute(data + key, name[key]);\n          } else {\n            node.removeAttribute(data + key);\n          }\n        }\n      });\n    }\n\n    return this.length ? this.first().getAttribute(data + name) : '';\n  }\n\n  /**\n   * Get the prop for the each element in the set of matched elements or set one or more attributes for every matched element.\n   * @param [string|object] name - Name of the property to be retrieved/set. Can be object of attributes/values.\n   * @param [string] value - Value of the property to be set.\n   * @returns {string|Element}\n   */\n  prop(name, value) {\n    if (value !== undefined) {\n      let nm = name;\n      name = {};\n      name[nm] = value;\n    }\n\n    if (typeof name === 'object') {\n      return this.each(function (node) {\n        for (let key in name) {\n          node[key] = name[key];\n        }\n      });\n    }\n\n    return this.length ? this.first()[name] : '';\n  }\n\n  /**\n   * Get the value of an daata attribute for the each element in the set of matched elements or set one or more attributes for every matched element.\n   * @param [string|object] name - Name of the data attribute to be retrieved/set. Can be object of attributes/values.\n   * @param [string] value - Value of the data attribute to be set.\n   * @returns {object|Element}\n   */\n  data(name, value) {\n    if (!name) {\n      return this.first().dataset;\n    }\n    return this.attr(name, value, true);\n  }\n}\n\nfunction $(selector, element) {\n  return new Element(selector, element);\n}\n\n/**\n * List of instance methods that won't be overriden by a component\n * when prototypes are mixed.\n */\nconst protectedMethods = [\n  'constructor',\n  '$teardown',\n  '$on',\n  '$off',\n  '$emit'\n];\n\n/**\n * Check if passed parameter is a function\n * @param obj\n * @returns {boolean}\n */\nconst isFunction = (obj) => {\n  return typeof obj === 'function' || false;\n};\n\n/**\n * Small util for mixing prototypes\n * @param {Function} target\n * @param {Function} source\n */\nconst mixPrototypes = (target, source) => {\n  const targetProto = target.prototype;\n  const sourceProto = source.prototype;\n  const inst = (typeof source === 'object') ? source : new source(); // eslint-disable-line new-cap\n\n  Object.getOwnPropertyNames(inst).forEach((name) => {\n    const desc = Object.getOwnPropertyDescriptor(inst, name);\n    desc.writable = true;\n    Object.defineProperty(targetProto, name, desc);\n  });\n\n  Object.getOwnPropertyNames(sourceProto).forEach((name) => {\n    if (protectedMethods.indexOf(name) !== -1) {\n      if (name !== 'constructor') {\n        warn(`Component tried to override instance method ${name}`, source);\n      }\n    } else {\n      Object.defineProperty(targetProto, name, Object.getOwnPropertyDescriptor(sourceProto, name));\n    }\n  });\n};\n\n/**\n * Util used to create decorators\n * @param {Function} factory - The function that the decorator will be created from\n */\nconst createDecorator = (factory) => {\n  return (...args) => {\n    return (Ctor, property) => {\n      if (!Ctor.__decorators__) {\n        Ctor.__decorators__ = [];\n      }\n\n      Ctor.__decorators__.push((component) => {\n        return factory(component, property, args);\n      });\n    };\n  };\n};\n\n/**\n * Util used to merge two objects together\n * @param obj\n * @param obj\n * @returns {{}|*}\n */\nconst mergeObjects = (obj1, obj2) => {\n  return [obj1, obj2].reduce((prev, curr) => {\n    Object.keys(curr).forEach((key) => {\n      prev[key] = curr[key];\n    });\n    return prev;\n  });\n};\n\n/**\n * Simple registry for storing selector-constructor pairs\n */\nclass Registry {\n  /**\n   * @constructor\n   */\n  constructor() {\n    this._registry = {};\n    this._registrationQueue = {};\n    this._isRegistrationScheduled = false;\n  }\n\n  /**\n   * Returns both permanent registry and the registration queue entires as one object\n   * @returns {{}|*}\n   */\n  getData() {\n    return mergeObjects(this._registry, this._registrationQueue);\n  }\n\n  /**\n   * Returns an Array of registry entires\n   * @returns {Array} registry entries\n   */\n  getRegisteredSelectors() {\n    return Object\n      .keys(this._registry);\n  }\n\n  /**\n   * Returns an Array of temporary registry entires\n   * @returns {Array} registry entries\n   */\n  getSelectorsFromRegistrationQueue() {\n    return Object\n      .keys(this._registrationQueue);\n  }\n\n  /**\n   * Moves all entries from the registration queue to permanent registry and clears queue\n   * @param {string} selector\n   */\n  setSelectorsAsRegistered() {\n    this._registry = mergeObjects(this._registry, this._registrationQueue);\n    this._registrationQueue = {};\n  }\n\n  /**\n   * Returns component constructor for selector from map\n   * @param {string} selector\n   * @returns {Function} constructor\n   */\n  getComponent(selector) {\n    return this._registrationQueue[selector] || this._registry[selector];\n  }\n\n  /**\n   * Adds selector/constructor pair to map\n   * @param {string} selector\n   * @param {Function} constructor\n   */\n  registerComponent(selector, klass) {\n    if (this._registry[selector] || this._registrationQueue[selector]) {\n      warn(`Component registered under selector: ${selector} already exists.`, klass);\n    } else {\n      this._registrationQueue[selector] = klass;\n\n      if (!this._isRegistrationScheduled) {\n        this._isRegistrationScheduled = true;\n\n        window.requestAnimationFrame(() => {\n          this._isRegistrationScheduled = false;\n          $(document).trigger('content:loaded');\n        });\n      }\n    }\n  }\n}\n\nvar registry = new Registry();\n\nconst initializedClassName = 'strudel-init';\n\nvar config = {\n  /**\n   * Class added on components when initialised\n   */\n  initializedClassName,\n  /**\n   * Selector for components that have been initialized\n   */\n  initializedSelector: `.${initializedClassName}`,\n  /**\n   * Whether to enable devtools\n   */\n  devtools: process.env.NODE_ENV !== 'production',\n  /**\n   * Whether to show production mode tip message on boot\n   */\n  productionTip: process.env.NODE_ENV !== 'production'\n};\n\n/**\n * Event listeners\n * @type {{}}\n */\nconst events = {};\n\n/**\n * @classdesc Simple Event Emitter implementation - global\n * @class\n */\nclass EventEmitter {\n  static getEvents() {\n    return events;\n  }\n\n  static removeAllListeners() {\n    Object.keys(events).forEach((prop) => {\n      delete events[prop];\n    });\n  }\n\n  /**\n   * Add event listener to the map\n   * @param {string} label\n   * @param {Function} callback\n   */\n  $on(label, callback) {\n    if (!events[label]) {\n      events[label] = [];\n    }\n    events[label].push(callback);\n  }\n\n  /**\n   * Remove event listener from registry\n   * @param {string} label\n   * @param {Function} callback\n   * @returns {boolean}\n   */\n  $off(label, callback) {\n    const listeners = events[label];\n\n    if (listeners && listeners.length) {\n      const index = listeners.reduce((i, listener, ind) => {\n        return (isFunction(listener) && listener === callback) ? i = ind : i;\n      }, -1);\n\n      if (index > -1) {\n        listeners.splice(index, 1);\n        events[label] = listeners;\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Notifies listeners attached to event\n   * @param {string} label\n   * @param args\n   * @returns {boolean}\n   */\n  $emit(label, ...args) {\n    const listeners = events[label];\n\n    if (listeners && listeners.length) {\n      try {\n        listeners.forEach((listener) => {\n          listener(...args);\n        });\n      } catch (e) {\n        handleError(e, this.constructor, 'event handler');\n      }\n      return true;\n    }\n    return false;\n  }\n}\n\nconst mix = (target, source) => {\n  Object.keys(source).forEach((prop) => {\n    if (!target[prop]) {\n      target[prop] = source[prop];\n    }\n  });\n};\n\n/**\n * @classdesc Base class for all components, implementing event emitter\n * @class\n * @hideconstructor\n */\nclass Component extends EventEmitter {\n  constructor({ element, data } = {}) {\n    super();\n\n    this.mixins = this.mixins || [];\n\n    try {\n      this.mixins.forEach((mixin) => {\n        if (isFunction(mixin.beforeInit)) {\n          mixin.beforeInit.call(this);\n        }\n        mix(this, mixin);\n      });\n\n      this.beforeInit();\n\n      this.$element = element;\n      this.$data = data;\n\n      if (this.__decorators__) {\n        this.__decorators__.forEach((fn) => {\n          fn(this);\n        });\n        delete this.__decorators__;\n      }\n\n      this.mixins.forEach((mixin) => {\n        if (isFunction(mixin.init)) {\n          mixin.init.call(this);\n        }\n      });\n\n      this.init();\n    } catch (e) {\n      handleError(e, this.constructor, 'component hook');\n    }\n\n    this.$element.addClass(config.initializedClassName);\n  }\n\n  /**\n   * Function called before component is initialized\n   * @interface\n   */\n  beforeInit() {}\n\n  /**\n   * Function called when component is initialized\n   * @interface\n   */\n  init() {}\n\n  /**\n   * Function called before component is destroyed\n   * @interface\n   */\n  beforeDestroy() {}\n\n  /**\n   * Function called after component is destroyed\n   * @interface\n   */\n  destroy() {}\n\n  /**\n   * Teardown the component and clear events\n   */\n  $teardown() {\n    try {\n      this.mixins.forEach((mixin) => {\n        if (isFunction(mixin.beforeDestroy)) {\n          mixin.beforeDestroy.call(this);\n        }\n      });\n      this.beforeDestroy();\n      this.$element.off();\n      this.$element.removeClass(config.initializedClassName);\n      delete this.$element.first().__strudel__;\n      delete this.$element;\n      this.mixins.forEach((mixin) => {\n        if (isFunction(mixin.destroy)) {\n          mixin.destroy.call(this);\n        }\n      });\n      this.destroy();\n    } catch (e) {\n      handleError(e, this.constructor, 'component hook');\n    }\n  }\n}\n\n/**\n * Component decorator - Registers decorated class in {@link Registry} as a component\n * @param {string} CSS selector\n */\nconst register = (target, selector) => {\n  if (!selector) {\n    warn('Selector must be provided for Component decorator', target);\n  }\n\n  if (!target.prototype) {\n    warn('Decorator works only for classes', target);\n    return target;\n  }\n\n  const component = class extends Component {\n    constructor(...args) { /* eslint no-useless-constructor: 0 */\n      super(...args);\n    }\n  };\n\n  mixPrototypes(component, target);\n  Object.defineProperty(component.prototype, '_selector', { value: selector });\n  Object.defineProperty(component.prototype, 'isStrudelClass', { value: true });\n  Object.defineProperty(component.prototype, 'name', { value: target.name });\n  registry.registerComponent(selector, component);\n\n  return component;\n};\n\nfunction decorator(selector) {\n  return function _decorator(target) {\n    return register(target, selector);\n  };\n}\n\nconst delegate = (element, eventName, selector, listener) => {\n  if (selector) {\n    element.on(eventName, selector, listener);\n  } else {\n    element.on(eventName, listener);\n  }\n};\n\n/**\n * Event decorator - binds method to event based on the event string\n * @param {string} event\n * @returns (Function} decorator\n */\nvar event = createDecorator((component, property, params) => {\n  let event;\n  let selector;\n\n  if (!params || !params[0]) {\n    warn('Event descriptor must be provided for Evt decorator');\n  } else {\n    [event, selector] = params;\n  }\n\n  if (!component._events) {\n    component._events = [];\n  }\n\n  const callback = function handler(...argz) {\n    try {\n      component[property].apply(this, argz);\n    } catch (e) {\n      handleError(e, component.constructor, 'component handler');\n    }\n  };\n\n  if (event) {\n    const eventName = (selector) ? `${event} ${selector}` : event;\n\n    component._events[eventName] = callback;\n    delegate(component.$element, event, selector, callback.bind(component));\n  }\n});\n\n/**\n * Element decorator - Creates {@link Element} for matching selector and assigns to decorated property.\n * @param {string} CSS selector\n * @returns (Function} decorator\n */\nvar el = createDecorator((component, property, params) => {\n  if (params && params[0]) {\n    component[property] = component.$element.find(params[0]);\n  } else {\n    warn('Selector must be provided for El decorator');\n  }\n\n  if (!component._els) {\n    component._els = [];\n  }\n\n  component._els[property] = property;\n});\n\n/**\n * OnInit decorator - sets method to be run at init\n * @returns {Function} decorator\n */\nvar onInit = createDecorator((component, property) => {\n  const emptyFnc = function () {};\n  const org = component.init || emptyFnc;\n\n  if (property === 'init') {\n    return;\n  }\n\n  component.init = function (...args) {\n    component[property].apply(this, ...args);\n    return org.apply(this, ...args);\n  };\n})();\n\nconst VERSION = '1.0.5';\nconst INIT_CLASS = config.initializedClassName;\nconst INIT_SELECTOR = config.initializedSelector;\n\nconst options = {\n  components: registry.getData()\n};\n\nvar Strudel = /*#__PURE__*/Object.freeze({\n  VERSION: VERSION,\n  INIT_CLASS: INIT_CLASS,\n  INIT_SELECTOR: INIT_SELECTOR,\n  options: options,\n  config: config,\n  Component: decorator,\n  Evt: event,\n  El: el,\n  OnInit: onInit,\n  EventEmitter: EventEmitter,\n  createDecorator: createDecorator,\n  element: $,\n  $: $\n});\n\n/**\n * @classdesc Class linking components with DOM\n * @class\n */\nclass Linker {\n  /**\n   * @constructor\n   * @param {Registry} component registry\n   */\n  constructor(registry) {\n    this.registry = registry;\n  }\n\n  /**\n   * Finds all components within selector and destroy them\n   * @param {DOMElement} container\n   */\n  unlink(container = document) {\n    this.registry.getRegisteredSelectors().forEach((selector) => {\n      const elements = Array.prototype.slice.call(container.querySelectorAll(selector));\n      if (container !== document && $(container).is(config.initializedSelector)) {\n        elements.push(container);\n      }\n      [].forEach.call(elements, (el) => {\n        if (el.__strudel__) {\n          el.__strudel__.$teardown();\n        }\n      });\n    });\n  }\n\n  /**\n   * Iterates over selectors in registry, find occurrences in container and initialize components\n   * @param {DOMElement} container\n   */\n  link(container = document) {\n    const isRootNode = (container === document);\n\n    const selectors = (isRootNode)\n      ? this.registry.getSelectorsFromRegistrationQueue()\n      : this.registry.getRegisteredSelectors();\n\n    if (selectors.length === 0) {\n      return;\n    }\n\n    selectors.forEach((selector) => {\n      const elements = Array.prototype.slice.call(container.querySelectorAll(selector));\n      if (container !== document && $(container).is(selector)) {\n        elements.push(container);\n      }\n      [].forEach.call(elements, (el) => {\n        if (!el.__strudel__) {\n          const element = $(el);\n          const data = element.data();\n          const Instance = this.registry.getComponent(selector);\n          el.__strudel__ = new Instance({ element, data });\n        } else {\n          warn(`Trying to attach component to already initialized node, component with selector ${selector} will not be attached`);\n        }\n      });\n    });\n\n    if (isRootNode) {\n      this.registry.setSelectorsAsRegistered();\n    }\n  }\n}\n\nconst onChildrenAddition = (mutation, callback) => {\n  if (\n      mutation.type === 'childList'\n      && mutation.addedNodes.length > 0\n  ) {\n    callback(mutation);\n  }\n};\n\nconst onChildrenRemoval = (mutation, callback) => {\n  if (\n      mutation.type === 'childList'\n      && mutation.removedNodes.length > 0\n  ) {\n    callback(mutation);\n  }\n};\n\nconst defaultObserverConfig = {\n  childList: true,\n  subtree: true\n};\n\nconst mutationCallback = (mutations, additionCallback, removalCallback) => {\n  mutations.forEach((mutation) => {\n    onChildrenRemoval(mutation, removalCallback);\n    onChildrenAddition(mutation, additionCallback);\n  });\n};\n\nconst attachDOMObserver = (observerRoot, additionCallback, removalCallback) => {\n  const DOMObserver = new MutationObserver((mutations) => {\n    mutationCallback(mutations, additionCallback, removalCallback);\n  });\n\n  DOMObserver.observe(observerRoot, defaultObserverConfig);\n};\n\nconst devtools = window.__STRUDEL_DEVTOOLS_GLOBAL_HOOK__;\n\nconst mount = () => {\n  setTimeout(() => {\n    if (config.devtools) {\n      if (devtools) {\n        devtools.emit('init', Strudel);\n      } else if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n        console.info(\n          'Download the Strudel Devtools extension for a better development experience:\\n' +\n          'https://github.com/strudeljs/strudel-devtools'\n        );\n      }\n    }\n    if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && config.productionTip !== false) {\n      console.info(\n        'You are running Strudel in development mode.\\n' +\n        'Make sure to turn on production mode when deploying for production.'\n      );\n    }\n  }, 0);\n};\n\nconst linker = new Linker(registry);\nconst channel = $(document);\n\nconst isValidNode = ({ nodeName, nodeType }) => {\n  return nodeName !== 'SCRIPT' && nodeName !== 'svg' && nodeType === 1;\n};\n\nconst getElement = (detail) => {\n  let element;\n\n  if (detail && detail.length > 0) {\n    element = isValidNode(detail[0]) ? detail[0] : detail[0].first();\n  }\n\n  return element;\n};\n\nconst bootstrap = (root) => {\n  linker.link(getElement(root));\n  channel.trigger('strudel:loaded');\n};\n\nconst bindContentEvents = () => {\n  channel.on('content:loaded', (evt) => {\n    bootstrap(evt.detail);\n  });\n};\n\nconst onAutoInitCallback = (mutation) => {\n  const registeredSelectors = registry.getRegisteredSelectors();\n\n  Array.prototype.slice.call(mutation.addedNodes)\n    .filter((node) => {\n      return isValidNode(node);\n    })\n    .forEach((node) => {\n      if (registeredSelectors.some((el) => {\n        const lookupSelector = `${el}:not(${config.initializedSelector})`;\n\n        return $(node).is(lookupSelector) || $(node).find(lookupSelector).length;\n      })) {\n        bootstrap([node]);\n      }\n    });\n};\n\nconst onAutoTeardownCallback = (mutation) => {\n  Array.prototype.slice.call(mutation.removedNodes)\n    .filter((node) => {\n      return isValidNode(node) && ($(node).is(config.initializedSelector) || $(node).find(config.initializedSelector).length);\n    })\n    .forEach((node) => {\n      const initializedSubNodes = node.querySelector(config.initializedSelector);\n\n      if (initializedSubNodes) {\n        Array.prototype.slice.call(initializedSubNodes).forEach(\n          (subNode) => { linker.unlink(subNode); },\n        );\n      }\n      linker.unlink(node);\n    });\n};\n\nconst init = () => {\n  if (/comp|inter|loaded/.test(document.readyState)) {\n    setTimeout(bootstrap, 0);\n  }\n\n  mount();\n  bindContentEvents();\n  attachDOMObserver(channel._nodes[0].body, onAutoInitCallback, onAutoTeardownCallback);\n};\n\n/**\n * Expose Strudel in component prototype and start processing\n */\nComponent.prototype.getInstance = () => { return Strudel; };\ninit();\n\nexport { VERSION, INIT_CLASS, INIT_SELECTOR, options, config, decorator as Component, event as Evt, el as El, onInit as OnInit, EventEmitter, createDecorator, $ as element, $ };\n"]}