PageSourceSearch

https://hygraph-with-houdini.vercel.app/_app/chunks/network-8f532977.js

js hygraph-with-houdini.vercel.app collected 2026-10-03 07:05:54 UTC 19,686 bytes, 2 lines download raw bytes

1var Q=Object.defineProperty,W=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var q=(l,e,t)=>e in l?Q(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,I=(l,e)=>{for(var t in e||(e={}))X.call(e,t)&&q(l,t,e[t]);if($)for(var t of $(e))Y.call(e,t)&&q(l,t,e[t]);return l},R=(l,e)=>W(l,P(e));import{H as Z}from"./vendor-490d33b6.js";const U={schemaPath:"./schema.graphql",sourceGlob:"src/**/*.svelte",module:"esm",framework:"kit",apiUrl:"https://api-eu-central-1.graphcms.com/v2/ck8sn5tnf01gc01z89dbc7s0o/master"};var C;(function(l){l.CacheOrNetwork="CacheOrNetwork",l.CacheOnly="CacheOnly",l.NetworkOnly="NetworkOnly",l.CacheAndNetwork="CacheAndNetwork"})(C||(C={}));var z;(function(l){l.Query="HoudiniQuery",l.Subcription="HoudiniSubscription",l.Mutation="HoudiniMutation",l.Fragment="HoudiniFragment"})(z||(z={}));var K;(function(l){l.append="append",l.prepend="prepend",l.replace="replace"})(K||(K={}));var x;(function(l){l.Cache="cache",l.Network="network"})(x||(x={}));function V({artifact:l,config:e,input:t,rootType:i="@root"}){if(t===null||typeof t=="undefined"||!l.input)return t;const s=i==="@root"?l.input.fields:l.input.types[i];return Array.isArray(t)?t.map(n=>V({artifact:l,config:e,input:n,rootType:i})):Object.fromEntries(Object.entries(t).map(([n,r])=>{var o,h;const c=s==null?void 0:s[n];if(!c)return[n,r];const u=(h=(o=e.scalars)===null||o===void 0?void 0:o[c])===null||h===void 0?void 0:h.marshal;return u?Array.isArray(r)?[n,r.map(u)]:[n,u(r)]:T(e,c)||!l.input.types[c]?[n,r]:[n,V({artifact:l,config:e,input:r,rootType:c})]}))}function H(l,e,t){return t===null||typeof t=="undefined"?t:Array.isArray(t)?t.map(i=>H(l,e,i)):Object.fromEntries(Object.entries(t).map(([i,s])=>{var n,r;const{type:o,fields:h}=e[i];if(!o)return[i,s];if(h)return[i,H(l,h,s)];if((r=(n=l.scalars)===null||n===void 0?void 0:n[o])===null||r===void 0?void 0:r.marshal){const c=l.scalars[o].unmarshal;if(!c)throw new Error(`scalar type ${o} is missing an \`unmarshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`);return Array.isArray(s)?[i,s.map(c)]:[i,c(s)]}return[i,s]}))}function T(l,e){return["String","Boolean","Float","ID","Int"].concat(Object.keys(l.scalars||{})).includes(e)}class ee{constructor(e,t){this.fields={},this.keyVersions={},this.subscribers={},this.recordLinks={},this.listLinks={},this.referenceCounts={},this.lifetimes=new Map,this.cache=e,this.id=t}allSubscribers(){return Object.values(this.subscribers).flatMap(e=>e)}getField(e){return this.fields[e]}writeField(e,t){this.fields[e]=t}writeRecordLink(e,t){this.recordLinks[e]=t}writeListLink(e,t){this.listLinks[e]=t}linkedRecord(e){const t=this.recordLinks[e];return t===null?null:this.cache.internal.getRecord(t)}linkedRecordID(e){return this.recordLinks[e]}linkedListIDs(e){const t=[],i=[this.listLinks[e]||[]];for(;i.length>0;){const s=i.shift();for(const n of s){if(Array.isArray(n)){i.push(n);continue}t.push(n)}}return t}flatLinkedList(e){return this.linkedListIDs(e).map(this.cache.internal.getRecord)}appendLinkedList(e,t){this.listLinks[e]||(this.listLinks[e]=[]),this.listLinks[e].push(t)}prependLinkedList(e,t){this.listLinks[e]||(this.listLinks[e]=[]),this.listLinks[e].unshift(t)}removeFromLinkedList(e,t){this.listLinks[e]=(this.listLinks[e]||[]).filter(i=>i!==t)}addSubscriber(e,t,...i){this.keyVersions[e]||(this.keyVersions[e]=new Set),this.keyVersions[e].add(t);const s=(this.subscribers[t]||[]).map(({set:o})=>o),n=i.filter(({set:o})=>!s.includes(o));this.subscribers[t]=this.getSubscribers(t).concat(...n),this.referenceCounts[t]||(this.referenceCounts[t]=new Map);const r=this.referenceCounts[t];this.lifetimes.delete(t);for(const o of i)r.set(o.set,(r.get(o.set)||0)+1)}getSubscribers(e){return this.subscribers[e]||[]}forgetSubscribers(...e){this.forgetSubscribers_walk(e.map(({set:t})=>t))}removeAllSubscribers(){this.forgetSubscribers(...this.allSubscribers())}removeAllSubscriptionVersions(e,t){!this.keyVersions[e]||this.removeSubscribers([...this.keyVersions[e]],[t.set])}
1forgetSubscribers_walk(e,t=[]){var i;this.removeSubscribers(Object.keys(this.subscribers),e),t.push(this.id);const s=Object.keys(this.recordLinks);for(const n of Object.keys(this.listLinks))for(const r of this.linkedListIDs(n))r!==null&&s.push(r);for(const n of s)t.includes(n)||(i=this.cache.internal.getRecord(n))===null||i===void 0||i.forgetSubscribers_walk(e,t)}removeSubscribers(e,t){var i;for(const s of e){let n=[];for(const r of t){if(!((i=this.referenceCounts[s])===null||i===void 0?void 0:i.has(r)))continue;const o=this.referenceCounts[s],h=(o.get(r)||0)-1;o.set(r,h),h<=0&&(n.push(r),o.delete(r))}this.subscribers[s]=this.getSubscribers(s).filter(({set:r})=>!n.includes(r))}}onGcTick(){const e=Object.keys(this.fields).concat(Object.keys(this.listLinks)).concat(Object.keys(this.recordLinks));for(const t of e)if(!this.referenceCounts[t]||this.referenceCounts[t].size===0){const i=this.lifetimes.get(t)||0;this.lifetimes.set(t,i+1),this.lifetimes.get(t)>this.cache.cacheBufferSize&&(delete this.fields[t],delete this.recordLinks[t],delete this.recordLinks[t],Object.keys(this.fields).length===0&&Object.keys(this.recordLinks).length===0&&Object.keys(this.recordLinks).length===0&&this.cache.internal.deleteID(this.id))}}}class N{constructor({name:e,cache:t,record:i,key:s,listType:n,selection:r,when:o,filters:h,parentID:c,connection:u}){this.record=i,this.key=s,this.listType=n,this.cache=t,this.selection=r,this._when=o,this.filters=h,this.name=e,this.parentID=c,this.connection=u}when(e){return new N({cache:this.cache,record:this.record,key:this.key,listType:this.listType,selection:this.selection,when:e,filters:this.filters,parentID:this.parentID,name:this.name,connection:this.connection})}append(e,t,i={}){return this.addToList(e,t,i,"last")}prepend(e,t,i={}){return this.addToList(e,t,i,"first")}addToList(e,t,i={},s){const n=this.cache.id(this.listType,t);if(!this.validateWhen()||!n)return;let r=e,o=t;this.connection?(r={newEntry:{keyRaw:this.key,type:"Connection",fields:{edges:{keyRaw:"edges",type:"ConnectionEdge",update:s==="first"?"prepend":"append",fields:{node:{type:this.listType,keyRaw:"node",fields:R(I({},e),{__typename:{keyRaw:"__typename",type:"String"}})}}}}}},o={newEntry:{edges:[{node:R(I({},t),{__typename:this.listType})}]}}):(r={newEntries:{keyRaw:this.key,type:this.listType,update:s==="first"?"prepend":"append",fields:R(I({},e),{__typename:{keyRaw:"__typename",type:"String"}})}},o={newEntries:[R(I({},t),{__typename:this.listType})]});const h=this.record.getSubscribers(this.key),c=this.cache.internal.record(n);this.cache.internal.insertSubscribers(c,e,i,...h),this.cache.write({selection:r,data:o,variables:i,parent:this.record.id,applyUpdates:!0})}removeID(e,t={}){if(!this.validateWhen())return;let i=this.record.id,s=e,n=this.key;if(this.connection){const o=this.record.linkedRecord(this.key);if(!o)return;for(const h of o.flatLinkedList("edges")||[]){if(!h)continue;const c=h.linkedRecord("node");!c||c.id===e&&(s=h.id)}i=o.id,n="edges"}const r=this.record.getSubscribers(this.key);this.cache.internal.unsubscribeSelection(this.cache.internal.record(s),this.connection?this.selection.edges.fields:this.selection,t,...r.map(({set:o})=>o)),this.cache.internal.record(i).removeFromLinkedList(n,s),this.cache.internal.notifySubscribers(r,t),this.connection&&this.cache.internal.deleteID(s)}remove(e,t={}){const i=this.cache.id(this.listType,e);!i||this.removeID(i,t)}validateWhen(){let e=!0;if(this._when){const t=this.filters;this._when.must&&t&&(e=Object.entries(this._when.must).reduce((i,[s,n])=>Boolean(i&&t[s]==n),e)),this._when.must_not&&(e=!t||Object.entries(this._when.must_not).reduce((i,[s,n])=>Boolean(i&&t[s]!=n),e))}return e}*[Symbol.iterator](){for(let e of this.record.flatLinkedList(this.key))yield e}}class J{constructor(e){this._data=new Map,this._lists=new Map,this._disabled=!1,this.cacheBufferSize=10,this._config=e,e.cacheBufferSize&&(this.cacheBufferSize=e.cacheBufferSize);try{this._disabled=typeof window=="undefined"}catch{this._disabled=!0}}write({selection:e,data:t,variables:i={},parent:s=O,applyUpdates:n=!1}){if(this._disabled)return;const r=[];this._write({rootID:s,selection:e,recordID:s,data:t,variables:i,specs:r,applyUpdates:n});const o=[],h=[];for(const c of r)h.includes(c.set)||(o.push(c),h.push(c.set));this.notifySubscribers(o,i)}id(e,t){const i=typeof t=="string"?t:this.computeID(e,t);return i?e+":"+i:null}idFields(e){return["id"]}subscribe(e,t={}){let i=e.parentID?this.record(e.parentID):this.root();if(!i)throw new Error("Could not find root of subscription");this.addSubscribers(i,e,e.selection,t)}unsubscribe(e,t={}){let i=e.parentID?this.getRecord(e.parentID):this.root();!i||this.removeSubscribers(i,e,e.selection,t)}list(e,t){var i;const s=(i=this._lists.get(e))===null||i===void 0?void 0:i.get(t||O);if(!s)throw new Error(`Cannot find list with name: ${e} under parent: ${t}. Is it possible that the query is not mounted?`);return s}delete(e,t,i={}){this.record(t).removeAllSubscribers();for(const n of this._lists.values())for(const r of n.values())r.listType===e&&r.removeID(t,i);return this.deleteID(t)}record(e){return this._data.has(e)||this._data.set(e,new ee(this,e||"")),this._data.get(e)}get internal(){return{notifySubscribers:this.notifySubscribers.bind(this),insertSubscribers:this.insertSubscribers.bind(this),unsubscribeSelection:this.unsubscribeSelection.bind(this),evaluateKey:this.evaluateKey.bind(this),record:this.record.bind(this),getRecord:this.getRecord.bind(this),getData:this.getData.bind(this),deleteID:this.deleteID.bind(this),computeID:this.computeID.bind(this),isDataAvailable:this.isDataAvailable.bind(this)}}computeID(e,t){return t.id}root(){return this.record(O)}getData(e,t,i){var s,n;if(e===null||typeof e=="undefined")return null;const r={};for(const[o,{type:h,keyRaw:c,fields:u}]of Object.entries(t)){const a=this.evaluateKey(c,i),f=e.linkedRecord(a),L=e.listLinks[a]||[];if(f===null){r[o]=null;continue}if(f&&u){r[o]=this.getData(f,u,i);continue}else if(u)r[o]=this.hydrateNestedList({fields:u,variables:i,linkedList:L});else{const p=e.getField(a);((n=(s=this._config.scalars)===null||s===void 0?void 0:s[h])===null||n===void 0?void 0:n.unmarshal)?r[o]=this._config.scalars[h].unmarshal(p):r[o]=p;continue}}return r}addSubscribers(e,t,i,s){var n;for(const{type:r,keyRaw:o,fields:h,list:c,filters:u}of Object.values(i)){const a=this.evaluateKey(o,s);if(e.addSubscriber(o,a,t),!T(this._config,r)){const f=e.linkedRecord(a);let L=f?[f]:e.flatLinkedList(a);if(c&&h&&(this._lists.has(c.name)||this._lists.set(c.name,new Map),(n=this._lists.get(c.name))===null||n===void 0||n.set(t.parentID||O,new N({name:c.name,connection:c.connection,parentID:t.parentID,cache:this,record:e,listType:c.type,key:a,selection:h,filters:Object.entries(u||{}).reduce((p,[_,{kind:v,value:k}])=>R(I({},p),{[_]:v!=="Variable"?k:s[k]}),{})}))),!L||!h)continue;for(const p of L)!p||this.addSubscribers(p,t,h,s)}}}removeSubscribers(e,t,i,s){for(const{type:n,keyRaw:r,fields:o,list:h}of Object.values(i)){const c=this.evaluateKey(r,s);if(e.forgetSubscribers(t),h&&this._lists.delete(h.name),!T(this._config,n)){const u=e.linkedRecord(c);let a=u?[u]:e.flatLinkedList(c);if(!a||!o)continue;for(const f of a)!f||this.removeSubscribers(f,t,o,s)}}}_write({rootID:e,selection:t,recordID:i,data:s,variables:n,specs:r,applyUpdates:o}){var h;const c=this.record(i);for(const[u,a]of Object.entries(s)){if(!t||!t[u])throw new Error("Could not find field listing in selection for "+u+" @ "+JSON.stringify(t)+"");let{type:f,keyRaw:L,fields:p,operations:_,abstract:v,update:k}=t[u];const m=this.evaluateKey(L,n);if(!f)throw new Error("could not find the field information for "+u);a===null&&c.writeRecordLink(m,null);const S=c.getSubscribers(m);if(a instanceof Object&&!Array.isArray(a)&&p){if(v){if(!a.__typename)throw new Error("Encountered interface type without __typename in the payload");f=a.__typename}const d=c.linkedRecordID(m),g=((h=this.idFields(f))===null||h===void 0?void 0:h.filter(b=>typeof a[b]=="undefined").length)>0?`${i}.${m}`:this.id(f,a);g&&d!==g&&(c.writeRecordLink(m,g),d&&this.record(d).forgetSubscribers(...S),r.push(...S)),g&&this._write({rootID:e,selection:p,recordID:g,data:a,variables:n,specs:r,applyUpdates:o})}else if(!T(this._config,f)&&Array.isArray(a)&&p){let d=[...c.listLinks[this.evaluateKey(m,n)]||[]];const y=k?d.filter(D=>{if(!D)return!1;const w=this.record(D);return!(w.fields.cursor||!w.linkedRecord("node"))}):[];let g=[];const{newIDs:b,nestedIDs:j}=this.extractNestedListIDs({value:a,abstract:Boolean(v),specs:r,applyUpdates:o,recordID:i,key:m,linkedType:f,variables:n,fields:p});
1if(o&&k){if(m==="edges"){const D=[];for(const w of b){if(!w)continue;const A=this.record(w).linkedRecord("node");!A||!A.fields.__typename||D.push(A.id)}d=d.filter(w=>!(b.includes(w)&&y.includes(w)))}k==="prepend"?g=b.concat(d):k==="append"?g=d.concat(b):k==="replace"&&(g=b)}else g=j;const M=JSON.stringify(g)!==JSON.stringify(d);let E={};for(const D of S)M&&r.push(D);for(const D of d.filter(w=>w!==null&&!g.includes(w))){const w=D;for(const A of S)E[w]||(E[w]=new Set),E[w].add(A)}for(const[D,w]of Object.entries(E))this.record(D).forgetSubscribers(...w);(M||d.length===0&&b.length===0)&&c.writeListLink(m,g)}else if(JSON.stringify(a)!==JSON.stringify(c.getField(m))){let d=a;Array.isArray(a)&&o&&k&&(k==="append"?d=(c.getField(m)||[]).concat(a):k==="prepend"&&(d=a.concat(c.getField(m)||[]))),c.writeField(m,d),r.push(...S)}for(const d of _||[]){let y;if(d.parentID)if(d.parentID.kind!=="Variable")y=d.parentID.value;else{const b=n[d.parentID.value];if(typeof b!="string")throw new Error("parentID value must be a string");y=b}const g=Array.isArray(a)?a:[a];for(const b of g)if(d.action==="insert"&&b instanceof Object&&p&&d.list)this.list(d.list,y).when(d.when).addToList(p,b,n,d.position||"last");else if(d.action==="remove"&&b instanceof Object&&p&&d.list)this.list(d.list,y).when(d.when).remove(b,n);else if(d.action==="delete"&&d.type){if(typeof b!="string")throw new Error("Cannot delete a record with a non-string ID");const j=this.id(d.type,b);if(!j)continue;this.delete(d.type,j,n)}}}}hydrateNestedList({fields:e,variables:t,linkedList:i}){return i.map(s=>Array.isArray(s)?this.hydrateNestedList({fields:e,variables:t,linkedList:s}):s===null?s:this.getData(this.record(s),e,t))}extractNestedListIDs({value:e,abstract:t,recordID:i,key:s,linkedType:n,fields:r,variables:o,applyUpdates:h,specs:c}){var u;const a=[],f=[];let L=0;for(const[p,_]of e.entries()){if(Array.isArray(_)){const y=this.extractNestedListIDs({value:_,abstract:t,recordID:i,key:s,linkedType:n,fields:r,variables:o,applyUpdates:h,specs:c});f.push(...y.newIDs),a[p]=y.nestedIDs;continue}if(_===null||typeof _=="undefined"){f.push(null),a[p]=null;continue}const v=_;let k=`${i}.${s}[${L++}]`;const m=((u=this.idFields(n))===null||u===void 0?void 0:u.filter(y=>typeof _[y]=="undefined").length)>0,S=v.__typename;let d=n;if(t){if(!S)throw new Error("Encountered interface type without __typename in the payload");d=S}if(!m){const y=this.id(d,_);if(y)k=y;else continue}if(s==="edges"&&v.node&&v.node.__typename){const y=v.node,g=y.__typename;let b=this.id(g,y);b&&(k+="#"+b)}this._write({rootID:O,selection:r,recordID:k,data:v,variables:o,specs:c,applyUpdates:h}),f.push(k),a[p]=k}return{newIDs:f,nestedIDs:a}}getRecord(e){if(e===null)return null;if(!!e)return this._data.get(e)||void 0}notifySubscribers(e,t={}){var i;for(const s of e){let n=s.parentID?this.getRecord(s.parentID):this.root();if(!n)throw new Error("Could not find root of subscription");s.set(this.getData(n,s.selection,(i=s.variables)===null||i===void 0?void 0:i.call(s)))}}insertSubscribers(e,t,i,...s){for(const{keyRaw:n,fields:r}of Object.values(t)){const o=this.evaluateKey(n,i);if(e.addSubscriber(n,o,...s),r){const h=e.linkedRecord(o),c=h?[h]:e.flatLinkedList(o);for(const u of c)!u||this.insertSubscribers(u,r,i,...s)}}}unsubscribeSelection(e,t,i,...s){for(const{keyRaw:n,fields:r}of Object.values(t)){const o=this.evaluateKey(n,i);if(e.removeSubscribers([o],s),r){const h=e.flatLinkedList(o).length>0?e.flatLinkedList(o):[e.linkedRecord(o)];for(const c of h)!c||this.unsubscribeSelection(c,r,i,...s)}}}evaluateKey(e,t={}){let i="",s="",n=!1;for(const r of e){if(s){if(te.includes(r)){s+=r;continue}const o=t[s.slice(1)];i+=typeof o!="undefined"?JSON.stringify(o):"undefined",s=""}if(r==="$"&&!n){s="$";continue}r==='"'&&(n=!n),i+=r}return i}clear(){this._data=new Map,this._lists=new Map}disable(){this._disabled=!0}deleteID(e){return this._data.delete(e)}isDataAvailable(e,t,i=O){if(this._disabled)return!1;const s=this.record(i);for(const n of Object.values(e)){const r=this.evaluateKey(n.keyRaw,t);if(typeof s.getField(r)!="undefined")continue;if(!n.fields)return!1;const o=s.linkedRecordID(r);if(typeof o!="undefined"){if(o===null)continue;if(!this.isDataAvailable(n.fields,t,o))return!1}const h=s.listLinks[r];if(h){for(const c of s.flatLinkedList(r))if(!!c&&!this.isDataAvailable(n.fields,t,c.id))return!1}if(typeof o=="undefined"&&typeof h=="undefined")return!1}return!0}collectGarbage(){for(const e of this._data.keys())this.record(e).onGcTick()}}const te="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789",O="_ROOT_";let B;try{B=new J(U||{})}catch{B=new J({})}var F=B;class oe{constructor(e,t){this.fetch=e,this.socket=t}sendRequest(e,t,i){return this.fetch.call(e,t,i)}}let G=null;function ce(l){G=l}function ie(){return G}async function le(l,e,t,i){const s=Z(t),n={fetch:window.fetch.bind(window),session:s,stuff:{},page:{host:"",path:"",params:{},query:new URLSearchParams}}
1,[r]=await se({context:n,artifact:l,session:s,variables:e,cached:i});if(r.errors&&r.errors.length>0)throw r.errors;if(!r.data)throw new Error("Encountered empty data response in payload");return r}async function se({context:l,artifact:e,variables:t,session:i,cached:s=!0}){const n=ie();if(!n)return[{data:{},errors:[{message:"could not find houdini environment"}]},null];if(s&&e.kind==="HoudiniQuery"){if(setTimeout(()=>{F.collectGarbage()},0),[C.CacheOrNetwork,C.CacheOnly,C.CacheAndNetwork].includes(e.policy)&&F.internal.isDataAvailable(e.selection,t))return console.log("using cached data"),[{data:F.internal.getData(F.internal.record(O),e.selection,t),errors:[]},x.Cache];if(e.policy===C.CacheOnly)return[{data:null,errors:[]},null]}return[await n.sendRequest(l,{text:e.raw,hash:e.hash,variables:t},i),x.Network]}class he{constructor(e){this.continue=!0,this.returnValue={},this.context=e}error(e,t){this.continue=!1,this.returnValue={error:t,status:e}}redirect(e,t){this.continue=!1,this.returnValue={redirect:t,status:e}}fetch(e,t){return(typeof window!="undefined"?this.context.fetch.bind(window):this.context.fetch)(e,t)}graphqlErrors(e){return e.errors?(console.log("registering graphql errors",e.errors),this.error(500,e.errors.map(({message:t})=>t).join(`
2`))):this.error(500,"Encountered invalid response: "+JSON.stringify(e))}async invokeLoadHook({variant:e,mode:t,hookFn:i,data:s}){let n;t==="kit"?e==="before"?n=i.call(this,this.context):n=i.call(this,R(I({},this.context),{data:s})):e==="before"?n=i.call(this,this.context.page,this.context.session):n=i.call(this,this.context.page,this.context.session,s);let r=await n;!this.continue||r==null||typeof r!="object"||(this.returnValue=r)}computeInput({config:e,mode:t,variableFunction:i,artifact:s}){let n=t==="kit"?i.call(this,this.context):i.call(this,this.context.page,this.context.session);return V({artifact:s,config:e,input:n})}}export{C,x as D,oe as E,he as R,F as a,U as c,le as e,se as f,ce as s,H 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.