{"version":3,"sources":["../../../../src/static/js/binder/controller.js"],"sourcesContent":["import { kebabToCamel, parseBoolean, parseDuration } from \"./util.js\";\n\n/**\n * @class\n * @name Controller\n * @namespace Controller\n */\nclass Controller extends HTMLElement {\n /**\n * @static\n * @name observedAttributes\n * @type String[]\n * @memberof! Controller\n * @description These are the attributes to watch for and react to changes\n * This is handled by `attributeChangedCallback()`\n * The default implementation will call `set{AttributeName}(oldValue, newValue)`\n */\n static observedAttributes = [];\n static tag = undefined;\n\n static withTag(tag) {\n return class extends this {\n static tag = tag;\n };\n }\n\n /**\n * Create a new custom controller element\n * @param {*} args\n */\n constructor(args) {\n super();\n this.debug({ msg: \"Constructing binder element\" });\n\n // Store for internal data\n this._internal = {};\n\n this.root = this;\n this.args = args || {};\n this.data = {};\n\n // Keep track of all attached events\n this._events = [];\n\n // Add the data-controller attribute to the element\n this.setAttribute(\"data-controller\", this.localName);\n this.emit(\"binder:created\", {});\n }\n\n /**\n * Work in progress\n * If the element has a `