1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["components-dx-dropdown-dx-dropdown-js","components-rangecalculator-v1-js-vehicleSelect-js"],{12550:function(t,e,n){n.r(e),n.d(e,{DxDropdownEvents:function(){return d},default:function(){return a}});var i=n(69805),o=n(71202);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,l(i.key),i)}}function l(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}var d={OPEN:"DxDropdown:open",CLOSE:"DxDropdown:close",UPDATE:"DxDropdown:update",REBIND:"DxDropdown:rebind"},a=function(){return t=function t(e){var n=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=e,this.open=!1,this.button=e.querySelector(".dxDropdown__button"),this.listbox=e.querySelector(".dxDropdown__list"),this.useConstraints=s,this.truncateText=r,this.useConstraints&&(this.element.classList.add("dxDropdown--use-constraints"),this.observeDropdownConstraints(),this.element.style.setProperty("--dxdropdown-height","".concat(this.listbox.getBoundingClientRect().height,"px")),this.listboxWrapper=document.createElement("div"),this.listboxWrapper.classList.add("dxDropdown__list-wrapper"),this.listbox.parentNode.insertBefore(this.listboxWrapper,this.listbox),this.listboxWrapper.appendChild(this.listbox),this.intersectionObserverOptions={root:null,threshold:0}),this.truncateText&&this.element.classList.add("dxDropdown--use-truncate"),this.element.addEventListener(d.REBIND,function(){return n.rebindListBox()}),this.element.addEventListener("click",function(t){return n.clickEventListeners(t,i)}),this.button.addEventListener("keyup",function(t){return n.checkShow(t)}),this.listbox.addEventListener("blur",function(t){return n.testBlur(t)}),this.listbox.addEventListener("keydown",function(t){return n.keyDownEvents(t)}),this.focusElementOnClose=this.button,this.preventFocusFirstOnOpen=!1;var l=e.querySelector(".dxDropdown__list-item-link:not(.dxDropdown__list-item-link--disabled)");o&&this.addActiveDropdownItem(l),window.addEventListener("click",function(t){return n.handleWindowClick(t)})},e=[{key:"testBlur",value:function(t){var e,n;null!==(e=t.relatedTarget)&&void 0!==e&&e.classList.contains("dxDropdown__list-item")||null!==(n=t.relatedTarget)&&void 0!==n&&n.classList.contains("dxDropdown__list-item-link")||this.closeDropdown()}},{key:"handleInteraction",value:function(t){this.element.classList.contains("dxDropdown--direction-bottom")&&this.element.classList.remove("dxDropdown--direction-bottom"),this.element.classList.contains("dxDropdown--direction-top")&&this.element.classList.remove("dxDropdown--direction-top");var e=t.getBoundingClientRect(),n=window.innerHeight;e.top<=0?(this.element.classList.contains("dxDropdown--direction-bottom")||this.element.classList.add("dxDropdown--direction-bottom"),this.element.classList.contains("dxDropdown--direction-top")&&this.element.classList.remove("dxDropdown--direction-top")):e.bottom>=n&&(this.element.classList.contains("dxDropdown--direction-top")||this.element.classList.add("dxDropdown--direction-top"),this.element.classList.contains("dxDropdown--direction-bottom")&&this.element.classList.remove("dxDropdown--direction-bottom"))}},{key:"observeDropdownConstraints",value:function(){var t=this;this.useConstraints&&new IntersectionObserver(function(e){return e.forEach(function(){return t.handleInteraction(t.listbox)})},this.intersectionObserverOptions).observe(this.listbox)}},{key:"rebindListBox",value:function(){var t=this;this.listbox=this.element.querySelector(".dxDropdown__list"),this.listbox&&(this.listbox.addEventListener("blur",function(e){return t.testBlur(e)}),this.listbox.addEventListener("keydown",function(e){return t.keyDownEvents(e)}))}},{key:"handleWindowClick",value:function(t){for(var e=this,n=[],i=t.target,o=!1;i.parentNode;)n.unshift(i.parentNode),i=i.parentNode;
1n.forEach(function(t){t.classList&&t===e.element&&(o=!0)}),o||this.closeDropdown(!1)}},{key:"clickEventListeners",value:function(t,e){var n=this.useConstraints;e&&t.preventDefault();var i=t.target;if(i.classList.contains("dxDropdown__button"))this.toggleDropdown();else if(i.classList.contains("dxDropdown__list-item-link")&&!i.classList.contains("dxDropdown__list-item-link--disabled"))this.updateButtonText(t),this.closeDropdown(!0,n);else if(i.classList.contains("dxDropdown__list-item")&&!i.querySelector(".dxDropdown__list-item-link").classList.contains("dxDropdown__list-item-link--disabled")){var o=i.querySelector(".dxDropdown__list-item-link");this.updateButtonText(o),this.closeDropdown(!0,n)}else(i.classList.contains("RulesEngineDropdown__engine-label")||i.classList.contains("RulesEngineDropdown__engine-consumption"))&&(this.updateVehicleButtonText(t),this.closeDropdown())}},{key:"keyDownEvents",value:function(t){var e=t.which||t.keyCode,n=i.D.DOWN,o=i.D.UP,s=i.D.ESC,r=i.D.RETURN,l=i.D.TAB;switch(e){case n:t.preventDefault(),this.nextItem(t);break;case l:t.preventDefault(),t.shiftKey?this.previousItem(t):this.nextItem(t);break;case o:t.preventDefault(),this.previousItem(t);break;case s:t.preventDefault(),this.closeDropdown();break;case r:t.preventDefault(),this.updateButtonText(t),this.closeDropdown()}}},{key:"checkShow",value:function(t){var e=t.which||t.keyCode,n=i.D.UP,o=i.D.DOWN;switch(e){case n:case o:t.preventDefault(),this.openDropdown()}}},{key:"toggleDropdown",value:function(){return this.open?this.closeDropdown():this.openDropdown()}},{key:"openDropdown",value:function(){this.handleInteraction(this.listbox),this.element.classList.add("dxDropdown--active"),this.button.setAttribute("aria-expanded","true"),this.preventFocusFirstOnOpen||this.focusFirstItem(),this.open=!0,this.fireEvent(d.OPEN)}},{key:"closeDropdown",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.element.classList.remove("dxDropdown--active"),n&&(this.element.classList.add("dxDropdown--no-height-transition"),setTimeout(function(){t.element.classList.remove("dxDropdown--no-height-transition")},0)),this.button.setAttribute("aria-expanded","false"),this.open=!1,this.fireEvent(d.CLOSE),e&&this.focusElementOnClose.focus()}},{key:"updateButtonText",value:function(t){var e=t.target?t.target:t;this.button.innerHTML=e.innerHTML,this.fireEvent(d.UPDATE,{target:e,value:this.button.innerHTML}),this.addActiveDropdownItem(e)}},{key:"updateVehicleButtonText",value:function(t){var e=t.target.parentElement.closest(".dxDropdown__list-item-link");this.button.innerHTML=e.innerHTML,this.fireEvent(d.UPDATE,{target:e,value:this.button.innerHTML}),this.addActiveDropdownItem(e)}},{key:"nextItem",value:function(t){var e=this,n=this.listbox.querySelectorAll(".dxDropdown__list-item-link:not(.dxDropdown__list-item-link--disabled)");Array.prototype.forEach.call(n,function(i,o){t.target===i&&(o===n.length-1?e.focusFirstItem():n[o+1].focus())})}},{key:"previousItem",value:function(t){var e=this,n=this.listbox.querySelectorAll(".dxDropdown__list-item-link:not(.dxDropdown__list-item-link--disabled)");Array.prototype.forEach.call(n,function(i,o){t.target===i&&(0===o?e.focusLastItem():n[o-1].focus())})}},{key:"focusFirstItem",value:function(){this.listbox.querySelector(".dxDropdown__list-item-link:not(.dxDropdown__list-item-link--disabled)").focus()}},{key:"focusLastItem",value:function(){var t=this.listbox.querySelectorAll(".dxDropdown__list-item-link:not(.dxDropdown__list-item-link--disabled)");t.length&&t[t.length-1].focus()}},{key:"addActiveDropdownItem",value:function(t){var e=this.element.querySelector(".dxDropdown__list-item-link--active:not(.dxDropdown__list-item-link--disabled)");null!==e&&e.classList.remove("dxDropdown__list-item-link--active"),t.classList.add("dxDropdown__list-item-link--active")}},{key:"fireEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.le)(this.element,t,e)}},{key:"getElement",value:function(){return this.element}},{key:"DxDropdown",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this[t];return"function"==typeof n?n.bind(this,e)():void 0}}],e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.