"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4455],{76776:(t,e,s)=>{s.d(e,{A:()=>l});var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"vs-wrapper"},[e("label",{staticClass:"custom-element"},[t.isLabelVisible?e("span",{class:["label-item",t.labelClass]},[t._v(t._s(t.labelText))]):t._e()]),t._v(" "),e("v-select",{attrs:{options:t.dropdownOptions,label:"text",searchable:t.isSearchable,reduce:function(t){return t.value}},on:{input:t.onChangeOption,search:t.onSearch},scopedSlots:t._u([{key:"option",fn:function(s){return[e("span",{domProps:{innerHTML:t._s(s.text)}})]}},{key:"selected-option",fn:function(s){return[e("span",{domProps:{innerHTML:t._s(s.text)}})]}}]),model:{value:t.selectedValue,callback:function(e){t.selectedValue=e},expression:"selectedValue"}})],1)};n._withStripped=!0;s(2008),s(26099);var i=s(74692);const a={name:"vueSelectFilter",props:["dropdownOptions","isSearchable","filterType","labelText","selected","selectedInsight","labelClass"],data:function(){return{selectedValue:this.selectedInsight,isLabelVisible:!0}},watch:{dropdownOptions:function(t){this.setDefaultOption(t,this.selected)},selected:function(t){this.setDefaultOption(this.dropdownOptions,t)}},methods:{setDefaultOption:function(t,e){var s=t.filter((function(t){return t.value==e}));s.length>0&&""!==this.selected&&(this.selectedValue=s[0].text),this.updateDropDownStyle()},onSearch:function(t){this.isLabelVisible=!t},updateDropDownStyle:function(){var t=this.$el;t.querySelector(".label-item").classList.add("label-item-selected"),t.querySelector(".vs__dropdown-toggle").classList.add("selected-border"),null!=this.selectedValue&&""!=this.selectedValue||(t.querySelector(".label-item").classList.remove("label-item-selected"),t.querySelector(".vs__dropdown-toggle").classList.remove("selected-border"))},onChangeOption:function(){this.$emit("changeFilterValue",this.selectedValue),this.updateDropDownStyle()},reset:function(){this.selectedValue=null,this.updateDropDownStyle()}},mounted:function(){i(".vs__open-indicator").remove(),i(".vs__spinner").before('<img class="vs__open-indicator" src="hera/images/down-arrow.svg">');i(".vs__clear").empty(),i(".vs__clear").append('<img src="hera/images/close-icon.svg">'),""!=this.selectedInsight&&this.updateDropDownStyle()}};const l=(0,s(14486).A)(a,n,[],!1,null,null,null).exports},1367:(t,e,s)=>{s.r(e),s.d(e,{default:()=>d});s(34782);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"myapp"},[e("form",{staticClass:"search-form",attrs:{id:"top-nav-search-form"},on:{submit:function(e){return e.preventDefault(),t.onSubmit.apply(null,arguments)}}},[e("fieldset",[e("div",{staticClass:"search-box filter-opener"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.fullTextSearch,expression:"fullTextSearch"}],attrs:{type:"text",placeholder:"Search",id:"top-nav-search-box"},domProps:{value:t.fullTextSearch},on:{input:[function(e){e.target.composing||(t.fullTextSearch=e.target.value)},function(e){return t.onFulltextSearch(e)}]}}),t._v(" "),e("button",{staticClass:"search-button close-search",attrs:{type:"button"},on:{click:t.reset}},[t._v("\n                    search opener\n                ")])]),t._v(" "),e("div",{staticClass:"filter-block"},[e("div",{staticClass:"filter-tabset tabset"},[e("a",{staticClass:"topNavTab active",attrs:{href:"#top-nav-tab1"},on:{click:function(e){return t.setFilterType(!0)}}},[t._v("\n                        Indexes\n                    ")]),t._v(" "),e("a",{staticClass:"topNavTab",attrs:{href:"#top-nav-tab2"},on:{click:function(e){return t.setFilterType(!1)}}},[t._v("\n                        Insights\n                    ")]),t._v(" "),e("span",{staticClass:"rail"})]),t._v(" "),e("div",{staticClass:"tab-container tab-content"},[e("div",{staticClass:"filter-tab",attrs:{id:"top-nav-tab1"}},[t._m(0),t._v(" "),e("div",{staticClass:"filters-holder"},[e("IndexFilterComponent",{ref:"indexesComponent",attrs:{searchKey:t.indexSearhKey},on:{updateResult:t.getResult,setParams:t.setParams}})],1)]),t._v(" "),e("div",{staticClass:"filter-tab",attrs:{id:"top-nav-tab2"}},[t._m(1),t._v(" "),e("div",{staticClass:"filters-holder"},[e("InsightFilterComponent",{ref:"insightsComponent",attrs:{searchKey:t.insightSearhKey},on:{updateResult:t.getResult,setParams:t.setParams}})],1)])]),t._v(" "),e("button",{staticClass:"btn btn-primary",attrs:{type:"submit"}},[t._v("\n                    Search\n                    "),e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("g",{attrs:{"clip-path":"url(#clip0_20_4602)"}},[e("circle",{attrs:{cx:"6.33932",cy:"6.33887",r:"5.5",transform:"rotate(-45 6.33932 6.33887)",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"}}),t._v(" "),e("path",{attrs:{d:"M10.5006 10.5L15.3551 15.3545",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"}})]),t._v(" "),e("defs",[e("clipPath",{attrs:{id:"clip0_20_4602"}},[e("rect",{attrs:{width:"16",height:"16",fill:"white",transform:"translate(0.000488281)"}})])])])])])]),t._v(" "),e("button",{staticClass:"close-btn close-search",attrs:{type:"button"}},[e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.99996 9.0606L13.2043 14.2649L14.265 13.2043L9.06062 7.99994L14.2651 2.79552L13.2044 1.73486L7.99996 6.93928L2.79553 1.73486L1.73486 2.79552L6.9393 7.99994L1.73497 13.2043L2.79563 14.2649L7.99996 9.0606Z",fill:"currentColor"}})])])]),t._v(" "),e("div",{staticClass:"search-box-result"},[e("div",{staticClass:"search-box-result-list index-table",attrs:{id:"search-tool"}},[t._l(t.topNavResult.slice(0,5),(function(s,n){return e("div",{key:s.symbol,staticClass:"row-holder"},[e("a",{staticClass:"table-row",class:{"search-result-active":n===t.selectedIndex},attrs:{href:s.slug}},[e("strong",{staticClass:"col description",domProps:{innerHTML:t._s(s.title)}}),t._v(" "),e("span",{staticClass:"col medium"},[t._v("\n                        "+t._s(s.refInfo)+"\n                    ")])])])})),t._v(" "),t.topNavResult.length>5?e("div",{staticClass:"load-more-btn"},[e("button",{staticClass:"btn btn-primary",on:{click:t.onSubmit}},[t._v("\n                    Show More\n                ")])]):t._e()],2)])])};n._withStripped=!0;s(51629),s(23792),s(23288),s(26099),s(38781),s(47764),s(23500),s(62953),s(76031),s(48408);var i=s(74692),a=s.n(i),l=(s(23042),s(30992)),r=(s(43335),s(54937)),o=s(2350);const c={components:{IndexFilterComponent:r.A,InsightFilterComponent:o.A},name:"TopNavigationSearch",data:function(){return{fullTextSearch:"",indexSearhKey:"",insightSearhKey:"",params:{},topNavResult:[],isIndexCompActive:!0,redirectMaxWidth:1024,selectedIndex:null,vueFilterClass:"vs__search",isFirstResultReached:!1}},methods:{handleKeyDown:function(t){if(t.target.className!==this.vueFilterClass&&document.body.classList.contains("search-active")&&!(this.topNavResult.length<=0)){var e=document.getElementById("top-nav-search-box");switch(t.key){case"ArrowUp":t.preventDefault(),this.selectedIndex=Math.max(0,this.selectedIndex-1),0===this.selectedIndex?this.isFirstResultReached?(this.selectedIndex=null,e.focus()):(e.blur(),this.isFirstResultReached=!0):e.blur();break;case"ArrowDown":t.preventDefault(),(null===this.selectedIndex||this.selectedIndex<4)&&(e.blur(),this.isFirstResultReached=!1,this.selectedIndex=Math.min(this.topNavResult.length-1,(null===this.selectedIndex?-1:this.selectedIndex)+1));break;case"Enter":this.onSubmit()}}},onFulltextSearch:function(t){var e=this,s=t.target.value;(s.length>=3||""==s)&&setTimeout((function(){e.isIndexCompActive?e.indexSearhKey=s:e.insightSearhKey=s}),300)},setParams:function(t){this.params=t},setFilterType:function(t){document.getElementById("top-nav-search-box").focus(),this.fullTextSearch="",this.topNavResult=[],this.clearFilters(),this.isIndexCompActive=t},isValidParam:function(){var t=!1;for(var e in this.params)this.params[e]&&(t=!0);return t},getResult:function(t){var e=this;e.selectedIndex=null,this.topNavResult=[],this.isValidParam()&&t.result.forEach((function(t){e.topNavResult.push({title:t.title,slug:e.isIndexCompActive?t.slug:t.url,refInfo:e.isIndexCompActive?t.symbol:t.publishDate})}))},onSubmit:function(){if(this.isValidParam()){if(1===this.topNavResult.length&&window.innerWidth>this.redirectMaxWidth)return void(window.location.href=this.topNavResult[0].slug);if(null!==this.selectedIndex)return void(window.location.href=this.topNavResult[this.selectedIndex].slug);this.params.isIndexList=this.isIndexCompActive;var t=new URLSearchParams(this.params).toString();window.location.href="/search?".concat(encodeURIComponent(t))}},reset:function(){this.fullTextSearch="",this.isIndexCompActive=!0,this.topNavResult=[],this.clearFilters(),a()("html").css({overflow:"scroll"})},clearFilters:function(){this.$refs.indexesComponent.reset(),this.$refs.insightsComponent.reset()}},beforeCreate:function(){a()("#root-top-nav-search").remove()},mounted:function(){a()(".filter-tabset").tabset({tabLinks:".topNavTab",defaultTab:!0}),(0,l.A)(),document.addEventListener("keydown",this.handleKeyDown)}};const d=(0,s(14486).A)(c,n,[function(){var t=this,e=t._self._c;return e("div",{staticClass:"heading"},[e("label",[t._v("Filter by:")]),t._v(" "),e("button",{staticClass:"clear-all",attrs:{type:"reset"}},[t._v("\n                                Clear All\n                            ")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"heading"},[e("label",[t._v("Filter by:")]),t._v(" "),e("button",{staticClass:"clear-all",attrs:{type:"reset"}},[t._v("\n                                Clear All\n                            ")])])}],!1,null,null,null).exports},14486:(t,e,s)=>{function n(t,e,s,n,i,a,l,r){var o,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),l?(o=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},c._ssrRegister=o):i&&(o=r?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),o)if(c.functional){c._injectStyles=o;var d=c.render;c.render=function(t,e){return o.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,o):[o]}return{exports:t,options:c}}s.d(e,{A:()=>n})}}]);