PageSourceSearch

https://hubtown-live.netlify.app/_nuxt/Bmtl4jgW.js

js hubtown-live.netlify.app collected 2026-10-03 10:53:37 UTC 7,360 bytes, 2 lines download raw bytes

1import{bQ as m,bR as L}from"./u1ipQrxM.js";const x=/_key\s*==\s*['"](.*)['"]/;function W(t){return typeof t=="string"?x.test(t.trim()):typeof t=="object"&&"_key"in t}function A(t){if(!Array.isArray(t))throw new Error("Path is not an array");return t.reduce((e,r,n)=>{const o=typeof r;if(o==="number")return`${e}[${r}]`;if(o==="string")return`${e}${n===0?"":"."}${r}`;if(W(r)&&r._key)return`${e}[_key=="${r._key}"]`;if(Array.isArray(r)){const[a,i]=r;return`${e}[${a}:${i}]`}throw new Error(`Unsupported path segment \`${JSON.stringify(r)}\``)},"")}const b={"\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","'":"\\'","\\":"\\\\"},E={"\\f":"\f","\\n":`
2`,"\\r":"\r","\\t":"	","\\'":"'","\\\\":"\\"};function C(t){return`$${t.map(e=>typeof e=="string"?`['${e.replace(/[\f\n\r\t'\\]/g,r=>b[r])}']`:typeof e=="number"?`[${e}]`:e._key!==""?`[?(@._key=='${e._key.replace(/['\\]/g,r=>b[r])}')]`:`[${e._index}]`).join("")}`}function P(t){const e=[],r=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;let n;for(;(n=r.exec(t))!==null;){if(n[1]!==void 0){const o=n[1].replace(/\\(\\|f|n|r|t|')/g,a=>E[a]);e.push(o);continue}if(n[2]!==void 0){e.push(parseInt(n[2],10));continue}if(n[3]!==void 0){const o=n[3].replace(/\\(\\')/g,a=>E[a]);e.push({_key:o,_index:-1});continue}}return e}function j(t){return t.map(e=>{if(typeof e=="string"||typeof e=="number")return e;if(e._key!=="")return{_key:e._key};if(e._index!==-1)return e._index;throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function N(t){return t.map(e=>{if(typeof e=="string"||typeof e=="number")return e;if(e._index!==-1)return e._index;throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function V(t,e){if(!e?.mappings)return;const r=C(N(t));if(e.mappings[r]!==void 0)return{mapping:e.mappings[r],matchedPath:r,pathSuffix:""};const n=Object.entries(e.mappings).filter(([f])=>r.startsWith(f)).sort(([f],[s])=>s.length-f.length);if(n.length==0)return;const[o,a]=n[0],i=r.substring(o.length);return{mapping:a,matchedPath:o,pathSuffix:i}}function M(t){return t!==null&&Array.isArray(t)}function u(t,e,r=[]){if(M(t))return t.map((n,o)=>{if(m(n)){const a=n._key;if(typeof a=="string")return u(n,e,r.concat({_key:a,_index:o}))}return u(n,e,r.concat(o))});if(m(t)){if(t._type==="block"||t._type==="span"){const n={...t};return t._type==="block"?n.children=u(t.children,e,r.concat("children")):t._type==="span"&&(n.text=u(t.text,e,r.concat("text"))),n}return Object.fromEntries(Object.entries(t).map(([n,o])=>[n,u(o,e,r.concat(n))]))}return e(t,r)}function q(t,e,r){return u(t,(n,o)=>{if(typeof n!="string")return n;const a=V(o,e);if(!a)return n;const{mapping:i,matchedPath:f}=a;if(i.type!=="value"||i.source.type!=="documentValue")return n;const s=e.documents[i.source.document],p=e.paths[i.source.path],d=P(f),c=P(p).concat(o.slice(d.length));return r({sourcePath:c,sourceDocument:s,resultPath:o,value:n})})}const J="drafts",F="versions",g=".",T=`${J}${g}`,z=`${F}${g}`;function U(t){return t.startsWith(T)}function k(t){return t.startsWith(z)}function G(t){return!U(t)&&!k(t)}function H(t){if(!k(t))return;const[e,r,...n]=t.split(g);return r}function K(t){return k(t)?t.split(g).slice(2).join(g):U(t)?t.slice(T.length):t}function X(t){const{baseUrl:e,workspace:r="default",tool:n="default",id:o,type:a,path:i,projectId:f,dataset:s}=t;if(!e)throw new Error("baseUrl is required");if(!i)throw new Error("path is required");if(!o)throw new Error("id is required");if(e!=="/"&&e.endsWith("/"))throw new Error("baseUrl must not end with a slash");const p=r==="default"?void 0:r,d=n==="default"?void 0:n,c=K(o),h=Array.isArray(i)?A(j(i)):i,l=new URLSearchParams({baseUrl:e,id:c,type:a,path:h});if(p&&l.set("workspace",p),d&&l.set("tool",d),f&&l.set("projectId",f),s&&l.set("dataset",s),G(o))l.set("perspective","published");else if(k(o)){const w=H(o);l.set("perspective",w)}const y=[e==="/"?"":e];p&&y.push(p);const _=["mode=presentation",`id=${c}`,`type=${a}`,`path=${encodeURIComponent(h)}`];return d&&_.push(`tool=${d}`),y.push("intent","edit",`${_.join(";")}?${l}`),y.join("/")}function B(t){let e=typeof t=="string"?t:t.baseUrl;return e!=="/"&&(e=e.replace(/\/$/,"")),typeof t=="string"?{baseUrl:e}:{...t,baseUrl:e}}const S=({sourcePath:t,resultPath:e,value:r})=>{if(Y(r)||v(r))return!1;const n=t.at(-1);return!(t.at(-2)==="slug"&&n==="current"||typeof n=="string"&&(n.startsWith("_")||n.endsWith("Id"))||t.some(o=>o==="meta"||o==="metadata"||o==="openGraph"||o==="seo")||R(t)||R(e)||typeof n=="string"&&Q.has(n))},Q=new Set(["color","colour","currency","email","format","gid","hex","href","hsl","hsla","icon","id","index","key","language","layout","link","linkAction","locale","lqip","page","path","ref","rgb","rgba","route","secret","slug","status","tag","template","theme","type","textTheme","unit","url","username","variant","website"]);function Y(t){return/^\d{4}-\d{2}-\d{2}/.test(t)?!!Date.parse(t):!1}const Z=new Set(["app:","data:","discord:","file:","ftp:","ftps:","geo:","http:","https:","imap:","javascript:","magnet:","mailto:","maps:","ms-excel:","ms-powerpoint:","ms-word:","slack:","sms:","spotify:","steam:","teams:","tel:","vscode:","zoom:"]);function v(t){try{const{protocol:e}=new URL(t,t.startsWith("/")?"https://acme.com":void 0);return Z.has(e)||e.startsWith("web+")}catch{return!1}}function R(t){return t.some(e=>typeof e=="string"&&e.match(/type/i)!==null)}const $=20;function tt(t,e,r){const{filter:n,logger:o,enabled:a}=r;if(!a){const s="config.enabled must be true, don't call this function otherwise";throw o?.error?.(`[@sanity/client]: ${s}`,{result:t,resultSourceMap:e,config:r}),new TypeError(s)}if(!e)return o?.error?.("[@sanity/client]: Missing Content Source Map from response body",{result:t,resultSourceMap:e,config:r}),t;
2if(!r.studioUrl){const s="config.studioUrl must be defined";throw o?.error?.(`[@sanity/client]: ${s}`,{result:t,resultSourceMap:e,config:r}),new TypeError(s)}const i={encoded:[],skipped:[]},f=q(t,e,({sourcePath:s,sourceDocument:p,resultPath:d,value:c})=>{if((typeof n=="function"?n({sourcePath:s,resultPath:d,filterDefault:S,sourceDocument:p,value:c}):S({sourcePath:s,resultPath:d,value:c}))===!1)return o&&i.skipped.push({path:I(s),value:`${c.slice(0,$)}${c.length>$?"...":""}`,length:c.length}),c;o&&i.encoded.push({path:I(s),value:`${c.slice(0,$)}${c.length>$?"...":""}`,length:c.length});const{baseUrl:h,workspace:l,tool:y}=B(typeof r.studioUrl=="function"?r.studioUrl(p):r.studioUrl);if(!h)return c;const{_id:_,_type:w,_projectId:O,_dataset:D}=p;return L(c,{origin:"sanity.io",href:X({baseUrl:h,workspace:l,tool:y,id:_,type:w,path:s,...!r.omitCrossDatasetReferenceData&&{dataset:D,projectId:O}})},!1)});if(o){const s=i.skipped.length,p=i.encoded.length;if((s||p)&&((o?.groupCollapsed||o.log)?.("[@sanity/client]: Encoding source map into result"),o.log?.(`[@sanity/client]: Paths encoded: ${i.encoded.length}, skipped: ${i.skipped.length}`)),i.encoded.length>0&&(o?.log?.("[@sanity/client]: Table of encoded paths"),(o?.table||o.log)?.(i.encoded)),i.skipped.length>0){const d=new Set;for(const{path:c}of i.skipped)d.add(c.replace(x,"0").replace(/\[\d+\]/g,"[]"));o?.log?.("[@sanity/client]: List of skipped paths",[...d.values()])}(s||p)&&o?.groupEnd?.()}return f}function I(t){return A(j(t))}var rt=Object.freeze({__proto__:null,stegaEncodeSourceMap:tt});export{q as encodeIntoResult,tt as stegaEncodeSourceMap,rt as stegaEncodeSourceMap$1};

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.