{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@stimulus/core/dist/event_listener.js","webpack:///./node_modules/@stimulus/core/dist/dispatcher.js","webpack:///./node_modules/@stimulus/core/dist/action_descriptor.js","webpack:///./node_modules/@stimulus/core/dist/action.js","webpack:///./node_modules/@stimulus/core/dist/binding.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/element_observer.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/attribute_observer.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/string_map_observer.js","webpack:///./node_modules/@stimulus/multimap/dist/set_operations.js","webpack:///./node_modules/@stimulus/multimap/dist/multimap.js","webpack:///./node_modules/@stimulus/multimap/dist/indexed_multimap.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/token_list_observer.js","webpack:///./node_modules/@stimulus/mutation-observers/dist/value_list_observer.js","webpack:///./node_modules/@stimulus/core/dist/binding_observer.js","webpack:///./node_modules/@stimulus/core/dist/value_observer.js","webpack:///./node_modules/@stimulus/core/dist/context.js","webpack:///./node_modules/@stimulus/core/dist/inheritable_statics.js","webpack:///./node_modules/@stimulus/core/dist/blessing.js","webpack:///./node_modules/@stimulus/core/dist/module.js","webpack:///./node_modules/@stimulus/core/dist/definition.js","webpack:///./node_modules/@stimulus/core/dist/class_map.js","webpack:///./node_modules/@stimulus/core/dist/string_helpers.js","webpack:///./node_modules/@stimulus/core/dist/data_map.js","webpack:///./node_modules/@stimulus/core/dist/guide.js","webpack:///./node_modules/@stimulus/core/dist/selectors.js","webpack:///./node_modules/@stimulus/core/dist/target_set.js","webpack:///./node_modules/@stimulus/core/dist/scope.js","webpack:///./node_modules/@stimulus/core/dist/scope_observer.js","webpack:///./node_modules/@stimulus/core/dist/router.js","webpack:///./node_modules/@stimulus/core/dist/schema.js","webpack:///./node_modules/@stimulus/core/dist/application.js","webpack:///./node_modules/@stimulus/core/dist/class_properties.js","webpack:///./node_modules/@stimulus/core/dist/target_properties.js","webpack:///./node_modules/@stimulus/core/dist/value_properties.js","webpack:///./node_modules/@stimulus/core/dist/controller.js","webpack:///./node_modules/stimulus-autocomplete/dist/stimulus-autocomplete.js","webpack:///./node_modules/lodash.debounce/index.js","webpack:///(webpack)/buildin/global.js","webpack:///./app/javascript/controllers sync .js$","webpack:///./app/javascript/controllers/filter_controller.js","webpack:///./app/javascript/controllers/modals_controller.js","webpack:///./app/javascript/controllers/notifications_controller.js","webpack:///./app/javascript/controllers/search_controller.js","webpack:///./app/javascript/controllers/search_results_controller.js","webpack:///./app/javascript/controllers/subselect_controller.js","webpack:///./app/javascript/packs/application.js","webpack:///./node_modules/@stimulus/webpack-helpers/dist/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","EventListener","eventTarget","eventName","eventOptions","this","unorderedBindings","Set","connect","addEventListener","disconnect","removeEventListener","bindingConnected","binding","add","bindingDisconnected","delete","handleEvent","event","extendedEvent","stopImmediatePropagation_1","stopImmediatePropagation","assign","immediatePropagationStopped","extendEvent","_i","_a","bindings","length","Array","from","sort","left","right","leftIndex","index","rightIndex","configurable","Dispatcher","application","eventListenerMaps","Map","started","start","eventListeners","forEach","eventListener","stop","values","reduce","listeners","map","concat","fetchEventListenerForBinding","handleError","error","message","detail","fetchEventListener","eventListenerMap","fetchEventListenerMapForEventTarget","cacheKey","createEventListener","set","parts","keys","push","join","descriptorPattern","parseEventTarget","eventTargetName","window","document","Action","element","descriptor","tagName","toLowerCase","defaultEventNames","getDefaultEventNameForElement","identifier","methodName","forToken","token","descriptorString","content","matches","trim","match","split","options","replace","test","toString","eventNameSuffix","e","getAttribute","Error","Binding","context","action","willBeInvokedByEvent","invokeWithEvent","method","controller","target","Element","contains","scope","containsElement","ElementObserver","delegate","_this","elements","mutationObserver","MutationObserver","mutations","processMutations","observe","attributes","childList","subtree","refresh","takeRecords","matchElementsInTree","has","removeElement","_b","_c","addElement","mutations_1","mutation","processMutation","type","processAttributeChange","attributeName","processRemovedNodes","removedNodes","processAddedNodes","addedNodes","node","elementAttributeChanged","matchElement","nodes","elementFromNode","processTree","elementIsActive","tree","processor","nodeType","Node","ELEMENT_NODE","isConnected","elementMatched","elementUnmatched","AttributeObserver","elementObserver","hasAttribute","querySelectorAll","selector","elementMatchedAttribute","elementUnmatchedAttribute","elementAttributeValueChanged","StringMapObserver","stringMap","knownAttributeNames","refreshAttribute","getStringMapKeyForAttribute","stringMapKeyAdded","stringMapValueChanged","stringMapKeyRemoved","currentAttributeNames","recordedAttributeNames","attribute","fetch","del","size","prune","extendStatics","Multimap","valuesByKey","hasKey","hasValue","some","getValuesForKey","getKeysForValue","filter","__extends","b","setPrototypeOf","__proto__","__","constructor","_super","IndexedMultimap","keysByValue","TokenListObserver","attributeObserver","tokensByElement","tokensMatched","readTokensForElement","refreshTokensForElement","unmatchedTokens","matchedTokens","tokensUnmatched","tokens","tokenMatched","tokenUnmatched","previousTokens","currentTokens","firstDifferingIndex","Math","max","_","findIndex","tokensAreEqual","slice","tokenString","parseTokenString","ValueListObserver","tokenListObserver","parseResultsByToken","WeakMap","valuesByTokenByElement","fetchParseResultForToken","fetchValuesByTokenForElement","elementMatchedValue","elementUnmatchedValue","parseResult","parseToken","valuesByToken","parseValueForToken","BindingObserver","bindingsByAction","valueListObserver","actionAttribute","disconnectAllActions","schema","connectAction","disconnectAction","clear","ValueObserver","receiver","stringMapObserver","valueDescriptorMap","invokeChangedCallbacksForDefaultValues","attributeValue","invokeChangedCallbackForValue","valueDescriptors","name_1","undefined","defaultValue","data","Context","controllerConstructor","bindingObserver","dispatcher","valueObserver","initialize","parentElement","readInheritableStaticArrayValues","propertyName","ancestors","getAncestorsForConstructor","definition","isArray","getOwnStaticArrayValues","readInheritableStaticObjectPairs","pairs","apply","getOwnStaticObjectPairs","getPrototypeOf","reverse","__spreadArrays","il","arguments","k","a","j","jl","bless","properties","shadowConstructor","extend","shadowProperties","getOwnKeys","shadowingDescriptor","getOwnPropertyDescriptor","getShadowedDescriptor","getShadowProperties","defineProperties","shadow","blessings","blessedProperties","blessing","getBlessedProperties","getOwnPropertySymbols","getOwnPropertyNames","extendWithReflect","extended","_newTarget","Reflect","construct","Module","blessDefinition","contextsByScope","connectedContexts","connectContextForScope","fetchContextForScope","disconnectContextForScope","ClassMap","getDataKey","getAttributeName","getAttributeNameForKey","camelize","char","toUpperCase","capitalize","charAt","dasherize","DataMap","setAttribute","removeAttribute","Guide","logger","warnedKeysByObject","warn","warnedKeys","attributeValueContainsToken","TargetSet","targetName","find","targetNames","findTarget","findLegacyTarget","findAll","targets","findAllTargets","findAllLegacyTargets","getSelectorForTargetName","findElement","findAllElements","getLegacySelectorForTargetName","deprecate","targetDescriptor","targetAttribute","guide","Scope","classes","closest","controllerSelector","queryElements","controllerAttribute","ScopeObserver","scopesByIdentifierByElement","scopeReferenceCounts","scopesByIdentifier","fetchScopesByIdentifierForElement","createScopeForElementAndIdentifier","referenceCount","scopeConnected","scopeDisconnected","Router","scopeObserver","modulesByIdentifier","contexts","loadDefinition","unloadIdentifier","connectModule","disconnectModule","getContextForElementAndIdentifier","defaultSchema","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","result","done","then","__generator","body","f","y","g","label","sent","trys","ops","verb","iterator","v","op","TypeError","pop","Application","documentElement","console","router","readyState","register","load","head","rest","unload","getControllerForElementAndIdentifier","ClassPropertiesBlessing","classDefinition","TargetPropertiesBlessing","targetDefinition","ValuePropertiesBlessing","valueDefinitionPairs","propertyDescriptorMap","valueDefinitionPair","valueDescriptor","parseValueDefinitionPair","read","readers","write","writers","default","propertiesForValueDefinitionPair","typeConstant","Boolean","Number","String","parseValueTypeConstant","defaultValuesByType","valueDescriptorForTokenAndType","array","boolean","number","string","JSON","parse","parseFloat","writeJSON","stringify","Controller","extractTextValue","textContent","resultsTarget","hidden","inputTarget","mouseDown","onInputChange","onResultsClick","onResultsMouseDown","onInputBlur","onKeydown","focus","hasInputTarget","onInputFocus","hasResultsTarget","sibling","querySelector","indexOf","select","classList","remove","id","scrollIntoView","hideAndRemoveOptions","stopPropagation","preventDefault","commit","hasSubmitOnEnterValue","HTMLAnchorElement","click","hasHiddenTarget","hiddenTarget","dispatchEvent","Event","CustomEvent","bubbles","textValue","once","fetchResults","identifyOptions","innerHTML","minLengthValue","hasUrlValue","URL","urlValue","location","href","URLSearchParams","search","append","headers","text","catch","open","input","results","close","submitOnEnter","url","minLength","Autocomplete","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","freeSelf","self","root","Function","objectToString","nativeMax","nativeMin","min","now","Date","isObject","toNumber","isObjectLike","isSymbol","other","valueOf","isBinary","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","leadingEdge","cancel","clearTimeout","flush","webpackContext","req","webpackContextResolve","code","_default","_Controller","_inherits","_createSuper","_classCallCheck","lowerCaseFilterTerm","sourceTarget","filterableTargets","el","filterableKey","toggle","includes","modalTarget","noticeTarget","style","display","reset","query","previousQuery","searchParams","response","html","queryTarget","searchResultsController","navigateResults","firstElementChild","navigationKeys","currentResultIndex","selectCurrentResult","keyCode","selectNextResult","selectPreviousResult","goToSelectedResult","resultTargets","showTeams","selectedLeagueLabel","teamsOptionsTarget","selectedIndex","selectedGroupLabel","leagueOptionGroups","getElementsByTagName","leagues","leaguesOptionsTarget","require","logicalName","identifierForContextKey","definitionForModuleAndIdentifier","definitionForModuleWithContextAndKey","definitionsFromContext"],"mappings":"aACE,IAAIA,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,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AAC,CAAApmB,IAAA,sBAAAV,IAED,WACE,IAAM+mB,EAAUxlB,KAAKylB,qBACrB,OAAOD,EAAQngB,QAAQmgB,EAAQJ,eAAejN,KAChD,M,8EAAC4K,CAAA,CAvBkC,C,KAERvH,YAAUuH,EAC9BpO,QAAU,CAAC,iBAAkB,e,4DCYhCzS,EAAc2W,cAAYvW,QAC1BwD,EAAU4f,KAChBxjB,EAAYiX,KCjBL,SAAgCrT,GACrC,OAAOA,EAAQlC,OAAOd,KAAI,SAAU3D,GAClC,OAKJ,SAA8C2G,EAAS3G,GACrD,IAAIwF,EAcC,SAAiCxF,GACtC,IAAIwmB,GAAexmB,EAAIgG,MAAM,2CAA6C,IAAI,GAC9E,GAAIwgB,EACF,OAAOA,EAAYrgB,QAAQ,KAAM,KAAKA,QAAQ,MAAO,KAEzD,CAnBmBsgB,CAAwBzmB,GACzC,GAAIwF,EACF,OAGJ,SAA0ChH,EAAQgH,GAChD,IAAI8K,EAAwB9R,EAAO2c,QACnC,GAAoC,mBAAzB7K,EACT,MAAO,CACL9K,WAAYA,EACZ8K,sBAAuBA,EAG7B,CAXWoW,CAAiC/f,EAAQ3G,GAAMwF,EAE1D,CAVWmhB,CAAqChgB,EAAS3G,EACvD,IAAGkM,QAAO,SAAUxM,GAClB,OAAOA,CACT,GACF,CDWiBknB,CAAuBjgB,IAExC5D,EAAYgX,SAAS,eAAgBmG,e","file":"js/application-19ae2f94cbafa0415c7c.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","var EventListener = /** @class */function () {\n function EventListener(eventTarget, eventName, eventOptions) {\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.eventOptions = eventOptions;\n this.unorderedBindings = new Set();\n }\n EventListener.prototype.connect = function () {\n this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n };\n EventListener.prototype.disconnect = function () {\n this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n };\n // Binding observer delegate\n /** @hidden */\n EventListener.prototype.bindingConnected = function (binding) {\n this.unorderedBindings.add(binding);\n };\n /** @hidden */\n EventListener.prototype.bindingDisconnected = function (binding) {\n this.unorderedBindings.delete(binding);\n };\n EventListener.prototype.handleEvent = function (event) {\n var extendedEvent = extendEvent(event);\n for (var _i = 0, _a = this.bindings; _i < _a.length; _i++) {\n var binding = _a[_i];\n if (extendedEvent.immediatePropagationStopped) {\n break;\n } else {\n binding.handleEvent(extendedEvent);\n }\n }\n };\n Object.defineProperty(EventListener.prototype, \"bindings\", {\n get: function () {\n return Array.from(this.unorderedBindings).sort(function (left, right) {\n var leftIndex = left.index,\n rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n },\n enumerable: false,\n configurable: true\n });\n return EventListener;\n}();\nexport { EventListener };\nfunction extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) {\n return event;\n } else {\n var stopImmediatePropagation_1 = event.stopImmediatePropagation;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation: function () {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation_1.call(this);\n }\n });\n }\n}","import { EventListener } from \"./event_listener\";\nvar Dispatcher = /** @class */function () {\n function Dispatcher(application) {\n this.application = application;\n this.eventListenerMaps = new Map();\n this.started = false;\n }\n Dispatcher.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach(function (eventListener) {\n return eventListener.connect();\n });\n }\n };\n Dispatcher.prototype.stop = function () {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach(function (eventListener) {\n return eventListener.disconnect();\n });\n }\n };\n Object.defineProperty(Dispatcher.prototype, \"eventListeners\", {\n get: function () {\n return Array.from(this.eventListenerMaps.values()).reduce(function (listeners, map) {\n return listeners.concat(Array.from(map.values()));\n }, []);\n },\n enumerable: false,\n configurable: true\n });\n // Binding observer delegate\n /** @hidden */\n Dispatcher.prototype.bindingConnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n };\n /** @hidden */\n Dispatcher.prototype.bindingDisconnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n };\n // Error handling\n Dispatcher.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) {\n detail = {};\n }\n this.application.handleError(error, \"Error \" + message, detail);\n };\n Dispatcher.prototype.fetchEventListenerForBinding = function (binding) {\n var eventTarget = binding.eventTarget,\n eventName = binding.eventName,\n eventOptions = binding.eventOptions;\n return this.fetchEventListener(eventTarget, eventName, eventOptions);\n };\n Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName, eventOptions) {\n var eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n var cacheKey = this.cacheKey(eventName, eventOptions);\n var eventListener = eventListenerMap.get(cacheKey);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n eventListenerMap.set(cacheKey, eventListener);\n }\n return eventListener;\n };\n Dispatcher.prototype.createEventListener = function (eventTarget, eventName, eventOptions) {\n var eventListener = new EventListener(eventTarget, eventName, eventOptions);\n if (this.started) {\n eventListener.connect();\n }\n return eventListener;\n };\n Dispatcher.prototype.fetchEventListenerMapForEventTarget = function (eventTarget) {\n var eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map();\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n };\n Dispatcher.prototype.cacheKey = function (eventName, eventOptions) {\n var parts = [eventName];\n Object.keys(eventOptions).sort().forEach(function (key) {\n parts.push(\"\" + (eventOptions[key] ? \"\" : \"!\") + key);\n });\n return parts.join(\":\");\n };\n return Dispatcher;\n}();\nexport { Dispatcher };","// capture nos.: 12 23 4 43 1 5 56 7 768 9 98\nvar descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;\nexport function parseActionDescriptorString(descriptorString) {\n var source = descriptorString.trim();\n var matches = source.match(descriptorPattern) || [];\n return {\n eventTarget: parseEventTarget(matches[4]),\n eventName: matches[2],\n eventOptions: matches[9] ? parseEventOptions(matches[9]) : {},\n identifier: matches[5],\n methodName: matches[7]\n };\n}\nfunction parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") {\n return window;\n } else if (eventTargetName == \"document\") {\n return document;\n }\n}\nfunction parseEventOptions(eventOptions) {\n return eventOptions.split(\":\").reduce(function (options, token) {\n var _a;\n return Object.assign(options, (_a = {}, _a[token.replace(/^!/, \"\")] = !/^!/.test(token), _a));\n }, {});\n}\nexport function stringifyEventTarget(eventTarget) {\n if (eventTarget == window) {\n return \"window\";\n } else if (eventTarget == document) {\n return \"document\";\n }\n}","import { parseActionDescriptorString, stringifyEventTarget } from \"./action_descriptor\";\nvar Action = /** @class */function () {\n function Action(element, index, descriptor) {\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n this.eventOptions = descriptor.eventOptions || {};\n this.identifier = descriptor.identifier || error(\"missing identifier\");\n this.methodName = descriptor.methodName || error(\"missing method name\");\n }\n Action.forToken = function (token) {\n return new this(token.element, token.index, parseActionDescriptorString(token.content));\n };\n Action.prototype.toString = function () {\n var eventNameSuffix = this.eventTargetName ? \"@\" + this.eventTargetName : \"\";\n return \"\" + this.eventName + eventNameSuffix + \"->\" + this.identifier + \"#\" + this.methodName;\n };\n Object.defineProperty(Action.prototype, \"eventTargetName\", {\n get: function () {\n return stringifyEventTarget(this.eventTarget);\n },\n enumerable: false,\n configurable: true\n });\n return Action;\n}();\nexport { Action };\nvar defaultEventNames = {\n \"a\": function (e) {\n return \"click\";\n },\n \"button\": function (e) {\n return \"click\";\n },\n \"form\": function (e) {\n return \"submit\";\n },\n \"input\": function (e) {\n return e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\";\n },\n \"select\": function (e) {\n return \"change\";\n },\n \"textarea\": function (e) {\n return \"input\";\n }\n};\nexport function getDefaultEventNameForElement(element) {\n var tagName = element.tagName.toLowerCase();\n if (tagName in defaultEventNames) {\n return defaultEventNames[tagName](element);\n }\n}\nfunction error(message) {\n throw new Error(message);\n}","var Binding = /** @class */function () {\n function Binding(context, action) {\n this.context = context;\n this.action = action;\n }\n Object.defineProperty(Binding.prototype, \"index\", {\n get: function () {\n return this.action.index;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"eventTarget\", {\n get: function () {\n return this.action.eventTarget;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"eventOptions\", {\n get: function () {\n return this.action.eventOptions;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"identifier\", {\n get: function () {\n return this.context.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Binding.prototype.handleEvent = function (event) {\n if (this.willBeInvokedByEvent(event)) {\n this.invokeWithEvent(event);\n }\n };\n Object.defineProperty(Binding.prototype, \"eventName\", {\n get: function () {\n return this.action.eventName;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"method\", {\n get: function () {\n var method = this.controller[this.methodName];\n if (typeof method == \"function\") {\n return method;\n }\n throw new Error(\"Action \\\"\" + this.action + \"\\\" references undefined method \\\"\" + this.methodName + \"\\\"\");\n },\n enumerable: false,\n configurable: true\n });\n Binding.prototype.invokeWithEvent = function (event) {\n try {\n this.method.call(this.controller, event);\n } catch (error) {\n var _a = this,\n identifier = _a.identifier,\n controller = _a.controller,\n element = _a.element,\n index = _a.index;\n var detail = {\n identifier: identifier,\n controller: controller,\n element: element,\n index: index,\n event: event\n };\n this.context.handleError(error, \"invoking action \\\"\" + this.action + \"\\\"\", detail);\n }\n };\n Binding.prototype.willBeInvokedByEvent = function (event) {\n var eventTarget = event.target;\n if (this.element === eventTarget) {\n return true;\n } else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n return this.scope.containsElement(eventTarget);\n } else {\n return this.scope.containsElement(this.action.element);\n }\n };\n Object.defineProperty(Binding.prototype, \"controller\", {\n get: function () {\n return this.context.controller;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"methodName\", {\n get: function () {\n return this.action.methodName;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"scope\", {\n get: function () {\n return this.context.scope;\n },\n enumerable: false,\n configurable: true\n });\n return Binding;\n}();\nexport { Binding };","var ElementObserver = /** @class */function () {\n function ElementObserver(element, delegate) {\n var _this = this;\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set();\n this.mutationObserver = new MutationObserver(function (mutations) {\n return _this.processMutations(mutations);\n });\n }\n ElementObserver.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, {\n attributes: true,\n childList: true,\n subtree: true\n });\n this.refresh();\n }\n };\n ElementObserver.prototype.stop = function () {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n };\n ElementObserver.prototype.refresh = function () {\n if (this.started) {\n var matches = new Set(this.matchElementsInTree());\n for (var _i = 0, _a = Array.from(this.elements); _i < _a.length; _i++) {\n var element = _a[_i];\n if (!matches.has(element)) {\n this.removeElement(element);\n }\n }\n for (var _b = 0, _c = Array.from(matches); _b < _c.length; _b++) {\n var element = _c[_b];\n this.addElement(element);\n }\n }\n };\n // Mutation record processing\n ElementObserver.prototype.processMutations = function (mutations) {\n if (this.started) {\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.processMutation(mutation);\n }\n }\n };\n ElementObserver.prototype.processMutation = function (mutation) {\n if (mutation.type == \"attributes\") {\n this.processAttributeChange(mutation.target, mutation.attributeName);\n } else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n };\n ElementObserver.prototype.processAttributeChange = function (node, attributeName) {\n var element = node;\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n this.delegate.elementAttributeChanged(element, attributeName);\n } else {\n this.removeElement(element);\n }\n } else if (this.matchElement(element)) {\n this.addElement(element);\n }\n };\n ElementObserver.prototype.processRemovedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element) {\n this.processTree(element, this.removeElement);\n }\n }\n };\n ElementObserver.prototype.processAddedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) {\n this.processTree(element, this.addElement);\n }\n }\n };\n // Element matching\n ElementObserver.prototype.matchElement = function (element) {\n return this.delegate.matchElement(element);\n };\n ElementObserver.prototype.matchElementsInTree = function (tree) {\n if (tree === void 0) {\n tree = this.element;\n }\n return this.delegate.matchElementsInTree(tree);\n };\n ElementObserver.prototype.processTree = function (tree, processor) {\n for (var _i = 0, _a = this.matchElementsInTree(tree); _i < _a.length; _i++) {\n var element = _a[_i];\n processor.call(this, element);\n }\n };\n ElementObserver.prototype.elementFromNode = function (node) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n return node;\n }\n };\n ElementObserver.prototype.elementIsActive = function (element) {\n if (element.isConnected != this.element.isConnected) {\n return false;\n } else {\n return this.element.contains(element);\n }\n };\n // Element tracking\n ElementObserver.prototype.addElement = function (element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) {\n this.delegate.elementMatched(element);\n }\n }\n }\n };\n ElementObserver.prototype.removeElement = function (element) {\n if (this.elements.has(element)) {\n this.elements.delete(element);\n if (this.delegate.elementUnmatched) {\n this.delegate.elementUnmatched(element);\n }\n }\n };\n return ElementObserver;\n}();\nexport { ElementObserver };","import { ElementObserver } from \"./element_observer\";\nvar AttributeObserver = /** @class */function () {\n function AttributeObserver(element, attributeName, delegate) {\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new ElementObserver(element, this);\n }\n Object.defineProperty(AttributeObserver.prototype, \"element\", {\n get: function () {\n return this.elementObserver.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AttributeObserver.prototype, \"selector\", {\n get: function () {\n return \"[\" + this.attributeName + \"]\";\n },\n enumerable: false,\n configurable: true\n });\n AttributeObserver.prototype.start = function () {\n this.elementObserver.start();\n };\n AttributeObserver.prototype.stop = function () {\n this.elementObserver.stop();\n };\n AttributeObserver.prototype.refresh = function () {\n this.elementObserver.refresh();\n };\n Object.defineProperty(AttributeObserver.prototype, \"started\", {\n get: function () {\n return this.elementObserver.started;\n },\n enumerable: false,\n configurable: true\n });\n // Element observer delegate\n AttributeObserver.prototype.matchElement = function (element) {\n return element.hasAttribute(this.attributeName);\n };\n AttributeObserver.prototype.matchElementsInTree = function (tree) {\n var match = this.matchElement(tree) ? [tree] : [];\n var matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n };\n AttributeObserver.prototype.elementMatched = function (element) {\n if (this.delegate.elementMatchedAttribute) {\n this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementUnmatched = function (element) {\n if (this.delegate.elementUnmatchedAttribute) {\n this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementAttributeChanged = function (element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n };\n return AttributeObserver;\n}();\nexport { AttributeObserver };","var StringMapObserver = /** @class */function () {\n function StringMapObserver(element, delegate) {\n var _this = this;\n this.element = element;\n this.delegate = delegate;\n this.started = false;\n this.stringMap = new Map();\n this.mutationObserver = new MutationObserver(function (mutations) {\n return _this.processMutations(mutations);\n });\n }\n StringMapObserver.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, {\n attributes: true\n });\n this.refresh();\n }\n };\n StringMapObserver.prototype.stop = function () {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n };\n StringMapObserver.prototype.refresh = function () {\n if (this.started) {\n for (var _i = 0, _a = this.knownAttributeNames; _i < _a.length; _i++) {\n var attributeName = _a[_i];\n this.refreshAttribute(attributeName);\n }\n }\n };\n // Mutation record processing\n StringMapObserver.prototype.processMutations = function (mutations) {\n if (this.started) {\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.processMutation(mutation);\n }\n }\n };\n StringMapObserver.prototype.processMutation = function (mutation) {\n var attributeName = mutation.attributeName;\n if (attributeName) {\n this.refreshAttribute(attributeName);\n }\n };\n // State tracking\n StringMapObserver.prototype.refreshAttribute = function (attributeName) {\n var key = this.delegate.getStringMapKeyForAttribute(attributeName);\n if (key != null) {\n if (!this.stringMap.has(attributeName)) {\n this.stringMapKeyAdded(key, attributeName);\n }\n var value = this.element.getAttribute(attributeName);\n if (this.stringMap.get(attributeName) != value) {\n this.stringMapValueChanged(value, key);\n }\n if (value == null) {\n this.stringMap.delete(attributeName);\n this.stringMapKeyRemoved(key, attributeName);\n } else {\n this.stringMap.set(attributeName, value);\n }\n }\n };\n StringMapObserver.prototype.stringMapKeyAdded = function (key, attributeName) {\n if (this.delegate.stringMapKeyAdded) {\n this.delegate.stringMapKeyAdded(key, attributeName);\n }\n };\n StringMapObserver.prototype.stringMapValueChanged = function (value, key) {\n if (this.delegate.stringMapValueChanged) {\n this.delegate.stringMapValueChanged(value, key);\n }\n };\n StringMapObserver.prototype.stringMapKeyRemoved = function (key, attributeName) {\n if (this.delegate.stringMapKeyRemoved) {\n this.delegate.stringMapKeyRemoved(key, attributeName);\n }\n };\n Object.defineProperty(StringMapObserver.prototype, \"knownAttributeNames\", {\n get: function () {\n return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StringMapObserver.prototype, \"currentAttributeNames\", {\n get: function () {\n return Array.from(this.element.attributes).map(function (attribute) {\n return attribute.name;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StringMapObserver.prototype, \"recordedAttributeNames\", {\n get: function () {\n return Array.from(this.stringMap.keys());\n },\n enumerable: false,\n configurable: true\n });\n return StringMapObserver;\n}();\nexport { StringMapObserver };","export function add(map, key, value) {\n fetch(map, key).add(value);\n}\nexport function del(map, key, value) {\n fetch(map, key).delete(value);\n prune(map, key);\n}\nexport function fetch(map, key) {\n var values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nexport function prune(map, key) {\n var values = map.get(key);\n if (values != null && values.size == 0) {\n map.delete(key);\n }\n}","import { add, del } from \"./set_operations\";\nvar Multimap = /** @class */function () {\n function Multimap() {\n this.valuesByKey = new Map();\n }\n Object.defineProperty(Multimap.prototype, \"values\", {\n get: function () {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (values, set) {\n return values.concat(Array.from(set));\n }, []);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Multimap.prototype, \"size\", {\n get: function () {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (size, set) {\n return size + set.size;\n }, 0);\n },\n enumerable: false,\n configurable: true\n });\n Multimap.prototype.add = function (key, value) {\n add(this.valuesByKey, key, value);\n };\n Multimap.prototype.delete = function (key, value) {\n del(this.valuesByKey, key, value);\n };\n Multimap.prototype.has = function (key, value) {\n var values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n };\n Multimap.prototype.hasKey = function (key) {\n return this.valuesByKey.has(key);\n };\n Multimap.prototype.hasValue = function (value) {\n var sets = Array.from(this.valuesByKey.values());\n return sets.some(function (set) {\n return set.has(value);\n });\n };\n Multimap.prototype.getValuesForKey = function (key) {\n var values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n };\n Multimap.prototype.getKeysForValue = function (value) {\n return Array.from(this.valuesByKey).filter(function (_a) {\n var key = _a[0],\n values = _a[1];\n return values.has(value);\n }).map(function (_a) {\n var key = _a[0],\n values = _a[1];\n return key;\n });\n };\n return Multimap;\n}();\nexport { Multimap };","var __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { Multimap } from \"./multimap\";\nimport { add, del } from \"./set_operations\";\nvar IndexedMultimap = /** @class */function (_super) {\n __extends(IndexedMultimap, _super);\n function IndexedMultimap() {\n var _this = _super.call(this) || this;\n _this.keysByValue = new Map();\n return _this;\n }\n Object.defineProperty(IndexedMultimap.prototype, \"values\", {\n get: function () {\n return Array.from(this.keysByValue.keys());\n },\n enumerable: false,\n configurable: true\n });\n IndexedMultimap.prototype.add = function (key, value) {\n _super.prototype.add.call(this, key, value);\n add(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.delete = function (key, value) {\n _super.prototype.delete.call(this, key, value);\n del(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.hasValue = function (value) {\n return this.keysByValue.has(value);\n };\n IndexedMultimap.prototype.getKeysForValue = function (value) {\n var set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n };\n return IndexedMultimap;\n}(Multimap);\nexport { IndexedMultimap };","import { AttributeObserver } from \"./attribute_observer\";\nimport { Multimap } from \"@stimulus/multimap\";\nvar TokenListObserver = /** @class */function () {\n function TokenListObserver(element, attributeName, delegate) {\n this.attributeObserver = new AttributeObserver(element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new Multimap();\n }\n Object.defineProperty(TokenListObserver.prototype, \"started\", {\n get: function () {\n return this.attributeObserver.started;\n },\n enumerable: false,\n configurable: true\n });\n TokenListObserver.prototype.start = function () {\n this.attributeObserver.start();\n };\n TokenListObserver.prototype.stop = function () {\n this.attributeObserver.stop();\n };\n TokenListObserver.prototype.refresh = function () {\n this.attributeObserver.refresh();\n };\n Object.defineProperty(TokenListObserver.prototype, \"element\", {\n get: function () {\n return this.attributeObserver.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TokenListObserver.prototype, \"attributeName\", {\n get: function () {\n return this.attributeObserver.attributeName;\n },\n enumerable: false,\n configurable: true\n });\n // Attribute observer delegate\n TokenListObserver.prototype.elementMatchedAttribute = function (element) {\n this.tokensMatched(this.readTokensForElement(element));\n };\n TokenListObserver.prototype.elementAttributeValueChanged = function (element) {\n var _a = this.refreshTokensForElement(element),\n unmatchedTokens = _a[0],\n matchedTokens = _a[1];\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n };\n TokenListObserver.prototype.elementUnmatchedAttribute = function (element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n };\n TokenListObserver.prototype.tokensMatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) {\n return _this.tokenMatched(token);\n });\n };\n TokenListObserver.prototype.tokensUnmatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) {\n return _this.tokenUnmatched(token);\n });\n };\n TokenListObserver.prototype.tokenMatched = function (token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n };\n TokenListObserver.prototype.tokenUnmatched = function (token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement.delete(token.element, token);\n };\n TokenListObserver.prototype.refreshTokensForElement = function (element) {\n var previousTokens = this.tokensByElement.getValuesForKey(element);\n var currentTokens = this.readTokensForElement(element);\n var firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(function (_a) {\n var previousToken = _a[0],\n currentToken = _a[1];\n return !tokensAreEqual(previousToken, currentToken);\n });\n if (firstDifferingIndex == -1) {\n return [[], []];\n } else {\n return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n }\n };\n TokenListObserver.prototype.readTokensForElement = function (element) {\n var attributeName = this.attributeName;\n var tokenString = element.getAttribute(attributeName) || \"\";\n return parseTokenString(tokenString, element, attributeName);\n };\n return TokenListObserver;\n}();\nexport { TokenListObserver };\nfunction parseTokenString(tokenString, element, attributeName) {\n return tokenString.trim().split(/\\s+/).filter(function (content) {\n return content.length;\n }).map(function (content, index) {\n return {\n element: element,\n attributeName: attributeName,\n content: content,\n index: index\n };\n });\n}\nfunction zip(left, right) {\n var length = Math.max(left.length, right.length);\n return Array.from({\n length: length\n }, function (_, index) {\n return [left[index], right[index]];\n });\n}\nfunction tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}","import { TokenListObserver } from \"./token_list_observer\";\nvar ValueListObserver = /** @class */function () {\n function ValueListObserver(element, attributeName, delegate) {\n this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap();\n this.valuesByTokenByElement = new WeakMap();\n }\n Object.defineProperty(ValueListObserver.prototype, \"started\", {\n get: function () {\n return this.tokenListObserver.started;\n },\n enumerable: false,\n configurable: true\n });\n ValueListObserver.prototype.start = function () {\n this.tokenListObserver.start();\n };\n ValueListObserver.prototype.stop = function () {\n this.tokenListObserver.stop();\n };\n ValueListObserver.prototype.refresh = function () {\n this.tokenListObserver.refresh();\n };\n Object.defineProperty(ValueListObserver.prototype, \"element\", {\n get: function () {\n return this.tokenListObserver.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ValueListObserver.prototype, \"attributeName\", {\n get: function () {\n return this.tokenListObserver.attributeName;\n },\n enumerable: false,\n configurable: true\n });\n ValueListObserver.prototype.tokenMatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.tokenUnmatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).delete(token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.fetchParseResultForToken = function (token) {\n var parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n };\n ValueListObserver.prototype.fetchValuesByTokenForElement = function (element) {\n var valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map();\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n };\n ValueListObserver.prototype.parseToken = function (token) {\n try {\n var value = this.delegate.parseValueForToken(token);\n return {\n value: value\n };\n } catch (error) {\n return {\n error: error\n };\n }\n };\n return ValueListObserver;\n}();\nexport { ValueListObserver };","import { Action } from \"./action\";\nimport { Binding } from \"./binding\";\nimport { ValueListObserver } from \"@stimulus/mutation-observers\";\nvar BindingObserver = /** @class */function () {\n function BindingObserver(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map();\n }\n BindingObserver.prototype.start = function () {\n if (!this.valueListObserver) {\n this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n };\n BindingObserver.prototype.stop = function () {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n };\n Object.defineProperty(BindingObserver.prototype, \"element\", {\n get: function () {\n return this.context.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"identifier\", {\n get: function () {\n return this.context.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"actionAttribute\", {\n get: function () {\n return this.schema.actionAttribute;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"schema\", {\n get: function () {\n return this.context.schema;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"bindings\", {\n get: function () {\n return Array.from(this.bindingsByAction.values());\n },\n enumerable: false,\n configurable: true\n });\n BindingObserver.prototype.connectAction = function (action) {\n var binding = new Binding(this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n };\n BindingObserver.prototype.disconnectAction = function (action) {\n var binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction.delete(action);\n this.delegate.bindingDisconnected(binding);\n }\n };\n BindingObserver.prototype.disconnectAllActions = function () {\n var _this = this;\n this.bindings.forEach(function (binding) {\n return _this.delegate.bindingDisconnected(binding);\n });\n this.bindingsByAction.clear();\n };\n // Value observer delegate\n BindingObserver.prototype.parseValueForToken = function (token) {\n var action = Action.forToken(token);\n if (action.identifier == this.identifier) {\n return action;\n }\n };\n BindingObserver.prototype.elementMatchedValue = function (element, action) {\n this.connectAction(action);\n };\n BindingObserver.prototype.elementUnmatchedValue = function (element, action) {\n this.disconnectAction(action);\n };\n return BindingObserver;\n}();\nexport { BindingObserver };","import { StringMapObserver } from \"@stimulus/mutation-observers\";\nvar ValueObserver = /** @class */function () {\n function ValueObserver(context, receiver) {\n this.context = context;\n this.receiver = receiver;\n this.stringMapObserver = new StringMapObserver(this.element, this);\n this.valueDescriptorMap = this.controller.valueDescriptorMap;\n this.invokeChangedCallbacksForDefaultValues();\n }\n ValueObserver.prototype.start = function () {\n this.stringMapObserver.start();\n };\n ValueObserver.prototype.stop = function () {\n this.stringMapObserver.stop();\n };\n Object.defineProperty(ValueObserver.prototype, \"element\", {\n get: function () {\n return this.context.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ValueObserver.prototype, \"controller\", {\n get: function () {\n return this.context.controller;\n },\n enumerable: false,\n configurable: true\n });\n // String map observer delegate\n ValueObserver.prototype.getStringMapKeyForAttribute = function (attributeName) {\n if (attributeName in this.valueDescriptorMap) {\n return this.valueDescriptorMap[attributeName].name;\n }\n };\n ValueObserver.prototype.stringMapValueChanged = function (attributeValue, name) {\n this.invokeChangedCallbackForValue(name);\n };\n ValueObserver.prototype.invokeChangedCallbacksForDefaultValues = function () {\n for (var _i = 0, _a = this.valueDescriptors; _i < _a.length; _i++) {\n var _b = _a[_i],\n key = _b.key,\n name_1 = _b.name,\n defaultValue = _b.defaultValue;\n if (defaultValue != undefined && !this.controller.data.has(key)) {\n this.invokeChangedCallbackForValue(name_1);\n }\n }\n };\n ValueObserver.prototype.invokeChangedCallbackForValue = function (name) {\n var methodName = name + \"Changed\";\n var method = this.receiver[methodName];\n if (typeof method == \"function\") {\n var value = this.receiver[name];\n method.call(this.receiver, value);\n }\n };\n Object.defineProperty(ValueObserver.prototype, \"valueDescriptors\", {\n get: function () {\n var valueDescriptorMap = this.valueDescriptorMap;\n return Object.keys(valueDescriptorMap).map(function (key) {\n return valueDescriptorMap[key];\n });\n },\n enumerable: false,\n configurable: true\n });\n return ValueObserver;\n}();\nexport { ValueObserver };","import { BindingObserver } from \"./binding_observer\";\nimport { ValueObserver } from \"./value_observer\";\nvar Context = /** @class */function () {\n function Context(module, scope) {\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new BindingObserver(this, this.dispatcher);\n this.valueObserver = new ValueObserver(this, this.controller);\n try {\n this.controller.initialize();\n } catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n Context.prototype.connect = function () {\n this.bindingObserver.start();\n this.valueObserver.start();\n try {\n this.controller.connect();\n } catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n };\n Context.prototype.disconnect = function () {\n try {\n this.controller.disconnect();\n } catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.valueObserver.stop();\n this.bindingObserver.stop();\n };\n Object.defineProperty(Context.prototype, \"application\", {\n get: function () {\n return this.module.application;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"identifier\", {\n get: function () {\n return this.module.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"schema\", {\n get: function () {\n return this.application.schema;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"dispatcher\", {\n get: function () {\n return this.application.dispatcher;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"parentElement\", {\n get: function () {\n return this.element.parentElement;\n },\n enumerable: false,\n configurable: true\n });\n // Error handling\n Context.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) {\n detail = {};\n }\n var _a = this,\n identifier = _a.identifier,\n controller = _a.controller,\n element = _a.element;\n detail = Object.assign({\n identifier: identifier,\n controller: controller,\n element: element\n }, detail);\n this.application.handleError(error, \"Error \" + message, detail);\n };\n return Context;\n}();\nexport { Context };","export function readInheritableStaticArrayValues(constructor, propertyName) {\n var ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce(function (values, constructor) {\n getOwnStaticArrayValues(constructor, propertyName).forEach(function (name) {\n return values.add(name);\n });\n return values;\n }, new Set()));\n}\nexport function readInheritableStaticObjectPairs(constructor, propertyName) {\n var ancestors = getAncestorsForConstructor(constructor);\n return ancestors.reduce(function (pairs, constructor) {\n pairs.push.apply(pairs, getOwnStaticObjectPairs(constructor, propertyName));\n return pairs;\n }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n var ancestors = [];\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n var definition = constructor[propertyName];\n return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n var definition = constructor[propertyName];\n return definition ? Object.keys(definition).map(function (key) {\n return [key, definition[key]];\n }) : [];\n}","var __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n};\nimport { readInheritableStaticArrayValues } from \"./inheritable_statics\";\n/** @hidden */\nexport function bless(constructor) {\n return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n var shadowConstructor = extend(constructor);\n var shadowProperties = getShadowProperties(constructor.prototype, properties);\n Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n var blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n return blessings.reduce(function (blessedProperties, blessing) {\n var properties = blessing(constructor);\n for (var key in properties) {\n var descriptor = blessedProperties[key] || {};\n blessedProperties[key] = Object.assign(descriptor, properties[key]);\n }\n return blessedProperties;\n }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n return getOwnKeys(properties).reduce(function (shadowProperties, key) {\n var _a;\n var descriptor = getShadowedDescriptor(prototype, properties, key);\n if (descriptor) {\n Object.assign(shadowProperties, (_a = {}, _a[key] = descriptor, _a));\n }\n return shadowProperties;\n }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n var shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n var shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n if (!shadowedByValue) {\n var descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n if (shadowingDescriptor) {\n descriptor.get = shadowingDescriptor.get || descriptor.get;\n descriptor.set = shadowingDescriptor.set || descriptor.set;\n }\n return descriptor;\n }\n}\nvar getOwnKeys = function () {\n if (typeof Object.getOwnPropertySymbols == \"function\") {\n return function (object) {\n return __spreadArrays(Object.getOwnPropertyNames(object), Object.getOwnPropertySymbols(object));\n };\n } else {\n return Object.getOwnPropertyNames;\n }\n}();\nvar extend = function () {\n function extendWithReflect(constructor) {\n function extended() {\n var _newTarget = this && this instanceof extended ? this.constructor : void 0;\n return Reflect.construct(constructor, arguments, _newTarget);\n }\n extended.prototype = Object.create(constructor.prototype, {\n constructor: {\n value: extended\n }\n });\n Reflect.setPrototypeOf(extended, constructor);\n return extended;\n }\n function testReflectExtension() {\n var a = function () {\n this.a.call(this);\n };\n var b = extendWithReflect(a);\n b.prototype.a = function () {};\n return new b();\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n } catch (error) {\n return function (constructor) {\n return /** @class */function (_super) {\n __extends(extended, _super);\n function extended() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return extended;\n }(constructor);\n };\n }\n}();","import { Context } from \"./context\";\nimport { blessDefinition } from \"./definition\";\nvar Module = /** @class */function () {\n function Module(application, definition) {\n this.application = application;\n this.definition = blessDefinition(definition);\n this.contextsByScope = new WeakMap();\n this.connectedContexts = new Set();\n }\n Object.defineProperty(Module.prototype, \"identifier\", {\n get: function () {\n return this.definition.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"controllerConstructor\", {\n get: function () {\n return this.definition.controllerConstructor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"contexts\", {\n get: function () {\n return Array.from(this.connectedContexts);\n },\n enumerable: false,\n configurable: true\n });\n Module.prototype.connectContextForScope = function (scope) {\n var context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n };\n Module.prototype.disconnectContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts.delete(context);\n context.disconnect();\n }\n };\n Module.prototype.fetchContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (!context) {\n context = new Context(this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n };\n return Module;\n}();\nexport { Module };","import { bless } from \"./blessing\";\n/** @hidden */\nexport function blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: bless(definition.controllerConstructor)\n };\n}","var ClassMap = /** @class */function () {\n function ClassMap(scope) {\n this.scope = scope;\n }\n ClassMap.prototype.has = function (name) {\n return this.data.has(this.getDataKey(name));\n };\n ClassMap.prototype.get = function (name) {\n return this.data.get(this.getDataKey(name));\n };\n ClassMap.prototype.getAttributeName = function (name) {\n return this.data.getAttributeNameForKey(this.getDataKey(name));\n };\n ClassMap.prototype.getDataKey = function (name) {\n return name + \"-class\";\n };\n Object.defineProperty(ClassMap.prototype, \"data\", {\n get: function () {\n return this.scope.data;\n },\n enumerable: false,\n configurable: true\n });\n return ClassMap;\n}();\nexport { ClassMap };","export function camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, function (_, char) {\n return char.toUpperCase();\n });\n}\nexport function capitalize(value) {\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\nexport function dasherize(value) {\n return value.replace(/([A-Z])/g, function (_, char) {\n return \"-\" + char.toLowerCase();\n });\n}","import { dasherize } from \"./string_helpers\";\nvar DataMap = /** @class */function () {\n function DataMap(scope) {\n this.scope = scope;\n }\n Object.defineProperty(DataMap.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(DataMap.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: false,\n configurable: true\n });\n DataMap.prototype.get = function (key) {\n var name = this.getAttributeNameForKey(key);\n return this.element.getAttribute(name);\n };\n DataMap.prototype.set = function (key, value) {\n var name = this.getAttributeNameForKey(key);\n this.element.setAttribute(name, value);\n return this.get(key);\n };\n DataMap.prototype.has = function (key) {\n var name = this.getAttributeNameForKey(key);\n return this.element.hasAttribute(name);\n };\n DataMap.prototype.delete = function (key) {\n if (this.has(key)) {\n var name_1 = this.getAttributeNameForKey(key);\n this.element.removeAttribute(name_1);\n return true;\n } else {\n return false;\n }\n };\n DataMap.prototype.getAttributeNameForKey = function (key) {\n return \"data-\" + this.identifier + \"-\" + dasherize(key);\n };\n return DataMap;\n}();\nexport { DataMap };","var Guide = /** @class */function () {\n function Guide(logger) {\n this.warnedKeysByObject = new WeakMap();\n this.logger = logger;\n }\n Guide.prototype.warn = function (object, key, message) {\n var warnedKeys = this.warnedKeysByObject.get(object);\n if (!warnedKeys) {\n warnedKeys = new Set();\n this.warnedKeysByObject.set(object, warnedKeys);\n }\n if (!warnedKeys.has(key)) {\n warnedKeys.add(key);\n this.logger.warn(message, object);\n }\n };\n return Guide;\n}();\nexport { Guide };","/** @hidden */\nexport function attributeValueContainsToken(attributeName, token) {\n return \"[\" + attributeName + \"~=\\\"\" + token + \"\\\"]\";\n}","var __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n};\nimport { attributeValueContainsToken } from \"./selectors\";\nvar TargetSet = /** @class */function () {\n function TargetSet(scope) {\n this.scope = scope;\n }\n Object.defineProperty(TargetSet.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"schema\", {\n get: function () {\n return this.scope.schema;\n },\n enumerable: false,\n configurable: true\n });\n TargetSet.prototype.has = function (targetName) {\n return this.find(targetName) != null;\n };\n TargetSet.prototype.find = function () {\n var _this = this;\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n return targetNames.reduce(function (target, targetName) {\n return target || _this.findTarget(targetName) || _this.findLegacyTarget(targetName);\n }, undefined);\n };\n TargetSet.prototype.findAll = function () {\n var _this = this;\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n return targetNames.reduce(function (targets, targetName) {\n return __spreadArrays(targets, _this.findAllTargets(targetName), _this.findAllLegacyTargets(targetName));\n }, []);\n };\n TargetSet.prototype.findTarget = function (targetName) {\n var selector = this.getSelectorForTargetName(targetName);\n return this.scope.findElement(selector);\n };\n TargetSet.prototype.findAllTargets = function (targetName) {\n var selector = this.getSelectorForTargetName(targetName);\n return this.scope.findAllElements(selector);\n };\n TargetSet.prototype.getSelectorForTargetName = function (targetName) {\n var attributeName = \"data-\" + this.identifier + \"-target\";\n return attributeValueContainsToken(attributeName, targetName);\n };\n TargetSet.prototype.findLegacyTarget = function (targetName) {\n var selector = this.getLegacySelectorForTargetName(targetName);\n return this.deprecate(this.scope.findElement(selector), targetName);\n };\n TargetSet.prototype.findAllLegacyTargets = function (targetName) {\n var _this = this;\n var selector = this.getLegacySelectorForTargetName(targetName);\n return this.scope.findAllElements(selector).map(function (element) {\n return _this.deprecate(element, targetName);\n });\n };\n TargetSet.prototype.getLegacySelectorForTargetName = function (targetName) {\n var targetDescriptor = this.identifier + \".\" + targetName;\n return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n };\n TargetSet.prototype.deprecate = function (element, targetName) {\n if (element) {\n var identifier = this.identifier;\n var attributeName = this.schema.targetAttribute;\n this.guide.warn(element, \"target:\" + targetName, \"Please replace \" + attributeName + \"=\\\"\" + identifier + \".\" + targetName + \"\\\" with data-\" + identifier + \"-target=\\\"\" + targetName + \"\\\". \" + (\"The \" + attributeName + \" attribute is deprecated and will be removed in a future version of Stimulus.\"));\n }\n return element;\n };\n Object.defineProperty(TargetSet.prototype, \"guide\", {\n get: function () {\n return this.scope.guide;\n },\n enumerable: false,\n configurable: true\n });\n return TargetSet;\n}();\nexport { TargetSet };","var __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n};\nimport { ClassMap } from \"./class_map\";\nimport { DataMap } from \"./data_map\";\nimport { Guide } from \"./guide\";\nimport { attributeValueContainsToken } from \"./selectors\";\nimport { TargetSet } from \"./target_set\";\nvar Scope = /** @class */function () {\n function Scope(schema, element, identifier, logger) {\n var _this = this;\n this.targets = new TargetSet(this);\n this.classes = new ClassMap(this);\n this.data = new DataMap(this);\n this.containsElement = function (element) {\n return element.closest(_this.controllerSelector) === _this.element;\n };\n this.schema = schema;\n this.element = element;\n this.identifier = identifier;\n this.guide = new Guide(logger);\n }\n Scope.prototype.findElement = function (selector) {\n return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n };\n Scope.prototype.findAllElements = function (selector) {\n return __spreadArrays(this.element.matches(selector) ? [this.element] : [], this.queryElements(selector).filter(this.containsElement));\n };\n Scope.prototype.queryElements = function (selector) {\n return Array.from(this.element.querySelectorAll(selector));\n };\n Object.defineProperty(Scope.prototype, \"controllerSelector\", {\n get: function () {\n return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n },\n enumerable: false,\n configurable: true\n });\n return Scope;\n}();\nexport { Scope };","import { ValueListObserver } from \"@stimulus/mutation-observers\";\nvar ScopeObserver = /** @class */function () {\n function ScopeObserver(element, schema, delegate) {\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap();\n this.scopeReferenceCounts = new WeakMap();\n }\n ScopeObserver.prototype.start = function () {\n this.valueListObserver.start();\n };\n ScopeObserver.prototype.stop = function () {\n this.valueListObserver.stop();\n };\n Object.defineProperty(ScopeObserver.prototype, \"controllerAttribute\", {\n get: function () {\n return this.schema.controllerAttribute;\n },\n enumerable: false,\n configurable: true\n });\n // Value observer delegate\n /** @hidden */\n ScopeObserver.prototype.parseValueForToken = function (token) {\n var element = token.element,\n identifier = token.content;\n var scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n var scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n };\n /** @hidden */\n ScopeObserver.prototype.elementMatchedValue = function (element, value) {\n var referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) {\n this.delegate.scopeConnected(value);\n }\n };\n /** @hidden */\n ScopeObserver.prototype.elementUnmatchedValue = function (element, value) {\n var referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) {\n this.delegate.scopeDisconnected(value);\n }\n }\n };\n ScopeObserver.prototype.fetchScopesByIdentifierForElement = function (element) {\n var scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map();\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n };\n return ScopeObserver;\n}();\nexport { ScopeObserver };","import { Module } from \"./module\";\nimport { Multimap } from \"@stimulus/multimap\";\nimport { Scope } from \"./scope\";\nimport { ScopeObserver } from \"./scope_observer\";\nvar Router = /** @class */function () {\n function Router(application) {\n this.application = application;\n this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n this.scopesByIdentifier = new Multimap();\n this.modulesByIdentifier = new Map();\n }\n Object.defineProperty(Router.prototype, \"element\", {\n get: function () {\n return this.application.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"schema\", {\n get: function () {\n return this.application.schema;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"logger\", {\n get: function () {\n return this.application.logger;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"controllerAttribute\", {\n get: function () {\n return this.schema.controllerAttribute;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"modules\", {\n get: function () {\n return Array.from(this.modulesByIdentifier.values());\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"contexts\", {\n get: function () {\n return this.modules.reduce(function (contexts, module) {\n return contexts.concat(module.contexts);\n }, []);\n },\n enumerable: false,\n configurable: true\n });\n Router.prototype.start = function () {\n this.scopeObserver.start();\n };\n Router.prototype.stop = function () {\n this.scopeObserver.stop();\n };\n Router.prototype.loadDefinition = function (definition) {\n this.unloadIdentifier(definition.identifier);\n var module = new Module(this.application, definition);\n this.connectModule(module);\n };\n Router.prototype.unloadIdentifier = function (identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n this.disconnectModule(module);\n }\n };\n Router.prototype.getContextForElementAndIdentifier = function (element, identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n return module.contexts.find(function (context) {\n return context.element == element;\n });\n }\n };\n // Error handler delegate\n /** @hidden */\n Router.prototype.handleError = function (error, message, detail) {\n this.application.handleError(error, message, detail);\n };\n // Scope observer delegate\n /** @hidden */\n Router.prototype.createScopeForElementAndIdentifier = function (element, identifier) {\n return new Scope(this.schema, element, identifier, this.logger);\n };\n /** @hidden */\n Router.prototype.scopeConnected = function (scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.connectContextForScope(scope);\n }\n };\n /** @hidden */\n Router.prototype.scopeDisconnected = function (scope) {\n this.scopesByIdentifier.delete(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.disconnectContextForScope(scope);\n }\n };\n // Modules\n Router.prototype.connectModule = function (module) {\n this.modulesByIdentifier.set(module.identifier, module);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) {\n return module.connectContextForScope(scope);\n });\n };\n Router.prototype.disconnectModule = function (module) {\n this.modulesByIdentifier.delete(module.identifier);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) {\n return module.disconnectContextForScope(scope);\n });\n };\n return Router;\n}();\nexport { Router };","export var defaultSchema = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\"\n};","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n};\nimport { Dispatcher } from \"./dispatcher\";\nimport { Router } from \"./router\";\nimport { defaultSchema } from \"./schema\";\nvar Application = /** @class */function () {\n function Application(element, schema) {\n if (element === void 0) {\n element = document.documentElement;\n }\n if (schema === void 0) {\n schema = defaultSchema;\n }\n this.logger = console;\n this.element = element;\n this.schema = schema;\n this.dispatcher = new Dispatcher(this);\n this.router = new Router(this);\n }\n Application.start = function (element, schema) {\n var application = new Application(element, schema);\n application.start();\n return application;\n };\n Application.prototype.start = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, domReady()];\n case 1:\n _a.sent();\n this.dispatcher.start();\n this.router.start();\n return [2 /*return*/];\n }\n });\n });\n };\n Application.prototype.stop = function () {\n this.dispatcher.stop();\n this.router.stop();\n };\n Application.prototype.register = function (identifier, controllerConstructor) {\n this.load({\n identifier: identifier,\n controllerConstructor: controllerConstructor\n });\n };\n Application.prototype.load = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var definitions = Array.isArray(head) ? head : __spreadArrays([head], rest);\n definitions.forEach(function (definition) {\n return _this.router.loadDefinition(definition);\n });\n };\n Application.prototype.unload = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var identifiers = Array.isArray(head) ? head : __spreadArrays([head], rest);\n identifiers.forEach(function (identifier) {\n return _this.router.unloadIdentifier(identifier);\n });\n };\n Object.defineProperty(Application.prototype, \"controllers\", {\n // Controllers\n get: function () {\n return this.router.contexts.map(function (context) {\n return context.controller;\n });\n },\n enumerable: false,\n configurable: true\n });\n Application.prototype.getControllerForElementAndIdentifier = function (element, identifier) {\n var context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n };\n // Error handling\n Application.prototype.handleError = function (error, message, detail) {\n this.logger.error(\"%s\\n\\n%o\\n\\n%o\", message, error, detail);\n };\n return Application;\n}();\nexport { Application };\nfunction domReady() {\n return new Promise(function (resolve) {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", resolve);\n } else {\n resolve();\n }\n });\n}","import { readInheritableStaticArrayValues } from \"./inheritable_statics\";\nimport { capitalize } from \"./string_helpers\";\n/** @hidden */\nexport function ClassPropertiesBlessing(constructor) {\n var classes = readInheritableStaticArrayValues(constructor, \"classes\");\n return classes.reduce(function (properties, classDefinition) {\n return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n }, {});\n}\nfunction propertiesForClassDefinition(key) {\n var _a;\n var name = key + \"Class\";\n return _a = {}, _a[name] = {\n get: function () {\n var classes = this.classes;\n if (classes.has(key)) {\n return classes.get(key);\n } else {\n var attribute = classes.getAttributeName(key);\n throw new Error(\"Missing attribute \\\"\" + attribute + \"\\\"\");\n }\n }\n }, _a[\"has\" + capitalize(name)] = {\n get: function () {\n return this.classes.has(key);\n }\n }, _a;\n}","import { readInheritableStaticArrayValues } from \"./inheritable_statics\";\nimport { capitalize } from \"./string_helpers\";\n/** @hidden */\nexport function TargetPropertiesBlessing(constructor) {\n var targets = readInheritableStaticArrayValues(constructor, \"targets\");\n return targets.reduce(function (properties, targetDefinition) {\n return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n var _a;\n return _a = {}, _a[name + \"Target\"] = {\n get: function () {\n var target = this.targets.find(name);\n if (target) {\n return target;\n } else {\n throw new Error(\"Missing target element \\\"\" + this.identifier + \".\" + name + \"\\\"\");\n }\n }\n }, _a[name + \"Targets\"] = {\n get: function () {\n return this.targets.findAll(name);\n }\n }, _a[\"has\" + capitalize(name) + \"Target\"] = {\n get: function () {\n return this.targets.has(name);\n }\n }, _a;\n}","import { readInheritableStaticObjectPairs } from \"./inheritable_statics\";\nimport { camelize, capitalize, dasherize } from \"./string_helpers\";\n/** @hidden */\nexport function ValuePropertiesBlessing(constructor) {\n var valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n var propertyDescriptorMap = {\n valueDescriptorMap: {\n get: function () {\n var _this = this;\n return valueDefinitionPairs.reduce(function (result, valueDefinitionPair) {\n var _a;\n var valueDescriptor = parseValueDefinitionPair(valueDefinitionPair);\n var attributeName = _this.data.getAttributeNameForKey(valueDescriptor.key);\n return Object.assign(result, (_a = {}, _a[attributeName] = valueDescriptor, _a));\n }, {});\n }\n }\n };\n return valueDefinitionPairs.reduce(function (properties, valueDefinitionPair) {\n return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n }, propertyDescriptorMap);\n}\n/** @hidden */\nexport function propertiesForValueDefinitionPair(valueDefinitionPair) {\n var _a;\n var definition = parseValueDefinitionPair(valueDefinitionPair);\n var type = definition.type,\n key = definition.key,\n name = definition.name;\n var read = readers[type],\n write = writers[type] || writers.default;\n return _a = {}, _a[name] = {\n get: function () {\n var value = this.data.get(key);\n if (value !== null) {\n return read(value);\n } else {\n return definition.defaultValue;\n }\n },\n set: function (value) {\n if (value === undefined) {\n this.data.delete(key);\n } else {\n this.data.set(key, write(value));\n }\n }\n }, _a[\"has\" + capitalize(name)] = {\n get: function () {\n return this.data.has(key);\n }\n }, _a;\n}\nfunction parseValueDefinitionPair(_a) {\n var token = _a[0],\n typeConstant = _a[1];\n var type = parseValueTypeConstant(typeConstant);\n return valueDescriptorForTokenAndType(token, type);\n}\nfunction parseValueTypeConstant(typeConstant) {\n switch (typeConstant) {\n case Array:\n return \"array\";\n case Boolean:\n return \"boolean\";\n case Number:\n return \"number\";\n case Object:\n return \"object\";\n case String:\n return \"string\";\n }\n throw new Error(\"Unknown value type constant \\\"\" + typeConstant + \"\\\"\");\n}\nfunction valueDescriptorForTokenAndType(token, type) {\n var key = dasherize(token) + \"-value\";\n return {\n type: type,\n key: key,\n name: camelize(key),\n get defaultValue() {\n return defaultValuesByType[type];\n }\n };\n}\nvar defaultValuesByType = {\n get array() {\n return [];\n },\n boolean: false,\n number: 0,\n get object() {\n return {};\n },\n string: \"\"\n};\nvar readers = {\n array: function (value) {\n var array = JSON.parse(value);\n if (!Array.isArray(array)) {\n throw new TypeError(\"Expected array\");\n }\n return array;\n },\n boolean: function (value) {\n return !(value == \"0\" || value == \"false\");\n },\n number: function (value) {\n return parseFloat(value);\n },\n object: function (value) {\n var object = JSON.parse(value);\n if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n throw new TypeError(\"Expected object\");\n }\n return object;\n },\n string: function (value) {\n return value;\n }\n};\nvar writers = {\n default: writeString,\n array: writeJSON,\n object: writeJSON\n};\nfunction writeJSON(value) {\n return JSON.stringify(value);\n}\nfunction writeString(value) {\n return \"\" + value;\n}","import { ClassPropertiesBlessing } from \"./class_properties\";\nimport { TargetPropertiesBlessing } from \"./target_properties\";\nimport { ValuePropertiesBlessing } from \"./value_properties\";\nvar Controller = /** @class */function () {\n function Controller(context) {\n this.context = context;\n }\n Object.defineProperty(Controller.prototype, \"application\", {\n get: function () {\n return this.context.application;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"scope\", {\n get: function () {\n return this.context.scope;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"targets\", {\n get: function () {\n return this.scope.targets;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"classes\", {\n get: function () {\n return this.scope.classes;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"data\", {\n get: function () {\n return this.scope.data;\n },\n enumerable: false,\n configurable: true\n });\n Controller.prototype.initialize = function () {\n // Override in your subclass to set up initial controller state\n };\n Controller.prototype.connect = function () {\n // Override in your subclass to respond when the controller is connected to the DOM\n };\n Controller.prototype.disconnect = function () {\n // Override in your subclass to respond when the controller is disconnected from the DOM\n };\n Controller.blessings = [ClassPropertiesBlessing, TargetPropertiesBlessing, ValuePropertiesBlessing];\n Controller.targets = [];\n Controller.values = {};\n return Controller;\n}();\nexport { Controller };","var t,\n e = require(\"stimulus\"),\n s = (t = require(\"lodash.debounce\")) && \"object\" == typeof t && \"default\" in t ? t.default : t,\n n = function (t) {\n function e() {\n for (var e = [], s = arguments.length; s--;) e[s] = arguments[s];\n t.apply(this, e), this.extractTextValue = function (t) {\n return t.hasAttribute(\"data-autocomplete-label\") ? t.getAttribute(\"data-autocomplete-label\") : t.textContent.trim();\n };\n }\n return t && (e.__proto__ = t), (e.prototype = Object.create(t && t.prototype)).constructor = e, e.prototype.connect = function () {\n this.resultsTarget.hidden = !0, this.inputTarget.setAttribute(\"autocomplete\", \"off\"), this.inputTarget.setAttribute(\"spellcheck\", \"false\"), this.mouseDown = !1, this.onInputChange = s(this.onInputChange.bind(this), 300), this.onResultsClick = this.onResultsClick.bind(this), this.onResultsMouseDown = this.onResultsMouseDown.bind(this), this.onInputBlur = this.onInputBlur.bind(this), this.onKeydown = this.onKeydown.bind(this), this.inputTarget.addEventListener(\"keydown\", this.onKeydown), this.inputTarget.addEventListener(\"blur\", this.onInputBlur), this.inputTarget.addEventListener(\"input\", this.onInputChange), this.resultsTarget.addEventListener(\"mousedown\", this.onResultsMouseDown), this.resultsTarget.addEventListener(\"click\", this.onResultsClick), \"string\" == typeof this.inputTarget.getAttribute(\"autofocus\") && this.inputTarget.focus();\n }, e.prototype.disconnect = function () {\n this.hasInputTarget && (this.inputTarget.removeEventListener(\"keydown\", this.onKeydown), this.inputTarget.removeEventListener(\"focus\", this.onInputFocus), this.inputTarget.removeEventListener(\"blur\", this.onInputBlur), this.inputTarget.removeEventListener(\"input\", this.onInputChange)), this.hasResultsTarget && (this.resultsTarget.removeEventListener(\"mousedown\", this.onResultsMouseDown), this.resultsTarget.removeEventListener(\"click\", this.onResultsClick));\n }, e.prototype.sibling = function (t) {\n var e = Array.from(this.resultsTarget.querySelectorAll('[role=\"option\"]:not([aria-disabled])')),\n s = this.resultsTarget.querySelector('[aria-selected=\"true\"]'),\n n = e.indexOf(s),\n i = t ? e[n + 1] : e[n - 1];\n return i || (t ? e[0] : e[e.length - 1]);\n }, e.prototype.select = function (t) {\n for (var e = 0, s = this.resultsTarget.querySelectorAll('[aria-selected=\"true\"]'); e < s.length; e += 1) {\n var n = s[e];\n n.removeAttribute(\"aria-selected\"), n.classList.remove(\"active\");\n }\n t.setAttribute(\"aria-selected\", \"true\"), t.classList.add(\"active\"), this.inputTarget.setAttribute(\"aria-activedescendant\", t.id), t.scrollIntoView(!1);\n }, e.prototype.onKeydown = function (t) {\n switch (t.key) {\n case \"Escape\":\n this.resultsTarget.hidden || (this.hideAndRemoveOptions(), t.stopPropagation(), t.preventDefault());\n break;\n case \"ArrowDown\":\n var e = this.sibling(!0);\n e && this.select(e), t.preventDefault();\n break;\n case \"ArrowUp\":\n var s = this.sibling(!1);\n s && this.select(s), t.preventDefault();\n break;\n case \"Tab\":\n var n = this.resultsTarget.querySelector('[aria-selected=\"true\"]');\n n && this.commit(n);\n break;\n case \"Enter\":\n var i = this.resultsTarget.querySelector('[aria-selected=\"true\"]');\n i && !this.resultsTarget.hidden && (this.commit(i), this.hasSubmitOnEnterValue || t.preventDefault());\n }\n }, e.prototype.onInputBlur = function () {\n this.mouseDown || (this.resultsTarget.hidden = !0);\n }, e.prototype.commit = function (t) {\n if (\"true\" !== t.getAttribute(\"aria-disabled\")) {\n if (t instanceof HTMLAnchorElement) return t.click(), void (this.resultsTarget.hidden = !0);\n var e = this.extractTextValue(t),\n s = t.getAttribute(\"data-autocomplete-value\") || e;\n this.inputTarget.value = e, this.hasHiddenTarget ? (this.hiddenTarget.value = s, this.hiddenTarget.dispatchEvent(new Event(\"input\")), this.hiddenTarget.dispatchEvent(new Event(\"change\"))) : this.inputTarget.value = s, this.inputTarget.focus(), this.hideAndRemoveOptions(), this.element.dispatchEvent(new CustomEvent(\"autocomplete.change\", {\n bubbles: !0,\n detail: {\n value: s,\n textValue: e\n }\n }));\n }\n }, e.prototype.onResultsClick = function (t) {\n if (t.target instanceof Element) {\n var e = t.target.closest('[role=\"option\"]');\n e && this.commit(e);\n }\n }, e.prototype.onResultsMouseDown = function () {\n var t = this;\n this.mouseDown = !0, this.resultsTarget.addEventListener(\"mouseup\", function () {\n return t.mouseDown = !1;\n }, {\n once: !0\n });\n }, e.prototype.onInputChange = function () {\n this.element.removeAttribute(\"value\"), this.fetchResults();\n }, e.prototype.identifyOptions = function () {\n for (var t = 0, e = 0, s = this.resultsTarget.querySelectorAll('[role=\"option\"]:not([id])'); e < s.length; e += 1) {\n s[e].id = this.resultsTarget.id + \"-option-\" + t++;\n }\n }, e.prototype.hideAndRemoveOptions = function () {\n this.resultsTarget.hidden = !0, this.resultsTarget.innerHTML = null;\n }, e.prototype.fetchResults = function () {\n var t = this,\n e = this.inputTarget.value.trim();\n if (!e || e.length < this.minLengthValue) this.hideAndRemoveOptions();else if (this.hasUrlValue) {\n var s = new URL(this.urlValue, window.location.href),\n n = new URLSearchParams(s.search.slice(1));\n n.append(\"q\", e), s.search = n.toString(), this.element.dispatchEvent(new CustomEvent(\"loadstart\")), fetch(s.toString(), {\n headers: {\n \"X-Requested-With\": \"XMLHttpRequest\"\n }\n }).then(function (t) {\n return t.text();\n }).then(function (e) {\n t.resultsTarget.innerHTML = e, t.identifyOptions();\n var s = !!t.resultsTarget.querySelector('[role=\"option\"]');\n t.resultsTarget.hidden = !s, t.element.dispatchEvent(new CustomEvent(\"load\")), t.element.dispatchEvent(new CustomEvent(\"loadend\"));\n }).catch(function () {\n t.element.dispatchEvent(new CustomEvent(\"error\")), t.element.dispatchEvent(new CustomEvent(\"loadend\"));\n });\n }\n }, e.prototype.open = function () {\n this.resultsTarget.hidden && (this.resultsTarget.hidden = !1, this.element.setAttribute(\"aria-expanded\", \"true\"), this.element.dispatchEvent(new CustomEvent(\"toggle\", {\n detail: {\n input: this.input,\n results: this.results\n }\n })));\n }, e.prototype.close = function () {\n this.resultsTarget.hidden || (this.resultsTarget.hidden = !0, this.inputTarget.removeAttribute(\"aria-activedescendant\"), this.element.setAttribute(\"aria-expanded\", \"false\"), this.element.dispatchEvent(new CustomEvent(\"toggle\", {\n detail: {\n input: this.input,\n results: this.results\n }\n })));\n }, e;\n }(e.Controller);\nn.targets = [\"input\", \"hidden\", \"results\"], n.values = {\n submitOnEnter: Boolean,\n url: String,\n minLength: Number\n}, exports.Autocomplete = n;","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function () {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n}\nmodule.exports = debounce;","var g;\n\n// This works in non-strict mode\ng = function () {\n return this;\n}();\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;","var map = {\n\t\"./filter_controller.js\": 5,\n\t\"./modals_controller.js\": 6,\n\t\"./notifications_controller.js\": 7,\n\t\"./search_controller.js\": 8,\n\t\"./search_results_controller.js\": 9,\n\t\"./subselect_controller.js\": 10\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 4;","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'filterable']\n\n filter (event) {\n const lowerCaseFilterTerm = this.sourceTarget.value.toLowerCase()\n\n this.filterableTargets.forEach((el, i) => {\n const filterableKey = el.getAttribute('data-filter-key')\n\n el.classList.toggle('filter--notFound', !filterableKey.includes(lowerCaseFilterTerm))\n })\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['modal']\n\n activate () {\n this.modalTarget.classList.toggle('is-active')\n }\n\n dismiss () {\n this.modalTarget.classList.toggle('is-active')\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['notice']\n\n dismiss () {\n this.noticeTarget.style.display = 'none'\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['query', 'results']\n\n disconnect () {\n this.reset()\n }\n\n fetchResults () {\n if (this.query === '') {\n this.reset()\n return\n }\n\n if (this.query === this.previousQuery) {\n return\n }\n this.previousQuery = this.query\n\n const url = new URL(this.data.get('url'))\n url.searchParams.append('query', this.query)\n\n fetch(url)\n .then(response => response.text())\n .then(html => {\n this.resultsTarget.innerHTML = html\n })\n }\n\n reset () {\n this.resultsTarget.innerHTML = ''\n this.queryTarget.value = ''\n }\n\n navigateResults (event) {\n if (this.searchResultsController) {\n this.searchResultsController.navigateResults(event)\n }\n }\n\n get query () {\n return this.queryTarget.value\n }\n\n get searchResultsController () {\n return this.application.getControllerForElementAndIdentifier(this.resultsTarget.firstElementChild, 'search-results')\n }\n}\n","import { Controller } from 'stimulus'\n\nconst upKey = 38\nconst downKey = 40\nconst enterKey = 13\nconst navigationKeys = [upKey, downKey, enterKey]\n\nexport default class extends Controller {\n static targets = ['result']\n\n connect () {\n this.currentResultIndex = 0\n this.selectCurrentResult()\n }\n\n navigateResults (event) {\n if (!navigationKeys.includes(event.keyCode)) {\n return\n }\n\n event.preventDefault()\n\n switch (event.keyCode) {\n case downKey:\n this.selectNextResult()\n break\n case upKey:\n this.selectPreviousResult()\n break\n case enterKey:\n this.goToSelectedResult()\n break\n }\n }\n\n // private\n\n selectCurrentResult () {\n this.resultTargets.forEach((element, index) => {\n element.classList.toggle('search__result--current', index === this.currentResultIndex)\n })\n }\n\n selectNextResult () {\n if (this.currentResultIndex < this.resultTargets.length - 1) {\n this.currentResultIndex++\n this.selectCurrentResult()\n }\n }\n\n selectPreviousResult () {\n if (this.currentResultIndex > 0) {\n this.currentResultIndex--\n this.selectCurrentResult()\n }\n }\n\n goToSelectedResult () {\n this.resultTargets[this.currentResultIndex].firstElementChild.click()\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['leaguesOptions', 'teamsOptions']\n\n change () {\n this.showTeams(this.selectedLeagueLabel)\n this.teamsOptionsTarget.selectedIndex = -1\n }\n\n showTeams (selectedGroupLabel) {\n Array.from(this.leagueOptionGroups).forEach((el) => {\n el.classList.toggle('option--current', selectedGroupLabel === el.label)\n })\n }\n\n get leagueOptionGroups () {\n return this.teamsOptionsTarget.getElementsByTagName('optgroup')\n }\n\n get selectedLeagueLabel () {\n const leagues = this.leaguesOptionsTarget\n return leagues.options[leagues.selectedIndex].label\n }\n}\n","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n// console.log('Hello World from Webpacker')\n\nimport { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\"\nimport { Autocomplete } from \"stimulus-autocomplete\"\n\nconst application = Application.start()\nconst context = require.context(\"controllers\", true, /.js$/)\napplication.load(definitionsFromContext(context))\n\napplication.register(\"autocomplete\", Autocomplete)\n","export function definitionsFromContext(context) {\n return context.keys().map(function (key) {\n return definitionForModuleWithContextAndKey(context, key);\n }).filter(function (value) {\n return value;\n });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return {\n identifier: identifier,\n controllerConstructor: controllerConstructor\n };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}"],"sourceRoot":""}