1(self.webpackChunkknowit_seed_project=self.webpackChunkknowit_seed_project||[]).push([[2324,6709],{21049:(e,t,i)=>{"use strict";i.d(t,{I:()=>r});var r=function(e){return window.__litium.translation[e]||e}},67536:function(e){e.exports=function(){var e="__v-click-outside",t="undefined"!=typeof window,i="undefined"!=typeof navigator,r=t&&("ontouchstart"in window||i&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"];function n(e){var t=e.event,i=e.handler;(0,e.middleware)(t)&&i(t)}function s(t,i){var s=function(e){var t="function"==typeof e;if(!t&&"object"!=typeof e)throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:t?e:e.handler,middleware:e.middleware||function(e){return e},events:e.events||r,isActive:!(!1===e.isActive),detectIframe:!(!1===e.detectIframe),capture:!!e.capture}}(i.value),a=s.handler,c=s.middleware,o=s.detectIframe,u=s.capture;if(s.isActive){if(t[e]=s.events.map((function(e){return{event:e,srcTarget:document.documentElement,handler:function(e){return function(e){var t=e.el,i=e.event,r=e.handler,s=e.middleware,a=i.composedPath&&i.composedPath()||i.path;(a?a.indexOf(t)<0:!t.contains(i.target))&&n({event:i,handler:r,middleware:s})}({el:t,event:e,handler:a,middleware:c})},capture:u}})),o){var l={event:"blur",srcTarget:window,handler:function(e){return function(e){var t=e.el,i=e.event,r=e.handler,s=e.middleware;setTimeout((function(){var e=document.activeElement;e&&"IFRAME"===e.tagName&&!t.contains(e)&&n({event:i,handler:r,middleware:s})}),0)}({el:t,event:e,handler:a,middleware:c})},capture:u};t[e]=[].concat(t[e],[l])}t[e].forEach((function(i){var r=i.event,n=i.srcTarget,s=i.handler;return setTimeout((function(){t[e]&&n.addEventListener(r,s,u)}),0)}))}}function a(t){(t[e]||[]).forEach((function(e){return e.srcTarget.removeEventListener(e.event,e.handler,e.capture)})),delete t[e]}var c=t?{bind:s,update:function(e,t){var i=t.value,r=t.oldValue;JSON.stringify(i)!==JSON.stringify(r)&&(a(e),s(e,{value:i}))},unbind:a}:{};return{install:function(e){e.directive("click-outside",c)},directive:c}}()},5291:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"c-suggestions__group"},[i("h1",[e._v(e._s(e.items.heading)+" "),i("span",[e._v("â¢")]),e._v(" "+e._s(e.itemCount))]),e._v(" "),i("ul",[e._l(e.listItems,(function(t){return i("li",[i("a",{attrs:{href:t.url}},[e._v(e._s(1==e.isProducts?t.baseProductName:t.name))])])})),e._v(" "),i("li",[i("a",{attrs:{href:e.showResults,target:"_self"}},[e._v(e._s(e.translate("quicksearch.show"))+" "+e._s(e.itemCount)+" "+e._s(e.items.heading)+' med "'+e._s(e.query)+'"')])])],2)])};r._withStripped=!0;var n=i(21049);const s=i(70538).default.extend({name:"quick-search-group",props:["items","query","isProducts"],computed:{itemCount:function(){return null!=this.items.searchItems?this.items.searchItems.length:0},listItems:function(){return null!=this.items.searchItems&&this.items.searchItems.length>5?this.items.searchItems.slice(0,5):this.items.searchItems},showResults:function(){return window.__litium.quickSearchUrl+"?q="+this.query+"#"+this.items.heading}},methods:{translate:function(e){return(0,n.I)(e)}}});var a=(0,i(51900).Z)(s,r,[],!1,null,null,null);a.options.__file="app/vue-js/components/quick-search/quick-search-group.vue";const c=a.exports},57454:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"input-group"},[i("b-input",{staticClass:"form-control",attrs:{type:"search",debounce:"500",placeholder:e.placeholder,"aria-label":e.placeholder,"aria-describedby":"src-btn"},on:{change:function(t){return e.quickSearch()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onEnter.apply(null,arguments)}},model:{value:e.query,callback:function(t){e.query=t},expression:"query"}}),e._v(" "),i("div",{staticClass:"input-group-append"},[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button",id:"src-btn"},on:{click:e.onEnter}},[i("span",{staticClass:"fa fa-search"}),e._v(" "),i("span",{staticClass:"sr-only"},[e._v(e._s(e.translate("placeholder.search")))])])]),e._v(" "),e.totalCount>
10?i("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.onClickOutside,expression:"onClickOutside"}],staticClass:"c-suggestions",on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.onClickOutside.apply(null,arguments)}}},[i("quick-search-group",{attrs:{items:e.products,query:e.query,isProducts:!0}}),e._v(" "),i("quick-search-group",{attrs:{items:e.categories,query:e.query,isProducts:!1}}),e._v(" "),i("quick-search-group",{attrs:{items:e.pages,query:e.query,isProducts:!1}}),e._v(" "),i("quick-search-group",{attrs:{items:e.files,query:e.query,isProducts:!1}}),e._v(" "),i("a",{staticClass:"c-suggestions__goto",attrs:{href:e.showResults}},[e._v(e._s(e.translate("quicksearch.showall"))+" "+e._s(e.totalCount)+" ")])],1):e._e()],1)};r._withStripped=!0;var n=i(97582),s=i(70538),a=i(5291),c=i(52861),o=i(21049),u=i(67536),l=i.n(u);const d=s.default.extend({name:"quick-search",components:{"quick-search-group":a.Z},data:()=>({products:{},categories:{},pages:{},files:{},totalCount:0,query:"",isDirectVariantHit:!1,directVariantUrl:""}),watch:{query:function(){this.quickSearch()}},computed:{placeholder:function(){return(0,o.I)("quicksearch.placeholder")},showResults:function(){return window.__litium.quickSearchUrl+"?q="+this.query+"#"+this.getFirstSet()}},directives:{clickOutside:l().directive},methods:{quickSearch(){return(0,n.mG)(this,void 0,void 0,(function*(){if(""!==this.query)try{let e=this;yield c.Z.post("/api/quicksearch/",JSON.stringify(this.query),{headers:{"Content-Type":"application/json"}}).then((function(t){e.products=t.data.products,e.categories=t.data.categories,e.pages=t.data.pages,e.files=t.data.files,e.totalCount=t.data.totalCount,e.isDirectVariantHit=t.data.isDirectVariantHit,e.directVariantUrl=t.data.directVariantUrl}))}catch(e){}else this.resetResults()}))},onEnter:function(){if(""!==this.query)if(this.isDirectVariantHit)window.location.href=this.directVariantUrl;else{let t=window.__litium.quickSearchUrl+"?";var e=new URLSearchParams(window.location.search);e.set("q",this.query),window.location.href=t+e.toString()}else this.resetResults()},getFirstSet(){return this.products.searchItems.length>0?this.products.heading:this.categories.searchItems.length>0?this.categories.heading:this.pages.searchItems.length>0?this.pages.heading:this.files.searchItems.length>0?this.files.heading:void 0},resetResults(){let e=this;e.products={},e.categories={},e.pages={},e.files={},e.totalCount=0},translate:function(e){return(0,o.I)(e)},onClickOutside(e){this.totalCount=0}},mounted(){return(0,n.mG)(this,void 0,void 0,(function*(){yield this.quickSearch()}))}});var h=(0,i(51900).Z)(d,r,[],!1,null,null,null);h.options.__file="app/vue-js/feature/quick-search/quick-search.vue";const p=h.exports},51900:(e,t,i)=>{"use strict";function r(e,t,i,r,n,s,a,c){var o,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=i,u._compiled=!0),r&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),a?(o=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=o):n&&(o=c?function(){n.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:n),o)if(u.functional){u._injectStyles=o;var l=u.render;u.render=function(e,t){return o.call(t),l(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,o):[o]}return{exports:e,options:u}}i.d(t,{Z:()=>r})}}]);
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.