(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["mbmp_pvc_AddressCandidateList"],{"3f95":function(t,e,s){"use strict";var i=s("6a00"),n=s.n(i);n.a},4747:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"show",rawName:"v-show",value:t.shouldShowAddressCandidateList,expression:"shouldShowAddressCandidateList"}],class:t.listGroupClass,style:t.listStyle},[s("ul",t._l(t.candidates,(function(e,i){return s("li",{key:i},[s("a",{staticClass:"list-group-item",attrs:{id:"address-candidate-list-"+i,href:t.createLink(e),tabindex:"-1"},on:{click:function(s){return t.closeAddressCandidateList(e)},keydown:t.maybeUsedArrow}},[t._v(" "+t._s(e)+" ")])])})),0)])},n=[],d=(s("baa5"),s("fb6a"),{name:"AddressCandidateList",props:["widthFromConfig"],data:function(){var t={listStyle:{width:"250px"}};return t},computed:{inputWidth:function(){return this.$props.widthFromConfig-55},candidates:function(){var t=this.$config.addressInput.autocompleteMax;if(!t)return this.$store.state.candidates;var e=this.$store.state.candidates.slice(0,t);return e},shouldShowAddressCandidateList:function(){return this.$store.state.shouldShowAddressCandidateList},activeTopic:function(){return this.$store.state.activeTopic},isMobileOrTablet:function(){return this.$store.state.isMobileOrTablet},addressAutocompleteEnabled:function(){return!!this.$config.addressInput&&!0===this.$config.addressInput.autocompleteEnabled},listGroupClass:function(){return this.isMobileOrTablet?this.addressAutocompleteEnabled?""===this.addressEntered||null===this.addressEntered?"list-group-mobile":"list-group-mobile-full":"list-group-mobile":this.addressAutocompleteEnabled?""===this.addressEntered||null===this.addressEntered?"list-group":"list-group-full":"list-group"}},watch:{addressEntered:function(t){this.handleWindowResize()}},created:function(){window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},methods:{createLink:function(t){return this.$store.state.activeTopic?"#/"+t+"/"+this.activeTopic:"#/"+t},maybeUsedArrow:function(t){var e,s,i=t.target.id,n=parseInt(i.substring(i.lastIndexOf("-")+1));e=n<this.candidates.length-1?n+1:n,s=0!==n?n-1:0,"ArrowDown"===t.key&&document.getElementById("address-candidate-list-"+e).focus(),"ArrowUp"===t.key&&document.getElementById("address-candidate-list-"+s).focus()},closeAddressCandidateList:function(t){console.log("AddressCandidateList.vue closeAddressCandidateList is running, addressCandidate:",t),this.$store.commit("setAddressEntered",t),this.$store.commit("setShouldShowAddressCandidateList",!1)},handleWindowResize:function(t){window.innerWidth>=850?this.listStyle.width=this.$props.widthFromConfig-55+"px":window.innerWidth>=750?this.listStyle.width=this.$props.widthFromConfig-155+"px":this.listStyle.width="248px"}}}),a=d,r=(s("3f95"),s("2877")),o=Object(r["a"])(a,i,n,!1,null,"8b215be2",null);e["default"]=o.exports},"6a00":function(t,e,s){},baa5:function(t,e,s){var i=s("23e7"),n=s("e58c");i({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n})},e58c:function(t,e,s){"use strict";var i=s("fc6a"),n=s("a691"),d=s("50c4"),a=s("a640"),r=s("ae40"),o=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf"),h=r("indexOf",{ACCESSORS:!0,1:0}),f=u||!c||!h;t.exports=f?function(t){if(u)return l.apply(this,arguments)||0;var e=i(this),s=d(e.length),a=s-1;for(arguments.length>1&&(a=o(a,n(arguments[1]))),a<0&&(a=s+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:l}}]);
//# sourceMappingURL=mbmp_pvc_AddressCandidateList.fc76cb02.js.map