1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t}from"./dist-V0wV9pPA.js";import{t as n}from"./ssr-F9GWYbf6.js";import{P as r,a as i,g as a,h as o}from"./meilisearchLocale-BuFIYjty.js";function s(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}}).fallback;return typeof window>`u`?t():e({window})}var c=e(i()),l=function(e){e&&(window.document.title=e)},u=function(){function e(t){var n=this,i=t.windowTitle,o=t.writeDelay,c=o===void 0?400:o,u=t.createURL,d=t.parseURL,f=t.getLocation,p=t.start,m=t.dispose,h=t.push,g=t.cleanUrlOnDispose;a(this,e),r(this,`$$type`,`ais.browser`),r(this,`windowTitle`,void 0),r(this,`writeDelay`,void 0),r(this,`_createURL`,void 0),r(this,`parseURL`,void 0),r(this,`getLocation`,void 0),r(this,`writeTimer`,void 0),r(this,`_onPopState`,void 0),r(this,`inPopState`,!1),r(this,`isDisposed`,!1),r(this,`latestAcknowledgedHistory`,0),r(this,`_start`,void 0),r(this,`_dispose`,void 0),r(this,`_push`,void 0),r(this,`_cleanUrlOnDispose`,void 0),this.windowTitle=i,this.writeTimer=void 0,this.writeDelay=c,this._createURL=u,this.parseURL=d,this.getLocation=f,this._start=p,this._dispose=m,this._push=h,this._cleanUrlOnDispose=g===void 0||g,s(function(e){var t=e.window;l(n.windowTitle&&n.windowTitle(n.read())),n.latestAcknowledgedHistory=t.history.length})}return o(e,[{key:`read`,value:function(){return this.parseURL({qsModule:c.default,location:this.getLocation()})}},{key:`write`,value:function(e){var t=this;s(function(n){var r=n.window,i=t.createURL(e),a=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){l(a),t.shouldWrite(i)&&(t._push?t._push(i):r.history.pushState(e,a||``,i),t.latestAcknowledgedHistory=r.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}},{key:`onUpdate`,value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&=(clearTimeout(t.writeTimer),void 0),t.inPopState=!0,e(t.read())},s(function(e){e.window.addEventListener(`popstate`,t._onPopState)})}},{key:`createURL`,value:function(e){return this._createURL({qsModule:c.default,routeState:e,location:this.getLocation()})}},{key:`dispose`,value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,s(function(t){var n=t.window;e._onPopState&&n.removeEventListener(`popstate`,e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:`start`,value:function(){this.isDisposed=!1}},{key:`shouldWrite`,value:function(e){var t=this;return s(function(n){var r=n.window;if(t.isDisposed&&!t._cleanUrlOnDispose)return!1;var i=!(t.isDisposed&&t.latestAcknowledgedHistory!==r.history.length);return!t.inPopState&&i&&e!==r.location.href})}}]),e}();function d(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,n=t===void 0?function(e){var t=e.qsModule,n=e.routeState,r=e.location,i=r.protocol,a=r.hostname,o=r.port,s=o===void 0?``:o,c=r.pathname,l=r.hash,u=t.stringify(n),d=s===``?``:`:${s}`;return u?`${i}//${a}${d}${c}?${u}${l}`:`${i}//${a}${d}${c}${l}`}:t,r=e.parseURL,i=r===void 0?function(e){var t=e.qsModule,n=e.location;return t.parse(n.search.slice(1),{arrayLimit:99})}:r,a=e.writeDelay,o=a===void 0?400:a,c=e.windowTitle,l=e.getLocation,d=l===void 0?function(){return s(function(e){return e.window.location},{fallback:function(){throw Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:l,f=e.start,p=e.dispose,m=e.push,h=e.cleanUrlOnDispose;return new u({createURL:n,parseURL:i,writeDelay:o,windowTitle:c,getLocation:d,start:f,dispose:p,push:m,cleanUrlOnDispose:h})}var f=`https://inertia.local`,p={de:`suche`,en:`search`};function m(e,t,n){let r=`${t===`/`?``:t}/${p[n]??p.de}/`,i=e.trim();return i?`${r}?q=${encodeURIComponent(i)}`:r}function h(e,r){let i=t(),a=()=>new Set([`q`,...r.value]);return{router:d({writeDelay:0,getLocation:()=>n?globalThis.location:new URL(i.url||`/`,f),push(e){n&&globalThis.history.replaceState(globalThis.history.state,``,e)},createURL({location:e,routeState:t}){let n=new URL(e.href),r=a();for(let e of r)n.searchParams.delete(e);for(let[e,r]of Object.entries(t))typeof r==`string`&&r.length>0&&n.searchParams.set(e,r);let i=n.searchParams.toString();return i.length>0?`${n.pathname}?${i}${n.hash}`:`${n.pathname}${n.hash}`},parseURL({location:e}){let t=new URL(e.href),n={},r=a();for(let e of r){let r=t.searchParams.get(e);r&&r.length>0&&(n[e]=r)}return n}}),stateMapping:{stateToRoute(t){let n=e.value;if(!n)return{};let r=t[n],i={},a=typeof r?.query==`string`?r.query:``;a.length>0&&(i.q=a);let o=r?.refinementList;if(o&&typeof o==`object`&&!Array.isArray(o))for(let[e,t]of Object.entries(o)){if(!Array.isArray(t))continue;let n=t.filter(e=>typeof e==`string`&&e.length>0);n.length>0&&(i[e]=n.join(`�`))}return i},routeToState(t){let n=e.value;if(!n)return{};let r=typeof t.q==`string`?t.q:``,i={};for(let[e,n]of Object.entries(t))e!==`q`&&typeof n==`string`&&n.length!==0&&(i[e]=n.split(`�`).filter(e=>e.length>0));return{[n]:{...r.length>0?{query:r}:{},...Object.keys(i).length>0?{refinementList:i}:{}}}}}}}var g={products:`product`,grandparents:`grandparent`,parents:`parent`,"parent-child":[`parent`,`product`],search:[`info`,`product`,`location`]},_=e=>Array.isArray(e)?`page_type IN [`+e.map(e=>`"`+e+`"`).join(`, `)+`]`:`page_type = "`+e+`"`,v=`product.care_id IS NOT NULL`,y=`((page_type = "parent") OR (page_type = "product" AND catalog_parent_uuids IS EMPTY))`,b={"info-sessions":`infosessionFilterKey`,"academic-staff":`academicStaffFilterKey`,search:`searchFilterKey`};function x(e,t=`filterKey`){return e?.flatMap(e=>{let n=e[t];return n?[`${n} IN [${e.filterItems.map(e=>`"${e.filterValue}"`).join(`, `)}]`]:[]})??[]}function S(e,t,n){if(t?.name){if(n===`info-sessions`){e.push(`location = "${t.name}"`);return}e.push(`(product_location = "${t.name}")`)}}
1function C(e,t,n){if(t&&n===`info-sessions`){e.push(`unit = "${t}"`);return}}function w(e){return!e||typeof e!=`string`?[]:e.split(`,`).map(e=>e.trim()).filter(Boolean)}export{S as a,_ as c,h as d,v as i,w as l,g as n,C as o,y as r,x as s,b as t,m as u};
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.