1import{b as W,c as Y,j as z,k as m,l as d,m as s}from"/kaliberjs/chunks/chunk-2TQJMDDT.js";s();var C={};W(C,{exclude:()=>tr,extract:()=>N,parse:()=>O,parseUrl:()=>q,pick:()=>A,stringify:()=>Q,stringifyUrl:()=>V});s();s();var I="%[a-f0-9]{2}",j=new RegExp("("+I+")|([^%]+?)","gi"),$=new RegExp("("+I+")+","gi");function w(r,t){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;t=t||1;let e=r.slice(0,t),n=r.slice(t);return Array.prototype.concat.call([],w(e),w(n))}function G(r){try{return decodeURIComponent(r)}catch{let t=r.match(j)||[];for(let e=1;e<t.length;e++)r=w(t,e).join(""),t=r.match(j)||[];return r}}function X(r){let t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},e=$.exec(r);for(;e;){try{t[e[0]]=decodeURIComponent(e[0])}catch{let f=G(e[0]);f!==e[0]&&(t[e[0]]=f)}e=$.exec(r)}t["%C2"]="\uFFFD";let n=Object.keys(t);for(let f of n)r=r.replace(new RegExp(f,"g"),t[f]);return r}function S(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return X(r)}}s();function U(r,t){let e={};if(Array.isArray(t))for(let n of t){let f=Object.getOwnPropertyDescriptor(r,n);f?.enumerable&&Object.defineProperty(e,n,f)}else for(let n of Reflect.ownKeys(r)){let f=Object.getOwnPropertyDescriptor(r,n);if(f.enumerable){let a=r[n];t(n,a,r)&&Object.defineProperty(e,n,f)}}return e}s();function h(r,t){if(!(typeof r=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r===""||t==="")return[];let e=r.indexOf(t);return e===-1?[]:[r.slice(0,e),r.slice(e+t.length)]}var Z=r=>r==null,k=r=>encodeURIComponent(r).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),b=Symbol("encodeFragmentIdentifier");function v(r){switch(r.arrayFormat){case"index":return t=>(e,n)=>{let f=e.length;return n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?e:n===null?(e.push([c(t,r),"[",f,"]"].join("")),e):(e.push([c(t,r),"[",c(f,r),"]=",c(n,r)].join("")),e)};case"bracket":return t=>(e,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?e:n===null?(e.push([c(t,r),"[]"].join("")),e):(e.push([c(t,r),"[]=",c(n,r)].join("")),e);case"colon-list-separator":return t=>(e,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?e:n===null?(e.push([c(t,r),":list="].join("")),e):(e.push([c(t,r),":list=",c(n,r)].join("")),e);case"comma":case"separator":case"bracket-separator":{let t=r.arrayFormat==="bracket-separator"?"[]=":"=";return e=>(n,f)=>f===void 0||r.skipNull&&f===null||r.skipEmptyString&&f===""?n:(f=f===null?"":f,n.length===0?(n.push([c(e,r),t,c(f,r)].join("")),n):(n.push(c(f,r)),n))}default:return t=>(e,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?e:n===null?(e.push(c(t,r)),e):(e.push([c(t,r),"=",c(n,r)].join("")),e)}}function rr(r){let t;switch(r.arrayFormat){case"index":return(e,n,f)=>{if(t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),!t){f[e]=n;return}f[e]===void 0&&(f[e]={}),f[e][t[1]]=n};case"bracket":return(e,n,f)=>{if(t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),!t){f[e]=n;return}if(f[e]===void 0){f[e]=[n];return}if(!Array.isArray(f[e])){f[e]=[f[e],n];return}f[e].push(n)};case"colon-list-separator":return(e,n,f)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){f[e]=n;return}if(f[e]===void 0){f[e]=[n];return}if(!Array.isArray(f[e])){f[e]=[f[e],n];return}f[e].push(n)};case"comma":case"separator":return(e,n,f)=>{let i=typeof n=="string"&&n.includes(r.arrayFormatSeparator)?n.split(r.arrayFormatSeparator).map(o=>p(o,r)):n===null?n:p(n,r);f[e]=i};case"bracket-separator":return(e,n,f)=>{let a=/(\[])$/.test(e);if(e=e.replace(/\[]$/,""),!a){f[e]=n&&p(n,r);return}let i=n===null?[]:p(n,r).split(r.arrayFormatSeparator);if(f[e]===void 0){f[e]=i;return}Array.isArray(f[e])||(f[e]=[f[e]]);for(let o of i)f[e].push(o)};default:return(e,n,f)=>{if(f[e]===void 0){f[e]=n;return}if(Array.isArray(f[e])){f[e].push(n);return}f[e]=[f[e],n]}}}function L(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(r,t){return t.encode?t.strict?k(r):encodeURIComponent(r):r}function p(r,t){return t.decode?S(r):r}function _(r){return Array.isArray(r)?r.sort():typeof r=="object"?_(Object.keys(r)).sort((t,e)=>Number(t)-Number(e)).map(t=>r[t]):r}function D(r){let t=r.indexOf("#");return t!==-1&&(r=r.slice(0,t)),r}function er(r){let t="",e=r.indexOf("#");return e!==-1&&(t=r.slice(e)),t}function P(r){let t=r.indexOf("?");return t===-1?r:r.slice(0,t)}function R(r,t,e){return e==="string"&&typeof r=="string"?r:typeof e=="function"&&typeof r=="string"?e(r):e==="boolean"&&r===null?!0:e==="boolean"&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":e==="boolean"&&r!==null&&(r.toLowerCase()==="1"||r.toLowerCase()==="0")?r.toLowerCase()==="1":e==="string[]"&&t.arrayFormat!=="none"&&typeof r=="string"?[r]:e==="number[]"&&t.arrayFormat!=="none"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?[Number(r)]:e==="number"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):t.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":t.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):r}function N(r){r=D(r);let t=r.indexOf("?");return t===-1?"":r.slice(t+1)}function O(r,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...t},L(t.arrayFormatSeparator);let e=rr(t),n=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return n;let f=0;for(let a=0;a<=r.length;a++){if(a<r.length&&r[a]!=="&")continue;if(a===f){f=a+1;continue}let i=r.slice(f,a);f=a+1;let o=t.decode?i.replaceAll("+"," "):i,[l,u]=h(o,"=");l===void 0&&(l=o),u=u===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?u:p(u,t),e(p(l,t),u,n)}for(let[a,i]of Object.entries(n))if(typeof i=="object"&&i!==null&&t.types[a]!=="string")for(let[o,l]of Object.entries(i)){let u=t.types[a],F=typeof u=="function"?u:u?u.replace("[]",""):void 0;i[o]=R(l,t,F)}
1else typeof i=="object"&&i!==null&&t.types[a]==="string"?n[a]=Object.values(i).join(t.arrayFormatSeparator):n[a]=R(i,t,t.types[a]);return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((a,i)=>{let o=n[i];return a[i]=o&&typeof o=="object"&&!Array.isArray(o)?_(o):o,a},Object.create(null))}function Q(r,t){if(!r)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},L(t.arrayFormatSeparator);let e=i=>t.skipNull&&Z(r[i])||t.skipEmptyString&&r[i]==="",n=v(t),f={};for(let[i,o]of Object.entries(r))e(i)||(f[i]=o);let a=Object.keys(f);return t.sort!==!1&&a.sort(t.sort),a.map(i=>{let o=r[i];if(t.replacer&&(o=t.replacer(i,o),o===void 0)||o===void 0)return"";if(o===null)return c(i,t);if(Array.isArray(o)){if(o.length===0&&t.arrayFormat==="bracket-separator")return c(i,t)+"[]";let l=o;t.replacer&&(l=o.map((x,J)=>t.replacer(`${i}[${J}]`,x)).filter(x=>x!==void 0));let u=l.reduce(n(i),[]),F=["comma","separator","bracket-separator"].includes(t.arrayFormat)?t.arrayFormatSeparator:"&";return u.join(F)}return c(i,t)+"="+c(o,t)}).filter(i=>i.length>0).join("&")}function q(r,t){t={decode:!0,...t};let[e,n]=h(r,"#");return e===void 0&&(e=r),{url:P(e??""),query:O(N(r),t),...t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:p(n,t)}:{}}}function V(r,t){t={encode:!0,strict:!0,[b]:!0,...t};let e=P(D(r.url))||"",n=N(r.url),f={...O(n,{sort:!1,...t}),...r.query},a=Q(f,t);a&&(a=`?${a}`);let i=er(r.url);if(typeof r.fragmentIdentifier=="string"){let o=new URL(e,"https://query-string.invalid");o.hash=r.fragmentIdentifier,i=t[b]?o.hash:`#${r.fragmentIdentifier}`}return`${e}${a}${i}`}function A(r,t,e){e={parseFragmentIdentifier:!0,[b]:!1,...e};let{url:n,query:f,fragmentIdentifier:a}=q(r,e);return V({url:n,query:U(f,t),fragmentIdentifier:a},e)}function tr(r,t,e){if(Array.isArray(t)){let n=new Set(t);return A(r,f=>!n.has(f),e)}return A(r,(n,f)=>!t(n,f),e)}var g=C;s();var y=Y(z());var K={parse:{arrayFormat:"bracket"},stringify:{skipEmptyString:!0,skipNull:!0,arrayFormat:"bracket"}},T=y.default.createContext({update:fr,search:null,options:K}),E=new Set,M={};function nr(){let{search:r,update:t,options:e}=y.default.useContext(T),[n,f]=y.default.useState(()=>r?g.parse(r,e.parse):M);y.default.useEffect(()=>(f(i=>i===M?g.parse(window.location.search,e.parse):i),E.add(f),()=>{E.delete(f)}),[e]);let a=y.default.useCallback(i=>{let o=typeof i=="function"?i(n):i,l=g.stringify(o,e.stringify);t({query:o,queryString:l}),E.forEach(u=>u(o))},[t,n,e]);return[n,a]}function fr({query:r,queryString:t}){let e=window.location.pathname+(t?"?"+t:"")+window.location.hash;window.history.replaceState(r,null,e)}s();s();function Nr(r){window.Rollbar.error(r)}s();s();var B={component:"src_components_loader_Loader_component",spin:"src_components_loader_Loader_spin"};function Ir({layoutClassName:r=void 0}){return m.default.createElement("span",{className:(0,d.default)(B.component,r)})}s();async function Lr(r){let t=await r.text();!r.ok&&r.status!==422&&H(r.status,t);try{let e=JSON.parse(t);if(e.error)throw new Error(e.error);return e}catch{H(r.status,t)}}function H(r,t){throw new Error(`Error ${r}: ${t}`)}export{g as a,K as b,nr as c,Nr as d,Ir as e,Lr as f};
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.