vendor: 7,120 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CLF2iBXR.js","assets/useQuery-C-iGd3mh.js","assets/useServerFn-DgMZqDJQ.js","assets/SiteHeader-BqOOKgqK.js","assets/SiteFooter-CpQk1rby.js","assets/newsletter.functions-BPJ19l6O.js","assets/TrustBar-BtiFENJY.js","assets/lock-BimkoO_z.js","assets/shield-check-B0Y8X4cW.js","assets/testimonials-CaLjRZxc.js","assets/arrow-right-DERkBiHm.js","assets/feather-G0ov8X3n.js","assets/route-DsaPdXup.js","assets/button-Cc6vISkn.js","assets/also-by-CrAlcuib.js","assets/Breadcrumbs-BAr-N3GS.js","assets/arrow-up-right-BRo-6YYj.js","assets/auth-QDHVJI7Q.js","assets/input-XaHB6AeD.js","assets/label-COJky-GG.js","assets/books-BxxJ3_ZG.js","assets/BookCover-BDpBz0qY.js","assets/bundles-BXIfy1-e.js","assets/cart-kXcVzlmA.js","assets/money-Bdxbx7r8.js","assets/harm-reduction-DeRdxa3O.js","assets/mermaid-GHXKKRXX-BW650IWT.js","assets/check-rFTGGwOD.js","assets/textarea-DM5dDCD0.js","assets/loader-circle-CKo3nrvz.js","assets/index.browser-BY9c7rfI.js","assets/use-persisted-chat-eOePmI3y.js","assets/trash-2-Bg71gBw1.js","assets/triangle-alert-Y3Bwbf1c.js","assets/help-6N2RPUHU.js","assets/support.functions-BF45nuz2.js","assets/pricing-BpJkxO2N.js","assets/brand-BVAz6htY.js","assets/arrow-left-bJxZenjV.js","assets/privacy-Dj2McP1v.js","assets/LegalPage-DXUF70KN.js","assets/refunds-mC40sSAW.js","assets/shop-CytkR7Ws.js","assets/support-BUNRdoKg.js","assets/terms-7kaT9YVZ.js","assets/twin-DmTkoMhd.js","assets/account-BMEEL8cO.js","assets/dashboard-DN3NuXNz.js","assets/card-BU1fusd-.js","assets/plus-BzpCviRC.js","assets/book-open-DWMrRwV0.js","assets/sparkles-BZGgZXIM.js","assets/footnotes-DI-iBQQZ.js","assets/account.orders-DIVYoyva.js","assets/product-files.functions-BZC8ip4a.js","assets/admin.index-DdTS4bk7.js","assets/AdminGate-Db1E1sSR.js","assets/useMutation-CsVV5qgy.js","assets/books.functions-BjM2fbuH.js","assets/admin.orders-CfqnsN_C.js","assets/admin.reviews-CAVLqr3I.js","assets/reviews.functions-C9eRImcN.js","assets/admin.shop-xRWy7E4e.js","assets/admin.support-D-BQTvuY.js","assets/author.shaun-j-apple-C1-wCNdx.js","assets/book._bookId-B574dV0S.js","assets/books._bookId-BGi4MX49.js","assets/books._bookId-D8c8I-qC.js","assets/books.admin-bWazOzi-.js","assets/upload-hM-7dRRF.js","assets/harm-reduction.admin-V4pWpkkC.js","assets/extract-text-Dj6Ou_lK.js","assets/file-text-G_mxHyOn.js","assets/newsletter.confirm-xaDZFiOo.js","assets/newsletter.unsubscribe-B4l8pXEI.js","assets/order.success-BhLg-UGI.js","assets/shop._slug-D-D9Nflg.js","assets/talkable-books.index-BWsFBPrL.js","assets/message-square-quote-CyoCHv2W.js","assets/talkable-books._slug-4PORI24E.js","assets/talkable-books.admin-DndvzwRx.js","assets/talkable-books.pricing-DFW6S_u3.js","assets/twin.admin-CRcF2nQb.js","assets/twin.functions-BcZ58lAP.js","assets/twin.talk-eO-Rq8xL.js","assets/admin.settings-C9NkEjS5.js","assets/personas.index-DPoEaj0Q.js","assets/personas.functions-CzTXKnLO.js","assets/message-square-D1TaFLM5.js","assets/personas.new-EIyUEjc7.js","assets/admin.shop.index-Bg1g_sDt.js","assets/admin.shop._id-1ttXREBX.js","assets/CoverUploader-BVHhga_4.js","assets/books.admin.new-VJuEkvCO.js","assets/books.category._slug-CKyX59n-.js","assets/personas._personaId.index-BW7_HXdW.js","assets/books.admin._bookId.edit-CTN6cOdb.js","assets/books.admin._bookId.ingest-fn2esZCa.js","assets/personas._personaId.chat.index-BOhitvay.js","assets/threads-DvShSnNU.js","assets/personas._personaId.chat._threadId-BBpJfbWt.js"])))=>i.map(i=>d[i]); 2function j1(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var f3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xh={exports:{}},ko={};var Dv;function P1(){if(Dv)return ko;Dv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:i,key:u,ref:o!==void 0?o:null,props:l}}return ko.Fragment=t,ko.jsx=n,ko.jsxs=n,ko}var $v;function L1(){return $v||($v=1,Xh.exports=P1()),Xh.exports}var q=L1(),Wh={exports:{}},be={};var Iv;function M1(){if(Iv)return be;Iv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function _(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,E={};function T(O,V,G){this.props=O,this.context=V,this.refs=E,this.updater=G||w}T.prototype.isReactComponent={},T.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,V,"setState")},T.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function k(){}k.prototype=T.prototype;function x(O,V,G){this.props=O,this.context=V,this.refs=E,this.updater=G||w}var N=x.prototype=new k;N.constructor=x,R(N,T.prototype),N.isPureReactComponent=!0;var I=Array.isArray;function U(){}var D={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function Q(O,V,G){var J=G.ref;return{$$typeof:e,type:O,key:V,ref:J!==void 0?J:null,props:G}}function le(O,V){return Q(O.type,V,O.props)}function oe(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ce(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(G){return V[G]})}var De=/\/+/g;function $e(O,V){return typeof O=="object"&&O!==null&&O.key!=null?ce(""+O.key):V.toString(36)}function Fe(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(U,U):(O.status="pending",O.then(function(V){O.status==="pending"&&(O.status="fulfilled",O.value=V)},function(V){O.status==="pending"&&(O.status="rejected",O.reason=V)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function L(O,V,G,J,W){var pe=typeof O;(pe==="undefined"||pe==="boolean")&&(O=null);var Ee=!1;if(O===null)Ee=!0;else switch(pe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(O.$$typeof){case e:case t:Ee=!0;break;case y:return Ee=O._init,L(Ee(O._payload),V,G,J,W)}}
vendor: 5,508 bytes, line 2
2if(Ee)return W=W(O),Ee=J===""?"."+$e(O,0):J,I(W)?(G="",Ee!=null&&(G=Ee.replace(De,"$&/")+"/"),L(W,V,G,"",function(Jt){return Jt})):W!=null&&(oe(W)&&(W=le(W,G+(W.key==null||O&&O.key===W.key?"":(""+W.key).replace(De,"$&/")+"/")+Ee)),V.push(W)),1;Ee=0;var ye=J===""?".":J+":";if(I(O))for(var xe=0;xe<O.length;xe++)J=O[xe],pe=ye+$e(J,xe),Ee+=L(J,V,G,pe,W);else if(xe=_(O),typeof xe=="function")for(O=xe.call(O),xe=0;!(J=O.next()).done;)J=J.value,pe=ye+$e(J,xe++),Ee+=L(J,V,G,pe,W);else if(pe==="object"){if(typeof O.then=="function")return L(Fe(O),V,G,J,W);throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Y(O,V,G){if(O==null)return O;var J=[],W=0;return L(O,J,"","",function(pe){return V.call(G,pe,W++)}),J}function se(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(G){(O._status===0||O._status===-1)&&(O._status=1,O._result=G)},function(G){(O._status===0||O._status===-1)&&(O._status=2,O._result=G)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var Te=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},_e={map:Y,forEach:function(O,V,G){Y(O,function(){V.apply(this,arguments)},G)},count:function(O){var V=0;return Y(O,function(){V++}),V},toArray:function(O){return Y(O,function(V){return V})||[]},only:function(O){if(!oe(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return be.Activity=g,be.Children=_e,be.Component=T,be.Fragment=n,be.Profiler=o,be.PureComponent=x,be.StrictMode=i,be.Suspense=f,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,be.__COMPILER_RUNTIME={__proto__:null,c:function(O){return D.H.useMemoCache(O)}},be.cache=function(O){return function(){return O.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(O,V,G){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var J=R({},O.props),W=O.key;if(V!=null)for(pe in V.key!==void 0&&(W=""+V.key),V)!K.call(V,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&V.ref===void 0||(J[pe]=V[pe]);var pe=arguments.length-2;if(pe===1)J.children=G;else if(1<pe){for(var Ee=Array(pe),ye=0;ye<pe;ye++)Ee[ye]=arguments[ye+2];J.children=Ee}return Q(O.type,W,J)},be.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:l,_context:O},O},be.createElement=function(O,V,G){var J,W={},pe=null;if(V!=null)for(J in V.key!==void 0&&(pe=""+V.key),V)K.call(V,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(W[J]=V[J]);var Ee=arguments.length-2;if(Ee===1)W.children=G;else if(1<Ee){for(var ye=Array(Ee),xe=0;xe<Ee;xe++)ye[xe]=arguments[xe+2];W.children=ye}if(O&&O.defaultProps)for(J in Ee=O.defaultProps,Ee)W[J]===void 0&&(W[J]=Ee[J]);return Q(O,pe,W)},be.createRef=function(){return{current:null}},be.forwardRef=function(O){return{$$typeof:d,render:O}},be.isValidElement=oe,be.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:se}},be.memo=function(O,V){return{$$typeof:m,type:O,compare:V===void 0?null:V}},be.startTransition=function(O){var V=D.T,G={};D.T=G;try{var J=O(),W=D.S;W!==null&&W(G,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(U,Te)}catch(pe){Te(pe)}finally{V!==null&&G.types!==null&&(V.types=G.types),D.T=V}},be.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},be.use=function(O){return D.H.use(O)},be.useActionState=function(O,V,G){return D.H.useActionState(O,V,G)},be.useCallback=function(O,V){return D.H.useCallback(O,V)},be.useContext=function(O){return D.H.useContext(O)},be.useDebugValue=function(){},be.useDeferredValue=function(O,V){return D.H.useDeferredValue(O,V)},be.useEffect=function(O,V){return D.H.useEffect(O,V)},be.useEffectEvent=function(O){return D.H.useEffectEvent(O)},be.useId=function(){return D.H.useId()},be.useImperativeHandle=function(O,V,G){return D.H.useImperativeHandle(O,V,G)},be.useInsertionEffect=function(O,V){return D.H.useInsertionEffect(O,V)},be.useLayoutEffect=function(O,V){return D.H.useLayoutEffect(O,V)},be.useMemo=function(O,V){return D.H.useMemo(O,V)},be.useOptimistic=function(O,V){return D.H.useOptimistic(O,V)},be.useReducer=function(O,V,G){return D.H.useReducer(O,V,G)},be.useRef=function(O){return D.H.useRef(O)},be.useState=function(O){return D.H.useState(O)},be.useSyncExternalStore=function(O,V,G){return D.H.useSyncExternalStore(O,V,G)},be.useTransition=function(){return D.H.useTransition()},be.version="19.2.5",be}var Uv;function rl(){return Uv||(Uv=1,Wh.exports=M1()),Wh.exports}var te=rl();const X=g_(te),p3=j1({__proto__:null,default:X},[te]);var ef={exports:{}},Oo={},tf={exports:{}},nf={};var Bv;function D1(){return Bv||(Bv=1,(function(e){function t(L,Y){var se=L.length;L.push(Y);e:for(;0<se;){var Te=se-1>>>1,_e=L[Te];if(0<o(_e,Y))L[Te]=Y,L[se]=_e,se=Te;else break e}}function n(L){return L.length===0?null:L[0]}
vendor: 8,506 bytes, line 2
2function i(L){if(L.length===0)return null;var Y=L[0],se=L.pop();if(se!==Y){L[0]=se;e:for(var Te=0,_e=L.length,O=_e>>>1;Te<O;){var V=2*(Te+1)-1,G=L[V],J=V+1,W=L[J];if(0>o(G,se))J<_e&&0>o(W,G)?(L[Te]=W,L[J]=se,Te=J):(L[Te]=G,L[V]=se,Te=V);else if(J<_e&&0>o(W,se))L[Te]=W,L[J]=se,Te=J;else break e}}return Y}function o(L,Y){var se=L.sortIndex-Y.sortIndex;return se!==0?se:L.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],m=[],y=1,g=null,v=3,_=!1,w=!1,R=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function N(L){for(var Y=n(m);Y!==null;){if(Y.callback===null)i(m);else if(Y.startTime<=L)i(m),Y.sortIndex=Y.expirationTime,t(f,Y);else break;Y=n(m)}}function I(L){if(R=!1,N(L),!w)if(n(f)!==null)w=!0,U||(U=!0,ce());else{var Y=n(m);Y!==null&&Fe(I,Y.startTime-L)}}var U=!1,D=-1,K=5,Q=-1;function le(){return E?!0:!(e.unstable_now()-Q<K)}function oe(){if(E=!1,U){var L=e.unstable_now();Q=L;var Y=!0;try{e:{w=!1,R&&(R=!1,k(D),D=-1),_=!0;var se=v;try{t:{for(N(L),g=n(f);g!==null&&!(g.expirationTime>L&&le());){var Te=g.callback;if(typeof Te=="function"){g.callback=null,v=g.priorityLevel;var _e=Te(g.expirationTime<=L);if(L=e.unstable_now(),typeof _e=="function"){g.callback=_e,N(L),Y=!0;break t}g===n(f)&&i(f),N(L)}else i(f);g=n(f)}if(g!==null)Y=!0;else{var O=n(m);O!==null&&Fe(I,O.startTime-L),Y=!1}}break e}finally{g=null,v=se,_=!1}Y=void 0}}finally{Y?ce():U=!1}}}var ce;if(typeof x=="function")ce=function(){x(oe)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,$e=De.port2;De.port1.onmessage=oe,ce=function(){$e.postMessage(null)}}else ce=function(){T(oe,0)};function Fe(L,Y){D=T(function(){L(e.unstable_now())},Y)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(L){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var se=v;v=Y;try{return L()}finally{v=se}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(L,Y){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var se=v;v=L;try{return Y()}finally{v=se}},e.unstable_scheduleCallback=function(L,Y,se){var Te=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Te+se:Te):se=Te,L){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=se+_e,L={id:y++,callback:Y,priorityLevel:L,startTime:se,expirationTime:_e,sortIndex:-1},se>Te?(L.sortIndex=se,t(m,L),n(f)===null&&L===n(m)&&(R?(k(D),D=-1):R=!0,Fe(I,se-Te))):(L.sortIndex=_e,t(f,L),w||_||(w=!0,U||(U=!0,ce()))),L},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(L){var Y=v;return function(){var se=v;v=Y;try{return L.apply(this,arguments)}finally{v=se}}}})(nf)),nf}var Hv;function $1(){return Hv||(Hv=1,tf.exports=D1()),tf.exports}var rf={exports:{}},Ht={};var qv;function I1(){if(qv)return Ht;qv=1;var e=rl();function t(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(f,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:f,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ht.createPortal=function(f,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return l(f,m,null,y)},Ht.flushSync=function(f){var m=u.T,y=i.p;try{if(u.T=null,i.p=2,f)return f()}finally{u.T=m,i.p=y,i.d.f()}},Ht.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(f,m))},Ht.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},Ht.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?i.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:_}):y==="script"&&i.d.X(f,{crossOrigin:g,integrity:v,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ht.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);i.d.M(f,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(f)},Ht.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);i.d.L(f,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ht.preloadModule=function(f,m){if(typeof f=="string")if(m){var y=d(m.as,m.crossOrigin);i.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(f)},Ht.requestFormReset=function(f){i.d.r(f)},Ht.unstable_batchedUpdates=function(f,m){return f(m)},Ht.useFormState=function(f,m,y){return u.H.useFormState(f,m,y)},Ht.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ht.version="19.2.5",Ht}var Vv;function y_(){if(Vv)return rf.exports;Vv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rf.exports=I1(),rf.exports}var Zv;function U1(){if(Zv)return Oo;Zv=1;var e=$1(),t=rl(),n=y_();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var s=r,a=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(a=s.return),r=s.return;while(r)}return s.tag===3?a:null}function u(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function d(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(i(188))}function m(r){var s=r.alternate;if(!s){if(s=l(r),s===null)throw Error(i(188));return s!==r?null:r}for(var a=r,c=s;;){var h=a.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===a)return f(h),r;if(p===c)return f(h),s;p=p.sibling}throw Error(i(188))}if(a.return!==c.return)a=h,c=p;else{for(var b=!1,S=h.child;S;
vendor: 12,977 bytes, lines 2-9
2){if(S===a){b=!0,a=h,c=p;break}if(S===c){b=!0,c=h,a=p;break}S=S.sibling}if(!b){for(S=p.child;S;){if(S===a){b=!0,a=p,c=h;break}if(S===c){b=!0,c=p,a=h;break}S=S.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==c)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?r:s}function y(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=y(r),s!==null)return s;r=r.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),x=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ce(r){return r===null||typeof r!="object"?null:(r=oe&&r[oe]||r["@@iterator"],typeof r=="function"?r:null)}var De=Symbol.for("react.client.reference");function $e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===De?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case U:return"SuspenseList";case Q:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case x:return r.displayName||"Context";case k:return(r._context.displayName||"Context")+".Consumer";case N:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case D:return s=r.displayName||null,s!==null?s:$e(r.type)||"Memo";case K:s=r._payload,r=r._init;try{return $e(r(s))}catch{}}return null}var Fe=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Te=[],_e=-1;function O(r){return{current:r}}function V(r){0>_e||(r.current=Te[_e],Te[_e]=null,_e--)}function G(r,s){_e++,Te[_e]=r.current,r.current=s}var J=O(null),W=O(null),pe=O(null),Ee=O(null);function ye(r,s){switch(G(pe,s),G(W,r),G(J,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?av(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=av(s),r=ov(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}V(J),G(J,r)}function xe(){V(J),V(W),V(pe)}function Jt(r){r.memoizedState!==null&&G(Ee,r);var s=J.current,a=ov(s,r.type);s!==a&&(G(W,r),G(J,a))}function Qt(r){W.current===r&&(V(J),V(W)),Ee.current===r&&(V(Ee),Eo._currentValue=se)}var qt,Ls;function Xt(r){if(qt===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);qt=s&&s[1]||"",Ls=-1<a.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+qt+r+Ls}var Ms=!1;function yr(r,s){if(!r||Ms)return"";Ms=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(s){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch($){var M=$}Reflect.construct(r,[],F)}else{try{F.call()}catch($){M=$}r.call(F.prototype)}}else{try{throw Error()}catch($){M=$}(F=r())&&typeof F.catch=="function"&&F.catch(function(){})}}catch($){if($&&M&&typeof $.stack=="string")return[$.stack,M.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),b=p[0],S=p[1];if(b&&S){var A=b.split(` 5`),P=S.split(` 6`);for(h=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;h<P.length&&!P[h].includes("DetermineComponentFrameRoot");)h++;if(c===A.length||h===P.length)for(c=A.length-1,h=P.length-1;1<=c&&0<=h&&A[c]!==P[h];)h--;for(;1<=c&&0<=h;c--,h--)if(A[c]!==P[h]){if(c!==1||h!==1)do if(c--,h--,0>h||A[c]!==P[h]){var B=` 7`+A[c].replace(" at new "," at ");return r.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",r.displayName)),B}while(1<=c&&0<=h);break}}}finally{Ms=!1,Error.prepareStackTrace=a}return(a=r?r.displayName||r.name:"")?Xt(a):""}function tr(r,s){switch(r.tag){case 26:case 27:case 5:return Xt(r.type);case 16:return Xt("Lazy");case 13:return r.child!==s&&s!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return yr(r.type,!1);case 11:return yr(r.type.render,!1);case 1:return yr(r.type,!0);case 31:return Xt("Activity");default:return""}}function Cn(r){try{var s="",a=null;do s+=tr(r,a),a=r,r=r.return;while(r);return s}catch(c){return` 8Error generating stack: `+c.message+` 9`+c.stack}}var Nt=Object.prototype.hasOwnProperty,yn=e.unstable_scheduleCallback,Ds=e.unstable_cancelCallback,Tt=e.unstable_shouldYield,nr=e.unstable_requestPaint,Rt=e.unstable_now,Be=e.unstable_getCurrentPriorityLevel,lt=e.unstable_ImmediatePriority,xn=e.unstable_UserBlockingPriority,vr=e.unstable_NormalPriority,La=e.unstable_LowPriority,br=e.unstable_IdlePriority,ul=e.log,Yr=e.unstable_setDisableYieldValue,$s=null,Vt=null;function Vn(r){if(typeof ul=="function"&&Yr(r),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode($s,r)}catch{}}var Ut=Math.clz32?Math.clz32:rr,Bu=Math.log,Ma=Math.LN2;function rr(r){return r>>>=0,r===0?32:31-(Bu(r)/Ma|0)|0}var _i=256,wi=262144,Is=4194304;function sr(r){var s=r&42;if(s!==0)return s;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function ve(r,s,a){var c=r.pendingLanes;if(c===0)return 0;var h=0,p=r.suspendedLanes,b=r.pingedLanes;r=r.warmLanes;var S=c&134217727;return S!==0?(c=S&~p,c!==0?h=sr(c):(b&=S,b!==0?h=sr(b):a||(a=S&~r,a!==0&&(h=sr(a))))):(S=c&~p,S!==0?h=sr(S):b!==0?h=sr(b):a||(a=c&~r,a!==0&&(h=sr(a)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,a=s&-s,p>=a||p===32&&(a&4194048)!==0)?s:h}function tt(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function At(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Bt(){var r=Is;return Is<<=1,(Is&62914560)===0&&(Is=4194304),r}function Jr(r){for(var s=[],a=0;31>a;a++)s.push(r);return s}function at(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Wt(r,s,a,c,h,p){var b=r.pendingLanes;r.pendingLanes=a,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=a,r.entangledLanes&=a,r.errorRecoveryDisabledLanes&=a,r.shellSuspendCounter=0;var S=r.entanglements,A=r.expirationTimes,P=r.hiddenUpdates;for(a=b&~a;0<a;){var B=31-Ut(a),F=1<<B;S[B]=0,A[B]=-1;var M=P[B];if(M!==null)for(P[B]=null,B=0;B<M.length;B++){var $=M[B];$!==null&&($.lane&=-536870913)}a&=~F}c!==0&&Us(r,c,0),p!==0&&h===0&&r.tag!==0&&(r.suspendedLanes|=p&~(b&~s))}function Us(r,s,a){r.pendingLanes|=s,r.suspendedLanes&=~s;var c=31-Ut(s);r.entangledLanes|=s,r.entanglements[c]=r.entanglements[c]|1073741824|a&261930}function en(r,s){var a=r.entangledLanes|=s;for(r=r.entanglements;a;){var c=31-Ut(a),h=1<<c;h&s|r[c]&s&&(r[c]|=s),a&=~h}}function tn(r,s){var a=s&-s;return a=(a&42)!==0?1:Si(a),(a&(r.suspendedLanes|s))!==0?0:a}function Si(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Zn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Hu(){var r=Y.p;return r!==0?r:(r=window.event,r===void 0?32:xv(r.type))}function Fp(r,s){var a=Y.p;try{return Y.p=r,s()}finally{Y.p=a}}var Qr=Math.random().toString(36).slice(2),zt="__reactFiber$"+Qr,nn="__reactProps$"+Qr,Ei="__reactContainer$"+Qr,qu="__reactEvents$"+Qr,SE="__reactListeners$"+Qr,EE="__reactHandles$"+Qr,Gp="__reactResources$"+Qr,Da="__reactMarker$"+Qr;function Vu(r){delete r[zt],delete r[nn],delete r[qu],delete r[SE],delete r[EE]}function Ti(r){var s=r[zt];if(s)return s;for(var a=r.parentNode;a;){if(s=a[Ei]||a[zt]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(r=pv(r);r!==null;){if(a=r[zt])return a;r=pv(r)}return s}r=a,a=r.parentNode}return null}function Ri(r){if(r=r[zt]||r[Ei]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function $a(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function Ai(r){var s=r[Gp];return s||(s=r[Gp]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function kt(r){r[Da]=!0}var Kp=new Set,Yp={};function Bs(r,s){ki(r,s),ki(r+"Capture",s)}function ki(r,s){for(Yp[r]=s,r=0;r<s.length;r++)Kp.add(s[r])}var TE=RegExp("^[: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][: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]*$"),Jp={},Qp={};function RE(r){return Nt.call(Qp,r)?!0:Nt.call(Jp,r)?!1:TE.test(r)?Qp[r]=!0:(Jp[r]=!0,!1)}function dl(r,s,a){if(RE(s))if(a===null)r.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var c=s.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+a)}}function hl(r,s,a){if(a===null)r.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+a)}}function _r(r,s,a,c){if(c===null)r.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttributeNS(s,a,""+c)}}function Nn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Xp(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function AE(r,s,a){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,p=c.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return h.call(this)},set:function(b){a=""+b,p.call(this,b)}}),Object.defineProperty(r,s,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Zu(r){if(!r._valueTracker){var s=Xp(r)?"checked":"value";r._valueTracker=AE(r,s,""+r[s])}}function Wp(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var a=s.getValue(),c="";return r&&(c=Xp(r)?r.checked?"true":"false":r.value),r=c,r!==a?(s.setValue(r),!0):!1}function fl(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var kE=/[\n"\\]/g;function zn(r){return r.replace(kE,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Fu(r,s,a,c,h,p,b,S){r.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?r.type=b:r.removeAttribute("type"),s!=null?b==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+Nn(s)):r.value!==""+Nn(s)&&(r.value=""+Nn(s)):b!=="submit"&&b!=="reset"||r.removeAttribute("value"),s!=null?Gu(r,b,Nn(s)):a!=null?Gu(r,b,Nn(a)):c!=null&&r.removeAttribute("value"),h==null&&p!=null&&(r.defaultChecked=!!p),h!=null&&(r.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?r.name=""+Nn(S):r.removeAttribute("name")}
vendor: 5,537 bytes, line 9
9function em(r,s,a,c,h,p,b,S){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(r.type=p),s!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){Zu(r);return}a=a!=null?""+Nn(a):"",s=s!=null?""+Nn(s):a,S||s===r.value||(r.value=s),r.defaultValue=s}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=S?r.checked:!!c,r.defaultChecked=!!c,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.name=b),Zu(r)}function Gu(r,s,a){s==="number"&&fl(r.ownerDocument)===r||r.defaultValue===""+a||(r.defaultValue=""+a)}function Oi(r,s,a,c){if(r=r.options,s){s={};for(var h=0;h<a.length;h++)s["$"+a[h]]=!0;for(a=0;a<r.length;a++)h=s.hasOwnProperty("$"+r[a].value),r[a].selected!==h&&(r[a].selected=h),h&&c&&(r[a].defaultSelected=!0)}else{for(a=""+Nn(a),s=null,h=0;h<r.length;h++){if(r[h].value===a){r[h].selected=!0,c&&(r[h].defaultSelected=!0);return}s!==null||r[h].disabled||(s=r[h])}s!==null&&(s.selected=!0)}}function tm(r,s,a){if(s!=null&&(s=""+Nn(s),s!==r.value&&(r.value=s),a==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=a!=null?""+Nn(a):""}function nm(r,s,a,c){if(s==null){if(c!=null){if(a!=null)throw Error(i(92));if(Fe(c)){if(1<c.length)throw Error(i(93));c=c[0]}a=c}a==null&&(a=""),s=a}a=Nn(s),r.defaultValue=a,c=r.textContent,c===a&&c!==""&&c!==null&&(r.value=c),Zu(r)}function Ci(r,s){if(s){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=s;return}}r.textContent=s}var OE=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 rm(r,s,a){var c=s.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":c?r.setProperty(s,a):typeof a!="number"||a===0||OE.has(s)?s==="float"?r.cssFloat=a:r[s]=(""+a).trim():r[s]=a+"px"}function sm(r,s,a){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||s!=null&&s.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var h in s)c=s[h],s.hasOwnProperty(h)&&a[h]!==c&&rm(r,h,c)}else for(var p in s)s.hasOwnProperty(p)&&rm(r,p,s[p])}function Ku(r){if(r.indexOf("-")===-1)return!1;switch(r){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 CE=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
9-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"]]),xE=/^[\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 pl(r){return xE.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function wr(){}var Yu=null;function Ju(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var xi=null,Ni=null;function im(r){var s=Ri(r);if(s&&(r=s.stateNode)){var a=r[nn]||null;e:switch(r=s.stateNode,s.type){case"input":if(Fu(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type==="radio"&&s!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+zn(""+s)+'"][type="radio"]'),s=0;s<a.length;s++){var c=a[s];if(c!==r&&c.form===r.form){var h=c[nn]||null;if(!h)throw Error(i(90));Fu(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(s=0;s<a.length;s++)c=a[s],c.form===r.form&&Wp(c)}break e;case"textarea":tm(r,a.value,a.defaultValue);break e;case"select":s=a.value,s!=null&&Oi(r,!!a.multiple,s,!1)}}}var Qu=!1;function am(r,s,a){if(Qu)return r(s,a);Qu=!0;try{var c=r(s);return c}finally{if(Qu=!1,(xi!==null||Ni!==null)&&(tc(),xi&&(s=xi,r=Ni,Ni=xi=null,im(s),r)))for(s=0;s<r.length;s++)im(r[s])}}function Ia(r,s){var a=r.stateNode;if(a===null)return null;var c=a[nn]||null;if(c===null)return null;a=c[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(i(231,s,typeof a));return a}var Sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=!1;if(Sr)try{var Ua={};Object.defineProperty(Ua,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{Xu=!1}var Xr=null,Wu=null,ml=null;function om(){if(ml)return ml;var r,s=Wu,a=s.length,c,h="value"in Xr?Xr.value:Xr.textContent,p=h.length;for(r=0;r<a&&s[r]===h[r];r++);var b=a-r;for(c=1;c<=b&&s[a-c]===h[p-c];c++);return ml=h.slice(r,1<c?1-c:void 0)}function gl(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function yl(){return!0}function lm(){return!1}function rn(r){function s(a,c,h,p,b){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=p,this.target=b,this.currentTarget=null;for(var S in r)r.hasOwnProperty(S)&&(a=r[S],this[S]=a?a(p):p[S]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?yl:lm,this.isPropagationStopped=lm,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=yl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=yl)},persist:function(){},isPersistent:yl}),s}var Hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vl=rn(Hs),Ba=g({},Hs,{view:0,detail:0}),NE=rn(Ba),ed,td,Ha,bl=g({},Ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ha&&
vendor: 4,913 bytes, line 9
9(Ha&&r.type==="mousemove"?(ed=r.screenX-Ha.screenX,td=r.screenY-Ha.screenY):td=ed=0,Ha=r),ed)},movementY:function(r){return"movementY"in r?r.movementY:td}}),cm=rn(bl),zE=g({},bl,{dataTransfer:0}),jE=rn(zE),PE=g({},Ba,{relatedTarget:0}),nd=rn(PE),LE=g({},Hs,{animationName:0,elapsedTime:0,pseudoElement:0}),ME=rn(LE),DE=g({},Hs,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),$E=rn(DE),IE=g({},Hs,{data:0}),um=rn(IE),UE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BE={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"},HE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qE(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=HE[r])?!!s[r]:!1}function rd(){return qE}var VE=g({},Ba,{key:function(r){if(r.key){var s=UE[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=gl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?BE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rd,charCode:function(r){return r.type==="keypress"?gl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?gl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ZE=rn(VE),FE=g({},bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dm=rn(FE),GE=g({},Ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rd}),KE=rn(GE),YE=g({},Hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),JE=rn(YE),QE=g({},bl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),XE=rn(QE),WE=g({},Hs,{newState:0,oldState:0}),eT=rn(WE),tT=[9,13,27,32],sd=Sr&&"CompositionEvent"in window,qa=null;Sr&&"documentMode"in document&&(qa=document.documentMode);var nT=Sr&&"TextEvent"in window&&!qa,hm=Sr&&(!sd||qa&&8<qa&&11>=qa),fm=" ",pm=!1;function mm(r,s){switch(r){case"keyup":return tT.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gm(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var zi=!1;function rT(r,s){switch(r){case"compositionend":return gm(s);case"keypress":return s.which!==32?null:(pm=!0,fm);case"textInput":return r=s.data,r===fm&&pm?null:r;default:return null}}function sT(r,s){if(zi)return r==="compositionend"||!sd&&mm(r,s)?(r=om(),ml=Wu=Xr=null,zi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return hm&&s.locale!=="ko"?null:s.data;default:return null}}var iT={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 ym(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!iT[r.type]:s==="textarea"}function vm(r,s,a,c){xi?Ni?Ni.push(c):Ni=[c]:xi=c,s=lc(s,"onChange"),0<s.length&&(a=new vl("onChange","change",null,a,c),r.push({event:a,listeners:s}))}var Va=null,Za=null;function aT(r){ev(r,0)}function _l(r){var s=$a(r);if(Wp(s))return r}function bm(r,s){if(r==="change")return s}var _m=!1;if(Sr){var id;if(Sr){var ad="oninput"in document;if(!ad){var wm=document.createElement("div");wm.setAttribute("oninput","return;"),ad=typeof wm.oninput=="function"}id=ad}else id=!1;_m=id&&(!document.documentMode||9<document.documentMode)}function Sm(){Va&&(Va.detachEvent("onpropertychange",Em),Za=Va=null)}function Em(r){if(r.propertyName==="value"&&_l(Za)){var s=[];vm(s,Za,r,Ju(r)),am(aT,s)}}function oT(r,s,a){r==="focusin"?(Sm(),Va=s,Za=a,Va.attachEvent("onpropertychange",Em)):r==="focusout"&&Sm()}function lT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return _l(Za)}function cT(r,s){if(r==="click")return _l(s)}function uT(r,s){if(r==="input"||r==="change")return _l(s)}function dT(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var vn=typeof Object.is=="function"?Object.is:dT;function Fa(r,s){if(vn(r,s))return!0;
vendor: 18,812 bytes, line 9
9if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var a=Object.keys(r),c=Object.keys(s);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!Nt.call(s,h)||!vn(r[h],s[h]))return!1}return!0}function Tm(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Rm(r,s){var a=Tm(r);r=0;for(var c;a;){if(a.nodeType===3){if(c=r+a.textContent.length,r<=s&&c>=s)return{node:a,offset:s-r};r=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Tm(a)}}function Am(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Am(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function km(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=fl(r.document);s instanceof r.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)r=s.contentWindow;else break;s=fl(r.document)}return s}function od(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var hT=Sr&&"documentMode"in document&&11>=document.documentMode,ji=null,ld=null,Ga=null,cd=!1;function Om(r,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;cd||ji==null||ji!==fl(c)||(c=ji,"selectionStart"in c&&od(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ga&&Fa(Ga,c)||(Ga=c,c=lc(ld,"onSelect"),0<c.length&&(s=new vl("onSelect","select",null,s,a),r.push({event:s,listeners:c}),s.target=ji)))}function qs(r,s){var a={};return a[r.toLowerCase()]=s.toLowerCase(),a["Webkit"+r]="webkit"+s,a["Moz"+r]="moz"+s,a}var Pi={animationend:qs("Animation","AnimationEnd"),animationiteration:qs("Animation","AnimationIteration"),animationstart:qs("Animation","AnimationStart"),transitionrun:qs("Transition","TransitionRun"),transitionstart:qs("Transition","TransitionStart"),transitioncancel:qs("Transition","TransitionCancel"),transitionend:qs("Transition","TransitionEnd")},ud={},Cm={};Sr&&(Cm=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function Vs(r){if(ud[r])return ud[r];if(!Pi[r])return r;var s=Pi[r],a;for(a in s)if(s.hasOwnProperty(a)&&a in Cm)return ud[r]=s[a];return r}var xm=Vs("animationend"),Nm=Vs("animationiteration"),zm=Vs("animationstart"),fT=Vs("transitionrun"),pT=Vs("transitionstart"),mT=Vs("transitioncancel"),jm=Vs("transitionend"),Pm=new Map,dd="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(" ");dd.push("scrollEnd");function Fn(r,s){Pm.set(r,s),Bs(s,[r])}var wl=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},jn=[],Li=0,hd=0;function Sl(){for(var r=Li,s=hd=Li=0;s<r;){var a=jn[s];jn[s++]=null;var c=jn[s];jn[s++]=null;var h=jn[s];jn[s++]=null;var p=jn[s];if(jn[s++]=null,c!==null&&h!==null){var b=c.pending;b===null?h.next=h:(h.next=b.next,b.next=h),c.pending=h}p!==0&&Lm(a,h,p)}}function El(r,s,a,c){jn[Li++]=r,jn[Li++]=s,jn[Li++]=a,jn[Li++]=c,hd|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function fd(r,s,a,c){return El(r,s,a,c),Tl(r)}function Zs(r,s){return El(r,null,null,s),Tl(r)}function Lm(r,s,a){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a);for(var h=!1,p=r.return;p!==null;)p.childLanes|=a,c=p.alternate,c!==null&&(c.childLanes|=a),p.tag===22&&(r=p.stateNode,r===null||r._visibility&1||(h=!0)),r=p,p=p.return;return r.tag===3?(p=r.stateNode,h&&s!==null&&(h=31-Ut(a),r=p.hiddenUpdates,c=r[h],c===null?r[h]=[s]:c.push(s),s.lane=a|536870912),p):null}function Tl(r){if(50<go)throw go=0,Sh=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var Mi={};function gT(r,s,a,c){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(r,s,a,c){return new gT(r,s,a,c)}function pd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Er(r,s){var a=r.alternate;return a===null?(a=bn(r.tag,s,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=s,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&65011712,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,s=r.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a.refCleanup=r.refCleanup,a}function Mm(r,s){r.flags&=65011714;var a=r.alternate;return a===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=a.childLanes,r.lanes=a.lanes,r.child=a.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=a.memoizedProps,r.memoizedState=a.memoizedState,r.updateQueue=a.updateQueue,r.type=a.type,s=a.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function Rl(r,s,a,c,h,p){var b=0;if(c=r,typeof r=="function")pd(r)&&(b=1);else if(typeof r=="string")b=w1(r,a,J.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case Q:return r=bn(31,a,s,h),r.elementType=Q,r.lanes=p,r;case R:return Fs(a.children,h,p,s);case E:b=8,h|=24;break;case T:return r=bn(12,a,s,h|2),r.elementType=T,r.lanes=p,r;case I:return r=bn(13,a,s,h),r.elementType=I,r.lanes=p,r;case U:return r=bn(19,a,s,h),r.elementType=U,r.lanes=p,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case x:b=10;break e;case k:b=9;break e;case N:b=11;break e;case D:b=14;break e;case K:b=16,c=null;break e}b=29,a=Error(i(130,r===null?"null":typeof r,"")),c=null}return s=bn(b,a,s,h),s.elementType=r,s.type=c,s.lanes=p,s}function Fs(r,s,a,c){return r=bn(7,r,c,s),r.lanes=a,r}function md(r,s,a){return r=bn(6,r,null,s),r.lanes=a,r}function Dm(r){var s=bn(18,null,null,0);return s.stateNode=r,s}function gd(r,s,a){return s=bn(4,r.children!==null?r.children:[],r.key,s),s.lanes=a,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var $m=new WeakMap;function Pn(r,s){if(typeof r=="object"&&r!==null){var a=$m.get(r);return a!==void 0?a:(s={value:r,source:s,stack:Cn(s)},$m.set(r,s),s)}return{value:r,source:s,stack:Cn(s)}}var Di=[],$i=0,Al=null,Ka=0,Ln=[],Mn=0,Wr=null,ir=1,ar="";function Tr(r,s){Di[$i++]=Ka,Di[$i++]=Al,Al=r,Ka=s}function Im(r,s,a){Ln[Mn++]=ir,Ln[Mn++]=ar,Ln[Mn++]=Wr,Wr=r;var c=ir;r=ar;var h=32-Ut(c)-1;c&=~(1<<h),a+=1;var p=32-Ut(s)+h;if(30<p){var b=h-h%5;p=(c&(1<<b)-1).toString(32),c>>=b,h-=b,ir=1<<32-Ut(s)+h|a<<h|c,ar=p+r}else ir=1<<p|a<<h|c,ar=r}function yd(r){r.return!==null&&(Tr(r,1),Im(r,1,0))}function vd(r){for(;r===Al;)Al=Di[--$i],Di[$i]=null,Ka=Di[--$i],Di[$i]=null;for(;r===Wr;)Wr=Ln[--Mn],Ln[Mn]=null,ar=Ln[--Mn],Ln[Mn]=null,ir=Ln[--Mn],Ln[Mn]=null}function Um(r,s){Ln[Mn++]=ir,Ln[Mn++]=ar,Ln[Mn++]=Wr,ir=s.id,ar=s.overflow,Wr=r}var jt=null,Qe=null,Ce=!1,es=null,Dn=!1,bd=Error(i(519));function ts(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ya(Pn(s,r)),bd}function Bm(r){var s=r.stateNode,a=r.type,c=r.memoizedProps;switch(s[zt]=r,s[nn]=c,a){case"dialog":Ae("cancel",s),Ae("close",s);break;case"iframe":case"object":case"embed":Ae("load",s);break;case"video":case"audio":for(a=0;a<vo.length;a++)Ae(vo[a],s);break;case"source":Ae("error",s);break;case"img":case"image":case"link":Ae("error",s),Ae("load",s);break;case"details":Ae("toggle",s);break;case"input":Ae("invalid",s),em(s,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ae("invalid",s);break;case"textarea":Ae("invalid",s),nm(s,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||s.textContent===""+a||c.suppressHydrationWarning===!0||sv(s.textContent,a)?(c.popover!=null&&(Ae("beforetoggle",s),Ae("toggle",s)),c.onScroll!=null&&Ae("scroll",s),c.onScrollEnd!=null&&Ae("scrollend",s),c.onClick!=null&&(s.onclick=wr),s=!0):s=!1,s||ts(r,!0)}function Hm(r){for(jt=r.return;jt;)switch(jt.tag){case 5:case 31:case 13:Dn=!1;return;case 27:case 3:Dn=!0;return;default:jt=jt.return}}function Ii(r){if(r!==jt)return!1;if(!Ce)return Hm(r),Ce=!0,!1;var s=r.tag,a;if((a=s!==3&&s!==27)&&((a=s===5)&&(a=r.type,a=!(a!=="form"&&a!=="button")||Dh(r.type,r.memoizedProps)),a=!a),a&&Qe&&ts(r),Hm(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Qe=fv(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Qe=fv(r)}else s===27?(s=Qe,ms(r.type)?(r=Hh,Hh=null,Qe=r):Qe=s):Qe=jt?In(r.stateNode.nextSibling):null;return!0}function Gs(){Qe=jt=null,Ce=!1}function _d(){var r=es;return r!==null&&(ln===null?ln=r:ln.push.apply(ln,r),es=null),r}function Ya(r){es===null?es=[r]:es.push(r)}var wd=O(null),Ks=null,Rr=null;function ns(r,s,a){G(wd,s._currentValue),s._currentValue=a}function Ar(r){r._currentValue=wd.current,V(wd)}function Sd(r,s,a){for(;r!==null;){var c=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),r===a)break;r=r.return}}function Ed(r,s,a,c){var h=r.child;for(h!==null&&(h.return=r);h!==null;){var p=h.dependencies;if(p!==null){var b=h.child;p=p.firstContext;e:for(;p!==null;){var S=p;p=h;for(var A=0;A<s.length;A++)if(S.context===s[A]){p.lanes|=a,S=p.alternate,S!==null&&(S.lanes|=a),Sd(p.return,a,r),c||(b=null);break e}p=S.next}}else if(h.tag===18){if(b=h.return,b===null)throw Error(i(341));b.lanes|=a,p=b.alternate,p!==null&&(p.lanes|=a),Sd(b,a,r),b=null}else b=h.child;if(b!==null)b.return=h;else for(b=h;b!==null;){if(b===r){b=null;break}if(h=b.sibling,h!==null){h.return=b.return,b=h;break}b=b.return}h=b}}function Ui(r,s,a,c){r=null;for(var h=s,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var b=h.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var S=h.type;vn(h.pendingProps.value,b.value)||(r!==null?r.push(S):r=[S])}}else if(h===Ee.current){if(b=h.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(r!==null?r.push(Eo):r=[Eo])}h=h.return}r!==null&&Ed(s,r,a,c),s.flags|=262144}function kl(r){for(r=r.firstContext;r!==null;){if(!vn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ys(r){Ks=r,Rr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Pt(r){return qm(Ks,r)}function Ol(r,s){return Ks===null&&Ys(r),qm(r,s)}function qm(r,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},Rr===null){if(r===null)throw Error(i(308));Rr=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else Rr=Rr.next=s;return a}var yT=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(a,c){r.push(c)}};this.abort=function(){s.aborted=!0,r.forEach(function(a){return a()})}},vT=e.unstable_scheduleCallback,bT=e.unstable_NormalPriority,gt={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Td(){return{controller:new yT,data:new Map,refCount:0}}function Ja(r){r.refCount--,r.refCount===0&&vT(bT,function(){r.controller.abort()})}var Qa=null,Rd=0,Bi=0,Hi=null;function _T(r,s){if(Qa===null){var a=Qa=[];Rd=0,Bi=Oh(),Hi={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Rd++,s.then(Vm,Vm),s}function Vm(){if(--Rd===0&&Qa!==null){Hi!==null&&(Hi.status="fulfilled");var r=Qa;Qa=null,Bi=0,Hi=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function wT(r,s){var a=[],c={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return r.then(function(){c.status="fulfilled",c.value=s;for(var h=0;h<a.length;h++)(0,a[h])(s)},function(h){for(c.status="rejected",c.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),c}var Zm=L.S;L.S=function(r,s){Oy=Rt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&_T(r,s),Zm!==null&&Zm(r,s)};var Js=O(null);function Ad(){var r=Js.current;return r!==null?r:Ge.pooledCache}function Cl(r,s){s===null?G(Js,Js.current):G(Js,s.pool)}function Fm(){var r=Ad();return r===null?null:{parent:gt._currentValue,pool:r}}var qi=Error(i(460)),kd=Error(i(474)),xl=Error(i(542)),Nl={then:function(){}};function Gm(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Km(r,s,a){switch(a=r[a],a===void 0?r.push(s):a!==s&&(s.then(wr,wr),s=a),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Jm(r),r;default:if(typeof s.status=="string")s.then(wr,wr);else{if(r=Ge,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(c){if(s.status==="pending"){var h=s;h.status="fulfilled",h.value=c}},function(c){if(s.status==="pending"){var h=s;h.status="rejected",h.reason=c}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Jm(r),r}throw Xs=s,qi}}function Qs(r){try{var s=r._init;return s(r._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Xs=a,qi):a}}var Xs=null;function Ym(){if(Xs===null)throw Error(i(459));var r=Xs;return Xs=null,r}function Jm(r){if(r===qi||r===xl)throw Error(i(483))}var Vi=null,Xa=0;function zl(r){var s=Xa;return Xa+=1,Vi===null&&(Vi=[]),Km(Vi,r,s)}function Wa(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function jl(r,s){throw s.$$typeof===v?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function Qm(r){function s(z,C){if(r){var j=z.deletions;j===null?(z.deletions=[C],z.flags|=16):j.push(C)}}function a(z,C){if(!r)return null;for(;C!==null;)s(z,C),C=C.sibling;return null}function c(z){for(var C=new Map;z!==null;)z.key!==null?C.set(z.key,z):C.set(z.index,z),z=z.sibling;return C}function h(z,C){return z=Er(z,C),z.index=0,z.sibling=null,z}function p(z,C,j){return z.index=j,r?(j=z.alternate,j!==null?(j=j.index,j<C?(z.flags|=67108866,C):j):(z.flags|=67108866,C)):(z.flags|=1048576,C)}function b(z){return r&&z.alternate===null&&(z.flags|=67108866),z}function S(z,C,j,Z){return C===null||C.tag!==6?(C=md(j,z.mode,Z),C.return=z,C):(C=h(C,j),C.return=z,C)}function A(z,C,j,Z){var fe=j.type;return fe===R?B(z,C,j.props.children,Z,j.key):C!==null&&(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===K&&Qs(fe)===C.type)?(C=h(C,j.props),Wa(C,j),C.return=z,C):(C=Rl(j.type,j.key,j.props,null,z.mode,Z),Wa(C,j),C.return=z,C)}function P(z,C,j,Z){return C===null||C.tag!==4||C.stateNode.containerInfo!==j.containerInfo||C.stateNode.implementation!==j.implementation?(C=gd(j,z.mode,Z),C.return=z,C):(C=h(C,j.children||[]),C.return=z,C)}function B(z,C,j,Z,fe){return C===null||C.tag!==7?(C=Fs(j,z.mode,Z,fe),C.return=z,C):(C=h(C,j),C.return=z,C)}function F(z,C,j){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=md(""+C,z.mode,j),C.return=z,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _:return j=Rl(C.type,C.key,C.props,null,z.mode,j),Wa(j,C),j.return=z,j;case w:return C=gd(C,z.mode,j),C.return=z,C;case K:return C=Qs(C),F(z,C,j)}if(Fe(C)||ce(C))return C=Fs(C,z.mode,j,null),C.return=z,C;if(typeof C.then=="function")return F(z,zl(C),j);if(C.$$typeof===x)return F(z,Ol(z,C),j);jl(z,C)}return null}function M(z,C,j,Z){var fe=C!==null?C.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return fe!==null?null:S(z,C,""+j,Z);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case _:return j.key===fe?A(z,C,j,Z):null;case w:return j.key===fe?P(z,C,j,Z):null;case K:return j=Qs(j),M(z,C,j,Z)}if(Fe(j)||ce(j))return fe!==null?null:B(z,C,j,Z,null);if(typeof j.then=="function")return M(z,C,zl(j),Z);if(j.$$typeof===x)return M(z,C,Ol(z,j),Z);jl(z,j)}return null}function $(z,C,j,Z,fe){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return z=z.get(j)||null,S(C,z,""+Z,fe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case _:return z=z.get(Z.key===null?j:Z.key)||null,A(C,z,Z,fe);case w:return z=z.get(Z.key===null?j:Z.key)||null,P(C,z,Z,fe);case K:return Z=Qs(Z),$(z,C,j,Z,fe)}if(Fe(Z)||ce(Z))return z=z.get(j)||null,B(C,z,Z,fe,null);if(typeof Z.then=="function")return $(z,C,j,zl(Z),fe);if(Z.$$typeof===x)return $(z,C,j,Ol(C,Z),fe);jl(C,Z)}return null}function ne(z,C,j,Z){for(var fe=null,je=null,ae=C,Se=C=0,Oe=null;ae!==null&&Se<j.length;Se++){ae.index>Se?(Oe=ae,ae=null):Oe=ae.sibling;var Pe=M(z,ae,j[Se],Z);if(Pe===null){ae===null&&(ae=Oe);break}r&&ae&&Pe.alternate===null&&s(z,ae),C=p(Pe,C,Se),je===null?fe=Pe:je.sibling=Pe,je=Pe,ae=Oe}if(Se===j.length)return a(z,ae),Ce&&Tr(z,Se),fe;if(ae===null){for(;Se<j.length;Se++)ae=F(z,j[Se],Z),ae!==null&&(C=p(ae,C,Se),je===null?fe=ae:je.sibling=ae,je=ae);return Ce&&Tr(z,Se),fe}for(ae=c(ae);Se<j.length;Se++)Oe=$(ae,z,Se,j[Se],Z),Oe!==null&&(r&&Oe.alternate!==null&&ae.delete(Oe.key===null?Se:Oe.key),C=p(Oe,C,Se),je===null?fe=Oe:je.sibling=Oe,je=Oe);return r&&ae.forEach(function(_s){return s(z,_s)}),Ce&&Tr(z,Se),fe}function me(z,C,j,Z){if(j==null)throw Error(i(151));for(var fe=null,je=null,ae=C,Se=C=0,Oe=null,Pe=j.next();ae!==null&&!Pe.done;Se++,Pe=j.next()){ae.index>
vendor: 3,431 bytes, line 9
9Se?(Oe=ae,ae=null):Oe=ae.sibling;var _s=M(z,ae,Pe.value,Z);if(_s===null){ae===null&&(ae=Oe);break}r&&ae&&_s.alternate===null&&s(z,ae),C=p(_s,C,Se),je===null?fe=_s:je.sibling=_s,je=_s,ae=Oe}if(Pe.done)return a(z,ae),Ce&&Tr(z,Se),fe;if(ae===null){for(;!Pe.done;Se++,Pe=j.next())Pe=F(z,Pe.value,Z),Pe!==null&&(C=p(Pe,C,Se),je===null?fe=Pe:je.sibling=Pe,je=Pe);return Ce&&Tr(z,Se),fe}for(ae=c(ae);!Pe.done;Se++,Pe=j.next())Pe=$(ae,z,Se,Pe.value,Z),Pe!==null&&(r&&Pe.alternate!==null&&ae.delete(Pe.key===null?Se:Pe.key),C=p(Pe,C,Se),je===null?fe=Pe:je.sibling=Pe,je=Pe);return r&&ae.forEach(function(z1){return s(z,z1)}),Ce&&Tr(z,Se),fe}function Ve(z,C,j,Z){if(typeof j=="object"&&j!==null&&j.type===R&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case _:e:{for(var fe=j.key;C!==null;){if(C.key===fe){if(fe=j.type,fe===R){if(C.tag===7){a(z,C.sibling),Z=h(C,j.props.children),Z.return=z,z=Z;break e}}else if(C.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===K&&Qs(fe)===C.type){a(z,C.sibling),Z=h(C,j.props),Wa(Z,j),Z.return=z,z=Z;break e}a(z,C);break}else s(z,C);C=C.sibling}j.type===R?(Z=Fs(j.props.children,z.mode,Z,j.key),Z.return=z,z=Z):(Z=Rl(j.type,j.key,j.props,null,z.mode,Z),Wa(Z,j),Z.return=z,z=Z)}return b(z);case w:e:{for(fe=j.key;C!==null;){if(C.key===fe)if(C.tag===4&&C.stateNode.containerInfo===j.containerInfo&&C.stateNode.implementation===j.implementation){a(z,C.sibling),Z=h(C,j.children||[]),Z.return=z,z=Z;break e}else{a(z,C);break}else s(z,C);C=C.sibling}Z=gd(j,z.mode,Z),Z.return=z,z=Z}return b(z);case K:return j=Qs(j),Ve(z,C,j,Z)}if(Fe(j))return ne(z,C,j,Z);if(ce(j)){if(fe=ce(j),typeof fe!="function")throw Error(i(150));return j=fe.call(j),me(z,C,j,Z)}if(typeof j.then=="function")return Ve(z,C,zl(j),Z);if(j.$$typeof===x)return Ve(z,C,Ol(z,j),Z);jl(z,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,C!==null&&C.tag===6?(a(z,C.sibling),Z=h(C,j),Z.return=z,z=Z):(a(z,C),Z=md(j,z.mode,Z),Z.return=z,z=Z),b(z)):a(z,C)}return function(z,C,j,Z){try{Xa=0;var fe=Ve(z,C,j,Z);return Vi=null,fe}catch(ae){if(ae===qi||ae===xl)throw ae;var je=bn(29,ae,null,z.mode);return je.lanes=Z,je.return=z,je}}}var Ws=Qm(!0),Xm=Qm(!1),rs=!1;function Od(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cd(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ss(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function is(r,s,a){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Me&2)!==0){var h=c.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s,s=Tl(r),Lm(r,null,a),s}return El(r,c,s,a),Tl(r)}function eo(r,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=r.pendingLanes,a|=c,s.lanes=a,en(r,a)}}function xd(r,s){var a=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?h=p=b:p=p.next=b,a=a.next}while(a!==null);p===null?h=p=s:p=p.next=s}else h=p=s;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},r.updateQueue=a;return}
vendor: 4,196 bytes, line 9
9r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=s:r.next=s,a.lastBaseUpdate=s}var Nd=!1;function to(){if(Nd){var r=Hi;if(r!==null)throw r}}function no(r,s,a,c){Nd=!1;var h=r.updateQueue;rs=!1;var p=h.firstBaseUpdate,b=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var A=S,P=A.next;A.next=null,b===null?p=P:b.next=P,b=A;var B=r.alternate;B!==null&&(B=B.updateQueue,S=B.lastBaseUpdate,S!==b&&(S===null?B.firstBaseUpdate=P:S.next=P,B.lastBaseUpdate=A))}if(p!==null){var F=h.baseState;b=0,B=P=A=null,S=p;do{var M=S.lane&-536870913,$=M!==S.lane;if($?(ke&M)===M:(c&M)===M){M!==0&&M===Bi&&(Nd=!0),B!==null&&(B=B.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ne=r,me=S;M=s;var Ve=a;switch(me.tag){case 1:if(ne=me.payload,typeof ne=="function"){F=ne.call(Ve,F,M);break e}F=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=me.payload,M=typeof ne=="function"?ne.call(Ve,F,M):ne,M==null)break e;F=g({},F,M);break e;case 2:rs=!0}}M=S.callback,M!==null&&(r.flags|=64,$&&(r.flags|=8192),$=h.callbacks,$===null?h.callbacks=[M]:$.push(M))}else $={lane:M,tag:S.tag,payload:S.payload,callback:S.callback,next:null},B===null?(P=B=$,A=F):B=B.next=$,b|=M;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;$=S,S=$.next,$.next=null,h.lastBaseUpdate=$,h.shared.pending=null}}while(!0);B===null&&(A=F),h.baseState=A,h.firstBaseUpdate=P,h.lastBaseUpdate=B,p===null&&(h.shared.lanes=0),us|=b,r.lanes=b,r.memoizedState=F}}function Wm(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function eg(r,s){var a=r.callbacks;if(a!==null)for(r.callbacks=null,r=0;r<a.length;r++)Wm(a[r],s)}var Zi=O(null),Pl=O(0);function tg(r,s){r=Lr,G(Pl,r),G(Zi,s),Lr=r|s.baseLanes}function zd(){G(Pl,Lr),G(Zi,Zi.current)}function jd(){Lr=Pl.current,V(Zi),V(Pl)}var _n=O(null),$n=null;function as(r){var s=r.alternate;G(pt,pt.current&1),G(_n,r),$n===null&&(s===null||Zi.current!==null||s.memoizedState!==null)&&($n=r)}function Pd(r){G(pt,pt.current),G(_n,r),$n===null&&($n=r)}function ng(r){r.tag===22?(G(pt,pt.current),G(_n,r),$n===null&&($n=r)):os()}function os(){G(pt,pt.current),G(_n,_n.current)}function wn(r){V(_n),$n===r&&($n=null),V(pt)}var pt=O(0);function Ll(r){for(var s=r;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Uh(a)||Bh(a)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var kr=0,we=null,He=null,yt=null,Ml=!1,Fi=!1,ei=!1,Dl=0,ro=0,Gi=null,ST=0;function ct(){throw Error(i(321))}function Ld(r,s){if(s===null)return!1;for(var a=0;a<s.length&&a<r.length;a++)if(!vn(r[a],s[a]))return!1;return!0}function Md(r,s,a,c,h,p){return kr=p,we=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=r===null||r.memoizedState===null?Ig:Qd,ei=!1,p=a(c,h),ei=!1,Fi&&(p=sg(s,a,c,h)),rg(r),p}function rg(r){L.H=ao;var s=He!==null&&He.next!==null;if(kr=0,yt=He=we=null,Ml=!1,ro=0,Gi=null,s)throw Error(i(300));r===null||vt||(r=r.dependencies,r!==null&&kl(r)&&(vt=!0))}function sg(r,s,a,c){we=r;var h=0;do{if(Fi&&(Gi=null),ro=0,Fi=!1,25<=h)throw Error(i(301));if(h+=1,yt=He=null,r.updateQueue!=null){var p=r.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}L.H=Ug,p=s(a,c)}while(Fi);return p}function ET(){var r=L.H,s=r.useState()[0];return s=typeof s.then=="function"?so(s):s,r=r.useState()[0],(He!==null?He.memoizedState:null)!==r&&(we.flags|=1024),s}function Dd(){var r=Dl!==0;return Dl=0,r}function $d(r,s,a){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~a}function Id(r){if(Ml){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ml=!1}kr=0,yt=He=we=null,Fi=!1,ro=Dl=0,Gi=null}function Zt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?we.memoizedState=yt=r:yt=yt.next=r,yt}
vendor: 8,059 bytes, line 9
9function mt(){if(He===null){var r=we.alternate;r=r!==null?r.memoizedState:null}else r=He.next;var s=yt===null?we.memoizedState:yt.next;if(s!==null)yt=s,He=r;else{if(r===null)throw we.alternate===null?Error(i(467)):Error(i(310));He=r,r={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},yt===null?we.memoizedState=yt=r:yt=yt.next=r}return yt}function $l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function so(r){var s=ro;return ro+=1,Gi===null&&(Gi=[]),r=Km(Gi,r,s),s=we,(yt===null?s.memoizedState:yt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?Ig:Qd),r}function Il(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return so(r);if(r.$$typeof===x)return Pt(r)}throw Error(i(438,String(r)))}function Ud(r){var s=null,a=we.updateQueue;if(a!==null&&(s=a.memoCache),s==null){var c=we.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(s={data:c.data.map(function(h){return h.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),a===null&&(a=$l(),we.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(r),c=0;c<r;c++)a[c]=le;return s.index++,a}function Or(r,s){return typeof s=="function"?s(r):s}function Ul(r){var s=mt();return Bd(s,He,r)}function Bd(r,s,a){var c=r.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=a;var h=r.baseQueue,p=c.pending;if(p!==null){if(h!==null){var b=h.next;h.next=p.next,p.next=b}s.baseQueue=h=p,c.pending=null}if(p=r.baseState,h===null)r.memoizedState=p;else{s=h.next;var S=b=null,A=null,P=s,B=!1;do{var F=P.lane&-536870913;if(F!==P.lane?(ke&F)===F:(kr&F)===F){var M=P.revertLane;if(M===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),F===Bi&&(B=!0);else if((kr&M)===M){P=P.next,M===Bi&&(B=!0);continue}else F={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},A===null?(S=A=F,b=p):A=A.next=F,we.lanes|=M,us|=M;F=P.action,ei&&a(p,F),p=P.hasEagerState?P.eagerState:a(p,F)}else M={lane:F,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},A===null?(S=A=M,b=p):A=A.next=M,we.lanes|=F,us|=F;P=P.next}while(P!==null&&P!==s);if(A===null?b=p:A.next=S,!vn(p,r.memoizedState)&&(vt=!0,B&&(a=Hi,a!==null)))throw a;r.memoizedState=p,r.baseState=b,r.baseQueue=A,c.lastRenderedState=p}return h===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Hd(r){var s=mt(),a=s.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=r;var c=a.dispatch,h=a.pending,p=s.memoizedState;if(h!==null){a.pending=null;var b=h=h.next;do p=r(p,b.action),b=b.next;while(b!==h);vn(p,s.memoizedState)||(vt=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),a.lastRenderedState=p}return[p,c]}function ig(r,s,a){var c=we,h=mt(),p=Ce;if(p){if(a===void 0)throw Error(i(407));a=a()}else a=s();var b=!vn((He||h).memoizedState,a);if(b&&(h.memoizedState=a,vt=!0),h=h.queue,Zd(lg.bind(null,c,h,r),[r]),h.getSnapshot!==s||b||yt!==null&&yt.memoizedState.tag&1){if(c.flags|=2048,Ki(9,{destroy:void 0},og.bind(null,c,h,a,s),null),Ge===null)throw Error(i(349));p||(kr&127)!==0||ag(c,s,a)}return a}function ag(r,s,a){r.flags|=16384,r={getSnapshot:s,value:a},s=we.updateQueue,s===null?(s=$l(),we.updateQueue=s,s.stores=[r]):(a=s.stores,a===null?s.stores=[r]:a.push(r))}function og(r,s,a,c){s.value=a,s.getSnapshot=c,cg(s)&&ug(r)}function lg(r,s,a){return a(function(){cg(s)&&ug(r)})}function cg(r){var s=r.getSnapshot;r=r.value;try{var a=s();return!vn(r,a)}catch{return!0}}function ug(r){var s=Zs(r,2);s!==null&&cn(s,r,2)}function qd(r){var s=Zt();if(typeof r=="function"){var a=r;if(r=a(),ei){Vn(!0);try{a()}finally{Vn(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:r},s}function dg(r,s,a,c){return r.baseState=a,Bd(r,He,typeof c=="function"?c:Or)}function TT(r,s,a,c,h){if(ql(r))throw Error(i(485));if(r=s.action,r!==null){var p={payload:h,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){p.listeners.push(b)}};L.T!==null?a(!0):p.isTransition=!1,c(p),a=s.pending,a===null?(p.next=s.pending=p,hg(s,p)):(p.next=a.next,s.pending=a.next=p)}}function hg(r,s){var a=s.action,c=s.payload,h=r.state;if(s.isTransition){var p=L.T,b={};L.T=b;try{var S=a(h,c),A=L.S;A!==null&&A(b,S),fg(r,s,S)}catch(P){Vd(r,s,P)}finally{p!==null&&b.types!==null&&(p.types=b.types),L.T=p}}else try{p=a(h,c),fg(r,s,p)}catch(P){Vd(r,s,P)}}function fg(r,s,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){pg(r,s,c)},function(c){return Vd(r,s,c)}):pg(r,s,a)}function pg(r,s,a){s.status="fulfilled",s.value=a,mg(s),r.state=a,s=r.pending,s!==null&&(a=s.next,a===s?r.pending=null:(a=a.next,s.next=a,hg(r,a)))}function Vd(r,s,a){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do s.status="rejected",s.reason=a,mg(s),s=s.next;while(s!==c)}r.action=null}function mg(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function gg(r,s){return s}function yg(r,s){if(Ce){var a=Ge.formState;if(a!==null){e:{var c=we;if(Ce){if(Qe){t:{for(var h=Qe,p=Dn;h.nodeType!==8;){if(!p){h=null;break t}if(h=In(h.nextSibling),h===null){h=null;break t}}p=h.data,h=p==="F!"||p==="F"?h:null}if(h){Qe=In(h.nextSibling),c=h.data==="F!";break e}}ts(c)}c=!1}c&&(s=a[0])}}return a=Zt(),a.memoizedState=a.baseState=s,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gg,lastRenderedState:s},a.queue=c,a=Mg.bind(null,we,c),c.dispatch=a,c=qd(!1),p=Jd.bind(null,we,!1,c.queue),c=Zt(),h={state:s,dispatch:null,action:r,pending:null},c.queue=h,a=TT.bind(null,we,h,p,a),h.dispatch=a,c.memoizedState=r,[s,a,!1]}function vg(r){var s=mt();return bg(s,He,r)}function bg(r,s,a){if(s=Bd(r,s,gg)[0],r=Ul(Or)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var c=so(s)}catch(b){throw b===qi?xl:b}else c=s;s=mt();var h=s.queue,p=h.dispatch;return a!==s.memoizedState&&(we.flags|=2048,Ki(9,{destroy:void 0},RT.bind(null,h,a),null)),[c,p,r]}function RT(r,s){r.action=s}function _g(r){var s=mt(),a=He;if(a!==null)return bg(s,a,r);mt(),s=s.memoizedState,a=mt();var c=a.queue.dispatch;return a.memoizedState=r,[s,c,!1]}function Ki(r,s,a,c){return r={tag:r,create:a,deps:c,inst:s,next:null},s=we.updateQueue,s===null&&(s=$l(),we.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=r.next=r:(c=a.next,a.next=r,r.next=c,s.lastEffect=r),r}function wg(){return mt().memoizedState}function Bl(r,s,a,c){var h=Zt();we.flags|=r,h.memoizedState=Ki(1|s,{destroy:void 0},a,c===void 0?null:c)}function Hl(r,s,a,c){var h=mt();c=c===void 0?null:c;var p=h.memoizedState.inst;He!==null&&c!==null&&Ld(c,He.memoizedState.deps)?h.memoizedState=Ki(s,p,a,c):(we.flags|=r,h.memoizedState=Ki(1|s,p,a,c))}function Sg(r,s){Bl(8390656,8,r,s)}function Zd(r,s){Hl(2048,8,r,s)}function AT(r){we.flags|=4;var s=we.updateQueue;if(s===null)s=$l(),we.updateQueue=s,s.events=[r];else{var a=s.events;a===null?s.events=[r]:a.push(r)}}function Eg(r){var s=mt().memoizedState;return AT({ref:s,nextImpl:r}),function(){if((Me&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function Tg(r,s){return Hl(4,2,r,s)}function Rg(r,s){return Hl(4,4,r,s)}function Ag(r,s){if(typeof s=="function"){r=r();var a=s(r);return function(){typeof a=="function"?a():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function kg(r,s,a){a=a!=null?a.concat([r]):null,Hl(4,4,Ag.bind(null,s,r),a)}function Fd(){}function Og(r,s){var a=mt();s=s===void 0?null:s;var c=a.memoizedState;return s!==null&&Ld(s,c[1])?c[0]:(a.memoizedState=[r,s],r)}function Cg(r,s){var a=mt();s=s===void 0?null:s;var c=a.memoizedState;if(s!==null&&Ld(s,c[1]))return c[0];if(c=r(),ei){Vn(!0);try{r()}finally{Vn(!1)}}return a.memoizedState=[c,s],c}function Gd(r,s,a){return a===void 0||(kr&1073741824)!==0&&(ke&261930)===0?r.memoizedState=s:(r.memoizedState=a,r=xy(),we.lanes|=r,us|=r,a)}
vendor: 6,015 bytes, line 9
9function xg(r,s,a,c){return vn(a,s)?a:Zi.current!==null?(r=Gd(r,a,c),vn(r,s)||(vt=!0),r):(kr&42)===0||(kr&1073741824)!==0&&(ke&261930)===0?(vt=!0,r.memoizedState=a):(r=xy(),we.lanes|=r,us|=r,s)}function Ng(r,s,a,c,h){var p=Y.p;Y.p=p!==0&&8>p?p:8;var b=L.T,S={};L.T=S,Jd(r,!1,s,a);try{var A=h(),P=L.S;if(P!==null&&P(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var B=wT(A,c);io(r,s,B,Tn(r))}else io(r,s,c,Tn(r))}catch(F){io(r,s,{then:function(){},status:"rejected",reason:F},Tn())}finally{Y.p=p,b!==null&&S.types!==null&&(b.types=S.types),L.T=b}}function kT(){}function Kd(r,s,a,c){if(r.tag!==5)throw Error(i(476));var h=zg(r).queue;Ng(r,h,s,se,a===null?kT:function(){return jg(r),a(c)})}function zg(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:se},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:a},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function jg(r){var s=zg(r);s.next===null&&(s=r.alternate.memoizedState),io(r,s.next.queue,{},Tn())}function Yd(){return Pt(Eo)}function Pg(){return mt().memoizedState}function Lg(){return mt().memoizedState}function OT(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var a=Tn();r=ss(a);var c=is(s,r,a);c!==null&&(cn(c,s,a),eo(c,s,a)),s={cache:Td()},r.payload=s;return}s=s.return}}function CT(r,s,a){var c=Tn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ql(r)?Dg(s,a):(a=fd(r,s,a,c),a!==null&&(cn(a,r,c),$g(a,s,c)))}function Mg(r,s,a){var c=Tn();io(r,s,a,c)}function io(r,s,a,c){var h={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ql(r))Dg(s,h);else{var p=r.alternate;if(r.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var b=s.lastRenderedState,S=p(b,a);if(h.hasEagerState=!0,h.eagerState=S,vn(S,b))return El(r,s,h,0),Ge===null&&Sl(),!1}catch{}if(a=fd(r,s,h,c),a!==null)return cn(a,r,c),$g(a,s,c),!0}return!1}function Jd(r,s,a,c){if(c={lane:2,revertLane:Oh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},ql(r)){if(s)throw Error(i(479))}else s=fd(r,a,c,2),s!==null&&cn(s,r,2)}function ql(r){var s=r.alternate;return r===we||s!==null&&s===we}function Dg(r,s){Fi=Ml=!0;var a=r.pending;a===null?s.next=s:(s.next=a.next,a.next=s),r.pending=s}function $g(r,s,a){if((a&4194048)!==0){var c=s.lanes;c&=r.pendingLanes,a|=c,s.lanes=a,en(r,a)}}var ao={readContext:Pt,use:Il,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};ao.useEffectEvent=ct;var Ig={readContext:Pt,use:Il,useCallback:function(r,s){return Zt().memoizedState=[r,s===void 0?null:s],r},useContext:Pt,useEffect:Sg,useImperativeHandle:function(r,s,a){a=a!=null?a.concat([r]):null,Bl(4194308,4,Ag.bind(null,s,r),a)},useLayoutEffect:function(r,s){return Bl(4194308,4,r,s)},useInsertionEffect:function(r,s){Bl(4,2,r,s)},useMemo:function(r,s){var a=Zt();s=s===void 0?null:s;var c=r();if(ei){Vn(!0);try{r()}finally{Vn(!1)}}return a.memoizedState=[c,s],c},useReducer:function(r,s,a){var c=Zt();if(a!==void 0){var h=a(s);if(ei){Vn(!0);try{a(s)}finally{Vn(!1)}}}else h=s;return c.memoizedState=c.baseState=h,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:h},c.queue=r,r=r.dispatch=CT.bind(null,we,r),[c.memoizedState,r]},useRef:function(r){var s=Zt();return r={current:r},s.memoizedState=r},useState:function(r){r=qd(r);var s=r.queue,a=Mg.bind(null,we,s);return s.dispatch=a,[r.memoizedState,a]},useDebugValue:Fd,useDeferredValue:function(r,s){var a=Zt();return Gd(a,r,s)},useTransition:function(){var r=qd(!1);return r=Ng.bind(null,we,r.queue,!0,!1),Zt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,a){var c=we,h=Zt();if(Ce){if(a===void 0)throw Error(i(407));a=a()}else{if(a=s(),Ge===null)throw Error(i(349));(ke&127)!==0||ag(c,s,a)}h.memoizedState=a;var p={value:a,getSnapshot:s};return h.queue=p,Sg(lg.bind(null,c,p,r),[r]),c.flags|=2048,Ki(9,{destroy:void 0},og.bind(null,c,p,a,s),null),a},useId:function(){var r=Zt(),s=Ge.identifierPrefix;if(Ce){var a=ar,c=ir;a=(c&~(1<<32-Ut(c)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Dl++,0<a&&(s+="H"+a.toString(32)),s+="_"}else a=ST++,s="_"+s+"r_"+a.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Yd,useFormState:yg,useActionState:yg,useOptimistic:function(r){var s=Zt();s.memoizedState=s.baseState=r;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=Jd.bind(null,we,!0,a),a.dispatch=s,[r,s]},useMemoCache:Ud,useCacheRefresh:function(){return Zt().memoizedState=OT.bind(null,we)},useEffectEvent:function(r){var s=Zt(),a={impl:r};return s.memoizedState=a,function(){if((Me&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Qd={readContext:Pt,use:Il,useCallback:Og,useContext:Pt,useEffect:Zd,useImperativeHandle:kg,useInsertionEffect:Tg,useLayoutEffect:Rg,useMemo:Cg,useReducer:Ul,useRef:wg,useState:function(){return Ul(Or)},useDebugValue:Fd,useDeferredValue:function(r,s){var a=mt();return xg(a,He.memoizedState,r,s)},useTransition:function(){var r=Ul(Or)[0],s=mt().memoizedState;return[typeof r=="boolean"?r:so(r),s]},useSyncExternalStore:ig,useId:Pg,useHostTransitionStatus:Yd,useFormState:vg,useActionState:vg,useOptimistic:function(r,s){var a=mt();return dg(a,He,r,s)},useMemoCache:Ud,useCacheRefresh:Lg};Qd.useEffectEvent=Eg;var Ug={readContext:Pt,use:Il,useCallback:Og,useContext:Pt,useEffect:Zd,useImperativeHandle:kg,useInsertionEffect:Tg,useLayoutEffect:Rg,useMemo:Cg,useReducer:Hd,useRef
vendor: 4,153 bytes, line 9
9:wg,useState:function(){return Hd(Or)},useDebugValue:Fd,useDeferredValue:function(r,s){var a=mt();return He===null?Gd(a,r,s):xg(a,He.memoizedState,r,s)},useTransition:function(){var r=Hd(Or)[0],s=mt().memoizedState;return[typeof r=="boolean"?r:so(r),s]},useSyncExternalStore:ig,useId:Pg,useHostTransitionStatus:Yd,useFormState:_g,useActionState:_g,useOptimistic:function(r,s){var a=mt();return He!==null?dg(a,He,r,s):(a.baseState=r,[r,a.queue.dispatch])},useMemoCache:Ud,useCacheRefresh:Lg};Ug.useEffectEvent=Eg;function Xd(r,s,a,c){s=r.memoizedState,a=a(c,s),a=a==null?s:g({},s,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var Wd={enqueueSetState:function(r,s,a){r=r._reactInternals;var c=Tn(),h=ss(c);h.payload=s,a!=null&&(h.callback=a),s=is(r,h,c),s!==null&&(cn(s,r,c),eo(s,r,c))},enqueueReplaceState:function(r,s,a){r=r._reactInternals;var c=Tn(),h=ss(c);h.tag=1,h.payload=s,a!=null&&(h.callback=a),s=is(r,h,c),s!==null&&(cn(s,r,c),eo(s,r,c))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var a=Tn(),c=ss(a);c.tag=2,s!=null&&(c.callback=s),s=is(r,c,a),s!==null&&(cn(s,r,a),eo(s,r,a))}};function Bg(r,s,a,c,h,p,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,p,b):s.prototype&&s.prototype.isPureReactComponent?!Fa(a,c)||!Fa(h,p):!0}function Hg(r,s,a,c){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,c),s.state!==r&&Wd.enqueueReplaceState(s,s.state,null)}function ti(r,s){var a=s;if("ref"in s){a={};for(var c in s)c!=="ref"&&(a[c]=s[c])}if(r=r.defaultProps){a===s&&(a=g({},a));for(var h in r)a[h]===void 0&&(a[h]=r[h])}return a}function qg(r){wl(r)}function Vg(r){console.error(r)}function Zg(r){wl(r)}function Vl(r,s){try{var a=r.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(c){setTimeout(function(){throw c})}}function Fg(r,s,a){try{var c=r.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function eh(r,s,a){return a=ss(a),a.tag=3,a.payload={element:null},a.callback=function(){Vl(r,s)},a}function Gg(r){return r=ss(r),r.tag=3,r}function Kg(r,s,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var p=c.value;r.payload=function(){return h(p)},r.callback=function(){Fg(s,a,c)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(r.callback=function(){Fg(s,a,c),typeof h!="function"&&(ds===null?ds=new Set([this]):ds.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function xT(r,s,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(s=a.alternate,s!==null&&Ui(s,a,h,!0),a=_n.current,a!==null){switch(a.tag){case 31:case 13:return $n===null?nc():a.alternate===null&&ut===0&&(ut=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===Nl?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([c]):s.add(c),Rh(r,c,h)),!1;case 22:return a.flags|=65536,c===Nl?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([c]):a.add(c)),Rh(r,c,h)),!1}throw Error(i(435,a.tag))}return Rh(r,c,h),nc(),!1}if(Ce)return s=_n.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=h,c!==bd&&(r=Error(i(422),{cause:c}),Ya(Pn(r,a)))):(c!==bd&&(s=Error(i(423),{cause:c}),Ya(Pn(s,a))),r=r.current.alternate,r.flags|=65536,h&=-h,r.lanes|=h,c=Pn(c,a),h=eh(r.stateNode,c,h),xd(r,h),ut!==4&&(ut=2)),!1;var p=Error(i(520),{cause:c});if(p=Pn(p,a),mo===null?mo=[p]:mo.push(p),ut!==4&&(ut=2),s===null)return!0;c=Pn(c,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,r=h&-h,a.lanes|=r,r=eh(a.stateNode,c,r),xd(a,r),!1;case 1:if(s=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ds===null||!ds.has(p))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Gg(h),Kg(h,r,a,c),xd(a,h),!1}a=a.return}while(a!==null);return!1}var th=Error(i(461)),vt=!1;
vendor: 4,173 bytes, line 9
9function Lt(r,s,a,c){s.child=r===null?Xm(s,null,a,c):Ws(s,r.child,a,c)}function Yg(r,s,a,c,h){a=a.render;var p=s.ref;if("ref"in c){var b={};for(var S in c)S!=="ref"&&(b[S]=c[S])}else b=c;return Ys(s),c=Md(r,s,a,b,p,h),S=Dd(),r!==null&&!vt?($d(r,s,h),Cr(r,s,h)):(Ce&&S&&yd(s),s.flags|=1,Lt(r,s,c,h),s.child)}function Jg(r,s,a,c,h){if(r===null){var p=a.type;return typeof p=="function"&&!pd(p)&&p.defaultProps===void 0&&a.compare===null?(s.tag=15,s.type=p,Qg(r,s,p,c,h)):(r=Rl(a.type,null,c,s,s.mode,h),r.ref=s.ref,r.return=s,s.child=r)}if(p=r.child,!ch(r,h)){var b=p.memoizedProps;if(a=a.compare,a=a!==null?a:Fa,a(b,c)&&r.ref===s.ref)return Cr(r,s,h)}return s.flags|=1,r=Er(p,c),r.ref=s.ref,r.return=s,s.child=r}function Qg(r,s,a,c,h){if(r!==null){var p=r.memoizedProps;if(Fa(p,c)&&r.ref===s.ref)if(vt=!1,s.pendingProps=c=p,ch(r,h))(r.flags&131072)!==0&&(vt=!0);else return s.lanes=r.lanes,Cr(r,s,h)}return nh(r,s,a,c,h)}function Xg(r,s,a,c){var h=c.children,p=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|a:a,r!==null){for(c=s.child=r.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~p}else c=0,s.child=null;return Wg(r,s,p,a,c)}if((a&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&Cl(s,p!==null?p.cachePool:null),p!==null?tg(s,p):zd(),ng(s);else return c=s.lanes=536870912,Wg(r,s,p!==null?p.baseLanes|a:a,a,c)}else p!==null?(Cl(s,p.cachePool),tg(s,p),os(),s.memoizedState=null):(r!==null&&Cl(s,null),zd(),os());return Lt(r,s,h,a),s.child}function oo(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Wg(r,s,a,c,h){var p=Ad();return p=p===null?null:{parent:gt._currentValue,pool:p},s.memoizedState={baseLanes:a,cachePool:p},r!==null&&Cl(s,null),zd(),ng(s),r!==null&&Ui(r,s,c,!0),s.childLanes=h,null}function Zl(r,s){return s=Gl({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function ey(r,s,a){return Ws(s,r.child,null,a),r=Zl(s,s.pendingProps),r.flags|=2,wn(s),s.memoizedState=null,r}function NT(r,s,a){var c=s.pendingProps,h=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(Ce){if(c.mode==="hidden")return r=Zl(s,c),s.lanes=536870912,oo(null,r);if(Pd(s),(r=Qe)?(r=hv(r,Dn),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Wr!==null?{id:ir,overflow:ar}:null,retryLane:536870912,hydrationErrors:null},a=Dm(r),a.return=s,s.child=a,jt=s,Qe=null)):r=null,r===null)throw ts(s);return s.lanes=536870912,null}return Zl(s,c)}var p=r.memoizedState;if(p!==null){var b=p.dehydrated;if(Pd(s),h)if(s.flags&256)s.flags&=-257,s=ey(r,s,a);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(vt||Ui(r,s,a,!1),h=(a&r.childLanes)!==0,vt||h){if(c=Ge,c!==null&&(b=tn(c,a),b!==0&&b!==p.retryLane))throw p.retryLane=b,Zs(r,b),cn(c,r,b),th;nc(),s=ey(r,s,a)}else r=p.treeContext,Qe=In(b.nextSibling),jt=s,Ce=!0,es=null,Dn=!1,r!==null&&Um(s,r),s=Zl(s,c),s.flags|=4096;return s}return r=Er(r.child,{mode:c.mode,children:c.children}),r.ref=s.ref,s.child=r,r.return=s,r}function Fl(r,s){var a=s.ref;if(a===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(r===null||r.ref!==a)&&(s.flags|=4194816)}}function nh(r,s,a,c,h){return Ys(s),a=Md(r,s,a,c,void 0,h),c=Dd(),r!==null&&!vt?($d(r,s,h),Cr(r,s,h)):(Ce&&c&&yd(s),s.flags|=1,Lt(r,s,a,h),s.child)}function ty(r,s,a,c,h,p){return Ys(s),s.updateQueue=null,a=sg(s,c,a,h),rg(r),c=Dd(),r!==null&&!vt?($d(r,s,p),Cr(r,s,p)):(Ce&&c&&yd(s),s.flags|=1,Lt(r,s,a,p),s.child)}function ny(r,s,a,c,h){if(Ys(s),s.stateNode===null){var p=Mi,b=a.contextType;typeof b=="object"&&b!==null&&(p=Pt(b)),p=new a(c,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Wd,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=c,p.state=s.memoizedState,p.refs={},Od(s),b=a.contextType,p.context=typeof b=="object"&&b!==null?Pt(b):Mi,p.state=s.memoizedState,b
vendor: 10,929 bytes, line 9
9=a.getDerivedStateFromProps,typeof b=="function"&&(Xd(s,a,b,c),p.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(b=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),b!==p.state&&Wd.enqueueReplaceState(p,p.state,null),no(s,c,p,h),to(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!0}else if(r===null){p=s.stateNode;var S=s.memoizedProps,A=ti(a,S);p.props=A;var P=p.context,B=a.contextType;b=Mi,typeof B=="object"&&B!==null&&(b=Pt(B));var F=a.getDerivedStateFromProps;B=typeof F=="function"||typeof p.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,B||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S||P!==b)&&Hg(s,p,c,b),rs=!1;var M=s.memoizedState;p.state=M,no(s,c,p,h),to(),P=s.memoizedState,S||M!==P||rs?(typeof F=="function"&&(Xd(s,a,F,c),P=s.memoizedState),(A=rs||Bg(s,a,A,c,M,P,b))?(B||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=P),p.props=c,p.state=P,p.context=b,c=A):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{p=s.stateNode,Cd(r,s),b=s.memoizedProps,B=ti(a,b),p.props=B,F=s.pendingProps,M=p.context,P=a.contextType,A=Mi,typeof P=="object"&&P!==null&&(A=Pt(P)),S=a.getDerivedStateFromProps,(P=typeof S=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(b!==F||M!==A)&&Hg(s,p,c,A),rs=!1,M=s.memoizedState,p.state=M,no(s,c,p,h),to();var $=s.memoizedState;b!==F||M!==$||rs||r!==null&&r.dependencies!==null&&kl(r.dependencies)?(typeof S=="function"&&(Xd(s,a,S,c),$=s.memoizedState),(B=rs||Bg(s,a,B,c,M,$,A)||r!==null&&r.dependencies!==null&&kl(r.dependencies))?(P||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,$,A),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,$,A)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||b===r.memoizedProps&&M===r.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===r.memoizedProps&&M===r.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=$),p.props=c,p.state=$,p.context=A,c=B):(typeof p.componentDidUpdate!="function"||b===r.memoizedProps&&M===r.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===r.memoizedProps&&M===r.memoizedState||(s.flags|=1024),c=!1)}return p=c,Fl(r,s),c=(s.flags&128)!==0,p||c?(p=s.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,r!==null&&c?(s.child=Ws(s,r.child,null,h),s.child=Ws(s,null,a,h)):Lt(r,s,a,h),s.memoizedState=p.state,r=s.child):r=Cr(r,s,h),r}function ry(r,s,a,c){return Gs(),s.flags|=256,Lt(r,s,a,c),s.child}var rh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sh(r){return{baseLanes:r,cachePool:Fm()}}function ih(r,s,a){return r=r!==null?r.childLanes&~a:0,s&&(r|=En),r}function sy(r,s,a){var c=s.pendingProps,h=!1,p=(s.flags&128)!==0,b;if((b=p)||(b=r!==null&&r.memoizedState===null?!1:(pt.current&2)!==0),b&&(h=!0,s.flags&=-129),b=(s.flags&32)!==0,s.flags&=-33,r===null){if(Ce){if(h?as(s):os(),(r=Qe)?(r=hv(r,Dn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Wr!==null?{id:ir,overflow:ar}:null,retryLane:536870912,hydrationErrors:null},a=Dm(r),a.return=s,s.child=a,jt=s,Qe=null)):r=null,r===null)throw ts(s);return Bh(r)?s.lanes=32:s.lanes=536870912,null}var S=c.children;return c=c.fallback,h?(os(),h=s.mode,S=Gl({mode:"hidden",children:S},h),c=Fs(c,h,a,null),S.return=s,c.return=s,S.sibling=c,s.child=S,c=s.child,c.memoizedState=sh(a),c.childLanes=ih(r,b,a),s.memoizedState=rh,oo(null,c)):(as(s),ah(s,S))}var A=r.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(p)s.flags&256?(as(s),s.flags&=-257,s=oh(r,s,a)):s.memoizedState!==null?(os(),s.child=r.child,s.flags|=128,s=null):(os(),S=c.fallback,h=s.mode,c=Gl({mode:"visible",children:c.children},h),S=Fs(S,h,a,null),S.flags|=2,c.return=s,S.return=s,c.sibling=S,s.child=c,Ws(s,r.child,null,a),c=s.child,c.memoizedState=sh(a),c.childLanes=ih(r,b,a),s.memoizedState=rh,s=oo(null,c));else if(as(s),Bh(S)){if(b=S.nextSibling&&S.nextSibling.dataset,b)var P=b.dgst;b=P,c=Error(i(419)),c.stack="",c.digest=b,Ya({value:c,source:null,stack:null}),s=oh(r,s,a)}else if(vt||Ui(r,s,a,!1),b=(a&r.childLanes)!==0,vt||b){if(b=Ge,b!==null&&(c=tn(b,a),c!==0&&c!==A.retryLane))throw A.retryLane=c,Zs(r,c),cn(b,r,c),th;Uh(S)||nc(),s=oh(r,s,a)}else Uh(S)?(s.flags|=192,s.child=r.child,s=null):(r=A.treeContext,Qe=In(S.nextSibling),jt=s,Ce=!0,es=null,Dn=!1,r!==null&&Um(s,r),s=ah(s,c.children),s.flags|=4096);return s}return h?(os(),S=c.fallback,h=s.mode,A=r.child,P=A.sibling,c=Er(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,P!==null?S=Er(P,S):(S=Fs(S,h,a,null),S.flags|=2),S.return=s,c.return=s,c.sibling=S,s.child=c,oo(null,c),c=s.child,S=r.child.memoizedState,S===null?S=sh(a):(h=S.cachePool,h!==null?(A=gt._currentValue,h=h.parent!==A?{parent:A,pool:A}:h):h=Fm(),S={baseLanes:S.baseLanes|a,cachePool:h}),c.memoizedState=S,c.childLanes=ih(r,b,a),s.memoizedState=rh,oo(r.child,c)):(as(s),a=r.child,r=a.sibling,a=Er(a,{mode:"visible",children:c.children}),a.return=s,a.sibling=null,r!==null&&(b=s.deletions,b===null?(s.deletions=[r],s.flags|=16):b.push(r)),s.child=a,s.memoizedState=null,a)}function ah(r,s){return s=Gl({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Gl(r,s){return r=bn(22,r,null,s),r.lanes=0,r}function oh(r,s,a){return Ws(s,r.child,null,a),r=ah(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function iy(r,s,a){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s),Sd(r.return,s,a)}function lh(r,s,a,c,h,p){var b=r.memoizedState;b===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h,treeForkCount:p}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=c,b.tail=a,b.tailMode=h,b.treeForkCount=p)}function ay(r,s,a){var c=s.pendingProps,h=c.revealOrder,p=c.tail;c=c.children;var b=pt.current,S=(b&2)!==0;if(S?(b=b&1|2,s.flags|=128):b&=1,G(pt,b),Lt(r,s,c,a),c=Ce?Ka:0,!S&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&iy(r,a,s);else if(r.tag===19)iy(r,a,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(h){case"forwards":for(a=s.child,h=null;a!==null;)r=a.alternate,r!==null&&Ll(r)===null&&(h=a),a=a.sibling;a=h,a===null?(h=s.child,s.child=null):(h=a.sibling,a.sibling=null),lh(s,!1,h,a,p,c);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=s.child,s.child=null;h!==null;){if(r=h.alternate,r!==null&&Ll(r)===null){s.child=h;break}r=h.sibling,h.sibling=a,a=h,h=r}lh(s,!0,a,null,p,c);break;case"together":lh(s,!1,null,null,void 0,c);break;default:s.memoizedState=null}return s.child}function Cr(r,s,a){if(r!==null&&(s.dependencies=r.dependencies),us|=s.lanes,(a&s.childLanes)===0)if(r!==null){if(Ui(r,s,a,!1),(a&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,a=Er(r,r.pendingProps),s.child=a,a.return=s;r.sibling!==null;)r=r.sibling,a=a.sibling=Er(r,r.pendingProps),a.return=s;a.sibling=null}return s.child}function ch(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&kl(r)))}function zT(r,s,a){switch(s.tag){case 3:ye(s,s.stateNode.containerInfo),ns(s,gt,r.memoizedState.cache),Gs();break;case 27:case 5:Jt(s);break;case 4:ye(s,s.stateNode.containerInfo);break;case 10:ns(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Pd(s),null;break;case 13:var c=s.memoizedState;if(c!==null)return c.dehydrated!==null?(as(s),s.flags|=128,null):(a&s.child.childLanes)!==0?sy(r,s,a):(as(s),r=Cr(r,s,a),r!==null?r.sibling:null);as(s);break;case 19:var h=(r.flags&128)!==0;if(c=(a&s.childLanes)!==0,c||(Ui(r,s,a,!1),c=(a&s.childLanes)!==0),h){if(c)return ay(r,s,a);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),G(pt,pt.current),c)break;return null;case 22:return s.lanes=0,Xg(r,s,a,s.pendingProps);case 24:ns(s,gt,r.memoizedState.cache)}return Cr(r,s,a)}function oy(r,s,a){if(r!==null)if(r.memoizedProps!==s.pendingProps)vt=!0;else{if(!ch(r,a)&&(s.flags&128)===0)return vt=!1,zT(r,s,a);vt=(r.flags&131072)!==0}else vt=!1,Ce&&(s.flags&1048576)!==0&&Im(s,Ka,s.index);switch(s.lanes=0,s.tag){case 16:e:{var c=s.pendingProps;if(r=Qs(s.elementType),s.type=r,typeof r=="function")pd(r)?(c=ti(r,c),s.tag=1,s=ny(null,s,r,c,a)):(s.tag=0,s=nh(null,s,r,c,a));else{if(r!=null){var h=r.$$typeof;if(h===N){s.tag=11,s=Yg(null,s,r,c,a);break e}else if(h===D){s.tag=14,s=Jg(null,s,r,c,a);break e}}throw s=$e(r)||r,Error(i(306,s,""))}}return s;case 0:return nh(r,s,s.type,s.pendingProps,a);case 1:return c=s.type,h=ti(c,s.pendingProps),ny(r,s,c,h,a);case 3:e:{if(ye(s,s.stateNode.containerInfo),r===null)throw Error(i(387));c=s.pendingProps;var p=s.memoizedState;h=p.element,Cd(r,s),no(s,c,null,a);var b=s.memoizedState;if(c=b.cache,ns(s,gt,c),c!==p.cache&&Ed(s,[gt],a,!0),to(),c=b.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:b.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=ry(r,s,c,a);break e}else if(c!==h){h=Pn(Error(i(424)),s),Ya(h),s=ry(r,s,c,a);break e}else for(r=s.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Qe=In(r.firstChild),jt=s,Ce=!0,es=null,Dn=!0,a=Xm(s,null,c,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Gs(),c===h){s=Cr(r,s,a);break e}Lt(r,s,c,a)}s=s.child}return s;case 26:return Fl(r,s),r===null?(a=vv(s.type,null,s.pendingProps,null))?s.memoizedState=a:Ce||(a=s.type,r=s.pendingProps,c=cc(pe.current).createElement(a),c[zt]=s,c[nn]=r,Mt(c,a,r),kt(c),s.stateNode=c):s.memoizedState=vv(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return Jt(s),r===null&&Ce&&(c=s.stateNode=mv(s.type,s.pendingProps,pe.current),jt=s,Dn=!0,h=Qe,ms(s.type)?(Hh=h,Qe=In(c.firstChild)):Qe=h),Lt(r,s,s.pe
vendor: 8,732 bytes, line 9
9ndingProps.children,a),Fl(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&Ce&&((h=c=Qe)&&(c=l1(c,s.type,s.pendingProps,Dn),c!==null?(s.stateNode=c,jt=s,Qe=In(c.firstChild),Dn=!1,h=!0):h=!1),h||ts(s)),Jt(s),h=s.type,p=s.pendingProps,b=r!==null?r.memoizedProps:null,c=p.children,Dh(h,p)?c=null:b!==null&&Dh(h,b)&&(s.flags|=32),s.memoizedState!==null&&(h=Md(r,s,ET,null,null,a),Eo._currentValue=h),Fl(r,s),Lt(r,s,c,a),s.child;case 6:return r===null&&Ce&&((r=a=Qe)&&(a=c1(a,s.pendingProps,Dn),a!==null?(s.stateNode=a,jt=s,Qe=null,r=!0):r=!1),r||ts(s)),null;case 13:return sy(r,s,a);case 4:return ye(s,s.stateNode.containerInfo),c=s.pendingProps,r===null?s.child=Ws(s,null,c,a):Lt(r,s,c,a),s.child;case 11:return Yg(r,s,s.type,s.pendingProps,a);case 7:return Lt(r,s,s.pendingProps,a),s.child;case 8:return Lt(r,s,s.pendingProps.children,a),s.child;case 12:return Lt(r,s,s.pendingProps.children,a),s.child;case 10:return c=s.pendingProps,ns(s,s.type,c.value),Lt(r,s,c.children,a),s.child;case 9:return h=s.type._context,c=s.pendingProps.children,Ys(s),h=Pt(h),c=c(h),s.flags|=1,Lt(r,s,c,a),s.child;case 14:return Jg(r,s,s.type,s.pendingProps,a);case 15:return Qg(r,s,s.type,s.pendingProps,a);case 19:return ay(r,s,a);case 31:return NT(r,s,a);case 22:return Xg(r,s,a,s.pendingProps);case 24:return Ys(s),c=Pt(gt),r===null?(h=Ad(),h===null&&(h=Ge,p=Td(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=a),h=p),s.memoizedState={parent:c,cache:h},Od(s),ns(s,gt,h)):((r.lanes&a)!==0&&(Cd(r,s),no(s,null,null,a),to()),h=r.memoizedState,p=s.memoizedState,h.parent!==c?(h={parent:c,cache:c},s.memoizedState=h,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=h),ns(s,gt,c)):(c=p.cache,ns(s,gt,c),c!==h.cache&&Ed(s,[gt],a,!0))),Lt(r,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function xr(r){r.flags|=4}function uh(r,s,a,c,h){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(h&335544128)===h)if(r.stateNode.complete)r.flags|=8192;else if(Py())r.flags|=8192;else throw Xs=Nl,kd}else r.flags&=-16777217}function ly(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Ev(s))if(Py())r.flags|=8192;else throw Xs=Nl,kd}function Kl(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?Bt():536870912,r.lanes|=s,Xi|=s)}function lo(r,s){if(!Ce)switch(r.tailMode){case"hidden":s=r.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Xe(r){var s=r.alternate!==null&&r.alternate.child===r.child,a=0,c=0;if(s)for(var h=r.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=r,h=h.sibling;else for(h=r.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=r,h=h.sibling;return r.subtreeFlags|=c,r.childLanes=a,s}function jT(r,s,a){var c=s.pendingProps;switch(vd(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(s),null;case 1:return Xe(s),null;case 3:return a=s.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Ar(gt),xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(r===null||r.child===null)&&(Ii(s)?xr(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_d())),Xe(s),null;case 26:var h=s.type,p=s.memoizedState;return r===null?(xr(s),p!==null?(Xe(s),ly(s,p)):(Xe(s),uh(s,h,null,c,a))):p?p!==r.memoizedState?(xr(s),Xe(s),ly(s,p)):(Xe(s),s.flags&=-16777217):(r=r.memoizedProps,r!==c&&xr(s),Xe(s),uh(s,h,r,c,a)),null;case 27:if(Qt(s),a=pe.current,h=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==c&&xr(s);else{if(!c){if(s.stateNode===null)throw Error(i(166));return Xe(s),null}r=J.current,Ii(s)?Bm(s):(r=mv(h,c,a),s.stateNode=r,xr(s))}return Xe(s),null;case 5:if(Qt(s),h=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==c&&xr(s);else{if(!c){if(s.stateNode===null)throw Error(i(166));return Xe(s),null}if(p=J.current,Ii(s))Bm(s);else{var b=cc(pe.current);switch(p){case 1:p=b.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:p=b.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":p=b.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":p=b.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":p=b.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?b.createElement("select",{is:c.is}):b.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?b.createElement(h,{is:c.is}):b.createElement(h)}}p[zt]=s,p[nn]=c;e:for(b=s.child;b!==null;){if(b.tag===5||b.tag===6)p.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===s)break e;for(;b.sibling===null;){if(b.return===null||b.return===s)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}s.stateNode=p;e:switch(Mt(p,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&xr(s)}}return Xe(s),uh(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,a),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==c&&xr(s);else{if(typeof c!="string"&&s.stateNode===null)throw Error(i(166));if(r=pe.current,Ii(s)){if(r=s.stateNode,a=s.memoizedProps,c=null,h=jt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}r[zt]=s,r=!!(r.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||sv(r.nodeValue,a)),r||ts(s,!0)}else r=cc(r).createTextNode(c),r[zt]=s,s.stateNode=r}return Xe(s),null;case 31:if(a=s.memoizedState,r===null||r.memoizedState!==null){if(c=Ii(s),a!==null){if(r===null){if(!c)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[zt]=s}else Gs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xe(s),r=!1}else a=_d(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=a),r=!0;if(!r)return s.flags&256?(wn(s),s):(wn(s),null);if((s.flags&128)!==0)throw Error(i(558))}return Xe(s),null;case 13:if(c=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(h=Ii(s),c!==null&&c.dehydrated!==null){if(r===null){if(!h)throw Error(i(318));if(h=s.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[zt]=s}else Gs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xe(s),h=!1}else h=_d(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=h),h=!0;if(!h)return s.flags&256?(wn(s),s):(wn(s),null)}return wn(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,r=r!==null&&r.memoizedState!==null,a&&(c=s.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==h&&(c.flags|=2048)),a!==r&&a&&(s.child.flags|=8192),Kl(s,s.updateQueue),Xe(s),null);case 4:return xe(),r===null&&zh(s.stateNode.containerInfo),Xe(s),null;case 10:return Ar(s.type),Xe(s),null;case 19:if(V(pt),c=s.memoizedState,c===null)return Xe(s),null;if(h=(s.flags&128)!==0,p=c.rendering,p===null)if(h)lo(c,!1);else{if(ut!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(p=Ll(r),p!==null){for(s.flags|=128,lo(c,!1),r=p.updateQueue,s.updateQueue=r,Kl(s,r),s.subtreeFlags=0,r=a,a=s.child;a!==null;)Mm(a,r),a=a.sibling;return G(pt,pt.current&1|2),Ce&&Tr(s,c.treeForkCount),s.child}r=r.sibling}c.tail!==null&&Rt()>Wl&&(s.flags|=128,h=!0,lo(c,!1),s.lanes=4194304)}else{if(!h)if(r=Ll(p),r!==null){if(s.flags|=128,h=!0,r=r.updateQueue,s.updateQueue=r,Kl(s,r),lo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!Ce)return Xe(s),null}else 2*Rt()-c.renderingStartTime>Wl&&a!==536870912&&(s.flags|=128,h=!0,lo(c,!1),s.lanes=4194304);c.isBackwards?(p.sibling=s.child,s.child=p):(r=c.last,r!==null?r.sibling=p:s.child=p,c.last=p)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=Rt(),r.sibling=null,a=pt.current,G(pt,h?a&1|2:a&1),Ce&&Tr(s,c.treeForkCount),r):(Xe(s),null);case 22:case 23:return wn(s),jd(),c=s.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Xe(s),s.subtreeFlags&6&&(s.flags|=8192)):Xe(s),a=s.updateQueue,a!==null&&Kl(s,a.retryQueue),a=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),c=null,
vendor: 20,524 bytes, line 9
9s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),r!==null&&V(Js),null;case 24:return a=null,r!==null&&(a=r.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),Ar(gt),Xe(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function PT(r,s){switch(vd(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Ar(gt),xe(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return Qt(s),null;case 31:if(s.memoizedState!==null){if(wn(s),s.alternate===null)throw Error(i(340));Gs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(wn(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));Gs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return V(pt),null;case 4:return xe(),null;case 10:return Ar(s.type),null;case 22:case 23:return wn(s),jd(),r!==null&&V(Js),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return Ar(gt),null;case 25:return null;default:return null}}function cy(r,s){switch(vd(s),s.tag){case 3:Ar(gt),xe();break;case 26:case 27:case 5:Qt(s);break;case 4:xe();break;case 31:s.memoizedState!==null&&wn(s);break;case 13:wn(s);break;case 19:V(pt);break;case 10:Ar(s.type);break;case 22:case 23:wn(s),jd(),r!==null&&V(Js);break;case 24:Ar(gt)}}function co(r,s){try{var a=s.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var h=c.next;a=h;do{if((a.tag&r)===r){c=void 0;var p=a.create,b=a.inst;c=p(),b.destroy=c}a=a.next}while(a!==h)}}catch(S){Ue(s,s.return,S)}}function ls(r,s,a){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&r)===r){var b=c.inst,S=b.destroy;if(S!==void 0){b.destroy=void 0,h=s;var A=a,P=S;try{P()}catch(B){Ue(h,A,B)}}}c=c.next}while(c!==p)}}catch(B){Ue(s,s.return,B)}}function uy(r){var s=r.updateQueue;if(s!==null){var a=r.stateNode;try{eg(s,a)}catch(c){Ue(r,r.return,c)}}}function dy(r,s,a){a.props=ti(r.type,r.memoizedProps),a.state=r.memoizedState;try{a.componentWillUnmount()}catch(c){Ue(r,s,c)}}function uo(r,s){try{var a=r.ref;if(a!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof a=="function"?r.refCleanup=a(c):a.current=c}}catch(h){Ue(r,s,h)}}function or(r,s){var a=r.ref,c=r.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){Ue(r,s,h)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Ue(r,s,h)}else a.current=null}function hy(r){var s=r.type,a=r.memoizedProps,c=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(h){Ue(r,r.return,h)}}function dh(r,s,a){try{var c=r.stateNode;n1(c,r.type,a,s),c[nn]=s}catch(h){Ue(r,r.return,h)}}function fy(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ms(r.type)||r.tag===4}function hh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||fy(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&ms(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function fh(r,s,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(r,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(r),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=wr));else if(c!==4&&(c===27&&ms(r.type)&&(a=r.stateNode,s=null),r=r.child,r!==null))for(fh(r,s,a),r=r.sibling;r!==null;)fh(r,s,a),r=r.sibling}function Yl(r,s,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,s?a.insertBefore(r,s):a.appendChild(r);else if(c!==4&&(c===27&&ms(r.type)&&(a=r.stateNode),r=r.child,r!==null))for(Yl(r,s,a),r=r.sibling;r!==null;)Yl(r,s,a),r=r.sibling}function py(r){var s=r.stateNode,a=r.memoizedProps;try{for(var c=r.type,h=s.attributes;h.length;)s.removeAttributeNode(h[0]);Mt(s,c,a),s[zt]=r,s[nn]=a}catch(p){Ue(r,r.return,p)}}var Nr=!1,bt=!1,ph=!1,my=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function LT(r,s){if(r=r.containerInfo,Lh=gc,r=km(r),od(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var b=0,S=-1,A=-1,P=0,B=0,F=r,M=null;t:for(;;){for(var $;F!==a||h!==0&&F.nodeType!==3||(S=b+h),F!==p||c!==0&&F.nodeType!==3||(A=b+c),F.nodeType===3&&(b+=F.nodeValue.length),($=F.firstChild)!==null;)M=F,F=$;for(;;){if(F===r)break t;if(M===a&&++P===h&&(S=b),M===p&&++B===c&&(A=b),($=F.nextSibling)!==null)break;F=M,M=F.parentNode}F=$}a=S===-1||A===-1?null:{start:S,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Mh={focusedElem:r,selectionRange:a},gc=!1,Ot=s;Ot!==null;)if(s=Ot,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Ot=r;else for(;Ot!==null;){switch(s=Ot,p=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(a=0;a<r.length;a++)h=r[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&p!==null){r=void 0,a=s,h=p.memoizedProps,p=p.memoizedState,c=a.stateNode;try{var ne=ti(a.type,h);r=c.getSnapshotBeforeUpdate(ne,p),c.__reactInternalSnapshotBeforeUpdate=r}catch(me){Ue(a,a.return,me)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,a=r.nodeType,a===9)Ih(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Ih(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,Ot=r;break}Ot=s.return}}function gy(r,s,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:jr(r,a),c&4&&co(5,a);break;case 1:if(jr(r,a),c&4)if(r=a.stateNode,s===null)try{r.componentDidMount()}catch(b){Ue(a,a.return,b)}else{var h=ti(a.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(h,s,r.__reactInternalSnapshotBeforeUpdate)}catch(b){Ue(a,a.return,b)}}c&64&&uy(a),c&512&&uo(a,a.return);break;case 3:if(jr(r,a),c&64&&(r=a.updateQueue,r!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{eg(r,s)}catch(b){Ue(a,a.return,b)}}break;case 27:s===null&&c&4&&py(a);case 26:case 5:jr(r,a),s===null&&c&4&&hy(a),c&512&&uo(a,a.return);break;case 12:jr(r,a);break;case 31:jr(r,a),c&4&&by(r,a);break;case 13:jr(r,a),c&4&&_y(r,a),c&64&&(r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(a=VT.bind(null,a),u1(r,a))));break;case 22:if(c=a.memoizedState!==null||Nr,!c){s=s!==null&&s.memoizedState!==null||bt,h=Nr;var p=bt;Nr=c,(bt=s)&&!p?Pr(r,a,(a.subtreeFlags&8772)!==0):jr(r,a),Nr=h,bt=p}break;case 30:break;default:jr(r,a)}}function yy(r){var s=r.alternate;s!==null&&(r.alternate=null,yy(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&Vu(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var nt=null,sn=!1;function zr(r,s,a){for(a=a.child;a!==null;)vy(r,s,a),a=a.sibling}function vy(r,s,a){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount($s,a)}catch{}switch(a.tag){case 26:bt||or(a,s),zr(r,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||or(a,s);var c=nt,h=sn;ms(a.type)&&(nt=a.stateNode,sn=!1),zr(r,s,a),_o(a.stateNode),nt=c,sn=h;break;case 5:bt||or(a,s);case 6:if(c=nt,h=sn,nt=null,zr(r,s,a),nt=c,sn=h,nt!==null)if(sn)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(a.stateNode)}catch(p){Ue(a,s,p)}else try{nt.removeChild(a.stateNode)}catch(p){Ue(a,s,p)}break;case 18:nt!==null&&(sn?(r=nt,uv(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.stateNode),aa(r)):uv(nt,a.stateNode));break;case 4:c=nt,h=sn,nt=a.stateNode.containerInfo,sn=!0,zr(r,s,a),nt=c,sn=h;break;case 0:case 11:case 14:case 15:ls(2,a,s),bt||ls(4,a,s),zr(r,s,a);break;case 1:bt||(or(a,s),c=a.stateNode,typeof c.componentWillUnmount=="function"&&dy(a,s,c)),zr(r,s,a);break;case 21:zr(r,s,a);break;case 22:bt=(c=bt)||a.memoizedState!==null,zr(r,s,a),bt=c;break;default:zr(r,s,a)}}function by(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{aa(r)}catch(a){Ue(s,s.return,a)}}}function _y(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{aa(r)}catch(a){Ue(s,s.return,a)}}function MT(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new my),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new my),s;default:throw Error(i(435,r.tag))}}function Jl(r,s){var a=MT(r);s.forEach(function(c){if(!a.has(c)){a.add(c);var h=ZT.bind(null,r,c);c.then(h,h)}})}function an(r,s){var a=s.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c],p=r,b=s,S=b;e:for(;S!==null;){switch(S.tag){case 27:if(ms(S.type)){nt=S.stateNode,sn=!1;break e}break;case 5:nt=S.stateNode,sn=!1;break e;case 3:case 4:nt=S.stateNode.containerInfo,sn=!0;break e}S=S.return}if(nt===null)throw Error(i(160));vy(p,b,h),nt=null,sn=!1,p=h.alternate,p!==null&&(p.return=null),h.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)wy(s,r),s=s.sibling}var Gn=null;function wy(r,s){var a=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:an(s,r),on(r),c&4&&(ls(3,r,r.return),co(3,r),ls(5,r,r.return));break;case 1:an(s,r),on(r),c&512&&(bt||a===null||or(a,a.return)),c&64&&Nr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(a=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var h=Gn;if(an(s,r),on(r),c&512&&(bt||a===null||or(a,a.return)),c&4){var p=a!==null?a.memoizedState:null;if(c=r.memoizedState,a===null)if(c===null)if(r.stateNode===null){e:{c=r.type,a=r.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":p=h.getElementsByTagName("title")[0],(!p||p[Da]||p[zt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=h.createElement(c),h.head.insertBefore(p,h.querySelector("head > title"))),Mt(p,c,a),p[zt]=r,kt(p),c=p;break e;case"link":var b=wv("link","href",h).get(c+(a.href||""));if(b){for(var S=0;S<b.length;S++)if(p=b[S],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(S,1);break t}}p=h.createElement(c),Mt(p,c,a),h.head.appendChild(p);break;case"meta":if(b=wv("meta","content",h).get(c+(a.content||""))){for(S=0;S<b.length;S++)if(p=b[S],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(S,1);break t}}p=h.createElement(c),Mt(p,c,a),h.head.appendChild(p);break;default:throw Error(i(468,c))}p[zt]=r,kt(p),c=p}r.stateNode=c}else Sv(h,r.type,r.stateNode);else r.stateNode=_v(h,c,r.memoizedProps);else p!==c?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,c===null?Sv(h,r.type,r.stateNode):_v(h,c,r.memoizedProps)):c===null&&r.stateNode!==null&&dh(r,r.memoizedProps,a.memoizedProps)}break;case 27:an(s,r),on(r),c&512&&(bt||a===null||or(a,a.return)),a!==null&&c&4&&dh(r,r.memoizedProps,a.memoizedProps);break;case 5:if(an(s,r),on(r),c&512&&(bt||a===null||or(a,a.return)),r.flags&32){h=r.stateNode;try{Ci(h,"")}catch(ne){Ue(r,r.return,ne)}}c&4&&r.stateNode!=null&&(h=r.memoizedProps,dh(r,h,a!==null?a.memoizedProps:h)),c&1024&&(ph=!0);break;case 6:if(an(s,r),on(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,a=r.stateNode;try{a.nodeValue=c}catch(ne){Ue(r,r.return,ne)}}break;case 3:if(hc=null,h=Gn,Gn=uc(s.containerInfo),an(s,r),Gn=h,on(r),c&4&&a!==null&&a.memoizedState.isDehydrated)try{aa(s.containerInfo)}catch(ne){Ue(r,r.return,ne)}ph&&(ph=!1,Sy(r));break;case 4:c=Gn,Gn=uc(r.stateNode.containerInfo),an(s,r),on(r),Gn=c;break;case 12:an(s,r),on(r);break;case 31:an(s,r),on(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Jl(r,c)));break;case 13:an(s,r),on(r),r.child.flags&8192&&r.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Xl=Rt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Jl(r,c)));break;case 22:h=r.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,P=Nr,B=bt;if(Nr=P||h,bt=B||A,an(s,r),bt=B,Nr=P,on(r),c&8192)e:for(s=r.stateNode,s._visibility=h?s._visibility&-2:s._visibility|1,h&&(a===null||A||Nr||bt||ni(r)),a=null,s=r;;){if(s.tag===5||s.tag===26){if(a===null){A=a=s;try{if(p=A.stateNode,h)b=p.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{S=A.stateNode;var F=A.memoizedProps.style,M=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ne){Ue(A,A.return,ne)}}}else if(s.tag===6){if(a===null){A=s;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(ne){Ue(A,A.return,ne)}}}else if(s.tag===18){if(a===null){A=s;try{var $=A.stateNode;h?dv($,!0):dv(A.stateNode,!1)}catch(ne){Ue(A,A.return,ne)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;a===s&&(a=null),s=s.return}a===s&&(a=null),s.sibling.return=s.return,s=s.sibling}c&4&&(c=r.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,Jl(r,a))));break;case 19:an(s,r),on(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,Jl(r,c)));break;case 30:break;case 21:break;default:an(s,r),on(r)}}function on(r){var s=r.flags;if(s&2){try{for(var a,c=r.return;c!==null;){if(fy(c)){a=c;break}c=c.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var h=a.stateNode,p=hh(r);Yl(r,p,h);break;case 5:var b=a.stateNode;a.flags&32&&(Ci(b,""),a.flags&=-33);var S=hh(r);Yl(r,S,b);break;case 3:case 4:var A=a.stateNode.containerInfo,P=hh(r);fh(r,P,A);break;default:throw Error(i(161))}}catch(B){Ue(r,r.return,B)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Sy(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;Sy(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function jr(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)gy(r,s.alternate,s),s=s.sibling}function ni(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:ls(4,s,s.return),ni(s);break;case 1:or(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount=="function"&&dy(s,s.return,a),ni(s);break;case 27:_o(s.stateNode);case 26:case 5:or(s,s.return),ni(s);break;case 22:s.memoizedState===null&&ni(s);break;case 30:ni(s);break;default:ni(s)}r=r.sibling}}function Pr(r,s,a){for(a=a&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var c=s.alternate,h=r,p=s,b=p.flags;switch(p.tag){case 0:case 11:case 15:Pr(h,p,a),co(4,p);break;case 1:if(Pr(h,p,a),c=p,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(P){Ue(c,c.return,P)}if(c=p,h=c.updateQueue,h!==null){var S=c.stateNode;try{var A=h.shared.hiddenCallbacks;if(A!==null)for(h.shared.hiddenCallbacks=null,h=0;h<A.length;h++)Wm(A[h],S)}catch(P){Ue(c,c.return,P)}}a&&b&64&&uy(p),uo(p,p.return);break;case 27:py(p);case 26:case 5:Pr(h,p,a),a&&c===null&&b&4&&hy(p),uo(p,p.return);break;case 12:Pr(h,p,a);break;case 31:Pr(h,p,a),a&&b&4&&by(h,p);break;case 13:Pr(h,p,a),a&&b&4&&_y(h,p);break;case 22:p.memoizedState===null&&Pr(h,p,a),uo(p,p.return);break;case 30:break;default:Pr(h,p,a)}s=s.sibling}}function mh(r,s){var a=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==a&&(r!=null&&r.refCount++,a!=null&&Ja(a))}function gh(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Ja(r))}function Kn(r,s,a,c){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Ey(r,s,a,c),s=s.sibling}function Ey(r,s,a,c){var h=s.flags;switch(s.tag){case 0:case 11:case 15:Kn(r,s,a,c),h&2048&&co(9,s);break;case 1:Kn(r,s,a,c);break;case 3:Kn(r,s,a,c),h&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Ja(r)));break;case 12:if(h&2048){Kn(r,s,a,c),r=s.stateNode;try{var p=s.memoizedProps,b=p.id,S=p.onPostCommit;typeof S=="function"&&S(b,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(A){Ue(s,s.return,A)}}else Kn(r,s,a,c);break;case 31:Kn(r,s,a,c);break;case 13:Kn(r,s,a,c);break;case 23:break;case 22:p=s.stateNode,b=s.alternate,s.memoizedState!==null?p._visibility&2?Kn(r,s,a,c):ho(r,s):p._visibility&2?Kn(r,s,a,c):(p._visibility|=2,Yi(r,s,a,c,(s.subtreeFlags&10256)!==0||!1)),h&2048&&mh(b,s);break;case 24:Kn(r,s,a,c),h&2048&&gh(s.alternate,s);break;default:Kn(r,s,a,c)}}function Yi(r,s,a,c,h){for(h=h&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=r,b=s,S=a,A=c,P=b.flags;switch(b.tag){case 0:case 11:case 15:Yi(p,b,S,A,h),co(8,b);break;case 23:break;case 22:var B=b.stateNode;b.memoizedState!==null?B._visibility&2?Yi(p,b,S,A,h):ho(p,b):(B._visibility|=2,Yi(p,b,S,A,h)),h&&P&2048&&mh(b.alternate,b);break;case 24:Yi(p,b,S,A,h),h&&P&2048&&gh(b.alternate,b);break;default:Yi(p,b,S,A,h)}s=s.sibling}}function ho(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var a=r,c=s,h=c.flags;switch(c.tag){case 22:ho(a,c),h&2048&&mh(c.alternate,c);break;case 24:ho(a,c),h&2048&&gh(c.alternate,c);break;default:ho(a,c)}s=s.sibling}}var fo=8192;function Ji(r,s,a){if(r.subtreeFlags&fo)for(r=r.child;r!==null;)Ty(r,s,a),r=r.sibling}function Ty(r,s,a){switch(r.tag){case 26:Ji(r,s,a),r.flags&fo&&r.memoizedState!==null&&S1(a,Gn,r.memoizedState,r.memoizedProps);break;case 5:Ji(r,s,a);break;case 3:case 4:var c=Gn;Gn=uc(r.stateNode.containerInfo),Ji(r,s,a),Gn=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=fo,fo=16777216,Ji(r,s,a),fo=c):Ji(r,s,a));break;default:Ji(r,s,a)}}function Ry(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function po(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];Ot=c,ky(c,r)}Ry(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ay(r),r=r.sibling}function Ay(r){switch(r.tag){case 0:case 11:case 15:po(r),r.flags&2048&&ls(9,r,r.return);break;case 3:po(r);break;case 12:po(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Ql(r)):po(r);break;default:po(r)}}function Ql(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];Ot=c,ky(c,r)}Ry(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:ls(8,s,s.return),Ql(s);break;case 22:a=s.stateNode,a._visibility&2&&(a._visibility&=-3,Ql(s));break;default:Ql(s)}r=r.sibling}}function ky(r,s){for(;Ot!==null;){var a=Ot;switch(a.tag){case 0:case 11:case 15:ls(8,a,s);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Ja(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,Ot=c;else e:for(a=r;Ot!==null;){c=Ot;var h=c.sibling,p=c.return;if(yy(c),c===a){Ot=null;break e}if(h!==null){h.return=p,Ot=h;break e}Ot=p}}}var DT={getCacheForType:function(r){var s=Pt(gt),a=s.data.get(r);return a===void 0&&(a=r(),s.data.set(r,a)),a},cacheSignal:function(){return Pt(gt).controller.signal}},$T=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ge=null,Re=null,ke=0,Ie=0,Sn=null,cs=!1,Qi=!1,yh=!1,Lr=0,ut=0,us=0,ri=0,vh=0,En=0,Xi=0,mo=null,ln=null,bh=!1,Xl=0,Oy=0,Wl=1/0,ec=null,ds=null,St=0,hs=null,Wi=null,Mr=0,_h=0,wh=null,Cy=null,go=0,Sh=null;
vendor: 4,959 bytes, line 9
9function Tn(){return(Me&2)!==0&&ke!==0?ke&-ke:L.T!==null?Oh():Hu()}function xy(){if(En===0)if((ke&536870912)===0||Ce){var r=wi;wi<<=1,(wi&3932160)===0&&(wi=262144),En=r}else En=536870912;return r=_n.current,r!==null&&(r.flags|=32),En}function cn(r,s,a){(r===Ge&&(Ie===2||Ie===9)||r.cancelPendingCommit!==null)&&(ea(r,0),fs(r,ke,En,!1)),at(r,a),((Me&2)===0||r!==Ge)&&(r===Ge&&((Me&2)===0&&(ri|=a),ut===4&&fs(r,ke,En,!1)),lr(r))}function Ny(r,s,a){if((Me&6)!==0)throw Error(i(327));var c=!a&&(s&127)===0&&(s&r.expiredLanes)===0||tt(r,s),h=c?BT(r,s):Th(r,s,!0),p=c;do{if(h===0){Qi&&!c&&fs(r,s,0,!1);break}else{if(a=r.current.alternate,p&&!IT(a)){h=Th(r,s,!1),p=!1;continue}if(h===2){if(p=s,r.errorRecoveryDisabledLanes&p)var b=0;else b=r.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){s=b;e:{var S=r;h=mo;var A=S.current.memoizedState.isDehydrated;if(A&&(ea(S,b).flags|=256),b=Th(S,b,!1),b!==2){if(yh&&!A){S.errorRecoveryDisabledLanes|=p,ri|=p,h=4;break e}p=ln,ln=h,p!==null&&(ln===null?ln=p:ln.push.apply(ln,p))}h=b}if(p=!1,h!==2)continue}}if(h===1){ea(r,0),fs(r,s,0,!0);break}e:{switch(c=r,p=h,p){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:fs(c,s,En,!cs);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(h=Xl+300-Rt(),10<h)){if(fs(c,s,En,!cs),ve(c,0,!0)!==0)break e;Mr=s,c.timeoutHandle=lv(zy.bind(null,c,a,ln,ec,bh,s,En,ri,Xi,cs,p,"Throttled",-0,0),h);break e}zy(c,a,ln,ec,bh,s,En,ri,Xi,cs,p,null,-0,0)}}break}while(!0);lr(r)}function zy(r,s,a,c,h,p,b,S,A,P,B,F,M,$){if(r.timeoutHandle=-1,F=s.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wr},Ty(s,p,F);var ne=(p&62914560)===p?Xl-Rt():(p&4194048)===p?Oy-Rt():0;if(ne=E1(F,ne),ne!==null){Mr=p,r.cancelPendingCommit=ne(Uy.bind(null,r,s,p,a,c,h,b,S,A,B,F,null,M,$)),fs(r,p,b,!P);return}}Uy(r,s,p,a,c,h,b,S,A)}function IT(r){for(var s=r;;){var a=s.tag;if((a===0||a===11||a===15)&&s.flags&16384&&(a=s.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var h=a[c],p=h.getSnapshot;h=h.value;try{if(!vn(p(),h))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function fs(r,s,a,c){s&=~vh,s&=~ri,r.suspendedLanes|=s,r.pingedLanes&=~s,c&&(r.warmLanes|=s),c=r.expirationTimes;for(var h=s;0<h;){var p=31-Ut(h),b=1<<p;c[p]=-1,h&=~b}a!==0&&Us(r,a,s)}function tc(){return(Me&6)===0?(yo(0),!1):!0}function Eh(){if(Re!==null){if(Ie===0)var r=Re.return;else r=Re,Rr=Ks=null,Id(r),Vi=null,Xa=0,r=Re;for(;r!==null;)cy(r.alternate,r),r=r.return;Re=null}}function ea(r,s){var a=r.timeoutHandle;a!==-1&&(r.timeoutHandle=-1,i1(a)),a=r.cancelPendingCommit,a!==null&&(r.cancelPendingCommit=null,a()),Mr=0,Eh(),Ge=r,Re=a=Er(r.current,null),ke=s,Ie=0,Sn=null,cs=!1,Qi=tt(r,s),yh=!1,Xi=En=vh=ri=us=ut=0,ln=mo=null,bh=!1,(s&8)!==0&&(s|=s&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=s;0<c;){var h=31-Ut(c),p=1<<h;s|=r[h],c&=~p}return Lr=s,Sl(),a}function jy(r,s){we=null,L.H=ao,s===qi||s===xl?(s=Ym(),Ie=3):s===kd?(s=Ym(),Ie=4):Ie=s===th?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Sn=s,Re===null&&(ut=1,Vl(r,Pn(s,r.current)))}function Py(){var r=_n.current;return r===null?!0:(ke&4194048)===ke?$n===null:(ke&62914560)===ke||(ke&536870912)!==0?r===$n:!1}function Ly(){var r=L.H;return L.H=ao,r===null?ao:r}function My(){var r=L.A;return L.A=DT,r}function nc(){ut=4,cs||(ke&4194048)!==ke&&_n.current!==null||(Qi=!0),(us&134217727)===0&&(ri&134217727)===0||Ge===null||fs(Ge,ke,En,!1)}function Th(r,s,a){var c=Me;Me|=2;var h=Ly(),p=My();(Ge!==r||ke!==s)&&(ec=null,ea(r,s)),s=!1;var b=ut;e:do try{if(Ie!==0&&Re!==null){var S=Re,A=Sn;switch(Ie){case 8:Eh(),b=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(s=!0);var P=Ie;if(Ie=0,Sn=null,ta(r,S,A,P),a&&Qi){b=0;break e}break;default:P=Ie,Ie=0,Sn=null,ta(r,S,A,P)}}UT(),b=ut;break}catch(B){jy(r,B)}while(!0);return s&&r.shellSuspendCounter++,Rr=Ks=null,Me=c,L.H=h,L.A=p,Re===null&&(Ge=null,ke=0,Sl()),b}function UT(){for(;Re!==null;)Dy(Re)}function BT(r,s){var a=Me;Me|=2;var c=Ly(),h=My();Ge!==r||ke!==s?(ec=null,Wl=Rt()+500,ea(r,s)):Qi=tt(r,s);e:do try{if(Ie!==0&&Re!==null){s=Re;var p=Sn;t:switch(Ie){case 1:Ie=0,Sn=null,ta(r,s,p,1);break;case 2:case 9:if(Gm(p)){Ie=0,Sn=null,$y(s);break}s=function(){Ie!==2&&Ie!==9||Ge!==r||(Ie=7),lr(r)},p.then(s,s);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Gm(p)?(Ie=0,Sn=null,$y(s)):(Ie=0,Sn=null,ta(r,s,p,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var S=Re;if(b?Ev(b):S.stateNode.complete){Ie=0,Sn=null;var A=S.sibling;if(A!==null)Re=A;else{var P=S.return;P!==null?(Re=P,rc(P)):Re=null}break t}}Ie=0,Sn=null,ta(r,s,p,5);break;
vendor: 3,235 bytes, line 9
9case 6:Ie=0,Sn=null,ta(r,s,p,6);break;case 8:Eh(),ut=6;break e;default:throw Error(i(462))}}HT();break}catch(B){jy(r,B)}while(!0);return Rr=Ks=null,L.H=c,L.A=h,Me=a,Re!==null?0:(Ge=null,ke=0,Sl(),ut)}function HT(){for(;Re!==null&&!Tt();)Dy(Re)}function Dy(r){var s=oy(r.alternate,r,Lr);r.memoizedProps=r.pendingProps,s===null?rc(r):Re=s}function $y(r){var s=r,a=s.alternate;switch(s.tag){case 15:case 0:s=ty(a,s,s.pendingProps,s.type,void 0,ke);break;case 11:s=ty(a,s,s.pendingProps,s.type.render,s.ref,ke);break;case 5:Id(s);default:cy(a,s),s=Re=Mm(s,Lr),s=oy(a,s,Lr)}r.memoizedProps=r.pendingProps,s===null?rc(r):Re=s}function ta(r,s,a,c){Rr=Ks=null,Id(s),Vi=null,Xa=0;var h=s.return;try{if(xT(r,h,s,a,ke)){ut=1,Vl(r,Pn(a,r.current)),Re=null;return}}catch(p){if(h!==null)throw Re=h,p;ut=1,Vl(r,Pn(a,r.current)),Re=null;return}s.flags&32768?(Ce||c===1?r=!0:Qi||(ke&536870912)!==0?r=!1:(cs=r=!0,(c===2||c===9||c===3||c===6)&&(c=_n.current,c!==null&&c.tag===13&&(c.flags|=16384))),Iy(s,r)):rc(s)}function rc(r){var s=r;do{if((s.flags&32768)!==0){Iy(s,cs);return}r=s.return;var a=jT(s.alternate,s,Lr);if(a!==null){Re=a;return}if(s=s.sibling,s!==null){Re=s;return}Re=s=r}while(s!==null);ut===0&&(ut=5)}function Iy(r,s){do{var a=PT(r.alternate,r);if(a!==null){a.flags&=32767,Re=a;return}if(a=r.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&&(r=r.sibling,r!==null)){Re=r;return}Re=r=a}while(r!==null);ut=6,Re=null}function Uy(r,s,a,c,h,p,b,S,A){r.cancelPendingCommit=null;do sc();while(St!==0);if((Me&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(p=s.lanes|s.childLanes,p|=hd,Wt(r,a,p,b,S,A),r===Ge&&(Re=Ge=null,ke=0),Wi=s,hs=r,Mr=a,_h=p,wh=h,Cy=c,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,FT(vr,function(){return Zy(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||c){c=L.T,L.T=null,h=Y.p,Y.p=2,b=Me,Me|=4;try{LT(r,s,a)}finally{Me=b,Y.p=h,L.T=c}}St=1,By(),Hy(),qy()}}function By(){if(St===1){St=0;var r=hs,s=Wi,a=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var c=Y.p;Y.p=2;var h=Me;Me|=4;try{wy(s,r);var p=Mh,b=km(r.containerInfo),S=p.focusedElem,A=p.selectionRange;if(b!==S&&S&&S.ownerDocument&&Am(S.ownerDocument.documentElement,S)){if(A!==null&&od(S)){var P=A.start,B=A.end;if(B===void 0&&(B=P),"selectionStart"in S)S.selectionStart=P,S.selectionEnd=Math.min(B,S.value.length);else{var F=S.ownerDocument||document,M=F&&F.defaultView||window;if(M.getSelection){var $=M.getSelection(),ne=S.textContent.length,me=Math.min(A.start,ne),Ve=A.end===void 0?me:Math.min(A.end,ne);!$.extend&&me>Ve&&(b=Ve,Ve=me,me=b);var z=Rm(S,me),C=Rm(S,Ve);if(z&&C&&($.rangeCount!==1||$.anchorNode!==z.node||$.anchorOffset!==z.offset||$.focusNode!==C.node||$.focusOffset!==C.offset)){var j=F.createRange();j.setStart(z.node,z.offset),$.removeAllRanges(),me>Ve?($.addRange(j),$.extend(C.node,C.offset)):(j.setEnd(C.node,C.offset),$.addRange(j))}}}}for(F=[],$=S;$=$.parentNode;)$.nodeType===1&&F.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<F.length;S++){var Z=F[S];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}
vendor: 12,285 bytes, line 9
9gc=!!Lh,Mh=Lh=null}finally{Me=h,Y.p=c,L.T=a}}r.current=s,St=2}}function Hy(){if(St===2){St=0;var r=hs,s=Wi,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var c=Y.p;Y.p=2;var h=Me;Me|=4;try{gy(r,s.alternate,s)}finally{Me=h,Y.p=c,L.T=a}}St=3}}function qy(){if(St===4||St===3){St=0,nr();var r=hs,s=Wi,a=Mr,c=Cy;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?St=5:(St=0,Wi=hs=null,Vy(r,r.pendingLanes));var h=r.pendingLanes;if(h===0&&(ds=null),Zn(a),s=s.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot($s,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=L.T,h=Y.p,Y.p=2,L.T=null;try{for(var p=r.onRecoverableError,b=0;b<c.length;b++){var S=c[b];p(S.value,{componentStack:S.stack})}}finally{L.T=s,Y.p=h}}(Mr&3)!==0&&sc(),lr(r),h=r.pendingLanes,(a&261930)!==0&&(h&42)!==0?r===Sh?go++:(go=0,Sh=r):go=0,yo(0)}}function Vy(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Ja(s)))}function sc(){return By(),Hy(),qy(),Zy()}function Zy(){if(St!==5)return!1;var r=hs,s=_h;_h=0;var a=Zn(Mr),c=L.T,h=Y.p;try{Y.p=32>a?32:a,L.T=null,a=wh,wh=null;var p=hs,b=Mr;if(St=0,Wi=hs=null,Mr=0,(Me&6)!==0)throw Error(i(331));var S=Me;if(Me|=4,Ay(p.current),Ey(p,p.current,b,a),Me=S,yo(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot($s,p)}catch{}return!0}finally{Y.p=h,L.T=c,Vy(r,s)}}function Fy(r,s,a){s=Pn(a,s),s=eh(r.stateNode,s,2),r=is(r,s,2),r!==null&&(at(r,2),lr(r))}function Ue(r,s,a){if(r.tag===3)Fy(r,r,a);else for(;s!==null;){if(s.tag===3){Fy(s,r,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ds===null||!ds.has(c))){r=Pn(a,r),a=Gg(2),c=is(s,a,2),c!==null&&(Kg(a,c,s,r),at(c,2),lr(c));break}}s=s.return}}function Rh(r,s,a){var c=r.pingCache;if(c===null){c=r.pingCache=new $T;var h=new Set;c.set(s,h)}else h=c.get(s),h===void 0&&(h=new Set,c.set(s,h));h.has(a)||(yh=!0,h.add(a),r=qT.bind(null,r,s,a),s.then(r,r))}function qT(r,s,a){var c=r.pingCache;c!==null&&c.delete(s),r.pingedLanes|=r.suspendedLanes&a,r.warmLanes&=~a,Ge===r&&(ke&a)===a&&(ut===4||ut===3&&(ke&62914560)===ke&&300>Rt()-Xl?(Me&2)===0&&ea(r,0):vh|=a,Xi===ke&&(Xi=0)),lr(r)}function Gy(r,s){s===0&&(s=Bt()),r=Zs(r,s),r!==null&&(at(r,s),lr(r))}function VT(r){var s=r.memoizedState,a=0;s!==null&&(a=s.retryLane),Gy(r,a)}function ZT(r,s){var a=0;switch(r.tag){case 31:case 13:var c=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(s),Gy(r,a)}function FT(r,s){return yn(r,s)}var ic=null,na=null,Ah=!1,ac=!1,kh=!1,ps=0;function lr(r){r!==na&&r.next===null&&(na===null?ic=na=r:na=na.next=r),ac=!0,Ah||(Ah=!0,KT())}function yo(r,s){if(!kh&&ac){kh=!0;do for(var a=!1,c=ic;c!==null;){if(r!==0){var h=c.pendingLanes;if(h===0)var p=0;else{var b=c.suspendedLanes,S=c.pingedLanes;p=(1<<31-Ut(42|r)+1)-1,p&=h&~(b&~S),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,Qy(c,p))}else p=ke,p=ve(c,c===Ge?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||tt(c,p)||(a=!0,Qy(c,p));c=c.next}while(a);kh=!1}}function GT(){Ky()}function Ky(){ac=Ah=!1;var r=0;ps!==0&&s1()&&(r=ps);for(var s=Rt(),a=null,c=ic;c!==null;){var h=c.next,p=Yy(c,s);p===0?(c.next=null,a===null?ic=h:a.next=h,h===null&&(na=a)):(a=c,(r!==0||(p&3)!==0)&&(ac=!0)),c=h}St!==0&&St!==5||yo(r),ps!==0&&(ps=0)}function Yy(r,s){for(var a=r.suspendedLanes,c=r.pingedLanes,h=r.expirationTimes,p=r.pendingLanes&-62914561;0<p;){var b=31-Ut(p),S=1<<b,A=h[b];A===-1?((S&a)===0||(S&c)!==0)&&(h[b]=At(S,s)):A<=s&&(r.expiredLanes|=S),p&=~S}if(s=Ge,a=ke,a=ve(r,r===s?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,a===0||r===s&&(Ie===2||Ie===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Ds(c),r.callbackNode=null,r.callbackPriority=0;if((a&3)===0||tt(r,a)){if(s=a&-a,s===r.callbackPriority)return s;switch(c!==null&&Ds(c),Zn(a)){case 2:case 8:a=xn;break;case 32:a=vr;break;case 268435456:a=br;break;default:a=vr}return c=Jy.bind(null,r),a=yn(a,c),r.callbackPriority=s,r.callbackNode=a,s}return c!==null&&c!==null&&Ds(c),r.callbackPriority=2,r.callbackNode=null,2}function Jy(r,s){if(St!==0&&St!==5)return r.callbackNode=null,r.callbackPriority=0,null;var a=r.callbackNode;if(sc()&&r.callbackNode!==a)return null;var c=ke;return c=ve(r,r===Ge?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(Ny(r,c,s),Yy(r,Rt()),r.callbackNode!=null&&r.callbackNode===a?Jy.bind(null,r):null)}function Qy(r,s){if(sc())return null;Ny(r,s,!0)}function KT(){a1(function(){(Me&6)!==0?yn(lt,GT):Ky()})}function Oh(){if(ps===0){var r=Bi;r===0&&(r=_i,_i<<=1,(_i&261888)===0&&(_i=256)),ps=r}return ps}function Xy(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:pl(""+r)}function Wy(r,s){var a=s.ownerDocument.createElement("input");return a.name=s.name,a.value=s.value,r.id&&a.setAttribute("form",r.id),s.parentNode.insertBefore(a,s),r=new FormData(r),a.parentNode.removeChild(a),r}function YT(r,s,a,c,h){if(s==="submit"&&a&&a.stateNode===h){var p=Xy((h[nn]||null).action),b=c.submitter;b&&(s=(s=b[nn]||null)?Xy(s.formAction):b.getAttribute("formAction"),s!==null&&(p=s,b=null));var S=new vl("action","action",null,c,h);r.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ps!==0){var A=b?Wy(h,b):new FormData(h);Kd(a,{pending:!0,data:A,method:h.method,action:p},null,A)}}else typeof p=="function"&&(S.preventDefault(),A=b?Wy(h,b):new FormData(h),Kd(a,{pending:!0,data:A,method:h.method,action:p},p,A))},currentTarget:h}]})}}for(var Ch=0;Ch<dd.length;Ch++){var xh=dd[Ch],JT=xh.toLowerCase(),QT=xh[0].toUpperCase()+xh.slice(1);Fn(JT,"on"+QT)}Fn(xm,"onAnimationEnd"),Fn(Nm,"onAnimationIteration"),Fn(zm,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn(fT,"onTransitionRun"),Fn(pT,"onTransitionStart"),Fn(mT,"onTransitionCancel"),Fn(jm,"onTransitionEnd"),ki("onMouseEnter",["mouseout","mouseover"]),ki("onMouseLeave",["mouseout","mouseover"]),ki("onPointerEnter",["pointerout","pointerover"]),ki("onPointerLeave",["pointerout","pointerover"]),Bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vo="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(" "),XT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vo));function ev(r,s){s=(s&4)!==0;for(var a=0;a<r.length;a++){var c=r[a],h=c.event;c=c.listeners;e:{var p=void 0;if(s)for(var b=c.length-1;0<=b;b--){var S=c[b],A=S.instance,P=S.currentTarget;if(S=S.listener,A!==p&&h.isPropagationStopped())break e;p=S,h.currentTarget=P;try{p(h)}catch(B){wl(B)}h.currentTarget=null,p=A}else for(b=0;b<c.length;b++){if(S=c[b],A=S.instance,P=S.currentTarget,S=S.listener,A!==p&&h.isPropagationStopped())break e;p=S,h.currentTarget=P;try{p(h)}catch(B){wl(B)}h.currentTarget=null,p=A}}}}function Ae(r,s){var a=s[qu];a===void 0&&(a=s[qu]=new Set);var c=r+"__bubble";a.has(c)||(tv(s,r,2,!1),a.add(c))}function Nh(r,s,a){var c=0;s&&(c|=4),tv(a,r,c,s)}var oc="_reactListening"+Math.random().toString(36).slice(2);function zh(r){if(!r[oc]){r[oc]=!0,Kp.forEach(function(a){a!=="selectionchange"&&(XT.has(a)||Nh(a,!1,r),Nh(a,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[oc]||(s[oc]=!0,Nh("selectionchange",!1,s))}}function tv(r,s,a,c){switch(xv(s)){case 2:var h=A1;break;case 8:h=k1;break;default:h=Gh}a=h.bind(null,s,a,r),h=void 0,!Xu||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),c?h!==void 0?r.addEventListener(s,a,{capture:!0,passive:h}):r.addEventListener(s,a,!0):h!==void 0?r.addEventListener(s,a,{passive:h}):r.addEventListener(s,a,!1)}function jh(r,s,a,c,h){var p=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var b=c.tag;if(b===3||b===4){var S=c.stateNode.containerInfo;if(S===h)break;if(b===4)for(b=c.return;b!==null;){var A=b.tag;if((A===3||A===4)&&b.stateNode.containerInfo===h)return;b=b.return}for(;S!==null;){if(b=Ti(S),b===null)return;if(A=b.tag,A===5||A===6||A===26||A===27){c=p=b;continue e}S=S.parentNode}}c=c.return}am(function(){var P=p,B=Ju(a),F=[];e:{var M=Pm.get(r);if(M!==void 0){var $=vl,ne=r;switch(r){case"keypress":if(gl(a)===0)break e;case"keydown":case"keyup":$=ZE;break;case"focusin":ne="focus",$=nd;break;case"focusout":ne="blur",$=nd;break;case"beforeblur":case"afterblur":$=nd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=cm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=jE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=KE;break;case xm:case Nm:case zm:$=ME;break;case jm:$=JE;break;case"scroll":case"scrollend":$=NE;break;case"wheel":$=XE;break;case"copy":case"cut":case"paste":$=$E;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=dm;break;case"toggle":case"beforetoggle":$=eT}var me=(s&4)!==0,Ve=!me&&(r==="scroll"||r==="scrollend"),z=me?M!==null?M+"Capture":null:M;me=[];for(var C=P,j;C!==null;){var Z=C;if(j=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||j===null||z===null||(Z=Ia(C,z),Z!=null&&me.push(bo(C,Z,j))),Ve)break;C=C.return}0<me.length&&(M=new $(M,ne,null,a,B),F.push({event:M,listeners:me}))}}if((s&7)===0){e:{if(M=r==="mouseover"||r==="pointerover",$=r==="mouseout"||r==="pointerout",M&&a!==Yu&&(ne=a.relatedTarget||a.fromElement)&&(Ti(ne)||ne[Ei]))break e;if(($||M)&&(M=B.window===B?B:(M=B.ownerDocument)?M.defaultView||M.parentWindow:window,$?(ne=a.relatedTarget||a.toElement,$=P,ne=ne?Ti(ne):null,ne!==null&&(Ve=l(ne),me=ne.tag,ne!==Ve||me!==5&&me!==27&&me!==6)&&(ne=null)):($=null,ne=P),$!==ne)){if(me=cm,Z="onMouseLeave",z="onMouseEnter",C="mouse",(r==="pointerout"||r==="pointerover")&&(me=dm,Z="onPointerLeave",z="onPointerEnter",C="pointer"),Ve=$==null?M:$a($),j=ne==null?M:$a(ne),M=new me(Z,C+"leave",$,a,B),M.target=Ve,M.relatedTarget=j,Z=null,Ti(B)===P&&(me=new me(z,C+"enter",ne,a,B),me.target=j,me.relatedTarget=Ve,Z=me),Ve=Z,$&&ne)t:{for(me=WT,z=$,C=ne,j=0,Z=z;Z;Z=me(Z))j++;Z=0;for(var fe=C;fe;fe=me(fe))Z++;for(;0<j-Z;)z=me(z),j--;for(;0<Z-j;)C=me(C),Z--;for(;j--;){if(z===C||C!==null&&z===C.alternate){me=z;break t}z=me(z),C=me(C)}me=null}else me=null;$!==null&&nv(F,M,$,me,!1),ne!==null&&Ve!==null&&nv(F,Ve,ne,me,!0)}}e:{if(M=P?$a(P):window,$=M.nodeName&&M.nodeName.toLowerCase(),$==="select"||$==="input"&&M.type==="file")var je=bm;else if(ym(M))if(_m)je=uT;else{je=lT;var ae=oT}else $=M.nodeName,!$||$.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?P&&Ku(P.elementType)&&(je=bm):je=cT;if(je&&(je=je(r,P))){vm(F,je,a,B);break e}ae&&ae(r,M,P),r==="focusout"&&P&&M.type==="number"&&P.memoizedProps.value!=null&&Gu(M,"number",M.value)}switch(ae=P?$a(P):window,r){case"focusin":(ym(ae)||ae.contentEditable==="true")&&(ji=ae,ld=P,Ga=null);break;case"focusout":Ga=ld=ji=null;break;case"mousedown":cd=!0;break;case"contextmenu":case"mouseup":case"dragend":cd=!1,Om(F,a,B);break;case"selectionchange":if(hT)break;case"keydown":case"keyup":Om(F,a,B)}var Se;if(sd)e:{switch(r){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else zi?mm(r,a)&&(Oe="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(Oe="onCompositionStart");
vendor: 1,348 bytes, lines 9-10
9Oe&&(hm&&a.locale!=="ko"&&(zi||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&zi&&(Se=om()):(Xr=B,Wu="value"in Xr?Xr.value:Xr.textContent,zi=!0)),ae=lc(P,Oe),0<ae.length&&(Oe=new um(Oe,r,null,a,B),F.push({event:Oe,listeners:ae}),Se?Oe.data=Se:(Se=gm(a),Se!==null&&(Oe.data=Se)))),(Se=nT?rT(r,a):sT(r,a))&&(Oe=lc(P,"onBeforeInput"),0<Oe.length&&(ae=new um("onBeforeInput","beforeinput",null,a,B),F.push({event:ae,listeners:Oe}),ae.data=Se)),YT(F,r,P,a,B)}ev(F,s)})}function bo(r,s,a){return{instance:r,listener:s,currentTarget:a}}function lc(r,s){for(var a=s+"Capture",c=[];r!==null;){var h=r,p=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||p===null||(h=Ia(r,a),h!=null&&c.unshift(bo(r,h,p)),h=Ia(r,s),h!=null&&c.push(bo(r,h,p))),r.tag===3)return c;r=r.return}return[]}function WT(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function nv(r,s,a,c,h){for(var p=s._reactName,b=[];a!==null&&a!==c;){var S=a,A=S.alternate,P=S.stateNode;if(S=S.tag,A!==null&&A===c)break;S!==5&&S!==26&&S!==27||P===null||(A=P,h?(P=Ia(a,p),P!=null&&b.unshift(bo(a,P,A))):h||(P=Ia(a,p),P!=null&&b.push(bo(a,P,A)))),a=a.return}b.length!==0&&r.push({event:s,listeners:b})}var e1=/\r\n?/g,t1=/\u0000|\uFFFD/g;function rv(r){return(typeof r=="string"?r:""+r).replace(e1,` 10`).replace(t1,"")}function sv(r,s){return s=rv(s),rv(r)===s}
vendor: 5,780 bytes, line 10
10function qe(r,s,a,c,h,p){switch(a){case"children":typeof c=="string"?s==="body"||s==="textarea"&&c===""||Ci(r,c):(typeof c=="number"||typeof c=="bigint")&&s!=="body"&&Ci(r,""+c);break;case"className":hl(r,"class",c);break;case"tabIndex":hl(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":hl(r,a,c);break;case"style":sm(r,c,p);break;case"data":if(s!=="object"){hl(r,"data",c);break}case"src":case"href":if(c===""&&(s!=="a"||a!=="href")){r.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(a);break}c=pl(""+c),r.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(a,"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 p=="function"&&(a==="formAction"?(s!=="input"&&qe(r,s,"name",h.name,h,null),qe(r,s,"formEncType",h.formEncType,h,null),qe(r,s,"formMethod",h.formMethod,h,null),qe(r,s,"formTarget",h.formTarget,h,null)):(qe(r,s,"encType",h.encType,h,null),qe(r,s,"method",h.method,h,null),qe(r,s,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(a);break}c=pl(""+c),r.setAttribute(a,c);break;case"onClick":c!=null&&(r.onclick=wr);break;case"onScroll":c!=null&&Ae("scroll",r);break;case"onScrollEnd":c!=null&&Ae("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(i(60));r.innerHTML=a}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}a=pl(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(a,""+c):r.removeAttribute(a);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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(a,""):r.removeAttribute(a);break;case"capture":case"download":c===!0?r.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(a,c):r.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(a,c):r.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(a):r.setAttribute(a,c);break;case"popover":Ae("beforetoggle",r),Ae("toggle",r),dl(r,"popover",c);break;case"xlinkActuate":_r(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":_r(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":_r(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":_r(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":_r(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":_r(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":_r(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":_r(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":_r(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":dl(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=CE.get(a)||a,dl(r,a,c))}}function Ph(r,s,a,c,h,p){switch(a){case"style":sm(r,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(i(60));r.innerHTML=a}}break;case"children":typeof c=="string"?Ci(r,c):(typeof c=="number"||typeof c=="bigint")&&Ci(r,""+c);break;case"onScroll":c!=null&&Ae("scroll",r);break;case"onScrollEnd":c!=null&&Ae("scrollend",r);break;case"onClick":c!=null&&(r.onclick=wr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yp.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),s=a.slice(2,h?a.length-7:void 0),p=r[nn]||null,p=p!=null?p[a]:null,typeof p=="function"&&r.removeEventListener(s,p,h),typeof c=="function")){typeof p!="function"&&p!==null&&(a in r?r[a]=null:r.hasAttribute(a)&&r.removeAttribute(a)),r.addEventListener(s,c,h);break e}a in r?r[a]=c:c===!0?r.setAttribute(a,""):dl(r,a,c)}}}function Mt(r,s,a){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",r),Ae("load",r);var c=!1,h=!1,p;for(p in a)if(a.hasOwnProperty(p)){var b=a[p];if(b!=null)switch(p){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:qe(r,s,p,b,a,null)}}
vendor: 4,186 bytes, line 10
10h&&qe(r,s,"srcSet",a.srcSet,a,null),c&&qe(r,s,"src",a.src,a,null);return;case"input":Ae("invalid",r);var S=p=b=h=null,A=null,P=null;for(c in a)if(a.hasOwnProperty(c)){var B=a[c];if(B!=null)switch(c){case"name":h=B;break;case"type":b=B;break;case"checked":A=B;break;case"defaultChecked":P=B;break;case"value":p=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(i(137,s));break;default:qe(r,s,c,B,a,null)}}em(r,p,S,A,P,b,h,!1);return;case"select":Ae("invalid",r),c=b=p=null;for(h in a)if(a.hasOwnProperty(h)&&(S=a[h],S!=null))switch(h){case"value":p=S;break;case"defaultValue":b=S;break;case"multiple":c=S;default:qe(r,s,h,S,a,null)}s=p,a=b,r.multiple=!!c,s!=null?Oi(r,!!c,s,!1):a!=null&&Oi(r,!!c,a,!0);return;case"textarea":Ae("invalid",r),p=h=c=null;for(b in a)if(a.hasOwnProperty(b)&&(S=a[b],S!=null))switch(b){case"value":c=S;break;case"defaultValue":h=S;break;case"children":p=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(i(91));break;default:qe(r,s,b,S,a,null)}nm(r,c,h,p);return;case"option":for(A in a)a.hasOwnProperty(A)&&(c=a[A],c!=null)&&(A==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":qe(r,s,A,c,a,null));return;case"dialog":Ae("beforetoggle",r),Ae("toggle",r),Ae("cancel",r),Ae("close",r);break;case"iframe":case"object":Ae("load",r);break;case"video":case"audio":for(c=0;c<vo.length;c++)Ae(vo[c],r);break;case"image":Ae("error",r),Ae("load",r);break;case"details":Ae("toggle",r);break;case"embed":case"source":case"link":Ae("error",r),Ae("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in a)if(a.hasOwnProperty(P)&&(c=a[P],c!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:qe(r,s,P,c,a,null)}return;default:if(Ku(s)){for(B in a)a.hasOwnProperty(B)&&(c=a[B],c!==void 0&&Ph(r,s,B,c,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(c=a[S],c!=null&&qe(r,s,S,c,a,null))}function n1(r,s,a,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,p=null,b=null,S=null,A=null,P=null,B=null;for($ in a){var F=a[$];if(a.hasOwnProperty($)&&F!=null)switch($){case"checked":break;case"value":break;case"defaultValue":A=F;default:c.hasOwnProperty($)||qe(r,s,$,null,c,F)}}for(var M in c){var $=c[M];if(F=a[M],c.hasOwnProperty(M)&&($!=null||F!=null))switch(M){case"type":p=$;break;case"name":h=$;break;case"checked":P=$;break;case"defaultChecked":B=$;break;case"value":b=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,s));break;default:$!==F&&qe(r,s,M,$,c,F)}}Fu(r,b,S,A,P,B,p,h);return;case"select":$=b=S=M=null;for(p in a)if(A=a[p],a.hasOwnProperty(p)&&A!=null)switch(p){case"value":break;case"multiple":$=A;default:c.hasOwnProperty(p)||qe(r,s,p,null,c,A)}for(h in c)if(p=c[h],A=a[h],c.hasOwnProperty(h)&&(p!=null||A!=null))switch(h){case"value":M=p;break;case"defaultValue":S=p;break;case"multiple":b=p;default:p!==A&&qe(r,s,h,p,c,A)}s=S,a=b,c=$,M!=null?Oi(r,!!a,M,!1):!!c!=!!a&&(s!=null?Oi(r,!!a,s,!0):Oi(r,!!a,a?[]:"",!1));return;case"textarea":$=M=null;for(S in a)if(h=a[S],a.hasOwnProperty(S)&&h!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:qe(r,s,S,null,c,h)}for(b in c)if(h=c[b],p=a[b],c.hasOwnProperty(b)&&(h!=null||p!=null))switch(b){case"value":M=h;break;case"defaultValue":$=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==p&&qe(r,s,b,h,c,p)}tm(r,M,$);return;case"option":for(var ne in a)M=a[ne],a.hasOwnProperty(ne)&&M!=null&&!c.hasOwnProperty(ne)&&(ne==="selected"?r.selected=!1:qe(r,s,ne,null,c,M));for(A in c)M=c[A],$=a[A],c.hasOwnProperty(A)&&M!==$&&(M!=null||$!=null)&&(A==="selected"?r.selected=M&&typeof M!="function"&&typeof M!="symbol":qe(r,s,A,M,c,$));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 me in a)M=a[me],a.hasOwnProperty(me)&&M!=null&&!c.hasOwnProperty(me)&&qe(r,
vendor: 4,642 bytes, line 10
10s,me,null,c,M);for(P in c)if(M=c[P],$=a[P],c.hasOwnProperty(P)&&M!==$&&(M!=null||$!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(i(137,s));break;default:qe(r,s,P,M,c,$)}return;default:if(Ku(s)){for(var Ve in a)M=a[Ve],a.hasOwnProperty(Ve)&&M!==void 0&&!c.hasOwnProperty(Ve)&&Ph(r,s,Ve,void 0,c,M);for(B in c)M=c[B],$=a[B],!c.hasOwnProperty(B)||M===$||M===void 0&&$===void 0||Ph(r,s,B,M,c,$);return}}for(var z in a)M=a[z],a.hasOwnProperty(z)&&M!=null&&!c.hasOwnProperty(z)&&qe(r,s,z,null,c,M);for(F in c)M=c[F],$=a[F],!c.hasOwnProperty(F)||M===$||M==null&&$==null||qe(r,s,F,M,c,$)}function iv(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function r1(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var h=a[c],p=h.transferSize,b=h.initiatorType,S=h.duration;if(p&&S&&iv(b)){for(b=0,S=h.responseEnd,c+=1;c<a.length;c++){var A=a[c],P=A.startTime;if(P>S)break;var B=A.transferSize,F=A.initiatorType;B&&iv(F)&&(A=A.responseEnd,b+=B*(A<S?1:(S-P)/(A-P)))}if(--c,s+=8*(p+b)/(h.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Lh=null,Mh=null;function cc(r){return r.nodeType===9?r:r.ownerDocument}function av(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ov(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function Dh(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var $h=null;function s1(){var r=window.event;return r&&r.type==="popstate"?r===$h?!1:($h=r,!0):($h=null,!1)}var lv=typeof setTimeout=="function"?setTimeout:void 0,i1=typeof clearTimeout=="function"?clearTimeout:void 0,cv=typeof Promise=="function"?Promise:void 0,a1=typeof queueMicrotask=="function"?queueMicrotask:typeof cv<"u"?function(r){return cv.resolve(null).then(r).catch(o1)}:lv;function o1(r){setTimeout(function(){throw r})}function ms(r){return r==="head"}function uv(r,s){var a=s,c=0;do{var h=a.nextSibling;if(r.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(c===0){r.removeChild(h),aa(s);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")_o(r.ownerDocument.documentElement);else if(a==="head"){a=r.ownerDocument.head,_o(a);for(var p=a.firstChild;p;){var b=p.nextSibling,S=p.nodeName;p[Da]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}else a==="body"&&_o(r.ownerDocument.body);a=h}while(a);aa(s)}function dv(r,s){var a=r;r=0;do{var c=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(s?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(r===0)break;r--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||r++;a=c}while(a)}function Ih(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Ih(a),Vu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}r.removeChild(a)}}function l1(r,s,a,c){for(;r.nodeType===1;){var h=a;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Da])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(p=r.getAttribute("rel"),p==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(p!==h.rel||r.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||r.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||r.getAttribute("title")!==(h.title==null?null:h.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(p=r.getAttribute("src"),(p!==(h.src==null?null:h.src)||r.getAttribute("type")!==(h.type==null?null:h.type)||r.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&p&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var p=h.name==null?null:""+h.name;
vendor: 5,006 bytes, line 10
10if(h.type==="hidden"&&r.getAttribute("name")===p)return r}else return r;if(r=In(r.nextSibling),r===null)break}return null}function c1(r,s,a){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=In(r.nextSibling),r===null))return null;return r}function hv(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=In(r.nextSibling),r===null))return null;return r}function Uh(r){return r.data==="$?"||r.data==="$~"}function Bh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function u1(r,s){var a=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||a.readyState!=="loading")s();else{var c=function(){s(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function In(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var Hh=null;function fv(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"||a==="/&"){if(s===0)return In(r.nextSibling);s--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||s++}r=r.nextSibling}return null}function pv(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(s===0)return r;s--}else a!=="/$"&&a!=="/&"||s++}r=r.previousSibling}return null}function mv(r,s,a){switch(s=cc(a),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function _o(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);Vu(r)}var Un=new Map,gv=new Set;function uc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Dr=Y.d;Y.d={f:d1,r:h1,D:f1,C:p1,L:m1,m:g1,X:v1,S:y1,M:b1};function d1(){var r=Dr.f(),s=tc();return r||s}function h1(r){var s=Ri(r);s!==null&&s.tag===5&&s.type==="form"?jg(s):Dr.r(r)}var ra=typeof document>"u"?null:document;function yv(r,s,a){var c=ra;if(c&&typeof s=="string"&&s){var h=zn(s);h='link[rel="'+r+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),gv.has(h)||(gv.add(h),r={rel:r,crossOrigin:a,href:s},c.querySelector(h)===null&&(s=c.createElement("link"),Mt(s,"link",r),kt(s),c.head.appendChild(s)))}}function f1(r){Dr.D(r),yv("dns-prefetch",r,null)}function p1(r,s){Dr.C(r,s),yv("preconnect",r,s)}function m1(r,s,a){Dr.L(r,s,a);var c=ra;if(c&&r&&s){var h='link[rel="preload"][as="'+zn(s)+'"]';s==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+zn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+zn(a.imageSizes)+'"]')):h+='[href="'+zn(r)+'"]';var p=h;switch(s){case"style":p=sa(r);break;case"script":p=ia(r)}Un.has(p)||(r=g({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:r,as:s},a),Un.set(p,r),c.querySelector(h)!==null||s==="style"&&c.querySelector(wo(p))||s==="script"&&c.querySelector(So(p))||(s=c.createElement("link"),Mt(s,"link",r),kt(s),c.head.appendChild(s)))}}function g1(r,s){Dr.m(r,s);var a=ra;if(a&&r){var c=s&&typeof s.as=="string"?s.as:"script",h='link[rel="modulepreload"][as="'+zn(c)+'"][href="'+zn(r)+'"]',p=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=ia(r)}if(!Un.has(p)&&(r=g({rel:"modulepreload",href:r},s),Un.set(p,r),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(So(p)))return}c=a.createElement("link"),Mt(c,"link",r),kt(c),a.head.appendChild(c)}}}function y1(r,s,a){Dr.S(r,s,a);var c=ra;if(c&&r){var h=Ai(c).hoistableStyles,p=sa(r);s=s||"default";var b=h.get(p);if(!b){var S={loading:0,preload:null};if(b=c.querySelector(wo(p)))S.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":s},a),(a=Un.get(p))&&qh(r,a);var A=b=c.createElement("link");kt(A),Mt(A,"link",r),A._p=new Promise(function(P,B){A.onload=P,A.onerror=B}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,dc(b,s,c)}b={type:"stylesheet",instance:b,count:1,state:S},h.set(p,b)}}}function v1(r,s){Dr.X(r,s);var a=ra;if(a&&r){var c=Ai(a).hoistableScripts,h=ia(r),p=c.get(h);p||(p=a.querySelector(So(h)),p||(r=g({src:r,async:!0},s),(s=Un.get(h))&&Vh(r,s),p=a.createElement("script"),kt(p),Mt(p,"link",r),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function b1(r,s){Dr.M(r,s);var a=ra;if(a&&r){var c=Ai(a).hoistableScripts,h=ia(r),p=c.get(h);p||(p=a.querySelector(So(h)),p||(r=g({src:r,async:!0,type:"module"},s),(s=Un.get(h))&&Vh(r,s),p=a.createElement("script"),kt(p),Mt(p,"link",r),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}
vendor: 4,821 bytes, line 10
10function vv(r,s,a,c){var h=(h=pe.current)?uc(h):null;if(!h)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=sa(a.href),a=Ai(h).hoistableStyles,c=a.get(s),c||(c={type:"style",instance:null,count:0,state:null},a.set(s,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){r=sa(a.href);var p=Ai(h).hoistableStyles,b=p.get(r);if(b||(h=h.ownerDocument||h,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(r,b),(p=h.querySelector(wo(r)))&&!p._p&&(b.instance=p,b.state.loading=5),Un.has(r)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Un.set(r,a),p||_1(h,r,a,b.state))),s&&c===null)throw Error(i(528,""));return b}if(s&&c!==null)throw Error(i(529,""));return null;case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ia(a),a=Ai(h).hoistableScripts,c=a.get(s),c||(c={type:"script",instance:null,count:0,state:null},a.set(s,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function sa(r){return'href="'+zn(r)+'"'}function wo(r){return'link[rel="stylesheet"]['+r+"]"}function bv(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function _1(r,s,a,c){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?c.loading=1:(s=r.createElement("link"),c.preload=s,s.addEventListener("load",function(){return c.loading|=1}),s.addEventListener("error",function(){return c.loading|=2}),Mt(s,"link",a),kt(s),r.head.appendChild(s))}function ia(r){return'[src="'+zn(r)+'"]'}function So(r){return"script[async]"+r}function _v(r,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var c=r.querySelector('style[data-href~="'+zn(a.href)+'"]');if(c)return s.instance=c,kt(c),c;var h=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),kt(c),Mt(c,"style",h),dc(c,a.precedence,r),s.instance=c;case"stylesheet":h=sa(a.href);var p=r.querySelector(wo(h));if(p)return s.state.loading|=4,s.instance=p,kt(p),p;c=bv(a),(h=Un.get(h))&&qh(c,h),p=(r.ownerDocument||r).createElement("link"),kt(p);var b=p;return b._p=new Promise(function(S,A){b.onload=S,b.onerror=A}),Mt(p,"link",c),s.state.loading|=4,dc(p,a.precedence,r),s.instance=p;case"script":return p=ia(a.src),(h=r.querySelector(So(p)))?(s.instance=h,kt(h),h):(c=a,(h=Un.get(p))&&(c=g({},a),Vh(c,h)),r=r.ownerDocument||r,h=r.createElement("script"),kt(h),Mt(h,"link",c),r.head.appendChild(h),s.instance=h);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,dc(c,a.precedence,r));return s.instance}function dc(r,s,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,p=h,b=0;b<c.length;b++){var S=c[b];if(S.dataset.precedence===s)p=S;else if(p!==h)break}p?p.parentNode.insertBefore(r,p.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(r,s.firstChild))}function qh(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function Vh(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var hc=null;function wv(r,s,a){if(hc===null){var c=new Map,h=hc=new Map;h.set(a,c)}else h=hc,c=h.get(a),c||(c=new Map,h.set(a,c));if(c.has(r))return c;for(c.set(r,null),a=a.getElementsByTagName(r),h=0;h<a.length;h++){var p=a[h];if(!(p[Da]||p[zt]||r==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var b=p.getAttribute(s)||"";b=r+b;var S=c.get(b);S?S.push(p):c.set(b,[p])}}return c}function Sv(r,s,a){r=r.ownerDocument||r,r.head.insertBefore(a,s==="title"?r.querySelector("head > title"):null)}function w1(r,s,a){if(a===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Ev(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function S1(r,s,a,c){if(a.type==="stylesheet"&&(typeof c.media!="str
10ing"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=sa(c.href),p=s.querySelector(wo(h));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=fc.bind(r),s.then(r,r)),a.state.loading|=4,a.instance=p,kt(p);return}p=s.ownerDocument||s,c=bv(c),(h=Un.get(h))&&qh(c,h),p=p.createElement("link"),kt(p);var b=p;b._p=new Promise(function(S,A){b.onload=S,b.onerror=A}),Mt(p,"link",c),a.instance=p}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(r.count++,a=fc.bind(r),s.addEventListener("load",a),s.addEventListener("error",a))}}var Zh=0;function E1(r,s){return r.stylesheets&&r.count===0&&mc(r,r.stylesheets),0<r.count||0<r.imgCount?function(a){var c=setTimeout(function(){if(r.stylesheets&&mc(r,r.stylesheets),r.unsuspend){var p=r.unsuspend;r.unsuspend=null,p()}},6e4+s);0<r.imgBytes&&Zh===0&&(Zh=62500*r1());var h=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&mc(r,r.stylesheets),r.unsuspend)){var p=r.unsuspend;r.unsuspend=null,p()}},(r.imgBytes>Zh?50:800)+s);return r.unsuspend=a,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var pc=null;function mc(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,pc=new Map,s.forEac
vendor: 11,281 bytes, line 10
10h(T1,r),pc=null,fc.call(r))}function T1(r,s){if(!(s.state.loading&4)){var a=pc.get(r);if(a)var c=a.get(null);else{a=new Map,pc.set(r,a);for(var h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<h.length;p++){var b=h[p];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),c=b)}c&&a.set(null,c)}h=s.instance,b=h.getAttribute("data-precedence"),p=a.get(b)||c,p===c&&a.set(null,h),a.set(b,h),this.count++,c=fc.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),p?p.parentNode.insertBefore(h,p.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(h,r.firstChild)),s.state.loading|=4}}var Eo={$$typeof:x,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function R1(r,s,a,c,h,p,b,S,A){this.tag=1,this.containerInfo=r,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=Jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jr(0),this.hiddenUpdates=Jr(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Tv(r,s,a,c,h,p,b,S,A,P,B,F){return r=new R1(r,s,a,b,A,P,B,F,S),s=1,p===!0&&(s|=24),p=bn(3,null,null,s),r.current=p,p.stateNode=r,s=Td(),s.refCount++,r.pooledCache=s,s.refCount++,p.memoizedState={element:c,isDehydrated:a,cache:s},Od(p),r}function Rv(r){return r?(r=Mi,r):Mi}function Av(r,s,a,c,h,p){h=Rv(h),c.context===null?c.context=h:c.pendingContext=h,c=ss(s),c.payload={element:a},p=p===void 0?null:p,p!==null&&(c.callback=p),a=is(r,c,s),a!==null&&(cn(a,r,s),eo(a,r,s))}function kv(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<s?a:s}}function Fh(r,s){kv(r,s),(r=r.alternate)&&kv(r,s)}function Ov(r){if(r.tag===13||r.tag===31){var s=Zs(r,67108864);s!==null&&cn(s,r,67108864),Fh(r,67108864)}}function Cv(r){if(r.tag===13||r.tag===31){var s=Tn();s=Si(s);var a=Zs(r,s);a!==null&&cn(a,r,s),Fh(r,s)}}var gc=!0;function A1(r,s,a,c){var h=L.T;L.T=null;var p=Y.p;try{Y.p=2,Gh(r,s,a,c)}finally{Y.p=p,L.T=h}}function k1(r,s,a,c){var h=L.T;L.T=null;var p=Y.p;try{Y.p=8,Gh(r,s,a,c)}finally{Y.p=p,L.T=h}}function Gh(r,s,a,c){if(gc){var h=Kh(c);if(h===null)jh(r,s,c,yc,a),Nv(r,c);else if(C1(h,r,s,a,c))c.stopPropagation();else if(Nv(r,c),s&4&&-1<O1.indexOf(r)){for(;h!==null;){var p=Ri(h);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var b=sr(p.pendingLanes);if(b!==0){var S=p;for(S.pendingLanes|=2,S.entangledLanes|=2;b;){var A=1<<31-Ut(b);S.entanglements[1]|=A,b&=~A}lr(p),(Me&6)===0&&(Wl=Rt()+500,yo(0))}}break;case 31:case 13:S=Zs(p,2),S!==null&&cn(S,p,2),tc(),Fh(p,2)}if(p=Kh(c),p===null&&jh(r,s,c,yc,a),p===h)break;h=p}h!==null&&c.stopPropagation()}else jh(r,s,c,null,a)}}function Kh(r){return r=Ju(r),Yh(r)}var yc=null;function Yh(r){if(yc=null,r=Ti(r),r!==null){var s=l(r);if(s===null)r=null;else{var a=s.tag;if(a===13){if(r=u(s),r!==null)return r;r=null}else if(a===31){if(r=d(s),r!==null)return r;r=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return yc=r,null}function xv(r){switch(r){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(Be()){case lt:return 2;case xn:return 8;case vr:case La:return 32;case br:return 268435456;default:return 32}default:return 32}}var Jh=!1,gs=null,ys=null,vs=null,To=new Map,Ro=new Map,bs=[],O1="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 Nv(r,s){switch(r){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":ys=null;break;case"mouseover":case"mouseout":vs=null;break;case"pointerover":case"pointerout":To.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ro.delete(s.pointerId)}}function Ao(r,s,a,c,h,p){return r===null||r.nativeEvent!==p?(r={blockedOn:s,domEventName:a,eventSystemFlags:c,nativeEvent:p,targetContainers:[h]},s!==null&&(s=Ri(s),s!==null&&Ov(s)),r):(r.eventSystemFlags|=c,s=r.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),r)}function C1(r,s,a,c,h){switch(s){case"focusin":return gs=Ao(gs,r,s,a,c,h),!0;case"dragenter":return ys=Ao(ys,r,s,a,c,h),!0;case"mouseover":return vs=Ao(vs,r,s,a,c,h),!0;case"pointerover":var p=h.pointerId;return To.set(p,Ao(To.get(p)||null,r,s,a,c,h)),!0;case"gotpointercapture":return p=h.pointerId,Ro.set(p,Ao(Ro.get(p)||null,r,s,a,c,h)),!0}return!1}function zv(r){var s=Ti(r.target);if(s!==null){var a=l(s);if(a!==null){if(s=a.tag,s===13){if(s=u(a),s!==null){r.blockedOn=s,Fp(r.priority,function(){Cv(a)});return}}else if(s===31){if(s=d(a),s!==null){r.blockedOn=s,Fp(r.priority,function(){Cv(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function vc(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var a=Kh(r.nativeEvent);if(a===null){a=r.nativeEvent;var c=new a.constructor(a.type,a);Yu=c,a.target.dispatchEvent(c),Yu=null}else return s=Ri(a),s!==null&&Ov(s),r.blockedOn=a,!1;s.shift()}return!0}function jv(r,s,a){vc(r)&&a.delete(s)}function x1(){Jh=!1,gs!==null&&vc(gs)&&(gs=null),ys!==null&&vc(ys)&&(ys=null),vs!==null&&vc(vs)&&(vs=null),To.forEach(jv),Ro.forEach(jv)}function bc(r,s){r.blockedOn===s&&(r.blockedOn=null,Jh||(Jh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,x1)))}var _c=null;function Pv(r){_c!==r&&(_c=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){_c===r&&(_c=null);for(var s=0;s<r.length;s+=3){var a=r[s],c=r[s+1],h=r[s+2];if(typeof c!="function"){if(Yh(c||a)===null)continue;break}var p=Ri(a);p!==null&&(r.splice(s,3),s-=3,Kd(p,{pending:!0,data:h,method:a.method,action:c},c,h))}}))}function aa(r){function s(A){return bc(A,r)}gs!==null&&bc(gs,r),ys!==null&&bc(ys,r),vs!==null&&bc(vs,r),To.forEach(s),Ro.forEach(s);for(var a=0;a<bs.length;a++){var c=bs[a];c.blockedOn===r&&(c.blockedOn=null)}for(;0<bs.length&&(a=bs[0],a.blockedOn===null);)zv(a),a.blockedOn===null&&bs.shift();if(a=(r.ownerDocument||r).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var h=a[c],p=a[c+1],b=h[nn]||null;if(typeof p=="function")b||Pv(a);else if(b){var S=null;if(p&&p.hasAttribute("formAction")){if(h=p,b=p[nn]||null)S=b.formAction;else if(Yh(h)!==null)continue}else S=b.action;typeof S=="function"?a[c+1]=S:(a.splice(c,3),c-=3),Pv(a)}}}function Lv(){function r(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(b){return h=b})},focusReset:"manual",scroll:"manual"})}function s(){h!==null&&(h(),h=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),h!==null&&(h(),h=null)}}}function Qh(r){this._internalRoot=r}wc.prototype.render=Qh.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var a=s.current,c=Tn();Av(a,c,r,s,null,null)},wc.prototype.unmount=Qh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Av(r.current,2,null,r,null,null),tc(),s[Ei]=null}};function wc(r){this._internalRoot=r}wc.prototype.unstable_scheduleHydration=function(r){if(r){var s=Hu();r={blockedOn:null,target:r,priority:s};for(var a=0;a<bs.length&&s!==0&&s<bs[a].priority;a++);bs.splice(a,0,r),a===0&&zv(r)}};var Mv=t.version;if(Mv!=="19.2.5")throw Error(i(527,Mv,"19.2.5"));Y.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=m(s),r=r!==null?y(r):null,r=r===null?null:r.stateNode,r};var N1={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sc.isDisabled&&Sc.supportsFiber)try{$s=Sc.inject(N1),Vt=Sc}catch{}}return Oo.createRoot=function(r,s){if(!o(r))throw Error(i(299));var a=!1,c="",h=qg,p=Vg,b=Zg;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),s=Tv(r,1,!1,null,null,a,c,null,h,p,b,Lv),r[Ei]=s.current,zh(r),new Qh(s)},Oo.hydrateRoot=function(r,s,a){if(!o(r))throw Error(i(299));var c=!1,h="",p=qg,b=Vg,S=Zg,A=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),s=Tv(r,1,!0,s,a??null,c,h,A,p,b,S,Lv),s.context=Rv(null),a=s.current,c=Tn(),c=Si(c),h=ss(c),h.callback=null,is(a,h,c),a=c,s.current.lanes=a,at(s,a),lr(s),r[Ei]=s.current,zh(r),new wc(s)},Oo.version="19.2.5",Oo}var Fv;function B1(){if(Fv)return ef.exports;Fv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}
10return e(),ef.exports=U1(),ef.exports}var H1=B1(),q1="__TSS_CONTEXT",Mf=Symbol.for("TSS_SERVER_FUNCTION"),Gv=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),V1="application/x-tss-framed",$r={JSON:0,CHUNK:1,END:2,ERROR:3},Z1=/;\s*v=(\d+)/;function F1(e){const t=e.match(Z1);return t?parseInt(t[1],10):void 0}function G1(e){const t=F1(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var fp=()=>window.__TSS_START_OPTIONS__;const v_=!1;function Ho(e){return e[e.length-1]}function K1(e){return typeof e=="function"}function li(e,t){return K1(e)?e(t):e}const b_=Object.prototype.hasOwnProperty,Kv=Object.prototype.propertyIsEnumerable;function __(e){for(const t in e)if(b_.call(e,t))return!0;return!1}const Y1=()=>Object.create(null),si=(e,t)=>ci(e,t,Y1);function ci(e,t,n=()=>({}),i=0){if(e===t)return e;if(i>500)return t;const o=t,l=Qv(e)&&Qv(o);if(!l&&!(Xc(e)&&Xc(o)))return o;const u=l?e:Yv(e);if(!u)return o;const d=l?o:Yv(o);if(!d)return o;const f=u.length,m=d.length,y=l?new Array(m):n();let g=0;for(let v=0;v<m;v++){const _=l?v:d[v],w=e[_],R=o[_];if(w===R){y[_]=w,(l?v<f:b_.call(e,_))&&g++;continue}if(w===null||R===null||typeof w!="object"||typeof R!="object"){y[_]=R;continue}const E=ci(w,R,n,i+1);y[_]=E,E===w&&g++}return f===m&&g===f?e:y}function Yv(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Kv.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const i=t;for(const o of n){if(!Kv.call(e,o))return!1;i.push(o)}return i}function Xc(e){if(!Jv(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Jv(n)||!n.hasOwnProperty("isPrototypeOf"))}function Jv(e){return Object.prototype.toString.call(e)==="[object Object]"}function Qv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gt(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,o=e.length;i<o;i++)if(!Gt(e[i],t[i],n))return!1;return!0}if(Xc(e)&&Xc(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Gt(e[u],t[u],n))return!1;return!0}let o=0;if(!i)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>o||!Gt(e[u],t[u],n)))return!1;return o===l}return!1}function mi(e){let t,n;const i=new Promise((o,l)=>{t=o,n=l});return i.status="pending",i.resolve=o=>{i.status="resolved",i.value=o,t(o),e?.(o)},i.reject=o=>{i.status="rejected",n(o)},i}function J1(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function qo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const Q1=/[\x00-\x1f\x7f"<>`{}]/g;function X1(e){return e.replace(Q1,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Xv(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return X1(t)}const W1=["http:","https:","mailto:","tel:"];function Wc(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}const eR={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},tR=/[&><\u2028\u2029]/g;function nR(e){return e.replace(tR,t=>eR[t])}function Co(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,i="",o;for(;(o=t.exec(e))!==null;)i+=Xv(e.slice(n,o.index))+o[0],n=t.lastIndex;i=i+Xv(n?e.slice(n):e);let l=!1;return i.startsWith("//")&&(l=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:l}}function rR(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function sR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fn(){throw new Error("Invariant failed")}function Vo(e){const t=new Map;let n,i;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===i&&(i=void 0)}const d=t.get(l);if(d)d.value=u,o(d);else{const f={key:l,value:u,prev:i};i&&(i.next=f),i=f,n||(n=f),t.set(l,f)}},clear(){t.clear(),n=void 0,i=void 0}}}const As=4,w_=5;function iR(e){const t=e.indexOf("{");
10if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function S_(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),o=i===-1?e.length:i,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const d=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=d,n[4]=d,n[5]=d,n}if(l.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=iR(l);if(u){const[d,f]=u,m=l.charCodeAt(d+1);if(m===45){if(d+2<l.length&&l.charCodeAt(d+2)===36){const y=d+3,g=f;if(y<g)return n[0]=3,n[1]=t+d,n[2]=t+y,n[3]=t+g,n[4]=t+f+1,n[5]=o,n}}else if(m===36){const y=d+1,g=d+2;return g===f?(n[0]=2,n[1]=t+d,n[2]=t+y,n[3]=t+g,n[4]=t+f+1,n[5]=e.length,n):(n[0]=1,n[1]=t+d,n[2]=t+g,n[3]=t+f,n[4]=t+f+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function bu(e,t,n,i,o,l,u){u?.(n);let d=i;{const f=n.fullPath??n.from,m=f.length,y=n.options?.caseSensitive??e,g=n.options?.params?.parse??n.options?.parseParams;for(;d<m;){const _=S_(f,d,t);let w;const R=d,E=_[5];switch(d=E+1,l++,_[0]){case 0:{const T=f.substring(_[2],_[3]);if(y){const k=o.static?.get(T);if(k)w=k;else{o.static??=new Map;const x=ui(n.fullPath??n.from);x.parent=o,x.depth=l,w=x,o.static.set(T,x)}}else{const k=T.toLowerCase(),x=o.staticInsensitive?.get(k);if(x)w=x;else{o.staticInsensitive??=new Map;const N=ui(n.fullPath??n.from);N.parent=o,N.depth=l,w=N,o.staticInsensitive.set(k,N)}}break}case 1:{const T=f.substring(R,_[1]),k=f.substring(_[4],E),x=y&&!!(T||k),N=T?x?T:T.toLowerCase():void 0,I=k?x?k:k.toLowerCase():void 0,U=!g&&o.dynamic?.find(D=>!D.parse&&D.caseSensitive===x&&D.prefix===N&&D.suffix===I);if(U)w=U;else{const D=af(1,n.fullPath??n.from,x,N,I);w=D,D.depth=l,D.parent=o,o.dynamic??=[],o.dynamic.push(D)}break}case 3:{const T=f.substring(R,_[1]),k=f.substring(_[4],E),x=y&&!!(T||k),N=T?x?T:T.toLowerCase():void 0,I=k?x?k:k.toLowerCase():void 0,U=!g&&o.optional?.find(D=>!D.parse&&D.caseSensitive===x&&D.prefix===N&&D.suffix===I);if(U)w=U;else{const D=af(3,n.fullPath??n.from,x,N,I);w=D,D.parent=o,D.depth=l,o.optional??=[],o.optional.push(D)}break}case 2:{const T=f.substring(R,_[1]),k=f.substring(_[4],E),x=y&&!!(T||k),N=T?x?T:T.toLowerCase():void 0,I=k?x?k:k.toLowerCase():void 0,U=af(2,n.fullPath??n.from,x,N,I);w=U,U.parent=o,U.depth=l,o.wildcard??=[],o.wildcard.push(U)}}o=w}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const _=ui(n.fullPath??n.from);_.kind=w_,_.parent=o,l++,_.depth=l,o.pathless??=[],o.pathless.push(_),o=_}const v=(n.path||!n.children)&&!n.isRoot;if(v&&f.endsWith("/")){const _=ui(n.fullPath??n.from);_.kind=As,_.parent=o,l++,_.depth=l,o.index=_,o=_}o.parse=g??null,o.priority=n.options?.params?.priority??0,v&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)bu(e,t,f,d,o,l,u)}function sf(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ss(e){if(e.pathless)for(const t of e.pathless)Ss(t);if(e.static)for(const t of e.static.values())Ss(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ss(t);if(e.dynamic?.length){e.dynamic.sort(sf);for(const t of e.dynamic)Ss(t)}if(e.optional?.length){e.optional.sort(sf);for(const t of e.optional)Ss(t)}if(e.wildcard?.length){e.wildcard.sort(sf);for(const t of e.wildcard)Ss(t)}}function ui(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function af(e,t,n,i,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:i,suffix:o}}function aR(e,t){const n=ui("/"),i=new Uint16Array(6);
10for(const o of e)bu(!1,i,o,1,n,0);Ss(n),t.masksTree=n,t.flatCache=Vo(1e3)}function oR(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=pp(e,t.masksTree);return t.flatCache.set(e,i),i}function lR(e,t,n,i,o){e||="/",i||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);return u||(u=ui("/"),bu(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(l,u)),pp(i,u,n)}function cR(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,o=t.matchCache.get(i);if(o!==void 0)return o;e||="/";let l;try{l=pp(e,t.segmentTree,n)}catch(u){if(u instanceof URIError)l=null;else throw u}return l&&(l.branch=T_(l.route)),t.matchCache.set(i,l),l}function uR(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function dR(e,t=!1,n){const i=ui(e.fullPath),o=new Uint16Array(6),l={},u={};let d=0;return bu(t,o,e,1,i,0,f=>{if(n?.(f,d),f.id in l&&fn(),l[f.id]=f,d!==0&&f.path){const m=uR(f.fullPath);(!u[m]||f.fullPath.endsWith("/"))&&(u[m]=f)}d++}),Ss(i),{processedTree:{segmentTree:i,singleCache:Vo(1e3),matchCache:Vo(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function pp(e,t,n=!1){const i=e.split("/"),o=fR(e,i,t,n);if(!o)return null;const[l]=E_(e,i,o);return{route:o.node.route,rawParams:l}}function E_(e,t,n){const i=hR(n.node);let o=null;const l=Object.create(null);let u=n.extract?.part??0,d=n.extract?.node??0,f=n.extract?.path??0,m=n.extract?.segment??0;for(;d<i.length;u++,d++,f++,m++){const y=i[d];if(y.kind===As)break;if(y.kind===w_){m--,u--,f--;continue}const g=t[u],v=f;if(g&&(f+=g.length),y.kind===1){o??=n.node.fullPath.split("/");const _=o[m],w=y.prefix?.length??0;if(_.charCodeAt(w)===123){const R=y.suffix?.length??0,E=_.substring(w+2,_.length-R-1),T=g.substring(w,g.length-R);l[E]=decodeURIComponent(T)}else{const R=_.substring(1);l[R]=decodeURIComponent(g)}}else if(y.kind===3){if(n.skipped&1<<d){u--,f=v-1;continue}o??=n.node.fullPath.split("/");const _=o[m],w=y.prefix?.length??0,R=y.suffix?.length??0,E=_.substring(w+3,_.length-R-1),T=y.suffix||y.prefix?g.substring(w,g.length-R):g;T&&(l[E]=decodeURIComponent(T))}else if(y.kind===2){const _=y,w=e.substring(v+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),R=decodeURIComponent(w);l["*"]=R,l._splat=R;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:u,node:d,path:f,segment:m}]}function T_(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function hR(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function fR(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Ho(t),l=o&&e!=="/",u=t.length-(o?1:0),d=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let f=null,m=null;for(;d.length;){const y=d.pop(),{node:g,index:v,skipped:_,depth:w,statics:R,dynamics:E,optionals:T}=y;let{extract:k,rawParams:x}=y;if(g.kind===2&&g.route&&!Tc(m,y))continue;if(g.parse){if(!Wv(e,t,y))continue;x=y.rawParams,k=y.extract}i&&g.route&&g.kind!==As&&Tc(f,y)&&(f=y);const N=v===u;if(N&&(g.route&&(!l||g.kind===As||g.kind===2)&&Tc(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const I=N?void 0:t[v];let U;if(N&&g.index){const D={node:g.index,index:v,skipped:_,depth:w+1,statics:R,dynamics:E,optionals:T,extract:k,rawParams:x};let K=!0;if(g.index.parse&&(Wv(e,t,D)||(K=!1)),K){if(!E&&!T&&!_&&pR(R,u))return D;Tc(m,D)&&(m=D)}}if(g.wildcard)for(let D=g.wildcard.length-1;D>=0;D--){const K=g.wildcard[D],{prefix:Q,suffix:le}=K;if(!(Q&&(N||!(K.caseSensitive?I:U??=I.toLowerCase()).startsWith(Q)))){if(le){if(N)continue;const oe=t.slice(v).join("/").slice(-le.length);if((K.caseSensitive?oe:oe.toLowerCase())!==le)continue}d.push({node:K,index:u,skipped:_,depth:w+1,statics:R,dynamics:E,optionals:T,extract:k,rawParams:x})}}if(g.optional){const D=_|1<<w,K=w+1;for(let Q=g.optional.length-1;Q>=0;Q--){const le=g.optional[Q];d.push({node:le,index:v,skipped:D,depth:K,statics:R,dynamics:E,optionals:T,extract:k,rawParams:x})}if(!N)for(let Q=g.optional.length-1;Q>=0;Q--){const le=g.optional[Q],{prefix:oe,suffix:ce}=le;if(oe||ce){const De=le.caseSensitive?I:U??=I.toLowerCase();if(oe&&!De.startsWith(oe)||ce&&!De.endsWith(ce))continue}d.push({node:le,index:v+1,skipped:_,depth:K,statics:R,dynamics:E,optionals:T+Ec(u,v),extract:k,rawParams:x})}}if(!N&&g.dynamic&&I)for(let D=g.dynamic.length-1;D>=0;D--){const K=g.dynamic[D],{prefix:Q,suffix:le}=K;if(Q||le){const oe=K.caseSensitive?I:U??=I.toLowerCase();if(Q&&!oe.startsWith(Q)||le&&!oe.endsWith(le))continue}d.push({node:K,index:v+1,skipped:_,depth:w+1,statics:R,dynamics:E+Ec(u,v),optionals:T,extract:k,rawParams:x})}if(!N&&g.staticInsensitive){const D=g.staticInsensitive.get(U??=I.toLowerCase());D&&d.push({node:D,index:v+1,skipped:_,depth:w+1,statics:R+Ec(u,v),dynamics:E,optionals:T,extract:k,rawParams:x})}if(!N&&g.static){const D=g.static.get(I);D&&d.push({node:D,index:v+1,skipped:_,depth:w+1,statics:R+Ec(u,v),dynamics:E,optionals:T,extract:k,rawParams:x})}if(g.pathless){const D=w+1;for(let K=g.pathless.length-1;K>=0;K--){const Q=g.pathless[K];d.push({node:Q,index:v,skipped:_,depth:D,statics:R,dynamics:E,optionals:T,extract:k,rawParams:x})}}}if(m)return m;if(i&&f){let y=f.index;for(let v=0;v<f.index;v++)y+=t[v].length;const g=y===e.length?"/":e.slice(y);return f.rawParams??=Object.create(null),f.rawParams["**"]=decodeURIComponent(g),f}return null}function Ec(e,t){return 2**(e-t-1)}function pR(e,t){return e===2**(t-1)-1}function Wv(e,t,n){let i,o;
10try{[i,o]=E_(e,t,n)}catch{return null}if(n.rawParams=i,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(i)===!1)return null}catch{}return!0}function Tc(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===As)>(e.node.kind===As)||t.node.kind===As==(e.node.kind===As)&&t.depth>e.depth))):!0}function Zc(e){return mp(e.filter(t=>t!==void 0).join("/"))}function mp(e){return e.replace(/\/{2,}/g,"/")}function R_(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Hr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function A_(e){return Hr(R_(e))}function eu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function mR(e,t,n){return eu(e,n)===eu(t,n)}function gR({base:e,to:t,trailingSlash:n="never",cache:i}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(i){u=o?t:l?e:e+"\0"+t;const m=i.get(u);if(m)return m}let d;if(l)d=e.split("/");else if(o)d=t.split("/");else{for(d=e.split("/");d.length>1&&Ho(d)==="";)d.pop();const m=t.split("/");for(let y=0,g=m.length;y<g;y++){const v=m[y];v===""?y?y===g-1&&d.push(v):d=[v]:v===".."?d.pop():v==="."||d.push(v)}}d.length>1&&(Ho(d)===""?n==="never"&&d.pop():n==="always"&&d.push(""));const f=mp(d.join("/"))||"/";return u&&i&&i.set(u,f),f}function yR(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(n,"g");return o=>o.replace(i,l=>t.get(l)??l)}function of(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(o=>t0(o,n)).join("/"):t0(i,n)}function e0({path:e,params:t,decoder:n,...i}){let o=!1;const l=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:o};const u=e.length;let d=0,f,m="";for(;d<u;){const y=d;f=S_(e,y,f);const g=f[5];if(d=g+1,y===g)continue;const v=f[0];if(v===0){m+="/"+e.substring(y,g);continue}if(v===2){const _=t._splat;l._splat=_,l["*"]=_;const w=e.substring(y,f[1]),R=e.substring(f[4],g);if(!_){o=!0,(w||R)&&(m+="/"+w+R);continue}const E=of("_splat",t,n);m+="/"+w+E+R;continue}if(v===1){const _=e.substring(f[2],f[3]);!o&&!(_ in t)&&(o=!0),l[_]=t[_];const w=e.substring(y,f[1]),R=e.substring(f[4],g),E=of(_,t,n)??"undefined";m+="/"+w+E+R;continue}if(v===3){const _=e.substring(f[2],f[3]),w=t[_];if(w==null)continue;l[_]=w;const R=e.substring(y,f[1]),E=e.substring(f[4],g),T=of(_,t,n)??"";m+="/"+R+T+E;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:l,interpolatedPath:m||"/",isMissingParams:o}}function t0(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function k_(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function xt(e){return e?.isNotFound===!0}function vR(){try{return sessionStorage}catch{return}}const bR="tsr-scroll-restoration-v1_3",O_=vR();function _R(){try{return JSON.parse(O_?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function wR(){try{O_?.setItem(bR,JSON.stringify(fa))}catch{}}const fa=_R(),n0="data-scroll-restoration-id",SR=e=>e.state.__TSR_key||e.href;function ER(e){const t=e.getAttribute(n0);if(t)return`[${n0}="${t}"]`;let n="",i=e,o;for(;o=i.parentNode;){let l=1,u=i;for(;u=u.previousElementSibling;)l++;const d=`${i.localName}:nth-child(${l})`;n=n?`${d} > ${n}`:d,i=o}return n}let Rc=!1;const Fc="window";function Df(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function r0(e){const t=new Set;for(const n of e){if(n===Fc)continue;const i=Df(n);i&&t.add(i)}return t}function TR(e,t){const n=e.options.scrollRestoration,i=e._scroll;n&&(i.restoring=!0);const o=e.options.getScrollRestorationKey||SR,l=new Set,u=d=>{const f=fa[d]||={};for(const m of l)m===document?f[Fc]={scrollX,scrollY}:m.isConnected&&(f[ER(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};n&&!i.restoration&&(i.restoration=!0,Rc=!1,history.scrollRestoration="manual",document.addEventListener("scroll",d=>{Rc||l.add(d.target)},!0),e.subscribe("onBeforeLoad",d=>{d.fromLocation&&u(o(d.fromLocation)),l.clear()}),addEventListener("pagehide",()=>{u(o(e.stores.resolvedLocation.get()??e.stores.location.get())),wR()})),!i.reset&&(i.reset=!0,e.subscribe("onRendered",d=>{const f=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors,y=i.next,g=i.hash;let v;
10if(l.clear(),i.next=!0,i.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const _=o(d.toLocation),w=d.fromLocation&&o(d.fromLocation);if(i.restoring&&w&&w!==_){const R=fa[w];if(R){let E=fa[_];for(const T in R){if(T===Fc){if(y)continue}else{const k=Df(T);if(!k||y&&m&&(v??=r0(m),v.has(k)))continue}E||(E=fa[_]={}),E[T]??=R[T]}}}Rc=!0;try{const R=d.toLocation.hash,E=d.toLocation.state.__hashScrollIntoViewOptions??!0;let T=!1;if(y){!R&&m&&(v??=r0(m));const k=R&&E&&g,x=i.restoring?fa[_]:void 0;if(x)for(const N in x){const{scrollX:I,scrollY:U}=x[N];if(N===Fc){if(k)continue;scrollTo({top:U,left:I,behavior:f}),T=!0}else{const D=Df(N);D&&(D.scrollLeft=I,D.scrollTop=U,v?.delete(D))}}if(!R){const N={top:0,left:0,behavior:f};if(T||scrollTo(N),v)for(const I of v)I.scrollTo(N)}}!T&&R&&E&&document.getElementById(R)?.scrollIntoView(E)}finally{Rc=!1}}))}function C_(e,t=String){const n=new URLSearchParams;for(const i in e){const o=e[i];o!==void 0&&n.set(i,t(o))}return n.toString()}function lf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function RR(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[i,o]of t.entries()){const l=n[i];l==null?n[i]=lf(o):Array.isArray(l)?l.push(lf(o)):n[i]=[l,lf(o)]}return n}const AR=OR(JSON.parse),kR=CR(JSON.stringify,JSON.parse);function OR(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=RR(t);for(const i in n){const o=n[i];if(typeof o=="string")try{n[i]=e(o)}catch{}}return n}}function CR(e,t){const n=typeof t=="function";function i(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=C_(o,i);return l?`?${l}`:""}}const fi="__root__";function pn(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Yt(e){return e instanceof Response&&!!e.options}function x_(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return pn(e)}function xR(e){return{input:({url:t})=>{for(const n of e)t=$f(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=N_(e[n],t);return t}}}function NR(e){const t=A_(e.basepath),n=`/${t}`,i=e.caseSensitive?n:n.toLowerCase(),o=`${i}/`;return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===i?l.pathname="/":u.startsWith(o)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Zc(["/",t,l.pathname]),l)}}function $f(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function N_(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function zR(e,t){const{createMutableStore:n,createReadonlyStore:i,batch:o,init:l}=t,u=new Map,d=new Map,f=new Map,m=n(e.status),y=n(e.loadedAt),g=n(e.isLoading),v=n(e.isTransitioning),_=n(e.location),w=n(e.resolvedLocation),R=n(e.statusCode),E=n(e.redirect),T=n([]),k=n([]),x=n([]),N=i(()=>cf(u,T.get())),I=i(()=>cf(d,k.get())),U=i(()=>cf(f,x.get())),D=i(()=>T.get()[0]),K=i(()=>T.get().some(Y=>u.get(Y)?.get().status==="pending")),Q=i(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:m.get()})),le=i(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:v.get(),matches:N.get(),location:_.get(),resolvedLocation:w.get(),statusCode:R.get(),redirect:E.get()})),oe=Vo(64);function ce(Y){let se=oe.get(Y);return se||(se=i(()=>{const Te=T.get();for(const _e of Te){const O=u.get(_e);if(O&&O.routeId===Y)return O.get()}}),oe.set(Y,se)),se}const De={status:m,loadedAt:y,isLoading:g,isTransitioning:v,location:_,resolvedLocation:w,statusCode:R,redirect:E,matchesId:T,pendingIds:k,cachedIds:x,matches:N,pendingMatches:I,cachedMatches:U,firstId:D,hasPending:K,matchRouteDeps:Q,matchStores:u,pendingMatchStores:d,cachedMatchStores:f,__store:le,getRouteMatchStore:ce,setMatches:$e,setPending:Fe,setCached:L};$e(e.matches),l?.(De);function $e(Y){uf(Y,u,T,n,o)}function Fe(Y){uf(Y,d,k,n,o)}function L(Y){uf(Y,f,x,n,o)}return De}function cf(e,t){const n=[];for(const i of t){const o=e.get(i);o&&n.push(o.get())}return n}function uf(e,t,n,i,o){const l=e.map(d=>d.id),u=new Set(l);o(()=>{for(const d of t.keys())u.has(d)||t.delete(d);for(const d of e){const f=t.get(d.id);if(!f){const m=i(d);m.routeId=d.routeId,t.set(d.id,m);continue}f.routeId=d.routeId,f.get()!==d&&f.set(d)}sR(n.get(),l)||n.set(l)})}const If=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},jR=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),_u=(e,t)=>
10!!(e.preload&&!e.router.stores.matchStores.has(t)),pi=(e,t,n=!0)=>{const i={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(i,d.__routeContext,d.__beforeLoadContext)}return i},s0=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,i=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),o=i>=0?i:0;let l=n?e.matches.findIndex(u=>u.routeId===n):e.firstBadMatchIndex??e.matches.length-1;l<0&&(l=o);for(let u=l;u>=0;u--){const d=e.matches[u];if(e.router.looseRoutesById[d.routeId].options.notFoundComponent)return u}return n?l:o},ks=(e,t,n)=>{if(!(!Yt(n)&&!xt(n)))throw Yt(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:Yt(n)?"redirected":xt(n)?"notFound":i.status==="pending"?"success":i.status,context:pi(e,t.index),isFetching:!1,error:n})),xt(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Yt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},z_=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},i0=(e,t,n)=>{const i=pi(e,n);e.updateMatch(t,o=>({...o,context:i}))},xo=(e,t,n)=>{const{id:i,routeId:o}=e.matches[t],l=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,ks(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(u){n=u,ks(e,e.router.getMatch(i),n)}e.updateMatch(i,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Yt(n)&&!xt(n)&&(e.serialError??=n)},j_=(e,t,n,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!_u(e,t)&&(n.options.loader||n.options.beforeLoad||L_(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const l=setTimeout(()=>{If(e)},o);i._nonReactive.pendingTimeout=l}},PR=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;j_(e,t,n,i);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&ks(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(o):o()},LR=(e,t,n,i)=>{const o=e.router.getMatch(t);let l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=mi(()=>{l?.resolve(),l=void 0});const{paramsError:u,searchError:d}=o;u&&xo(e,n,u),d&&xo(e,n,d),j_(e,t,i,o);const f=new AbortController;let m=!1;const y=()=>{m||(m=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:f})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!i.options.beforeLoad){e.router.batch(()=>{y(),g()});return}o._nonReactive.beforeLoadPromise=mi();const v={...pi(e,n,!1),...o.__routeContext},{search:_,params:w,cause:R}=o,E=_u(e,t),T={search:_,abortController:f,params:w,preload:E,context:v,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":R,matches:e.matches,routeId:i.id,...e.router.options.additionalContext},k=N=>{if(N===void 0){e.router.batch(()=>{y(),g()});return}(Yt(N)||xt(N))&&(y(),xo(e,n,N)),e.router.batch(()=>{y(),e.updateMatch(t,I=>({...I,__beforeLoadContext:N})),g()})};let x;try{if(x=i.options.beforeLoad(T),qo(x))return y(),x.catch(N=>{xo(e,n,N)}).then(k)}catch(N){y(),xo(e,n,N)}k(x)},MR=(e,t)=>{const{id:n,routeId:i}=e.matches[t],o=e.router.looseRoutesById[i],l=()=>d(),u=()=>LR(e,n,t,o),d=()=>{if(z_(e,n))return;const f=PR(e,n,o);return qo(f)?f.then(u):u()};return l()},DR=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([l,u,d])=>
10({meta:l?.meta,links:l?.links,headScripts:l?.scripts,headers:d,scripts:u,styles:l?.styles}))},P_=(e,t,n,i,o)=>{const l=t[i-1],{params:u,loaderDeps:d,abortController:f,cause:m}=e.router.getMatch(n),y=pi(e,i),g=_u(e,n);return{params:u,deps:d,preload:!!g,parentMatchPromise:l,abortController:f,context:y,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),cause:g?"preload":m,route:o,...e.router.options.additionalContext}},a0=async(e,t,n,i,o)=>{try{const l=e.router.getMatch(n);try{(!(v_??e.router.isServer)||l.ssr===!0)&&Zo(o);const u=o.options.loader,d=typeof u=="function"?u:u?.handler,f=d?.(P_(e,t,n,i,o)),m=!!d&&qo(f);if((m||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||l._nonReactive.minPendingPromise)&&e.updateMatch(n,g=>({...g,isFetching:"loader"})),d){const g=m?await f:f;ks(e,e.router.getMatch(n),g),g!==void 0&&e.updateMatch(n,v=>({...v,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const y=l._nonReactive.minPendingPromise;y&&await y,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,g=>({...g,error:void 0,context:pi(e,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let d=u;if(d?.name==="AbortError"){if(l.abortController.signal.aborted){l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:pi(e,i)}));return}const f=l._nonReactive.minPendingPromise;f&&await f,xt(u)&&await o.options.notFoundComponent?.preload?.(),ks(e,e.router.getMatch(n),u);try{o.options.onError?.(u)}catch(m){d=m,ks(e,e.router.getMatch(n),m)}!Yt(d)&&!xt(d)&&await Zo(o,["errorComponent"]),e.updateMatch(n,m=>({...m,error:d,context:pi(e,i),status:"error",isFetching:!1}))}}catch(l){const u=e.router.getMatch(n);u&&(u._nonReactive.loaderPromise=void 0),ks(e,u,l)}},$R=async(e,t,n)=>{async function i(_,w,R,E,T){const k=Date.now()-w.updatedAt,x=_?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,N=T.options.shouldReload,I=typeof N=="function"?N(P_(e,t,o,n,T)):N,{status:U,invalid:D}=E,K=k>=x&&(!!e.forceStaleReload||E.cause==="enter"||R!==void 0&&R!==E.id);u=U==="success"&&(D||(I??K)),_&&T.options.preload===!1||(u&&!e.sync&&y?(d=!0,(async()=>{try{await a0(e,t,o,n,T);const Q=e.router.getMatch(o);Q._nonReactive.loaderPromise?.resolve(),Q._nonReactive.loadPromise?.resolve(),Q._nonReactive.loaderPromise=void 0,Q._nonReactive.loadPromise=void 0}catch(Q){Yt(Q)&&await e.router.navigate(Q.options)}})()):U!=="success"||u?await a0(e,t,o,n,T):i0(e,o,n))}const{id:o,routeId:l}=e.matches[n];let u=!1,d=!1;const f=e.router.looseRoutesById[l],m=f.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(z_(e,o)){if(!e.router.getMatch(o))return e.matches[n];i0(e,o,n)}else{const _=e.router.getMatch(o),w=e.router.stores.matchesId.get()[n],R=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===l?w:e.router.stores.matches.get().find(T=>T.routeId===l)?.id,E=_u(e,o);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&y)return _;await _._nonReactive.loaderPromise;const T=e.router.getMatch(o),k=T._nonReactive.error||T.error;k&&ks(e,T,k),T.status==="pending"&&await i(E,_,R,T,f)}else{const T=E&&!e.router.stores.matchStores.has(o),k=e.router.getMatch(o);k._nonReactive.loaderPromise=mi(),T!==k.preload&&e.updateMatch(o,x=>({...x,preload:T})),await i(E,_,R,k,f)}}const g=e.router.getMatch(o);d||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,d||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const v=d?g.isFetching:!1;return v!==g.isFetching||g.invalid!==!1?(e.updateMatch(o,_=>({..._,isFetching:v,invalid:!1})),e.router.getMatch(o)):g};async function o0(e){const t=e,n=[];jR(t.router)&&If(t);let i;for(let v=0;v<t.matches.length;v++){try{const _=MR(t,v);qo(_)&&await _}catch(_){if(Yt(_))throw _;if(xt(_))i=_;else if(!t.preload)throw _;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,l=i&&!t.preload?s0(t,i):void 0,u=i&&t.preload?0:l!==void 0?Math.min(l+1,o):o;let d,f;for(let v=0;v<u;v++)n.push($R(t,n,v));try{await Promise.all(n)}catch{const v=await Promise.allSettled(n);for(const _ of v){if(_.status!=="rejected")continue;const w=_.reason;if(Yt(w))throw w;xt(w)?d??=w:f??=w}if(f!==void 0)throw f}const m=d??(i&&!t.preload?i:void 0);let y=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!m&&i&&t.preload)return t.matches;if(m){const v=s0(t,m);v===void 0&&fn();const _=t.matches[v],w=t.router.looseRoutesById[_.routeId],R=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&R&&(w.options.notFoundComponent=R),m.routeId=_.routeId;const E=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,T=>({...T,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=v,await Zo(w,["notFoundComponent"])}else if(!t.preload){const v=t.matches[0];v.globalNotFound||t.router.getMatch(v.id)?.globalNotFound&&t.updateMatch(v.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const v=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Zo(v,["errorComponent"])}for(let v=0;v<=y;v++){const{id:_,routeId:w}=t.matches[v],R=t.router.looseRoutesById[w];try{const E=DR(t,_,R);if(E){const T=await E;t.updateMatch(_,k=>({...k,...T}))}}catch(E){console.error(`Error executing head for route ${w}:`,E)}}const g=If(t);if(qo(g)&&await g,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function l0(e,t){const n=t.map(i=>
10e.options[i]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Zo(e,t=Gc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(i=>{const{id:o,...l}=i.options;Object.assign(e.options,l),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===Gc?(()=>{if(e._componentsPromise===void 0){const i=l0(e,Gc);i?e._componentsPromise=i.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():l0(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function L_(e){for(const t of Gc)if(e.options[t]?.preload)return!0;return!1}const Gc=["component","errorComponent","pendingComponent","notFoundComponent"];var Cs="__TSR_index",c0="popstate",u0="beforeunload";function IR(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:d,...f})=>{if(d?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const v=tu(f.path,f.state);if(await g.blockerFn({currentLocation:t,nextLocation:v,action:f.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,d,f)=>{const m=t.state[Cs];d=d0(m+1,d),l({task:()=>{e.pushState(u,d),i({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:u,state:d})},replace:(u,d,f)=>{const m=t.state[Cs];d=d0(m,d),l({task:()=>{e.replaceState(u,d),i({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:u,state:d})},go:(u,d)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[Cs]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function d0(e,t){t||(t={});const n=gp();return{...t,key:n,__TSR_key:n,[Cs]:e}}function UR(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let o=[];const l=()=>o,u=K=>o=K,d=(K=>K),f=(()=>tu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const K=gp();t.history.replaceState({[Cs]:0,key:K,__TSR_key:K},"")}let m=f(),y,g=!1,v=!1,_=!1,w=!1;const R=()=>m;let E,T;const k=()=>{E&&(D._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),D._ignoreSubscribers=!1,E=void 0,T=void 0,y=void 0)},x=(K,Q,le)=>{const oe=d(Q);T||(y=m),m=tu(Q,le),E={href:oe,state:le,isPush:E?.isPush||K==="push"},T||(T=Promise.resolve().then(()=>k()))},N=K=>{m=f(),D.notify({type:K})},I=async()=>{if(v){v=!1;return}const K=f(),Q=K.state[Cs]-m.state[Cs],le=Q===1,oe=Q===-1,ce=!le&&!oe||g;g=!1;const De=ce?"GO":oe?"BACK":"FORWARD",$e=ce?{type:"GO",index:Q}:{type:oe?"BACK":"FORWARD"};if(_)_=!1;else{const Fe=l();if(typeof document<"u"&&Fe.length){for(const L of Fe)if(await L.blockerFn({currentLocation:m,nextLocation:K,action:De})){v=!0,t.history.go(1),D.notify($e);return}}}m=f(),D.notify($e)},U=K=>{if(w){w=!1;return}let Q=!1;const le=l();if(typeof document<"u"&&le.length)for(const oe of le){const ce=oe.enableBeforeUnload??!0;if(ce===!0){Q=!0;break}if(typeof ce=="function"&&ce()===!0){Q=!0;break}}if(Q)return K.preventDefault(),K.returnValue=""},D=IR({getLocation:R,getLength:()=>t.history.length,pushState:(K,Q)=>x("push",K,Q),replaceState:(K,Q)=>x("replace",K,Q),back:K=>(K&&(_=!0),w=!0,t.history.back()),forward:K=>{K&&(_=!0),w=!0,t.history.forward()},go:K=>{g=!0,t.history.go(K)},createHref:K=>d(K),flush:k,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(u0,U,{capture:!0}),t.removeEventListener(c0,I)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(u0,U,{capture:!0}),t.addEventListener(c0,I),t.history.pushState=function(...K){const Q=n.apply(t.history,K);return D._ignoreSubscribers||N("PUSH"),Q},t.history.replaceState=function(...K){const Q=i.apply(t.history,K);return D._ignoreSubscribers||N("REPLACE"),Q},D}function BR(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function tu(e,t){const n=BR(e),i=n.indexOf("#"),o=n.indexOf("?"),l=gp();return{href:n,pathname:n.substring(0,i>0?o>0?Math.min(i,o):i:o>0?o:n.length),hash:i>-1?n.substring(i):"",search:o>-1?n.slice(o,i===-1?void 0:i):"",state:t||{[Cs]:0,key:l,__TSR_key:l}}}function gp(){return(Math.random()+1).toString(36).substring(7)}function HR(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ea(e,t){const n=t,i=e;return{fromLocation:n,toLocation:i,pathChanged:n?.pathname!==i.pathname,hrefChanged:n?.href!==i.href,hashChanged:n?.hash!==i.hash}}var qR=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>
10n(),this.update=n=>{const i=this.options,o=this.basepath??i?.basepath??"/",l=this.basepath===void 0,u=i?.rewrite;if(this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=yR(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=UR()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=Vo(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=zR(ZR(this.latestLocation),y),TR(this)}let d=!1;const f=this.options.basepath??"/",m=this.options.rewrite;if(l||o!==f||u!==m){this.basepath=f;const y=[],g=A_(f);g&&g!=="/"&&y.push(NR({basepath:f})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:xR(y),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=dR(this.routeTree,this.options.caseSensitive,(i,o)=>{i.init({originalIndex:o})});return this.options.routeMasks&&aR(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,i)=>{const o={eventType:n,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const o=({pathname:f,search:m,hash:y,href:g,state:v})=>
10{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const T=this.options.parseSearch(m),k=this.options.stringifySearch(T);return{href:f+k+y,publicHref:f+k+y,pathname:Co(f).path,external:!1,searchStr:k,search:si(i?.search,T),hash:Co(y.slice(1)).path,state:ci(i?.state,v)}}const _=new URL(g,this.origin),w=$f(this.rewrite,_),R=this.options.parseSearch(w.search),E=this.options.stringifySearch(R);return w.search=E,{href:w.href.replace(w.origin,""),publicHref:g,pathname:Co(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:E,search:si(i?.search,R),hash:Co(w.hash.slice(1)).path,state:ci(i?.state,v)}},l=o(n),{__tempLocation:u,__tempKey:d}=l.state;if(u&&(!d||d===this.tempLocationKey)){const f=o(u);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathWithBase=(n,i)=>gR({base:n,to:i.includes("//")?mp(i):i,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},o):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>FR({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const i=this.stores.matchStores.get(n)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const i=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(u);l.from;const f=l.unsafeRelative==="path"?u.pathname:l.from??d.fullPath,m=l.to?`${l.to}`:void 0,y=d.search,g=Object.assign(Object.create(null),d.params),v=m?.charCodeAt(0)===47?"/":this.resolvePathWithBase(f,"."),_=m?this.resolvePathWithBase(v,m):v,w=l.params===!1||l.params===null?Object.create(null):(l.params??!0)===!0?g:Object.assign(g,li(l.params,g)),R=this.routesByPath[Hr(_)];let E;if(R)E=this.getRouteBranch(R);else if(_.includes("$"))E=[];else{const oe=this.getMatchedRoutes(_);E=oe.matchedRoutes,this.options.notFoundRoute&&(!oe.foundRoute||oe.foundRoute.path!=="/"&&oe.routeParams["**"])&&(E=[...E,this.options.notFoundRoute])}if(E.length&&__(w))for(const oe of E){const ce=oe.options.params?.stringify??oe.options.stringifyParams;if(ce)try{Object.assign(w,ce(w))}catch{}}const T=n.leaveParams?_:Co(e0({path:_,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let k=y;if(n._includeValidateSearch&&this.options.search?.strict){const oe={};E.forEach(ce=>{if(ce.options.validateSearch)try{Object.assign(oe,Kc(ce.options.validateSearch,{...oe,...k}))}catch{}}),k=oe}k=GR({search:k,dest:l,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),k=si(y,k);const x=this.options.stringifySearch(k),N=l.hash===!0?u.hash:l.hash?li(l.hash,u.hash):void 0,I=N?`#${N}`:"";let U=l.state===!0?u.state:l.state?li(l.state,u.state):{};U=ci(u.state,U);const D=`${T}${x}${I}`;let K,Q,le=!1;if(this.rewrite){const oe=new URL(D,this.origin),ce=N_(this.rewrite,oe);K=oe.href.replace(oe.origin,""),ce.origin!==this.origin?(Q=ce.href,le=!0):Q=ce.pathname+ce.search+ce.hash}else K=rR(D),Q=K;return{publicHref:Q,href:K,pathname:T,search:k,searchStr:x,state:U,hash:N??"",external:le,unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const d=i(l);let f=u?i(u):void 0;if(!f){const m=Object.create(null);if(this.options.routeMasks){const y=oR(d.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:v,..._}=y.route,w=v===!1||v===null?Object.create(null):(v??!0)===!0?m:Object.assign(m,li(v,m));u={from:n.from,..._,params:w},f=i(u)}}}return f&&(d.maskedLocation=f),d};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:i,...o})=>{let l;const u=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const y=Gt(o.state,this.latestLocation.state);return m.forEach(g=>{delete o.state[g]}),y},d=Hr(this.latestLocation.href)===Hr(o.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=mi(()=>{f?.resolve(),f=void 0}),d&&u())this.load();else{let{maskedLocation:m,hashScrollIntoView:y,...g}=o;m&&(g={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,l=o.replace?"REPLACE":"PUSH",this.history[l==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:i})}return this._scroll.next=o.resetScroll??!0,this.history.subscribers.size||this.load(l?{action:{type:l}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:d,...f}={})=>
10{if(d){const g=this.history.location.state.__TSR_index,v=tu(d,{__TSR_index:n?g:g+1}),_=new URL(v.pathname,this.origin);f.to=$f(this.rewrite,_).pathname,f.search=this.options.parseSearch(v.search),f.hash=v.hash.slice(1)}const m=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const y=this.commitLocation({...m,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:u});return queueMicrotask(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:n,reloadDocument:i,href:o,publicHref:l,...u})=>{let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!i&&(i=!0),i){if(n!==void 0||!o){const m=this.buildLocation({to:n,...u});o=o??m.publicHref,l=l??m.publicHref}const f=!d&&l?l:o;if(Wc(f,this.protocolAllowlist))return;if(!u.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}u.replace?window.location.replace(f):window.location.href=f;return}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(o=>!n.some(l=>l.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(i)})},this.load=async n=>{const i=n?.action?.type;let o,l,u;const d=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(m=>{this.startTransition(async()=>{try{this.beforeLoad(),i&&(this._scroll.hash=i==="PUSH"||i==="REPLACE");const y=this.latestLocation,g=Ea(y,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await o0({router:this,sync:n?.sync,forceStaleReload:d.href===y.href,matches:this.stores.pendingMatches.get(),location:y,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let v=null,_=null,w=null,R=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),T=E.length,k=this.stores.matches.get();v=T?k.filter(I=>!this.stores.pendingMatchStores.has(I.id)):null;const x=new Set;for(const I of this.stores.pendingMatchStores.values())I.routeId&&x.add(I.routeId);const N=new Set;for(const I of this.stores.matchStores.values())I.routeId&&N.add(I.routeId);_=T?k.filter(I=>!x.has(I.routeId)):null,w=T?E.filter(I=>!N.has(I.routeId)):null,R=T?E.filter(I=>N.has(I.routeId)):k,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),T&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...v.filter(I=>I.status!=="error"&&I.status!=="notFound"&&I.status!=="redirected")]),this.clearExpiredCache())});for(const[E,T]of[[_,"onLeave"],[w,"onEnter"],[R,"onStay"]])if(E)for(const k of E)this.looseRoutesById[k.routeId].options[T]?.(k)})})}})}catch(y){Yt(y)?(o=y,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):xt(y)&&(l=y);const g=o?o.status:l?404:this.stores.matches.get().some(v=>v.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(o)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),m()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let f;this.hasNotFoundMatch()?f=404:this.stores.matches.get().some(m=>m.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.set(f)},this.startViewTransition=n=>
10{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.stores.resolvedLocation.get(),d=typeof i.types=="function"?i.types(Ea(l,u)):i.types;if(d===!1){n();return}o={update:n,types:d}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(i);return}const l=this.stores.matchStores.get(n);if(l){l.set(i);return}const u=this.stores.cachedMatchStores.get(n);if(u){const d=i(u.get());d.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(f=>f.filter(m=>m!==n)):u.set(d)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const i=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const i=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),l=this.getParsedLocationHref(o);n.options.href=l,n.headers.set("Location",l)}else if(i)try{const o=new URL(i);if(this.origin&&o.origin===this.origin){const l=o.pathname+o.search+o.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}if(n.options.href&&!n.options._builtLocation&&Wc(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!i(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),i=o=>{const l=this.looseRoutesById[o.routeId];if(!l.options.loader)return!0;const u=(o.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=u};this.clearCache({filter:i})},this.loadRouteChunk=Zo,this.preloadRoute=async n=>{const i=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),u=new Set([...l,...this.stores.cachedIds.get()]),d=o.filter(f=>!u.has(f.id));if(d.length){const f=this.stores.cachedMatches.get();this.stores.setCached([...f,...d])}try{return o=await o0({router:this,matches:o,location:i,preload:!0,updateMatch:(f,m)=>{l.has(f)?o=o.map(y=>y.id===f?m(y):y):this.updateMatch(f,m)}
10}),o}catch(f){if(Yt(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:i});xt(f)||console.error(f);return}},this.matchRoute=(n,i)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const u=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),d=lR(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Gt(d.rawParams,n.params,{partial:!0})?!1:i?.includeSearch??!0?Gt(u.search,l.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??kR,parseSearch:e.parseSearch??AR,protocolAllowlist:e.protocolAllowlist??W1}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=T_(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:i,routeParams:o}=n;let{matchedRoutes:l}=n,u=!1;(i?i.path!=="/"&&o["**"]:Hr(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:u=!0);const d=u?YR(this.options.notFoundMode,l):void 0,f=new Array(l.length),m=new Map;for(const y of this.stores.matchStores.values())y.routeId&&m.set(y.routeId,y.get());for(let y=0;y<l.length;y++){const g=l[y],v=f[y-1];let _,w,R;{const ce=v?.search??e.search,De=v?._strictSearch??void 0;try{const $e=Kc(g.options.validateSearch,{...ce})??void 0;_={...ce,...$e},w={...De,...$e},R=void 0}catch($e){let Fe=$e;if($e instanceof nu||(Fe=new nu($e.message,{cause:$e})),t?.throwOnError)throw Fe;_=ce,w={},R=Fe}}const E=g.options.loaderDeps?.({search:_})??"",T=E?JSON.stringify(E):"",{interpolatedPath:k,usedParams:x}=e0({path:g.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),N=g.id+k+T,I=this.getMatch(N),U=m.get(g.id),D=I?._strictParams??x;let K;if(!I)try{h0(g,D)}catch(ce){if(xt(ce)||Yt(ce)?K=ce:K=new VR(ce.message,{cause:ce}),t?.throwOnError)throw K}Object.assign(o,D);const Q=U?"stay":"enter";let le;if(I)le={...I,cause:Q,params:U?.params??o,_strictParams:D,search:si(U?U.search:I.search,_),_strictSearch:w};else{const ce=g.options.loader||g.options.beforeLoad||g.lazyFn||L_(g)?"pending":"success";le={id:N,ssr:g.options.ssr,index:y,routeId:g.id,params:U?.params??o,_strictParams:D,pathname:k,updatedAt:Date.now(),search:U?si(U.search,_):_,_strictSearch:w,searchError:void 0,status:ce,isFetching:!1,error:void 0,paramsError:K,__routeContext:void 0,_nonReactive:{loadPromise:mi()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Q,loaderDeps:U?ci(U.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}t?.preload||(le.globalNotFound=d===g.id),le.searchError=R;const oe=this.getParentContext(v);le.context={...oe,...le.__routeContext,...le.__beforeLoadContext},f[y]=le}for(let y=0;y<f.length;y++){const g=f[y],v=this.looseRoutesById[g.routeId],_=this.getMatch(g.id),w=m.get(g.routeId);if(g.params=w?si(w.params,o):o,!_){const R=f[y-1],E=this.getParentContext(R);if(v.options.context){const T={deps:g.loaderDeps,params:g.params,context:E??{},location:e,navigate:k=>this.navigate({...k,_fromLocation:e}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:f,routeId:v.id};
10g.__routeContext=v.options.context(T)??void 0}g.context={...E,...g.__routeContext,...g.__beforeLoadContext}}}return f}matchRoutesLightweight(e){const t=Ho(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];const{matchedRoutes:i,routeParams:o}=this.getMatchedRoutes(e.pathname),l=Ho(i),u={...e.search};for(const g of i)try{Object.assign(u,Kc(g.options.validateSearch,u))}catch{}const d=t&&this.stores.matchStores.get(t)?.get(),f=d&&d.routeId===l.id&&d.pathname===e.pathname;let m;if(f)m=d.params;else{const g=Object.assign(Object.create(null),o);for(const v of i)try{h0(v,g)}catch{}m=g}const y={matchedRoutes:i,fullPath:l.fullPath,search:u,params:m};return this.lightweightCache.set(e,[t,y]),y}},nu=class extends Error{},VR=class extends Error{};function ZR(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Kc(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new nu("Async validation not supported");if(n.issues)throw new nu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function FR({pathname:e,routesById:t,processedTree:n}){const i=Object.create(null),o=Hr(e);let l;const u=cR(o,n,!0);return u&&(l=u.route,Object.assign(i,u.rawParams)),{matchedRoutes:u?.branch||[t.__root__],routeParams:i,foundRoute:l}}function GR({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){return KR(n)(e,t,i??!1)}function KR(e){let t,n;const i=[];for(const l of e){const u=l.options;if("search"in u)u.search?.middlewares&&i.push(...u.search.middlewares);else if(u.preSearchFilters||u.postSearchFilters){const f=({search:m,next:y})=>{const g=y(u.preSearchFilters?u.preSearchFilters.reduce((v,_)=>_(v),m):m);return u.postSearchFilters?u.postSearchFilters.reduce((v,_)=>_(v),g):g};i.push(f)}const d=u.validateSearch;if(d){const f=({search:m,next:y,meta:g})=>{const v=y(m);if(n)try{const _=Kc(d,v);if(g&&_)for(const w in _)w in v||(g.defaulted||=new Map).set(w,_[w]);return{...v,..._}}catch{}return v};i.push(f)}}const o=(l,u,d)=>{if(l>=i.length){if(!t.search)return{};if(t.search===!0)return u;const m=li(t.search,u);return d&&(d.explicit=m),m}const f=(m,y)=>{if(y){const g=d||{};return{search:o(l+1,m,g),meta:g}}return o(l+1,m,d)};return i[l]({search:u,next:f,meta:d})};return function(u,d,f){return t=d,n=f,o(0,u)}}function YR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const i=t[n];if(i.children)return i.id}return fi}function h0(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const i=n(t);if(i===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,i)}}const fr=Symbol.for("TSR_DEFERRED_PROMISE");function JR(e,t){const n=e;return n[fr]||(n[fr]={status:"pending"},n.then(i=>{n[fr].status="success",n[fr].data=i}).catch(i=>{n[fr].status="error",n[fr].error={data:HR(i),__isServerError:!0}})),n}const QR="Error preloading route! âï¸";function M_(e,t){if(e)return typeof e=="string"?e:e[t]}function XR(e){return e?.scriptFormat??"module"}function WR(e,t,n){const i=eA(t),o=M_(n,"script")??i.crossOrigin;return{...XR(e)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:i.href,...o?{crossOrigin:o}:{}}}function eA(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Ac(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}const n=new Set;for(const i of t){const o=JSON.stringify(i);n.has(o)||(n.add(o),e.push(i))}}function tA(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}var D_=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,i=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=fi:this.parentRoute||fn();let o=i?fi:n?.path;o&&o!=="/"&&(o=R_(o));const l=n?.id||o;let u=i?fi:Zc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=Zc(["/",u]));const d=u==="__root__"?"/":Zc([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=d,this._to=Hr(d)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>pn({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},nA=class extends D_{constructor(e){super(e)}};const qr=Symbol.asyncIterator,$_=Symbol.hasInstance,Ta=Symbol.isConcatSpreadable,Vr=Symbol.iterator,I_=Symbol.match,U_=Symbol.matchAll,B_=Symbol.replace,H_=Symbol.search,q_=Symbol.species,V_=Symbol.split,Z_=Symbol.toPrimitive,Ra=Symbol.toStringTag,F_=Symbol.unscopables,G_={[qr]:0,[$_]:1,[Ta]:2,[Vr]:3,[I_]:4,[U_]:5,[B_]:6,[H_]:7,[q_]:8,[V_]:9,[Z_]:10,[Ra]:11,[F_]:12},rA={0:qr,1:$_,2:Ta,3:Vr,4:I_,5:U_,6:B_,7:H_,8:q_,9:V_,10:Z_,11:Ra,12:F_},sA={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},iA={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},aA={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function ze(e,t,n,i,o,l,u,d,f,m,y,g){return{t:e,i:t,s:n,c:i,m:o,p:l,e:u,a:d,f,b:m,o:y,l:g}}function xs(e){return ze(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const K_=xs(2),Y_=xs(3),oA=xs(1),lA=xs(0),cA=xs(4),uA=xs(5),dA=xs(6),hA=xs(7);function fA(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case` 11`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function Ns(e){let t="",n=0,i;for(let o=0,l=e.length;o<l;o++)i=fA(e[o]),i&&(t+=e.slice(n,o)+i,n=o+1);return n===0?t=e:t+=e.slice(n),t}function pA(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function zs(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,pA)}const kc="__SEROVAL_REFS__",J_=new Map,ba=new Map;function Q_(e){return J_.has(e)}function mA(e){return ba.has(e)}function gA(e){if(Q_(e))return J_.get(e);throw new GA(e)}function yA(e){if(mA(e))return ba.get(e);throw new KA(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,kc,{value:ba,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,kc,{value:ba,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,kc,{value:ba,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,kc,{value:ba,configurable:!0,writable:!1,enumerable:!1});function yp(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function vA(e){const t=iA[yp(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function X_(e,t){let n=vA(e);const i=Object.getOwnPropertyNames(e);for(let o=0,l=i.length,u;o<l;o++)u=i[o],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(n=n||{},n[u]=e[u]):(n=n||{},n[u]=e[u]));return n}function W_(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}
12function bA(e){switch(e){case Number.POSITIVE_INFINITY:return uA;case Number.NEGATIVE_INFINITY:return dA}return e!==e?hA:Object.is(e,-0)?cA:ze(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ew(e){return ze(1,void 0,Ns(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function _A(e){return ze(3,void 0,""+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function wA(e){return ze(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function SA(e,t){const n=t.valueOf();return ze(5,e,n!==n?"":t.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function ws(e,t,n){return ze(36,e,n.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function EA(e,t){return ze(6,e,void 0,Ns(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function TA(e,t){return ze(17,e,G_[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function RA(e,t){return ze(18,e,Ns(gA(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function AA(e,t,n){return ze(25,e,n,Ns(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function kA(e,t,n){return ze(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,W_(t),void 0)}function OA(e,t){return ze(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function CA(e,t,n){return ze(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function xA(e,t,n){return ze(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function NA(e,t,n){return ze(20,e,void 0,void 0,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.byteLength)}function zA(e,t,n){return ze(13,e,yp(t),void 0,Ns(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function jA(e,t,n){return ze(14,e,yp(t),void 0,Ns(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function PA(e,t){return ze(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function LA(e,t){return ze(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function MA(e,t){return ze(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function DA(e,t,n){return ze(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,void 0)}function $A(e,t){return ze(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function IA(e,t){return ze(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function UA(e,t){return ze(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function BA(e,t,n,i){return ze(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,i)}const HA={parsing:1,serialization:2,deserialization:3};function qA(e){return`Seroval Error (step: ${HA[e]})`}const VA=(e,t)=>qA(e);var tw=class extends Error{constructor(e,t){super(VA(e)),this.cause=t}},f0=class extends tw{constructor(e){super("parsing",e)}},ZA=class extends tw{constructor(e){super("deserialization",e)}};function Gr(e){return`Seroval Error (specific: ${e})`}var wu=class extends Error{constructor(e){super(Gr(1)),this.value=e}},vp=class extends Error{constructor(e){super(Gr(2))}},FA=class extends Error{constructor(e){super(Gr(3))}},Su=class extends Error{constructor(e){super(Gr(4))}},GA=class extends Error{constructor(e){super(Gr(5)),this.value=e}},KA=class extends Error{constructor(e){super(Gr(6))}},YA=class extends Error{constructor(e){super(Gr(7))}},Hn=class extends Error{constructor(e){super(Gr(8))}},nw=class extends Error{constructor(e){super(Gr(9))}},JA=class{constructor(e,t){this.value=e,this.replacement=t}};const bp=()=>{const e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},QA=()=>{const e=[],t=[];let n=!0,i=!1,o=0;const l={flush(u,d,f){for(f=0;f<o;f++)t[f]&&t[f][d](u)},up(u,d,f,m){for(d=0,f=e.length;d<f;d++)m=e[d],!n&&d===f-1?u[i?"return":"throw"](m):u.next(m)},on(u,d){return n&&(d=o++,t[d]=u),l.up(u),()=>{n&&(t[d]=t[o],t[o--]=void 0)}}};return{__SEROVAL_STREAM__:!0,on(u){return l.on(u)},next(u){n&&(e.push(u),l.flush(u,"next"))},throw(u){n&&(e.push(u),l.flush(u,"throw"),n=!1,i=!1,t.length=0)},return(u){n&&(e.push(u),l.flush(u,"return"),n=!1,i=!0,t.length=0)}}},XA=e=>t=>()=>{let n=0;const i={[e](){return i},next(){if(n>t.d)return{done:!0,value:void 0};const o=n++,l=t.v[o];if(o===t.t)throw l;return{done:o===t.d,value:l}}};return i},WA=(e,t)=>
12n=>()=>{let i=0,o=-1,l=!1;const u=[],d=[],f={finalize(y=0,g=d.length){for(;y<g;y++)d[y].s({done:!0,value:void 0})}};n.on({next(y){const g=d.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw(y){const g=d.shift();g&&g.f(y),f.finalize(),o=u.length,l=!0,u.push(y)},return(y){const g=d.shift();g&&g.s({done:!0,value:y}),f.finalize(),o=u.length,u.push(y)}});const m={[e](){return m},next(){if(o===-1){const v=i++;if(v>=u.length){const _=t();return d.push(_),_.p}return{done:!1,value:u[v]}}if(i>o)return{done:!0,value:void 0};const y=i++,g=u[y];if(y!==o)return{done:!1,value:g};if(l)throw g;return{done:!0,value:g}}};return m},ek=e=>{const t=atob(e),n=t.length,i=new Uint8Array(n);for(let o=0;o<n;o++)i[o]=t.charCodeAt(o);return i.buffer};function tk(e){return"__SEROVAL_SEQUENCE__"in e}function rw(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function nk(e){const t=[];let n=-1,i=-1;const o=e[Vr]();for(;;)try{const l=o.next();if(t.push(l.value),l.done){i=t.length-1;break}}catch(l){n=t.length,t.push(l)}return rw(t,n,i)}const rk=XA(Vr);function sk(e){return rk(e)}const ik={},ak={},ok={0:{},1:{},2:{},3:{},4:{},5:{}};function lk(e){return"__SEROVAL_STREAM__"in e}function gi(){return QA()}function ck(e){const t=gi(),n=e[qr]();async function i(){try{const o=await n.next();o.done?t.return(o.value):(t.next(o.value),await i())}catch(o){t.throw(o)}}return i().catch(()=>{}),t}const uk=WA(qr,bp);function dk(e){return uk(e)}async function hk(e){try{return[1,await e]}catch(t){return[0,t]}}function fk(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function Yc(e,t){e.marked.add(t)}function pk(e,t){const n=e.refs.size;return e.refs.set(t,n),n}function Eu(e,t){const n=e.refs.get(t);return n!=null?(Yc(e,n),{type:1,value:wA(n)}):{type:0,value:pk(e,t)}}function _p(e,t){const n=Eu(e,t);return n.type===1?n:Q_(t)?{type:2,value:RA(n.value,t)}:n}function di(e,t){const n=_p(e,t);if(n.type!==0)return n.value;if(t in G_)return TA(n.value,t);throw new wu(t)}function Tu(e,t){const n=Eu(e,ok[t]);return n.type===1?n.value:ze(26,n.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function mk(e){const t=Eu(e,ik);return t.type===1?t.value:ze(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,di(e,Vr),void 0,void 0,void 0)}function gk(e){const t=Eu(e,ak);return t.type===1?t.value:ze(29,t.value,void 0,void 0,void 0,void 0,void 0,[Tu(e,1),di(e,qr)],void 0,void 0,void 0,void 0)}function yk(e,t,n,i){return ze(n?11:10,e,void 0,void 0,void 0,i,void 0,void 0,void 0,void 0,W_(t),void 0)}function vk(e,t,n,i){return ze(8,t,void 0,void 0,void 0,void 0,{k:n,v:i},void 0,Tu(e,0),void 0,void 0,void 0)}function bk(e,t,n){const i=new Uint8Array(n);let o="";for(let l=0,u=i.length;l<u;l++)o+=String.fromCharCode(i[l]);return ze(19,t,Ns(btoa(o)),void 0,void 0,void 0,void 0,void 0,Tu(e,5),void 0,void 0,void 0)}function _k(e,t){return{base:fk(e,t),child:void 0}}var wk=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Et(this._p,this.depth,e)}};async function Sk(e,t,n){const i=[];for(let o=0,l=n.length;o<l;o++)o in n?i[o]=await Et(e,t,n[o]):i[o]=0;return i}async function Ek(e,t,n,i){return kA(n,i,await Sk(e,t,i))}async function wp(e,t,n){const i=Object.entries(n),o=[],l=[];for(let u=0,d=i.length;u<d;u++)o.push(Ns(i[u][0])),l.push(await Et(e,t,i[u][1]));return Vr in n&&(o.push(di(e.base,Vr)),l.push(LA(mk(e.base),await Et(e,t,nk(n))))),qr in n&&(o.push(di(e.base,qr)),l.push(MA(gk(e.base),await Et(e,t,ck(n))))),Ra in n&&(o.push(di(e.base,Ra)),l.push(ew(n[Ra]))),Ta in n&&(o.push(di(e.base,Ta)),l.push(n[Ta]?K_:Y_)),{k:o,v:l}}async function df(e,t,n,i,o){return yk(n,i,o,await wp(e,t,i))}async function Tk(e,t,n,i){return OA(n,await Et(e,t,i.valueOf()))}async function Rk(e,t,n,i){return CA(n,i,await Et(e,t,i.buffer))}async function Ak(e,t,n,i){return xA(n,i,await Et(e,t,i.buffer))}async function kk(e,t,n,i){return NA(n,i,await Et(e,t,i.buffer))}async function p0(e,t,n,i){const o=X_(i,e.base.features);return zA(n,i,o?await wp(e,t,o):void 0)}async function Ok(e,t,n,i){const o=X_(i,e.base.features);return jA(n,i,o?await wp(e,t,o):void 0)}async function Ck(e,t,n,i){const o=[],l=[];for(const[u,d]of i.entries())o.push(await Et(e,t,u)),l.push(await Et(e,t,d));return vk(e.base,n,o,l)}async function xk(e,t,n,i){const o=[];for(const l of i.keys())o.push(await Et(e,t,l));return PA(n,o)}async function sw(e,t,n,i){const o=e.base.plugins;if(o)for(let l=0,u=o.length;l<u;l++){const d=o[l];if(d.parse.async&&d.test(i))return AA(n,d.tag,await d.parse.async(i,new wk(e,t),{id:n}))}}async function Nk(e,t,n,i){const[o,l]=await hk(i);return ze(12,n,o,void 0,void 0,void 0,void 0,void 0,await Et(e,t,l),void 0,void 0,void 0)}function zk(e,t,n,i,o){const l=[],u=n.on({next:d=>{Yc(this.base,t),Et(this,e,d).then(f=>{l.push($A(t,f))},f=>{o(f),u()})},throw:d=>{Yc(this.base,t),Et(this,e,d).then(f=>{l.push(IA(t,f)),i(l),u()},f=>{o(f),u()})},return:d=>{Yc(this.base,t),Et(this,e,d).then(f=>{l.push(UA(t,f)),i(l),u()},f=>{o(f),u()})}})}async function jk(e,t,n,i){return DA(n,Tu(e.base,4),await new Promise(zk.bind(e,t,n,i)))}async function Pk(e,t,n,i){const o=[];for(let l=0,u=i.v.length;l<u;l++)o[l]=await Et(e,t,i.v[l]);return BA(n,o,i.t,i.d)}async function Lk(e,t,n,i){if(Array.isArray(i))return Ek(e,t,n,i);if(lk(i))return jk(e,t,n,i);if(tk(i))return Pk(e,t,n,i);let o=i.constructor;if(o!==void 0&&typeof o!="function"){const d=Object.getPrototypeOf(i);o=d===null?void 0:d.constructor}if(o===JA)return Et(e,t,i.replacement);const l=await sw(e,t,n,i);if(l)return l;switch(o){case Object:return df(e,t,n,i,!1);case void 0:return df(e,t,n,i,!0);case Date:return SA(n,i);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return p0(e,t,n,i);case Number:case Boolean:case String:case BigInt:return Tk(e,t,n,i);case ArrayBuffer:return bk(e.base,n,i);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Rk(e,t,n,i);case DataView:return kk(e,t,n,i);case Map:return Ck(e,t,n,i);case Set:return xk(e,t,n,i)}if(o===Promise||i instanceof Promise)return Nk(e,t,n,i);const u=e.base.features;if(u&32&&o===RegExp)return EA(n,i);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return Ak(e,t,n,i)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||i instanceof AggregateError))return Ok(e,t,n,i);if(u&64&&typeof Temporal<"u")switch(o){case Temporal.Instant:return ws(n,0,i);case Temporal.Duration:return ws(n,1,i);case Temporal.PlainDate:return ws(n,2,i);case Temporal.PlainDateTime:return ws(n,3,i);case Temporal.PlainMonthDay:return ws(n,4,i);case Temporal.PlainTime:return ws(n,5,i);case Temporal.PlainYearMonth:return ws(n,6,i);case Temporal.ZonedDateTime:return ws(n,7,i)}if(i instanceof Error)return p0(e,t,n,i);if(Vr in i||qr in i)return df(e,t,n,i,!!o);throw new wu(i)}async function Mk(e,t,n){const i=_p(e.base,n);if(i.type!==0)return i.value;const o=await sw(e,t,i.value,n);if(o)return o;throw new wu(n)}async function Et(e,t,n){if(t>=e.base.depthLimit)throw new nw(e.base.depthLimit);switch(typeof n){case"boolean":return n?K_:Y_;case"undefined":return oA;case"string":return ew(n);case"number":return bA(n);case"bigint":return _A(n);case"object":if(n){const i=_p(e.base,n);return i.type===0?await Lk(e,t+1,i.value,n):i.value}return lA;case"symbol":return di(e.base,n);case"function":return Mk(e,t,n);default:throw new wu(n)}}async function Dk(e,t){try{return await Et(e,0,t)}catch(n){throw n instanceof f0?n:new f0(n)}}function iw(e,t){for(let n=0,i=t.length;n<i;n++){const o=t[n];
12e.has(o)||(e.add(o),o.extends&&iw(e,o.extends))}}function aw(e){if(e){const t=new Set;return iw(t,e),[...t]}}function $k(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new YA(e)}}function Ik(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function Uk(e){switch(e){case qr:case Ta:case Ra:case Vr:return!0;default:return!1}}const Bk=1e6,Hk=1e4,qk=2e4;function ow(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}const Vk=1e3;function Zk(e,t){var n;const i=t.refs||new Map;return"types"in i||Object.assign(i,{types:new Map}),{mode:e,plugins:t.plugins,refs:i,features:(n=t.features)!==null&&n!==void 0?n:127^(t.disabledFeatures||0),depthLimit:t.depthLimit||Vk}}function Fk(e){return{mode:2,base:Zk(2,e),child:void 0}}var Gk=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ye(this._p,this.depth,e)}};function lw(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Hn({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function cw(e){return!!e&&typeof e=="object"&&"then"in e&&typeof e.then=="function"}function Kk(e,t,n){return lw(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function Yk(e,t,n){return lw(e.base,t),e.base.refs.set(t,n),n}function wt(e,t,n){return e.mode===1?Kk(e,t,n):Yk(e,t,n)}function Uf(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Hn(e)}function Jk(e,t){return wt(e,t.i,yA(zs(t.s)))}function Qk(e,t,n){const i=n.a,o=i.length,l=wt(e,n.i,new Array(o));for(let u=0,d;u<o;u++)d=i[u],d&&(l[u]=Ye(e,t,d));return ow(l,n.o),l}function m0(e,t,n){Ik(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function Xk(e,t,n,i,o){if(typeof i=="string")m0(n,zs(i),Ye(e,t,o));else{const l=Ye(e,t,i);switch(typeof l){case"string":m0(n,l,Ye(e,t,o));break;case"symbol":Uk(l)&&(n[l]=Ye(e,t,o));break;default:throw new Hn(i)}}}function uw(e,t,n){e.base.refs.types.set(t,n)}function Ru(e,t,n,i){if(e.base.refs.types.get(n)!==i)throw new Hn(t)}function dw(e,t,n,i){const o=n.k;if(o.length>0)for(let l=0,u=n.v,d=o.length;l<d;l++)Xk(e,t,i,o[l],u[l]);return i}function Wk(e,t,n){const i=wt(e,n.i,n.t===10?{}:Object.create(null));return dw(e,t,n.p,i),ow(i,n.o),i}function eO(e,t){return wt(e,t.i,new Date(t.s))}function tO(e,t){if(!(e.base.features&64))throw new vp(t);let n;switch(t.c){case 0:n=Temporal.Instant.from(t.s);break;case 1:n=Temporal.Duration.from(t.s);break;case 2:n=Temporal.PlainDate.from(t.s);break;case 3:n=Temporal.PlainDateTime.from(t.s);break;case 4:n=Temporal.PlainMonthDay.from(t.s);break;case 5:n=Temporal.PlainTime.from(t.s);break;case 6:n=Temporal.PlainYearMonth.from(t.s);break;case 7:n=Temporal.ZonedDateTime.from(t.s);break;default:throw new Hn(t)}return wt(e,t.i,n)}function nO(e,t){if(e.base.features&32){const n=zs(t.c);if(n.length>qk)throw new Hn(t);return wt(e,t.i,new RegExp(n,t.m))}throw new vp(t)}function rO(e,t,n){const i=wt(e,n.i,new Set);for(let o=0,l=n.a,u=l.length;o<u;o++)i.add(Ye(e,t,l[o]));return i}function sO(e,t,n){const i=wt(e,n.i,new Map);for(let o=0,l=n.e.k,u=n.e.v,d=l.length;o<d;o++)i.set(Ye(e,t,l[o]),Ye(e,t,u[o]));return i}function iO(e,t){if(t.s.length>Bk)throw new Hn(t);return wt(e,t.i,ek(zs(t.s)))}function aO(e,t,n){var i;const o=$k(n.c),l=Ye(e,t,n.f),u=(i=n.b)!==null&&i!==void 0?i:0;if(u<0||u>l.byteLength)throw new Hn(n);return wt(e,n.i,new o(l,u,n.l))}function oO(e,t,n){var i;const o=Ye(e,t,n.f),l=(i=n.b)!==null&&i!==void 0?i:0;if(l<0||l>o.byteLength)throw new Hn(n);return wt(e,n.i,new DataView(o,l,n.l))}function hw(e,t,n,i){if(n.p){const o=dw(e,t,n.p,{});Object.defineProperties(i,Object.getOwnPropertyDescriptors(o))}return i}function lO(e,t,n){return hw(e,t,n,wt(e,n.i,new AggregateError([],zs(n.m))))}function cO(e,t,n){const i=Uf(n,aA,n.s);return hw(e,t,n,wt(e,n.i,new i(zs(n.m))))}function uO(e,t,n){const i=bp(),o=wt(e,n.i,i.p),l=Ye(e,t,n.f);if(cw(l))throw new Hn(n.f);return n.s?i.s(l):i.f(l),o}
12function dO(e,t,n){return wt(e,n.i,Object(Ye(e,t,n.f)))}function hO(e,t,n){const i=e.base.plugins;if(i){const o=zs(n.c);for(let l=0,u=i.length;l<u;l++){const d=i[l];if(d.tag===o)return wt(e,n.i,d.deserialize(n.s,new Gk(e,t),{id:n.i}))}}throw new FA(n.c)}function fO(e,t){const n=wt(e,t.i,wt(e,t.s,bp()).p);return uw(e,t.s,22),n}function pO(e,t,n){const i=e.base.refs.get(n.i);if(i){Ru(e,n,n.i,22);const o=Ye(e,t,n.a[1]);if(cw(o))throw new Hn(n.a[1]);n.t===23?i.s(o):i.f(o);return}throw new Su("Promise")}function mO(e,t,n){return Ye(e,t,n.a[0]),sk(Ye(e,t,n.a[1]))}function gO(e,t,n){return Ye(e,t,n.a[0]),dk(Ye(e,t,n.a[1]))}function yO(e,t,n){const i=wt(e,n.i,gi());uw(e,n.i,31);const o=n.a,l=o.length;if(l)for(let u=0;u<l;u++)Ye(e,t,o[u]);return i}function vO(e,t,n){const i=e.base.refs.get(n.i);if(i){Ru(e,n,n.i,31),i.next(Ye(e,t,n.f));return}throw new Su("Stream")}function bO(e,t,n){const i=e.base.refs.get(n.i);if(i){Ru(e,n,n.i,31),i.throw(Ye(e,t,n.f));return}throw new Su("Stream")}function _O(e,t,n){const i=e.base.refs.get(n.i);if(i){Ru(e,n,n.i,31),i.return(Ye(e,t,n.f));return}throw new Su("Stream")}function wO(e,t,n){Ye(e,t,n.f)}function SO(e,t,n){Ye(e,t,n.a[1])}function EO(e,t,n){const i=wt(e,n.i,rw([],n.s,n.l));for(let o=0,l=n.a.length;o<l;o++)i.v[o]=Ye(e,t,n.a[o]);return i}function Ye(e,t,n){if(t>e.base.depthLimit)throw new nw(e.base.depthLimit);switch(t+=1,n.t){case 2:return Uf(n,sA,n.s);case 0:return Number(n.s);case 1:return zs(String(n.s));case 3:if(String(n.s).length>Hk)throw new Hn(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return Jk(e,n);case 9:return Qk(e,t,n);case 10:case 11:return Wk(e,t,n);case 5:return eO(e,n);case 6:return nO(e,n);case 7:return rO(e,t,n);case 8:return sO(e,t,n);case 19:return iO(e,n);case 16:case 15:return aO(e,t,n);case 20:return oO(e,t,n);case 14:return lO(e,t,n);case 13:return cO(e,t,n);case 12:return uO(e,t,n);case 17:return Uf(n,rA,n.s);case 21:return dO(e,t,n);case 25:return hO(e,t,n);case 22:return fO(e,n);case 23:case 24:return pO(e,t,n);case 28:return mO(e,t,n);case 30:return gO(e,t,n);case 31:return yO(e,t,n);case 32:return vO(e,t,n);case 33:return bO(e,t,n);case 34:return _O(e,t,n);case 27:return wO(e,t,n);case 29:return SO(e,t,n);case 35:return EO(e,t,n);case 36:return tO(e,n);default:throw new vp(n)}}function TO(e,t){try{return Ye(e,0,t)}catch(n){throw new ZA(n)}}function g0(e,t){return TO(Fk({plugins:aw(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function RO(e,t={}){const n=_k(1,{plugins:aw(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await Dk(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function AO(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,n,i){return{v:n.parse(e.toSerializable(t))}},async async(t,n,i){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,i){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,i){return e.fromSerializable(n.deserialize(t.v))}}}var kO=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}};const ru=globalThis.Buffer,fw=!!ru&&typeof ru.from=="function";function pw(e){if(e.length===0)return"";if(fw)return ru.from(e).toString("base64");const t=32768,n=[];for(let i=0;i<e.length;i+=t){const o=e.subarray(i,i+t);n.push(String.fromCharCode.apply(null,o))}return btoa(n.join(""))}function mw(e){if(e.length===0)return new Uint8Array(0);if(fw){const i=ru.from(e,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}const No=Object.create(null),zo=Object.create(null),OO=e=>new ReadableStream({start(t){e.on({next(n){try{t.enqueue(mw(n))}catch{}},throw(n){t.error(n)},return(){try{t.close()}catch{}}})}}),CO=new TextEncoder,xO=e=>new ReadableStream({start(t){e.on({next(n){try{typeof n=="string"?t.enqueue(CO.encode(n)):t.enqueue(mw(n.$b64))}catch{}},throw(n){t.error(n)},return(){try{t.close()}catch{}}})}}),NO="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",zO="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function y0(e){const t=gi(),n=e.getReader();return(async()=>{try{for(;;){const{done:i,value:o}=await n.read();if(i){t.return(void 0);break}t.next(pw(o))}}catch(i){t.throw(i)}finally{n.releaseLock()}})(),t}function v0(e){const t=gi(),n=e.getReader(),i=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:l}=await n.read();if(o){try{const u=i.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=i.decode(l,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:pw(l)})}}}catch(o){t.throw(o)}finally{n.releaseLock()}})(),t}const jO={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===No},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return NO},deserialize(e,t,n){return No}},{tag:"tss/RawStreamFactoryText",test(e){return e===zo},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return zO},deserialize(e,t,n){return zo}}],test(e){return e instanceof kO},parse:{sync(e,t,n){const i=e.hint==="text"?zo:No;return{hint:t.parse(e.hint),factory:t.parse(i),stream:t.parse(gi())}},async async(e,t,n){const i=e.hint==="text"?zo:No,o=e.hint==="text"?v0(e.stream):y0(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(i),stream:await t.parse(o)}},stream(e,t,n){const i=e.hint==="text"?zo:No,o=e.hint==="text"?v0(e.stream):y0(e.stream);return{hint:t.parse(e.hint),factory:t.parse(i),stream:t.parse(o)}}},serialize(e,t,n){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,n){const i=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?xO(i):OO(i)}};function PO(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,n,i){return e(typeof n?.deserialize=="function"?n.deserialize(t.streamId):t.streamId)}}}const LO={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},Es={},gw=e=>new ReadableStream({start(t){e.on({next(n){try{t.enqueue(n)}catch{}},throw(n){t.error(n)},return(){try{t.close()}catch{}}})}}),MO={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Es},parse:{sync(){return Es},async async(){return await Promise.resolve(Es)},stream(){return Es}},serialize(){return gw.toString()},deserialize(){return Es}};async function yw(e,t){try{const n=await t.read();n.done?(e.return(n.value),t.releaseLock()):(e.next(n.value),await yw(e,t))}catch(n){e.throw(n)}}function DO(e){e.cancel().catch(()=>{}),e.releaseLock()}function b0(e){const t=gi(),n=e.getReader(),i=DO.bind(null,n);return yw(t,n).catch(i),[t,i]}const $O={tag:"seroval/plugins/web/ReadableStream",extends:[MO],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Es),stream:t.parse(gi())}},async async(e,t){return{factory:await t.parse(Es),stream:await t.parse(b0(e)[0])}},stream(e,t){const[n,i]=b0(e);return t.addCleanup(i),{factory:t.parse(Es),stream:t.parse(n)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const n=t.deserialize(e.stream);return gw(n)}},IO=[LO,jO,$O];function UO(){return[...fp()?.serializationAdapters?.map(AO)??[],...IO]}var _0=new TextDecoder,BO=new Uint8Array(0),w0=16*1024*1024,S0=32*1024*1024,E0=1024,T0=1e5;function HO(e){const t=new Map,n=new Map,i=new Set;let o=!1,l=null,u=0,d;const f=new ReadableStream({start(g){d=g},cancel(){o=!0;try{l?.cancel()}catch{}t.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),n.clear(),i.clear()}});function m(g){const v=n.get(g);if(v)return v;if(i.has(g))return new ReadableStream({start(w){w.close()}});if(n.size>
12=E0)throw new Error(`Too many raw streams in framed response (max ${E0})`);const _=new ReadableStream({start(w){t.set(g,w)},cancel(){i.add(g),t.delete(g),n.delete(g)}});return n.set(g,_),_}function y(g){return m(g),t.get(g)}return(async()=>{const g=e.getReader();l=g;const v=[];let _=0;function w(){if(_<9)return null;const E=v[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const T=new Uint8Array(9);let k=0,x=9;for(let N=0;N<v.length&&x>0;N++){const I=v[N],U=Math.min(I.length,x);T.set(I.subarray(0,U),k),k+=U,x-=U}return{type:T[0],streamId:(T[1]<<24|T[2]<<16|T[3]<<8|T[4])>>>0,length:(T[5]<<24|T[6]<<16|T[7]<<8|T[8])>>>0}}function R(E){if(E===0)return BO;const T=v[0];if(T&&T.length>=E){const I=T.subarray(0,E);return T.length===E?v.shift():v[0]=T.subarray(E),_-=E,I}const k=new Uint8Array(E);let x=0,N=E;for(;N>0&&v.length>0;){const I=v[0];if(!I)break;const U=Math.min(I.length,N);k.set(I.subarray(0,U),x),x+=U,N-=U,U===I.length?v.shift():v[0]=I.subarray(U)}return _-=E,k}try{for(;;){const{done:E,value:T}=await g.read();if(o||E)break;if(T){if(_+T.length>S0)throw new Error(`Framed response buffer exceeded ${S0} bytes`);for(v.push(T),_+=T.length;;){const k=w();if(!k)break;const{type:x,streamId:N,length:I}=k;if(x!==$r.JSON&&x!==$r.CHUNK&&x!==$r.END&&x!==$r.ERROR)throw new Error(`Unknown frame type: ${x}`);if(x===$r.JSON){if(N!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(N===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(I>w0)throw new Error(`Frame payload too large: ${I} bytes (max ${w0})`);const U=9+I;if(_<U)break;if(++u>T0)throw new Error(`Too many frames in framed response (max ${T0})`);R(9);const D=R(I);switch(x){case $r.JSON:try{d.enqueue(_0.decode(D))}catch{}break;case $r.CHUNK:{const K=y(N);K&&K.enqueue(D);break}case $r.END:{const K=y(N);if(i.add(N),K){try{K.close()}catch{}t.delete(N)}break}case $r.ERROR:{const K=y(N);if(i.add(N),K){const Q=_0.decode(D);K.error(new Error(Q)),t.delete(N)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{d.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{d.error(E)}catch{}t.forEach(T=>{try{T.error(E)}catch{}}),t.clear()}finally{try{g.releaseLock()}catch{}l=null}})(),{getOrCreateStream:m,jsonChunks:f}}var Fo=null;async function Bf(e){e.length>0&&await Promise.allSettled(e)}var qO=Object.prototype.hasOwnProperty;function vw(e){for(const t in e)if(qO.call(e,t))return!0;return!1}async function VO(e,t,n){Fo||(Fo=UO());const i=t[0],o=i.fetch??n,l=i.data instanceof FormData?"formData":"payload",u=i.headers?new Headers(i.headers):new Headers;if(u.set("x-tsr-serverFn","true"),l==="payload"&&u.set("accept",`${V1}, application/x-ndjson, application/json`),i.method==="GET"){if(l==="formData")throw new Error("FormData is not supported with GET requests");const f=await bw(i);if(f!==void 0){const m=C_({payload:f});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let d;if(i.method==="POST"){const f=await ZO(i);f?.contentType&&u.set("content-type",f.contentType),d=f?.body}return await FO(async()=>o(e,{method:i.method,headers:u,signal:i.signal,body:d}))}async function bw(e){let t=!1;const n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&vw(e.context)&&(t=!0,n.context=e.context),t)return _w(n)}async function _w(e){return JSON.stringify(await Promise.resolve(RO(e,{plugins:Fo})))}async function ZO(e){if(e.data instanceof FormData){let n;return e.context&&vw(e.context)&&(n=await _w(e.context)),n!==void 0&&e.data.set(q1,n),{body:e.data}}const t=await bw(e);if(t)return{body:t,contentType:"application/json"}}async function FO(e){let t;try{t=await e()}catch(i){if(i instanceof Response)t=i;else throw console.log(i),i}if(t.headers.get("x-tss-raw")==="true")return t;const n=t.headers.get("content-type");if(n||fn(),t.headers.get("x-tss-serialized")){let i;if(n.includes("application/x-tss-framed")){if(G1(n),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:l}=HO(t.body),u=[PO(o),...Fo||[]],d=new Map;i=await GO({jsonStream:l,onMessage:f=>g0(f,{refs:d,plugins:u}),onError(f,m){console.error(f,m)}})}else if(n.includes("application/json")){const o=await t.json(),l=[];i=g0(o,{plugins:Fo}),await Bf(l)}if(i||fn(),i instanceof Error)throw i;return i}if(n.includes("application/json")){const i=await t.json(),o=x_(i);if(o)throw o;if(xt(i))throw i;return i}if(!t.ok)throw new Error(await t.text());return t}async function GO({jsonStream:e,onMessage:t,onError:n}){const i=e.getReader(),{value:o,done:l}=await i.read();if(l||!o)throw new Error("Stream ended before first object");const u=JSON.parse(o);let d=!1;const f=(async()=>{try{for(;;){const{value:g,done:v}=await i.read();if(v)break;if(g)try{const _=[];try{t(JSON.parse(g))}finally{}await Bf(_)}catch(_){n?.(`Invalid JSON: ${g}`,_)}}}catch(g){d||n?.("Stream processing error:",g)}})();let m;const y=[];try{m=t(u)}catch(g){throw d=!0,i.cancel().catch(()=>{}),g}
12return await Bf(y),Promise.resolve(m).catch(()=>{d=!0,i.cancel().catch(()=>{})}),f.finally(()=>{try{i.releaseLock()}catch{}}),m}function ft(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const l=fp()?.serverFns?.fetch;return VO(t,o,l??fetch)},{url:t,serverFnMeta:{id:e},[Mf]:!0})}var KO={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Mf in e)?!1:!!e[Mf],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>ft(e)};function ww(e){if(Array.isArray(e))return e.flatMap(y=>ww(y));if(typeof e!="string")return[];const t=[];let n=0,i,o,l,u,d;const f=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},m=()=>(o=e.charAt(n),o!=="="&&o!==";"&&o!==",");for(;n<e.length;){for(i=n,d=!1;f();)if(o=e.charAt(n),o===","){for(l=n,n+=1,f(),u=n;n<e.length&&m();)n+=1;n<e.length&&e.charAt(n)==="="?(d=!0,n=u,t.push(e.slice(i,l)),i=n):n=l+1}else n+=1;(!d||n>=e.length)&&t.push(e.slice(i))}return t}function YO(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function JO(...e){return e.reduce((t,n)=>{const i=YO(n);if(!i)return t;for(const[o,l]of i.entries())o==="set-cookie"?ww(l).forEach(u=>t.append("set-cookie",u)):t.set(o,l);return t},new Headers)}function R0(e){return e.replaceAll("\0","/").replaceAll("�","/")}function QO(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function XO(e){window.$_TSR||fn();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(T=>{E.set(T.key,T.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(T=>T())}window.$_TSR.initialized=!0,window.$_TSR.router||fn();const n=window.$_TSR.router;n.matches.forEach(E=>{E.i=R0(E.i)}),n.lastMatchId&&(n.lastMatchId=R0(n.lastMatchId));const{manifest:i,dehydratedData:o,lastMatchId:l}=n;e.ssr={manifest:i};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u},await e.options.hydrate?.(o);const d=e.matchRoutes(e.stores.location.get()),f=Promise.all(d.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function m(E){const T=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(T){const k=mi();E._nonReactive.minPendingPromise=k,E._forcePending=!0,setTimeout(()=>{k.resolve(),e.updateMatch(E.id,x=>(x._nonReactive.minPendingPromise=void 0,{...x,_forcePending:void 0}))},T)}}function y(E){const T=e.looseRoutesById[E.routeId];T&&(T.options.ssr=E.ssr)}let g;d.forEach(E=>{const T=n.matches.find(k=>k.i===E.id);if(!T){E._nonReactive.dehydrated=!1,E.ssr=!1,y(E);return}QO(E,T),y(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&g===void 0&&(g=E.index,m(E))}),e.stores.setMatches(d);const v=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(v.map(async E=>{try{const T=e.looseRoutesById[E.routeId],k=v[E.index-1]?.context??e.options.context;if(T.options.context){const U={deps:E.loaderDeps,params:E.params,context:k??{},location:_,navigate:D=>e.navigate({...D,_fromLocation:_}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:d,routeId:T.id};E.__routeContext=T.options.context(U)??void 0}E.context={...k,...E.__routeContext,...E.__beforeLoadContext};const x={ssr:e.options.ssr,matches:v,match:E,params:E.params,loaderData:E.loaderData},N=await T.options.head?.(x),I=await T.options.scripts?.(x);E.meta=N?.meta,E.links=N?.links,E.headScripts=N?.scripts,E.styles=N?.styles,E.scripts=I}catch(T){if(xt(T))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,T);else throw E.error=T,console.error(`Error during hydration for route ${E.routeId}:`,T),T}}));const w=d[d.length-1].id!==l;if(!d.some(E=>E.ssr===!1)&&!w)return d.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),f;const R=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(w){const E=d[1];E||fn(),m(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=
12R,R.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,T=>({...T,_displayPending:void 0,displayPendingPromise:void 0}))})})}return f}var su=te.use,Lo=typeof window<"u"?te.useLayoutEffect:te.useEffect;function hf(e){const t=te.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function WO(e,t,n={},i={}){te.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,i.disabled,e])}function eC(e){const t=te.useRef(null);return te.useImperativeHandle(e,()=>t.current,[]),t}function tC({promise:e}){if(su)return su(e);const t=JR(e);if(t[fr].status==="pending")throw t;if(t[fr].status==="error")throw t[fr].error;return t[fr].data}function nC(e){const t=q.jsx(rC,{...e});return e.fallback?q.jsx(te.Suspense,{fallback:e.fallback,children:t}):t}function rC(e){const t=tC(e);return e.children(t)}function Sp(e){const t=e.errorComponent??Ep;return q.jsx(sC,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?te.createElement(t,{error:n,reset:i}):e.children})}var sC=class extends te.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Ep({error:e}){const[t,n]=te.useState(!1);return q.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[q.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),q.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),q.jsx("div",{style:{height:".25rem"}}),t?q.jsx("div",{children:q.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?q.jsx("code",{children:e.message}):null})}):null]})}function iC({children:e,fallback:t=null}){return Tp()?q.jsx(X.Fragment,{children:e}):q.jsx(X.Fragment,{children:t})}function Tp(){return X.useSyncExternalStore(aC,()=>!0,()=>!1)}function aC(){return()=>{}}var Sw=te.createContext(null);function It(e){return te.useContext(Sw)}var Au=te.createContext(void 0),oC=te.createContext(void 0),rt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(rt||{});function lC({update:e,notify:t,unwatched:n}){return{link:i,unlink:o,propagate:l,checkDirty:u,shallowPropagate:d};function i(m,y,g){const v=y.depsTail;if(v!==void 0&&v.dep===m)return;const _=v!==void 0?v.nextDep:y.deps;if(_!==void 0&&_.dep===m){_.version=g,y.depsTail=_;return}const w=m.subsTail;if(w!==void 0&&w.version===g&&w.sub===y)return;const R=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:v,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=R),v!==void 0?v.nextDep=R:y.deps=R,w!==void 0?w.nextSub=R:m.subs=R}function o(m,y=m.sub){const g=m.dep,v=m.prevDep,_=m.nextDep,w=m.nextSub,R=m.prevSub;return _!==void 0?_.prevDep=v:y.depsTail=v,v!==void 0?v.nextDep=_:y.deps=_,w!==void 0?w.prevSub=R:g.subsTail=R,R!==void 0?R.nextSub=w:(g.subs=w)===void 0&&n(g),_}function l(m){let y=m.nextSub,g;e:do{const v=m.sub;let _=v.flags;if(_&60?_&12?_&4?!(_&48)&&f(m,v)?(v.flags=_|40,_&=1):_=0:v.flags=_&-9|32:_=0:v.flags=_|32,_&2&&t(v),_&1){const w=v.subs;if(w!==void 0){const R=(m=w).nextSub;R!==void 0&&(g={value:y,prev:g},y=R);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,v=0,_=!1;e:do{const w=m.dep,R=w.flags;if(y.flags&16)_=!0;else if((R&17)===17){if(e(w)){const E=w.subs;E.nextSub!==void 0&&d(E),_=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=w.deps,y=w,++v;continue}if(!_){const E=m.nextDep;if(E!==void 0){m=E;continue}}for(;v--;){const E=y.subs,T=E.nextSub!==void 0;if(T?(m=g.value,g=g.prev):m=E,_){if(e(y)){T&&d(E),y=m.sub;continue}_=!1}else y.flags&=-33;y=m.sub;const k=m.nextDep;if(k!==void 0){m=k;continue e}}return _}while(!0)}function d(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&t(y))}while((m=m.nextSub)!==void 0)}function f(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function cC(e,t,n){const i=typeof e=="object",o=i?e:void 0;return{next:(i?e.next:e)?.bind(o),error:(i?e.error:t)?.bind(o),c
12omplete:(i?e.complete:n)?.bind(o)}}const Hf=[];let Jc=0;const{link:A0,unlink:uC,propagate:dC,checkDirty:Ew,shallowPropagate:k0}=lC({update(e){return e._update()},notify(e){Hf[qf++]=e,e.flags&=~rt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=rt.Mutable|rt.Dirty,iu(e))}});let Oc=0,qf=0,dr,Vf=0;function Tw(e){try{++Vf,e()}finally{--Vf||Rw()}}function iu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=uC(n,e)}function Rw(){if(!(Vf>0)){for(;Oc<qf;){const e=Hf[Oc];Hf[Oc++]=void 0,e.notify()}Oc=0,qf=0}}function O0(e,t){const n=typeof e=="function",i=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rt.None:rt.Mutable,get(){return dr!==void 0&&A0(o,dr,Jc),o._snapshot},subscribe(l){const u=cC(l),d={current:!1},f=hC(()=>{o.get(),d.current?u.next?.(o._snapshot):d.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(l){const u=dr,d=t?.compare??Object.is;if(n)dr=o,++Jc,o.depsTail=void 0;else if(l===void 0)return!1;n&&(o.flags=rt.Mutable|rt.RecursedCheck);try{const f=o._snapshot,m=typeof l=="function"?l(f):l===void 0&&n?i(f):l;return f===void 0||!d(f,m)?(o._snapshot=m,!0):!1}finally{dr=u,n&&(o.flags&=~rt.RecursedCheck),iu(o)}}};return n?(o.flags=rt.Mutable|rt.Dirty,o.get=function(){const l=o.flags;if(l&rt.Dirty||l&rt.Pending&&Ew(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&k0(u)}}else l&rt.Pending&&(o.flags=l&~rt.Pending);return dr!==void 0&&A0(o,dr,Jc),o._snapshot}):o.set=function(l){if(o._update(l)){const u=o.subs;u!==void 0&&(dC(u),k0(u),Rw())}},o}function hC(e){const t=()=>{const i=dr;dr=n,++Jc,n.depsTail=void 0,n.flags=rt.Watching|rt.RecursedCheck;try{return e()}finally{dr=i,n.flags&=~rt.RecursedCheck,iu(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rt.Watching|rt.RecursedCheck,notify(){const i=this.flags;i&rt.Dirty||i&rt.Pending&&Ew(this.deps,this)?t():this.flags=rt.Watching},stop(){this.flags=rt.None,this.depsTail=void 0,iu(this)}};return t(),n}var ff={exports:{}},pf={},mf={exports:{}},gf={};var C0;function fC(){if(C0)return gf;C0=1;var e=rl();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(g,v){var _=v(),w=i({inst:{value:_,getSnapshot:v}}),R=w[0].inst,E=w[1];return l(function(){R.value=_,R.getSnapshot=v,f(R)&&E({inst:R})},[g,_,v]),o(function(){return f(R)&&E({inst:R}),g(function(){f(R)&&E({inst:R})})},[g]),u(_),_}function f(g){var v=g.getSnapshot;g=g.value;try{var _=v();return!n(g,_)}catch{return!0}}function m(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return gf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,gf}var x0;
12function pC(){return x0||(x0=1,mf.exports=fC()),mf.exports}var N0;function mC(){if(N0)return pf;N0=1;var e=rl(),t=pC();function n(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var i=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return pf.useSyncExternalStoreWithSelector=function(m,y,g,v,_){var w=l(null);if(w.current===null){var R={hasValue:!1,value:null};w.current=R}else R=w.current;w=d(function(){function T(U){if(!k){if(k=!0,x=U,U=v(U),_!==void 0&&R.hasValue){var D=R.value;if(_(D,U))return N=D}return N=U}if(D=N,i(x,U))return D;var K=v(U);return _!==void 0&&_(D,K)?(x=U,D):(x=U,N=K)}var k=!1,x,N,I=g===void 0?null:g;return[function(){return T(y())},I===null?void 0:function(){return T(I())}]},[y,g,v,_]);var E=o(m,w[0],w[1]);return u(function(){R.hasValue=!0,R.value=E},[E]),f(E),E},pf}var z0;function gC(){return z0||(z0=1,ff.exports=mC()),ff.exports}var yC=gC();function vC(e,t){return e===t}function ht(e,t,n=vC){const i=te.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:d}=e.subscribe(u);return d},[e]),o=te.useCallback(()=>e?.get(),[e]);return yC.useSyncExternalStoreWithSelector(i,o,o,t,n)}var yf={get(){},subscribe(){return{unsubscribe(){}}}};function bC(e,t){const n=te.useRef();return i=>{const o=e?.select?e.select(i):i;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ci(n.current,o):o}}function yi(e){const t=It(),n=te.useContext(e.from?oC:Au),i=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),o=bC(e,t),l=ht(i??yf,u=>u?o(u):yf);if(l!==yf)return l;(e.shouldThrow??!0)&&fn()}function Aw(e){return yi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function kw(e){const{select:t,...n}=e;return yi({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function Ow(e){return yi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Cw(e){return yi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function xw(e){const t=It();return te.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Nw(e){return yi({...e,select:t=>e.select?e.select(t.context):t.context})}var zw=y_();const _C=g_(zw);function wC(e,t){const n=It(),i=eC(t),{activeProps:o,inactiveProps:l,activeOptions:u,to:d,preload:f,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:v,startTransition:_,resetScroll:w,viewTransition:R,children:E,target:T,disabled:k,style:x,className:N,onClick:I,onBlur:U,onFocus:D,onMouseEnter:K,onMouseLeave:Q,onTouchStart:le,ignoreBlocker:oe,params:ce,search:De,hash:$e,state:Fe,mask:L,reloadDocument:Y,unsafeRelative:se,from:Te,_fromLocation:_e,...O}=e,V=Tp(),G=te.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),J=ht(n.stores.location,Be=>Be,(Be,lt)=>Be.href===lt.href),W=te.useMemo(()=>{const Be={_fromLocation:J,...G};return n.buildLocation(Be)},[n,J,G]),pe=W.maskedLocation?W.maskedLocation.publicHref:W.publicHref,Ee=W.maskedLocation?W.maskedLocation.external:W.external,ye=te.useMemo(()=>kC(pe,Ee,n.history,k),[k,Ee,pe,n.history]),xe=te.useMemo(()=>{if(ye?.external)return Wc(ye.href,n.protocolAllowlist)?void 0:ye.href;if(!OC(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),Wc(d,n.protocolAllowlist)?void 0:d}catch{}},[d,ye,n.protocolAllowlist]),Jt=te.useMemo(()=>{if(xe)return!1;if(u?.exact){if(!mR(J.pathname,W.pathname,n.basepath))return!1}else{const Be=eu(J.pathname,n.basepath),lt=eu(W.pathname,n.basepath);if(!(Be.startsWith(lt)&&(Be.length===lt.length||Be[lt.length]==="/")))return!1}return(u?.includeSearch??!0)&&!Gt(J.search,W.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?V&&J.hash===W.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,J,xe,V,W.hash,W.pathname,W.search,n.basepath]),Qt=Jt?li(o,{})??SC:vf,qt=Jt?vf:li(l,{}
12)??vf,Ls=[N,Qt.className,qt.className].filter(Boolean).join(" "),Xt=(x||Qt.style||qt.style)&&{...x,...Qt.style,...qt.style},[Ms,yr]=te.useState(!1),tr=te.useRef(!1),Cn=e.reloadDocument||xe?!1:f??n.options.defaultPreload,Nt=m??n.options.defaultPreloadDelay??0,yn=te.useCallback(()=>{n.preloadRoute({...G,_builtLocation:W}).catch(Be=>{console.warn(Be),console.warn(QR)})},[n,G,W]);WO(i,te.useCallback(Be=>{Be?.isIntersecting&&yn()},[yn]),AC,{disabled:!!k||Cn!=="viewport"}),te.useEffect(()=>{tr.current||!k&&Cn==="render"&&(yn(),tr.current=!0)},[k,yn,Cn]);const Ds=Be=>{const lt=Be.currentTarget.getAttribute("target"),xn=T!==void 0?T:lt;if(!k&&!CC(Be)&&!Be.defaultPrevented&&(!xn||xn==="_self")&&Be.button===0){Be.preventDefault(),zw.flushSync(()=>{yr(!0)});const vr=n.subscribe("onResolved",()=>{vr(),yr(!1)});n.navigate({...G,replace:v,resetScroll:w,hashScrollIntoView:g,startTransition:_,viewTransition:R,ignoreBlocker:oe})}};if(xe)return{...O,ref:i,href:xe,...E&&{children:E},...T&&{target:T},...k&&{disabled:k},...x&&{style:x},...N&&{className:N},...I&&{onClick:I},...U&&{onBlur:U},...D&&{onFocus:D},...K&&{onMouseEnter:K},...Q&&{onMouseLeave:Q},...le&&{onTouchStart:le}};const Tt=Be=>{if(k||Cn!=="intent")return;if(!Nt){yn();return}const lt=Be.currentTarget;if(jo.has(lt))return;const xn=setTimeout(()=>{jo.delete(lt),yn()},Nt);jo.set(lt,xn)},nr=Be=>{k||Cn!=="intent"||yn()},Rt=Be=>{if(k||!Cn||!Nt)return;const lt=Be.currentTarget,xn=jo.get(lt);xn&&(clearTimeout(xn),jo.delete(lt))};return{...O,...Qt,...qt,href:ye?.href,ref:i,onClick:oa([I,Ds]),onBlur:oa([U,Rt]),onFocus:oa([D,Tt]),onMouseEnter:oa([K,Tt]),onMouseLeave:oa([Q,Rt]),onTouchStart:oa([le,nr]),disabled:!!k,target:T,...Xt&&{style:Xt},...Ls&&{className:Ls},...k&&EC,...Jt&&TC,...V&&Ms&&RC}}var vf={},SC={className:"active"},EC={role:"link","aria-disabled":!0},TC={"data-status":"active","aria-current":"page"},RC={"data-transitioning":"transitioning"},jo=new WeakMap,AC={rootMargin:"100px"},oa=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function kC(e,t,n,i){if(!i)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function OC(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Oa=te.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:o,...l}=wC(i,t),u=typeof i.children=="function"?i.children({isActive:l["data-status"]==="active"}):i.children;if(!n){const{disabled:d,...f}=l;return te.createElement("a",f,u)}return te.createElement(n,l,u)});function CC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var xC=class extends D_{constructor(t){super(t),this.useMatch=n=>yi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nw({...n,from:this.id}),this.useSearch=n=>Cw({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ow({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>kw({...n,from:this.id}),this.useLoaderData=n=>Aw({...n,from:this.id}),this.useNavigate=()=>xw({from:this.fullPath}),this.Link=X.forwardRef((n,i)=>q.jsx(Oa,{ref:i,from:this.fullPath,...n}))}};function NC(e){return new xC(e)}function zC(){return e=>PC(e)}var jC=class extends nA{constructor(e){super(e),this.useMatch=t=>yi({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Nw({...t,from:this.id}),this.useSearch=t=>Cw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Ow({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>kw({...t,from:this.id}),this.useLoaderData=t=>Aw({...t,from:this.id}),this.useNavigate=()=>xw({from:this.fullPath}),this.Link=X.forwardRef((t,n)=>q.jsx(Oa,{ref:n,from:this.fullPath,...t}))}};function PC(e){return new jC(e)}function he(e){return new LC(e,{silent:!0}).createRoute}var LC=class{constructor(e,t){this.path=e,this.createRoute=n=>{const i=NC(n);return i.isRoot=!1,i},this.silent=t?.silent}};function ue(e,t){let n,i,o,l;const u=()=>(n||(n=e().then(f=>{n=void 0,i=f[t??"default"]}).catch(f=>{if(o=f,J1(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),l=!0)}})),n),d=function(m){if(l)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!i)if(su)su(u());else throw u();return te.createElement(i,m)};return d.preload=u,d}function MC(e){const t=It(),n=`not-found-${ht(t.stores.location,i=>i.pathname)}-${ht(t.stores.status,i=>i)}`;return q.jsx(Sp,{getResetKey:()=>n,onCatch:(i,o)=>
12{if(xt(i))e.onCatch?.(i,o);else throw i},errorComponent:({error:i})=>{if(xt(i))return e.fallback?.(i);throw i},children:e.children})}function DC(){return q.jsx("p",{children:"Not Found"})}function pa(e){return q.jsx(q.Fragment,{children:e.children})}function jw(e,t,n){return t.options.notFoundComponent?q.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?q.jsx(e.options.defaultNotFoundComponent,{...n}):q.jsx(DC,{})}function $C(e){return null}function IC(){return $C(It()),null}var UC=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,BC=(e,t)=>e[0]===t[0]&&e[1]===t[1],Pw=te.memo(function({matchId:t}){const n=It(),i=n.stores.matchStores.get(t);i||fn();const o=ht(n.stores.loadedAt,u=>u),l=ht(i,u=>u,UC);return q.jsx(HC,{router:n,matchId:t,resetKey:o,matchState:te.useMemo(()=>{const u=l.routeId,d=n.routesById[u].parentRoute?.id;return{routeId:u,ssr:l.ssr,_displayPending:l._displayPending,parentRouteId:d}},[l._displayPending,l.routeId,l.ssr,n.routesById])})});function HC({router:e,matchId:t,resetKey:n,matchState:i}){const o=e.routesById[i.routeId],l=o.options.pendingComponent??e.options.defaultPendingComponent,u=l?q.jsx(l,{}):null,d=o.options.errorComponent??e.options.defaultErrorComponent,f=o.options.onCatch??e.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,y=i.ssr===!1||i.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||y)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||y))?te.Suspense:pa,v=d?Sp:pa,_=m?MC:pa;return q.jsxs(o.isRoot?o.options.shellComponent??pa:pa,{children:[q.jsx(Au.Provider,{value:t,children:q.jsx(g,{fallback:u,children:q.jsx(v,{getResetKey:()=>n,errorComponent:d||Ep,onCatch:(w,R)=>{if(xt(w))throw w.routeId??=i.routeId,w;f?.(w,R)},children:q.jsx(_,{fallback:w=>{if(w.routeId??=i.routeId,!m||w.routeId&&w.routeId!==i.routeId||!w.routeId&&
12!o.isRoot)throw w;return te.createElement(m,w)},children:y||i._displayPending?q.jsx(iC,{fallback:u,children:q.jsx(j0,{matchId:t})}):q.jsx(j0,{matchId:t})})})})}),i.parentRouteId===fi?q.jsxs(q.Fragment,{children:[q.jsx(qC,{}),e.options.scrollRestoration&&v_?q.jsx(IC,{}):null]}):null]})}function qC(){const e=It(),t=te.useRef();return Lo(()=>{const n=e.stores.resolvedLocation.get(),i=t.current;n&&(!i||i.href!==n.href)&&e.emit({type:"onRendered",...Ea(e.stores.location.get(),i??n)}),t.current=n},[ht(e.stores.resolvedLocation,n=>n?.state.__TSR_key),e]),null}var j0=te.memo(function({matchId:t}){const n=It(),i=(y,g)=>n.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],o=n.stores.matchStores.get(t);o||fn();const l=ht(o,y=>y),u=l.routeId,d=n.routesById[u],f=te.useMemo(()=>{const y=(n.routesById[u].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:u,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return y?JSON.stringify(y):void 0},[u,l.loaderDeps,l._strictParams,l._strictSearch,n.options.defaultRemountDeps,n.routesById]),m=te.useMemo(()=>{const y=d.options.component??n.options.defaultComponent;return y?q.jsx(y,{},f):q.jsx(Lw,{})},[f,d.options.component,n.options.defaultComponent]);if(l._displayPending)throw i(l,"displayPendingPromise");if(l._forcePending)throw i(l,"minPendingPromise");if(l.status==="pending"){const y=d.options.pendingMinMs??n.options.defaultPendingMinMs;if(y){const g=n.getMatch(l.id);if(g&&!g._nonReactive.minPendingPromise){const v=mi();g._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw i(l,"loadPromise")}if(l.status==="notFound")return xt(l.error)||fn(),jw(n,d,l.error);if(l.status==="redirected")throw Yt(l.error)||fn(),i(l,"loadPromise");if(l.status==="error")throw l.error;return m}),Lw=te.memo(function(){const t=It(),n=te.useContext(Au);let i,o=!1,l;{const m=n?t.stores.matchStores.get(n):void 0;[i,o]=ht(m,y=>[y?.routeId,y?.globalNotFound??!1],BC),l=ht(t.stores.matchesId,y=>y[y.findIndex(g=>g===n)+1])}const u=i?t.routesById[i]:void 0,d=t.options.defaultPendingComponent?q.jsx(t.options.defaultPendingComponent,{}):null;if(o)return u||fn(),jw(t,u,void 0);if(!l)return null;const f=q.jsx(Pw,{matchId:l});return i===fi?q.jsx(te.Suspense,{fallback:d,children:f}):f});function VC(){const e=It(),t=te.useRef({router:e,mounted:!1}),[n,i]=te.useState(!1),o=ht(e.stores.isLoading,g=>g),l=ht(e.stores.hasPending,g=>g),u=hf(o),d=o||n||l,f=hf(d),m=o||l,y=hf(m);return e.startTransition=g=>{i(!0),te.startTransition(()=>{g(),i(!1)})},te.useEffect(()=>{const g=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Hr(e.latestLocation.publicHref)!==Hr(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),Lo(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),Lo(()=>{u&&!o&&e.emit({type:"onLoad",...Ea(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,e,o]),Lo(()=>{y&&!m&&e.emit({type:"onBeforeRouteMount",...Ea(e.stores.location.get(),e.stores.resolvedLocation.get())})},[m,y,e]),Lo(()=>{if(f&&!d){const g=Ea(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...g}),Tw(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[d,f,e]),null}function ZC(){const e=It(),t=e.routesById[fi].options.pendingComponent??e.options.defaultPendingComponent,n=t?q.jsx(t,{}):null,i=q.jsxs(typeof document<"u"&&e.ssr?pa:te.Suspense,{fallback:n,children:[q.jsx(VC,{}),q.jsx(FC,{})]});return e.options.InnerWrap?q.jsx(e.options.InnerWrap,{children:i}):i}function FC(){const e=It(),t=ht(e.stores.firstId,o=>o),n=ht(e.stores.loadedAt,o=>o),i=t?q.jsx(Pw,{matchId:t}):null;return q.jsx(Au.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:q.jsx(Sp,{getResetKey:()=>n,errorComponent:Ep,onCatch:void 0,children:i})})}var GC=e=>({createMutableStore:O0,createReadonlyStore:O0,batch:Tw}),KC=e=>new YC(e),YC=class extends qR{constructor(e){super(e,GC)}};function JC({router:e,children:t,...n}
12){__(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=q.jsx(Sw.Provider,{value:e,children:t});return e.options.Wrap?q.jsx(e.options.Wrap,{children:i}):i}function QC({router:e,...t}){return q.jsx(JC,{router:e,...t,children:q.jsx(ZC,{})})}function P0(e,t){if(t)for(const[n,i]of Object.entries(t))n!=="suppressHydrationWarning"&&i!==void 0&&i!==!1&&e.setAttribute(n,typeof i=="boolean"?"":String(i))}function Mw(e){const{attrs:t,children:n,nonce:i,preventScriptHoist:o}=e;switch(e.tag){case"title":return q.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return q.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return q.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:i,suppressHydrationWarning:!0});case"style":return e.inlineCss,q.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:i});case"script":return q.jsx(XC,{attrs:t,preventScriptHoist:o,children:n});default:return null}}function XC({attrs:e,children:t,preventScriptHoist:n}){It();const i=Tp(),o=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(te.useEffect(()=>{if(!o){if(e?.src){const l=(()=>{try{const d=document.baseURI||window.location.href;return new URL(e.src,d).href}catch{return e.src}})();for(const d of document.querySelectorAll("script[src]"))if(d.src===l)return;const u=document.createElement("script");return P0(u,e),document.head.appendChild(u),()=>u.remove()}if(typeof t=="string"){const l=typeof e?.type=="string"?e.type:"text/javascript",u=typeof e?.nonce=="string"?e.nonce:void 0;for(const f of document.querySelectorAll("script:not([src])")){if(!(f instanceof HTMLScriptElement))continue;const m=f.getAttribute("type")??"text/javascript",y=f.getAttribute("nonce")??void 0;if(f.textContent===t&&m===l&&y===u)return}const d=document.createElement("script");return d.textContent=t,P0(d,e),document.head.appendChild(d),()=>d.remove()}}},[e,t,o]),o&&typeof t=="string")return q.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!i){if(e?.src)return q.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return q.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var WC=e=>{const t=It(),n=t.options.ssr?.nonce,i=ht(t.stores.matches,g=>g.map(v=>v.meta).filter(v=>v!==void 0),Gt),o=te.useMemo(()=>{const g=[],v={};let _;for(let w=i.length-1;w>=0;w--){const R=i[w];for(let E=R.length-1;E>=0;E--){const T=R[E];if(T)if(T.title)_||(_={tag:"title",children:T.title});else if("script:ld+json"in T)try{const k=JSON.stringify(T["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:nR(k)})}catch{}else{const k=T.name??T.property;if(k){if(v[k])continue;v[k]=!0}g.push({tag:"meta",attrs:{...T,nonce:n}})}}}return _&&g.push(_),n&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:n}}),g.reverse(),g},[i,n]),l=ht(t.stores.matches,g=>g.flatMap(v=>v.links??[]).filter(v=>v!==void 0).map(v=>({tag:"link",attrs:{...v,nonce:n}})),Gt),u=ht(t.stores.matches,g=>{const v=t.ssr?.manifest,_=[];return v&&(g.forEach(w=>{v.routes[w.routeId]?.css?.forEach(R=>{const E=tA(R);_.push({tag:"link",attrs:{rel:"stylesheet",...E,crossOrigin:M_(e,"stylesheet")??E.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),v.inlineStyle&&_.push({tag:"style",attrs:{...v.inlineStyle.attrs,nonce:n},children:v.inlineStyle.children,inlineCss:!0})),_},Gt),d=ht(t.stores.matches,g=>{const v=[],_=t.ssr?.manifest;return _&&g.forEach(w=>{_.routes[w.routeId]?.preloads?.forEach(R=>{v.push({tag:"link",attrs:{...WR(_,R,e),nonce:n}})})}),v},Gt),f=ht(t.stores.matches,g=>g.flatMap(v=>v.styles??[]).filter(v=>v!==void 0).map(({children:v,..._})=>({tag:"style",attrs:{..._,nonce:n},children:v})),Gt),m=ht(t.stores.matches,g=>g.flatMap(v=>v.headScripts??[]).filter(v=>v!==void 0).map(({children:v,..._})=>({tag:"script",attrs:{..._,nonce:n},children:v})),Gt),y=[];return Ac(y,o),y.push(...d),Ac(y,l),y.push(...u),Ac(y,f),Ac(y,m),y};function ex(e){const t=WC(e.assetCrossOrigin),n=It().options.ssr?.nonce;return q.jsx(q.Fragment,{children:t.map(i=>te.createElement(Mw,{...i,key:`tsr-meta-${JSON.stringify(i)}`,nonce:n}))})}var tx=()=>{const e=It(),t=e.options.ssr?.nonce,n=l=>{const u=[],d=e.ssr?.manifest;if(!d)return[];for(const f of l){const m=d.routes[f.routeId]?.scripts;if(m)for(const y of m)u.push({tag:"script",attrs:{...y.attrs,nonce:t},children:y.children,...typeof y.attrs?.src=="string"?{preventScriptHoist:!0}:{}})}return u},i=l=>l.map(u=>
12u.scripts).flat(1).filter(Boolean).map(({children:u,...d})=>({tag:"script",attrs:{...d,suppressHydrationWarning:!0,nonce:t},children:u})),o=ht(e.stores.matches,n,Gt);return nx(e,ht(e.stores.matches,i,Gt),o)};function nx(e,t,n){const i=[...t,...n];return q.jsx(q.Fragment,{children:i.map((o,l)=>te.createElement(Mw,{...o,key:`tsr-scripts-${o.tag}-${l}`}))})}function L0(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Zf(e,t){const n=Object.create(null);if(e)for(const i of Object.keys(e))L0(i)&&(n[i]=e[i]);if(t&&typeof t=="object")for(const i of Object.keys(t))L0(i)&&(n[i]=t[i]);return n}function Dw(e){return Object.create(null)}var $w=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},st=(e,t)=>{const n=t||e||{};typeof n.method>"u"&&(n.method="GET");const i=u=>st(void 0,{...n,validator:u,inputValidator:u});return Object.assign(u=>st(void 0,{...n,...u}),{options:n,middleware:u=>{const d=[...n.middleware||[]];u.map(m=>{Gv in m?m.options.middleware&&d.push(...m.options.middleware):d.push(m)});const f=st(void 0,{...n,middleware:d});return f[Gv]=!0,f},validator:i,inputValidator:i,handler:(...u)=>{const[d,f]=u,m={...n,extractedFn:d,serverFn:f},y=[...m.middleware||[],ix(m)];return d.method=n.method,Object.assign(async g=>{const v=await M0(y,"client",{...d,...m,data:g?.data,headers:g?.headers,signal:g?.signal,fetch:g?.fetch,context:Dw()}),_=x_(v.error);if(_)throw _;if(v.error)throw v.error;return v.result},{...d,method:n.method,__executeServer:async g=>{const v=$w(),_=v.contextAfterGlobalMiddlewares;return await M0(y,"server",{...d,...g,serverFnMeta:d.serverFnMeta,context:Zf(g.context,_),request:v.request}).then(w=>({result:w.result,error:w.error,context:w.sendContext}))}})}})};async function M0(e,t,n){let i=rx([...fp()?.functionMiddleware||[],...e]);if(t==="server"){const l=$w();l?.executedRequestMiddlewares&&(i=i.filter(u=>!l.executedRequestMiddlewares.has(u)))}const o=async l=>{const u=i.shift();if(!u)return l;try{let d="validator"in u.options?u.options.validator:void 0;!d&&"inputValidator"in u.options&&(d=u.options.inputValidator),d&&t==="server"&&(l.data=await sx(d,l.data));let f;if(t==="client"?"client"in u.options&&(f=u.options.client):"server"in u.options&&(f=u.options.server),f){const y=await f({...l,next:async(g={})=>{const v=await o({...l,...g,context:Zf(l.context,g.context),sendContext:Zf(l.sendContext,g.sendContext),headers:JO(l.headers,g.headers),_callSiteFetch:l._callSiteFetch,fetch:l._callSiteFetch??g.fetch??l.fetch,result:g.result!==void 0?g.result:g instanceof Response?g:l.result,error:g.error??l.error});if(v.error)throw v.error;return v}});if(Yt(y))return{...l,error:y};if(y instanceof Response)return{...l,result:y};if(!y)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return y}return o(l)}catch(d){return{...l,error:d}}};return o({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||Dw(),_callSiteFetch:n.fetch})}function rx(e,t=100){const n=new Set,i=[],o=(l,u)=>{if(u>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);l.forEach(d=>{d.options.middleware&&o(d.options.middleware,u+1),n.has(d)||(n.add(d),i.push(d))})};return o(e,0),i}async function sx(e,t){if(e==null)return{};if("~standard"in e){const n=await e["~standard"].validate(t);if(n.issues)throw new Error(JSON.stringify(n.issues,void 0,2));return n.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function ix(e){return{"~types":void 0,options:{inputValidator:e.validator??e.inputValidator,client:async({next:t,sendContext:n,fetch:i,...o})=>{const l={...o,context:n,fetch:i};return t(await e.extractedFn?.(l))},server:async({next:t,...n})=>{const i=await e.serverFn?.(n);return t({...n,result:i})}}}}var Os=(e,t)=>{const n={type:"request",...t||e},i=o=>Os({},Object.assign(n,{validator:o,inputValidator:o}));return{options:n,middleware:o=>Os({},Object.assign(n,{middleware:o})),validator:i,inputValidator:i,client:o=>Os({},Object.assign(n,{client:o})),server:o=>Os({},Object.assign(n,{server:o}
12))}};function Iw(e,t){for(let n=0,i=t.length;n<i;n++){const o=t[n];e.has(o)||(e.add(o),o.extends&&Iw(e,o.extends))}}var ax=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const n=new Set;Iw(n,t.serializationAdapters),t.serializationAdapters=Array.from(n)}return t},createMiddleware:Os}),D0=function(){return D0=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},D0.apply(this,arguments)};function ku(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function ox(e,t,n,i){function o(l){return l instanceof n?l:new n(function(u){u(l)})}return new(n||(n=Promise))(function(l,u){function d(y){try{m(i.next(y))}catch(g){u(g)}}function f(y){try{m(i.throw(y))}catch(g){u(g)}}function m(y){y.done?l(y.value):o(y.value).then(d,f)}m((i=i.apply(e,t||[])).next())})}function g3(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,l;i<o;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}const lx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Rp extends Error{constructor(t,n="FunctionsError",i){super(t),this.name=n,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class cx extends Rp{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class $0 extends Rp{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class I0 extends Rp{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ff;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ff||(Ff={}));class ux{constructor(t,{headers:n={},customFetch:i,region:o=Ff.Any}={}){this.url=t,this.headers=n,this.region=o,this.fetch=lx(i)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return ox(this,arguments,void 0,function*(n,i={}){var o;let l,u;try{const{headers:d,method:f,body:m,signal:y,timeout:g}=i;let v={},{region:_}=i;_||(_=this.region);const w=new URL(`${this.url}/${n}`);_&&_!=="any"&&(v["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let R;m&&(d&&!Object.prototype.hasOwnProperty.call(d,"Content-Type")||!d)?typeof Blob<"u"&&m instanceof Blob||m instanceof ArrayBuffer?(v["Content-Type"]="application/octet-stream",R=m):typeof m=="string"?(v["Content-Type"]="text/plain",R=m):typeof FormData<"u"&&m instanceof FormData?R=m:(v["Content-Type"]="application/json",R=JSON.stringify(m)):m&&typeof m!="string"&&!(typeof Blob<"u"&&m instanceof Blob)&&!(m instanceof ArrayBuffer)&&!(typeof FormData<"u"&&m instanceof FormData)?R=JSON.stringify(m):R=m;let E=y;g&&(u=new AbortController,l=setTimeout(()=>u.abort(),g),y?(E=u.signal,y.addEventListener("abort",()=>u.abort())):E=u.signal);const T=yield this.fetch(w.toString(),{method:f||"POST",headers:Object.assign(Object.assign(Object.assign({},v),this.headers),d),body:R,signal:E}).catch(I=>{throw new cx(I)}),k=T.headers.get("x-relay-error");if(k&&k==="true")throw new $0(T);if(!T.ok)throw new I0(T);let x=((o=T.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),N;return x==="application/json"?N=yield T.json():x==="application/octet-stream"||x==="application/pdf"?N=yield T.blob():x==="text/event-stream"?N=T:x==="multipart/form-data"?N=yield T.formData():N=yield T.text(),{data:N,error:null,response:T}}catch(d){return{data:null,error:d,response:d instanceof I0||d instanceof $0?d.context:void 0}}finally{l&&clearTimeout(l)}})}}const Uw=3,U0=e=>Math.min(1e3*2**e,3e4),dx=[520,503],Bw=["GET","HEAD","OPTIONS"];
12var hx=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function B0(e,t){return new Promise(n=>{if(t?.aborted){n();return}const i=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e);function o(){clearTimeout(i),n()}t?.addEventListener("abort",o)})}function fx(e,t,n,i){return!(!i||n>=Uw||!Bw.includes(e)||!dx.includes(t))}var px=class{constructor(e){var t,n,i,o,l;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(i=e.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(l=e.retry)!==null&&l!==void 0?l:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let l=(async()=>{let u=0;for(;;){const m=new Headers(n.headers);u>0&&m.set("X-Retry-Count",String(u));let y;try{y=await i(n.url.toString(),{method:n.method,headers:m,body:JSON.stringify(n.body,(g,v)=>typeof v=="bigint"?v.toString():v),signal:n.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!Bw.includes(n.method))throw g;if(n.retryEnabled&&u<Uw){const v=U0(u);u++,await B0(v,n.signal);continue}throw g}if(fx(n.method,y.status,u,n.retryEnabled)){var d,f;const g=(d=(f=y.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&d!==void 0?d:null,v=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:U0(u);await y.text(),u++,await B0(v,n.signal);continue}return await n.processResponse(y)}})();return this.shouldThrowOnError||(l=l.catch(u=>{var d;let f="",m="",y="";const g=u?.cause;if(g){var v,_,w,R;const k=(v=g?.message)!==null&&v!==void 0?v:"",x=(_=g?.code)!==null&&_!==void 0?_:"";f=`${(w=u?.name)!==null&&w!==void 0?w:"FetchError"}: ${u?.message}`,f+=` 13 14Caused by: ${(R=g?.name)!==null&&R!==void 0?R:"Error"}: ${k}`,x&&(f+=` (${x})`),g?.stack&&(f+=` 15${g.stack}`)}else{var E;f=(E=u?.stack)!==null&&E!==void 0?E:""}const T=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",T>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${T} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",T>this.urlLengthLimit&&(m+=`. Your request URL is ${T} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(d=u?.name)!==null&&d!==void 0?d:"FetchError"}: ${u?.message}`,details:f,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
15)),l.then(e,t)}async processResponse(e){var t=this;let n=null,i=null,o=null,l=e.status,u=e.statusText;if(e.ok){var d,f;if(t.method!=="HEAD"){var m;const v=await e.text();v===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?i=v:i=JSON.parse(v))}const y=(d=t.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),g=(f=e.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&g&&g.length>1&&(o=parseInt(g[1])),t.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(n={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,o=null,l=406,u="Not Acceptable"):i.length===1?i=i[0]:i=null)}else{const y=await e.text();try{n=JSON.parse(y),Array.isArray(n)&&e.status===404&&(i=[],n=null,l=200,u="OK")}catch{e.status===404&&y===""?(l=204,u="No Content"):n={message:y}}if(n&&t.shouldThrowOnError)throw new hx(n)}return{success:n===null,error:n,data:i,count:o,status:l,statusText:u}}returns(){return this}overrideTypes(){return this}},mx=class extends px{select(e){let t=!1;const n=(e??"*").split("").map(i=>/\s/.test(i)&&!t?"":(i==='"'&&(t=!t),i)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:i,referencedTable:o=i}={}){const l=o?`${o}.order`:"order",u=this.url.searchParams.get(l);return this.url.searchParams.set(l,`${u?`${u},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:i=n}={}){const o=typeof i>"u"?"offset":`${i}.offset`,l=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(l,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:i=!1,wal:o=!1,format:l="text"}={}){var u;const d=[e?"analyze":null,t?"verbose":null,n?"settings":null,i?"buffers":null,o?"wal":null].filter(Boolean).join("|"),f=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${l}; for="${f}"; options=${d};`),l==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const H0=new RegExp("[,()]");var ma=class extends mx{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(i=>typeof i=="string"&&H0.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(i=>typeof i=="string"&&H0.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:i}={}){let o="";i==="plain"?o="pl":i==="phrase"?o="ph":i==="websearch"&&(o="w");const l=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${o}fts${l}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
15n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const i=n?`${n}.or`:"or";return this.url.searchParams.append(i,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},gx=class{constructor(e,{headers:t={},schema:n,fetch:i,urlLengthLimit:o=8e3,retry:l}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=i,this.urlLengthLimit=o,this.retry=l}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:i}=t??{},o=n?"HEAD":"GET";let l=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!l?"":(m==='"'&&(l=!l),m)).join(""),{url:d,headers:f}=this.cloneRequestState();return d.searchParams.set("select",u),i&&f.append("Prefer",`count=${i}`),new ma({method:o,url:d,headers:f,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var i;const o="POST",{url:l,headers:u}=this.cloneRequestState();
15if(t&&u.append("Prefer",`count=${t}`),n||u.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((f,m)=>f.concat(Object.keys(m)),[]);if(d.length>0){const f=[...new Set(d)].map(m=>`"${m}"`);l.searchParams.set("columns",f.join(","))}}return new ma({method:o,url:l,headers:u,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:i,defaultToNull:o=!0}={}){var l;const u="POST",{url:d,headers:f}=this.cloneRequestState();if(f.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&d.searchParams.set("on_conflict",t),i&&f.append("Prefer",`count=${i}`),o||f.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);d.searchParams.set("columns",y.join(","))}}return new ma({method:u,url:d,headers:f,schema:this.schema,body:e,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const i="PATCH",{url:o,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new ma({method:i,url:o,headers:l,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:i,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new ma({method:n,url:i,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Go(e){"@babel/helpers - typeof";return Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Go(e)}function yx(e,t){if(Go(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(Go(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vx(e){var t=yx(e,"string");return Go(t)=="symbol"?t:t+""}function bx(e,t,n){return(t=vx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(n),!0).forEach(function(i){bx(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q0(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var _x=class Hw{constructor(t,{headers:n={},schema:i,fetch:o,timeout:l,urlLengthLimit:u=8e3,retry:d}={}){this.url=t,this.headers=new Headers(n),this.schemaName=i,this.urlLengthLimit=u;const f=o??globalThis.fetch;l!==void 0&&l>0?this.fetch=(m,y)=>{const g=new AbortController,v=setTimeout(()=>g.abort(),l),_=y?.signal;if(_){if(_.aborted)return clearTimeout(v),f(m,y);const w=()=>{clearTimeout(v),g.abort()};return _.addEventListener("abort",w,{once:!0}),f(m,Cc(Cc({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(v),_.removeEventListener("abort",w)})}return f(m,Cc(Cc({},y),{},{signal:g.signal})).finally(()=>clearTimeout(v))}:this.fetch=f,this.retry=d}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new gx(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new Hw(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:i=!1,get:o=!1,count:l}={}){var u;let d;const f=new URL(`${this.url}/rpc/${t}`);let m;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),g=i&&Object.values(n).some(y);g?(d="POST",m=n):i||o?(d=i?"HEAD":"GET",Object.entries(n).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}
15`]).forEach(([_,w])=>{f.searchParams.append(_,w)})):(d="POST",m=n);const v=new Headers(this.headers);return g?v.set("Prefer",l?`count=${l},return=minimal`:"return=minimal"):l&&v.set("Prefer",`count=${l}`),new ma({method:d,url:f,headers:v,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class wx{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const o=globalThis.process;if(o){const l=o.versions;if(l&&l.node){const u=l.node,d=parseInt(u.replace(/^v/,"").split(".")[0]);return d>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${d} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${d} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 18 19Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const Sx="2.106.2",Ex=`realtime-js/${Sx}`,Tx="1.0.0",qw="2.0.0",Rx=qw,Ax=1e4,kx=100,Ts={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Vw={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Gf={connecting:"connecting",closing:"closing",closed:"closed"};class Ox{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,i;const o=(i=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var n,i;const o=(i=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&i!==void 0?i:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,n,i){var o,l;const u=t.topic,d=(o=t.ref)!==null&&o!==void 0?o:"",f=(l=t.join_ref)!==null&&l!==void 0?l:"",m=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},g=Object.keys(y).length===0?"":JSON.stringify(y);if(f.length>255)throw new Error(`joinRef length ${f.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`ref length ${d.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`userEvent length ${m.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const v=this.USER_BROADCAST_PUSH_META_LENGTH+f.length+d.length+u.length+m.length+g.length,_=new ArrayBuffer(this.HEADER_LENGTH+v);let w=new DataView(_),R=0;w.setUint8(R++,this.KINDS.userBroadcastPush),w.setUint8(R++,f.length),w.setUint8(R++,d.length),w.setUint8(R++,u.length),w.setUint8(R++,m.length),w.setUint8(R++,g.length),w.setUint8(R++,n),Array.from(f,T=>w.setUint8(R++,T.charCodeAt(0))),Array.from(d,T=>w.setUint8(R++,T.charCodeAt(0))),Array.from(u,T=>w.setUint8(R++,T.charCodeAt(0))),Array.from(m,T=>w.setUint8(R++,T.charCodeAt(0))),Array.from(g,T=>w.setUint8(R++,T.charCodeAt(0)));var E=new Uint8Array(_.byteLength+i.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(i),_.byteLength),E.buffer}decode(t,n){if(this._isArrayBuffer(t)){let i=this._binaryDecode(t);return n(i)}if(typeof t=="string"){const i=JSON.parse(t),[o,l,u,d,f]=i;
19return n({join_ref:o,ref:l,topic:u,event:d,payload:f})}return n({})}_binaryDecode(t){const n=new DataView(t),i=n.getUint8(0),o=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,n,o)}_decodeUserBroadcast(t,n,i){const o=n.getUint8(1),l=n.getUint8(2),u=n.getUint8(3),d=n.getUint8(4);let f=this.HEADER_LENGTH+4;const m=i.decode(t.slice(f,f+o));f=f+o;const y=i.decode(t.slice(f,f+l));f=f+l;const g=i.decode(t.slice(f,f+u));f=f+u;const v=t.slice(f,t.byteLength),_=d===this.JSON_ENCODING?JSON.parse(i.decode(v)):v,w={type:this.BROADCAST_EVENT,event:y,payload:_};return u>0&&(w.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t?.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([i])=>n.includes(i)))}}var Ke;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ke||(Ke={}));const V0=(e,t,n={})=>{var i;const o=(i=n.skipTypes)!==null&&i!==void 0?i:[];return t?Object.keys(t).reduce((l,u)=>(l[u]=Cx(u,e,t,o),l),{}):{}},Cx=(e,t,n,i)=>{const o=t.find(d=>d.name===e),l=o?.type,u=n[e];return l&&!i.includes(l)?Zw(l,u):Kf(u)},Zw=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return jx(t,n)}switch(e){case Ke.bool:return xx(t);case Ke.float4:case Ke.float8:case Ke.int2:case Ke.int4:case Ke.int8:case Ke.numeric:case Ke.oid:return Nx(t);case Ke.json:case Ke.jsonb:return zx(t);case Ke.timestamp:return Px(t);case Ke.abstime:case Ke.date:case Ke.daterange:case Ke.int4range:case Ke.int8range:case Ke.money:case Ke.reltime:case Ke.text:case Ke.time:case Ke.timestamptz:case Ke.timetz:case Ke.tsrange:case Ke.tstzrange:return Kf(t);default:return Kf(t)}},Kf=e=>e,xx=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Nx=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},zx=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},jx=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,i=e[n];if(e[0]==="{"&&i==="}"){let l;const u=e.slice(1,n);try{l=JSON.parse("["+u+"]")}catch{l=u?u.split(","):[]}return l.map(d=>Zw(t,d))}return e},Px=e=>typeof e=="string"?e.replace(" ","T"):e,Fw=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Io=e=>typeof e=="function"?e:function(){return e},Lx=typeof self<"u"?self:null,ga=typeof window<"u"?window:null,hr=Lx||ga||globalThis,Mx="2.0.0",Dx=1e4,$x=1e3,pr={connecting:0,open:1,closing:2,closed:3},un={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Ur={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Yf={longpoll:"longpoll",websocket:"websocket"},Ix={complete:4},Jf="base64url.bearer.phx.",xc=class{constructor(e,t,n,i){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 19
19matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(i=>i.status===e).forEach(i=>i.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Gw=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Ux=class{constructor(e,t,n){this.state=un.closed,this.topic=e,this.params=Io(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new xc(this,Ur.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Gw(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=un.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=un.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=un.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=un.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new xc(this,Ur.leave,Io({}),this.timeout).send(),this.state=un.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Ur.reply,(i,o)=>{this.trigger(this.replyEventName(o),i)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=un.closed,this.bindings=[]}onClose(e){this.on(Ur.close,e)}onError(e){return this.on(Ur.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new xc(this,e,function(){return t},n);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=un.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Ur.close,"leave")},n=new xc(this,Ur.leave,Io({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,i){return this.topic!==e?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=un.joining,this.joinPush.resend(e))}trigger(e,t,n,i){let o=this.onMessage(e,t,n,i);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let l=this.bindings.filter(u=>u.event===e&&this.filterBindings(u,t,n));for(let u=0;u<l.length;u++)l[u].callback(o,n,i||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===un.closed}isErrored(){return this.state===un.errored}isJoined(){return this.state===un.joined}isJoining(){return this.state===un.joining}isLeaving(){return this.state===un.leaving}},au=class{static request(e,t,n,i,o,l,u){if(hr.XDomainRequest){let d=new hr.XDomainRequest;return this.xdomainRequest(d,e,t,i,o,l,u)}else if(hr.XMLHttpRequest){let d=new hr.XMLHttpRequest;return this.xhrRequest(d,e,t,n,i,o,l,u)}else{if(hr.fetch&&hr.AbortController)return this.fetchRequest(e,t,n,i,o,l,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,i,o,l,u){let d={method:e,headers:n,body:i},f=null;return o&&(f=new AbortController,setTimeout(()=>f.abort(),o),d.signal=f.signal),hr.fetch(t,d).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&l?l():u&&u(null)}),f}static xdomainRequest(e,t,n,i,o,l,u){return e.timeout=o,e.open(t,n),e.onload=()=>{let d=this.parseJSON(e.responseText);u&&u(d)},l&&(e.ontimeout=l),e.onprogress=()=>{},e.send(i),e}static xhrRequest(e,t,n,i,o,l,u,d){e.open(t,n,!0),e.timeout=l;for(let[f,m]of Object.entries(i))e.setRequestHeader(f,m);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===Ix.complete&&d){let f=this.parseJSON(e.responseText);d(f)}},u&&(e.ontimeout=u),e.send(o),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let o=t?`${t}[${i}]`:i,l=e[i];typeof l=="object"?n.push(this.serialize(l,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(l))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},Bx=e=>{let t="",n=new Uint8Array(e),i=n.byteLength;for(let o=0;o<i;o++)t+=String.fromCharCode(n[o]);return btoa(t)},la=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Jf)&&(this.authToken=atob(t[1].slice(Jf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=pr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Yf.websocket),"$1/"+Yf.longpoll)}endpointURL(){return au.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=pr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===pr.open||this.readyState===pr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:i,messages:o}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else n=0;switch(n){case 200:o.forEach(l=>{setTimeout(()=>this.onmessage({data:l}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=pr.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=Bx(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let o of this.reqs)o.abort();this.readyState=pr.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(e,t,n,i,o){let l,u=()=>{this.reqs.delete(l),i()};l=au.request(e,this.endpointURL(),t,n,this.timeout,u,d=>{this.reqs.delete(l),this.isActive()&&o(d)}),this.reqs.add(l)}},Hx=class Mo{constructor(t,n={}){let i=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(i.state,o=>{let{onJoin:l,onLeave:u,onSync:d}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Mo.syncState(this.state,o,l,u),this.pendingDiffs.forEach(f=>{this.state=Mo.syncDiff(this.state,f,l,u)}),this.pendingDiffs=[],d()}),this.channel.on(i.diff,o=>{let{onJoin:l,onLeave:u,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Mo.syncDiff(this.state,o,l,u),d())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Mo.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,i,o){let l=this.clone(t),u={},d={};return this.map(l,(f,m)=>{n[f]||(d[f]=m)}),this.map(n,(f,m)=>{let y=l[f];if(y){let g=m.metas.map(R=>R.phx_ref),v=y.metas.map(R=>R.phx_ref),_=m.metas.filter(R=>v.indexOf(R.phx_ref)<0),w=y.metas.filter(R=>g.indexOf(R.phx_ref)<0);_.length>0&&(u[f]=m,u[f].metas=_),w.length>0&&(d[f]=this.clone(y),d[f].metas=w)}else u[f]=m}),this.syncDiff(l,{joins:u,leaves:d},i,o)}static syncDiff(t,n,i,o){let{joins:l,leaves:u}=this.clone(n);return i||(i=function(){}),o||(o=function(){}),this.map(l,(d,f)=>{let m=t[d];if(t[d]=this.clone(f),m){let y=t[d].metas.map(v=>v.phx_ref),g=m.metas.filter(v=>y.indexOf(v.phx_ref)<0);t[d].metas.unshift(...g)}i(d,m,f)}),this.map(u,(d,f)=>{let m=t[d];if(!m)return;let y=f.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(d,m,f),m.metas.length===0&&delete t[d]}),t}static list(t,n){return n||(n=function(i,o){return o}),this.map(t,(i,o)=>n(i,o))}static map(t,n){return Object.getOwnPropertyNames(t).map(i=>n(i,t[i]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Nc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,i,o,l,u]=JSON.parse(e);return t({join_ref:n,ref:i,topic:o,event:l,payload:u})}},binaryEncode(e){let{join_ref:t,ref:n,event:i,topic:o,payload:l}=e,u=this.META_LENGTH+t.length+n.length+o.length+i.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),m=0;f.setUint8(m++,this.KINDS.push),f.setUint8(m++,t.length),f.setUint8(m++,n.length),f.setUint8(m++,o.length),f.setUint8(m++,i.length),Array.from(t,g=>f.setUint8(m++,g.charCodeAt(0))),Array.from(n,g=>f.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>f.setUint8(m++,g.charCodeAt(0))),Array.from(i,g=>f.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(d.byteLength+l.byteLength);return y.set(new Uint8Array(d),0),y.set(new Uint8Array(l),d.byteLength),y.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,i);case this.KINDS.reply:return this.decodeReply(e,t,i);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,i)}}
20,decodePush(e,t,n){let i=t.getUint8(1),o=t.getUint8(2),l=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,d=n.decode(e.slice(u,u+i));u=u+i;let f=n.decode(e.slice(u,u+o));u=u+o;let m=n.decode(e.slice(u,u+l));u=u+l;let y=e.slice(u,e.byteLength);return{join_ref:d,ref:null,topic:f,event:m,payload:y}},decodeReply(e,t,n){let i=t.getUint8(1),o=t.getUint8(2),l=t.getUint8(3),u=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,f=n.decode(e.slice(d,d+i));d=d+i;let m=n.decode(e.slice(d,d+o));d=d+o;let y=n.decode(e.slice(d,d+l));d=d+l;let g=n.decode(e.slice(d,d+u));d=d+u;let v=e.slice(d,e.byteLength),_={status:g,response:v};return{join_ref:f,ref:m,topic:y,event:Ur.reply,payload:_}},decodeBroadcast(e,t,n){let i=t.getUint8(1),o=t.getUint8(2),l=this.HEADER_LENGTH+2,u=n.decode(e.slice(l,l+i));l=l+i;let d=n.decode(e.slice(l,l+o));l=l+o;let f=e.slice(l,e.byteLength);return{join_ref:null,ref:null,topic:u,event:d,payload:f}}},qx=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Dx,this.transport=t.transport||hr.WebSocket||la,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=hr&&hr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Nc.encode.bind(Nc),this.defaultDecoder=Nc.decode.bind(Nc),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==la?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;ga&&ga.addEventListener&&(ga.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),i=this.connectClock)}),ga.addEventListener("pageshow",o=>{i===this.connectClock&&(i=null,this.connect())}),ga.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>t.rejoinAfterMs?t.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>t.reconnectAfterMs?t.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(o,l,u)=>{console.log(`${o}: ${l}`,u)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Io(t.params||{}),this.endPoint=`${e}/${Yf.websocket}`,this.vsn=t.vsn||Mx,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Gw(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return la}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=au.appendParams(au.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Io(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==la?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(la,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let i=this.onMessage(o=>{o.ref===t&&(this.off([i]),e(Date.now()-n))});return!0}transportName(e){return e===la?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Jf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,i=!0,o,l,u=this.transportName(e),d=f=>{this.log("transport",`falling back to ${u}...`,f),this.off([o,l]),i=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),l=this.onError(f=>{this.log("transport","error",f),i&&!n&&(clearTimeout(this.fallbackTimer),d(f))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!i){let f=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${f}`,"true"),this.log("transport",`established ${f} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,t),this.ping(f=>{this.log("transport","connected to primary after",f),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),$x,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const i=this.conn;this.waitForBufferDone(i,()=>{t?i.close(t,n||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===pr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Ur.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case pr.connecting:return"connecting";case pr.open:return"open";case pr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new Ux(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:i,ref:o,join_ref:l}=e;this.log("push",`${t} ${n} (${l}, ${o})`,i)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:i,payload:o,ref:l,join_ref:u}=t;if(l&&l===this.pendingHeartbeatRef){const d=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",d)}catch(f){this.log("error","error in heartbeat callback",f)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${n} ${i} ${l&&"("+l+")"||""}`.trim(),o);for(let d=0;d<this.channels.length;d++){const f=this.channels[d];f.isMember(n,i,o,u)&&f.trigger(i,o,l,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,i])=>{try{i(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Uo{constructor(t,n){const i=Zx(n);this.presence=new Hx(t.getChannel(),i),this.presence.onJoin((o,l,u)=>{const d=Uo.onJoinPayload(o,l,u);t.getChannel().trigger("presence",d)}),this.presence.onLeave((o,l,u)=>{const d=Uo.onLeavePayload(o,l,u);t.getChannel().trigger("presence",d)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Uo.transformState(this.presence.state)}static transformState(t){return t=Vx(t),Object.getOwnPropertyNames(t).reduce((n,i)=>{const o=t[i];return n[i]=Qc(o),n},{})}static onJoinPayload(t,n,i){const o=Z0(n),l=Qc(i);return{event:"join",key:t,currentPresences:o,newPresences:l}}static onLeavePayload(t,n,i){const o=Z0(n),l=Qc(i);return{event:"leave",key:t,currentPresences:o,leftPresences:l}}}function Qc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function Vx(e){return JSON.parse(JSON.stringify(e))}function Zx(e){return e?.events&&{events:e.events}}function Z0(e){return e?.metas?Qc(e):[]}var F0;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(F0||(F0={}));class Fx{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Uo(this.channel.channelAdapter,n)}}function Gx(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class Kx{constructor(t,n,i){const o=Yx(i);this.channel=t.getSocket().channel(n,o),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,i){let o;try{o=this.channel.push(t,n,i)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>kx){const l=this.channel.pushBuffer.shift();l.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${l.event}`,l.payload())}return o}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Ts.joined}isJoined(){return this.state===Ts.joined}isJoining(){return this.state===Ts.joining}isClosed(){return this.state===Ts.closed}isLeaving(){return this.state===Ts.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function Yx(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var G0;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(G0||(G0={}));var _a;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(_a||(_a={}));var Br;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Br||(Br={}));class Bo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},i){var o,l;if(this.topic=t,this.params=n,this.socket=i,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new Kx(this.socket.socketAdapter,t,this.params),this.presence=new Fx(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Fw(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((l=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var i,o,l;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:d,private:f}}=this.params,m=(o=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(_=>_.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[_a.PRESENCE]&&this.bindings[_a.PRESENCE].length>0||((l=this.params.config.presence)===null||l===void 0?void 0:l.enabled)===!0,g={},v={broadcast:u,presence:Object.assign(Object.assign({},d),{enabled:y}),postgres_changes:m,private:f};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(Br.CHANNEL_ERROR,Gx(_))}),this._onClose(()=>t?.(Br.CLOSED)),this.updateJoinPayload(Object.assign({config:v},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(Br.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Ts.errored;const w=Object.values(_).join(", ")||"error";t?.(Br.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(Br.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var i;const o=this.bindings.postgres_changes,l=(i=o?.length)!==null&&i!==void 0?i:0,u=[];for(let d=0;d<l;d++){const f=o[d],{filter:{event:m,schema:y,table:g,filter:v}}=f,_=t&&t[d];if(_&&_.event===m&&Bo.isFilterValueEqual(_.schema,y)&&Bo.isFilterValueEqual(_.table,g)&&Bo.isFilterValueEqual(_.filter,v))u.push(Object.assign(Object.assign({},f),{id:_.id}));else{this.unsubscribe(),this.state=Ts.errored,n?.(Br.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=Ts.errored&&n&&n(Br.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,i){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),l=t===_a.PRESENCE||t===_a.POSTGRES_CHANGES;if(o&&l)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,i)}async httpSend(t,n,i={}){var o;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},d=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(o=i.timeout)!==null&&o!==void 0?o:this.timeout);if(d.status===202)return{success:!0};let f=d.statusText;try{const m=await d.json();f=m.error||m.message||f}catch{}return Promise.reject(new Error(f))}async send(t,n={}){var i,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:l,payload:u}=t,d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:l,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(l=>{var u,d,f;const m=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((f=(d=(u=this.params)===null||u===void 0?void 0:u.config)===null||d===void 0?void 0:d.broadcast)===null||f===void 0)&&f.ack)&&l("ok"),m.receive("ok",()=>l("ok")),m.receive("error",()=>l("error")),m.receive("timeout",()=>l("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,i){const o=new AbortController,l=setTimeout(()=>o.abort(),i),u=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:o.signal}));return clearTimeout(l),u}_on(t,n,i){const o=t.toLocaleLowerCase(),l=this.channelAdapter.on(t,i),u={type:o,filter:n,callback:i,ref:l};return this.bindings[o]?this.bindings[o].push(u):this.bindings[o]=[u],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,i)=>{var o,l,u,d,f,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,i))return!1;const v=(o=this.bindings[g])===null||o===void 0?void 0:o.find(_=>_.ref===t.ref);if(!v)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in v){const _=v.id,w=(l=v.filter)===null||l===void 0?void 0:l.event;return _&&((u=n.ids)===null||u===void 0?void 0:u.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((d=n.data)===null||d===void 0?void 0:d.type.toLocaleLowerCase()))}else{const _=(m=(f=v?.filter)===null||f===void 0?void 0:f.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((y=n?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,n){const{close:i,error:o,leave:l,join:u}=Vw;return n&&[i,o,l,u].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,i)=>{if(typeof n=="object"&&"ids"in n){const o=n.data,{schema:l,table:u,commit_timestamp:d,type:f,errors:m}=o;return Object.assign(Object.assign({},{schema:l,table:u,commit_timestamp:d,eventType:f,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const i of t.bindings[n])this._on(i.type,i.filter,i.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=V0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=V0(t.columns,t.old_record)),n}}class Jx{constructor(t,n){this.socket=new qx(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,i,o=1e4){return new Promise(l=>{setTimeout(()=>l("timeout"),o),this.socket.disconnect(()=>{t(),l("ok")},n,i)})}push(t){this.socket.push(t)}log(t,n,i){this.socket.log(t,n,i)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Gf.connecting}isDisconnecting(){return this.socket.connectionState()==Gf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const K0={HEARTBEAT_INTERVAL:25e3},Qx=[1e3,2e3,5e3,1e4],Xx=1e4;function Wx(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function e2(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Wx()}const t2=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class n2{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new Ox,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=l=>l?(...u)=>l(...u):(...u)=>fetch(...u),!(!((i=n?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const o=this._initializeOptions(n);this.socketAdapter=new Jx(t,o),this.httpEndpoint=Fw(t),this.fetch=this._resolveFetch(n?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async i=>{const o=await i.unsubscribe();return i.teardown(),o}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,i){this.socketAdapter.log(t,n,i)}connectionState(){return this.socketAdapter.connectionState()||Gf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const i=`realtime:${t}`,o=this.getChannels().find(l=>l.topic===i);if(o)return o;{const l=new Bo(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(l),l}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,i=!1;if(t)n=t,i=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),n=this.accessTokenValue}else n=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(o=>{const l={access_token:n,version:Ex};n&&o.updateJoinPayload(l),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(Vw.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,i)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,i)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const i=new Blob([t2],{type:"application/javascript"});n=URL.createObjectURL(i)}return n}_initializeOptions(t){var n,i,o,l,u,d,f,m,y,g,v,_;this.worker=(n=t?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(i=t?.accessToken)!==null&&i!==void 0?i:null;const w={};w.timeout=(o=t?.timeout)!==null&&o!==void 0?o:Ax,w.heartbeatIntervalMs=(l=t?.heartbeatIntervalMs)!==null&&l!==void 0?l:K0.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((d=t?.heartbeatIntervalMs)!==null&&d!==void 0?d:K0.HEARTBEAT_INTERVAL),w.transport=(f=t?.transport)!==null&&f!==void 0?f:wx.getWebSocketConstructor(),w.params=t?.params,w.logger=t?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),w.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:e2(),w.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(k=>Qx[k-1]||Xx);let R,E;const T=(g=t?.vsn)!==null&&g!==void 0?g:Rx;switch(T){case Tx:R=(k,x)=>x(JSON.stringify(k)),E=(k,x)=>x(JSON.parse(k));break;case qw:R=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=T,w.encode=(v=t?.encode)!==null&&v!==void 0?v:R,w.decode=(_=t?.decode)!==null&&_!==void 0?_:E,w.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var Ko=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function r2(e,t,n){const i=new URL(t,e);if(n)for(const[o,l]of Object.entries(n))l!==void 0&&i.searchParams.set(o,l);return i.toString()}async function s2(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function i2(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:i,query:o,body:l,headers:u}){const d=r2(e.baseUrl,i,o),f=await s2(e.auth),m=await t(d,{method:n,headers:{...l?{"Content-Type":"application/json"}:{},...f,...u},body:l?JSON.stringify(l):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),v=g&&y?JSON.parse(y):y;if(!m.ok){const _=g?v:void 0,w=_?.error;throw new Ko(w?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:m.status,headers:m.headers,data:v}}}}function zc(e){return e.join("�")}var a2=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:zc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${zc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${zc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${zc(e.namespace)}`}),!0}catch(t){if(t instanceof Ko&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Ko&&n.status===409)return;throw n}}};function ca(e){return e.join("�")}var o2=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ca(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ca(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ca(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ca(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ca(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ca(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Ko&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ko&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},l2=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=i2({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new a2(this.client,t),this.tableOps=new o2(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
38async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Yo(e){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yo(e)}function c2(e,t){if(Yo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(Yo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u2(e){var t=c2(e,"string");return Yo(t)=="symbol"?t:t+""}function d2(e,t,n){return(t=u2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y0(Object(n),!0).forEach(function(i){d2(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y0(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var Ou=class extends Error{constructor(e,t="storage",n,i){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Cu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Qf=class extends Ou{constructor(e,t,n,i="storage"){super(e,i,t,n),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return ge({},super.toJSON())}},Kw=class extends Ou{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function ou(e,t,n){const i=ge({},e),o=t.toLowerCase();for(const l of Object.keys(i))l.toLowerCase()===o&&delete i[l];return i[o]=n,i}function h2(e){const t={};for(const[n,i]of Object.entries(e))t[n.toLowerCase()]=i;return t}const f2=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),p2=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Xf=e=>{if(Array.isArray(e))return e.map(n=>Xf(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,i])=>{const o=n.replace(/([-_][a-z])/gi,l=>l.toUpperCase().replace(/[-_]/g,""));t[o]=Xf(i)}),t},m2=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),J0=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},g2=async(e,t,n,i)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let l=parseInt(String(o.status),10);Number.isFinite(l)||(l=500),o.json().then(u=>{const d=u?.statusCode||u?.code||l+"";t(new Qf(J0(u),l,d,i))}).catch(()=>{const u=l+"";t(new Qf(o.statusText||`HTTP ${l} error`,l,u,i))})}else t(new Kw(J0(e),e,i))},y2=(e,t,n,i)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!i)return ge(ge({},o),n);if(p2(i)){var l;const u=t?.headers||{};let d;for(const[f,m]of Object.entries(u))f.toLowerCase()==="content-type"&&(d=m);o.headers=ou(u,"Content-Type",(l=d)!==null&&l!==void 0?l:"application/json"),o.body=JSON.stringify(i)}else o.body=i;return t?.duplex&&(o.duplex=t.duplex),ge(ge({},o),n)};async function Po(e,t,n,i,o,l,u){return new Promise((d,f)=>{e(n,y2(t,i,o,l)).then(m=>{if(!m.ok)throw m;if(i?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>d(m)).catch(m=>g2(m,f,i,u))})}function Yw(e="storage"){return{get:async(t,n,i,o)=>Po(t,"GET",n,i,o,void 0,e),post:async(t,n,i,o,l)=>Po(t,"POST",n,o,l,i,e),put:async(t,n,i,o,l)=>Po(t,"PUT",n,o,l,i,e),head:async(t,n,i,o)=>Po(t,"HEAD",n,ge(ge({},i),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,n,i,o,l)=>Po(t,"DELETE",n,o,l,i,e)}}const v2=Yw("storage"),{get:Jo,post:Jn,put:Wf,head:b2,remove:Ap}=v2,Rn=Yw("vectors");var ja=class{constructor(e,t={},n,i="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=h2(t),this.fetch=f2(n),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=ou(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Cu(n))return{data:null,error:n};throw n}}};let Jw;Jw=Symbol.toStringTag;var _2=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Jw]="StreamDownloadBuilder",this.promise=null}
38then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Cu(t))return{data:null,error:t};throw t}}};let Qw;Qw=Symbol.toStringTag;var w2=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Qw]="BlobDownloadBuilder",this.promise=null}asStream(){return new _2(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Cu(t))return{data:null,error:t};throw t}}};const S2={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Q0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var E2=class extends ja{constructor(e,t={},n,i){super(e,t,i,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,i){var o=this;return o.handleOperation(async()=>{let l;const u=ge(ge({},Q0),i);let d=ge(ge({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const f=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),f&&l.append("metadata",o.encodeMetadata(f)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),f&&!l.has("metadata")&&l.append("metadata",o.encodeMetadata(f))):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,f&&(d["x-metadata"]=o.toBase64(o.encodeMetadata(f))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),i?.headers)for(const[v,_]of Object.entries(i.headers))d=ou(d,v,_);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?Wf:Jn)(o.fetch,`${o.url}/object/${y}`,l,ge({headers:d},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,i){var o=this;const l=o._removeEmptyFolders(e),u=o._getFinalPath(l),d=new URL(o.url+`/object/upload/sign/${u}`);return d.searchParams.set("token",t),o.handleOperation(async()=>{let f;const m=ge(ge({},Q0),i);let y=ge(ge({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&n instanceof Blob?(f=new FormData,f.append("cacheControl",m.cacheControl),g&&f.append("metadata",o.encodeMetadata(g)),f.append("",n)):typeof FormData<"u"&&n instanceof FormData?(f=n,f.has("cacheControl")||f.append("cacheControl",m.cacheControl),g&&!f.has("metadata")&&f.append("metadata",o.encodeMetadata(g))):(f=n,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!m.duplex&&(m.duplex="half")),i?.headers)for(const[v,_]of Object.entries(i.headers))y=ou(y,v,_);return{path:l,fullPath:(await Wf(o.fetch,d.toString(),f,ge({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(e);const o=ge({},n.headers);t?.upsert&&(o["x-upsert"]="true");const l=await Jn(n.fetch,`${n.url}/object/upload/sign/${i}`,{},{headers:o}),u=new URL(n.url+l.url),d=u.searchParams.get("token");if(!d)throw new Ou("No token returned by API");return{signedUrl:u.toString(),path:e,token:d}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var i=this;return i.handleOperation(async()=>await Jn(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:n?.destinationBucket},{headers:i.headers}))}async copy(e,t,n){var i=this;return i.handleOperation(async()=>({path:(await Jn(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:i.headers})).Key}))}async createSignedUrl(e,t,n){var i=this;return i.handleOperation(async()=>{let o=i._getFinalPath(e);const l=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let u=await Jn(i.fetch,`${i.url}/object/sign/${o}`,ge({expiresIn:t},l?{transform:n.transform}:{}),{headers:i.headers});const d=new URLSearchParams;n?.download&&d.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&d.set("cacheNonce",String(n.cacheNonce));const f=d.toString();return{signedUrl:encodeURI(`${i.url}${u.signedURL}${f?`&${f}`:""}`)}})}async createSignedUrls(e,t,n){var i=this;return i.handleOperation(async()=>{const o=await Jn(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:t,paths:e},{headers:i.headers}),l=new URLSearchParams;n?.download&&l.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&l.set("cacheNonce",String(n.cacheNonce));const u=l.toString();return o.map(d=>ge(ge({},d),{},{signedUrl:d.signedURL?encodeURI(`${i.url}${d.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,n){const i=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(o,t.transform),t?.cacheNonce!=null&&o.set("cacheNonce",String(t.cacheNonce));const l=o.toString(),u=this._getFinalPath(e),d=()=>Jo(this.fetch,`${this.url}/${i}/${u}${l?`?${l}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new w2(d,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Xf(await Jo(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await b2(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(Cu(o)){var i;const l=o instanceof Qf?o.status:o instanceof Kw?(i=o.originalError)===null||i===void 0?void 0:i.status:void 0;if(l!==void 0&&[400,404].includes(l))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const n=this._getFinalPath(e),i=new URLSearchParams;t?.download&&i.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set("cacheNonce",String(t.cacheNonce));const o=i.toString(),l=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${n}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Ap(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var i=this;return i.handleOperation(async()=>{const o=ge(ge(ge({},S2),t),{},{prefix:e||""});return await Jn(i.fetch,`${i.url}/object/list/${i.bucketId}`,o,{headers:i.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const i=ge({},e);return await Jn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,i,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const T2="2.106.2",sl={"X-Client-Info":`storage-js/${T2}`};var R2=class extends ja{constructor(e,t={},n,i){const o=new URL(e);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const l=o.href.replace(/\/$/,""),u=ge(ge({},sl),t);super(l,u,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Jo(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Jo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Jn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Wf(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Jn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ap(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},A2=class extends ja{constructor(e,t={},n){const i=e.replace(/\/$/,""),o=ge(ge({},sl),t);super(i,o,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Jn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;e?.limit!==void 0&&n.set("limit",e.limit.toString()),e?.offset!==void 0&&n.set("offset",e.offset.toString()),e?.sortColumn&&n.set("sortColumn",e.sortColumn),e?.sortOrder&&n.set("sortOrder",e.sortOrder),e?.search&&n.set("search",e.search);const i=n.toString(),o=i?`${t.url}/bucket?${i}`:`${t.url}/bucket`;return await Jo(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ap(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!m2(e))throw new Ou("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new l2({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(n,{get(o,l){const u=o[l];return typeof u!="function"?u:async(...d)=>{try{return{data:await u.apply(o,d),error:null}}catch(f){if(i)throw f;return{data:null,error:f}}}}})}},k2=class extends ja{constructor(e,t={},n){const i=e.replace(/\/$/,""),o=ge(ge({},sl),{},{"Content-Type":"application/json"},t);super(i,o,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Rn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Rn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},O2=class extends ja{constructor(e,t={},n){const i=e.replace(/\/$/,""),o=ge(ge({},sl),{},{"Content-Type":"application/json"},t);super(i,o,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
38if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},C2=class extends ja{constructor(e,t={},n){const i=e.replace(/\/$/,""),o=ge(ge({},sl),{},{"Content-Type":"application/json"},t);super(i,o,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Rn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},x2=class extends C2{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new N2(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},N2=class extends k2{constructor(e,t,n,i){super(e,t,i),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new z2(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},z2=class extends O2{constructor(e,t,n,i,o){super(e,t,o),this.vectorBucketName=n,this.indexName=i}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,ge(ge({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},j2=class extends R2{constructor(e,t={},n,i){super(e,t,n,i)}from(e){return new E2(this.url,this.headers,e,this.fetch)}get vectors(){return new x2(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new A2(this.url+"/iceberg",this.headers,this.fetch)}};const Xw="2.106.2",ya=30*1e3,ep=3,bf=ep*ya,P2="http://localhost:9999",L2="supabase.auth.token",M2={"X-Client-Info":`gotrue-js/${Xw}`},tp="X-Supabase-Api-Version",Ww={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},D2=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,$2=600*1e3;class Ca extends Error{constructor(t,n,i){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ee(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class I2 extends Ca{constructor(t,n,i){super(t,n,i),this.name="AuthApiError",this.status=n,this.code=i}
38}function U2(e){return ee(e)&&e.name==="AuthApiError"}class Xn extends Ca{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Kr extends Ca{constructor(t,n,i,o){super(t,i,o),this.name=n,this.status=i}}class Ct extends Kr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jc(e){return ee(e)&&e.name==="AuthSessionMissingError"}class ua extends Kr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Pc extends Kr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Lc extends Kr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function B2(e){return ee(e)&&e.name==="AuthImplicitGrantRedirectError"}class X0 extends Kr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class H2 extends Kr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class np extends Kr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function _f(e){return ee(e)&&e.name==="AuthRetryableFetchError"}class W0 extends Kr{constructor(t,n,i){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class rp extends Kr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const lu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),eb=` 39\r=`.split(""),q2=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<eb.length;t+=1)e[eb[t].charCodeAt(0)]=-2;for(let t=0;t<lu.length;t+=1)e[lu[t].charCodeAt(0)]=t;return e})();function tb(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const i=t.queue>>t.queuedBits-6&63;n(lu[i]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const i=t.queue>>t.queuedBits-6&63;n(lu[i]),t.queuedBits-=6}}function eS(e,t,n){const i=q2[e];if(i>-1)for(t.queue=t.queue<<6|i,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function nb(e){const t=[],n=u=>{t.push(String.fromCodePoint(u))},i={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},l=u=>{F2(u,i,n)};for(let u=0;u<e.length;u+=1)eS(e.charCodeAt(u),o,l);return t.join("")}function V2(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Z2(e,t){for(let n=0;n<e.length;n+=1){let i=e.charCodeAt(n);if(i>55295&&i<=56319){const o=(i-55296)*1024&65535;i=(e.charCodeAt(n+1)-56320&65535|o)+65536,n+=1}V2(i,t)}}function F2(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let i=1;i<6;i+=1)if((e>>7-i&1)===0){t.utf8seq=i;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Aa(e){const t=[],n={queue:0,queuedBits:0},i=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)eS(e.charCodeAt(o),n,i);return new Uint8Array(t)}function G2(e){const t=[];return Z2(e,n=>t.push(n)),new Uint8Array(t)}function hi(e){const t=[],n={queue:0,queuedBits:0},i=o=>{t.push(o)};return e.forEach(o=>tb(o,n,i)),tb(null,n,i),t.join("")}function K2(e){return Math.round(Date.now()/1e3)+e}function Y2(){return Symbol("auth-callback")}const $t=()=>typeof window<"u"&&typeof document<"u",ii={tested:!1,writable:!1},tS=()=>
39{if(!$t())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ii.tested)return ii.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ii.tested=!0,ii.writable=!0}catch{ii.tested=!0,ii.writable=!1}return ii.writable};function J2(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((o,l)=>{t[l]=o})}catch{}return n.searchParams.forEach((i,o)=>{t[o]=i}),t}const nS=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Q2=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",va=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ai=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Dt=async(e,t)=>{await e.removeItem(t)};class xu{constructor(){this.promise=new xu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}xu.promiseConstructor=Promise;function Mc(e){const t=e.split(".");if(t.length!==3)throw new rp("Invalid JWT structure");for(let i=0;i<t.length;i++)if(!D2.test(t[i]))throw new rp("JWT not in base64url format");return{header:JSON.parse(nb(t[0])),payload:JSON.parse(nb(t[1])),signature:Aa(t[2]),raw:{header:t[0],payload:t[1]}}}async function X2(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function W2(e,t){return new Promise((i,o)=>{(async()=>{for(let l=0;l<1/0;l++)try{const u=await e(l);if(!t(l,null,u)){i(u);return}}catch(u){if(!t(l,u)){o(u);return}}})()})}function eN(e){return("0"+e.toString(16)).substr(-2)}function tN(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=n.length;let o="";for(let l=0;l<56;l++)o+=n.charAt(Math.floor(Math.random()*i));return o}return crypto.getRandomValues(t),Array.from(t,eN).join("")}async function nN(e){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n),o=new Uint8Array(i);return Array.from(o).map(l=>String.fromCharCode(l)).join("")}async function rN(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await nN(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function da(e,t,n=!1){const i=tN();let o=i;n&&(o+="/recovery"),await va(e,`${t}-code-verifier`,o);const l=await rN(i);return[l,i===l?"plain":"s256"]}const sN=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function iN(e){const t=e.headers.get(tp);if(!t||!t.match(sN))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function aN(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function oN(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const lN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ir(e){if(!lN.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Yn(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function wf(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function cN(e,t){return new Proxy(e,{get:(n,i,o)=>
39{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){const l=i.toString();if(l==="Symbol(Symbol.toPrimitive)"||l==="Symbol(Symbol.toStringTag)"||l==="Symbol(util.inspect.custom)"||l==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,i,o)}return!t.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,i,o)}})}function rb(e){return JSON.parse(JSON.stringify(e))}const oi=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},uN=[502,503,504,520,521,522,523,524,530];async function sb(e){var t;if(!Q2(e))throw new np(oi(e),0);if(uN.includes(e.status))throw new np(oi(e),e.status);let n;try{n=await e.json()}catch(l){throw new Xn(oi(l),l)}let i;const o=iN(e);if(o&&o.getTime()>=Ww["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?i=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(i=n.error_code),i){if(i==="weak_password")throw new W0(oi(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(i==="session_not_found")throw new Ct}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((l,u)=>l&&typeof u=="string",!0))throw new W0(oi(n),e.status,n.weak_password.reasons);throw new I2(oi(n),e.status||500,i)}const dN=(e,t,n,i)=>{const o={method:e,headers:t?.headers||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),o.body=JSON.stringify(i),Object.assign(Object.assign({},o),n))};async function re(e,t,n,i){var o;const l=Object.assign({},i?.headers);l[tp]||(l[tp]=Ww["2024-01-01"].name),i?.jwt&&(l.Authorization=`Bearer ${i.jwt}`);const u=(o=i?.query)!==null&&o!==void 0?o:{};i?.redirectTo&&(u.redirect_to=i.redirectTo);const d=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",f=await hN(e,t,n+d,{headers:l,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(f):{data:Object.assign({},f),error:null}}async function hN(e,t,n,i,o,l){const u=dN(t,i,o,l);let d;try{d=await e(n,Object.assign({},u))}catch(f){throw console.error(f),new np(oi(f),0)}if(d.ok||await sb(d),i?.noResolveJson)return d;try{return await d.json()}catch(f){await sb(f)}}function Bn(e){var t;let n=null;mN(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=K2(e.expires_in)));const i=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:n,user:i},error:null}}function ib(e){const t=Bn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,i)=>n&&typeof i=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Rs(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function fN(e){return{data:e,error:null}}function pN(e){const{action_link:t,email_otp:n,hashed_token:i,redirect_to:o,verification_type:l}=e,u=ku(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:t,email_otp:n,hashed_token:i,redirect_to:o,verification_type:l},f=Object.assign({},u);return{data:{properties:d,user:f},error:null}}function ab(e){return e}function mN(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Sf=["global","local","others"];class gN{_encodePathSegment(t){if(t==="."||t==="..")throw new Ca("Invalid path segment");return encodeURIComponent(t)}constructor({url:t="",headers:n={},fetch:i,experimental:o}){this.url=t,this.headers=n,this.fetch=nS(i),this.experimental=o??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=Sf[0]){if(Sf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Sf.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(i){if(ee(i))return{data:null,error:i};throw i}}async inviteUserByEmail(t,n={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Rs})}catch(i){if(ee(i))return{data:{user:null},error:i};throw i}}async generateLink(t){try{const{options:n}=t,i=ku(t,["options"]),o=Object.assign(Object.assign({},i),n);return"newEmail"in i&&(o.new_email=i?.newEmail,delete o.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:pN,redirectTo:n?.redirectTo})}catch(n){if(ee(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Rs})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,i,o,l,u,d,f;try{const m={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(l=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&l!==void 0?l:""},xform:ab});if(y.error)throw y.error;const g=await y.json(),v=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(f=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return _.length>0&&(_.forEach(w=>{const R=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);m[`${E}Page`]=R}),m.total=parseInt(v)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ee(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){Ir(t);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Rs})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Ir(t);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Rs})}catch(i){if(ee(i))return{data:{user:null},error:i};throw i}}async deleteUser(t,n=!1){Ir(t);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Rs})}catch(i){if(ee(i))return{data:{user:null},error:i};throw i}}async _listFactors(t){Ir(t.userId);try{const{data:n,error:i}=await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:n,error:i}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Ir(t.userId),Ir(t.id);try{return{data:await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,i,o,l,u,d,f;try{const m={nextPage:null,lastPage:0,total:0},y=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(l=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&l!==void 0?l:""},xform:ab});if(y.error)throw y.error;const g=await y.json(),v=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(f=(d=y.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&f!==void 0?f:[];return _.length>0&&(_.forEach(w=>{const R=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);m[`${E}Page`]=R}),m.total=parseInt(v)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(ee(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{const i=this._encodePathSegment(t);return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${i}`,{body:n,headers:this.headers,xform:o=>({data:o,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t?.type&&(n.type=t.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:i=>{var o;return{data:{providers:(o=i?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(n){if(ee(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{const i=this._encodePathSegment(t);return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${i}`,{body:n,headers:this.headers,xform:o=>({data:o,error:null})})}catch(i){if(ee(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){Yn(this.experimental),Ir(t.userId);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){Yn(this.experimental),Ir(t.userId),Ir(t.passkeyId);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}}function ob(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const cr={debug:!!(globalThis&&tS()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class rS extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class lb extends rS{}async function yN(e,t,n){cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const i=new globalThis.AbortController;let o;t>0&&(o=setTimeout(()=>{i.abort(),cr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async l=>{if(l){clearTimeout(o),cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,l.name);try{return await n()}finally{cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,l.name)}}else{if(t===0)throw cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new lb(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(cr.debug)try{const u=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(u,null," "))}catch(u){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",u)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(o),await n()}})}catch(l){if(t>0&&clearTimeout(o),l!==null&&typeof l=="object"&&"name"in l&&l.name==="AbortError"&&t>0){if(i.signal.aborted)return cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async u=>{if(u){cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,u.name);try{return await n()}finally{cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,u.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new lb(`Lock "${e}" was released because another request stole it`)}throw l}}function vN(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function sS(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function bN(e){return parseInt(e,16)}function _N(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,i=>i.toString(16).padStart(2,"0")).join("")}function wN(e){var t;const{chainId:n,domain:i,expirationTime:o,issuedAt:l=new Date,nonce:u,notBefore:d,requestId:f,resources:m,scheme:y,uri:g,version:v}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(v!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${v}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=sS(e.address),w=y?`${y}://${i}`:i,R=e.statement?`${e.statement} 41`:"",E=`${w} wants you to sign in with your Ethereum account: 42${_} 43 44${R}`;
44let T=`URI: ${g} 45Version: ${v} 46Chain ID: ${n}${u?` 47Nonce: ${u}`:""} 48Issued At: ${l.toISOString()}`;if(o&&(T+=` 49Expiration Time: ${o.toISOString()}`),d&&(T+=` 50Not Before: ${d.toISOString()}`),f&&(T+=` 51Request ID: ${f}`),m){let k=` 52Resources:`;for(const x of m){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);k+=` 53- ${x}`}T+=k}return`${E} 54${T}`}class _t extends Error{constructor({message:t,code:n,cause:i,name:o}){var l;super(t,{cause:i}),this.__isWebAuthnError=!0,this.name=(l=o??(i instanceof Error?i.name:void 0))!==null&&l!==void 0?l:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class cu extends _t{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function SN({error:e,options:t}){var n,i,o;const{publicKey:l}=t;if(!l)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new _t({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=l.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new _t({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((i=l.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new _t({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=l.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new _t({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new _t({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new _t({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return l.pubKeyCredParams.filter(d=>d.type==="public-key").length===0?new _t({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new _t({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const u=window.location.hostname;if(iS(u)){if(l.rp.id!==u)return new _t({message:`The RP ID "${l.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _t({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(l.user.id.byteLength<1||l.user.id.byteLength>64)return new _t({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new _t({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new _t({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function EN({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new _t({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new _t({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(iS(i)){if(n.rpId!==i)return new _t({message:`The RP ID "${n.rpId}
54" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _t({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new _t({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new _t({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class TN{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const sp=new TN;function cb(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:i}=e,o=ku(e,["challenge","user","excludeCredentials"]),l=Aa(t).buffer,u=Object.assign(Object.assign({},n),{id:Aa(n.id).buffer}),d=Object.assign(Object.assign({},o),{challenge:l,user:u});if(i&&i.length>0){d.excludeCredentials=new Array(i.length);for(let f=0;f<i.length;f++){const m=i[f];d.excludeCredentials[f]=Object.assign(Object.assign({},m),{id:Aa(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return d}function ub(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,i=ku(e,["challenge","allowCredentials"]),o=Aa(t).buffer,l=Object.assign(Object.assign({},i),{challenge:o});if(n&&n.length>0){l.allowCredentials=new Array(n.length);for(let u=0;u<n.length;u++){const d=n[u];l.allowCredentials[u]=Object.assign(Object.assign({},d),{id:Aa(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return l}function db(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:hi(new Uint8Array(e.response.attestationObject)),clientDataJSON:hi(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function hb(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,i=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:hi(new Uint8Array(o.authenticatorData)),clientDataJSON:hi(new Uint8Array(o.clientDataJSON)),signature:hi(new Uint8Array(o.signature)),userHandle:o.userHandle?hi(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function iS(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function uu(){var e,t;return!!($t()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function aS(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cu("Browser returned unexpected credential type",t)}:{data:null,error:new cu("Empty credential response",t)}}catch(t){return{data:null,error:SN({error:t,options:e})}}}async function oS(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cu("Browser returned unexpected credential type",t)}:{data:null,error:new cu("Empty credential response",t)}}
54catch(t){return{data:null,error:EN({error:t,options:e})}}}const RN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},AN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function du(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),n=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),i={};for(const o of e)if(o)for(const l in o){const u=o[l];if(u!==void 0)if(Array.isArray(u))i[l]=u;else if(n(u))i[l]=u;else if(t(u)){const d=i[l];t(d)?i[l]=du(d,u):i[l]=du(u)}else i[l]=u}return i}function kN(e,t){return du(RN,e,t||{})}function ON(e,t){return du(AN,e,t||{})}class CN{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:i,signal:o},l){var u;try{const{data:d,error:f}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!d)return{data:null,error:f};const m=o??sp.createNewAbortSignal();if(d.webauthn.type==="create"){const{user:y}=d.webauthn.credential_options.publicKey;if(!y.name){const g=i;if(g)y.name=`${y.id}:${g}`;else{const _=(await this.client.getUser()).data.user,w=((u=_?.user_metadata)===null||u===void 0?void 0:u.name)||_?.email||_?.id||"User";y.name=`${y.id}:${w}`}}y.displayName||(y.displayName=y.name)}switch(d.webauthn.type){case"create":{const y=kN(d.webauthn.credential_options.publicKey,l?.create),{data:g,error:v}=await aS({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:v}}case"request":{const y=ON(d.webauthn.credential_options.publicKey,l?.request),{data:g,error:v}=await oS(Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:d.id,webauthn:{type:d.webauthn.type,credential_response:g}},error:null}:{data:null,error:v}}}}catch(d){return ee(d)?{data:null,error:d}:{data:null,error:new Xn("Unexpected error in challenge",d)}}}async _verify({challengeId:t,factorId:n,webauthn:i}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:i})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},l){if(!n)return{data:null,error:new Ca("rpId is required for WebAuthn authentication")};try{if(!uu())return{data:null,error:new Xn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:i},signal:o},{request:l});if(!u)return{data:null,error:d};const{webauthn:f}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:f.type,rpId:n,rpOrigins:i,credential_response:f.credential_response}})}catch(u){return ee(u)?{data:null,error:u}:{data:null,error:new Xn("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},l){if(!n)return{data:null,error:new Ca("rpId is required for WebAuthn registration")};try{if(!uu())return{data:null,error:new Xn("Browser does not support WebAuthn",null)};const{data:u,error:d}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(v=>v.factor_type==="webauthn"&&v.friendly_name===t&&v.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:d};const{data:f,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:n,rpOrigins:i},signal:o},{create:l});return f?this._verify({factorId:u.id,challengeId:f.challengeId,webauthn:{rpId:n,rpOrigins:i,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:m}}catch(u){return ee(u)?{data:null,error:u}:{data:null,error:new Xn("Unexpected error in register",u)}}}}vN();const xN={url:P2,storageKey:L2,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:M2,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function fb(e,t,n){return await n()}const ha={};class Qo{get jwks(){var t,n;return(n=(t=ha[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){ha[this.storageKey]=Object.assign(Object.assign({},ha[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=ha[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ha[this.storageKey]=Object.assign(Object.assign({},ha[this.storageKey]),{cachedAt:t})}constructor(t){var n,i,o,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},xN),t);
54if(this.storageKey=u.storageKey,this.instanceID=(n=Qo.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Qo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&$t()){const d=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(d),this.logDebugMessages&&console.trace(d)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(i=u.experimental)!==null&&i!==void 0?i:{},this.admin=new gN({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=nS(u.fetch),this.lock=u.lock||fb,this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock?this.lock=u.lock:this.persistSession&&$t()&&(!((o=globalThis?.navigator)===null||o===void 0)&&o.locks)?this.lock=yN:this.lock=fb,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new CN(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(u.storage?this.storage=u.storage:tS()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ob(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=ob(this.memoryStorage)),$t()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(d){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",d)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async d=>{this._debug("received broadcast notification from other tab or client",d);try{await this._notifyAllSubscribers(d.data.event,d.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}u.skipAutoInitialize||this.initialize().catch(d=>{this._debug("#initialize()","error",d)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Xw}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},i="none";if($t()&&(n=J2(window.location.href),this._isImplicitGrantCallback(n)?i="implicit":await this._isPKCECallback(n)&&(i="pkce")),$t()&&this.detectSessionInUrl&&i!=="none"){const{data:o,error:l}=await this._getSessionFromURL(n,i);if(l){if(this._debug("#_initialize()","error detecting session from URL",l),B2(l)){const f=(t=l.details)===null||t===void 0?void 0:t.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:l}}return{error:l}}const{session:u,redirectType:d}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",d),await this._saveSession(u),setTimeout(async()=>{d==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ee(n)?this._returnResult({error:n}):this._returnResult({error:new Xn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,i,o;try{const l=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(n=t?.options)===null||n===void 0?void 0:n.data)!==null&&i!==void 0?i:{}
54,gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:Bn}),{data:u,error:d}=l;if(d||!u)return this._returnResult({data:{user:null,session:null},error:d});const f=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:m,session:f},error:null})}catch(l){if(ee(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signUp(t){var n,i,o;try{let l;if("email"in t){const{email:y,password:g,options:v}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await da(this.storage,this.storageKey)),l=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:v?.emailRedirectTo,body:{email:y,password:g,data:(n=v?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:v?.captchaToken},code_challenge:_,code_challenge_method:w},xform:Bn})}else if("phone"in t){const{phone:y,password:g,options:v}=t;l=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:g,data:(i=v?.data)!==null&&i!==void 0?i:{},channel:(o=v?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:v?.captchaToken}},xform:Bn})}else throw new Pc("You must provide either an email or phone number and a password");const{data:u,error:d}=l;if(d||!u)return await Dt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:d});const f=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:m,session:f},error:null})}catch(l){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithPassword(t){try{let n;if("email"in t){const{email:l,password:u,options:d}=t;n=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:l,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:ib})}else if("phone"in t){const{phone:l,password:u,options:d}=t;n=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:l,password:u,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:ib})}else throw new Pc("You must provide either an email or phone number and a password");const{data:i,error:o}=n;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!i||!i.session||!i.user){const l=new ua;return this._returnResult({data:{user:null,session:null},error:l})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:o})}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,i,o,l;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(i=t.options)===null||i===void 0?void 0:i.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(l=t.options)===null||l===void 0?void 0:l.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,i,o,l,u,d,f,m,y,g,v;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:R,wallet:E,statement:T,options:k}=t;let x;if($t())if(typeof E=="object")x=E;else{const Q=window;if("ethereum"in Q&&typeof Q.ethereum=="object"&&"request"in Q.ethereum&&typeof Q.ethereum.request=="function")x=Q.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof E!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=E}const N=new URL((n=k?.url)!==null&&n!==void 0?n:window.location.href),I=await x.request({method:"eth_requestAccounts"}).then(Q=>Q).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!I||I.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const U=sS(I[0]);let D=(i=k?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!D){const Q=await x.request({method:"eth_chainId"});D=bN(Q)}const K={domain:N.host,address:U,statement:T,uri:N.href,version:"1",chainId:D,nonce:(o=k?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(l=k?.signInWithEthereum)===null||l===void 0?void 0:l.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(d=k?.signInWithEthereum)===null||d===void 0?void 0:d.expirationTime,notBefore:(f=k?.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(m=k?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=k?.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=wN(K),w=await x.request({method:"personal_sign",params:[_N(_),U]})}try{const{data:R,error:E}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(v=t.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Bn});if(E)throw E;if(!R||!R.session||!R.user){const T=new ua;return this._returnResult({data:{user:null,session:null},error:T})}return R.session&&(await this._saveSession(R.session),await this._notifyAllSubscribers("SIGNED_IN",R.session)),this._returnResult({data:Object.assign({},R),error:E})}catch(R){if(ee(R))return this._returnResult({data:{user:null,session:null},error:R});throw R}}async signInWithSolana(t){var n,i,o,l,u,d,f,m,y,g,v,_;let w,R;if("message"in t)w=t.message,R=t.signature;else{const{chain:E,wallet:T,statement:k,options:x}=t;let N;if($t())if(typeof T=="object")N=T;else{const U=window;if("solana"in U&&typeof U.solana=="object"&&("signIn"in U.solana&&typeof U.solana.signIn=="function"||"signMessage"in U.solana&&typeof U.solana.signMessage=="function"))N=U.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof T!="object"||!x?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=T}const I=new URL((n=x?.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in N&&N.signIn){const U=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x?.signInWithSolana),{version:"1",domain:I.host,uri:I.href}),k?{statement:k}:null));let D;if(Array.isArray(U)&&U[0]&&typeof U[0]=="object")D=U[0];else if(U&&typeof U=="object"&&"signedMessage"in U&&"signature"in U)D=U;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in D&&"signature"in D&&(typeof D.signedMessage=="string"||D.signedMessage instanceof Uint8Array)&&D.signature instanceof Uint8Array)w=typeof D.signedMessage=="string"?D.signedMessage:new TextDecoder().decode(D.signedMessage),R=D.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${I.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...k?["",k,""]:[""],"Version: 1",`URI: ${I.href}`,`Issued At: ${(o=(i=x?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((l=x?.signInWithSolana)===null||l===void 0)&&l.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((u=x?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((d=x?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((f=x?.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((m=x?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((g=(y=x?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...x.signInWithSolana.resources.map(D=>`- ${D}`)]:[]].join(` 55`);const U=await N.signMessage(new TextEncoder().encode(w),"utf8");if(!U||!(U instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");R=U}}try{const{data:E,error:T}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:hi(R)},!((v=t.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:Bn});if(T)throw T;if(!E||!E.session||!E.user){const k=new ua;return this._returnResult({data:{user:null,session:null},error:k})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:T})}
55catch(E){if(ee(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const n=await ai(this.storage,`${this.storageKey}-code-verifier`),[i,o]=(n??"").split("/");try{if(!i&&this.flowType==="pkce")throw new H2;const{data:l,error:u}=await re(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:i},xform:Bn});if(await Dt(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!l||!l.session||!l.user){const d=new ua;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l.session)),this._returnResult({data:Object.assign(Object.assign({},l),{redirectType:o??null}),error:u})}catch(l){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(l))return this._returnResult({data:{user:null,session:null,redirectType:null},error:l});throw l}}async signInWithIdToken(t){try{const{options:n,provider:i,token:o,access_token:l,nonce:u}=t,d=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:o,access_token:l,nonce:u,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:Bn}),{data:f,error:m}=d;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!f||!f.session||!f.user){const y=new ua;return this._returnResult({data:{user:null,session:null},error:y})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:m})}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,i,o,l,u;try{if("email"in t){const{email:d,options:f}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await da(this.storage,this.storageKey));const{error:g}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(n=f?.data)!==null&&n!==void 0?n:{},create_user:(i=f?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},code_challenge:m,code_challenge_method:y},redirectTo:f?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in t){const{phone:d,options:f}=t,{data:m,error:y}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(o=f?.data)!==null&&o!==void 0?o:{},create_user:(l=f?.shouldCreateUser)!==null&&l!==void 0?l:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},channel:(u=f?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:y})}throw new Pc("You must provide either an email or phone number.")}catch(d){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async verifyOtp(t){var n,i;try{let o,l;"options"in t&&(o=(n=t.options)===null||n===void 0?void 0:n.redirectTo,l=(i=t.options)===null||i===void 0?void 0:i.captchaToken);const{data:u,error:d}=await re(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:l}}),redirectTo:o,xform:Bn});if(d)throw d;if(!u)throw new Error("An error occurred on token verification.");const f=u.session,m=u.user;return f?.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:m,session:f},error:null})}catch(o){if(ee(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var n,i,o,l,u;try{let d=null,f=null;this.flowType==="pkce"&&([d,f]=await da(this.storage,this.storageKey));const m=await re(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&i!==void 0?i:void 0}
55),!((o=t?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:d,code_challenge_method:f}),headers:this.headers,xform:fN});return!((l=m.data)===null||l===void 0)&&l.url&&$t()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(d){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(d))return this._returnResult({data:null,error:d});throw d}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:i}=t;if(i)throw i;if(!n)throw new Ct;const{error:o}=await re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(ee(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:i,type:o,options:l}=t,{error:u}=await re(this.fetch,"POST",n,{headers:this.headers,body:{email:i,type:o,gotrue_meta_security:{captcha_token:l?.captchaToken}},redirectTo:l?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:i,type:o,options:l}=t,{data:u,error:d}=await re(this.fetch,"POST",n,{headers:this.headers,body:{phone:i,type:o,gotrue_meta_security:{captcha_token:l?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u?.message_id},error:d})}throw new Pc("You must provide either an email or phone number and a type")}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await i,await n()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=n();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await ai(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const i=t.expires_at?t.expires_at*1e3-Date.now()<bf:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",t.expires_at),!i){if(this.userStorage){const u=await ai(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=wf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=cN(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:l}=await this._callRefreshToken(t.refresh_token);return l?this._returnResult({data:{session:null},error:l}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Rs}):await this._useSession(async n=>{var i,o,l;const{data:u,error:d}=n;
55if(d)throw d;return!(!((i=u.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ct}:await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(l=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&l!==void 0?l:void 0,xform:Rs})})}catch(n){if(ee(n))return jc(n)&&(await this._removeSession(),await Dt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async i=>{const{data:o,error:l}=i;if(l)throw l;if(!o.session)throw new Ct;const u=o.session;let d=null,f=null;this.flowType==="pkce"&&t.email!=null&&([d,f]=await da(this.storage,this.storageKey));const{data:m,error:y}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:d,code_challenge_method:f}),jwt:u.access_token,xform:Rs});if(y)throw y;return u.user=m.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(i){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ct;const n=Date.now()/1e3;let i=n,o=!0,l=null;const{payload:u}=Mc(t.access_token);if(u.exp&&(i=u.exp,o=i<=n),o){const{data:d,error:f}=await this._callRefreshToken(t.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!d)return{data:{user:null,session:null},error:null};l=d}else{const{data:d,error:f}=await this._getUser(t.access_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});l={access_token:t.access_token,refresh_token:t.refresh_token,user:d.user,token_type:"bearer",expires_in:i-n,expires_at:i},await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)}return this._returnResult({data:{user:l.user,session:l},error:null})}catch(n){if(ee(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var i;if(!t){const{data:u,error:d}=n;if(d)throw d;t=(i=u.session)!==null&&i!==void 0?i:void 0}if(!t?.refresh_token)throw new Ct;const{data:o,error:l}=await this._callRefreshToken(t.refresh_token);return l?this._returnResult({data:{user:null,session:null},error:l}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var i;try{if(!$t())throw new Lc("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Lc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new X0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Lc("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new X0("No code detected.");const{data:x,error:N}=await this._exchangeCodeForSession(t.code);if(N)throw N;const I=new URL(window.location.href);return I.searchParams.delete("code"),window.history.replaceState(window.history.state,"",I.toString()),{data:{session:x.session,redirectType:(i=x.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:o,provider_refresh_token:l,access_token:u,refresh_token:d,expires_in:f,expires_at:m,token_type:y}=t;if(!u||!f||!d||!y)throw new Lc("No session defined in URL");const g=Math.round(Date.now()/1e3),v=parseInt(f);let _=g+v;m&&(_=parseInt(m));const w=_-g;
55w*1e3<=ya&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${v}s`);const R=_-v;g-R>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",R,_,g):g-R<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",R,_,g);const{data:E,error:T}=await this._getUser(u);if(T)throw T;const k={provider_token:o,provider_refresh_token:l,access_token:u,expires_in:v,expires_at:_,refresh_token:d,token_type:y,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:k,redirectType:t.type},error:null})}catch(o){if(ee(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await ai(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var i;const{data:o,error:l}=n;if(l&&!jc(l))return this._returnResult({error:l});const u=(i=o.session)===null||i===void 0?void 0:i.access_token;if(u){const{error:d}=await this.admin.signOut(u,t);if(d&&!(U2(d)&&(d.status===404||d.status===401||d.status===403)||jc(d)))return this._returnResult({error:d})}return t!=="others"&&(await this._removeSession(),await Dt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=Y2(),i={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,i),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:i}}}async _emitInitialSession(t){return await this._useSession(async n=>{var i,o;try{const{data:{session:l},error:u}=n;if(u)throw u;await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",l)),this._debug("INITIAL_SESSION","callback id",t,"session",l)}catch(l){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",l),jc(l)?console.warn(l):console.error(l)}})}async resetPasswordForEmail(t,n={}){let i=null,o=null;this.flowType==="pkce"&&([i,o]=await da(this.storage,this.storageKey,!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:i,code_challenge_method:o,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(l){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(l))return this._returnResult({data:null,error:l});throw l}}async getUserIdentities(){var t;try{const{data:n,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:i,error:o}=await this._useSession(async l=>{var u,d,f,m,y;const{data:g,error:v}=l;if(v)throw v;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(d=t.options)===null||d===void 0?void 0:d.scopes,queryParams:(f=t.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:!0});return await re(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(m=g.session)===null||m===void 0?void 0:m.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return $t()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(i?.url),this._returnResult({data:{provider:t.provider,url:i?.url},error:null})}catch(i){if(ee(i))return this._returnResult({data:{provider:t.provider,url:null},error:i});throw i}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var i;try{const{error:o,data:{session:l}}=n;if(o)throw o;const{options:u,provider:d,token:f,access_token:m,nonce:y}=t,g=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=l?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:d,id_token:f,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:Bn}),{data:v,error:_}=g;return _?this._returnResult({data:{user:null,session:null},error:_}):!v||!v.session||!v.user?this._returnResult({data:{user:null,session:null},error:new ua}):(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("USER_UPDATED",v.session)),this._returnResult({data:v,error:_}))}catch(o){if(await Dt(this.storage,`${this.storageKey}-code-verifier`),ee(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var i,o;const{data:l,error:u}=n;if(u)throw u;
55return await re(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(i=l.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const i=Date.now();return await W2(async o=>(o>0&&await X2(200*Math.pow(2,o-1)),this._debug(n,"refreshing attempt",o),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Bn})),(o,l)=>{const u=200*Math.pow(2,o);return l&&_f(l)&&Date.now()+u-i<ya})}catch(i){if(this._debug(n,"error",i),ee(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const i=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",i),$t()&&!n.skipBrowserRedirect&&window.location.assign(i),{data:{provider:t,url:i},error:null}}async _recoverAndRefresh(){var t,n;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const o=await ai(this.storage,this.storageKey);if(o&&this.userStorage){let u=await ai(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await va(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:wf()}else if(o&&!o.user&&!o.user){const u=await ai(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await Dt(this.storage,this.storageKey+"-user"),await va(this.storage,this.storageKey,o)):o.user=wf()}if(this._debug(i,"session from storage",o),!this._isValidSession(o)){this._debug(i,"session is not valid"),o!==null&&await this._removeSession();return}const l=((n=o.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<bf;if(this._debug(i,`session has${l?"":" not"} expired with margin of ${bf}s`),l){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(console.error(u),_f(u)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:d}=await this._getUser(o.access_token);!d&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(i,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(i,"error",o),console.error(o);return}finally{this._debug(i,"end")}}async _callRefreshToken(t){var n,i;if(!t)throw new Ct;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new xu;const{data:l,error:u}=await this._refreshAccessToken(t);if(u)throw u;if(!l.session)throw new Ct;await this._saveSession(l.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",l.session);const d={data:l.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(l){if(this._debug(o,"error",l),ee(l)){const u={data:null,error:l};return _f(l)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(u),u}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(l),l}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,n,i=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",n,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:t,session:n});const l=[],u=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(t,n)}catch(f){l.push(f)}});if(await Promise.all(u),l.length>0){for(let d=0;d<l.length;d+=1)console.error(l[d]);throw l[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Dt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),i=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&n.user&&await va(this.userStorage,this.storageKey+"-user",{user:n.user});const o=Object.assign({},n);delete o.user;const l=rb(o);await va(this.storage,this.storageKey,l)}else{const o=rb(n);await va(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Dt(this.storage,this.storageKey),await Dt(this.storage,this.storageKey+"-code-verifier"),await Dt(this.storage,this.storageKey+"-user"),this.userStorage&&await Dt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&$t()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}
55catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ya);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:i}}=n;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((i.expires_at*1e3-t)/ya);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${ya}ms, refresh threshold is ${ep} ticks`),o<=ep&&await this._callRefreshToken(i.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof rS)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!$t()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,i){const o=[`provider=${encodeURIComponent(n)}`];if(i?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i?.scopes&&o.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[l,u]=await da(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(l)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(d.toString())}if(i?.queryParams){const l=new URLSearchParams(i.queryParams);o.push(l.toString())}return i?.skipBrowserRedirect&&o.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var i;const{data:o,error:l}=n;return l?this._returnResult({data:null,error:l}):await re(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(i=o?.session)===null||i===void 0?void 0:i.access_token})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var i,o;const{data:l,error:u}=n;if(u)return this._returnResult({data:null,error:u});const d=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:f,error:m}=await re(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&f.type==="totp"&&(!((o=f?.totp)===null||o===void 0)&&o.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var i;const{data:o,error:l}=n;if(l)return this._returnResult({data:null,error:l});const u=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?db(t.webauthn.credential_response):hb(t.webauthn.credential_response)})}:{code:t.code}),{data:d,error:f}=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:u,headers:this.headers,jwt:(i=o?.session)===null||i===void 0?void 0:i.access_token});return f?this._returnResult({data:null,error:f}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+d.expires_in},d)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",d),this._returnResult({data:d,error:f}))})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var i;const{data:o,error:l}=n;if(l)return this._returnResult({data:null,error:l});const u=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(i=o?.session)===null||i===void 0?void 0:i.access_token});if(u.error)return u;const{data:d}=u;if(d.type!=="webauthn")return{data:d,error:null};switch(d.webauthn.type){case"create":return{data:Object.assign(Object.assign({},d),{webauthn:Object.assign(Object.assign({},d.webauthn),{credential_options:Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:cb(d.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},d),{webauthn:Object.assign(Object.assign({},d.webauthn),{credential_options:Object.assign(Object.assign({},d.webauthn.credential_options),{publicKey:ub(d.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:i}=await this._challenge({factorId:t.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:i}=await this.getUser();if(i)return{data:null,error:i};const o={all:[],phone:[],totp:[],webauthn:[]};for(const l of(t=n?.factors)!==null&&t!==void 0?t:[])o.all.push(l),l.status==="verified"&&o[l.factor_type].push(l);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,i,o,l;if(t)try{const{payload:_}=Mc(t);let w=null;_.aal&&(w=_.aal);let R=w;const{data:{user:E},error:T}=await this.getUser(t);if(T)return this._returnResult({data:null,error:T});((i=(n=E?.factors)===null||n===void 0?void 0:n.filter(N=>N.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(R="aal2");const x=_.amr||[];return{data:{currentLevel:w,nextLevel:R,currentAuthenticationMethods:x},error:null}}catch(_){if(ee(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:u},error:d}
55=await this.getSession();if(d)return this._returnResult({data:null,error:d});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:f}=Mc(u.access_token);let m=null;f.aal&&(m=f.aal);let y=m;((l=(o=u.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&l!==void 0?l:[]).length>0&&(y="aal2");const v=f.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:v},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;return o?this._returnResult({data:null,error:o}):i?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:i.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new Ct})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async i=>{const{data:{session:o},error:l}=i;if(l)return this._returnResult({data:null,error:l});if(!o)return this._returnResult({data:null,error:new Ct});const u=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&$t()&&!n?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(t,n){try{return await this._useSession(async i=>{const{data:{session:o},error:l}=i;if(l)return this._returnResult({data:null,error:l});if(!o)return this._returnResult({data:null,error:new Ct});const u=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:d=>({data:d,error:null})});return u.data&&u.data.redirect_url&&$t()&&!n?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:i}=t;return i?this._returnResult({data:null,error:i}):n?await re(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Ct})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;return o?this._returnResult({data:null,error:o}):i?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ct})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let i=n.keys.find(d=>d.kid===t);if(i)return i;const o=Date.now();if(i=this.jwks.keys.find(d=>d.kid===t),i&&this.jwks_cached_at+$2>o)return i;const{data:l,error:u}=await re(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!l.keys||l.keys.length===0||(this.jwks=l,this.jwks_cached_at=o,i=l.keys.find(d=>d.kid===t),!i)?null:i}async getClaims(t,n={}){try{let i=t;if(!i){const{data:_,error:w}
55=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});i=_.session.access_token}const{header:o,payload:l,signature:u,raw:{header:d,payload:f}}=Mc(i);n?.allowExpired||aN(l.exp);const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!m){const{error:_}=await this.getUser(i);if(_)throw _;return{data:{claims:l,header:o,signature:u},error:null}}const y=oN(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,G2(`${d}.${f}`)))throw new rp("Invalid JWT signature");return{data:{claims:l,header:o,signature:u},error:null}}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(t){var n,i,o;Yn(this.experimental);try{if(!uu())return this._returnResult({data:null,error:new Xn("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}});if(u||!l)return this._returnResult({data:null,error:u});const d=ub(l.options),f=(o=(i=t?.options)===null||i===void 0?void 0:i.signal)!==null&&o!==void 0?o:sp.createNewAbortSignal(),{data:m,error:y}=await oS({publicKey:d,signal:f});if(y||!m)return this._returnResult({data:null,error:y??new Xn("WebAuthn ceremony failed",null)});const g=hb(m);return this._verifyPasskeyAuthentication({challengeId:l.challenge_id,credential:g})}catch(l){if(ee(l))return this._returnResult({data:null,error:l});throw l}}async registerPasskey(t){var n,i;Yn(this.experimental);try{if(!uu())return this._returnResult({data:null,error:new Xn("Browser does not support WebAuthn",null)});const{data:o,error:l}=await this._startPasskeyRegistration();if(l||!o)return this._returnResult({data:null,error:l});const u=cb(o.options),d=(i=(n=t?.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:sp.createNewAbortSignal(),{data:f,error:m}=await aS({publicKey:u,signal:d});if(m||!f)return this._returnResult({data:null,error:m??new Xn("WebAuthn ceremony failed",null)});const y=db(f);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(ee(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){Yn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:i}=t;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Ct});const{data:o,error:l}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:o,error:null})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Yn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new Ct});const{data:l,error:u}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;Yn(this.experimental);try{const{data:i,error:o}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})}catch(i){if(ee(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(t){Yn(this.experimental);try{const{data:n,error:i}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Bn});return i?this._returnResult({data:null,error:i}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){Yn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:i}=t;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Ct});const{data:o,error:l}=await re(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:u=>({data:u,error:null})});return l?this._returnResult({data:null,error:l}):this._returnResult({data:o,error:null})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Yn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;
55if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new Ct});const{data:l,error:u}=await re(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){Yn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:i},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!i)return this._returnResult({data:null,error:new Ct});const{error:l}=await re(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return l?this._returnResult({data:null,error:l}):this._returnResult({data:null,error:null})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}}Qo.nextInstanceID={};const NN=Qo,zN="2.106.2";let Do="";typeof Deno<"u"?Do="deno":typeof document<"u"?Do="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Do="react-native":Do="node";const jN={"X-Client-Info":`supabase-js-${Do}/${zN}`},PN={headers:jN},LN={schema:"public"},MN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},DN={},$N={enabled:!1,respectSamplingDecision:!0};function IN(e,t,n,i){function o(l){return l instanceof n?l:new n(function(u){u(l)})}return new(n||(n=Promise))(function(l,u){function d(y){try{m(i.next(y))}catch(g){u(g)}}function f(y){try{m(i.throw(y))}catch(g){u(g)}}function m(y){y.done?l(y.value):o(y.value).then(d,f)}m((i=i.apply(e,[])).next())})}let Ef=null;const UN="@opentelemetry/api";function BN(){return Ef===null&&(Ef=import(UN).catch(()=>null)),Ef}function HN(){return IN(this,void 0,void 0,function*(){try{const e=yield BN();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function qN(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,i,o,l]=t;if(n.length!==2||i.length!==32||o.length!==16||l.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(n)||!u.test(i)||!u.test(o)||!u.test(l)||i==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:n,traceId:i,parentId:o,traceFlags:l,isSampled:(parseInt(l,16)&1)===1}}function VN(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const i of t)try{if(typeof i=="string"){if(ZN(n.hostname,i))return!0}else if(i instanceof RegExp){if(i.test(n.hostname))return!0}else if(typeof i=="function"&&i(n))return!0}catch{continue}return!1}function ZN(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function FN(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Xo(e){"@babel/helpers - typeof";return Xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(e)}function GN(e,t){if(Xo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(Xo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KN(e){var t=GN(e,"string");return Xo(t)=="symbol"?t:t+""}function YN(e,t,n){return(t=KN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
55t%2?pb(Object(n),!0).forEach(function(i){YN(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}const JN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),QN=()=>Headers,XN=(e,t,n,i,o)=>{const l=JN(i),u=QN(),d=o?.enabled===!0,f=o?.respectSamplingDecision!==!1,m=d?FN(t):null;return async(y,g)=>{var v;const _=(v=await n())!==null&&v!==void 0?v:e;let w=new u(g?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),m){const R=await WN(y,m,f);R&&(R.traceparent&&!w.has("traceparent")&&w.set("traceparent",R.traceparent),R.tracestate&&!w.has("tracestate")&&w.set("tracestate",R.tracestate),R.baggage&&!w.has("baggage")&&w.set("baggage",R.baggage))}return l(y,dt(dt({},g),{},{headers:w}))}};async function WN(e,t,n){if(!VN(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const i=await HN();if(!i||!i.traceparent)return null;if(n){const o=qN(i.traceparent);if(o&&!o.isSampled)return null}return i}function mb(e){return typeof e=="boolean"?{enabled:e}:e}function ez(e){return e.endsWith("/")?e:e+"/"}function tz(e,t){var n,i,o,l,u,d;const{db:f,auth:m,realtime:y,global:g}=e,{db:v,auth:_,realtime:w,global:R}=t,E=mb(e.tracePropagation),T=mb(t.tracePropagation),k={db:dt(dt({},v),f),auth:dt(dt({},_),m),realtime:dt(dt({},w),y),storage:{},global:dt(dt(dt({},R),g),{},{headers:dt(dt({},(n=R?.headers)!==null&&n!==void 0?n:{}),(i=g?.headers)!==null&&i!==void 0?i:{})}),tracePropagation:{enabled:(o=(l=E?.enabled)!==null&&l!==void 0?l:T?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(d=E?.respectSamplingDecision)!==null&&d!==void 0?d:T?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?k.accessToken=e.accessToken:delete k.accessToken,k}function nz(e){const t=e?.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(ez(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var rz=class extends NN{constructor(e){super(e)}},sz=class{constructor(e,t,n){var i,o;this.supabaseUrl=e,this.supabaseKey=t;const l=nz(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const u=`sb-${l.hostname.split(".")[0]}-auth-token`,d={db:LN,realtime:DN,auth:dt(dt({},MN),{},{storageKey:u}),global:PN,tracePropagation:$N},f=tz(n??{},d);if(this.settings=f,this.storageKey=(i=f.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken)this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=f.auth)!==null&&m!==void 0?m:{},this.headers,f.global.fetch)}this.fetch=XN(t,e,this._getAccessToken.bind(this),f.global.fetch,f.tracePropagation),this.realtime=this._initRealtimeClient(dt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},f.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new _x(new URL("rest/v1",l).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch,timeout:f.db.timeout,urlLengthLimit:f.db.urlLengthLimit}),this.storage=new j2(this.storageUrl.href,this.headers,this.fetch,n?.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new ux(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
55channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:i}=await e.auth.getSession();return(t=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:i,userStorage:o,storageKey:l,flowType:u,lock:d,debug:f,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:v},_,w){const R={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new rz({url:this.authUrl.href,headers:dt(dt({},R),_),storageKey:l,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:i,userStorage:o,flowType:u,lock:d,debug:f,throwOnError:m,experimental:y,fetch:w,lockAcquireTimeout:g,skipAutoInitialize:v,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new n2(this.realtimeUrl.href,dt(dt({},e),{},{params:dt(dt({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const iz=(e,t,n)=>new sz(e,t,n);function az(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}az()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function oz(){if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(E=>e===E||e.endsWith("."+E)),i="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=n?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+i+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+i+")(?=[.-])","i"))?.[1]:void 0,l=window.parent&&window.parent!==window;if(!o||!l)return localStorage;const u=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),d=u?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,f=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),m=f&&d.test(f)?[f]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",g=2e3,v=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),_=(E,T,k)=>new Promise(x=>{const N=v();let I=!1,U;const D=le=>{I||(I=!0,clearTimeout(U),window.removeEventListener("message",K),x(le))},K=le=>{if(m.indexOf(le.origin)<0)return;const oe=le.data;oe&&oe.type===y&&oe.requestId===N&&D(oe)};window.addEventListener("message",K);const Q={type:E,requestId:N,projectId:o,key:T};k!==void 0&&(Q.value=k);for(const le of m)window.parent.postMessage(Q,le);U=setTimeout(()=>D(null),g)});let w=!0;const R=250;return{getItem:async E=>{let T=await _("lovable-preview-auth:get",E);return!T&&w&&(await new Promise(k=>setTimeout(k,R)),T=await _("lovable-preview-auth:get",E)),w=!1,T&&T.ok&&typeof T.value=="string"?T.value===""?(localStorage.removeItem(E),null):T.value:localStorage.getItem(E)},setItem:(E,T)=>(localStorage.setItem(E,T),_("lovable-preview-auth:set",E,T).then(()=>{})),removeItem:E=>(localStorage.removeItem(E),_("lovable-preview-auth:remove",E).then(()=>{}))}}function lz(){return iz("https://wdfwgtgdohpxqrxrnylf.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndkZndndGdkb2hweHFyeHJueWxmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODA0NTY5OTgsImV4cCI6MjA5NjAzMjk5OH0.caIf-lQdSA-JGMfkzyvCZT8-U9F9uO9_tVt3mUTHOXE",{auth:{storage:oz(),persistSession:!0,autoRefreshToken:!0}})}let Tf;const il=new Proxy({},{get(e,t,n){return Tf||(Tf=lz()),Reflect.get(Tf,t,n)}}),cz=Os({type:"function"}).client(async({next:e})=>{const{data:t}=await il.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),uz=Os(),gb=ax(()=>({functionMiddleware:[cz],requestMiddleware:[uz]}));var Nu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dz=class extends Nu{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 22,876 bytes, line 55
55this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},lS=new dz,hz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fz=class{#e=hz;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ip=new fz;function pz(e){setTimeout(e,0)}var mz=typeof window>"u"||"Deno"in globalThis;function Qn(){}function gz(e,t){return typeof e=="function"?e(t):e}function yz(e){return typeof e=="number"&&e>=0&&e!==1/0}function vz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ap(e,t){return typeof e=="function"?e(t):e}function bz(e,t){return typeof e=="function"?e(t):e}function yb(e,t){const{type:n="all",exact:i,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(i){if(t.queryHash!==kp(u,t.options))return!1}else if(!el(t.queryKey,u))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function vb(e,t){const{exact:n,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Wo(t.options.mutationKey)!==Wo(l))return!1}else if(!el(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function kp(e,t){return(t?.queryKeyHashFn||Wo)(e)}function Wo(e){return JSON.stringify(e,(t,n)=>op(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function el(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>el(e[n],t[n])):!1}var _z=Object.prototype.hasOwnProperty;function cS(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=bb(e)&&bb(t);if(!i&&!(op(e)&&op(t)))return t;const l=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),d=u.length,f=i?new Array(d):{};let m=0;for(let y=0;y<d;y++){const g=i?y:u[y],v=e[g],_=t[g];if(v===_){f[g]=v,(i?y<l:_z.call(e,g))&&m++;continue}if(v===null||_===null||typeof v!="object"||typeof _!="object"){f[g]=_;continue}const w=cS(v,_,n+1);f[g]=w,w===v&&m++}return l===d&&m===l?e:f}function y3(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function bb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function op(e){if(!_b(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!_b(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function _b(e){return Object.prototype.toString.call(e)==="[object Object]"}function wz(e){return new Promise(t=>{ip.setTimeout(t,e)})}function Sz(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cS(e,t):t}function Ez(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function Tz(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Op=Symbol();function uS(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Op?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function v3(e,t){return typeof e=="function"?e(...t):!!e}function Rz(e,t,n){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var dS=(()=>{let e=()=>mz;return{isServer(){return e()},setIsServer(t){e=t}}})();function Az(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},n.reject=o=>{i({status:"rejected",reason:o}),t(o)},n}var kz=pz;function Oz(){let e=[],t=0,n=d=>{d()},i=d=>{d()},o=kz;const l=d=>{t?e.push(d):o(()=>{n(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{i(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{o=d}}}var Kt=Oz(),Cz=class extends Nu{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},hu=new Cz;function xz(e){return Math.min(1e3*2**e,3e4)}function hS(e){return(e??"online")==="online"?hu.isOnline():!0}var lp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function fS(e){let t=!1,n=0,i;const o=Az(),l=()=>o.status!=="pending",u=R=>{if(!l()){const E=new lp(R);v(E),e.onCancel?.(E)}},d=()=>{t=!0},f=()=>{t=!1},m=()=>lS.isFocused()&&(e.networkMode==="always"||hu.isOnline())&&e.canRun(),y=()=>hS(e.networkMode)&&e.canRun(),g=R=>{l()||(i?.(),o.resolve(R))},v=R=>{l()||(i?.(),o.reject(R))},_=()=>new Promise(R=>{i=E=>{(l()||m())&&R(E)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),w=()=>{if(l())return;let R;const E=n===0?e.initialPromise:void 0;try{R=E??e.fn()}catch(T){R=Promise.reject(T)}Promise.resolve(R).then(g).catch(T=>{if(l())return;const k=e.retry??(dS.isServer()?0:3),x=e.retryDelay??xz,N=typeof x=="function"?x(n,T):x,I=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,T);if(t||!I){v(T);return}n++,e.onFail?.(n,T),wz(N).then(()=>m()?void 0:_()).then(()=>{t?v(T):w()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i?.(),o),cancelRetry:d,continueRetry:f,canStart:y,start:()=>(y()?w():_().then(w),o)}}var pS=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yz(this.gcTime)&&(this.#e=ip.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(dS.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ip.clearTimeout(this.#e),this.#e=void 0)}},Nz=class extends pS{#e;#n;#t;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Sb(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Sb(this.options);t.data!==void 0&&(this.setState(wb(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=Sz(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Qn).catch(Qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>bz(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Op||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ap(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!vz(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#l()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const d=uS(this.options,t),m=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#a=!1,this.options.persister?this.options.persister(d,m,this):d(m)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return i(d),d})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=fS({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof lp&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#o({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof lp){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zz(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...wb(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?i:void 0,i;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function zz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Sb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function Eb(e){return{onFetch:(t,n)=>{const i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const m=async()=>{let y=!1;const g=w=>{Rz(w,()=>t.signal,()=>y=!0)},v=uS(t.options,t.fetchOptions),_=async(w,R,E)=>{if(y)return Promise.reject();if(R==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:R,direction:E?"backward":"forward",meta:t.options.meta};return g(U),U})(),x=await v(k),{maxPages:N}=t.options,I=E?Tz:Ez;return{pages:I(w.pages,x,N),pageParams:I(w.pageParams,R,N)}};if(o&&l.length){const w=o==="backward",R=w?jz:Tb,E={pages:l,pageParams:u},T=R(i,E);d=await _(E,T,w)}else{const w=e??l.length;do{const R=f===0?u[0]??i.initialPageParam:Tb(i,d);if(f>0&&R==null)break;d=await _(d,R),f++}while(f<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=m}}}function Tb(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function jz(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Pz=class extends pS{#e;#n;#t;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||Lz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=fS({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const i=this.state.status==="pending",o=!this.#s.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#s.start();return await this.#t.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#t.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#t.config.onError?.(l,e,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:l}),l}finally{this.#t.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Kt.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Lz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mz=class extends Nu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,n){const i=new Pz({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=Dc(e);if(typeof t=="string"){const n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Dc(e);if(typeof t=="string"){const n=this.#n.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Dc(e);if(typeof t=="string"){const i=this.#n.get(t)?.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Dc(e);return typeof t=="string"?this.#n.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Kt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>vb(t,n))}findAll(e={}){return this.getAll().filter(t=>vb(e,t))}notify(e){Kt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Kt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Qn))))}};function Dc(e){return e.options.scope?.id}var Dz=class extends Nu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,o=t.queryHash??kp(i,t);let l=this.get(o);return l||(l=new Nz({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Kt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>yb(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>yb(e,n)):t}notify(e){Kt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$z=class{#e;#n;#t;#s;#r;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new Dz,this.#n=e.mutationCache||new Mz,this.#t=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=lS.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=hu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ap(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,u=gz(t,l);if(u!==void 0)return this.#e.build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Kt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Kt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Kt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Kt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(i).then(Qn).catch(Qn)}invalidateQueries(e,t={}){return Kt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Kt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(Qn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Qn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ap(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qn).catch(Qn)}fetchInfiniteQuery(e){return e.behavior=Eb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qn).catch(Qn)}ensureInfiniteQueryData(e){return e.behavior=Eb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hu.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#s.set(Wo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(i=>
55{el(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Wo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{el(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=kp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Op&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},mS=te.createContext(void 0),b3=e=>{const t=te.useContext(mS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Iz=({client:e,children:t})=>(te.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),q.jsx(mS.Provider,{value:e,children:t}));const Uz="/assets/styles-BhOiqdSh.css";function Bz(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function Hz(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const qz=e=>{switch(e){case"success":return Fz;case"info":return Kz;case"warning":return Gz;case"error":return Yz;default:return null}},Vz=Array(12).fill(0),Zz=({visible:e,className:t})=>X.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},X.createElement("div",{className:"sonner-spinner"},Vz.map((n,i)=>X.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),Fz=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Gz=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Kz=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Yz=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Jz=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},X.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Qz=()=>{const[e,t]=X.useState(document.hidden);return X.useEffect(()=>{const n=()=>{t(document.hidden)};
vendor: 3,892 bytes, line 55
55return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let cp=1;class Xz{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:i,...o}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:cp++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:i}),{...f,...t,id:l,dismissible:d,title:i}):f):this.addToast({title:i,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=i!==void 0,u;const d=o.then(async m=>{if(u=["resolve",m],X.isValidElement(m))l=!1,this.create({id:i,type:"default",message:m});else if(ej(m)&&!m.ok){l=!1;const g=typeof n.error=="function"?await n.error(`HTTP error! status: ${m.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${m.status}`):n.description,w=typeof g=="object"&&!X.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:v,...w})}else if(m instanceof Error){l=!1;const g=typeof n.error=="function"?await n.error(m):n.error,v=typeof n.description=="function"?await n.description(m):n.description,w=typeof g=="object"&&!X.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:v,...w})}else if(n.success!==void 0){l=!1;const g=typeof n.success=="function"?await n.success(m):n.success,v=typeof n.description=="function"?await n.description(m):n.description,w=typeof g=="object"&&!X.isValidElement(g)?g:{message:g};this.create({id:i,type:"success",description:v,...w})}}).catch(async m=>{if(u=["reject",m],n.error!==void 0){l=!1;const y=typeof n.error=="function"?await n.error(m):n.error,g=typeof n.description=="function"?await n.description(m):n.description,_=typeof y=="object"&&!X.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:g,..._})}}).finally(()=>{l&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((m,y)=>d.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(t,n)=>{const i=n?.id||cp++;return this.create({jsx:t(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const dn=new Xz,Wz=(e,t)=>{const n=t?.id||cp++;return dn.addToast({title:e,...t,id:n}),n},ej=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",tj=Wz,nj=()=>dn.toasts,rj=()=>dn.getActiveToasts(),_3=Object.assign(tj,{success:dn.success,info:dn.info,warning:dn.warning,error:dn.error,custom:dn.custom,message:dn.message,promise:dn.promise,dismiss:dn.dismiss,loading:dn.loading},{getHistory:nj,getToasts:rj});Hz
vendor: 4,787 bytes, line 55
55("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 55
55left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
55$c(e){return e.label!==void 0}const sj=3,ij="24px",aj="16px",Rb=4e3,oj=356,lj=14,cj=45,uj=200;function ur(...e){return e.filter(Boolean).join(" ")}function dj(e){const[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}const hj=e=>{var t,n,i,o,l,u,d,f,m;
vendor: 8,682 bytes, line 55
55const{invert:y,toast:g,unstyled:v,interacting:_,setHeights:w,visibleToasts:R,heights:E,index:T,toasts:k,expanded:x,removeToast:N,defaultRichColors:I,closeButton:U,style:D,cancelButtonStyle:K,actionButtonStyle:Q,className:le="",descriptionClassName:oe="",duration:ce,position:De,gap:$e,expandByDefault:Fe,classNames:L,icons:Y,closeButtonAriaLabel:se="Close toast"}=e,[Te,_e]=X.useState(null),[O,V]=X.useState(null),[G,J]=X.useState(!1),[W,pe]=X.useState(!1),[Ee,ye]=X.useState(!1),[xe,Jt]=X.useState(!1),[Qt,qt]=X.useState(!1),[Ls,Xt]=X.useState(0),[Ms,yr]=X.useState(0),tr=X.useRef(g.duration||ce||Rb),Cn=X.useRef(null),Nt=X.useRef(null),yn=T===0,Ds=T+1<=R,Tt=g.type,nr=g.dismissible!==!1,Rt=g.className||"",Be=g.descriptionClassName||"",lt=X.useMemo(()=>E.findIndex(ve=>ve.toastId===g.id)||0,[E,g.id]),xn=X.useMemo(()=>{var ve;return(ve=g.closeButton)!=null?ve:U},[g.closeButton,U]),vr=X.useMemo(()=>g.duration||ce||Rb,[g.duration,ce]),La=X.useRef(0),br=X.useRef(0),ul=X.useRef(0),Yr=X.useRef(null),[$s,Vt]=De.split("-"),Vn=X.useMemo(()=>E.reduce((ve,tt,At)=>At>=lt?ve:ve+tt.height,0),[E,lt]),Ut=Qz(),Bu=g.invert||y,Ma=Tt==="loading";br.current=X.useMemo(()=>lt*$e+Vn,[lt,Vn]),X.useEffect(()=>{tr.current=vr},[vr]),X.useEffect(()=>{J(!0)},[]),X.useEffect(()=>{const ve=Nt.current;if(ve){const tt=ve.getBoundingClientRect().height;return yr(tt),w(At=>[{toastId:g.id,height:tt,position:g.position},...At]),()=>w(At=>At.filter(Bt=>Bt.toastId!==g.id))}},[w,g.id]),X.useLayoutEffect(()=>{if(!G)return;const ve=Nt.current,tt=ve.style.height;ve.style.height="auto";const At=ve.getBoundingClientRect().height;ve.style.height=tt,yr(At),w(Bt=>Bt.find(at=>at.toastId===g.id)?Bt.map(at=>at.toastId===g.id?{...at,height:At}:at):[{toastId:g.id,height:At,position:g.position},...Bt])},[G,g.title,g.description,w,g.id,g.jsx,g.action,g.cancel]);const rr=X.useCallback(()=>{pe(!0),Xt(br.current),w(ve=>ve.filter(tt=>tt.toastId!==g.id)),setTimeout(()=>{N(g)},uj)},[g,N,w,br]);X.useEffect(()=>{if(g.promise&&Tt==="loading"||g.duration===1/0||g.type==="loading")return;let ve;return x||_||Ut?(()=>{if(ul.current<La.current){const Bt=new Date().getTime()-La.current;tr.current=tr.current-Bt}ul.current=new Date().getTime()})():tr.current!==1/0&&(La.current=new Date().getTime(),ve=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),rr()},tr.current)),()=>clearTimeout(ve)},[x,_,g,Tt,Ut,rr]),X.useEffect(()=>{g.delete&&(rr(),g.onDismiss==null||g.onDismiss.call(g,g))},[rr,g.delete]);function _i(){var ve;if(Y?.loading){var tt;return X.createElement("div",{className:ur(L?.loader,g==null||(tt=g.classNames)==null?void 0:tt.loader,"sonner-loader"),"data-visible":Tt==="loading"},Y.loading)}return X.createElement(Zz,{className:ur(L?.loader,g==null||(ve=g.classNames)==null?void 0:ve.loader),visible:Tt==="loading"})}const wi=g.icon||Y?.[Tt]||qz(Tt);var Is,sr;return X.createElement("li",{tabIndex:0,ref:Nt,className:ur(le,Rt,L?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,L?.default,L?.[Tt],g==null||(n=g.classNames)==null?void 0:n[Tt]),"data-sonner-toast":"","data-rich-colors":(Is=g.richColors)!=null?Is:I,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":G,"data-promise":!!g.promise,"data-swiped":Qt,"data-removed":W,"data-visible":Ds,"data-y-position":$s,"data-x-position":Vt,"data-index":T,"data-front":yn,"data-swiping":Ee,"data-dismissible":nr,"data-type":Tt,"data-invert":Bu,"data-swipe-out":xe,"data-swipe-direction":O,"data-expanded":!!(x||Fe&&G),"data-testid":g.testId,style:{"--index":T,"--toasts-before":T,"--z-index":k.length-T,"--offset":`${W?Ls:br.current}px`,"--initial-height":Fe?"auto":`${Ms}px`,...D,...g.style},onDragEnd:()=>{ye(!1),_e(null),Yr.current=null},onPointerDown:ve=>{ve.button!==2&&(Ma||!nr||(Cn.current=new Date,Xt(br.current),ve.target.setPointerCapture(ve.pointerId),ve.target.tagName!=="BUTTON"&&(ye(!0),Yr.current={x:ve.clientX,y:ve.clientY})))},onPointerUp:()=>{var ve,tt,At;if(xe||!nr)return;Yr.current=null;const Bt=Number(((ve=Nt.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Jr=Number(((tt=Nt.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),at=new Date().getTime()-((At=Cn.current)==null?void 0:At.getTime()),Wt=Te==="x"?Bt:Jr,Us=Math.abs(Wt)/at;if(Math.abs(Wt)>=cj||Us>.11){Xt(br.current),g.onDismiss==null||g.onDismiss.call(g,g),V(Te==="x"?Bt>0?"right":"left":Jr>0?"down":"up"),rr(),Jt(!0);return}else{var en,tn;(en=Nt.current)==null||en.style.setProperty("--swipe-amount-x","0px"),(tn=Nt.current)==null||tn.style.setProperty("--swipe-amount-y","0px")}qt(!1),ye(!1),_e(null)},onPointerMove:ve=>{var tt,At,Bt;if(!Yr.current||!nr||((tt=window.getSelection())==null?void 0:tt.toString().length)>0)return;const at=ve.clientY-Yr.current.y,Wt=ve.clientX-Yr.current.x;var Us;const en=(Us=e.swipeDirections)!=null?Us:dj(De);!Te&&(Math.abs(Wt)>1||Math.abs(at)>1)&&_e(Math.abs(Wt)>Math.abs(at)?"x":"y");let tn={x:0,y:0};const Si=Zn=>1/(1.5+Math.abs(Zn)/20);if(Te==="y"){if(en.includes("top")||en.includes("bottom"))if(en.includes("top")&&at<0||en.includes("bottom")&&at>0)tn.y=at;else{const Zn=at*Si(at);tn.y=Math.abs(Zn)<Math.abs(at)?Zn:at}}else if(Te==="x"&&(en.includes("left")||en.includes("right")))if(en.includes("left")&&Wt<0||en.includes("right")&&Wt>0)tn.x=Wt;else{const Zn=Wt*Si(Wt);tn.x=Math.abs(Zn)<Math.abs(Wt)?Zn:Wt}(Math.abs(tn.x)>0||Math.abs(tn.y)>0)&&qt(!0),(At=Nt.current)==null||At.style.setProperty("--swipe-amount-x",`${tn.x}px`),(Bt=Nt.current)==null||Bt.style.setProperty("--swipe-amount-y",`${tn.y}px`)}},xn&&!g.jsx&&Tt!=="loading"?X.createElement("button",{"aria-label":se,"data-disabled":Ma,"data-close-button":!0,onClick:Ma||!nr?()=>{}:()=>{rr(),g.onDismiss==null||g.onDismiss.call(g,g)},className:ur(L?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(sr=Y?.close)!=null?sr:Jz):null,(Tt||g.icon||g.promise)&&g.icon!==null&&(Y?.[Tt]!==null||g.icon)?X.createElement("div",{"data-icon":"",className:ur(L?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||_i():null,g.type!=="loading"?wi:null):null,X.createElement("div",{"data-content":"",className:ur(L?.content,g==null||(l=g.classNames)==null?void 0:l.content)},X.createElement("div",{"data-title":"",className:ur(L?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?X.createElement("div",{"data-description":"",className:ur(oe,Be,L?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),X.isValidElement(g.cancel)?g.cancel:g.cancel&&$c(g.cancel)?X.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||K,onClick:ve=>{$c(g.cancel)&&nr&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,ve),rr())},className:ur(L?.cancelButton,g==null||(f=g.classNames)==null?void 0:f.cancelButton)},g.cancel.label):null,X.isValidElement(g.action)?g.action:g.action&&$c(g.action)?X.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Q,onClick:ve=>{$c(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,ve),!ve.defaultPrevented&&rr())},className:ur(L?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function Ab(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function fj(e,t){const n={};return[e,t].forEach((i,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?aj:ij;function f(m){["top","right","bottom","left"].forEach(y=>{n[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?n[`${u}-${m}`]=d:n[`${u}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):f(d)}),n}const pj=X.forwardRef(function(t,n){const{id:i,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:m,offset:y,mobileOffset:g,theme:v="light",richColors:_,duration:w,style:R,visibleToasts:E=sj,toastOptions:T,dir:k=Ab(),gap:x=lj,icons:N,containerAriaLabel:I="Notifications"}=t,[U,D]=X.useState([]),K=X.useMemo(()=>i?U.filter(G=>G.toasterId===i):U.filter(G=>!G.toasterId),[U,i]),Q=X.useMemo(()=>Array.from(new Set([l].concat(K.filter(G=>G.position).map(G=>G.position)))),[K,l]),[le,oe]=X.useState([]),[ce,De]=X.useState(!1),[$e,Fe]=X.useState(!1),[L,Y]=X.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
55k":"light"),se=X.useRef(null),Te=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),_e=X.useRef(null),O=X.useRef(!1),V=X.useCallback(G=>{D(J=>{var W;return(W=J.find(pe=>pe.id===G.id))!=null&&W.delete||dn.dismiss(G.id),J.filter(({id:pe})=>pe!==G.id)})},[]);return X.useEffect(()=>dn.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{D(J=>J.map(W=>W.id===G.id?{...W,delete:!0}:W))});return}setTimeout(()=>{_C.flushSync(()=>{D(J=>{const W=J.findIndex(pe=>pe.id===G.id);return W!==-1?[...J.slice(0,W),{...J[W],...G},...J.slice(W+1)]:[G,...J]})})})}),[U]),X.useEffect(()=>{if(v!=="system"){Y(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:J})=>{Y(J?"dark":"light")})}catch{G.addListener(({matches:W})=>{try{Y(W?"dark":"light")}catch(pe){console.error(pe)}})}},[v]),X.useEffect(()=>{U.length<=1&&De(!1)},[U]),X.useEffect(()=>{const G=J=>{var W;if(u.every(ye=>J[ye]||J.code===ye)){var Ee;De(!0),(Ee=se.current)==null||Ee.focus()}J.code==="Escape"&&(document.activeElement===se.current||(W=se.current)!=null&&W.contains(document.activeElement))&&De(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[u]),X.useEffect(()=>{if(se.current)return()=>{_e.current&&(_e.current.focus({preventScroll:!0}),_e.current=null,O.current=!1)}},[se.current]),X.createElement("section",{ref:n,"aria-label":`${I} ${Te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((G,J)=>{var W;const[pe,Ee]=G.split("-");return K.length?X.createElement("ol",{key:G,dir:k==="auto"?Ab():k,tabIndex:-1,ref:se,className:m,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":pe,"data-x-position":Ee,style:{"--front-toast-height":`${((W=le[0])==null?void 0:W.height)||0}px`,"--width":`${oj}px`,"--gap":`${x}px`,...R,...fj(y,g)},onBlur:ye=>{O.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(O.current=!1,_e.current&&(_e.current.focus({preventScroll:!0}),_e.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||O.current||(O.current=!0,_e.current=ye.relatedTarget)},onMouseEnter:()=>De(!0),onMouseMove:()=>De(!0),onMouseLeave:()=>{$e||De(!1)},onDragEnd:()=>De(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||Fe(!0)},onPointerUp:()=>Fe(!1)},K.filter(ye=>!ye.position&&J===0||ye.position===G).map((ye,xe)=>{var Jt,Qt;return X.createElement(hj,{key:ye.id,icons:N,index:xe,toast:ye,defaultRichColors:_,duration:(Jt=T?.duration)!=null?Jt:w,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(Qt=T?.closeButton)!=null?Qt:f,interacting:$e,position:G,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:V,toasts:K.filter(qt=>qt.position==ye.position),heights:le.filter(qt=>qt.position==ye.position),setHeights:oe,expandByDefault:d,gap:x,expanded:ce,swipeDirections:t.swipeDirections})})):null}))}),mj=({...e})=>q.jsx(pj,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});const gS=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const gj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const yj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const kb=e=>{const t=yj(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Rf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const vj=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},bj=te.createContext({}),_j=()=>te.useContext(bj),wj=te.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:i,className:o="",children:l,iconNode:u,...d},f)=>
55{const{size:m=24,strokeWidth:y=2,absoluteStrokeWidth:g=!1,color:v="currentColor",className:_=""}=_j()??{},w=i??g?Number(n??y)*24/Number(t??m):n??y;return te.createElement("svg",{ref:f,...Rf,width:t??m??Rf.width,height:t??m??Rf.height,stroke:e??v,strokeWidth:w,className:gS("lucide",_,o),...!l&&!vj(d)&&{"aria-hidden":"true"},...d},[...u.map(([R,E])=>te.createElement(R,E)),...Array.isArray(l)?l:[l]])});const al=(e,t)=>{const n=te.forwardRef(({className:i,...o},l)=>te.createElement(wj,{ref:l,iconNode:t,className:gS(`lucide-${gj(kb(e))}`,`lucide-${e}`,i),...o}));return n.displayName=kb(e),n};const Sj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],Ej=al("life-buoy",Sj);const Tj=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Rj=al("monitor",Tj);const Aj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],kj=al("moon",Aj);const Oj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Cj=al("sun",Oj);const xj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Nj=al("x",xj),Cp="loveacrossborders.theme";function zj(){if(typeof window>"u")return"dark";const e=window.localStorage.getItem(Cp);return e==="light"||e==="dark"||e==="system"?e:"dark"}function Ob(e){return e==="dark"?!0:e==="light"?!1:typeof window>"u"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Cb(e){if(typeof document>"u")return;const t=document.documentElement;Ob(e)?t.classList.add("dark"):t.classList.remove("dark"),t.style.colorScheme=Ob(e)?"dark":"light"}const jj=`(() => { 56 try { 57 var m = localStorage.getItem(${JSON.stringify(Cp)}) || 'dark'; 58 var d = m === 'dark' || (m === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches); 59 if (!(m === 'light' || m === 'system')) d = true; 60 var r = document.documentElement; 61 if (d) r.classList.add('dark'); else r.classList.remove('dark'); 62 r.style.colorScheme = d ? 'dark' : 'light'; 63 } catch (e) {} 64})();`,Pj=[{mode:"light",label:"Light",Icon:Cj},{mode:"system",label:"System",Icon:Rj},{mode:"dark",label:"Dark",Icon:kj}];function Lj(){const[e,t]=te.useState("dark"),[n,i]=te.useState(!1);te.useEffect(()=>{const l=zj();if(t(l),i(!0),l==="system"&&typeof window<"u"){const u=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>Cb("system");return u.addEventListener("change",d),()=>u.removeEventListener("change",d)}},[e]);function o(l){t(l);try{window.localStorage.setItem(Cp,l)}catch{}Cb(l)}return q.jsx("div",{role:"group","aria-label":"Color theme",className:"fixed bottom-4 right-4 z-50 inline-flex items-center gap-0.5 rounded-full border p-1 shadow-lg backdrop-blur",style:{borderColor:"color-mix(in srgb, var(--ink) 15%, transparent)",background:"color-mix(in srgb, var(--cream) 85%, transparent)"},children:Pj.map(({mode:l,label:u,Icon:d})=>{const f=n&&e===l;return q.jsx("button",{type:"button",onClick:()=>o(l),"aria-pressed":f,"aria-label":u,title:u,className:"inline-flex h-8 w-8 items-center justify-center rounded-full transition-colors",style:{background:f?"var(--ink)":"transparent",color:f?"var(--cream)":"var(--ink)"},children:q.jsx(d,{className:"h-4 w-4"})},l)})})}function Mj(){return q.jsxs("div",{className:"aurora-root","aria-hidden":"true",children:[q.jsx("div",{className:"aurora aurora-a"}),q.jsx("div",{className:"aurora aurora-b"}),q.jsx("div",{className:"aurora aurora-c"}),q.jsx("div",{className:"aurora-grain"})]})}function Dj(){return q.jsxs(Oa,{to:"/help","aria-label":"Get help or contact support",className:"fixed bottom-5 left-5 z-40 inline-flex items-center gap-2 rounded-full border border-border bg-card/90 backdrop-blur px-4 py-2.5 text-xs uppercase tracking-wider text-foreground shadow-lg hover:border-accent hover:text-accent transition-colors",style:{letterSpacing:"0.14em"},children:[q.jsx(Ej,{className:"h-4 w-4","aria-hidden":!0}),"Help"]})}const xp=[{key:"memoir",label:"Memoir & Life Experience",blurb:"A life across borders, told without flinching."}
64,{key:"poetry",label:"Poetry",blurb:"Literary poetry on love, time, sight, and survival."},{key:"childrens",label:"Children's",blurb:"Warm, funny, real books for curious kids."},{key:"harm-reduction",label:"Harm Reduction",blurb:"Firsthand writing on dignity, drugs, and staying alive."},{key:"politics",label:"Politics",blurb:"Protest poetry for a broken internet."},{key:"philosophy",label:"Philosophy",blurb:"Practical philosophy for chronic illness and hard weeks."},{key:"relationships",label:"Relationships",blurb:"On love, commitment, solitude, and the choice to stay."},{key:"comedy",label:"Comedy",blurb:"Satire with a stubbornly human heart."}],xa=[{slug:"a-life-experience-shaun-apple-story",title:"A Life Experience: The Shaun Apple Story",category:"memoir",subcategory:"Memoir and Life Experience",isbn13:"9781991405067",displayIsbn:"978-1-991405-06-7",description:"Across more than twenty-five years and nearly one hundred countries, A Life Experience follows Shaun J Apple through vast online communities, fractured families, chronic illness, love, fatherhood, vision loss, and continual reinvention. Unflinching without surrendering compassion, the memoir asks what remains when identity, belonging, certainty, and even sight begin to disappear.",themes:["Memory and reinvention","Family and fatherhood","Chronic illness and vision loss","Online community"],isPriority:!0},{slug:"a-double-star-system",title:"A Double Star System",category:"poetry",subcategory:"Masterpiece Editions",isbn13:"9781991405050",displayIsbn:"978-1-991405-05-0",description:"Two stars held in mutual orbit become the governing metaphor for love, distance, memory, and human gravity. Intimate, exact, and designed to linger, A Double Star System is Shaun J Apple's most cohesive literary poetry collection.",themes:["Love and distance","Memory","Human gravity","Long orbits"],isPriority:!0},{slug:"poetry-even-when",title:"Poetry, Even When",category:"poetry",subcategory:"Masterpiece Editions",isbn13:"9781991405111",displayIsbn:"978-1-991405-11-1",description:"A poetry collection in three movements travels from threatened loss toward a hard-won way of seeing. Tender without minimizing fear, Poetry, Even When explores family, distance, vision, and the truths that persist when nearly everything else begins to change.",themes:["Fear and tenderness","Family and distance","Vision","Persistence"],isPriority:!0},{slug:"life-experience-too",title:"Life Experience Too",category:"poetry",subcategory:"Masterpiece Editions",isbn13:"9781991405135",displayIsbn:"978-1-991405-13-5",description:"Life Experience Too is a neon mixtape of bright, bruised poems about trauma, love, anger, survival, and the daily work of remaining alive. Fast, direct, and unwilling to disappear, it turns pain into momentum without pretending the pain is gone.",themes:["Trauma and survival","Anger","Love","Momentum"],isPriority:!0},{slug:"sway-concise",title:"SWAY (Concise)",category:"poetry",subcategory:"Masterpiece Editions",isbn13:"9781991405012",displayIsbn:"978-1-991405-01-2",description:"SWAY (Concise) distills a lifelong argument with love, time, mortality, and failing sight into compact, urgent poems. Composed after eye surgery, it turns private fear and devotion into lines meant to be underlined, remembered, and shared.",themes:["Mortality","Sight and surgery","Love","Compression"],isPriority:!0},{slug:"sway-verbose",title:"SWAY (Verbose)",category:"poetry",subcategory:"Masterpiece Editions",isbn13:"9781991405029",displayIsbn:"978-1-991405-02-9",description:"SWAY (Verbose) presents the complete, unabridged journey through love, time, mortality, and sight. Expansive, immersive, and recursive by design, it asks readers to inhabit the sequence, its returns, and its accumulating echoes rather than simply reach the final page.",themes:["Love and time","Mortality","Recursion","Sequence"],isPriority:!0},{slug:"what-can-i-say-first-edition",title:"What Can I Say?",editionLabel:"First Edition",category:"poetry",subcategory:"Masterpiece Editions",isbn13:"9781991405173",displayIsbn:"978-1-991405-17-3",description:"The First Edition of What Can I Say? collects wry, confessional poems that can turn a shrug into a gut-punch in a handful of lines. Highly quotable and immediate, it can be opened anywhere to find the thing you have been trying to say.",themes:["Confession","Wit","Quotability","Recognition"],isPriority:!0},{slug:"slices-of-life-experience",title:"Slices of Life Experience",category:"poetry",subcategory:"Mosaic Editions",isbn13:"9781991405142",displayIsbn:"978-1-991405-14-2",description:"Forty-two standout poems from across Shaun J Apple's catalog move through love, trauma, humor, loneliness, desire, and survival. Both a curated retrospective and an ideal entry point, Slices of Life Experience reveals the range and recurring concerns of the larger body of work.",themes:["Retrospective","Range","Loneliness and desire","Entry point"],isPriority:!0},{slug:"oxygen-turned-into-chapters",title:"Oxygen Turned Into Chapters",category:"poetry",subcategory:"Mosaic Editions",isbn13:"9781991405265",displayIsbn:"978-1-991405-26-5",description:"Oxygen Turned Into Chapters gathers a focused selection of poems about survival, love, attention, breath, and meaning. Drawn from four major collections, it offers a concentrated path into Shaun J Apple's poetry for readers seeking the essential work in one volume.",themes:["
64Survival","Attention","Breath","Meaning"],isPriority:!0},{slug:"please-let-me-be-seen",title:"Please Let Me Be Seen",category:"poetry",subcategory:"Mosaic Editions",isbn13:"9781991405197",displayIsbn:"978-1-991405-19-7",description:"Twenty-two selected poems unfold through two movements, Seen and Unseen. Centered on visibility, love, and partial vision loss, Please Let Me Be Seen becomes both an account of altered sight and a direct plea to be witnessed before seeing grows harder.",themes:["Visibility","Vision loss","Witness","Love"],isPriority:!0},{slug:"ngl-nothing-better-than-this-book-except-sex-and-food",title:"NGL: Nothing Better Than This Book (Except Sex and Food)!",category:"poetry",subcategory:"Micro Editions",isbn13:"9781991405036",displayIsbn:"978-1-991405-03-6",description:"NGL is a loud, funny, and irreverent poetry collection about appetite, desire, sex, food, mortality, and the body's race against time. Created for readers who think poetry is not for them, it keeps turning jokes into truths before they notice the shift.",themes:["Appetite","Desire","Mortality","Humor"],isPriority:!0},{slug:"eons-in-a-moment-2027",title:"Eons In A Moment (2027)",category:"poetry",subcategory:"Remakes",isbn13:"9781991405005",displayIsbn:"978-1-991405-00-5",plannedYear:2027,description:"Eons In A Moment (2027) returns to Shaun J Apple's earliest poems about time, memory, love, and the moments that refuse to remain small. Raw and experimental but newly refined, this remade edition captures a young poet discovering the voice that would shape everything after it.",themes:["Time and memory","Early voice","Love","Refinement"],isPriority:!0},{slug:"captain-appletastics-photo-by-photo-adventure",title:"Captain Appletastic's Photo-by-Photo Adventure!",category:"childrens",isbn13:"9781991405128",displayIsbn:"978-1-991405-12-8",description:"More than fifty real travel photographs become rhyming adventures for curious children. With Mini-Missions and dedicated spaces for their own memories, Captain Appletastic's Photo-by-Photo Adventure! combines a picture book, activity book, and personal travel diary in one journey.",themes:["Travel","Curiosity","Activity","Memory keeping"],isPriority:!0},{slug:"the-dog-who-overthought-everything",title:"The Dog Who Overthought Everything",category:"childrens",isbn13:"9781991405203",displayIsbn:"978-1-991405-20-3",description:"Sir Thinksalot is a very good corgi with a very busy mind. Through warm, funny stories about thunderstorms, vacuums, fear, and brave breaths, The Dog Who Overthought Everything helps children understand that courage does not have to be enormous. It can begin with one small step.",themes:["Anxiety and courage","Small steps","Warm humor","Bedtime read-aloud"],isPriority:!0},{slug:"i-agree",title:"I Agree",category:"comedy",isbn13:"9781991405180",displayIsbn:"978-1-991405-18-0",description:"I Agree presents the terms and conditions of being alive as the user agreement nobody read but everyone somehow accepted. Built from disclaimers, warranties, updates, and one-star reviews of existence, it is sharp literary satire with a stubbornly human heart.",themes:["Satire","Modern absurdity","Terms of service","Consent"],isPriority:!0},{slug:"nobody-disposable",title:"Nobody Disposable",category:"harm-reduction",isbn13:"9781991405258",displayIsbn:"978-1-991405-25-8",description:"Nobody Disposable is a firsthand account of online harm-reduction communities where anonymous strangers shared truthful information and helped keep one another alive. Clear-eyed about drugs, shame, stigma, policy, and dignity, it argues that no human life should ever be treated as expendable.",themes:["Harm reduction","Community","Stigma and policy","Dignity"],isPriority:!0},{slug:"we-thought-these-were-modern-times",title:"We Thought These Were Modern Times",category:"politics",isbn13:"9781991405289",displayIsbn:"978-1-991405-28-9",description:"We Thought These Were Modern Times is protest poetry for an age of platform decay, propaganda, subscriptions, celebrity, and doomscrolling. From someone who helped build major online communities, it examines the internet's broken promise from the inside.",themes:["Platform decay","Propaganda","Internet history","Protest"],isPriority:!0},{slug:"build-for-bad-weeks",title:"Build For Bad Weeks",category:"philosophy",isbn13:"9781991405227",displayIsbn:"978-1-991405-22-7",description:"Build For Bad Weeks offers a practical philosophy for creating a meaningful life around chronic illness and an unreliable body. Rejecting both grind culture and defeat, it shows how flexible systems, disciplined adaptation, and self-forgiveness can keep important work alive when consistency is impossible.",themes:["Chronic illness","Flexible systems","Self-forgiveness","Meaningful work"],isPriority:!0},{slug:"stay",title:"STAY",category:"relationships",isbn13:"9781991405210",displayIsbn:"978-1-991405-21-0",description:"STAY is a relationship manifesto built on a demanding idea: love is not found ready-made but constructed through the repeated choice to remain. Romantic without being naive, it challenges swipe culture and presents commitment as a practice, a skill, and a form of courage.",themes:["Commitment","Swipe culture","Practice","Courage"],isPriority:!0},{slug:"unaccompanied",title:"Unaccompanied",category:"relationships",isbn13:"9781991405326",displayIsbn:"978-1-991405-32-6",description:"Unaccompanied is a meditation on solitude, travel, longing, and the self that emerges when nobody is beside you. Drawn from a life across borders, it treats aloneness as both an ache and a strange, clarifying form of company.",themes:["
64Solitude","Travel","Longing","Self"],isPriority:!0},{slug:"unmatched",title:"Unmatched",category:"relationships",isbn13:"9781991405333",displayIsbn:"978-1-991405-33-3",description:"Unmatched challenges the swipe-first logic of modern dating and defends a love that is costly, sticky, imperfect, and impossible to optimize. Smart, funny, and quietly hopeful, it argues that commitment's friction is not a flaw but the source of its value.",themes:["Modern dating","Friction","Commitment","Hope"],isPriority:!0}],$j={"masterpiece-modern-poetru":"a-double-star-system"},gr="Shaun J Apple",hn="Love Across Borders Publishing",Ij="Life of Experience, LLC";function yS(e){return xa.find(t=>t.slug===e)}function Uj(e){return xa.filter(t=>t.category===e)}function w3(e,t=3){const n=xa.filter(o=>o.category===e.category&&o.slug!==e.slug);if(n.length>=t)return n.slice(0,t);const i=xa.filter(o=>o.category!==e.category&&o.slug!==e.slug);return[...n,...i].slice(0,t)}function Bj(e){return xp.find(t=>t.key===e)?.label??e}const Ze="https://loveacrossborders.com",Np=`${Ze}/#publisher`,zp="https://lifeofexperience.com/#shaun-j-apple",Hj="https://lifeofexperience.com/#organization";function mn(e){return/^https?:\/\//i.test(e)?e:`${Ze}${e.startsWith("/")?e:`/${e}`}`}function vi({logoUrl:e}){return{"@type":"Organization","@id":Np,name:hn,url:Ze,logo:mn(e),founder:{"@id":zp},parentOrganization:{"@type":"Organization","@id":Hj,name:Ij,url:"https://lifeofexperience.com"},sameAs:["https://lifeofexperience.com","https://shaunapple.com"]}}function ol(){return{"@type":"Person","@id":zp,name:gr,url:`${Ze}/author/shaun-j-apple`,jobTitle:"Author, poet, and publisher",sameAs:["https://lifeofexperience.com","https://shaunapple.com"]}}function vS(){return{"@type":"WebSite","@id":`${Ze}/#website`,url:Ze,name:hn,publisher:{"@id":Np}}}function Wn(e){return{"@type":"BreadcrumbList",itemListElement:e.map((t,n)=>({"@type":"ListItem",position:n+1,name:t.name,item:mn(t.url)}))}}function bS(e,t){const n={"@type":"Book","@id":`${Ze}/books/${e.slug}#book`,name:e.title,isbn:e.isbn13,author:{"@id":zp},publisher:{"@id":Np},inLanguage:"en",description:e.description,url:`${Ze}/books/${e.slug}`,image:mn(t)};return e.editionLabel&&(n.bookEdition=e.editionLabel),n}function An(e){return{"@context":"https://schema.org","@graph":e}}function kn(e){return{type:"application/ld+json",children:JSON.stringify(e)}}function qj(){return q.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:q.jsxs("div",{className:"max-w-md text-center",children:[q.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),q.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),q.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),q.jsx("div",{className:"mt-6",children:q.jsx(Oa,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function Vj({error:e,reset:t}){console.error(e);const n=It();return te.useEffect(()=>{Bz(e,{boundary:"tanstack_root_error_component"})},[e]),q.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:q.jsxs("div",{className:"max-w-md text-center",children:[q.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),q.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),q.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[q.jsx("button",{onClick:()=>{n.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),q.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const Le=zC()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{property:"og:type",content:"website"},{property:"og:site_name",content:"Love Across Borders Publishing"},{name:"twitter:card",content:"summary_large_image"},{name:"google-site-verification",content:"FfeAw_8GzuiVT99wadxbWU-V8fEIaR9mCyAdPiy2D7s"}],links:[{rel:"stylesheet",href:Uz}
64,{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap"}],scripts:[kn(An([vi({logoUrl:"/lovable-uploads/love-across-borders-logo.png"}),{...vS(),potentialAction:{"@type":"SearchAction",target:`${Ze}/books?q={search_term_string}`,"query-input":"required name=search_term_string"}}]))]}),shellComponent:Zj,component:Fj,notFoundComponent:qj,errorComponent:Vj});function Zj({children:e}){return q.jsxs("html",{lang:"en",className:"dark",suppressHydrationWarning:!0,children:[q.jsxs("head",{children:[q.jsx(ex,{}),q.jsx("meta",{name:"google-site-verification",content:"cOgZ7R642hZbk-A-RVid6RfltF76CXCWYBywtDcpuTM"}),q.jsx("script",{dangerouslySetInnerHTML:{__html:jj}})]}),q.jsxs("body",{children:[q.jsx("a",{href:"#main",className:"sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-50 focus:bg-primary focus:text-primary-foreground focus:px-3 focus:py-2 focus:rounded-md",children:"Skip to main content"}),e,q.jsx(tx,{})]})]})}function Fj(){const{queryClient:e}=Le.useRouteContext();return q.jsxs(Iz,{client:e,children:[q.jsx(Mj,{}),q.jsx(Lw,{}),q.jsx(Dj,{}),q.jsx(Lj,{}),q.jsx(mj,{richColors:!0,position:"top-right"})]})}const Gj="modulepreload",Kj=function(e){return"/"+e},xb={},de=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){let f=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=f(n.map(m=>{if(m=Kj(m),m in xb)return;xb[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":Gj,y||(v.as="script"),v.crossOrigin="",v.href=m,d&&v.setAttribute("nonce",d),document.head.appendChild(v),y)return new Promise((_,w)=>{v.addEventListener("load",_),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},Yj="/__l5e/assets-v1/ee779799-87be-4b0c-8e47-06dcb5bdf756/og-home.jpg",Jj={url:Yj},Qj=()=>de(()=>import("./index-CLF2iBXR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Af="Love Across Borders Publishing: Books, Ebooks, Audiobooks",kf="The independent imprint of Life of Experience. Buy books, ebooks, and audiobooks by Shaun J Apple direct from the publisher.",Nb=mn(Jj.url),Xj=he("/")({head:()=>({meta:[{title:Af},{name:"description",content:kf},{property:"og:title",content:Af},{property:"og:description",content:kf},{property:"og:url",content:`${Ze}/`},{property:"og:type",content:"website"},{property:"og:image",content:Nb},{name:"twitter:title",content:Af},{name:"twitter:description",content:kf},{name:"twitter:image",content:Nb}],links:[{rel:"canonical",href:`${Ze}/`}],scripts:[kn(An([ol()]))]}),component:ue(Qj,"component")}),Wj=()=>de(()=>import("./route-DsaPdXup.js"),__vite__mapDeps([12,13])),eP=he("/_authenticated")({beforeLoad:async()=>{const{data:e,error:t}=await il.auth.getUser();if(t||!e.user)throw pn({to:"/auth",search:{mode:"signin",redirect:"/account"}});return{user:e.user}},component:ue(Wj,"component")}),tP="/__l5e/assets-v1/6b26b97b-e857-42d0-afd1-6aecc3a9a9c7/lab-logo.png",mr={url:tP},nP=()=>de(()=>import("./also-by-CrAlcuib.js"),__vite__mapDeps([14,3,4,2,5,15,16])),Of=`Also by ${gr} | ${hn}`,Cf="The complete Shaun J Apple bibliography under Love Across Borders Publishing: poetry, memoir, harm reduction, philosophy, children's, and more.",Ic=`${Ze}/also-by`,rP=he("/also-by")({head:()=>({meta:[{title:Of},{name:"description",content:Cf},{property:"og:title",content:Of},{property:"og:description",content:Cf},{property:"og:url",content:Ic},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:Ic}],scripts:[kn(An([vi({logoUrl:mr.url}),ol(),{"@type":"CollectionPage","@id":`${Ic}#collection`,name:Of,url:Ic,description:Cf},{"@type":"ItemList",itemListElement:xa.map((e,t)=>({"@type":"ListItem",position:t+1,url:mn(`/books/${e.slug}`),name:e.title}))},Wn([{name:"Home",url:"/"},{name:"Also by Shaun J Apple",url:"/also-by"}])]))]}),component:ue(nP,"component")}),sP=()=>de(()=>import("./auth-QDHVJI7Q.js"),__vite__mapDeps([17,13,18,19,3,4,2,5])),iP=he("/auth")({validateSearch:e=>({mode:e.mode==="signin"?"signin":"signup",redirect:typeof e.redirect=="string"&&e.redirect.startsWith("/")?e.redirect:"/account/orders"}),head:()=>({meta:[{title:"Sign in · Love Across Borders"},{name:"description",content:"Sign in with a password or a one-tap magic link to access your orders and downloads."},{name:"robots",content:"noindex"}
64]}),component:ue(sP,"component")}),aP=()=>de(()=>import("./books-BxxJ3_ZG.js"),__vite__mapDeps([20,3,4,2,5,15,21])),Uc=`${Ze}/books`,xf=`Books by ${gr} | ${hn}`,Nf=`The complete publisher catalog for ${gr}: memoir, poetry, philosophy, relationships, harm reduction, politics, humor, and children's books from ${hn}.`,oP=he("/books")({head:()=>({meta:[{title:xf},{name:"description",content:Nf.slice(0,160)},{property:"og:title",content:xf},{property:"og:description",content:Nf.slice(0,160)},{property:"og:url",content:Uc},{property:"og:type",content:"website"},{property:"og:image",content:mn(mr.url)},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:mn(mr.url)}],links:[{rel:"canonical",href:Uc}],scripts:[kn(An([vi({logoUrl:mr.url}),vS(),{"@type":"CollectionPage","@id":`${Uc}#collection`,name:xf,url:Uc,description:Nf},{"@type":"ItemList",itemListElement:xa.map((e,t)=>({"@type":"ListItem",position:t+1,url:`${Ze}/books/${e.slug}`,name:e.title}))},Wn([{name:"Home",url:"/"},{name:"Books",url:"/books"}])]))]}),component:ue(aP,"component")}),zb="loveacrossborders.promo.epic.dismissed",jp="EPIC",zu=25;function S3(){const[e,t]=te.useState(!0);return te.useEffect(()=>{t(typeof window<"u"&&window.localStorage.getItem(zb)==="1")},[]),e?null:q.jsx("div",{className:"border-b border-border bg-primary/10 text-foreground",children:q.jsxs("div",{className:"mx-auto flex max-w-6xl items-center gap-3 px-6 sm:px-8 py-2 text-xs sm:text-sm",children:[q.jsx("span",{className:"hidden sm:inline text-primary font-medium tracking-wide uppercase",children:"Launch offer"}),q.jsxs("span",{className:"flex-1 text-muted-foreground",children:["Save ",zu,"% on any book. Use code"," ",q.jsx(Oa,{to:"/bundles",className:"font-mono font-semibold text-primary underline-offset-4 hover:underline",children:jp})," ","at checkout, or"," ",q.jsx(Oa,{to:"/bundles",className:"underline-offset-4 hover:text-foreground hover:underline",children:"build a reading bundle"}),"."]}),q.jsx("button",{type:"button","aria-label":"Dismiss offer",onClick:()=>{window.localStorage.setItem(zb,"1"),t(!0)},className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-primary/10 hover:text-foreground",children:q.jsx(Nj,{className:"h-3.5 w-3.5","aria-hidden":!0})})]})})}function E3({applied:e,onToggle:t}){return q.jsxs("div",{className:"rounded-md border border-primary/60 bg-primary/10 p-4 sm:p-5 flex items-center gap-4",children:[q.jsxs("div",{className:"flex-1",children:[q.jsx("div",{className:"text-[11px] uppercase tracking-widest text-primary/80",children:"Launch offer"}),q.jsxs("div",{className:"mt-1 font-serif text-primary text-xl sm:text-2xl leading-tight",children:["Save ",zu,"% with code"," ",q.jsx("span",{className:"font-mono px-2 py-0.5 rounded bg-primary text-primary-foreground",children:jp})]}),q.jsx("p",{className:"mt-1 text-xs sm:text-sm text-muted-foreground",children:e?"Applied automatically at checkout.":"Click apply, or type it on the Stripe checkout page."})]}),q.jsx("button",{type:"button",onClick:t,className:`shrink-0 px-4 py-2 rounded text-sm font-medium transition-colors ${e?"border border-primary/50 text-primary hover:bg-primary/10":"bg-primary text-primary-foreground hover:opacity-90"}`,children:e?"Remove":"Apply"})]})}const lP=()=>de(()=>import("./bundles-BXIfy1-e.js"),__vite__mapDeps([22,3,4,2,5,15,6,7,8])),jb=`${Ze}/bundles`,Pb=`Reading Bundles: Save ${zu}% | ${hn}`,Lb=`Curated reading bundles from ${hn}. Save ${zu}% on any order with code ${jp} at checkout. Direct from the publisher, instant delivery, 14-day refund.`,cP=he("/bundles")({head:()=>({meta:[{title:Pb},{name:"description",content:Lb.slice(0,160)},{property:"og:title",content:Pb},{property:"og:description",content:Lb.slice(0,160)},{property:"og:url",content:jb},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:jb}],scripts:[kn(An([Wn([{name:"Home",url:"/"},{name:"Bundles",url:"/bundles"}])]))]}),component:ue(lP,"component")}),uP=()=>de(()=>import("./cart-kXcVzlmA.js"),__vite__mapDeps([23,2,3,24,4,5,6,7,8])),dP=he("/cart")({head:()=>({meta:[{title:"Your cart · Love Across Borders"},{name:"robots",content:"noindex"}
64]}),component:ue(uP,"component")}),hP=()=>de(()=>import("./harm-reduction-DeRdxa3O.js"),__vite__mapDeps([25,26,13,27,18,28,29,30,31,8,32,33])),fP=he("/harm-reduction")({head:()=>({meta:[{title:"Harm Reduction Information · Nonjudgmental, vetted sources"},{name:"description",content:"A calm, nonjudgmental harm-reduction assistant grounded in vetted public-health sources. Information and triage, not medical advice."},{property:"og:title",content:"Harm Reduction Information"},{property:"og:description",content:"Nonjudgmental, vetted harm-reduction information and triage."},{property:"og:url",content:"https://loveacrossborders.com/harm-reduction"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://loveacrossborders.com/harm-reduction"}]}),component:ue(hP,"component")}),pP=[{q:"Is it safe to order here?",a:"Yes. Every page is served over HTTPS and every payment is processed by Stripe, one of the most trusted payment processors in the world (PCI-DSS Level 1 certified). We never see, handle, or store your card details."},{q:"What happens to my personal information?",a:"We collect only what is needed to deliver your order and email your receipt. We never sell, rent, or share your data with advertisers. Full details are in our Privacy policy."},{q:"When will I get my ebook after buying?",a:"Instantly. As soon as Stripe confirms the payment you land on a thank-you page with your download links, and a receipt with the same links is emailed to you within a minute."},{q:"What formats do you deliver?",a:"Most titles ship as PDF and EPUB. Some also include an audiobook file. The exact formats included are listed on each product page and appear as buttons on your download page."},{q:"Which devices and readers work?",a:"PDF works everywhere. EPUB works on Apple Books, Google Play Books, Kobo, Kindle (via Send to Kindle), and any modern e-reader app. Audio files play in any music or podcast app."},{q:"My download link expired. What now?",a:"Sign in and open Your orders. Every order regenerates fresh 24-hour links on demand, as many times as you need. No re-purchase, no fee."},{q:"Can I get a refund?",a:"Yes. If a book did not deliver what you hoped for, write to us within 14 days at [email protected] for a full, no-questions refund. See the refund policy for details."},{q:"Do you sell print books?",a:"Yes. Where a paperback exists, the product page links to it on Amazon. Print fulfilment is handled by Amazon so shipping and returns follow their policy."},{q:"How fast do you reply to support?",a:"A real person, not a bot, replies within one business day. Most messages get an answer within a few hours during working hours."},{q:"How do I contact you?",a:"Use the form on this page, tap the Help button in the corner of any page, or email [email protected] directly."}],mP=()=>de(()=>import("./help-6N2RPUHU.js"),__vite__mapDeps([34,2,35,3,4,5,6,7,8])),gP=he("/help")({head:()=>({meta:[{title:"Help & Support · Love Across Borders Publishing"},{name:"description",content:"Answers about downloads, formats, refunds, and how to reach us. We reply within one business day."},{property:"og:title",content:"Help & Support · Love Across Borders Publishing"},{property:"og:description",content:"Answers about downloads, formats, refunds, and how to reach us."},{property:"og:url",content:mn("/help")},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:mn("/help")}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:pP.map(e=>({"@type":"Question",name:e.q,acceptedAnswer:{"@type":"Answer",text:e.a}}))})}]}),component:ue(mP,"component")}),yP=he("/library")({beforeLoad:()=>{throw pn({to:"/books"})}}),vP=()=>de(()=>import("./pricing-BpJkxO2N.js"),__vite__mapDeps([36,37,38,27])),bP=he("/pricing")({head:()=>({meta:[{title:"Pricing · Talkable Books"},{name:"description",content:"Unlock a single book for $9, or take a library membership for $49 per year."},{property:"og:title",content:"Pricing · Talkable Books"},{property:"og:description",content:"Single-book unlocks and library membership."},{property:"og:url",content:"https://loveacrossborders.com/pricing"},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:"https://loveacrossborders.com/pricing"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"}]}
64),component:ue(vP,"component")}),_P=()=>de(()=>import("./privacy-Dj2McP1v.js"),__vite__mapDeps([39,40,37])),wP=he("/privacy")({head:()=>({meta:[{title:"Privacy · Love Across Borders"},{name:"description",content:"How Love Across Borders handles your data."},{property:"og:title",content:"Privacy · Love Across Borders"},{property:"og:description",content:"How Love Across Borders handles your data."},{property:"og:url",content:"https://loveacrossborders.com/privacy"},{property:"og:type",content:"article"}],links:[{rel:"canonical",href:"https://loveacrossborders.com/privacy"}]}),component:ue(_P,"component")}),SP=()=>de(()=>import("./refunds-mC40sSAW.js"),__vite__mapDeps([41,40,37])),EP=he("/refunds")({head:()=>({meta:[{title:"Refunds · Love Across Borders"},{name:"description",content:"Refund policy for Talkable Editions and Library membership."},{property:"og:title",content:"Refunds · Love Across Borders"},{property:"og:description",content:"Refund policy for Talkable Editions and Library membership."},{property:"og:url",content:"https://loveacrossborders.com/refunds"},{property:"og:type",content:"article"}],links:[{rel:"canonical",href:"https://loveacrossborders.com/refunds"}]}),component:ue(SP,"component")}),On=Os({type:"function"}),TP=st({method:"GET"}).handler(ft("f5e654cfa19ee3fc5c55eb2dcd7c354a28c77dd56a40465667ae1beb62fd7012")),RP=st({method:"POST"}).handler(ft("45e7df50a72e3fe2261029984e9afe6c6dc23741768fd46c620e546c4bd76aad")),AP=st({method:"POST"}).handler(ft("44b49e1fa1b2d39412cd0cfe7f3a9b79995656f94aa87d6bb8350d120e37b15d")),T3=st({method:"GET"}).middleware([On]).handler(ft("3bc3b4e498a1f8540e19ddc98352078e66ba2073e8f64ccf75effb1af15ee20a")),R3=st({method:"POST"}).middleware([On]).handler(ft("feb582c73788f8908697202e6a36ec3ef6af3e7df080d853a15e7d6835d0410b")),A3=st({method:"POST"}).middleware([On]).handler(ft("e4cbcb0a9231b86b10c7b94884bc7cf5516c5f66f8561d500613bfaae67da473")),k3=st({method:"POST"}).middleware([On]).handler(ft("f404e8153864835c0377051d5bca5b1273689e76a810f0412de9512f3a076f0e")),O3=st({method:"GET"}).middleware([On]).handler(ft("35193922613fda01fbd10d40ee665d9333cec9b2ebcdcaec4302caa8d2249cb5"));st({method:"POST"}).middleware([On]).handler(ft("fe4b56f1c8732d5efab4ae2b7e3797c063efd93c17fa82eb73b0849be7afecb8"));st({method:"POST"}).middleware([On]).handler(ft("d63d53d294be5834f4c3c451dbf5d889ac0f5fceb5b8f12a857acaf81537fe3c"));st({method:"POST"}).middleware([On]).handler(ft("6c189c2cad1208b92b0b19ac053bd55378950af3be13f11ae6902af7392e2e59"));const C3=st({method:"POST"}).handler(ft("e56613a22c9114bf89a903c0036261a69f6b1c47f923c6dea84328d19f964e58")),x3=st({method:"POST"}).handler(ft("dde731303f0983b50e252d74672578eca85c6bd2c7e66b8b2fda7716ab7170c2")),N3=st({method:"GET"}).middleware([On]).handler(ft("ca0c4fc325e5a1967c8ee028dfb2672bb39aab80303212a3e3fc33bdcb3f10d6")),z3=st({method:"POST"}).middleware([On]).handler(ft("21a0d6176038f956b1536cbc43ddbf183f7bfe3643d3d58ad6233186c7a4221e")),kP=()=>de(()=>import("./shop-CytkR7Ws.js"),__vite__mapDeps([42,1,3,4,2,5,6,7,8,24])),Mb="Shop books, ebooks, and audiobooks | Love Across Borders",Db="Buy books, ebooks, and audiobooks by Shaun J Apple direct from Love Across Borders Publishing. Independent, ad free, no middlemen.",OP=he("/shop")({loader:async()=>{try{return{products:await TP()}}catch{return{products:[]}}},head:({loaderData:e})=>{const t=`${Ze}/shop`,n=e?.products??[],i=n.length?{"@type":"ItemList",itemListElement:n.slice(0,30).map((l,u)=>({"@type":"ListItem",position:u+1,url:`${Ze}/shop/${l.slug}`,name:l.title}))}:null,o=An([Wn([{name:"Home",url:"/"},{name:"Shop",url:"/shop"}]),...i?[i]:[]]);return{meta:[{title:Mb},{name:"description",content:Db},{property:"og:title",content:Mb},{property:"og:description",content:Db},{property:"og:url",content:t},{property:"og:type",content:"website"}],links:[{rel:"canonical",href:t}],scripts:[kn(o)]}},component:ue(kP,"component")}),CP=()=>de(()=>import("./support-BUNRdoKg.js"),__vite__mapDeps([43,37])),xP=he("/support")({head:()=>({meta:[{title:"Support the work · Love Across Borders Publishing"},{name:"description",content:"Support Shaun J Apple and Love Across Borders Publishing directly. Bitcoin and Ethereum donation addresses, plus a printable one page for offline sharing."},{property:"og:title",content:"Support the work · Love Across Borders Publishing"},{property:"og:description",content:"Direct BTC and ETH donations that keep the imprint independent and the Talkable Books free of ads."}],links:[{rel:"canonical",href:"https://loveacrossborders.com/support"}]}),component:ue(CP,"component")}),NP=()=>de(()=>import("./talkable-books-BD3SINYk.js"),[]),zP=he("/talkable-books")({component:ue(NP,"component")}),jP=()=>de(()=>import("./talkable-editions-DtqBFgK5.js"),[]),PP=he("/talkable-editions")({beforeLoad:()=>{throw pn({to:"/talkable-books",replace:!0})},component:ue(jP,"component")}),LP=()=>de(()=>import("./terms-7kaT9YVZ.js"),__vite__mapDeps([44,40,37])),MP=he("/terms")({head:()=>({meta:[{title:"Terms of Service · Love Across Borders"},{name:"description",content:"Terms that govern your use of Love Across Borders and the Talkable Editions."},{property:"og:title",content:"Terms of Service · Love Across Borders"},{property:"og:description",content:"Terms that govern your use of Love Across Borders."},{property:"og:url",content:"https://loveacrossborders.com/terms"},{property:"og:type",content:"article"}],links:[{rel:"canonical",href:"https://loveacrossborders.com/terms"}]}
64),component:ue(LP,"component")}),DP=()=>de(()=>import("./twin-DmTkoMhd.js"),__vite__mapDeps([45,16,7])),$P=he("/twin")({head:()=>({meta:[{title:"AI Twin · A private, faithful agent of your voice"},{name:"description",content:"An AI twin built from your body of work and your voice. It answers as you, only from what you have actually said and written. Private by default. Cited by default."},{property:"og:title",content:"AI Twin, a private agent of your voice"},{property:"og:description",content:"A private, cited, faithful agent of your voice. Built from your own corpus."},{property:"og:url",content:"https://loveacrossborders.com/twin"}],links:[{rel:"canonical",href:"https://loveacrossborders.com/twin"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Manrope:wght@400;500;600&display=swap"}]}),component:ue(DP,"component")}),IP=()=>de(()=>import("./account-BMEEL8cO.js"),__vite__mapDeps([46,1,3,4,2,5])),UP="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap",BP=he("/_authenticated/account")({head:()=>({meta:[{title:"Your account · Love Across Borders"},{name:"description",content:"Your sign-in, your orders, unlocks, and Library membership."},{name:"robots",content:"noindex"}],links:[{rel:"stylesheet",href:UP}]}),component:ue(IP,"component")}),HP=()=>de(()=>import("./dashboard-DN3NuXNz.js"),__vite__mapDeps([47,48,13,49,8,50,51])),qP=he("/_authenticated/dashboard")({head:()=>({meta:[{title:"Dashboard · A Life Experience"}]}),component:ue(HP,"component")}),VP=()=>de(()=>import("./footnotes-DI-iBQQZ.js"),__vite__mapDeps([52,1,2,26,13,27,18,28,29,30,37,38])),ZP=he("/_authenticated/footnotes")({head:()=>({meta:[{title:"Living Footnotes · Talkable Books"},{name:"description",content:"Ask one question across every book in the library, with citations to each work."}],links:[{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"}]}),component:ue(VP,"component")}),ju=st({method:"GET"}).middleware([On]).handler(ft("b38a33e7e88101a5da048a7ea268a19b4dd30930f8e253096270dab86a1260da")),FP=()=>de(()=>import("./studio-C0P0yLQE.js"),[]),GP=he("/_authenticated/studio")({beforeLoad:async()=>{const{isAdmin:e}=await ju();if(!e)throw pn({to:"/"})},head:()=>({meta:[{title:"Studio · Talkable Editions"},{name:"description",content:"Admin studio for creating talkable books."},{name:"robots",content:"noindex, nofollow"}],links:[{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;700&family=Inter:wght@400;500&display=swap"}]}),component:ue(FP,"component")}),KP=()=>de(()=>import("./account.orders-DIVYoyva.js"),__vite__mapDeps([53,1,2,54,3,4,5,24])),YP=he("/account/orders")({head:()=>({meta:[{title:"Your orders · Love Across Borders Publishing"},{name:"robots",content:"noindex"}]}),component:ue(KP,"component")}),JP=()=>de(()=>import("./admin.index-DdTS4bk7.js"),__vite__mapDeps([55,1,2,4,5,3,56,57,58])),QP=he("/admin/")({head:()=>({meta:[{title:"Admin · Love Across Borders Publishing"},{name:"robots",content:"noindex"}]}),component:ue(JP,"component")}),XP=()=>de(()=>import("./admin.orders-CfqnsN_C.js"),__vite__mapDeps([59,1,2,3,56,57,58])),WP=he("/admin/orders")({head:()=>({meta:[{title:"Orders · Admin"},{name:"robots",content:"noindex"}]}),component:ue(XP,"component")}),eL=()=>de(()=>import("./admin.reviews-CAVLqr3I.js"),__vite__mapDeps([60,1,57,2,61,56,58,3])),tL=he("/admin/reviews")({head:()=>({meta:[{title:"Reviews · Admin"},{name:"robots",content:"noindex"}]}),component:ue(eL,"component")}),nL=()=>de(()=>import("./admin.shop-xRWy7E4e.js"),__vite__mapDeps([62,56,1,57,2,58,3])),rL=he("/admin/shop")({head:()=>({meta:[{title:"Shop admin"},{name:"robots",content:"noindex"}]}),component:ue(nL,"component")}),sL=()=>de(()=>import("./admin.support-D-BQTvuY.js"),__vite__mapDeps([63,1,2,35,5,56,57,58,3])),iL=he("/admin/support")({head:()=>({meta:[{title:"Support inbox"},{name:"robots",content:"noindex"}
64]}),component:ue(sL,"component")}),aL="/__l5e/assets-v1/c67ffc44-18c1-4a69-bdfe-47159025ba02/og-author.jpg",$b={url:aL},oL=()=>de(()=>import("./author.shaun-j-apple-C1-wCNdx.js"),__vite__mapDeps([64,3,4,2,5,15,21])),Bc=`${Ze}/author/shaun-j-apple`,zf=`${gr} | American Author, Poet and Publisher`,Ib=`${gr} is an American author, poet, and publisher whose work spans memoir, poetry, philosophy, relationships, harm reduction, politics, humor, and children's literature.`,lL=he("/author/shaun-j-apple")({head:()=>({meta:[{title:zf},{name:"description",content:Ib.slice(0,160)},{property:"og:title",content:zf},{property:"og:description",content:Ib.slice(0,160)},{property:"og:url",content:Bc},{property:"og:type",content:"profile"},{property:"og:image",content:mn($b.url)},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:mn($b.url)}],links:[{rel:"canonical",href:Bc}],scripts:[kn(An([vi({logoUrl:mr.url}),ol(),{"@type":"ProfilePage","@id":`${Bc}#profile`,url:Bc,about:{"@id":"https://lifeofexperience.com/#shaun-j-apple"},name:zf},Wn([{name:"Home",url:"/"},{name:`${gr}`,url:"/author/shaun-j-apple"}])]))]}),component:ue(oL,"component")}),cL=()=>de(()=>import("./book._bookId-B574dV0S.js"),__vite__mapDeps([65,4,2,5,3,11,10])),uL=he("/book/$bookId")({head:()=>({meta:[{title:"Reading room · coming soon"},{name:"robots",content:"noindex"}]}),component:ue(cL,"component")});function _S(e,t){const n=e?.title??"this book",i=t?.hasEpub??!0,o=t?.hasPdf??!0,l=t?.hasAudio??!1,u=t?.amazonPrintUrl??null;return[{q:`What formats does ${n} come in?`,a:[o?"PDF for any device":null,i?"EPUB for Kindle, Apple Books, Kobo, and every major reader app":null,l?"Audio for listening on the go":null,u?"A print edition on Amazon":null].filter(Boolean).join(", ")+". You receive every format included with your purchase, delivered instantly after checkout."},{q:"How do I get my files after buying?",a:"You receive an email with download links within seconds of a successful payment. If you create an account, every purchased book also appears in your library at loveacrossborders.com/library and can be re-downloaded any time."},{q:"Will the EPUB work on my Kindle?",a:"Yes. Send the EPUB to your Kindle address by email, or use the Send to Kindle app. Modern Kindle firmware reads EPUB directly. If you get stuck, message support and a real person will walk you through it."},{q:"Is my payment secure and my information private?",a:"Payment is handled by Stripe, the same processor used by millions of businesses worldwide. We never see or store your card details. We collect only what is needed to deliver your books and a receipt."}
64,{q:"What if I do not like the book, or something goes wrong?",a:"Every purchase is covered by a 14 day refund. If a file will not open, a link expires, or you simply changed your mind, email support and it will be handled the same day whenever possible."},{q:`Who is ${n} for?`,a:`${n} was written for readers who want honest, well made work directly from the author, with no middleman markup and no algorithmic filler. If that describes you, this book will feel like it was set aside for you.`}]}function wS(e){return{"@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))}}const dL=()=>de(()=>import("./books._bookId-BGi4MX49.js"),__vite__mapDeps([66,3,4,2,5])),hL=()=>de(()=>import("./books._bookId-D8c8I-qC.js"),__vite__mapDeps([67,3,4,2,5,15,21,9,6,7,8])),fL=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,pL=he("/books/$bookId")({loader:async({params:e})=>{const t=e.bookId;if(fL.test(t))throw pn({to:"/talkable-books",statusCode:301});const n=$j[t];if(n)throw pn({to:"/books/$bookId",params:{bookId:n},statusCode:301});const i=yS(t);if(!i)throw k_();let o=null;try{o=await RP({data:{catalog_slug:i.slug}})}catch{o=null}return{book:i,directProduct:o}},head:({params:e,loaderData:t})=>{const n=t?.book;if(!n)return{meta:[{title:"Book not found"},{name:"robots",content:"noindex"}]};const i=`${Ze}/books/${e.bookId}`,o=`${n.title} by ${gr} | ${hn}`,l=n.coverAssetUrl??mr.url,u=_S(n,{hasPdf:!0,hasEpub:!0,hasAudio:!1,amazonPrintUrl:null}),d=An([vi({logoUrl:mr.url}),ol(),bS(n,l),wS(u),Wn([{name:"Home",url:"/"},{name:"Books",url:"/books"},{name:Bj(n.category),url:`/books/category/${n.category}`},{name:n.title,url:`/books/${n.slug}`}])]);return{meta:[{title:o},{name:"description",content:n.description.slice(0,160)},{property:"og:type",content:"book"},{property:"og:title",content:o},{property:"og:description",content:n.description.slice(0,160)},{property:"og:url",content:i},{property:"og:image",content:l.startsWith("http")?l:`${Ze}${l}`},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:o},{name:"twitter:description",content:n.description.slice(0,160)},{name:"twitter:image",content:l.startsWith("http")?l:`${Ze}${l}`}],links:[{rel:"canonical",href:i}],scripts:[kn(d)]}},component:ue(hL,"component"),notFoundComponent:ue(dL,"notFoundComponent")}),mL=()=>de(()=>import("./books.admin-bWazOzi-.js"),__vite__mapDeps([68,1,57,2,58,37,38,49,11,69,32])),gL=he("/books/admin")({head:()=>({meta:[{title:"Talkable Books · Admin"}]}),beforeLoad:async()=>{const{data:e}=await il.auth.getUser();if(!e.user)throw pn({to:"/auth",search:{mode:"signin",redirect:"/books/admin"}})},component:ue(mL,"component")}),yL=()=>de(()=>import("./harm-reduction.admin-V4pWpkkC.js"),__vite__mapDeps([70,1,57,2,71,38,8,49,72,69,32])),vL=he("/harm-reduction/admin")({head:()=>({meta:[{title:"Harm Reduction · Admin"}]}),beforeLoad:async()=>{const{data:e}=await il.auth.getUser();if(!e.user)throw pn({to:"/auth",search:{mode:"signin",redirect:"/harm-reduction/admin"}});if(!(await ju()).isAdmin)throw pn({to:"/"})},component:ue(yL,"component")});var Ub;function H(e,t,n){function i(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:u,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);const m=u.prototype,y=Object.keys(m);for(let g=0;g<y.length;g++){const v=y[g];v in d||(d[v]=m[v].bind(d))}}const o=n?.Parent??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function u(d){var f;const m=n?.Parent?new l:this;i(m,d),(f=m._zod).deferred??(f.deferred=[]);for(const y of m._zod.deferred)y();return m}return Object.defineProperty(u,"init",{value:i}),Object.defineProperty(u,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class ka extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class SS extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Ub=globalThis).__zod_globalConfig??(Ub.__zod_globalConfig={});const Pp=globalThis.__zod_globalConfig;function Zr(e){return Pp}function ES(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function up(e,t){return typeof t=="bigint"?t.toString():t}function Pu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Lp(e){return e==null}function Mp(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function bL(e,t){const n=e/t,i=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<o?0:n-i}const Bb=Symbol("evaluating");function Ne(e,t,n){let i;
vendor: 5,161 bytes, line 64
64Object.defineProperty(e,t,{get(){if(i!==Bb)return i===void 0&&(i=Bb,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function bi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function js(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function Hb(e){return JSON.stringify(e)}function _L(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const TS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wL=Pu(()=>{if(Pp.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Na(e){if(tl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(tl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function RS(e){return Na(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const SL=new Set(["string","number","symbol"]);function za(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ps(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ie(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function EL(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const TL={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function RL(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=js(e._zod.def,{get shape(){const u={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(u[d]=n.shape[d])}return bi(this,"shape",u),u},checks:[]});return Ps(e,l)}function AL(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=js(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete u[d]}return bi(this,"shape",u),u},checks:[]});return Ps(e,l)}function kL(e,t){if(!Na(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const l=e._zod.def.shape;for(const u in t)if(Object.getOwnPropertyDescriptor(l,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=js(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return bi(this,"shape",l),l}});return Ps(e,o)}function OL(e,t){if(!Na(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=js(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return bi(this,"shape",i),i}});return Ps(e,n)}function CL(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=js(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return bi(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ps(e,n)}function xL(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const u=js(t._zod.def,{get shape(){const d=t._zod.def.shape,f={...d};if(n)for(const m in n){if(!(m in d))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(f[m]=e?new e({type:"optional",innerType:d[m]}):d[m])}else for(const m in d)f[m]=e?new e({type:"optional",innerType:d[m]}):d[m];return bi(this,"shape",f),f},checks:[]});return Ps(t,u)}function NL(e,t,n){const i=js(t._zod.def,{get shape(){const o=t._zod.def.shape,l={...o};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=new e({type:"nonoptional",innerType:o[u]}))}else for(const u in o)l[u]=new e({type:"nonoptional",innerType:o[u]});return bi(this,"shape",l),l}});return Ps(t,i)}function wa(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function zL(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Sa(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Hc(e){return typeof e=="string"?e:e?.message}function Fr(e,t,n){const i=e.message?e.message:Hc(e.inst?._zod.def?.error?.(e))??Hc(t?.error?.(e))??Hc(n.customError?.(e))??Hc(n.localeError?.(e))??"Invalid input",{inst:o,c
64ontinue:l,input:u,...d}=e;return d.path??(d.path=[]),d.message=i,t?.reportInput&&(d.input=u),d}function Dp(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function nl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const AS=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,up,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},kS=H("$ZodError",AS),OS=H("$ZodError",AS,{Parent:Error});function jL(e,t=n=>n.message){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function PL(e,t=n=>n.message){const n={_errors:[]},i=(o,l=[])=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>i({issues:d},[...l,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...l,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...l,...u.path]);else{const d=[...l,...u.path];if(d.length===0)n._errors.push(t(u));else{let f=n,m=0;for(;m<d.length;){const y=d[m];m===d.length-1?(f[y]=f[y]||{_errors:[]},f[y]._errors.push(t(u))):f[y]=f[y]||{_errors:[]},f=f[y],m++}}}};return i(e),n}const $p=e=>(t,n,i,o)=>{const l=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise)throw new ka;if(u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>Fr(f,l,Zr())));throw TS(d,o?.callee),d}return u.value},Ip=e=>async(t,n,i,o)=>{const l=i?{...i,async:!0}:{async:!0};let u=t._zod.run({value:n,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const d=new(o?.Err??e)(u.issues.map(f=>Fr(f,l,Zr())));throw TS(d,o?.callee),d}return u.value},Lu=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new ka;return l.issues.length?{success:!1,error:new(e??kS)(l.issues.map(u=>Fr(u,o,Zr())))}:{success:!0,data:l.value}},LL=Lu(OS),Mu=e=>async(t,n,i)=>{const o=i?{...i,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(u=>Fr(u,o,Zr())))}:{success:!0,data:l.value}},ML=Mu(OS),DL=e=>(t,n,i)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return $p(e)(t,n,o)},$L=e=>(t,n,i)=>$p(e)(t,n,i),IL=e=>async(t,n,i)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return Ip(e)(t,n,o)},UL=e=>async(t,n,i)=>Ip(e)(t,n,i),BL=e=>(t,n,i)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return Lu(e)(t,n,o)},HL=e=>(t,n,i)=>Lu(e)(t,n,i),qL=e=>async(t,n,i)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return Mu(e)(t,n,o)},VL=e=>async(t,n,i)=>Mu(e)(t,n,i),ZL=/^[cC][0-9a-z]{6,}$/,FL=/^[0-9a-z]+$/,GL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,KL=/^[0-9a-vA-V]{20}$/,YL=/^[A-Za-z0-9]{27}$/,JL=/^[a-zA-Z0-9_-]{21}$/,QL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,XL=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,WL=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tM(){return new RegExp(eM,"u")}const nM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sM=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,iM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,aM=/^$|^(?:[0-9a-zA-Z+/]{4}
vendor: 24,871 bytes, lines 64-125
64)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,CS=/^[A-Za-z0-9_-]*$/,oM=/^https?$/,lM=/^\+[1-9]\d{6,14}$/,xS="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",cM=new RegExp(`^${xS}$`);function NS(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function uM(e){return new RegExp(`^${NS(e)}$`)}function dM(e){const t=NS({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${xS}T(?:${i})$`)}const hM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},fM=/^-?\d+$/,zS=/^-?\d+(?:\.\d+)?$/,pM=/^(?:true|false)$/i,mM=/^null$/i,gM=/^[^A-Z]*$/,yM=/^[^a-z]*$/,gn=H("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),jS={number:"number",bigint:"bigint",object:"date"},PS=H("$ZodCheckLessThan",(e,t)=>{gn.init(e,t);const n=jS[typeof t.value];e._zod.onattach.push(i=>{const o=i._zod.bag,l=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),LS=H("$ZodCheckGreaterThan",(e,t)=>{gn.init(e,t);const n=jS[typeof t.value];e._zod.onattach.push(i=>{const o=i._zod.bag,l=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vM=H("$ZodCheckMultipleOf",(e,t)=>{gn.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):bL(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),bM=H("$ZodCheckNumberFormat",(e,t)=>{gn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,l]=TL[t.format];e._zod.onattach.push(u=>{const d=u._zod.bag;d.format=t.format,d.minimum=o,d.maximum=l,n&&(d.pattern=fM)}),e._zod.check=u=>{const d=u.value;if(n){if(!Number.isInteger(d)){u.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?u.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):u.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}d<o&&u.issues.push({origin:"number",input:d,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),d>l&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),_M=H("$ZodCheckMaxLength",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Lp(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const u=Dp(o);i.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),wM=H("$ZodCheckMinLength",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Lp(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const u=Dp(o);i.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),SM=H("$ZodCheckLengthEquals",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Lp(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,l=o.length;if(l===t.length)return;const u=Dp(o),d=l>t.length;i.issues.push({origin:u,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Du=H("$ZodCheckStringFormat",(e,t)=>{var n,i;gn.init(e,t),e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),EM=H("$ZodCheckRegex",(e,t)=>{Du.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),TM=H("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gM),Du.init(e,t)}),RM=H("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=yM),Du.init(e,t)}),AM=H("$ZodCheckIncludes",(e,t)=>{gn.init(e,t);const n=za(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),kM=H("$ZodCheckStartsWith",(e,t)=>{gn.init(e,t);const n=new RegExp(`^${za(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),OM=H("$ZodCheckEndsWith",(e,t)=>{gn.init(e,t);const n=new RegExp(`.*${za(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),CM=H("$ZodCheckOverwrite",(e,t)=>{gn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class xM{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(` 65`).filter(u=>u),o=Math.min(...i.map(u=>u.length-u.trimStart().length)),l=i.map(u=>u.slice(o)).map(u=>" ".repeat(this.indent*2)+u);for(const u of l)this.content.push(u)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...n,o.join(` 66`))}}const NM={major:4,minor:4,patch:3},We=H("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=NM;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const l of o._zod.onattach)l(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(u,d,f)=>{let m=wa(u),y;for(const g of d){if(g._zod.def.when){if(zL(u)||!g._zod.def.when(u))continue}else if(m)continue;const v=u.issues.length,_=g._zod.check(u);if(_ instanceof Promise&&f?.async===!1)throw new ka;if(y||_ instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await _,u.issues.length!==v&&(m||(m=wa(u,v)))});else{if(u.issues.length===v)continue;m||(m=wa(u,v))}}return y?y.then(()=>u):u},l=(u,d,f)=>{if(wa(u))return u.aborted=!0,u;const m=o(d,i,f);if(m instanceof Promise){if(f.async===!1)throw new ka;return m.then(y=>e._zod.parse(y,f))}return e._zod.parse(m,f)};e._zod.run=(u,d)=>{if(d.skipChecks)return e._zod.parse(u,d);if(d.direction==="backward"){const m=e._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return m instanceof Promise?m.then(y=>l(y,u,d)):l(m,u,d)}const f=e._zod.parse(u,d);if(f instanceof Promise){if(d.async===!1)throw new ka;return f.then(m=>o(m,i,d))}return o(f,i,d)}}Ne(e,"~standard",()=>({validate:o=>{try{const l=LL(e,o);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return ML(e,o).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),Up=H("$ZodString",(e,t)=>{We.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hM(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),it=H("$ZodStringFormat",(e,t)=>{Du.init(e,t),Up.init(e,t)}),zM=H("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=XL),it.init(e,t)}),jM=H("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qb(i))}else t.pattern??(t.pattern=qb());it.init(e,t)}),PM=H("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=WL),it.init(e,t)}),LM=H("$ZodURL",(e,t)=>{it.init(e,t),e._zod.check=n=>{try{const i=n.value.trim();if(!t.normalize&&t.protocol?.source===oM.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),MM=H("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=tM()),it.init(e,t)}),DM=H("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=JL),it.init(e,t)}),$M=H("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ZL),it.init(e,t)}),IM=H("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=FL),it.init(e,t)}),UM=H("$ZodULID",(e,t)=>{t.pattern??(t.pattern=GL),it.init(e,t)}),BM=H("$ZodXID",(e,t)=>{t.pattern??(t.pattern=KL),it.init(e,t)}),HM=H("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=YL),it.init(e,t)}),qM=H("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dM(t)),it.init(e,t)}),VM=H("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cM),it.init(e,t)}),ZM=H("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=uM(t)),it.init(e,t)}),FM=H("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=QL),it.init(e,t)}),GM=H("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=nM),it.init(e,t),e._zod.bag.format="ipv4"}),KM=H("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=rM),it.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),YM=H("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sM),it.init(e,t)}),JM=H("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=iM),it.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,l]=i;if(!l)throw new Error;const u=Number(l);if(`${u}`!==l)throw new Error;if(u<0||u>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function MS(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const QM=H("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=aM),it.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{MS(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function XM(e){if(!CS.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return MS(n)}const WM=H("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=CS),it.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{XM(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),eD=H("$ZodE164",(e,t)=>{t.pattern??(t.pattern=lM),it.init(e,t)});function tD(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const nD=H("$ZodJWT",(e,t)=>{it.init(e,t),e._zod.check=n=>{tD(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),DS=H("$ZodNumber",(e,t)=>{We.init(e,t),e._zod.pattern=e._zod.bag.pattern??zS,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const l=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...l?{received:l}:{}}),n}}),rD=H("$ZodNumberFormat",(e,t)=>{bM.init(e,t),DS.init(e,t)}),sD=H("$ZodBoolean",(e,t)=>{We.init(e,t),e._zod.pattern=pM,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),iD=H("$ZodNull",(e,t)=>{We.init(e,t),e._zod.pattern=mM,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),aD=H("$ZodUnknown",(e,t)=>{We.init(e,t),e._zod.parse=n=>n}),oD=H("$ZodNever",(e,t)=>{We.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Vb(e,t,n){e.issues.length&&t.issues.push(...Sa(n,e.issues)),t.value[n]=e.value}const lD=H("$ZodArray",(e,t)=>{We.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const l=[];for(let u=0;u<o.length;u++){const d=o[u],f=t.element._zod.run({value:d,issues:[]},i);f instanceof Promise?l.push(f.then(m=>Vb(m,n,u))):Vb(f,n,u)}return l.length?Promise.all(l).then(()=>n):n}});function fu(e,t,n,i,o,l){const u=n in i;if(e.issues.length){if(o&&l&&!u)return;t.issues.push(...Sa(n,e.issues))}if(!u&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?u&&(t.value[n]=void 0):t.value[n]=e.value}function $S(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=EL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function IS(e,t,n,i,o,l){const u=[],d=o.keySet,f=o.catchall._zod,m=f.def.type,y=f.optin==="optional",g=f.optout==="optional";for(const v in t){if(v==="__proto__"||d.has(v))continue;if(m==="never"){u.push(v);continue}const _=f.run({value:t[v],issues:[]},i);_ instanceof Promise?e.push(_.then(w=>fu(w,n,v,t,y,g))):fu(_,n,v,t,y,g)}return u.length&&n.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:l}),e.length?Promise.all(e).then(()=>n):n}const cD=H("$ZodObject",(e,t)=>{if(We.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...d};return Object.defineProperty(t,"shape",{value:f}),f}})}const i=Pu(()=>$S(t));Ne(e._zod,"propValues",()=>{const d=t.shape,f={};for(const m in d){const y=d[m]._zod;if(y.values){f[m]??(f[m]=new Set);for(const g of y.values)f[m].add(g)}}return f});const o=tl,l=t.catchall;let u;e._zod.parse=(d,f)=>{u??(u=i.value);const m=d.value;if(!o(m))return d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d;d.value={};const y=[],g=u.shape;for(const v of u.keys){const _=g[v],w=_._zod.optin==="optional",R=_._zod.optout==="optional",E=_._zod.run({value:m[v],issues:[]},f);E instanceof Promise?y.push(E.then(T=>fu(T,d,v,m,w,R))):fu(E,d,v,m,w,R)}return l?IS(y,m,d,f,i.value,e):y.length?Promise.all(y).then(()=>d):d}}),uD=H("$ZodObjectJIT",(e,t)=>{cD.init(e,t);const n=e._zod.parse,i=Pu(()=>$S(t)),o=v=>{const _=new xM(["shape","payload","ctx"]),w=i.value,R=x=>{const N=Hb(x);return`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`};_.write("const input = payload.value;");const E=Object.create(null);let T=0;for(const x of w.keys)E[x]=`key_${T++}`;_.write("const newResult = {};");for(const x of w.keys){const N=E[x],I=Hb(x),U=v[x],D=U?._zod?.optin==="optional",K=U?._zod?.optout==="optional";_.write(`const ${N} = ${R(x)};`),D&&K?_.write(` 67 if (${N}.issues.length) { 68 if (${I} in input) { 69 payload.issues = payload.issues.concat(${N}.issues.map(iss => ({ 70 ...iss, 71 path: iss.path ? [${I}, ...iss.path] : [${I}] 72 }))); 73 } 74 } 75 76 if (${N}.value === undefined) { 77 if (${I} in input) { 78 newResult[${I}] = undefined; 79 } 80 } else { 81 newResult[${I}] = ${N}.value; 82 } 83 84 `):D?_.write(` 85 if (${N}.issues.length) { 86 payload.issues = payload.issues.concat(${N}.issues.map(iss => ({ 87 ...iss, 88 path: iss.path ? [${I}, ...iss.path] : [${I}] 89 }))); 90 } 91 92 if (${N}.value === undefined) { 93 if (${I} in input) { 94 newResult[${I}] = undefined; 95 } 96 } else { 97 newResult[${I}] = ${N}.value; 98 } 99 100 `):_.write(` 101 const ${N}_present = ${I} in input; 102 if (${N}.issues.length) { 103 payload.issues = payload.issues.concat(${N}.issues.map(iss => ({ 104 ...iss, 105 path: iss.path ? [${I}, ...iss.path] : [${I}] 106 }))); 107 } 108 if (!${N}_present && !${N}.issues.length) { 109 payload.issues.push({ 110 code: "invalid_type", 111 expected: "nonoptional", 112 input: undefined, 113 path: [${I}] 114 }); 115 } 116 117 if (${N}_present) { 118 if (${N}.value === undefined) { 119 newResult[${I}] = undefined; 120 } else { 121 newResult[${I}] = ${N}.value; 122 } 123 } 124 125 `)}_.write("payload.value = newResult;"),_.write("return payload;");const k=_.compile();return(x,N)=>k(v,x,N)};let l;const u=tl,d=!Pp.jitless,m=d&&wL.value,y=t.catchall;let g;e._zod.parse=(v,_)=>{g??(g=i.value);const w=v.value;return u(w)?d&&m&&_?.async===!1&&_.jitless!==!0?(l||(l=o(t.shape)),v=l(v,_),y?IS([],w,v,_,g,e):v):n(v,_):(v.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),v)}});function Zb(e,t,n,i){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const o=e.filter(l=>!wa(l));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(l=>l.issues.map(u=>Fr(u,i,Zr())))}),t)}const US=H("$ZodUnion",(e,t)=>{We.init(e,t),Ne(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ne(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>Mp(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(n)return n(i,o);let l=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:i.value,issues:[]},o);if(f instanceof Promise)u.push(f),l=!0;else{if(f.issues.length===0)return f;u.push(f)}}return l?Promise.all(u).then(d=>Zb(d,i,e,o)):Zb(u,i,e,o)}}),dD=H("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,US.init(e,t);const n=e._zod.parse;Ne(e._zod,"propValues",()=>{const o={};for(const l of t.options){const u=l._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[d,f]of Object.entries(u)){o[d]||(o[d]=new Set);for(const m of f)o[d].add(m)}}return o});const i=Pu(()=>{const o=t.options,l=new Map;for(const u of o){const d=u._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const f of d){if(l.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);l.set(f,u)}}return l});e._zod.parse=(o,l)=>{const u=o.value;if(!tl(u))return o.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),o;const d=i.value.get(u?.[t.discriminator]);return d?d._zod.run(o,l):t.unionFallback||l.direction==="backward"?n(o,l):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:u,path:[t.discriminator],inst:e}),o)}}),hD=H("$ZodIntersection",(e,t)=>{We.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,l=t.left._zod.run({value:o,issues:[]},i),u=t.right._zod.run({value:o,issues:[]},i);return l instanceof Promise||u instanceof Promise?Promise.all([l,u]).then(([f,m])=>Fb(n,f,m)):Fb(n,l,u)}});function dp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Na(e)&&Na(t)){const n=Object.keys(t),i=Object.keys(e).filter(l=>n.indexOf(l)!==-1),o={...e,...t};for(const l of i){const u=dp(e[l],t[l]);if(!u.valid)return{valid:!1,mergeErrorPath:[l,...u.mergeErrorPath]};o[l]=u.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],u=dp(o,l);if(!u.valid)return{valid:!1,mergeErrorPath:[i,...u.mergeErrorPath]};n.push(u.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Fb(e,t,n){const i=new Map;let o;for(const d of t.issues)if(d.code==="unrecognized_keys"){o??(o=d);for(const f of d.keys)i.has(f)||i.set(f,{}),i.get(f).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const f of d.keys)i.has(f)||i.set(f,{}),i.get(f).r=!0;else e.issues.push(d);const l=[...i].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(l.length&&o&&e.issues.push({...o,keys:l}),wa(e))return e;const u=dp(t.value,n.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const fD=H("$ZodRecord",(e,t)=>{We.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Na(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const l=[],u=t.keyType._zod.values;if(u){n.value={};const d=new Set;for(const m of u)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){d.add(typeof m=="number"?m.toString():m);const y=t.keyType._zod.run({value:m,issues:[]},i);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(_=>Fr(_,i,Zr())),input:m,path:[m],inst:e});continue}const g=y.value,v=t.valueType._zod.run({value:o[m],issues:[]},i);v instanceof Promise?l.push(v.then(_=>{_.issues.length&&n.issues.push(...Sa(m,_.issues)),n.value[g]=_.value})):(v.issues.length&&n.issues.push(...Sa(m,v.issues)),n.value[g]=v.value)}let f;for(const m in o)d.has(m)||(f=f??[],f.push(m));f&&f.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:f})}else{n.value={};for(const d of Reflect.ownKeys(o)){if(d==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,d))continue;let f=t.keyType._zod.run({value:d,issues:[]},i);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");
vendor: 2,611 bytes, line 125
125if(typeof d=="string"&&zS.test(d)&&f.issues.length){const g=t.keyType._zod.run({value:Number(d),issues:[]},i);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(f=g)}if(f.issues.length){t.mode==="loose"?n.value[d]=o[d]:n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(g=>Fr(g,i,Zr())),input:d,path:[d],inst:e});continue}const y=t.valueType._zod.run({value:o[d],issues:[]},i);y instanceof Promise?l.push(y.then(g=>{g.issues.length&&n.issues.push(...Sa(d,g.issues)),n.value[f.value]=g.value})):(y.issues.length&&n.issues.push(...Sa(d,y.issues)),n.value[f.value]=y.value)}}return l.length?Promise.all(l).then(()=>n):n}}),pD=H("$ZodEnum",(e,t)=>{We.init(e,t);const n=ES(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>SL.has(typeof o)).map(o=>typeof o=="string"?za(o):o.toString()).join("|")})$`),e._zod.parse=(o,l)=>{const u=o.value;return i.has(u)||o.issues.push({code:"invalid_value",values:n,input:u,inst:e}),o}}),mD=H("$ZodLiteral",(e,t)=>{if(We.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?za(i):i?za(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const l=i.value;return n.has(l)||i.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),i}}),gD=H("$ZodTransform",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new SS(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(u=>(n.value=u,n.fallback=!0,n));if(o instanceof Promise)throw new ka;return n.value=o,n.fallback=!0,n}});function Gb(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const BS=H("$ZodOptional",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Mp(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,l=t.innerType._zod.run(n,i);return l instanceof Promise?l.then(u=>Gb(u,o)):Gb(l,o)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),yD=H("$ZodExactOptional",(e,t)=>{BS.init(e,t),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}
vendor: 25,121 bytes, lines 125-127
125),vD=H("$ZodNullable",(e,t)=>{We.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Mp(n.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),bD=H("$ZodDefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(l=>Kb(l,t)):Kb(o,t)}});function Kb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const _D=H("$ZodPrefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),wD=H("$ZodNonOptional",(e,t)=>{We.init(e,t),Ne(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(l=>Yb(l,e)):Yb(o,e)}});function Yb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const SD=H("$ZodCatch",(e,t)=>{We.init(e,t),e._zod.optin="optional",Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(l=>(n.value=l.value,l.issues.length&&(n.value=t.catchValue({...n,error:{issues:l.issues.map(u=>Fr(u,i,Zr()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>Fr(l,i,Zr()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),ED=H("$ZodPipe",(e,t)=>{We.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const l=t.out._zod.run(n,i);return l instanceof Promise?l.then(u=>qc(u,t.in,i)):qc(l,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(l=>qc(l,t.out,i)):qc(o,t.out,i)}});function qc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const TD=H("$ZodReadonly",(e,t)=>{We.init(e,t),Ne(e._zod,"propValues",()=>t.innerType._zod.propValues),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"optin",()=>t.innerType?._zod?.optin),Ne(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(Jb):Jb(o)}});function Jb(e){return e.value=Object.freeze(e.value),e}const RD=H("$ZodLazy",(e,t)=>{We.init(e,t),Ne(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Ne(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ne(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ne(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ne(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),AD=H("$ZodCustom",(e,t)=>{gn.init(e,t),We.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(l=>Qb(l,n,i,e));Qb(o,n,i,e)}});function Qb(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(nl(o))}}var Xb;class kD{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function OD(){return new kD}(Xb=globalThis).__zod_globalRegistry??(Xb.__zod_globalRegistry=OD());const $o=globalThis.__zod_globalRegistry;function CD(e,t){return new e({type:"string",...ie(t)})}function xD(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ie(t)})}function Wb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ie(t)})}function ND(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ie(t)})}function zD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ie(t)})}function jD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ie(t)})}function PD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ie(t)})}function LD(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ie(t)})}function MD(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ie(t)})}function DD(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ie(t)})}function $D(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ie(t)})}function ID(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ie(t)})}function UD(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ie(t)})}function BD(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ie(t)})}function HD(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ie(t)})}function qD(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ie(t)})}function VD(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ie(t)})}function ZD(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ie(t)})}function FD(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ie(t)})}function GD(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ie(t)})}function KD(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ie(t)})}function YD(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ie(t)})}function JD(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ie(t)})}function QD(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ie(t)})}function XD(e,t){return new e({type:"string",format:"date",check:"string_format",...ie(t)})}function WD(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ie(t)})}function e$(e,t){return new e({type:"string",format:"duration",check:"string_format",...ie(t)})}function t$(e,t){return new e({type:"number",checks:[],...ie(t)})}function n$(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ie(t)})}function r$(e,t){return new e({type:"boolean",...ie(t)})}function s$(e,t){return new e({type:"null",...ie(t)})}function i$(e){return new e({type:"unknown"})}function a$(e,t){return new e({type:"never",...ie(t)})}function e_(e,t){return new PS({check:"less_than",...ie(t),value:e,inclusive:!1})}function jf(e,t){return new PS({check:"less_than",...ie(t),value:e,inclusive:!0})}function t_(e,t){return new LS({check:"greater_than",...ie(t),value:e,inclusive:!1})}function Pf(e,t){return new LS({check:"greater_than",...ie(t),value:e,inclusive:!0})}function n_(e,t){return new vM({check:"multiple_of",...ie(t),value:e})}function HS(e,t){return new _M({check:"max_length",...ie(t),maximum:e})}function pu(e,t){return new wM({check:"min_length",...ie(t),minimum:e})}function qS(e,t){return new SM({check:"length_equals",...ie(t),length:e})}function o$(e,t){return new EM({check:"string_format",format:"regex",...ie(t),pattern:e})}function l$(e){return new TM({check:"string_format",format:"lowercase",...ie(e)})}function c$(e){return new RM({check:"string_format",format:"uppercase",...ie(e)})}function u$(e,t){return new AM({check:"string_format",format:"includes",...ie(t),includes:e})}function d$(e,t){return new kM({check:"string_format",format:"starts_with",...ie(t),prefix:e})}function h$(e,t){return new OM({check:"string_format",format:"ends_with",...ie(t),suffix:e})}function Pa(e){return new CM({check:"overwrite",tx:e})}function f$(e){return Pa(t=>t.normalize(e))}function p$(){return Pa(e=>e.trim())}function m$(){return Pa(e=>e.toLowerCase())}function g$(){return Pa(e=>e.toUpperCase())}function y$(){return Pa(e=>_L(e))}function v$(e,t,n){return new e({type:"array",element:t,...ie(n)})}function b$(e,t,n){const i=ie(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function _$(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ie(n)})}function w$(e,t){const n=S$(i=>(i.addIssue=o=>{if(typeof o=="string")i.issues.push(nl(o,i.value,n._zod.def));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=i.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),i.issues.push(nl(l))}},e(i.value,i)),t);return n}function S$(e,t){const n=new gn({check:"custom",...ie(t)});return n._zod.check=e,n}function mu(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??$o,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Je(e,t,n={path:[],schemaPath:[]}){var i;const o=e._zod.def,l=t.seen.get(e);if(l)return l.count++,n.schemaPath.includes(e)&&(l.cycle=n.path),l.schema;const u={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,u);const d=e._zod.toJSONSchema?.();if(d)u.schema=d;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,y);else{const v=u.schema,_=t.processors[o.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);_(e,t,v,y)}const g=e._zod.parent;g&&(u.ref||(u.ref=g),Je(g,t,y),t.seen.get(g).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(u.schema,f),t.io==="input"&&Ft(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&"_prefault"in u.schema&&((i=u.schema).default??(i.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function gu(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const u of e.seen.entries()){const d=e.metadataRegistry.get(u[0])?.id;if(d){const f=i.get(d);if(f&&f!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,u[0])}}const o=u=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(u[0])?.id,v=e.external.uri??(w=>w);if(g)return{ref:v(g)};const _=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=_,{defId:_,ref:`${v("__shared")}#/${d}/${_}`}}if(u[1]===n)return{ref:"#"};const m=`#/${d}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:m+y}},l=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:f,defId:m}=o(u);d.def={...d.schema},m&&(d.defId=m);const y=d.schema;for(const g in y)delete y[g];y.$ref=f};if(e.cycles==="throw")for(const u of e.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root> 126 127Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){l(u);continue}if(e.external){const m=e.external.registry.get(u[0])?.id;if(t!==u[0]&&m){l(u);continue}}if(e.metadataRegistry.get(u[0])?.id){l(u);continue}if(d.cycle){l(u);continue}if(d.count>1&&e.reused==="ref"){l(u);continue}}}function yu(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=d=>{const f=e.seen.get(d);if(f.ref===null)return;const m=f.def??f.schema,y={...m},g=f.ref;if(f.ref=null,g){i(g);const _=e.seen.get(g),w=_.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(w)):Object.assign(m,w),Object.assign(m,y),d._zod.parent===g)for(const E in m)E==="$ref"||E==="allOf"||E in y||delete m[E];if(w.$ref&&_.def)for(const E in m)E==="$ref"||E==="allOf"||E in _.def&&JSON.stringify(m[E])===JSON.stringify(_.def[E])&&delete m[E]}const v=d._zod.parent;if(v&&v!==g){i(v);const _=e.seen.get(v);if(_?.schema.$ref&&(m.$ref=_.schema.$ref,_.def))for(const w in m)w==="$ref"||w==="allOf"||w in _.def&&JSON.stringify(m[w])===JSON.stringify(_.def[w])&&delete m[w]}e.override({zodSchema:d,jsonSchema:m,path:f.path??[]})};for(const d of[...e.seen.entries()].reverse())i(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,n.def??n.schema);const l=e.metadataRegistry.get(t)?.id;l!==void 0&&o.id===l&&delete o.id;const u=e.external?.defs??{};for(const d of e.seen.entries()){const f=d[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,u[f.defId]=f.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:vu(t,"input",e.processors),output:vu(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Ft(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Ft(i.element,n);if(i.type==="set")return Ft(i.valueType,n);if(i.type==="lazy")return Ft(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Ft(i.innerType,n);if(i.type==="intersection")return Ft(i.left,n)||Ft(i.right,n);if(i.type==="record"||i.type==="map")return Ft(i.keyType,n)||Ft(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ft(i.in,n)||Ft(i.out,n);if(i.type==="object"){for(const o in i.shape)if(Ft(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(Ft(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(Ft(o,n))return!0;return!!(i.rest&&Ft(i.rest,n))}return!1}const E$=(e,t={})=>n=>{const i=mu({...n,processors:t});return Je(e,i),gu(i,e),yu(i,e)},vu=(e,t,n={})=>i=>{const{libraryOptions:o,target:l}=i??{},u=mu({...o??{},target:l,io:t,processors:n});return Je(e,u),gu(u,e),yu(u,e)},T$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},VS=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:l,maximum:u,format:d,patterns:f,contentEncoding:m}=e._zod.bag;if(typeof l=="number"&&(o.minLength=l),typeof u=="number"&&(o.maxLength=u),d&&(o.format=T$[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),m&&(o.contentEncoding=m),f&&f.size>0){const y=[...f];y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},ZS=(e,t,n,i)=>{const o=n,{minimum:l,maximum:u,format:d,multipleOf:f,exclusiveMaximum:m,exclusiveMinimum:y}=e._zod.bag;typeof d=="string"&&d.includes("int")?o.type="integer":o.type="number";const g=typeof y=="number"&&y>=(l??Number.NEGATIVE_INFINITY),v=typeof m=="number"&&m<=(u??Number.POSITIVE_INFINITY),_=t.target==="draft-04"||t.target==="openapi-3.0";g?_?(o.minimum=y,o.exclusiveMinimum=!0):o.exclusiveMinimum=y:typeof l=="number"&&(o.minimum=l),v?_?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof u=="number"&&(o.maximum=u),typeof f=="number"&&(o.multipleOf=f)},FS=(e,t,n,i)=>{n.type="boolean"},R$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},A$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},GS=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},k$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},O$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},KS=(e,t,n,i)=>{n.not={}},C$=(e,t,n,i)=>{},YS=(e,t,n,i)=>{},x$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},JS=(e,t,n,i)=>{const o=e._zod.def,l=ES(o.entries);l.every(u=>typeof u=="number")&&(n.type="number"),l.every(u=>typeof u=="string")&&(n.type="string"),n.enum=l},QS=(e,t,n,i)=>{const o=e._zod.def,l=[];for(const u of o.values)if(u===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof u=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(u))}else l.push(u);if(l.length!==0)if(l.length===1){const u=l[0];n.type=u===null?"null":typeof u,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[u]:n.const=u}else l.every(u=>typeof u=="number")&&(n.type="number"),l.every(u=>typeof u=="string")&&(n.type="string"),l.every(u=>typeof u=="boolean")&&(n.type="boolean"),l.every(u=>u===null)&&(n.type="null"),n.enum=l},N$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},z$=(e,t,n,i)=>{const o=n,l=e._zod.pattern;if(!l)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=l.source},j$=(e,t,n,i)=>{const o=n,l={type:"string",format:"binary",contentEncoding:"binary"},{minimum:u,maximum:d,mime:f}=e._zod.bag;u!==void 0&&(l.minLength=u),d!==void 0&&(l.maxLength=d),f?f.length===1?(l.contentMediaType=f[0],Object.assign(o,l)):(Object.assign(o,l),o.anyOf=f.map(m=>({contentMediaType:m}))):Object.assign(o,l)},P$=(e,t,n,i)=>{n.type="boolean"},XS=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},L$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},WS=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},M$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},D$=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},eE=(e,t,n,i)=>{const o=n,l=e._zod.def,{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(o.minItems=u),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=Je(l.element,t,{...i,path:[...i.path,"items"]})},tE=(e,t,n,i)=>{const o=n,l=e._zod.def;o.type="object",o.properties={};const u=l.shape;for(const m in u)o.properties[m]=Je(u[m],t,{...i,path:[...i.path,"properties",m]});const d=new Set(Object.keys(u)),f=new Set([...d].filter(m=>{const y=l.shape[m]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));f.size>0&&(o.required=Array.from(f)),l.catchall?._zod.def.type==="never"?o.additionalProperties=!1:l.catchall?l.catchall&&(o.additionalProperties=Je(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},nE=(e,t,n,i)=>{const o=e._zod.def,l=o.inclusive===!1,u=o.options.map((d,f)=>Je(d,t,{...i,path:[...i.path,l?"oneOf":"anyOf",f]}));l?n.oneOf=u:n.anyOf=u},rE=(e,t,n,i)=>{const o=e._zod.def,l=Je(o.left,t,{...i,path:[...i.path,"allOf",0]}),u=Je(o.right,t,{...i,path:[...i.path,"allOf",1]}),d=m=>"allOf"in m&&Object.keys(m).length===1,f=[...d(l)?l.allOf:[l],...d(u)?u.allOf:[u]];n.allOf=f},$$=(e,t,n,i)=>{const o=n,l=e._zod.def;o.type="array";const u=t.target==="draft-2020-12"?"prefixItems":"items",d=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",f=l.items.map((v,_)=>Je(v,t,{...i,path:[...i.path,u,_]})),m=l.rest?Je(l.rest,t,{...i,path:[...i.path,d,...t.target==="openapi-3.0"?[l.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=f,m&&(o.items=m)):t.target==="openapi-3.0"?(o.items={anyOf:f},m&&o.items.anyOf.push(m),o.minItems=f.length,m||(o.maxItems=f.length)):(o.items=f,m&&(o.additionalItems=m));const{minimum:y,maximum:g}=e._zod.bag;typeof y=="number"&&(o.minItems=y),typeof g=="number"&&(o.maxItems=g)},sE=(e,t,n,i)=>{const o=n,l=e._zod.def;o.type="object";const u=l.keyType,f=u._zod.bag?.patterns;if(l.mode==="loose"&&f&&f.size>0){const y=Je(l.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});o.patternProperties={};for(const g of f)o.patternProperties[g.source]=y}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Je(l.keyType,t,{...i,path:[...i.path,"propertyNames"]})),o.additionalProperties=Je(l.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const m=u._zod.values;if(m){const y=[...m].filter(g=>typeof g=="string"||typeof g=="number");y.length>0&&(o.required=y)}},iE=(e,t,n,i)=>{const o=e._zod.def,l=Je(o.innerType,t,i),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=o.innerType,n.nullable=!0):n.anyOf=[l,{type:"null"}]},aE=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType},oE=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},lE=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},cE=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType;let u;try{u=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=u},uE=(e,t,n,i)=>{const o=e._zod.def,l=o.in._zod.traits.has("$ZodTransform"),u=t.io==="input"?l?o.out:o.in:o.out;Je(u,t,i);const d=t.seen.get(e);d.ref=u},dE=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,n.readOnly=!0},I$=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType},Bp=(e,t,n,i)=>{const o=e._zod.def;Je(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType},hE=(e,t,n,i)=>{const o=e._zod.innerType;Je(o,t,i);const l=t.seen.get(e);l.ref=o},r_={string:VS,number:ZS,boolean:FS,bigint:R$,symbol:A$,null:GS,undefined:k$,void:O$,never:KS,any:C$,unknown:YS,date:x$,enum:JS,literal:QS,nan:N$,template_literal:z$,file:j$,success:P$,custom:XS,function:L$,transform:WS,map:M$,set:D$,array:eE,object:tE,union:nE,intersection:rE,tuple:$$,record:sE,nullable:iE,nonoptional:aE,default:oE,prefault:lE,catch:cE,pipe:uE,readonly:dE,promise:I$,optional:Bp,lazy:hE};function j3(e,t){if("_idmap"in e){const i=e,o=mu({...t,processors:r_}),l={};for(const f of i._idmap.entries()){const[m,y]=f;Je(y,o)}const u={},d={registry:i,uri:t?.uri,defs:l};o.external=d;for(const f of i._idmap.entries()){const[m,y]=f;gu(o,y),u[m]=yu(o,y)}if(Object.keys(l).length>0){const f=o.target==="draft-2020-12"?"$defs":"definitions";u.__shared={[f]:l}}return{schemas:u}}const n=mu({...t,processors:r_});return Je(e,n),gu(n,e),yu(n,e)}const U$=H("ZodISODateTime",(e,t)=>{qM.init(e,t),ot.init(e,t)});function B$(e){return QD(U$,e)}const H$=H("ZodISODate",(e,t)=>{VM.init(e,t),ot.init(e,t)});function q$(e){return XD(H$,e)}const V$=H("ZodISOTime",(e,t)=>{ZM.init(e,t),ot.init(e,t)});function Z$(e){return WD(V$,e)}const F$=H("ZodISODuration",(e,t)=>{FM.init(e,t),ot.init(e,t)});function G$(e){return e$(F$,e)}const K$=(e,t)=>{kS.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>PL(e,n)},flatten:{value:n=>jL(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,up,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,up,2)}},isEmpty:{get(){return e.issues.length===0}}})},qn=H("ZodError",K$,{Parent:Error}
vendor: 4,113 bytes, line 127
127),Y$=$p(qn),J$=Ip(qn),Q$=Lu(qn),X$=Mu(qn),W$=DL(qn),e4=$L(qn),t4=IL(qn),n4=UL(qn),r4=BL(qn),s4=HL(qn),i4=qL(qn),a4=VL(qn),s_=new WeakMap;function ll(e,t,n){const i=Object.getPrototypeOf(e);let o=s_.get(i);if(o||(o=new Set,s_.set(i,o)),!o.has(t)){o.add(t);for(const l in n){const u=n[l];Object.defineProperty(i,l,{configurable:!0,enumerable:!1,get(){const d=u.bind(this);return Object.defineProperty(this,l,{configurable:!0,writable:!0,enumerable:!0,value:d}),d},set(d){Object.defineProperty(this,l,{configurable:!0,writable:!0,enumerable:!0,value:d})}})}}}const et=H("ZodType",(e,t)=>(We.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:vu(e,"input"),output:vu(e,"output")}}),e.toJSONSchema=E$(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Y$(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Q$(e,n,i),e.parseAsync=async(n,i)=>J$(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>X$(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>W$(e,n,i),e.decode=(n,i)=>e4(e,n,i),e.encodeAsync=async(n,i)=>t4(e,n,i),e.decodeAsync=async(n,i)=>n4(e,n,i),e.safeEncode=(n,i)=>r4(e,n,i),e.safeDecode=(n,i)=>s4(e,n,i),e.safeEncodeAsync=async(n,i)=>i4(e,n,i),e.safeDecodeAsync=async(n,i)=>a4(e,n,i),ll(e,"ZodType",{check(...n){const i=this.def;return this.clone(js(i,{checks:[...i.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return Ps(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(eI(n,i))},superRefine(n,i){return this.check(tI(n,i))},overwrite(n){return this.check(Pa(n))},optional(){return c_(this)},exactOptional(){return B4(this)},nullable(){return u_(this)},nullish(){return c_(u_(this))},nonoptional(n){return G4(this,n)},array(){return N4(this)},or(n){return z4([this,n])},and(n){return L4(this,n)},transform(n){return d_(this,I4(n))},default(n){return V4(this,n)},prefault(n){return F4(this,n)},catch(n){return Y4(this,n)},pipe(n){return d_(this,n)},readonly(){return X4(this)},describe(n){const i=this.clone();return $o.add(i,{description:n}),i},meta(...n){if(n.length===0)return $o.get(this);const i=this.clone();return $o.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return $o.get(e)?.description},configurable:!0}),e)),fE=H("_ZodString",(e,t)=>{Up.init(e,t),et.init(e,t),e._zod.processJSONSchema=(i,o,l)=>VS(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ll(e,"_ZodString",{regex(...i){return this.check(o$(...i))},includes(...i){return this.check(u$(...i))},startsWith(...i){return this.check(d$(...i))},endsWith(...i){return this.check(h$(...i))},min(...i){return this.check(pu(...i))},max(...i){return this.check(HS(...i))},length(...i){return this.check(qS(...i))},nonempty(...i){return this.check(pu(1,...i))},lowercase(i){return this.check(l$(i))},uppercase(i){return this.check(c$(i))},trim(){return this.check(p$())},normalize(...i){return this.check(f$(...i))},toLowerCase(){return this.check(m$())},toUpperCase(){return this.check(g$())},slugify(){return this.check(y$())}})}),o4=H("ZodString",(e,t)=>{Up.init(e,t),fE.init(e,t),e.email=n=>e.check(xD(l4,n)),e.url=n=>e.check(LD(c4,n)),e.jwt=n=>e.check(JD(T4,n)),e.emoji=n=>e.check(MD(u4,n)),e.guid=n=>e.check(Wb(i_,n)),e.uuid=n=>e.check(ND(Vc,n)),e.uuidv4=n=>e.check(zD(Vc,n)),e.uuidv6=n=>e.check(jD(Vc,n)),e.uuidv7=n=>e.check(PD(Vc,n)),e.nanoid=n=>e.check(DD(d4,n)),e.guid=n=>e.check(Wb(i_,n)),e.cuid=n=>e.check($D(h4,n)),e.cuid2=n=>e.check(ID(f4,n)),e.ulid=n=>e.check(UD(p4,n)),e.base64=n=>e.check(GD(w4,n)),e.base64url=n=>e.check(KD(S4,n)),e.xid=n=>e.check(BD(m4,n)),e.ksuid=n=>e.check(HD(g4,n)),e.ipv4=n=>e.check(qD(y4,n)),e.ipv6=n=>e.check(VD(v4,n)),e.cidrv4=n=>e.check(ZD(b4,n)),e.cidrv6=n=>e.check(FD(_4,n)),e.e164=n=>e.check(YD(E4,n)),e.datetime=n=>e.check(B$(n)),e.date=n=>e.check(q$(n)),e.time=n=>e.check(Z$(n)),e.duration=n=>
127e.check(G$(n))});function $u(e){return CD(o4,e)}const ot=H("ZodStringFormat",(e,t)=>{it.init(e,t),fE.init(e,t)}),l4=H("ZodEmail",(e,t)=>{PM.init(e,t),ot.init(e,t)}),i_=H("ZodGUID",(e,t)=>{zM.init(e,t),ot.init(e,t)}),Vc=H("ZodUUID",(e,t)=>{jM.init(e,t),ot.init(e,t)}),c4=H("ZodURL",(e,t)=>{LM.init(e,t),ot.init(e,t)}),u4=H("ZodEmoji",(e,t)=>{MM.init(e,t),ot.init(e,t)}),d4=H("ZodNanoID",(e,t)=>{DM.init(e,t),ot.init(e,t)}),h4=H("ZodCUID",(e,t)=>{$M.init(e,t),ot.init(e,t)}),f4=H("ZodCUID2",(e,t)=>{IM.init(e,t),ot.init(e,t)}),p4=H("ZodULID",(e,t)=>{UM.init(e,t),ot.init(e,t)}),m4=H("ZodXID",(e,t)=>{BM.init(e,t),ot.init(e,t)}),g4=H("ZodKSUID",(e,t)=>{HM.init(e,t),ot.init(e,t)}),y4=H("ZodIPv4",(e,t)=>{GM.init(e,t),ot.init(e,t)}),v4=H("ZodIPv6",(e,t)=>{KM.init(e,t),ot.init(e,t)}),b4=H("ZodCIDRv4",(e,t)=>{YM.init(e,t),ot.init(e,t)}),_4=H("ZodCIDRv6",(e,t)=>{JM.init(e,t),ot.init(e,t)}),w4=H("ZodBase64",(e,t)=>{QM.init(e,t),ot.init(e,t)}),S4=H("ZodBase64URL",(e,t)=>{WM.init(e,t),ot.init(e,t)}),E4=H("ZodE164",(e,t)=>{eD.init(e,t),ot.init(e,t)}),T4=H("ZodJWT",(e,t)=>{nD.init(e,t),ot.init(e,t)}),pE=H("ZodNumber",(e,t)=>{DS.init(e,t),et.init(e,t),e._zod.processJSONSchema=(i,o,l)=>ZS(e,i,o),ll(e,"ZodNumber",{gt(i,o){return this.check(t_(i,o))},gte(i,o){return this.check(Pf(i,o))},min(i,o){return this.check(Pf(i,o))},lt(i,o){return this.check(e_(i,o))},lte(i,o){return this.check(jf(i,o))},max(i,o){return this.check(jf(i,o))},int(i){return this.check(a_(i))},safe(i){return this.check(a_(i))},positive(i){return this.check(t_(0,i))},nonnegative(i){return this.check(Pf(0,i))},negative(i){return this.check(e_(0,i))},nonpositive(i){return this.check(jf(0,i))},multipleOf(i,o){return this.check(n_(i,o))},step(i,o){return this.check(n_(i,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function P3(e){return t$(pE,e)}const R4=H("ZodNumberFormat",(e,t)=>{rD.init(e,t),pE.init(e,t)});function a_(e){return n$(R4,e)}const A4=H("ZodBoolean",(e,t)=>{sD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>FS(e,n,i)});function L3(e){return r$(A4,e)}const k4=H("ZodNull",(e,t)=>{iD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>GS(e,n,i)});function M3(e){return s$(k4,e)}const O4=H("ZodUnknown",(e,t)=>{aD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>YS()});function o_(){return i$(O4)}const C4=H("ZodNever",(e,t)=>{oD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>KS(e,n,i)});function mE(e){return a$(C4,e)}const x4=H("ZodArray",(e,t)=>{lD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>eE(e,n,i,o),e.element=t.element,ll(e,"ZodArray",{min(n,i){return this.check(pu(n,i))},nonempty(n){return this.check(pu(1,n))},max(n,i){return this.check(HS(n,i))},length(n,i){return this.check(qS(n,i))},unwrap(){return this.element}})});function N4(e,t){return v$(x4,e,t)}const gE=H("ZodObject",(e,t)=>{uD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>tE(e,n,i,o),Ne(e,"shape",()=>t.shape),ll(e,"ZodObject",{keyof(){return M4(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:o_()})},loose(){return this.clone({...this._zod.def,catchall:o_()})},strict(){return this.clone({...this._zod.def,catchall:mE()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return kL(this,n)},safeExtend(n){return OL(this,n)},merge(n){return CL(this,n)},pick(n){return RL(this,n)},omit(n){return AL(this,n)},partial(...n){return xL(vE,this,n[0])},required(...n){return NL(bE,this,n[0])}})});function Hp(e,t){const n={type:"object",shape:e??{},...ie(t)};return new gE(n)}function D3(e,t){return new gE({type:"object",shape:e,catchall:mE(),...ie(t)})}const yE=H("ZodUnion",(e,t)=>{US.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>
127nE(e,n,i,o),e.options=t.options});function z4(e,t){return new yE({type:"union",options:e,...ie(t)})}const j4=H("ZodDiscriminatedUnion",(e,t)=>{yE.init(e,t),dD.init(e,t)});function $3(e,t,n){return new j4({type:"union",options:t,discriminator:e,...ie(n)})}const P4=H("ZodIntersection",(e,t)=>{hD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>rE(e,n,i,o)});function L4(e,t){return new P4({type:"intersection",left:e,right:t})}const l_=H("ZodRecord",(e,t)=>{fD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>sE(e,n,i,o),e.keyType=t.keyType,e.valueType=t.valueType});function I3(e,t,n){return!t||!t._zod?new l_({type:"record",keyType:$u(),valueType:e,...ie(t)}):new l_({type:"record",keyType:e,valueType:t,...ie(n)})}const hp=H("ZodEnum",(e,t)=>{pD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(i,o,l)=>JS(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const l={};for(const u of i)if(n.has(u))l[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new hp({...t,checks:[],...ie(o),entries:l})},e.exclude=(i,o)=>{const l={...t.entries};for(const u of i)if(n.has(u))delete l[u];else throw new Error(`Key ${u} not found in enum`);return new hp({...t,checks:[],...ie(o),entries:l})}});function M4(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new hp({type:"enum",entries:n,...ie(t)})}const D4=H("ZodLiteral",(e,t)=>{mD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>QS(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
127(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function U3(e,t){return new D4({type:"literal",values:Array.isArray(e)?e:[e],...ie(t)})}const $4=H("ZodTransform",(e,t)=>{gD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>WS(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new SS(e.constructor.name);n.addIssue=l=>{if(typeof l=="string")n.issues.push(nl(l,n.value,t));else{const u=l;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=n.value),u.inst??(u.inst=e),n.issues.push(nl(u))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(l=>(n.value=l,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function I4(e){return new $4({type:"transform",transform:e})}const vE=H("ZodOptional",(e,t)=>{BS.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Bp(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function c_(e){return new vE({type:"optional",innerType:e})}const U4=H("ZodExactOptional",(e,t)=>{yD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>Bp(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function B4(e){return new U4({type:"optional",innerType:e})}const H4=H("ZodNullable",(e,t)=>{vD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>iE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function u_(e){return new H4({type:"nullable",innerType:e})}const q4=H("ZodDefault",(e,t)=>{bD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>oE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function V4(e,t){return new q4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():RS(t)}})}const Z4=H("ZodPrefault",(e,t)=>{_D.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>lE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function F4(e,t){return new Z4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():RS(t)}})}const bE=H("ZodNonOptional",(e,t)=>{wD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>aE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function G4(e,t){return new bE({type:"nonoptional",innerType:e,...ie(t)})}const K4=H("ZodCatch",(e,t)=>{SD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>cE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y4(e,t){return new K4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const J4=H("ZodPipe",(e,t)=>{ED.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>uE(e,n,i,o),e.in=t.in,e.out=t.out});function d_(e,t){return new J4({type:"pipe",in:e,out:t})}const Q4=H("ZodReadonly",(e,t)=>{TD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>dE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function X4(e){return new Q4({type:"readonly",innerType:e})}const W4=H("ZodLazy",(e,t)=>{RD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>hE(e,n,i,o),e.unwrap=()=>e._zod.def.getter()});function B3(e){return new W4({type:"lazy",getter:e})}const qp=H("ZodCustom",(e,t)=>{AD.init(e,t),et.init(e,t),e._zod.processJSONSchema=(n,i,o)=>XS(e,n)});function H3(e,t){return b$(qp,e??(()=>!0),t)}function eI(e,t={}){return _$(qp,e,t)}function tI(e,t){return w$(e,t)}function q3(e,t={}){const n=new qp({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...ie(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}const nI=()=>de(()=>import("./newsletter.confirm-xaDZFiOo.js"),__vite__mapDeps([73,2,5,3,4])),rI=he("/newsletter/confirm")({validateSearch:e=>Hp({token:$u().optional()}).parse(e),head:()=>({meta:[{title:"Confirm subscription"},{name:"robots",content:"noindex"}]}),component:ue(nI,"component")}),sI=()=>de(()=>import("./newsletter.unsubscribe-B4l8pXEI.js"),__vite__mapDeps([74,2,5,3,4])),iI=he("/newsletter/unsubscribe")({validateSearch:e=>Hp({token:$u().optional()}).parse(e),head:()=>({meta:[{title:"Unsubscribe"},{name:"robots",content:"noindex"}]}),component:ue(sI,"component")}),aI=()=>de(()=>import("./order.success-BhLg-UGI.js"),__vite__mapDeps([75,1,2,3,4,5,24])),oI=he("/order/success")({validateSearch:e=>Hp({session_id:$u().optional()}).parse(e),head:()=>
127({meta:[{title:"Thank you · Love Across Borders Publishing"},{name:"robots",content:"noindex"}]}),component:ue(aI,"component")}),lI=()=>de(()=>import("./shop._slug-D-D9Nflg.js"),__vite__mapDeps([76,1,2,3,4,5,6,7,8,9,57,61,24])),cI=he("/shop/$slug")({loader:async({params:e})=>{try{return{product:await AP({data:{slug:e.slug}})}}catch{return{product:null}}},head:({params:e,loaderData:t})=>{const n=t?.product,i=`${Ze}/shop/${e.slug}`;if(!n)return{meta:[{title:"Product not found"},{name:"robots",content:"noindex"},{property:"og:url",content:i}],links:[{rel:"canonical",href:i}]};const o=n.catalog_slug?yS(n.catalog_slug):void 0,l=`${n.title} by ${gr} | ${hn}`,u=l.length>60?`${n.title} by ${gr}`:l,d=(n.short_description??n.long_description??o?.description??`${n.title} from ${hn}.`).slice(0,160),f=n.cover_image_url?mn(n.cover_image_url):null,m=(n.price_cents/100).toFixed(2),y=(n.currency||"USD").toUpperCase(),g=Array.isArray(n.formats)?n.formats.map(R=>String(R).toLowerCase()):[],v=_S(o??null,{hasEpub:g.includes("epub"),hasPdf:g.includes("pdf")||g.length===0,hasAudio:g.includes("audio"),amazonPrintUrl:n.amazon_print_url??null}),_=[vi({logoUrl:"/lovable-uploads/love-across-borders-logo.png"}),ol(),{"@type":"Product","@id":`${i}#product`,name:n.title,description:d,...f?{image:f}:{},url:i,sku:n.slug,category:"Media > Books",brand:{"@type":"Organization",name:hn},offers:{"@type":"Offer",url:i,price:m,priceCurrency:y,priceValidUntil:"2027-12-31",availability:"https://schema.org/InStock",itemCondition:"https://schema.org/NewCondition",seller:{"@type":"Organization",name:hn},shippingDetails:{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:"0",currency:y},shippingDestination:{"@type":"DefinedRegion",addressCountry:"US"},deliveryTime:{"@type":"ShippingDeliveryTime",handlingTime:{"@type":"QuantitativeValue",minValue:0,maxValue:0,unitCode:"d"},transitTime:{"@type":"QuantitativeValue",minValue:0,maxValue:0,unitCode:"d"}}},hasMerchantReturnPolicy:{"@type":"MerchantReturnPolicy",applicableCountry:"US",returnPolicyCategory:"https://schema.org/MerchantReturnFiniteReturnWindow",merchantReturnDays:14,returnMethod:"https://schema.org/ReturnByMail",returnFees:"https://schema.org/FreeReturn"}}},Wn([{name:"Home",url:"/"},{name:"Shop",url:"/shop"},{name:n.title,url:`/shop/${n.slug}`}]),wS(v)];o&&f&&_.push(bS(o,f));const w=An(_);return{meta:[{title:u},{name:"description",content:d},{property:"og:type",content:"product"},{property:"og:title",content:u},{property:"og:description",content:d},{property:"og:url",content:i},{property:"product:price:amount",content:m},{property:"product:price:currency",content:y},...f?[{property:"og:image",content:f},{name:"twitter:image",content:f}]:[],{name:"twitter:title",content:u},{name:"twitter:description",content:d}],links:[{rel:"canonical",href:i}],scripts:[kn(w)]}},component:ue(lI,"component")}),uI=st({method:"GET"}).handler(ft("a8ba46457063b38c3324b6ccb7b2d37470c0f58847cd4290f0b584320a787e46")),dI=st({method:"POST"}).handler(ft("8c57a12216e6f6e1609e025cb4739e1be18fdbca09ddd40c199f59389778f1a4"));st({method:"POST"}).handler(ft("ec96a0fd689753edb910822ba7995bb38d871d499e4e6088164b6ddd8e9590c3"));st({method:"POST"}).middleware([On]).handler(ft("82e3e4787fd194b9b7c7b28701bf50ddaf04787b11f1ca302c93f90ac1ee5295"));st({method:"GET"}).middleware([On]).handler(ft("97ee0988df6d2ebab58b0b48fed0c7c8c19bec42daf323cf0a5a44a74bbe7228"));const hI=()=>de(()=>import("./talkable-books.index-BWsFBPrL.js"),__vite__mapDeps([77,3,4,2,5,21,24,51,50,78])),h_="Talkable Books: ask a book questions and it answers from its own pages",f_="Every Love Across Borders book you can talk with. Ask a question, get an answer drawn only from that book's pages, with the chapter it came from. Five free questions per book.",fI=he("/talkable-books/")({loader:async()=>{try{return{books:await uI()}}catch{return{books:[]}}},head:({loaderData:e})=>{const t=`${Ze}/talkable-books`,n=e?.books??[],i=n.length?{"@type":"ItemList",name:"Talkable Books",itemListElement:n.slice(0,40).map((l,u)=>({"@type":"ListItem",position:u+1,url:`${Ze}/talkable-books/${l.slug}`,name:l.title}))}:null,o=An([Wn([{name:"Home",url:"/"},{name:"Talkable Books",url:"/talkable-books"}]),...i?[i]:[]]);return{meta:[{title:h_},{name:"description",content:f_},{property:"og:title",content:h_},{property:"og:description",content:f_},{property:"og:url",content:t},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:t}],scripts:[kn(o)]}},component:ue(hI,"component")}),pI=()=>de(()=>import("./talkable-books._slug-4PORI24E.js"),__vite__mapDeps([79,26,13,27,18,28,29,30,3,4,2,5,21,24,51,50,78,7])),mI=he("/talkable-books/$slug")({loader:({params:e})=>dI({data:{slug:e.slug}}),head:({loaderData:e,params:t})=>{const n=`${Ze}/talkable-books/${t.slug}`,i=e?.book;if(!i)return{meta:[{title:"Unavailable"},{name:"robots",content:"noindex"}
127]};const o=`Talk to "${i.title}" by ${i.author} | Talkable Books`,l=`Ask "${i.title}" a question and it answers from its own pages, naming the chapter. Five questions free, then $9 to unlock the book forever.`,u=An([Wn([{name:"Home",url:"/"},{name:"Talkable Books",url:"/talkable-books"},{name:i.title,url:`/talkable-books/${i.slug}`}]),{"@type":"Book",name:i.title,author:{"@type":"Person",name:i.author},url:n,...i.cover_url&&/^https?:\/\//i.test(i.cover_url)?{image:i.cover_url}:{}}]),d=[{title:o},{name:"description",content:l},{property:"og:title",content:o},{property:"og:description",content:l},{property:"og:url",content:n},{property:"og:type",content:"book"},{name:"twitter:card",content:"summary_large_image"}];return i.cover_url&&/^https?:\/\//i.test(i.cover_url)&&(d.push({property:"og:image",content:i.cover_url}),d.push({name:"twitter:image",content:i.cover_url})),{meta:d,links:[{rel:"canonical",href:n}],scripts:[kn(u)]}},component:ue(pI,"component")}),gI=()=>de(()=>import("./talkable-books.admin-DndvzwRx.js"),__vite__mapDeps([80,1,2,56,57,58,3])),yI=he("/talkable-books/admin")({head:()=>({meta:[{title:"Talkable Books ingestion"},{name:"robots",content:"noindex"}]}),component:ue(gI,"component")}),vI=()=>de(()=>import("./talkable-books.pricing-DFW6S_u3.js"),__vite__mapDeps([81,3,4,2,5,27])),p_="Talkable Books access: five free questions, $9 a book, or $49 a year",m_="Ask any Talkable Book five questions free. Unlock one book forever for $9, or take the Library Membership at $49 a year for every book, current and forthcoming.",bI=he("/talkable-books/pricing")({head:()=>{const e=`${Ze}/talkable-books/pricing`;return{meta:[{title:p_},{name:"description",content:m_},{property:"og:title",content:p_},{property:"og:description",content:m_},{property:"og:url",content:e},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"}],links:[{rel:"canonical",href:e}],scripts:[kn(An([Wn([{name:"Home",url:"/"},{name:"Talkable Books",url:"/talkable-books"}
127,{name:"Access",url:"/talkable-books/pricing"}])]))]}},component:ue(vI,"component")}),_I=()=>de(()=>import("./twin.admin-CRcF2nQb.js"),__vite__mapDeps([82,1,57,2,83,71,37,38,51,49,72,69,32])),wI=he("/twin/admin")({head:()=>({meta:[{title:"AI Twin · Admin"}]}),beforeLoad:async()=>{const{data:e}=await il.auth.getUser();if(!e.user)throw pn({to:"/auth",search:{mode:"signin",redirect:"/twin/admin"}});if(!(await ju()).isAdmin)throw pn({to:"/"})},component:ue(_I,"component")}),SI=()=>de(()=>import("./twin.talk-eO-Rq8xL.js"),__vite__mapDeps([84,26,13,27,18,28,29,30,1,2,31,83,37,38,32,51])),EI=he("/twin/talk")({head:()=>({meta:[{title:"Talk to the Twin · A private AI voice"},{name:"description",content:"Have a conversation with the AI Twin. Grounded only in source material it has been given."}],links:[{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Manrope:wght@400;500;600&display=swap"}]}),component:ue(SI,"component")}),TI=()=>de(()=>import("./admin.settings-C9NkEjS5.js"),__vite__mapDeps([85,2,1,57,37,38])),RI=he("/_authenticated/admin/settings")({beforeLoad:async()=>{if(!(await ju()).isAdmin)throw pn({to:"/"})},component:ue(TI,"component")}),AI=()=>de(()=>import("./personas.index-DPoEaj0Q.js"),__vite__mapDeps([86,1,2,87,13,48,49,50,51,69,88])),kI=he("/_authenticated/personas/")({head:()=>({meta:[{title:"Your personas · A Life Experience"}]}),component:ue(AI,"component")}),OI=()=>de(()=>import("./personas.new-EIyUEjc7.js"),__vite__mapDeps([89,2,87,13,18,19,28,48,38,50,51])),CI=he("/_authenticated/personas/new")({head:()=>({meta:[{title:"New persona · A Life Experience"}]}),component:ue(OI,"component")}),xI=()=>de(()=>import("./admin.shop.index-Bg1g_sDt.js"),__vite__mapDeps([90,1,2,3])),NI=he("/admin/shop/")({head:()=>({meta:[{title:"Shop admin"},{name:"robots",content:"noindex"}]}),component:ue(xI,"component")}),zI=()=>de(()=>import("./admin.shop._id-1ttXREBX.js"),__vite__mapDeps([91,1,2,54,3,92,37,69])),jI=he("/admin/shop/$id")({head:()=>({meta:[{title:"Edit product"},{name:"robots",content:"noindex"}]}),component:ue(zI,"component")}),PI=()=>de(()=>import("./books.admin.new-VJuEkvCO.js"),__vite__mapDeps([93,57,2,58,92,37,69,38])),LI=he("/books/admin/new")({head:()=>({meta:[{title:"New book · Talkable Books Admin"}]}),component:ue(PI,"component")}),MI=()=>de(()=>import("./books.category._slug-CWMrvm8l.js"),[]),DI=()=>de(()=>import("./books.category._slug-CKyX59n-.js"),__vite__mapDeps([94,3,4,2,5,15,21])),$I=new Set(xp.map(e=>e.key)),II=he("/books/category/$slug")({loader:({params:e})=>{if(!$I.has(e.slug))throw k_();const t=e.slug;return{key:t,books:Uj(t),meta:xp.find(n=>n.key===t)}},head:({params:e,loaderData:t})=>{if(!t)return{meta:[{title:"Category"},{name:"robots",content:"noindex"}]};const n=`${Ze}/books/category/${e.slug}`,i=`${t.meta.label} books by Shaun J Apple | ${hn}`,o=`${t.meta.blurb} Browse ${t.books.length} ${t.meta.label.toLowerCase()} titles from ${hn}.`,l=An([vi({logoUrl:mr.url}),{"@type":"CollectionPage","@id":`${n}#collection`,name:i,url:n,description:o},{"@type":"ItemList",itemListElement:t.books.map((u,d)=>({"@type":"ListItem",position:d+1,url:`${Ze}/books/${u.slug}`,name:u.title}))},Wn([{name:"Home",url:"/"},{name:"Books",url:"/books"},{name:t.meta.label,url:`/books/category/${e.slug}`}])]);return{meta:[{title:i},{name:"description",content:o.slice(0,160)},{property:"og:title",content:i},{property:"og:description",content:o.slice(0,160)},{property:"og:url",content:n},{property:"og:type",content:"website"},{property:"og:image",content:mn(mr.url)},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:mn(mr.url)}],links:[{rel:"canonical",href:n}],scripts:[kn(l)]}},component:ue(DI,"component"),notFoundComponent:ue(MI,"notFoundComponent")}),UI=()=>de(()=>import("./personas._personaId.index-BW7_HXdW.js"),__vite__mapDeps([95,1,2,87,71,13,19,18,28,48,38,88,29,32])),BI=he("/_authenticated/personas/$personaId/")({head:()=>({meta:[{title:"Manage persona · A Life Experience"}]}),component:ue(UI,"component")}),HI=()=>de(()=>import("./books.admin._bookId.edit-CTN6cOdb.js"),__vite__mapDeps([96,1,57,2,58,92,37,69,38,32])),qI=he("/books/admin/$bookId/edit")({head:()=>({meta:[{title:"Edit book · Talkable Books Admin"}]}),component:ue(HI,"component")}),VI=()=>de(()=>import("./books.admin._bookId.ingest-fn2esZCa.js"),__vite__mapDeps([97,1,57,2,58,71,37,38,72,69])),ZI=he("/books/admin/$bookId/ingest")({head:()=>({meta:[{title:"Ingest manuscript · Talkable Books Admin"}]}),component:ue(VI,"component")}),FI=()=>de(()=>import("./personas._personaId.chat.index-BOhitvay.js"),__vite__mapDeps([98,99,30])),GI=he("/_authenticated/personas/$personaId/chat/")({component:ue(FI,"component")}),KI=()=>de(()=>import("./personas._personaId.chat._threadId-BBpJfbWt.js"),__vite__mapDeps([100,
1271,2,26,13,27,18,28,29,30,87,99,38,50,51,32,33])),YI=he("/_authenticated/personas/$personaId/chat/$threadId")({head:()=>({meta:[{title:"Chat · A Life Experience"}]}),component:ue(KI,"component")}),JI=Xj.update({id:"/",path:"/",getParentRoute:()=>Le}),er=eP.update({id:"/_authenticated",getParentRoute:()=>Le}),QI=rP.update({id:"/also-by",path:"/also-by",getParentRoute:()=>Le}),XI=iP.update({id:"/auth",path:"/auth",getParentRoute:()=>Le}),Iu=oP.update({id:"/books",path:"/books",getParentRoute:()=>Le}),WI=cP.update({id:"/bundles",path:"/bundles",getParentRoute:()=>Le}),eU=dP.update({id:"/cart",path:"/cart",getParentRoute:()=>Le}),_E=fP.update({id:"/harm-reduction",path:"/harm-reduction",getParentRoute:()=>Le}),tU=gP.update({id:"/help",path:"/help",getParentRoute:()=>Le}),nU=yP.update({id:"/library",path:"/library",getParentRoute:()=>Le}),rU=bP.update({id:"/pricing",path:"/pricing",getParentRoute:()=>Le}),sU=wP.update({id:"/privacy",path:"/privacy",getParentRoute:()=>Le}),iU=EP.update({id:"/refunds",path:"/refunds",getParentRoute:()=>Le}),wE=OP.update({id:"/shop",path:"/shop",getParentRoute:()=>Le}),aU=xP.update({id:"/support",path:"/support",getParentRoute:()=>Le}),cl=zP.update({id:"/talkable-books",path:"/talkable-books",getParentRoute:()=>Le}),oU=PP.update({id:"/talkable-editions",path:"/talkable-editions",getParentRoute:()=>Le}),lU=MP.update({id:"/terms",path:"/terms",getParentRoute:()=>Le}),Vp=$P.update({id:"/twin",path:"/twin",getParentRoute:()=>Le}),cU=BP.update({id:"/account",path:"/account",getParentRoute:()=>er}),uU=qP.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>er}),dU=ZP.update({id:"/footnotes",path:"/footnotes",getParentRoute:()=>er}),hU=GP.update({id:"/studio",path:"/studio",getParentRoute:()=>er}),fU=YP.update({id:"/account/orders",path:"/account/orders",getParentRoute:()=>Le}),pU=QP.update({id:"/admin/",path:"/admin/",getParentRoute:()=>Le}),mU=WP.update({id:"/admin/orders",path:"/admin/orders",getParentRoute:()=>Le}),gU=tL.update({id:"/admin/reviews",path:"/admin/reviews",getParentRoute:()=>Le}),Zp=rL.update({id:"/admin/shop",path:"/admin/shop",getParentRoute:()=>Le}),yU=iL.update({id:"/admin/support",path:"/admin/support",getParentRoute:()=>Le}),vU=lL.update({id:"/author/shaun-j-apple",path:"/author/shaun-j-apple",getParentRoute:()=>Le}),bU=uL.update({id:"/book/$bookId",path:"/book/$bookId",getParentRoute:()=>Le}),_U=pL.update({id:"/$bookId",path:"/$bookId",getParentRoute:()=>Iu}),Uu=gL.update({id:"/admin",path:"/admin",getParentRoute:()=>Iu}),wU=vL.update({id:"/admin",path:"/admin",getParentRoute:()=>_E}),SU=rI.update({id:"/newsletter/confirm",path:"/newsletter/confirm",getParentRoute:()=>Le}),EU=iI.update({id:"/newsletter/unsubscribe",path:"/newsletter/unsubscribe",getParentRoute:()=>Le}),TU=oI.update({id:"/order/success",path:"/order/success",getParentRoute:()=>Le}),RU=cI.update({id:"/$slug",path:"/$slug",getParentRoute:()=>wE}),AU=fI.update({id:"/",path:"/",getParentRoute:()=>cl}),kU=mI.update({id:"/$slug",path:"/$slug",getParentRoute:()=>cl}),OU=yI.update({id:"/admin",path:"/admin",getParentRoute:()=>cl}),CU=bI.update({id:"/pricing",path:"/pricing",getParentRoute:()=>cl}),xU=wI.update({id:"/admin",path:"/admin",getParentRoute:()=>Vp}),NU=EI.update({id:"/talk",path:"/talk",getParentRoute:()=>Vp}),zU=RI.update({id:"/admin/settings",path:"/admin/settings",getParentRoute:()=>er}),jU=kI.update({id:"/personas/",path:"/personas/",getParentRoute:()=>er}),PU=CI.update({id:"/personas/new",path:"/personas/new",getParentRoute:()=>er}),LU=NI.update({id:"/",path:"/",getParentRoute:()=>Zp}),MU=jI.update({id:"/$id",path:"/$id",getParentRoute:()=>Zp}),DU=LI.update({id:"/new",path:"/new",getParentRoute:()=>Uu}),$U=II.update({id:"/category/$slug",path:"/category/$slug",getParentRoute:()=>Iu}),IU=BI.update({id:"/personas/$personaId/",path:"/personas/$personaId/",getParentRoute:()=>er}),UU=qI.update({id:"/$bookId/edit",path:"/$bookId/edit",getParentRoute:()=>Uu}),BU=ZI.update({id:"/$bookId/ingest",path:"/$bookId/ingest",getParentRoute:()=>Uu}),HU=GI.update({id:"/personas/$personaId/chat/",path:"/personas/$personaId/chat/",getParentRoute:()=>er}),qU=YI.update({id:"/personas/$personaId/chat/$threadId",path:"/pers
127onas/$personaId/chat/$threadId",getParentRoute:()=>er}),VU={AuthenticatedAccountRoute:cU,AuthenticatedDashboardRoute:uU,AuthenticatedFootnotesRoute:dU,AuthenticatedStudioRoute:hU,AuthenticatedAdminSettingsRoute:zU,AuthenticatedPersonasNewRoute:PU,AuthenticatedPersonasIndexRoute:jU,AuthenticatedPersonasPersonaIdIndexRoute:IU,AuthenticatedPersonasPersonaIdChatThreadIdRoute:qU,AuthenticatedPersonasPersonaIdChatIndexRoute:HU},ZU=er._addFileChildren(VU),FU={BooksAdminNewRoute:DU,BooksAdminBookIdEditRoute:UU,BooksAdminBookIdIngestRoute:BU},GU=Uu._addFileChildren(FU),KU={BooksBookIdRoute:_U,BooksAdminRoute:GU,BooksCategorySlugRoute:$U},YU=Iu._addFileChildren(KU),JU={HarmReductionAdminRoute:wU},QU=_E._addFileChildren(JU),XU={ShopSlugRoute:RU},WU=wE._addFileChildren(XU),e3={TalkableBooksSlugRoute:kU,TalkableBooksAdminRoute:OU,TalkableBooksPricingRoute:CU,TalkableBooksIndexRoute:AU},t3=cl._addFileChildren(e3),n3={TwinAdminRoute:xU,TwinTalkRoute:NU},r3=Vp._addFileChildren(n3),s3={AdminShopIdRoute:MU,AdminShopIndexRoute:LU},i3=Zp._addFileChildren(s3),a3={IndexRoute:JI,AuthenticatedRouteRoute:ZU,AlsoByRoute:QI,AuthRoute:XI,BooksRoute:YU,BundlesRoute:WI,CartRoute:eU,HarmReductionRoute:QU,HelpRoute:tU,LibraryRoute:nU,PricingRoute:rU,PrivacyRoute:sU,RefundsRoute:iU,ShopRoute:WU,SupportRoute:aU,TalkableBooksRoute:t3,TalkableEditionsRoute:oU,TermsRoute:lU,TwinRoute:r3,AccountOrdersRoute:fU,AdminOrdersRoute:mU,AdminReviewsRoute:gU,AdminShopRoute:i3,AdminSupportRoute:yU,AuthorShaunJAppleRoute:vU,BookBookIdRoute:bU,NewsletterConfirmRoute:SU,NewsletterUnsubscribeRoute:EU,OrderSuccessRoute:TU,AdminIndexRoute:pU},o3=Le._addFileChildren(a3),l3=()=>{const e=new $z;return KC({routeTree:o3,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function c3(){const e=await l3();let t;if(gb){const n=await gb.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(KO),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await XO(e),e}var u3=c3;async function d3(){const e=await u3();return window.$_TSR?.h(),e}var Lf;function h3(){return Lf||(Lf=d3()),q.jsx(nC,{promise:Lf,children:e=>q.jsx(QC,{router:e})})}te.startTransition(()=>{H1.hydrateRoot(document,q.jsx(te.StrictMode,{children:q.jsx(h3,{})}))});export{_S as $,gr as A,oI as B,xp as C,x3 as D,fI as E,pP as F,k3 as G,II as H,ZI as I,GI as J,eP as K,Oa as L,Ej as M,ht as N,Lw as O,hn as P,bC as Q,iP as R,Nu as S,y3 as T,Wo as U,Lz as V,Kt as W,Qn as X,v3 as Y,pL as Z,w3 as _,xa as a,de as a0,cI as a1,AP as a2,yS as a3,mI as a4,jI as a5,R3 as a6,A3 as a7,z3 as a8,Nj as a9,U3 as aA,L3 as aB,o_ as aC,$3 as aD,N4 as aE,M3 as aF,P3 as aG,D3 as aH,M4 as aI,zw as aJ,_C as aK,D0 as aL,ku as aM,g3 as aN,X as aO,qI as aa,YI as ab,S3 as ac,BI as ad,f3 as ae,g_ as af,Az as ag,bz as ah,ap as ai,dS as aj,yz as ak,vz as al,ip as am,lS as an,zz as ao,Sz as ap,p3 as aq,X$ as ar,j3 as as,z4 as at,$u as au,q3 as av,H3 as aw,B3 as ax,I3 as ay,Hp as az,zu as b,Bj as c,jp as d,C3 as e,E3 as f,TP as g,al as h,qP as i,q as j,O3 as k,mr as l,T3 as m,N3 as n,b3 as o,st as p,ft as q,te as r,il as s,_3 as t,xw as u,On as v,It as w,Yt as x,rI as y,iI as z};
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.