PageSourceSearch

https://breve.now/assets/index-DsXY0_eQ.js

js breve.now collected 2026-09-24 15:07:51 UTC 532,737 bytes, 15 lines download raw bytes

1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()}
1,e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()}
vendor: 11,590 bytes, lines 1-8
1,e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function se(e){return{current:e}}function P(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function F(e,t){oe++,ae[oe]=e.current,e.current=t}var I=se(null),ce=se(null),le=se(null),ue=se(null);function de(e,t){switch(F(le,t),F(ce,e),F(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}P(I),F(I,e)}function fe(){P(I),P(ce),P(le)}function pe(e){e.memoizedState!==null&&F(ue,e);var t=I.current,n=Hd(t,e.type);t!==n&&(F(ce,e),F(I,n))}function me(e){ce.current===e&&(P(I),P(ce)),ue.current===e&&(P(ue),Qf._currentValue=ie)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
2    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4`),l=s.split(`
5`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7Error generating stack: `+e.message+`
8`+e.stack}}var L=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=N.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function at(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[st])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
8037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Et={},Dt={};function Ot(e){return L.call(Dt,e)?!0:L.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}
vendor: 91,602 bytes, line 8
8n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Qt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(bu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,`passive`,{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=h({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=h({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(h({},On,{dataTransfer:0})),jn=bn(h({},Cn,{relatedTarget:0})),Mn=bn(h({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(h({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(h({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(h({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(h({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(h({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(h({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(h({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(h({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Ed(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){yd(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var R=`oninput`in document;if(!R){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),R=typeof mr.oninput==`function`}pr=R}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function hr(){sr&&(sr.detachEvent(`onpropertychange`,gr),cr=sr=null)}function gr(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function _r(e,t,n){e===`focusin`?(hr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function yr(e,t){if(e===`click`)return ur(t)}function br(e,t){if(e===`input`||e===`change`)return ur(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!L.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var kr=un&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==Lt(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Ed(jr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};un&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Jr.push(`scrollEnd`);function z(e,t){qr.set(e,t),Ct(t,[e])}var Yr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Xr=[],Zr=0,Qr=0;function $r(){for(var e=Zr,t=Qr=Zr=0;t<e;){var n=Xr[t];Xr[t++]=null;var r=Xr[t];Xr[t++]=null;var i=Xr[t];Xr[t++]=null;var a=Xr[t];if(Xr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ri(n,i,a)}}function ei(e,t,n,r){Xr[Zr++]=e,Xr[Zr++]=t,Xr[Zr++]=n,Xr[Zr++]=r,Qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ii(e)}function ni(e,t){return ei(e,null,null,t),ii(e)}function ri(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ai={};function oi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ui(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,I.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=si(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function B(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function pi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Re(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else t===27?(t=Mi,Zd(e.type)?(e=lf,lf=null,Mi=e):Mi=t):Mi=ji?cf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=se(null),Wi=null,Gi=null;function Ki(e,t,n){F(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,P(Ui)}function Ji(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Yi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ji(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ji(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Xi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=dd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=M.S;M.S=function(e,t){eu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=se(null);function _a(){var e=ga.current;return e===null?Rl.pooledCache:e}function va(e,t){t===null?F(ga,ga.current):F(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=B(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Na(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=B(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=di(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(re(t)||j(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Pa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ea(n),p(e,t,n,r)}if(re(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Pa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ea(r),m(e,t,n,r,i)}if(re(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Pa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),V&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return V&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),V&&Ei(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),V&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return V&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),V&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ma(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);Pa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=B(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ei(e,r,t,n),ii(e)}function Ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Wa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ra=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=se(null),Za=se(0);function Qa(e,t){e=Ul,F(Za,e),F(Xa,t),Ul=e|t.baseLanes}function $a(){F(Za,Ul),F(Xa,Xa.current)}function eo(){Ul=Za.current,P(Xa),P(Za)}var to=se(null),no=null;function H(e){var t=e.alternate;F(oo,oo.current&1),F(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function ro(e){F(oo,oo.current),F(to,e),no===null&&(no=e)}function U(e){e.tag===22?(F(oo,oo.current),F(to,e),no===null&&(no=e)):io(e)}function io(){F(oo,oo.current),F(to,to.current)}function ao(e){P(to),no===e&&(no=null),P(oo)}var oo=se(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){M.H=Is;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&Zi(e)&&(tc=!0))}function So(e,t,n,r){W=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=G=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ta(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return $i(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ua&&(d=!0);else if((co&p)===p){u=u.next,p===ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,Gl|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(tc=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=W,a=Oo(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((G||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Ho(e){var t=ni(e,2);t!==null&&hu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(V){var n=Rl.formState;if(n!==null){a:{var r=W;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===ba?Sa:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(q&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),W.lanes|=e,Gl|=e,n)}function ys(e,t,n,r){return Sr(n,t)?n:Xa.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(tc=!0,e.memoizedState=n):(e=mu(),W.lanes|=e,Gl|=e,t):(e=vs(e,n,r),Sr(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Ms(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,ma(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,ie,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return $i(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Va(n);var r=Ha(t,e,n);r!==null&&(hu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=ti(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ei(e,t,i,0),Rl===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Is={readContext:$i,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:$i,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Do();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Rl.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:$i,use:jo,useCallback:gs,useContext:$i,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:$i,use:jo,useCallback:gs,useContext:$i,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return G===null?vs(n,e,t):ys(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(hu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(hu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(hu(t,e,n),Ua(t,e,n))}};function Hs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function Us(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Yr(e)}function Ks(e){console.error(e)}function qs(e){Yr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=Va(e),e.tag=3,e}function Qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(V)return t=to.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=Xs(e.stateNode,r,a),Wa(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Wa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Qi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(V&&s&&Oi(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),U(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),io(t)):(va(t,a.cachePool),Qa(t,a),io(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),U(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Ia(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(ro(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(tc||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=Rl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),hu(r,e,s),ec;Du(),t=uc(e,t,n)}else e=o.treeContext,Mi=cf(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=lc(t,r),t.flags|=4096;return t}return e=li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Qi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(V&&r&&Oi(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(V&&r&&Oi(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Vs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=$i(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Us(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Ra||Hs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ba(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=$i(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Us(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Ra||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Bi(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:ya()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(a?H(t):io(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(H(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(H(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(H(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=Rl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),hu(s,e,r),ec;af(c)||Du(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=cf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(H(t),n=e.child,e=n.sibling,n=li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=si(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Ia(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,F(oo,o),nc(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Zi(e))):!0}function kc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(H(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(H(t),t.flags|=128,null);H(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(oo,oo.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}else tc=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=rc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Ka(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=gc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Hi(a),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=cf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Bd(le.current).createElement(n),r[st]=t,r[ct]=e,Pd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&V&&(r=t.stateNode=ff(t.type,t.pendingProps,le.current),ji=t,Pi=!0,a=Mi,Zd(t.type)?(lf=a,Mi=cf(r.firstChild)):Mi=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=tf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=cf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=nf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return bc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Rl,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Da=Ca,xa}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,Yl|=t)}function Fc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function K(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return K(t),null;case 1:return K(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),K(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(K(t),Mc(t,a,null,r,n)):(K(t),Nc(t,o))):o?o===e.memoizedState?(K(t),t.flags&=-16777217):(jc(t),K(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),K(t),Mc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return K(t),null}e=I.current,zi(t)?Li(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return K(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return K(t),null}if(o=I.current,zi(t))Li(t,o);else{var s=Bd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return K(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ii(t,!0)}else e=Bd(e).createTextNode(r),e[st]=t,t.stateNode=e}return K(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;K(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return K(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;K(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),K(t),null);case 4:return fe(),e===null&&Sd(t.stateNode.containerInfo),K(t),null;case 10:return qi(t.type),K(t),null;case 19:if(P(oo),r=t.memoizedState,r===null)return K(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return F(oo,oo.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>tu&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return K(t),null}else 2*Ee()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(K(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=oo.current,F(oo,a?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return ao(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(K(t),t.subtreeFlags&6&&(t.flags|=8192)):K(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&P(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),K(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Lc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(oo),null;case 4:return fe(),null;case 10:return qi(t.type),null;case 22:case 23:return ao(t),eo(),e!==null&&P(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Rc(e,t){switch(ki(t),t.tag){case 3:qi(aa),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:P(oo);break;case 10:qi(t.type);break;case 22:case 23:ao(t),eo(),e!==null&&P(ga);break;case 24:qi(aa)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){Z(e,e.return,t)}}}function Hc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ct]=t}catch(t){Z(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[st]=e,t[ct]=n}catch(t){Z(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Rd=sp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,nl=e;break}nl=t.return}}function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:yl(e,n),r&4&&zc(5,n);break;case 1:if(yl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(yl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ya(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:yl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:yl(e,n);break;case 31:yl(e,n),r&4&&ul(e,n);break;case 13:yl(e,n),r&4&&dl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?xl(e,n,(n.subtreeFlags&8772)!=0):yl(e,n),Qc=i,$c=a}break;case 30:break;default:yl(e,n)}}function al(e){var t=e.alternate;t!==null&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ol=null,sl=!1;function cl(e,t,n){for(n=n.child;n!==null;)ll(e,t,n),n=n.sibling}function ll(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=ol,i=sl;Zd(n.type)&&(ol=n.stateNode,sl=!1),cl(e,t,n),pf(n.stateNode),ol=r,sl=i;break;case 5:$c||Wc(n,t);case 6:if(r=ol,i=sl,ol=null,cl(e,t,n),ol=r,sl=i,ol!==null)if(sl)try{(ol.nodeType===9?ol.body:ol.nodeName===`HTML`?ol.ownerDocument.body:ol).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{ol.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:ol!==null&&(sl?(e=ol,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(ol,n.stateNode));break;case 4:r=ol,i=sl,ol=n.stateNode.containerInfo,sl=!0,cl(e,t,n),ol=r,sl=i;break;case 0:case 11:case 14:case 15:Bc(2,n,t),$c||Bc(4,n,t),cl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,cl(e,t,n),$c=r;break;default:cl(e,t,n)}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function fl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(i(435,e.tag))}}function pl(e,t){var n=fl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function ml(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){ol=c.stateNode,sl=!1;break a}break;case 5:ol=c.stateNode,sl=!1;break a;case 3:case 4:ol=c.stateNode.containerInfo,sl=!0;break a}c=c.return}if(ol===null)throw Error(i(160));ll(o,s,a),ol=null,sl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gl(t,e),t=t.sibling}var hl=null;function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ml(t,e),_l(e),r&4&&(Bc(3,e,e.return),zc(3,e),Bc(5,e,e.return));break;case 1:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=hl;if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head >
8 title`))),Pd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);
vendor: 23,067 bytes, line 8
8else o===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Kc(e,a,n===null?a:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(ml(t,e),_l(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=hl,hl=gf(t.containerInfo),ml(t,e),hl=a,_l(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}el&&(el=!1,vl(e));break;case 4:r=hl,hl=gf(e.stateNode.containerInfo),ml(t,e),_l(e),hl=r;break;case 12:ml(t,e),_l(e);break;case 31:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 13:ml(t,e),_l(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||a,$c=d||l,ml(t,e),$c=d,Qc=u,_l(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Qc||$c||bl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,pl(e,n))));break;case 19:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 30:break;case 21:break;default:ml(t,e),_l(e)}}function _l(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Xc(e,Jc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),Xc(e,Jc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Yc(e,Jc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)il(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bc(4,t,t.return),bl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),bl(t);break;case 27:pf(t.stateNode);case 26:case 5:Wc(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function xl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:xl(i,a,n),zc(4,a);break;case 1:if(xl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ja(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:xl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:xl(i,a,n);break;case 31:xl(i,a,n),n&&o&4&&ul(i,a);break;case 13:xl(i,a,n),n&&o&4&&dl(i,a);break;case 22:a.memoizedState===null&&xl(i,a,n),Uc(a,a.return);break;case 30:break;default:xl(i,a,n)}t=t.sibling}}function Sl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&sa(n))}function Cl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function wl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tl(e,t,n,r),t=t.sibling}function Tl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,n,r),i&2048&&zc(9,t);break;case 1:wl(e,t,n,r);break;case 3:wl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){wl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else wl(e,t,n,r);break;case 31:wl(e,t,n,r);break;case 13:wl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?wl(e,t,n,r):(a._visibility|=2,El(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?wl(e,t,n,r):Dl(e,t),i&2048&&Sl(o,t);break;case 24:wl(e,t,n,r),i&2048&&Cl(t.alternate,t);break;default:wl(e,t,n,r)}}function El(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:El(a,o,s,c,i),zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,El(a,o,s,c,i)):u._visibility&2?El(a,o,s,c,i):Dl(a,o),i&&l&2048&&Sl(o.alternate,o);break;case 24:El(a,o,s,c,i),i&&l&2048&&Cl(o.alternate,o);break;default:El(a,o,s,c,i)}t=t.sibling}}function Dl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Dl(n,r),i&2048&&Sl(r.alternate,r);break;case 24:Dl(n,r),i&2048&&Cl(r.alternate,r);break;default:Dl(n,r)}t=t.sibling}}var Ol=8192;function kl(e,t,n){if(e.subtreeFlags&Ol)for(e=e.child;e!==null;)Al(e,t,n),e=e.sibling}function Al(e,t,n){switch(e.tag){case 26:kl(e,t,n),e.flags&Ol&&e.memoizedState!==null&&Gf(n,hl,e.memoizedState,e.memoizedProps);break;case 5:kl(e,t,n);break;case 3:case 4:var r=hl;hl=gf(e.stateNode.containerInfo),kl(e,t,n),hl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ol,Ol=16777216,kl(e,t,n),Ol=r):kl(e,t,n));break;default:kl(e,t,n)}}function jl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),e.flags&2048&&Bc(9,e,e.return);break;case 3:Ml(e);break;case 12:Ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pl(e)):Ml(e);break;default:Ml(e)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bc(8,t,t.return),Pl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(t));break;default:Pl(t)}e=e.sibling}}function Fl(e,t){for(;nl!==null;){var n=nl;switch(n.tag){case 0:case 11:case 15:Bc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nl=r;else a:for(n=e;nl!==null;){r=nl;var i=r.sibling,a=r.return;if(al(r),r===n){nl=null;break a}if(i!==null){i.return=a,nl=i;break a}nl=a}}}var Il={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,q=0,Rl=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return q&2&&Y!==0?Y&-Y:M.T===null?it():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||V){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),Jl=e}else Jl=536870912;return e=to.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Rl&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),Ze(e,n),(!(q&2)||e!==Rl)&&(e===Rl&&(!(q&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(q&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ee(),10<a)){if(yu(r,t,Jl,!Bl),Ke(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Al(t,a,d);var m=(a&62914560)===a?$l-Ee():(a&4194048)===a?eu-Ee():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function bu(){return q&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Gi=Wi=null,Eo(e),Aa=null,ja=0,e=J;for(;e!==null;)Rc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),Rl=e,J=n=li(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=qe(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,$r(),n}function Cu(e,t){W=null,M.H=Is,t===ba||t===Sa?(t=Oa(),X=3):t===xa?(t=Oa(),X=4):X=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Js(e,gi(t,e.current)))}function wu(){var e=to.current;return e===null?!0:(Y&4194048)===Y?no===null:(Y&62914560)===Y||Y&536870912?e===no:!1}function Tu(){var e=M.H;return M.H=Is,e===null?Is:e}function Eu(){var e=M.A;return M.A=Il,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&to.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Rl===null||yu(Rl,Y,Jl,!1)}function Ou(e,t,n){var r=q;q|=2;var i=Tu(),a=Eu();(Rl!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,q=r,M.H=i,M.A=a,J===null&&(Rl=null,Y=0,$r()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=q;q|=2;var r=Tu(),a=Eu();Rl!==e||Y!==t?(nu=null,tu=Ee()+500,Su(e,t)):Vl=qe(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(wa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||Rl!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:wa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Gi=Wi=null,M.H=r,M.A=a,q=n,J===null?(Rl=null,Y=0,$r(),Wl):0}function ju(){for(;J!==null&&!we();)Mu(J)}function Mu(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:Rc(n,t),t=J=ui(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Gi=Wi=null,Eo(t),Aa=null,ja=0;var i=t.return;try{if($s(e,i,t,n,Y)){Wl=1,Js(e,gi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Js(e,gi(n,e.current)),J=null;return}t.flags&32768?(V||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Ic(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(q&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Qr,Qe(e,n,o,s,c,l),e===Rl&&(J=Rl=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ae,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=q,q|=4;try{rl(e,t,n)}finally{q=s,N.p=a,M.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=q;q|=4;try{gl(t,e);var a=zd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{q=i,N.p=r,M.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=q;q|=4;try{il(e,t.alternate,t)}finally{q=i,N.p=r,M.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Te();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=rt(su),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,q&6)throw Error(i(331));var c=q;if(q|=4,Nl(o.current),Tl(o,o.current,s,n),q=c,id(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{N.p=a,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=gi(n,t),t=Xs(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Ze(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=gi(n,e),n=Zs(2),r=Ha(t,n,2),r!==null&&(Qs(n,r,t,e),Ze(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ee()-$l?!(q&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ye()),e=ni(e,t),e!==null&&(Ze(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Se(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Ke(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ee(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=cd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Ke(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){q&6?Se(Oe,ad):od()})}function dd(){if(nd===0){var e=ua;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Jr.length;hd++){var gd=Jr[hd];z(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}z(Br,`onAnimationEnd`),z(Vr,`onAnimationIteration`),z(Hr,`onAnimationStart`),z(`dblclick`,`onDoubleClick`),z(`focusin`,`onFocus`),z(`focusout`,`onBlur`),z(Ur,`onTransitionRun`),z(Wr,`onTransitionStart`),z(Gr,`onTransitionCancel`),z(Kr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focu
8sin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Yr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Yr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Br:case Vr:case Hr:l=Mn;break;case Kr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=yr;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Ed(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(Td(e,i,a)),i=ln(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;
vendor: 10,431 bytes, lines 8-9
8function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);
vendor: 4,461 bytes, line 9
9for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;
vendor: 20,905 bytes, line 9
9e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=N.d;N.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=yt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);bt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=le.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=yt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=yt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=yt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+zt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),bt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+zt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,bt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=si(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function tp(e){return e?(e=ai,e):ai}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(hu(n,e,t),Ua(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ni(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=nt(t);var n=ni(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,up(e,t,n,r)}finally{N.p=a,M.T=i}}function lp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,up(e,t,n,r)}finally{N.p=a,M.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}rd(a),!(q&6)&&(tu=Ee()+500,id(0,!1))}}break;case 31:case 13:s=ni(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[lt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.5`};
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Fe=zp.inject(Rp),Ie=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[lt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=c(g(),1),y=class e extends Error{static kind=`ClerkError`;clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]\nMessage:${this.message}`}static formatMessage(e,t,n,r){let i=`Clerk:`,a=new RegExp(i.replace(` `,`\\s*`),`i`);return t=t.replace(a,``),t=`${i} ${t.trim()}\n\n(code="${n}")\n\n`,r&&(t+=`\n\nDocs: ${r}`),t}},b=Object.freeze({InvalidProxyUrlErrorMessage:`The proxyUrl passed to Clerk is invali
9d. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})`,InvalidPublishableKeyErrorMessage:`The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})`,MissingPublishableKeyErrorMessage:`Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,MissingSecretKeyErrorMessage:`Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,MissingClerkProvider:`{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`});function x({packageName:e,customMessages:t}){let n=e;function r(e,t){if(!t)return`${n}: ${e}`;let r=e,i=e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let e of i){let n=(t[e[1]]||``).toString();r=r.replace(`{{${e[1]}}}`,n)}return`${n}: ${r}`}let i={...b,...t};return{setPackageName({packageName:e}){return typeof e==`string`&&(n=e),this},setMessages({customMessages:e}){return Object.assign(i,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(r(i.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(r(i.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(r(i.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(r(i.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(r(i.MissingClerkProvider,e))},throw(e){throw Error(r(e))}}}var S=class e extends y{static kind=`ClerkRuntimeError`;clerkRuntimeError=!0;constructor(t,n){super({...n,message:t}),Object.setPrototypeOf(this,e.prototype)}},C={strict_mfa:{afterMinutes:10,level:`multi_factor`},strict:{afterMinutes:10,level:`second_factor`},moderate:{afterMinutes:60,level:`second_factor`},lax:{afterMinutes:1440,level:`second_factor`}},w=new Set([`first_factor`,`second_factor`,`multi_factor`]),T=new Set([`strict_mfa`,`strict`,`moderate`,`lax`]),E=e=>typeof e==`number`&&e>0,D=e=>w.has(e),O=e=>T.has(e),k=e=>typeof e==`number`&&Number.isFinite(e)&&(e===-1||e>=0),ee=e=>e.replace(/^(org:)*/,`org:`),A=(e,t)=>{let{orgId:n,orgRole:r,orgPermissions:i}=t,a=e.role!==void 0,o=e.permission!==void 0;return!a&&!o?`skip`:a&&typeof e.role!=`string`||o&&typeof e.permission!=`string`||!n||a&&(typeof r!=`string`||!r||ee(r)!==ee(e.role))||o&&(!Array.isArray(i)||!i.includes(ee(e.permission)))?`fail`:`pass`},j=(e,t)=>{let{org:n,user:r}=ne(e),[i,a]=t.split(`:`),o=a||i;return i===`org`?n.includes(o):i===`user`?r.includes(o):[...n,...r].includes(o)},te=(e,t)=>{let{features:n,plans:r}=t,i=e.feature!==void 0,a=e.plan!==void 0;if(!i&&!a)return`skip`;if(i&&typeof e.feature!=`string`||a&&typeof e.plan!=`string`)return`fail`;if(i){if(typeof n!=`string`||!n)return`fail`;try{if(!j(n,e.feature))return`fail`}catch{return`fail`}}if(a){if(typeof r!=`string`||!r)return`fail`;try{if(!j(r,e.plan))return`fail`}catch{return`fail`}}return`pass`},ne=e=>{let t=e?e.split(`,`).map(e=>e.trim()):[];return{org:t.filter(e=>e.split(`:`)[0].includes(`o`)).map(e=>e.split(`:`)[1]),user:t.filter(e=>e.split(`:`)[0].includes(`u`)).map(e=>e.split(`:`)[1])}},re=e=>{if(!e)return!1;let t=e=>typeof e==`string`?C[e]:e,n=typeof e==`string`&&O(e),r=typeof e==`object`&&D(e.level)&&E(e.afterMinutes);return n||r?t.bind(null,e):!1},M=(e,{factorVerificationAge:t})=>{if(e.reverification===void 0)return`skip`;if(!t||!Array.isArray(t)||t.length!==2||!k(t[0])||!k(t[1]))return`fail`;let n=re(e.reverification);if(!n)return`fail`;let{level:r,afterMinutes:i}=n(),[a,o]=t;if(a===-1&&o===-1)return`fail`;let s=a!==-1&&i>a,c=o!==-1&&i>o;switch(r){case`first_factor`:return s?`pass`:`fail`;case`second_factor`:return o===-1?s?`pass`:`fail`:c?`pass`:`fail`;case`multi_factor`:return o===-1?s?`pass`:`fail`:a===-1?`fail`:s&&c?`pass`:`fail`}},N=e=>e.some(e=>e===`pass`)&&e.every(e=>e===`pass`||e===`skip`),ie=e=>t=>e.userId?N([A(t,e),te(t,e),M(t,e)]):!1,ae=({authObject:{sessionId:e,sessionStatus:t,userId:n,actor:r,orgId:i,orgRole:a,orgSlug:o,signOut:s,getToken:c,has:l,sessionClaims:u},options:{treatPendingAsSignedOut:d=!0}})=>{if(e===void 0&&n===void 0)return{isLoaded:!1,isSignedIn:void 0,sessionId:e,sessionClaims:void 0,userId:n,actor:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,has:void 0,signOut:s,getToken:c};if(e===null&&n===null)return{isLoaded:!0,isSignedIn:!1,sessionId:e,userId:n,sessionClaims:null,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:s,getToken:c};if(d&&t===`pending`)return{isLoaded:!0,isSignedIn:!1,sessionId:null,userId:null,sessionClaims:null,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:s,getToken:c};if(e&&u&&n&&i&&a)return{isLoaded:!0,isSignedIn:!0,sessionId:e,sessionClaims:u,userId:n,actor:r||null,orgId:i,orgRole:a,orgSlug:o||null,has:l,signOut:s,getToken:c};if(e&&u&&n&&!i)return{isLoaded:!0,isSignedIn:!0,sessionId:e,sessionClaims:u,userId:n,actor:r||null,orgId:null,orgRole:null,orgSlug:null,has:l,signOut:s,getToken:c}}
9,oe=[`.lcl.dev`,`.stg.dev`,`.lclstage.dev`,`.stgstage.dev`,`.dev.lclclerk.com`,`.stg.lclclerk.com`,`.accounts.lclclerk.com`,`accountsstage.dev`,`accounts.dev`],se=e=>typeof atob<`u`&&typeof atob==`function`?atob(e):typeof global<`u`&&global.Buffer?new global.Buffer(e,`base64`).toString():e,P=`pk_live_`,F=`pk_test_`;function I(e){if(!e.endsWith(`$`))return!1;let t=e.slice(0,-1);return t.includes(`$`)?!1:t.includes(`.`)}function ce(e,t={}){if(e||=``,!e||!le(e)){if(t.fatal&&!e)throw Error(`Publishable key is missing. Ensure that your publishable key is correctly configured. Double-check your environment configuration for your keys, or access them here: https://dashboard.clerk.com/last-active?path=api-keys`);if(t.fatal&&!le(e))throw Error(`Publishable key not valid.`);return null}let n=e.startsWith(P)?`production`:`development`,r;try{r=se(e.split(`_`)[2])}catch{if(t.fatal)throw Error(`Publishable key not valid: Failed to decode key.`);return null}if(!I(r)){if(t.fatal)throw Error(`Publishable key not valid: Decoded key has invalid format.`);return null}let i=r.slice(0,-1);return t.proxyUrl?i=t.proxyUrl:n!==`development`&&t.domain&&t.isSatellite&&(i=`clerk.${t.domain}`),{instanceType:n,frontendApi:i}}function le(e=``){try{if(!(e.startsWith(P)||e.startsWith(F)))return!1;let t=e.split(`_`);if(t.length!==3)return!1;let n=t[2];return n?I(se(n)):!1}catch{return!1}}function ue(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let n=typeof t==`string`?t:t.hostname,r=e.get(n);return r===void 0&&(r=oe.some(e=>n.endsWith(e)),e.set(n,r)),r}}}var de=`METHOD_CALLED`,fe=.1;function pe(e,t){return{event:de,eventSamplingRate:fe,payload:{method:e,...t}}}var me=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),he=o(((e,t)=>{t.exports=me()}))(),ge=Object.prototype.hasOwnProperty;function _e(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&_e(e[r],t[r]););return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(ge.call(e,n)&&++r&&!ge.call(t,n)||!(n in t)||!_e(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var ve=new WeakMap,ye=()=>{},be=void 0,xe=Object,L=e=>e===be,Se=e=>typeof e==`function`,Ce=(e,t)=>({...e,...t}),we=e=>Se(e.then),Te={},Ee={},De=`undefined`,Oe=typeof window!=De,ke=typeof document!=De,Ae=Oe&&`Deno`in window,je=()=>Oe&&typeof window.requestAnimationFrame!=De,Me=(e,t)=>{let n=ve.get(e);return[()=>!L(t)&&e.get(t)||Te,r=>{if(!L(t)){let i=e.get(t);t in Ee||(Ee[t]=i),n[5](t,Ce(i,r),i||Te)}},n[6],()=>!L(t)&&t in Ee?Ee[t]:!L(t)&&e.get(t)||Te]},Ne=!0,Pe=()=>Ne,[Fe,Ie]=Oe&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ye,ye],Le=()=>{let e=ke&&document.visibilityState;return L(e)||e!==`hidden`},Re=e=>(ke&&document.addEventListener(`visibilitychange`,e),Fe(`focus`,e),()=>{ke&&document.removeEventListener(`visibilitychange`,e),Ie(`focus`,e)}),ze=e=>{let t=()=>{Ne=!0,e()},n=()=>{Ne=!1};return Fe(`online`,t),Fe(`offline`,n),()=>{Ie(`online`,t),Ie(`offline`,n)}},Be={isOnline:Pe,isVisible:Le},Ve={initFocus:Re,initReconnect:ze},He=!_.useId,Ue=!Oe||Ae,We=e=>je()?window.requestAnimationFrame(e):setTimeout(e,1),Ge=Ue?_.useEffect:_.useLayoutEffect,Ke=typeof navigator<`u`&&navigator.connection,qe=!Ue&&Ke&&([`slow-2g`,`2g`].includes(Ke.effectiveType)||Ke.saveData),Je=new WeakMap,Ye=e=>xe.prototype.toString.call(e),Xe=(e,t)=>e===`[object ${t}]`,Ze=0,Qe=e=>{let t=typeof e,n=Ye(e),r=Xe(n,`Date`),i=Xe(n,`RegExp`),a=Xe(n,`Object`),o,s;if(xe(e)===e&&!r&&!i){if(o=Je.get(e),o)return o;if(o=++Ze+`~`,Je.set(e,o),Array.isArray(e)){for(o=`@`,s=0;s<e.length;s++)o+=Qe(e[s])+`,`;Je.set(e,o)}if(a){o=`#`;let t=xe.keys(e).sort();for(;!L(s=t.pop());
9)L(e[s])||(o+=s+`:`+Qe(e[s])+`,`);Je.set(e,o)}}else o=r?e.toJSON():t==`symbol`?e.toString():t==`string`?JSON.stringify(e):``+e;return o},$e=e=>{if(Se(e))try{e=e()}catch{e=``}let t=e;return e=typeof e==`string`?e:(Array.isArray(e)?e.length:e)?Qe(e):``,[e,t]},et=0,tt=()=>++et;async function nt(...e){let[t,n,r,i]=e,a=Ce({populateCache:!0,throwOnError:!0},typeof i==`boolean`?{revalidate:i}:i||{}),o=a.populateCache,s=a.rollbackOnError,c=a.optimisticData,l=e=>typeof s==`function`?s(e):s!==!1,u=a.throwOnError;if(Se(n)){let e=n,r=[],i=t.keys();for(let n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){let[i]=$e(n);if(!i)return;let[s,d]=Me(t,i),[f,p,m,h]=ve.get(t),g=()=>{let e=f[i];return(Se(a.revalidate)?a.revalidate(s().data,n):a.revalidate!==!1)&&(delete m[i],delete h[i],e&&e[0])?e[0](2).then(()=>s().data):s().data};if(e.length<3)return g();let _=r,v,y=!1,b=tt();p[i]=[b,0];let x=!L(c),S=s(),C=S.data,w=S._c,T=L(w)?C:w;if(x&&(c=Se(c)?c(T,C):c,d({data:c,_c:T})),Se(_))try{_=_(T)}catch(e){v=e,y=!0}if(_&&we(_))if(_=await _.catch(e=>{v=e,y=!0}
9),b!==p[i][0]){if(y)throw v;return _}else y&&x&&l(v)&&(o=!0,d({data:T,_c:be}));if(o&&(y||(Se(o)?d({data:o(_,T),error:be,_c:be}):d({data:_,error:be,_c:be}))),p[i][1]=tt(),Promise.resolve(g()).then(()=>{d({_c:be})}),y){if(u)throw v;return}return _}}var rt=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},it=(e,t)=>{if(!ve.has(e)){let n=Ce(Ve,t),r=Object.create(null),i=nt.bind(be,e),a=ye,o=Object.create(null),s=(e,t)=>{let n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},c=(t,n,r)=>{e.set(t,n);let i=o[t];if(i)for(let e of i)e(n,r)},l=()=>{if(!ve.has(e)&&(ve.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,c,s]),!Ue)){let t=n.initFocus(setTimeout.bind(be,rt.bind(be,r,0))),i=n.initReconnect(setTimeout.bind(be,rt.bind(be,r,1)));a=()=>{t&&t(),i&&i(),ve.delete(e)}}};return l(),[e,i,l,a]}return[e,ve.get(e)[4]]},at=(e,t,n,r,i)=>{let a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!L(a)&&o>a||setTimeout(r,s,i)},ot=_e,[st,ct]=it(new Map),lt=Ce({onLoadingSlow:ye,onSuccess:ye,onError:ye,onErrorRetry:at,onDiscarded:ye,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:qe?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:qe?5e3:3e3,compare:ot,isPaused:()=>!1,cache:st,mutate:ct,fallback:{}},Be),ut=(e,t)=>{let n=Ce(e,t);if(t){let{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=Ce(i,o))}return n},dt=(0,_.createContext)({}),ft=e=>{let{value:t}=e,n=(0,_.useContext)(dt),r=Se(t),i=(0,_.useMemo)(()=>r?t(n):t,[r,n,t]),a=(0,_.useMemo)(()=>r?i:ut(n,i),[r,n,i]),o=i&&i.provider,s=(0,_.useRef)(be);o&&!s.current&&(s.current=it(o(a.cache||st),i));let c=s.current;return c&&(a.cache=c[0],a.mutate=c[1]),Ge(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,_.createElement)(dt.Provider,Ce(e,{value:a}))},pt=`$inf$`,mt=Oe&&window.__SWR_DEVTOOLS_USE__,ht=mt?window.__SWR_DEVTOOLS_USE__:[],gt=()=>{mt&&(window.__SWR_DEVTOOLS_REACT__=_.default)},_t=e=>Se(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],vt=()=>Ce(lt,(0,_.useContext)(dt)),yt=ht.concat(e=>(t,n,r)=>e(t,n&&((...e)=>{let[r]=$e(t),[,,,i]=ve.get(st);if(r.startsWith(`$inf$`))return n(...e);let a=i[r];return L(a)?n(...e):(delete i[r],a)}),r)),bt=e=>function(...t){let n=vt(),[r,i,a]=_t(t),o=ut(n,a),s=e,{use:c}=o,l=(c||[]).concat(yt);for(let e=l.length;e--;)s=l[e](s);return s(r,i||o.fetcher||null,o)},xt=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},St=(e,t)=>(...n)=>{let[r,i,a]=_t(n),o=(a.use||[]).concat(t);return e(r,i,{...a,use:o})};gt();var Ct=_.use||(e=>{switch(e.status){case`pending`:throw e;case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:throw e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}),e}}),wt={dedupe:!0},Tt=(e,t,n)=>{let{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:c,refreshInterval:l,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:f}=n,[p,m,h,g]=ve.get(r),[v,y]=$e(e),b=(0,_.useRef)(!1),x=(0,_.useRef)(!1),S=(0,_.useRef)(v),C=(0,_.useRef)(t),w=(0,_.useRef)(n),T=()=>w.current,E=()=>T().isVisible()&&T().isOnline(),[D,O,k,ee]=Me(r,v),A=(0,_.useRef)({}).current,j=L(o)?L(n.fallback)?be:n.fallback[v]:o,te=(e,t)=>{for(let n in A){let r=n;if(r===`data`){if(!i(e[r],t[r])&&(!L(e[r])||!i(P,t[r])))return!1}else if(t[r]!==e[r])return!1}return!0},ne=(0,_.useMemo)(()=>{let e=!v||!t?!1:L(s)?T().isPaused()||a?!1:c!==!1:s,n=t=>{let n=Ce(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=D(),i=ee(),o=n(r),l=r===i?o:n(i),u=o;return[()=>{let e=n(D());return te(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>l]},[r,v]),re=(0,he.useSyncExternalStore)((0,_.useCallback)(e=>k(v,(t,n)=>{te(n,t)||e()}),[r,v]),ne[0],ne[1]),M=!b.current,N=p[v]&&p[v].length>0,ie=re.data,ae=L(ie)?j&&we(j)?Ct(j):j:ie,oe=re.error,se=(0,_.useRef)(ae),P=f?L(ie)?L(se.current)?ae:se.current:ie:ae,F=N&&!L(oe)?!1:M&&!L(s)?s:T().isPaused()?!1:a?L(ae)?!1:c:L(ae)||c,I=!!(v&&t&&M&&F),ce=L(re.isValidating)?I:re.isValidating,le=L(re.isLoading)?I:re.isLoading,ue=(0,_.useCallback)(async e=>{let t=C.current;if(!v||!t||x.current||T().isPaused())return!1;let r,a,o=!0,s=e||{},c=!h[v]||!s.dedupe,l=()=>He?!x.current&&v===S.current&&b.current:v===S.current,u={isValidating:!1,isLoading:!1},d=()=>{O(u)},f=()=>{let e=h[v];e&&e[1]===a&&delete h[v]},g={isValidating:!0};L(D().data)&&(g.isLoading=!0);try{if(c&&(O(g),n.loadingTimeout&&L(D().data)&&setTimeout(()=>{o&&l()&&T().onLoadingSlow(v,n)},n.loadingTimeout),h[v]=[t(y),tt()]),[r,a]=h[v],r=await r,c&&setTimeout(f,n.dedupingInterval),!h[v]||h[v][1]!==a)return c&&l()&&T().onDiscarded(v),!1;u.error=be;let e=m[v];if(!L(e)&&(a<=e[0]||a<=e[1]||e[1]===0))return d(),c&&l()&&T().onDiscarded(v),!1;let s=D().data;u.data=i(s,r)?s:r,c&&l()&&T().onSuccess(r,v,n)}catch(e){f();let t=T(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,c&&l()&&(t.onError(e,v,t),(n===!0||Se(n)&&n(e))&&(!T().revalidateOnFocus||!T().revalidateOnReconnect||E())&&t.onErrorRetry(e,v,t,e=>{let t=p[v];t&&t[0]&&t[0](3,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[v,r]),de=(0,_.useCallback)((...e)=>nt(r,S.current,...e),[]);if(Ge(()=>{C.current=t,w.current=n,L(ie)||(se.current=ie)}),Ge(()=>{if(!v)return;let e=ue.bind(be,wt),t=0;T().revalidateOnFocus&&(t=Date.now()+T().focusThrottleInterval);let n=xt(v,p,(n,r={})=>
9{if(n==0){let n=Date.now();T().revalidateOnFocus&&n>t&&E()&&(t=n+T().focusThrottleInterval,e())}else if(n==1)T().revalidateOnReconnect&&E()&&e();else if(n==2)return ue();else if(n==3)return ue(r)});return x.current=!1,S.current=v,b.current=!0,O({_k:y}),F&&(h[v]||(L(ae)||Ue?e():We(e))),()=>{x.current=!0,n()}},[v]),Ge(()=>{let e;function t(){let t=Se(l)?l(D().data):l;t&&e!==-1&&(e=setTimeout(n,t))}function n(){!D().error&&(u||T().isVisible())&&(d||T().isOnline())?ue(wt).then(t):t()}return t(),()=>{e&&=(clearTimeout(e),-1)}},[l,u,d,v]),(0,_.useDebugValue)(P),a&&L(ae)&&v){if(!He&&Ue)throw Error(`Fallback data is required when using Suspense in SSR.`);C.current=t,w.current=n,x.current=!1;let e=g[v];if(L(e)||Ct(de(e)),L(oe)){let e=ue(wt);L(P)||(e.status=`fulfilled`,e.value=!0),Ct(e)}else throw oe}return{mutate:de,get data(){return A.data=!0,P},get error(){return A.error=!0,oe},get isValidating(){return A.isValidating=!0,ce},get isLoading(){return A.isLoading=!0,le}}},Et=xe.defineProperty(ft,`defaultValue`,{value:lt}),Dt=bt(Tt),Ot=void 0,kt=Object,At=e=>e===Ot,jt=e=>typeof e==`function`,Mt=new WeakMap,Nt=e=>kt.prototype.toString.call(e),Pt=(e,t)=>e===`[object ${t}]`,Ft=0,It=e=>{let t=typeof e,n=Nt(e),r=Pt(n,`Date`),i=Pt(n,`RegExp`),a=Pt(n,`Object`),o,s;if(kt(e)===e&&!r&&!i){if(o=Mt.get(e),o)return o;if(o=++Ft+`~`,Mt.set(e,o),Array.isArray(e)){for(o=`@`,s=0;s<e.length;s++)o+=It(e[s])+`,`;Mt.set(e,o)}if(a){o=`#`;let t=kt.keys(e).sort();for(;!At(s=t.pop());
9)At(e[s])||(o+=s+`:`+It(e[s])+`,`);Mt.set(e,o)}}else o=r?e.toJSON():t==`symbol`?e.toString():t==`string`?JSON.stringify(e):``+e;return o},Lt=e=>{if(jt(e))try{e=e()}catch{e=``}let t=e;return e=typeof e==`string`?e:(Array.isArray(e)?e.length:e)?It(e):``,[e,t]},Rt=e=>Lt(e?e(0,null):null)[0],zt=Promise.resolve(),Bt=St(Dt,e=>(t,n,r)=>{let i=(0,_.useRef)(!1),{cache:a,initialSize:o=1,revalidateAll:s=!1,persistSize:c=!1,revalidateFirstPage:l=!0,revalidateOnMount:u=!1,parallel:d=!1}=r,[,,,f]=ve.get(st),p;try{p=Rt(t),p&&=pt+p}catch{}let[m,h,g]=Me(a,p),v=(0,_.useCallback)(()=>L(m()._l)?o:m()._l,[a,p,o]);(0,he.useSyncExternalStore)((0,_.useCallback)(e=>p?g(p,()=>{e()}):()=>{},[a,p]),v,v);let y=(0,_.useCallback)(()=>{let e=m()._l;return L(e)?o:e},[p,o]),b=(0,_.useRef)(y());Ge(()=>{if(!i.current){i.current=!0;return}p&&h({_l:c?b.current:y()})},[p,a]);let x=u&&!i.current,S=e(p,async e=>{let i=m()._i,o=m()._r;h({_r:be});let c=[],u=y(),[p]=Me(a,e),g=p().data,_=[],v=null;for(let e=0;e<u;++e){let[u,p]=$e(t(e,d?null:v));if(!u)break;let[m,h]=Me(a,u),y=m().data,b=s||i||L(y)||l&&!e&&!L(g)||x||g&&!L(g[e])&&!r.compare(g[e],y);if(n&&(typeof o==`function`?o(y,p):b)){let t=async()=>{if(!(u in f))y=await n(p);else{let e=f[u];delete f[u],y=await e}h({data:y,_k:p}),c[e]=y};d?_.push(t):await t()}else c[e]=y;d||(v=y)}return d&&await Promise.all(_.map(e=>e())),h({_i:be}),c},r),C=(0,_.useCallback)(function(e,t){let n=typeof t==`boolean`?{revalidate:t}:t||{},r=n.revalidate!==!1;return p?(r&&(L(e)?h({_i:!0,_r:n.revalidate}):h({_i:!1,_r:n.revalidate})),arguments.length?S.mutate(e,{...n,revalidate:r}):S.mutate()):zt},[p,a]),w=(0,_.useCallback)(e=>{if(!p)return zt;let[,n]=Me(a,p),r;if(Se(e)?r=e(y()):typeof e==`number`&&(r=e),typeof r!=`number`)return zt;n({_l:r}),b.current=r;let i=[],[o]=Me(a,p),s=null;for(let e=0;e<r;++e){let[n]=$e(t(e,s)),[r]=Me(a,n),c=n?r().data:be;if(L(c))return C(o().data);i.push(c),s=c}return C(i)},[p,a,C,y]);return{size:y(),setSize:w,mutate:C,get data(){return S.data},get error(){return S.error},get isValidating(){return S.isValidating},get isLoading(){return S.isLoading}}}),Vt=Object.prototype.hasOwnProperty;function Ht(e,t,n){for(n of e.keys())if(Ut(n,t))return n}function Ut(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ut(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i==`object`&&(i=Ht(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i==`object`&&(i=Ht(t,i),!i)||!Ut(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(Vt.call(e,n)&&++r&&!Vt.call(t,n)||!(n in t)||!Ut(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Wt(e,t){if(!e)throw Error(typeof t==`string`?t:`${t.displayName} not found`)}var Gt=(e,t)=>{let{assertCtxFn:n=Wt}=t||{},r=_.createContext(void 0);return r.displayName=e,[r,()=>{let t=_.useContext(r);return n(t,`${e} not found`),t.value},()=>{let e=_.useContext(r);return e?e.value:{}}]};function Kt({swrConfig:e,children:t}){return _.createElement(Et,{value:e},t)}var[qt,Jt]=Gt(`ClerkInstanceContext`),[Yt,Xt]=Gt(`UserContext`),[Zt,Qt]=Gt(`ClientContext`),[$t,en]=Gt(`SessionContext`);_.createContext({});var[tn,nn]=Gt(`CheckoutContext`),rn=({children:e,...t})=>_.createElement(tn.Provider,{value:{value:t}},e),[an,on]=Gt(`OrganizationContext`),sn=({children:e,organization:t,swrConfig:n})=>_.createElement(Kt,{swrConfig:n},_.createElement(an.Provider,{value:{value:{organization:t}}},e));function cn(e){if(!_.useContext(qt)){if(typeof e==`function`){e();return}throw Error(`${e} can only be used within the <ClerkProvider /> component.
10
11Possible fixes:
121. Ensure that the <ClerkProvider /> is correctly wrapping your application where this component is used.
132. Check for multiple versions of the \`@clerk/shared\` package in y
13our project. Use a tool like \`npm ls @clerk/shared\` to identify multiple versions, and update your dependencies to only rely on one.
14
15Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}var ln={USER_MEMBERSHIPS_KEY:`userMemberships`,USER_INVITATIONS_KEY:`userInvitations`,USER_SUGGESTIONS_KEY:`userSuggestions`,DOMAINS_KEY:`domains`,MEMBERSHIP_REQUESTS_KEY:`membershipRequests`,MEMBERSHIPS_KEY:`memberships`,INVITATIONS_KEY:`invitations`,PLANS_KEY:`billing-plans`,SUBSCRIPTION_KEY:`billing-subscription`,PAYMENT_METHODS_KEY:`billing-payment-methods`,PAYMENT_ATTEMPTS_KEY:`billing-payment-attempts`,STATEMENTS_KEY:`billing-statements`,API_KEYS_KEY:`apiKeys`,ORGANIZATION_CREATION_DEFAULTS_KEY:`organizationCreationDefaults`};function un(e){return{queryKey:[e.stablePrefix,e.authenticated,e.tracked,e.untracked],invalidationKey:[e.stablePrefix,e.authenticated,e.tracked],stableKey:e.stablePrefix,authenticated:e.authenticated}}function dn(e){let{queryKey:t}=e;return{type:t[0],...t[2],...t[3].args}}var fn=(e,t)=>{let n=typeof e==`boolean`&&e,r=(0,_.useRef)(n?t.initialPage:e?.initialPage??t.initialPage),i=(0,_.useRef)(n?t.pageSize:e?.pageSize??t.pageSize),a={};for(let r of Object.keys(t))a[r]=n?t[r]:e?.[r]??t[r];return{...a,initialPage:r.current,pageSize:i.current}};function pn(e,t){let n=new Set(Object.keys(t)),r={};for(let t of Object.keys(e))n.has(t)||(r[t]=e[t]);return r}function mn(e){let t=(0,_.useRef)(e),n=(0,_.useRef)(null);return t.current!==e&&(n.current=t.current,t.current=e),n.current}var hn={dedupingInterval:1e3*60,focusThrottleInterval:1e3*60*2},gn={...hn,revalidateFirstPage:!1},_n=e=>{let{fetcher:t,config:n,keys:r}=e,[i,a]=(0,_.useState)(n.initialPage??1),o=(0,_.useRef)(n.initialPage??1),s=(0,_.useRef)(n.pageSize??10),c=n.enabled??!0,l=n.__experimental_mode===`cache`,u=n.infinite??!1,d=n.keepPreviousData??!1,f=n.isSignedIn,p={...dn(r),initialPage:i,pageSize:s.current},m=mn(f),h=!u&&c&&(l?!0:!!t),{data:g,isValidating:v,isLoading:y,error:b,mutate:x}=Dt(typeof f==`boolean`?m===!0&&f===!1||f&&h?p:null:h?p:null,!l&&t?e=>f===!1||h===!1?null:t(pn(e,{type:r.queryKey[0],...r.queryKey[2]})):null,{keepPreviousData:d,...hn}),{data:S,isLoading:C,isValidating:w,error:T,size:E,setSize:D,mutate:O}=Bt(e=>!u||!c||f===!1?null:{...dn(r),initialPage:o.current+e,pageSize:s.current},e=>{let n=pn(e,{type:r.queryKey[0],...r.queryKey[2]});return t?.(n)},gn),k=(0,_.useMemo)(()=>u?E:i,[u,E,i]),ee=(0,_.useCallback)(e=>{if(u){D(e);return}return a(e)},[D,u]),A=(0,_.useMemo)(()=>u?S?.map(e=>e?.data).flat()??[]:g?.data??[],[u,g,S]),j=(0,_.useMemo)(()=>u?S?.[S?.length-1]?.total_count||0:g?.total_count??0,[u,g,S]),te=u?C:y,ne=u?w:v,re=(u?T:b)??null,M=!!re,N=(0,_.useCallback)(()=>{ee(e=>Math.max(0,e+1))},[ee]),ie=(0,_.useCallback)(()=>{ee(e=>Math.max(0,e-1))},[ee]),ae=(o.current-1)*s.current;return{data:A,count:j,error:re,isLoading:te,isFetching:ne,isError:M,page:k,pageCount:Math.ceil((j-ae)/s.current),fetchPage:ee,fetchNext:N,fetchPrevious:ie,hasNextPage:j-ae*s.current>k*s.current,hasPreviousPage:(k-1)*s.current>ae*s.current,revalidate:u?()=>O():()=>x(),setData:u?e=>O(e,{revalidate:!1}):e=>x(e,{revalidate:!1})}},vn=()=>(cn(`useClerk`),Jt());typeof window<`u`?_.useLayoutEffect:_.useEffect;var yn=`useUser`;function bn(){cn(yn);let e=Xt();return Jt().telemetry?.record(pe(yn)),e===void 0?{isLoaded:!1,isSignedIn:void 0,user:void 0}:e===null?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}var xn=Ut;function Sn(e){let t=Jt(),n=e?.enabled??!0,r=t.__unstable__environment,i=Xt(),{organization:a}=on(),o=e?.for===`organization`,s=o?r?.commerceSettings.billing.organization.enabled:r?.commerceSettings.billing.user.enabled,c=e?.authenticated??!0?(o?!!a?.id:!0)&&!!i?.id:!0;return s&&n&&t.loaded&&c}function Cn({hookName:e,resourceType:t,useFetcher:n,options:r}){return function(i){let{for:a,enabled:o,...s}=i||{},c=a||`user`;cn(e);let l=n(c),u=fn(s,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,__experimental_mode:void 0}),d=Jt(),f=Xt(),{organization:p}=on();d.telemetry?.record(pe(e));let m=c===`organization`,h=Sn({for:c,enabled:o,authenticated:!r?.unauthenticated}),g=s===void 0?void 0:{initialPage:u.initialPage,pageSize:u.pageSize,...r?.unauthenticated?{}:m?{orgId:p?.id}:{}},_=!!g&&d.loaded&&!!h;return _n({fetcher:l,config:{keepPreviousData:u.keepPreviousData,infinite:u.infinite,enabled:_,...r?.unauthenticated?{}:{isSignedIn:f!==null},__experimental_mode:u.__experimental_mode,initialPage:u.initialPage,pageSize:u.pageSize},keys:un({stablePrefix:t,authenticated:!r?.unauthenticated,tracked:r?.unauthenticated?{for:c}:{userId:f?.id,...m?{_orgId:p?.id}:{}},untracked:{args:g}})})}}
15Cn({hookName:`useStatements`,resourceType:ln.STATEMENTS_KEY,useFetcher:()=>{let e=Jt();if(e.loaded)return e.billing.getStatements}}),Cn({hookName:`usePaymentAttempts`,resourceType:ln.PAYMENT_ATTEMPTS_KEY,useFetcher:()=>{let e=Jt();if(e.loaded)return e.billing.getPaymentAttempts}}),Cn({hookName:`usePaymentMethods`,resourceType:ln.PAYMENT_METHODS_KEY,useFetcher:e=>{let{organization:t}=on(),n=Xt();return e===`organization`?t?.getPaymentMethods:n?.getPaymentMethods}}),Cn({hookName:`usePlans`,resourceType:ln.PLANS_KEY,useFetcher:e=>{let t=Jt();if(t.loaded)return n=>t.billing.getPlans({...n,for:e})},options:{unauthenticated:!0}});var wn=e=>{let t=(0,_.useRef)(e);return(0,_.useEffect)(()=>{t.current=e},[e]),t.current},Tn=(e,t,n)=>{let r=!!n,i=(0,_.useRef)(n);(0,_.useEffect)(()=>{i.current=n},[n]),(0,_.useEffect)(()=>{if(!r||!e)return()=>{};let n=(...e)=>{i.current&&i.current(...e)};return e.on(t,n),()=>{e.off(t,n)}},[r,t,e,i])},En=_.createContext(null);En.displayName=`ElementsContext`;var Dn=(e,t)=>{if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e},On=e=>typeof e==`object`&&!!e,kn=(e,t,n)=>On(e)?Object.keys(e).reduce((r,i)=>{let a=!On(t)||!jn(e[i],t[i]);return n.includes(i)?(a&&console.warn(`Unsupported prop change: options.${i} is not a mutable property.`),r):a?{...r||{},[i]:e[i]}:r},null):null,An=`[object Object]`,jn=(e,t)=>{if(!On(e)||!On(t))return e===t;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;let r=Object.prototype.toString.call(e)===An;if(r!==(Object.prototype.toString.call(t)===An))return!1;if(!r&&!n)return e===t;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;let o={};for(let e=0;e<i.length;e+=1)o[i[e]]=!0;for(let e=0;e<a.length;e+=1)o[a[e]]=!0;let s=Object.keys(o);if(s.length!==i.length)return!1;let c=e,l=t;return s.every(e=>jn(c[e],l[e]))},Mn=e=>Dn(_.useContext(En),e),Nn=e=>e.charAt(0).toUpperCase()+e.slice(1);((e,t)=>{let n=`${Nn(e)}Element`,r=t?e=>{Mn(`mounts <${n}>`);let{id:t,className:r}=e;return _.createElement(`div`,{id:t,className:r})}:({id:t,className:r,fallback:i,options:a={},onBlur:o,onFocus:s,onReady:c,onChange:l,onEscape:u,onClick:d,onLoadError:f,onLoaderStart:p,onNetworksChange:m,onConfirm:h,onCancel:g,onShippingAddressChange:v,onShippingRateChange:y})=>{let b=Mn(`mounts <${n}>`),x=`elements`in b?b.elements:null,[S,C]=_.useState(null),w=_.useRef(null),T=_.useRef(null),[E,D]=(0,_.useState)(!1);Tn(S,`blur`,o),Tn(S,`focus`,s),Tn(S,`escape`,u),Tn(S,`click`,d),Tn(S,`loaderror`,f),Tn(S,`loaderstart`,p),Tn(S,`networkschange`,m),Tn(S,`confirm`,h),Tn(S,`cancel`,g),Tn(S,`shippingaddresschange`,v),Tn(S,`shippingratechange`,y),Tn(S,`change`,l);let O;c&&(O=()=>{D(!0),c(S)}),Tn(S,`ready`,O),_.useLayoutEffect(()=>{if(w.current===null&&T.current!==null&&x){let t=null;x&&(t=x.create(e,a)),w.current=t,C(t),t&&t.mount(T.current)}},[x,a]);let k=wn(a);return _.useEffect(()=>{if(!w.current)return;let e=kn(a,k,[`paymentRequest`]);e&&`update`in w.current&&w.current.update(e)},[a,k]),_.useLayoutEffect(()=>()=>{if(w.current&&typeof w.current.destroy==`function`)try{w.current.destroy(),w.current=null}catch{}},[]),_.createElement(_.Fragment,null,!E&&i,_.createElement(`div`,{id:t,style:{height:E?`unset`:`0px`,visibility:E?`visible`:`hidden`},className:r,ref:T}))};return r.displayName=n,r.__elementType=e,r})(`payment`,typeof window>`u`);var[Pn,Fn]=Gt(`PaymentElementContext`),[In,Ln]=Gt(`StripeUtilsContext`),Rn=x({packageName:`@clerk/clerk-react`});function zn(e){Rn.setMessages(e).setPackageName(e)}var[Bn,Vn]=Gt(`AuthContext`),Hn=qt,Un=Jt,Wn=`You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.`,Gn=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,Kn=`Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support`,qn=`Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.`,Jn="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",Yn="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",Xn="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",Zn="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",Qn=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,$n=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,er=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,tr=`<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,nr=`<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,rr="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",ir="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",ar="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",or=`Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.`,sr=`Missing props. <UserButton.Action /> component requires the following props: label.`,cr=e=>{cn(()=>{Rn.throwMissingClerkProviderError({source:e})})},lr=e=>new Promise(t=>{let n=r=>{[`ready`,`degraded`].includes(r)&&(t(),e.off(`status`,n))};e.on(`status`,n,{notify:!0})}),ur=e=>async t=>(await lr(e),e.session?e.session.getToken(t):null),dr=e=>async(...t)=>(await lr(e),e.signOut(...t)),fr=(e={})=>{var t;cr(`useAuth`);let{treatPendingAsSignedOut:n,...r}=e??{},i=r,a=Vn();a.sessionId===void 0&&a.userId===void 0&&(a=i??{});let o=Un(),s=(0,_.useCallback)(ur(o),[o]),c=(0,_.useCallback)(dr(o),[o]);return(t=o.telemetry)==null||t.record(pe(`useAuth`,{treatPendingAsSignedOut:n})),pr({...a,getToken:s,signOut:c},{treatPendingAsSignedOut:n})};function pr(e,{treatPendingAsSignedOut:t=!0}={}){let{userId:n,orgId:r,orgRole:i,has:a,signOut:o,getToken:s,orgPermissions:c,factorVerificationAge:l,sessionClaims:u}=e??{},d=(0,_.useCallback)(e=>a?a(e):ie({userId:n,orgId:r,orgRole:i,orgPermissions:c,factorVerificationAge:l,features:u?.fea||``,plans:u?.pla||``})(e),[a,n,r,i,c,l,u]);return ae({authObject:{...e,getToken:s,signOut:o,has:d},options:{treatPendingAsSignedOut:t}})||Rn.throw(Kn)}var R=(e,t)=>{let n=(typeof t==`string`?t:t?.component)||e.displayName||e.name||`Component`;e.displayName=n;let r=typeof t==`string`?void 0:t,i=t=>{cr(n||`withClerk`);let i=Un();return!i.loaded&&!r?.renderWhileLoading?null:_.createElement(e,{...t,component:n,clerk:i})};return i.displayName=`withClerk(${n})`,i},mr=()=>{try{return!1}catch{}return!1},hr=()=>{try{return!1}catch{}return!1},gr=()=>{try{return!0}catch{}return!1},_r=new Set,vr=(e,t,n)=>{let r=hr()||gr(),i=n??e;_r.has(i)||r||(_r.add(i),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release.\n${t}`))};R(({clerk:e,...t})=>{let{client:n,session:r}=e,i=n.signedInSessions?n.signedInSessions.length>0:n.activeSessions&&n.activeSessions.length>0;return _.useEffect(()=>{r===null&&i?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},`RedirectToSignIn`),R(({clerk:e,...t})=>(_.useEffect(()=>{e.redirectToSignUp(t)},[]),null),`RedirectToSignUp`),R(({clerk:e,...t})=>(_.useEffect(()=>{e.redirectToTasks(t)},[]),null),`RedirectToTasks`),R(({clerk:e})=>(_.useEffect(()=>{vr(`RedirectToUserProfile`,"Use the `redirectToUserProfile()` method instead."),e.redirectToUserProfile()},[]),null),`RedirectToUserProfile`),R(({clerk:e})=>(_.useEffect(()=>{vr(`RedirectToOrganizationProfile`,"Use the `redirectToOrganizationProfile()` method instead."),e.redirectToOrganizationProfile()},[]),null),`RedirectToOrganizationProfile`),R(({clerk:e})=>(_.useEffect(()=>{vr(`RedirectToCreateOrganization`,"Use the `redirectToCreateOrganization()` method instead."),e.redirectToCreateOrganization()},[]),null),`RedirectToCreateOrganization`),R(({clerk:e,...t})=>(_.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),`AuthenticateWithRedirectCallback`);function yr(e,t,n){if(typeof e==`function`)return e(t);if(e!==void 0)return e;if(n!==void 0)return n}var br=e=>{mr()&&console.error(`Clerk: ${e}`)},xr=(e,...t)=>{let n={...e};for(let e of t)delete n[e];return n},Sr=m(),Cr=e=>t=>{try{return _.Children.only(e)}catch{return Rn.throw(Gn(t))}},wr=(e,t)=>
15(e||=t,typeof e==`string`&&(e=_.createElement(`button`,null,e)),e),Tr=e=>(...t)=>{if(e&&typeof e==`function`)return e(...t)};function Er(e){return typeof e==`function`}var Dr=new Map;function Or(e,t,n=1){_.useEffect(()=>{let r=Dr.get(e)||0;return r==n?Rn.throw(t):(Dr.set(e,r+1),()=>{Dr.set(e,(Dr.get(e)||1)-1)})},[])}function kr(e,t,n){let r=e.displayName||e.name||t||`Component`,i=r=>(Or(t,n),_.createElement(e,{...r}));return i.displayName=`withMaxAllowedInstancesGuard(${r})`,i}var Ar=e=>{let[t,n]=(0,_.useState)(new Map);return e.map(e=>({id:e.id,mount:t=>n(n=>new Map(n).set(String(e.id),t)),unmount:()=>n(t=>{let n=new Map(t);return n.set(String(e.id),null),n}),portal:()=>{let n=t.get(String(e.id));return n?(0,Sr.createPortal)(e.component,n):null}}))},jr=(e,t)=>!!e&&_.isValidElement(e)&&e?.type===t,Mr=(e,t)=>Fr({children:e,reorderItemsLabels:[`account`,`security`,`billing`,`apiKeys`],LinkComponent:Zr,PageComponent:Xr,MenuItemsComponent:ti,componentName:`UserProfile`},t),Nr=(e,t)=>Fr({children:e,reorderItemsLabels:[`general`,`members`,`billing`,`apiKeys`],LinkComponent:oi,PageComponent:ai,componentName:`OrganizationProfile`},t),Pr=e=>{let t=[],n=[oi,ai,ti,Xr,Zr];return _.Children.forEach(e,e=>{n.some(t=>jr(e,t))||t.push(e)}),t},Fr=(e,t)=>{let{children:n,LinkComponent:r,PageComponent:i,MenuItemsComponent:a,reorderItemsLabels:o,componentName:s}=e,{allowForAnyChildren:c=!1}=t||{},l=[];_.Children.forEach(n,e=>{if(!jr(e,i)&&!jr(e,r)&&!jr(e,a)){e&&!c&&br(Qn(s));return}let{props:t}=e,{children:n,label:u,url:d,labelIcon:f}=t;if(jr(e,i))if(Ir(t,o))l.push({label:u});
15else if(Lr(t))l.push({label:u,labelIcon:f,children:n,url:d});else{br($n(s));return}if(jr(e,r))if(Rr(t))l.push({label:u,labelIcon:f,url:d});else{br(er(s));return}});let u=[],d=[],f=[];l.forEach((e,t)=>{if(Lr(e)){u.push({component:e.children,id:t}),d.push({component:e.labelIcon,id:t});return}Rr(e)&&f.push({component:e.labelIcon,id:t})});let p=Ar(u),m=Ar(d),h=Ar(f),g=[],v=[];return l.forEach((e,t)=>{if(Ir(e,o)){g.push({label:e.label});return}if(Lr(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t),{portal:a,mount:o,unmount:s}=m.find(e=>e.id===t);g.push({label:e.label,url:e.url,mount:r,unmount:i,mountIcon:o,unmountIcon:s}),v.push(n),v.push(a);return}if(Rr(e)){let{portal:n,mount:r,unmount:i}=h.find(e=>e.id===t);g.push({label:e.label,url:e.url,mountIcon:r,unmountIcon:i}),v.push(n);return}}),{customPages:g,customPagesPortals:v}},Ir=(e,t)=>{let{children:n,label:r,url:i,labelIcon:a}=e;return!n&&!i&&!a&&t.some(e=>e===r)},Lr=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!!t&&!!r&&!!i&&!!n},Rr=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!t&&!!r&&!!i&&!!n},zr=(e,t)=>Br({children:e,reorderItemsLabels:[`manageAccount`,`signOut`],MenuItemsComponent:ti,MenuActionComponent:ni,MenuLinkComponent:ri,UserProfileLinkComponent:Zr,UserProfilePageComponent:Xr,allowForAnyChildren:t?.allowForAnyChildren??!1}),Br=({children:e,MenuItemsComponent:t,MenuActionComponent:n,MenuLinkComponent:r,UserProfileLinkComponent:i,UserProfilePageComponent:a,reorderItemsLabels:o,allowForAnyChildren:s=!1})=>{let c=[],l=[],u=[];_.Children.forEach(e,e=>{if(!jr(e,t)&&!jr(e,i)&&!jr(e,a)){e&&!s&&br(tr);return}if(jr(e,i)||jr(e,a))return;let{props:l}=e;_.Children.forEach(l.children,e=>{if(!jr(e,n)&&!jr(e,r)){e&&br(nr);return}let{props:t}=e,{label:i,labelIcon:a,href:s,onClick:l,open:u}=t;if(jr(e,n))if(Vr(t,o))c.push({label:i});else if(Hr(t)){let e={label:i,labelIcon:a};if(l!==void 0)c.push({...e,onClick:l});else if(u!==void 0)c.push({...e,open:u.startsWith(`/`)?u:`/${u}`});else{br(`Custom menu item must have either onClick or open property`);return}}else{br(sr);return}if(jr(e,r))if(Ur(t))c.push({label:i,labelIcon:a,href:s});else{br(or);return}})});let d=[],f=[];c.forEach((e,t)=>{Hr(e)&&d.push({component:e.labelIcon,id:t}),Ur(e)&&f.push({component:e.labelIcon,id:t})});let p=Ar(d),m=Ar(f);return c.forEach((e,t)=>{if(Vr(e,o)&&l.push({label:e.label}),Hr(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t),a={label:e.label,mountIcon:r,unmountIcon:i};`onClick`in e?a.onClick=e.onClick:`open`in e&&(a.open=e.open),l.push(a),u.push(n)}if(Ur(e)){let{portal:n,mount:r,unmount:i}=m.find(e=>e.id===t);l.push({label:e.label,href:e.href,mountIcon:r,unmountIcon:i}),u.push(n)}}),{customMenuItems:l,customMenuItemsPortals:u}},Vr=(e,t)=>{let{children:n,label:r,onClick:i,labelIcon:a}=e;return!n&&!i&&!a&&t.some(e=>e===r)},Hr=e=>{let{label:t,labelIcon:n,onClick:r,open:i}=e;return!!n&&!!t&&(typeof r==`function`||typeof i==`string`)},Ur=e=>{let{label:t,href:n,labelIcon:r}=e;return!!n&&!!r&&!!t},Wr=(e=>{let t=e?.isReady;return n=>new Promise((r,i)=>{let{root:a=document==null?void 0:document.body,selector:o,timeout:s=0}=n;if(!a){i(Error(`No root element provided`));return}let c=a;if(o&&(c=a?.querySelector(o)),t(c,o)){r();return}let l=new MutationObserver(n=>{for(let i of n)if(!c&&o&&(c=a?.querySelector(o)),(e.childList&&i.type===`childList`||e.attributes&&i.type===`attributes`)&&t(c,o)){l.disconnect(),r();return}});l.observe(a,e),s>0&&setTimeout(()=>{l.disconnect(),i(Error(`Timeout waiting for ${o}`))},s)})})({childList:!0,subtree:!0,isReady:(e,t)=>!!e?.childElementCount&&(e?.matches)?.call(e,t)&&e.childElementCount>0});function Gr(e,t){let n=(0,_.useRef)(),[r,i]=(0,_.useState)(`rendering`);return(0,_.useEffect)(()=>{if(!e)throw Error(`Clerk: no component name provided, unable to detect mount.`);if(typeof window<`u`&&!n.current){let r=`[data-clerk-component="${e}"]`,a=t?.selector;n.current=Wr({selector:a?r+a:r}).then(()=>{i(`rendered`)}).catch(()=>{i(`error`)})}},[e,t?.selector]),r}var Kr=e=>`mount`in e,qr=e=>`open`in e,Jr=e=>e?.map(({mountIcon:e,unmountIcon:t,...n})=>n),z=class extends _.PureComponent{constructor(){super(...arguments),this.rootRef=_.createRef()}componentDidUpdate(e){if(!Kr(e)||!Kr(this.props))return;let t=xr(e.props,`customPages`,`customMenuItems`,`children`),n=xr(this.props.props,`customPages`,`customMenuItems`,`children`),r=t.customPages?.length!==n.customPages?.length,i=t.customMenuItems?.length!==n.customMenuItems?.length,a=Jr(e.props.customMenuItems),o=Jr(this.props.props.customMenuItems);(!xn(t,n)||!xn(a,o)||r||i)&&this.rootRef.current&&this.props.updateProps({node:this.rootRef.current,props:this.props.props})}componentDidMount(){this.rootRef.current&&(Kr(this.props)&&this.props.mount(this.rootRef.current,this.props.props),qr(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.rootRef.current&&(Kr(this.props)&&this.props.unmount(this.rootRef.current),qr(this.props)&&this.props.close())}render(){let{hideRootHtmlElement:e=!1}=this.props,t={ref:this.rootRef,...this.props.rootProps,...this.props.component&&{"data-clerk-component":this.props.component}};return _.createElement(_.Fragment,null,!e&&_.createElement(`div`,{...t}),this.props.children)}},Yr=e=>_.createElement(_.Fragment,null,(e?.customPagesPortals)?.map((e,t)=>(0,_.createElement)(e,{key:t})),(e?.customMenuItemsPortals)?.map((e,t)=>(0,_.createElement)(e,{key:t}
15)));R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`SignIn`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`SignUp`,renderWhileLoading:!0});function Xr({children:e}){return br(Jn),_.createElement(_.Fragment,null,e)}function Zr({children:e}){return br(Yn),_.createElement(_.Fragment,null,e)}var Qr=R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Mr(r.children);return _.createElement(_.Fragment,null,i&&n,_.createElement(z,{component:t,mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__unstable__updateProps,props:{...r,customPages:o},rootProps:a},_.createElement(Yr,{customPagesPortals:s})))},{component:`UserProfile`,renderWhileLoading:!0});Object.assign(Qr,{Page:Xr,Link:Zr});var $r=(0,_.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),ei=R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Mr(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),c={...r.userProfileProps,customPages:o},{customMenuItems:l,customMenuItemsPortals:u}=zr(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),d=Pr(r.children),f={mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__unstable__updateProps,props:{...r,userProfileProps:c,customMenuItems:l}},p={customPagesPortals:s,customMenuItemsPortals:u};return _.createElement($r.Provider,{value:f},i&&n,e.loaded&&_.createElement(z,{component:t,...f,hideRootHtmlElement:!!r.__experimental_asProvider,rootProps:a},r.__experimental_asProvider?d:null,_.createElement(Yr,{...p})))},{component:`UserButton`,renderWhileLoading:!0});function ti({children:e}){return br(rr),_.createElement(_.Fragment,null,e)}function ni({children:e}){return br(ir),_.createElement(_.Fragment,null,e)}function ri({children:e}){return br(ar),_.createElement(_.Fragment,null,e)}function ii(e){let t=(0,_.useContext)($r),n={...t,props:{...t.props,...e}};return _.createElement(z,{...n})}Object.assign(ei,{UserProfilePage:Xr,UserProfileLink:Zr,MenuItems:ti,Action:ni,Link:ri,__experimental_Outlet:ii});function ai({children:e}){return br(Xn),_.createElement(_.Fragment,null,e)}function oi({children:e}){return br(Zn),_.createElement(_.Fragment,null,e)}var si=R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Nr(r.children);return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__unstable__updateProps,props:{...r,customPages:o},rootProps:a},_.createElement(Yr,{customPagesPortals:s})))},{component:`OrganizationProfile`,renderWhileLoading:!0});Object.assign(si,{Page:ai,Link:oi}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`CreateOrganization`,renderWhileLoading:!0});var ci=(0,_.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),li=R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=Nr(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),c={...r.organizationProfileProps,customPages:o},l=Pr(r.children),u={mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__unstable__updateProps,props:{...r,organizationProfileProps:c},rootProps:a,component:t};return e.__experimental_prefetchOrganizationSwitcher(),_.createElement(ci.Provider,{value:u},_.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{...u,hideRootHtmlElement:!!r.__experimental_asProvider},r.__experimental_asProvider?l:null,_.createElement(Yr,{customPagesPortals:s}))))},{component:`OrganizationSwitcher`,renderWhileLoading:!0});function ui(e){let t=(0,_.useContext)(ci),n={...t,props:{...t.props,...e}};return _.createElement(z,{...n})}Object.assign(li,{OrganizationProfilePage:ai,OrganizationProfileLink:oi,__experimental_Outlet:ui}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`OrganizationList`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,open:e.openGoogleOneTap,close:e.closeGoogleOneTap,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`GoogleOneTap`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountWaitlist,unmount:e.unmountWaitlist,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`Waitlist`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t,{selector:`[data-component-status="ready"]`})===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountPricingTable,unmount:e.unmountPricingTable,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`PricingTable`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountAPIKeys,unmount:e.unmountAPIKeys,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`ApiKeys`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountUserAvatar,unmount:e.unmountUserAvatar,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`UserAvatar`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountTaskChooseOrganization,unmount:e.unmountTaskChooseOrganization,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`TaskChooseOrganization`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountTaskResetPassword,unmount:e.unmountTaskResetPassword,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`TaskResetPassword`,renderWhileLoading:!0}),R(({clerk:e,component:t,fallback:n,...r})=>{let i=Gr(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return _.createElement(_.Fragment,null,i&&n,e.loaded&&_.createElement(z,{component:t,mount:e.mountTaskSetupMFA,unmount:e.unmountTaskSetupMFA,updateProps:e.__unstable__updateProps,props:r,rootProps:a}))},{component:`TaskSetupMFA`,renderWhileLoading:!0});var di=e=>{throw TypeError(e)},fi=(e,t,n)=>t.has(e)||di(`Cannot `+n),B=(e,t,n)=>(fi(e,t,`read from private field`),n?n.call(e):t.get(e)),pi=(e,t,n)=>t.has(e)?di(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),mi=(e,t,n,r)=>(fi(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),hi=(e,t,n)=>(fi(e,t,`access private method`),n),gi={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},_i=100,vi=async e=>new Promise(t=>setTimeout(t,e)),yi=(e,t)=>t?e*(1+Math.random()):e,bi=e=>{let t=0,n=()=>{let n=e.initialDelay*e.factor**+t;return n=yi(n,e.jitter),Math.min(e.maxDelayBetweenRetries||n,n)};return async()=>{await vi(n()),t++}},xi=async(e,t={})=>{let n=0,{shouldRetry:r,initialDelay:i,maxDelayBetweenRetries:a,factor:o,retryImmediately:s,jitter:c,onBeforeRetry:l}={...gi,...t},u=bi({initialDelay:i,maxDelayBetweenRetries:a,factor:o,jitter:c});for(;;)try{return await e()}catch(e){if(n++,!r(e,n))throw e;
15l&&await l(n),s&&n===1?await vi(yi(_i,c)):await u()}},Si=`loadScript cannot be called when document does not exist`,Ci=`loadScript cannot be called without a src`;async function wi(e=``,t){let{async:n,defer:r,beforeLoad:i,crossOrigin:a,nonce:o}=t||{};return xi(()=>new Promise((t,s)=>{e||s(Error(Ci)),(!document||!document.body)&&s(Error(Si));let c=document.createElement(`script`);a&&c.setAttribute(`crossorigin`,a),c.async=n||!1,c.defer=r||!1,c.addEventListener(`load`,()=>{c.remove(),t(c)}),c.addEventListener(`error`,t=>{c.remove(),s(t.error??Error(`failed to load script: ${e}`))}),c.src=e,c.nonce=o,i?.(c),document.body.appendChild(c)}),{shouldRetry:(e,t)=>t<=5})}function Ti(e){return e?Ei(e)||Di(e):!0}function Ei(e){return/^http(s)?:\/\//.test(e||``)}function Di(e){return e.startsWith(`/`)}function Oi(e){return e?Di(e)?new URL(e,window.location.origin).toString():e:``}function ki(e){if(!e)return``;let t;if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else if(e.match(/\.clerk.accounts/))return e;else t=/^(clerk\.)*/gi;return`clerk.${e.replace(t,``)}`}var Ai=(e,t=`5.125.10`)=>{if(e)return e;let n=ji(t);return n?n===`snapshot`?`5.125.10`:n:Mi(t)},ji=e=>e.trim().replace(/^v/,``).match(/-(.+?)(\.|$)/)?.[1],Mi=e=>e.trim().replace(/^v/,``).split(`.`)[0],V=`failed_to_load_clerk_js`,Ni=`failed_to_load_clerk_js_timeout`,Pi=`Failed to load Clerk`,{isDevOrStagingUrl:Fi}=ue(),Ii=x({packageName:`@clerk/shared`});function Li(e){Ii.setPackageName({packageName:e})}function Ri(){if(typeof window>`u`||!window.Clerk)return!1;let e=window.Clerk;return typeof e==`object`&&typeof e.load==`function`}function zi(e){if(typeof window>`u`||!window.performance)return!1;let t=performance.getEntriesByName(e,`resource`);if(t.length===0)return!1;let n=t[t.length-1];return n.transferSize===0&&n.decodedBodySize===0&&(n.responseEnd===0||n.responseEnd>0&&n.responseStart>0||`responseStatus`in n&&(n.responseStatus>=400||n.responseStatus===0))}function Bi(e,t){return new Promise((n,r)=>{let i=!1,a=(e,t)=>{clearTimeout(e),clearInterval(t)};t?.addEventListener(`error`,()=>{a(s,c),r(new S(Pi,{code:V}))});let o=()=>{i||Ri()&&(i=!0,a(s,c),n(null))},s=setTimeout(()=>{i||(i=!0,a(s,c),Ri()?n(null):r(new S(Pi,{code:Ni})))},e);o();let c=setInterval(()=>{if(i){clearInterval(c);return}o()},100)})}var Vi=async e=>{let t=e?.scriptLoadTimeout??15e3;if(Ri())return null;if(!e?.publishableKey)return Ii.throwMissingPublishableKeyError(),null;let n=Hi(e),r=document.querySelector(`script[data-clerk-js-script]`);if(r)if(zi(n))r.remove();else try{return await Bi(t,r),null}catch{r.remove()}let i=Bi(t);return wi(n,{async:!0,crossOrigin:`anonymous`,nonce:e.nonce,beforeLoad:Wi(e)}).catch(e=>{throw new S(Pi+(e.message?`, ${e.message}`:``),{code:V,cause:e})}),i},Hi=e=>{let{clerkJSUrl:t,clerkJSVariant:n,clerkJSVersion:r,proxyUrl:i,domain:a,publishableKey:o}=e;if(t)return t;let s=``;s=i&&Ti(i)?Oi(i).replace(/http(s)?:\/\//,``):a&&!Fi(ce(o)?.frontendApi||``)?ki(a):ce(o)?.frontendApi||``;let c=n?`${n.replace(/\.+$/,``)}.`:``,l=Ai(r);return`https://${s}/npm/@clerk/clerk-js@${l}/dist/clerk.${c}browser.js`},Ui=e=>{let t={};return e.publishableKey&&(t[`data-clerk-publishable-key`]=e.publishableKey),e.proxyUrl&&(t[`data-clerk-proxy-url`]=e.proxyUrl),e.domain&&(t[`data-clerk-domain`]=e.domain),e.nonce&&(t.nonce=e.nonce),t},Wi=e=>t=>{let n=Ui(e);for(let e in n)t.setAttribute(e,n[e])},Gi=(e,t,n)=>!e&&n?Ki(n):qi(t),Ki=e=>{let t=e.userId,n=e.user,r=e.sessionId,i=e.sessionStatus,a=e.sessionClaims;return{userId:t,user:n,sessionId:r,session:e.session,sessionStatus:i,sessionClaims:a,organization:e.organization,orgId:e.orgId,orgRole:e.orgRole,orgPermissions:e.orgPermissions,orgSlug:e.orgSlug,actor:e.actor,factorVerificationAge:e.factorVerificationAge}},qi=e=>{let t=e.user?e.user.id:e.user,n=e.user,r=e.session?e.session.id:e.session,i=e.session,a=e.session?.status,o=e.session?e.session.lastActiveToken?.jwt?.claims:null,s=e.session?e.session.factorVerificationAge:null,c=i?.actor,l=e.organization,u=e.organization?e.organization.id:e.organization,d=l?.slug,f=l&&n?.organizationMemberships?.find(e=>e.organization.id===u),p=f&&f.permissions;return{userId:t,user:n,sessionId:r,session:i,sessionStatus:a,sessionClaims:o,organization:l,orgId:u,orgRole:f&&f.role,orgSlug:d,orgPermissions:p,actor:c,factorVerificationAge:s}};function Ji(){return typeof window<`u`}new RegExp(`bot.spider.crawl.APIs-Google.AdsBot.Googlebot.mediapartners.Google Favicon.FeedFetcher.Google-Read-Aloud.DuplexWeb-Google.googleweblight.bing.yandex.baidu.duckduck.yahoo.ecosia.ia_archiver.facebook.instagram.pinterest.reddit.slack.twitter.whatsapp.youtube.semrush`.split(`.`).join(`|`),`i`);var Yi=(e,t,n,r,i)=>{let{notify:a}=i||{},o=e.get(n);o||(o=[],e.set(n,o)),o.push(r),a&&t.has(n)&&r(t.get(n))},Xi=(e,t,n)=>(e.get(t)||[]).map(e=>e(n)),Zi=(e,t,n)=>{let r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},Qi=()=>{let e=new Map,t=new Map,n=new Map;return{on:(...n)=>Yi(e,t,...n),prioritizedOn:(...e)=>Yi(n,t,...e),emit:(r,i)=>{t.set(r,i),Xi(n,r,i),Xi(e,r,i)},off:(...t)=>Zi(e,...t),prioritizedOff:(...e)=>Zi(n,...e),internal:{retrieveListeners:t=>e.get(t)||[]}}},$i={Status:`status`},ea=()=>Qi();typeof window<`u`&&!window.global&&(window.global=typeof global>`u`?window:global);var ta=R(({clerk:e,children:t,...n})=>{let{appearance:r,signUpFallbackRedirectUrl:i,forceRedirectUrl:a,fallbackRedirectUrl:o,signUpForceRedirectUrl:s,mode:c,initialValues:l,withSignUp:u,oauthFlow:d,...f}=n;t=wr(t,`Sign in`);let p=Cr(t)(`SignInButton`),m=()=>{let t={forceRedirectUrl:a,fallbackRedirectUrl:o,signUpFallbackRedirectUrl:i,signUpForceRedirectUrl:s,initialValues:l,withSignUp:u,oauthFlow:d};return c===`modal`?e.openSignIn({...t,appearance:r}):e.redirectToSignIn({...t,signInFallbackRedirectUrl:o,signInForceRedirectUrl:a})},h=async e=>(p&&typeof p==`object`&&`props`in p&&await Tr(p.props.onClick)(e),m()),g={...f,onClick:h};return _.cloneElement(p,g)},{component:`SignInButton`,renderWhileLoading:!0});R(({clerk:e,children:t,...n})=>{let{redirectUrl:r,...i}=n;t=wr(t,`Sign in with Metamask`);let a=Cr(t)(`SignInWithMetamaskButton`),o=async()=>{async function t(){await e.authenticateWithMetamask({redirectUrl:r||void 0})}t()},s=async e=>(await Tr(a.props.onClick)(e),o()),c={...i,onClick:s};return _.cloneElement(a,c)},{component:`SignInWithMetamask`,renderWhileLoading:!0}),R(({clerk:e,children:t,...n})=>{let{redirectUrl:r=`/`,signOutOptions:i,...a}=n;t=wr(t,`Sign out`);let o=Cr(t)(`SignOutButton`),s=()=>e.signOut({redirectUrl:r,...i}),c=async e=>(await Tr(o.props.onClick)(e),s()),l={...a,onClick:c};return _.cloneElement(o,l)},{component:`SignOutButton`,renderWhileLoading:!0});var na=R(({clerk:e,children:t,...n})=>{let{appearance:r,unsafeMetadata:i,fallbackRedirectUrl:a,forceRedirectUrl:o,signInFallbackRedirectUrl:s,signInForceRedirectUrl:c,mode:l,initialValues:u,oauthFlow:d,...f}=n;t=wr(t,`Sign up`);let p=Cr(t)(`SignUpButton`),m=()=>{let t={fallbackRedirectUrl:a,forceRedirectUrl:o,signInFallbackRedirectUrl:s,signInForceRedirectUrl:c,initialValues:u,oauthFlow:d};return l===`modal`?e.openSignUp({...t,appearance:r,unsafeMetadata:i}):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:a,signUpForceRedirectUrl:o})},h=async e=>(p&&typeof p==`object`&&`props`in p&&await Tr(p.props.onClick)(e),m()),g={...f,onClick:h};return _.cloneElement(p,g)},{component:`SignUpButton`,renderWhileLoading:!0}),ra=()=>({fields:{identifier:null,password:null,code:null},raw:null,global:null}),ia=()=>({fields:{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null},raw:null,global:null}),aa=class{constructor(e){this.isomorphicClerk=e,this.signInSignalProxy=this.buildSignInProxy(),this.signUpSignalProxy=this.buildSignUpProxy()}signInSignal(){return this.signInSignalProxy}signUpSignal(){return this.signUpSignalProxy}buildSignInProxy(){let e=this.gateProperty.bind(this),t=()=>this.client.signIn.__internal_future;return{errors:ra(),fetchStatus:`idle`,signIn:{status:`needs_identifier`,availableStrategies:[],isTransferable:!1,get id(){return e(t,`id`,void 0)},get supportedFirstFactors(){return e(t,`supportedFirstFactors`,[])},get supportedSecondFactors(){return e(t,`supportedSecondFactors`,[])},get secondFactorVerification(){return e(t,`secondFactorVerification`,{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)},pathRoot:``,reload:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)}})},get identifier(){return e(t,`identifier`,null)}
15,get createdSessionId(){return e(t,`createdSessionId`,null)},get userData(){return e(t,`userData`,{})},get firstFactorVerification(){return e(t,`firstFactorVerification`,{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)},pathRoot:``,reload:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)}})},create:this.gateMethod(t,`create`),password:this.gateMethod(t,`password`),sso:this.gateMethod(t,`sso`),finalize:this.gateMethod(t,`finalize`),emailCode:this.wrapMethods(()=>t().emailCode,[`sendCode`,`verifyCode`]),emailLink:this.wrapStruct(()=>t().emailLink,[`sendLink`,`waitForVerification`],[`verification`],{verification:null}),resetPasswordEmailCode:this.wrapMethods(()=>t().resetPasswordEmailCode,[`sendCode`,`verifyCode`,`submitPassword`]),phoneCode:this.wrapMethods(()=>t().phoneCode,[`sendCode`,`verifyCode`]),mfa:this.wrapMethods(()=>t().mfa,[`sendPhoneCode`,`verifyPhoneCode`,`verifyTOTP`,`verifyBackupCode`]),ticket:this.gateMethod(t,`ticket`),passkey:this.gateMethod(t,`passkey`),web3:this.gateMethod(t,`web3`)}}}buildSignUpProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),n=this.wrapMethods.bind(this),r=()=>this.client.signUp.__internal_future;return{errors:ia(),fetchStatus:`idle`,signUp:{get id(){return e(r,`id`,void 0)},get requiredFields(){return e(r,`requiredFields`,[])},get optionalFields(){return e(r,`optionalFields`,[])},get missingFields(){return e(r,`missingFields`,[])},get username(){return e(r,`username`,null)},get firstName(){return e(r,`firstName`,null)},get lastName(){return e(r,`lastName`,null)},get emailAddress(){return e(r,`emailAddress`,null)},get phoneNumber(){return e(r,`phoneNumber`,null)},get web3Wallet(){return e(r,`web3Wallet`,null)},get hasPassword(){return e(r,`hasPassword`,!1)},get unsafeMetadata(){return e(r,`unsafeMetadata`,{})},get createdSessionId(){return e(r,`createdSessionId`,null)},get createdUserId(){return e(r,`createdUserId`,null)},get abandonAt(){return e(r,`abandonAt`,null)},get legalAcceptedAt(){return e(r,`legalAcceptedAt`,null)},get locale(){return e(r,`locale`,null)},get status(){return e(r,`status`,`missing_requirements`)},get unverifiedFields(){return e(r,`unverifiedFields`,[])},get isTransferable(){return e(r,`isTransferable`,!1)},create:t(r,`create`),update:t(r,`update`),sso:t(r,`sso`),password:t(r,`password`),ticket:t(r,`ticket`),web3:t(r,`web3`),finalize:t(r,`finalize`),verifications:n(()=>r().verifications,[`sendEmailCode`,`verifyEmailCode`,`sendPhoneCode`,`verifyPhoneCode`])}}}__internal_effect(e){throw Error(`__internal_effect called before Clerk is loaded`)}__internal_computed(e){throw Error(`__internal_computed called before Clerk is loaded`)}get client(){let e=this.isomorphicClerk.client;if(!e)throw Error(`Clerk client not ready`);return e}gateProperty(e,t,n){return!Ji()||!this.isomorphicClerk.loaded?n:e()[t]}gateMethod(e,t){return(async(...n)=>{if(!Ji())return Rn.throw(`Attempted to call a method (${t}) that is not supported on the server.`);this.isomorphicClerk.loaded||await new Promise(e=>this.isomorphicClerk.addOnLoaded(e));let r=e();return r[t].apply(r,n)})}wrapMethods(e,t){return Object.fromEntries(t.map(t=>[t,this.gateMethod(e,t)]))}wrapStruct(e,t,n,r){let i={};for(let n of t)i[n]=this.gateMethod(e,n);for(let t of n)Object.defineProperty(i,t,{get:()=>this.gateProperty(e,t,r[t]),enumerable:!0});return i}};globalThis.__BUILD_DISABLE_RHC__===void 0&&(globalThis.__BUILD_DISABLE_RHC__=!1);var oa={name:`@clerk/clerk-react`,version:`5.61.6`,environment:`production`},sa,ca,la,ua,da,fa,pa,ma,ha,ga=class e{constructor(e){pi(this,ma),this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenEnableOrganizationsPrompt=null,this.preopenSignIn=null,this.preopenCheckout=null,this.preopenPlanDetails=null,this.preopenSubscriptionDetails=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.preOpenWaitlist=null,this.premountSign
15InNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserAvatarNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountWaitlistNodes=new Map,this.premountPricingTableNodes=new Map,this.premountAPIKeysNodes=new Map,this.premountOAuthConsentNodes=new Map,this.premountTaskChooseOrganizationNodes=new Map,this.premountTaskResetPasswordNodes=new Map,this.premountTaskSetupMFANodes=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],pi(this,sa,`loading`),pi(this,ca),pi(this,la),pi(this,ua),pi(this,da,ea()),pi(this,fa),this.buildSignInUrl=e=>{let t=()=>this.clerkjs?.buildSignInUrl(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildSignInUrl`,t)},this.buildSignUpUrl=e=>{let t=()=>this.clerkjs?.buildSignUpUrl(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildSignUpUrl`,t)},this.buildAfterSignInUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignInUrl(...e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildAfterSignInUrl`,t)},this.buildAfterSignUpUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignUpUrl(...e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildAfterSignUpUrl`,t)},this.buildAfterSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterSignOutUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildAfterSignOutUrl`,e)},this.buildNewSubscriptionRedirectUrl=()=>{let e=()=>this.clerkjs?.buildNewSubscriptionRedirectUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildNewSubscriptionRedirectUrl`,e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterMultiSessionSingleSignOutUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildAfterMultiSessionSingleSignOutUrl`,e)},this.buildUserProfileUrl=()=>{let e=()=>this.clerkjs?.buildUserProfileUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildUserProfileUrl`,e)},this.buildCreateOrganizationUrl=()=>{let e=()=>this.clerkjs?.buildCreateOrganizationUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildCreateOrganizationUrl`,e)},this.buildOrganizationProfileUrl=()=>{let e=()=>this.clerkjs?.buildOrganizationProfileUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildOrganizationProfileUrl`,e)},this.buildWaitlistUrl=()=>{let e=()=>this.clerkjs?.buildWaitlistUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildWaitlistUrl`,e)},this.buildTasksUrl=()=>{let e=()=>this.clerkjs?.buildTasksUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildTasksUrl`,e)},this.buildUrlWithAuth=e=>{let t=()=>this.clerkjs?.buildUrlWithAuth(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildUrlWithAuth`,t)},this.handleUnauthenticated=async()=>{let e=()=>this.clerkjs?.handleUnauthenticated();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`handleUnauthenticated`,e)},this.on=(...e)=>{if(this.clerkjs?.on)return this.clerkjs.on(...e);B(this,da).on(...e)},this.off=(...e)=>{if(this.clerkjs?.off)return this.clerkjs.off(...e);B(this,da).off(...e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.beforeLoad=e=>{if(!e)throw Error(`Failed to hydrate latest Clerk JS`)},this.hydrateClerkJS=e=>{var t,n;if(!e)throw Error(`Failed to hydrate latest Clerk JS`);return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,n)=>{t.nativeUnsubscribe=e.addListener(n)}),(t=B(this,da).internal.retrieveListeners(`status`))==null||t.forEach(e=>{this.on(`status`,e,{notify:!0})}),(n=B(this,da).internal.retrieveListeners(`queryClientStatus`))==null||n.forEac
15h(e=>{this.on(`queryClientStatus`,e,{notify:!0})}),this.preopenSignIn!==null&&e.openSignIn(this.preopenSignIn),this.preopenCheckout!==null&&e.__internal_openCheckout(this.preopenCheckout),this.preopenPlanDetails!==null&&e.__internal_openPlanDetails(this.preopenPlanDetails),this.preopenSubscriptionDetails!==null&&e.__internal_openSubscriptionDetails(this.preopenSubscriptionDetails),this.preopenSignUp!==null&&e.openSignUp(this.preopenSignUp),this.preopenUserProfile!==null&&e.openUserProfile(this.preopenUserProfile),this.preopenUserVerification!==null&&e.__internal_openReverification(this.preopenUserVerification),this.preopenOneTap!==null&&e.openGoogleOneTap(this.preopenOneTap),this.preopenOrganizationProfile!==null&&e.openOrganizationProfile(this.preopenOrganizationProfile),this.preopenCreateOrganization!==null&&e.openCreateOrganization(this.preopenCreateOrganization),this.preOpenWaitlist!==null&&e.openWaitlist(this.preOpenWaitlist),this.preopenEnableOrganizationsPrompt&&e.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt),this.premountSignInNodes.forEach((t,n)=>{e.mountSignIn(n,t)}),this.premountSignUpNodes.forEach((t,n)=>{e.mountSignUp(n,t)}),this.premountUserProfileNodes.forEach((t,n)=>{e.mountUserProfile(n,t)}),this.premountUserAvatarNodes.forEach((t,n)=>{e.mountUserAvatar(n,t)}),this.premountUserButtonNodes.forEach((t,n)=>{e.mountUserButton(n,t)}),this.premountOrganizationListNodes.forEach((t,n)=>{e.mountOrganizationList(n,t)}),this.premountWaitlistNodes.forEach((t,n)=>{e.mountWaitlist(n,t)}),this.premountPricingTableNodes.forEach((t,n)=>{e.mountPricingTable(n,t)}),this.premountAPIKeysNodes.forEach((t,n)=>{e.mountAPIKeys(n,t)}),this.premountOAuthConsentNodes.forEach((t,n)=>{e.__internal_mountOAuthConsent(n,t)}),this.premountTaskChooseOrganizationNodes.forEach((t,n)=>{e.mountTaskChooseOrganization(n,t)}),this.premountTaskResetPasswordNodes.forEach((t,n)=>{e.mountTaskResetPassword(n,t)}),this.premountTaskSetupMFANodes.forEach((t,n)=>{e.mountTaskSetupMFA(n,t)}),this.clerkjs.status===void 0&&B(this,da).emit($i.Status,`ready`),this.emitLoaded(),this.clerkjs},this.__experimental_checkout=(...e)=>this.clerkjs?.__experimental_checkout(...e),this.__unstable__updateProps=async e=>{let t=await hi(this,ma,ha).call(this);if(t&&`__unstable__updateProps`in t)return t.__unstable__updateProps(e)},this.setActive=e=>this.clerkjs?this.clerkjs.setActive(e):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__internal_openCheckout=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openCheckout(e):this.preopenCheckout=e},this.__internal_closeCheckout=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeCheckout():this.preopenCheckout=null},this.__internal_openPlanDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openPlanDetails(e):this.preopenPlanDetails=e},this.__internal_closePlanDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closePlanDetails():this.preopenPlanDetails=null},this.__internal_openSubscriptionDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openSubscriptionDetails(e):this.preopenSubscriptionDetails=e??null},this.__internal_closeSubscriptionDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeSubscriptionDetails():this.preopenSubscriptionDetails=null},this.__internal_openReverification=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openReverification(e):this.preopenUserVerification=e},this.__internal_closeReverification=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeReverification():this.preopenUserVerification=null},this.__internal_openEnableOrganizationsPrompt=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openEnableOrganizationsPrompt(e):this.preopenEnableOrganizationsPrompt=e},this.__internal_closeEnableOrganizationsPrompt=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeEnableOrganizationsPrompt():this.preopenEnableOrganizationsPrompt=null},this.openGoogleOneTap=e=>{this.clerkjs&&this.loaded?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.openWaitlist(e):this.preOpenWaitlist=e},this.closeWaitlist=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeWaitlist():this.preOpenWaitlist=null},this.openSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignUp():this.preopenSignUp=null}
15,this.mountSignIn=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserAvatar=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserAvatar(e,t):this.premountUserAvatarNodes.set(e,t)},this.unmountUserAvatar=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserAvatar(e):this.premountUserAvatarNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.__experimental_prefetchOrganizationSwitcher=()=>{let e=()=>this.clerkjs?.__experimental_prefetchOrganizationSwitcher();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`__experimental_prefetchOrganizationSwitcher`,e)},this.mountOrganizationList=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.mountWaitlist=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountWaitlist(e,t):this.premountWaitlistNodes.set(e,t)},this.unmountWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountWaitlist(e):this.premountWaitlistNodes.delete(e)},this.mountPricingTable=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountPricingTable(e,t):this.premountPricingTableNodes.set(e,t)},this.unmountPricingTable=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountPricingTable(e):this.premountPricingTableNodes.delete(e)},this.mountAPIKeys=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountAPIKeys(e,t):this.premountAPIKeysNodes.set(e,t)},this.unmountAPIKeys=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountAPIKeys(e):this.premountAPIKeysNodes.delete(e)},this.__internal_mountOAuthConsent=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountOAuthConsent(e,t):this.premountOAuthConsentNodes.set(e,t)},this.__internal_unmountOAuthConsent=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountOAuthConsent(e):this.premountOAuthConsentNodes.delete(e)},this.mountTaskChooseOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskChooseOrganization(e,t):this.premountTaskChooseOrganizationNodes.set(e,t)},this.unmountTaskChooseOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskChooseOrganization(e):this.premountTaskChooseOrganizationNodes.delete(e)},this.mountTaskResetPassword=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskResetPassword(e,t):this.premountTaskResetPasswordNodes.set(e,t)},this.unmountTaskResetPassword=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskResetPassword(e):this.premountTaskResetPasswordNodes.delete(e)},this.mountTaskSetupMFA=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskSetupMFA(e,t):this.premountTaskSetupMFANodes.set(e,t)},this.unmountTaskSetupMFA=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskSetupMFA(e):this.premountTaskSetupMFANodes.delete(e)},this.addListener=e=>{if(this.clerkjs)return this.clerkjs.addListener(e);{let t=()=>{var t;let n=this.premountAddListenerCalls.get(e);n&&((t=n.nativeUnsubscribe)==null||t.call(n),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{unsubscribe:t,nativeUnsubscribe:void 0}),t}},this.navigate=e=>{let t=()=>this.clerkjs?.navigate(e);this.clerkjs&&this.loaded?t():this.premountMethodCalls.set(`navigate`,t)},this.redirectWithAuth=async(...e)=>{let t=()=>this.clerkjs?.redirectWithAuth(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectWithAuth`,t)},this.redirectToSignIn=async e=>{let t=()=>this.clerkjs?.redirectToSignIn(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToSignIn`,t)},this.redirectToSignUp=async e=>{let t=()=>this.clerkjs?.redirectToSignUp(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToSignUp`,t)},this.redirectToUserProfile=async()=>{let e=()=>this.clerkjs?.redirectToUserProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToUserProfile`,e)},this.redirectToAfterSignUp=()=>{let e=()=>this.clerkjs?.redirectToAfterSignUp();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToAfterSignUp`,e)},this.redirectToAfterSignIn=()=>{let e=()=>this.clerkjs?.redirectToAfterSignIn();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`redirectToAfterSignIn`,e)},this.redirectToAfterSignOut=()=>{let e=()=>this.clerkjs?.redirectToAfterSignOut();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`redirectToAfterSignOut`,e)},this.redirectToOrganizationProfile=async()=>{let e=()=>this.clerkjs?.redirectToOrganizationProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToOrganizationProfile`,e)},this.redirectToCreateOrganization=async()=>{let e=()=>this.clerkjs?.redirectToCreateOrganization();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToCreateOrganization`,e)},this.redirectToWaitlist=async()=>{let e=()=>this.clerkjs?.redirectToWaitlist();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToWaitlist`,e)},this.redirectToTasks=async e=>{let t=()=>this.clerkjs?.redirectToTasks(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToTasks`,t)},this.handleRedirectCallback=async e=>{var t;let n=()=>this.clerkjs?.handleRedirectCallback(e);this.clerkjs&&this.loaded?(t=n())==null||t.catch(()=>{}):this.premountMethodCalls.set(`handleRedirectCallback`,n)},this.handleGoogleOneTapCallback=async(e,t)=>{var n;let r=()=>this.clerkjs?.handleGoogleOneTapCallback(e,t);this.clerkjs&&this.loaded?(n=r())==null||n.catch(()=>{}):this.premountMethodCalls.set(`handleGoogleOneTapCallback`,r)},this.handleEmailLinkVerification=async e=>{let t=()=>this.clerkjs?.handleEmailLinkVerification(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`handleEmailLinkVerification`,t)},this.authenticateWithMetamask=async e=>{let t=()=>this.clerkjs?.authenticateWithMetamask(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithMetamask`,t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithCoinbaseWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithCoinbaseWallet`,t)},this.authenticateWithBase=async e=>{let t=()=>this.clerkjs?.authenticateWithBase(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithBase`,t)},this.authenticateWithOKXWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithOKXWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithOKXWallet`,t)},this.authenticateWithSolana=async e=>{let t=()=>this.clerkjs?.authenticateWithSolana(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithSolana`,t)},this.authenticateWithWeb3=async e=>{let t=()=>this.clerkjs?.authenticateWithWeb3(e);
15if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithWeb3`,t)},this.authenticateWithGoogleOneTap=async e=>(await hi(this,ma,ha).call(this)).authenticateWithGoogleOneTap(e),this.__internal_loadStripeJs=async()=>(await hi(this,ma,ha).call(this)).__internal_loadStripeJs(),this.createOrganization=async e=>{let t=()=>this.clerkjs?.createOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`createOrganization`,t)},this.getOrganization=async e=>{let t=()=>this.clerkjs?.getOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`getOrganization`,t)},this.joinWaitlist=async e=>{let t=()=>this.clerkjs?.joinWaitlist(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`joinWaitlist`,t)},this.signOut=async(...e)=>{let t=()=>this.clerkjs?.signOut(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`signOut`,t)},this.__internal_attemptToEnableEnvironmentSetting=e=>{let t=()=>this.clerkjs?.__internal_attemptToEnableEnvironmentSetting(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`__internal_attemptToEnableEnvironmentSetting`,t)};let{Clerk:t=null,publishableKey:n}=e||{};mi(this,ua,n),mi(this,la,e?.proxyUrl),mi(this,ca,e?.domain),this.options=e,this.Clerk=t,this.mode=Ji()?`browser`:`server`,mi(this,fa,new aa(this)),this.options.sdkMetadata||(this.options.sdkMetadata=oa),B(this,da).emit($i.Status,`loading`),B(this,da).prioritizedOn($i.Status,e=>mi(this,sa,e)),B(this,ua)&&this.loadClerkJS()}get publishableKey(){return B(this,ua)}get loaded(){return this.clerkjs?.loaded||!1}get status(){return this.clerkjs?this.clerkjs?.status||(this.clerkjs.loaded?`ready`:`loading`):B(this,sa)}static getOrCreateInstance(t){return(!Ji()||!B(this,pa)||t.Clerk&&B(this,pa).Clerk!==t.Clerk||B(this,pa).publishableKey!==t.publishableKey)&&mi(this,pa,new e(t)),B(this,pa)}static clearInstance(){mi(this,pa,null)}get domain(){return typeof window<`u`&&window.location?yr(B(this,ca),new URL(window.location.href),``):typeof B(this,ca)==`function`?Rn.throw(qn):B(this,ca)||``}get proxyUrl(){return typeof window<`u`&&window.location?yr(B(this,la),new URL(window.location.href),``):typeof B(this,la)==`function`?Rn.throw(qn):B(this,la)||``}__internal_getOption(e){return this.clerkjs?.__internal_getOption?this.clerkjs?.__internal_getOption(e):this.options[e]}get sdkMetadata(){return this.clerkjs?.sdkMetadata||this.options.sdkMetadata||void 0}get instanceType(){return this.clerkjs?.instanceType}get frontendApi(){return this.clerkjs?.frontendApi||``}get isStandardBrowser(){return this.clerkjs?.isStandardBrowser||this.options.standardBrowser||!1}get __internal_queryClient(){return this.clerkjs?.__internal_queryClient}get isSatellite(){return typeof window<`u`&&window.location?yr(this.options.isSatellite,new URL(window.location.href),!1):typeof this.options.isSatellite==`function`?Rn.throw(qn):!1}async loadClerkJS(){if(!(this.mode!==`browser`||this.loaded)){typeof window<`u`&&(window.__clerk_publishable_key=B(this,ua),window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{if(this.Clerk){let e;Er(this.Clerk)?(e=new this.Clerk(B(this,ua),{proxyUrl:this.proxyUrl,domain:this.domain}),this.beforeLoad(e),await e.load(this.options)):(e=this.Clerk,e.loaded||(this.beforeLoad(e),await e.load(this.options))),global.Clerk=e}else if(!__BUILD_DISABLE_RHC__){if(global.Clerk||await Vi({...this.options,publishableKey:B(this,ua),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!global.Clerk)throw Error(`Failed to download latest ClerkJS. Contact [email protected].`);this.beforeLoad(global.Clerk),await global.Clerk.load(this.options)}return global.Clerk?.loaded?this.hydrateClerkJS(global.Clerk):void 0}catch(e){let t=e;B(this,da).emit($i.Status,`error`),console.error(t.stack||t.message||t);return}}}get version(){return this.clerkjs?.version}get client(){if(this.clerkjs)return this.clerkjs.client}get session(){if(this.clerkjs)return this.clerkjs.session}get user(){if(this.clerkjs)return this.clerkjs.user}get organization(){if(this.clerkjs)return this.clerkjs.organization}
15get telemetry(){if(this.clerkjs)return this.clerkjs.telemetry}get __unstable__environment(){if(this.clerkjs)return this.clerkjs.__unstable__environment}get isSignedIn(){return this.clerkjs?this.clerkjs.isSignedIn:!1}get billing(){return this.clerkjs?.billing}get __internal_state(){return this.loaded&&this.clerkjs?this.clerkjs.__internal_state:B(this,fa)}get apiKeys(){return this.clerkjs?.apiKeys}__unstable__setEnvironment(...e){if(this.clerkjs&&`__unstable__setEnvironment`in this.clerkjs)this.clerkjs.__unstable__setEnvironment(e);else return}};sa=new WeakMap,ca=new WeakMap,la=new WeakMap,ua=new WeakMap,da=new WeakMap,fa=new WeakMap,pa=new WeakMap,ma=new WeakSet,ha=function(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})},pi(ga,pa);var _a=ga;function va(e){let{isomorphicClerkOptions:t,initialState:n,children:r}=e,{isomorphicClerk:i,clerkStatus:a}=ya(t),[o,s]=_.useState({client:i.client,session:i.session,user:i.user,organization:i.organization});_.useEffect(()=>i.addListener(e=>s({...e})),[]);let c=Gi(i.loaded,o,n),l=_.useMemo(()=>({value:i}),[a]),u=_.useMemo(()=>({value:o.client}),[o.client]),{sessionId:d,sessionStatus:f,sessionClaims:p,session:m,userId:h,user:g,orgId:v,actor:y,organization:b,orgRole:x,orgSlug:S,orgPermissions:C,factorVerificationAge:w}=c,T=_.useMemo(()=>({value:{sessionId:d,sessionStatus:f,sessionClaims:p,userId:h,actor:y,orgId:v,orgRole:x,orgSlug:S,orgPermissions:C,factorVerificationAge:w}}),[d,f,h,y,v,x,S,w,p?.__raw]),E=_.useMemo(()=>({value:m}),[d,m]),D=_.useMemo(()=>({value:g}),[h,g]),O=_.useMemo(()=>({value:{organization:b}}),[v,b]);return _.createElement(Hn.Provider,{value:l},_.createElement(Zt.Provider,{value:u},_.createElement($t.Provider,{value:E},_.createElement(sn,{...O.value},_.createElement(Bn.Provider,{value:T},_.createElement(Yt.Provider,{value:D},_.createElement(rn,{value:void 0},r)))))))}var ya=e=>{let t=_.useRef(_a.getOrCreateInstance(e)),[n,r]=_.useState(t.current.status);return _.useEffect(()=>{t.current.__unstable__updateProps({appearance:e.appearance})},[e.appearance]),_.useEffect(()=>{t.current.__unstable__updateProps({options:e})},[e.localization]),_.useEffect(()=>(t.current.on(`status`,r),()=>{t.current&&t.current.off(`status`,r),_a.clearInstance()}),[]),{isomorphicClerk:t.current,clerkStatus:n}};function ba(e){let{initialState:t,children:n,__internal_bypassMissingPublishableKey:r,...i}=e,{publishableKey:a=``,Clerk:o}=i;return!o&&!r&&(a?a&&!le(a)&&Rn.throwInvalidPublishableKeyError({key:a}):Rn.throwMissingPublishableKeyError()),_.createElement(va,{initialState:t,isomorphicClerkOptions:i},n)}var xa=kr(ba,`ClerkProvider`,Wn);xa.displayName=`ClerkProvider`,zn({packageName:`@clerk/clerk-react`}),Li(`@clerk/clerk-react`);async function Sa(e,t={}){let n=await fetch(e,{headers:{"Content-Type":`application/json`,...t.headers},...t});if(n.status===401&&!e.includes(`/auth/`))return Ra(`/signin`),null;let r;try{r=await n.json()}catch{throw Error(`Server error (${n.status})`)}if(!r.ok)throw Error(r.error||`API error`);return r.data}async function Ca(e,t){return Sa(e,{method:`POST`,body:JSON.stringify(t)})}async function wa(e,t){return Sa(e,{method:`PUT`,body:JSON.stringify(t)})}async function Ta(e,t){return Sa(e,{method:`DELETE`,body:t?JSON.stringify(t):void 0})}async function Ea(e){return Sa(e)}function Da(e){return e?{email:e.email,name:e.displayName||e.email.split(`@`)[0],handle:e.connected?.x?.handle||``,onboardingStep:e.onboardingStep,privacyAgreedAt:e.privacyAgreedAt||null,privacyAgreedVersion:e.privacyAgreedVersion||null,joined:e.joined,interests:e.interests?.topics||[],interestDescription:e.interests?.description||``,antiTopics:e.interests?.antiTopics||[],reading:{articleLayout:`long-read`,briefingLayout:`clipboard`,shelfLayout:`board`,...e.reading||{}},connected:{x:e.connected?.x?{connected:!0,handle:e.connected.x.handle||``,enabled:e.connected.x.enabled}:{connected:!1,handle:``,enabled:!1},reddit:e.connected?.reddit?{connected:!0,handle:e.connected.reddit.handle||``,enabled:e.connected.reddit.enabled}:{connected:!1,handle:``,enabled:!1},linkedin:e.connected?.linkedin?{connected:!0,handle:e.connected.linkedin.handle||``,enabled:e.connected.linkedin.enabled}:{connected:!1,handle:``,enabled:!1}},digestCount:e.digestCount||0,avatarUrl:e.avatarUrl}:null}function Oa(e){if(!e)return new Date(NaN);let t=/Z$|[+-]\d{2}:?\d{2}$/.test(e);return new Date(t?e:e+`Z`)}function ka(e){if(!e)return null;let t=Oa(e.date);return{id:e.id||e.slug,slug:e.slug,date:e.date,day:t.toLocaleDateString(`en-US`,{weekday:`long`}),title:e.title||`Edition ${e.slug}`,deck:e.deck||``,alsoToday:e.alsoToday||``,topics:[],itemCount:e.itemCount||0,sources:e.sources||{},topicCount:e.topicCount||0,readMin:e.readMin,articleReadMin:e.articleReadMin,briefingReadMin:e.briefingReadMin,article:e.article||null,briefing:e.briefing||null,hasArticle:e.hasArticle,hasBriefing:e.hasBriefing,newsletter:e.newsletter||null}}function Aa(e){if(!Array.isArray(e)||e.length===0||e.length===7)return`Daily`;let t=new Set(e.map(Number)),n=[0,1,2,3,4].every(e=>t.has(e))&&!t.has(5)&&!t.has(6),r=t.has(5)&&t.has(6)&&[0,1,2,3,4].every(e=>!t.has(e));if(n)return`Weekdays`;if(r)return`Weekends`;let i=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`];return[...t].sort().map(e=>i[e]).join(`, `)}function ja(e){if(!e)return null;let t=e.sendHour,n=e.sendMinute,r=t>=12?`PM`:`AM`,i=t%12||12,a=n.toString().padStart(2,`0`),o=Array.isArray(e.daysOfWeek)?e.daysOfWeek:[0,1,2,3,4,5,6];return{id:e.id,name:e.name,format:e.digestFormat,schedule:`${Aa(o)} · ${i}:${a} ${r} · ${e.timezone}`,sources:e.platforms,count:e.count,lastSent:e.lastFiredAt,active:e.enabled,sendHour:e.sendHour,sendMinute:e.sendMinute,timezone:e.timezone,topics:e.topics,separateByPlatform:e.separateByPlatform,platformWeights:e.platformWeights,daysOfWeek:o,nextSendAt:e.nextSendAt,lastDuration:e.lastDuration}}var Ma=null;
15async function Na(){if(Ma)return Ma;try{let e=await Ea(`/api/bootstrap`);return Ma={user:Da(e.user),digests:(e.digests||[]).map(ka),newsletters:(e.newsletters||[]).map(ja),preferences:e.preferences||{}},Ma}catch{return Ma={user:null,digests:[],newsletters:[],preferences:{}},Ma}}var Pa=`breve_state_v1`;function Fa(){try{let e=localStorage.getItem(Pa);return e?JSON.parse(e):null}catch{return null}}function Ia(e){try{localStorage.setItem(Pa,JSON.stringify(e))}catch{}}function La(){let[e,t=``]=(window.location.hash.replace(/^#/,``)||`/`).split(`?`),n={};return t.split(`&`).filter(Boolean).forEach(e=>{let[t,r]=e.split(`=`);n[t]=decodeURIComponent(r||``)}),{path:e,params:n}}function Ra(e){window.location.hash=e}var za={avatarShape:`circle`,theme:`light`};function Ba(e){typeof document>`u`||(e===`dark`?document.documentElement.dataset.theme=`dark`:delete document.documentElement.dataset.theme)}(function(){try{let e=localStorage.getItem(Pa);if(!e)return;JSON.parse(e)?.tweaks?.theme===`dark`&&Ba(`dark`)}catch{}})();function Va(){let[e,t]=(0,_.useState)(Ma),[n,r]=(0,_.useState)(()=>Fa()||{auth:{signedIn:!1},tweaks:{...za},pinned:[]}),[i,a]=(0,_.useState)(Ha());(0,_.useEffect)(()=>{e||Na().then(e=>{t(e),e.user?r(t=>({...t,auth:{signedIn:!0,email:e.user.email}})):r(e=>e.auth?.signedIn?{...e,auth:{signedIn:!1}}:e)})},[]),(0,_.useEffect)(()=>{if(i)return;let e=!1,t=0,n=setInterval(()=>{if(e)return;t+=1;let r=Ha();(r||t>20)&&(clearInterval(n),r&&a(r))},300);return()=>{e=!0,clearInterval(n)}},[i]),(0,_.useEffect)(()=>{Ia(n)},[n]),(0,_.useEffect)(()=>{Ba(n?.tweaks?.theme)},[n?.tweaks?.theme]);let o=async e=>{Ma=null;let t=await Na();if(t.user)return t;let n={...t,user:e};return Ma=n,n};return{data:e,setData:t,local:n,extension:i,signIn:(0,_.useCallback)(async(e,n)=>{let i=Da((await Ca(`/api/auth/login`,{email:e,password:n})).user),a=await o(i);t(a);let s=a.preferences?.tweaks||{};return r({auth:{signedIn:!0,email:i.email},tweaks:{...za,...s},pinned:[]}),i},[]),signUp:(0,_.useCallback)(async(e,n,i)=>{let a=Da((await Ca(`/api/auth/signup`,{email:e,password:n,displayName:i})).user),s=await o(a);t(s);let c=s.preferences?.tweaks||{};return r({auth:{signedIn:!0,email:a.email},tweaks:{...za,...c},pinned:[]}),a},[]),signInWithClerk:(0,_.useCallback)(async e=>{let n=Da((await Ca(`/api/auth/clerk`,{token:e})).user),i=await o(n);t(i);let a=i.preferences?.tweaks||{};return r({auth:{signedIn:!0,email:n.email},tweaks:{...za,...a},pinned:[]}),n},[]),signOut:(0,_.useCallback)(async()=>{try{await Ca(`/api/auth/logout`)}catch{}try{typeof window<`u`&&window.Clerk?.signOut&&await window.Clerk.signOut()}catch{}Ma=null,t({user:null,digests:[],newsletters:[],preferences:{}}),r({auth:{signedIn:!1},tweaks:{...za},pinned:[]})},[]),updateTweaks:(0,_.useCallback)(e=>{r(t=>({...t,tweaks:{...t.tweaks,...e}})),wa(`/api/preferences/tweaks`,e).catch(()=>{})},[]),togglePinned:(0,_.useCallback)(e=>{r(t=>{let n=t.pinned.includes(e);return{...t,pinned:n?t.pinned.filter(t=>t!==e):[...t.pinned,e]}})},[]),updateUser:(0,_.useCallback)(e=>{t(t=>({...t,user:{...t.user,...e}}))},[]),updateConnected:(0,_.useCallback)((e,n)=>{t(t=>({...t,user:{...t.user,connected:{...t.user.connected,[e]:{...t.user.connected[e],...n}}}}))},[]),updateNewsletter:(0,_.useCallback)((e,n)=>{t(t=>({...t,newsletters:t.newsletters.map(t=>t.id===e?{...t,...n}:t)}))},[]),addNewsletter:(0,_.useCallback)(e=>{t(t=>({...t,newsletters:[...t.newsletters,e]}))},[]),refreshData:(0,_.useCallback)(async()=>{Ma=null;let e=await Na();t(e),e.user&&r(t=>({...t,auth:{signedIn:!0,email:e.user.email}}))},[]),addDigest:(0,_.useCallback)(e=>{t(t=>
15({...t,digests:[ka(e),...t.digests||[]]}))},[]),removeDigest:(0,_.useCallback)(e=>{t(t=>({...t,digests:(t.digests||[]).filter(t=>t.slug!==e)}))},[]),restoreDigestLocal:(0,_.useCallback)(e=>{t(t=>({...t,digests:[ka(e),...(t.digests||[]).filter(t=>t.slug!==e.slug)].sort((e,t)=>new Date(t.date)-new Date(e.date))}))},[])}}function Ha(){if(typeof document>`u`)return null;let e=document.querySelector(`meta[name="breve-extension"]`);if(!e)return null;let[t,n]=(e.getAttribute(`content`)||``).split(`:`);return t?{id:t,version:n||`0.0.0`}:null}var Ua=0;function Wa(e,{timeoutMs:t=6e4}={}){return new Promise((n,r)=>{if(typeof window>`u`){r(Error(`No window context`));return}let i=`breve-${Date.now()}-${++Ua}`,a=e=>{if(e.source!==window)return;let t=e.data;if(!t||t.source!==`breve-ext`||t.id!==i)return;s();let a=t.response;if(!a){r(Error(`Extension did not respond`));return}a.ok===!1?r(Error(a.error||`Extension error`)):n(a.data??a)},o=setTimeout(()=>{s(),r(Error(`Extension request timed out after ${t}ms`))},t);function s(){window.removeEventListener(`message`,a),clearTimeout(o)}window.addEventListener(`message`,a),window.postMessage({source:`breve-spa`,id:i,payload:e},`*`)})}var Ga=45e3,Ka=[`collecting`,`enriching`,`heuristics`,`classifying`,`synthesizing`,`finalizing`,`done`,`error`];function qa({runId:e,slug:t,beforeId:n,store:r,onCompleteNav:i,doneToast:a,stageMap:o}){let s=o||{collecting:`SCROLLING`,enriching:`READING`,heuristics:`FILTERING`,classifying:`GROUPING`,synthesizing:`WRITING`,finalizing:`SAVING`};return(o,c,l)=>{let u=null,d=null,f=!1,p=e=>{l(),H(a||`New edition on your desk.`),i&&e&&i(e)},m=()=>{f=!0,d&&=(clearTimeout(d),null),u&&=(u.close(),null)},h=()=>{f||(m(),r.refreshData().then(()=>{let e=r.data?.digests?.[0];e&&e.id!==n?p(e.id):c(`Connection interrupted — but your digest may still be generating. Close this and check back in a moment.`)}).catch(()=>{c(`Connection interrupted. Close this and refresh to check if your digest finished.`)}))},g=e=>{d&&=(clearTimeout(d),null);let n;try{n=JSON.parse(e.data)}catch{return}let i=n.stage||e.type;if(s[i])o(s[i]);else if(i===`done`){m();let e=t||n.slug;if(e)try{sessionStorage.setItem(`breve_just_brewed_${e}`,`1`)}catch{}r.refreshData().then(()=>p(e))}else if(i===`error`){if(m(),n.error===`cancelled`){l();return}c(n.message||`Something went wrong generating the digest.`)}};return u=new EventSource(`/stream/${e}`),Ka.forEach(e=>u.addEventListener(e,g)),u.onmessage=g,u.onopen=()=>{d&&=(clearTimeout(d),null)},u.onerror=()=>{if(!f){if(u.readyState===EventSource.CLOSED){h();return}d||=setTimeout(h,Ga)}},m}}var Ja=`https://chromewebstore.google.com/detail/breve/pkgpgcdlnmjdemmdjfabnplcohnfdnaa`,Ya=`The Breve browser extension isn't installed (or isn't running on this page). Breve needs it to read your X and Reddit feeds. Install it from the Chrome Web Store, or enable it at chrome://extensions if you already have it.`,Xa=`Already installed it, or just re-enabled it? Refresh this page before brewing — the extension only connects on a fresh page load.`,Za={twitter:`X`,reddit:`Reddit`,linkedin:`LinkedIn`},Qa={twitter:`https://x.com`,reddit:`https://www.reddit.com`,linkedin:`https://www.linkedin.com`};function $a({store:e,extensionPayload:t,requireExtension:n,skipSigninProbe:r,generateBody:i,onCompleteNav:a,doneToast:o,beforeId:s,onRunStarted:c}){return(l,u,d)=>{let f=!1,p=null;return(async()=>{if(n&&!t){f||u(Ya,{fatal:!0,action:{label:`Install the extension`,href:Ja},note:Xa});return}if(!r&&t?.platforms?.length){let e=null;try{e=await Promise.all(t.platforms.map(async e=>{try{return{platform:e,signedIn:!!(await Wa({type:`breve.checkSignin`,payload:{platform:e}},{timeoutMs:3e4}))?.signedIn}}catch{return{platform:e,bridgeError:!0}}}))}catch{e=null}if(f)return;if(e&&e.some(e=>e.bridgeError)){f||u(`Couldn't reach the Breve extension to check your sign-in. Open chrome://extensions to confirm it's enabled, reload this page, then try again.`,{fatal:!0,action:{label:`Open the Chrome Web Store`,href:Ja},note:Xa});return}if(e){let t=e.filter(e=>!e.signedIn).map(e=>e.platform);if(t.length){let e=t.map(e=>Za[e]||e),n=e.length===1?e[0]:e.join(` and `),r=e.length===1?`it`:`them`,i=t.length===1?{label:`Open ${e[0]}`,href:Qa[t[0]]}:null;f||u(`You're not signed into ${n} in this browser. Breve brews from your live feeds, so you need an active session for every platform in a brew. Sign into ${n} in another tab, then brew again — or remove ${r} from this brew.`,{fatal:!0,action:i});return}}}if(l(`SCROLLING`),t){let e=null;try{e=await Wa({type:`breve.brewMany`,payload:t},{timeoutMs:48e4})}catch(e){f||u(`Extension didn't respond: `+(e.message||String(e))+`. Check chrome://extensions, reload breve, then try again.`,{fatal:!0,action:{label:`Open the Chrome Web Store`,href:Ja},note:Xa});return}if(f)return;if(Array.isArray(e)){let t=e.filter(e=>e&&e.error),n=e.filter(e=>e&&!e.error);if(t.length===e.length&&t.length>0){let e=t.map(e=>`${e.platform}: ${e.error}`).join(` / `),n=/not authenticated|not connected to breve|invalid token|missing bearer|empty bearer|unauthor/i.test(e);
15if(/message channel closed|message port closed|closed before a response|listener indicated an asynchronous response/i.test(e)){let e={twitter:`X`,x:`X`,reddit:`Reddit`},n=[...new Set(t.map(t=>e[t.platform]||t.platform))],r=n.length?n.join(` and `):`the platform`;f||u(`Looks like your ${r} tab or window closed while the edition was brewing. Breve reads your live feed there, so it has to stay open until brewing finishes. Reopen ${r} and leave the tab open, then try again.`,{fatal:!0});return}let r=n?` Your extension token is expired or invalid. On breve.now go to Profile → Sources, generate a new token, paste it into the extension's options, then try again.`:` Try signing back into the platform in another tab, then try again.`;f||u(`Extension scrape failed - `+e+`.`+r,{fatal:!0});return}t.length>0&&n.length>0&&H(`Couldn't scrape ${t.map(e=>e.platform).join(`, `)} - brewing with what we have.`)}}let m,h;try{let e=await Ca(`/api/generate`,i);m=e.runId,h=e.slug}catch(e){f||u(`Failed to start digest: `+(e.message||`unknown error`),{fatal:!0});return}if(!f){if(!m){f||(e.refreshData().catch(()=>{}),u(`No posts were available to brew this time. Sign back into X or Reddit in another tab, then try brewing from the dashboard.`,{fatal:!0}));return}typeof c==`function`&&c(m),p=qa({runId:m,slug:h,beforeId:s,store:e,onCompleteNav:a,doneToast:o})(l,u,d)}})(),()=>{f=!0,typeof p==`function`&&p()}}}var eo=null;function to(e){eo=e}function no(){eo=null}function H(e){eo&&eo(e)}var ro=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),U=o(((e,t)=>{t.exports=ro()}))();function io(e,t=0){let n=e,r=t,i=n*.12,a=n*.74,o=n*.32,s=n*.44,c=n*.18,l=n*.96;return[`M ${r+i} ${r}`,`L ${r+n-i} ${r}`,`Q ${r+n} ${r} ${r+n} ${r+i}`,`L ${r+n} ${r+a-i}`,`Q ${r+n} ${r+a} ${r+n-i} ${r+a}`,`L ${r+s} ${r+a}`,`L ${r+c} ${r+l}`,`L ${r+o} ${r+a}`,`L ${r+i} ${r+a}`,`Q ${r} ${r+a} ${r} ${r+a-i}`,`L ${r} ${r+i}`,`Q ${r} ${r} ${r+i} ${r}`,`Z`].join(` `)}function ao(e){return e===`burst`?`comic`:e}var oo=[{key:`ink`,fill:`#111111`,text:`#f7f1df`,label:`Ink`},{key:`red`,fill:`#b5302a`,text:`#f7f1df`,label:`Press`},{key:`blue`,fill:`#2c4a7a`,text:`#f7f1df`,label:`Inkwell`},{key:`teal`,fill:`#1f6b66`,text:`#f7f1df`,label:`Teal`},{key:`olive`,fill:`#5d6a35`,text:`#f7f1df`,label:`Olive`},{key:`rust`,fill:`#a05a2c`,text:`#f7f1df`,label:`Rust`},{key:`plum`,fill:`#5e3457`,text:`#f7f1df`,label:`Plum`},{key:`sand`,fill:`#e0d2a8`,text:`#1a140d`,label:`Sand`}];function so(e){return oo.find(t=>t.key===e)||oo[0]}function co({size:e,avatarUrl:t,initials:n,shape:r=`circle`,borderWidth:i=2,bgColorKey:a,style:o={}}){let s=(0,_.useRef)(`bst-${Math.random().toString(36).slice(2,8)}`).current,c=so(a||`ink`),l=ao(r);if(l===`comic`){let r=io(e),a=e*.37;return(0,U.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 ${e} ${e}`,style:{display:`block`,flexShrink:0,...o},children:[(0,U.jsx)(`defs`,{children:(0,U.jsx)(`clipPath`,{id:s,children:(0,U.jsx)(`path`,{d:r})})}),t?(0,U.jsx)(`image`,{href:t,width:e,height:e,clipPath:`url(#${s})`,preserveAspectRatio:`xMidYMid slice`}):(0,U.jsx)(`path`,{d:r,fill:c.fill}),(0,U.jsx)(`path`,{d:r,fill:`none`,stroke:`var(--ink)`,strokeWidth:i,strokeLinejoin:`round`}),!t&&(0,U.jsx)(`text`,{x:`50%`,y:a,textAnchor:`middle`,dy:`.35em`,fill:c.text,fontFamily:`var(--f-display)`,fontWeight:`900`,fontSize:e*.32,letterSpacing:`0.05em`,children:n})]})}return(0,U.jsx)(`div`,{style:{width:e,height:e,borderRadius:l===`circle`?`50%`:Math.max(2,e*.1)+`px`,border:`${i}px solid var(--ink)`,background:t?`url(${t}) center/cover no-repeat`:c.fill,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,color:c.text,fontFamily:`var(--f-display)`,fontWeight:900,fontSize:e*.36,lineHeight:1,letterSpacing:`0.05em`,boxSizing:`border-box`,flexShrink:0,...o},children:!t&&n})}function W({route:e,store:t}){let{data:n,local:r,updateTweaks:i}=t,a=r.auth?.signedIn,o=r?.tweaks?.theme||`light`;return(0,U.jsxs)(`div`,{className:`top-bar`,children:[(0,U.jsxs)(`a`,{className:`brand`,href:`#/home`,"aria-label":`Breve home`,children:[(0,U.jsxs)(`span`,{className:`brand-word`,children:[(0,U.jsx)(`span`,{className:`brand-mark`,children:`B`}),`REVE`]}),(0,U.jsx)(`span`,{className:`brand-sub`,children:`· daily digest`})]}),a&&(0,U.jsx)(`nav`,{className:`top-bar-nav`,children:[{path:`/home`,label:`Today`},{path:`/history`,label:`Past digests`},{path:`/newsletters`,label:`Schedule`},{path:`/manifesto`,label:`About us`,accent:!0}].map(t=>{let n=t.path.replace(`/`,``);return(0,U.jsx)(`a`,{href:`#`+t.path,"data-label":t.label,"data-slug":n,className:e.path.startsWith(t.path)?`active`:``,children:t.label},t.path)})}),(0,U.jsx)(`div`,{className:`top-bar-user`,children:a?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(G,{store:t}),(0,U.jsx)(lo,{theme:o,onToggle:e=>i({theme:e})}),(0,U.jsx)(uo,{data:n,avatarShape:r.tweaks?.avatarShape||`circle`,avatarColorKey:r.tweaks?.avatarColor||`ink`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(lo,{theme:o,onToggle:e=>i({theme:e})}),(0,U.jsx)(`a`,{className:`ink-link f-cond`,href:`#/signin`,style:{fontSize:12,letterSpacing:`0.12em`,textTransform:`uppercase`},children:`Sign in`}),(0,U.jsx)(`a`,{href:`#/signup`,className:`sketch-btn sb-red`,style:{padding:`10px 20px`,fontSize:13,fontWeight:700,letterSpacing:`0.08em`},children:`Start your edition`})]})})]})}function G({store:e}){let t=e.extension;return(0,_.useEffect)(()=>
15{if(t)return;let e=()=>{if(document.visibilityState!==`visible`)return;let e=!1;try{e=sessionStorage.getItem(`breve.extReloadArmed`)===`1`}catch{}if(e&&!Ha()){try{sessionStorage.removeItem(`breve.extReloadArmed`)}catch{}window.location.reload()}};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[t]),t?(0,U.jsxs)(`span`,{className:`ext-pill ext-pill--on`,title:`Breve extension installed${t.version?` · v${t.version}`:``}`,children:[(0,U.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M20 6 9 17l-5-5`})}),(0,U.jsx)(`span`,{className:`ext-pill-label`,children:`Extension installed`})]}):(0,U.jsxs)(`a`,{className:`ext-pill`,href:Ja,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>{try{sessionStorage.setItem(`breve.extReloadArmed`,`1`)}catch{}},title:`Get the Breve browser extension — it reads your X and Reddit feeds`,children:[(0,U.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.236 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z`})}),(0,U.jsx)(`span`,{className:`ext-pill-label`,children:`Get extension`})]})}function lo({theme:e,onToggle:t}){let n=e===`dark`;return(0,U.jsxs)(`button`,{type:`button`,className:`theme-toggle`,onClick:()=>t(n?`light`:`dark`),"aria-label":n?`Switch to light mode`:`Switch to dark mode`,title:n?`Switch to light mode`:`Switch to dark mode`,"data-theme":n?`dark`:`light`,children:[(0,U.jsxs)(`svg`,{className:`theme-toggle-sun`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,U.jsx)(`path`,{d:`M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41`})]}),(0,U.jsx)(`svg`,{className:`theme-toggle-moon`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,U.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z`})})]})}function uo({data:e,avatarShape:t,avatarColorKey:n}){let[r,i]=(0,_.useState)(!1),a=(e?.user?.name||`A M`).split(` `).map(e=>e[0]).join(``).slice(0,2),o=e?.user?.avatarUrl;return(0,U.jsxs)(`div`,{style:{position:`relative`},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,U.jsx)(`a`,{href:`#/profile`,"aria-label":`Go to profile`,style:{display:`inline-block`,textDecoration:`none`,filter:`drop-shadow(2px 2px 0 rgba(17,17,17,0.25))`,transition:`transform .15s`,transform:r?`translate(-1px,-1px)`:`none`},children:(0,U.jsx)(co,{size:36,avatarUrl:o,initials:a,shape:t||`circle`,bgColorKey:n})}),r&&(0,U.jsxs)(`div`,{style:{position:`absolute`,top:`calc(100% + 6px)`,right:-12,transform:`rotate(-3deg)`,pointerEvents:`none`,zIndex:500,animation:`bubblePop .2s ease-out`},children:[(0,U.jsxs)(`svg`,{width:`190`,height:`100`,viewBox:`0 0 190 100`,style:{display:`block`,filter:`drop-shadow(2px 2px 0 rgba(17,17,17,0.22))`,overflow:`visible`},children:[(0,U.jsx)(`g`,{fill:`rgba(249, 244, 230, 0.94)`,stroke:`var(--press-red)`,strokeWidth:`2.6`,strokeLinejoin:`miter`,strokeLinecap:`round`,children:(0,U.jsx)(`path`,{d:`M150 42 L168 18 L158 34 L176 10 L166 30 L180 26 L172 38 L178 42 Z`})}),(0,U.jsx)(`g`,{fill:`rgba(249, 244, 230, 0.94)`,stroke:`var(--press-red)`,strokeWidth:`2.6`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,U.jsx)(`path`,{d:`M5 46 L183 42 L186 92 L8 96 Z`})}),(0,U.jsxs)(`g`,{fill:`none`,stroke:`var(--press-red)`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,U.jsx)(`path`,{d:`M8 48 Q60 44 120 44 T181 45`}),(0,U.jsx)(`path`,{d:`M184 45 Q187 64 185 90`}),(0,U.jsx)(`path`,{d:`M182 94 Q120 97 60 95 T10 96`}),(0,U.jsx)(`path`,{d:`M7 94 Q4 70 6 48`}),(0,U.jsx)(`path`,{d:`M14 52 L175 48`,strokeWidth:`1.2`,opacity:`0.55`}),(0,U.jsx)(`path`,{d:`M12 90 L178 89`,strokeWidth:`1.2`,opacity:`0.55`})]})]}),(0,U.jsxs)(`div`,{style:{position:`absolute`,top:42,left:0,width:186,height:54,display:`flex`,alignItems:`center`,justifyContent:`center`,fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:20,fontWeight:600,color:`var(--press-red)`,letterSpacing:`-0.005em`},children:[(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,marginRight:8,fontSize:18,fontWeight:700}}),o?`that's you!`:`it's you!`]})]})]})}function fo({file:e,existingUrl:t,onSave:n,onCancel:r,initialShape:i=`circle`,initialColorKey:a=`ink`,initials:o=`??`}){let[s,c]=(0,_.useState)(t||null),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(1),[p,m]=(0,_.useState)({x:0,y:0}),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(i),[b,x]=(0,_.useState)(a),S=(0,_.useRef)(null),C=(0,_.useRef)(null),w=(0,_.useRef)(null),T=(0,_.useRef)(),E=(0,_.useRef)(`cm-${Math.random().toString(36).slice(2,8)}`).current,D=so(b),O=!!s;(0,_.useEffect)(()=>
15{if(!e)return;let t=new FileReader;t.onload=()=>{c(t.result),u(null),f(1),m({x:0,y:0})},t.readAsDataURL(e)},[e]);let k=e=>{let t=e.target.files?.[0];if(!t)return;if(t.size>5*1024*1024){H(`Image too large — max 5 MB.`);return}let n=new FileReader;n.onload=()=>{c(n.result),u(null),f(1),m({x:0,y:0})},n.readAsDataURL(t),e.target.value=``},ee=l?Math.max(280/l.w,280/l.h):1,A=l?l.w*ee:280,j=l?l.h*ee:280,te=A*d,ne=j*d,re=(e,t,n)=>({x:Math.max(-(t-240)/2,Math.min((t-240)/2,e.x)),y:Math.max(-(n-240)/2,Math.min((n-240)/2,e.y))});T.current={zoom:d,baseW:A,baseH:j},(0,_.useEffect)(()=>{let e=C.current;if(!e)return;let t=e=>{e.preventDefault();let{zoom:t,baseW:n,baseH:r}=T.current,i=Math.max(1,Math.min(3,t+(e.deltaY>0?-.06:.06)));f(i),m(e=>re(e,n*i,r*i))};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[]);let M=e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),g(!0),S.current={sx:e.clientX,sy:e.clientY,so:{...p}}},N=e=>{if(!S.current)return;let t=e.clientX-S.current.sx,n=e.clientY-S.current.sy;m(re({x:S.current.so.x+t,y:S.current.so.y+n},te,ne))},ie=()=>{S.current=null,g(!1)},ae=e=>{let t=parseFloat(e.target.value);f(t),m(e=>re(e,A*t,j*t))},oe=()=>{if(!O){n(null,v,b);return}if(!l||!s)return;let e=document.createElement(`canvas`);e.width=256,e.height=256;let t=e.getContext(`2d`),r=new Image;r.onload=()=>{let i=(280-te)/2+p.x,a=(280-ne)/2+p.y,o=(20-i)/(ee*d),s=(20-a)/(ee*d),c=240/(ee*d);t.drawImage(r,o,s,c,c,0,0,256,256),n(e.toDataURL(`image/jpeg`,.92),v,b)},r.src=s},se=()=>{c(null),u(null),f(1),m({x:0,y:0})},P=(280-te)/2+p.x,F=(280-ne)/2+p.y,I=ao(v),ce=I===`circle`?(0,U.jsx)(`circle`,{cx:140,cy:140,r:240/2,fill:`black`}):I===`square`?(0,U.jsx)(`rect`,{x:20,y:20,width:240,height:240,rx:`6`,fill:`black`}):(0,U.jsx)(`path`,{d:io(240,20),fill:`black`}),le=I===`circle`?(0,U.jsx)(`circle`,{cx:140,cy:140,r:240/2,fill:`none`,stroke:`rgba(255,255,255,0.35)`,strokeWidth:`2`}):I===`square`?(0,U.jsx)(`rect`,{x:20,y:20,width:240,height:240,rx:`6`,fill:`none`,stroke:`rgba(255,255,255,0.35)`,strokeWidth:`2`}):(0,U.jsx)(`path`,{d:io(240,20),fill:`none`,stroke:`rgba(255,255,255,0.35)`,strokeWidth:`2`,strokeLinejoin:`round`}),ue=(e,t=16)=>e===`circle`?(0,U.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 20 20`,children:(0,U.jsx)(`circle`,{cx:`10`,cy:`10`,r:`8`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`})}):e===`square`?(0,U.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 20 20`,children:(0,U.jsx)(`rect`,{x:`2`,y:`2`,width:`16`,height:`16`,rx:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`})}):(0,U.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 20 20`,children:(0,U.jsx)(`path`,{d:io(16,2),fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`})});return(0,U.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:9999,background:`rgba(0,0,0,0.6)`,display:`flex`,alignItems:`center`,justifyContent:`center`},onClick:r,children:(0,U.jsxs)(`div`,{className:`paper paper-cream`,onClick:e=>e.stopPropagation(),style:{border:`3px solid var(--ink)`,padding:`24px 28px`,boxShadow:`8px 8px 0 rgba(0,0,0,0.35)`,maxWidth:380,width:`92vw`},children:[(0,U.jsxs)(`div`,{style:{marginBottom:16},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:6},children:`Profile`}),(0,U.jsx)(`h3`,{className:`f-display`,style:{fontSize:28,margin:0,lineHeight:1},children:O?`Change your look.`:`Pick your portrait.`})]}),O?(0,U.jsxs)(`div`,{ref:C,onPointerDown:M,onPointerMove:N,onPointerUp:ie,style:{position:`relative`,width:280,height:280,margin:`0 auto`,overflow:`hidden`,cursor:h?`grabbing`:`grab`,background:`#1a1410`,touchAction:`none`,borderRadius:2},children:[(0,U.jsx)(`img`,{src:s,onLoad:e=>u({w:e.target.naturalWidth,h:e.target.naturalHeight}),draggable:!1,style:{position:`absolute`,left:P,top:F,width:te,height:ne,pointerEvents:`none`,userSelect:`none`}}),(0,U.jsxs)(`svg`,{width:280,height:280,style:{position:`absolute`,inset:0,pointerEvents:`none`},children:[(0,U.jsx)(`defs`,{children:(0,U.jsxs)(`mask`,{id:E,children:[(0,U.jsx)(`rect`,{width:280,height:280,fill:`white`}),ce]})}),(0,U.jsx)(`rect`,{width:280,height:280,fill:`rgba(0,0,0,0.55)`,mask:`url(#${E})`}),le]})]}):(0,U.jsx)(`div`,{style:{width:280,height:280,margin:`0 auto`,background:`var(--cream-2)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1.5px dashed var(--ink-soft)`},children:(()=>{let e=I===`comic`,t=e?108.8:`50%`,n=e?240*.36:240*.42;return(0,U.jsxs)(`svg`,{width:280,height:280,style:{display:`block`},children:[I===`circle`&&(0,U.jsx)(`circle`,{cx:280/2,cy:280/2,r:240/2,fill:
15D.fill}),I===`square`&&(0,U.jsx)(`rect`,{x:20,y:20,width:240,height:240,rx:`6`,fill:D.fill}),I===`comic`&&(0,U.jsx)(`path`,{d:io(240,20),fill:D.fill}),(0,U.jsx)(`text`,{x:`50%`,y:t,textAnchor:`middle`,dy:`.35em`,fill:D.text,fontFamily:`var(--f-display)`,fontWeight:`900`,fontSize:n,letterSpacing:`0.05em`,children:o})]})})()}),O?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,margin:`14px auto 0`,width:280},children:[(0,U.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--ink-soft)`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,U.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,U.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`}),(0,U.jsx)(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`})]}),(0,U.jsx)(`input`,{type:`range`,min:`1`,max:`3`,step:`0.01`,value:d,onChange:ae,style:{flex:1,accentColor:`var(--press-red)`}}),(0,U.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--ink-soft)`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,U.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,U.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`}),(0,U.jsx)(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`}),(0,U.jsx)(`line`,{x1:`11`,y1:`8`,x2:`11`,y2:`14`})]})]}),(0,U.jsx)(`div`,{className:`f-mono`,style:{textAlign:`center`,fontSize:9,color:`var(--ink-soft)`,letterSpacing:`0.1em`,marginTop:6,textTransform:`uppercase`},children:`Drag to reposition · scroll or slide to zoom`})]}):(0,U.jsx)(`div`,{className:`f-mono`,style:{textAlign:`center`,fontSize:9,color:`var(--ink-soft)`,letterSpacing:`0.1em`,marginTop:12,textTransform:`uppercase`},children:`Pick a colour for your initials, or upload a photo below`}),!O&&(0,U.jsx)(`div`,{className:`avatar-swatch-row`,children:oo.map(e=>(0,U.jsx)(`button`,{onClick:()=>x(e.key),"aria-label":e.label,title:e.label,className:`avatar-swatch`+(b===e.key?` is-active`:``),style:{background:e.fill}},e.key))}),(0,U.jsx)(`div`,{className:`avatar-shape-row`,children:[`circle`,`square`].map(e=>(0,U.jsxs)(`button`,{onClick:()=>y(e),className:`avatar-shape-btn f-cond`+(I===e?` is-active`:``),children:[(0,U.jsx)(`span`,{className:`avatar-shape-btn-glyph`,children:ue(e,14)}),(0,U.jsx)(`span`,{className:`avatar-shape-btn-label`,children:e})]},e))}),(0,U.jsxs)(`div`,{className:`avatar-modal-actions`,children:[(0,U.jsxs)(`div`,{style:{display:`flex`,gap:14,alignItems:`center`},children:[(0,U.jsxs)(`button`,{onClick:()=>w.current?.click(),className:`avatar-link-btn`,children:[(0,U.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,U.jsx)(`polyline`,{points:`17 8 12 3 7 8`}),(0,U.jsx)(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})]}),O?`Upload new`:`Upload photo`]}),O&&(0,U.jsx)(`button`,{onClick:se,className:`avatar-link-btn is-muted`,children:`Remove`})]}),(0,U.jsx)(`input`,{ref:w,type:`file`,accept:`image/*`,onChange:k,style:{display:`none`}}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10},children:[(0,U.jsx)(`button`,{onClick:r,className:`avatar-modal-btn`,children:`Cancel`}),(0,U.jsx)(`button`,{onClick:oe,className:`avatar-modal-btn is-save`,children:`Save`})]})]})]})})}function po(){let[e,t]=(0,_.useState)([]);return(0,_.useEffect)(()=>(to(e=>{let n=Date.now()+Math.random();t(t=>[...t,{id:n,msg:e}]),setTimeout(()=>t(e=>e.filter(e=>e.id!==n)),3200)}),()=>{no()}),[]),(0,U.jsx)(`div`,{className:`toast-host`,children:e.map(e=>(0,U.jsx)(`div`,{className:`toast`,children:e.msg},e.id))})}var mo=[`SCROLLING`,`READING`,`FILTERING`,`GROUPING`,`WRITING`],ho=[`@teortaxesTex: the 4B model is not distilled`,`r/LocalLLaMA: "first replication: 71.2 MATH"`,`@amit: Amsterdam retail is a test case`,`@urbanist_nl: vacancy tax is a blunt instrument but..`,`@commercialtype: Söhne Breit is here`,`@rapamycin_trial: pausing — NOT a safety signal`,`@fontblog: muddy at small sizes`,`r/science: extraction paper gets cited wrong daily`,`@matter_editor: authors issued a clarification`,`r/coffee: grind coarser is a separate study`],go=[{label:`Did you know`,body:`Breve reads your feeds, not your messages. Your DMs are never fetched, never stored.`},{label:`Tip`,body:`Small newsletters beat big ones. Aim for 25 items on a weekday briefing.`},{label:`On filtering`,body:`We keep an item if three independent signals agree it's worth your time.`},{label:`Why a briefing?`,body:`The top 5 items usually tell you 80% of what matters.`}];function _o({open:e,startFn:t,onClose:n,runId:r,onFatalError:i}){let[a,o]=(0,_.useState)(`SCROLLING`),[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(0),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(0),S=(0,_.useRef)(null),C=(0,_.useRef)(null),w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useRef)(null),D=(0,_.useRef)(null);D.current=r;let O=(0,_.useCallback)(e=>{o(e);let t=mo.indexOf(e);t>=0&&c((t+.5)/mo.length)},[]),k=(0,_.useCallback)(async()=>{let e=D.current;if(!e)try{let t=await fetch(`/api/active-run`,{method:`GET`});if(t.ok){let n=await t.json();e=n?.data?.runId||n?.runId||null}}catch{}if(e)try{let t=await fetch(`/api/cancel/${e}`,{method:`POST`});
15t.ok||console.warn(`Cancel returned non-OK:`,t.status)}catch(e){console.warn(`Cancel request failed:`,e)}},[]),ee=(0,_.useCallback)((e,t)=>{if(e!==`Cancelled by user`){if(t?.fatal){i?.(e,t),k(),n();return}m(e||`Something went wrong.`),g(!1)}},[i,k,n]),A=(0,_.useCallback)(async()=>{await k(),y(!1),n()},[k,n]);(0,_.useEffect)(()=>{if(!e){o(`SCROLLING`),c(0),u(0),f(0),m(null),g(!1),y(!1),x(0),T.current=null,w.current&&=(clearInterval(w.current),null),E.current&&=(E.current(),null);return}if(t){let e=t(O,ee,n);typeof e==`function`&&(E.current=e)}return T.current=Date.now(),x(0),w.current=setInterval(()=>{T.current&&x(Math.floor((Date.now()-T.current)/1e3))},1e3),S.current=setInterval(()=>u(e=>(e+1)%ho.length),700),C.current=setInterval(()=>f(e=>(e+1)%go.length),5e3),()=>{w.current&&clearInterval(w.current),S.current&&clearInterval(S.current),C.current&&clearInterval(C.current),E.current&&=(E.current(),null)}},[e,t]);let j=e=>`${Math.floor(e/60)}:${(e%60).toString().padStart(2,`0`)}`;if(!e)return null;let te=mo.indexOf(a),ne=Math.round(s*100),re=go[d];return h?(0,U.jsxs)(`button`,{className:`pw-tab`,onClick:()=>g(!1),title:`Show digest progress (${j(b)} elapsed)`,children:[(0,U.jsxs)(`div`,{className:`pw-tab-press`,children:[(0,U.jsx)(`div`,{className:`pw-tab-platen`}),(0,U.jsxs)(`div`,{className:`pw-tab-paper`,children:[(0,U.jsx)(`div`,{}),(0,U.jsx)(`div`,{}),(0,U.jsx)(`div`,{})]})]}),(0,U.jsxs)(`span`,{className:`pw-tab-pct`,children:[ne,`%`]}),(0,U.jsx)(`span`,{className:`pw-tab-pct`,style:{fontSize:10,opacity:.7},children:j(b)})]}):(0,U.jsxs)(`div`,{className:`pw-widget`,children:[(0,U.jsx)(`div`,{className:`pw-burst`}),(0,U.jsxs)(`div`,{className:`pw-header`,children:[(0,U.jsx)(`span`,{className:`pw-badge`,children:`LIVE`}),(0,U.jsx)(`span`,{className:`pw-title`,children:`Pulling digest…`}),(0,U.jsx)(`span`,{title:`Elapsed time`,style:{fontFamily:`var(--f-mono, monospace)`,fontSize:11,letterSpacing:`0.08em`,color:`rgba(255,255,255,0.7)`,marginLeft:6},children:j(b)}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:4,marginLeft:`auto`},children:[(0,U.jsx)(`button`,{className:`pw-btn`,onClick:()=>g(!0),title:`Minimise`,children:`—`}),(0,U.jsx)(`button`,{className:`pw-btn`,onClick:()=>y(!0),title:`Cancel`,children:`✕`})]})]}),v&&(0,U.jsxs)(`div`,{className:`pw-confirm`,children:[(0,U.jsx)(`span`,{className:`pw-confirm-text`,children:`Cancel this digest?`}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,U.jsx)(`button`,{className:`pw-confirm-yes`,onClick:A,children:`Yes, cancel`}),(0,U.jsx)(`button`,{className:`pw-confirm-no`,onClick:()=>y(!1),children:`Keep going`})]})]}),(0,U.jsx)(`div`,{className:`pw-scene`,children:(0,U.jsxs)(`div`,{className:`press-scene`,children:[(0,U.jsx)(`div`,{className:`press-platen`}),(0,U.jsx)(`div`,{className:`press-paper-feed`,children:(0,U.jsxs)(`div`,{className:`press-paper-strip`,children:[(0,U.jsx)(`div`,{className:`line red`,style:{width:`72%`}}),(0,U.jsx)(`div`,{className:`line med`}),(0,U.jsx)(`div`,{className:`line short`}),(0,U.jsx)(`div`,{className:`line`}),(0,U.jsx)(`div`,{className:`line med`}),(0,U.jsx)(`div`,{className:`line short`}),(0,U.jsx)(`div`,{className:`line red`,style:{width:`45%`}}),(0,U.jsx)(`div`,{className:`line`})]})})]})}),(0,U.jsx)(`div`,{className:`pw-stages`,children:mo.map((e,t)=>(0,U.jsx)(`span`,{className:`pw-pill `+(t<te?`done`:t===te?`active`:``),children:e},e))}),(0,U.jsxs)(`div`,{className:`pw-progress`,children:[(0,U.jsx)(`div`,{className:`pw-progress-fill`,style:{width:ne+`%`}}),(0,U.jsxs)(`span`,{className:`pw-progress-label`,children:[a,` · `,ne,`%`]})]}),(0,U.jsx)(`div`,{className:`pw-ticker`,children:ho[l]}),p?(0,U.jsxs)(`div`,{className:`pw-error`,children:[p,(0,U.jsx)(`button`,{onClick:n,className:`f-cond`,style:{display:`block`,marginTop:10,background:`none`,border:`1px solid rgba(255,255,255,0.3)`,color:`#fff`,padding:`6px 16px`,fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,cursor:`pointer`},children:`Close & check your desk`})]}):(0,U.jsxs)(`div`,{className:`pw-tip`,children:[(0,U.jsxs)(`span`,{className:`pw-tip-label`,children:[re.label,`:`]}),` `,re.body]})]})}function vo({blocked:e,onClose:t}){if((0,_.useEffect)(()=>
15{if(!e)return;let n=e=>{e.key===`Escape`&&t()};window.addEventListener(`keydown`,n);let r=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{window.removeEventListener(`keydown`,n),document.body.style.overflow=r}},[e,t]),!e)return null;let{message:n,action:r,note:i}=e;return(0,U.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Couldn't brew your digest`,onClick:t,style:{position:`fixed`,inset:0,zIndex:10001,background:`rgba(0,0,0,0.62)`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:20},children:(0,U.jsxs)(`div`,{className:`paper paper-cream`,onClick:e=>e.stopPropagation(),style:{position:`relative`,border:`3px solid var(--ink)`,padding:`30px 32px 28px`,boxShadow:`10px 10px 0 rgba(0,0,0,0.35)`,maxWidth:480,width:`94vw`},children:[(0,U.jsx)(`button`,{onClick:t,"aria-label":`Dismiss`,style:{position:`absolute`,top:10,right:12,background:`none`,border:`none`,cursor:`pointer`,fontSize:20,lineHeight:1,color:`var(--ink-soft)`},children:`✕`}),(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:12,letterSpacing:`0.18em`,textTransform:`uppercase`,fontWeight:700,color:`var(--press-red)`,marginBottom:8},children:`Stop the press`}),(0,U.jsx)(`h2`,{className:`f-display`,style:{margin:`0 0 14px`,fontSize:28,lineHeight:1.08,color:`var(--ink)`},children:`Couldn't brew your digest`}),(0,U.jsx)(`p`,{className:`f-type`,style:{margin:i?`0 0 16px`:`0 0 24px`,fontSize:15,lineHeight:1.5,color:`var(--ink)`},children:n}),i&&(0,U.jsxs)(`div`,{className:`f-type`,style:{margin:`0 0 24px`,padding:`12px 14px`,border:`1.5px solid var(--press-red)`,background:`rgba(183,28,28,0.07)`,fontSize:14,lineHeight:1.5,color:`var(--ink)`},children:[(0,U.jsx)(`span`,{className:`f-cond`,style:{display:`block`,fontSize:11,letterSpacing:`0.14em`,textTransform:`uppercase`,fontWeight:700,color:`var(--press-red)`,marginBottom:4},children:`One more thing`}),i]}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`},children:[r?.href&&(0,U.jsx)(`a`,{className:`avatar-modal-btn is-save`,href:r.href,target:`_blank`,rel:`noopener noreferrer`,onClick:t,style:{textDecoration:`none`,display:`inline-block`},children:r.label}),(0,U.jsx)(`button`,{className:`avatar-modal-btn`,onClick:t,children:`Dismiss`})]})]})})}var yo={postsToScan:100,postsPerTopic:50,minQuality:4,maxDigestPosts:25,fetchFullContent:!0,separateByPlatform:!0,ignoreDedup:!1,alwaysKeep:{news:!1,politics:!1,science:!1,culture:!1}},bo=`breve_advanced_v3`,xo=[`breve_advanced_v2`,`breve_advanced_v1`];function So(){try{let e=localStorage.getItem(bo);if(e)return{...yo,...JSON.parse(e)};for(let e of xo){let t=localStorage.getItem(e);if(t){let e=JSON.parse(t),n={...yo,...e,maxDigestPosts:yo.maxDigestPosts,postsToScan:yo.postsToScan};localStorage.setItem(bo,JSON.stringify(n));for(let e of xo)localStorage.removeItem(e);return n}}return{...yo}}catch{return{...yo}}}function Co(e){try{localStorage.setItem(bo,JSON.stringify(e))}catch{}}function wo(){let[e,t]=(0,_.useState)(So);return(0,_.useEffect)(()=>{Co(e)},[e]),{adv:e,setAdv:t,patch:(e,n)=>t(t=>({...t,[e]:n})),patchKeep:(e,n)=>t(t=>({...t,alwaysKeep:{...t.alwaysKeep,[e]:n}})),resetAdv:()=>t({...yo})}}function To({adv:e,patch:t,patchKeep:n,onReset:r,compact:i}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{style:{fontSize:13,color:`var(--muted)`,marginBottom:16,fontFamily:`var(--f-type)`},children:`These fields remember your last run. They apply to every pull from the home-page button or scheduled newsletters.`}),(0,U.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:20,marginBottom:20},children:[(0,U.jsx)(Eo,{label:`Posts to scan`,sub:`Total posts pulled from your feeds before filtering. 300 ≈ 6 min collection per platform.`,children:(0,U.jsx)(Do,{value:e.postsToScan,min:20,max:300,step:10,fallback:100,onChange:e=>t(`postsToScan`,e)})}),(0,U.jsx)(Eo,{label:`Posts per topic`,sub:`Posts collected per topic search. With 25 topics × 3 platforms, 100 already runs ~10 min.`,children:(0,U.jsx)(Do,{value:e.postsPerTopic,min:10,max:100,step:5,onChange:e=>t(`postsPerTopic`,e)})}),(0,U.jsx)(Eo,{label:`Min quality`,sub:`Score 1-10; lower = more posts kept`,children:(0,U.jsx)(Do,{value:e.minQuality,min:1,max:10,step:1,onChange:e=>t(`minQuality`,e)})}),(0,U.jsx)(Eo,{label:`Max digest posts`,sub:`Cap on posts sent to the writer`,children:(0,U.jsx)(Do,{value:e.maxDigestPosts,min:5,max:100,step:5,onChange:e=>t(`maxDigestPosts`,e)})})]}),(0,U.jsx)(`div`,{style:{marginBottom:20},children:(0,U.jsx)(Eo,{label:`Enrichment`,sub:`Navigate into each tweet for full text + images`,children:(0,U.jsx)(Oo,{checked:e.fetchFullContent,onChange:e=>t(`fetchFullContent`,e),label:`Fetch full content`})})}),(0,U.jsxs)(`div`,{style:{borderTop:`1px dotted var(--ink)`,paddingTop:16,marginBottom:16},children:[(0,U.jsx)(Oo,{checked:e.ignoreDedup,onChange:e=>t(`ignoreDedup`,e),label:`Ignore dedup (testing)`,bold:!0}),(0,U.jsx)(`div`,{style:{fontSize:12,color:`var(--muted)`,marginTop:6,marginLeft:30,fontFamily:`var(--f-type)`},children:`By default Breve filters out posts already covered by a re
15cent digest so multiple brews in one day don't repeat content. Turn this on to force a re-brew of everything in the freshness window — useful for testing or when you want to revisit a feed you already brewed today.`})]}),(0,U.jsxs)(`div`,{style:{borderTop:`1px dotted var(--ink)`,paddingTop:16,marginBottom:16},children:[(0,U.jsx)(Oo,{checked:e.separateByPlatform,onChange:e=>t(`separateByPlatform`,e),label:`Separate content by platform`,bold:!0}),(0,U.jsx)(`div`,{style:{fontSize:12,color:`var(--muted)`,marginTop:6,marginLeft:30,fontFamily:`var(--f-type)`},children:`Briefings group items under each platform. Articles are written independently per platform.`})]}),(0,U.jsxs)(`div`,{style:{borderTop:`1px dotted var(--ink)`,paddingTop:16,marginBottom:10},children:[(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,marginBottom:10},children:`Always keep content from`}),(0,U.jsx)(`div`,{style:{display:`flex`,gap:20,flexWrap:`wrap`},children:[`news`,`politics`,`science`,`culture`].map(t=>(0,U.jsx)(Oo,{checked:!!e.alwaysKeep[t],onChange:e=>n(t,e),label:t.charAt(0).toUpperCase()+t.slice(1)},t))}),(0,U.jsx)(`div`,{style:{fontSize:12,color:`var(--muted)`,marginTop:8,fontFamily:`var(--f-type)`},children:`Keeps posts in these categories even if they score below the min-quality threshold.`})]}),r&&(0,U.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:8},children:(0,U.jsx)(`button`,{onClick:r,className:`f-cond`,style:{background:`transparent`,border:`none`,fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,color:`var(--ink-soft)`,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:4},children:`Reset to defaults`})})]})}function Eo({label:e,sub:t,children:n}){return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.1em`,textTransform:`uppercase`,marginBottom:8},children:e}),n,(0,U.jsx)(`div`,{style:{fontSize:11,color:`var(--muted)`,marginTop:6,fontFamily:`var(--f-type)`,lineHeight:1.4},children:t})]})}function Do({value:e,min:t,max:n,step:r,fallback:i,onChange:a}){let[o,s]=(0,_.useState)(String(e)),c=(0,_.useRef)(!1);return(0,_.useEffect)(()=>{c.current||s(String(e))},[e]),(0,U.jsx)(`input`,{type:`text`,inputMode:`numeric`,value:o,step:r,onFocus:e=>{c.current=!0,e.currentTarget.select()},onChange:e=>s(e.target.value.replace(/[^0-9]/g,``).slice(0,5)),onBlur:()=>{c.current=!1;let r=i??t;if(o===``){s(String(r)),e!==r&&a(r);return}let l=parseInt(o,10);if(isNaN(l)){s(String(r)),e!==r&&a(r);return}let u=Math.max(t,Math.min(n,l));s(String(u)),u!==e&&a(u)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.currentTarget.blur())},style:{width:`100%`,padding:`8px 10px`,fontFamily:`var(--f-mono)`,fontSize:15,fontWeight:500,background:`rgba(255,255,255,0.4)`,border:`1.5px solid var(--ink)`,color:`var(--ink)`,outline:`none`}})}function Oo({checked:e,onChange:t,label:n,bold:r}){return(0,U.jsxs)(`label`,{style:{display:`inline-flex`,alignItems:`center`,gap:10,cursor:`pointer`,userSelect:`none`},children:[(0,U.jsx)(`span`,{onClick:()=>t(!e),style:{width:20,height:20,flexShrink:0,border:`1.5px solid var(--ink)`,background:e?`var(--press-red)`:`transparent`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--paper)`,fontFamily:`var(--f-cond)`,fontSize:14,fontWeight:700,boxShadow:e?`2px 2px 0 rgba(0,0,0,0.2)`:`none`,transition:`all 0.12s`},children:e?`✓`:``}),(0,U.jsx)(`span`,{className:r?`f-cond`:`f-type`,style:{fontSize:r?13:14,letterSpacing:r?`0.04em`:0,textTransform:r?`uppercase`:`none`,fontWeight:r?600:400},children:n})]})}var ko=e=>{let t=e.currentTarget.getBoundingClientRect();e.currentTarget.style.setProperty(`--x`,(e.clientX-t.left)/t.width*100+`%`),e.currentTarget.style.setProperty(`--y`,(e.clientY-t.top)/t.height*100+`%`)},Ao={platforms:{x:!0,reddit:!0,linkedin:!1},format:`article`};function jo(){try{let e=localStorage.getItem(`breve_pull_v1`);if(!e)return{...Ao};let t=JSON.parse(e);return{...Ao,...t,platforms:{...Ao.platforms,...t.platforms||{}}}}catch{return{...Ao}}}function Mo(e){try{localStorage.setItem(`breve_pull_v1`,JSON.stringify(e))}catch{}}var No={x:`X`,reddit:`Reddit`,linkedin:`LinkedIn`},Po={x:`twitter`,reddit:`reddit`,linkedin:`linkedin`}
15,Fo={both:`Both`,article:`Article`,briefing:`Briefings`};function Io({store:e,openLoader:t,setLoaderRunId:n,open:r,setOpen:i,hidden:a}){let{data:o,updateUser:s}=e,[c,l]=(0,_.useState)(jo);(0,_.useEffect)(()=>{Mo(c)},[c]);let[u,d]=(0,_.useState)(``),{adv:f,patch:p,patchKeep:m,resetAdv:h}=wo(),[g,v]=(0,_.useState)(!1),y=()=>{g||(v(!0),setTimeout(()=>{i(!1),v(!1)},180))};(0,_.useEffect)(()=>{if(!r)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[r]);let b=o?.user?.interests||[],x=async e=>{let t=b;s({interests:e});try{await wa(`/api/profile/interests`,{topics:e,antiTopics:o.user?.antiTopics||[],description:o.user?.interestDescription||``})}catch(e){s({interests:t}),H(`Could not update topic: `+(e.message||`unknown error`))}},S=()=>{let e=u.trim();if(e){if(b.some(t=>t.toLowerCase()===e.toLowerCase())){d(``);return}if(b.length>=25){H(`Topic limit is 25. Drop one to add another.`);return}d(``),x([...b,e])}},C=e=>x(b.filter(t=>t!==e)),w=e=>l(t=>({...t,platforms:{...t.platforms,[e]:!t.platforms[e]}})),T=new Set([`x`,`reddit`]),E=Object.entries(c.platforms).filter(([e,t])=>t&&T.has(e)).map(([e])=>Po[e]||e),D=E.length>0,[O,k]=(0,_.useState)(null);return(0,_.useEffect)(()=>{if(!r||!D){k(null);return}let e=setTimeout(async()=>{try{k(await Ca(`/api/estimate`,{platforms:E,postsToScan:f.postsToScan,postsPerTopic:f.postsPerTopic,enrich:f.fetchFullContent,digestFormat:c.format,topics:b}))}catch{k(null)}},350);return()=>clearTimeout(e)},[(0,_.useMemo)(()=>JSON.stringify({p:E,s:f.postsToScan,t:f.postsPerTopic,e:f.fetchFullContent,f:c.format,topics:b}),[E.join(`|`),f.postsToScan,f.postsPerTopic,f.fetchFullContent,c.format,b.join(`|`)]),D,r]),a||!o?null:(0,U.jsxs)(U.Fragment,{children:[!r&&(0,U.jsx)(`button`,{className:`brew-handle`,onClick:()=>i(!0),"aria-label":`Brew a new edition`,children:`Brew a new edition`}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`brew-drawer-backdrop${g?` closing`:``}`,onClick:y}),(0,U.jsxs)(`aside`,{className:`brew-drawer${g?` closing`:``}`,role:`dialog`,"aria-label":`Brew a new edition`,children:[(0,U.jsxs)(`div`,{className:`bd-head`,children:[(0,U.jsx)(`div`,{className:`bd-title`,children:`Brew a new edition`}),(0,U.jsx)(`button`,{className:`bd-close`,onClick:y,"aria-label":`Close`,children:`✕`})]}),(0,U.jsx)(`div`,{className:`bd-body`,children:(0,U.jsx)(Lo,{form:{pull:c,setPull:l,togglePlatform:w,interests:b,topicDraft:u,setTopicDraft:d,addTopic:S,removeTopic:C,estimate:O,canPull:D,adv:f,patch:p,patchKeep:m,resetAdv:h,pullNow:async()=>{if(!D){H(`Pick at least one platform to brew.`);return}i(!1);let r=Math.max(f.postsToScan||100,50),a=e.extension?{platforms:E,targetPostCount:r,maxScrolls:Math.max(20,Math.ceil(r/6*2)),scrollDelayMs:1100,scrollPixels:1200,topics:b}:null,o=e.data?.digests?.[0]?.id;t($a({store:e,extensionPayload:a,requireExtension:!0,generateBody:{platforms:E,count:f.postsToScan,digestFormat:c.format,topics:b,topicCount:f.postsPerTopic,minQuality:f.minQuality,maxDigestPosts:f.maxDigestPosts,enrich:f.fetchFullContent,separateByPlatform:f.separateByPlatform,lenientCategories:f.lenientCategories,ignoreDedup:!!f.ignoreDedup,onboarding:!1},onCompleteNav:e=>{let t=c.format===`briefing`?`briefing`:`article`;Ra(`/digest/`+e+`/`+t)},doneToast:`New edition on your desk.`,beforeId:o,onRunStarted:e=>n&&n(e)}),null)},closeDrawer:y}})})]})]})]})}function Lo({form:e}){let{pull:t,setPull:n,togglePlatform:r,interests:i,topicDraft:a,setTopicDraft:o,addTopic:s,removeTopic:c,estimate:l,canPull:u,adv:d,patch:f,patchKeep:p,resetAdv:m,pullNow:h,closeDrawer:g}=e,[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),S=Bo(t,d);return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`button`,{className:`brew-pull-btn`,onClick:h,onMouseMove:ko,disabled:!u,children:(0,U.jsx)(`span`,{children:`▶ Brew New Digest`})}),(0,U.jsx)(`div`,{className:`f-type`,style:{fontSize:13,color:`var(--ink-soft)`,marginTop:12,marginBottom:4,letterSpacing:`0.02em`,lineHeight:1.5},children:S}),!u&&(0,U.jsx)(`div`,{className:`f-type`,style:{fontSize:13,color:`var(--press-red)`,marginTop:6},children:`Pick at least one platform below.`}),u&&(l?.timeRangeSeconds?(0,U.jsxs)(`div`,{className:`brew-estimate`,children:[(0,U.jsxs)(`div`,{className:`brew-estimate-meta`,children:[(0,U.jsx)(`div`,{className:`brew-estimate-label`,children:`Estimated time`}),(0,U.jsxs)(`div`,{className:`brew-estimate-value`,children:[`~`,zo(l.timeRangeSeconds)]})]}),l.timeBasis&&(0,U.jsx)(`div`,{className:`brew-estimate-note`,children:l.timeBasis})]}):(0,U.jsx)(`div`,{className:`brew-estimate-pending`,children:`Estimating…`})),(0,U.jsxs)(`button`,{className:`bd-disclosure`,"aria-expanded":v,onClick:()=>y(e=>!e),style:{marginTop:22},children:[(0,U.jsx)(`span`,{className:`bd-chevron`,children:`▶`}),`Customize this brew`]}),v&&(0,U.jsxs)(`div`,{style:{paddingBottom:8},children:[(0,U.jsx)(Ro,{children:`Platforms`}),(0,U.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`,marginBottom:8},children:[`x`,`reddit`].map(e=>{let n=t.platforms[e];return(0,U.jsxs)(`button`,{type:`button`,className:`brew-chip`,"data-active":n||void 0,onClick:()=>r(e),children:[(0,U.jsx)(`span`,{className:`brew-chip-mark`}),No[e]]},e)})}),(0,U.jsx)(`div`,{className:`f-type`,style:{fontSize:11,color:`var(--muted)`,marginBottom:18,lineHeight:1.4},children:`Pick the feeds to brew from. We'll check you're signed into each one before pulling.`}),(0,U.jsxs)(Ro,{children:[`Topics to search`,(0,U.jsx)(`span`,{style:{opacity:.7,textTransform:`none`,letterSpacing:0,marginLeft:8,fontSize:11},children:`— synced with your profile`})]}),(0,U.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6,alignItems:`center`,border:`1.5px solid var(--ink)`,padding:`6px 8px`,marginBottom:18,background:`rgba(255,255,255,0.4)`,minHeight:38},children:[i.map(e=>(0,U.jsxs)(`span`,{style:{background:`var(--press-red)`,color:`var(--paper)`,padding:`3px 8px`,borderRadius:12,fontFamily:`var(--f-cond)`,fontSize:11,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.04em`,display:`flex`,alignItems:`center`,gap:4},children:[e,(0,U.jsx)(`button`,{onClick:()=>c(e),style:{background:`none`,border:`none`,color:`var(--paper)`,cursor:`pointer`,padding:0,fontSize:11,lineHeight:1},"aria-label":`Remove ${e}`,children:`×`})]},e)),(0,U.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),s()):e.key===`Backspace`&&!a&&i.length&&c(i[i.length-1])},onBlur:s,placeholder:i.length?``:`type a topic and press Enter`,style:{flex:1,minWidth:120,border:`none`,background:`transparent`,outline:`none`,fontFamily:`var(--f-mono)`,fontSize:13,color:`var(--ink)`}})]}),(0,U.jsx)(Vo,{estimate:l,canPull:u,format:t.format}),(0,U.jsxs)(`button`,{className:`bd-disclosure`,"aria-expanded":b,onClick:()=>x(e=>!e),style:{marginTop:8},children:[(0,U.jsx)(`span`,{className:`bd-chevron`,children:`▶`}),`Advanced settings`]}),b&&(0,U.jsxs)(`div`,{style:{padding:`8px 0 4px`},children:[(0,U.jsx)(Ro,{children:`Format`}),(0,U.jsx)(`div`,{style:{display:`flex`,gap:8,marginBottom:22},children:[`both`,`article`,`briefing`].map(e=>(0,U.jsx)(`button`,{type:`button`,className:`brew-chip`,"data-active":t.format===e||void 0,onClick:()=>n(t=>({...t,format:e})),children:Fo[e]},e))}),(0,U.jsx)(To,{adv:d,patch:f,patchKeep:p,onReset:m})]})]})]})}function Ro({children:e}){return(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,fontWeight:700,color:`var(--ink-soft)`,marginBottom:8},children:e})}function zo(e){if(!e||e.length!==2)return null;let[t,n]=e,r=e=>e<60?`${e}s`:`${Math.round(e/60)} min`;return Math.round(t/60)===Math.round(n/60)&&t>=60&&n>=60?`~${Math.round(t/60)} min`:`${r(t)}–${r(n)}`}function Bo(e,t){let n=Object.entries(e.platforms).filter(([e,t])=>t&&(e===`x`||e===`reddit`)).map(([e])=>No[e]);return`${n.length?n.join(` · `):`no platform selected`} · ${Fo[e.format]||`Both`} · ${t.postsToScan} posts`}function Vo({estimate:e,canPull:t,format:n}){if(!t)return null;if(!e)return(0,U.jsx)(`div`,{className:`f-type`,style:{fontSize:12,color:`var(--muted)`,margin:`4px 0 18px`},children:`Estimating…`});let r=e.briefingCardsRange,i=e.articleWordsRange,a=e.articleMinutesRange,o=(n===`briefing`||n===`both`)&&r,s=(n===`article`||n===`both`)&&i;return(0,U.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:14,alignItems:`baseline`,padding:`10px 0 18px`,borderTop:`1px dashed var(--ink-soft)`,marginTop:8},children:[(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,color:`var(--ink-soft)`,fontWeight:700},children:`What you'll get`}),o&&(0,U.jsxs)(`span`,{className:`f-mono`,style:{fontSize:12,color:`var(--ink)`}
15,children:[`Briefing: `,r[0],`–`,r[1],` cards`]}),s&&(0,U.jsxs)(`span`,{className:`f-mono`,style:{fontSize:12,color:`var(--ink)`},children:[`Article: ~`,Math.round((i[0]+i[1])/2).toLocaleString(),` words · `,a[0],`–`,a[1],` min`]}),e.timeBasis&&(0,U.jsx)(`span`,{className:`f-type`,style:{fontSize:11,color:`var(--muted)`,fontStyle:`italic`,marginLeft:`auto`},children:e.timeBasis})]})}var Ho=!1;function Uo({clerkConfig:e,store:t}){return e?.enabled?(0,U.jsx)(Ko,{store:t}):null}function Wo({clerkConfig:e,store:t,bypass:n,children:r}){return!e?.enabled||n?r:(0,U.jsx)(Go,{store:t,children:r})}function Go({store:e,children:t}){let{isSignedIn:n,isLoaded:r}=bn(),i=vn(),a=!!e.local?.auth?.signedIn,o=r&&n&&!a,[s,c]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{if(!o){c(!1);return}let e=setTimeout(()=>c(!0),15e3);return()=>clearTimeout(e)},[o]),o?(0,U.jsxs)(`div`,{className:`page-surface`,style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`var(--f-type)`,fontSize:16,color:`var(--ink-soft)`,letterSpacing:`0.18em`,textTransform:`uppercase`,textAlign:`center`,padding:24},children:[`Setting up your desk…`,s&&(0,U.jsxs)(`div`,{style:{marginTop:28,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:14,textTransform:`none`,letterSpacing:`normal`,fontSize:14,maxWidth:360},children:[(0,U.jsx)(`span`,{children:`This is taking longer than usual.`}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10,flexWrap:`wrap`,justifyContent:`center`},children:[(0,U.jsx)(`button`,{className:`sketch-btn sb-red`,onClick:()=>window.location.reload(),children:`Reload`}),(0,U.jsx)(`button`,{className:`sketch-btn`,onClick:async()=>{try{await i.signOut()}catch{}Ra(`/signin`)},children:`Back to sign in`})]})]})]}):t}function Ko({store:e}){let{isSignedIn:t,isLoaded:n}=bn(),{getToken:r}=fr(),i=vn(),a=(0,_.useRef)(e);a.current=e;let o=(0,_.useRef)(r);o.current=r;let s=(0,_.useRef)(i);s.current=i;let c=(0,_.useCallback)(async()=>{let e=s.current;if(e&&(e.session||e.user)&&!a.current.data?.user&&!Ho){Ho=!0;try{let e=[0,500,1e3,2e3,4e3],t=null;for(let n=0;n<e.length;n++){if(e[n]>0&&await new Promise(t=>setTimeout(t,e[n])),a.current.data?.user)return;try{let e=await o.current({skipCache:!0});if(!e)throw Error(`Clerk did not return a session token.`);let t=(await a.current.signInWithClerk(e))?.onboardingStep;Ra(t&&t!==`done`?`/onboarding`:`/home`);return}catch(e){t=e}}H(`${t?.message||`Finishing sign-in is taking a moment.`} Reloading usually clears it.`)}finally{Ho=!1}}},[]);return(0,_.useEffect)(()=>{!n||!t||c()},[n,t,c]),(0,_.useEffect)(()=>{let e=()=>{document.visibilityState!==`hidden`&&c()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[c]),(0,_.useEffect)(()=>{let e=s.current;if(!e?.addListener)return;let t=e.addListener(()=>c());return()=>{try{t?.()}catch{}}},[c]),null}function qo({clerkConfig:e,kind:t=`signin`,children:n}){return e?.enabled?(0,U.jsx)(t===`signup`?na:ta,{mode:`modal`,children:n}):n}var Jo={twitter:{key:`x`,label:`𝕏`,title:`X (Twitter)`},x:{key:`x`,label:`𝕏`,title:`X (Twitter)`},reddit:{key:`reddit`,label:`r/`,title:`Reddit`},linkedin:{key:`linkedin`,label:`in`,title:`LinkedIn`}};function Yo(e){if(!e)return``;let t=Oa(e);return Number.isNaN(t?.getTime?.())?``:`${t.toLocaleDateString(`en-US`,{weekday:`short`}).toUpperCase()} · ${t.toLocaleDateString(`en-US`,{month:`short`}).toUpperCase()} ${t.getDate()} · ${t.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`})}`}function Xo(){let[e,t]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=!1;return Ea(`/api/sample-digest`).then(n=>{!e&&n&&t(n)}).catch(()=>{}),()=>{e=!0}},[]);let n=e?Yo(e.date):``,r=!!e?.hasArticle,i=!!e?.hasBriefing,a=e?r&&i?`A · B`:r?`A`:i?`B`:``:``,o=e?.title||`Today on the desk`,s=e?.deck||`A real Breve edition pressed from the day's feeds.`,c=e?.itemCount??0,l=e?.topicCount??e?.topics?.length??0,u=e?.articleReadMin??e?.readMin??e?.briefingReadMin,d;if(e){let t=new Set;Object.keys(e.sources||{}
15).forEach(e=>t.add(String(e).toLowerCase())),(e.posts||[]).forEach(e=>{let n=String(e?.platform||``).toLowerCase();n&&t.add(n)}),d=[...t].map(e=>Jo[e]).filter(Boolean),d.length||(d=[Jo.x,Jo.reddit]);let n=new Set;d=d.filter(e=>n.has(e.key)?!1:(n.add(e.key),!0))}else d=[Jo.x,Jo.reddit];return(0,U.jsxs)(`a`,{href:`#/sample`,className:`signin-preview`,"aria-label":`Open sample edition`,children:[(0,U.jsx)(`div`,{className:`signin-preview-stamp`,children:`OPEN SAMPLE`}),(0,U.jsxs)(`div`,{className:`signin-preview-card`,children:[(0,U.jsxs)(`div`,{className:`signin-preview-meta`,children:[(0,U.jsx)(`span`,{className:`signin-preview-date`,children:n||`TODAY`}),a&&(0,U.jsx)(`span`,{className:`signin-preview-fmt`,children:a})]}),(0,U.jsx)(`div`,{className:`signin-preview-eyebrow`,children:`THE LEAD`}),(0,U.jsx)(`h3`,{className:`signin-preview-title`,children:o}),(0,U.jsx)(`p`,{className:`signin-preview-deck`,children:s}),(0,U.jsxs)(`div`,{className:`signin-preview-foot`,children:[(0,U.jsx)(`div`,{className:`signin-preview-badges`,children:d.map(e=>(0,U.jsx)(`span`,{"data-platform":e.key,title:e.title,children:e.label},e.key))}),(0,U.jsxs)(`div`,{className:`signin-preview-stats`,children:[c>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:c}),` items`]}),(0,U.jsx)(`span`,{className:`signin-preview-dot`,children:`·`})]}),l>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:l}),` topics`]}),(0,U.jsx)(`span`,{className:`signin-preview-dot`,children:`·`})]}),(0,U.jsx)(`span`,{children:u?`${u}-min read`:`a few minutes`})]})]}),(0,U.jsx)(`div`,{className:`signin-preview-cta`,children:`Open this edition →`})]})]})}function Zo({store:e,clerkConfig:t}){let[n,r]=(0,_.useState)(`pick`),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(!1);return(0,U.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,minHeight:`100vh`},children:[(0,U.jsxs)(`div`,{className:`signin-pitch`,children:[(0,U.jsx)(`div`,{className:`signin-pitch-tape`}),(0,U.jsx)(`div`,{className:`eyebrow eb-red signin-pitch-eyebrow`,children:`Your feeds, one page`}),(0,U.jsxs)(`h1`,{className:`signin-pitch-title`,children:[`Every feed.`,(0,U.jsx)(`br`,{}),(0,U.jsx)(`span`,{className:`signin-pitch-title-accent`,children:`One read.`})]}),(0,U.jsxs)(`p`,{className:`signin-pitch-body`,children:[`Breve interprets your socials and presses the `,(0,U.jsx)(`em`,{children:`content that matters`}),` into a single page each morning. No algorithm. No infinite scroll. Just a well-pressed edition.`]}),(0,U.jsx)(`ol`,{className:`signin-pitch-steps`,children:[{k:`Connect`,v:`Log into the feeds you read.`},{k:`Pull`,v:`We scroll them like you would.`},{k:`Read`,v:`One article. Your topics. Done.`}].map((e,t)=>(0,U.jsxs)(`li`,{className:`signin-pitch-step`,children:[(0,U.jsx)(`span`,{className:`signin-pitch-step-num`,children:String(t+1).padStart(2,`0`)}),(0,U.jsxs)(`div`,{className:`signin-pitch-step-body`,children:[(0,U.jsx)(`span`,{className:`signin-pitch-step-key`,children:e.k}),(0,U.jsx)(`span`,{className:`signin-pitch-step-val`,children:e.v})]})]},e.k))})]}),(0,U.jsx)(`div`,{className:`paper paper-grain signin-action`,children:n===`pick`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Xo,{}),(0,U.jsxs)(`div`,{className:`signin-cta-block`,children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:12},children:`Get started`}),(0,U.jsx)(`h2`,{className:`f-display`,style:{fontSize:38,margin:`0 0 10px`,lineHeight:1,letterSpacing:`-0.01em`},children:`Build your first edition.`}),(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:15,color:`var(--ink-soft)`,margin:`0 0 22px`,lineHeight:1.5},children:`Connect your feeds, pick your topics, brew today's digest. About two minutes.`}),(0,U.jsx)(qo,{clerkConfig:t,kind:`signup`,children:(0,U.jsx)(`a`,{href:t?.enabled?void 0:`#/signup`,className:`signin-btn signin-btn-primary`,onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect();e.currentTarget.style.setProperty(`--x`,(e.clientX-t.left)/t.width*100+`%`),e.currentTarget.style.setProperty(`--y`,(e.clientY-t.top)/t.height*100+`%`)},children:(0,U.jsx)(`span`,{children:`▶ Start your first edition`})})}),(0,U.jsx)(`div`,{className:`signin-or`,children:(0,U.jsx)(`span`,{children:`OR`})}),(0,U.jsx)(qo,{clerkConfig:t,kind:`signin`,children:(0,U.jsx)(`button`,{type:`button`,className:`signin-btn signin-btn-ghost`,onClick:t?.enabled?void 0:(()=>r(`signin`)),children:(0,U.jsx)(`span`,{children:`Sign in to your desk →`})})})]})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,className:`f-type`,style:{background:`none`,border:`none`,cursor:`pointer`,fontSize:12,color:`var(--muted)`,textDecoration:`underline`,textUnderlineOffset:3,marginBottom:24,padding:0,textAlign:`left`},onClick:()=>r(`pick`),children:`← Back`}),(0,U.jsx)(`div`,{className:`eyebrow`,style:{marginBottom:18},children:`Sign in`}),(0,U.jsx)(`h2`,{className:`f-display`,style:{fontSize:48,margin:`0 0 36px`,lineHeight:1},children:`Two lines & you're in.`}),(0,U.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),!(!i||!o)){d(``),p(!0);try{await e.signIn(i,o),Ra(`/home`)}catch(e){d(e.message||`Sign in failed.`)}finally{p(!1)}}},style:{maxWidth:460},children:[(0,U.jsxs)(`div`,{style:{marginBottom:28},children:[(0,U.jsx)(`label`,{className:`eyebrow eb-muted`,style:{display:`block`,marginBottom:8},children:`Email`}),(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`input`,{type:`email`,className:`ink-field `+(c===`email`?`has-focus`:``),value:i,placeholder:`[email protected]`,autoF
15ocus:!0,onFocus:()=>l(`email`),onBlur:()=>l(null),onChange:e=>a(e.target.value)}),(0,U.jsx)(`span`,{className:`caret`})]})]}),(0,U.jsxs)(`div`,{style:{marginBottom:36},children:[(0,U.jsx)(`label`,{className:`eyebrow eb-muted`,style:{display:`block`,marginBottom:8},children:`Password`}),(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`input`,{type:`password`,className:`ink-field `+(c===`pw`?`has-focus`:``),value:o,placeholder:`••••••••`,onFocus:()=>l(`pw`),onBlur:()=>l(null),onChange:e=>s(e.target.value)}),(0,U.jsx)(`span`,{className:`caret`})]}),(0,U.jsx)(`a`,{className:`f-type`,style:{fontSize:11,color:`var(--muted)`,textDecoration:`underline`,textUnderlineOffset:3,marginTop:8,display:`inline-block`},children:`Forgot it? →`})]}),u&&(0,U.jsx)(`p`,{className:`f-type`,style:{fontSize:13,color:`var(--press-red)`,marginBottom:16},children:u}),(0,U.jsx)(`button`,{type:`submit`,className:`sketch-btn sb-big sb-red`,style:{width:`100%`,justifyContent:`center`},disabled:f,children:f?`Signing in…`:`Continue to your desk →`}),(0,U.jsxs)(`p`,{className:`f-type`,style:{fontSize:12,color:`var(--muted)`,marginTop:32,textAlign:`center`},children:[`New here? `,(0,U.jsx)(`a`,{className:`ink-link`,href:`#/signup`,children:`Start an edition →`})]})]})]})})]})}function Qo({store:e,clerkConfig:t}){let[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(!1),g=i.length>0&&o.length>0&&i===o,v=o.length>0&&i!==o,y=i.length>=8;return(0,U.jsxs)(`div`,{className:`signup-shell`,children:[(0,U.jsx)(`a`,{href:`#/signin`,className:`signup-back f-mono`,children:`← Back`}),(0,U.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),!(!n||!i)){if(i.length<8){p(`Password must be at least 8 characters.`);return}if(i!==o){p(`Passwords don't match.`);return}p(``),h(!0);try{await e.signUp(n,i,u||`New reader`),Ra(`/onboarding`)}catch(e){p(e.message||`Sign up failed.`)}finally{h(!1)}}},className:`paper paper-cream signup-card`,children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red signup-eyebrow`,children:`Open an account`}),(0,U.jsx)(`h1`,{className:`signup-title f-display`,children:`Set up your desk.`}),(0,U.jsx)(`p`,{className:`signup-sub f-serif`,children:`A name, an email, a password. Thirty seconds.`}),(0,U.jsxs)(`div`,{style:{marginBottom:20},children:[(0,U.jsx)(`label`,{className:`eyebrow eb-muted`,style:{display:`block`,marginBottom:6}
15,children:`Name`}),(0,U.jsx)(`input`,{className:`ink-field`,value:u,onChange:e=>d(e.target.value),placeholder:`Your byline`})]}),(0,U.jsxs)(`div`,{style:{marginBottom:20},children:[(0,U.jsx)(`label`,{className:`eyebrow eb-muted`,style:{display:`block`,marginBottom:6},children:`Email`}),(0,U.jsx)(`input`,{className:`ink-field`,type:`email`,value:n,onChange:e=>r(e.target.value),placeholder:`[email protected]`})]}),(0,U.jsxs)(`div`,{style:{marginBottom:16},children:[(0,U.jsx)(`label`,{className:`eyebrow eb-muted`,style:{display:`block`,marginBottom:6},children:`Password`}),(0,U.jsxs)(`div`,{style:{position:`relative`},children:[(0,U.jsx)(`input`,{className:`ink-field`,type:c?`text`:`password`,value:i,onChange:e=>a(e.target.value),placeholder:`at least 8 characters`,style:{paddingRight:38}}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),"aria-label":c?`Hide password`:`Show password`,style:{position:`absolute`,right:8,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,cursor:`pointer`,padding:4,color:`var(--muted)`,fontSize:16,lineHeight:1},children:c?(0,U.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`path`,{d:`M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94`}),(0,U.jsx)(`path`,{d:`M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19`}),(0,U.jsx)(`line`,{x1:`1`,y1:`1`,x2:`23`,y2:`23`})]}):(0,U.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})})]}),i.length>0&&(0,U.jsxs)(`div`,{className:`f-mono`,style:{fontSize:10,marginTop:5,color:y?`oklch(0.52 0.16 150)`:`var(--muted)`},children:[y?`✓`:`✗`,` 8+ characters`]})]}),(0,U.jsxs)(`div`,{style:{marginBottom:28},children:[(0,U.jsx)(`label`,{className:`eyebrow eb-muted`,style:{display:`block`,marginBottom:6},children:`Confirm password`}),(0,U.jsxs)(`div`,{style:{position:`relative`},children:[(0,U.jsx)(`input`,{className:`ink-field`,type:c?`text`:`password`,value:o,onChange:e=>s(e.target.value),placeholder:`type it again`,style:{paddingRight:38,borderColor:g?`oklch(0.52 0.16 150)`:v?`var(--press-red)`:void 0}}),o.length>0&&(0,U.jsx)(`span`,{style:{position:`absolute`,right:10,top:`50%`,transform:`translateY(-50%)`,fontSize:16,lineHeight:1,color:g?`oklch(0.52 0.16 150)`:`var(--press-red)`},children:g?`✓`:`✗`})]})]}),f&&(0,U.jsx)(`p`,{className:`f-type`,style:{fontSize:13,color:`var(--press-red)`,marginBottom:12},children:f}),(0,U.jsx)(`button`,{type:`submit`,className:`sketch-btn sb-big sb-red`,style:{width:`100%`,justifyContent:`center`},disabled:m,children:m?`Creating account…`:`Start an edition →`}),(0,U.jsxs)(`p`,{className:`f-type signup-foot`,children:[`We don't read your DMs. Ever. `,(0,U.jsx)(`span`,{className:`signup-foot-sep`,children:`·`}),` Already a reader? `,(0,U.jsx)(`a`,{className:`ink-link`,href:`#/signin`,children:`Sign in →`})]})]})]})}var $o=`https://chromewebstore.google.com/detail/breve/pkgpgcdlnmjdemmdjfabnplcohnfdnaa`,es=[{key:`welcome`,kicker:`Welcome aboard`,title:`Let's get you reading`},{key:`privacy`,kicker:`How it works`,title:`What Breve sees (and what it doesn't)`},{key:`connect`,kicker:`Sources`,title:`Connect your feeds`},{key:`interests`,kicker:`Interests`,title:`What do you read for?`},{key:`first`,kicker:`Pull No 1`,title:`Your first edition, on the house`}],ts=`v1`;function ns(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent.toLowerCase();return e.includes(`firefox`)||e.includes(`safari`)&&!e.includes(`chrome`)&&!e.includes(`chromium`)?!1:e.includes(`chrome`)||e.includes(`chromium`)}var rs=`AI research.NBA.NFL.MLB.soccer.F1.college basketball.college football.MMA.music.film.gaming.fitness.startups.venture.economics.crypto.design.architecture.fashion.cooking.travel.photography.climate.politics.science.robotics.health.psychology.history.books.comedy.art`.split(`.`);function is({store:e,openLoader:t}){return ns()?e.data?.user?(0,U.jsx)(as,{store:e,openLoader:t}):(0,U.jsx)(ys,{}):(0,U.jsx)(bs,{})}function as({store:e,openLoader:t}){let n=e.data?.user?.privacyAgreedVersion,r=!!e.data?.user?.privacyAgreedAt&&n===ts,[i]=(0,_.useState)(()=>r?es.filter(e=>e.key!==`privacy`):es),a=e=>String(e).padStart(2,`0`),[o,s]=(0,_.useState)(()=>{let t=e.data?.user?.onboardingStep||`welcome`,n={welcome:`welcome`,connect:r?`connect`:`privacy`,interests:`interests`,f
15irst_digest:`first`,done:`first`}[t]||`welcome`,a=i.findIndex(e=>e.key===n);return Math.max(0,a)}),[c,l]=(0,_.useState)(e.data?.user?.name||``),[u,d]=(0,_.useState)(r),[f,p]=(0,_.useState)(e.data?.user?.connected||{x:{connected:!1},reddit:{connected:!1}}),[m,h]=(0,_.useState)([]),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(!1),T=_.useRef(null),E=e=>{let t=e.trim();if(!t||m.includes(t))return;let n=[...m,t];h(n),b(``),Ca(`/api/onboarding/interests/autosave`,{topics:n,description:g}).catch(()=>{})},D=e=>{let t=m.filter(t=>t!==e);h(t),Ca(`/api/onboarding/interests/autosave`,{topics:t,description:g}).catch(()=>{})},O=()=>{o>=i.length-1||s(o+1)},k=async()=>{let t=i[o];if(t){try{t.key===`welcome`?await Ca(`/api/onboarding/welcome`,{displayName:c}):t.key===`privacy`?(await Ca(`/api/onboarding/privacy_agreed`,{version:ts}),await e.refreshData()):t.key===`connect`?await Ca(`/api/onboarding/connect`):t.key===`interests`&&await Ca(`/api/onboarding/interests`,{topics:m,description:g})}catch(e){H(e.message||`Something went wrong, please try again.`);return}O()}},ee=()=>{o!==0&&s(o-1)},A=()=>{let e=i[o];return e?e.key===`welcome`?c.trim().length>0:e.key===`privacy`?u:e.key===`connect`?!0:e.key===`interests`?m.length>=3:(e.key,!0):!1},j=async t=>{try{await Ca(`/api/sources/${t}/login`)}catch(e){H(e.message||`Could not start ${t} login.`);return}let n=setInterval(async()=>{try{let r=await Ea(`/api/sources/${t}/status`);r.connected?(p(e=>({...e,[t]:{connected:!0,handle:r.handle||``}})),e.updateConnected(t,{connected:!0,handle:r.handle||``}),clearInterval(n)):r.loginActive||(clearInterval(n),H(`Login interrupted — the browser window may have been closed. Try again.`))}catch{clearInterval(n),H(`Login interrupted. Try again.`)}},2e3)};return(0,U.jsxs)(`div`,{className:`onb-room`,children:[(0,U.jsx)(`div`,{className:`onb-bg-frame`}),(0,U.jsx)(`div`,{className:`onb-wash onb-wash--1`}),(0,U.jsx)(`div`,{className:`onb-wash onb-wash--2`}),(0,U.jsx)(`div`,{className:`onb-wash onb-wash--3`}),(0,U.jsxs)(`div`,{className:`onb-steam`,children:[(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`}),(0,U.jsx)(`div`,{className:`onb-steam-wisp`})]}),(0,U.jsx)(`div`,{className:`onb-ring onb-ring--1`}),(0,U.jsx)(`div`,{className:`onb-ring onb-ring--2`}),(0,U.jsx)(`div`,{className:`onb-ring onb-ring--3`}),(0,U.jsx)(`div`,{className:`onb-ring onb-ring--4`}),(0,U.jsx)(`div`,{className:`onb-ring onb-ring--5`}),(0,U.jsx)(`div`,{className:`onb-splat onb-splat--1`}),(0,U.jsx)(`div`,{className:`onb-splat onb-splat--2`}),(0,U.jsx)(`div`,{className:`onb-splat onb-splat--3`}),(0,U.jsx)(`div`,{className:`onb-bean onb-bean--1`}),(0,U.jsx)(`div`,{className:`onb-bean onb-bean--2`}),(0,U.jsx)(`div`,{className:`onb-bean onb-bean--3`}),(0,U.jsx)(`div`,{className:`onb-bean onb-bean--4`}),(0,U.jsx)(`div`,{className:`onb-bean onb-bean--5`}),(0,U.jsx)(`div`,{className:`onb-ornament onb-ornament--1`}),(0,U.jsx)(`div`,{className:`onb-ornament onb-ornament--2`}),(0,U.jsx)(`div`,{className:`onb-ornament onb-ornament--3`}),(0,U.jsx)(`div`,{className:`onb-ornament onb-ornament--4`}),(0,U.jsx)(`div`,{className:`onb-scrap onb-scrap--1`}),(0,U.jsx)(`div`,{className:`onb-scrap onb-scrap--2`}),(0,U.jsx)(`div`,{className:`onb-scrap onb-scrap--3`}),(0,U.jsxs)(`div`,{className:`onb-head`,children:[(0,U.jsxs)(`div`,{className:`onb-head-left`,children:[(0,U.jsx)(`h1`,{className:`onb-title f-display`,children:`Set up your edition.`}),(0,U.jsxs)(`p`,{className:`onb-sub f-serif`,children:[i.length,` cards. Under two minutes. You can undo anything.`]})]}),(0,U.jsx)(`div`,{className:`onb-steps`,children:i.map((e,t)=>(0,U.jsxs)(`div`,{className:`onb-step`+(t<o?` done`:t===o?` current`:``),children:[(0,U.jsx)(`span`,{className:`onb-step-num f-display`,children:a(t+1)}),(0,U.jsx)(`span`,{className:`onb-step-label f-cond`,children:e.kicker}),t<o&&(0,U.jsx)(`span`,{className:`onb-step-check`,children:`✓`})]},e.key))})]}),(0,U.jsx)(`div`,{className:`onb-stack`,children:i.map((n,r)=>{let s=r<o,p=r===o,h=r-o,_=Math.max(h,0)*10,O=h>0?(h%2==0?1:-1)*h*1.2:0;return(0,U.jsxs)(`div`,{className:`onb-card `+(s?`gone `:``)+(p?`current`:`pending`),style:{"--peek-y":_+`px`,"--peek-rot":O+`deg`,zIndex:s?0:20-h}
15,children:[!p&&!s&&(0,U.jsxs)(`div`,{className:`onb-card-spine`,children:[(0,U.jsx)(`span`,{children:n.kicker}),(0,U.jsx)(`span`,{className:`spine-num`,children:n.num})]}),p&&(0,U.jsxs)(`div`,{className:`onb-card-body`,children:[(0,U.jsxs)(`div`,{className:`onb-card-strip`,children:[(0,U.jsx)(`span`,{className:`kicker`,children:n.kicker}),(0,U.jsxs)(`span`,{className:`num`,children:[`CARD `,a(r+1),`/`,a(i.length)]})]}),n.key===`welcome`&&(0,U.jsx)(os,{user:e.data?.user,displayName:c,setDisplayName:l}),n.key===`privacy`&&(0,U.jsx)(us,{agreed:u,setAgreed:d}),n.key===`connect`&&(0,U.jsx)(ss,{store:e,connected:f,connectSource:j}),n.key===`interests`&&(0,U.jsx)(cs,{topics:m,addTopic:E,removeTopic:D,topicInput:y,setTopicInput:b,description:g,setDescription:v}),n.key===`first`&&(0,U.jsx)(ls,{firstPulled:x,setFirstPulled:S,count:m.length,sources:f,store:e,topics:m,openLoader:t,pullRef:T,pulling:C,setPulling:w}),(0,U.jsxs)(`div`,{className:`onb-card-foot`,children:[(0,U.jsx)(`div`,{className:`foot-note`,children:n.key===`privacy`?u?`Thanks. Onward.`:`Tick the box once you've read through.`:n.key===`connect`?`We read your feeds, never your messages.`:n.key===`interests`?m.length<3?`Add ${3-m.length} more to continue.`:`Nice. You can always add more later.`:n.key===`first`?`Hit pull and we'll take you to your desk.`:`${i.length} cards. You're on card one.`}),(0,U.jsxs)(`div`,{className:`foot-actions`,children:[o>0&&(0,U.jsx)(`button`,{className:`onb-btn ghost`,onClick:ee,children:`← Back`}),o<i.length-1&&(0,U.jsx)(`button`,{className:`onb-btn primary`,onClick:k,disabled:!A(),children:`Next card →`}),o===i.length-1&&(0,U.jsx)(`button`,{className:`onb-btn primary`,onClick:()=>{T.current&&T.current()},disabled:C,children:C?`Starting…`:`▸ Pull & go to desk`})]})]})]})]},n.key)})})]})}function os({user:e,displayName:t,setDisplayName:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`h3`,{children:[`Hello, `,(0,U.jsx)(`span`,{style:{fontStyle:`italic`,color:`var(--press-red)`},children:t.trim().split(` `)[0]||(e?.name||`reader`).split(` `)[0]}),`.`]}),(0,U.jsx)(`p`,{className:`onb-lede`,children:`Breve turns your X and Reddit feeds into one daily edition. Here's what the next two minutes look like.`}),(0,U.jsx)(`div`,{className:`onb-topic-input`,style:{marginBottom:16},children:(0,U.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`Your display name`,autoFocus:!0})}),(0,U.jsxs)(`ul`,{className:`onb-welcome-list`,children:[(0,U.jsxs)(`li`,{children:[`Connect `,(0,U.jsx)(`strong`,{children:`X`}),` or `,(0,U.jsx)(`strong`,{children:`Reddit`})]}),(0,U.jsx)(`li`,{children:`Tell us three things you read for`}),(0,U.jsx)(`li`,{children:`Pull your first edition — free, on the house`})]}),(0,U.jsx)(`div`,{className:`onb-welcome-stamp`,children:`CARD 01`})]})}function ss({store:e,connected:t,connectSource:n}){if(typeof window<`u`&&!/^(localhost|127\.0\.0\.1)$/.test(window.location.hostname))return(0,U.jsx)(ds,{store:e});let[r,i]=(0,_.useState)({}),a=[{key:`x`,name:`X / Twitter`,note:`We'll scroll your home feed.`,icon:`𝕏`},{key:`reddit`,name:`Reddit`,note:`Your subs, top & new.`,icon:`R`}],o=async e=>{t[e].connected||(i(t=>({...t,[e]:!0})),await n(e),i(t=>({...t,[e]:!1})))},s=Object.values(r).some(Boolean);return(0,U.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,U.jsx)(`h3`,{style:{fontSize:32},children:`Log in to the feeds you read.`}),(0,U.jsx)(`p`,{className:`onb-lede`,style:{fontSize:16,marginBottom:14},children:`One is enough. Three is better. You can always add more later.`}),s&&(0,U.jsxs)(`div`,{style:{background:`var(--ink, #11110F)`,color:`var(--paper, #F9F4E6)`,padding:`14px 18px`,marginBottom:14,fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.5},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:12,textTransform:`uppercase`,letterSpacing:`0.12em`,marginBottom:4,color:`var(--press-red)`},children:`Waiting for login…`}),`A browser window has opened — log in there. It will close on its own once you're signed in.`,(0,U.jsx)(`strong`,{style:{display:`block`,marginTop:6,fontSize:13},children:`Don't close the browser window, or you'll have to start over.`})]}),(0,U.jsx)(`div`,{className:`onb-socials onb-socials-lg`,children:a.map(e=>{let n=t[e.key],i=r[e.key];return(0,U.jsxs)(`div`,{className:`onb-social onb-social-lg `+(n.connected?`connected`:``),onClick:()=>
15o(e.key),style:{cursor:i?`wait`:`pointer`,opacity:i?.7:1},children:[(0,U.jsxs)(`div`,{className:`s-icon-row`,children:[(0,U.jsx)(`span`,{className:`s-icon`,children:e.icon}),(0,U.jsx)(`span`,{className:`s-mark`,children:n.connected?`Linked`:e.key.toUpperCase()})]}),(0,U.jsx)(`h4`,{children:e.name}),(0,U.jsx)(`div`,{className:`s-handle`,children:n.connected?n.handle:e.note}),(0,U.jsx)(`div`,{className:`s-action`,children:i?`Opening browser…`:n.connected?`Connected ✓`:`Connect →`})]},e.key)})})]})}function cs({topics:e,addTopic:t,removeTopic:n,topicInput:r,setTopicInput:i,description:a,setDescription:o}){let[s,c]=(0,_.useState)([]);(0,_.useEffect)(()=>{Ea(`/api/interests/tree`).then(e=>{let t=Array.isArray(e)?e.map(e=>typeof e==`string`?e:e.label||e.name||``).filter(Boolean):[];c(t.length?t:rs)}).catch(()=>c(rs))},[]);let l=s.length?s:rs;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h3`,{children:`What do you read for?`}),(0,U.jsx)(`p`,{className:`onb-lede`,children:`Three or more. Type anything — specific beats broad ("Korean small models" > "AI").`}),(0,U.jsxs)(`div`,{className:`onb-topic-input`,children:[(0,U.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),t(r))},placeholder:`e.g. espresso extraction, vacancy taxes…`}),(0,U.jsx)(`button`,{className:`onb-add`,onClick:()=>t(r),children:`Add +`})]}),(0,U.jsx)(`div`,{className:`onb-chip-area`,children:e.map((e,t)=>(0,U.jsxs)(`span`,{className:`onb-chip `+(t%3==0?`red`:``),children:[e,(0,U.jsx)(`span`,{className:`x`,onClick:()=>n(e),children:`✕`})]},e))}),(0,U.jsxs)(`div`,{className:`onb-suggested`,children:[(0,U.jsx)(`span`,{className:`sg-label`,children:`or pick:`}),l.map(n=>(0,U.jsx)(`span`,{className:`sg-chip `+(e.includes(n)?`used`:``),onClick:()=>t(n),children:n},n))]}),(0,U.jsx)(`textarea`,{className:`onb-description`,rows:2,value:a,onChange:t=>
15{o(t.target.value),Ca(`/api/onboarding/interests/autosave`,{topics:e,description:t.target.value}).catch(()=>{})},placeholder:`Optional: describe what you're looking for in a sentence…`,style:{marginTop:12,width:`100%`,resize:`vertical`,fontFamily:`inherit`,fontSize:13}})]})}function ls({firstPulled:e,setFirstPulled:t,count:n,sources:r,store:i,topics:a,openLoader:o,pullRef:s,pulling:c,setPulling:l}){let[u,d]=(0,_.useState)(!0),[f,p]=(0,_.useState)(!0),[m,h]=(0,_.useState)(`idle`),[g,v]=(0,_.useState)(`idle`),y=[u?`twitter`:null,f?`reddit`:null].filter(Boolean),b=async e=>{let t=e===`twitter`?h:v;t(`checking`);try{let n=!!(await Wa({type:`breve.checkSignin`,payload:{platform:e}},{timeoutMs:3e4}))?.signedIn;return t(n?`signed_in`:`signed_out`),n}catch(n){return console.warn(`[signin probe]`,e,n),t(`error`),!1}},x=_.useCallback(async()=>{if(y.length===0){H(`Pick at least one source.`);return}l(!0);let e=await Promise.all(y.map(b));if(!e.every(Boolean)){l(!1),H(`Sign back into ${y.filter((t,n)=>!e[n]).map(e=>e===`twitter`?`X`:`Reddit`).join(` and `)} in another tab, then click Pull again.`);return}let t=i.extension?{platforms:y,targetPostCount:100,maxScrolls:34,scrollDelayMs:1100,scrollPixels:1200,topics:a||[]}:null;Ra(`/home`),o($a({store:i,extensionPayload:t,requireExtension:!0,skipSigninProbe:!0,generateBody:{onboarding:!0,platforms:y,count:100,digestFormat:`both`,separateByPlatform:!1,topics:a||[]},onCompleteNav:e=>Ra(`/digest/`+e+`/article`),doneToast:`Your first edition is ready.`,beforeId:i.data?.digests?.[0]?.id}),null)},[y.join(`|`),a,o,i,l]);return(0,_.useEffect)(()=>{s&&(s.current=x)},[x,s]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h3`,{children:`Ready to pull edition No. 1`}),(0,U.jsx)(`p`,{className:`onb-lede`,style:{marginBottom:14},children:`Pick which feeds to pull from. We'll check you're signed into each one before brewing.`}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`,marginBottom:14},children:[(0,U.jsx)(_s,{label:`X (Twitter)`,picked:u,setPicked:d,state:m}),(0,U.jsx)(_s,{label:`Reddit`,picked:f,setPicked:p,state:g})]}),(0,U.jsx)(`div`,{className:`pull-desk-scene`,children:(0,U.jsxs)(`svg`,{viewBox:`0 0 700 320`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,className:`desk-svg`,children:[(0,U.jsxs)(`defs`,{children:[(0,U.jsxs)(`linearGradient`,{id:`deskBase`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#4a2020`}),(0,U.jsx)(`stop`,{offset:`30%`,stopColor:`#3d1c1c`}),(0,U.jsx)(`stop`,{offset:`60%`,stopColor:`#4e2424`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#3a1818`})]}),(0,U.jsxs)(`pattern`,{id:`grain`,width:`700`,height:`320`,patternUnits:`userSpaceOnUse`,children:[(0,U.jsx)(`line`,{x1:`18`,y1:`0`,x2:`20`,y2:`320`,stroke:`#5a2828`,strokeWidth:`1.2`,opacity:`0.35`}),(0,U.jsx)(`line`,{x1:`45`,y1:`0`,x2:`44`,y2:`320`,stroke:`#4a1e1e`,strokeWidth:`0.6`,opacity:`0.25`}),(0,U.jsx)(`line`,{x1:`72`,y1:`0`,x2:`74`,y2:`320`,stroke:`#5e2c2c`,strokeWidth:`0.9`,opacity:`0.3`}),(0,U.jsx)(`line`,{x1:`110`,y1:`0`,x2:`108`,y2:`320`,stroke:`#4a2020`,strokeWidth:`1.4`,opacity:`0.2`}),(0,U.jsx)(`line`,{x1:`148`,y1:`0`,x2:`150`,y2:`320`,stroke:`#5a2525`,strokeWidth:`0.7`,opacity:`0.35`}),(0,U.jsx)(`line`,{x1:`185`,y1:`0`,x2:`184`,y2:`320`,stroke:`#4e2222`,strokeWidth:`1`,opacity:`0.25`}),(0,U.jsx)(`line`,{x1:`230`,y1:`0`,x2:`232`,y2:`320`,stroke:`#5c2a2a`,strokeWidth:`0.5`,opacity:`0.3`}),(0,U.jsx)(`line`,{x1:`268`,y1:`0`,x2:`266`,y2:`320`,stroke:`#4a1e1e`,strokeWidth:`1.3`,opacity:`0.2`}),(0,U.jsx)(`line`,{x1:`310`,y1:`0`,x2:`312`,y2:`320`,stroke:`#582626`,strokeWidth:`0.8`,opacity:`0.3`}),(0,U.jsx)(`line`,{x1:`355`,y1:`0`,x2:`354`,y2:`320`,stroke:`#5a2828`,strokeWidth:`0.6`,opacity:`0.25`}),(0,U.jsx)(`line`,{x1:`395`,y1:`0`,x2:`397`,y2:`320`,stroke:`#4e2020`,strokeWidth:`1.1`,opacity:`0.35`}),(0,U.jsx)(`line`,{x1:`440`,y1:`0`,x2:`438`,y2:`320`,stroke:`#5c2a2a`,strokeWidth:`0.7`,opacity:`0.2`}),(0,U.jsx)(`line`,{x1:`478`,y1:`0`,x2:`480`,y2:`320`,stroke:`#4a1c1c`,strokeWidth:`1`,opacity:`0.3`}),(0,U.jsx)(`line`,{x1:`520`,y1:`0`,x2:`518`,y2:`320`,stroke:`#582424`,strokeWidth:`0.5`,opacity:`0.25`}),(0,U.jsx)(`line`,{x1:`558`,y1:`0`,x2:`560`,y2:`320`,stroke:`#5a2828`,strokeWidth:`1.3`,opacity:`0.3`}),(0,U.jsx)(`line`,{x1:`600`,y1:`0`,x2:`598`,y2:`320`,stroke:`#4e2222`,strokeWidth:`0.8`,opacity:`0.2`}),(0,U.jsx)(`line`,{x1:`640`,y1:`0`,x2:`642`,y2:`320`,stroke:`#5c2a2a`,strokeWidth:`0.6`,opacity:`0.35`}),(0,U.jsx)(`line`,{x1:`678`,y1:`0`,x2:`680`,y2:`320`,stroke:`#4a1e1e`,strokeWidth:`1`,opacity:`0.25`})]}),(0,U.jsxs)(`linearGradient`,{id:`deskEdge`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#2a1010`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#1a0808`})]}),(0,U.jsxs)(`radialGradient`,{id:`deskVignette`,cx:`0.5`,cy:`0.45`,r:`0.7`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`rgba(90,50,50,0.08)`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`rgba(0,0,0,0.25)`})]}),(0,U.jsx)(`filter`,{id:`paperShadow`,x:`-10%`,y:`-10%`,width:`130%`,height:`130%`,children:(0,U.jsx)(`feDropShadow`,{dx:`2`,dy:`3`,stdDeviation:`4`,floodColor:`#0a0505`,floodOpacity:`0.4`})}),(0,U.jsx)(`filter`,{id:`cupShadow`,x:`-20%`,y:`-20%`,width:`150%`,height:`150%`,children:(0,U.jsx)(`feDropShadow`,{dx:`3`,dy:`4`,stdDeviation:`6`,floodColor:`#0a0505`,floodOpacity:`0.35`})})]}),(0,U.jsx)(`rect`,{y:`300`,width:`700`,height:`20`,rx:`0`,fill:`url(#deskEdge)`}),(0,U.jsx)(`line`,{x1:`0`,y1:`300`,x2:`700`,y2:`300`,stroke:`#1a0808`,strokeWidth:`1`}),(0,U.jsx)(`rect`,{x:`0`,y:`308`,width:`700`,height:`1`,fill:`rgba(255,255,255,0.04)`}),(0,U.jsx)(`rect`,{width:`700`,height:`300`,fill:`url(#deskBase)`}),(0,U.jsx)(`rect`,{width:`700`,height:`300`,fill:`url(#grain)`,opacity:`0.5`}),(0,U.jsx)(`ellipse`,{cx:`350`,cy:`130`,rx:`320`,ry:`120`,fill:`rgba(255,255,255,0.03)`}),(0,U.jsx)(`rect`,{width:`700`,height:`300`,fill:`url(#deskVignette)`}),(0,U.jsxs)(`g`,{transform:`translate(20, 10) rotate(-2, 175, 145)`,filter:`url(#paperShadow)`,children:[(0,U.jsx)(`rect`,{width:`350`,height:`290`,rx:`1`,fill:`#f8f4eb`}),(0,U.jsx)(`rect`,{width:`350`,height:`290`,rx:`1`,fill:`rgba(200,180,150,0.06)`}),(0,U.jsx)(`rect`,{width:`350`,height:`38`,fill:`#181210`}),(0,U.jsx)(`text`,{x:`16`,y:`26`,fontFamily:`'Oswald', sans-serif`,fontSize:`15`,fontWeight:`600`,fill:`#f8f4eb`,letterSpacing:`4`,children:`ORDER SLIP`}),(0,U.jsx)(`text`,{x:`334`,y:`18`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`10`,fill:`#f8f4eb`,opacity:`0.6`,textAnchor:`end`,children:`No. 000001`}),(0,U.jsx)(`text`,{x:`334`,y:`31`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`8.5`,fill:`#f8f4eb`,opacity:`0.35`,textAnchor:`end`,children:new Date().toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}),(0,U.jsx)(`line`,{x1:`16`,y1:`50`,x2:`334`,y2:`50`,stroke:`#c4b89a`,strokeWidth:`0.5`}),(0,U.jsx)(`text`,{x:`175`,y:`60`,textAnchor:`middle`,fontSize:`8`,fill:`#a0906e`,letterSpacing:`5`,children:`✦  ✦  ✦`}),(0,U.jsx)(`text`,{x:`16`,y:`86`,fontFamily:`'Oswald', sans-serif`,fontSize:`11`,fill:`#8b7a5e`,letterSpacing:`2`,children:`SOURCES`}),(0,U.jsx)(`line`,{x1:`82`,y1:`84`,x2:`220`,y2:`84`,stroke:`#1a140d`,strokeWidth:`0.4`,strokeDasharray:`2 2.5`,opacity:`0.15`}),(0,U.jsxs)(`text`,{x:`334`,y:`86`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`11.5`,fill:`#1a140d`,textAnchor:`end`,children:[y.length,` picked`]}),(0,U.jsx)(`text`,{x:`16`,y:`114`,fontFamily:`'Oswald', sans-serif`,fontSize:`11`,fill:`#8b7a5e`,letterSpacing:`2`,children:`TOPICS`}),(0,U.jsx)(`line`,{x1:`70`,y1:`112`,x2:`220`,y2:`112`,stroke:`#1a140d`,strokeWidth:`0.4`,strokeDasharray:`2 2.5`,opacity:`0.15`}),(0,U.jsxs)(`text`,{x:`334`,y:`114`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`11.5`,fill:`#1a140d`,textAnchor:`end`,children:[n,` interests`]}),(0,U.jsx)(`text`,{x:`16`,y:`142`,fontFamily:`'Oswald', sans-serif`,fontSize:`11`,fill:`#8b7a5e`,letterSpacing:`2`,children:`COUNT`}),(0,U.jsx)(`line`,{x1:`66`,y1:`140`,x2:`248`,y2:`140`,stroke:`#1a140d`,strokeWidth:`0.4`,strokeDasharray:`2 2.5`,opacity:`0.15`}),(0,U.jsx)(`text`,{x:`334`,y:`142`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`11.5`,fill:`#1a140d`,textAnchor:`end`,children:`75 items`}),(0,U.jsx)(`text`,{x:`16`,y:`170`,fontFamily:`'Oswald', sans-serif`,fontSize:`11`,fill:`#8b7a5e`,letterSpacing:`2`,children:`FORMAT`}),(0,U.jsx)(`line`,{x1:`74`,y1:`168`,x2:`204`,y2:`168`,stroke:`#1a140d`,strokeWidth:`0.4`,strokeDasharray:`2 2.5`,opacity:`0.15`}),(0,U.jsx)(`text`,{x:`334`,y:`170`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`11.5`,fill:`#1a140d`,textAnchor:`end`,children:`Briefing + article`}),(0,U.jsx)(`line`,{x1:`16`,y1:`186`,x2:`334`,y2:`186`,stroke:`#1a140d`,strokeWidth:`1`,opacity:`0.25`}),(0,U.jsx)(`text`,{x:`16`,y:`208`,fontFamily:`'Oswald', sans-serif`,fontSize:`11`,fill:`#8b7a5e`,letterSpacing:`2`,fontWeight:`600`,children:`COST`}),(0,U.jsx)(`text`,{x:`334`,y:`208`,fontFamily:`'JetBrains Mono', monospace`,fontSize:`12`,fill:`#b5302a`,textAnchor:`end`,fontWeight:`600`,children:`FREE · first pull`}),(0,U.jsxs)(`g`,{transform:`translate(185, 80) rotate(-14)`,children:[(0,U.jsx)(`rect`,{width:`115`,height:`44`,rx:`3`,fill:`none`,stroke:`#b5302a`,strokeWidth:`3`,opacity:`0.18`}),(0,U.jsx)(`text`,{x:`57`,y:`31`,textAnchor:`middle`,fontFamily:`'Oswald', sans-serif`,fontSize:`26`,fontWeight:`700`,fill:`#b5302a`,opacity:`0.18`,letterSpacing:`5`,children:`READY`})]}),(0,U.jsx)(`line`,{x1:`16`,y1:`224`,x2:`334`,y2:`224`,stroke:`#c4b89a`,strokeWidth:`0.3`}),(0,U.jsx)(`text`,{x:`175`,y:`242`,textAnchor:`middle`,fontFamily:`'Special Elite', monospace`,fontSize:`9`,fill:`#a0906e`,o
15pacity:`0.7`,children:`Thank you — enjoy your first edition`}),(0,U.jsx)(`path`,{d:`M0 255 Q5 249,10 255 Q15 261,20 255 Q25 249,30 255 Q35 261,40 255 Q45 249,50 255 Q55 261,60 255 Q65 249,70 255 Q75 261,80 255 Q85 249,90 255 Q95 261,100 255 Q105 249,110 255 Q115 261,120 255 Q125 249,130 255 Q135 261,140 255 Q145 249,150 255 Q155 261,160 255 Q165 249,170 255 Q175 261,180 255 Q185 249,190 255 Q195 261,200 255 Q205 249,210 255 Q215 261,220 255 Q225 249,230 255 Q235 261,240 255 Q245 249,250 255 Q255 261,260 255 Q265 249,270 255 Q275 261,280 255 Q285 249,290 255 Q295 261,300 255 Q305 249,310 255 Q315 261,320 255 Q325 249,330 255 Q335 261,340 255 Q345 249,350 255 L350 290 L0 290 Z`,fill:`#3d1c1c`})]}),(0,U.jsxs)(`g`,{transform:`translate(440, 50)`,filter:`url(#cupShadow)`,children:[(0,U.jsxs)(`defs`,{children:[(0,U.jsxs)(`radialGradient`,{id:`saucerGrad`,cx:`0.5`,cy:`0.5`,r:`0.5`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#e0d4be`}),(0,U.jsx)(`stop`,{offset:`60%`,stopColor:`#d0c0a0`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#baa880`})]}),(0,U.jsxs)(`radialGradient`,{id:`cupGrad`,cx:`0.45`,cy:`0.42`,r:`0.55`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#faf6ee`}),(0,U.jsx)(`stop`,{offset:`70%`,stopColor:`#f0e8d8`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#e0d4c0`})]}),(0,U.jsxs)(`radialGradient`,{id:`coffeeGrad`,cx:`0.5`,cy:`0.48`,r:`0.5`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#a07040`}),(0,U.jsx)(`stop`,{offset:`35%`,stopColor:`#8b5a2e`}),(0,U.jsx)(`stop`,{offset:`70%`,stopColor:`#704820`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#5a3818`})]}),(0,U.jsxs)(`radialGradient`,{id:`cremaGrad2`,cx:`0.5`,cy:`0.45`,r:`0.48`,children:[(0,U.jsx)(`stop`,{offset:`0%`,stopColor:`#daba80`,stopOpacity:`0.45`}),(0,U.jsx)(`stop`,{offset:`50%`,stopColor:`#c8a060`,stopOpacity:`0.25`}),(0,U.jsx)(`stop`,{offset:`100%`,stopColor:`#a07830`,stopOpacity:`0`})]})]}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`90`,fill:`#b0986c`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`88`,fill:`url(#saucerGrad)`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`82`,fill:`none`,stroke:`#c8b898`,strokeWidth:`0.4`,opacity:`0.5`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`72`,fill:`none`,stroke:`#baa880`,strokeWidth:`0.6`,opacity:`0.3`}),(0,U.jsx)(`ellipse`,{cx:`88`,cy:`88`,rx:`60`,ry:`55`,fill:`rgba(255,255,255,0.04)`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`58`,fill:`url(#cupGrad)`,stroke:`#b0a078`,strokeWidth:`1.5`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`56`,fill:`none`,stroke:`rgba(255,255,255,0.2)`,strokeWidth:`0.5`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`53`,fill:`none`,stroke:`#c8b898`,strokeWidth:`0.3`,opacity:`0.4`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`48`,fill:`none`,stroke:`rgba(0,0,0,0.08)`,strokeWidth:`3`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`46`,fill:`url(#coffeeGrad)`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`46`,fill:`url(#cremaGrad2)`}),(0,U.jsx)(`ellipse`,{cx:`92`,cy:`90`,rx:`28`,ry:`30`,fill:`#c8a060`,opacity:`0.08`}),(0,U.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`20`,ry:`22`,fill:`#b89050`,opacity:`0.06`}),(0,U.jsx)(`ellipse`,{cx:`108`,cy:`80`,rx:`12`,ry:`7`,fill:`rgba(255,255,255,0.08)`}),(0,U.jsx)(`ellipse`,{cx:`80`,cy:`105`,rx:`8`,ry:`5`,fill:`rgba(255,255,255,0.04)`}),(0,U.jsx)(`circle`,{cx:`95`,cy:`95`,r:`47`,fill:`none`,stroke:`rgba(160,120,60,0.15)`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M148 82 C176 80, 184 95, 184 100 C184 105, 176 120, 148 118`,stroke:`#f0e8d8`,strokeWidth:`11`,fill:`none`}),(0,U.jsx)(`path`,{d:`M148 82 C176 80, 184 95, 184 100 C184 105, 176 120, 148 118`,stroke:`#b0a078`,strokeWidth:`1.3`,fill:`none`}),(0,U.jsx)(`path`,{d:`M150 85 C173 83, 180 96, 180 100 C180 104, 173 117, 150 115`,stroke:`#d8cab0`,strokeWidth:`0.5`,fill:`none`,opacity:`0.6`}),(0,U.jsx)(`path`,{d:`M152 88 C170 86, 176 96, 176 100 C176 104, 170 114, 152 112`,stroke:`rgba(0,0,0,0.06)`,strokeWidth:`3`,fill:`none`}),(0,U.jsxs)(`circle`,{cx:`95`,cy:`95`,r:`20`,fill:`none`,stroke:`rgba(200,170,100,0.15)`,strokeWidth:`1`,children:[(0,U.jsx)(`animate`,{attributeName:`r`,values:`15;35;15`,dur:`4s`,repeatCount:`indefinite`}),(0,U.jsx)(`animate`,{attributeName:`opacity`,values:`0.2;0;0.2`,dur:`4s`,repeatCount:`indefinite`})]}),(0,U.jsxs)(`circle`,{cx:`95`,cy:`95`,r:`10`,fill:`none`,stroke:`rgba(200,170,100,0.12)`,strokeWidth:`0.8`,children:[(0,U.jsx)(`animate`,{attributeName:`r`,values:`10;30;10`,dur:`4s`,repeatCount:`indefinite`,begin:`1.5s`}),(0,U.jsx)(`animate`,{attributeName:`opacity`,values:`0.15;0;0.15`,dur:`4s`,repeatCount:`indefinite`,begin:`1.5s`})]})]}),(0,U.jsxs)(`g`,{opacity:`0.55`,children:[(0,U.jsx)(`ellipse`,{cx:`385`,cy:`255`,rx:`5`,ry:`8`,fill:`#2a1508`,transform:`rotate(30 385 255)`}),(0,U.jsx)(`ellipse`,{cx:`391`,cy:`255`,rx:`5`,ry:`8`,fill:`#1e0e04`,transform:`rotate(30 391 255)`}),(0,U.jsx)(`line`,{x1:`388`,y1:`248`,x2:`388`,y2:`262`,stroke:`#0a0502`,strokeWidth:`0.4`,transform:`rotate(30 388 255)`})]}),(0,U.jsxs)(`g`,{opacity:`0.4`,children:[(0,U.jsx)(`ellipse`,{cx:`630`,cy:`260`,rx:`4`,ry:`7`,fill:`#2a1508`,transform:`rotate(-15 630 260)`}),(0,U.jsx)(`ellipse`,{cx:`635`,cy:`260`,rx:`4`,ry:`7`,fill:`#1e0e04`,transform:`rotate(-15 635 260)`})]}),(0,U.jsxs)(`g`,{opacity:`0.45`,children:[(0,U.jsx)(`ellipse`,{cx:`398`,cy:`42`,rx:`4`,ry:`6.5`,fill:`#2a1508`,transform:`rotate(50 398 42)`}),(0,U.jsx)(`ellipse`,{cx:`403`,cy:`42`,rx:`4`,ry:`6.5`,fill:`#1e0e04`,transform:`rotate(50 403 42)`})]}),(0,U.jsxs)(`g`,{transform:`translate(600, 5) rotate(3)`,children:[(0,U.jsx)(`rect`,{width:`95`,height:`60`,rx:`2`,fill:`#8b2018`,opacity:`0.7`}),(0,U.jsx)(`rect`,{x:`1`,y:`1`,width:`93`,height:`58`,rx:`1.5`,fill:`none`,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`0.5`}),(0,U.jsx)(`line`,{x1:`14`,y1:`0`,x2:`14`,y2:`60`,stroke:`rgba(255,255,255,0.15)`,strokeWidth:`0.5`}),(0,U.jsx)(`line`,{x1:`0`,y1:`16`,x2:`95`,y2:`16`,stroke:`rgba(255,255,255,0.08)`,strokeWidth:`0.3`}),(0,U.jsx)(`line`,{x1:`0`,y1:`28`,x2:`95`,y2:`28`,stroke:`rgba(255,255,255,0.08)`,strokeWidth:`0.3`}),(0,U.jsx)(`line`,{x1:`0`,y1:`40`,x2:`95`,y2:`40`,stroke:`rgba(255,255,255,0.08)`,strokeWidth:`0.3`})]}),(0,U.jsx)(`line`,{x1:`0`,y1:`1`,x2:`700`,y2:`1`,stroke:`rgba(255,255,255,0.06)`,strokeWidth:`1`})]})})]})}function us({agreed:e,setAgreed:t}){return(0,U.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,U.jsx)(`h3`,{style:{fontSize:32,marginBottom:8},children:`How Breve works.`}),(0,U.jsx)(`p`,{className:`onb-lede`,style:{fontSize:16,marginBottom:18},children:`Before we connect anything, the short version of how this works and what we touch.`}),(0,U.jsxs)(`div`,{style:{background:`var(--paper-light)`,border:`1.5px solid var(--ink)`,padding:`18px 20px`,marginBottom:18,fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.6,color:`var(--ink)`},children:[(0,U.jsxs)(`p`,{style:{margin:`0 0 12px`},children:[`Breve turns your X and Reddit feeds into a daily digest. To do that, we use a small Chrome extension that runs `,(0,U.jsx)(`em`,{children:`inside your own browser`}),`, scrolling your home feed using your existing login.`]}),(0,U.jsxs)(`p`,{style:{margin:`0 0 12px`},children:[(0,U.jsx)(`strong`,{children:`What we see:`}),` post text, author handle, engagement counts, timestamps, and image URLs from the feed you're already looking at.`]}),(0,U.jsxs)(`p`,{style:{margin:0},children:[(0,U.jsx)(`strong`,{children:`What we never touch:`}),` your social passwords, cookies, DMs, drafts, notifications, follower lists, or anything else outside the visible post feed. Your social logins stay in your browser, period.`]})]}),(0,U.jsxs)(`p`,{style:{fontFamily:`var(--f-serif)`,fontSize:13,color:`var(--ink-soft)`,margin:`0 0 14px`},children:[`The full policy lives at`,` `,(0,U.jsx)(`a`,{href:`#/privacy`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,style:{color:`var(--press-red)`},children:`breve.now/privacy`}),`. Read it if you want the long version.`]}),(0,U.jsxs)(`label`,{style:{display:`flex`,alignItems:`flex-start`,gap:12,padding:`14px 16px`,border:`2px solid ${e?`var(--press-red)`:`var(--ink)`}`,background:e?`rgba(183,28,28,0.06)`:`transparent`,cursor:`pointer`,transition:`background 120ms ease, border-color 120ms ease`},children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>t(e.target.checked),style:{marginTop:4,width:18,height:18,accentColor:`var(--press-red)`,cursor:`pointer`}}),(0,U.jsxs)(`span`,{style:{fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.5,color:`var(--ink)`},children:[`I understand how Breve reads my feeds and agree to the`,` `,(0,U.jsx)(`a`,{href:`#/privacy`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,onClick:e=>e.stopPropagation(),children:`privacy policy`}),`.`]})]})]})}function ds({store:e}){let[t,n]=(0,_.useState)(!!Ha());(0,_.useEffect)(()=>
15{if(t)return;let e=setInterval(()=>{Ha()&&(n(!0),clearInterval(e))},800);return()=>clearInterval(e)},[t]),(0,_.useEffect)(()=>{if(t)return;let e=()=>{if(document.visibilityState!==`visible`)return;let e=!1;try{e=sessionStorage.getItem(`breve.extReloadArmed`)===`1`}catch{}if(e&&!Ha()){try{sessionStorage.removeItem(`breve.extReloadArmed`)}catch{}window.location.reload()}};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[t]);let r=()=>{try{sessionStorage.setItem(`breve.extReloadArmed`,`1`)}catch{}},[i,a]=(0,_.useState)(`checking`),[o,s]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(!t)return;let e=!1;return(async()=>{try{if(await Wa({type:`breve.getConfig`},{timeoutMs:6e3}),e)return;a(`needs_wire`)}catch(t){e||(s(t.message||String(t)),a(`error`))}})(),()=>{e=!0}},[t]);let c=async()=>{s(null),a(`wiring`);try{let e=(await Ca(`/api/extension/connect`,{label:`breve onboarding`}))?.token;if(!e)throw Error(`Server didn't return an extension token.`);await Wa({type:`breve.saveConfig`,payload:{apiBase:window.location.origin.replace(/\/+$/,``),token:e}},{timeoutMs:6e3}),a(`configured`)}catch(e){s(e.message||String(e)),a(`needs_wire`)}};return(0,_.useEffect)(()=>{i===`needs_wire`&&c()},[i]),(0,U.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,U.jsx)(`h3`,{style:{fontSize:28,marginBottom:6,lineHeight:1.15},children:`Install Breve. Connect feeds.`}),(0,U.jsx)(`p`,{className:`onb-lede`,style:{fontSize:15,marginBottom:18,lineHeight:1.45},children:`One small Chrome extension does the scraping locally, with your existing logins. No copy-paste, no leaving this page after install.`}),(0,U.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,minHeight:0,paddingRight:4},children:[(0,U.jsx)(hs,{n:`1`,done:t,active:!t,title:`Install the Breve extension`,children:t?(0,U.jsx)(`div`,{style:ms,children:`Installed.`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{style:fs,children:[`Clicking the button opens the Chrome Web Store in a new tab. Click `,(0,U.jsx)(`strong`,{children:`Add to Chrome`}),`, then switch back here — the page refreshes itself and picks up the extension automatically.`]}),(0,U.jsx)(`a`,{href:$o,target:`_blank`,rel:`noreferrer`,onClick:r,className:`onb-btn primary`,style:{display:`inline-block`,textDecoration:`none`},children:`Install Breve extension →`}),(0,U.jsxs)(`div`,{style:{...ps,marginTop:10},children:[`Waiting for the extension… we'll auto-advance the moment it's detected.`,` `,(0,U.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`ink-link`,style:{background:`none`,border:`none`,padding:0,font:`inherit`,cursor:`pointer`,textDecoration:`underline`},children:`Already installed it? Refresh.`})]})]})}),(0,U.jsxs)(hs,{n:`2`,done:i===`configured`,active:t&&i!==`configured`,title:`Connect the extension to your account`,children:[i===`checking`&&t&&(0,U.jsx)(`div`,{style:ps,children:`Checking the extension…`}),i===`wiring`&&(0,U.jsx)(`div`,{style:ps,children:`Minting a token and handing it to the extension…`}),i===`needs_wire`&&o&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{style:{...fs,color:`var(--press-red)`},children:[`Couldn't auto-wire: `,o]}),(0,U.jsx)(`button`,{className:`onb-btn primary`,onClick:c,children:`Try again`})]}),i===`error`&&(0,U.jsx)(`p`,{style:{...fs,color:`var(--press-red)`},children:o||`Extension didn't respond. Try reloading the page.`}),i===`configured`&&(0,U.jsx)(`div`,{style:ms,children:`Extension wired to your account.`}),!t&&(0,U.jsx)(`div`,{style:ps,children:`Waiting on step 1…`})]}),(0,U.jsx)(gs,{})]})]})}var fs={fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.5,color:`var(--ink)`,margin:`0 0 10px`},ps={fontFamily:`var(--f-serif)`,fontSize:13,fontStyle:`italic`,color:`var(--ink-soft)`,margin:`4px 0 0`},ms={fontFamily:`var(--f-cond)`,fontSize:13,letterSpacing:`0.1em`,textTransform:`uppercase`,color:`var(--press-red)`,fontWeight:700};function hs({n:e,done:t,active:n,title:r,children:i}){return(0,U.jsxs)(`div`,{style:{display:`flex`,gap:18,alignItems:`flex-start`,padding:`18px 22px`,marginBottom:14,border:`2px solid ${t?`var(--press-red)`:n?`var(--ink)`:`rgba(0,0,0,0.15)`}`,background:t?`rgba(183,28,28,0.05)`:`var(--paper-light)`,boxShadow:t||n?`3px 3px 0 rgba(0,0,0,0.08)`:`none`,opacity:n||t?1:.55,transition:`all 180ms ease`}
15,children:[(0,U.jsx)(`div`,{style:{flexShrink:0,width:42,height:42,borderRadius:`50%`,background:t?`var(--press-red)`:n?`var(--ink)`:`rgba(0,0,0,0.2)`,color:`var(--paper)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontFamily:`var(--f-display)`,fontSize:20,fontWeight:700,boxShadow:`2px 2px 0 rgba(0,0,0,0.15)`},children:t?`✓`:e}),(0,U.jsxs)(`div`,{style:{flex:1,minWidth:0,paddingTop:4},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:14,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`,color:`var(--ink)`,marginBottom:8},children:r}),i]})]})}function gs(){return(0,U.jsxs)(`div`,{style:{marginTop:8,marginBottom:6,padding:`16px 20px`,border:`1.5px dashed var(--ink)`,background:`rgba(0,0,0,0.02)`,position:`relative`},children:[(0,U.jsx)(`div`,{style:{position:`absolute`,top:-10,left:16,background:`var(--paper)`,padding:`0 8px`,fontFamily:`var(--f-cond)`,fontSize:11,fontWeight:700,letterSpacing:`0.14em`,textTransform:`uppercase`,color:`var(--press-red)`},children:`Coming up`}),(0,U.jsxs)(`ul`,{style:{margin:0,padding:0,listStyle:`none`,fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.7,color:`var(--ink)`},children:[(0,U.jsxs)(`li`,{style:{display:`flex`,gap:10},children:[(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,fontFamily:`var(--f-mono)`,fontSize:12},children:`04 →`}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:`Pick your topics.`}),` Tell us what you read for so the digest leans toward it.`]})]}),(0,U.jsxs)(`li`,{style:{display:`flex`,gap:10,marginTop:6},children:[(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,fontFamily:`var(--f-mono)`,fontSize:12},children:`05 →`}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:`Pull edition No. 1.`}),` Choose X, Reddit, or both — we'll verify you're signed in and brew.`]})]})]})]})}function _s({label:e,picked:t,setPicked:n,state:r}){let i=r===`checking`,a=r===`signed_in`,o=r===`signed_out`,s=r===`error`,c=null;return i?c=(0,U.jsx)(`span`,{style:{...vs,color:`var(--ink-soft)`},children:`Checking…`}):a?c=(0,U.jsx)(`span`,{style:{...vs,color:`var(--press-red)`},children:`Signed in`}):o?c=(0,U.jsx)(`span`,{style:{...vs,color:`var(--press-red)`},children:`Sign in first`}):s&&(c=(0,U.jsx)(`span`,{style:{...vs,color:`var(--press-red)`},children:`Probe failed`})),(0,U.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`10px 14px`,border:`1.5px solid ${t?`var(--ink)`:`rgba(0,0,0,0.2)`}`,background:t?`var(--paper-light)`:`transparent`,cursor:`pointer`,flex:`1 1 200px`},children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked),style:{accentColor:`var(--press-red)`,cursor:`pointer`}}),(0,U.jsx)(`span`,{style:{flex:1,fontFamily:`var(--f-cond)`,fontSize:14,fontWeight:700,letterSpacing:`0.05em`,color:`var(--ink)`},children:e}),c]})}var vs={fontFamily:`var(--f-cond)`,fontSize:11,letterSpacing:`0.1em`,textTransform:`uppercase`,fontWeight:700};function ys(){return(0,U.jsx)(`div`,{className:`page-surface`,style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`40px 24px`},children:(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:13,letterSpacing:`0.12em`,textTransform:`uppercase`,color:`var(--ink-soft)`},children:`Setting up your desk…`})})}function bs(){return(0,U.jsx)(`div`,{className:`page-surface`,style:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`40px 24px`},children:(0,U.jsxs)(`div`,{style:{maxWidth:540,background:`var(--paper-light)`,border:`2px solid var(--ink)`,padding:`36px 32px`,boxShadow:`6px 6px 0 rgba(0,0,0,0.12)`},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:6},children:`One more step`}),(0,U.jsx)(`h2`,{style:{fontFamily:`var(--f-display)`,fontSize:36,fontWeight:400,margin:`0 0 14px`,lineHeight:1.1,color:`var(--ink)`},children:`Breve needs Chrome.`}),(0,U.jsx)(`p`,{style:{fontFamily:`var(--f-serif)`,fontSize:15,lineHeight:1.65,color:`var(--ink)`,margin:`0 0 16px`},children:`The Breve extension is built for Chromium-based browsers — Chrome, Edge, Brave, Arc, or Opera all work. Safari and Firefox use different extension formats and we don't support them yet.`}),(0,U.jsx)(`p`,{style:{fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.6,color:`var(--ink-soft)`,margin:`0 0 22px`},children:`Open this page in Chrome (or any Chromium browser) and finish setting up your account there.`}),(0,U.jsx)(`a`,{href:`https://www.google.com/chrome/`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,style:{display:`inline-block`,fontFamily:`var(--f-cond)`,fontSize:13,letterSpacing:`0.14em`,textTransform:`uppercase`,color:`var(--press-red)`,textDecoration:`underline`},children:`Download Chrome →`})]})})}function xs({store:e,digestId:t}){let{data:n}=e,[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1),s=n?.digests?.find(e=>e.id===t)||n?.digests?.[0],c=r||s;if((0,_.useEffect)(()=>{let e=t||s?.id;
15e&&r?.id!==e&&(o(!0),Ea(`/api/digests/${e}`).then(e=>{if(e){let t=Oa(e.date);i({...e,day:t.toLocaleDateString(`en-US`,{weekday:`long`})})}}).catch(()=>{H(`Could not load this digest.`),Ra(`/home`)}).finally(()=>o(!1)))},[t,s?.id]),(0,_.useEffect)(()=>{!a&&c&&!c.article&&c.hasArticle===!1&&Ra(`/digest/${c.id}/briefing`)},[a,c?.id,c?.article,c?.hasArticle]),!n)return null;if(a||!c||!r)return(0,U.jsx)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,U.jsx)(`span`,{className:`f-mono`,style:{fontSize:13,color:`var(--muted)`,letterSpacing:`0.1em`},children:`Loading article…`})});if(!c.article)return(0,U.jsx)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`60px 60px 120px`},children:[(0,U.jsx)(Cs,{digest:c,mode:`article`}),(0,U.jsxs)(`div`,{style:{textAlign:`center`,padding:`80px 0`},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:32,marginBottom:16},children:`Briefing only`}),(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:16,color:`var(--muted)`,marginBottom:24},children:`This digest was generated as briefings. Switch to the briefings view to read it.`}),(0,U.jsx)(`a`,{href:`#/digest/${c.id}/briefing`,className:`f-cond`,style:{fontSize:12,letterSpacing:`0.14em`,textTransform:`uppercase`,padding:`10px 20px`,textDecoration:`none`,background:`var(--ink)`,color:`var(--paper)`,border:`1.5px solid var(--ink)`},children:`View Briefing →`})]})]})});let l=c.article;return(0,U.jsxs)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:[(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`60px 60px 120px`,position:`relative`},children:[(0,U.jsx)(Cs,{digest:c,mode:`article`}),(0,U.jsx)(Ss,{digest:c}),(0,U.jsx)(As,{article:l,digest:c}),(0,U.jsx)(ws,{sources:l.links,posts:c.posts,sourcesLabel:`Sources cited`})]}),(0,U.jsx)(Fs,{topics:c.topics,store:e})]})}function Ss({digest:e}){let t=e?.dedupSkipped||0,n=e?.id||e?.slug,r=`breve_dedup_dismissed_${n}`,i=`breve_just_brewed_${n}`,[a,o]=(0,_.useState)(()=>{if(!n||t<=0)return!1;try{if(localStorage.getItem(r))return!1;if(sessionStorage.getItem(i))return sessionStorage.removeItem(i),!1}catch{}return!0});return!a||t<=0?null:((e?.itemCount||0)+t,(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:12,padding:`12px 14px`,marginBottom:24,background:`rgba(183,28,28,0.06)`,border:`1.5px dashed var(--press-red, #b71c1c)`,borderRadius:4,fontFamily:`var(--f-type)`,fontSize:13,lineHeight:1.5,color:`var(--ink)`},children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,style:{flexShrink:0,fontFamily:`var(--f-mono)`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`,color:`var(--press-red, #b71c1c)`,paddingTop:2},children:`Note`}),(0,U.jsxs)(`span`,{style:{flex:1},children:[`This digest used `,e?.itemCount||0,` posts.`,` `,t,` more were skipped because they already appeared in a recent digest of yours.`,` `,`Enable `,(0,U.jsx)(`em`,{children:`"Ignore dedup"`}),` in brew settings to include them next time.`]}),(0,U.jsx)(`button`,{onClick:()=>{try{localStorage.setItem(r,`1`)}catch{}o(!1)},"aria-label":`Dismiss`,style:{flexShrink:0,background:`transparent`,border:`none`,cursor:`pointer`,padding:`0 4px`,fontSize:16,lineHeight:1,color:`var(--ink-soft, #555)`},children:`×`})]}))}function Cs({digest:e,mode:t}){let n=e.hasArticle!==!1,r=e.hasBriefing!==!1,i=n&&r;return(0,U.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingBottom:18,marginBottom:32,borderBottom:`2px solid var(--ink)`,gap:16},children:[(0,U.jsxs)(`div`,{className:`eyebrow eb-muted`,style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`a`,{href:`#/home`,className:`ink-link`,children:`Today`}),` / `,t===`article`?`Article`:`Briefings`]}),e.newsletter&&(0,U.jsxs)(`a`,{href:`#/newsletters`,title:`Delivered by your "${e.newsletter.name}" newsletter`,style:{display:`inline-flex`,alignItems:`center`,gap:5,padding:`3px 8px`,border:`1.5px solid var(--press-red)`,background:`var(--press-red)`,color:`var(--paper)`,fontFamily:`var(--f-cond)`,fontSize:10,letterSpacing:`0.1em`,textTransform:`uppercase`,fontWeight:700,textDecoration:`none`,boxShadow:`2px 2px 0 var(--ink)`},children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,children:`✉`}),` `,e.newsletter.name]})]}),i&&(0,U.jsxs)(`div`,{className:`digest-toggle`,children:[(0,U.jsx)(`a`,{href:`#/digest/`+e.id+`/article`,className:`digest-toggle-btn f-cond`,"data-active":t===`article`||void 0,children:(0,U.jsx)(`span`,{className:`digest-toggle-label`,children:`Article`})}),(0,U.jsx)(`a`,{href:`#/digest/`+e.id+`/briefing`,className:`digest-toggle-btn f-cond`,"data-active":t===`briefing`||void 0,children:(0,U.jsx)(`span`,{className:`digest-toggle-label`,children:`Briefings`})})]})]})}function ws({sources:e,posts:t,sourcesLabel:n}){let[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),l=e&&e.length>0,u=t&&t.length>0;if(!l&&!u)return null;let d=u?t.filter(e=>e.kept):[],f=u?t.filter(e=>!e.kept):[];return(0,U.jsxs)(`div`,{style:{marginTop:56,borderTop:`3px double var(--ink)`,paddingTop:20},children:[l&&(0,U.jsxs)(`div`,{style:{marginBottom:u?20:0},children:[(0,U.jsxs)(`button`,{onClick:()=>i(!r),style:{background:`none`,border:`none`,cursor:`pointer`,padding:0,display:`flex`,alignItems:`center`,gap:10},children:[(0,U.jsxs)(`span`,{className:`eyebrow eb-red`,children:[n||`Sources`,` (`,e.length,`)`]}),(0,U.jsx)(`span`,{className:`f-mono`,style:{fontSize:11,color:`var(--muted)`},children:r?`▾ hide`:`▸ show`})]}),r&&(0,U.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:`12px 0 0`,fontFamily:`var(--f-mono)`,fontSize:12},children:e.map((e,t)=>(0,U.jsxs)(`li`,{style:{padding:`6px 0`,borderBottom:`1px dashed var(--ink)`},children:[(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,marginRight:10},children:`▸`}),(0,U.jsx)(`a`,{href:e.ref||e,target:`_blank`,rel:`noopener`,className:`ink-link`,children:e.label||e}),e.ref&&(0,U.jsx)(`span`,{style:{color:`var(--muted)`,marginLeft:12,fontSize:10,wordBreak:`break-all`},children:e.ref})]},t))})]}),u&&(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`button`,{onClick:()=>o(!a),style:{background:`none`,border:`none`,cursor:`pointer`,padding:0,display:`flex`,alignItems:`center`,gap:10},children:[(0,U.jsxs)(`span`,{className:`eyebrow eb-red`,children:[`Posts (`,t.length,`)`]}),(0,U.jsxs)(`span`,{className:`f-mono`,style:{fontSize:11,color:`var(--muted)`},children:[d.length,` kept · `,f.length,` filtered `,a?`▾`:`▸`]})]}),a&&(0,U.jsxs)(`div`,{style:{marginTop:12},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,gap:24,padding:`10px 14px`,marginBottom:16,border:`1.5px dashed var(--ink)`,fontFamily:`var(--f-mono)`,fontSize:11,color:`var(--muted)`,letterSpacing:`0.06em`},children:[(0,U.jsxs)(`span`,{children:[t.length,` collected`]}),(0,U.jsx)(`span`,{children:`→`}),(0,U.jsxs)(`span`,{style:{color:`var(--ink)`},children:[d.length,` kept`]}),(0,U.jsx)(`span`,{children:`→`}),(0,U.jsxs)(`span`,{children:[f.length,` excluded`]})]}),(0,U.jsxs)(`div`,{className:`eyebrow eb-muted`,style:{marginBottom:8},children:[`Included (`,d.length,`)`]}),(0,U.jsx)(`div`,{style:{marginBottom:20},children:d.map((e,t)=>(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,padding:`5px 0`,borderBottom:`1px solid rgba(0,0,0,0.06)`,fontFamily:`var(--f-mono)`,fontSize:12},children:[(0,U.jsx)(`span`,{style:{color:`#2e7d32`,flexShrink:0},children:`✓`}),(0,U.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener`,className:`ink-link`,style:{flexShrink:0},children:e.author}),(0,U.jsx)(`span`,{style:{color:`var(--muted)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.preview})]},t))}),f.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`button`,{onClick:()=>c(!s),style:{background:`none`,border:`none`,cursor:`pointer`,padding:0,display:`flex`,alignItems:`center`,gap:8},children:[(0,U.jsxs)(`span`,{className:`eyebrow eb-muted`,children:[`Excluded (`,f.length,`)`]}
15),(0,U.jsx)(`span`,{className:`f-mono`,style:{fontSize:10,color:`var(--muted)`},children:s?`▾ hide`:`▸ show`})]}),s&&(0,U.jsx)(`div`,{style:{marginTop:8},children:f.map((e,t)=>(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,padding:`5px 0`,borderBottom:`1px solid rgba(0,0,0,0.06)`,fontFamily:`var(--f-mono)`,fontSize:12},children:[(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,flexShrink:0},children:`✗`}),(0,U.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener`,className:`ink-link`,style:{flexShrink:0},children:e.author}),e.reason&&(0,U.jsx)(`span`,{style:{fontSize:9,padding:`1px 5px`,border:`1px solid var(--muted)`,color:`var(--muted)`,flexShrink:0,textTransform:`uppercase`,letterSpacing:`0.08em`,fontFamily:`var(--f-cond)`},children:e.reason}),(0,U.jsx)(`span`,{style:{color:`var(--muted)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.preview})]},t))})]})]})]})]})}var Ts={x:`X`,twitter:`X`,reddit:`Reddit`,linkedin:`LinkedIn`,web:`Web`};function Es(e){if(!e)return``;let t=Array.isArray(e)?e:Object.keys(e);if(!t.length)return``;let n=new Set,r=[];for(let e of t){let t=Ts[String(e).toLowerCase()]||e;n.has(t)||(n.add(t),r.push(t))}return r.join(` · `)}function Ds(e){if(!e)return``;let t=Oa(e);return isNaN(t.getTime())?``:t.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})}function Os({section:e,ordinal:t}){return(0,U.jsxs)(`section`,{style:{marginBottom:48},children:[(0,U.jsxs)(`h2`,{className:`f-display`,style:{fontSize:36,lineHeight:1.05,margin:`0 0 16px`},children:[(0,U.jsxs)(`span`,{style:{color:`var(--press-red)`,fontFamily:`var(--f-mono)`,fontSize:16,marginRight:12},children:[`§`,t]}),e.heading]}),(0,U.jsx)(`div`,{className:`f-serif digest-body`,style:{fontSize:18,lineHeight:1.7,margin:`0 0 18px`,color:`var(--ink)`},dangerouslySetInnerHTML:{__html:e.body}}),e.pull&&(0,U.jsxs)(`blockquote`,{className:`f-display`,style:{margin:`24px 40px 24px 0`,padding:`18px 22px`,borderLeft:`5px solid var(--press-red)`,fontSize:26,lineHeight:1.25,color:`var(--press-red-dark)`,fontStyle:`italic`},children:[`"`,e.pull,`"`]}),e.links&&e.links.length>0&&(0,U.jsx)(`div`,{style:{marginTop:8,fontFamily:`var(--f-mono)`,fontSize:12},children:e.links.map((e,t)=>(0,U.jsxs)(`span`,{children:[t>0&&(0,U.jsx)(`span`,{style:{color:`var(--muted)`,margin:`0 6px`},children:`·`}),(0,U.jsx)(`a`,{href:e.ref,target:`_blank`,rel:`noopener`,className:`ink-link`,children:e.label})]},t))})]})}function ks({label:e,index:t,total:n}){let r=n>1?`Part ${String(t+1).padStart(2,`0`)} of ${n}`:null;return(0,U.jsxs)(`div`,{className:`platform-banner`,style:{margin:t===0?`0 0 28px`:`72px 0 28px`},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:6},children:r?`${r} · From ${e}`:`From ${e}`}),(0,U.jsx)(`h2`,{className:`f-display`,style:{fontSize:48,lineHeight:1,margin:`0 0 12px`,letterSpacing:`-0.02em`},children:e}),(0,U.jsx)(`div`,{style:{borderTop:`3px double var(--ink)`,borderBottom:`1.5px solid var(--ink)`,height:6}})]})}function As({article:e,digest:t}){let n=Es(t.sources),r=Ds(t.date),i=!!t.alsoToday,a=e.platformGroups&&e.platformGroups.length>0?e.platformGroups:null;return(0,U.jsxs)(`article`,{children:[(0,U.jsxs)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:14,display:`flex`,flexWrap:`wrap`,gap:10,alignItems:`center`},children:[i&&(0,U.jsx)(`span`,{style:{background:`var(--press-red)`,color:`var(--paper)`,padding:`3px 8px`,letterSpacing:`0.16em`,fontFamily:`var(--f-cond)`,fontSize:10,fontWeight:700},children:`THE LEAD`}),(0,U.jsxs)(`span`,{children:[t.day,` · `,Oa(t.date).toLocaleDateString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`})]})]}),(0,U.jsx)(`h1`,{className:`f-display`,style:{fontSize:68,lineHeight:.96,margin:`0 0 20px`,letterSpacing:`-0.02em`},children:t.title}),(0,U.jsx)(`div`,{className:`f-editorial digest-lede`,style:{fontSize:22,lineHeight:1.55,color:`var(--ink-soft)`,margin:`0 0 28px`,fontStyle:`italic`,maxWidth:660},dangerouslySetInnerHTML:{__html:e.lede}}),i&&(0,U.jsxs)(`div`,{style:{margin:`0 0 36px`,padding:`12px 0`,borderTop:`1px dashed var(--ink-soft)`,borderBottom:`1px dashed var(--ink-soft)`,fontFamily:`var(--f-mono)`,fontSize:12,color:`var(--ink-soft)`,lineHeight:1.6},children:[(0,U.jsx)(`span`,{className:`f-cond`,style:{fontSize:10,letterSpacing:`0.16em`,textTransform:`uppercase`,color:`var(--press-red)`,fontWeight:700,marginRight:10},children:`Also today`}),t.alsoToday]}),(0,U.jsxs)(`div`,{style:{borderTop:`1.5px solid var(--ink)`,borderBottom:`1.5px solid var(--ink)`,padding:`10px 0`,marginBottom:48,display:`flex`,gap:30,flexWrap:`wrap`,fontFamily:`var(--f-mono)`,fontSize:11,color:`var(--muted)`,letterSpacing:`0.08em`},children:[r&&(0,U.jsxs)(`span`,{children:[`BREWED `,r]}),t.articleReadMin&&(0,U.jsxs)(`span`,{children:[t.articleReadMin,`-MIN READ`]}),(0,U.jsxs)(`span`,{children:[t.itemCount,` ITEMS SYNTHESIZED`]}),n&&(0,U.jsxs)(`span`,{children:[`USING `,n.toUpperCase()]})]}),a?a.map((e,t)=>{let n=0,r=a.slice(0,t).reduce((e,t)=>
15e+(t.sections?.length||0),0);return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(ks,{label:e.label,index:t,total:a.length}),t>0&&e.lede&&(0,U.jsx)(`div`,{className:`f-editorial digest-lede`,style:{fontSize:19,lineHeight:1.55,color:`var(--ink-soft)`,margin:`0 0 28px`,fontStyle:`italic`,maxWidth:660},dangerouslySetInnerHTML:{__html:e.lede}}),(e.sections||[]).map((e,t)=>(n+=1,(0,U.jsx)(Os,{section:e,ordinal:r+n},t)))]},e.key||t)}):e.sections.map((e,t)=>(0,U.jsx)(Os,{section:e,ordinal:t+1},t))]})}function js(e){return e?Array.isArray(e)?e:e.sections&&Array.isArray(e.sections)?e.sections.map(e=>({topic:e.heading||`Untitled`,summary:e.body||``,tags:[],sources:[],confidence:`medium`})):null:null}function Ms({store:e,digestId:t}){let{data:n}=e,[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1),s=n?.digests?.find(e=>e.id===t)||n?.digests?.[0];if((0,_.useEffect)(()=>{let e=t||s?.id;e&&r?.id!==e&&(o(!0),Ea(`/api/digests/${e}`).then(e=>{if(e){let t=Oa(e.date);i({...e,day:t.toLocaleDateString(`en-US`,{weekday:`long`})})}}).catch(()=>{H(`Could not load this digest.`),Ra(`/home`)}).finally(()=>o(!1)))},[t,s?.id]),!n)return null;let c=r||s;if(a||!c||!r)return(0,U.jsx)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,U.jsx)(`span`,{className:`f-mono`,style:{fontSize:13,color:`var(--muted)`,letterSpacing:`0.1em`},children:`Loading briefings…`})});let l=js(c.briefing)||(c.topics||[]).map(e=>({topic:e,summary:`Summary for `+e+`.`,tags:[e.toLowerCase()],sources:[],confidence:`medium`})),u=l.flatMap(e=>(e.sources||[]).map(e=>({label:e.replace(/^https?:\/\//,``).split(`/`).slice(0,3).join(`/`),ref:e})));return(0,U.jsxs)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:[(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`60px 60px 120px`},children:[(0,U.jsx)(Cs,{digest:c,mode:`briefing`}),(0,U.jsx)(Ss,{digest:c}),(0,U.jsx)(Ns,{briefing:l,digest:c,platformGroups:c.briefingPlatformGroups}),(0,U.jsx)(ws,{sources:u.length>0?u:null,posts:c.posts,sourcesLabel:`Sources`})]}),(0,U.jsx)(Fs,{topics:c.topics,store:e})]})}function Ns({briefing:e,digest:t,hideHeader:n,platformGroups:r}){let i=Oa(t.date),a=i.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0}).toLowerCase().replace(` `,``),o=i.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}).toUpperCase(),s=Es(t.sources),c=r&&r.length>0?r:null;return(0,U.jsxs)(`div`,{style:{maxWidth:720},children:[!n&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:10},children:[`FIELD BRIEFINGS · `,o]}),(0,U.jsxs)(`h1`,{className:`f-display`,style:{fontSize:48,lineHeight:.96,margin:`0 0 20px`,letterSpacing:`-0.02em`},children:[t.title||`The Morning Pull`,` · `,a]}),(0,U.jsxs)(`div`,{style:{borderTop:`1.5px solid var(--ink)`,borderBottom:`1.5px solid var(--ink)`,padding:`10px 0`,marginBottom:32,display:`flex`,gap:30,flexWrap:`wrap`,fontFamily:`var(--f-mono)`,fontSize:11,color:`var(--muted)`,letterSpacing:`0.08em`},children:[a&&(0,U.jsxs)(`span`,{children:[`BREWED `,a.toUpperCase()]}),t.briefingReadMin&&(0,U.jsxs)(`span`,{children:[t.briefingReadMin,`-MIN READ`]}),(0,U.jsxs)(`span`,{children:[t.itemCount||`—`,` ITEMS · `,e.length,` CARDS`]}),s&&(0,U.jsxs)(`span`,{children:[`USING `,s.toUpperCase()]})]})]}),c?c.map((e,t)=>{let n=c.slice(0,t).reduce((e,t)=>e+(t.cards?.length||0),0);return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(ks,{label:e.label,index:t,total:c.length}),(e.cards||[]).map((e,t)=>(0,U.jsx)(Ps,{card:e,index:n+t},t))]},e.key||t)}):e.map((e,t)=>(0,U.jsx)(Ps,{card:e,index:t},t)),(0,U.jsxs)(`div`,{style:{marginTop:20,paddingTop:14,borderTop:`2px solid var(--ink)`,fontFamily:`var(--f-mono)`,fontSize:11,color:`var(--muted)`,letterSpacing:`0.06em`,display:`flex`,justifyContent:`space-between`},children:[(0,U.jsxs)(`span`,{children:[`END OF BRIEFINGS · `,e.length,` ITEMS`]}),(0,U.jsx)(`span`,{children:`REVIEWED ✓`})]})]})}function Ps({card:e,index:t}){let[n,r]=(0,_.useState)(!1),i=e.sources?.length||0;return(0,U.jsxs)(`div`,{style:{borderTop:`1.5px solid var(--ink)`,padding:`20px 0`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,gap:16,alignItems:`flex-start`},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:40,lineHeight:1,color:`var(--press-red)`,minWidth:56,flexShrink:0},children:String(t+1).padStart(2,`0`)}),(0,U.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,U.jsx)(`h3`,{className:`f-display`,style:{fontSize:26,margin:`0 0 6px`,lineHeight:1.15},children:e.topic}),(0,U.jsx)(`div`,{className:`f-serif digest-body`,style:{fontSize:15,lineHeight:1.55,color:`var(--ink-soft)`},dangerouslySetInnerHTML:{__html:e.summary}}),e.tags&&e.tags.length>0&&(0,U.jsx)(`div`,{style:{marginTop:8,display:`flex`,gap:6,flexWrap:`wrap`},children:e.tags.map(e=>
15(0,U.jsxs)(`span`,{className:`f-mono`,style:{fontSize:10,color:`var(--muted)`,letterSpacing:`0.04em`},children:[`#`,e]},e))})]}),i>0&&(0,U.jsx)(`div`,{style:{flexShrink:0,textAlign:`right`,minWidth:80},children:(0,U.jsx)(`button`,{onClick:()=>r(!n),className:`f-mono`,style:{background:`none`,border:`none`,cursor:`pointer`,padding:0,fontSize:11,color:`var(--press-red)`,letterSpacing:`0.04em`},children:n?`▾ close`:`▸ ${i} source${i===1?``:`s`}`})})]}),n&&e.sources&&(0,U.jsx)(`div`,{style:{marginTop:10,marginLeft:72,paddingLeft:12,borderLeft:`2px solid rgba(0,0,0,0.08)`},children:e.sources.map((e,t)=>(0,U.jsxs)(`div`,{style:{padding:`3px 0`,fontFamily:`var(--f-mono)`,fontSize:11},children:[(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,marginRight:6},children:`▸`}),(0,U.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener`,className:`ink-link`,style:{wordBreak:`break-all`},children:e.replace(/^https?:\/\//,``).split(`/`).slice(0,4).join(`/`)})]},t))})]})}function Fs({topics:e,store:t}){let[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(()=>new Set),o=t?.local?.tweaks?.showTopicsRail!==!1,s=t?.data?.user?.interests||[],c=(0,_.useMemo)(()=>new Set(s.map(Ls)),[s.join(`|`)]);if((0,_.useEffect)(()=>{if(!o)return;let e=!1;return Ea(`/api/topic-suggestions`).then(t=>{e||r(t?.suggestions||[])}).catch(()=>{}),()=>{e=!0}},[o]),!o||!e||e.length===0)return null;let l=e=>c.has(Ls(e)),u=e=>i.has(Ls(e)),d=async e=>{let n=Ls(e);if(l(e)||u(e))return;if(s.length>=25){H(`Topic limit is 25. Drop one to add another.`);return}a(e=>new Set(e).add(n));let i=t.data?.user,o=i?.interests||[],c=[...o,e];t.updateUser({interests:c});try{await wa(`/api/profile/interests`,{topics:c,antiTopics:i?.antiTopics||[],description:i?.interestDescription||``}),r(e=>e.filter(e=>Ls(e)!==n)),H(`Added "${e}" to your interests.`)}catch(e){t.updateUser({interests:o}),H(`Couldn't add: `+(e?.message||`unknown error`))}finally{a(e=>{let t=new Set(e);return t.delete(n),t})}},f=async e=>{let n=Ls(e);if(!l(e)||u(e))return;a(e=>new Set(e).add(n));let r=t.data?.user,i=r?.interests||[],o=i.filter(e=>Ls(e)!==n);t.updateUser({interests:o});try{await wa(`/api/profile/interests`,{topics:o,antiTopics:r?.antiTopics||[],description:r?.interestDescription||``}),H(`Removed "${e}" from your interests.`)}catch(e){t.updateUser({interests:i}),H(`Couldn't remove: `+(e?.message||`unknown error`))}finally{a(e=>{let t=new Set(e);return t.delete(n),t})}},p=n.filter(e=>!l(e)),m=e.filter(e=>!l(e));return(0,U.jsxs)(`aside`,{className:`topics-rail`,"aria-label":`Topics in this edition`,children:[(0,U.jsxs)(`div`,{className:`topics-rail-section`,children:[(0,U.jsx)(`div`,{className:`topics-rail-label`,children:`In this edition`}),m.length>0&&(0,U.jsxs)(`div`,{className:`topics-rail-sub`,children:[`Tap `,(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,fontWeight:700},children:`+`}),` to track in your next edition.`]}),(0,U.jsx)(`ul`,{className:`topics-rail-list`,children:e.map(e=>(0,U.jsx)(zs,{topic:e,added:l(e),pending:u(e),onAdd:()=>d(e),onRemove:()=>f(e),variant:`edition`},e))})]}),s.length>0&&(0,U.jsxs)(`div`,{className:`topics-rail-section`,children:[(0,U.jsx)(`div`,{className:`topics-rail-label`,children:`You're tracking`}),(0,U.jsx)(`div`,{className:`topics-rail-sub`,children:`Searched in every brew. Tap × to drop.`}),(0,U.jsx)(`ul`,{className:`topics-rail-list`,children:s.map(e=>(0,U.jsx)(zs,{topic:e,added:!0,pending:u(e),onAdd:()=>{},onRemove:()=>f(e)},e))})]}),p.length>0&&(0,U.jsxs)(`div`,{className:`topics-rail-section`,children:[(0,U.jsx)(`div`,{className:`topics-rail-label`,children:`Suggested for you`}),(0,U.jsx)(`div`,{className:`topics-rail-sub`,children:`Recur in your past digests.`}),(0,U.jsx)(`ul`,{className:`topics-rail-list`,children:p.map(e=>(0,U.jsx)(zs,{topic:e,added:l(e),pending:u(e),onAdd:()=>d(e),onRemove:()=>f(e),variant:`suggested`},e))})]})]})}var Is=new Set([`a`,`an`,`and`,`as`,`at`,`but`,`by`,`for`,`from`,`in`,`of`,`on`,`or`,`the`,`to`,`with`]);function Ls(e){return(e||``).toLowerCase().replace(/[^a-z0-9]+/g,``)}function Rs(e){return!e||/[A-Z]/.test(e)?e:e.split(/(\s+|-)/).map((e,t)=>/^\s+$/.test(e)||e===`-`?e:t>0&&Is.has(e.toLowerCase())?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1)).join(``)}function zs({topic:e,added:t,pending:n,onAdd:r,onRemove:i,variant:a}
15){let o=`tr-chip`+(t?` is-added`:``)+(a===`suggested`?` is-sug`:``)+(a===`edition`?` is-edition`:``),s=n?`…`:t?`×`:`+`,c=t?i:r,l=n?`Updating ${e}`:t?`Remove ${e} from your interests`:`Add ${e} to your interests`;return(0,U.jsxs)(`li`,{className:o,title:e,children:[(0,U.jsx)(`span`,{className:`tr-chip-text`,children:Rs(e)}),(0,U.jsx)(`button`,{className:`tr-chip-btn`,type:`button`,onClick:c,disabled:n,"aria-label":l,children:s})]})}function Bs({store:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(`article`),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=!1;return Ea(`/api/sample-digest`).then(t=>{if(e)return;if(!t){c(`Sample isn't available yet.`);return}let r=Oa(t.date);n({...t,day:r.toLocaleDateString(`en-US`,{weekday:`long`})}),t.article?i(`article`):t.briefing&&i(`briefing`)}).catch(t=>{e||c(t?.message||`Could not load sample.`)}).finally(()=>{e||o(!1)}),()=>{e=!0}},[]);let l=e?.local?.auth?.signedIn;if(a)return(0,U.jsx)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,U.jsx)(`span`,{className:`f-mono`,style:{fontSize:13,color:`var(--muted)`,letterSpacing:`0.1em`},children:`Loading sample edition…`})});if(s||!t)return(0,U.jsxs)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`,padding:`120px 60px`,textAlign:`center`},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:28,marginBottom:12},children:`Sample isn't available`}),(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:15,color:`var(--muted)`,marginBottom:22},children:s||`We couldn't load a sample digest right now.`}),(0,U.jsx)(`a`,{href:`#/signin`,className:`profile-section-action`,children:`← Back to signin`})]});let u=!!t.article,d=!!t.briefing,f=r===`article`&&u,p=d&&js(t.briefing)||[];return(0,U.jsxs)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:[(0,U.jsx)(`div`,{className:`sample-banner`,children:(0,U.jsxs)(`div`,{className:`sample-banner-inner`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Sample edition`}),(0,U.jsxs)(`div`,{className:`f-serif`,style:{fontSize:14,color:`var(--ink-soft)`,fontStyle:`italic`},children:[`A real digest from a Breve reader. `,l?null:`Sign up to brew your own in about two minutes.`]})]}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10},children:[(0,U.jsx)(`a`,{href:`#/signin`,className:`avatar-modal-btn`,children:`Back`}),!l&&(0,U.jsx)(`a`,{href:`#/signup`,className:`avatar-modal-btn is-save`,children:`Start your edition →`})]})]})}),(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`40px 60px 120px`,position:`relative`},children:[u&&d&&(0,U.jsxs)(`div`,{className:`digest-toggle`,style:{marginBottom:24,justifyContent:`flex-end`,display:`flex`},children:[(0,U.jsx)(`button`,{onClick:()=>i(`article`),className:`digest-toggle-btn f-cond`,"data-active":r===`article`||void 0,children:(0,U.jsx)(`span`,{className:`digest-toggle-label`,children:`Article`})}),(0,U.jsx)(`button`,{onClick:()=>i(`briefing`),className:`digest-toggle-btn f-cond`,"data-active":r===`briefing`||void 0,children:(0,U.jsx)(`span`,{className:`digest-toggle-label`,children:`Briefings`})})]}),f?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(As,{article:t.article,digest:t}),(0,U.jsx)(ws,{sources:t.article.links,posts:t.posts,sourcesLabel:`Sources cited`})]}):d?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ns,{briefing:p,digest:t,platformGroups:t.briefingPlatformGroups}),(0,U.jsx)(ws,{sources:p.flatMap(e=>(e.sources||[]).map(e=>({label:e.replace(/^https?:\/\//,``).split(`/`).slice(0,3).join(`/`),ref:e}))),posts:t.posts,sourcesLabel:`Sources`})]}):(0,U.jsx)(`div`,{style:{padding:`80px 0`,textAlign:`center`},children:(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:28},children:`This edition is empty.`})})]})]})}function Vs({store:e,openBrew:t}){let{data:n,updateUser:r}=e,[i,a]=(0,_.useState)(()=>!sessionStorage.getItem(`breve_welcomed`));(0,_.useEffect)(()=>{if(i&&n?.user){sessionStorage.setItem(`breve_welcomed`,`1`);let e=setTimeout(()=>a(!1),6e3);return()=>clearTimeout(e)}},[i,n?.user]);let o=n?.digests?.[0],[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{let e=o?.id;if(!e){c(null);return}s?.id!==e&&(u(!0),f(!1),Ea(`/api/digests/${e}`).then(e=>{if(e){let t=Oa(e.date);c({...e,day:t.toLocaleDateString(`en-US`,{weekday:`long`})})}}).catch(()=>f(!0)).finally(()=>u(!1)))},[o?.id]),!n)return null;let p=(n.digests||[]).length>0,m=s&&s.id===o?.id?s:null,h=n?.user,g=h?.digestCount||0;if(!p)return(0,U.jsx)(`div`,{className:`page-surface`,children:(0,U.jsx)(`div`,{className:`page-wrap`,children:(0,U.jsxs)(`div`,{style:{textAlign:`center`,padding:`80px 20px 60px`},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:14},children:`First edition`}),(0,U.jsx)(`h1`,{className:`f-display`,style:{fontSize:72,lineHeight:1,margin:`0 0 14px`,letterSpacing:`-0.02em`},children:`Your desk is ready`}),(0,U.jsx)(`p`,{className:`f-editorial`,style:{fontSize:19,color:`var(--ink-soft)`,fontStyle:`italic`,margin:`0 auto 30px`,maxWidth:580},children:`Pick what to read, who to read from, and how you want it served. Breve handles the rest.`}),(0,U.jsxs)(`p`,{className:`f-type`,style:{fontSize:16,color:`var(--ink)`,margin:`0 auto`,maxWidth:540,lineHeight:1.6},children:[`To press your first edition, open the`,` `,(0,U.jsx)(`button`,{type:`button`,onClick:t,style:{background:`none`,border:`none`,padding:0,font:`inherit`,color:`var(--press-red)`,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:3,fontWeight:700},children:`Brew a new edition`}),` `,`tab on the right edge of the screen.`]})]})})});if(l)return(0,U.jsx)(Hs,{children:(0,U.jsx)(`div`,{className:`f-mono`,style:{fontSize:13,color:`var(--muted)`,letterSpacing:`0.1em`,textAlign:`center`,padding:`120px 0`},children:`Pulling today's edition off the press…`})});if(d)return(0,U.jsx)(Hs,{children:(0,U.jsx)(Js,{onRetry:()=>{c(null),f(!1)}})});if(!m)return(0,U.jsx)(Hs,{children:(0,U.jsx)(`div`,{style:{padding:`120px 0`}})});if(!m.article&&(m.briefing||m.hasBriefing!==!1)){let t=js(m.briefing)||(m.topics||[]).map(e=>({topic:e,summary:`Summary for `+e+`.`,tags:[e.toLowerCase()],sources:[],confidence:`medium`})),n=t.flatMap(e=>(e.sources||[]).map(e=>({label:e.replace(/^https?:\/\//,``).split(`/`).slice(0,3).join(`/`),ref:e})));return(0,U.jsxs)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:[(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`60px 60px 120px`,position:`relative`},children:[i&&h&&g>0&&(0,U.jsx)(Ks,{u:h,digestCount:g,onClose:()=>a(!1)}),(0,U.jsx)(Gs,{failures:m.platformFailures}),(0,U.jsx)(Cs,{digest:m,mode:`briefing`}),(0,U.jsx)(Ss,{digest:m}),(0,U.jsx)(qs,{digest:m,briefingCount:t.length}),(0,U.jsx)(Ns,{briefing:t,digest:m,platformGroups:m.briefingPlatformGroups,hideHeader:!0}),(0,U.jsx)(ws,{sources:n.length>0?n:null,posts:m.posts,sourcesLabel:`Sources`})]}),(0,U.jsx)(Fs,{topics:m.topics,store:e})]})}if(!m.article)return(0,U.jsx)(Hs,{children:(0,U.jsxs)(`div`,{style:{padding:`120px 0`,textAlign:`center`},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:28,marginBottom:12},children:`This edition is empty`}),(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:15,color:`var(--muted)`},children:`We couldn't load any content for this digest. Try brewing a fresh edition.`})]})});let v=m.article;return(0,U.jsxs)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:[(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`60px 60px 120px`,position:`relative`},children:[i&&h&&g>0&&(0,U.jsx)(Ks,{u:h,digestCount:g,onClose:()=>a(!1)}),(0,U.jsx)(Gs,{failures:m.platformFailures}),(0,U.jsx)(Cs,{digest:m,mode:`article`}),(0,U.jsx)(Ss,{digest:m}),(0,U.jsx)(As,{article:v,digest:m}),(0,U.jsx)(ws,{sources:v.links,posts:m.posts,sourcesLabel:`Sources cited`})]}),(0,U.jsx)(Fs,{topics:m.topics,store:e})]})}function Hs({children:e}){return(0,U.jsx)(`div`,{className:`paper paper-cream`,style:{minHeight:`calc(100vh - 76px)`},children:(0,U.jsx)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`60px 60px 120px`,position:`relative`},children:e})})}var Us={twitter:`X`,x:`X`,reddit:`Reddit`,linkedin:`LinkedIn`},Ws=new Set([`not_connected`,`session_expired`,`scrape_failed`]);function Gs({failures:e}){if(!e||e.length===0)return null;let t=e.filter(e=>Ws.has(e.reason)),n=e.filter(e=>e.reason===`no_posts`);if(t.length===0&&n.length===0)return null;let r=e=>Us[(e||``).toLowerCase()]||e||``;return(0,U.jsxs)(`div`,{style:{background:`#fdf3df`,border:`1.5px solid var(--ink)`,borderLeft:`4px solid var(--press-red)`,padding:`12px 18px`,marginBottom:24,fontFamily:`var(--f-mono)`,fontSize:12,lineHeight:1.55,color:`var(--ink)`,display:`flex`,flexWrap:`wrap`,gap:12,alignItems:`center`},children:[t.length>0&&(0,U.jsxs)(`div`,{style:{flex:`1 1 auto`}
15,children:[(0,U.jsx)(`strong`,{style:{color:`var(--press-red)`},children:t.map(e=>r(e.platform)).join(`, `)}),` `,t.every(e=>e.reason===`session_expired`)?`session expired. Sign back in so the next edition can pull it.`:t.every(e=>e.reason===`not_connected`)?`isn't connected to your account.`:t.every(e=>e.reason===`scrape_failed`)?`couldn't be reached this morning.`:`need your attention.`]}),n.length>0&&t.length===0&&(0,U.jsxs)(`div`,{style:{flex:`1 1 auto`,color:`var(--muted)`},children:[`No new `,n.map(e=>r(e.platform)).join(`, `),` activity to include in this edition.`]}),t.length>0&&(0,U.jsx)(`button`,{type:`button`,onClick:()=>Ra(`/profile`),className:`sketch-btn sb-red`,style:{padding:`6px 14px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},children:`Reconnect`})]})}function Ks({u:e,digestCount:t,onClose:n}){return(0,U.jsxs)(`div`,{style:{background:`var(--ink)`,color:`var(--paper)`,padding:`18px 28px`,marginBottom:32,display:`flex`,justifyContent:`space-between`,alignItems:`center`,border:`2px solid var(--ink)`,position:`relative`,animation:`fadeSlideIn 400ms ease-out`},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`f-display`,style:{fontSize:28,lineHeight:1,marginBottom:6},children:[`Welcome back, `,e.name.split(` `)[0],`.`]}),(0,U.jsxs)(`div`,{className:`f-serif`,style:{fontSize:14,color:`rgba(255,255,255,0.6)`},children:[t,` edition`,t===1?``:`s`,` read so far. Your desk is ready.`]})]}),(0,U.jsx)(`button`,{onClick:n,style:{background:`none`,border:`none`,color:`rgba(255,255,255,0.4)`,cursor:`pointer`,fontSize:18,padding:`4px 8px`},children:`×`})]})}function qs({digest:e,briefingCount:t}){let n=!!e.alsoToday;return(0,U.jsxs)(`article`,{style:{marginBottom:32},children:[(0,U.jsxs)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:14,display:`flex`,flexWrap:`wrap`,gap:10,alignItems:`center`},children:[n&&(0,U.jsx)(`span`,{style:{background:`var(--press-red)`,color:`var(--paper)`,padding:`3px 8px`,letterSpacing:`0.16em`,fontFamily:`var(--f-cond)`,fontSize:10,fontWeight:700},children:`THE LEAD`}),(0,U.jsxs)(`span`,{children:[e.day,` · `,Oa(e.date).toLocaleDateString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`})]})]}),(0,U.jsx)(`h1`,{className:`f-display`,style:{fontSize:68,lineHeight:.96,margin:`0 0 20px`,letterSpacing:`-0.02em`},children:e.title}),e.deck&&(0,U.jsx)(`div`,{className:`f-editorial digest-lede`,style:{fontSize:22,lineHeight:1.55,color:`var(--ink-soft)`,margin:`0 0 28px`,fontStyle:`italic`,maxWidth:660},dangerouslySetInnerHTML:{__html:e.deck}}),n&&(0,U.jsxs)(`div`,{style:{margin:`0 0 28px`,padding:`12px 0`,borderTop:`1px dashed var(--ink-soft)`,borderBottom:`1px dashed var(--ink-soft)`,fontFamily:`var(--f-mono)`,fontSize:12,color:`var(--ink-soft)`,lineHeight:1.6},children:[(0,U.jsx)(`span`,{className:`f-cond`,style:{fontSize:10,letterSpacing:`0.16em`,textTransform:`uppercase`,color:`var(--press-red)`,fontWeight:700,marginRight:10},children:`Also today`}),e.alsoToday]}),(0,U.jsxs)(`div`,{style:{borderTop:`1.5px solid var(--ink)`,borderBottom:`1.5px solid var(--ink)`,padding:`10px 0`,marginBottom:36,display:`flex`,gap:30,flexWrap:`wrap`,fontFamily:`var(--f-mono)`,fontSize:11,color:`var(--muted)`,letterSpacing:`0.08em`},children:[(()=>{let t=Oa(e.date);return isNaN(t.getTime())?null:(0,U.jsxs)(`span`,{children:[`BREWED `,t.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0}).toUpperCase()]})})(),e.briefingReadMin&&(0,U.jsxs)(`span`,{children:[e.briefingReadMin,`-MIN READ`]}),(0,U.jsxs)(`span`,{children:[e.itemCount||`—`,` ITEMS · `,t,` CARDS`]}),(()=>{let t=Es(e.sources);return t?(0,U.jsxs)(`span`,{children:[`USING `,t.toUpperCase()]}):null})()]})]})}function Js({onRetry:e}){return(0,U.jsxs)(`div`,{style:{padding:`80px 0`,textAlign:`center`},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:28,marginBottom:12},children:`Couldn't load this edition`}),(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:15,color:`var(--muted)`,marginBottom:18},children:`Something went wrong fetching today's article. The page may have stale data — try again.`}),(0,U.jsx)(`button`,{onClick:e,className:`sketch-btn sb-red`,style:{padding:`10px 20px`},children:`Try again`})]})}var Ys={x:`X`,reddit:`Reddit`,linkedin:`LinkedIn`}
15,Xs={article:`Article`,briefing:`Briefings`},Zs=[{d:0,label:`M`,full:`Monday`},{d:1,label:`T`,full:`Tuesday`},{d:2,label:`W`,full:`Wednesday`},{d:3,label:`T`,full:`Thursday`},{d:4,label:`F`,full:`Friday`},{d:5,label:`S`,full:`Saturday`},{d:6,label:`S`,full:`Sunday`}],Qs={daily:[0,1,2,3,4,5,6],weekdays:[0,1,2,3,4],weekends:[5,6]},$s={daily:[0,1,2,3,4,5,6],mon_fri:[0,1,2,3,4],mon_sat:[0,1,2,3,4,5],weekly:[6],weekends:[5,6]},ec=[`America/Los_Angeles`,`America/Denver`,`America/Chicago`,`America/New_York`,`America/Anchorage`,`America/Honolulu`,`Europe/London`,`Europe/Berlin`,`Europe/Paris`,`Asia/Tokyo`,`Asia/Singapore`,`Asia/Kolkata`,`Australia/Sydney`,`UTC`];function tc(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e)return e}catch{}return`America/Los_Angeles`}function nc(e){let t=parseInt(e,10)||0,n=t>=12?`PM`:`AM`;return{h12:(t+11)%12+1,ampm:n}}function rc(e,t){let n=parseInt(e,10)||12;return n<1&&(n=1),n>12&&(n=12),t===`AM`?n===12?0:n:n===12?12:n+12}function ic({open:e,onClose:t,onCreate:n,initial:r,store:i}){let[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)([0,1,2,3,4,5,6]),[l,u]=(0,_.useState)(7),[d,f]=(0,_.useState)(0),[p,m]=(0,_.useState)(`AM`),[h,g]=(0,_.useState)(tc),[v,y]=(0,_.useState)({x:!0,reddit:!0,linkedin:!1}),[b,x]=(0,_.useState)([]),[S,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(`article`),[E,D]=(0,_.useState)(100),[O,k]=(0,_.useState)(!0),[ee,A]=(0,_.useState)(!1),[j,te]=(0,_.useState)(null),[ne,re]=(0,_.useState)(!1),M=i?.data?.user?.interests||[],N=e=>!!i?.data?.user?.connected?.[e]?.connected;(0,_.useEffect)(()=>{if(e){if(r){o(r.name||``),Array.isArray(r.daysOfWeek)&&r.daysOfWeek.length?c([...r.daysOfWeek]):r.cadence&&$s[r.cadence]?c([...$s[r.cadence]]):c([0,1,2,3,4,5,6]);let e=r.sendHour??7,t=r.sendMinute??0,{h12:n,ampm:i}=nc(e);u(n),f(t),m(i),g(r.timezone||tc());let a=Array.isArray(r.sources)?r.sources:Array.isArray(r.platforms)?r.platforms:[];y({x:a.includes(`x`)||a.includes(`twitter`),reddit:a.includes(`reddit`),linkedin:a.includes(`linkedin`)}),x([...Array.isArray(r.topics)&&r.topics.length?r.topics:M]),T((r.format||r.digestFormat||`article`).toLowerCase()===`briefing`?`briefing`:`article`),D(r.count||100),k(r.separateByPlatform??!0),A(!1)}else o(`Daily digest`),c([0,1,2,3,4,5,6]),u(7),f(0),m(`AM`),g(tc()),y({x:!0,reddit:!0,linkedin:!1}),x([...M]),C(``),T(`article`),D(100),k(!0),A(!1);te(null),re(!1)}},[e,r]),(0,_.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),(0,_.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let ie=rc(l,p),ae=(0,_.useMemo)(()=>{if(!e)return 0;try{let e=new Date,t=new Intl.DateTimeFormat(`en-US`,{timeZone:h,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1}),n=Object.fromEntries(t.formatToParts(e).map(e=>[e.type,e.value])),r=`${n.year}-${n.month}-${n.day}`,i=new Date(`${r}T${String(ie).padStart(2,`0`)}:${String(d).padStart(2,`0`)}:00`),a=i.getTime()-new Date(t.format(i).replace(`,`,``)).getTime(),o=new Date(i.getTime()-a);o<=e&&(o=new Date(o.getTime()+864e5));let s=(o-e)/6e4;if(s<15)return Math.ceil(15-s)}catch{}return 0},[e,h,ie,d]);if(!e)return null;let oe=e=>{te(null),y(t=>({...t,[e]:!t[e]}))},se=()=>{let e=S.trim();if(e){if(b.some(t=>t.toLowerCase()===e.toLowerCase())){C(``);return}x([...b,e]),C(``)}},P=e=>x(b.filter(t=>t!==e)),F=Object.entries(v).filter(([e,t])=>t).map(([e])=>e),I=a.trim().length>0&&F.length>0,ce=async e=>{let t=e===`x`?`twitter`:e;try{return!!(await Wa({type:`breve.checkSignin`,payload:{platform:t}},{timeoutMs:3e4}))?.signedIn}catch{return N(e)}},le=async()=>{if(!I||ne)return;te(null),re(!0);let e;try{if(Ha()){let t=await Promise.all(F.map(ce));e=F.filter((e,n)=>!t[n])}else e=F.filter(e=>!N(e))}finally{re(!1)}if(e.length){te(e);return}n&&n({name:a.trim(),sendHour:ie,sendMinute:d,timezone:h,platforms:F,topics:b,digestFormat:w,count:E,separateByPlatform:O,daysOfWeek:s})},ue=Aa(s),de=`${l}:${String(d).padStart(2,`0`)} ${p}`;return(0,U.jsx)(`div`,{className:`subscription-overlay`,onClick:t,children:(0,U.jsxs)(`div`,{className:`subscription-modal`,onClick:e=>e.stopPropagation(),children:[(0,U.jsxs)(`div`,{className:`subscription-head`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Newsletter`}),(0,U.jsx)(`h2`,{className:`subscription-title`,children:r?`Edit subscription`:`New subscription`})]}),(0,U.jsx)(`button`,{onClick:t,className:`settings-close`,children:`× Close`})]}),(0,U.jsxs)(`div`,{className:`subscription-body`,children:[(0,U.jsxs)(`div`,{className:`subscription-row`,children:[(0,U.jsx)(sc,{children:`N
15ame`}),(0,U.jsx)(`input`,{type:`text`,className:`profile-edit-field`,value:a,onChange:e=>o(e.target.value),placeholder:`Daily digest`})]}),(0,U.jsxs)(`div`,{className:`subscription-pair`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(sc,{children:`Send time`}),(0,U.jsxs)(`div`,{className:`subscription-time-row`,children:[(0,U.jsx)(cc,{value:l,min:1,max:12,width:56,onChange:e=>u(e),onCommit:e=>e===0?(m(`AM`),12):e===12?12:e>=1&&e<=11?e:e>=13&&e<=23?(m(`PM`),e-12):null}),(0,U.jsx)(`span`,{className:`subscription-time-sep`,children:`:`}),(0,U.jsx)(cc,{value:d,min:0,max:59,pad:!0,onChange:e=>f(e),width:56}),(0,U.jsx)(lc,{value:p,onChange:m})]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(sc,{children:`Timezone`}),(0,U.jsxs)(`select`,{className:`subscription-select`,value:h,onChange:e=>g(e.target.value),children:[!ec.includes(h)&&(0,U.jsx)(`option`,{value:h,children:h}),ec.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))]})]})]}),(0,U.jsxs)(`div`,{className:`subscription-pair`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(sc,{children:[`Days`,(0,U.jsxs)(`span`,{style:{opacity:.7,textTransform:`none`,letterSpacing:0,marginLeft:8,fontSize:11,fontWeight:400},children:[`— `,ue]})]}),(0,U.jsx)(ac,{value:s,onChange:c})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(sc,{children:`Platforms`}),(0,U.jsx)(`div`,{className:`subscription-platforms`,children:[`x`,`reddit`].map(e=>{let t=v[e];return(0,U.jsxs)(`button`,{type:`button`,className:`sub-platform-card`,"data-platform":e,"data-active":t||void 0,onClick:()=>oe(e),children:[(0,U.jsx)(`span`,{className:`sub-platform-mark`,children:e===`x`?`𝕏`:`r/`}),(0,U.jsxs)(`span`,{className:`sub-platform-body`,children:[(0,U.jsx)(`span`,{className:`sub-platform-name`,children:Ys[e]}),(0,U.jsx)(`span`,{className:`sub-platform-sub`,children:t?`Included`:`Tap to include`})]}),(0,U.jsx)(`span`,{className:`sub-platform-check`,children:t?`✓`:``})]},e)})})]})]}),(0,U.jsxs)(`div`,{className:`subscription-row`,children:[(0,U.jsxs)(sc,{children:[`Topics to search`,(0,U.jsx)(`span`,{style:{opacity:.7,textTransform:`none`,letterSpacing:0,marginLeft:8,fontSize:11,fontWeight:400},children:`— defaults to your profile interests`})]}),(0,U.jsxs)(`div`,{className:`profile-chip-input`,children:[b.map(e=>(0,U.jsxs)(`span`,{className:`profile-chip-input-item`,children:[(0,U.jsx)(`span`,{className:`profile-chip-input-item-label`,children:e}),(0,U.jsx)(`button`,{type:`button`,className:`profile-chip-input-item-remove`,onClick:()=>P(e),"aria-label":`Remove ${e}`,children:`×`})]},e)),(0,U.jsx)(`input`,{value:S,onChange:e=>C(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),se()):e.key===`Backspace`&&!S&&b.length&&P(b[b.length-1])},onBlur:se,placeholder:b.length?`Add another…`:`Type a topic, press Enter`})]})]}),(0,U.jsxs)(`button`,{className:`bd-disclosure`,"aria-expanded":ee,onClick:()=>A(e=>!e),style:{marginTop:4},children:[(0,U.jsx)(`span`,{className:`bd-chevron`,children:`▶`}),`Advanced settings`]}),ee&&(0,U.jsxs)(`div`,{style:{padding:`8px 0 4px`},children:[(0,U.jsxs)(`div`,{className:`subscription-row`,children:[(0,U.jsxs)(sc,{children:[`Format to email`,(0,U.jsx)(`span`,{style:{opacity:.7,textTransform:`none`,letterSpacing:0,marginLeft:8,fontSize:11,fontWeight:400},children:`— both formats are generated; this picks which one is sent`})]}),(0,U.jsx)(`div`,{style:{display:`flex`,gap:8},children:[`article`,`briefing`].map(e=>(0,U.jsx)(`button`,{type:`button`,className:`brew-chip`,"data-active":w===e||void 0,onClick:()=>T(e),children:Xs[e]},e))})]}),(0,U.jsxs)(`div`,{className:`subscription-row`,children:[(0,U.jsx)(sc,{children:`Posts to scan`}),(0,U.jsx)(oc,{value:E,min:20,max:300,fallback:100,onChange:D})]}),(0,U.jsx)(`div`,{className:`subscription-row`,style:{marginBottom:0},children:(0,U.jsxs)(`label`,{className:`subscription-check`,"data-on":O||void 0,children:[(0,U.jsx)(`span`,{className:`subscription-check-box`,onClick:()=>k(e=>!e),children:O?`✓`:``}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:`f-type`,style:{fontSize:13,display:`block`},children:`Separate content by platform`}),(0,U.jsx)(`span`,{className:`f-type`,style:{fontSize:11,color:`var(--muted)`},children:`One section per feed instead of merged.`})]})]})})]}),ae>0&&(0,U.jsxs)(`div`,{className:`subscription-warning`,children:[`The first email may arrive ~`,ae,` min late — Breve needs ~15 min to generate the digest. Following sends will be on time.`]}),j&&j.length>0&&(0,U.jsxs)(`div`,{className:`subscription-warning`,children:[`You're not signed into `,j.map(e=>Ys[e]).join(` and `),`. Sign `,j.length>1?`into them`:`in`,` in another tab, then click Schedule again.`]})]}),(0,U.jsxs)(`div`,{className:`subscription-footer`,children:[(0,U.jsx)(`div`,{className:`subscription-status`+(I?``:` is-error`),children:I?`Will send ${ue} at ${de} (${h})`:`Name and at least one platform required.`}),(0,U.jsxs)(`div`,{className:`subscription-actions`,children:[(0,U.jsx)(`button`,{onClick:t,className:`avatar-modal-btn`,children:`Cancel`}),(0,U.jsx)(`button`,{onClick:le,disabled:!I||ne,className:`avatar-modal-btn is-save`,children:ne?`Checking sign-in…`:r?`Save changes`:`Schedule`})]})]})]})})}
15function ac({value:e,onChange:t}){let n=new Set((e||[]).map(Number)),r=e=>{let r=new Set(n);r.has(e)?r.delete(e):r.add(e);let i=[...r].sort();t(i.length?i:[0,1,2,3,4,5,6])},i=e=>{let t=new Set(Qs[e]);if(n.size!==t.size)return!1;for(let e of n)if(!t.has(e))return!1;return!0};return(0,U.jsxs)(`div`,{className:`day-picker`,children:[(0,U.jsx)(`div`,{className:`day-picker-presets`,children:[{k:`daily`,label:`Every day`},{k:`weekdays`,label:`Weekdays`},{k:`weekends`,label:`Weekends`}].map(e=>(0,U.jsx)(`button`,{type:`button`,className:`day-picker-preset`+(i(e.k)?` is-active`:``),onClick:()=>t([...Qs[e.k]]),children:e.label},e.k))}),(0,U.jsx)(`div`,{className:`day-picker-row`,children:Zs.map(({d:e,label:t,full:i})=>{let a=n.has(e);return(0,U.jsx)(`button`,{type:`button`,className:`day-picker-day`+(a?` is-active`:``),onClick:()=>r(e),"aria-label":i,"aria-pressed":a,title:i,children:t},e)})})]})}function oc({value:e,min:t,max:n,fallback:r,onChange:i}){let[a,o]=(0,_.useState)(String(e));return(0,_.useEffect)(()=>{o(String(e))},[e]),(0,U.jsx)(`input`,{type:`text`,inputMode:`numeric`,value:a,onChange:e=>o(e.target.value.replace(/[^0-9]/g,``).slice(0,5)),onBlur:()=>{if(a===``){i(r??t),o(String(r??t));return}let e=parseInt(a,10);if(isNaN(e)){i(r??t),o(String(r??t));return}let s=Math.max(t,Math.min(n,e));i(s),o(String(s))},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.currentTarget.blur())},onFocus:e=>e.currentTarget.select(),className:`subscription-select`,style:{fontFamily:`var(--f-mono)`,width:140,textAlign:`center`,cursor:`text`}})}function sc({children:e}){return(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,fontWeight:700,color:`var(--ink-soft)`,marginBottom:8},children:e})}function cc({value:e,min:t,max:n,onChange:r,onCommit:i,width:a=56,pad:o=!1}){let s=e=>o?String(e).padStart(2,`0`):String(e),[c,l]=(0,_.useState)(s(e)),[u,d]=(0,_.useState)(!1);(0,_.useEffect)(()=>
15{l(s(e)),d(!1)},[e,o]);let f=()=>{d(!0),setTimeout(()=>d(!1),1200)};return(0,U.jsx)(`input`,{type:`text`,inputMode:`numeric`,value:c,onChange:e=>l(e.target.value.replace(/[^0-9]/g,``).slice(0,2)),onBlur:()=>{if(c===``){l(s(e)),d(!1);return}let a=parseInt(c,10);if(isNaN(a)){l(s(e));return}if(i){let t=i(a);if(t==null||isNaN(t)){f(),l(s(e));return}d(!1),t!==e&&r(t),l(s(t));return}if(a<t||a>n){let i=Math.max(t,Math.min(n,a));f(),i!==e&&r(i),l(s(i));return}d(!1),a!==e&&r(a),l(s(a))},onKeyDown:e=>{if(e.key===`Enter`)e.preventDefault(),e.currentTarget.blur();else if(e.key===`ArrowUp`){e.preventDefault();let i=parseInt(c,10),a=isNaN(i)?t:Math.min(n,i+1);l(s(a)),r(a)}else if(e.key===`ArrowDown`){e.preventDefault();let n=parseInt(c,10),i=isNaN(n)?t:Math.max(t,n-1);l(s(i)),r(i)}},onFocus:e=>e.currentTarget.select(),className:`subscription-stepper`+(u?` is-invalid`:``),style:{width:a}})}function lc({value:e,onChange:t}){return(0,U.jsx)(`div`,{className:`subscription-ampm`,children:[`AM`,`PM`].map(n=>(0,U.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:e===n?`is-active`:``,children:n},n))})}function uc({store:e}){let{data:t,removeDigest:n,restoreDigestLocal:r}=e,[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(new Set),[c,l]=(0,_.useState)(new Set),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(`all`),[m,h]=(0,_.useState)(`active`),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),[x,S]=(0,_.useState)(!1);if(!t)return null;let C=t.user?.reading?.shelfLayout||`board`;(0,_.useEffect)(()=>{m!==`deleted`||y!==null||(S(!0),Ea(`/api/digests/deleted`).then(e=>b(e||[])).catch(e=>{H(`Could not load Recently Deleted: `+e.message),b([])}).finally(()=>S(!1)))},[m,y]);let w=async(e,t)=>{a(e),setTimeout(()=>{s(t=>new Set([...t,e])),a(null)},500),setTimeout(async()=>{try{await Ta(`/api/digests/${t}`),n(t),b(null)}catch(e){H(`Could not delete edition: `+e.message)}l(t=>new Set([...t,e])),H(`Moved to Recently Deleted. Held 30 days.`)},1900)},T=async e=>{try{await Ca(`/api/digests/${e.slug}/restore`),r(e),l(t=>{let n=new Set(t);return n.delete(e.id),n.delete(e.slug),n}),b(t=>(t||[]).filter(t=>t.slug!==e.slug)),H(`Restored "${e.title}".`)}catch(e){H(`Could not restore: `+e.message)}},E=async e=>{try{await Ta(`/api/digests/${e.slug}/permanent`),b(t=>(t||[]).filter(t=>t.slug!==e.slug)),H(`Edition permanently deleted.`)}catch(e){H(`Could not delete: `+e.message)}},D=(()=>{let e=Date.now(),t={"7d":7,"30d":30,"90d":90,year:365}[f];return t?e-t*864e5:0})(),O=u.trim().toLowerCase(),k=t.digests.filter(e=>!(c.has(e.id)||O&&!`${e.title||``} ${e.deck||``}`.toLowerCase().includes(O)||D&&Oa(e.date).getTime()<D)),ee=(0,U.jsxs)(`div`,{className:`shelf-tabs`,children:[(0,U.jsxs)(`button`,{onClick:()=>h(`active`),className:`shelf-tab`,"data-active":m===`active`||void 0,children:[`Past digests`,(0,U.jsx)(`span`,{className:`shelf-tab-count`,children:t.digests.length})]}),(0,U.jsxs)(`button`,{onClick:()=>h(`deleted`),className:`shelf-tab`,"data-active":m===`deleted`||void 0,children:[`Recently deleted`,y&&y.length>0&&(0,U.jsx)(`span`,{className:`shelf-tab-count`,children:y.length})]})]}),A=m===`active`?(0,U.jsxs)(`div`,{className:`shelf-filter`,children:[(0,U.jsx)(`input`,{type:`search`,className:`shelf-search`,value:u,onChange:e=>d(e.target.value),placeholder:`Search past editions…`}),(0,U.jsxs)(`select`,{className:`shelf-range`,value:f,onChange:e=>p(e.target.value),children:[(0,U.jsx)(`option`,{value:`all`,children:`All time`}),(0,U.jsx)(`option`,{value:`7d`,children:`Last 7 days`}),(0,U.jsx)(`option`,{value:`30d`,children:`Last 30 days`}),(0,U.jsx)(`option`,{value:`90d`,children:`Last 90 days`}),(0,U.jsx)(`option`,{value:`year`,children:`Last year`})]}),(0,U.jsxs)(`span`,{className:`shelf-count`,children:[(0,U.jsx)(`strong`,{children:k.length}),` `,k.length===1?`edition`:`editions`]}),(O||f!==`all`)&&(0,U.jsx)(`button`,{onClick:()=>{d(``),p(`all`)},className:`shelf-clear`,children:`Clear`})]}):null,j=(0,U.jsx)(vc,{items:y,loading:x,onRestore:T,onPermanentDelete:e=>v({slug:e.slug,title:e.title,permanent:!0,item:e})}),te=g&&(0,U.jsx)(_c,{title:g.title,permanent:!!g.permanent,onCancel:()=>v(null),onConfirm:()=>{g.permanent?E(g.item):w(g.id,g.slug),v(null)}}),ne=(0,U.jsx)(`div`,{className:`shelf-head`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Back issues`}),(0,U.jsx)(`h1`,{className:`shelf-title`,children:C===`list`?`Past digests.`:`The shelf.`}),(0,U.jsx)(`p`,{className:`shelf-sub`,children:`Your last 30 days of editions, newest first.`})]})});return C===`list`?(0,U.jsxs)(`div`,{className:`page-surface`,children:[(0,U.jsxs)(`div`,{className:`page-wrap`,style:{maxWidth:980},children:[ne,ee,m===`active`?(0,U.jsxs)(U.Fragment,{children:[A,k.length===0?(0,U.jsx)(bc,{hasFilter:!!O||f!==`all`}):(0,U.jsx)(`div`,{className:`shelf-list`,children:k.map(e=>(0,U.jsx)(yc,{d:e,onDelete:()=>v({id:e.id,slug:e.slug,title:e.title})},e.id))})]}):j]}),te]}):(0,U.jsxs)(`div`,{className:`page-surface`,children:[(0,U.jsxs)(`div`,{className:`page-wrap`,style:{maxWidth:1300},children:[ne,ee,m===`deleted`?j:(0,U.jsxs)(U.Fragment,{children:[A,k.length===0?(0,U.jsx)(bc,{hasFilter:!!O||f!==`all`}):(0,U.jsx)(`div`,{className:`shelf-board`,children:k.map((e,t)=>(0,U.jsx)(hc,{d:e,state:i===e.id?`is-pulling`:o.has(e.id)?`is-falling`:``,onDelete:()=>v({id:e.id,slug:e.slug,title:e.title})},e.id))})]})]}),te]})}var dc={x:`x`,twitter:`x`,reddit:`reddit`,linkedin:`linkedin`},fc={x:`𝕏`,reddit:`r/`,linkedin:`in`};function pc({sources:e}){if(!e)return null;let t=Array.isArray(e)?e:Object.keys(e);if(!t.length)return null;let n=new Set,r=[];for(let e of t){let t=dc[String(e).toLowerCase()];!t||n.has(t)||(n.add(t),r.push(t))}return r.length?(0,U.jsx)(`div`,{className:`shelf-badges`,children:r.map(e=>
15(0,U.jsx)(`span`,{className:`shelf-badge`,"data-platform":e,children:fc[e]},e))}):null}function mc(e){if(!e)return null;let t=Oa(e);return isNaN(t.getTime())?null:t.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})}function hc({d:e,state:t,onDelete:n}){let r=Oa(e.date),i=isNaN(r.getTime())?``:r.toLocaleDateString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`}),a=mc(e.date),o=e.hasArticle!==!1,s=e.hasBriefing!==!1;return(0,U.jsxs)(`div`,{className:`shelf-card `+t,children:[(0,U.jsx)(`button`,{className:`shelf-card-trash`,onClick:n,title:`Delete edition`,"aria-label":`Delete edition`,children:(0,U.jsx)(gc,{})}),(0,U.jsxs)(`a`,{href:`#/digest/`+e.id+`/article`,className:`shelf-card-inner`,children:[(0,U.jsxs)(`div`,{className:`shelf-card-meta`,children:[(0,U.jsx)(`span`,{className:`shelf-card-date`,children:i.toUpperCase()}),a&&(0,U.jsxs)(`span`,{className:`shelf-card-brewed`,children:[`brewed `,a.toLowerCase()]})]}),e.newsletter&&(0,U.jsxs)(`div`,{className:`shelf-card-newsletter`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,children:`✉`}),` `,e.newsletter.name]}),(0,U.jsx)(`h3`,{className:`shelf-card-title`,children:e.title}),e.deck&&(0,U.jsx)(`p`,{className:`shelf-card-deck`,children:e.deck}),(0,U.jsxs)(`div`,{className:`shelf-card-foot`,children:[(0,U.jsxs)(`div`,{className:`shelf-card-stats`,children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:e.itemCount}),` items`]}),(0,U.jsx)(`span`,{className:`shelf-card-dot`,children:`·`}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:e.topicCount}),` topics`]}),e.readMin&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`shelf-card-dot`,children:`·`}),(0,U.jsxs)(`span`,{children:[e.readMin,`-min read`]})]})]}),(0,U.jsxs)(`div`,{className:`shelf-card-foot-right`,children:[(0,U.jsx)(pc,{sources:e.sources}),(0,U.jsxs)(`div`,{className:`shelf-card-formats`,children:[o&&(0,U.jsx)(`span`,{className:`shelf-card-fmt`,title:`Article`,children:`A`}),s&&(0,U.jsx)(`span`,{className:`shelf-card-fmt`,title:`Briefings`,children:`B`})]})]})]})]})]})}function gc(){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`22`,height:`22`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`path`,{d:`M3 6h18`}),(0,U.jsx)(`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),(0,U.jsx)(`path`,{d:`M19 6l-1.2 13.4A2 2 0 0 1 15.8 21H8.2a2 2 0 0 1-2-1.6L5 6`}),(0,U.jsx)(`path`,{d:`M10 11v6`}),(0,U.jsx)(`path`,{d:`M14 11v6`})]})}function _c({title:e,kind:t,permanent:n,onConfirm:r,onCancel:i}){let a={digest:{eyebrow:`Move to Recently Deleted`,heading:`Delete this edition?`,body:(0,U.jsxs)(U.Fragment,{children:[`“`,e,`” will move to Recently Deleted and be held for 30 days. You can restore it from there.`]}),cta:`Delete`},permanent:{eyebrow:`Delete permanently`,heading:`Delete forever?`,body:(0,U.jsxs)(U.Fragment,{children:[`“`,e,`” will be permanently removed. This can't be undone.`]}),cta:`Delete forever`},newsletter:{eyebrow:`Cancel subscription`,heading:`Delete this newsletter?`,body:(0,U.jsxs)(U.Fragment,{children:[`“`,e,`” will stop sending and be removed from your schedule. You can recreate it any time.`]}),cta:`Delete`}}[t||(n?`permanent`:`digest`)];return(0,U.jsx)(`div`,{onClick:i,className:`settings-overlay`,style:{zIndex:1100},children:(0,U.jsxs)(`div`,{onClick:e=>e.stopPropagation(),className:`paper-vellum settings-modal`,style:{width:`min(460px, 100%)`,maxHeight:`auto`},children:[(0,U.jsx)(`div`,{className:`settings-head`,style:{paddingBottom:14},children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:a.eyebrow}),(0,U.jsx)(`h2`,{className:`settings-title`,style:{fontSize:32},children:a.heading})]})}),(0,U.jsxs)(`div`,{className:`settings-section`,style:{marginBottom:0},children:[(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:14,color:`var(--ink-soft)`,lineHeight:1.55,margin:`0 0 18px`},children:a.body}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10,justifyContent:`flex-end`},children:[(0,U.jsx)(`button`,{onClick:i,className:`avatar-modal-btn`,children:`Cancel`}),(0,U.jsx)(`button`,{onClick:r,className:`avatar-modal-btn is-save`,children:a.cta})]})]})]})})}function vc({items:e,loading:t,onRestore:n,onPermanentDelete:r}){return t?(0,U.jsx)(`div`,{className:`shelf-empty`,children:`Loading Recently Deleted…`}):!e||e.length===0?(0,U.jsx)(`div`,{className:`shelf-empty`,children:`Nothing in Recently Deleted. Deleted editions show up here for 30 days before they're permanently removed.`}):(0,U.jsx)(`div`,{className:`shelf-list`,children:e.map(e=>{let t=Oa(e.deletedAt),i=(Date.now()-t.getTime())/864e5,a=Math.max(0,Math.ceil(30-i));return(0,U.jsxs)(`div`,{className:`shelf-deleted`+(a<=3?` is-urgent`:``),children:[(0,U.jsxs)(`div`,{className:`shelf-deleted-countdown`,children:[(0,U.jsx)(`strong`,{children:a}),(0,U.jsx)(`span`,{children:`days left`})]}),(0,U.jsxs)(`div`,{className:`shelf-deleted-body`,children:[(0,U.jsx)(`h3`,{className:`shelf-row-title`,children:e.title}),e.deck&&(0,U.jsx)(`p`,{className:`shelf-row-deck`,children:e.deck})]}),(0,U.jsxs)(`div`,{className:`shelf-deleted-actions`,children:[(0,U.jsx)(`button`,{onClick:()=>n(e),className:`avatar-modal-btn`,children:`Restore`}),(0,U.jsx)(`button`,{onClick:()=>r(e),className:`avatar-modal-btn is-warn`,style:{background:`transparent`,borderColor:`var(--press-red)`,color:`var(--press-red)`},children:`Delete now`})]})]},e.slug)})})}function yc({d:e,onDelete:t}){let n=Oa(e.date).toLocaleDateString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`,year:`numeric`}),r=mc(e.date);return(0,U.jsxs)(`div`,{className:`shelf-row`,children:[(0,U.jsxs)(`a`,{href:`#/digest/`+e.id+`/article`,className:`shelf-row-main`,children:[(0,U.jsxs)(`div`,{className:`shelf-row-date`,children:[(0,U.jsx)(`div`,{className:`shelf-row-date-main`,children:n}),r&&(0,U.jsx)(`div`,{className:`shelf-row-date-sub`,children:r.toLowerCase()})]}),(0,U.jsxs)(`div`,{className:`shelf-row-body`,children:[(0,U.jsxs)(`div`,{className:`shelf-row-titlebar`,children:[(0,U.jsx)(`h3`,{className:`shelf-row-title`,children:e.title}),e.newsletter&&(0,U.jsxs)(`span`,{className:`shelf-row-newsletter`,children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,children:`✉`}),` `,e.newsletter.name]})]}),e.deck&&(0,U.jsx)(`p`,{className:`shelf-row-deck`,children:e.deck}),(0,U.jsxs)(`div`,{className:`shelf-row-meta`,children:[(0,U.jsx)(pc,{sources:e.sources}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:e.itemCount}),` items`]}),(0,U.jsx)(`span`,{className:`shelf-row-dot`,children:`·`}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`strong`,{children:e.topicCount}),` topics`]}),e.readMin&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`shelf-row-dot`,children:`·`}),(0,U.jsxs)(`span`,{children:[e.readMin,`-min read`]})]})]})]})]}),(0,U.jsx)(`button`,{onClick:t,"aria-label":`Delete edition`,title:`Delete edition`,className:`shelf-row-trash`,children:`×`})]})}function bc({hasFilter:e}){return(0,U.jsx)(`div`,{className:`shelf-empty`,children:e?`Nothing matches that search. Try clearing the filter.`:`Nothing on the shelf yet. Brew an edition to start.`})}function xc({store:e}){let{data:t,updateNewsletter:n,addNewsletter:r}=e,[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null);if(!t)return null;let f=async e=>{try{n(e,{active:(await wa(`/api/newsletters/${e}/toggle`))?.enabled??!t.newsletters.find(t=>
15t.id===e)?.active})}catch(e){H(`Could not update newsletter: `+e.message)}},p=e=>d({id:e.id,name:e.name}),m=async()=>{if(!u)return;let{id:t}=u;d(null);try{await Ta(`/api/newsletters/${t}`),e.setData(e=>({...e,newsletters:e.newsletters.filter(e=>e.id!==t)})),H(`Newsletter deleted.`)}catch(e){H(`Could not delete newsletter: `+e.message)}},h=e=>{let t={x:`twitter`,reddit:`reddit`,linkedin:`linkedin`,twitter:`twitter`},n=(e.platforms||[]).map(e=>t[e]||e);return{name:e.name,sendHour:e.sendHour??7,sendMinute:e.sendMinute??0,timezone:e.timezone||`America/Los_Angeles`,cadence:e.cadence||`daily`,platforms:n,topics:e.topics||[],digestFormat:(e.digestFormat||`briefing`).toLowerCase(),count:e.count||100,separateByPlatform:!!e.separateByPlatform,platformWeights:{}}},g=(e,n)=>{let r=new Set((t.newsletters||[]).filter(e=>e.id!==n).map(e=>(e.name||``).trim().toLowerCase())),i=(e||``).trim()||`Daily digest`;if(!r.has(i.toLowerCase()))return i;for(let e=2;e<1e3;e++){let t=`${i} (${e})`;if(!r.has(t.toLowerCase()))return t}return`${i} (${Date.now()})`},v=async e=>{if(o){try{let t=h({...e,name:g(e.name,o.id)}),r=await wa(`/api/newsletters/${o.id}`,t);n(o.id,ja(r)),s(null),a(!1),t.name===e.name.trim()?r.firstRunDelayed?H(`Newsletter updated. The first email after this change may arrive ~${r.delayMinutes} min late — breve needs time to generate the digest. Following sends will be on time.`):H(`Newsletter updated.`):H(`Saved as "${t.name}" — that name was already in use.`)}catch(e){let t=e?.message||`unknown error`;H(/^[A-Z]/.test(t)&&t.length>30?t:`Could not update newsletter: `+t)}return}try{let t=g(e.name),n=await Ca(`/api/newsletters`,h({...e,name:t}));r(ja(n)),a(!1),t===(e.name||``).trim()?n.firstRunDelayed?H(`Subscription scheduled. The first email may arrive ~${n.delayMinutes} min late — breve needs time to generate the digest. All following newsletters will be on time.`):H(`Subscription scheduled.`):H(`Scheduled as "${t}" — that name was already in use.`)}catch(e){let t=e?.message||`unknown error`;H(/^[A-Z]/.test(t)&&t.length>30?t:`Could not create newsletter: `+t)}},y=e=>{let t=(e||``).split(`·`).map(e=>e.trim()),n=(t[0]||``).toLowerCase(),r=t[1]||``,i=r.match(/(\d{1,2})(?::(\d{2}))?\s*(AM|PM)/i),a=r.toLowerCase();if(i){let e=i[1],t=i[2]||`00`,n=i[3].toLowerCase()[0];a=t===`00`?`${e}${n}`:`${e}:${t}${n}`}return{days:n,time:a}},b=e=>{let t={x:`X`,twitter:`X`,reddit:`Reddit`,linkedin:`LinkedIn`};return e.length===3?`All sources`:e.length===1?t[e[0]]+` only`:e.map(e=>t[e]).join(` + `)};return(0,U.jsx)(`div`,{className:`page-surface`,children:(0,U.jsxs)(`div`,{className:`page-wrap`,children:[(0,U.jsxs)(`div`,{style:{maxWidth:980,margin:`0 auto`},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:10},children:`Subscriptions`}),(0,U.jsx)(`h1`,{className:`f-display`,style:{fontSize:68,lineHeight:.95,margin:`0 0 12px`},children:`Your newsletters.`}),(0,U.jsx)(`p`,{className:`f-editorial`,style:{fontSize:20,color:`var(--ink-soft)`,fontStyle:`italic`,maxWidth:620,marginBottom:40},children:`Each slip is a standing order — when to pull, from what, how many items, and in which format.`}),(0,U.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:t.newsletters.map((e,t)=>{let n=y(e.schedule),r=e.format===`briefing`?`briefing`:e.format===`article`?`article`:`both formats`;return(0,U.jsxs)(`div`,{className:`newsletter-ticket`,style:{transform:`rotate(${t%2==0?-.3:.35}deg)`},children:[(0,U.jsxs)(`div`,{className:`nt-stub `+(e.active?`nt-stub-active`:`nt-stub-paused`),children:[(0,U.jsx)(`div`,{className:`nt-stub-label`,children:`Send time`}),(0,U.jsxs)(`div`,{className:`nt-stub-days`,children:[n.days,` ·`]}),(0,U.jsx)(`div`,{className:`nt-stub-time`,children:n.time}),(0,U.jsx)(`div`,{className:`nt-stub-status`,children:e.active?`Active`:`Paused`})]}),(0,U.jsxs)(`div`,{className:`nt-body`,children:[(0,U.jsx)(`h3`,{className:`nt-name`,children:e.name}),(0,U.jsxs)(`div`,{className:`nt-meta`,children:[(0,U.jsx)(`span`,{children:b(e.sources)}),(0,U.jsx)(`span`,{className:`nt-dot`,children:`·`}),(0,U.jsx)(`span`,{children:r}),(0,U.jsx)(`span`,{className:`nt-dot`,children:`·`}),(0,U.jsxs)(`span`,{children:[e.count,` posts scanned`]}),Array.isArray(e.topics)&&e.topics.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`nt-dot`,children:`·`}),(0,U.jsxs)(`span`,{children:[e.topics.length,` topic`,e.topics.length===1?``:`s`]})]})]}),(0,U.jsx)(`div`,{className:`nt-foot`,children:e.active?e.nextSendAt?(0,U.jsxs)(U.Fragment,{children:[`Next · `,wc(e.nextSendAt)]}
15):e.lastSent?(0,U.jsxs)(U.Fragment,{children:[`Last sent · `,wc(e.lastSent)]}):(0,U.jsxs)(U.Fragment,{children:[`Next up · `,n.days,` `,n.time]}):(0,U.jsx)(U.Fragment,{children:`Paused`})})]}),(0,U.jsxs)(`div`,{className:`nt-actions`,children:[(0,U.jsx)(`button`,{className:`nt-btn`,onClick:()=>l(e),title:`See how this email will look in an inbox`,children:`Preview`}),(0,U.jsx)(`button`,{className:`nt-btn`,onClick:()=>{s(e),a(!0)},children:`Edit`}),(0,U.jsx)(`button`,{className:`nt-btn`,onClick:()=>f(e.id),children:e.active?`Pause`:`Resume`}),(0,U.jsx)(`button`,{className:`nt-btn`,onClick:()=>p(e),style:{color:`var(--press-red)`,borderColor:`var(--press-red)`},children:`Delete`})]})]},e.id)})}),(0,U.jsx)(`div`,{className:`paper paper-grain`,style:{border:`2px dashed var(--ink)`,padding:24,textAlign:`center`,opacity:.7,cursor:`pointer`,marginTop:28,transition:`opacity .15s`},onMouseEnter:e=>e.currentTarget.style.opacity=1,onMouseLeave:e=>e.currentTarget.style.opacity=.7,onClick:()=>a(!0),children:(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:13,letterSpacing:`0.14em`,textTransform:`uppercase`},children:`+ Start a new subscription`})})]}),(0,U.jsx)(ic,{open:i,onClose:()=>{a(!1),s(null)},onCreate:v,initial:o,store:e}),(0,U.jsx)(Sc,{newsletter:c,onClose:()=>l(null)}),u&&(0,U.jsx)(_c,{kind:`newsletter`,title:u.name||`Untitled newsletter`,onCancel:()=>d(null),onConfirm:m})]})})}function Sc({newsletter:e,onClose:t}){let n=!!e,[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(null);return(0,_.useEffect)(()=>{n&&(o(!0),c(null),i(``),fetch(`/api/newsletters/${e.id}/preview-email`,{credentials:`include`}).then(e=>e.ok?e.text():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>i(e)).catch(e=>c(e.message||`Could not load preview`)).finally(()=>o(!1)))},[n,e?.id]),(0,_.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,t]),n?(0,U.jsx)(`div`,{className:`email-preview-backdrop`,onClick:t,children:(0,U.jsxs)(`div`,{className:`email-preview-shell`,onClick:e=>e.stopPropagation(),children:[(0,U.jsxs)(`div`,{className:`email-preview-header`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:4},children:`Email preview`}),(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:22,lineHeight:1.1},children:e.name}),(0,U.jsx)(`div`,{className:`f-mono`,style:{fontSize:11,color:`var(--muted)`,letterSpacing:`0.08em`,marginTop:4},children:`Rendered from your latest matching digest. This is what subscribers see in their inbox.`})]}),(0,U.jsx)(`button`,{className:`nt-btn`,onClick:t,"aria-label":`Close preview`,children:`Close`})]}),(0,U.jsxs)(`div`,{className:`email-preview-body`,children:[a&&(0,U.jsx)(`div`,{className:`email-preview-status f-mono`,children:`Loading preview…`}),s&&!a&&(0,U.jsx)(`div`,{className:`email-preview-status f-mono`,style:{color:`var(--press-red)`},children:s}),r&&!a&&!s&&(0,U.jsx)(`iframe`,{title:`Email preview for ${e.name}`,srcDoc:r,sandbox:`allow-same-origin`,className:`email-preview-iframe`})]})]})}):null}var Cc=25;function wc(e){if(!e)return null;let t=Oa(e);return isNaN(t.getTime())?null:`${t.toLocaleDateString(`en-US`,{weekday:`short`,month:`short`,day:`numeric`})} · ${t.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})}`}function Tc({label:e,onRemove:t,variant:n}){return(0,U.jsxs)(`span`,{className:`profile-chip-input-item`+(n===`anti`?` is-anti`:``),children:[(0,U.jsx)(`span`,{className:`profile-chip-input-item-label`,children:e}),(0,U.jsx)(`button`,{type:`button`,className:`profile-chip-input-item-remove`,onClick:t,"aria-label":`Remove ${e}`,children:`×`})]})}function Ec({store:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=!!e?.extension;(0,_.useEffect)(()=>{if(!p){u(null);return}let e=!1;return(async()=>{try{let t=await Wa({type:`breve.getAutoScrape`},{timeoutMs:5e3});e||u(!!t?.enabled)}catch{e||u(!1)}})(),()=>{e=!0}}
15,[p]);let m=async()=>{if(!p||l===null)return;f(!0);let e=!l;try{u(!!(await Wa({type:`breve.setAutoScrape`,payload:{enabled:e}},{timeoutMs:5e3}))?.enabled)}catch(e){H(`Couldn't reach the extension: ${e.message||e}`)}finally{f(!1)}},h=(0,_.useCallback)(async()=>{try{n((await Ea(`/api/extension/tokens`))?.tokens||[])}catch(e){H(`Couldn't load tokens: ${e.message}`)}},[]);(0,_.useEffect)(()=>{h()},[h]);let g=(0,_.useCallback)(async()=>{c(!0);try{let e=await Ca(`/api/extension/connect`,{label:a.trim()||null});i({token:e.token,label:e.label}),o(``),await h()}catch(e){H(`Connect failed: ${e.message}`)}finally{c(!1)}},[a,h]),v=(0,_.useCallback)(async e=>{if(confirm(`Revoke this token? Any extension using it will stop working.`))try{await Ta(`/api/extension/tokens/${e}`),await h()}catch(e){H(`Revoke failed: ${e.message}`)}},[h]),y=(0,_.useCallback)(()=>{r?.token&&navigator.clipboard.writeText(r.token).then(()=>H(`Token copied.`),()=>H(`Copy failed — select the text and copy it manually.`))},[r]);return(0,U.jsxs)(`section`,{className:`profile-section`,children:[(0,U.jsxs)(`div`,{className:`profile-section-head`,children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Browser extension`}),(0,U.jsx)(`h3`,{className:`profile-section-title`,children:`Pull X without giving us your cookies.`}),(0,U.jsx)(`p`,{className:`profile-section-sub`,children:`Install the breve Chrome extension, paste a token from here, and the extension scrapes your feed locally and ships filtered posts back to your account. Your X session stays in your browser.`})]}),p&&(0,U.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:16,padding:`12px 14px`,marginBottom:14,background:`var(--paper)`,border:`1px solid var(--ink)`},children:[(0,U.jsxs)(`div`,{style:{flex:1},children:[(0,U.jsxs)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:12,textTransform:`uppercase`,letterSpacing:`0.12em`,color:`var(--press-red)`,marginBottom:4},children:[`Auto-scrape · `,l?`On`:`Off`]}),(0,U.jsx)(`div`,{style:{fontSize:13,color:`var(--ink-soft)`,lineHeight:1.5},children:`When on, the extension quietly grabs visible posts as you naturally browse x.com / reddit.com — no tabs opened, no clicks required. By the time you brew, your posts are already ingested. Off by default; only flip this on if you're OK with breve pulling posts during your normal browsing.`})]}),(0,U.jsx)(`button`,{type:`button`,className:`profile-source-btn`+(l?``:` is-primary`),onClick:m,disabled:l===null||d,style:{minWidth:80},children:d?`…`:l?`Turn off`:`Turn on`})]}),r&&(0,U.jsxs)(`div`,{className:`profile-source`,style:{flexDirection:`column`,alignItems:`stretch`,background:`var(--paper)`,border:`2px solid var(--ink)`,padding:16,gap:8},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:11,textTransform:`uppercase`,letterSpacing:`0.12em`,color:`var(--press-red)`},children:`New token — shown once`}),(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-mono, monospace)`,fontSize:13,wordBreak:`break-all`,background:`var(--ink)`,color:`var(--paper)`,padding:10},children:r.token}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,U.jsx)(`button`,{className:`profile-source-btn is-primary`,onClick:y,children:`Copy`}),(0,U.jsx)(`button`,{className:`profile-source-btn`,onClick:()=>i(null),children:`I've saved it`})]}),(0,U.jsx)(`div`,{style:{fontSize:12,color:`var(--ink-soft)`,lineHeight:1.5},children:`Paste this into the breve extension's settings page along with your server URL. Treat it like a password — anyone with this token can push posts to your account.`})]}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:14,alignItems:`stretch`},children:[(0,U.jsx)(`input`,{type:`text`,value:a,onChange:e=>o(e.target.value.slice(0,80)),placeholder:`Label (e.g. work laptop)`,className:`profile-chip-input`,style:{flex:1,padding:`8px 10px`}}),(0,U.jsx)(`button`,{className:`profile-source-btn is-primary`,onClick:g,disabled:s,children:s?`Generating…`:`Generate token`})]}),t&&t.length>0&&(0,U.jsxs)(`div`,{style:{marginTop:14},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:11,textTransform:`uppercase`,letterSpacing:`0.12em`,color:`var(--ink-soft)`,marginBottom:6},children:`Active tokens`}),(0,U.jsx)(`div`,{className:`profile-source-grid`,children:t.map(e=>(0,U.jsxs)(`div`,{className:`profile-source`,children:[(0,U.jsx)(`div`,{className:`profile-source-mark`,children:`🔑`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`profile-source-name`,children:e.label||`Unnamed`}),(0,U.jsx)(`div`,{className:`profile-source-handle`,children:e.lastUsedAt?`Last used ${new Date(e.lastUsedAt).toLocaleDateString()}`:`Never used`})]}),(0,U.jsx)(`div`,{className:`profile-source-actions`,children:(0,U.jsx)(`button`,{onClick:()=>v(e.id),className:`profile-source-btn`,children:`Revoke`})})]},e.id))})]}),t&&t.length===0&&!r&&(0,U.jsxs)(`div`,{style:{marginTop:14,fontSize:13,color:`var(--ink-soft)`,lineHeight:1.6},children:[`No tokens yet. Generate one, then load the extension and paste it into the settings page. The extension lives at`,` `,(0,U.jsx)(`code`,{children:`extension/`}),` in the breve repo for now — we'll list it on the Chrome Web Store after launch.`]})]})}function Dc({store:e,openSettings:t}){let{data:n,updateUser:r,updateConnected:i,updateTweaks:a,signOut:o,local:s}=e;if(!n||!n.user)return null;
15let c=n.user,l=s?.tweaks?.avatarShape||`circle`,u=(0,_.useRef)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)([]),[S,C]=(0,_.useState)(``),[w,T]=(0,_.useState)([]),[E,D]=(0,_.useState)(``),[O,k]=(0,_.useState)(``);(n.digests||[]).length;let ee=()=>{x(c.interests||[]),C(``),T(c.antiTopics||[]),D(``),k(c.interestDescription||``),y(!0)},A=e=>{let t=(e||``).trim();if(!t)return;let n=t.toLowerCase();if(b.some(e=>e.toLowerCase()===n)){C(``);return}if(b.length>=Cc){H(`Topic limit is ${Cc}. Drop one to add another.`);return}x(e=>[...e,t]),C(``)},j=e=>x(t=>t.filter(t=>t!==e)),te=async()=>{let e=new Set,t=b.filter(t=>{let n=t.toLowerCase();return e.has(n)?!1:(e.add(n),!0)}),n=!1;t.length>Cc&&(t=t.slice(0,Cc),n=!0);try{await wa(`/api/profile/interests`,{topics:t,antiTopics:w,description:O}),r({interests:t,antiTopics:w,interestDescription:O}),y(!1),H(n?`Saved — capped at ${Cc} topics. Extras dropped.`:`Reading interests updated.`)}catch(e){H(`Could not save interests: `+e.message)}},ne=()=>y(!1),re=e=>{let t=e.trim();t&&!w.includes(t)&&T(e=>[...e,t]),D(``)},M=e=>T(t=>t.filter(t=>t!==e)),N=()=>m(!0),ie=e=>{let t=e.target.files?.[0];if(t){if(t.size>5*1024*1024){H(`Image too large — max 5 MB.`);return}g(t),m(!0),e.target.value=``}},ae=async(e,t,n)=>{m(!1),g(null),r({avatarUrl:e});let i={};t&&t!==l&&(i.avatarShape=t),n&&n!==(s?.tweaks?.avatarColor||`ink`)&&(i.avatarColor=n),Object.keys(i).length&&a(i);try{await wa(`/api/profile/avatar`,{avatarUrl:e}),H(e?`Profile picture updated.`:`Picked your portrait.`)}catch(e){H(`Could not save picture: `+e.message)}},oe=()=>{m(!1),g(null)},se=s?.tweaks?.avatarColor||`ink`,P=()=>{o(),window.location.hash=`/`},F=async(e,t)=>{let n={...c.reading,[e]:t};try{await wa(`/api/profile/reading`,{articleLayout:n.articleLayout,briefingLayout:n.briefingLayout,shelfLayout:n.shelfLayout}),r({reading:n})}catch(e){H(`Could not save layout: `+e.message)}},I={x:`X (Twitter)`,reddit:`Reddit`,linkedin:`LinkedIn`},ce=(e,t)=>{i(e,{paused:!t.paused}),H(t.paused?`${I[e]} resumed.`:`${I[e]} paused.`)},[le,ue]=(0,_.useState)({}),[de,fe]=(0,_.useState)(null),[pe,me]=(0,_.useState)({}),he=async e=>{let t=e===`x`?`twitter`:e;me(t=>({...t,[e]:`checking`}));try{let n=await Wa({type:`breve.checkSignin`,payload:{platform:t}},{timeoutMs:3e4});me(t=>({...t,[e]:n?.signedIn?`signed_in`:`signed_out`}))}catch(t){console.warn(`[profile signin probe]`,e,t),me(t=>({...t,[e]:`error`}))}},ge=(e,t)=>Array.isArray(e)?t===`x`?e.includes(`x`)||e.includes(`twitter`):e.includes(t):!1,_e=async e=>{try{await Ca(`/api/sources/${e}/logout`),i(e,{connected:!1,handle:``,paused:!1}),H(`${I[e]} disconnected.`)}catch(t){H(`Could not disconnect ${I[e]}: `+t.message)}},ve=async(e,t)=>{await _e(e);for(let n of t){let t=(n.sources||[]).filter(t=>e===`x`?t!==`x`&&t!==`twitter`:t!==e);if(t.length!==0)try{let e=await wa(`/api/newsletters/${n.id}`,{platforms:t});updateNewsletter(n.id,ja(e))}catch{}}H(`${I[e]} removed from ${t.length} newsletter${t.length>1?`s`:``}.`)},ye=async(e,t)=>{if(t.connected){let t=(n.newsletters||[]).filter(t=>t.active&&ge(t.sources,e));if(t.length>0){fe({platform:e,newsletters:t});return}await _e(e)}else try{await Ca(`/api/sources/${e}/login`),ue(t=>({...t,[e]:!0}));let t=setInterval(async()=>{try{let n=await Ea(`/api/sources/${e}/status`);n.connected?(clearInterval(t),ue(t=>({...t,[e]:!1})),i(e,{connected:!0,handle:n.handle||``}),H(`${I[e]} connected.`)):n.loginActive||(clearInterval(t),ue(t=>({...t,[e]:!1})),H(`${I[e]} login was interrupted — the browser window may have been closed. Try again.`))}catch{clearInterval(t),ue(t=>({...t,[e]:!1})),H(`${I[e]} login was interrupted. Try again.`)}},2e3)}catch(t){H(`Could not connect ${I[e]}: `+t.message)}},[be,xe]=(0,_.useState)(!1),[L,Se]=(0,_.useState)(c.name||``),Ce=()=>{Se(c.name||``),xe(!0)},we=()=>xe(!1),Te=async()=>{let e=L.trim();if(!e||e===c.name){xe(!1);return}try{await wa(`/api/profile/display-name`,{displayName:e}),r({name:e}),xe(!1),H(`Name updated.`)}catch(e){H(`Could not save name: `+e.message)}},Ee=(n.digests||[]).length,De=(n.newsletters||[]).filter(e=>e.active).length,Oe=(c.interests||[]).length,ke=(()=>
15{if(!c.joined)return null;let e=Oa(c.joined);return isNaN(e.getTime())?null:e.toLocaleDateString(`en-US`,{month:`short`,year:`numeric`})})();return(0,U.jsx)(`div`,{className:`page-surface`,children:(0,U.jsxs)(`div`,{className:`page-wrap`,style:{maxWidth:1e3},children:[(0,U.jsxs)(`div`,{className:`profile-page-head`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:10},children:`Profile`}),(0,U.jsx)(`h1`,{className:`f-display`,style:{fontSize:64,margin:0,lineHeight:.95},children:`The library card.`})]}),(0,U.jsx)(`button`,{onClick:P,className:`profile-logout`,children:`Log out`})]}),(0,U.jsxs)(`div`,{className:`profile-hero`,children:[(0,U.jsxs)(`div`,{className:`profile-avatar-wrap`,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[(0,U.jsx)(`div`,{onClick:N,style:{cursor:`pointer`},children:(0,U.jsx)(co,{size:120,avatarUrl:c.avatarUrl,initials:(c.name||`A M`).split(` `).map(e=>e[0]).join(``).slice(0,2),shape:l,bgColorKey:se,borderWidth:3})}),(0,U.jsx)(`button`,{type:`button`,onClick:N,className:`profile-avatar-edit`,"aria-label":`Change profile picture`,children:(0,U.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`path`,{d:`M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z`}),(0,U.jsx)(`circle`,{cx:`12`,cy:`13`,r:`4`})]})}),(0,U.jsx)(`input`,{ref:u,type:`file`,accept:`image/*`,onChange:ie,style:{display:`none`}})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`profile-name-line`,children:be?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`input`,{className:`profile-name-input`,value:L,autoFocus:!0,onChange:e=>Se(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),Te()),e.key===`Escape`&&we()}}),(0,U.jsx)(`button`,{type:`button`,onClick:Te,className:`profile-name-action is-save`,title:`Save (or press Enter)`,"aria-label":`Save name`,children:(0,U.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,U.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})}),(0,U.jsx)(`button`,{type:`button`,onClick:we,className:`profile-name-action is-cancel`,title:`Cancel (or press Esc)`,"aria-label":`Cancel`,children:(0,U.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`}),(0,U.jsx)(`line`,{x1:`6`,y1:`18`,x2:`18`,y2:`6`})]})})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h2`,{className:`profile-name`,onClick:Ce,children:c.name}),(0,U.jsx)(`button`,{className:`profile-name-edit-hint`,onClick:Ce,children:`Edit`})]})}),(0,U.jsx)(`p`,{className:`profile-email`,children:c.email}),(0,U.jsxs)(`div`,{className:`profile-stats`,children:[(0,U.jsxs)(`div`,{className:`profile-stat`,children:[(0,U.jsx)(`span`,{className:`profile-stat-num is-accent`,children:Ee}),(0,U.jsx)(`span`,{className:`profile-stat-label`,children:`Editions`})]}),(0,U.jsxs)(`div`,{className:`profile-stat`,children:[(0,U.jsx)(`span`,{className:`profile-stat-num`,children:De}),(0,U.jsx)(`span`,{className:`profile-stat-label`,children:`Active newsletters`})]}),(0,U.jsxs)(`div`,{className:`profile-stat`,children:[(0,U.jsx)(`span`,{className:`profile-stat-num`,children:Oe}),(0,U.jsx)(`span`,{className:`profile-stat-label`,children:`Topics tracked`})]}),ke&&(0,U.jsxs)(`div`,{className:`profile-stat`,children:[(0,U.jsx)(`span`,{className:`profile-stat-num`,style:{fontSize:22},children:ke}),(0,U.jsx)(`span`,{className:`profile-stat-label`,children:`Reader since`})]})]})]})]}),(0,U.jsxs)(`section`,{className:`profile-section`,children:[(0,U.jsxs)(`div`,{className:`profile-section-head`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-end`,gap:16},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Reading for`}),(0,U.jsx)(`h3`,{className:`profile-section-title`,children:`What we hunt for.`}),(0,U.jsxs)(`p`,{className:`profile-section-sub`,children:[`Topics drive every digest. Anti-topics get filtered out.`,` `,(0,U.jsxs)(`span`,{className:`profile-topic-count`+(Oe>=22?` is-near-cap`:``),children:[`· `,(0,U.jsx)(`strong`,{children:Oe}),`/`,Cc,` tracked`]})]})]}),!v&&(0,U.jsx)(`button`,{onClick:ee,className:`profile-section-action`,children:`Edit topics`})]}),v?(0,U.jsxs)(`div`,{className:`profile-edit-stack`,children:[(0,U.jsxs)(`div`,{className:`profile-edit-group`,children:[(0,U.jsxs)(`div`,{className:`profile-edit-group-head`,children:[(0,U.jsx)(`div`,{className:`eyebrow eb-muted`,children:`Topics to follow`}),(0,U.jsxs)(`span`,{className:`profile-topic-count`+(b.length>=Cc-3?` is-near-cap`:``),children:[(0,U.jsx)(`strong`,{children:b.length}),`/`,Cc]})]}),(0,U.jsxs)(`div`,{className:`profile-chip-input`,children:[b.map(e=>(0,U.jsx)(Tc,{label:e,onRemove:()=>j(e)},e)),(0,U.jsx)(`input`,{value:S,onChange:e=>C(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),A(S)):e.key===`Backspace`&&!S&&b.length&&j(b[b.length-1])},onBlur:()=>S&&A(S),placeholder:b.length?`Add another…`:`Type a topic, press Enter`,disabled:b.length>=Cc})]}),(0,U.jsx)(`div`,{className:`profile-edit-help`,children:`Each topic becomes a search query in your next pull.`})]}),(0,U.jsxs)(`div`,{className:`profile-edit-group`,children:[(0,U.jsx)(`div`,{className:`profile-edit-group-head`,children:(0,U.jsx)(`div`,{className:`eyebrow eb-muted`,children:`Exclude topics`})}),(0,U.jsxs)(`div`,{className:`profile-chip-input is-anti`,children:[w.map(e=>(0,U.jsx)(Tc,{label:e,variant:`anti`,onRemove:()=>M(e)},e)),(0,U.jsx)(`input`,{value:E,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),re(E)):e.key===`Backspace`&&!E&&w.length&&M(w[w.length-1])},onBlur:()=>E&&re(E),placeholder:w.length?`Add another…`:`Type a topic to exclude, press Enter`})]}),(0,U.jsx)(`div`,{className:`profile-edit-help`,children:`Topics in this list are filtered out of every digest.`})]}),(0,U.jsxs)(`div`,{className:`profile-edit-group`,children:[(0,U.jsx)(`div`,{className:`profile-edit-group-head`,children:(0,U.jsx)(`div`,{className:`eyebrow eb-muted`,children:`What you're looking for`})}),(0,U.jsx)(`textarea`,{className:`profile-edit-field`,value:O,onChange:e=>
15k(e.target.value),rows:2,placeholder:`A sentence or two on what you want surfaced — tone, sources, depth.`})]}),(0,U.jsxs)(`div`,{className:`profile-edit-actions`,children:[(0,U.jsx)(`button`,{onClick:te,className:`avatar-modal-btn is-save`,children:`Save changes`}),(0,U.jsx)(`button`,{onClick:ne,className:`avatar-modal-btn`,children:`Cancel`})]})]}):(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`profile-chip-panel`,children:(c.interests||[]).length===0?(0,U.jsx)(`span`,{className:`profile-chip-panel-empty`,children:`No topics yet. Click "Edit topics" to add some.`}):(c.interests||[]).map((e,t)=>(0,U.jsx)(`span`,{className:`profile-chip`,children:e},e+t))}),(c.antiTopics||[]).length>0&&(0,U.jsxs)(`div`,{style:{marginTop:14},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-muted`,style:{marginBottom:6},children:`Excluded`}),(0,U.jsx)(`div`,{className:`profile-chip-panel is-anti-panel`,children:(c.antiTopics||[]).map((e,t)=>(0,U.jsx)(`span`,{className:`profile-chip is-anti`,children:e},e+t))})]}),c.interestDescription&&(0,U.jsx)(`div`,{style:{marginTop:14,maxWidth:640},children:(0,U.jsxs)(`div`,{className:`f-editorial`,style:{fontSize:16,color:`var(--ink-soft)`,fontStyle:`italic`,lineHeight:1.5,borderLeft:`3px solid var(--press-red)`,paddingLeft:14},children:[`"`,c.interestDescription,`"`]})})]})]}),(0,U.jsxs)(`section`,{className:`profile-section`,children:[(0,U.jsxs)(`div`,{className:`profile-section-head`,children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Sources`}),(0,U.jsx)(`h3`,{className:`profile-section-title`,children:`Where we pull from.`}),(0,U.jsx)(`p`,{className:`profile-section-sub`,children:`Breve reads whatever you're signed into through the browser extension. Pause a source any time to leave it out.`})]}),Object.values(le).some(Boolean)&&(0,U.jsxs)(`div`,{style:{background:`var(--ink)`,color:`var(--paper)`,padding:`14px 18px`,marginBottom:14,fontFamily:`var(--f-serif)`,fontSize:14,lineHeight:1.5,border:`2px solid var(--ink)`},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:11,textTransform:`uppercase`,letterSpacing:`0.12em`,marginBottom:4,color:`var(--press-red)`},children:`Waiting for login…`}),`A browser window has opened — log in there. It closes automatically once you're signed in.`,(0,U.jsx)(`strong`,{style:{display:`block`,marginTop:6,fontSize:13},children:`Don't close the browser window, or you'll have to start over.`})]}),(0,U.jsx)(`div`,{className:`profile-source-grid`,children:Object.entries(c.connected).filter(([e])=>e===`x`||e===`reddit`).map(([e,t])=>{let n=e===`x`?`𝕏`:`r/`,r=typeof window<`u`&&!/^(localhost|127\.0\.0\.1)$/.test(window.location.hostname);if(r){let r=t.paused?`paused`:pe[e]||(t.connected?`signed_in`:`signed_out`),i={paused:`Paused — won't be pulled`,checking:`Checking…`,signed_in:`Signed in`,signed_out:`Signed out — sign in to include it`,error:`Couldn't reach the extension — is it installed?`}[r];return(0,U.jsxs)(`div`,{className:`profile-source`,"data-platform":e,children:[(0,U.jsx)(`div`,{className:`profile-source-mark`,children:n}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`profile-source-name`,children:I[e]||e}),(0,U.jsxs)(`div`,{className:`profile-source-signin is-`+r,children:[(0,U.jsx)(`span`,{className:`profile-source-dot`}),i]})]}),(0,U.jsxs)(`div`,{className:`profile-source-actions`,children:[(0,U.jsx)(`button`,{onClick:()=>he(e),disabled:pe[e]===`checking`,className:`profile-source-btn`,children:pe[e]===`checking`?`Checking…`:`Check sign-in`}),(0,U.jsx)(`button`,{onClick:()=>ce(e,t),className:`profile-source-btn`,children:t.paused?`Resume`:`Pause`})]})]},e)}return(0,U.jsxs)(`div`,{className:`profile-source`,"data-platform":e,children:[(0,U.jsx)(`div`,{className:`profile-source-mark`,children:n}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`profile-source-name`,children:I[e]||e}),(0,U.jsx)(`div`,{className:`profile-source-handle `+(t.connected?t.paused?`is-paused`:``:`is-disconnected`),children:t.connected?t.handle?t.paused?`${t.handle} · paused`:t.handle:t.paused?`paused`:`connected`:r?e===`x`?`Use the extension below`:`Reddit coming soon`:`Not connected`})]}),(0,U.jsxs)(`div`,{className:`profile-source-actions`,children:[t.connected&&(0,U.jsx)(`button`,{onClick:()=>ce(e,t),className:`profile-source-btn`,children:t.paused?`Resume`:`Pause`}),!r&&e===`reddit`&&!t.connected&&(0,U.jsx)(`button`,{onClick:async()=>{try{let e=await Ea(`/api/connect/reddit/start`);e?.url?window.location.href=e.url:H(`Reddit OAuth not configured on the server yet.`)}catch(e){H(`Reddit OAuth failed: ${e.message}`)}}
15,className:`profile-source-btn is-primary`,children:`Connect with Reddit`}),(t.connected||!r)&&(0,U.jsx)(`button`,{onClick:()=>ye(e,t),disabled:le[e],className:`profile-source-btn`+(!t.connected&&e!==`reddit`?` is-primary`:``),children:le[e]?`Waiting…`:t.connected?`Disconnect`:e===`reddit`?`Use browser`:`Connect`})]})]},e)})})]}),(0,U.jsx)(Ec,{store:e}),(0,U.jsxs)(`section`,{className:`profile-section`,children:[(0,U.jsxs)(`div`,{className:`profile-section-head`,children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Look & feel`}),(0,U.jsx)(`h3`,{className:`profile-section-title`,children:`How the desk presents.`}),(0,U.jsx)(`p`,{className:`profile-section-sub`,children:`Tweak the avatar shape and how past editions are arranged.`})]}),(0,U.jsxs)(`div`,{className:`profile-pref-panel`,children:[(0,U.jsxs)(`div`,{className:`profile-pref-cell`,children:[(0,U.jsx)(`div`,{className:`profile-pref-label`,children:`Avatar shape`}),(0,U.jsx)(`p`,{className:`profile-pref-sub`,children:`How your reader portrait crops on the desk.`}),(0,U.jsx)(`div`,{className:`profile-shape-picker`,children:[{k:`circle`,label:`Circle`},{k:`square`,label:`Square`}].map(e=>(0,U.jsx)(`button`,{className:`profile-shape-btn`,"data-shape":e.k,"data-active":l===e.k||void 0,onClick:()=>a({avatarShape:e.k}),"aria-label":e.label,title:e.label,children:(0,U.jsx)(`span`,{children:e.label})},e.k))})]}),(0,U.jsxs)(`div`,{className:`profile-pref-cell`,children:[(0,U.jsx)(`div`,{className:`profile-pref-label`,children:`Past digests view`}),(0,U.jsx)(`p`,{className:`profile-pref-sub`,children:`How back issues stack on the shelf.`}),(0,U.jsx)(`div`,{className:`profile-pref-buttons`,children:[{k:`board`,name:`Board`,desc:`Pinned corkboard.`},{k:`list`,name:`List`,desc:`Compact list.`}].map(e=>(0,U.jsxs)(`button`,{className:`profile-pref-btn`,"data-active":(c.reading.shelfLayout||`board`)===e.k||void 0,onClick:()=>F(`shelfLayout`,e.k),children:[e.name,(0,U.jsx)(`span`,{className:`profile-pref-btn-sub`,children:e.desc})]},e.k))})]})]})]}),(0,U.jsx)(`div`,{style:{borderTop:`1.5px dashed var(--ink)`,paddingTop:24},children:(0,U.jsx)(`button`,{onClick:t,className:`profile-section-action`,children:`→ Advanced settings`})}),p&&(0,U.jsx)(fo,{file:h,existingUrl:c.avatarUrl,initialShape:l,initialColorKey:se,initials:(c.name||`A M`).split(` `).map(e=>e[0]).join(``).slice(0,2),onSave:ae,onCancel:oe}),de&&(()=>{let{platform:e,newsletters:t}=de;return(0,U.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:9999,background:`rgba(26, 20, 16, 0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`},onClick:()=>fe(null),children:(0,U.jsxs)(`div`,{className:`paper paper-cream`,onClick:e=>e.stopPropagation(),style:{border:`3px solid var(--ink)`,padding:`28px 32px`,boxShadow:`8px 8px 0 rgba(0,0,0,0.35)`,maxWidth:440,width:`90vw`},children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,style:{marginBottom:8},children:`Heads up`}),(0,U.jsxs)(`h3`,{className:`f-display`,style:{fontSize:26,margin:`0 0 12px`,lineHeight:1.1},children:[I[e],` is used in `,t.length===1?`a newsletter`:`${t.length} newsletters`,`.`]}),(0,U.jsxs)(`p`,{className:`f-serif`,style:{fontSize:14,color:`var(--ink-soft)`,lineHeight:1.5,margin:`0 0 16px`},children:[`Do you want us to remove `,I[e],` from `,t.length===1?(0,U.jsx)(`strong`,{children:t[0].name}):(0,U.jsx)(U.Fragment,{children:t.map((e,n)=>(0,U.jsxs)(`span`,{children:[n>0&&(n===t.length-1?` and `:`, `),(0,U.jsx)(`strong`,{children:e.name})]},e.id))}),`?`]}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10,justifyContent:`flex-end`,flexWrap:`wrap`,paddingTop:14,borderTop:`1.5px dashed var(--ink)`},children:[(0,U.jsx)(`button`,{onClick:()=>fe(null),className:`f-cond disconnect-nevermind`,style:{background:`transparent`,border:`none`,padding:0,fontSize:10,letterSpacing:`0.12em`,textTransform:`uppercase`,color:`var(--ink-soft)`,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:3,marginRight:`auto`,transition:`color .15s, text-underline-offset .2s, transform .15s`},onMouseEnter:e=>{e.currentTarget.style.color=`var(--ink)`,e.currentTarget.style.textUnderlineOffset=`5px`,e.currentTarget.style.transform=`translateX(-2px)`},onMouseLeave:e=>{e.currentTarget.style.color=`var(--ink-soft)`,e.currentTarget.style.textUnderlineOffset=`3px`,e.currentTarget.style.transform=`none`},children:`Nevermind`}),(0,U.jsx)(`button`,{onClick:async()=>{fe(null),await _e(e),ye(e,{connected:!1})},className:`f-cond`,style:{background:`transparent`,border:`2px solid var(--ink)`,padding:`8px 16px`,fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`,cursor:`pointer`,transition:`transform .15s, box-shadow .15s, background .15s, color .15s`},onMouseEnter:e=>{e.currentTarget.style.transform=`translate(-2px, -2px)`,e.currentTarget.style.boxShadow=`3px 3px 0 rgba(0,0,0,0.25)`,e.currentTarget.style.background=`var(--ink)`,e.currentTarget.style.color=`var(--paper)`},onMouseLeave:e=>{e.currentTarget.style.transform=`none`,e.currentTarget.style.boxShadow=`none`,e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`var(--ink)`},children:`Switch account`}),(0,U.jsx)(`button`,{onClick:async()=>{fe(null),await ve(e,t)},className:`sketch-btn sb-red`,onMouseMove:e=>{let t=e.currentTarget.getBoundingClientRect();e.currentTarget.style.setProperty(`--x`,(e.clientX-t.left)/t.width*100+`%`),e.currentTarget.style.setProperty(`--y`,(e.clientY-t.top)/t.height*100+`%`)},style:{padding:`8px 20px`,fontSize:11,letterSpacing:`0.12em`,textTransform:`uppercase`},children:`Remove them`})]})]})})})()]})})}function Oc({open:e,onClose:t,store:n}){let{adv:r,patch:i,patchKeep:a,resetAdv:o}=wo(),[s,c]=(0,_.useState)(!1);return e?(0,U.jsxs)(`div`,{className:`settings-overlay`,onClick:t,children:[(0,U.jsxs)(`div`,{className:`paper-vellum settings-modal`,onClick:e=>e.stopPropagation(),children:[(0,U.jsxs)(`div`,{className:`settings-head`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Advanced`}),(0,U.jsx)(`h2`,{className:`settings-title`,children:`Settings`}),(0,U.jsx)(`div`,{className:`settings-sub`,children:`Overlay · press ESC to close`})]}),(0,U.jsx)(`button`,{onClick:t,className:`settings-close`,children:`× Close`})]}),(0,U.jsxs)(Ac,{number:`01`,title:`Account`,children:[(0,U.jsx)(jc,{label:`Signed in as`,description:n?.data?.user?.email||`—`}),(0,U.jsx)(jc,{label:`Profile`,description:`Edit name, picture, sources, and topics on your library card.`,actionLabel:`Open profile →`,onAction:()=>{t(),Ra(`/profile`)}})]}),(0,U.jsx)(Ac,{number:`02`,title:`Display`,children:(0,U.jsx)(jc,{label:`Topics rail`,description:`Right-side panel listing this edition's topics and suggestions.`,toggle:n?.local?.tweaks?.showTopicsRail!==!1,onToggle:e=>n.updateTweaks({showTopicsRail:e})})}),(0,U.jsx)(Ac,{number:`03`,title:`Pipeline tuning`,children:(0,U.jsx)(`div`,{className:`settings-cards`,children:(0,U.jsx)(`div`,{className:`settings-card`,style:{display:`block`,padding:`20px 24px`},children:(0,U.jsx)(To,{adv:r,patch:i,patchKeep:a,onReset:o})})})}),(0,U.jsxs)(Ac,{number:`04`,title:`Danger zone`,children:[(0,U.jsx)(jc,{label:`Reset onboarding`,de
15scription:`Wipe local UI state and walk through onboarding again.`,actionLabel:`Reset →`,warn:!0,onAction:()=>{localStorage.removeItem(`breve_state_v1`),window.location.hash=`/signin`,setTimeout(()=>window.location.reload(),200)}}),(0,U.jsx)(jc,{label:`Delete account`,description:`Permanently remove your account and everything tied to it.`,actionLabel:`Delete forever →`,warn:!0,onAction:()=>c(!0)})]})]}),s&&(0,U.jsx)(kc,{email:n?.data?.user?.email,onCancel:()=>c(!1),onConfirm:async()=>{let e=n?.data?.user?.email;if(!e){H(`No account email found.`);return}try{await Ta(`/api/auth/account`,{email:e}),H(`Account deleted.`),c(!1),t(),n?.signOut?.(),Ra(`/signin`)}catch(e){H(`Could not delete account: `+e.message)}}})]}):null}function kc({email:e,onCancel:t,onConfirm:n}){let[r,i]=(0,_.useState)(``),a=r.trim().toLowerCase()===(e||``).toLowerCase();return(0,U.jsx)(`div`,{onClick:t,className:`settings-overlay`,style:{zIndex:1200},children:(0,U.jsxs)(`div`,{onClick:e=>e.stopPropagation(),className:`paper-vellum settings-modal`,style:{width:`min(480px, 100%)`,maxHeight:`auto`},children:[(0,U.jsx)(`div`,{className:`settings-head`,style:{paddingBottom:14},children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`eyebrow eb-red`,children:`Permanent deletion`}),(0,U.jsx)(`h2`,{className:`settings-title`,style:{fontSize:32},children:`Delete your account?`})]})}),(0,U.jsxs)(`div`,{className:`settings-section`,style:{marginBottom:0},children:[(0,U.jsxs)(`p`,{className:`f-serif`,style:{fontSize:14,color:`var(--ink-soft)`,lineHeight:1.55,margin:`0 0 14px`},children:[`This will permanently remove your account (`,e,`), every digest you've brewed, your scheduled newsletters, and your connected sources. There is no recovery.`]}),(0,U.jsx)(`p`,{className:`f-serif`,style:{fontSize:13,color:`var(--ink)`,margin:`0 0 8px`},children:`To confirm, type your email below:`}),(0,U.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.target.value),placeholder:e,autoComplete:`off`,spellCheck:!1,style:{width:`100%`,padding:`10px 12px`,fontFamily:`var(--f-mono)`,fontSize:13,border:`1.5px solid ${a?`var(--press-red)`:`var(--ink)`}`,background:`var(--paper-light)`,color:`var(--ink)`,marginBottom:18,boxSizing:`border-box`},autoFocus:!0}),(0,U.jsxs)(`div`,{style:{display:`flex`,gap:10,justifyContent:`flex-end`},children:[(0,U.jsx)(`button`,{onClick:t,className:`avatar-modal-btn`,children:`Cancel`}),(0,U.jsx)(`button`,{onClick:n,disabled:!a,className:`avatar-modal-btn is-save`,style:{opacity:a?1:.45,cursor:a?`pointer`:`not-allowed`},children:`Delete forever`})]})]})]})})}function Ac({number:e,title:t,children:n}){return(0,U.jsxs)(`section`,{className:`settings-section`,children:[(0,U.jsxs)(`div`,{className:`settings-section-head`,children:[e&&(0,U.jsx)(`div`,{className:`settings-section-num`,children:e}),(0,U.jsx)(`h3`,{className:`settings-section-title`,children:t})]}),(0,U.jsx)(`div`,{className:`settings-cards`,children:n})]})}function jc({label:e,description:t,actionLabel:n,onAction:r,warn:i,toggle:a,onToggle:o}){return(0,U.jsxs)(`div`,{className:`settings-card`+(i?` is-warn`:``),children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`settings-card-label`,children:e}),t&&(0,U.jsx)(`p`,{className:`settings-card-desc`,children:t})]}),typeof a==`boolean`?(0,U.jsx)(`button`,{onClick:()=>o?.(!a),className:`settings-toggle`,"aria-pressed":a,"aria-label":`${e}: ${a?`on`:`off`}`}):n?(0,U.jsx)(`button`,{onClick:r||(()=>H(`Noted.`)),className:`settings-action`+(i?` is-warn`:``),children:n}):null]})}function Mc(){return(0,U.jsxs)(`div`,{className:`page-surface`,style:{paddingBottom:64},children:[(0,U.jsx)(`div`,{style:{maxWidth:1180,margin:`0 auto`,padding:`32px 48px 0`},children:(0,U.jsxs)(`div`,{style:{borderTop:`4px double var(--ink)`,borderBottom:`1px solid var(--ink)`,padding:`10px 0`,display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,fontFamily:`var(--f-cond)`,fontSize:11,letterSpacing:`0.2em`,textTransform:`uppercase`},children:[(0,U.jsx)(`span`,{children:`The Breve Manifesto`}),(0,U.jsx)(`span`,{style:{fontFamily:`var(--f-mono)`,letterSpacing:`0.1em`},children:`Vol. I · No. 1 · Printed in the year 2026`}),(0,U.jsx)(`span`,{children:`Price: your attention, reclaimed`})]})}),(0,U.jsxs)(`header`,{style:{maxWidth:1180,margin:`0 auto`,padding:`64px 48px 32px`,position:`relative`,overflow:`hidden`},children:[(0,U.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,top:48,right:-40,width:420,height:420,pointerEvents:`none`,zIndex:0,backgroundImage:`radial-gradient(circle, var(--press-red) 1.6px, transparent 1.8px)`,backgroundSize:`14px 14px`,opacity:.35,maskImage:`radial-gradient(circle at 75% 25%, black 0%, black 40%, transparent 75%)`,WebkitMaskImage:`radial-gradient(circle at 75% 25%, black 0%, black 40%, transparent 75%)`}}),(0,U.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,top:120,right:40,pointerEvents:`none`,zIndex:0,writingMode:`vertical-rl`,transform:`rotate(180deg)`,fontFamily:`var(--f-cond)`,fontSize:11,letterSpacing:`0.4em`,textTransform:`uppercase`,color:`var(--ink)`,opacity:.35,borderLeft:`1px solid var(--ink)`,paddingLeft:10},children:`File &numero; 001 · Printed on paper that remembers you`}),(0,U.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,top:280,right:120,pointerEvents:`none`,zIndex:0,fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:140,lineHeight:1,color:`var(--press-red)`,opacity:.12,fontWeight:700,transform:`rotate(-8deg)`},children:`“`}),(0,U.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,bottom:-30,right:220,pointerEvents:`none`,zIndex:0,fontFamily:`var(--f-cond)`,fontSize:10,letterSpacing:`0.3em`,textTransform:`uppercase`,color:`var(--muted)`,opacity:.5},children:`← fold here ─ ─ ─ ─ ─ ─`}),(0,U.jsxs)(`div`,{style:{position:`relative`,zIndex:1},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:12,letterSpacing:`0.3em`,textTransform:`uppercase`,color:`var(--press-red)`,marginBottom:32},children:`⬥ \xA0A statement from the editors\xA0 ⬥`}),(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:18,flexWrap:`wrap`,marginBottom:4},children:(0,U.jsx)(`span`,{style:{background:`var(--ink)`,color:`var(--paper)`,padding:`4px 22px 10px`,fontFamily:`var(--f-display)`,fontWeight:900,fontSize:`clamp(72px, 12vw, 170px
15)`,lineHeight:1,letterSpacing:`-0.01em`,transform:`rotate(-1.2deg)`,boxShadow:`4px 4px 0 rgba(0,0,0,0.18)`},children:`GET OFF`})}),(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:14,flexWrap:`wrap`,marginTop:-4,marginBottom:24},children:[(0,U.jsx)(`span`,{style:{background:`var(--paper)`,color:`var(--ink)`,padding:`0 22px 6px`,fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontWeight:700,fontSize:`clamp(64px, 11vw, 150px)`,lineHeight:1,border:`2.5px solid var(--ink)`,transform:`rotate(0.8deg)`,boxShadow:`4px 4px 0 rgba(0,0,0,0.15)`},children:`The`}),(0,U.jsx)(`span`,{style:{background:`var(--press-red)`,color:`var(--paper)`,padding:`4px 24px 10px`,fontFamily:`var(--f-display)`,fontWeight:900,fontSize:`clamp(72px, 12vw, 170px)`,lineHeight:1,letterSpacing:`-0.01em`,transform:`rotate(-0.6deg)`,boxShadow:`4px 4px 0 rgba(0,0,0,0.18)`},children:`FEED.`})]}),(0,U.jsxs)(`div`,{style:{fontFamily:`var(--f-display)`,fontWeight:900,fontSize:`clamp(60px, 10vw, 128px)`,lineHeight:.95,color:`var(--ink)`,marginTop:12},children:[`keep the `,(0,U.jsx)(`em`,{style:{fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontWeight:700},children:`signal.`})]}),(0,U.jsxs)(`div`,{style:{fontFamily:`var(--f-serif)`,fontSize:20,lineHeight:1.55,maxWidth:780,marginTop:32,color:`var(--ink)`},children:[`Breve scrolls your`,` `,(0,U.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:8,background:`var(--ink)`,color:`var(--paper)`,padding:`6px 14px`,fontFamily:`var(--f-cond)`,letterSpacing:`0.18em`,textTransform:`uppercase`,fontSize:14,fontWeight:700,verticalAlign:`middle`,transform:`rotate(-2.2deg)`,boxShadow:`3px 3px 0 rgba(17,17,17,0.25)`},children:[`SOCIALS`,(0,U.jsx)(`span`,{style:{opacity:.55,fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:18,marginLeft:4,marginRight:-2},children:`(`}),(0,U.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:22,height:22,background:`var(--paper)`,color:`var(--ink)`,borderRadius:3},children:(0,U.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})})}),(0,U.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:22,height:22,background:`#FF4500`,color:`#fff`,borderRadius:`50%`},children:(0,U.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.01 14.868c.032.163.032.325.032.52 0 2.632-3.127 4.772-6.98 4.772S3.082 18.02 3.082 15.388c0-.195 0-.357.033-.52a1.625 1.625 0 01-.618-2.34 1.625 1.625 0 012.648-.163 8.017 8.017 0 014.382-1.365l.845-3.965a.343.343 0 01.098-.195.36.36 0 01.26-.065l2.773.585a1.16 1.16 0 011.008-.618 1.17 1.17 0 11-1.008 1.756l-2.47-.52-.747 3.51a7.952 7.952 0 014.317 1.365 1.625 1.625 0 012.61.15c.423.553.423 1.333 0 1.886a1.64 1.64 0 01-1.203.653zM8.348 14.55c0 .65-.52 1.17-1.17 1.17s-1.17-.52-1.
1517-1.17.52-1.17 1.17-1.17 1.17.52 1.17 1.17zm8.32 0c0 .65-.52 1.17-1.17 1.17s-1.17-.52-1.17-1.17.52-1.17 1.17-1.17 1.17.52 1.17 1.17zm-2.5 2.892a.358.358 0 01.488.13.358.358 0 01-.13.487c-.878.52-1.918.78-2.958.78-1.04 0-2.08-.26-2.958-.78a.358.358 0 01-.13-.487.358.358 0 01.488-.13c.715.423 1.625.65 2.6.65s1.885-.227 2.6-.65z`})})}),(0,U.jsx)(`span`,{style:{opacity:.55,fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:18,marginLeft:-2,marginRight:4},children:`)`})]}),` `,`for you, throws out the bait, and hands back one`,` `,(0,U.jsx)(`span`,{style:{display:`inline-block`,background:`var(--paper)`,color:`var(--ink)`,border:`2px solid var(--ink)`,padding:`6px 14px`,fontFamily:`var(--f-cond)`,letterSpacing:`0.18em`,textTransform:`uppercase`,fontSize:14,fontWeight:700,verticalAlign:`middle`,transform:`rotate(1.5deg)`,boxShadow:`3px 3px 0 rgba(17,17,17,0.25)`},children:`BRIEFING`}),` `,`you can read in the time it takes your coffee to cool.`]}),(0,U.jsx)(`div`,{style:{marginTop:48,textAlign:`center`},children:(0,U.jsx)(Nc,{})})]})]}),(0,U.jsx)(`section`,{style:{maxWidth:780,margin:`0 auto`,padding:`32px 48px`},children:(0,U.jsxs)(`p`,{style:{fontFamily:`var(--f-serif)`,fontSize:21,lineHeight:1.55,color:`var(--ink)`,margin:0},children:[(0,U.jsx)(`span`,{style:{float:`left`,fontFamily:`var(--f-display)`,fontSize:120,lineHeight:.82,marginRight:14,marginTop:6,marginBottom:-8,fontWeight:900,color:`var(--press-red)`},children:`B`}),`reve exists because the feeds we grew up on stopped working for thinking. The diagnosis is well-documented at this point — federal health advisories, peer-reviewed journals, even leaked internal research from the platforms themselves. The question is what to do about it. Our answer is small and unfashionable: one digest, once a day, well-edited, then gone.`]})}),(0,U.jsx)(`section`,{style:{maxWidth:1180,margin:`0 auto`,padding:`32px 48px`},children:(0,U.jsxs)(`div`,{style:{columnCount:2,columnGap:56,columnRule:`1px solid rgba(17,17,17,0.2)`,fontFamily:`var(--f-serif)`,fontSize:16,lineHeight:1.65,color:`var(--ink)`,textAlign:`justify`,hyphens:`auto`,orphans:3,widows:3},children:[(0,U.jsxs)(`p`,{style:{margin:`0 0 1em`,breakInside:`avoid`},children:[`The case against the algorithmic feed is no longer a fringe position. In May 2023 the U.S. Surgeon General issued a formal advisory finding that adolescents who spend more than three hours a day on social media face roughly double the risk of poor mental health outcomes`,(0,U.jsx)(`sup`,{children:(0,U.jsx)(K,{n:1})}),`. The American Psychological Association released its own health advisory the same month, identifying social comparison around appearance, late-evening device use, and exposure to online harassment as discrete, named risks`,(0,U.jsx)(`sup`,{children:(0,U.jsx)(K,{n:3})}),`. What Breve contributes is not the diagnosis — that work has been done — but a `,(0,U.jsx)(`em`,{children:`design response`}),`.`]}),(0,U.jsxs)(`p`,{style:{margin:`0 0 1em`,breakInside:`avoid`},children:[`Infinite scroll, variable-ratio reward, and engagement-weighted ranking are not neutral interface decisions. They are choices optimised to maximise session length and return frequency, often at the cost of the people doing the scrolling. The 2020 Allcott et al. deactivation experiment is the cleanest causal evidence we have: paying users to leave Facebook for a month produced a measurable rise in subjective well-being and a persistent drop in post-experiment use, suggesting people stay on the platform for reasons they themselves do not endorse on reflection`,(0,U.jsx)(`sup`,{children:(0,U.jsx)(K,{n:2})}),`.`]}),(0,U.jsxs)(`p`,{style:{margin:`0 0 1em`,breakInside:`avoid`},children:[`Breve's response is to re-introduce friction on the `,(0,U.jsx)(`em`,{children:`platform`}),`side and remove it on the `,(0,U.jsx)(`em`,{children:`synthesis`}),` side. The application watches the feeds on your behalf, locally, in your own authenticated browser session. It collects a boun
15ded number of posts — typically one to three hundred — applies a quality filter, and presses the result into a single written digest. Private messages are never read. Data does not leave your machine without explicit opt-in. The session is designed to end.`]}),(0,U.jsx)(`p`,{style:{margin:`0 0 1em`,breakInside:`avoid`},children:`We think of this as a recoverable default. For most of the history of media, reading the news was a bounded activity: one paper, one evening broadcast, one weekly magazine. The open-ended, feed-shaped reading experience is roughly fifteen years old. It is not a ground truth about how humans want to be informed — it is a phase. Close Breve tomorrow and nothing of yours is held hostage. That is by design.`})]})}),(0,U.jsxs)(`section`,{style:{maxWidth:780,margin:`64px auto 0`,padding:`0 48px`},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:12,letterSpacing:`0.2em`,textTransform:`uppercase`,color:`var(--press-red)`,marginBottom:16},children:`⬥ A different premise ⬥`}),(0,U.jsx)(`p`,{style:{fontFamily:`var(--f-serif)`,fontSize:19,lineHeight:1.6,color:`var(--ink)`,margin:`0 0 18px`},children:`In February 2026, Bryan Johnson — the longevity researcher who spends a small fortune trying to measure what makes a human last — published a short piece arguing that social media should be treated as an environmental toxin and read through a filter, not directly. His framing:`}),(0,U.jsxs)(`blockquote`,{style:{margin:`0 0 18px`,padding:`20px 24px`,borderLeft:`4px solid var(--press-red)`,background:`var(--paper-light)`,fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:19,lineHeight:1.55,color:`var(--ink)`},children:[`“I never want to see the raw feed. I want an AI agent to read it for me, strip the engagement metrics that hijack my judgment, filter the rage, and return only what I actually came for.”`,(0,U.jsxs)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:11,letterSpacing:`0.18em`,textTransform:`uppercase`,color:`var(--muted)`,marginTop:12,fontStyle:`normal`},children:[`— Bryan Johnson, `,(0,U.jsx)(`a`,{href:`https://www.businessinsider.com/bryan-johnson-ai-agent-filter-social-media-feed-2026-2`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,style:{color:`var(--muted)`},children:`Business Insider, Feb 2026`}),(0,U.jsx)(K,{n:10})]})]}),(0,U.jsx)(`p`,{style:{fontFamily:`var(--f-serif)`,fontSize:17,lineHeight:1.6,color:`var(--ink)`,margin:0},children:`Breve is the working version of that idea. The AI sits on your side of the glass — reading your feeds, throwing out the bait, handing back one page. No algorithm. No infinite scroll. Just a well-pressed edition.`})]}),(0,U.jsxs)(`section`,{style:{maxWidth:1180,margin:`80px auto 0`,padding:`0 48px`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:16,marginBottom:32,borderBottom:`2px solid var(--ink)`,paddingBottom:12},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:44,lineHeight:1,fontWeight:900},children:`The Evidence`}),(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.2em`,textTransform:`uppercase`,color:`var(--muted)`,marginLeft:`auto`},children:`Organized by harm · citations pending`})]}),(0,U.jsx)(Pc,{n:`I`,title:`Mental Health`,blurb:`The U.S. Surgeon General, the American Psychological Association, and Meta's own internal researchers have all reached versions of the same conclusion: heavy feed use is a measurable risk factor for adolescent and young-adult wellbeing.`,cards:[{stat:`2×`,headline:`Risk among 3-hr-a-day users`,body:`Surgeon General's 2023 advisory: adolescents who spend more than three hours a day on social media face roughly double the risk of poor mental health outcomes.`,footnote:1},{stat:`+Δ wellbeing`,headline:`After a month off`,body:`A randomized deactivation study (Allcott et al., AER 2020) found that a month away from Facebook produced measurable gains in subjective well-being and a persistent drop in use afterward.`,footnote:2}]}),(0,U.jsx)(Pc,{n:`II`,title:`Sleep`,blurb:`Late-evening device use displaces sleep onset and degrades sleep architecture, with downstream effects on mood and cognition that compound across school weeks.`,cards:[{stat:`< 1 hr`,headline:`From screen to bed`,body:`The APA's 2023 advisory: technology use within one hour of bedtime is associated with sleep disruptions; insufficient sleep in adolescence is in turn linked to neurological development risks.`,footnote:3},{stat:`67`,headline:`Studies, one direction`,body:`Hale & Guan's systematic review across 67 studies of school-aged children: screen-based media use is consistently associated with shorter sleep duration and poorer sleep quality.`,footnote:4}]}),(0,U.jsx)(Pc,{n:`III`,title:`Attention`,blurb:`Sustained focus on a 
15single screen has measurably shortened over the last two decades, and the cognitive cost of constant task-switching is now reasonably well established.`,cards:[{stat:`47 sec`,headline:`Average focus on a screen`,body:`Gloria Mark's two decades of attention research: average focused time on a single screen has fallen from about 75 seconds in 2004 to roughly 47 seconds in recent cohorts.`,footnote:5},{stat:`↓ control`,headline:`Heavy media multitaskers`,body:`Ophir, Nass & Wagner (PNAS, 2009): chronically heavy media multitaskers performed worse on tests of filtering, task-switching, and attentional control than light-media controls.`,footnote:6}]}),(0,U.jsx)(Pc,{n:`IV`,title:`Democratic Life`,blurb:`On algorithmically ranked feeds, moral-emotional content and outright falsehoods travel measurably further and faster than neutral, accurate content \\u2014 a structural advantage for outrage over reality.`,cards:[{stat:`+20% / word`,headline:`Moral contagion`,body:`Brady et al. (PNAS, 2017): each additional moral-emotional word in a tweet increased its diffusion by roughly 20%, across 563,000 messages on gun control, climate, and same-sex marriage.`,footnote:7},{stat:`70%`,headline:`False > true`,body:`Vosoughi, Roy & Aral (Science, 2018): on Twitter from 2006-2017, false news stories were 70% more likely to be retweeted than true ones, and truth took about six times as long to reach the same audience.`,footnote:8}]}),(0,U.jsx)(Pc,{n:`V`,title:`Time`,blurb:`Before any harm story, there is the opportunity cost: the hours themselves. Aggregated across a working life, the numbers are large enough to be uncomfortable.`,cards:[{stat:`2 h 23 m`,headline:`Daily social-media use`,body:`DataReportal's Digital 2024 report, citing GWI data: the average internet user aged 16-64 spends 2 hours and 23 minutes a day on social platforms.`,footnote:9},{stat:`~ 1 year`,headline:`Of waking life, per decade`,body:`Derived from the figure at left: at 2h 23m per day, the cumulative cost across a decade is roughly one full year of waking hours.`,footnote:9}]})]}),(0,U.jsx)(`section`,{style:{maxWidth:1180,margin:`120px auto 0`,padding:`0 48px`},children:(0,U.jsxs)(`div`,{style:{borderTop:`4px double var(--ink)`,borderBottom:`4px double var(--ink)`,padding:`56px 24px`,textAlign:`center`},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-cond)`,fontSize:12,letterSpacing:`0.32em`,textTransform:`uppercase`,color:`var(--press-red)`,marginBottom:32},children:`⬥ \xA0What we believe\xA0 ⬥`}),(0,U.jsxs)(`div`,{style:{fontFamily:`var(--f-display)`,fontWeight:900,fontSize:`clamp(26px, 3.2vw, 38px)`,lineHeight:1.3,color:`var(--ink)`,maxWidth:880,margin:`0 auto`,letterSpacing:`-0.005em`},children:[`Quality is finite.`,` `,(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,margin:`0 6px`},children:`·`}),` `,`Your data is yours.`,` `,(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,margin:`0 6px`},children:`·`}),` `,`One good edition a day beats a hundred feeds.`,` `,(0,U.jsx)(`span`,{style:{color:`var(--press-red)`,margin:`0 6px`},children:`·`}),` `,`No infinite scroll, no fluff — just the signal worth your time.`]}),(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:18,lineHeight:1.55,color:`var(--muted)`,maxWidth:640,margin:`32px auto 0`},children:`Quitting is one click. We will not chase you back, and your data leaves with you.`})]})}),(0,U.jsxs)(`section`,{id:`references`,style:{maxWidth:1180,margin:`96px auto 0`,padding:`0 48px`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:16,marginBottom:24,borderBottom:`2px solid var(--ink)`,paddingBottom:12},children:[(0,U.jsx)(`div`,{className:`f-display`,style:{fontSize:34,lineHeight:1,fontWeight:900},children:`References`}),(0,U.jsx)(`div`,{className:`f-cond`,style:{fontSize:11,letterSpacing:`0.2em`,textTransform:`uppercase`,color:`var(--muted)`,marginLeft:`auto`},children:`Click any number to return to the text`})]}),(0,U.jsxs)(`ol`,{style:{listStyle:`none`,padding:0,margin:0,fontFamily:`var(--f-mono)`,fontSize:12,lineHeight:1.7,color:`var(--muted)`,columnCount:2,columnGap:56},children:[(0,U.jsxs)(Ic,{n:1,children:[`Office of the U.S. Surgeon General. (2023). `,(0,U.jsx)(`em`,{children:`Social Media and Youth Mental Health: The U.S. Surgeon General’s Advisory`}),`. U.S. Dept. of Health and Human Services.`,` `,(0,U.jsx)(`a`,{href:`https://www.hhs.gov/sites/default/files/sg-youth-mental-health-social-media-advisory.pdf`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`hhs.gov →`})]}),(0,U.jsxs)(Ic,{n:2,children:[`Allcott, H., Braghieri, L., Eichmeyer, S., & Gentzkow, M. (2020). The welfare effects of social media. `,(0,U.jsx)(`em`,{children:`American Economic Review`}),`, 110(3), 629–676.`,` `,(0,U.jsx)(`a`,{href:`https://www.aeaweb.org/articles?id=10.1257%2Faer.20190658`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`aeaweb.org →`})]}),(0,U.jsxs)(Ic,{n:3,children:[`American Psychological Association. (2023, May). `,(0,U.jsx)(`em`,{children:`Health Advisory on Social Media Use in Adolescence`}),`. McCabe, M. A. & Prinstein, M. J. (co-chairs).`,` `,(0,U.jsx)(`a`,{href:`https://www.apa.org/topics/social-media-internet/health-advisory-adolescent-social-media-use`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`apa.org →`})]}),(0,U.jsxs)(Ic,{n:4,children:[`Hale, L., & Guan, S. (2015). Screen time and sleep among school-aged children and adolescents: a systematic literature review. `,(0,U.jsx)(`em`,{children:`Sleep Medicine Reviews`}),`, 21, 50–58.`,` `,(0,U.jsx)(`a`,{href:`https://pubmed.ncbi.nlm.nih.gov/25193149/`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`pubmed →`})]}),(0,U.jsxs)(Ic,{n:5,children:[`Mark, G. (2023). `,(0,U.jsx)(`em`,{children:`Attention Span: A Groundbreaking Way to Restore Balance, Happiness and Productivity`}),`. Hanover Square Press. Underlying data: UC Irvine + Microsoft Research, 2004–2020.`,` `,(0,U.jsx)(`a`,{href:`https://gloriamark.com/attention-span/`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`gloriamark.com →`})]}),(0,U.jsxs)(Ic,{n:6,children:[`Ophir, E., Nass, C., & Wagner, A. D. (2009). Cognitive control in media multitaskers. `,(0,U.jsx)(`em`,{children:`Proceedings of the National Academy of Sciences`}),`, 106(37), 15583–15587.`,` `,(0,U.jsx)(`a`,{href:`https://www.pnas.org/doi/10.1073/pnas.0903620106`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`pnas.org →`})]}),(0,U.jsxs)(Ic,{n:7,children:[`Brady, W. J., Wills, J. A., Jost, J. T., Tucker, J. A., & Van Bavel, J. J. (2017). Emotion shapes the diffusion of moralized content in social networks. `,(0,U.jsx)(`em`,{children:`Proceedings of the National Academy of Sciences`}),`, 114(28), 7313–7318.`,` `,(0,U.jsx)(`a`,{href:`https://www.pnas.org/doi/10.1073/pnas.1618923114`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`pnas.org →`})]}),(0,U.jsxs)(Ic,{n:8,children:[`Vosoughi, S., Roy, D., & Aral, S. (2018). The spread of true and false news online. `,(0,U.jsx)(`em`,{children:`Science`}),`, 359(6380), 1146–1151.`,` `,(0,U.jsx)(`a`,{href:`https://www.science.org/doi/10.1126/science.aap9559`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`science.org →`})]}),(0,U.jsxs)(Ic,{n:9,children:[`Kemp, S. (2024). `,(0,U.jsx)(`em`,{children:`Digital 2024: Global Overview Report`}),`. DataReportal (citing GWI Q3 2023).`,` `,(0,U.jsx)(`a`,{href:`https://datareportal.com/reports/digital-2024-global-overview-report`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`datareportal.com →`})]}),(0,U.jsxs)(Ic,{n:10,children:[`Johnson, B. (2026, February). Quoted in `,(0,U.jsx)(`em`,{children:`Business Insider`}),`, “Bryan Johnson says he wants an AI agent between himself and his social media.”`,` `,(0,U.jsx)(`a`,{href:`https://www.businessinsider.com/bry
15an-johnson-ai-agent-filter-social-media-feed-2026-2`,target:`_blank`,rel:`noreferrer`,className:`ink-link`,children:`businessinsider.com →`})]})]})]}),(0,U.jsxs)(`section`,{style:{maxWidth:1180,margin:`64px auto 0`,padding:`0 48px`,textAlign:`center`},children:[(0,U.jsx)(Nc,{}),(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:22,lineHeight:1.55,color:`var(--ink)`,maxWidth:640,margin:`28px auto 0`},children:`If any of the above rings true, we invite you to try the thing. If you have any suggestions or concerns, we'd love to speak with you!`}),(0,U.jsx)(`div`,{style:{marginTop:36},children:(0,U.jsx)(`a`,{href:`mailto:[email protected]`,className:`manifesto-cta manifesto-cta--primary`,children:`✍ Speak with us!`})}),(0,U.jsx)(`div`,{className:`manifesto-signature`,style:{marginTop:56,display:`inline-flex`,gap:4},children:`— The Editors`.split(``).map((e,t)=>(0,U.jsx)(`span`,{className:`manifesto-signature-ch`,style:{display:`inline-block`,fontSize:e===` `?24:22+t*37%14,fontWeight:900,"--rest-rotate":`${t*53%11-5}deg`,"--rest-shift":`${t*17%6-3}px`,transform:`rotate(var(--rest-rotate)) translateY(var(--rest-shift))`,background:t%3==0?`var(--press-red)`:`transparent`,color:t%3==0?`var(--paper)`:`var(--ink)`,padding:t%3==0?`0 3px`:`0`,fontFamily:t%4==1?`var(--f-serif)`:t%4==2?`var(--f-mono)`:`var(--f-display)`,fontStyle:t%5==0?`italic`:`normal`},children:e},t))})]})]})}function Nc(){return(0,U.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:14,color:`var(--ink)`},children:[(0,U.jsx)(`span`,{style:{width:60,height:1,background:`var(--ink)`}}),(0,U.jsx)(`span`,{className:`f-display`,style:{fontSize:20,fontWeight:900},children:`❦`}),(0,U.jsx)(`span`,{style:{width:60,height:1,background:`var(--ink)`}})]})}function Pc({n:e,title:t,blurb:n,cards:r}){return(0,U.jsxs)(`div`,{style:{marginBottom:48},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:18,marginBottom:10},children:[(0,U.jsxs)(`span`,{className:`f-display`,style:{fontSize:36,lineHeight:1,fontWeight:900,color:`var(--press-red)`,fontStyle:`italic`,fontFamily:`var(--f-serif)`},children:[e,`.`]}),(0,U.jsx)(`span`,{className:`f-display`,style:{fontSize:32,lineHeight:1,fontWeight:900},children:t})]}),(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-serif)`,fontSize:15,lineHeight:1.55,color:`var(--muted)`,maxWidth:780,marginBottom:20},children:n}),(0,U.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${r.length}, 1fr)`,gap:20},children:r.map((e,t)=>(0,U.jsx)(Fc,{...e},t))})]})}function Fc({stat:e,headline:t,body:n,footnote:r}){return(0,U.jsxs)(`div`,{className:`paper paper-grain`,style:{padding:`22px 20px`,position:`relative`,border:`1.5px solid var(--ink)`,background:`var(--paper)`,boxShadow:`3px 3px 0 rgba(17,17,17,0.12)`,display:`flex`,flexDirection:`column`,gap:10,minHeight:200},children:[(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-display)`,fontWeight:900,fontSize:48,lineHeight:1,color:`var(--ink)`},children:e}),(0,U.jsx)(`div`,{style:{fontFamily:`var(--f-serif)`,fontStyle:`italic`,fontSize:17,lineHeight:1.2,color:`var(--ink)`},children:t}),(0,U.jsxs)(`div`,{style:{fontFamily:`var(--f-serif)`,fontSize:13,lineHeight:1.55,color:`var(--muted)`},children:[n,r&&(0,U.jsx)(K,{n:r})]})]})}function K({n:e}){return(0,U.jsx)(`sup`,{style:{marginLeft:2},children:(0,U.jsx)(`a`,{href:`#ref-${e}`,style:{color:`var(--press-red)`,textDecoration:`none`,fontFamily:`var(--f-mono)`,fontWeight:700},"aria-label":`Jump to reference ${e}`,children:e})})}function Ic({n:e,children:t}){return(0,U.jsxs)(`li`,{id:`ref-${e}`,style:{marginBottom:10,breakInside:`avoid`,scrollMarginTop:24},children:[(0,U.jsx)(`sup`,{style:{color:`var(--press-red)`,fontWeight:700,marginRight:6},children:e}),t]})}var Lc={marginTop:36,fontFamily:`var(--f-serif)`,fontSize:15,lineHeight:1.7,color:`var(--ink)`},Rc={fontFamily:`var(--f-display)`,fontSize:28,fontWeight:400,margin:`36px 0 10px`,color:`var(--ink)`},zc={fontFamily:`var(--f-cond)`,fontSize:13,letterSpacing:`0.16em`,textTransform:`uppercase`,margin:`20px 0 6px`,color:`var(--press-red)`},Bc={paddingLeft:22,marginTop:6,marginBottom:6},Vc={marginBottom:6};function Hc(){return(0,U.jsx)(`div`,{className:`page-surface`,style:{paddingBottom:80},children:(0,U.jsxs)(`div`,{style:{maxWidth:760,margin:`0 auto`,padding:`40px 32px 0`},children:[(0,U.jsxs)(`div`,{style:{borderTop:`4px double var(--ink)`,borderBottom:`1px solid var(--ink)`,padding:`10px 0`,display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,fontFamily:`var(--f-cond)`,fontSize:11,letterSpacing:`0.2em`,textTransform:`uppercase`,color:`var(--ink)`},children:[(0,U.jsx)(`span`,{children:`Breve`}),(0,U.jsx)(`span`,{children:`Privacy & Data Policy`})]}),(0,U.jsx)(`h1`,{style:{fontFamily:`var(--f-display)`,fontSize:64,fontWeight:400,lineHeight:1.05,margin:`32px 0 6px`,color:`var(--ink)`},children:`Privacy Policy`}),(0,U.jsx)(`p`,{style:{fontFamily:`var(--f-editorial)`,fontSize:18,fontStyle:`italic`,color:`var(--ink-soft)`,margin:`0 0 28px`},children:`What we collect, why we collect it, and what we never touch.`}),(0,U.jsx)(`p`,{style:{...Lc,marginTop:8,color:`var(--ink-soft)`,fontSize:13},children:`Effective date: June 1, 2026. We'll post the date here whenever we change anything below.`}),(0,U.jsx)(`h2`,{style:Rc,children:`The short version`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`p`,{children:[`Breve turns your X and Reddit feeds into a daily digest. The reading happens inside your own browser using your existing logins. `,(0,U.jsx)(`strong`,{children:`Our servers never see your social media passwords, cookies, or session tokens.`}),` The data Breve does collect is yours, you can delete it at any time, and we never sell it.`]})}),(0,U.jsx)(`h2`,{style:Rc,children:`What we collect`}),(0,U.jsx)(`h3`,{style:zc,children:`From your feeds`}),(0,U.jsxs)(`div`,{style:Lc,children:[(0,U.jsx)(`p`,{children:`Post content and basic public metadata — text, author handles, engagement counts, timestamps, links — pulled from the home feed you'd see if you were scrolling yourself.`}),(0,U.jsxs)(`p`,{children:[`We do `,(0,U.jsx)(`strong`,{children:`not`}),` capture your social media password, cookies, OAuth tokens, direct messages, drafts, notifications, follower lists, account settings, or anything outside the public post feed.`]})]}),(0,U.jsx)(`h3`,{style:zc,children:`From your Breve account`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`ul`,{style:Bc,children:[(0,U.jsx)(`li`,{style:Vc,children:`Your email address and display name (and the standard Google profile fields if you sign in with Google).`}),(0,U.jsx)(`li`,{style:Vc,children:`Your digest preferences — platforms, topics, format, send schedule.`}),(0,U.jsx)(`li`,{style:Vc,children:`The digests Breve has generated for you, so you can revisit them.`})]})}),(0,U.jsx)(`h3`,{style:zc,children:`Automatically`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`ul`,{style:Bc,children:[(0,U.jsx)(`li`,{style:Vc,children:`Standard web server logs (IP address, browser type, timestamps) for security and abuse prevention.`}),(0,U.jsx)(`li`,{style:Vc,children:`Crash reports when something on the site breaks, so we can fix it.`})]})}),(0,U.jsx)(`h2`,{style:Rc,children:`How we use it`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`ul`,{style:Bc,children:[(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Generate your digest`}),` from the posts and preferences you've given us.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Send your scheduled newsletter`}),` to the email on your account.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Show your past digests`}),` on your dashboard.`]})]})}),(0,U.jsx)(`h2`,{style:Rc,children:`Who else sees your data`}),(0,U.jsxs)(`div`,{style:Lc,children:[(0,U.jsx)(`p`,{children:`Breve uses a small set of third-party services to operate. Each sees only what they need to do their job:`}),(0,U.jsxs)(`ul`,{style:Bc,children:[(0,U.jsxs)(`li`,{style:Vc,children:[`An `,(0,U.jsx)(`strong`,{children:`authentication provider`}),` — sees your email, name, and login activity.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[`A `,(0,U.jsx)(`strong`,{children:`large language model provider`}),` — receives post text and your preferences to write the digest. Per their commercial terms, your inputs are not used to train their models.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[`An `,(0,U.jsx)(`strong`,{children:`email delivery service`}),` — sees your email address and the content of your scheduled digests.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[`A `,(0,U.jsx)(`strong`,{children:`cloud hosting provider`}),` — stores everything described above.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[`An `,(0,U.jsx)(`strong`,{children:`error-reporting service`}),` — sees crash stack traces.`]})]}),(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`strong`,{children:`We do not sell your data.`}),` We do not share it with advertisers, data brokers, or anyone outside this list.`]})]}),(0,U.jsx)(`h2`,{style:Rc,children:`Your rights`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`ul`,{style:Bc,children:[(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`See your data.`}),` Your profile and past digests are the full view of what we have.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Delete individual digests`}),` from the Delete button on each one. They sit in Recently Deleted for 30 days, then are permanently removed.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Unsubscribe`}),` from any newsletter via the one-click link in its email footer.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Delete your account`}),` from your Profile page. Account data and all associated digests are removed.`]})]})}),(0,U.jsx)(`h2`,{style:Rc,children:`How long we keep things`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`ul`,{style:Bc,children:[(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Posts pulled for digests`}),` — held only as long as we need to build your digest, then purged.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Generated digests`}),` — kept until you delete them.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Account data`}),` — kept until you delete your account.`]}),(0,U.jsxs)(`li`,{style:Vc,children:[(0,U.jsx)(`strong`,{children:`Server logs and crash reports`}),` — kept for a short window for security and debugging, then purged.`]})]})}),(0,U.jsx)(`h2`,{style:Rc,children:`Security`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsx)(`p`,{children:`All traffic between your browser and Breve is encrypted in transit. Accounts are isolated so one user cannot read another's data. Authentication is handled by an established third-party provider that manages password hashing, session tokens, and 2FA.`})}),(0,U.jsx)(`h2`,{style:Rc,children:`Changes to this policy`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`p`,{children:[`If we make material changes, we'll update the effective date at the top and notify you in your next digest email. The current version always lives at`,` `,(0,U.jsx)(`a`,{href:`https://breve.now/privacy`,className:`ink-link`,children:`breve.now/privacy`}),`.`]})}),(0,U.jsx)(`h2`,{style:Rc,children:`Contact`}),(0,U.jsx)(`div`,{style:Lc,children:(0,U.jsxs)(`p`,{children:[`Questions or concerns:`,` `,(0,U.jsx)(`a`,{href:`mailto:[email protected]`,className:`ink-link`,children:`[email protected]`}),`.`]})}),(0,U.jsx)(`div`,{style:{marginTop:60,paddingTop:20,borderTop:`1px solid var(--ink-soft)`,fontFamily:`var(--f-cond)`,fontSize:11,letterSpacing:`0.16em`,textTransform:`uppercase`,color:`var(--muted)`,textAlign:`center`},children:`Breve · breve.now`})]})})}var Uc=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,U.jsxs)(`div`,{style:{padding:40,fontFamily:`monospace`,fontSize:14,color:`#c0392b`,whiteSpace:`pre-wrap`},children:[(0,U.jsx)(`h2`,{children:`Render Error`}),(0,U.jsx)(`p`,{children:this.state.error.message}),(0,U.jsx)(`pre`,{children:this.state.error.stack}),(0,U.jsx)(`button`,{onClick:()=>{this.setState({error:null}),window.location.hash=`#/home`},children:`Go Home`})]}):this.props.children}};function Wc({clerkConfig:e}){let t=Va(),[n,r]=(0,_.useState)(La()),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=()=>r(La());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,_.useEffect)(()=>{let e=t.local.auth?.signedIn,r=t.data?.user?.onboardingStep,i=n.path;e?(i===`/`||i===``||i===`/signin`||i===`/signup`)&&Ra(r&&r!==`done`?`/onboarding`:`/home`):(i===`/`||i===``)&&Ra(`/signin`)},[n.path,t.local.auth?.signedIn,t.data?.user?.onboardingStep]),(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&p(!1)};
15return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let g=(0,_.useCallback)((e,t)=>{s(()=>e),l(t||null),a(!0)},[]),v=(0,_.useCallback)(()=>{a(!1),s(null),l(null)},[]),y=(0,_.useCallback)((e,t)=>{d({message:e,action:t?.action||null,note:t?.note||null})},[]);if(!t.data)return(0,U.jsxs)(Uc,{children:[(0,U.jsx)(Uo,{clerkConfig:e,store:t}),(0,U.jsx)(`div`,{className:`page-surface`,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`var(--f-type)`,fontSize:16,color:`var(--ink-soft)`,letterSpacing:`0.18em`},children:`LOADING DESK…`})]});let b=t.local.auth?.signedIn,{path:x}=n,S=x.match(/^\/digest\/([^/]+)\/(article|briefing)$/),C;if(b&&(x===`/signin`||x===`/signup`))C=(0,U.jsx)(`div`,{className:`page-surface`,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`var(--f-type)`,fontSize:16,color:`var(--ink-soft)`,letterSpacing:`0.18em`,textTransform:`uppercase`},children:`Setting up your desk…`});else if(x===`/signin`)C=(0,U.jsx)(Zo,{store:t,clerkConfig:e});else if(x===`/signup`)C=(0,U.jsx)(Qo,{store:t,clerkConfig:e});else if(x===`/sample`)C=(0,U.jsx)(Bs,{store:t});else if(x===`/privacy`)C=(0,U.jsx)(Hc,{});else if(!b)C=(0,U.jsx)(Zo,{store:t,clerkConfig:e});else if(x===`/onboarding`)C=(0,U.jsx)(is,{store:t,openLoader:g});else if(x===`/home`)C=(0,U.jsx)(Vs,{store:t,openLoader:g,openBrew:()=>h(!0)});else if(S){let[,e,n]=S;C=n===`article`?(0,U.jsx)(xs,{store:t,digestId:e}):(0,U.jsx)(Ms,{store:t,digestId:e})}else C=x===`/history`?(0,U.jsx)(uc,{store:t}):x===`/newsletters`?(0,U.jsx)(xc,{store:t}):x===`/profile`?(0,U.jsx)(Dc,{store:t,openSettings:()=>p(!0)}):x===`/manifesto`?(0,U.jsx)(Mc,{}):(0,U.jsx)(Vs,{store:t,openLoader:g,openBrew:()=>h(!0)});return(0,U.jsxs)(Uc,{children:[(0,U.jsx)(Uo,{clerkConfig:e,store:t}),(0,U.jsxs)(Wo,{clerkConfig:e,store:t,bypass:x===`/sample`||x===`/privacy`,children:[b&&x!==`/onboarding`&&x!==`/signin`&&x!==`/signup`&&x!==`/sample`&&x!==`/privacy`&&(0,U.jsx)(W,{route:n,store:t}),C,b&&x!==`/onboarding`&&x!==`/signin`&&x!==`/signup`&&x!==`/sample`&&x!==`/privacy`&&(0,U.jsx)(Io,{store:t,openLoader:g,setLoaderRunId:l,open:m,setOpen:h,hidden:i}),(0,U.jsx)(_o,{open:i,startFn:o,onClose:v,runId:c,onFatalError:y}),(0,U.jsx)(vo,{blocked:u,onClose:()=>d(null)}),(0,U.jsx)(Oc,{open:f,onClose:()=>p(!1),store:t}),(0,U.jsx)(po,{})]})]})}function Gc(){let[e,t]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let e=!1;return Ea(`/api/config`).then(n=>{e||t(n||{clerk:{enabled:!1,publishableKey:``}})}).catch(()=>{e||t({clerk:{enabled:!1,publishableKey:``}})}),()=>{e=!0}},[]),e?e.clerk?.enabled&&e.clerk.publishableKey?(0,U.jsx)(xa,{publishableKey:e.clerk.publishableKey,signInForceRedirectUrl:`/`,signUpForceRedirectUrl:`/`,signInFallbackRedirectUrl:`/`,signUpFallbackRedirectUrl:`/`,children:(0,U.jsx)(Wc,{clerkConfig:e.clerk})}):(0,U.jsx)(Wc,{clerkConfig:e.clerk}):(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,fontFamily:`system-ui, sans-serif`,fontSize:14,color:`#4a4a4a`,letterSpacing:`0.18em`},children:`LOADING…`})}v.createRoot(document.getElementById(`root`)).render((0,U.jsx)(Gc,{}));

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.