2 lines
3.2 KiB
JavaScript
2 lines
3.2 KiB
JavaScript
var O=t=>{throw TypeError(t)};var S=(t,e,r)=>e.has(t)||O("Cannot "+r);var h=(t,e,r)=>(S(t,e,"read from private field"),r?r.call(t):e.get(t)),m=(t,e,r)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),j=(t,e,r,s)=>(S(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);import{r as C}from"./index-JhL3uwfD.js";import"./jsx-runtime-D_zvdyIk.js";var D=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(){}},k={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},o,v,w,x=(w=class{constructor(){m(this,o,k);m(this,v,!1)}setTimeoutProvider(t){j(this,o,t)}setTimeout(t,e){return h(this,o).setTimeout(t,e)}clearTimeout(t){h(this,o).clearTimeout(t)}setInterval(t,e){return h(this,o).setInterval(t,e)}clearInterval(t){h(this,o).clearInterval(t)}},o=new WeakMap,v=new WeakMap,w),U=new x;function N(t){setTimeout(t,0)}var B=typeof window>"u"||"Deno"in globalThis;function J(){}function K(t){return typeof t=="number"&&t>=0&&t!==1/0}function L(t,e){return Math.max(t+(e||0)-Date.now(),0)}function V(t,e){return typeof t=="function"?t(e):t}function Z(t,e){return typeof t=="function"?t(e):t}function _(t){return JSON.stringify(t,(e,r)=>d(r)?Object.keys(r).sort().reduce((s,u)=>(s[u]=r[u],s),{}):r)}var q=Object.prototype.hasOwnProperty;function P(t,e,r=0){if(t===e)return t;if(r>500)return e;const s=I(t)&&I(e);if(!s&&!(d(t)&&d(e)))return e;const c=(s?t:Object.keys(t)).length,b=s?e:Object.keys(e),n=b.length,i=s?new Array(n):{};let p=0;for(let f=0;f<n;f++){const a=s?f:b[f],l=t[a],y=e[a];if(l===y){i[a]=l,(s?f<c:q.call(t,a))&&p++;continue}if(l===null||y===null||typeof l!="object"||typeof y!="object"){i[a]=y;continue}const g=P(l,y,r+1);i[a]=g,g===l&&p++}return c===n&&p===c?t:i}function G(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function I(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function d(t){if(!T(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!T(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function T(t){return Object.prototype.toString.call(t)==="[object Object]"}function H(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?P(t,e):e}function R(t,e){return typeof t=="function"?t(...e):!!t}var E=N;function F(){let t=[],e=0,r=n=>{n()},s=n=>{n()},u=E;const c=n=>{e?t.push(n):u(()=>{r(n)})},b=()=>{const n=t;t=[],n.length&&u(()=>{s(()=>{n.forEach(i=>{r(i)})})})};return{batch:n=>{let i;e++;try{i=n()}finally{e--,e||b()}return i},batchCalls:n=>(...i)=>{c(()=>{n(...i)})},schedule:c,setNotifyFunction:n=>{r=n},setBatchNotifyFunction:n=>{s=n},setScheduler:n=>{u=n}}}var W=F(),M=C.createContext(void 0),X=t=>{const e=C.useContext(M);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e};export{D as S,J as a,R as b,V as c,K as d,U as e,H as f,_ as h,B as i,W as n,Z as r,G as s,L as t,X as u};
|