!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"substack@538433c"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7a89bbde-3ac5-4e24-8c54-638f1802ed4e",e._sentryDebugIdIdentifier="sentry-dbid-7a89bbde-3ac5-4e24-8c54-638f1802ed4e")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["33063"],{51290:function(e,n,t){t.d(n,{bL:()=>P,B8:()=>S,l9:()=>Y});var r=t(17402);function i(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}"undefined"!=typeof window&&window.document&&window.document.createElement;var a=t(4006),o=t(13808);function l(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function u(...e){return n=>{let t=!1,r=e.map(e=>{let r=l(e,n);return t||"function"!=typeof r||(t=!0),r});if(t)return()=>{for(let n=0;n{},s=e=>{var n;let t,i,{present:a,children:o}=e,l=function(e){var n,t;let[i,a]=r.useState(),o=r.useRef(null),l=r.useRef(e),u=r.useRef("none"),[s,f]=(n=e?"mounted":"unmounted",t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,n)=>t[e][n]??e,n));return r.useEffect(()=>{let e=c(o.current);u.current="mounted"===s?e:"none"},[s]),d(()=>{let n=o.current,t=l.current;if(t!==e){let r=u.current,i=c(n);e?f("MOUNT"):"none"===i||n?.display==="none"?f("UNMOUNT"):t&&r!==i?f("ANIMATION_OUT"):f("UNMOUNT"),l.current=e}},[e,f]),d(()=>{if(i){let e,n=i.ownerDocument.defaultView??window,t=t=>{let r=c(o.current).includes(CSS.escape(t.animationName));if(t.target===i&&r&&(f("ANIMATION_END"),!l.current)){let t=i.style.animationFillMode;i.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=t)})}},r=e=>{e.target===i&&(u.current=c(o.current))};return i.addEventListener("animationstart",r),i.addEventListener("animationcancel",t),i.addEventListener("animationend",t),()=>{n.clearTimeout(e),i.removeEventListener("animationstart",r),i.removeEventListener("animationcancel",t),i.removeEventListener("animationend",t)}}f("ANIMATION_END")},[i,f]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:r.useCallback(e=>{o.current=e?getComputedStyle(e):null,a(e)},[])}}(a),s="function"==typeof o?o({present:l.isPresent}):r.Children.only(o),f=function(...e){return r.useCallback(u(...e),e)}(l.ref,(n=s,(i=(t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?n.ref:(i=(t=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?n.props.ref:n.props.ref||n.ref));return"function"==typeof o||l.isPresent?r.cloneElement(s,{ref:f}):null};function c(e){return e?.animationName||"none"}s.displayName="Presence";var f=Symbol("radix.slottable");function p(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}var m=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var t,i;let o,l,d,s=(i=t=`Primitive.${n}`,(o=r.forwardRef((e,n)=>{let{children:t,...i}=e;if(r.isValidElement(t)){var a;let e,o,l=(a=t,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),d=function(e,n){let t={...n};for(let r in n){let i=e[r],a=n[r];/^on[A-Z]/.test(r)?i&&a?t[r]=(...e)=>{let n=a(...e);return i(...e),n}:i&&(t[r]=i):"style"===r?t[r]={...i,...a}:"className"===r&&(t[r]=[i,a].filter(Boolean).join(" "))}return{...e,...t}}(i,t.props);return t.type!==r.Fragment&&(d.ref=n?u(n,l):l),r.cloneElement(t,d)}return r.Children.count(t)>1?r.Children.only(null):null})).displayName=`${i}.SlotClone`,l=o,(d=r.forwardRef((e,n)=>{let{children:t,...i}=e,o=r.Children.toArray(t),u=o.find(p);if(u){let e=u.props.children,t=o.map(n=>n!==u?n:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,a.Y)(l,{...i,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,t):null})}return(0,a.Y)(l,{...i,ref:n,children:t})})).displayName=`${t}.Slot`,d),c=r.forwardRef((e,t)=>{let{asChild:r,...i}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.Y)(r?s:n,{...i,ref:t})});return c.displayName=`Primitive.${n}`,{...e,[n]:c}},{}),y=r.createContext(void 0),b=t(97372),v=t(39627),g="Tabs",[N,w]=function(e,n=[]){let t=[],i=()=>{let n=t.map(e=>r.createContext(e));return function(t){let i=t?.[e]||n;return r.useMemo(()=>({[`__scope${e}`]:{...t,[e]:i}}),[t,i])}};return i.scopeName=e,[function(n,i){let o=r.createContext(i),l=t.length;t=[...t,i];let u=n=>{let{scope:t,children:i,...u}=n,d=t?.[e]?.[l]||o,s=r.useMemo(()=>u,Object.values(u));return(0,a.Y)(d.Provider,{value:s,children:i})};return u.displayName=n+"Provider",[u,function(t,a){let u=a?.[e]?.[l]||o,d=r.useContext(u);if(d)return d;if(void 0!==i)return i;throw Error(`\`${t}\` must be used within \`${n}\``)}]},function(...e){let n=e[0];if(1===e.length)return n;let t=()=>{let t=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=t.reduce((n,{useScope:t,scopeName:r})=>{let i=t(e)[`__scope${r}`];return{...n,...i}},{});return r.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return t.scopeName=n.scopeName,t}(i,...n)]}(g,[o.RG]),h=(0,o.RG)(),[E,C]=N(g),R=r.forwardRef((e,n)=>{let t,{__scopeTabs:i,value:o,onValueChange:l,defaultValue:u,orientation:d="horizontal",dir:s,activationMode:c="automatic",...f}=e,p=(t=r.useContext(y),s||t||"ltr"),[N,w]=(0,b.i)({prop:o,onChange:l,defaultProp:u??"",caller:g});return(0,a.Y)(E,{scope:i,baseId:(0,v.B)(),value:N,onValueChange:w,orientation:d,dir:p,activationMode:c,children:(0,a.Y)(m.div,{dir:p,"data-orientation":d,...f,ref:n})})});R.displayName=g;var T="TabsList",I=r.forwardRef((e,n)=>{let{__scopeTabs:t,loop:r=!0,...i}=e,l=C(T,t),u=h(t);return(0,a.Y)(o.bL,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:r,children:(0,a.Y)(m.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:n})})});I.displayName=T;var O="TabsTrigger",M=r.forwardRef((e,n)=>{let{__scopeTabs:t,value:r,disabled:l=!1,...u}=e,d=C(O,t),s=h(t),c=D(d.baseId,r),f=A(d.baseId,r),p=r===d.value;return(0,a.Y)(o.q7,{asChild:!0,...s,focusable:!l,active:p,children:(0,a.Y)(m.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:c,...u,ref:n,onMouseDown:i(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(r)}),onKeyDown:i(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(r)}),onFocus:i(e.onFocus,()=>{let e="manual"!==d.activationMode;p||l||!e||d.onValueChange(r)})})})});M.displayName=O;var _="TabsContent";function D(e,n){return`${e}-trigger-${n}`}function A(e,n){return`${e}-content-${n}`}r.forwardRef((e,n)=>{let{__scopeTabs:t,value:i,forceMount:o,children:l,...u}=e,d=C(_,t),c=D(d.baseId,i),f=A(d.baseId,i),p=i===d.value,y=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,a.Y)(s,{present:o||p,children:({present:t})=>(0,a.Y)(m.div,{"data-state":p?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":c,hidden:!t,id:f,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:y.current?"0s":void 0},children:t&&l})})}).displayName=_;var P=R,S=I,Y=M}}]);