/*! choices.js v3.0.2 | (c) 2017 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Choices=t():e.Choices=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/src/scripts/dist/",t(t.s=5)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=(t.capitalise=function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},t.generateChars=function(e){for(var t="",n=0;n=0?t:0},t.getElementOffset=function(e,t){var n=t;return n>1&&(n=1),n>0&&(n=0),Math.max(e.offsetHeight*n)},t.getAdjacentEl=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e&&t){var i=e.parentNode.parentNode,r=Array.from(i.querySelectorAll(t));return r[r.indexOf(e)+(n>0?1:-1)]}},t.getScrollPosition=function(e){return"bottom"===e?Math.max((window.scrollY||window.pageYOffset)+(window.innerHeight||document.documentElement.clientHeight)):window.scrollY||window.pageYOffset},t.isInView=function(e,t,n){return this.getScrollPosition(t)>this.getElemDistance(e)+this.getElementOffset(e,n)},t.isScrolledIntoView=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){return n>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop}},t.stripHTML=function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""},t.addAnimation=function(e,t){var n=a(),i=function i(){e.classList.remove(t),e.removeEventListener(n,i,!1)};e.classList.add(t),e.addEventListener(n,i,!1)},t.getRandomNumber=function(e,t){return Math.floor(Math.random()*(t-e)+e)}),c=t.strToEl=function(){var e=document.createElement("div");return function(t){var n=t.trim(),i=void 0;for(e.innerHTML=n,i=e.children[0];e.firstChild;)e.removeChild(e.firstChild);return i}}();t.getWidthOfInput=function(e){var t=e.value||e.placeholder,n=e.offsetWidth;if(t){var i=c(""+t+"");if(i.style.position="absolute",i.style.padding="0",i.style.top="-9999px",i.style.left="-9999px",i.style.width="auto",i.style.whiteSpace="pre",document.body.contains(e)&&window.getComputedStyle){var r=window.getComputedStyle(e);r&&(i.style.fontSize=r.fontSize,i.style.fontFamily=r.fontFamily,i.style.fontWeight=r.fontWeight,i.style.fontStyle=r.fontStyle,i.style.letterSpacing=r.letterSpacing,i.style.textTransform=r.textTransform,i.style.padding=r.padding)}document.body.appendChild(i),t&&i.offsetWidth!==e.offsetWidth&&(n=i.offsetWidth+4),document.body.removeChild(i)}return n+"px"},t.sortByAlpha=function(e,t){var n=(e.label||e.value).toLowerCase(),i=(t.label||t.value).toLowerCase();return ni?1:0},t.sortByScore=function(e,t){return e.score-t.score},t.dispatchEvent=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});return e.dispatchEvent(i)},t.regexFilter=function(e,t){return!(!e||!t)&&new RegExp(t.source,"i").test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",hiddenState:"is-hidden",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},t.DEFAULT_CONFIG={silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItems:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,regexFilter:null,shouldSort:!0,shouldSortItems:!1,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",addItemText:function(e){return'Press Enter to add "'+e+'"'},maxItemText:function(e){return"Only "+e+" values can be added."},uniqueItemText:"Only unique values can be added.",fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null},t.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem"},t.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL"},t.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},t.SCROLLING_SPEED=4},function(e,t,n){"use strict";function i(e){var t=O.call(e,w),n=e[w];try{e[w]=void 0;var i=!0}catch(e){}var r=C.call(e);return i&&(t?e[w]=n:delete e[w]),r}function r(e){return k.call(e)}function o(e){return null==e?void 0===e?P:x:M&&M in Object(e)?T(e):L(e)}function s(e,t){return function(n){return e(t(n))}}function a(e){return null!=e&&"object"==typeof e}function l(e){if(!B(e)||D(e)!=V)return!1;var t=F(e);if(null===t)return!0;var n=G.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&K.call(n)==Y}function c(e,t,n){function i(){p===f&&(p=f.slice())}function r(){return d}function o(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return i(),p.push(e),function(){if(t){t=!1,i();var n=p.indexOf(e);p.splice(n,1)}}}function s(e){if(!U(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(v)throw new Error("Reducers may not dispatch actions.");try{v=!0,d=h(d,e)}finally{v=!1}for(var t=f=p,n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(s)throw s;for(var i=!1,r={},a=0;a0&&void 0!==arguments[0]?arguments[0]:"[data-choice]",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,e),(0,x.isType)("String",t)){var i=document.querySelectorAll(t);if(i.length>1)for(var r=1;r=1){var n=i._getTemplate("choiceGroup",e);r.appendChild(n),i.createChoicesFragment(t,r,!0)}}),r}},{key:"createChoicesFragment",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t||document.createDocumentFragment(),s=this.config,a=s.renderSelectedChoices,l=s.searchResultLimit,c=s.renderChoiceLimit,u=this.isSearching?x.sortByScore:this.config.sortFilter,h=e;"auto"!==a||this.isSelectOneElement||(h=e.filter(function(e){return!e.selected}));var d=h.reduce(function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e},{placeholderChoices:[],normalChoices:[]}),f=d.placeholderChoices,p=d.normalChoices;(this.config.shouldSort||this.isSearching)&&p.sort(u);var v=h.length,m=[].concat(o(f),o(p));this.isSearching?v=l:c>0&&!i&&(v=c);for(var g=0;g1&&void 0!==arguments[1]?arguments[1]:null,i=n||document.createDocumentFragment();if(this.config.shouldSortItems&&!this.isSelectOneElement&&e.sort(this.config.sortFilter),this.isTextElement){var r=this.store.getItemsReducedToValues(e),o=r.join(this.config.delimiter);this.passedElement.setValue(o)}else{var s=document.createDocumentFragment(),a=function(e){var n=t._getTemplate("option",e);s.appendChild(n)};e.forEach(function(e){return a(e)}),this.passedElement.setOptions(s)}var l=function(e){var n=t._getTemplate("item",e,t.config.removeItemButton);i.appendChild(n)};return e.forEach(function(e){return l(e)}),i}},{key:"render",value:function(){if(this.currentState=this.store.getState(),this.currentState.choices!==this.prevState.choices||this.currentState.groups!==this.prevState.groups||this.currentState.items!==this.prevState.items){if(this.isSelectElement){var e=this.store.getGroupsFilteredByActive(),t=this.store.getChoicesFilteredByActive(),n=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&this.choiceList.scrollTo(0),e.length>=1&&!this.isSearching){var i=t.filter(function(e){return!0===e.placeholder&&-1===e.groupId});i.length>=1&&(n=this.createChoicesFragment(i,n)),n=this.createGroupsFragment(e,t,n)}else t.length>=1&&(n=this.createChoicesFragment(t,n));var r=this.store.getItemsFilteredByActive(),o=this._canAddItem(r,this.input.getValue());if(n.childNodes&&n.childNodes.length>0)o.response?(this.choiceList.append(n),this._highlightChoice()):this.choiceList.append(this._getTemplate("notice",o.notice));else{var s=void 0,a=void 0;this.isSearching?(a=(0,x.isType)("Function",this.config.noResultsText)?this.config.noResultsText():this.config.noResultsText,s=this._getTemplate("notice",a,"no-results")):(a=(0,x.isType)("Function",this.config.noChoicesText)?this.config.noChoicesText():this.config.noChoicesText,s=this._getTemplate("notice",a,"no-choices")),this.choiceList.append(s)}}var l=this.store.getItemsFilteredByActive()||[];if(this.itemList.clear(),l.length){var c=this.createItemsFragment(l);c.childNodes&&this.itemList.append(c)}this.prevState=this.currentState}}},{key:"highlightItem",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return this;var n=e.id,i=e.groupId,r=void 0===i?-1:i,o=e.value,s=void 0===o?"":o,a=e.label,l=void 0===a?"":a,c=r>=0?this.store.getGroupById(r):null;return this.store.dispatch((0,A.highlightItem)(n,!0)),t&&this.passedElement.triggerEvent(C.EVENTS.highlightItem,{id:n,value:s,label:l,groupValue:c&&c.value?c.value:null}),this}},{key:"unhighlightItem",value:function(e){if(!e)return this;var t=e.id,n=e.groupId,i=void 0===n?-1:n,r=e.value,o=void 0===r?"":r,s=e.label,a=void 0===s?"":s,l=i>=0?this.store.getGroupById(i):null;return this.store.dispatch((0,A.highlightItem)(t,!1)),this.passedElement.triggerEvent(C.EVENTS.highlightItem,{id:t,value:o,label:a,groupValue:l&&l.value?l.value:null}),this}},{key:"highlightAll",value:function(){var e=this;return this.store.getItems().forEach(function(t){return e.highlightItem(t)}),this}},{key:"unhighlightAll",value:function(){var e=this;return this.store.getItems().forEach(function(t){return e.unhighlightItem(t)}),this}},{key:"removeActiveItemsByValue",value:function(e){var t=this;return e&&(0,x.isType)("String",e)?(this.store.getItemsFilteredByActive().forEach(function(n){n.value===e&&t._removeItem(n)}),this):this}},{key:"removeActiveItems",value:function(e){var t=this;return this.store.getItemsFilteredByActive().forEach(function(n){n.active&&e!==n.id&&t._removeItem(n)}),this}},{key:"removeHighlightedItems",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.store.getItemsFilteredByActive().forEach(function(n){n.highlighted&&n.active&&(e._removeItem(n),t&&e._triggerChange(n.value))}),this}},{key:"showDropdown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.dropdown.isActive?this:(this.containerOuter.open(this.dropdown.getVerticalPos()),this.dropdown.show(),this.input.activate(e),this.passedElement.triggerEvent(C.EVENTS.showDropdown,{}),this)}},{key:"hideDropdown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.dropdown.isActive?(this.containerOuter.close(),this.dropdown.hide(),this.input.deactivate(e),this.passedElement.triggerEvent(C.EVENTS.hideDropdown,{}),this):this}},{key:"toggleDropdown",value:function(){return this.dropdown.isActive?this.hideDropdown():this.showDropdown(!0),this}},{key:"getValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.store.getItemsFilteredByActive(),n=t.reduce(function(t,n){var i=e?n.value:n;return t.push(i),t},[]);return this.isSelectOneElement?n[0]:n}},{key:"setValue",value:function(e){var t=this;return this.initialised?([].concat(o(e)).forEach(function(e){return t._setChoiceOrItem(e)}),this):this}},{key:"setChoiceByValue",value:function(e){var t=this;return this.isTextElement||!this.initialised?this:(((0,x.isType)("Array",e)?e:[e]).forEach(function(e){return t._findAndSelectChoiceByValue(e)}),this)}},{key:"setChoices",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!(this.initialised&&this.isSelectElement&&(0,x.isType)("Array",e)&&t))return this;if(r&&this._clearChoices(),e.length){this.containerOuter.removeLoadingState();var o=function(e){e.choices?n._addGroup(e,e.id||null,t,i):n._addChoice(e[t],e[i],e.selected,e.disabled,void 0,e.customProperties,e.placeholder)};e.forEach(o)}return this}},{key:"clearStore",value:function(){return this.store.dispatch((0,L.clearAll)()),this}},{key:"clearInput",value:function(){var e=!this.isSelectOneElement;return this.input.clear(e),!this.isTextElement&&this.config.searchEnabled&&(this.isSearching=!1,this.store.dispatch((0,T.activateChoices)(!0))),this}},{key:"ajax",value:function(e){var t=this;return this.initialised&&this.isSelectElement&&e?(requestAnimationFrame(function(){return t._handleLoadingState(!0)}),e(this._ajaxCallback()),this):this}},{key:"_triggerChange",value:function(e){e&&this.passedElement.triggerEvent(C.EVENTS.change,{value:e})}},{key:"_selectPlaceholderChoice",value:function(){var e=this.store.getPlaceholderChoice();e&&(this._addItem(e.value,e.label,e.id,e.groupId,null,e.placeholder),this._triggerChange(e.value))}},{key:"_handleButtonAction",value:function(e,t){if(e&&t&&this.config.removeItems&&this.config.removeItemButton){var n=t.parentNode.getAttribute("data-id"),i=e.find(function(e){return e.id===parseInt(n,10)});this._removeItem(i),this._triggerChange(i.value),this.isSelectOneElement&&this._selectPlaceholderChoice()}}},{key:"_handleItemAction",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e&&t&&this.config.removeItems&&!this.isSelectOneElement){var r=t.getAttribute("data-id");e.forEach(function(e){e.id!==parseInt(r,10)||e.highlighted?!i&&e.highlighted&&n.unhighlightItem(e):n.highlightItem(e)}),this.input.focus()}}},{key:"_handleChoiceAction",value:function(e,t){if(e&&t){var n=t.getAttribute("data-id"),i=this.store.getChoiceById(n),r=e[0]&&e[0].keyCode?e[0].keyCode:null,o=this.dropdown.isActive;if(i.keyCode=r,this.passedElement.triggerEvent(C.EVENTS.choice,{choice:i}),i&&!i.selected&&!i.disabled){this._canAddItem(e,i.value).response&&(this._addItem(i.value,i.label,i.id,i.groupId,i.customProperties,i.placeholder,i.keyCode),this._triggerChange(i.value))}this.clearInput(),o&&this.isSelectOneElement&&(this.hideDropdown(),this.containerOuter.focus())}}},{key:"_handleBackspace",value:function(e){if(this.config.removeItems&&e){var t=e[e.length-1],n=e.some(function(e){return e.highlighted});this.config.editItems&&!n&&t?(this.input.setValue(t.value),this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(n||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}}},{key:"_handleLoadingState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.itemList.getChild("."+this.config.classNames.placeholder);e?(this.containerOuter.addLoadingState(),this.isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),this.itemList.append(t)):this.input.setPlaceholder(this.config.loadingText)):(this.containerOuter.removeLoadingState(),this.isSelectOneElement?t.innerHTML=this.placeholder||"":this.input.setPlaceholder(this.placeholder||""))}},{key:"_canAddItem",value:function(e,t){var n=!0,i=(0,x.isType)("Function",this.config.addItemText)?this.config.addItemText(t):this.config.addItemText;return(this.isSelectMultipleElement||this.isTextElement)&&this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(n=!1,i=(0,x.isType)("Function",this.config.maxItemText)?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),this.isTextElement&&this.config.addItems&&n&&this.config.regexFilter&&(n=(0,x.regexFilter)(t,this.config.regexFilter)),!e.some(function(e){return(0,x.isType)("String",t)?e.value===t.trim():e.value===t})||this.config.duplicateItems||this.isSelectOneElement||!n||(n=!1,i=(0,x.isType)("Function",this.config.uniqueItemText)?this.config.uniqueItemText(t):this.config.uniqueItemText),{response:n,notice:i}}},{key:"_ajaxCallback",value:function(){var e=this;return function(t,n,i){if(t&&n){var r=(0,x.isType)("Object",t)?[t]:t;r&&(0,x.isType)("Array",r)&&r.length?(e._handleLoadingState(!1),r.forEach(function(t){if(t.choices){var r=t.id||null;e._addGroup(t,r,n,i)}else e._addChoice(t[n],t[i],t.selected,t.disabled,void 0,t.customProperties,t.placeholder)}),e.isSelectOneElement&&e._selectPlaceholderChoice()):e._handleLoadingState(!1)}}}},{key:"_searchChoices",value:function(e){var t=(0,x.isType)("String",e)?e.trim():e,n=(0,x.isType)("String",this.currentValue)?this.currentValue.trim():this.currentValue;if(t.length<1&&t===n+" ")return 0;var i=this.store.getSearchableChoices(),r=t,o=(0,x.isType)("Array",this.config.searchFields)?this.config.searchFields:[this.config.searchFields],s=Object.assign(this.config.fuseOptions,{keys:o}),a=new u.default(i,s),l=a.search(r);return this.currentValue=t,this.highlightPosition=0,this.isSearching=!0,this.store.dispatch((0,T.filterChoices)(l)),l.length}},{key:"_handleSearch",value:function(e){if(e&&this.input.isFocussed){var t=this.store.getChoices(),n=t.some(function(e){return!e.active});if(e&&e.length>=this.config.searchFloor){var i=this.config.searchChoices?this._searchChoices(e):0;this.passedElement.triggerEvent(C.EVENTS.search,{value:e,resultCount:i})}else n&&(this.isSearching=!1,this.store.dispatch((0,T.activateChoices)(!0)))}}},{key:"_addEventListeners",value:function(){document.addEventListener("keyup",this._onKeyUp),document.addEventListener("keydown",this._onKeyDown),document.addEventListener("click",this._onClick),document.addEventListener("touchmove",this._onTouchMove),document.addEventListener("touchend",this._onTouchEnd),document.addEventListener("mousedown",this._onMouseDown),document.addEventListener("mouseover",this._onMouseOver),this.isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus),this.containerOuter.element.addEventListener("blur",this._onBlur)),this.input.element.addEventListener("focus",this._onFocus),this.input.element.addEventListener("blur",this._onBlur),this.input.addEventListeners()}},{key:"_removeEventListeners",value:function(){document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("keydown",this._onKeyDown),document.removeEventListener("click",this._onClick),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd),document.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mouseover",this._onMouseOver),this.isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.removeEventListeners()}},{key:"_onKeyDown",value:function(e){var t,n=this;if(e.target===this.input.element||this.containerOuter.element.contains(e.target)){var i=e.target,o=this.store.getItemsFilteredByActive(),s=this.input.isFocussed,a=this.dropdown.isActive,l=this.itemList.hasChildren,c=String.fromCharCode(e.keyCode),u=C.KEY_CODES.BACK_KEY,h=C.KEY_CODES.DELETE_KEY,d=C.KEY_CODES.ENTER_KEY,f=C.KEY_CODES.A_KEY,p=C.KEY_CODES.ESC_KEY,v=C.KEY_CODES.UP_KEY,m=C.KEY_CODES.DOWN_KEY,g=C.KEY_CODES.PAGE_UP_KEY,y=C.KEY_CODES.PAGE_DOWN_KEY,b=e.ctrlKey||e.metaKey;!this.isTextElement&&/[a-zA-Z0-9-_ ]/.test(c)&&this.showDropdown(!0),this.canSearch=this.config.searchEnabled;var E=function(){b&&l&&(n.canSearch=!1,n.config.removeItems&&!n.input.getValue()&&n.input.element===document.activeElement&&n.highlightAll())},_=function(){if(n.isTextElement&&i.value){var t=n.input.getValue();n._canAddItem(o,t).response&&(n.hideDropdown(),n._addItem(t),n._triggerChange(t),n.clearInput())}if(i.hasAttribute("data-button")&&(n._handleButtonAction(o,i),e.preventDefault()),a){e.preventDefault();var r=n.dropdown.getChild("."+n.config.classNames.highlightedState);r&&(o[0]&&(o[0].keyCode=d),n._handleChoiceAction(o,r))}else n.isSelectOneElement&&(n.showDropdown(!0),e.preventDefault())},S=function(){a&&(n.hideDropdown(),n.containerOuter.focus())},I=function(){if(a||n.isSelectOneElement){n.showDropdown(!0),n.canSearch=!1;var t=e.keyCode===m||e.keyCode===y?1:-1,i=e.metaKey||e.keyCode===y||e.keyCode===g,r=void 0;if(i)r=t>0?Array.from(n.dropdown.element.querySelectorAll("[data-choice-selectable]")).pop():n.dropdown.element.querySelector("[data-choice-selectable]");else{var o=n.dropdown.element.querySelector("."+n.config.classNames.highlightedState);r=o?(0,x.getAdjacentEl)(o,"[data-choice-selectable]",t):n.dropdown.element.querySelector("[data-choice-selectable]")}r&&((0,x.isScrolledIntoView)(r,n.choiceList,t)||n._scrollToChoice(r,t),n._highlightChoice(r)),e.preventDefault()}},O=function(){!s||e.target.value||n.isSelectOneElement||(n._handleBackspace(o),e.preventDefault())},w=(t={},r(t,f,E),r(t,d,_),r(t,p,S),r(t,v,I),r(t,g,I),r(t,m,I),r(t,y,I),r(t,h,O),r(t,u,O),t);w[e.keyCode]&&w[e.keyCode]()}}},{key:"_onKeyUp",value:function(e){if(e.target===this.input.element){var t=this.input.getValue(),n=this.store.getItemsFilteredByActive(),i=this._canAddItem(n,t);if(this.isTextElement)if(t){if(i.notice){var r=this._getTemplate("notice",i.notice);this.dropdown.element.innerHTML=r.outerHTML}!0===i.response?this.showDropdown():i.notice||this.hideDropdown()}else this.hideDropdown();else{var o=C.KEY_CODES.BACK_KEY,s=C.KEY_CODES.DELETE_KEY;e.keyCode!==o&&e.keyCode!==s||e.target.value?this.canSearch&&i.response&&this._handleSearch(this.input.getValue()):!this.isTextElement&&this.isSearching&&(this.isSearching=!1,this.store.dispatch((0,T.activateChoices)(!0)))}this.canSearch=this.config.searchEnabled}}},{key:"_onTouchMove",value:function(){!0===this.wasTap&&(this.wasTap=!1)}},{key:"_onTouchEnd",value:function(e){var t=e.target||e.touches[0].target;!0===this.wasTap&&this.containerOuter.element.contains(t)&&(t!==this.containerOuter.element&&t!==this.containerInner.element||this.isSelectOneElement||(this.isTextElement?this.input.focus():this.showDropdown(!0)),e.stopPropagation()),this.wasTap=!0}},{key:"_onMouseDown",value:function(e){var t=e.target;if(t===this.choiceList&&this.isIe11&&(this.isScrollingOnIe=!0),this.containerOuter.element.contains(t)&&t!==this.input.element){var n=this.store.getItemsFilteredByActive(),i=e.shiftKey,r=(0,x.findAncestorByAttrName)(t,"data-button"),o=(0,x.findAncestorByAttrName)(t,"data-item"),s=(0,x.findAncestorByAttrName)(t,"data-choice");r?this._handleButtonAction(n,r):o?this._handleItemAction(n,o,i):s&&this._handleChoiceAction(n,s),e.preventDefault()}}},{key:"_onMouseOver",value:function(e){(e.target===this.dropdown||this.dropdown.element.contains(e.target))&&e.target.hasAttribute("data-choice")&&this._highlightChoice(e.target)}},{key:"_onClick",value:function(e){var t=e.target,n=this.dropdown.isActive,i=this.store.getItemsFilteredByActive();if(this.containerOuter.element.contains(t))n?this.isSelectOneElement&&t!==this.input.element&&!this.dropdown.element.contains(t)&&this.hideDropdown(!0):this.isTextElement?document.activeElement!==this.input.element&&this.input.focus():this.canSearch?this.showDropdown(!0):(this.showDropdown(),this.containerOuter.focus());else{i.some(function(e){return e.highlighted})&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown()}}},{key:"_onFocus",value:function(e){var t=this,n=e.target;if(this.containerOuter.element.contains(n)){({text:function(){n===t.input.element&&t.containerOuter.addFocusState()},"select-one":function(){t.containerOuter.addFocusState(),n===t.input.element&&t.showDropdown()},"select-multiple":function(){n===t.input.element&&(t.containerOuter.addFocusState(),t.showDropdown(!0))}})[this.passedElement.element.type]()}}},{key:"_onBlur",value:function(e){var t=this,n=e.target;if(this.containerOuter.element.contains(n)&&!this.isScrollingOnIe){var i=this.store.getItemsFilteredByActive(),r=i.some(function(e){return e.highlighted});({text:function(){n===t.input.element&&(t.containerOuter.removeFocusState(),r&&t.unhighlightAll(),t.hideDropdown())},"select-one":function(){t.containerOuter.removeFocusState(),n===t.containerOuter.element&&(t.canSearch||t.hideDropdown()),n===t.input.element&&t.hideDropdown()},"select-multiple":function(){n===t.input.element&&(t.containerOuter.removeFocusState(),t.hideDropdown(),r&&t.unhighlightAll())}})[this.passedElement.element.type]()}else this.isScrollingOnIe=!1,this.input.element.focus()}},{key:"_scrollToChoice",value:function(e,t){var n=this;if(e){var i=this.choiceList.height,r=e.offsetHeight,o=e.offsetTop+r,s=this.choiceList.scrollPos+i,a=t>0?this.choiceList.scrollPos+o-s:e.offsetTop,l=function e(){var i=C.SCROLLING_SPEED,r=n.choiceList.scrollPos,o=!1,s=void 0,l=void 0;t>0?(s=(a-r)/i,l=s>1?s:1,n.choiceList.scrollTo(r+l),r1?s:1,n.choiceList.scrollTo(r-l),r>a&&(o=!0)),o&&requestAnimationFrame(function(n){e(n,a,t)})};requestAnimationFrame(function(e){l()})}}},{key:"_highlightChoice",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]")),i=t;if(n&&n.length){var r=Array.from(this.dropdown.element.querySelectorAll("."+this.config.classNames.highlightedState)),o=this.dropdown.isActive;r.forEach(function(t){t.classList.remove(e.config.classNames.highlightedState),t.setAttribute("aria-selected","false")}),i?this.highlightPosition=n.indexOf(i):(i=n.length>this.highlightPosition?n[this.highlightPosition]:n[n.length-1])||(i=n[0]),i.classList.add(this.config.classNames.highlightedState),i.setAttribute("aria-selected","true"),o&&(this.input.setActiveDescendant(i.id),this.containerOuter.setActiveDescendant(i.id))}}},{key:"_addItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=(0,x.isType)("String",e)?e.trim():e,l=s,c=this.store.getItems(),u=t||a,h=parseInt(n,10)||-1,d=i>=0?this.store.getGroupById(i):null,f=c?c.length+1:1;return this.config.prependValue&&(a=this.config.prependValue+a.toString()),this.config.appendValue&&(a+=this.config.appendValue.toString()),this.store.dispatch((0,A.addItem)(a,u,f,h,i,r,o,l)),this.isSelectOneElement&&this.removeActiveItems(f),d&&d.value?this.passedElement.triggerEvent(C.EVENTS.addItem,{id:f,value:a,label:u,groupValue:d.value,keyCode:l}):this.passedElement.triggerEvent(C.EVENTS.addItem,{id:f,value:a,label:u,keyCode:l}),this}},{key:"_removeItem",value:function(e){if(!e||!(0,x.isType)("Object",e))return this;var t=e.id,n=e.value,i=e.label,r=e.choiceId,o=e.groupId,s=o>=0?this.store.getGroupById(o):null;return this.store.dispatch((0,A.removeItem)(t,r)),s&&s.value?this.passedElement.triggerEvent(C.EVENTS.removeItem,{id:t,value:n,label:i,groupValue:s.value}):this.passedElement.triggerEvent(C.EVENTS.removeItem,{id:t,value:n,label:i}),this}},{key:"_addChoice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;if(void 0!==e&&null!==e){var l=this.store.getChoices(),c=t||e,u=l?l.length+1:1,h=this.baseId+"-"+this.idNames.itemChoice+"-"+u;this.store.dispatch((0,T.addChoice)(e,c,u,r,i,h,o,s,a)),n&&this._addItem(e,c,u,void 0,o,s,a)}}},{key:"_clearChoices",value:function(){this.store.dispatch((0,T.clearChoices)())}},{key:"_addGroup",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"label",o=(0,x.isType)("Object",e)?e.choices:Array.from(e.getElementsByTagName("OPTION")),s=t||Math.floor((new Date).valueOf()*Math.random()),a=!!e.disabled&&e.disabled;if(o){this.store.dispatch((0,k.addGroup)(e.label,s,!0,a));var l=function(e){var t=e.disabled||e.parentNode&&e.parentNode.disabled;n._addChoice(e[i],(0,x.isType)("Object",e)?e[r]:e.innerHTML,e.selected,t,s,e.customProperties,e.placeholder)};o.forEach(l)}else this.store.dispatch((0,k.addGroup)(e.label,e.id,!1,e.disabled))}},{key:"_getTemplate",value:function(e){var t;if(!e)return null;for(var n=this.config.templates,i=this.config.classNames,r=arguments.length,o=Array(r>1?r-1:0),s=1;sn)return o(e,this.pattern,i);var r=this.options,a=r.location,l=r.distance,c=r.threshold,u=r.findAllMatches,h=r.minMatchCharLength;return s(e,this.pattern,this.patternAlphabet,{location:a,distance:l,threshold:c,findAllMatches:u,minMatchCharLength:h})}}]),e}();e.exports=l},function(e,t,n){"use strict";var i=n(0),r=function e(t,n,r){if(n){var o=n.indexOf("."),s=n,a=null;-1!==o&&(s=n.slice(0,o),a=n.slice(o+1));var l=t[s];if(null!==l&&void 0!==l)if(a||"string"!=typeof l&&"number"!=typeof l)if(i(l))for(var c=0,u=l.length;c0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],i=-1,r=-1,o=0,s=e.length;o=t&&n.push([i,r]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}},function(e,t,n){"use strict";e.exports=function(e){for(var t={},n=e.length,i=0;i2&&void 0!==arguments[2]?arguments[2]:/ +/g,r=new RegExp(t.replace(i,"\\$&").replace(n,"|")),o=e.match(r),s=!!o,a=[];if(s)for(var l=0,c=o.length;l=P;j-=1){var N=j-1,F=n[e.charAt(N)];if(F&&(_[N]=1),D[j]=(D[j+1]<<1|1)&F,0!==k&&(D[j]|=(C[j+1]|C[j])<<1|1|C[j+1]),D[j]&A&&(w=i(t,{errors:k,currentLocation:N,expectedLocation:m,distance:c}))<=y){if(y=w,(b=N)<=m)break;P=Math.max(1,2*m-b)}}if(i(t,{errors:k+1,currentLocation:m,expectedLocation:m,distance:c})>y)break;C=D}return{isMatch:b>=0,score:0===w?.001:w,matchedIndices:r(_,v)}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),i=0,r=n.length;i0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=this.list,i={},r=[];if("string"==typeof n[0]){for(var o=0,s=n.length;o1)throw new Error("Key weight has to be > 0 and <= 1");f=f.name}else a[f]={weight:1};this._analyze({key:f,value:this.options.getFn(u,f),record:u,index:l},{resultMap:i,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var n=e.key,i=e.arrayIndex,r=void 0===i?-1:i,o=e.value,s=e.record,l=e.index,c=t.tokenSearchers,u=void 0===c?[]:c,h=t.fullSearcher,d=void 0===h?[]:h,f=t.resultMap,p=void 0===f?{}:f,v=t.results,m=void 0===v?[]:v;if(void 0!==o&&null!==o){var g=!1,y=-1,b=0;if("string"==typeof o){this._log("\nKey: "+(""===n?"-":n));var E=d.search(o);if(this._log('Full text: "'+o+'", score: '+E.score),this.options.tokenize){for(var _=o.split(this.options.tokenSeparator),S=[],I=0;I-1&&(P=(P+y)/2),this._log("Score average:",P);var M=!this.options.tokenize||!this.options.matchAllTokens||b>=u.length;if(this._log("\nCheck Matches: "+M),(g||E.isMatch)&&M){var D=p[l];D?D.output.push({key:n,arrayIndex:r,value:o,score:P,matchedIndices:E.matchedIndices}):(p[l]={item:s,output:[{key:n,arrayIndex:r,value:o,score:P,matchedIndices:E.matchedIndices}]},m.push(p[l]))}}else if(a(o))for(var j=0,N=o.length;j-1&&(s.arrayIndex=o.arrayIndex),t.matches.push(s)}}}),this.options.includeScore&&n.push(function(e,t){t.score=e.score});for(var i=0,r=e.length;i0&&void 0!==arguments[0]?arguments[0]:this.getItems()).reduce(function(e,t){return e.push(t.value),e},[])}},{key:"getChoices",value:function(){return this.store.getState().choices}},{key:"getChoicesFilteredByActive",value:function(){return this.getChoices().filter(function(e){return!0===e.active})}},{key:"getChoicesFilteredBySelectable",value:function(){return this.getChoices().filter(function(e){return!0!==e.disabled})}},{key:"getSearchableChoices",value:function(){return this.getChoicesFilteredBySelectable().filter(function(e){return!0!==e.placeholder})}},{key:"getChoiceById",value:function(e){if(e){return this.getChoicesFilteredByActive().find(function(t){return t.id===parseInt(e,10)})}return!1}},{key:"getPlaceholderChoice",value:function(){return[].concat(i(this.getChoices())).reverse().find(function(e){return!0===e.placeholder})}},{key:"getGroups",value:function(){return this.store.getState().groups}},{key:"getGroupsFilteredByActive",value:function(){var e=this.getGroups(),t=this.getChoices();return e.filter(function(e){var n=!0===e.active&&!1===e.disabled,i=t.some(function(e){return!0===e.active&&!1===e.disabled});return n&&i},[])}},{key:"getGroupById",value:function(e){return this.getGroups().find(function(t){return t.id===parseInt(e,10)})}}]),e}();t.default=c},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(3))},function(e,t,n){e.exports=n(11)},function(e,t,n){"use strict";(function(e,i){Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(13),s=function(e){return e&&e.__esModule?e:{default:e}}(o);r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:i;var a=(0,s.default)(r);t.default=a}).call(t,n(3),n(12)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function i(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(15),s=i(o),a=n(16),l=i(a),c=n(17),u=i(c),h=(0,r.combineReducers)({items:s.default,groups:l.default,choices:u.default}),d=function(e,t){var n=e;return"CLEAR_ALL"===t.type&&(n=void 0),h(n,t)};t.default=d},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:o,t=arguments[1];switch(t.type){case"ADD_ITEM":return[].concat(i(e),[{id:t.id,choiceId:t.choiceId,groupId:t.groupId,value:t.value,label:t.label,active:!0,highlighted:!1,customProperties:t.customProperties,placeholder:t.placeholder||!1,keyCode:null}]).map(function(e){var t=e;return t.highlighted&&(t.highlighted=!1),t});case"REMOVE_ITEM":return e.map(function(e){var n=e;return n.id===t.id&&(n.active=!1),n});case"HIGHLIGHT_ITEM":return e.map(function(e){var n=e;return n.id===t.id&&(n.highlighted=t.highlighted),n});default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=t.defaultState=[]},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:o,t=arguments[1];switch(t.type){case"ADD_GROUP":return[].concat(i(e),[{id:t.id,value:t.value,active:t.active,disabled:t.disabled}]);case"CLEAR_CHOICES":return[];default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=t.defaultState=[]},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:o,t=arguments[1];switch(t.type){case"ADD_CHOICE":return[].concat(i(e),[{id:t.id,elementId:t.elementId,groupId:t.groupId,value:t.value,label:t.label||t.value,disabled:t.disabled||!1,selected:!1,active:!0,score:9999,customProperties:t.customProperties,placeholder:t.placeholder||!1,keyCode:null}]);case"ADD_ITEM":return t.activateOptions?e.map(function(e){var n=e;return n.active=t.active,n}):t.choiceId>-1?e.map(function(e){var n=e;return n.id===parseInt(t.choiceId,10)&&(n.selected=!0),n}):e;case"REMOVE_ITEM":return t.choiceId>-1?e.map(function(e){var n=e;return n.id===parseInt(t.choiceId,10)&&(n.selected=!1),n}):e;case"FILTER_CHOICES":return e.map(function(e){var n=e;return n.active=t.results.some(function(e){var t=e.item,i=e.score;return t.id===n.id&&(n.score=i,!0)}),n});case"ACTIVATE_CHOICES":return e.map(function(e){var n=e;return n.active=t.active,n});case"CLEAR_CHOICES":return o;default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=t.defaultState=[]},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=i:"top"===this.config.position&&(r=!0),r}},{key:"setActiveDescendant",value:function(e){this.element.setAttribute("aria-activedescendant",e)}},{key:"removeActiveDescendant",value:function(){this.element.removeAttribute("aria-activedescendant")}},{key:"open",value:function(e){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)}},{key:"close",value:function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)}},{key:"focus",value:function(){this.isFocussed||this.element.focus()}},{key:"addFocusState",value:function(){this.element.classList.add(this.classNames.focusState)}},{key:"removeFocusState",value:function(){this.element.classList.remove(this.classNames.focusState)}},{key:"enable",value:function(){this.element.classList.remove(this.config.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.parentInstance.isSelectOneElement&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1}},{key:"disable",value:function(){this.element.classList.add(this.config.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.parentInstance.isSelectOneElement&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0}},{key:"revert",value:function(e){this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element)}},{key:"addLoadingState",value:function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0}},{key:"removeLoadingState",value:function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1}}]),e}();t.default=o},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0])||arguments[0];return this.element.value&&(this.element.value=""),e&&this.setWidth(),this.parentInstance}},{key:"setWidth",value:function(e){this.parentInstance.placeholder?(this.element.value&&this.element.value.length>=this.parentInstance.placeholder.length/1.25||e)&&(this.element.style.width=this.getWidth()):this.element.style.width=this.getWidth()}},{key:"getWidth",value:function(){return(0,o.getWidthOfInput)(this.element)}},{key:"setPlaceholder",value:function(e){this.element.placeholder=e}},{key:"setValue",value:function(e){this.element.value=e}},{key:"getValue",value:function(){return this.element.value}},{key:"setActiveDescendant",value:function(e){this.element.setAttribute("aria-activedescendant",e)}},{key:"removeActiveDescendant",value:function(){this.element.removeAttribute("aria-activedescendant")}}]),e}();t.default=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0;this.element.scrollTop=e}},{key:"append",value:function(e){this.element.appendChild(e)}},{key:"getChild",value:function(e){return this.element.querySelector(e)}}]),e}();t.default=o},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n