PageSourceSearch

https://www.homofaber.com/assets/QueryClientProvider-By2IWy2m.js

js homofaber.com collected 2026-09-24 08:38:32 UTC 17,445 bytes, 1 lines download raw bytes

1var re=t=>{throw TypeError(t)};var _=(t,e,s)=>e.has(t)||re("Cannot "+s);var i=(t,e,s)=>(_(t,e,"read from private field"),s?s.call(t):e.get(t)),f=(t,e,s)=>e.has(t)?re("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),c=(t,e,s,r)=>(_(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),O=(t,e,s)=>(_(t,e,"access private method"),s);import{r as X}from"./i18n-vendor-CgdUv56d.js";import{j as Te}from"./ariakit-vendor-Rr0LjWYd.js";var ve=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},D,R,k,le,qe=(le=class extends ve{constructor(){super();f(this,D);f(this,R);f(this,k);c(this,k,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){i(this,R)||this.setEventListener(i(this,k))}onUnsubscribe(){var e;this.hasListeners()||((e=i(this,R))==null||e.call(this),c(this,R,void 0))}setEventListener(e){var s;c(this,k,e),(s=i(this,R))==null||s.call(this),c(this,R,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){i(this,D)!==e&&(c(this,D,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof i(this,D)=="boolean"?i(this,D):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},D=new WeakMap,R=new WeakMap,k=new WeakMap,le),je=new qe,Oe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},U,Z,he,Ee=(he=class{constructor(){f(this,U,Oe);f(this,Z,!1)}setTimeoutProvider(t){c(this,U,t)}setTimeout(t,e){return i(this,U).setTimeout(t,e)}clearTimeout(t){i(this,U).clearTimeout(t)}setInterval(t,e){return i(this,U).setInterval(t,e)}clearInterval(t){i(this,U).clearInterval(t)}},U=new WeakMap,Z=new WeakMap,he),V=new Ee;function Ie(t){setTimeout(t,0)}var Re=typeof window>"u"||"Deno"in globalThis;function ie(){}function rt(t,e){return typeof t=="function"?t(e):t}function Ue(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ae(t,e){return Math.max(t+(e||0)-Date.now(),0)}function De(t,e){return typeof t=="function"?t(e):t}function Me(t,e){return typeof t=="function"?t(e):t}function it(t,e){const{type:s="all",exact:r,fetchStatus:n,predicate:o,queryKey:b,stale:a}=t;if(b){if(r){if(e.queryHash!==Ke(b,e.options))return!1}else if(!Y(e.queryKey,b))return!1}if(s!=="all"){const l=e.isActive();if(s==="active"&&!l||s==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||n&&n!==e.state.fetchStatus||o&&!o(e))}function nt(t,e){const{exact:s,status:r,predicate:n,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if($(e.options.mutationKey)!==$(o))return!1}else if(!Y(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||n&&!n(e))}function Ke(t,e){return((e==null?void 0:e.queryKeyHashFn)||$)(t)}function $(t){return JSON.stringify(t,(e,s)=>J(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function Y(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>Y(t[s],e[s])):!1}var Qe=Object.prototype.hasOwnProperty;function pe(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=ne(t)&&ne(e);if(!r&&!(J(t)&&J(e)))return e;const o=(r?t:Object.keys(t)).length,b=r?e:Object.keys(e),a=b.length,l=r?new Array(a):{};let P=0;for(let g=0;g<a;g++){const S=r?g:b[g],p=t[S],w=e[S];if(p===w){l[S]=p,(r?g<o:Qe.call(t,S))&&P++;continue}if(p===null||w===null||typeof p!="object"||typeof w!="object"){l[S]=w;continue}const C=pe(p,w,s+1);l[S]=C,C===p&&P++}return o===a&&P===o?t:l}function at(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function ne(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function J(t){if(!ae(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!ae(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function ae(t){return Object.prototype.toString.call(t)==="[object Object]"}function Le(t){return new Promise(e=>{V.setTimeout(e,t)})}function ke(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?pe(t,e):e}function xe(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Ge(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var me=Symbol();function be(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===me?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function ut(t,e){return typeof t=="function"?t(...e):!!t}function Ne(t,e,s){let r=!1,n;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>
1(n??(n=e()),r||(r=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),t}var ge=(()=>{let t=()=>Re;return{isServer(){return t()},setIsServer(e){t=e}}})();function He(){let t,e;const s=new Promise((n,o)=>{t=n,e=o});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),t(n)},s.reject=n=>{r({status:"rejected",reason:n}),e(n)},s}var Be=Ie;function ze(){let t=[],e=0,s=a=>{a()},r=a=>{a()},n=Be;const o=a=>{e?t.push(a):n(()=>{s(a)})},b=()=>{const a=t;t=[],a.length&&n(()=>{r(()=>{a.forEach(l=>{s(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||b()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{n=a}}}var _e=ze(),x,A,G,fe,Ve=(fe=class extends ve{constructor(){super();f(this,x,!0);f(this,A);f(this,G);c(this,G,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){i(this,A)||this.setEventListener(i(this,G))}onUnsubscribe(){var e;this.hasListeners()||((e=i(this,A))==null||e.call(this),c(this,A,void 0))}setEventListener(e){var s;c(this,G,e),(s=i(this,A))==null||s.call(this),c(this,A,e(this.setOnline.bind(this)))}setOnline(e){i(this,x)!==e&&(c(this,x,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return i(this,x)}},x=new WeakMap,A=new WeakMap,G=new WeakMap,fe),Se=new Ve;function $e(t){return Math.min(1e3*2**t,3e4)}function we(t){return(t??"online")==="online"?Se.isOnline():!0}var W=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Je(t){let e=!1,s=0,r;const n=He(),o=()=>n.status!=="pending",b=h=>{var m;if(!o()){const v=new W(h);p(v),(m=t.onCancel)==null||m.call(t,v)}},a=()=>{e=!0},l=()=>{e=!1},P=()=>je.isFocused()&&(t.networkMode==="always"||Se.isOnline())&&t.canRun(),g=()=>
1we(t.networkMode)&&t.canRun(),S=h=>{o()||(r==null||r(),n.resolve(h))},p=h=>{o()||(r==null||r(),n.reject(h))},w=()=>new Promise(h=>{var m;r=v=>{(o()||P())&&h(v)},(m=t.onPause)==null||m.call(t)}).then(()=>{var h;r=void 0,o()||(h=t.onContinue)==null||h.call(t)}),C=()=>{if(o())return;let h;const m=s===0?t.initialPromise:void 0;try{h=m??t.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(S).catch(v=>{var I;if(o())return;const j=t.retry??(ge.isServer()?0:3),d=t.retryDelay??$e,u=typeof d=="function"?d(s,v):d,T=j===!0||typeof j=="number"&&s<j||typeof j=="function"&&j(s,v);if(e||!T){p(v);return}s++,(I=t.onFail)==null||I.call(t,s,v),Le(u).then(()=>P()?void 0:w()).then(()=>{e?p(v):C()})})};return{promise:n,status:()=>n.status,cancel:b,continue:()=>(r==null||r(),n),cancelRetry:a,continueRetry:l,canStart:g,start:()=>(g()?C():w().then(C),n)}}var M,de,We=(de=class{constructor(){f(this,M)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ue(this.gcTime)&&c(this,M,V.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ge.isServer()?1/0:300*1e3))}clearGcTimeout(){i(this,M)!==void 0&&(V.clearTimeout(i(this,M)),c(this,M,void 0))}},M=new WeakMap,de);function Ze(t){return{onFetch:(e,s)=>{var g,S,p,w,C;const r=e.options,n=(p=(S=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:S.fetchMore)==null?void 0:p.direction,o=((w=e.state.data)==null?void 0:w.pages)||[],b=((C=e.state.data)==null?void 0:C.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const P=async()=>{let h=!1;const m=d=>{Ne(d,()=>e.signal,()=>h=!0)},v=be(e.options,e.fetchOptions),j=async(d,u,T)=>{if(h)return Promise.reject(e.signal.reason);if(u==null&&d.pages.length)return Promise.resolve(d);const z=(()=>{const se={client:e.client,queryKey:e.queryKey,pageParam:u,direction:T?"backward":"forward",meta:e.options.meta};return m(se),se})(),Ce=await v(z),{maxPages:ee}=e.options,te=T?Ge:xe;return{pages:te(d.pages,Ce,ee),pageParams:te(d.pageParams,u,ee)}};if(n&&o.length){const d=n==="backward",u=d?Xe:ue,T={pages:o,pageParams:b},I=u(r,T);a=await j(T,I,d)}else{const d=t??o.length;do{const u=l===0?b[0]??r.initialPageParam:ue(r,a);if(l>0&&u==null)break;a=await j(a,u),l++}while(l<d)}return a};e.options.persister?e.fetchFn=()=>{var h,m;return(m=(h=e.options).persister)==null?void 0:m.call(h,P,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=P}}}function ue(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function Xe(t,{pages:e,pageParams:s}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,s[0],s):void 0}var N,K,H,q,Q,y,B,L,F,Fe,E,ye,ot=(ye=class extends We{constructor(e){super();f(this,F);f(this,N);f(this,K);f(this,H);f(this,q);f(this,Q);f(this,y);f(this,B);f(this,L);c(this,L,!1),c(this,B,e.defaultOptions),this.setOptions(e.options),this.observers=[],c(this,Q,e.client),c(this,q,i(this,Q).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,c(this,K,ce(this.options)),this.state=e.state??i(this,K),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return i(this,N)}get promise(){var e;return(e=i(this,y))==null?void 0:e.promise}setOptions(e){if(this.options={...i(this,B),...e},e!=null&&e._type&&c(this,N,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=ce(this.options);s.data!==void 0&&(this.setState(oe(s.data,s.dataUpdatedAt)),c(this,K,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&i(this,q).remove(this)}setData(e,s){const r=ke(this.state.data,e,this.options);return O(this,F,E).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e){O(this,F,E).call(this,{type:"setState",state:e})}cancel(e){var r,n;const s=(r=i(this,y))==null?void 0:r.promise;return(n=i(this,y))==null||n.cancel(e),s?s.then(ie).catch(ie):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return i(this,K)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Me(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===me||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
1Count>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>De(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ae(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=i(this,y))==null||s.continue()}onOnline(){var s;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=i(this,y))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),i(this,q).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(i(this,y)&&(i(this,L)||O(this,F,Fe).call(this)?i(this,y).cancel({revert:!0}):i(this,y).cancelRetry()),this.scheduleGc()),i(this,q).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||O(this,F,E).call(this,{type:"invalidate"})}async fetch(e,s){var P,g,S,p,w,C,h,m,v,j,d;if(this.state.fetchStatus!=="idle"&&((P=i(this,y))==null?void 0:P.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(i(this,y))return i(this,y).continueRetry(),i(this,y).promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(T=>T.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,n=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(c(this,L,!0),r.signal)})},o=()=>{const u=be(this.options,s),I=(()=>{const z={client:i(this,Q),queryKey:this.queryKey,meta:this.meta};return n(z),z})();return c(this,L,!1),this.options.persister?this.options.persister(u,I,this):u(I)},a=(()=>{const u={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:i(this,Q),state:this.state,fetchFn:o};return n(u),u})(),l=i(this,N)==="infinite"?Ze(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),c(this,H,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=a.fetchOptions)==null?void 0:g.meta))&&O(this,F,E).call(this,{type:"fetch",meta:(S=a.fetchOptions)==null?void 0:S.meta}),c(this,y,Je({initialPromise:s==null?void 0:s.initialPromise,fn:a.fetchFn,onCancel:u=>{u instanceof W&&u.revert&&this.setState({...i(this,H),fetchStatus:"idle"}),r.abort()},onFail:(u,T)=>{O(this,F,E).call(this,{type:"failed",failureCount:u,error:T})},onPause:()=>{O(this,F,E).call(this,{type:"pause"})},onContinue:()=>{O(this,F,E).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const u=await i(this,y).start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),(w=(p=i(this,q).config).onSuccess)==null||w.call(p,u,this),(h=(C=i(this,q).config).onSettled)==null||h.call(C,u,this.state.error,this),u}catch(u){if(u instanceof W){if(u.silent)return i(this,y).promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw O(this,F,E).call(this,{type:"error",error:u}),(v=(m=i(this,q).config).onError)==null||v.call(m,u,this),(d=(j=i(this,q).config).onSettled)==null||d.call(j,this.state.data,u,this),u}finally{this.scheduleGc()}}},N=new WeakMap,K=new WeakMap,H=new WeakMap,q=new WeakMap,Q=new WeakMap,y=new WeakMap,B=new WeakMap,L=new WeakMap,F=new WeakSet,Fe=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},E=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ye(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,...oe(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return c(this,H,e.manual?n:void 0),n;case"error":const o=e.error;
1return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=s(this.state),_e.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),i(this,q).notify({query:this,type:"updated",action:e})})},ye);function Ye(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:we(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function oe(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ce(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pe=X.createContext(void 0),ct=t=>{const e=X.useContext(Pe);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},lt=({client:t,children:e})=>(X.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Te.jsx(Pe.Provider,{value:t,children:e}));export{ot as Q,We as R,ve as S,ie as a,it as b,Je as c,rt as d,$ as e,je as f,lt as g,Ke as h,He as i,Me as j,at as k,ge as l,nt as m,_e as n,Se as o,Y as p,Ue as q,De as r,me as s,Ae as t,V as u,Ye as v,ke as w,ut as x,ct as y};

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.