(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["2579"],{30998:function(e,t,r){var a=r(41848),n=r(67206),u=r(40554),i=Math.max;e.exports=function(e,t,r){var l=null==e?0:e.length;if(!l)return -1;var s=null==r?0:u(r);return s<0&&(s=i(l+s,0)),a(e,n(t,3),s)}},10928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},12561:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/** * @license lucide-preact v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let a=(0,r(36150).Z)("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]])},48916:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/** * @license lucide-preact v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let a=(0,r(36150).Z)("CupSoda",[["path",{d:"m6 8 1.75 12.28a2 2 0 0 0 2 1.72h4.54a2 2 0 0 0 2-1.72L18 8",key:"8166m8"}],["path",{d:"M5 8h14",key:"pcz4l3"}],["path",{d:"M7 15a6.47 6.47 0 0 1 5 0 6.47 6.47 0 0 0 5 0",key:"yjz344"}],["path",{d:"m12 8 1-6h2",key:"3ybfa4"}]])},78796:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/** * @license lucide-preact v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */let a=(0,r(36150).Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},69241:function(e,t,r){"use strict";r.d(t,{JG:()=>u.JG,MA:()=>u.MA,ZP:()=>s,kY:()=>u.kY});var a=r(98661),n=r(61688),u=r(76750);let i=a.default.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),l={dedupe:!0};u.$l.defineProperty(u.J$,"defaultValue",{value:u.u_});let s=(0,u.s6)((e,t,r)=>{let{cache:s,compare:o,suspense:d,fallbackData:c,revalidateOnMount:f,revalidateIfStale:g,refreshInterval:h,refreshWhenHidden:k,refreshWhenOffline:p,keepPreviousData:E}=r,[V,v,y,R]=u.DY.get(s),[m,T]=(0,u.qC)(e),w=(0,a.useRef)(!1),L=(0,a.useRef)(!1),b=(0,a.useRef)(m),C=(0,a.useRef)(t),_=(0,a.useRef)(r),M=()=>_.current,N=()=>M().isVisible()&&M().isOnline(),[S,j,A,D]=(0,u.JN)(s,m),O=(0,a.useRef)({}).current,I=(0,u.o8)(c)?r.fallback[m]:c,P=(e,t)=>{for(let r in O)if("data"===r){if(!o(e[r],t[r])&&(!(0,u.o8)(e[r])||!o(U,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},Z=(0,a.useMemo)(()=>{let e=!!m&&!!t&&((0,u.o8)(f)?!M().isPaused()&&!d&&(!!(0,u.o8)(g)||g):f),r=t=>{let r=(0,u.PM)(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},a=S(),n=D(),i=r(a),l=a===n?i:r(n),s=i;return[()=>{let e=r(S());return P(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>l]},[s,m]),x=(0,n.useSyncExternalStore)((0,a.useCallback)(e=>A(m,(t,r)=>{P(r,t)||e()}),[s,m]),Z[0],Z[1]),z=!w.current,J=V[m]&&V[m].length>0,q=x.data,F=(0,u.o8)(q)?I:q,Y=x.error,G=(0,a.useRef)(F),U=E?(0,u.o8)(q)?G.current:q:F,W=(!J||!!(0,u.o8)(Y))&&(z&&!(0,u.o8)(f)?f:!M().isPaused()&&(d?!(0,u.o8)(F)&&g:(0,u.o8)(F)||g)),$=!!(m&&t&&z&&W),B=(0,u.o8)(x.isValidating)?$:x.isValidating,H=(0,u.o8)(x.isLoading)?$:x.isLoading,K=(0,a.useCallback)(async e=>{let t,a;let n=C.current;if(!m||!n||L.current||M().isPaused())return!1;let i=!0,l=e||{},s=!y[m]||!l.dedupe,d=()=>u.w6?!L.current&&m===b.current&&w.current:m===b.current,c={isValidating:!1,isLoading:!1},f=()=>{j(c)},g=()=>{let e=y[m];e&&e[1]===a&&delete y[m]},h={isValidating:!0};(0,u.o8)(S().data)&&(h.isLoading=!0);try{if(s&&(j(h),r.loadingTimeout&&(0,u.o8)(S().data)&&setTimeout(()=>{i&&d()&&M().onLoadingSlow(m,r)},r.loadingTimeout),y[m]=[n(T),(0,u.u3)()]),[t,a]=y[m],t=await t,s&&setTimeout(g,r.dedupingInterval),!y[m]||y[m][1]!==a)return s&&d()&&M().onDiscarded(m),!1;c.error=u.i_;let e=v[m];if(!(0,u.o8)(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return f(),s&&d()&&M().onDiscarded(m),!1;let l=S().data;c.data=o(l,t)?l:t,s&&d()&&M().onSuccess(t,m,r)}catch(r){g();let e=M(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=r,s&&d()&&(e.onError(r,m,e),(!0===t||(0,u.mf)(t)&&t(r))&&N()&&e.onErrorRetry(r,m,e,e=>{let t=V[m];t&&t[0]&&t[0](u.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return i=!1,f(),!0},[m,s]),Q=(0,a.useCallback)((...e)=>(0,u.BN)(s,b.current,...e),[]);if((0,u.LI)(()=>{C.current=t,_.current=r,(0,u.o8)(q)||(G.current=q)}),(0,u.LI)(()=>{if(!m)return;let e=K.bind(u.i_,l),t=0,r=(0,u.ko)(m,V,(r,a={})=>{if(r==u.sj.FOCUS_EVENT){let r=Date.now();M().revalidateOnFocus&&r>t&&N()&&(t=r+M().focusThrottleInterval,e())}else if(r==u.sj.RECONNECT_EVENT)M().revalidateOnReconnect&&N()&&e();else if(r==u.sj.MUTATE_EVENT)return K();else if(r==u.sj.ERROR_REVALIDATE_EVENT)return K(a)});return L.current=!1,b.current=m,w.current=!0,j({_k:T}),W&&((0,u.o8)(F)||u.W6?e():(0,u.kw)(e)),()=>{L.current=!0,r()}},[m]),(0,u.LI)(()=>{let e;function t(){let t=(0,u.mf)(h)?h(S().data):h;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!S().error&&(k||M().isVisible())&&(p||M().isOnline())?K(l).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,k,p,m]),(0,a.useDebugValue)(U),d&&(0,u.o8)(F)&&m){if(!u.w6&&u.W6)throw Error("Fallback data is required when using suspense in SSR.");C.current=t,_.current=r,L.current=!1;let e=R[m];if((0,u.o8)(e)||i(Q(e)),(0,u.o8)(Y)){let e=K(l);(0,u.o8)(U)||(e.status="fulfilled",e.value=!0),i(e)}else throw Y}return{mutate:Q,get data(){return O.data=!0,U},get error(){return O.error=!0,Y},get isValidating(){return O.isValidating=!0,B},get isLoading(){return O.isLoading=!0,H}}})}}]); //# sourceMappingURL=2579.db73e497.js.map