PageSourceSearch

https://www.bravado.de/cdn/shop/t/33/assets/predictive-search.bundle.js?v=168648483474609608041784729963

js bravado.de collected 2026-09-24 19:48:41 UTC 7,083 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgcom_rhythm=self.webpackChunkgcom_rhythm||[]).push([[3213],{4190(e,t,n){var r=n(5805);class i extends HTMLElement{constructor(){super(),this.searchResultsContainer=document.querySelector(".template-search"),this.input=this.querySelector('input[type="search"]'),this.predictiveSearchResults=this.querySelector("[data-predictive-search-results]"),this.openDropdown=!1,this.input.addEventListener("input",(0,r.sg)(e=>{this.onChange(e)},100)),this.handleOutsideClick=this.handleOutsideClick.bind(this),this.input.addEventListener("focus",()=>{this.openDropdown||this.onChange()})}connectedCallback(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}onChange(){const e=this.input.value.trim();e.length<1?this.close():this.getSearchResults(e)}getSearchResults(e){fetch(`${routes.predictive_search_url}?q=${encodeURIComponent(e)}&section_id=predictive-search`).then(e=>{if(!e.ok){const t=new Error(e.status);throw this.close(),t}return e.text()}).then(e=>{if(this.input.value.trim().length>0){const t=(new DOMParser).parseFromString(e,"text/html").querySelector("#shopify-section-predictive-search").innerHTML;this.predictiveSearchResults.innerHTML=t,this.open()}}).catch(e=>{throw this.close(),e})}open(){this.openDropdown=!0,this.predictiveSearchResults.style.display="block",this.searchResultsContainer&&(this.searchResultsContainer.style.minHeight="500px"),this.input.setAttribute("aria-expanded","true"),this.input.focus({focusVisible:!0})}close(){this.openDropdown=!1,this.predictiveSearchResults.style.display="none",this.searchResultsContainer&&(this.searchResultsContainer.style.minHeight="auto"),this.input.setAttribute("aria-expanded","false")}handleOutsideClick(e){this.contains(e.target)||this.close()}}customElements.define("predictive-search",i)},5805(e,t,n){function r(e,t=100){let n=null;return function(...r){null===n&&(n=setTimeout(()=>{e.apply(this,r),n=null},t))}}function i(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}n.d(t,{DT:()=>g,Dz:()=>s,aM:()=>y,nF:()=>r,oM:()=>a,qF:()=>c,sg:()=>i,up:()=>v});function s(e="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${e}`}}}const o={};function a(e,t=e){const n=function(e){return Array.from(e.querySelectorAll('summary, a[href], button:enabled, [tabindex]:not([tabindex^="-"]), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe'))}(e),r=n[0],i=n[n.length-1];c(),o.focusin=t=>{t.target!==e&&t.target!==i&&t.target!==r||document.addEventListener("keydown",o.keydown)},o.focusout=function(){document.removeEventListener("keydown",o.keydown)},o.keydown=function(t){"TAB"===t.code.toUpperCase()&&(t.target!==i||t.shiftKey||(t.preventDefault(),r.focus()),t.target!==e&&t.target!==r||!t.shiftKey||(t.preventDefault(),i.focus()))},document.addEventListener("focusout",o.focusout),document.addEventListener("focusin",o.focusin),t.focus()}function c(e=null){document.removeEventListener("focusin",o.focusin),document.removeEventListener("focusout",o.focusout),document.removeEventListener("keydown",o.keydown),e&&e.focus()}let u,l=0,d=[];function h(e){return function(e){let t="string"!=typeof e?JSON.stringify(e):e;try{t=JSON.parse(t)}catch(e){return!1}return"object"==typeof t&&null!==t}(e)?"string"!=typeof e?e:JSON.parse(e):null}function p(e){return"group_purchase_limits"===e?.errorSource}function m(){return window.refreshSections([{id:"cart-drawer"},{id:"header-cart-count"},{id:"header-cart-count_md"}])}function f(e){const t=Number(e.getAttribute("qty"));return Number.isNaN(t)?0:t}function _(e,t={}){const n=new URLSearchParams;let r=!1;e.forEach(e=>{const i=Number(e.limit),s=(o=e.handle,Array.from(document.querySelectorAll("[data-group-handle]")).filter(e=>e.dataset.groupHandle===o));var o;let a=s.reduce((e,t)=>e+f(t),0)-i;if(Number.isNaN(i)||a<=0)return;const c=s.find(e=>function(e,t){return t?.editedLineKey&&e.dataset.lineKey===t.editedLineKey||t?.editedVariantId&&e.getAttribute("variant_id")===t.editedVariantId}(e,t));(c?[c,...s.filter(e=>
1e!==c)]:s).forEach(e=>{if(a<=0)return;const t=function(e){return e.dataset.lineKey||e.getAttribute("variant_id")}(e),i=f(e),s=Math.max(i-a,0),o=i-s;!t||o<=0||(a-=o,r=!0,n.append(`updates[${t}]`,String(s)))})}),r&&fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},credentials:"same-origin",body:n.toString()}).then(e=>e.json()).then(m)}function y(e,t){const n=[],r=h(t.errors?t.errors:t.message);if(r){const t=r;let i=[];const s=t.filter(p),o=t.filter(e=>!p(e));s.length&&_(s,e),o.length&&function(e){let t=e;0===l&&(u=e),1===l&&(d=[...u,...e],t=d);const n=new URLSearchParams;let r=!1;t.forEach(e=>{const t=e.productLevelLimit;let i=t;const s=e.variants;Array.isArray(s)&&s.forEach(e=>{const s=e.id;if(!s)return;const o="cart-item--"+s,a=document.getElementById(o)?.getAttribute("qty"),c=e.maxVariantLimit;let u=t;(null===u||null!==c&&c<u)&&(u=c);const l=null===u?-1:Number(u);let d;d=a<=l||-1===l?a:l,-1!==i&&(d>i&&(d=i),i&&(i<d?i=0:i-=d)),d!==a&&(r=!0),n.append(`updates[${s}]`,String(d))})}),r&&fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},credentials:"same-origin",body:n.toString()}).then(e=>e.json()).then(e=>{422===e.status&&0===l&&(l++,y(null,e)),m()})}(o),e?.component_ids?i=[...e.component_ids]:e?.id&&i.push(e.id);let a=!1;t.forEach(e=>
1{e.variants?.length&&e.variants.forEach(t=>{null!==t.maxVariantLimit&&""!==t.error&&""!==t.cartLevelError&&(a=!0,i.includes(e.id)?n.push(t.error):n.push(t.cartLevelError))}),null===e.productLevelLimit||""===e.error||""===e.cartLevelError||a||(i.includes(e.id)?n.push(e.error):n.push(e.cartLevelError))})}else n.push(t.errors?t.errors:t.description);throw n}function g(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function v(e){const t=window.shopCurrencyFormat;if(isNaN(e)||!t)return"";const n=parseFloat((e/100).toString()),r=t.includes("amount")&&!t.includes("amount_")||t.includes("amount_with_comma_separator")||t.includes("amount_with_apostrophe_separator")||t.includes("amount_with_space_separator")||t.includes("amount_with_period_and_space_separator")?2:0,i=(e,t=",")=>e.replace(/\B(?=(\d{3})+(?!\d))/g,t);let s=n.toFixed(r);return s=t.includes("amount_with_comma_separator")?i(s.replace(".",","),"."):t.includes("amount_no_decimals_with_comma_separator")?i(parseInt(n).toString(),"."):t.includes("amount_with_apostrophe_separator")?i(s,"'"):t.includes("amount_no_decimals_with_space_separator")?i(parseInt(n).toString()," "):t.includes("amount_with_space_separator")?i(s," "):t.includes("amount_with_period_and_space_separator")?i(s.replace("."," ")," "):t.includes("amount_no_decimals")?parseInt(n).toString():i(s),((e,t)=>t.replace(/{{\s*amount.*?\s*}}/,e))(s,t)}}},e=>{var t;t=4190,e(e.s=t)}]);

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.