PageSourceSearch

https://endangeredkind.org/assets/index-BBVWzkvr.js

js endangeredkind.org collected 2026-10-08 01:31:10 UTC 722,051 bytes, 484 lines download raw bytes

vendor: 5,692 bytes, lines 1-9
1var Gf=t=>{throw TypeError(t)};var Gc=(t,e,r)=>e.has(t)||Gf("Cannot "+r);var j=(t,e,r)=>(Gc(t,e,"read from private field"),r?r.call(t):e.get(t)),de=(t,e,r)=>e.has(t)?Gf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Y=(t,e,r,n)=>(Gc(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Ze=(t,e,r)=>(Gc(t,e,"access private method"),r);var xo=(t,e,r,n)=>({set _(s){Y(t,e,s,r)},get _(){return j(t,e,n)}});function yb(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function iv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var av={exports:{}},cc={},ov={exports:{}},ie={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var ro=Symbol.for("react.element"),xb=Symbol.for("react.portal"),wb=Symbol.for("react.fragment"),bb=Symbol.for("react.strict_mode"),kb=Symbol.for("react.profiler"),_b=Symbol.for("react.provider"),Sb=Symbol.for("react.context"),Eb=Symbol.for("react.forward_ref"),jb=Symbol.for("react.suspense"),Cb=Symbol.for("react.memo"),Nb=Symbol.for("react.lazy"),Jf=Symbol.iterator;function Tb(t){return t===null||typeof t!="object"?null:(t=Jf&&t[Jf]||t["@@iterator"],typeof t=="function"?t:null)}var lv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cv=Object.assign,uv={};function Ri(t,e,r){this.props=t,this.context=e,this.refs=uv,this.updater=r||lv}Ri.prototype.isReactComponent={};Ri.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Ri.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function dv(){}dv.prototype=Ri.prototype;function yh(t,e,r){this.props=t,this.context=e,this.refs=uv,this.updater=r||lv}var xh=yh.prototype=new dv;xh.constructor=yh;cv(xh,Ri.prototype);xh.isPureReactComponent=!0;var Qf=Array.isArray,hv=Object.prototype.hasOwnProperty,wh={current:null},fv={key:!0,ref:!0,__self:!0,__source:!0};function pv(t,e,r){var n,s={},i=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(i=""+e.key),e)hv.call(e,n)&&!fv.hasOwnProperty(n)&&(s[n]=e[n]);var o=arguments.length-2;if(o===1)s.children=r;else if(1<o){for(var l=Array(o),u=0;u<o;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(n in o=t.defaultProps,o)s[n]===void 0&&(s[n]=o[n]);return{$$typeof:ro,type:t,key:i,ref:a,props:s,_owner:wh.current}}function Rb(t,e){return{$$typeof:ro,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function bh(t){return typeof t=="object"&&t!==null&&t.$$typeof===ro}function Pb(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var Zf=/\/+/g;function Jc(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Pb(""+t.key):e.toString(36)}function tl(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case ro:case xb:a=!0}}if(a)return a=t,s=s(a),t=n===""?"."+Jc(a,0):n,Qf(s)?(r="",t!=null&&(r=t.replace(Zf,"$&/")+"/"),tl(s,e,r,"",function(u){return u})):s!=null&&(bh(s)&&(s=Rb(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Zf,"$&/")+"/")+t)),e.push(s)),1;if(a=0,n=n===""?".":n+":",Qf(t))for(var o=0;o<t.length;o++){i=t[o];var l=n+Jc(i,o);a+=tl(i,e,r,l,s)}else if(l=Tb(t),typeof l=="function")for(t=l.call(t),o=0;!(i=t.next()).done;)i=i.value,l=n+Jc(i,o++),a+=tl(i,e,r,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function wo(t,e,r){if(t==null)return t;var n=[],s=0;return tl(t,n,"","",function(i){return e.call(r,i,s++)}),n}function Ab(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var ct={current:null},rl={transition:null},Ob={ReactCurrentDispatcher:ct,ReactCurrentBatchConfig:rl,ReactCurrentOwner:wh};function mv(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 6,023 bytes, lines 9-25
9ie.Children={map:wo,forEach:function(t,e,r){wo(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return wo(t,function(){e++}),e},toArray:function(t){return wo(t,function(e){return e})||[]},only:function(t){if(!bh(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ie.Component=Ri;ie.Fragment=wb;ie.Profiler=kb;ie.PureComponent=yh;ie.StrictMode=bb;ie.Suspense=jb;ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ob;ie.act=mv;ie.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=cv({},t.props),s=t.key,i=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,a=wh.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(l in e)hv.call(e,l)&&!fv.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&o!==void 0?o[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var u=0;u<l;u++)o[u]=arguments[u+2];n.children=o}return{$$typeof:ro,type:t.type,key:s,ref:i,props:n,_owner:a}};ie.createContext=function(t){return t={$$typeof:Sb,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:_b,_context:t},t.Consumer=t};ie.createElement=pv;ie.createFactory=function(t){var e=pv.bind(null,t);return e.type=t,e};ie.createRef=function(){return{current:null}};ie.forwardRef=function(t){return{$$typeof:Eb,render:t}};ie.isValidElement=bh;ie.lazy=function(t){return{$$typeof:Nb,_payload:{_status:-1,_result:t},_init:Ab}};ie.memo=function(t,e){return{$$typeof:Cb,type:t,compare:e===void 0?null:e}};ie.startTransition=function(t){var e=rl.transition;rl.transition={};try{t()}finally{rl.transition=e}};ie.unstable_act=mv;ie.useCallback=function(t,e){return ct.current.useCallback(t,e)};ie.useContext=function(t){return ct.current.useContext(t)};ie.useDebugValue=function(){};ie.useDeferredValue=function(t){return ct.current.useDeferredValue(t)};ie.useEffect=function(t,e){return ct.current.useEffect(t,e)};ie.useId=function(){return ct.current.useId()};ie.useImperativeHandle=function(t,e,r){return ct.current.useImperativeHandle(t,e,r)};ie.useInsertionEffect=function(t,e){return ct.current.useInsertionEffect(t,e)};ie.useLayoutEffect=function(t,e){return ct.current.useLayoutEffect(t,e)};ie.useMemo=function(t,e){return ct.current.useMemo(t,e)};ie.useReducer=function(t,e,r){return ct.current.useReducer(t,e,r)};ie.useRef=function(t){return ct.current.useRef(t)};ie.useState=function(t){return ct.current.useState(t)};ie.useSyncExternalStore=function(t,e,r){return ct.current.useSyncExternalStore(t,e,r)};ie.useTransition=function(){return ct.current.useTransition()};ie.version="18.3.1";ov.exports=ie;var b=ov.exports;const P=iv(b),kh=yb({__proto__:null,default:P},[b]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Ib=b,Lb=Symbol.for("react.element"),$b=Symbol.for("react.fragment"),Db=Object.prototype.hasOwnProperty,Mb=Ib.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ub={key:!0,ref:!0,__self:!0,__source:!0};function gv(t,e,r){var n,s={},i=null,a=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(n in e)Db.call(e,n)&&!Ub.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:Lb,type:t,key:i,ref:a,props:s,_owner:Mb.current}}cc.Fragment=$b;cc.jsx=gv;cc.jsxs=gv;av.exports=cc;var c=av.exports,vv={exports:{}},Tt={},yv={exports:{}},xv={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(C,N){var M=C.length;C.push(N);e:for(;0<M;){var X=M-1>>>1,H=C[X];if(0<s(H,N))C[X]=N,C[M]=H,M=X;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var N=C[0],M=C.pop();if(M!==N){C[0]=M;e:for(var X=0,H=C.length,se=H>>>1;X<se;){var ae=2*(X+1)-1,Ie=C[ae],Qe=ae+1,pe=C[Qe];if(0>s(Ie,M))Qe<H&&0>s(pe,Ie)?(C[X]=pe,C[Qe]=M,X=Qe):(C[X]=Ie,C[ae]=M,X=ae);else if(Qe<H&&0>s(pe,M))C[X]=pe,C[Qe]=M,X=Qe;else break e}}return N}function s(C,N){var M=C.sortIndex-N.sortIndex;return M!==0?M:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var l=[],u=[],d=1,h=null,p=3,f=!1,y=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(C){for(var N=r(u);N!==null;){if(N.callback===null)n(u);else if(N.startTime<=C)n(u),N.sortIndex=N.expirationTime,e(l,N);else break;N=r(u)}}function k(C){if(m=!1,x(C),!y)if(r(l)!==null)y=!0,K(_);else{var N=r(u);N!==null&&ee(k,N.startTime-C)}}function _(C,N){y=!1,m&&(m=!1,v(T),T=-1),f=!0;var M=p;try{for(x(N),h=r(l);h!==null&&(!(h.expirationTime>N)||C&&!q());){var X=h.callback;if(typeof X=="function"){h.callback=null,p=h.priorityLevel;var H=X(h.expirationTime<=N);N=t.unstable_now(),typeof H=="function"?h.callback=H:h===r(l)&&n(l),x(N)}else n(l);h=r(l)}if(h!==null)var se=!0;else{var ae=r(u);ae!==null&&ee(k,ae.startTime-N),se=!1}return se}finally{h=null,p=M,f=!1}}var S=!1,E=null,T=-1,O=5,I=-1;function q(){return!(t.unstable_now()-I<O)}function F(){if(E!==null){var C=t.unstable_now();I=C;var N=!0;try{N=E(!0,C)}finally{N?re():(S=!1,E=null)}}else S=!1}var re;if(typeof g=="function")re=function(){g(F)};
vendor: 8,639 bytes, lines 25-34
25else if(typeof MessageChannel<"u"){var $=new MessageChannel,oe=$.port2;$.port1.onmessage=F,re=function(){oe.postMessage(null)}}else re=function(){w(F,0)};function K(C){E=C,S||(S=!0,re())}function ee(C,N){T=w(function(){C(t.unstable_now())},N)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(C){C.callback=null},t.unstable_continueExecution=function(){y||f||(y=!0,K(_))},t.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<C?Math.floor(1e3/C):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(C){switch(p){case 1:case 2:case 3:var N=3;break;default:N=p}var M=p;p=N;try{return C()}finally{p=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(C,N){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=p;p=C;try{return N()}finally{p=M}},t.unstable_scheduleCallback=function(C,N,M){var X=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?X+M:X):M=X,C){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=M+H,C={id:d++,callback:N,priorityLevel:C,startTime:M,expirationTime:H,sortIndex:-1},M>X?(C.sortIndex=M,e(u,C),r(l)===null&&C===r(u)&&(m?(v(T),T=-1):m=!0,ee(k,M-X))):(C.sortIndex=H,e(l,C),y||f||(y=!0,K(_))),C},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(C){var N=p;return function(){var M=p;p=N;try{return C.apply(this,arguments)}finally{p=M}}}})(xv);yv.exports=xv;var Fb=yv.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var zb=b,Et=Fb;function R(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wv=new Set,xa={};function ms(t,e){gi(t,e),gi(t+"Capture",e)}function gi(t,e){for(xa[t]=e,t=0;t<e.length;t++)wv.add(e[t])}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=Object.prototype.hasOwnProperty,Bb=/^[: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]*$/,Yf={},Xf={};function Wb(t){return Hu.call(Xf,t)?!0:Hu.call(Yf,t)?!1:Bb.test(t)?Xf[t]=!0:(Yf[t]=!0,!1)}function Hb(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Vb(t,e,r,n){if(e===null||typeof e>"u"||Hb(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ut(t,e,r,n,s,i,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}var Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ge[t]=new ut(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ge[e]=new ut(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ge[t]=new ut(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ge[t]=new ut(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ge[t]=new ut(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ge[t]=new ut(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ge[t]=new ut(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ge[t]=new ut(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ge[t]=new ut(t,5,!1,t.toLowerCase(),null,!1,!1)});var _h=/[\-:]([a-z])/g;function Sh(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(_h,Sh);Ge[e]=new ut(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_h,Sh);Ge[e]=new ut(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_h,Sh);Ge[e]=new ut(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ge[t]=new ut(t,1,!1,t.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new ut("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ge[t]=new ut(t,1,!1,t.toLowerCase(),null,!0,!0)});function Eh(t,e,r,n){var s=Ge.hasOwnProperty(e)?Ge[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(Vb(e,r,s,n)&&(r=null),n||s===null?Wb(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Wr=zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,bo=Symbol.for("react.element"),Us=Symbol.for("react.portal"),Fs=Symbol.for("react.fragment"),jh=Symbol.for("react.strict_mode"),Vu=Symbol.for("react.profiler"),bv=Symbol.for("react.provider"),kv=Symbol.for("react.context"),Ch=Symbol.for("react.forward_ref"),qu=Symbol.for("react.suspense"),Ku=Symbol.for("react.suspense_list"),Nh=Symbol.for("react.memo"),rn=Symbol.for("react.lazy"),_v=Symbol.for("react.offscreen"),ep=Symbol.iterator;function Bi(t){return t===null||typeof t!="object"?null:(t=ep&&t[ep]||t["@@iterator"],typeof t=="function"?t:null)}var Ce=Object.assign,Qc;function Xi(t){if(Qc===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Qc=e&&e[1]||""}return`
34`+Qc+t}var Zc=!1;function Yc(t,e){if(!t||Zc)return"";Zc=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}
vendor: 16,737 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=n.stack.split(`
36`),a=s.length-1,o=i.length-1;1<=a&&0<=o&&s[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==i[o]){var l=`
37`+s[a].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=a&&0<=o);break}}}finally{Zc=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Xi(t):""}function qb(t){switch(t.tag){case 5:return Xi(t.type);case 16:return Xi("Lazy");case 13:return Xi("Suspense");case 19:return Xi("SuspenseList");case 0:case 2:case 15:return t=Yc(t.type,!1),t;case 11:return t=Yc(t.type.render,!1),t;case 1:return t=Yc(t.type,!0),t;default:return""}}function Gu(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Fs:return"Fragment";case Us:return"Portal";case Vu:return"Profiler";case jh:return"StrictMode";case qu:return"Suspense";case Ku:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case kv:return(t.displayName||"Context")+".Consumer";case bv:return(t._context.displayName||"Context")+".Provider";case Ch:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Nh:return e=t.displayName||null,e!==null?e:Gu(t.type)||"Memo";case rn:e=t._payload,t=t._init;try{return Gu(t(e))}catch{}}return null}function Kb(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gu(e);case 8:return e===jh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Tn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Sv(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Gb(t){var e=Sv(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ko(t){t._valueTracker||(t._valueTracker=Gb(t))}function Ev(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Sv(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function xl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Ju(t,e){var r=e.checked;return Ce({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function tp(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Tn(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function jv(t,e){e=e.checked,e!=null&&Eh(t,"checked",e,!1)}function Qu(t,e){jv(t,e);var r=Tn(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Zu(t,e.type,r):e.hasOwnProperty("defaultValue")&&Zu(t,e.type,Tn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function rp(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Zu(t,e,r){(e!=="number"||xl(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var ea=Array.isArray;function Ys(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Tn(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Yu(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(R(91));return Ce({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function np(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(R(92));if(ea(r)){if(1<r.length)throw Error(R(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Tn(r)}}function Cv(t,e){var r=Tn(e.value),n=Tn(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function sp(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Nv(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Xu(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Nv(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var _o,Tv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(_o=_o||document.createElement("div"),_o.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=_o.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function wa(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var aa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jb=["Webkit","ms","Moz","O"];Object.keys(aa).forEach(function(t){Jb.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),aa[e]=aa[t]})});function Rv(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||aa.hasOwnProperty(t)&&aa[t]?(""+e).trim():e+"px"}function Pv(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Rv(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var Qb=Ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ed(t,e){if(e){if(Qb[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(R(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(R(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(R(61))}if(e.style!=null&&typeof e.style!="object")throw Error(R(62))}}function td(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 rd=null;function Th(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var nd=null,Xs=null,ei=null;function ip(t){if(t=io(t)){if(typeof nd!="function")throw Error(R(280));var e=t.stateNode;e&&(e=pc(e),nd(t.stateNode,t.type,e))}}function Av(t){Xs?ei?ei.push(t):ei=[t]:Xs=t}function Ov(){if(Xs){var t=Xs,e=ei;if(ei=Xs=null,ip(t),e)for(t=0;t<e.length;t++)ip(e[t])}}function Iv(t,e){return t(e)}function Lv(){}var Xc=!1;function $v(t,e,r){if(Xc)return t(e,r);Xc=!0;try{return Iv(t,e,r)}finally{Xc=!1,(Xs!==null||ei!==null)&&(Lv(),Ov())}}function ba(t,e){var r=t.stateNode;if(r===null)return null;var n=pc(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(R(231,e,typeof r));return r}var sd=!1;if(Lr)try{var Wi={};Object.defineProperty(Wi,"passive",{get:function(){sd=!0}}),window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{sd=!1}function Zb(t,e,r,n,s,i,a,o,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(d){this.onError(d)}}var oa=!1,wl=null,bl=!1,id=null,Yb={onError:function(t){oa=!0,wl=t}};function Xb(t,e,r,n,s,i,a,o,l){oa=!1,wl=null,Zb.apply(Yb,arguments)}function ek(t,e,r,n,s,i,a,o,l){if(Xb.apply(this,arguments),oa){if(oa){var u=wl;oa=!1,wl=null}else throw Error(R(198));bl||(bl=!0,id=u)}}function gs(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function Dv(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function ap(t){if(gs(t)!==t)throw Error(R(188))}function tk(t){var e=t.alternate;if(!e){if(e=gs(t),e===null)throw Error(R(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return ap(s),t;if(i===n)return ap(s),e;i=i.sibling}throw Error(R(188))}if(r.return!==n.return)r=s,n=i;else{for(var a=!1,o=s.child;o;){if(o===r){a=!0,r=s,n=i;break}if(o===n){a=!0,n=s,r=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===r){a=!0,r=i,n=s;break}if(o===n){a=!0,n=i,r=s;break}o=o.sibling}if(!a)throw Error(R(189))}}if(r.alternate!==n)throw Error(R(190))}if(r.tag!==3)throw Error(R(188));return r.stateNode.current===r?t:e}function Mv(t){return t=tk(t),t!==null?Uv(t):null}function Uv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Uv(t);if(e!==null)return e;t=t.sibling}return null}var Fv=Et.unstable_scheduleCallback,op=Et.unstable_cancelCallback,rk=Et.unstable_shouldYield,nk=Et.unstable_requestPaint,Ae=Et.unstable_now,sk=Et.unstable_getCurrentPriorityLevel,Rh=Et.unstable_ImmediatePriority,zv=Et.unstable_UserBlockingPriority,kl=Et.unstable_NormalPriority,ik=Et.unstable_LowPriority,Bv=Et.unstable_IdlePriority,uc=null,yr=null;function ak(t){if(yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(uc,t,void 0,(t.current.flags&128)===128)}catch{}}var tr=Math.clz32?Math.clz32:ck,ok=Math.log,lk=Math.LN2;function ck(t){return t>>>=0,t===0?32:31-(ok(t)/lk|0)|0}var So=64,Eo=4194304;function ta(t){switch(t&-t){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function _l(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,a=r&268435455;if(a!==0){var o=a&~s;o!==0?n=ta(o):(i&=a,i!==0&&(n=ta(i)))}else a=r&~s,a!==0?n=ta(a):i!==0&&(n=ta(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-tr(e),s=1<<r,n|=t[r],e&=~s;return n}function uk(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dk(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var a=31-tr(i),o=1<<a,l=s[a];l===-1?(!(o&r)||o&n)&&(s[a]=uk(o,e)):l<=e&&(t.expiredLanes|=o),i&=~o}}function ad(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Wv(){var t=So;return So<<=1,!(So&4194240)&&(So=64),t}function eu(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function no(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-tr(e),t[e]=r}function hk(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-tr(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function Ph(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-tr(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var me=0;function Hv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Vv,Ah,qv,Kv,Gv,od=!1,jo=[],xn=null,wn=null,bn=null,ka=new Map,_a=new Map,an=[],fk="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 submit".split(" ");function lp(t,e){switch(t){case"focusin":case"focusout":xn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":ka.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":_a.delete(e.pointerId)}}function Hi(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=io(e),e!==null&&Ah(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function pk(t,e,r,n,s){switch(e){case"focusin":return xn=Hi(xn,t,e,r,n,s),!0;case"dragenter":return wn=Hi(wn,t,e,r,n,s),!0;case"mouseover":return bn=Hi(bn,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return ka.set(i,Hi(ka.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,_a.set(i,Hi(_a.get(i)||null,t,e,r,n,s)),!0}return!1}function Jv(t){var e=Jn(t.target);if(e!==null){var r=gs(e);if(r!==null){if(e=r.tag,e===13){if(e=Dv(r),e!==null){t.blockedOn=e,Gv(t.priority,function(){qv(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function nl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=ld(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);rd=n,r.target.dispatchEvent(n),rd=null}else return e=io(r),e!==null&&Ah(e),t.blockedOn=r,!1;e.shift()}return!0}function cp(t,e,r){nl(t)&&r.delete(e)}function mk(){od=!1,xn!==null&&nl(xn)&&(xn=null),wn!==null&&nl(wn)&&(wn=null),bn!==null&&nl(bn)&&(bn=null),ka.forEac
vendor: 8,758 bytes, line 37
37h(cp),_a.forEach(cp)}function Vi(t,e){t.blockedOn===e&&(t.blockedOn=null,od||(od=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,mk)))}function Sa(t){function e(s){return Vi(s,t)}if(0<jo.length){Vi(jo[0],t);for(var r=1;r<jo.length;r++){var n=jo[r];n.blockedOn===t&&(n.blockedOn=null)}}for(xn!==null&&Vi(xn,t),wn!==null&&Vi(wn,t),bn!==null&&Vi(bn,t),ka.forEach(e),_a.forEach(e),r=0;r<an.length;r++)n=an[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<an.length&&(r=an[0],r.blockedOn===null);)Jv(r),r.blockedOn===null&&an.shift()}var ti=Wr.ReactCurrentBatchConfig,Sl=!0;function gk(t,e,r,n){var s=me,i=ti.transition;ti.transition=null;try{me=1,Oh(t,e,r,n)}finally{me=s,ti.transition=i}}function vk(t,e,r,n){var s=me,i=ti.transition;ti.transition=null;try{me=4,Oh(t,e,r,n)}finally{me=s,ti.transition=i}}function Oh(t,e,r,n){if(Sl){var s=ld(t,e,r,n);if(s===null)uu(t,e,n,El,r),lp(t,n);else if(pk(s,t,e,r,n))n.stopPropagation();else if(lp(t,n),e&4&&-1<fk.indexOf(t)){for(;s!==null;){var i=io(s);if(i!==null&&Vv(i),i=ld(t,e,r,n),i===null&&uu(t,e,n,El,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else uu(t,e,n,null,r)}}var El=null;function ld(t,e,r,n){if(El=null,t=Th(n),t=Jn(t),t!==null)if(e=gs(t),e===null)t=null;else if(r=e.tag,r===13){if(t=Dv(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return El=t,null}function Qv(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sk()){case Rh:return 1;case zv:return 4;case kl:case ik:return 16;case Bv:return 536870912;default:return 16}default:return 16}}var mn=null,Ih=null,sl=null;function Zv(){if(sl)return sl;var t,e=Ih,r=e.length,n,s="value"in mn?mn.value:mn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var a=r-t;for(n=1;n<=a&&e[r-n]===s[i-n];n++);return sl=s.slice(t,1<n?1-n:void 0)}function il(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Co(){return!0}function up(){return!1}function Rt(t){function e(r,n,s,i,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(r=t[o],this[o]=r?r(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Co:up,this.isPropagationStopped=up,this}return Ce(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),e}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lh=Rt(Pi),so=Ce({},Pi,{view:0,detail:0}),yk=Rt(so),tu,ru,qi,dc=Ce({},so,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$h,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==qi&&(qi&&t.type==="mousemove"?(tu=t.screenX-qi.screenX,ru=t.screenY-qi.screenY):ru=tu=0,qi=t),tu)},movementY:function(t){return"movementY"in t?t.movementY:ru}}),dp=Rt(dc),xk=Ce({},dc,{dataTransfer:0}),wk=Rt(xk),bk=Ce({},so,{relatedTarget:0}),nu=Rt(bk),kk=Ce({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),_k=Rt(kk),Sk=Ce({},Pi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ek=Rt(Sk),jk=Ce({},Pi,{data:0}),hp=Rt(jk),Ck={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nk={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"},Tk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rk(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Tk[t])?!!e[t]:!1}function $h(){return Rk}var Pk=Ce({},so,{key:function(t){if(t.key){var e=Ck[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=il(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Nk[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$h,charCode:function(t){return t.type==="keypress"?il(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?il(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Ak=Rt(Pk),Ok=Ce({},dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fp=Rt(Ok),Ik=Ce({},so,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$h}),Lk=Rt(Ik),$k=Ce({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dk=Rt($k),Mk=Ce({},dc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Uk=Rt(Mk),Fk=[9,13,27,32],Dh=Lr&&"CompositionEvent"in window,la=null;Lr&&"documentMode"in document&&(la=document.documentMode);var zk=Lr&&"TextEvent"in window&&!la,Yv=Lr&&(!Dh||la&&8<la&&11>=la),pp=" ",mp=!1;function Xv(t,e){switch(t){case"keyup":return Fk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ey(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var zs=!1;function Bk(t,e){switch(t){case"compositionend":return ey(e);case"keypress":return e.which!==32?null:(mp=!0,pp);case"textInput":return t=e.data,t===pp&&mp?null:t;default:return null}}function Wk(t,e){if(zs)return t==="compositionend"||!Dh&&Xv(t,e)?(t=Zv(),sl=Ih=mn=null,zs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Yv&&e.locale!=="ko"?null:e.data;default:return null}}var Hk={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 gp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Hk[t.type]:e==="textarea"}function ty(t,e,r,n){Av(n),e=jl(e,"onChange"),0<e.length&&(r=new Lh("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var ca=null,Ea=null;function Vk(t){hy(t,0)}function hc(t){var e=Hs(t);if(Ev(e))return t}function qk(t,e){if(t==="change")return e}var ry=!1;if(Lr){var su;if(Lr){var iu="oninput"in document;if(!iu){var vp=document.createElement("div");vp.setAttribute("oninput","return;"),iu=typeof vp.oninput=="function"}su=iu}else su=!1;ry=su&&(!document.documentMode||9<document.documentMode)}function yp(){ca&&(ca.detachEvent("onpropertychange",ny),Ea=ca=null)}
vendor: 5,341 bytes, line 37
37function ny(t){if(t.propertyName==="value"&&hc(Ea)){var e=[];ty(e,Ea,t,Th(t)),$v(Vk,e)}}function Kk(t,e,r){t==="focusin"?(yp(),ca=e,Ea=r,ca.attachEvent("onpropertychange",ny)):t==="focusout"&&yp()}function Gk(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return hc(Ea)}function Jk(t,e){if(t==="click")return hc(e)}function Qk(t,e){if(t==="input"||t==="change")return hc(e)}function Zk(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var sr=typeof Object.is=="function"?Object.is:Zk;function ja(t,e){if(sr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Hu.call(e,s)||!sr(t[s],e[s]))return!1}return!0}function xp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function wp(t,e){var r=xp(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=xp(r)}}function sy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?sy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function iy(){for(var t=window,e=xl();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=xl(t.document)}return e}function Mh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Yk(t){var e=iy(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&sy(r.ownerDocument.documentElement,r)){if(n!==null&&Mh(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=wp(r,i);var a=wp(r,n);s&&a&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Xk=Lr&&"documentMode"in document&&11>=document.documentMode,Bs=null,cd=null,ua=null,ud=!1;function bp(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ud||Bs==null||Bs!==xl(n)||(n=Bs,"selectionStart"in n&&Mh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ua&&ja(ua,n)||(ua=n,n=jl(cd,"onSelect"),0<n.length&&(e=new Lh("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Bs)))}function No(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Ws={animationend:No("Animation","AnimationEnd"),animationiteration:No("Animation","AnimationIteration"),animationstart:No("Animation","AnimationStart"),transitionend:No("Transition","TransitionEnd")},au={},ay={};Lr&&(ay=document.createElement("div").style,"AnimationEvent"in window||(delete Ws.animationend.animation,delete Ws.animationiteration.animation,delete Ws.animationstart.animation),"TransitionEvent"in window||delete Ws.transitionend.transition);function fc(t){if(au[t])return au[t];if(!Ws[t])return t;var e=Ws[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in ay)return au[t]=e[r];return t}var oy=fc("animationend"),ly=fc("animationiteration"),cy=fc("animationstart"),uy=fc("transitionend"),dy=new Map,kp="abort auxClick 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(" ");function Dn(t,e){dy.set(t,e),ms(e,[t])}for(var ou=0;ou<kp.length;ou++){var lu=kp[ou],e1=lu.toLowerCase(),t1=lu[0].toUpperCase()+lu.slice(1);Dn(e1,"on"+t1)}Dn(oy,"onAnimationEnd");Dn(ly,"onAnimationIteration");Dn(cy,"onAnimationStart");Dn("dblclick","onDoubleClick");Dn("focusin","onFocus");Dn("focusout","onBlur");Dn(uy,"onTransitionEnd");gi("onMouseEnter",["mouseout","mouseover"]);gi("onMouseLeave",["mouseout","mouseover"]);gi("onPointerEnter",["pointerout","pointerover"]);gi("onPointerLeave",["pointerout","pointerover"]);ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,770 bytes, line 37
37ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ra="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(" "),r1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ra));function _p(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,ek(n,e,void 0,t),t.currentTarget=null}function hy(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var a=n.length-1;0<=a;a--){var o=n[a],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==i&&s.isPropagationStopped())break e;_p(s,o,u),i=l}else for(a=0;a<n.length;a++){if(o=n[a],l=o.instance,u=o.currentTarget,o=o.listener,l!==i&&s.isPropagationStopped())break e;_p(s,o,u),i=l}}}if(bl)throw t=id,bl=!1,id=null,t}function we(t,e){var r=e[md];r===void 0&&(r=e[md]=new Set);var n=t+"__bubble";r.has(n)||(fy(e,t,2,!1),r.add(n))}function cu(t,e,r){var n=0;e&&(n|=4),fy(r,t,n,e)}var To="_reactListening"+Math.random().toString(36).slice(2);function Ca(t){if(!t[To]){t[To]=!0,wv.forEach(function(r){r!=="selectionchange"&&(r1.has(r)||cu(r,!1,t),cu(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[To]||(e[To]=!0,cu("selectionchange",!1,e))}}function fy(t,e,r,n){switch(Qv(e)){case 1:var s=gk;break;case 4:s=vk;break;default:s=Oh}r=s.bind(null,e,r,t),s=void 0,!sd||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function uu(t,e,r,n,s){var i=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;a=a.return}for(;o!==null;){if(a=Jn(o),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}o=o.parentNode}}n=n.return}$v(function(){var u=i,d=Th(r),h=[];e:{var p=dy.get(t);if(p!==void 0){var f=Lh,y=t;switch(t){case"keypress":if(il(r)===0)break e;case"keydown":case"keyup":f=Ak;break;case"focusin":y="focus",f=nu;break;case"focusout":y="blur",f=nu;break;case"beforeblur":case"afterblur":f=nu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=dp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=wk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Lk;break;case oy:case ly:case cy:f=_k;break;case uy:f=Dk;break;case"scroll":f=yk;break;case"wheel":f=Uk;break;case"copy":case"cut":case"paste":f=Ek;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=fp}var m=(e&4)!==0,w=!m&&t==="scroll",v=m?p!==null?p+"Capture":null:p;m=[];for(var g=u,x;g!==null;){x=g;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,v!==null&&(k=ba(g,v),k!=null&&m.push(Na(g,k,x)))),w)break;g=g.return}0<m.length&&(p=new f(p,y,null,r,d),h.push({event:p,listeners:m}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",p&&r!==rd&&(y=r.relatedTarget||r.fromElement)&&(Jn(y)||y[$r]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(y=r.relatedTarget||r.toElement,f=u,y=y?Jn(y):null,y!==null&&(w=gs(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(f=null,y=u),f!==y)){if(m=dp,k="onMouseLeave",v="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(m=fp,k="onPointerLeave",v="onPointerEnter",g="pointer"),w=f==null?p:Hs(f),x=y==null?p:Hs(y),p=new m(k,g+"leave",f,r,d),p.target=w,p.relatedTarget=x,k=null,Jn(d)===u&&(m=new m(v,g+"enter",y,r,d),m.target=x,m.relatedTarget=w,k=m),w=k,f&&y)t:{for(m=f,v=y,g=0,x=m;x;x=Es(x))g++;for(x=0,k=v;k;k=Es(k))x++;for(;0<g-x;)m=Es(m),g--;for(;0<x-g;)v=Es(v),x--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Es(m),v=Es(v)}m=null}else m=null;f!==null&&Sp(h,p,f,m,!1),y!==null&&w!==null&&Sp(h,w,y,m,!0)}}
vendor: 4,864 bytes, lines 37-38
37e:{if(p=u?Hs(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var _=qk;else if(gp(p))if(ry)_=Qk;else{_=Gk;var S=Kk}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=Jk);if(_&&(_=_(t,u))){ty(h,_,r,d);break e}S&&S(t,p,u),t==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Zu(p,"number",p.value)}switch(S=u?Hs(u):window,t){case"focusin":(gp(S)||S.contentEditable==="true")&&(Bs=S,cd=u,ua=null);break;case"focusout":ua=cd=Bs=null;break;case"mousedown":ud=!0;break;case"contextmenu":case"mouseup":case"dragend":ud=!1,bp(h,r,d);break;case"selectionchange":if(Xk)break;case"keydown":case"keyup":bp(h,r,d)}var E;if(Dh)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else zs?Xv(t,r)&&(T="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(Yv&&r.locale!=="ko"&&(zs||T!=="onCompositionStart"?T==="onCompositionEnd"&&zs&&(E=Zv()):(mn=d,Ih="value"in mn?mn.value:mn.textContent,zs=!0)),S=jl(u,T),0<S.length&&(T=new hp(T,t,null,r,d),h.push({event:T,listeners:S}),E?T.data=E:(E=ey(r),E!==null&&(T.data=E)))),(E=zk?Bk(t,r):Wk(t,r))&&(u=jl(u,"onBeforeInput"),0<u.length&&(d=new hp("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=E))}hy(h,e)})}function Na(t,e,r){return{instance:t,listener:e,currentTarget:r}}function jl(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ba(t,r),i!=null&&n.unshift(Na(t,i,s)),i=ba(t,e),i!=null&&n.push(Na(t,i,s))),t=t.return}return n}function Es(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Sp(t,e,r,n,s){for(var i=e._reactName,a=[];r!==null&&r!==n;){var o=r,l=o.alternate,u=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&u!==null&&(o=u,s?(l=ba(r,i),l!=null&&a.unshift(Na(r,l,o))):s||(l=ba(r,i),l!=null&&a.push(Na(r,l,o)))),r=r.return}a.length!==0&&t.push({event:e,listeners:a})}var n1=/\r\n?/g,s1=/\u0000|\uFFFD/g;function Ep(t){return(typeof t=="string"?t:""+t).replace(n1,`
38`).replace(s1,"")}function Ro(t,e,r){if(e=Ep(e),Ep(t)!==e&&r)throw Error(R(425))}function Cl(){}var dd=null,hd=null;function fd(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var pd=typeof setTimeout=="function"?setTimeout:void 0,i1=typeof clearTimeout=="function"?clearTimeout:void 0,jp=typeof Promise=="function"?Promise:void 0,a1=typeof queueMicrotask=="function"?queueMicrotask:typeof jp<"u"?function(t){return jp.resolve(null).then(t).catch(o1)}:pd;function o1(t){setTimeout(function(){throw t})}function du(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),Sa(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Sa(e)}function kn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Cp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),gr="__reactFiber$"+Ai,Ta="__reactProps$"+Ai,$r="__reactContainer$"+Ai,md="__reactEvents$"+Ai,l1="__reactListeners$"+Ai,c1="__reactHandles$"+Ai;function Jn(t){var e=t[gr];if(e)return e;for(var r=t.parentNode;r;){if(e=r[$r]||r[gr]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Cp(t);t!==null;){if(r=t[gr])return r;t=Cp(t)}return e}t=r,r=t.parentNode}return null}function io(t){return t=t[gr]||t[$r],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Hs(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(R(33))}function pc(t){return t[Ta]||null}var gd=[],Vs=-1;function Mn(t){return{current:t}}function be(t){0>Vs||(t.current=gd[Vs],gd[Vs]=null,Vs--)}function ye(t,e){Vs++,gd[Vs]=t.current,t.current=e}var Rn={},nt=Mn(Rn),gt=Mn(!1),os=Rn;function vi(t,e){var r=t.type.contextTypes;if(!r)return Rn;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function vt(t){return t=t.childContextTypes,t!=null}function Nl(){be(gt),be(nt)}function Np(t,e,r){if(nt.current!==Rn)throw Error(R(168));ye(nt,e),ye(gt,r)}function py(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();
vendor: 15,226 bytes, line 38
38for(var s in n)if(!(s in e))throw Error(R(108,Kb(t)||"Unknown",s));return Ce({},r,n)}function Tl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Rn,os=nt.current,ye(nt,t),ye(gt,gt.current),!0}function Tp(t,e,r){var n=t.stateNode;if(!n)throw Error(R(169));r?(t=py(t,e,os),n.__reactInternalMemoizedMergedChildContext=t,be(gt),be(nt),ye(nt,t)):be(gt),ye(gt,r)}var Rr=null,mc=!1,hu=!1;function my(t){Rr===null?Rr=[t]:Rr.push(t)}function u1(t){mc=!0,my(t)}function Un(){if(!hu&&Rr!==null){hu=!0;var t=0,e=me;try{var r=Rr;for(me=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Rr=null,mc=!1}catch(s){throw Rr!==null&&(Rr=Rr.slice(t+1)),Fv(Rh,Un),s}finally{me=e,hu=!1}}return null}var qs=[],Ks=0,Rl=null,Pl=0,It=[],Lt=0,ls=null,Ar=1,Or="";function qn(t,e){qs[Ks++]=Pl,qs[Ks++]=Rl,Rl=t,Pl=e}function gy(t,e,r){It[Lt++]=Ar,It[Lt++]=Or,It[Lt++]=ls,ls=t;var n=Ar;t=Or;var s=32-tr(n)-1;n&=~(1<<s),r+=1;var i=32-tr(e)+s;if(30<i){var a=s-s%5;i=(n&(1<<a)-1).toString(32),n>>=a,s-=a,Ar=1<<32-tr(e)+s|r<<s|n,Or=i+t}else Ar=1<<i|r<<s|n,Or=t}function Uh(t){t.return!==null&&(qn(t,1),gy(t,1,0))}function Fh(t){for(;t===Rl;)Rl=qs[--Ks],qs[Ks]=null,Pl=qs[--Ks],qs[Ks]=null;for(;t===ls;)ls=It[--Lt],It[Lt]=null,Or=It[--Lt],It[Lt]=null,Ar=It[--Lt],It[Lt]=null}var _t=null,kt=null,_e=!1,Xt=null;function vy(t,e){var r=$t(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Rp(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,_t=t,kt=kn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,_t=t,kt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=ls!==null?{id:Ar,overflow:Or}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=$t(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,_t=t,kt=null,!0):!1;default:return!1}}function vd(t){return(t.mode&1)!==0&&(t.flags&128)===0}function yd(t){if(_e){var e=kt;if(e){var r=e;if(!Rp(t,e)){if(vd(t))throw Error(R(418));e=kn(r.nextSibling);var n=_t;e&&Rp(t,e)?vy(n,r):(t.flags=t.flags&-4097|2,_e=!1,_t=t)}}else{if(vd(t))throw Error(R(418));t.flags=t.flags&-4097|2,_e=!1,_t=t}}}function Pp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;_t=t}function Po(t){if(t!==_t)return!1;if(!_e)return Pp(t),_e=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!fd(t.type,t.memoizedProps)),e&&(e=kt)){if(vd(t))throw yy(),Error(R(418));for(;e;)vy(t,e),e=kn(e.nextSibling)}if(Pp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(R(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){kt=kn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}kt=null}}else kt=_t?kn(t.stateNode.nextSibling):null;return!0}function yy(){for(var t=kt;t;)t=kn(t.nextSibling)}function yi(){kt=_t=null,_e=!1}function zh(t){Xt===null?Xt=[t]:Xt.push(t)}var d1=Wr.ReactCurrentBatchConfig;function Ki(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(R(309));var n=r.stateNode}if(!n)throw Error(R(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(a){var o=s.refs;a===null?delete o[i]:o[i]=a},e._stringRef=i,e)}if(typeof t!="string")throw Error(R(284));if(!r._owner)throw Error(R(290,t))}return t}function Ao(t,e){throw t=Object.prototype.toString.call(e),Error(R(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Ap(t){var e=t._init;return e(t._payload)}function xy(t){function e(v,g){if(t){var x=v.deletions;x===null?(v.deletions=[g],v.flags|=16):x.push(g)}}function r(v,g){if(!t)return null;for(;g!==null;)e(v,g),g=g.sibling;return null}function n(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=jn(v,g),v.index=0,v.sibling=null,v}function i(v,g,x){return v.index=x,t?(x=v.alternate,x!==null?(x=x.index,x<g?(v.flags|=2,g):x):(v.flags|=2,g)):(v.flags|=1048576,g)}function a(v){return t&&v.alternate===null&&(v.flags|=2),v}function o(v,g,x,k){return g===null||g.tag!==6?(g=xu(x,v.mode,k),g.return=v,g):(g=s(g,x),g.return=v,g)}function l(v,g,x,k){var _=x.type;return _===Fs?d(v,g,x.props.children,k,x.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rn&&Ap(_)===g.type)?(k=s(g,x.props),k.ref=Ki(v,g,x),k.return=v,k):(k=hl(x.type,x.key,x.props,null,v.mode,k),k.ref=Ki(v,g,x),k.return=v,k)}function u(v,g,x,k){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=wu(x,v.mode,k),g.return=v,g):(g=s(g,x.children||[]),g.return=v,g)}function d(v,g,x,k,_){return g===null||g.tag!==7?(g=as(x,v.mode,k,_),g.return=v,g):(g=s(g,x),g.return=v,g)}function h(v,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=xu(""+g,v.mode,x),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case bo:return x=hl(g.type,g.key,g.props,null,v.mode,x),x.ref=Ki(v,null,g),x.return=v,x;case Us:return g=wu(g,v.mode,x),g.return=v,g;case rn:var k=g._init;return h(v,k(g._payload),x)}if(ea(g)||Bi(g))return g=as(g,v.mode,x,null),g.return=v,g;Ao(v,g)}return null}function p(v,g,x,k){var _=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return _!==null?null:o(v,g,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case bo:return x.key===_?l(v,g,x,k):null;case Us:return x.key===_?u(v,g,x,k):null;case rn:return _=x._init,p(v,g,_(x._payload),k)}if(ea(x)||Bi(x))return _!==null?null:d(v,g,x,k,null);Ao(v,x)}return null}function f(v,g,x,k,_){if(typeof k=="string"&&k!==""||typeof k=="number")return v=v.get(x)||null,o(g,v,""+k,_);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case bo:return v=v.get(k.key===null?x:k.key)||null,l(g,v,k,_);case Us:return v=v.get(k.key===null?x:k.key)||null,u(g,v,k,_);case rn:var S=k._init;return f(v,g,x,S(k._payload),_)}if(ea(k)||Bi(k))return v=v.get(x)||null,d(g,v,k,_,null);Ao(g,k)}return null}function y(v,g,x,k){for(var _=null,S=null,E=g,T=g=0,O=null;E!==null&&T<x.length;T++){E.index>T?(O=E,E=null):O=E.sibling;var I=p(v,E,x[T],k);if(I===null){E===null&&(E=O);break}t&&E&&I.alternate===null&&e(v,E),g=i(I,g,T),S===null?_=I:S.sibling=I,S=I,E=O}if(T===x.length)return r(v,E),_e&&qn(v,T),_;if(E===null){for(;T<x.length;T++)E=h(v,x[T],k),E!==null&&(g=i(E,g,T),S===null?_=E:S.sibling=E,S=E);return _e&&qn(v,T),_}for(E=n(v,E);T<x.length;T++)O=f(E,v,T,x[T],k),O!==null&&(t&&O.alternate!==null&&E.delete(O.key===null?T:O.key),g=i(O,g,T),S===null?_=O:S.sibling=O,S=O);return t&&E.forEach(function(q){return e(v,q)}),_e&&qn(v,T),_}function m(v,g,x,k){var _=Bi(x);if(typeof _!="function")throw Error(R(150));if(x=_.call(x),x==null)throw Error(R(151));for(var S=_=null,E=g,T=g=0,O=null,I=x.next();E!==null&&!I.done;T++,I=x.next()){E.index>T?(O=E,E=null):O=E.sibling;var q=p(v,E,I.value,k);if(q===null){E===null&&(E=O);break}t&&E&&q.alternate===null&&e(v,E),g=i(q,g,T),S===null?_=q:S.sibling=q,S=q,E=O}if(I.done)return r(v,E),_e&&qn(v,T),_;if(E===null){for(;!I.done;T++,I=x.next())I=h(v,I.value,k),I!==null&&(g=i(I,g,T),S===null?_=I:S.sibling=I,S=I);return _e&&qn(v,T),_}for(E=n(v,E);!I.done;T++,I=x.next())I=f(E,v,T,I.value,k),I!==null&&(t&&I.alternate!==null&&E.delete(I.key===null?T:I.key),g=i(I,g,T),S===null?_=I:S.sibling=I,S=I);return t&&E.forEach(function(F){return e(v,F)}),_e&&qn(v,T),_}function w(v,g,x,k){if(typeof x=="object"&&x!==null&&x.type===Fs&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case bo:e:{for(var _=x.key,S=g;S!==null;){if(S.key===_){if(_=x.type,_===Fs){if(S.tag===7){r(v,S.sibling),g=s(S,x.props.children),g.return=v,v=g;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rn&&Ap(_)===S.type){r(v,S.sibling),g=s(S,x.props),g.ref=Ki(v,S,x),g.return=v,v=g;break e}r(v,S);break}else e(v,S);S=S.sibling}x.type===Fs?(g=as(x.props.children,v.mode,k,x.key),g.return=v,v=g):(k=hl(x.type,x.key,x.props,null,v.mode,k),k.ref=Ki(v,g,x),k.return=v,v=k)}return a(v);case Us:e:{for(S=x.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){r(v,g.sibling),g=s(g,x.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else e(v,g);g=g.sibling}g=wu(x,v.mode,k),g.return=v,v=g}return a(v);case rn:return S=x._init,w(v,g,S(x._payload),k)}if(ea(x))return y(v,g,x,k);if(Bi(x))return m(v,g,x,k);Ao(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(r(v,g.sibling),g=s(g,x),g.return=v,v=g):(r(v,g),g=xu(x,v.mode,k),g.return=v,v=g),a(v)):r(v,g)}return w}var xi=xy(!0),wy=xy(!1),Al=Mn(null),Ol=null,Gs=null,Bh=null;function Wh(){Bh=Gs=Ol=null}function Hh(t){var e=Al.current;be(Al),t._currentValue=e}function xd(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function ri(t,e){Ol=t,Bh=Gs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(mt=!0),t.firstContext=null)}function Mt(t){var e=t._currentValue;if(Bh!==t)if(t={context:t,memoizedValue:e,next:null},Gs===null){if(Ol===null)throw Error(R(308));Gs=t,Ol.dependencies={lanes:0,firstContext:t}}else Gs=Gs.next=t;return e}var Qn=null;function Vh(t){Qn===null?Qn=[t]:Qn.push(t)}function by(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,Vh(e)):(r.next=s.next,s.next=r),e.interleaved=r,Dr(t,n)}function Dr(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var nn=!1;function qh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ky(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ir(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function _n(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ce&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,Dr(t,r)}return s=n.interleaved,s===null?(e.next=e,Vh(n)):(e.next=s.next,s.next=e),n.interleaved=e,Dr(t,r)}function al(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Ph(t,r)}}function Op(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Il(t,e,r,n){var s=t.updateQueue;nn=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?i=u:a.next=u,a=l;var d=t.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==a&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;a=0,d=u=l=null,o=i;do{var p=o.lane,f=o.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=t,m=o;switch(p=e,f=r,m.tag){case 1:if(y=m.payload,typeof y=="function"){h=y.call(f,h,p);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,p=typeof y=="function"?y.call(f,h,p):y,p==null)break e;h=Ce({},h,p);break e;case 2:nn=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[o]:p.push(o))}else f={eventTime:f,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=f,l=h):d=d.next=f,a|=p;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;p=o,o=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,e=s.shared.interleaved,e!==null){s=e;do a|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);us|=a,t.lanes=a,t.memoizedState=h}}function Ip(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(R(191,s));s.call(n)}}}var ao={},xr=Mn(ao),Ra=Mn(ao),Pa=Mn(ao);function Zn(t){if(t===ao)throw Error(R(174));return t}function Kh(t,e){switch(ye(Pa,e),ye(Ra,t),ye(xr,ao),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Xu(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Xu(e,t)}be(xr),ye(xr,e)}function wi(){be(xr),be(Ra),be(Pa)}function _y(t){Zn(Pa.current);var e=Zn(xr.current),r=Xu(e,t.type);e!==r&&(ye(Ra,t),ye(xr,r))}function Gh(t){Ra.current===t&&(be(xr),be(Ra))}var Ee=Mn(0);function Ll(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var fu=[];function Jh(){for(var t=0;t<fu.length;t++)fu[t]._workInProgressVersionPrimary=null;fu.length=0}var ol=Wr.ReactCurrentDispatcher,pu=Wr.ReactCurrentBatchConfig,cs=0,je=null,Ue=null,Be=null,$l=!1,da=!1,Aa=0,h1=0;function Ye(){throw Error(R(321))}function Qh(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!sr(t[r],e[r]))return!1;return!0}function Zh(t,e,r,n,s,i){if(cs=i,je=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ol.current=t===null||t.memoizedState===null?g1:v1,t=r(n,s),da){i=0;do{if(da=!1,Aa=0,25<=i)throw Error(R(301));i+=1,Be=Ue=null,e.updateQueue=null,ol.current=y1,t=r(n,s)}while(da)}if(ol.current=Dl,e=Ue!==null&&Ue.next!==null,cs=0,Be=Ue=je=null,$l=!1,e)throw Error(R(300));return t}function Yh(){var t=Aa!==0;return Aa=0,t}function ur(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?je.memoizedState=Be=t:Be=Be.next=t,Be}function Ut(){if(Ue===null){var t=je.alternate;t=t!==null?t.memoizedState:null}else t=Ue.next;var e=Be===null?je.memoizedState:Be.next;if(e!==null)Be=e,Ue=t;else{if(t===null)throw Error(R(310));Ue=t,t={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Be===null?je.memoizedState=Be=t:Be=Be.next=t}return Be}function Oa(t,e){return typeof e=="function"?e(t):e}function mu(t){var e=Ut(),r=e.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=t;
vendor: 4,649 bytes, line 38
38var n=Ue,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var o=a=null,l=null,u=i;do{var d=u.lane;if((cs&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(o=l=h,a=n):l=l.next=h,je.lanes|=d,us|=d}u=u.next}while(u!==null&&u!==i);l===null?a=n:l.next=o,sr(n,e.memoizedState)||(mt=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,je.lanes|=i,us|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function gu(t){var e=Ut(),r=e.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do i=t(i,a.action),a=a.next;while(a!==s);sr(i,e.memoizedState)||(mt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function Sy(){}function Ey(t,e){var r=je,n=Ut(),s=e(),i=!sr(n.memoizedState,s);if(i&&(n.memoizedState=s,mt=!0),n=n.queue,Xh(Ny.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||Be!==null&&Be.memoizedState.tag&1){if(r.flags|=2048,Ia(9,Cy.bind(null,r,n,s,e),void 0,null),We===null)throw Error(R(349));cs&30||jy(r,e,s)}return s}function jy(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=je.updateQueue,e===null?(e={lastEffect:null,stores:null},je.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Cy(t,e,r,n){e.value=r,e.getSnapshot=n,Ty(e)&&Ry(t)}function Ny(t,e,r){return r(function(){Ty(e)&&Ry(t)})}function Ty(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!sr(t,r)}catch{return!0}}function Ry(t){var e=Dr(t,1);e!==null&&rr(e,t,1,-1)}function Lp(t){var e=ur();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:t},e.queue=t,t=t.dispatch=m1.bind(null,je,t),[e.memoizedState,t]}function Ia(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=je.updateQueue,e===null?(e={lastEffect:null,stores:null},je.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function Py(){return Ut().memoizedState}function ll(t,e,r,n){var s=ur();je.flags|=t,s.memoizedState=Ia(1|e,r,void 0,n===void 0?null:n)}function gc(t,e,r,n){var s=Ut();n=n===void 0?null:n;var i=void 0;if(Ue!==null){var a=Ue.memoizedState;if(i=a.destroy,n!==null&&Qh(n,a.deps)){s.memoizedState=Ia(e,r,i,n);return}}je.flags|=t,s.memoizedState=Ia(1|e,r,i,n)}function $p(t,e){return ll(8390656,8,t,e)}function Xh(t,e){return gc(2048,8,t,e)}function Ay(t,e){return gc(4,2,t,e)}function Oy(t,e){return gc(4,4,t,e)}function Iy(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Ly(t,e,r){return r=r!=null?r.concat([t]):null,gc(4,4,Iy.bind(null,e,t),r)}function ef(){}function $y(t,e){var r=Ut();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Qh(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Dy(t,e){var r=Ut();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Qh(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function My(t,e,r){return cs&21?(sr(r,e)||(r=Wv(),je.lanes|=r,us|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,mt=!0),t.memoizedState=r)}function f1(t,e){var r=me;me=r!==0&&4>r?r:4,t(!0);var n=pu.transition;pu.transition={};try{t(!1),e()}finally{me=r,pu.transition=n}}function Uy(){return Ut().memoizedState}function p1(t,e,r){var n=En(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Fy(t))zy(e,r);else if(r=by(t,e,r,n),r!==null){var s=ot();rr(r,t,n,s),By(r,e,n)}}function m1(t,e,r){var n=En(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Fy(t))zy(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var a=e.lastRenderedState,o=i(a,r);if(s.hasEagerState=!0,s.eagerState=o,sr(o,a)){var l=e.interleaved;l===null?(s.next=s,Vh(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=by(t,e,s,n),r!==null&&(s=ot(),rr(r,t,n,s),By(r,e,n))}}function Fy(t){var e=t.alternate;return t===je||e!==null&&e===je}function zy(t,e){da=$l=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function By(t,e,r){if(r&4194240){var n=e.lanes;
vendor: 8,470 bytes, lines 38-40
38n&=t.pendingLanes,r|=n,e.lanes=r,Ph(t,r)}}var Dl={readContext:Mt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},g1={readContext:Mt,useCallback:function(t,e){return ur().memoizedState=[t,e===void 0?null:e],t},useContext:Mt,useEffect:$p,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,ll(4194308,4,Iy.bind(null,e,t),r)},useLayoutEffect:function(t,e){return ll(4194308,4,t,e)},useInsertionEffect:function(t,e){return ll(4,2,t,e)},useMemo:function(t,e){var r=ur();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ur();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=p1.bind(null,je,t),[n.memoizedState,t]},useRef:function(t){var e=ur();return t={current:t},e.memoizedState=t},useState:Lp,useDebugValue:ef,useDeferredValue:function(t){return ur().memoizedState=t},useTransition:function(){var t=Lp(!1),e=t[0];return t=f1.bind(null,t[1]),ur().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=je,s=ur();if(_e){if(r===void 0)throw Error(R(407));r=r()}else{if(r=e(),We===null)throw Error(R(349));cs&30||jy(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,$p(Ny.bind(null,n,i,t),[t]),n.flags|=2048,Ia(9,Cy.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=ur(),e=We.identifierPrefix;if(_e){var r=Or,n=Ar;r=(n&~(1<<32-tr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Aa++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=h1++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},v1={readContext:Mt,useCallback:$y,useContext:Mt,useEffect:Xh,useImperativeHandle:Ly,useInsertionEffect:Ay,useLayoutEffect:Oy,useMemo:Dy,useReducer:mu,useRef:Py,useState:function(){return mu(Oa)},useDebugValue:ef,useDeferredValue:function(t){var e=Ut();return My(e,Ue.memoizedState,t)},useTransition:function(){var t=mu(Oa)[0],e=Ut().memoizedState;return[t,e]},useMutableSource:Sy,useSyncExternalStore:Ey,useId:Uy,unstable_isNewReconciler:!1},y1={readContext:Mt,useCallback:$y,useContext:Mt,useEffect:Xh,useImperativeHandle:Ly,useInsertionEffect:Ay,useLayoutEffect:Oy,useMemo:Dy,useReducer:gu,useRef:Py,useState:function(){return gu(Oa)},useDebugValue:ef,useDeferredValue:function(t){var e=Ut();return Ue===null?e.memoizedState=t:My(e,Ue.memoizedState,t)},useTransition:function(){var t=gu(Oa)[0],e=Ut().memoizedState;return[t,e]},useMutableSource:Sy,useSyncExternalStore:Ey,useId:Uy,unstable_isNewReconciler:!1};function Kt(t,e){if(t&&t.defaultProps){e=Ce({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function wd(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Ce({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var vc={isMounted:function(t){return(t=t._reactInternals)?gs(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ot(),s=En(t),i=Ir(n,s);i.payload=e,r!=null&&(i.callback=r),e=_n(t,i,s),e!==null&&(rr(e,t,s,n),al(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ot(),s=En(t),i=Ir(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=_n(t,i,s),e!==null&&(rr(e,t,s,n),al(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ot(),n=En(t),s=Ir(r,n);s.tag=2,e!=null&&(s.callback=e),e=_n(t,s,n),e!==null&&(rr(e,t,n,r),al(e,t,n))}};function Dp(t,e,r,n,s,i,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,a):e.prototype&&e.prototype.isPureReactComponent?!ja(r,n)||!ja(s,i):!0}function Wy(t,e,r){var n=!1,s=Rn,i=e.contextType;return typeof i=="object"&&i!==null?i=Mt(i):(s=vt(e)?os:nt.current,n=e.contextTypes,i=(n=n!=null)?vi(t,s):Rn),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=vc,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Mp(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&vc.enqueueReplaceState(e,e.state,null)}function bd(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},qh(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Mt(i):(i=vt(e)?os:nt.current,s.context=vi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(wd(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&vc.enqueueReplaceState(s,s.state,null),Il(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function bi(t,e){try{var r="",n=e;do r+=qb(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function vu(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function kd(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var x1=typeof WeakMap=="function"?WeakMap:Map;function Hy(t,e,r){r=Ir(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Ul||(Ul=!0,Ad=n),kd(t,e)},r}function Vy(t,e,r){r=Ir(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){kd(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){kd(t,e),typeof n!="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}function Up(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new x1;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=O1.bind(null,t,e,r),e.then(t,t))}function Fp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function zp(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Ir(-1,1),e.tag=2,_n(r,e,1))),r.lanes|=1),t)}var w1=Wr.ReactCurrentOwner,mt=!1;function it(t,e,r,n){e.child=t===null?wy(e,null,r,n):xi(e,t.child,r,n)}function Bp(t,e,r,n,s){r=r.render;var i=e.ref;return ri(e,s),n=Zh(t,e,r,n,i,s),r=Yh(),t!==null&&!mt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Mr(t,e,s)):(_e&&r&&Uh(e),e.flags|=1,it(t,e,n,s),e.child)}function Wp(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!cf(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,qy(t,e,i,n,s)):(t=hl(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:ja,r(a,n)&&t.ref===e.ref)return Mr(t,e,s)}return e.flags|=1,t=jn(i,n),t.ref=e.ref,t.return=e,e.child=t}function qy(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(ja(i,n)&&t.ref===e.ref)if(mt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(mt=!0);else return e.lanes=t.lanes,Mr(t,e,s)}return _d(t,e,r,n,s)}function Ky(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(Qs,xt),xt|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ye(Qs,xt),xt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,ye(Qs,xt),xt|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,ye(Qs,xt),xt|=n;return it(t,e,s,r),e.child}function Gy(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}
vendor: 3,551 bytes, line 40
40function _d(t,e,r,n,s){var i=vt(r)?os:nt.current;return i=vi(e,i),ri(e,s),r=Zh(t,e,r,n,i,s),n=Yh(),t!==null&&!mt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Mr(t,e,s)):(_e&&n&&Uh(e),e.flags|=1,it(t,e,r,s),e.child)}function Hp(t,e,r,n,s){if(vt(r)){var i=!0;Tl(e)}else i=!1;if(ri(e,s),e.stateNode===null)cl(t,e),Wy(e,r,n),bd(e,r,n,s),n=!0;else if(t===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var l=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Mt(u):(u=vt(r)?os:nt.current,u=vi(e,u));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==u)&&Mp(e,a,n,u),nn=!1;var p=e.memoizedState;a.state=p,Il(e,n,a,s),l=e.memoizedState,o!==n||p!==l||gt.current||nn?(typeof d=="function"&&(wd(e,r,d,n),l=e.memoizedState),(o=nn||Dp(e,r,o,n,p,l,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),a.props=n,a.state=l,a.context=u,n=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,ky(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:Kt(e.type,o),a.props=u,h=e.pendingProps,p=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=Mt(l):(l=vt(r)?os:nt.current,l=vi(e,l));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==h||p!==l)&&Mp(e,a,n,l),nn=!1,p=e.memoizedState,a.state=p,Il(e,n,a,s);var y=e.memoizedState;o!==h||p!==y||gt.current||nn?(typeof f=="function"&&(wd(e,r,f,n),y=e.memoizedState),(u=nn||Dp(e,r,u,n,p,y,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,y,l)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=y),a.props=n,a.state=y,a.context=l,n=u):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return Sd(t,e,r,n,i,s)}function Sd(t,e,r,n,s,i){Gy(t,e);var a=(e.flags&128)!==0;if(!n&&!a)return s&&Tp(e,r,!1),Mr(t,e,i);n=e.stateNode,w1.current=e;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&a?(e.child=xi(e,t.child,null,i),e.child=xi(e,null,o,i)):it(t,e,o,i),e.memoizedState=n.state,s&&Tp(e,r,!0),e.child}function Jy(t){var e=t.stateNode;e.pendingContext?Np(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Np(t,e.context,!1),Kh(t,e.containerInfo)}function Vp(t,e,r,n,s){return yi(),zh(s),e.flags|=256,it(t,e,r,n),e.child}var Ed={dehydrated:null,treeContext:null,retryLane:0};
vendor: 4,470 bytes, line 40
40function jd(t){return{baseLanes:t,cachePool:null,transitions:null}}function Qy(t,e,r){var n=e.pendingProps,s=Ee.current,i=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=t!==null&&t.memoizedState===null?!1:(s&2)!==0),o?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),ye(Ee,s&1),t===null)return yd(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=n.children,t=n.fallback,i?(n=e.mode,i=e.child,a={mode:"hidden",children:a},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=wc(a,n,0,null),t=as(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=jd(r),e.memoizedState=Ed,t):tf(e,a));if(s=t.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return b1(t,e,a,n,o,s,r);if(i){i=n.fallback,a=e.mode,s=t.child,o=s.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=jn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=jn(o,i):(i=as(i,a,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,a=t.child.memoizedState,a=a===null?jd(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=t.childLanes&~r,e.memoizedState=Ed,n}return i=t.child,t=i.sibling,n=jn(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function tf(t,e){return e=wc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Oo(t,e,r,n){return n!==null&&zh(n),xi(e,t.child,null,r),t=tf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function b1(t,e,r,n,s,i,a){if(r)return e.flags&256?(e.flags&=-257,n=vu(Error(R(422))),Oo(t,e,a,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=wc({mode:"visible",children:n.children},s,0,null),i=as(i,s,a,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&xi(e,t.child,null,a),e.child.memoizedState=jd(a),e.memoizedState=Ed,i);if(!(e.mode&1))return Oo(t,e,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var o=n.dgst;return n=o,i=Error(R(419)),n=vu(i,n,void 0),Oo(t,e,a,n)}if(o=(a&t.childLanes)!==0,mt||o){if(n=We,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Dr(t,s),rr(n,t,s,-1))}return lf(),n=vu(Error(R(421))),Oo(t,e,a,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=I1.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,kt=kn(s.nextSibling),_t=e,_e=!0,Xt=null,t!==null&&(It[Lt++]=Ar,It[Lt++]=Or,It[Lt++]=ls,Ar=t.id,Or=t.overflow,ls=e),e=tf(e,n.children),e.flags|=4096,e)}function qp(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),xd(t.return,e,r)}function yu(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Zy(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(it(t,e,n.children,r),n=Ee.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qp(t,r,e);else if(t.tag===19)qp(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(ye(Ee,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Ll(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),yu(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Ll(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}yu(e,!0,r,null,i);break;case"together":yu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function cl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,903 bytes, line 40
40function Mr(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),us|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(R(153));if(e.child!==null){for(t=e.child,r=jn(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=jn(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function k1(t,e,r){switch(e.tag){case 3:Jy(e),yi();break;case 5:_y(e);break;case 1:vt(e.type)&&Tl(e);break;case 4:Kh(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;ye(Al,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(ye(Ee,Ee.current&1),e.flags|=128,null):r&e.child.childLanes?Qy(t,e,r):(ye(Ee,Ee.current&1),t=Mr(t,e,r),t!==null?t.sibling:null);ye(Ee,Ee.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Zy(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ye(Ee,Ee.current),n)break;return null;case 22:case 23:return e.lanes=0,Ky(t,e,r)}return Mr(t,e,r)}var Yy,Cd,Xy,e0;Yy=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Cd=function(){};Xy=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Zn(xr.current);var i=null;switch(r){case"input":s=Ju(t,s),n=Ju(t,n),i=[];break;case"select":s=Ce({},s,{value:void 0}),n=Ce({},n,{value:void 0}),i=[];break;case"textarea":s=Yu(t,s),n=Yu(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Cl)}ed(r,n);var a;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var o=s[u];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(xa.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(o=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(xa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&we("scroll",t),i||o===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};e0=function(t,e,r,n){r!==n&&(e.flags|=4)};function Gi(t,e){if(!_e)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Xe(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function _1(t,e,r){var n=e.pendingProps;switch(Fh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(e),null;case 1:return vt(e.type)&&Nl(),Xe(e),null;case 3:return n=e.stateNode,wi(),be(gt),be(nt),Jh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Po(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Xt!==null&&(Ld(Xt),Xt=null))),Cd(t,e),Xe(e),null;case 5:Gh(e);var s=Zn(Pa.current);if(r=e.type,t!==null&&e.stateNode!=null)Xy(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(R(166));return Xe(e),null}if(t=Zn(xr.current),Po(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[gr]=e,n[Ta]=i,t=(e.mode&1)!==0,r){case"dialog":we("cancel",n),we("close",n);break;case"iframe":case"object":case"embed":we("load",n);break;case"video":case"audio":for(s=0;s<ra.length;s++)we(ra[s],n);break;case"source":we("error",n);break;case"img":case"image":case"link":we("error",n),we("load",n);break;case"details":we("toggle",n);break;case"input":tp(n,i),we("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},we("invalid",n);break;case"textarea":np(n,i),we("invalid",n)}ed(r,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];
vendor: 31,278 bytes, line 40
40a==="children"?typeof o=="string"?n.textContent!==o&&(i.suppressHydrationWarning!==!0&&Ro(n.textContent,o,t),s=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Ro(n.textContent,o,t),s=["children",""+o]):xa.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&we("scroll",n)}switch(r){case"input":ko(n),rp(n,i,!0);break;case"textarea":ko(n),sp(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Cl)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Nv(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[gr]=e,t[Ta]=n,Yy(t,e,!1,!1),e.stateNode=t;e:{switch(a=td(r,n),r){case"dialog":we("cancel",t),we("close",t),s=n;break;case"iframe":case"object":case"embed":we("load",t),s=n;break;case"video":case"audio":for(s=0;s<ra.length;s++)we(ra[s],t);s=n;break;case"source":we("error",t),s=n;break;case"img":case"image":case"link":we("error",t),we("load",t),s=n;break;case"details":we("toggle",t),s=n;break;case"input":tp(t,n),s=Ju(t,n),we("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=Ce({},n,{value:void 0}),we("invalid",t);break;case"textarea":np(t,n),s=Yu(t,n),we("invalid",t);break;default:s=n}ed(r,s),o=s;for(i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="style"?Pv(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Tv(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&wa(t,l):typeof l=="number"&&wa(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(xa.hasOwnProperty(i)?l!=null&&i==="onScroll"&&we("scroll",t):l!=null&&Eh(t,i,l,a))}switch(r){case"input":ko(t),rp(t,n,!1);break;case"textarea":ko(t),sp(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Tn(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?Ys(t,!!n.multiple,i,!1):n.defaultValue!=null&&Ys(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Cl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Xe(e),null;case 6:if(t&&e.stateNode!=null)e0(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(R(166));if(r=Zn(Pa.current),Zn(xr.current),Po(e)){if(n=e.stateNode,r=e.memoizedProps,n[gr]=e,(i=n.nodeValue!==r)&&(t=_t,t!==null))switch(t.tag){case 3:Ro(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Ro(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[gr]=e,e.stateNode=n}return Xe(e),null;case 13:if(be(Ee),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(_e&&kt!==null&&e.mode&1&&!(e.flags&128))yy(),yi(),e.flags|=98560,i=!1;else if(i=Po(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(R(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(R(317));i[gr]=e}else yi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Xe(e),i=!1}else Xt!==null&&(Ld(Xt),Xt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Ee.current&1?Fe===0&&(Fe=3):lf())),e.updateQueue!==null&&(e.flags|=4),Xe(e),null);case 4:return wi(),Cd(t,e),t===null&&Ca(e.stateNode.containerInfo),Xe(e),null;case 10:return Hh(e.type._context),Xe(e),null;case 17:return vt(e.type)&&Nl(),Xe(e),null;case 19:if(be(Ee),i=e.memoizedState,i===null)return Xe(e),null;if(n=(e.flags&128)!==0,a=i.rendering,a===null)if(n)Gi(i,!1);else{if(Fe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=Ll(t),a!==null){for(e.flags|=128,Gi(i,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,t=a.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ye(Ee,Ee.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ae()>ki&&(e.flags|=128,n=!0,Gi(i,!1),e.lanes=4194304)}else{if(!n)if(t=Ll(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Gi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!_e)return Xe(e),null}else 2*Ae()-i.renderingStartTime>ki&&r!==1073741824&&(e.flags|=128,n=!0,Gi(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(r=i.last,r!==null?r.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ae(),e.sibling=null,r=Ee.current,ye(Ee,n?r&1|2:r&1),e):(Xe(e),null);case 22:case 23:return of(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xt&1073741824&&(Xe(e),e.subtreeFlags&6&&(e.flags|=8192)):Xe(e),null;case 24:return null;case 25:return null}throw Error(R(156,e.tag))}function S1(t,e){switch(Fh(e),e.tag){case 1:return vt(e.type)&&Nl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return wi(),be(gt),be(nt),Jh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Gh(e),null;case 13:if(be(Ee),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(R(340));yi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return be(Ee),null;case 4:return wi(),null;case 10:return Hh(e.type._context),null;case 22:case 23:return of(),null;case 24:return null;default:return null}}var Io=!1,rt=!1,E1=typeof WeakSet=="function"?WeakSet:Set,U=null;function Js(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Pe(t,e,n)}else r.current=null}function Nd(t,e,r){try{r()}catch(n){Pe(t,e,n)}}var Kp=!1;function j1(t,e){if(dd=Sl,t=iy(),Mh(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,u=0,d=0,h=t,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(o=a+s),h!==i||n!==0&&h.nodeType!==3||(l=a+n),h.nodeType===3&&(a+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===t)break t;if(p===r&&++u===s&&(o=a),p===i&&++d===n&&(l=a),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(hd={focusedElem:t,selectionRange:r},Sl=!1,U=e;U!==null;)if(e=U,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,U=t;else for(;U!==null;){e=U;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,w=y.memoizedState,v=e.stateNode,g=v.getSnapshotBeforeUpdate(e.elementType===e.type?m:Kt(e.type,m),w);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(k){Pe(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,U=t;break}U=e.return}return y=Kp,Kp=!1,y}function ha(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Nd(e,r,i)}s=s.next}while(s!==n)}}function yc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Td(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function t0(t){var e=t.alternate;e!==null&&(t.alternate=null,t0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[gr],delete e[Ta],delete e[md],delete e[l1],delete e[c1])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function r0(t){return t.tag===5||t.tag===3||t.tag===4}function Gp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||r0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Rd(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Cl));else if(n!==4&&(t=t.child,t!==null))for(Rd(t,e,r),t=t.sibling;t!==null;)Rd(t,e,r),t=t.sibling}function Pd(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Pd(t,e,r),t=t.sibling;t!==null;)Pd(t,e,r),t=t.sibling}var qe=null,Yt=!1;function Zr(t,e,r){for(r=r.child;r!==null;)n0(t,e,r),r=r.sibling}function n0(t,e,r){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(uc,r)}catch{}switch(r.tag){case 5:rt||Js(r,e);case 6:var n=qe,s=Yt;qe=null,Zr(t,e,r),qe=n,Yt=s,qe!==null&&(Yt?(t=qe,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):qe.removeChild(r.stateNode));break;case 18:qe!==null&&(Yt?(t=qe,r=r.stateNode,t.nodeType===8?du(t.parentNode,r):t.nodeType===1&&du(t,r),Sa(t)):du(qe,r.stateNode));break;case 4:n=qe,s=Yt,qe=r.stateNode.containerInfo,Yt=!0,Zr(t,e,r),qe=n,Yt=s;break;case 0:case 11:case 14:case 15:if(!rt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Nd(r,e,a),s=s.next}while(s!==n)}Zr(t,e,r);break;case 1:if(!rt&&(Js(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Pe(r,e,o)}Zr(t,e,r);break;case 21:Zr(t,e,r);break;case 22:r.mode&1?(rt=(n=rt)||r.memoizedState!==null,Zr(t,e,r),rt=n):Zr(t,e,r);break;default:Zr(t,e,r)}}function Jp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new E1),e.forEach(function(n){var s=L1.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Ht(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,a=e,o=a;e:for(;o!==null;){switch(o.tag){case 5:qe=o.stateNode,Yt=!1;break e;case 3:qe=o.stateNode.containerInfo,Yt=!0;break e;case 4:qe=o.stateNode.containerInfo,Yt=!0;break e}o=o.return}if(qe===null)throw Error(R(160));n0(i,a,s),qe=null,Yt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Pe(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)s0(e,t),e=e.sibling}function s0(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ht(e,t),lr(t),n&4){try{ha(3,t,t.return),yc(3,t)}catch(m){Pe(t,t.return,m)}try{ha(5,t,t.return)}catch(m){Pe(t,t.return,m)}}break;case 1:Ht(e,t),lr(t),n&512&&r!==null&&Js(r,r.return);break;case 5:if(Ht(e,t),lr(t),n&512&&r!==null&&Js(r,r.return),t.flags&32){var s=t.stateNode;try{wa(s,"")}catch(m){Pe(t,t.return,m)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,a=r!==null?r.memoizedProps:i,o=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&jv(s,i),td(o,a);var u=td(o,i);for(a=0;a<l.length;a+=2){var d=l[a],h=l[a+1];d==="style"?Pv(s,h):d==="dangerouslySetInnerHTML"?Tv(s,h):d==="children"?wa(s,h):Eh(s,d,h,u)}switch(o){case"input":Qu(s,i);break;case"textarea":Cv(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Ys(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Ys(s,!!i.multiple,i.defaultValue,!0):Ys(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ta]=i}catch(m){Pe(t,t.return,m)}}break;case 6:if(Ht(e,t),lr(t),n&4){if(t.stateNode===null)throw Error(R(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){Pe(t,t.return,m)}}break;case 3:if(Ht(e,t),lr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Sa(e.containerInfo)}catch(m){Pe(t,t.return,m)}break;case 4:Ht(e,t),lr(t);break;case 13:Ht(e,t),lr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(sf=Ae())),n&4&&Jp(t);break;case 22:if(d=r!==null&&r.memoizedState!==null,t.mode&1?(rt=(u=rt)||d,Ht(e,t),rt=u):Ht(e,t),lr(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!d&&t.mode&1)for(U=t,d=t.child;d!==null;){for(h=U=d;U!==null;){switch(p=U,f=p.child,p.tag){case 0:case 11:case 14:case 15:ha(4,p,p.return);break;case 1:Js(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(m){Pe(n,r,m)}}break;case 5:Js(p,p.return);break;case 22:if(p.memoizedState!==null){Zp(h);continue}}f!==null?(f.return=p,U=f):Zp(h)}d=d.sibling}e:for(d=null,h=t;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=h.stateNode,l=h.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=Rv("display",a))}catch(m){Pe(t,t.return,m)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){Pe(t,t.return,m)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ht(e,t),lr(t),n&4&&Jp(t);break;case 21:break;default:Ht(e,t),lr(t)}}function lr(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(r0(r)){var n=r;break e}r=r.return}throw Error(R(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(wa(s,""),n.flags&=-33);var i=Gp(t);Pd(t,i,s);break;case 3:case 4:var a=n.stateNode.containerInfo,o=Gp(t);Rd(t,o,a);break;default:throw Error(R(161))}}catch(l){Pe(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function C1(t,e,r){U=t,i0(t)}function i0(t,e,r){for(var n=(t.mode&1)!==0;U!==null;){var s=U,i=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||Io;if(!a){var o=s.alternate,l=o!==null&&o.memoizedState!==null||rt;o=Io;var u=rt;if(Io=a,(rt=l)&&!u)for(U=s;U!==null;)a=U,l=a.child,a.tag===22&&a.memoizedState!==null?Yp(s):l!==null?(l.return=a,U=l):Yp(s);for(;i!==null;)U=i,i0(i),i=i.sibling;U=s,Io=o,rt=u}Qp(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,U=i):Qp(t)}}function Qp(t){for(;U!==null;){var e=U;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:rt||yc(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!rt)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Kt(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Ip(e,i,n);break;case 3:var a=e.updateQueue;if(a!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Ip(e,a,r)}break;case 5:var o=e.stateNode;if(r===null&&e.flags&4){r=o;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Sa(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}rt||e.flags&512&&Td(e)}catch(p){Pe(e,e.return,p)}}if(e===t){U=null;break}if(r=e.sibling,r!==null){r.return=e.return,U=r;break}U=e.return}}function Zp(t){for(;U!==null;){var e=U;if(e===t){U=null;break}var r=e.sibling;if(r!==null){r.return=e.return,U=r;break}U=e.return}}function Yp(t){for(;U!==null;){var e=U;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{yc(4,e)}catch(l){Pe(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){Pe(e,s,l)}}var i=e.return;try{Td(e)}catch(l){Pe(e,i,l)}break;case 5:var a=e.return;try{Td(e)}catch(l){Pe(e,a,l)}}}catch(l){Pe(e,e.return,l)}if(e===t){U=null;break}var o=e.sibling;if(o!==null){o.return=e.return,U=o;break}U=e.return}}var N1=Math.ceil,Ml=Wr.ReactCurrentDispatcher,rf=Wr.ReactCurrentOwner,Dt=Wr.ReactCurrentBatchConfig,ce=0,We=null,$e=null,Ke=0,xt=0,Qs=Mn(0),Fe=0,La=null,us=0,xc=0,nf=0,fa=null,pt=null,sf=0,ki=1/0,Cr=null,Ul=!1,Ad=null,Sn=null,Lo=!1,gn=null,Fl=0,pa=0,Od=null,ul=-1,dl=0;function ot(){return ce&6?Ae():ul!==-1?ul:ul=Ae()}function En(t){return t.mode&1?ce&2&&Ke!==0?Ke&-Ke:d1.transition!==null?(dl===0&&(dl=Wv()),dl):(t=me,t!==0||(t=window.event,t=t===void 0?16:Qv(t.type)),t):1}function rr(t,e,r,n){if(50<pa)throw pa=0,Od=null,Error(R(185));no(t,r,n),(!(ce&2)||t!==We)&&(t===We&&(!(ce&2)&&(xc|=r),Fe===4&&on(t,Ke)),yt(t,n),r===1&&ce===0&&!(e.mode&1)&&(ki=Ae()+500,mc&&Un()))}function yt(t,e){var r=t.callbackNode;dk(t,e);var n=_l(t,t===We?Ke:0);if(n===0)r!==null&&op(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&op(r),e===1)t.tag===0?u1(Xp.bind(null,t)):my(Xp.bind(null,t)),a1(function(){!(ce&6)&&Un()}),r=null;else{switch(Hv(n)){case 1:r=Rh;break;case 4:r=zv;break;case 16:r=kl;break;case 536870912:r=Bv;break;default:r=kl}r=f0(r,a0.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function a0(t,e){if(ul=-1,dl=0,ce&6)throw Error(R(327));var r=t.callbackNode;if(ni()&&t.callbackNode!==r)return null;var n=_l(t,t===We?Ke:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=zl(t,n);else{e=n;var s=ce;ce|=2;var i=l0();(We!==t||Ke!==e)&&(Cr=null,ki=Ae()+500,is(t,e));do try{P1();break}catch(o){o0(t,o)}while(!0);Wh(),Ml.current=i,ce=s,$e!==null?e=0:(We=null,Ke=0,e=Fe)}if(e!==0){if(e===2&&(s=ad(t),s!==0&&(n=s,e=Id(t,s))),e===1)throw r=La,is(t,0),on(t,n),yt(t,Ae()),r;if(e===6)on(t,n);else{if(s=t.current.alternate,!(n&30)&&!T1(s)&&(e=zl(t,n),e===2&&(i=ad(t),i!==0&&(n=i,e=Id(t,i))),e===1))throw r=La,is(t,0),on(t,n),yt(t,Ae()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(R(345));case 2:Kn(t,pt,Cr);break;case 3:if(on(t,n),(n&130023424)===n&&(e=sf+500-Ae(),10<e)){if(_l(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){ot(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=pd(Kn.bind(null,t,pt,Cr),e);break}Kn(t,pt,Cr);break;case 4:if(on(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var a=31-tr(n);i=1<<a,a=e[a],a>s&&(s=a),n&=~i}if(n=s,n=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*N1(n/1960))-n,10<n){t.timeoutHandle=pd(Kn.bind(null,t,pt,Cr),n);break}Kn(t,pt,Cr);break;case 5:Kn(t,pt,Cr);break;default:throw Error(R(329))}}}return yt(t,Ae()),t.callbackNode===r?a0.bind(null,t):null}function Id(t,e){var r=fa;return t.current.memoizedState.isDehydrated&&(is(t,e).flags|=256),t=zl(t,e),t!==2&&(e=pt,pt=r,e!==null&&Ld(e)),t}function Ld(t){pt===null?pt=t:pt.push.apply(pt,t)}function T1(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!sr(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function on(t,e){for(e&=~nf,e&=~xc,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-tr(e),n=1<<r;t[r]=-1,e&=~n}}function Xp(t){if(ce&6)throw Error(R(327));ni();var e=_l(t,0);if(!(e&1))return yt(t,Ae()),null;var r=zl(t,e);if(t.tag!==0&&r===2){var n=ad(t);n!==0&&(e=n,r=Id(t,n))}if(r===1)throw r=La,is(t,0),on(t,e),yt(t,Ae()),r;if(r===6)throw Error(R(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Kn(t,pt,Cr),yt(t,Ae()),null}function af(t,e){var r=ce;ce|=1;try{return t(e)}finally{ce=r,ce===0&&(ki=Ae()+500,mc&&Un())}}function ds(t){gn!==null&&gn.tag===0&&!(ce&6)&&ni();var e=ce;ce|=1;var r=Dt.transition,n=me;try{if(Dt.transition=null,me=1,t)return t()}finally{me=n,Dt.transition=r,ce=e,!(ce&6)&&Un()}}function of(){xt=Qs.current,be(Qs)}function is(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,i1(r)),$e!==null)for(r=$e.return;r!==null;){var n=r;switch(Fh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Nl();break;case 3:wi(),be(gt),be(nt),Jh();break;case 5:Gh(n);break;case 4:wi();break;case 13:be(Ee);break;case 19:be(Ee);break;case 10:Hh(n.type._context);break;case 22:case 23:of()}r=r.return}if(We=t,$e=t=jn(t.current,null),Ke=xt=e,Fe=0,La=null,nf=xc=us=0,pt=fa=null,Qn!==null){for(e=0;e<Qn.length;e++)if(r=Qn[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=s,n.next=a}r.pending=n}Qn=null}return t}function o0(t,e){do{var r=$e;try{if(Wh(),ol.current=Dl,$l){for(var n=je.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}$l=!1}if(cs=0,Be=Ue=je=null,da=!1,Aa=0,rf.current=null,r===null||r.return===null){Fe=1,La=e,$e=null;break}e:{var i=t,a=r.return,o=r,l=e;if(e=Ke,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=o,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=Fp(a);if(f!==null){f.flags&=-257,zp(f,a,o,i,e),f.mode&1&&Up(i,u,e),e=f,l=u;var y=e.updateQueue;if(y===null){var m=new Set;m.add(l),e.updateQueue=m}else y.add(l);break e}else{if(!(e&1)){Up(i,u,e),lf();break e}l=Error(R(426))}}else if(_e&&o.mode&1){var w=Fp(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),zp(w,a,o,i,e),zh(bi(l,o));break e}}i=l=bi(l,o),Fe!==4&&(Fe=2),fa===null?fa=[i]:fa.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var v=Hy(i,l,e);Op(i,v);break e;case 1:o=l;var g=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Sn===null||!Sn.has(x)))){i.flags|=65536,e&=-e,i.lanes|=e;var k=Vy(i,o,e);Op(i,k);break e}}i=i.return}while(i!==null)}u0(r)}catch(_){e=_,$e===r&&r!==null&&($e=r=r.return);continue}break}while(!0)}function l0(){var t=Ml.current;return Ml.current=Dl,t===null?Dl:t}function lf(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),We===null||!(us&268435455)&&!(xc&268435455)||on(We,Ke)}function zl(t,e){var r=ce;ce|=2;var n=l0();(We!==t||Ke!==e)&&(Cr=null,is(t,e));do try{R1();break}catch(s){o0(t,s)}while(!0);if(Wh(),ce=r,Ml.current=n,$e!==null)throw Error(R(261));return We=null,Ke=0,Fe}function R1(){for(;$e!==null;)c0($e)}function P1(){for(;$e!==null&&!rk();)c0($e)}function c0(t){var e=h0(t.alternate,t,xt);t.memoizedProps=t.pendingProps,e===null?u0(t):$e=e,rf.current=null}function u0(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=S1(r,e),r!==null){r.flags&=32767,$e=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Fe=6,$e=null;return}}else if(r=_1(r,e,xt),r!==null){$e=r;return}if(e=e.sibling,e!==null){$e=e;return}$e=e=t}while(e!==null);Fe===0&&(Fe=5)}function Kn(t,e,r){var n=me,s=Dt.transition;try{Dt.transition=null,me=1,A1(t,e,r,n)}finally{Dt.transition=s,me=n}return null}function A1(t,e,r,n){do ni();while(gn!==null);if(ce&6)throw Error(R(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(R(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(hk(t,i),t===We&&($e=We=null,Ke=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Lo||(Lo=!0,f0(kl,function(){return ni(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Dt.transition,Dt.transition=null;var a=me;me=1;var o=ce;ce|=4,rf.current=null,j1(t,r),s0(r,t),Yk(hd),Sl=!!dd,hd=dd=null,t.current=r,C1(r),nk(),ce=o,me=a,Dt.transition=i}else t.current=r;if(Lo&&(Lo=!1,gn=t,Fl=s),i=t.pendingLanes,i===0&&(Sn=null),ak(r.stateNode),yt(t,Ae()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Ul)throw Ul=!1,t=Ad,Ad=null,t;return Fl&1&&t.tag!==0&&ni(),i=t.pendingLanes,i&1?t===Od?pa++:(pa=0,Od=t):pa=0,Un(),null}function ni(){if(gn!==null){var t=Hv(Fl),e=Dt.transition,r=me;try{if(Dt.transition=null,me=16>t?16:t,gn===null)var n=!1;else{if(t=gn,gn=null,Fl=0,ce&6)throw Error(R(331));var s=ce;for(ce|=4,U=t.current;U!==null;){var i=U,a=i.child;if(U.flags&16){var o=i.deletions;if(o!==null){for(var l=0;l<o.length;l++){var u=o[l];for(U=u;U!==null;){var d=U;switch(d.tag){case 0:case 11:case 15:ha(8,d,i)}var h=d.child;if(h!==null)h.return=d,U=h;else for(;U!==null;){d=U;var p=d.sibling,f=d.return;if(t0(d),d===u){U=null;break}if(p!==null){p.return=f,U=p;break}U=f}}}var y=i.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}U=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,U=a;else e:for(;U!==null;){if(i=U,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ha(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,U=v;break e}U=i.return}}var g=t.current;for(U=g;U!==null;){a=U;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,U=x;else e:for(a=g;U!==null;){if(o=U,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:yc(9,o)}}catch(_){Pe(o,o.return,_)}if(o===a){U=null;break e}var k=o.sibling;if(k!==null){k.return=o.return,U=k;break e}U=o.return}}if(ce=s,Un(),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(uc,t)}catch{}n=!0}return n}finally{me=r,Dt.transition=e}}return!1}function em(t,e,r){e=bi(r,e),e=Hy(t,e,1),t=_n(t,e,1),e=ot(),t!==null&&(no(t,1,e),yt(t,e))}function Pe(t,e,r){if(t.tag===3)em(t,t,r);else for(;e!==null;){if(e.tag===3){em(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Sn===null||!Sn.has(n))){t=bi(r,t),t=Vy(e,t,1),e=_n(e,t,1),t=ot(),e!==null&&(no(e,1,t),yt(e,t));break}}e=e.return}}function O1(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ot(),t.pingedLanes|=t.suspendedLanes&r,We===t&&(Ke&r)===r&&(Fe===4||Fe===3&&(Ke&130023424)===Ke&&500>Ae()-sf?is(t,0):nf|=r),yt(t,e)}function d0(t,e){e===0&&(t.mode&1?(e=Eo,Eo<<=1,!(Eo&130023424)&&(Eo=4194304)):e=1);var r=ot();t=Dr(t,e),t!==null&&(no(t,e,r),yt(t,r))}function I1(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),d0(t,r)}function L1(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(R(314))}n!==null&&n.delete(e),d0(t,r)}var h0;h0=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||gt.current)mt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return mt=!1,k1(t,e,r);mt=!!(t.flags&131072)}else mt=!1,_e&&e.flags&1048576&&gy(e,Pl,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;cl(t,e),t=e.pendingProps;var s=vi(e,nt.current);ri(e,r),s=Zh(null,e,n,t,s,r);var i=Yh();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,vt(n)?(i=!0,Tl(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,qh(e),s.updater=vc,e.stateNode=s,s._reactInternals=e,bd(e,n,t,r),e=Sd(null,e,n,!0,i,r)):(e.tag=0,_e&&i&&Uh(e),it(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(cl(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=D1(n),t=Kt(n,t),s){case 0:e=_d(null,e,n,t,r);break e;case 1:e=Hp(null,e,n,t,r);break e;case 11:e=Bp(null,e,n,t,r);break e;case 14:e=Wp(null,e,n,Kt(n.type,t),r);break e}throw Error(R(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),_d(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),Hp(t,e,n,s,r);case 3:e:{if(Jy(e),t===null)throw Error(R(387));n=e.pendingProps,i=e.memoizedState,s=i.element,ky(t,e),Il(e,n,null,r);var a=e.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=bi(Error(R(423)),e),e=Vp(t,e,n,r,s);break e}else if(n!==s){s=bi(Error(R(424)),e),e=Vp(t,e,n,r,s);break e}else for(kt=kn(e.stateNode.containerInfo.firstChild),_t=e,_e=!0,Xt=null,r=wy(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(yi(),n===s){e=Mr(t,e,r);break e}it(t,e,n,r)}e=e.child}return e;case 5:return _y(e),t===null&&yd(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,a=s.children,fd(n,s)?a=null:i!==null&&fd(n,i)&&(e.flags|=32),Gy(t,e),it(t,e,a,r),e.child;case 6:return t===null&&yd(e),null;case 13:return Qy(t,e,r);case 4:return Kh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=xi(e,null,n,r):it(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),Bp(t,e,n,s,r);case 7:return it(t,e,e.pendingProps,r),e.child;case 8:return it(t,e,e.pendingProps.children,r),e.child;case 12:return it(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,a=s.value,ye(Al,n._currentValue),n._currentValue=a,i!==null)if(sr(i.value,a)){if(i.children===s.children&&!gt.current){e=Mr(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Ir(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),xd(i.return,r,e),o.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===e.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(R(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),xd(a,r,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}it(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,ri(e,r),s=Mt(s),n=n(s),e.flags|=1,it(t,e,n,r),e.child;case 14:return n=e.type,s=Kt(n,e.pendingProps),s=Kt(n.type,s),Wp(t,e,n,s,r);
vendor: 6,055 bytes, line 40
40case 15:return qy(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),cl(t,e),e.tag=1,vt(n)?(t=!0,Tl(e)):t=!1,ri(e,r),Wy(e,n,s),bd(e,n,s,r),Sd(null,e,n,!0,t,r);case 19:return Zy(t,e,r);case 22:return Ky(t,e,r)}throw Error(R(156,e.tag))};function f0(t,e){return Fv(t,e)}function $1(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(t,e,r,n){return new $1(t,e,r,n)}function cf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function D1(t){if(typeof t=="function")return cf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Ch)return 11;if(t===Nh)return 14}return 2}function jn(t,e){var r=t.alternate;return r===null?(r=$t(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function hl(t,e,r,n,s,i){var a=2;if(n=t,typeof t=="function")cf(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case Fs:return as(r.children,s,i,e);case jh:a=8,s|=8;break;case Vu:return t=$t(12,r,e,s|2),t.elementType=Vu,t.lanes=i,t;case qu:return t=$t(13,r,e,s),t.elementType=qu,t.lanes=i,t;case Ku:return t=$t(19,r,e,s),t.elementType=Ku,t.lanes=i,t;case _v:return wc(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case bv:a=10;break e;case kv:a=9;break e;case Ch:a=11;break e;case Nh:a=14;break e;case rn:a=16,n=null;break e}throw Error(R(130,t==null?t:typeof t,""))}return e=$t(a,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function as(t,e,r,n){return t=$t(7,t,n,e),t.lanes=r,t}function wc(t,e,r,n){return t=$t(22,t,n,e),t.elementType=_v,t.lanes=r,t.stateNode={isHidden:!1},t}function xu(t,e,r){return t=$t(6,t,null,e),t.lanes=r,t}function wu(t,e,r){return e=$t(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function M1(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=eu(0),this.expirationTimes=eu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function uf(t,e,r,n,s,i,a,o,l){return t=new M1(t,e,r,o,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=$t(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},qh(i),t}function U1(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Us,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function p0(t){if(!t)return Rn;t=t._reactInternals;e:{if(gs(t)!==t||t.tag!==1)throw Error(R(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(vt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(R(171))}if(t.tag===1){var r=t.type;if(vt(r))return py(t,r,e)}return e}function m0(t,e,r,n,s,i,a,o,l){return t=uf(r,n,!0,t,s,i,a,o,l),t.context=p0(null),r=t.current,n=ot(),s=En(r),i=Ir(n,s),i.callback=e??null,_n(r,i,s),t.current.lanes=s,no(t,s,n),yt(t,n),t}function bc(t,e,r,n){var s=e.current,i=ot(),a=En(s);return r=p0(r),e.context===null?e.context=r:e.pendingContext=r,e=Ir(i,a),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=_n(s,e,a),t!==null&&(rr(t,s,a,i),al(t,s,a)),a}function Bl(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function tm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function df(t,e){tm(t,e),(t=t.alternate)&&tm(t,e)}function F1(){return null}var g0=typeof reportError=="function"?reportError:function(t){console.error(t)};function hf(t){this._internalRoot=t}kc.prototype.render=hf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(R(409));bc(t,e,null,null)};kc.prototype.unmount=hf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ds(function(){bc(null,t,null,null)}),e[$r]=null}};function kc(t){this._internalRoot=t}kc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Kv();t={blockedOn:null,target:t,priority:e};for(var r=0;r<an.length&&e!==0&&e<an[r].priority;r++);an.splice(r,0,t),r===0&&Jv(t)}};function ff(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function _c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function rm(){}function z1(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Bl(a);i.call(u)}}var a=m0(e,n,t,0,null,!1,!1,"",rm);return t._reactRootContainer=a,t[$r]=a.current,Ca(t.nodeType===8?t.parentNode:t),ds(),a}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var o=n;n=function(){var u=Bl(l);o.call(u)}}var l=uf(t,0,!1,null,null,!1,!1,"",rm);return t._reactRootContainer=l,t[$r]=l.current,Ca(t.nodeType===8?t.parentNode:t),ds(function(){bc(e,l,r,n)}),l}function Sc(t,e,r,n,s){var i=r._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var o=s;
vendor: 5,038 bytes, line 40
40s=function(){var l=Bl(a);o.call(l)}}bc(e,a,t,s)}else a=z1(r,e,t,s,n);return Bl(a)}Vv=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=ta(e.pendingLanes);r!==0&&(Ph(e,r|1),yt(e,Ae()),!(ce&6)&&(ki=Ae()+500,Un()))}break;case 13:ds(function(){var n=Dr(t,1);if(n!==null){var s=ot();rr(n,t,1,s)}}),df(t,1)}};Ah=function(t){if(t.tag===13){var e=Dr(t,134217728);if(e!==null){var r=ot();rr(e,t,134217728,r)}df(t,134217728)}};qv=function(t){if(t.tag===13){var e=En(t),r=Dr(t,e);if(r!==null){var n=ot();rr(r,t,e,n)}df(t,e)}};Kv=function(){return me};Gv=function(t,e){var r=me;try{return me=t,e()}finally{me=r}};nd=function(t,e,r){switch(e){case"input":if(Qu(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=pc(n);if(!s)throw Error(R(90));Ev(n),Qu(n,s)}}}break;case"textarea":Cv(t,r);break;case"select":e=r.value,e!=null&&Ys(t,!!r.multiple,e,!1)}};Iv=af;Lv=ds;var B1={usingClientEntryPoint:!1,Events:[io,Hs,pc,Av,Ov,af]},Ji={findFiberByHostInstance:Jn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},W1={bundleType:Ji.bundleType,version:Ji.version,rendererPackageName:Ji.rendererPackageName,rendererConfig:Ji.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Mv(t),t===null?null:t.stateNode},findFiberByHostInstance:Ji.findFiberByHostInstance||F1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$o.isDisabled&&$o.supportsFiber)try{uc=$o.inject(W1),yr=$o}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B1;Tt.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ff(e))throw Error(R(200));return U1(t,e,null,r)};Tt.createRoot=function(t,e){if(!ff(t))throw Error(R(299));var r=!1,n="",s=g0;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=uf(t,1,!1,null,null,r,!1,n,s),t[$r]=e.current,Ca(t.nodeType===8?t.parentNode:t),new hf(e)};Tt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(R(188)):(t=Object.keys(t).join(","),Error(R(268,t)));return t=Mv(e),t=t===null?null:t.stateNode,t};Tt.flushSync=function(t){return ds(t)};Tt.hydrate=function(t,e,r){if(!_c(e))throw Error(R(200));return Sc(null,t,e,!0,r)};Tt.hydrateRoot=function(t,e,r){if(!ff(t))throw Error(R(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",a=g0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),e=m0(e,null,t,1,r??null,s,!1,i,a),t[$r]=e.current,Ca(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new kc(e)};Tt.render=function(t,e,r){if(!_c(e))throw Error(R(200));return Sc(null,t,e,!1,r)};Tt.unmountComponentAtNode=function(t){if(!_c(t))throw Error(R(40));return t._reactRootContainer?(ds(function(){Sc(null,null,t,!1,function(){t._reactRootContainer=null,t[$r]=null})}),!0):!1};Tt.unstable_batchedUpdates=af;Tt.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!_c(r))throw Error(R(200));if(t==null||t._reactInternals===void 0)throw Error(R(38));return Sc(t,e,r,!1,n)};Tt.version="18.3.1-next-f1338f8080-20240426";function v0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v0)}catch(t){console.error(t)}}v0(),vv.exports=Tt;var oo=vv.exports;const y0=iv(oo);var x0,nm=oo;x0=nm.createRoot,nm.hydrateRoot;var Ec=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jc=typeof window>"u"||"Deno"in globalThis;function Gt(){}function H1(t,e){return typeof t=="function"?t(e):t}function V1(t){return typeof t=="number"&&t>=0&&t!==1/0}function q1(t,e){return Math.max(t+(e||0)-Date.now(),0)}function $d(t,e){return typeof t=="function"?t(e):t}function K1(t,e){return typeof t=="function"?t(e):t}function sm(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:a,stale:o}=t;
vendor: 22,766 bytes, line 40
40if(a){if(n){if(e.queryHash!==pf(a,e.options))return!1}else if(!Da(e.queryKey,a))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||s&&s!==e.state.fetchStatus||i&&!i(e))}function im(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if($a(e.options.mutationKey)!==$a(i))return!1}else if(!Da(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function pf(t,e){return((e==null?void 0:e.queryKeyHashFn)||$a)(t)}function $a(t){return JSON.stringify(t,(e,r)=>Dd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Da(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Da(t[r],e[r])):!1}function w0(t,e){if(t===e)return t;const r=am(t)&&am(e);if(r||Dd(t)&&Dd(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),a=i.length,o=r?[]:{},l=new Set(n);let u=0;for(let d=0;d<a;d++){const h=r?d:i[d];(!r&&l.has(h)||r)&&t[h]===void 0&&e[h]===void 0?(o[h]=void 0,u++):(o[h]=w0(t[h],e[h]),o[h]===t[h]&&t[h]!==void 0&&u++)}return s===a&&u===s?t:o}return e}function am(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Dd(t){if(!om(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!om(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function om(t){return Object.prototype.toString.call(t)==="[object Object]"}function G1(t){return new Promise(e=>{setTimeout(e,t)})}function J1(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?w0(t,e):e}function Q1(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function Z1(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var mf=Symbol();function b0(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===mf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Xn,un,li,Zg,Y1=(Zg=class extends Ec{constructor(){super();de(this,Xn);de(this,un);de(this,li);Y(this,li,e=>{if(!jc&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){j(this,un)||this.setEventListener(j(this,li))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,un))==null||e.call(this),Y(this,un,void 0))}setEventListener(e){var r;Y(this,li,e),(r=j(this,un))==null||r.call(this),Y(this,un,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){j(this,Xn)!==e&&(Y(this,Xn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof j(this,Xn)=="boolean"?j(this,Xn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Xn=new WeakMap,un=new WeakMap,li=new WeakMap,Zg),k0=new Y1,ci,dn,ui,Yg,X1=(Yg=class extends Ec{constructor(){super();de(this,ci,!0);de(this,dn);de(this,ui);Y(this,ui,e=>{if(!jc&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){j(this,dn)||this.setEventListener(j(this,ui))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,dn))==null||e.call(this),Y(this,dn,void 0))}setEventListener(e){var r;Y(this,ui,e),(r=j(this,dn))==null||r.call(this),Y(this,dn,e(this.setOnline.bind(this)))}setOnline(e){j(this,ci)!==e&&(Y(this,ci,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return j(this,ci)}},ci=new WeakMap,dn=new WeakMap,ui=new WeakMap,Yg),Wl=new X1;function e_(){let t,e;const r=new Promise((s,i)=>{t=s,e=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function t_(t){return Math.min(1e3*2**t,3e4)}function _0(t){return(t??"online")==="online"?Wl.isOnline():!0}var S0=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function bu(t){return t instanceof S0}function E0(t){let e=!1,r=0,n=!1,s;const i=e_(),a=m=>{var w;n||(p(new S0(m)),(w=t.abort)==null||w.call(t))},o=()=>{e=!0},l=()=>{e=!1},u=()=>k0.isFocused()&&(t.networkMode==="always"||Wl.isOnline())&&t.canRun(),d=()=>_0(t.networkMode)&&t.canRun(),h=m=>{var w;n||(n=!0,(w=t.onSuccess)==null||w.call(t,m),s==null||s(),i.resolve(m))},p=m=>{var w;n||(n=!0,(w=t.onError)==null||w.call(t,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var w;s=v=>{(n||u())&&m(v)},(w=t.onPause)==null||w.call(t)}).then(()=>{var m;s=void 0,n||(m=t.onContinue)==null||m.call(t)}),y=()=>{if(n)return;let m;const w=r===0?t.initialPromise:void 0;try{m=w??t.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(h).catch(v=>{var S;if(n)return;const g=t.retry??(jc?0:3),x=t.retryDelay??t_,k=typeof x=="function"?x(r,v):x,_=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(e||!_){p(v);return}r++,(S=t.onFail)==null||S.call(t,r,v),G1(k).then(()=>u()?void 0:f()).then(()=>{e?p(v):y()})})};return{promise:i,cancel:a,continue:()=>(s==null||s(),i),cancelRetry:o,continueRetry:l,canStart:d,start:()=>(d()?y():f().then(y),i)}}var r_=t=>setTimeout(t,0);function n_(){let t=[],e=0,r=o=>{o()},n=o=>{o()},s=r_;const i=o=>{e?t.push(o):s(()=>{r(o)})},a=()=>{const o=t;t=[],o.length&&s(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;e++;try{l=o()}finally{e--,e||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{s=o}}}var at=n_(),es,Xg,j0=(Xg=class{constructor(){de(this,es)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),V1(this.gcTime)&&Y(this,es,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(jc?1/0:5*60*1e3))}clearGcTimeout(){j(this,es)&&(clearTimeout(j(this,es)),Y(this,es,void 0))}},es=new WeakMap,Xg),di,ts,Ot,rs,et,eo,ns,Qt,jr,ev,s_=(ev=class extends j0{constructor(e){super();de(this,Qt);de(this,di);de(this,ts);de(this,Ot);de(this,rs);de(this,et);de(this,eo);de(this,ns);Y(this,ns,!1),Y(this,eo,e.defaultOptions),this.setOptions(e.options),this.observers=[],Y(this,rs,e.client),Y(this,Ot,j(this,rs).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Y(this,di,a_(this.options)),this.state=e.state??j(this,di),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,et))==null?void 0:e.promise}setOptions(e){this.options={...j(this,eo),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Ot).remove(this)}setData(e,r){const n=J1(this.state.data,e,this.options);return Ze(this,Qt,jr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){Ze(this,Qt,jr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=j(this,et))==null?void 0:n.promise;return(s=j(this,et))==null||s.cancel(e),r?r.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,di))}isActive(){return this.observers.some(e=>K1(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$d(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:!q1(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=j(this,et))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=j(this,et))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,Ot).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(j(this,et)&&(j(this,ns)?j(this,et).cancel({revert:!0}):j(this,et).cancelRetry()),this.scheduleGc()),j(this,Ot).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Qt,jr).call(this,{type:"invalidate"})}fetch(e,r){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(j(this,et))return j(this,et).continueRetry(),j(this,et).promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Y(this,ns,!0),n.signal)})},i=()=>{const p=b0(this.options,r),y=(()=>{const m={client:j(this,rs),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return Y(this,ns,!1),this.options.persister?this.options.persister(p,y,this):p(y)},o=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:j(this,rs),state:this.state,fetchFn:i};return s(p),p})();(u=this.options.behavior)==null||u.onFetch(o,this),Y(this,ts,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&Ze(this,Qt,jr).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,y,m,w;bu(p)&&p.silent||Ze(this,Qt,jr).call(this,{type:"error",error:p}),bu(p)||((y=(f=j(this,Ot).config).onError)==null||y.call(f,p,this),(w=(m=j(this,Ot).config).onSettled)==null||w.call(m,this.state.data,p,this)),this.scheduleGc()};return Y(this,et,E0({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,y,m,w;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){l(v);return}(y=(f=j(this,Ot).config).onSuccess)==null||y.call(f,p,this),(w=(m=j(this,Ot).config).onSettled)==null||w.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{Ze(this,Qt,jr).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Ze(this,Qt,jr).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Qt,jr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,et).start()}},di=new WeakMap,ts=new WeakMap,Ot=new WeakMap,rs=new WeakMap,et=new WeakMap,eo=new WeakMap,ns=new WeakMap,Qt=new WeakSet,jr=function(e){const r=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,...i_(n.data,this.options),fetchMeta:e.meta??null};case"success":return Y(this,ts,void 0),{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return bu(s)&&s.revert&&j(this,ts)?{...j(this,ts),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),at.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),j(this,Ot).notify({query:this,type:"updated",action:e})})},ev);function i_(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_0(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function a_(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var hr,tv,o_=(tv=class extends Ec{constructor(e={}){super();de(this,hr);this.config=e,Y(this,hr,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??pf(s,r);let a=this.get(i);return a||(a=new s_({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){j(this,hr).has(e.queryHash)||(j(this,hr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=j(this,hr).get(e.queryHash);r&&(e.destroy(),r===e&&j(this,hr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,hr).get(e)}getAll(){return[...j(this,hr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>sm(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>sm(e,n)):r}notify(e){at.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},hr=new WeakMap,tv),fr,st,ss,pr,en,rv,l_=(rv=class extends j0{constructor(e){super();de(this,pr);de(this,fr);de(this,st);de(this,ss);this.mutationId=e.mutationId,Y(this,st,e.mutationCache),Y(this,fr,[]),this.state=e.state||c_(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,fr).includes(e)||(j(this,fr).push(e),this.clearGcTimeout(),j(this,st).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Y(this,fr,j(this,fr).filter(r=>r!==e)),this.scheduleGc(),j(this,st).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,fr).length||(this.state.status==="pending"?this.scheduleGc():j(this,st).remove(this))}continue(){var e;return((e=j(this,ss))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,a,o,l,u,d,h,p,f,y,m,w,v,g,x,k,_,S,E,T;const r=()=>{Ze(this,pr,en).call(this,{type:"continue"})};Y(this,ss,E0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(O,I)=>{Ze(this,pr,en).call(this,{type:"failed",failureCount:O,error:I})},onPause:()=>{Ze(this,pr,en).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,st).canRun(this)}));const n=this.state.status==="pending",s=!j(this,ss).canStart();try{if(n)r();else{Ze(this,pr,en).call(this,{type:"pending",variables:e,isPaused:s}),await((a=(i=j(this,st).config).onMutate)==null?void 0:a.call(i,e,this));const I=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e));I!==this.state.context&&Ze(this,pr,en).call(this,{type:"pending",context:I,variables:e,isPaused:s})}const O=await j(this,ss).start();return await((d=(u=j(this,st).config).onSuccess)==null?void 0:d.call(u,O,e,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,O,e,this.state.context)),await((y=(f=j(this,st).config).onSettled)==null?void 0:y.call(f,O,null,this.state.variables,this.state.context,this)),await((w=(m=this.options).onSettled)==null?void 0:w.call(m,O,null,e,this.state.context)),Ze(this,pr,en).call(this,{type:"success",data:O}),O}catch(O){try{throw await((g=(v=j(this,st).config).onError)==null?void 0:g.call(v,O,e,this.state.context,this)),await((k=(x=this.options).onError)==null?void 0:k.call(x,O,e,this.state.context)),await((S=(_=j(this,st).config).onSettled)==null?void 0:S.call(_,void 0,O,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,O,e,this.state.context)),O}finally{Ze(this,pr,en).call(this,{type:"error",error:O})}}finally{j(this,st).runNext(this)}}},fr=new WeakMap,st=new WeakMap,ss=new WeakMap,pr=new WeakSet,en=function(e){const r=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=r(this.state),at.batch(()=>{j(this,fr).forEach(n=>{n.onMutationUpdate(e)}),j(this,st).notify({mutation:this,type:"updated",action:e})})},rv);function c_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pr,Zt,to,nv,u_=(nv=class extends Ec{constructor(e={}){super();de(this,Pr);de(this,Zt);de(this,to);this.config=e,Y(this,Pr,new Set),Y(this,Zt,new Map),Y(this,to,0)}build(e,r,n){const s=new l_({mutationCache:this,mutationId:++xo(this,to)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){j(this,Pr).add(e);const r=Do(e);if(typeof r=="string"){const n=j(this,Zt).get(r);n?n.push(e):j(this,Zt).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(j(this,Pr).delete(e)){const r=Do(e);if(typeof r=="string"){const n=j(this,Zt).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&j(this,Zt).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Do(e);if(typeof r=="string"){const n=j(this,Zt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=Do(e);if(typeof r=="string"){const s=(n=j(this,Zt).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){at.batch(()=>{j(this,Pr).forEach(e=>{this.notify({type:"removed",mutation:e})}),j(this,Pr).clear(),j(this,Zt).clear()})}getAll(){return Array.from(j(this,Pr))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>im(r,n))}findAll(e={}){return this.getAll().filter(r=>im(e,r))}notify(e){at.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return at.batch(()=>Promise.all(e.map(r=>r.continue().catch(Gt))))}},Pr=new WeakMap,Zt=new WeakMap,to=new WeakMap,nv);function Do(t){var e;return(e=t.options.scope)==null?void 0:e.id}function lm(t){return{onFetch:(e,r)=>{var d,h,p,f,y;const n=e.options,s=(p=(h=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],a=((y=e.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const w=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},v=b0(e.options,e.fetchOptions),g=async(x,k,_)=>{if(m)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const E=(()=>{const q={client:e.client,queryKey:e.queryKey,pageParam:k,direction:_?"backward":"forward",meta:e.options.meta};return w(q),q})(),T=await v(E),{maxPages:O}=e.options,I=_?Z1:Q1;return{pages:I(x.pages,T,O),pageParams:I(x.pageParams,k,O)}};if(s&&i.length){const x=s==="backward",k=x?d_:cm,_={pages:i,pageParams:a},S=k(n,_);o=await g(_,S,x)}else{const x=t??i.length;do{const k=l===0?a[0]??n.initialPageParam:cm(n,o);if(l>0&&k==null)break;o=await g(o,k),l++}while(l<x)}return o};e.options.persister?e.fetchFn=()=>{var m,w;return(w=(m=e.options).persister)==null?void 0:w.call(m,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=u}}}function cm(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function d_(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var Ne,hn,fn,hi,fi,pn,pi,mi,sv,h_=(sv=class{constructor(t={}){de(this,Ne);de(this,hn);de(this,fn);de(this,hi);de(this,fi);de(this,pn);de(this,pi);de(this,mi);Y(this,Ne,t.queryCache||new o_),Y(this,hn,t.mutationCache||new u_),Y(this,fn,t.defaultOptions||{}),Y(this,hi,new Map),Y(this,fi,new Map),Y(this,pn,0)}mount(){xo(this,pn)._++,j(this,pn)===1&&(Y(this,pi,k0.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,Ne).onFocus())})),Y(this,mi,Wl.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,Ne).onOnline())})))}unmount(){var t,e;xo(this,pn)._--,j(this,pn)===0&&((t=j(this,pi))==null||t.call(this),Y(this,pi,void 0),(e=j(this,mi))==null||e.call(this),Y(this,mi,void 0))}isFetching(t){return j(this,Ne).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,hn).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=j(this,Ne).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=j(this,Ne).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime($d(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return j(this,Ne).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=j(this,Ne).get(n.queryHash),i=s==null?void 0:s.state.data,a=H1(e,i);if(a!==void 0)return j(this,Ne).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(t,e,r){return at.batch(()=>j(this,Ne).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=j(this,Ne).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=j(this,Ne);at.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=j(this,Ne);return at.batch(()=>(r.findAll(t).forEach(n=>
40{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=at.batch(()=>j(this,Ne).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(Gt).catch(Gt)}invalidateQueries(t,e={}){return at.batch(()=>(j(this,Ne).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=at.batch(()=>j(this,Ne).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Gt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Gt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=j(this,Ne).build(this,e);return r.isStaleByTime($d(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Gt).catch(Gt)}fetchInfiniteQuery(t){return t.behavior=lm(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Gt).catch(Gt)}ensureInfiniteQueryData(t){return t.behavior=lm(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wl.isOnline()?j(this,hn).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Ne)}getMutationCache(){return j(this,hn)}getDefaultOptions(){return j(this,fn)}setDefaultOptions(t){Y(this,fn,t)}setQueryDefaults(t,e){j(this,hi).set($a(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...j(this,hi).values()],r={};return e.forEach(n=>{Da(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){j(this,fi).set($a(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...j(this,fi).values()],r={};return e.forEach(n=>{Da(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...j(this,fn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=pf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===mf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,fn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,Ne).clear(),j(this,hn).clear()}},Ne=new WeakMap,hn=new WeakMap,fn=new WeakMap,hi=new WeakMap,fi=new WeakMap,pn=new WeakMap,pi=new WeakMap,mi=new WeakMap,sv),f_=b.createContext(void 0),p_=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),c.jsx(f_.Provider,{value:t,children:e}));/**
41 * @remix-run/router v1.23.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function Ma(){return Ma=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ma.apply(this,arguments)}var vn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(vn||(vn={}));const um="popstate";function m_(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:a,hash:o}=n.location;return Md("",{pathname:i,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Hl(s)}return v_(e,r,null,t)}function De(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function C0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function g_(){return Math.random().toString(36).substr(2,8)}function dm(t,e){return{usr:t.state,key:t.key,idx:e}}function Md(t,e,r,n){return r===void 0&&(r=null),Ma({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Oi(e):e,{state:r,key:e&&e.key||n||g_()})}function Hl(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Oi(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function v_(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,a=s.history,o=vn.Pop,l=null,u=d();u==null&&(u=0,a.replaceState(Ma({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){o=vn.Pop;let w=d(),v=w==null?null:w-u;u=w,l&&l({action:o,location:m.location,delta:v})}function p(w,v){o=vn.Push;let g=Md(m.location,w,v);u=d()+1;let x=dm(g,u),k=m.createHref(g);try{a.pushState(x,"",k)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(k)}i&&l&&l({action:o,location:m.location,delta:1})}function f(w,v){o=vn.Replace;let g=Md(m.location,w,v);u=d();let x=dm(g,u),k=m.createHref(g);a.replaceState(x,"",k),i&&l&&l({action:o,location:m.location,delta:0})}function y(w){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof w=="string"?w:Hl(w);return g=g.replace(/ $/,"%20"),De(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let m={get action(){return o},get location(){return t(s,a)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(um,h),l=w,()=>{s.removeEventListener(um,h),l=null}},createHref(w){return e(s,w)},createURL:y,encodeLocation(w){let v=y(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(w){return a.go(w)}};return m}var hm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(hm||(hm={}));function y_(t,e,r){return r===void 0&&(r="/"),x_(t,e,r,!1)}function x_(t,e,r,n){let s=typeof e=="string"?Oi(e):e,i=gf(s.pathname||"/",r);if(i==null)return null;let a=N0(t);w_(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let u=P_(i);o=T_(a[l],u,n)}return o}function N0(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,a,o)=>{let l={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(De(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Cn([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(De(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),N0(i.children,e,d,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:C_(u,i.index),routesMeta:d})};return t.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let l of T0(i.path))s(i,a,l)}),e}function T0(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let a=T0(n.join("/")),o=[];return o.push(...a.map(l=>l===""?i:[i,l].join("/"))),s&&o.push(...a),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function w_(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:N_(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const b_=/^:[\w-]+$/,k_=3,__=2,S_=1,E_=10,j_=-2,fm=t=>t==="*";function C_(t,e){let r=t.split("/"),n=r.length;return r.some(fm)&&(n+=j_),e&&(n+=__),r.filter(s=>!fm(s)).reduce((s,i)=>s+(b_.test(i)?k_:i===""?S_:E_),n)}function N_(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function T_(t,e,r){let{routesMeta:n}=t,s={},i="/",a=[];for(let o=0;o<n.length;++o){let l=n[o],u=o===n.length-1,d=i==="/"?e:e.slice(i.length)||"/",h=pm({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),p=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=pm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,263 bytes, lines 49-58
49Object.assign(s,h.params),a.push({params:s,pathname:Cn([i,h.pathname]),pathnameBase:L_(Cn([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=Cn([i,h.pathnameBase]))}return a}function pm(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=R_(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let m=o[h]||"";a=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const y=o[h];return f&&!y?u[p]=void 0:u[p]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:t}}function R_(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),C0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function P_(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return C0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function gf(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function A_(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Oi(t):t;return{pathname:r?r.startsWith("/")?r:O_(r,e):e,search:$_(n),hash:D_(s)}}function O_(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function ku(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function I_(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function R0(t,e){let r=I_(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function P0(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Oi(t):(s=Ma({},t),De(!s.pathname||!s.pathname.includes("?"),ku("?","pathname","search",s)),De(!s.pathname||!s.pathname.includes("#"),ku("#","pathname","hash",s)),De(!s.search||!s.search.includes("#"),ku("#","search","hash",s)));let i=t===""||s.pathname==="",a=i?"/":s.pathname,o;if(a==null)o=r;else{let h=e.length-1;if(!n&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}o=h>=0?e[h]:"/"}let l=A_(s,o),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Cn=t=>t.join("/").replace(/\/\/+/g,"/"),L_=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),$_=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,D_=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function M_(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const A0=["post","put","patch","delete"];new Set(A0);const U_=["get",...A0];new Set(U_);/**
50 * React Router v6.30.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function Ua(){return Ua=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ua.apply(this,arguments)}const vf=b.createContext(null),F_=b.createContext(null),vs=b.createContext(null),Cc=b.createContext(null),Fn=b.createContext({outlet:null,matches:[],isDataRoute:!1}),O0=b.createContext(null);function z_(t,e){let{relative:r}=e===void 0?{}:e;lo()||De(!1);let{basename:n,navigator:s}=b.useContext(vs),{hash:i,pathname:a,search:o}=L0(t,{relative:r}),l=a;return n!=="/"&&(l=a==="/"?n:Cn([n,a])),s.createHref({pathname:l,search:o,hash:i})}function lo(){return b.useContext(Cc)!=null}function co(){return lo()||De(!1),b.useContext(Cc).location}function I0(t){b.useContext(vs).static||b.useLayoutEffect(t)}function B_(){let{isDataRoute:t}=b.useContext(Fn);return t?rS():W_()}function W_(){lo()||De(!1);let t=b.useContext(vf),{basename:e,future:r,navigator:n}=b.useContext(vs),{matches:s}=b.useContext(Fn),{pathname:i}=co(),a=JSON.stringify(R0(s,r.v7_relativeSplatPath)),o=b.useRef(!1);return I0(()=>{o.current=!0}),b.useCallback(function(u,d){if(d===void 0&&(d={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let h=P0(u,JSON.parse(a),i,d.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:Cn([e,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[e,n,a,i,t])}function H_(){let{matches:t}=b.useContext(Fn),e=t[t.length-1];return e?e.params:{}}function L0(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=b.useContext(vs),{matches:s}=b.useContext(Fn),{pathname:i}=co(),a=JSON.stringify(R0(s,n.v7_relativeSplatPath));return b.useMemo(()=>P0(t,JSON.parse(a),i,r==="path"),[t,a,i,r])}function V_(t,e){return q_(t,e)}function q_(t,e,r,n){lo()||De(!1);let{navigator:s}=b.useContext(vs),{matches:i}=b.useContext(Fn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=co(),d;if(e){var h;let w=typeof e=="string"?Oi(e):e;l==="/"||(h=w.pathname)!=null&&h.startsWith(l)||De(!1),d=w}else d=u;let p=d.pathname||"/",f=p;if(l!=="/"){let w=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=y_(t,{pathname:f}),m=Z_(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Cn([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Cn([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,r,n);return e&&m?b.createElement(Cc.Provider,{value:{location:Ua({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:vn.Pop}},m):m}function K_(){let t=tS(),e=M_(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),r?b.createElement("pre",{style:s},r):null,null)}const G_=b.createElement(K_,null);class J_ extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?b.createElement(Fn.Provider,{value:this.props.routeContext},b.createElement(O0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Q_(t){let{routeContext:e,match:r,children:n}=t,s=b.useContext(vf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Fn.Provider,{value:e},n)}function Z_(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let a=t,o=(s=r)==null?void 0:s.errors;if(o!=null){let d=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);d>=0||De(!1),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:p,errors:f}=r,y=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||y){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,p)=>{let f,y=!1,m=null,w=null;r&&(f=o&&h.route.id?o[h.route.id]:void 0,m=h.route.errorElement||G_,l&&(u<0&&p===0?(y=!0,w=null):u===p&&(y=!0,w=h.route.hydrateFallbackElement||null)));let v=e.concat(a.slice(0,p+1)),g=()=>{let x;return f?x=m:y?x=w:h.route.Component?x=b.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,b.createElement(Q_,{match:h,routeC
58ontext:{outlet:d,matches:v,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(J_,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var $0=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}($0||{}),Vl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Vl||{});function Y_(t){let e=b.useContext(vf);return e||De(!1),e}function X_(t){let e=b.useContext(F_);return e||De(!1),e}function eS(t){let e=b.useContext(Fn);return e||De(!1),e}function D0(t){let e=eS(),r=e.matches[e.matches.length-1];return r.route.id||De(!1),r.route.id}function tS(){var t;let e=b.useContext(O0),r=X_(Vl.UseRouteError),n=D0(Vl.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function rS(){let{router:t}=Y_($0.UseNavigateStable),e=D0(Vl.UseNavigateStable),r=b.useRef(!1);return I0(()=>{r.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Ua({fromRouteId:e},i)))},[t,e])}function nS(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function ht(t){De(!1)}function sS(t){let{basename:e="/",children:r=null,location:n,navigationType:s=vn.Pop,navigator:i,static:a=!1,future:o}=t;lo()&&De(!1);let l=e.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:a,future:Ua({v7_relativeSplatPath:!1},o)}),[l,o,i,a]);typeof n=="string"&&(n=Oi(n));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:y="default"}=n,m=b.useMemo(()=>{let w=gf(d,l);return w==null?null:{location:{pathname:w,search:h,hash:p,state:f,key:y},navigationType:s}},[l,d,h,p,f,y,s]);return m==null?null:b.createElement(vs.Provider,{value:u},b.createElement(Cc.Provider,{children:r,value:m}))}function iS(t){let{children:e,location:r}=t;return V_(Ud(e),r)}new Promise(()=>{});function Ud(t,e){e===void 0&&(e=[]);let r=[];return b.Children.forEach(t,(n,s)=>{if(!b.isValidElement(n))return;let i=[...e,s];if(n.type===b.Fragment){r.push.apply(r,Ud(n.props.children,i));return}n.type!==ht&&De(!1),!n.props.index||!n.props.children||De(!1);let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=Ud(n.props.children,i)),r.push(a)}),r}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function Fd(){return Fd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fd.apply(this,arguments)}function aS(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function oS(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function lS(t,e){return t.button===0&&(!e||e==="_self")&&!oS(t)}const cS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uS="6";try{window.__reactRouterVersion=uS}catch{}const dS="startTransition",mm=kh[dS];function hS(t){let{basename:e,children:r,future:n,window:s}=t,i=b.useRef();i.current==null&&(i.current=m_({window:s,v5Compat:!0}));let a=i.current,[o,l]=b.useState({action:a.action,location:a.location}),{v7_startTransition:u}=n||{},d=b.useCallback(h=>{u&&mm?mm(()=>l(h)):l(h)},[l,u]);return b.useLayoutEffect(()=>a.listen(d),[a,d]),b.useEffect(()=>nS(n),[n]),b.createElement(sS,{basename:e,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const fS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fe=b.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:a,state:o,target:l,to:u,preventScrollReset:d,viewTransition:h}=e,p=aS(e,cS),{basename:f}=b.useContext(vs),y,m=!1;if(typeof u=="string"&&pS.test(u)&&(y=u,fS))try{let x=new URL(window.location.href),k=u.startsWith("//")?new URL(x.protocol+u):new URL(u),_=gf(k.pathname,f);k.origin===x.origin&&_!=null?u=_+k.search+k.hash:m=!0}catch{}let w=z_(u,{relative:s}),v=mS(u,{replace:a,state:o,target:l,preventScrollReset:d,relative:s,viewTransition:h});function g(x){n&&n(x),x.defaultPrevented||v(x)}return b.createElement("a",Fd({},p,{href:y||w,onClick:m||i?n:g,ref:r,target:l}))});var gm;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(gm||(gm={}));var vm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(vm||(vm={}));function mS(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:a,viewTransition:o}=e===void 0?{}:e,l=B_(),u=co(),d=L0(t,{relative:a});return b.useCallback(h=>{if(lS(h,r)){h.preventDefault();let p=n!==void 0?n:Hl(u)===Hl(d);l(t,{replace:p,state:s,preventScrollReset:i,relative:a,viewTransition:o})}},[u,l,d,n,s,r,t,i,a,o])}var ym=["light","dark"],gS="(prefers-color-scheme: dark)",vS=b.createContext(void 0),yS={setTheme:t=>{},themes:[]},xS=()=>{var t;return(t=b.useContext(vS))!=null?t:yS};b.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:a,attrs:o,nonce:l})=>{let u=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?ym.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(y,m=!1,w=!0)=>{let v=a?a[y]:y,g=m?y+"|| ''":`'${v}'`,x="";return s&&w&&!m&&ym.includes(y)&&(x+=`d.style.colorScheme = '${y}';`),r==="class"?m||v?x+=`c.add(${g})`:x+="null":v&&(x+=`d[s](n,${g})`),x},f=t?`!function(){${d}${p(t)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${gS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${p(a?"x[e]":"e",!0)}}
67${u?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${e}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${p(a?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var wS=t=>{switch(t){case"success":return _S;case"info":return ES;case"warning":return SS;case"error":return jS;default:return null}},bS=Array(12).fill(0),kS=({visible:t,className:e})=>P.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},P.createElement("div",{className:"sonner-spinner"},bS.map((r,n)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),_S=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),SS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.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"})),ES=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),jS=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),CS=P.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"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),NS=()=>{let[t,e]=P.useState(document.hidden);return P.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},zd=1,TS=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:zd++,i=this.toasts.find(o=>o.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(o=>o.id===s?(this.publish({...o,...t,id:s,title:r}),{...o,...t,id:s,dismissible:a,title:r}):o):this.addToast({title:r,...n,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),s=r!==void 0,i,a=n.then(async l=>{if(i=["resolve",l],P.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(PS(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,d=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:u,description:d})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,d=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,d=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),o=()=>new Promise((l,u)=>a.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:o}:Object.assign(r,{unwrap:o})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||zd++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ft=new TS,RS=(t,e)=>{let r=(e==null?void 0:e.id)||zd++;return ft.addToast({title:t,...e,id:r}),r},PS=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",AS=RS,OS=()=>ft.toasts,IS=()=>ft.getActiveToasts(),LS=Object.assign(AS,{success:ft.success,info:ft.info,warning:ft.warning,error:ft.error,custom:ft.custom,message:ft.message,promise:ft.promise,dismiss:ft.dismiss,loading:ft.loading},{getHistory:OS,getToasts:IS});function $S(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}$S(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left: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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
68`);function Mo(t){return t.label!==void 0}var DS=3,MS="32px",US="16px",xm=4e3,FS=356,zS=14,BS=20,WS=200;function Vt(...t){return t.filter(Boolean).join(" ")}function HS(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var VS=t=>{var e,r,n,s,i,a,o,l,u,d,h;let{invert:p,toast:f,unstyled:y,interacting:m,setHeights:w,visibleToasts:v,heights:g,index:x,toasts:k,expanded:_,removeToast:S,defaultRichColors:E,closeButton:T,style:O,cancelButtonStyle:I,actionButtonStyle:q,className:F="",descriptionClassName:re="",duration:$,position:oe,gap:K,loadingIcon:ee,expandByDefault:C,classNames:N,icons:M,closeButtonAriaLabel:X="Close toast",pauseWhenPageIsHidden:H}=t,[se,ae]=P.useState(null),[Ie,Qe]=P.useState(null),[pe,xs]=P.useState(!1),[Vr,zn]=P.useState(!1),[qr,ws]=P.useState(!1),[Kr,go]=P.useState(!1),[Hc,vo]=P.useState(!1),[Vc,Fi]=P.useState(0),[bs,Bf]=P.useState(0),zi=P.useRef(f.duration||$||xm),Wf=P.useRef(null),Bn=P.useRef(null),cb=x===0,ub=x+1<=v,Pt=f.type,ks=f.dismissible!==!1,db=f.className||"",hb=f.descriptionClassName||"",yo=P.useMemo(()=>g.findIndex(Z=>Z.toastId===f.id)||0,[g,f.id]),fb=P.useMemo(()=>{var Z;return(Z=f.closeButton)!=null?Z:T},[f.closeButton,T]),Hf=P.useMemo(()=>f.duration||$||xm,[f.duration,$]),qc=P.useRef(0),_s=P.useRef(0),Vf=P.useRef(0),Ss=P.useRef(null),[pb,mb]=oe.split("-"),qf=P.useMemo(()=>g.reduce((Z,ge,ke)=>ke>=yo?Z:Z+ge.height,0),[g,yo]),Kf=NS(),gb=f.invert||p,Kc=Pt==="loading";_s.current=P.useMemo(()=>yo*K+qf,[yo,qf]),P.useEffect(()=>{zi.current=Hf},[Hf]),P.useEffect(()=>{xs(!0)},[]),P.useEffect(()=>{let Z=Bn.current;if(Z){let ge=Z.getBoundingClientRect().height;return Bf(ge),w(ke=>[{toastId:f.id,height:ge,position:f.position},...ke]),()=>w(ke=>ke.filter(zt=>zt.toastId!==f.id))}},[w,f.id]),P.useLayoutEffect(()=>{if(!pe)return;let Z=Bn.current,ge=Z.style.height;Z.style.height="auto";let ke=Z.getBoundingClientRect().height;Z.style.height=ge,Bf(ke),w(zt=>zt.find(Bt=>Bt.toastId===f.id)?zt.map(Bt=>Bt.toastId===f.id?{...Bt,height:ke}:Bt):[{toastId:f.id,height:ke,position:f.position},...zt])},[pe,f.title,f.description,w,f.id]);let Gr=P.useCallback(()=>{zn(!0),Fi(_s.current),w(Z=>Z.filter(ge=>ge.toastId!==f.id)),setTimeout(()=>{S(f)},WS)},[f,S,w,_s]);P.useEffect(()=>{if(f.promise&&Pt==="loading"||f.duration===1/0||f.type==="loading")return;let Z;return _||m||H&&Kf?(()=>{if(Vf.current<qc.current){let ge=new Date().getTime()-qc.current;zi.current=zi.current-ge}
68Vf.current=new Date().getTime()})():zi.current!==1/0&&(qc.current=new Date().getTime(),Z=setTimeout(()=>{var ge;(ge=f.onAutoClose)==null||ge.call(f,f),Gr()},zi.current)),()=>clearTimeout(Z)},[_,m,f,Pt,H,Kf,Gr]),P.useEffect(()=>{f.delete&&Gr()},[Gr,f.delete]);function vb(){var Z,ge,ke;return M!=null&&M.loading?P.createElement("div",{className:Vt(N==null?void 0:N.loader,(Z=f==null?void 0:f.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":Pt==="loading"},M.loading):ee?P.createElement("div",{className:Vt(N==null?void 0:N.loader,(ge=f==null?void 0:f.classNames)==null?void 0:ge.loader,"sonner-loader"),"data-visible":Pt==="loading"},ee):P.createElement(kS,{className:Vt(N==null?void 0:N.loader,(ke=f==null?void 0:f.classNames)==null?void 0:ke.loader),visible:Pt==="loading"})}return P.createElement("li",{tabIndex:0,ref:Bn,className:Vt(F,db,N==null?void 0:N.toast,(e=f==null?void 0:f.classNames)==null?void 0:e.toast,N==null?void 0:N.default,N==null?void 0:N[Pt],(r=f==null?void 0:f.classNames)==null?void 0:r[Pt]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:E,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":pe,"data-promise":!!f.promise,"data-swiped":Hc,"data-removed":Vr,"data-visible":ub,"data-y-position":pb,"data-x-position":mb,"data-index":x,"data-front":cb,"data-swiping":qr,"data-dismissible":ks,"data-type":Pt,"data-invert":gb,"data-swipe-out":Kr,"data-swipe-direction":Ie,"data-expanded":!!(_||C&&pe),style:{"--index":x,"--toasts-before":x,"--z-index":k.length-x,"--offset":`${Vr?Vc:_s.current}px`,"--initial-height":C?"auto":`${bs}px`,...O,...f.style},onDragEnd:()=>{ws(!1),ae(null),Ss.current=null},onPointerDown:Z=>{Kc||!ks||(Wf.current=new Date,Fi(_s.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(ws(!0),Ss.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,ge,ke,zt;if(Kr||!ks)return;Ss.current=null;let Bt=Number(((Z=Bn.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Jr=Number(((ge=Bn.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Wn=new Date().getTime()-((ke=Wf.current)==null?void 0:ke.getTime()),Wt=se==="x"?Bt:Jr,Qr=Math.abs(Wt)/Wn;if(Math.abs(Wt)>=BS||Qr>.11){Fi(_s.current),(zt=f.onDismiss)==null||zt.call(f,f),Qe(se==="x"?Bt>0?"right":"left":Jr>0?"down":"up"),Gr(),go(!0),vo(!1);return}ws(!1),ae(null)},onPointerMove:Z=>{var ge,ke,zt,Bt;if(!Ss.current||!ks||((ge=window.getSelection())==null?void 0:ge.toString().length)>0)return;let Jr=Z.clientY-Ss.current.y,Wn=Z.clientX-Ss.current.x,Wt=(ke=t.swipeDirections)!=null?ke:HS(oe);!se&&(Math.abs(Wn)>1||Math.abs(Jr)>1)&&ae(Math.abs(Wn)>Math.abs(Jr)?"x":"y");let Qr={x:0,y:0};se==="y"?(Wt.includes("top")||Wt.includes("bottom"))&&(Wt.includes("top")&&Jr<0||Wt.includes("bottom")&&Jr>0)&&(Qr.y=Jr):se==="x"&&(Wt.includes("left")||Wt.includes("right"))&&(Wt.includes("left")&&Wn<0||Wt.includes("right")&&Wn>0)&&(Qr.x=Wn),(Math.abs(Qr.x)>0||Math.abs(Qr.y)>0)&&vo(!0),(zt=Bn.current)==null||zt.style.setProperty("--swipe-amount-x",`${Qr.x}px`),(Bt=Bn.current)==null||Bt.style.setProperty("--swipe-amount-y",`${Qr.y}px`)}},fb&&!f.jsx?P.createElement("button",{"aria-label":X,"data-disabled":Kc,"data-close-button":!0,onClick:Kc||!ks?()=>{}:()=>{var Z;Gr(),(Z=f.onDismiss)==null||Z.call(f,f)},className:Vt(N==null?void 0:N.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:CS):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:P.createElement(P.Fragment,null,Pt||f.icon||f.promise?P.createElement("div",{"data-icon":"",className:Vt(N==null?void 0:N.icon,(a=f==null?void 0:f.classNames)==null?void 0:a.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||vb():null,f.type!=="loading"?f.icon||(M==null?void 0:M[Pt])||wS(Pt):null):null,P.createElement("div",{"data-content":"",className:Vt(N==null?void 0:N.content,(o=f==null?void 0:f.classNames)==null?void 0:o.content)},P.createElement("div",{"data-title":"",className:Vt(N==null?void 0:N.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?P.createElement("div",{"data-description":"",className:Vt(re,hb,N==null?void 0:N.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&Mo(f.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||I,onClick:Z=>{var ge,ke;Mo(f.cancel)&&ks&&((ke=(ge=f.cancel).onClick)==null||ke.call(ge,Z),Gr())},className:Vt(N==null?void 0:N.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&Mo(f.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||q,onClick:Z=>{var ge,ke;Mo(f.action)&&((ke=(ge=f.action).onClick)==null||ke.call(ge,Z),!Z.defaultPrevented&&Gr())},className:Vt(N==null?void 0:N.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};
68function wm(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function qS(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,a=i?"--mobile-offset":"--offset",o=i?US:MS;function l(u){["top","right","bottom","left"].forEach(d=>{r[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${a}-${u}`]=o:r[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(o)}),r}var KS=b.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:l,mobileOffset:u,theme:d="light",richColors:h,duration:p,style:f,visibleToasts:y=DS,toastOptions:m,dir:w=wm(),gap:v=zS,loadingIcon:g,icons:x,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:_}=t,[S,E]=P.useState([]),T=P.useMemo(()=>Array.from(new Set([n].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,n]),[O,I]=P.useState([]),[q,F]=P.useState(!1),[re,$]=P.useState(!1),[oe,K]=P.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=P.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=P.useRef(null),M=P.useRef(!1),X=P.useCallback(H=>{E(se=>{var ae;return(ae=se.find(Ie=>Ie.id===H.id))!=null&&ae.delete||ft.dismiss(H.id),se.filter(({id:Ie})=>Ie!==H.id)})},[]);return P.useEffect(()=>ft.subscribe(H=>{if(H.dismiss){E(se=>se.map(ae=>ae.id===H.id?{...ae,delete:!0}:ae));return}setTimeout(()=>{y0.flushSync(()=>{E(se=>{let ae=se.findIndex(Ie=>Ie.id===H.id);return ae!==-1?[...se.slice(0,ae),{...se[ae],...H},...se.slice(ae+1)]:[H,...se]})})})}),[]),P.useEffect(()=>{if(d!=="system"){K(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:se})=>{K(se?"dark":"light")})}catch{H.addListener(({matches:ae})=>{try{K(ae?"dark":"light")}catch(Ie){console.error(Ie)}})}},[d]),P.useEffect(()=>{S.length<=1&&F(!1)},[S]),P.useEffect(()=>{let H=se=>{var ae,Ie;s.every(Qe=>se[Qe]||se.code===Qe)&&(F(!0),(ae=ee.current)==null||ae.focus()),se.code==="Escape"&&(document.activeElement===ee.current||(Ie=ee.current)!=null&&Ie.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),P.useEffect(()=>{if(ee.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,M.current=!1)}},[ee.current]),P.createElement("section",{ref:e,"aria-label":`${k} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((H,se)=>{var ae;let[Ie,Qe]=H.split("-");return S.length?P.createElement("ol",{key:H,dir:w==="auto"?wm():w,tabIndex:-1,ref:ee,className:o,"data-sonner-toaster":!0,"data-theme":oe,"data-y-position":Ie,"data-lifted":q&&S.length>1&&!i,"data-x-position":Qe,style:{"--front-toast-height":`${((ae=O[0])==null?void 0:ae.height)||0}px`,"--width":`${FS}px`,"--gap":`${v}px`,...f,...qS(l,u)},onBlur:pe=>{M.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(M.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||M.current||(M.current=!0,N.current=pe.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{re||F(!1)},onDragEnd:()=>F(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},S.filter(pe=>!pe.position&&se===0||pe.position===H).map((pe,xs)=>{var Vr,zn;return P.createElement(VS,{key:pe.id,icons:x,index:xs,toast:pe,defaultRichColors:h,duration:(Vr=m==null?void 0:m.duration)!=null?Vr:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:y,closeButton:(zn=m==null?void 0:m.closeButton)!=null?zn:a,interacting:re,position:H,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:X,toasts:S.filter(qr=>qr.position==pe.position),heights:O.filter(qr=>qr.position==pe.position),setHeights:I,expandByDefault:i,gap:v,loadingIcon:g,expanded:q,pauseWhenPageIsHidden:_,swipeDirections:t.swipeDirections})})):null}))});const GS=({...t})=>{const{theme:e="system"}=xS();return c.jsx(KS,{theme:e,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"}},...t})},JS=1,QS=1e6;let _u=0;function ZS(){return _u=(_u+1)%Number.MAX_SAFE_INTEGER,_u.toString()}const Su=new Map,bm=t=>{if(Su.has(t))return;const e=setTimeout(()=>{Su.delete(t),ma({type:"REMOVE_TOAST",toastId:t})},QS);Su.set(t,e)},YS=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,JS)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;
68return r?bm(r):t.toasts.forEach(n=>{bm(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},fl=[];let pl={toasts:[]};function ma(t){pl=YS(pl,t),fl.forEach(e=>{e(pl)})}function ql({...t}){const e=ZS(),r=s=>ma({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>ma({type:"DISMISS_TOAST",toastId:e});return ma({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function XS(){const[t,e]=b.useState(pl);return b.useEffect(()=>(fl.push(e),()=>{const r=fl.indexOf(e);r>-1&&fl.splice(r,1)}),[t]),{...t,toast:ql,dismiss:r=>ma({type:"DISMISS_TOAST",toastId:r})}}function Se(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function km(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function M0(...t){return e=>{let r=!1;const n=t.map(s=>{const i=km(s,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():km(t[s],null)}}}}function lt(...t){return b.useCallback(M0(...t),t)}function eE(t,e){const r=b.createContext(e),n=i=>{const{children:a,...o}=i,l=b.useMemo(()=>o,Object.values(o));return c.jsx(r.Provider,{value:l,children:a})};n.displayName=t+"Provider";function s(i){const a=b.useContext(r);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[n,s]}function uo(t,e=[]){let r=[];function n(i,a){const o=b.createContext(a),l=r.length;r=[...r,a];const u=h=>{var v;const{scope:p,children:f,...y}=h,m=((v=p==null?void 0:p[t])==null?void 0:v[l])||o,w=b.useMemo(()=>y,Object.values(y));return c.jsx(m.Provider,{value:w,children:f})};u.displayName=i+"Provider";function d(h,p){var m;const f=((m=p==null?void 0:p[t])==null?void 0:m[l])||o,y=b.useContext(f);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=r.map(a=>b.createContext(a));return function(o){const l=(o==null?void 0:o[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return s.scopeName=t,[n,tE(s,...e)]}function tE(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=n.reduce((o,{useScope:l,scopeName:u})=>{const h=l(i)[`__scope${u}`];return{...o,...h}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return r.scopeName=e.scopeName,r}function Fa(t){const e=nE(t),r=b.forwardRef((n,s)=>{const{children:i,...a}=n,o=b.Children.toArray(i),l=o.find(iE);if(l){const u=l.props.children,d=o.map(h=>h===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:h);return c.jsx(e,{...a,ref:s,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return c.jsx(e,{...a,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var rE=Fa("Slot");function nE(t){const e=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const a=oE(s),o=aE(i,s.props);return s.type!==b.Fragment&&(o.ref=n?M0(n,a):a),b.cloneElement(s,o)}return b.Children.count(s)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var U0=Symbol("radix.slottable");function sE(t){const e=({children:r})=>c.jsx(c.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=U0,e}function iE(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===U0}function aE(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...o)=>{const l=i(...o);return s(...o),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function oE(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.
vendor: 10,548 bytes, line 68
68isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function lE(t){const e=t+"CollectionProvider",[r,n]=uo(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:w,children:v}=m,g=P.useRef(null),x=P.useRef(new Map).current;return c.jsx(s,{scope:w,itemMap:x,collectionRef:g,children:v})};a.displayName=e;const o=t+"CollectionSlot",l=Fa(o),u=P.forwardRef((m,w)=>{const{scope:v,children:g}=m,x=i(o,v),k=lt(w,x.collectionRef);return c.jsx(l,{ref:k,children:g})});u.displayName=o;const d=t+"CollectionItemSlot",h="data-radix-collection-item",p=Fa(d),f=P.forwardRef((m,w)=>{const{scope:v,children:g,...x}=m,k=P.useRef(null),_=lt(w,k),S=i(d,v);return P.useEffect(()=>(S.itemMap.set(k,{ref:k,...x}),()=>void S.itemMap.delete(k))),c.jsx(p,{[h]:"",ref:_,children:g})});f.displayName=d;function y(m){const w=i(t+"CollectionConsumer",m);return P.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((S,E)=>x.indexOf(S.ref.current)-x.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},y,n]}var cE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=cE.reduce((t,e)=>{const r=Fa(`Primitive.${e}`),n=b.forwardRef((s,i)=>{const{asChild:a,...o}=s,l=a?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...o,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function F0(t,e){t&&oo.flushSync(()=>t.dispatchEvent(e))}function br(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function uE(t,e=globalThis==null?void 0:globalThis.document){const r=br(t);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var dE="DismissableLayer",Bd="dismissableLayer.update",hE="dismissableLayer.pointerDownOutside",fE="dismissableLayer.focusOutside",_m,z0=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nc=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...l}=t,u=b.useContext(z0),[d,h]=b.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),y=lt(e,E=>h(E)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(w),g=d?m.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,_=mE(E=>{const T=E.target,O=[...u.branches].some(I=>I.contains(T));!k||O||(s==null||s(E),a==null||a(E),E.defaultPrevented||o==null||o())},p),S=gE(E=>{const T=E.target;[...u.branches].some(I=>I.contains(T))||(i==null||i(E),a==null||a(E),E.defaultPrevented||o==null||o())},p);return uE(E=>{g===u.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&o&&(E.preventDefault(),o()))},p),b.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_m=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Sm(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=_m)}},[d,p,r,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Sm())},[d,u]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(Bd,E),()=>document.removeEventListener(Bd,E)},[]),c.jsx(Oe.div,{...l,ref:y,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Se(t.onFocusCapture,S.onFocusCapture),onBlurCapture:Se(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Se(t.onPointerDownCapture,_.onPointerDownCapture)})});Nc.displayName=dE;var pE="DismissableLayerBranch",B0=b.forwardRef((t,e)=>{const r=b.useContext(z0),n=b.useRef(null),s=lt(e,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Oe.div,{...t,ref:s})});B0.displayName=pE;function mE(t,e=globalThis==null?void 0:globalThis.document){const r=br(t),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=o=>{if(o.target&&!n.current){let l=function(){W0(hE,r,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function gE(t,e=globalThis==null?void 0:globalThis.document){const r=br(t),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&W0(fE,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Sm(){const t=new CustomEvent(Bd);document.dispatchEvent(t)}function W0(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?F0(s,i):s.dispatchEvent(i)}var vE=Nc,yE=B0,Ur=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},xE="Portal",yf=b.forwardRef((t,e)=>{var o;const{container:r,...n}=t,[s,i]=b.useState(!1);Ur(()=>i(!0),[]);const a=r||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?y0.createPortal(c.jsx(Oe.div,{...n,ref:e}),a):null});yf.displayName=xE;function wE(t,e){return b.useReducer((r,n)=>e[r][n]??r,t)}var Ii=t=>{const{present:e,children:r}=t,n=bE(e),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=lt(n.ref,kE(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}):null};Ii.displayName="Presence";function bE(t){const[e,r]=b.useState(),n=b.useRef(null),s=b.useRef(t),i=b.useRef("none"),a=t?"mounted":"unmounted",[o,l]=wE(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Uo(n.current);i.current=o==="mounted"?u:"none"},[o]),Ur(()=>{const u=n.current,d=s.current;if(d!==t){const p=i.current,f=Uo(u);t?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Ur(()=>{if(e){let u;const d=e.ownerDocument.defaultView??window,h=f=>{const m=Uo(n.current).includes(f.animationName);if(f.target===e&&m&&(l("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",u=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},p=f=>{f.target===e&&(i.current=Uo(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{d.clearTimeout(u),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Uo(t){return(t==null?void 0:t.animationName)||"none"}function kE(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var _E=kh[" useInsertionEffect ".trim().toString()]||Ur;function H0({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,a]=SE({defaultProp:e,onChange:r}),o=t!==void 0,l=o?t:s;{const d=b.useRef(t!==void 0);b.useEffect(()=>{const h=d.current;h!==o&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=o},[o,n])}const u=b.useCallback(d=>{var h;if(o){const p=EE(d)?d(t):d;p!==t&&((h=a.current)==null||h.call(a,p))}else i(d)},[o,t,i,a]);return[l,u]}function SE({defaultProp:t,onChange:e}){const[r,n]=b.useState(t),s=b.useRef(r),i=b.useRef(e);return _E(()=>{i.current=e},[e]),b.useEffect(()=>{var a;s.current!==r&&((a=i.current)==null||a.call(i,r),s.current=r)},[r,s]),[r,n,i]}function EE(t){return typeof t=="function"}var jE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),CE="VisuallyHidden",Tc=b.forwardRef((t,e)=>c.jsx(Oe.span,{...t,ref:e,style:{...jE,...t.style}}));Tc.displayName=CE;var NE=Tc,xf="ToastProvider",[wf,TE,RE]=lE("Toast"),[V0,sI]=uo("Toast",[RE]),[PE,Rc]=V0(xf),q0=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[o,l]=b.useState(null),[u,d]=b.useState(0),h=b.useRef(!1),p=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xf}\`. Expected non-empty \`string\`.`),c.jsx(wf.Provider,{scope:e,children:c.jsx(PE,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:o,onViewportChange:l,onToastAdd:b.useCallback(()=>d(f=>f+1),[]),onToastRemove:b.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:a})})};q0.displayName=xf;var K0="ToastViewport",AE=["F8"],Wd="toast.viewportPause",Hd="toast.viewportResume",G0=b.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=AE,label:s="Notifications ({hotkey})",...i}=t,a=Rc(K0,r),o=TE(r),l=b.useRef(null),u=b.useRef(null),d=b.useRef(null),h=b.useRef(null),p=lt(e,h,a.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=a.toastCount>0;b.useEffect(()=>{const w=v=>{var x;n.length!==0&&n.every(k=>v[k]||v.code===k)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),b.useEffect(()=>{const w=l.current,v=h.current;if(y&&w&&v){const g=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(Wd);v.dispatchEvent(S),a.isClosePausedRef.current=!0}},x=()=>
68{if(a.isClosePausedRef.current){const S=new CustomEvent(Hd);v.dispatchEvent(S),a.isClosePausedRef.current=!1}},k=S=>{!w.contains(S.relatedTarget)&&x()},_=()=>{w.contains(document.activeElement)||x()};return w.addEventListener("focusin",g),w.addEventListener("focusout",k),w.addEventListener("pointermove",g),w.addEventListener("pointerleave",_),window.addEventListener("blur",g),window.addEventListener("focus",x),()=>{w.removeEventListener("focusin",g),w.removeEventListener("focusout",k),w.removeEventListener("pointermove",g),w.removeEventListener("pointerleave",_),window.removeEventListener("blur",g),window.removeEventListener("focus",x)}}},[y,a.isClosePausedRef]);const m=b.useCallback(({tabbingDirection:w})=>{const g=o().map(x=>{const k=x.ref.current,_=[k,...VE(k)];return w==="forwards"?_:_.reverse()});return(w==="forwards"?g.reverse():g).flat()},[o]);return b.useEffect(()=>{const w=h.current;if(w){const v=g=>{var _,S,E;const x=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!x){const T=document.activeElement,O=g.shiftKey;if(g.target===w&&O){(_=u.current)==null||_.focus();return}const F=m({tabbingDirection:O?"backwards":"forwards"}),re=F.findIndex($=>$===T);Eu(F.slice(re+1))?g.preventDefault():O?(S=u.current)==null||S.focus():(E=d.current)==null||E.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[o,m]),c.jsxs(yE,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&c.jsx(Vd,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});Eu(w)}}),c.jsx(wf.Slot,{scope:r,children:c.jsx(Oe.ol,{tabIndex:-1,...i,ref:p})}),y&&c.jsx(Vd,{ref:d,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});Eu(w)}})]})});G0.displayName=K0;var J0="ToastFocusProxy",Vd=b.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Rc(J0,r);return c.jsx(Tc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(o))&&n()}})});Vd.displayName=J0;var ho="Toast",OE="toast.swipeStart",IE="toast.swipeMove",LE="toast.swipeCancel",$E="toast.swipeEnd",Q0=b.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...a}=t,[o,l]=H0({prop:n,defaultProp:s??!0,onChange:i,caller:ho});return c.jsx(Ii,{present:r||o,children:c.jsx(UE,{open:o,...a,ref:e,onClose:()=>l(!1),onPause:br(t.onPause),onResume:br(t.onResume),onSwipeStart:Se(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Se(t.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:Se(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Se(t.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});Q0.displayName=ho;var[DE,ME]=V0(ho,{onClose(){}}),UE=b.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:o,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...y}=t,m=Rc(ho,r),[w,v]=b.useState(null),g=lt(e,$=>v($)),x=b.useRef(null),k=b.useRef(null),_=s||m.duration,S=b.useRef(0),E=b.useRef(_),T=b.useRef(0),{onToastAdd:O,onToastRemove:I}=m,q=br(()=>{var oe;(w==null?void 0:w.contains(document.activeElement))&&((oe=m.viewport)==null||oe.focus()),a()}),F=b.useCallback($=>
68{!$||$===1/0||(window.clearTimeout(T.current),S.current=new Date().getTime(),T.current=window.setTimeout(q,$))},[q]);b.useEffect(()=>{const $=m.viewport;if($){const oe=()=>{F(E.current),u==null||u()},K=()=>{const ee=new Date().getTime()-S.current;E.current=E.current-ee,window.clearTimeout(T.current),l==null||l()};return $.addEventListener(Wd,K),$.addEventListener(Hd,oe),()=>{$.removeEventListener(Wd,K),$.removeEventListener(Hd,oe)}}},[m.viewport,_,l,u,F]),b.useEffect(()=>{i&&!m.isClosePausedRef.current&&F(_)},[i,_,m.isClosePausedRef,F]),b.useEffect(()=>(O(),()=>I()),[O,I]);const re=b.useMemo(()=>w?nx(w):null,[w]);return m.viewport?c.jsxs(c.Fragment,{children:[re&&c.jsx(FE,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:re}),c.jsx(DE,{scope:r,onClose:q,children:oo.createPortal(c.jsx(wf.ItemSlot,{scope:r,children:c.jsx(vE,{asChild:!0,onEscapeKeyDown:Se(o,()=>{m.isFocusedToastEscapeKeyDownRef.current||q(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Oe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Se(t.onKeyDown,$=>{$.key==="Escape"&&(o==null||o($.nativeEvent),$.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:Se(t.onPointerDown,$=>{$.button===0&&(x.current={x:$.clientX,y:$.clientY})}),onPointerMove:Se(t.onPointerMove,$=>{if(!x.current)return;const oe=$.clientX-x.current.x,K=$.clientY-x.current.y,ee=!!k.current,C=["left","right"].includes(m.swipeDirection),N=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=C?N(0,oe):0,X=C?0:N(0,K),H=$.pointerType==="touch"?10:2,se={x:M,y:X},ae={originalEvent:$,delta:se};ee?(k.current=se,Fo(IE,h,ae,{discrete:!1})):Em(se,m.swipeDirection,H)?(k.current=se,Fo(OE,d,ae,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(oe)>H||Math.abs(K)>H)&&(x.current=null)}),onPointerUp:Se(t.onPointerUp,$=>{const oe=k.current,K=$.target;if(K.hasPointerCapture($.pointerId)&&K.releasePointerCapture($.pointerId),k.current=null,x.current=null,oe){const ee=$.currentTarget,C={originalEvent:$,delta:oe};Em(oe,m.swipeDirection,m.swipeThreshold)?Fo($E,f,C,{discrete:!0}):Fo(LE,p,C,{discrete:!0}),ee.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),FE=t=>{const{__scopeToast:e,children:r,...n}=t,s=Rc(ho,e),[i,a]=b.useState(!1),[o,l]=b.useState(!1);return WE(()=>a(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:c.jsx(yf,{asChild:!0,children:c.jsx(Tc,{...n,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},zE="ToastTitle",Z0=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return c.jsx(Oe.div,{...n,ref:e})});Z0.displayName=zE;var BE="ToastDescription",Y0=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return c.jsx(Oe.div,{...n,ref:e})});Y0.displayName=BE;var X0="ToastAction",ex=b.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?c.jsx(rx,{altText:r,asChild:!0,children:c.jsx(bf,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${X0}\`. Expected non-empty \`string\`.`),null)});ex.displayName=X0;var tx="ToastClose",bf=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=ME(tx,r);return c.jsx(rx,{asChild:!0,children:c.jsx(Oe.button,{type:"button",...n,ref:e,onClick:Se(t.onClick,s.onClose)})})});bf.displayName=tx;var rx=b.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return c.jsx(Oe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function nx(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),HE(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=n.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...nx(n))}}),e}function Fo(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?F0(s,i):s.dispatchEvent(i)}var Em=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function WE(t=()=>{}){const e=br(t);Ur(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function HE(t){return t.nodeType===t.ELEMENT_NODE}function VE(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Eu(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var qE=q0,sx=G0,ix=Q0,ax=Z0,ox=Y0,lx=ex,cx=bf;function ux(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=ux(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function dx(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=ux(t))&&(n&&(n+=" "),n+=e);return n}const jm=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Cm=dx,fo=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Cm(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,a=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],h=i==null?void 0:i[u];if(d===null)return null;const p=jm(d)||jm(h);return s[u][p]}),o=r&&Object.entries(r).reduce((u,d)=>{let[h,p]=d;
vendor: 14,699 bytes, lines 68-258
68return p===void 0||(u[h]=p),u},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(y=>{let[m,w]=y;return Array.isArray(w)?w.includes({...i,...o}[m]):{...i,...o}[m]===w})?[...u,h,p]:u},[]);return Cm(t,a,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
69 * @license lucide-react v0.462.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const KE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hx=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
74 * @license lucide-react v0.462.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */var GE={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"};/**
79 * @license lucide-react v0.462.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const JE=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:a,...o},l)=>b.createElement("svg",{ref:l,...GE,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:hx("lucide",s),...o},[...a.map(([u,d])=>b.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
84 * @license lucide-react v0.462.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const Q=(t,e)=>{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(JE,{ref:i,iconNode:e,className:hx(`lucide-${KE(t)}`,n),...s}));return r.displayName=`${t}`,r};/**
89 * @license lucide-react v0.462.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const QE=Q("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
94 * @license lucide-react v0.462.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const nr=Q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
99 * @license lucide-react v0.462.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const ZE=Q("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
104 * @license lucide-react v0.462.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const YE=Q("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
109 * @license lucide-react v0.462.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const XE=Q("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
114 * @license lucide-react v0.462.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const ej=Q("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
119 * @license lucide-react v0.462.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const tj=Q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
124 * @license lucide-react v0.462.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const Nm=Q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
129 * @license lucide-react v0.462.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const rj=Q("DoorOpen",[["path",{d:"M13 4h3a2 2 0 0 1 2 2v14",key:"hrm0s9"}],["path",{d:"M2 20h3",key:"1gaodv"}],["path",{d:"M13 20h9",key:"s90cdi"}],["path",{d:"M10 12v.01",key:"vx6srw"}],["path",{d:"M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z",key:"199qr4"}]]);/**
134 * @license lucide-react v0.462.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const fx=Q("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
139 * @license lucide-react v0.462.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const nj=Q("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
144 * @license lucide-react v0.462.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const kf=Q("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
149 * @license lucide-react v0.462.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const sj=Q("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
154 * @license lucide-react v0.462.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const ij=Q("HandHeart",[["path",{d:"M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16",key:"1ifwr1"}],["path",{d:"m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"17abbs"}],["path",{d:"m2 15 6 6",key:"10dquu"}],["path",{d:"M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",key:"1h3036"}]]);/**
159 * @license lucide-react v0.462.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const px=Q("HeartHandshake",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]]);/**
164 * @license lucide-react v0.462.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const aj=Q("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
169 * @license lucide-react v0.462.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const _f=Q("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
174 * @license lucide-react v0.462.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const oj=Q("LifeBuoy",[["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"}]]);/**
179 * @license lucide-react v0.462.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const za=Q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
184 * @license lucide-react v0.462.0 - ISC
185 *
186 * This source code is licensed under the ISC license.
187 * See the LICENSE file in the root directory of this source tree.
188 */const lj=Q("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
189 * @license lucide-react v0.462.0 - ISC
190 *
191 * This source code is licensed under the ISC license.
192 * See the LICENSE file in the root directory of this source tree.
193 */const cj=Q("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
194 * @license lucide-react v0.462.0 - ISC
195 *
196 * This source code is licensed under the ISC license.
197 * See the LICENSE file in the root directory of this source tree.
198 */const uj=Q("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
199 * @license lucide-react v0.462.0 - ISC
200 *
201 * This source code is licensed under the ISC license.
202 * See the LICENSE file in the root directory of this source tree.
203 */const mx=Q("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
204 * @license lucide-react v0.462.0 - ISC
205 *
206 * This source code is licensed under the ISC license.
207 * See the LICENSE file in the root directory of this source tree.
208 */const dj=Q("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
209 * @license lucide-react v0.462.0 - ISC
210 *
211 * This source code is licensed under the ISC license.
212 * See the LICENSE file in the root directory of this source tree.
213 */const hj=Q("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
214 * @license lucide-react v0.462.0 - ISC
215 *
216 * This source code is licensed under the ISC license.
217 * See the LICENSE file in the root directory of this source tree.
218 */const fj=Q("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
219 * @license lucide-react v0.462.0 - ISC
220 *
221 * This source code is licensed under the ISC license.
222 * See the LICENSE file in the root directory of this source tree.
223 */const pj=Q("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
224 * @license lucide-react v0.462.0 - ISC
225 *
226 * This source code is licensed under the ISC license.
227 * See the LICENSE file in the root directory of this source tree.
228 */const mj=Q("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
229 * @license lucide-react v0.462.0 - ISC
230 *
231 * This source code is licensed under the ISC license.
232 * See the LICENSE file in the root directory of this source tree.
233 */const Sf=Q("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
234 * @license lucide-react v0.462.0 - ISC
235 *
236 * This source code is licensed under the ISC license.
237 * See the LICENSE file in the root directory of this source tree.
238 */const gj=Q("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
239 * @license lucide-react v0.462.0 - ISC
240 *
241 * This source code is licensed under the ISC license.
242 * See the LICENSE file in the root directory of this source tree.
243 */const vj=Q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
244 * @license lucide-react v0.462.0 - ISC
245 *
246 * This source code is licensed under the ISC license.
247 * See the LICENSE file in the root directory of this source tree.
248 */const yj=Q("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
249 * @license lucide-react v0.462.0 - ISC
250 *
251 * This source code is licensed under the ISC license.
252 * See the LICENSE file in the root directory of this source tree.
253 */const xj=Q("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
254 * @license lucide-react v0.462.0 - ISC
255 *
256 * This source code is licensed under the ISC license.
257 * See the LICENSE file in the root directory of this source tree.
258 */const wj=Q("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
258y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
259 * @license lucide-react v0.462.0 - ISC
260 *
261 * This source code is licensed under the ISC license.
262 * See the LICENSE file in the root directory of this source tree.
263 */const Pc=Q("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
264 * @license lucide-react v0.462.0 - ISC
265 *
266 * This source code is licensed under the ISC license.
267 * See the LICENSE file in the root directory of this source tree.
268 */const Tm=Q("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
269 * @license lucide-react v0.462.0 - ISC
270 *
271 * This source code is licensed under the ISC license.
272 * See the LICENSE file in the root directory of this source tree.
273 */const bj=Q("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
274 * @license lucide-react v0.462.0 - ISC
275 *
276 * This source code is licensed under the ISC license.
277 * See the LICENSE file in the root directory of this source tree.
278 */const kj=Q("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
279 * @license lucide-react v0.462.0 - ISC
280 *
281 * This source code is licensed under the ISC license.
282 * See the LICENSE file in the root directory of this source tree.
283 */const _j=Q("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
284 * @license lucide-react v0.462.0 - ISC
285 *
286 * This source code is licensed under the ISC license.
287 * See the LICENSE file in the root directory of this source tree.
288 */const Sj=Q("TreePine",[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]]);/**
289 * @license lucide-react v0.462.0 - ISC
290 *
291 * This source code is licensed under the ISC license.
292 * See the LICENSE file in the root directory of this source tree.
293 */const Ej=Q("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
294 * @license lucide-react v0.462.0 - ISC
295 *
296 * This source code is licensed under the ISC license.
297 * See the LICENSE file in the root directory of this source tree.
298 */const Li=Q("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
299 * @license lucide-react v0.462.0 - ISC
300 *
301 * This source code is licensed under the ISC license.
302 * See the LICENSE file in the root directory of this source tree.
303 */const jj=Q("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
304 * @license lucide-react v0.462.0 - ISC
305 *
306 * This source code is licensed under the ISC license.
307 * See the LICENSE file in the root directory of this source tree.
308 */const Ac=Q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,262 bytes, line 308
308],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ef="-",Cj=t=>{const e=Tj(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:a=>{const o=a.split(Ef);return o[0]===""&&o.length!==1&&o.shift(),gx(o,e)||Nj(a)},getConflictingClassGroupIds:(a,o)=>{const l=r[a]||[];return o&&n[a]?[...l,...n[a]]:l}}},gx=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?gx(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Ef);return(a=e.validators.find(({validator:o})=>o(i)))==null?void 0:a.classGroupId},Rm=/^\[(.+)\]$/,Nj=t=>{if(Rm.test(t)){const e=Rm.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Tj=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return Pj(Object.entries(t.classGroups),r).forEach(([i,a])=>{qd(a,n,i,e)}),n},qd=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Pm(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(Rj(s)){qd(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,a])=>{qd(a,Pm(e,i),r,n)})})},Pm=(t,e)=>{let r=t;return e.split(Ef).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Rj=t=>t.isThemeGetter,Pj=(t,e)=>e?t.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,o])=>[e+a,o])):i);return[r,s]}):t,Aj=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,a)=>{r.set(i,a),e++,e>t&&(e=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return s(i,a),a},set(i,a){r.has(i)?r.set(i,a):s(i,a)}}},vx="!",Oj=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,a=o=>{const l=[];let u=0,d=0,h;for(let w=0;w<o.length;w++){let v=o[w];if(u===0){if(v===s&&(n||o.slice(w,w+i)===e)){l.push(o.slice(d,w)),d=w+i;continue}if(v==="/"){h=w;continue}}v==="["?u++:v==="]"&&u--}const p=l.length===0?o:o.substring(d),f=p.startsWith(vx),y=f?p.substring(1):p,m=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:m}};return r?o=>r({className:o,parseClassName:a}):a},Ij=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},Lj=t=>({cache:Aj(t.cacheSize),parseClassName:Oj(t),...Cj(t)}),$j=/\s+/,Dj=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],a=t.trim().split($j);let o="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(u);let y=!!f,m=n(y?p.substring(0,f):p);if(!m){if(!y){o=u+(o.length>0?" "+o:o);continue}if(m=n(p),!m){o=u+(o.length>0?" "+o:o);continue}y=!1}const w=Ij(d).join(":"),v=h?w+vx:w,g=v+m;if(i.includes(g))continue;i.push(g);const x=s(m,y);for(let k=0;k<x.length;++k){const _=x[k];i.push(v+_)}o=u+(o.length>0?" "+o:o)}return o};function Mj(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=yx(e))&&(n&&(n+=" "),n+=r);return n}const yx=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=yx(t[n]))&&(r&&(r+=" "),r+=e);return r};function Uj(t,...e){let r,n,s,i=a;function a(l){const u=e.reduce((d,h)=>h(d),t());return r=Lj(u),n=r.cache.get,s=r.cache.set,i=o,o(l)}function o(l){const u=n(l);if(u)return u;const d=Dj(l,r);return s(l,d),d}return function(){return i(Mj.apply(null,arguments))}}const xe=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},xx=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fj=/^\d+\/\d+$/,zj=new Set(["px","full","screen"]),Bj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Hj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=t=>si(t)||zj.has(t)||Fj.test(t),Yr=t=>$i(t,"length",eC),si=t=>!!t&&!Number.isNaN(Number(t)),ju=t=>$i(t,"number",si),Qi=t=>!!t&&Number.isInteger(Number(t)),Kj=t=>t.endsWith("%")&&si(t.slice(0,-1)),te=t=>xx.test(t),Xr=t=>Bj.test(t),Gj=new Set(["length","size","percentage"]),Jj=t=>$i(t,Gj,wx),Qj=t=>$i(t,"position",wx),Zj=new Set(["image","url"]),Yj=t=>$i(t,Zj,rC),Xj=t=>$i(t,"",tC),Zi=()=>!0,$i=(t,e,r)=>{const n=xx.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},eC=t=>Wj.test(t)&&!Hj.test(t),wx=()=>!1,tC=t=>Vj.test(t),rC=t=>qj.test(t),nC=()=>{const t=xe("colors"),e=xe("spacing"),r=xe("blur"),n=xe("brightness"),s=xe("borderColor"),i=xe("borderRadius"),a=xe("borderSpacing"),o=xe("borderWidth"),l=xe("contrast"),u=xe("grayscale"),d=xe("hueRotate"),h=xe("invert"),p=xe("gap"),f=xe("gradientColorStops"),y=xe("gradientColorStopPositions"),m=xe("inset"),w=xe("margin"),v=xe("opacity"),g=xe("padding"),x=xe("saturate"),k=xe("scale"),_=xe("sepia"),S=xe("skew"),E=xe("space"),T=xe("translate"),O=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",te,e],F=()=>[te,e],re=()=>["",Sr,Yr],$=()=>["auto",si,te],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",te],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[si,te];return{cacheSize:500,separator:":",theme:{colors:[Zi],spacing:[Sr,Yr],blur:["none","",Xr,te],brightness:X(),borderColor:[t],borderRadius:["none","","full",Xr,te],borderSpacing:F(),borderWidth:re(),contrast:X(),grayscale:N(),hueRotate:X(),invert:N(),gap:F(),gradientColorStops:[t],gradientColorStopPositions:[Kj,Yr],inset:q(),margin:q(),opacity:X(),padding:F(),saturate:X(),scale:X(),sepia:N(),skew:X(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[Xr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...oe(),te]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qi,te]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",Qi,te]}],"grid-cols":[{"grid-cols":[Zi]}],"col-start-end":[{col:["auto",{span:["full",Qi,te]},te]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[Zi]}],"row-start-end":[{row:["auto",{span:[Qi,te]},te]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,e]}],"min-w":[{"min-w":[te,e,"min","max","fit"]}],"max-w":[{"max-w":[te,e,"none","full","min","max","fit","prose",{screen:[Xr]},Xr]}],h:[{h:[te,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Xr,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ju]}],"font-family":[{font:[Zi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",si,ju]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Sr,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Sr,Yr]}],"underline-offset":[{"underline-offset":["auto",Sr,te]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),Qj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yj]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[y]}
vendor: 5,183 bytes, line 308
308],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:K()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[Sr,te]}],"outline-w":[{outline:[Sr,Yr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Sr,Yr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Xr,Xj]}],"shadow-color":[{shadow:[Zi]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Xr,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Qi,te]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 308
308],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Sr,Yr,ju]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},sC=Uj(nC);function Je(...t){return sC(dx(t))}const iC=qE,bx=b.forwardRef(({className:t,...e},r)=>c.jsx(sx,{ref:r,className:Je("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));bx.displayName=sx.displayName;const aC=fo("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),kx=b.forwardRef(({className:t,variant:e,...r},n)=>c.jsx(ix,{ref:n,className:Je(aC({variant:e}),t),...r}));kx.displayName=ix.displayName;const oC=b.forwardRef(({className:t,...e},r)=>c.jsx(lx,{ref:r,className:Je("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));oC.displayName=lx.displayName;const _x=b.forwardRef(({className:t,...e},r)=>c.jsx(cx,{ref:r,className:Je("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 3,518 bytes, line 308
308/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:c.jsx(Ac,{className:"h-4 w-4"})}));_x.displayName=cx.displayName;const Sx=b.forwardRef(({className:t,...e},r)=>c.jsx(ax,{ref:r,className:Je("text-sm font-semibold",t),...e}));Sx.displayName=ax.displayName;const Ex=b.forwardRef(({className:t,...e},r)=>c.jsx(ox,{ref:r,className:Je("text-sm opacity-90",t),...e}));Ex.displayName=ox.displayName;function lC(){const{toasts:t}=XS();return c.jsxs(iC,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return c.jsxs(kx,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(Sx,{children:r}),n&&c.jsx(Ex,{children:n})]}),s,c.jsx(_x,{})]},e)}),c.jsx(bx,{})]})}var cC=kh[" useId ".trim().toString()]||(()=>{}),uC=0;function Cu(t){const[e,r]=b.useState(cC());return Ur(()=>{t||r(n=>n??String(uC++))},[t]),t||(e?`radix-${e}`:"")}const dC=["top","right","bottom","left"],Pn=Math.min,wt=Math.max,Kl=Math.round,zo=Math.floor,An=t=>({x:t,y:t}),hC={left:"right",right:"left",bottom:"top",top:"bottom"},fC={start:"end",end:"start"};function Kd(t,e,r){return wt(t,Pn(e,r))}function Fr(t,e){return typeof t=="function"?t(e):t}function zr(t){return t.split("-")[0]}function Di(t){return t.split("-")[1]}function jf(t){return t==="x"?"y":"x"}function Cf(t){return t==="y"?"height":"width"}function On(t){return["top","bottom"].includes(zr(t))?"y":"x"}function Nf(t){return jf(On(t))}function pC(t,e,r){r===void 0&&(r=!1);const n=Di(t),s=Nf(t),i=Cf(s);let a=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Gl(a)),[a,Gl(a)]}function mC(t){const e=Gl(t);return[Gd(t),e,Gd(e)]}function Gd(t){return t.replace(/start|end/g,e=>fC[e])}function gC(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:a;default:return[]}}function vC(t,e,r,n){const s=Di(t);let i=gC(zr(t),r==="start",n);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(Gd)))),i}function Gl(t){return t.replace(/left|right|bottom|top/g,e=>hC[e])}function yC(t){return{top:0,right:0,bottom:0,left:0,...t}}function jx(t){return typeof t!="number"?yC(t):{top:t,right:t,bottom:t,left:t}}function Jl(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function Am(t,e,r){let{reference:n,floating:s}=t;const i=On(e),a=Nf(e),o=Cf(a),l=zr(e),u=i==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[o]/2-s[o]/2;let f;switch(l){case"top":f={x:d,y:n.y-s.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(Di(e)){case"start":f[a]-=p*(r&&u?-1:1);break;case"end":f[a]+=p*(r&&u?-1:1);break}return f}const xC=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:a}=r,o=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:h}=Am(u,n,l),p=n,f={},y=0;for(let m=0;m<o.length;m++){const{name:w,fn:v}=o[m],{x:g,y:x,data:k,reset:_}=await v({x:d,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,re
vendor: 9,401 bytes, line 308
308cts:u,platform:a,elements:{reference:t,floating:e}});d=g??d,h=x??h,f={...f,[w]:{...f[w],...k}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(u=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):_.rects),{x:d,y:h}=Am(u,p,l)),m=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:f}};async function Ba(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:a,elements:o,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=Fr(e,t),y=jx(f),w=o[p?h==="floating"?"reference":"floating":h],v=Jl(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),g=h==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},_=Jl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:x,strategy:l}):g);return{top:(v.top-_.top+y.top)/k.y,bottom:(_.bottom-v.bottom+y.bottom)/k.y,left:(v.left-_.left+y.left)/k.x,right:(_.right-v.right+y.right)/k.x}}const wC=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:a,elements:o,middlewareData:l}=e,{element:u,padding:d=0}=Fr(t,e)||{};if(u==null)return{};const h=jx(d),p={x:r,y:n},f=Nf(s),y=Cf(f),m=await a.getDimensions(u),w=f==="y",v=w?"top":"left",g=w?"bottom":"right",x=w?"clientHeight":"clientWidth",k=i.reference[y]+i.reference[f]-p[f]-i.floating[y],_=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=S?S[x]:0;(!E||!await(a.isElement==null?void 0:a.isElement(S)))&&(E=o.floating[x]||i.floating[y]);const T=k/2-_/2,O=E/2-m[y]/2-1,I=Pn(h[v],O),q=Pn(h[g],O),F=I,re=E-m[y]-q,$=E/2-m[y]/2+T,oe=Kd(F,$,re),K=!l.arrow&&Di(s)!=null&&$!==oe&&i.reference[y]/2-($<F?I:q)-m[y]/2<0,ee=K?$<F?$-F:$-re:0;return{[f]:p[f]+ee,data:{[f]:oe,centerOffset:$-oe-ee,...K&&{alignmentOffset:ee}},reset:K}}}),bC=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:a,initialPlacement:o,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...w}=Fr(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=zr(s),g=On(o),x=zr(o)===o,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(x||!m?[Gl(o)]:mC(o)),S=y!=="none";!p&&S&&_.push(...vC(o,m,y,k));const E=[o,..._],T=await Ba(e,w),O=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&O.push(T[v]),h){const $=pC(s,a,k);O.push(T[$[0]],T[$[1]])}if(I=[...I,{placement:s,overflows:O}],!O.every($=>$<=0)){var q,F;const $=(((q=i.flip)==null?void 0:q.index)||0)+1,oe=E[$];if(oe)return{data:{index:$,overflows:I},reset:{placement:oe}};let K=(F=I.filter(ee=>ee.overflows[0]<=0).sort((ee,C)=>ee.overflows[1]-C.overflows[1])[0])==null?void 0:F.placement;if(!K)switch(f){case"bestFit":{var re;const ee=(re=I.filter(C=>{if(S){const N=On(C.placement);return N===g||N==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(N=>N>0).reduce((N,M)=>N+M,0)]).sort((C,N)=>C[1]-N[1])[0])==null?void 0:re[0];ee&&(K=ee);break}case"initialPlacement":K=o;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function Om(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Im(t){return dC.some(e=>t[e]>=0)}const kC=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Fr(t,e);switch(n){case"referenceHidden":{const i=await Ba(e,{...s,elementContext:"reference"}),a=Om(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Im(a)}}}case"escaped":{const i=await Ba(e,{...s,altBoundary:!0}),a=Om(i,r.floating);return{data:{escapedOffsets:a,escaped:Im(a)}}}default:return{}}}}};async function _C(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=zr(r),o=Di(r),l=On(r)==="y",u=["left","top"].includes(a)?-1:1,d=i&&l?-1:1,h=Fr(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof y=="number"&&(f=o==="end"?y*-1:y),l?{x:f*d,y:p*u}:{x:p*u,y:f*d}}const SC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:a,middlewareData:o}=e,l=await _C(e,t);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:a}}}}},EC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:o={fn:w=>{let{x:v,y:g}=w;return{x:v,y:g}}},...l}=Fr(t,e),u={x:r,y:n},d=await Ba(e,l),h=On(zr(s)),p=jf(h);let f=u[p],y=u[h];if(i){const w=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=f+d[w],x=f-d[v];f=Kd(g,f,x)}if(a){const w=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=y+d[w],x=y-d[v];y=Kd(g,y,x)}const m=o.fn({...e,[p]:f,[h]:y});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:i,[h]:a}}}}}},jC=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Fr(t,e),d={x:r,y:n},h=On(s),p=jf(h);let f=d[p],y=d[h];const m=Fr(o,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",k=i.reference[p]-i.floating[x]+w.mainAxis,_=i.reference[p]+i.reference[x]-w.mainAxis;f<k?f=k:f>_&&(f=_)}if(u){var v,g;const x=p==="y"?"width":"height",k=["top","left"].includes(zr(s)),_=i.reference[h]-i.floating[x]+(k&&((v=a.offset)==null?void 0:v[h])||0)+(k?0:w.crossAxis),S=i.reference[h]+i.reference[x]+(k?0:((g=a.offset)==null?void 0:g[h])||0)-(k?w.crossAxis:0);y<_?y=_:y>S&&(y=S)}return{[p]:f,[h]:y}}}},CC=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:a,elements:o}=e,{apply:l=()=>{},...u}=Fr(t,e),d=await Ba(e,u),h=zr(s),p=Di(s),f=On(s)==="y",{width:y,height:m}=i.floating;let w,v;h==="top"||h==="bottom"?(w=h,v=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(v=h,w=p==="end"?"top":"bottom");const g=m-d.top-d.bottom,x=y-d.left-d.right,k=Pn(m-d[w],g),_=Pn(y-d[v],x),S=!e.middlewareData.shift;let E=k,T=_;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(T=x),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(E=g),S&&!p){const I=wt(d.left,0),q=wt(d.right,0),F=wt(d.top,0),re=wt(d.bottom,0);f?T=y-2*(I!==0||q!==0?I+q:wt(d.left,d.right)):E=m-2*(F!==0||re!==0?F+re:wt(d.top,d.bottom))}await l({...e,availableWidth:T,availableHeight:E});const O=await a.getDimensions(o.floating);return y!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Oc(){return typeof window<"u"}function Mi(t){return Cx(t)?(t.nodeName||"").toLowerCase():"#document"}function St(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _r(t){var e;return(e=(Cx(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Cx(t){return Oc()?t instanceof Node||t instanceof St(t).Node:!1}function ir(t){return Oc()?t instanceof Element||t instanceof St(t).Element:!1}function kr(t){return Oc()?t instanceof HTMLElement||t instanceof St(t).HTMLElement:!1}function Lm(t){return!Oc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof St(t).ShadowRoot}function po(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=ar(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function NC(t){return["table","td","th"].includes(Mi(t))}function Ic(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Tf(t){const e=Rf(),r=ir(t)?ar(t):t;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function TC(t){let e=In(t);for(;kr(e)&&!_i(e);){if(Tf(e))return e;if(Ic(e))return null;e=In(e)}return null}function Rf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _i(t){return["html","body","#document"].includes(Mi(t))}function ar(t){return St(t).getComputedStyle(t)}function Lc(t){return ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function In(t){if(Mi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lm(t)&&t.host||_r(t);return Lm(e)?e.host:e}function Nx(t){const e=In(t);return _i(e)?t.ownerDocument?t.ownerDocument.body:t.body:kr(e)&&po(e)?e:Nx(e)}function Wa(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=Nx(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),a=St(s);if(i){const o=Jd(a);
vendor: 4,651 bytes, line 308
308return e.concat(a,a.visualViewport||[],po(s)?s:[],o&&r?Wa(o):[])}return e.concat(s,Wa(s,[],r))}function Jd(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Tx(t){const e=ar(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=kr(t),i=s?t.offsetWidth:r,a=s?t.offsetHeight:n,o=Kl(r)!==i||Kl(n)!==a;return o&&(r=i,n=a),{width:r,height:n,$:o}}function Pf(t){return ir(t)?t:t.contextElement}function ii(t){const e=Pf(t);if(!kr(e))return An(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=Tx(e);let a=(i?Kl(r.width):r.width)/n,o=(i?Kl(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const RC=An(0);function Rx(t){const e=St(t);return!Rf()||!e.visualViewport?RC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function PC(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==St(t)?!1:e}function hs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Pf(t);let a=An(1);e&&(n?ir(n)&&(a=ii(n)):a=ii(t));const o=PC(i,r,n)?Rx(i):An(0);let l=(s.left+o.x)/a.x,u=(s.top+o.y)/a.y,d=s.width/a.x,h=s.height/a.y;if(i){const p=St(i),f=n&&ir(n)?St(n):n;let y=p,m=Jd(y);for(;m&&n&&f!==y;){const w=ii(m),v=m.getBoundingClientRect(),g=ar(m),x=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*w.x,k=v.top+(m.clientTop+parseFloat(g.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,h*=w.y,l+=x,u+=k,y=St(m),m=Jd(y)}}return Jl({width:d,height:h,x:l,y:u})}function AC(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",a=_r(n),o=e?Ic(e.floating):!1;if(n===a||o&&i)return r;let l={scrollLeft:0,scrollTop:0},u=An(1);const d=An(0),h=kr(n);if((h||!h&&!i)&&((Mi(n)!=="body"||po(a))&&(l=Lc(n)),kr(n))){const p=hs(n);u=ii(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function OC(t){return Array.from(t.getClientRects())}function Qd(t,e){const r=Lc(t).scrollLeft;return e?e.left+r:hs(_r(t)).left+r}function IC(t){const e=_r(t),r=Lc(t),n=t.ownerDocument.body,s=wt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=wt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Qd(t);const o=-r.scrollTop;return ar(n).direction==="rtl"&&(a+=wt(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:a,y:o}}function LC(t,e){const r=St(t),n=_r(t),s=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,o=0,l=0;if(s){i=s.width,a=s.height;const u=Rf();(!u||u&&e==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:i,height:a,x:o,y:l}}function $C(t,e){const r=hs(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=kr(t)?ii(t):An(1),a=t.clientWidth*i.x,o=t.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:a,height:o,x:l,y:u}}function $m(t,e,r){let n;if(e==="viewport")n=LC(t,r);else if(e==="document")n=IC(_r(t));else if(ir(e))n=$C(e,r);else{const s=Rx(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Jl(n)}function Px(t,e){const r=In(t);return r===e||!ir(r)||_i(r)?!1:ar(r).position==="fixed"||Px(r,e)}function DC(t,e){const r=e.get(t);if(r)return r;let n=Wa(t,[],!1).filter(o=>ir(o)&&Mi(o)!=="body"),s=null;const i=ar(t).position==="fixed";let a=i?In(t):t;for(;ir(a)&&!_i(a);){const o=ar(a),l=Tf(a);!l&&o.position==="fixed"&&(s=null),(i?!l&&!s:!l&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||po(a)&&!l&&Px(t,a))?n=n.filter(d=>d!==a):s=o,a=In(a)}return e.set(t,n),n}function MC(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const a=[...r==="clippingAncestors"?Ic(e)?[]:DC(e,this._c):[].concat(r),n],o=a[0],l=a.reduce((u,d)=>{const h=$m(e,d,s);return u.top=wt(h.top,u.top),u.right=Pn(h.right,u.right),u.bottom=Pn(h.bottom,u.bottom),u.left=wt(h.left,u.left),u},$m(e,o,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function UC(t){const{width:e,height:r}=Tx(t);return{width:e,height:r}}function FC(t,e,r){const n=kr(e),s=_r(e),i=r==="fixed",a=hs(t,!0,i,e);let o={scrollLeft:0,scrollTop:0};const l=An(0);if(n||!n&&!i)if((Mi(e)!=="body"||po(s))&&(o=Lc(e)),n){const f=hs(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&(l.x=Qd(s));let u=0,d=0;if(s&&!n&&!i){const f=s.getBoundingClientRect();d=f.top+o.scrollTop,u=f.left+o.scrollLeft-Qd(s,f)}const h=a.left+o.scrollLeft-l.x-u,p=a.top+o.scrollTop-l.y-d;return{x:h,y:p,width:a.width,height:a.height}}function Nu(t){return ar(t).position==="static"}function Dm(t,e){if(!kr(t)||ar(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return _r(t)===r&&(r=r.ownerDocument.body),r}function Ax(t,e){const r=St(t);if(Ic(t))return r;if(!kr(t)){let s=In(t);for(;s&&!_i(s);
vendor: 5,803 bytes, line 308
308){if(ir(s)&&!Nu(s))return s;s=In(s)}return r}let n=Dm(t,e);for(;n&&NC(n)&&Nu(n);)n=Dm(n,e);return n&&_i(n)&&Nu(n)&&!Tf(n)?r:n||TC(t)||r}const zC=async function(t){const e=this.getOffsetParent||Ax,r=this.getDimensions,n=await r(t.floating);return{reference:FC(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function BC(t){return ar(t).direction==="rtl"}const WC={convertOffsetParentRelativeRectToViewportRelativeRect:AC,getDocumentElement:_r,getClippingRect:MC,getOffsetParent:Ax,getElementRects:zC,getClientRects:OC,getDimensions:UC,getScale:ii,isElement:ir,isRTL:BC};function HC(t,e){let r=null,n;const s=_r(t);function i(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:h,height:p}=t.getBoundingClientRect();if(o||e(),!h||!p)return;const f=zo(d),y=zo(s.clientWidth-(u+h)),m=zo(s.clientHeight-(d+p)),w=zo(u),g={rootMargin:-f+"px "+-y+"px "+-m+"px "+-w+"px",threshold:wt(0,Pn(1,l))||1};let x=!0;function k(_){const S=_[0].intersectionRatio;if(S!==l){if(!x)return a();S?a(!1,S):n=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{r=new IntersectionObserver(k,{...g,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,g)}r.observe(t)}return a(!0),i}function VC(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Pf(t),d=s||i?[...u?Wa(u):[],...Wa(e)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const h=u&&o?HC(u,r):null;let p=-1,f=null;a&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),r()}),u&&!l&&f.observe(u),f.observe(e));let y,m=l?hs(t):null;l&&w();function w(){const v=hs(t);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&r(),m=v,y=requestAnimationFrame(w)}return r(),()=>{var v;d.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(y)}}const qC=SC,KC=EC,GC=bC,JC=CC,QC=kC,Mm=wC,ZC=jC,YC=(t,e,r)=>{const n=new Map,s={platform:WC,...r},i={...s.platform,_c:n};return xC(t,e,{...s,platform:i})};var ml=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ql(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Ql(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Ql(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Ox(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Um(t,e){const r=Ox(t);return Math.round(e*r)/r}function Tu(t){const e=b.useRef(t);return ml(()=>{e.current=t}),e}function XC(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:a}={},transform:o=!0,whileElementsMounted:l,open:u}=t,[d,h]=b.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=b.useState(n);Ql(p,n)||f(n);const[y,m]=b.useState(null),[w,v]=b.useState(null),g=b.useCallback(C=>{C!==S.current&&(S.current=C,m(C))},[]),x=b.useCallback(C=>{C!==E.current&&(E.current=C,v(C))},[]),k=i||y,_=a||w,S=b.useRef(null),E=b.useRef(null),T=b.useRef(d),O=l!=null,I=Tu(l),q=Tu(s),F=Tu(u),re=b.useCallback(()=>{if(!S.current||!E.current)return;const C={placement:e,strategy:r,middleware:p};q.current&&(C.platform=q.current),YC(S.current,E.current,C).then(N=>{const M={...N,isPositioned:F.current!==!1};$.current&&!Ql(T.current,M)&&(T.current=M,oo.flushSync(()=>{h(M)}))})},[p,e,r,q,F]);ml(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[u]);const $=b.useRef(!1);ml(()=>($.current=!0,()=>{$.current=!1}),[]),ml(()=>{if(k&&(S.current=k),_&&(E.current=_),k&&_){if(I.current)return I.current(k,_,re);re()}},[k,_,re,I,O]);const oe=b.useMemo(()=>({reference:S,floating:E,setReference:g,setFloating:x}),[g,x]),K=b.useMemo(()=>({reference:k,floating:_}),[k,_]),ee=b.useMemo(()=>{const C={position:r,left:0,top:0};if(!K.floating)return C;const N=Um(K.floating,d.x),M=Um(K.floating,d.y);return o?{...C,transform:"translate("+N+"px, "+M+"px)",...Ox(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:M}},[r,o,K.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:re,refs:oe,elements:K,floatingStyles:ee}),[d,re,oe,K,ee])}const eN=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Mm({element:n.current,padding:s}).fn(r):{}:n?Mm({element:n,padding:s}).fn(r):{}}}},tN=(t,e)=>({...qC(t),options:[t,e]}),rN=(t,e)=>({...KC(t),options:[t,e]}),nN=(t,e)=>({...ZC(t),options:[t,e]}),sN=(t,e)=>({...GC(t),options:[t,e]}),iN=(t,e)=>({...JC(t),options:[t,e]}),aN=(t,e)=>({...QC(t),options:[t,e]}),oN=(t,e)=>({...eN(t),options:[t,e]});var lN="Arrow",Ix=b.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return c.jsx(Oe.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ix.displayName=lN;var cN=Ix;function uN(t){const[e,r]=b.useState(void 0);return Ur(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>
vendor: 10,736 bytes, line 308
308{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,o;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,o=u.blockSize}else a=t.offsetWidth,o=t.offsetHeight;r({width:a,height:o})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Lx="Popper",[$x,Dx]=uo(Lx),[iI,Mx]=$x(Lx),Ux="PopperAnchor",Fx=b.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=Mx(Ux,r),a=b.useRef(null),o=lt(e,a);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.jsx(Oe.div,{...s,ref:o})});Fx.displayName=Ux;var Af="PopperContent",[dN,hN]=$x(Af),zx=b.forwardRef((t,e)=>{var pe,xs,Vr,zn,qr,ws;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:y,...m}=t,w=Mx(Af,r),[v,g]=b.useState(null),x=lt(e,Kr=>g(Kr)),[k,_]=b.useState(null),S=uN(k),E=(S==null?void 0:S.width)??0,T=(S==null?void 0:S.height)??0,O=n+(i!=="center"?"-"+i:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],F=q.length>0,re={padding:I,boundary:q.filter(pN),altBoundary:F},{refs:$,floatingStyles:oe,placement:K,isPositioned:ee,middlewareData:C}=XC({strategy:"fixed",placement:O,whileElementsMounted:(...Kr)=>VC(...Kr,{animationFrame:f==="always"}),elements:{reference:w.anchor},middleware:[tN({mainAxis:s+T,alignmentAxis:a}),l&&rN({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?nN():void 0,...re}),l&&sN({...re}),iN({...re,apply:({elements:Kr,rects:go,availableWidth:Hc,availableHeight:vo})=>{const{width:Vc,height:Fi}=go.reference,bs=Kr.floating.style;bs.setProperty("--radix-popper-available-width",`${Hc}px`),bs.setProperty("--radix-popper-available-height",`${vo}px`),bs.setProperty("--radix-popper-anchor-width",`${Vc}px`),bs.setProperty("--radix-popper-anchor-height",`${Fi}px`)}}),k&&oN({element:k,padding:o}),mN({arrowWidth:E,arrowHeight:T}),p&&aN({strategy:"referenceHidden",...re})]}),[N,M]=Hx(K),X=br(y);Ur(()=>{ee&&(X==null||X())},[ee,X]);const H=(pe=C.arrow)==null?void 0:pe.x,se=(xs=C.arrow)==null?void 0:xs.y,ae=((Vr=C.arrow)==null?void 0:Vr.centerOffset)!==0,[Ie,Qe]=b.useState();return Ur(()=>{v&&Qe(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:ee?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ie,"--radix-popper-transform-origin":[(zn=C.transformOrigin)==null?void 0:zn.x,(qr=C.transformOrigin)==null?void 0:qr.y].join(" "),...((ws=C.hide)==null?void 0:ws.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:c.jsx(dN,{scope:r,placedSide:N,onArrowChange:_,arrowX:H,arrowY:se,shouldHideArrow:ae,children:c.jsx(Oe.div,{"data-side":N,"data-align":M,...m,ref:x,style:{...m.style,animation:ee?void 0:"none"}})})})});zx.displayName=Af;var Bx="PopperArrow",fN={top:"bottom",right:"left",bottom:"top",left:"right"},Wx=b.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=hN(Bx,n),a=fN[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(cN,{...s,ref:r,style:{...s.style,display:"block"}})})});Wx.displayName=Bx;function pN(t){return t!==null}var mN=t=>({name:"transformOrigin",options:t,fn(e){var w,v,g;const{placement:r,rects:n,middlewareData:s}=e,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,o=a?0:t.arrowWidth,l=a?0:t.arrowHeight,[u,d]=Hx(r),h={start:"0%",center:"50%",end:"100%"}[d],p=(((v=s.arrow)==null?void 0:v.x)??0)+o/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let y="",m="";return u==="bottom"?(y=a?h:`${p}px`,m=`${-l}px`):u==="top"?(y=a?h:`${p}px`,m=`${n.floating.height+l}px`):u==="right"?(y=`${-l}px`,m=a?h:`${f}px`):u==="left"&&(y=`${n.floating.width+l}px`,m=a?h:`${f}px`),{data:{x:y,y:m}}}});function Hx(t){const[e,r="center"]=t.split("-");return[e,r]}var gN=Fx,vN=zx,yN=Wx,[$c,aI]=uo("Tooltip",[Dx]),Of=Dx(),Vx="TooltipProvider",xN=700,Fm="tooltip.open",[wN,qx]=$c(Vx),Kx=t=>{const{__scopeTooltip:e,delayDuration:r=xN,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,a=b.useRef(!0),o=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(wN,{scope:e,isOpenDelayedRef:a,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u},[]),disableHoverableContent:s,children:i})};Kx.displayName=Vx;var Gx="Tooltip",[oI,Dc]=$c(Gx),Zd="TooltipTrigger",bN=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Dc(Zd,r),i=qx(Zd,r),a=Of(r),o=b.useRef(null),l=lt(e,o,s.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),h=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(gN,{asChild:!0,...a,children:c.jsx(Oe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Se(t.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:Se(t.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:Se(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Se(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Se(t.onBlur,s.onClose),onClick:Se(t.onClick,s.onClose)})})});bN.displayName=Zd;var kN="TooltipPortal",[lI,_N]=$c(kN,{forceMount:void 0}),Si="TooltipContent",Jx=b.forwardRef((t,e)=>{const r=_N(Si,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,a=Dc(Si,t.__scopeTooltip);return c.jsx(Ii,{present:n||a.open,children:a.disableHoverableContent?c.jsx(Qx,{side:s,...i,ref:e}):c.jsx(SN,{side:s,...i,ref:e})})}),SN=b.forwardRef((t,e)=>{const r=Dc(Si,t.__scopeTooltip),n=qx(Si,t.__scopeTooltip),s=b.useRef(null),i=lt(e,s),[a,o]=b.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:h}=n,p=b.useCallback(()=>{o(null),h(!1)},[h]),f=b.useCallback((y,m)=>{const w=y.currentTarget,v={x:y.clientX,y:y.clientY},g=TN(v,w.getBoundingClientRect()),x=RN(v,g),k=PN(m.getBoundingClientRect()),_=ON([...x,...k]);o(_),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){const y=w=>f(w,d),m=w=>f(w,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",m)}}},[l,d,f,p]),b.useEffect(()=>{if(a){const y=m=>{const w=m.target,v={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),x=!AN(v,a);g?p():x&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,a,u,p]),c.jsx(Qx,{...t,ref:i})}),[EN,jN]=$c(Gx,{isInside:!1}),CN=sE("TooltipContent"),Qx=b.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...o}=t,l=Dc(Si,r),u=Of(r),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(Fm,d),()=>document.removeEventListener(Fm,d)),[d]),b.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),c.jsx(Nc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:c.jsxs(vN,{"data-state":l.stateAttribute,...u,...o,ref:e,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(CN,{children:n}),c.jsx(EN,{scope:r,isInside:!0,children:c.jsx(NE,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Jx.displayName=Si;var Zx="TooltipArrow",NN=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Of(r);return jN(Zx,r).isInside?null:c.jsx(yN,{...s,...n,ref:e})});NN.displayName=Zx;function TN(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function RN(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function PN(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function AN(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){const o=e[i],l=e[a],u=o.x,d=o.y,h=l.x,p=l.y;d>n!=p>n&&r<(h-u)*(n-d)/(p-d)+u&&(s=!s)}return s}function ON(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),IN(e)}function IN(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const s=t[n];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var LN=Kx,Yx=Jx;const $N=LN,DN=b.forwardRef(({className:t,sideOffset:e=4,...r},n)=>c.jsx(Yx,{ref:n,sideOffset:e,className:Je("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
308de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));DN.displayName=Yx.displayName;const If="/assets/ek-logo-84wWFbJt.png",MN=fo("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),le=b.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const a=n?rE:"button";return c.jsx(a,{className:Je(MN({variant:e,size:r,className:t})),ref:i,...s})});le.displayName="Button";const UN=fo("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function FN({className:t,variant:e,...r}){return c.jsx("div",{className:Je(UN({variant:e}),t),...r})}var Ru="focusScope.autoFocusOnMount",Pu="focusScope.autoFocusOnUnmount",zm={bubbles:!1,cancelable:!0},zN="FocusScope",Xx=b.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,l]=b.useState(null),u=br(s),d=br(i),h=b.useRef(null),p=lt(e,m=>l(m)),f=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let m=function(x){if(f.paused||!o)return;const k=x.target;o.contains(k)?h.current=k:tn(h.current,{select:!0})},w=function(x){if(f.paused||!o)return;const k=x.relatedTarget;k!==null&&(o.contains(k)||tn(h.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const _ of x)_.removedNodes.length>0&&tn(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const g=new MutationObserver(v);return o&&g.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),g.disconnect()}}},[n,o,f.paused]),b.useEffect(()=>{if(o){Wm.add(f);const m=document.activeElement;if(!o.contains(m)){const v=new CustomEvent(Ru,zm);o.addEventListener(Ru,u),o.dispatchEvent(v),v.defaultPrevented||(BN(KN(ew(o)),{select:!0}),document.activeElement===m&&tn(o))}return()=>{o.removeEventListener(Ru,u),setTimeout(()=>{const v=new CustomEvent(Pu,zm);o.addEventListener(Pu,d),o.dispatchEvent(v),v.defaultPrevented||tn(m??document.body,{select:!0}),o.removeEventListener(Pu,d),Wm.remove(f)},0)}}},[o,u,d,f]);const y=b.useCallback(m=>{if(!r&&!n||f.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(w&&v){const g=m.currentTarget,[x,k]=WN(g);x&&k?!m.shiftKey&&v===k?(m.preventDefault(),r&&tn(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),r&&tn(k,{select:!0})):v===g&&m.preventDefault()}},[r,n,f.paused]);return c.jsx(Oe.div,{tabIndex:-1,...a,ref:p,onKeyDown:y})});Xx.displayName=zN;function BN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(tn(n,{select:e}),document.activeElement!==r)return}function WN(t){const e=ew(t),r=Bm(e,t),n=Bm(e.reverse(),t);return[r,n]}function ew(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Bm(t,e){for(const r of t)if(!HN(r,{upTo:e}))return r}function HN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function VN(t){return t instanceof HTMLInputElement&&"select"in t}function tn(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&VN(t)&&e&&t.select()}}var Wm=qN();function qN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=Hm(t,e),t.unshift(e)},remove(e){var r;t=Hm(t,e),(r=t[0])==null||r.resume()}}}function Hm(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function KN(t){return t.filter(e=>e.tagName!=="A")}var Au=0;function GN(){b.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Vm()),document.body.insertAdjacentElement("beforeend",t[1]??Vm()),Au++,()=>{Au===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
vendor: 5,838 bytes, lines 308-323
308=>e.remove()),Au--}},[])}function Vm(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var vr=function(){return vr=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},vr.apply(this,arguments)};function tw(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function JN(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var gl="right-scroll-bar-position",vl="width-before-scroll-bar",QN="with-scroll-bars-hidden",ZN="--removed-body-scroll-bar-size";function Ou(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function YN(t,e){var r=b.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var XN=typeof window<"u"?b.useLayoutEffect:b.useEffect,qm=new WeakMap;function eT(t,e){var r=YN(null,function(n){return t.forEach(function(s){return Ou(s,n)})});return XN(function(){var n=qm.get(r);if(n){var s=new Set(n),i=new Set(t),a=r.current;s.forEach(function(o){i.has(o)||Ou(o,null)}),i.forEach(function(o){s.has(o)||Ou(o,a)})}qm.set(r,t)},[t]),r}function tT(t){return t}function rT(t,e){e===void 0&&(e=tT);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var a=e(i,n);return r.push(a),function(){r=r.filter(function(o){return o!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(o){return i(o)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var o=r;r=[],o.forEach(i),a=r}var l=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return s}function nT(t){t===void 0&&(t={});var e=rT(null);return e.options=vr({async:!0,ssr:!1},t),e}var rw=function(t){var e=t.sideCar,r=tw(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,vr({},r))};rw.isSideCarExport=!0;function sT(t,e){return t.useMedium(e),rw}var nw=nT(),Iu=function(){},Mc=b.forwardRef(function(t,e){var r=b.useRef(null),n=b.useState({onScrollCapture:Iu,onWheelCapture:Iu,onTouchMoveCapture:Iu}),s=n[0],i=n[1],a=t.forwardProps,o=t.children,l=t.className,u=t.removeScrollBar,d=t.enabled,h=t.shards,p=t.sideCar,f=t.noRelative,y=t.noIsolation,m=t.inert,w=t.allowPinchZoom,v=t.as,g=v===void 0?"div":v,x=t.gapMode,k=tw(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,S=eT([r,e]),E=vr(vr({},k),s);return b.createElement(b.Fragment,null,d&&b.createElement(_,{sideCar:nw,removeScrollBar:u,shards:h,noRelative:f,noIsolation:y,inert:m,setCallbacks:i,allowPinchZoom:!!w,lockRef:r,gapMode:x}),a?b.cloneElement(b.Children.only(o),vr(vr({},E),{ref:S})):b.createElement(g,vr({},E,{className:l,ref:S}),o))});Mc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mc.classNames={fullWidth:vl,zeroRight:gl};var iT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=iT();return e&&t.setAttribute("nonce",e),t}function oT(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function lT(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var cT=function(){var t=0,e=null;return{add:function(r){t==0&&(e=aT())&&(oT(e,r),lT(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},uT=function(){var t=cT();return function(e,r){b.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},sw=function(){var t=uT(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},dT={left:0,top:0,right:0,gap:0},Lu=function(t){return parseInt(t||"",10)||0},hT=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Lu(r),Lu(n),Lu(s)]},fT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return dT;var e=hT(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},pT=sw(),ai="data-scroll-locked",mT=function(t,e,r,n){var s=t.left,i=t.top,a=t.right,o=t.gap;return r===void 0&&(r="margin"),`
309  .`.concat(QN,` {
310   overflow: hidden `).concat(n,`;
311   padding-right: `).concat(o,"px ").concat(n,`;
312  }
313  body[`).concat(ai,`] {
314    overflow: hidden `).concat(n,`;
315    overscroll-behavior: contain;
316    `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&`
317    padding-left: `.concat(s,`px;
318    padding-top: `).concat(i,`px;
319    padding-right: `).concat(a,`px;
320    margin-left:0;
321    margin-top:0;
322    margin-right: `).concat(o,"px ").concat(n,`;
323    `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";
323")].filter(Boolean).join(""),`
324  }
325  
326  .`).concat(gl,` {
327    right: `).concat(o,"px ").concat(n,`;
328  }
329  
330  .`).concat(vl,` {
331    margin-right: `).concat(o,"px ").concat(n,`;
332  }
333  
334  .`).concat(gl," .").concat(gl,` {
335    right: 0 `).concat(n,`;
336  }
337  
338  .`).concat(vl," .").concat(vl,` {
339    margin-right: 0 `).concat(n,`;
340  }
341  
342  body[`).concat(ai,`] {
343    `).concat(ZN,": ").concat(o,`px;
344  }
345`)},Km=function(){var t=parseInt(document.body.getAttribute(ai)||"0",10);return isFinite(t)?t:0},gT=function(){b.useEffect(function(){return document.body.setAttribute(ai,(Km()+1).toString()),function(){var t=Km()-1;t<=0?document.body.removeAttribute(ai):document.body.setAttribute(ai,t.toString())}},[])},vT=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;gT();var i=b.useMemo(function(){return fT(s)},[s]);return b.createElement(pT,{styles:mT(i,!e,s,r?"":"!important")})},Yd=!1;if(typeof window<"u")try{var Bo=Object.defineProperty({},"passive",{get:function(){return Yd=!0,!0}});window.addEventListener("test",Bo,Bo),window.removeEventListener("test",Bo,Bo)}catch{Yd=!1}var js=Yd?{passive:!1}:!1,yT=function(t){return t.tagName==="TEXTAREA"},iw=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!yT(t)&&r[e]==="visible")},xT=function(t){return iw(t,"overflowY")},wT=function(t){return iw(t,"overflowX")},Gm=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=aw(t,n);if(s){var i=ow(t,n),a=i[1],o=i[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},bT=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},kT=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},aw=function(t,e){return t==="v"?xT(e):wT(e)},ow=function(t,e){return t==="v"?bT(e):kT(e)},_T=function(t,e){return t==="h"&&e==="rtl"?-1:1},ST=function(t,e,r,n,s){var i=_T(t,window.getComputedStyle(e).direction),a=i*n,o=r.target,l=e.contains(o),u=!1,d=a>0,h=0,p=0;do{if(!o)break;var f=ow(t,o),y=f[0],m=f[1],w=f[2],v=m-w-i*y;(y||v)&&aw(t,o)&&(h+=v,p+=y);var g=o.parentNode;o=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&o!==document.body||l&&(e.contains(o)||e===o));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(u=!0),u},Wo=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Jm=function(t){return[t.deltaX,t.deltaY]},Qm=function(t){return t&&"current"in t?t.current:t},ET=function(t,e){return t[0]===e[0]&&t[1]===e[1]},jT=function(t){return`
346  .block-interactivity-`.concat(t,` {pointer-events: none;}
347  .allow-interactivity-`).concat(t,` {pointer-events: all;}
348`)},CT=0,Cs=[];function NT(t){var e=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),s=b.useState(CT++)[0],i=b.useState(sw)[0],a=b.useRef(t);b.useEffect(function(){a.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=JN([t.lockRef.current],(t.shards||[]).map(Qm),!0).filter(Boolean);return m.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=b.useCallback(function(m,w){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var v=Wo(m),g=r.current,x="deltaX"in m?m.deltaX:g[0]-v[0],k="deltaY"in m?m.deltaY:g[1]-v[1],_,S=m.target,E=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in m&&E==="h"&&S.type==="range")return!1;var T=Gm(E,S);if(!T)return!0;if(T?_=E:(_=E==="v"?"h":"v",T=Gm(E,S)),!T)return!1;if(!n.current&&"changedTouches"in m&&(x||k)&&(n.current=_),!_)return!0;var O=n.current||_;return ST(O,w,m,O==="h"?x:k,!0)},[]),l=b.useCallback(function(m){var w=m;if(!(!Cs.length||Cs[Cs.length-1]!==i)){var v="deltaY"in w?Jm(w):Wo(w),g=e.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&ET(_.delta,v)}
vendor: 6,401 bytes, line 348
348)[0];if(g&&g.should){w.cancelable&&w.preventDefault();return}if(!g){var x=(a.current.shards||[]).map(Qm).filter(Boolean).filter(function(_){return _.contains(w.target)}),k=x.length>0?o(w,x[0]):!a.current.noIsolation;k&&w.cancelable&&w.preventDefault()}}},[]),u=b.useCallback(function(m,w,v,g){var x={name:m,delta:w,target:v,should:g,shadowParent:TT(v)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),d=b.useCallback(function(m){r.current=Wo(m),n.current=void 0},[]),h=b.useCallback(function(m){u(m.type,Jm(m),m.target,o(m,t.lockRef.current))},[]),p=b.useCallback(function(m){u(m.type,Wo(m),m.target,o(m,t.lockRef.current))},[]);b.useEffect(function(){return Cs.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,js),document.addEventListener("touchmove",l,js),document.addEventListener("touchstart",d,js),function(){Cs=Cs.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,js),document.removeEventListener("touchmove",l,js),document.removeEventListener("touchstart",d,js)}},[]);var f=t.removeScrollBar,y=t.inert;return b.createElement(b.Fragment,null,y?b.createElement(i,{styles:jT(s)}):null,f?b.createElement(vT,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function TT(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const RT=sT(nw,NT);var lw=b.forwardRef(function(t,e){return b.createElement(Mc,vr({},t,{ref:e,sideCar:RT}))});lw.classNames=Mc.classNames;var PT=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ns=new WeakMap,Ho=new WeakMap,Vo={},$u=0,cw=function(t){return t&&(t.host||cw(t.parentNode))},AT=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=cw(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},OT=function(t,e,r,n){var s=AT(e,Array.isArray(t)?t:[t]);Vo[r]||(Vo[r]=new WeakMap);var i=Vo[r],a=[],o=new Set,l=new Set(s),u=function(h){!h||o.has(h)||(o.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(o.has(p))d(p);else try{var f=p.getAttribute(n),y=f!==null&&f!=="false",m=(Ns.get(p)||0)+1,w=(i.get(p)||0)+1;Ns.set(p,m),i.set(p,w),a.push(p),m===1&&y&&Ho.set(p,!0),w===1&&p.setAttribute(r,"true"),y||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return d(e),o.clear(),$u++,function(){a.forEach(function(h){var p=Ns.get(h)-1,f=i.get(h)-1;Ns.set(h,p),i.set(h,f),p||(Ho.has(h)||h.removeAttribute(n),Ho.delete(h)),f||h.removeAttribute(r)}),$u--,$u||(Ns=new WeakMap,Ns=new WeakMap,Ho=new WeakMap,Vo={})}},IT=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=PT(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),OT(n,s,r,"aria-hidden")):function(){return null}},Uc="Dialog",[uw,cI]=uo(Uc),[LT,or]=uw(Uc),dw=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=b.useRef(null),l=b.useRef(null),[u,d]=H0({prop:n,defaultProp:s??!1,onChange:i,caller:Uc});return c.jsx(LT,{scope:e,triggerRef:o,contentRef:l,contentId:Cu(),titleId:Cu(),descriptionId:Cu(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),modal:a,children:r})};dw.displayName=Uc;var hw="DialogTrigger",fw=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(hw,r),i=lt(e,s.triggerRef);return c.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Df(s.open),...n,ref:i,onClick:Se(t.onClick,s.onOpenToggle)})});fw.displayName=hw;var Lf="DialogPortal",[$T,pw]=uw(Lf,{forceMount:void 0}),mw=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=or(Lf,e);return c.jsx($T,{scope:e,forceMount:r,children:b.Children.map(n,a=>c.jsx(Ii,{present:r||i.open,children:c.jsx(yf,{asChild:!0,container:s,children:a})}))})};mw.displayName=Lf;var Zl="DialogOverlay",gw=b.forwardRef((t,e)=>{const r=pw(Zl,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=or(Zl,t.__scopeDialog);return i.modal?c.jsx(Ii,{present:n||i.open,children:c.jsx(MT,{...s,ref:e})}):null});gw.displayName=Zl;var DT=Fa("DialogOverlay.RemoveScroll"),MT=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(Zl,r);return c.jsx(lw,{as:DT,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Oe.div,{"data-state":Df(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),fs="DialogContent",vw=b.forwardRef((t,e)=>{const r=pw(fs,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=or(fs,t.__scopeDialog);return c.jsx(Ii,{present:n||i.open,children:i.modal?c.jsx(UT,{...s,ref:e}):c.jsx(FT,{...s,ref:e})})});vw.displayName=fs;var UT=b.forwardRef((t,e)=>{const r=or(fs,t.__scopeDialog),n=b.useRef(null),s=lt(e,r.contentRef,n);return b.useEffect(()=>{const i=n.current;if(i)return IT(i)},[]),c.jsx(yw,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Se(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:Se(t.onFocusOutside,i=>i.preventDefault())})}),FT=b.forwardRef((t,e)=>{const r=or(fs,t.__scopeDialog),n=b.useRef(!1),s=b.useRef(!1);return c.jsx(yw,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(n.current||(o=r.triggerRef.current)==null||o.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),yw=b.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=or(fs,r),l=b.useRef(null),u=lt(e,l);return GN(),c.jsxs(c.Fragment,{children:[c.jsx(Xx,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(Nc,{role:"dialog",id:o.c
348ontentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Df(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(zT,{titleId:o.titleId}),c.jsx(WT,{contentRef:l,descriptionId:o.descriptionId})]})]})}),$f="DialogTitle",xw=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or($f,r);return c.jsx(Oe.h2,{id:s.titleId,...n,ref:e})});xw.displayName=$f;var ww="DialogDescription",bw=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(ww,r);return c.jsx(Oe.p,{id:s.descriptionId,...n,ref:e})});bw.displayName=ww;var kw="DialogClose",_w=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(kw,r);return c.jsx(Oe.button,{type:"button",...n,ref:e,onClick:Se(t.onClick,()=>s.onOpenChange(!1))})});_w.displayName=kw;function Df(t){return t?"open":"closed"}var Sw="DialogTitleWarning",[uI,Ew]=eE(Sw,{contentName:fs,titleName:$f,docsSlug:"dialog"}),zT=({titleId:t})=>{const e=Ew(Sw),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
349
350If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
351
352For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},BT="DialogDescriptionWarning",WT=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ew(BT).contentName}}.`;return b.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},HT=dw,VT=fw,qT=mw,jw=gw,Cw=vw,Nw=xw,Tw=bw,KT=_w;const GT=HT,JT=VT,QT=qT,Rw=b.forwardRef(({className:t,...e},r)=>c.jsx(jw,{className:Je("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:r}));Rw.displayName=jw.displayName;const ZT=fo("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Pw=b.forwardRef(({side:t="right",className:e,children:r,...n},s)=>c.jsxs(QT,{children:[c.jsx(Rw,{}),c.jsxs(Cw,{ref:s,className:Je(ZT({side:t}),e),...n,children:[r,c.jsxs(KT,{className:"absolute right-4 top-4 roun
352ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Ac,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pw.displayName=Cw.displayName;const Aw=({className:t,...e})=>c.jsx("div",{className:Je("flex flex-col space-y-2 text-center sm:text-left",t),...e});Aw.displayName="SheetHeader";const Ow=b.forwardRef(({className:t,...e},r)=>c.jsx(Nw,{ref:r,className:Je("text-lg font-semibold text-foreground",t),...e}));Ow.displayName=Nw.displayName;const Iw=b.forwardRef(({className:t,...e},r)=>c.jsx(Tw,{ref:r,className:Je("text-sm text-muted-foreground",t),...e}));Iw.displayName=Tw.displayName;const Zm=t=>{let e;const r=new Set,n=(u,d)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const p=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),r.forEach(f=>f(e,p))}},s=()=>e,o={setState:n,getState:s,getInitialState:()=>l,subscribe:u=>(r.add(u),()=>r.delete(u))},l=e=t(n,s,o);return o},YT=t=>t?Zm(t):Zm,XT=t=>t;function e2(t,e=XT){const r=P.useSyncExternalStore(t.subscribe,P.useCallback(()=>e(t.getState()),[t,e]),P.useCallback(()=>e(t.getInitialState()),[t,e]));return P.useDebugValue(r),r}const t2=t=>{const e=YT(t),r=n=>e2(e,n);return Object.assign(r,e),r},r2=t=>t2;function Lw(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const a=l=>l===null?null:JSON.parse(l,void 0),o=(i=r.getItem(s))!=null?i:null;return o instanceof Promise?o.then(a):a(o)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,void 0)),removeItem:s=>r.removeItem(s)}}const Xd=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Xd(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Xd(n)(r)}}}},n2=(t,e)=>(r,n,s)=>{let i={storage:Lw(()=>window.localStorage),partialize:w=>w,version:0,merge:(w,v)=>({...v,...w}),...e},a=!1,o=0;const l=new Set,u=new Set;let d=i.storage;if(!d)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...w)},n,s);const h=()=>{const w=i.partialize({...n()});return d.setItem(i.name,{state:w,version:i.version})},p=s.setState;s.setState=(w,v)=>(p(w,v),h());const f=t((...w)=>(r(...w),h()),n,s);s.getInitialState=()=>f;let y;const m=()=>{var w,v;if(!d)return;const g=++o;a=!1,l.forEach(k=>{var _;return k((_=n())!=null?_:f)});const x=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(w=n())!=null?w:f))||void 0;return Xd(d.getItem.bind(d))(i.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==i.version){if(i.migrate){const _=i.migrate(k.state,k.version);return _ instanceof Promise?_.then(S=>[!0,S]):[!0,_]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,k.state];return[!1,void 0]}).then(k=>{var _;if(g!==o)return;const[S,E]=k;if(y=i.merge(E,(_=n())!=null?_:f),r(y,!0),S)return h()}).then(()=>{g===o&&(x==null||x(n(),void 0),y=n(),a=!0,u.forEach(k=>k(y)))}).catch(k=>{g===o&&(x==null||x(void 0,k))})};return s.persist={setOptions:w=>{i={...i,...w},w.storage&&(d=w.storage)},clearStorage:()=>{d==null||d.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:w=>(l.add(w),()=>{l.delete(w)}),onFinishHydration:w=>(u.add(w),()=>{u.delete(w)})},i.skipHydration||m(),y||f},s2=n2,i2="2025-07",a2="rbdm1h-v0.myshopify.com",o2=`https://${a2}/api/${i2}/graphql.json`,l2="9d3eae559ae62001440a59a783fa9dbf";async function ys(t,e={}){const r=await fetch(o2,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":l2},body:JSON.stringify({query:t,variables:e})});if(r.status===402){LS.error("Shopify: Payment required",{description:"Shopify API access requires an active Shopify billing plan."});return}if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const n=await r.json();if(n.errors)throw new Error(`Error calling Shopify: ${n.errors.map(s=>s.message).join(", ")}`);return n}const c2=`
353  query GetProducts($first: Int!, $query: String) {
354    products(first: $first, query: $query) {
355      edges {
356        node {
357          id
358          title
359          description
360          handle
361          priceRange { minVariantPrice { amount currencyCode } }
362          images(first: 5) { edges { node { url altText } } }
363          variants(first: 25) {
364            edges {
365              node {
366                id
367                title
368                price { amount currencyCode }
369                availableForSale
370                selectedOptions { name value }
371              }
372            }
373          }
374          options { name values }
375        }
376      }
377    }
378  }
379`,u2=`
380  query GetProduct($handle: String!) {
381    product(handle: $handle) {
382      id
383      title
384      description
385      handle
386      priceRange { minVariantPrice { amount currencyCode } }
387      images(first: 10) { edges { node { url altText } } }
388      variants(first: 25) {
389        edges {
390          node {
391            id
392            title
393            price { amount currencyCode }
394            availableForSale
395            selectedOptions { name value }
396          }
397        }
398      }
399      options { name values }
400    }
401  }
402`,d2=`
403  query cart($id: ID!) {
404    cart(id: $id) { id totalQuantity }
405  }
406`,h2=`
407  mutation cartCreate($input: CartInput!) {
408    cartCreate(input: $input) {
409      cart {
410        id
411        checkoutUrl
412        lines(first: 100) { edges { node { id merchandise { ... on ProductVariant { id } } } } }
413      }
414      userErrors { field message }
415    }
416  }
417`,f2=`
418  mutation cartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!) {
419    cartLinesAdd(cartId: $cartId, lines: $lines) {
420      cart {
421        id
422        lines(first: 100) { edges { node { id merchandise { ... on ProductVariant { id } } } } }
423      }
424      userErrors { field message }
425    }
426  }
427`,p2=`
428  mutation cartLinesUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!) {
429    cartLinesUpdate(cartId: $cartId, lines: $lines) {
430      cart { id }
431      userErrors { field message }
432    }
433  }
434`,m2=`
435  mutation cartLinesRemove($cartId: ID!, $lineIds: [ID!]!) {
436    cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {
437      cart { id }
438      userErrors { field message }
439    }
440  }
441`;function g2(t){try{const e=new URL(t);return e.searchParams.set("channel","online_store"),e.toString()}catch{return t}}function Mf(t){return t.some(e=>e.message.toLowerCase().includes("cart not found")||e.message.toLowerCase().includes("does not exist"))}async function v2(t){var s,i,a,o,l,u,d;const e=await ys(h2,{input:{lines:[{quantity:t.quantity,merchandiseId:t.variantId}]}});if(((a=(i=(s=e==null?void 0:e.data)==null?void 0:s.cartCreate)==null?void 0:i.userErrors)==null?void 0:a.length)>0)return console.error("Cart creation failed:",e.data.cartCreate.userErrors),null;const r=(l=(o=e==null?void 0:e.data)==null?void 0:o.cartCreate)==null?void 0:l.cart;if(!(r!=null&&r.checkoutUrl))return null;const n=(d=(u=r.lines.edges[0])==null?void 0:u.node)==null?void 0:d.id;return n?{cartId:r.id,checkoutUrl:g2(r.checkoutUrl),lineId:n}:null}async function y2(t,e){var a,o,l,u,d,h,p;const r=await ys(f2,{cartId:t,lines:[{quantity:e.quantity,merchandiseId:e.variantId}]}),n=((o=(a=r==null?void 0:r.data)==null?void 0:a.cartLinesAdd)==null?void 0:o.userErrors)||[];if(Mf(n))return{success:!1,cartNotFound:!0};if(n.length>0)return{success:!1};const i=(((h=(d=(u=(l=r==null?void 0:r.data)==null?void 0:l.cartLinesAdd)==null?void 0:u.cart)==null?void 0:d.lines)==null?void 0:h.edges)||[]).find(f=>f.node.merchandise.id===e.variantId);return{success:!0,lineId:(p=i==null?void 0:i.node)==null?void 0:p.id}}async function Ym(t,e,r){var i,a;const n=await ys(p2,{cartId:t,lines:[{id:e,quantity:r}]}),s=((a=(i=n==null?void 0:n.data)==null?void 0:i.cartLinesUpdate)==null?void 0:a.userErrors)||[];return Mf(s)?{success:!1,cartNotFound:!0}:s.length>0?{success:!1}:{success:!0}}async function x2(t,e){var s,i;const r=await ys(m2,{cartId:t,lineIds:[e]}),n=((i=(s=r==null?void 0:r.data)==null?void 0:s.cartLinesRemove)==null?void 0:i.userErrors)||[];return Mf(n)?{success:!1,cartNotFound:!0}:n.length>0?{success:!1}:{success:!0}}const Ei=r2()(s2((t,e)=>({items:[],cartId:null,checkoutUrl:null,isLoading:!1,isSyncing:!1,addItem:async r=>{const{items:n,cartId:s,clearCart:i}=e(),a=n.find(o=>o.variantId===r.variantId);t({isLoading:!0});try{if(s)if(a){const o=a.quantity+r.quantity;if(!a.lineId)return;const l=await Ym(s,a.lineId,o);if(l.success){const u=e().items;t({items:u.map(d=>d.variantId===r.variantId?{...d,quantity:o}:d)})}
441else l.cartNotFound&&i()}else{const o=await y2(s,{variantId:r.variantId,quantity:r.quantity});if(o.success){const l=e().items;t({items:[...l,{...r,lineId:o.lineId??null}]})}else o.cartNotFound&&i()}else{const o=await v2({variantId:r.variantId,quantity:r.quantity});o&&t({cartId:o.cartId,checkoutUrl:o.checkoutUrl,items:[{...r,lineId:o.lineId}]})}}catch(o){console.error("Failed to add item:",o)}finally{t({isLoading:!1})}},updateQuantity:async(r,n)=>{if(n<=0){await e().removeItem(r);return}const{items:s,cartId:i,clearCart:a}=e(),o=s.find(l=>l.variantId===r);if(!(!(o!=null&&o.lineId)||!i)){t({isLoading:!0});try{const l=await Ym(i,o.lineId,n);if(l.success){const u=e().items;t({items:u.map(d=>d.variantId===r?{...d,quantity:n}:d)})}else l.cartNotFound&&a()}finally{t({isLoading:!1})}}},removeItem:async r=>{const{items:n,cartId:s,clearCart:i}=e(),a=n.find(o=>o.variantId===r);if(!(!(a!=null&&a.lineId)||!s)){t({isLoading:!0});try{const o=await x2(s,a.lineId);if(o.success){const u=e().items.filter(d=>d.variantId!==r);u.length===0?i():t({items:u})}else o.cartNotFound&&i()}finally{t({isLoading:!1})}}},clearCart:()=>t({items:[],cartId:null,checkoutUrl:null}),getCheckoutUrl:()=>e().checkoutUrl,syncCart:async()=>{var i;const{cartId:r,isSyncing:n,clearCart:s}=e();if(!(!r||n)){t({isSyncing:!0});try{const a=await ys(d2,{id:r});if(!a)return;const o=(i=a==null?void 0:a.data)==null?void 0:i.cart;(!o||o.totalQuantity===0)&&s()}catch(a){console.error("Failed to sync cart:",a)}finally{t({isSyncing:!1})}}}}),{name:"shopify-cart",storage:Lw(()=>localStorage),partialize:t=>({items:t.items,cartId:t.cartId,checkoutUrl:t.checkoutUrl})})),w2=({triggerClassName:t})=>{var f;const[e,r]=b.useState(!1),{items:n,isLoading:s,isSyncing:i,updateQuantity:a,removeItem:o,getCheckoutUrl:l,syncCart:u}=Ei(),d=n.reduce((y,m)=>y+m.quantity,0),h=n.reduce((y,m)=>y+parseFloat(m.price.amount)*m.quantity,0);b.useEffect(()=>
441{e&&u()},[e,u]);const p=()=>{const y=l();y&&(window.open(y,"_blank"),r(!1))};return c.jsxs(GT,{open:e,onOpenChange:r,children:[c.jsx(JT,{asChild:!0,children:c.jsxs(le,{variant:"outline",size:"icon",className:`relative ${t??""}`,children:[c.jsx(Tm,{className:"h-5 w-5"}),d>0&&c.jsx(FN,{className:"absolute -top-2 -right-2 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs bg-brand-green text-brand-black",children:d})]})}),c.jsxs(Pw,{className:"w-full sm:max-w-lg flex flex-col h-full",children:[c.jsxs(Aw,{className:"flex-shrink-0",children:[c.jsx(Ow,{children:"Shopping Cart"}),c.jsx(Iw,{children:d===0?"Your cart is empty":`${d} item${d!==1?"s":""} in your cart`})]}),c.jsx("div",{className:"flex flex-col flex-1 pt-6 min-h-0",children:n.length===0?c.jsx("div",{className:"flex-1 flex items-center justify-center",children:c.jsxs("div",{className:"text-center",children:[c.jsx(Tm,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),c.jsx("p",{className:"text-muted-foreground",children:"Your cart is empty"})]})}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex-1 overflow-y-auto pr-2 min-h-0",children:c.jsx("div",{className:"space-y-4",children:n.map(y=>{var m,w,v;return c.jsxs("div",{className:"flex gap-4 p-2",children:[c.jsx("div",{className:"w-16 h-16 bg-secondary/20 rounded-md overflow-hidden flex-shrink-0",children:((v=(w=(m=y.product.node.images)==null?void 0:m.edges)==null?void 0:w[0])==null?void 0:v.node)&&c.jsx("img",{src:y.product.node.images.edges[0].node.url,alt:y.product.node.title,className:"w-full h-full object-cover"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h4",{className:"font-medium truncate",children:y.product.node.title}),c.jsx("p",{className:"text-sm text-muted-foreground",children:y.selectedOptions.map(g=>g.value).join(" • ")}),c.jsxs("p",{className:"font-semibold",children:[y.price.currencyCode," ",parseFloat(y.price.amount).toFixed(2)]})]}),c.jsxs("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[c.jsx(le,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>o(y.variantId),children:c.jsx(_j,{className:"h-3 w-3"})}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(le,{variant:"outline",size:"icon",className:"h-6 w-6",onClick:()=>a(y.variantId,y.quantity-1),children:c.jsx(mj,{className:"h-3 w-3"})}),c.jsx("span",{className:"w-8 text-center text-sm",children:y.quantity}),c.jsx(le,{variant:"outline",size:"icon",className:"h-6 w-6",onClick:()=>a(y.variantId,y.quantity+1),children:c.jsx(vj,{className:"h-3 w-3"})})]})]})]},y.variantId)})})}),c.jsxs("div",{className:"flex-shrink-0 space-y-4 pt-4 border-t bg-background",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-lg font-semibold",children:"Total"}),c.jsxs("span",{className:"text-xl font-bold",children:[((f=n[0])==null?void 0:f.price.currencyCode)||"$"," ",h.toFixed(2)]})]}),c.jsx(le,{onClick:p,className:"w-full bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-[0.2em]",size:"lg",disabled:n.length===0||s||i,children:s||i?c.jsx(za,{className:"w-4 h-4 animate-spin"}):c.jsxs(c.Fragment,{children:[c.jsx(fx,{className:"w-4 h-4 mr-2"}),"Checkout"]})})]})]})})]})]})},Xm=[{label:"Home",href:"/"},{label:"About",href:"#about",children:[{label:"Our Founder",href:"/our-founder"},{label:"What We Do",href:"/what-we-do"}]},{label:"Programs",href:"#programs",children:[{label:"Community Outreach",href:"/community-outreach"},{label:"Violence Intervention",href:"/violence-intervention"},{label:"Community Capacity Building",href:"/community-capacity-building"}]},{label:"In The News",href:"/in-the-news"},{label:"Contact",href:"/contact"}],jt=()=>{const[t,e]=b.useState(!1),[r,n]=b.useState(null),[s,i]=b.useState(null),a=l=>l.startsWith("/"),o=({href:l,className:u,children:d,onClick:h})=>a(l)?c.jsx(fe,{to:l,className:u,onClick:h,children:d}):c.jsx("a",{href:l,className:u,onClick:h,children:d});return c.jsxs("header",{className:"sticky top-0 z-50 w-full bg-brand-black/95 backdrop-blur supports-[backdrop-filter]:bg-brand-black/80 border-b border-brand-green/20",children:[c.jsxs("div",{className:"container flex h-20 items-center justify-between",children:[c.jsx(o,{href:"/",className:"flex items-center gap-3","aria-label":"Endangered Kind home",children:c.jsx("img",{src:If,alt:"Endangered Kind logo",className:"h-12 w-auto invert"})}),c.jsx("nav",{className:"hidden lg:flex items-center gap-8","aria-label":"Primary",children:Xm.map(l=>c.jsxs("div",{className:"relative",onMouseEnter:()=>l.children&&l.children.length>0&&n(l.label),onMouseLeave:()=>n(null),children:[c.jsxs(o,{href:l.href,className:"group inline-flex items-center gap-1 text-sm font-semibold uppercase tracking-wider text-secondary-foreground hover:text-brand-green transition-smooth",children:[l.label,l.children&&l.children.length>0&&c.jsx(Nm,{className:`h-3 w-3 opacity-70 transition-transform ${r===l.label?"rotate-180":""}`})]}),l.children&&l.children.length>0&&r===l.label&&c.jsx("div",{className:"absolute top-full left-0 pt-3 w-72 z-50 animate-in fade-in slide-in-from-top-2 duration-200",children:c.jsxs("div",{className:"relative bg-brand-black/95 backdrop-blur-xl border border-brand-green/30 rounded-xl shadow-2xl shadow-brand-green/10 p-2 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-brand-green/60 to-transparent"}),l.children.map(u=>c.jsxs(o,{href:u.href,className:"group/item flex items-center justify-between gap-3 rounded-lg px-4 py-3 text-sm font-semibold uppercase tracking-wider text-secondary-foreground
441/80 hover:text-brand-green hover:bg-brand-green/10 transition-all duration-200",children:[c.jsx("span",{children:u.label}),c.jsx("span",{className:"text-brand-green opacity-0 -translate-x-2 group-hover/item:opacity-100 group-hover/item:translate-x-0 transition-all duration-200",children:"→"})]},u.label))]})})]},l.label))}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"hidden md:flex items-center gap-1",children:[c.jsx("a",{href:"https://www.instagram.com/endangered_kind/",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"p-2 text-secondary-foreground hover:text-brand-green transition-smooth",children:c.jsx(_f,{className:"h-4 w-4"})}),c.jsx("a",{href:"https://www.facebook.com/endangeredkind",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"p-2 text-secondary-foreground hover:text-brand-green transition-smooth",children:c.jsx(kf,{className:"h-4 w-4"})})]}),c.jsx(le,{asChild:!0,variant:"default",size:"sm",className:"hidden sm:inline-flex bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/donate",children:"Donate"})}),c.jsx(le,{asChild:!0,variant:"outline",size:"sm",className:"hidden sm:inline-flex border-black text-black hover:bg-brand-green hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/shop",children:"Shop"})}),c.jsx(fe,{to:"/shop","aria-label":"Shop",className:"sm:hidden p-2 text-secondary-foreground hover:text-brand-green transition-smooth",children:c.jsx("span",{className:"text-xs font-bold uppercase tracking-wide",children:"Shop"})}),c.jsx(w2,{triggerClassName:"border-black text-black hover:bg-brand-green hover:text-brand-black"}),c.jsx("button",{"aria-label":"Toggle menu",className:"lg:hidden p-2 text-secondary-foreground",onClick:()=>e(!t),children:t?c.jsx(Ac,{className:"h-6 w-6"}):c.jsx(dj,{className:"h-6 w-6"})})]})]}),t&&c.jsx("div",{className:"lg:hidden border-t border-brand-green/20 bg-brand-black",children:c.jsxs("nav",{className:"container py-4 flex flex-col gap-1","aria-label":"Mobile",children:[Xm.map(l=>c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(o,{href:l.href,onClick:()=>!l.children&&e(!1),className:"text-base font-semibold uppercase tracking-wider text-secondary-foreground hover:text-brand-green py-2",children:l.label}),l.children&&l.children.length>0&&c.jsx("button",{onClick:()=>i(s===l.label?null:l.label),className:"p-2 text-secondary-foreground hover:text-brand-green","aria-label":`Toggle ${l.label} submenu`,children:c.jsx(Nm,{className:`h-4 w-4 transition-transform ${s===l.label?"rotate-180":""}`})})]}),l.children&&l.children.length>0&&s===l.label&&c.jsx("div",{className:"pl-4 flex flex-col gap-1 mb-2",children:l.children.map(u=>c.jsx(o,{href:u.href,onClick:()=>e(!1),className:"text-sm font-semibold uppercase tracking-wider text-secondary-foreground/75 hover:text-brand-green py-1.5",children:u.label},u.label))})]},l.label)),c.jsx(le,{asChild:!0,className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide w-full mt-2",children:c.jsx(fe,{to:"/donate",onClick:()=>e(!1),children:"Donate"})})]})})]})},b2=[{label:"Home",href:"/"},{label:"What We Do",href:"/what-we-do"},{label:"Our Founder",href:"/our-founder"},{label:"Shop",href:"/shop"}],Ct=()=>c.jsxs("footer",{className:"bg-brand-black text-secondary-foreground border-t-4 border-brand-green",children:[c.jsxs("div",{className:"container py-16 grid gap-10 md:grid-cols-4",children:[c.jsxs("div",{className:"md:col-span-2",children:[c.jsx(fe,{to:"/","aria-label":"Endangered Kind home",children:c.jsx("img",{src:If,alt:"Endangered Kind",className:"h-16 w-auto invert mb-4"})}),c.jsx("p",{className:"text-sm text-secondary-foreground/70 max-w-sm mb-5",children:"For the People. With the People. Stabilizing communities, building leadership, strengthening the future."}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("a",{href:"https://www.instagram.com/endangered_kind/",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"inline-flex h-10 w-10 items-center justify-center rounded-full border border-secondary-foreground
441/20 text-secondary-foreground hover:text-brand-green hover:border-brand-green transition-smooth",children:c.jsx(_f,{className:"h-4 w-4"})}),c.jsx("a",{href:"https://www.facebook.com/endangeredkind",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"inline-flex h-10 w-10 items-center justify-center rounded-full border border-secondary-foreground/20 text-secondary-foreground hover:text-brand-green hover:border-brand-green transition-smooth",children:c.jsx(kf,{className:"h-4 w-4"})})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-brand-green text-sm font-bold uppercase tracking-wider mb-4",children:"Connect"}),c.jsxs("ul",{className:"space-y-2 text-sm text-secondary-foreground/80",children:[c.jsx("li",{children:"[email protected]"}),c.jsx("li",{children:"Philadelphia, PA"}),c.jsx("li",{children:"Cash App: $EndangeredKind"})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-brand-green text-sm font-bold uppercase tracking-wider mb-4",children:"Explore"}),c.jsx("ul",{className:"space-y-2 text-sm text-secondary-foreground/80",children:b2.map(t=>c.jsx("li",{children:t.href.startsWith("/")?c.jsx(fe,{to:t.href,className:"hover:text-brand-green transition-smooth",children:t.label}):c.jsx("a",{href:t.href,className:"hover:text-brand-green transition-smooth",children:t.label})},t.label))})]})]}),c.jsx("div",{className:"border-t border-secondary-foreground/10",children:c.jsxs("div",{className:"container py-6 text-xs text-secondary-foreground/60 flex flex-col sm:flex-row justify-between gap-2",children:[c.jsxs("span",{children:["© ",new Date().getFullYear()," Endangered Kind. All Rights Reserved."]}),c.jsx("span",{children:"Established 2016 · Stronger Together."})]})})]}),eg=["For the People. With the People.","Community-Led. Community-Fed.","Stabilizing Neighborhoods","Building Grassroots Leadership"],k2=()=>{const t=[...eg,...eg];return c.jsx("div",{className:"bg-brand-green text-brand-black border-y-2 border-brand-black/10 overflow-hidden",children:c.jsx("div",{className:"flex w-max animate-marquee py-4",children:t.map((e,r)=>c.jsxs("span",{className:"flex items-center gap-6 px-6 font-black uppercase tracking-[0.2em] text-sm sm:text-base whitespace-nowrap",children:[e,c.jsx("span",{"aria-hidden":!0,className:"text-brand-black/60",children:"✦"})]},r))})})},_2=({value:t,className:e,duration:r=2800})=>{const n=b.useRef(null),[s,i]=b.useState(()=>t.replace(/[0-9]/g,"0")),[a,o]=b.useState(!1);return b.useEffect(()=>{if(!n.current||a)return;const l=n.current,u=new IntersectionObserver(d=>{d.forEach(h=>{if(h.isIntersecting&&!a){o(!0);const p=performance.now(),f=y=>{const m=Math.min(1,(y-p)/r),w=1-Math.pow(1-m,3),v=t.split("").map((g,x)=>{if(!/[0-9]/.test(g))return g;const k=.55+x/t.length*.4;return w>=k?g:Math.floor(Math.random()*10).toString()}).join("");i(v),m<1?requestAnimationFrame(f):i(t)};requestAnimationFrame(f)}})},{threshold:.4});return u.observe(l),()=>u.disconnect()},[t,r,a]),c.jsx("div",{ref:n,className:e,children:c.jsx("span",{className:"tabular-nums inline-block whitespace-nowrap",style:{fontVariantNumeric:"tabular-nums",fontFeatureSettings:'"tnum"'},"aria-label":t,children:s})})},S2="/assets/ek-group-DpRf3PBL.jpg",E2="/assets/ek-outreach-DXB3t8RX.avif",j2="/assets/ek-mission-DPmZwzwu.jpg",C2="/assets/vision-bg-BA-JOpzD.jpg",N2="/assets/iheart-CegQ_a0s.png",T2="/assets/huffpost-Ba0q7Axl.png",R2="/assets/inquirer-BtSVNwX5.png",P2="/assets/phillysafe-D4d6oG0j.png",A2="/assets/nyt-PfvCsYP_.png",O2="/assets/citizen-Rbcym2Rw.png",I2="/assets/victory-Cj2itR9Q.png",L2="/assets/cpoc-CIoPZrNa.png",$2="/assets/power99-D8WZ35-F.png",D2=[{icon:Li,title:"Community Outreach & Engagement",desc:"Building relationships, engaging residents, and staying present to understand needs and connect people to support."},{icon:Pc,title:"Violence Response & Reduction",desc:"Responding to and preventing violence through conflict mediation, intervention, and stabilization efforts."},{icon:ij,title:"Collective Agency",desc:"Developing grassroots leadership and supporting communities in organizing around shared priorities and decision-making."},{icon:Ej,title:"Community Development",desc:"Connecting communities to long-term investment, resources, and opportunities that support lasting stability and growth."}],M2=[{value:"100s+",label:"Families Connected"},{value:"100s+",label:"Families Served"},{value:"13",label:"Neighborhoods"},{value:"Many",label:"Conflicts Mediated"}],tg=[{name:"PhillySafe",logo:P2,scale:1.5},{name:"The Philadelphia Citizen",logo:O2,scale:1.5},{name:"The New York Times",logo:A2,scale:1.5},{name:"Victory in Philly",logo:I2,scale:1},{name:"The Philadelphia Inquirer",logo:R2,scale:1.6},{name:"iHeart Radio",logo:N2,scale:1.4},{name:"Power 99 FM",logo:$2,scale:1},{name:"HuffPost",logo:T2,scale:1.7},{name:"CPOC",logo:L2,scale:1}],U2=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{id:"home",className:"relative bg-brand-black text-secondary-foreground overflow-hidden flex items-center md:aspect-[21/9] md:min-
441h-[320px]",children:[c.jsxs("div",{className:"absolute inset-0",children:[c.jsx("img",{src:S2,alt:"Endangered Kind community gathering",className:"w-full h-full object-cover md:object-contain object-center opacity-40"}),c.jsx("div",{className:"absolute inset-0",style:{background:"var(--gradient-hero)"}})]}),c.jsxs("div",{className:"relative container max-w-4xl py-12 md:py-24 text-left",children:[c.jsx("span",{className:"inline-block text-brand-green text-[10px] sm:text-xs md:text-sm font-bold uppercase tracking-[0.3em] mb-4 md:mb-6",children:"Established 2016 · Philadelphia, PA"}),c.jsxs("h1",{className:"text-3xl sm:text-5xl md:text-8xl font-black uppercase leading-[0.95] mb-5 md:mb-8",children:["Where We ",c.jsx("span",{className:"text-brand-green",children:"Take Action"})]}),c.jsx("p",{className:"text-sm sm:text-base md:text-xl text-secondary-foreground/85 max-w-2xl mb-6 md:mb-10 leading-relaxed",children:"Community Outreach, Violence Intervention, and Community Capacity — working together to stabilize neighborhoods and build grassroots leadership."}),c.jsxs("div",{className:"flex flex-row flex-wrap gap-3 md:gap-4",children:[c.jsx(le,{asChild:!0,size:"sm",variant:"outline",className:"md:h-11 md:px-8 md:text-base border-brand-green bg-transparent text-brand-green hover:bg-brand-green hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/donate",children:"Donate Now"})}),c.jsx(le,{asChild:!0,size:"sm",variant:"outline",className:"md:h-11 md:px-8 md:text-base border-secondary-foreground/30 bg-transparent text-secondary-foreground hover:bg-secondary-foreground hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/contact",children:"Get Involved"})})]})]})]}),c.jsx(k2,{}),c.jsx("section",{id:"about",className:"py-10 sm:py-14 bg-background",children:c.jsxs("div",{className:"container max-w-5xl",children:[c.jsxs("div",{className:"mb-8",children:[c.jsx("span",{className:"text-xs sm:text-sm text-brand-black font-bold uppercase tracking-[0.25em]",children:"Our Mission"}),c.jsx("div",{className:"h-1 w-16 bg-brand-black mt-3"})]}),c.jsxs("div",{className:"grid md:grid-cols-5 gap-8 md:gap-12 items-center",children:[c.jsx("div",{className:"md:col-span-2",children:c.jsx("div",{className:"relative aspect-[4/5] overflow-hidden",children:c.jsx("img",{src:j2,alt:"Endangered Kind team and community members",className:"w-full h-full object-cover object-center"})})}),c.jsxs("div",{className:"md:col-span-3",children:[c.jsx("h2",{className:"text-2xl sm:text-3xl md:text-5xl font-black uppercase leading-tight mb-6 break-words",children:"Stabilizing Communities. Building Leadership. Strengthening the Future."}),c.jsx("p",{className:"text-base sm:text-lg text-muted-foreground leading-relaxed",children:"Endangered Kind is a community-led organization that stabilizes communities, builds grassroots leadership, and advances long-term solutions that strengthen neighborhoods."})]})]})]})}),c.jsxs("section",{className:"relative py-24 bg-brand-black text-secondary-foreground overflow-hidden",children:[c.jsx("img",{src:C2,alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-brand-black/80"}),c.jsxs("div",{className:"relative container max-w-4xl text-center",children:[c.jsx("span",{className:"text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.25em] sm:tracking-[0.3em]",children:"Our Vision"}),c.jsxs("p",{className:"mt-8 text-xl sm:text-2xl md:text-4xl font-medium leading-snug break-words",children:[c.jsx("span",{className:"text-brand-green text-3xl sm:text-5xl leading-none",children:"“"}),"A community-led model, sustained by everyday people, that transforms how communities and institutions work together to create safety and opportunity nationwide.",c.jsx("span",{className:"text-brand-green text-3xl sm:text-5xl leading-none",children:"”"})]})]})]}),c.jsx("section",{id:"programs",className:"py-24 bg-muted",children:c.jsxs("div",{className:"container",children:[c.jsxs("div",{className:"max-w-2xl mb-14",children:[c.jsx("span",{className:"text-brand-black text-sm font-bold uppercase tracking-[0.25em]",children:"Our Work"}),c.jsx("h2",{className:"mt-3 text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight break-words",children:"Four Strategic Pillars"}),c.jsx("p",{className:"mt-4 text-muted-foreground text-base sm:text-lg",children:"Moving communities from connection to stability to long-term growth."})]}),c.jsx("div",{className:"grid sm:grid-cols-2 gap-6",children:D2.map((t,e)=>c.jsxs("article",{className:"group relative bg-background p-6 sm:p-8 border-l-4 border-brand-black hover:shadow-[var(--shadow-brand)] transition-smooth",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[c.jsx("span",{className:"flex h-10 w-10 sm:h-12 sm:w-12 items-center justify-center bg-brand-green text-brand-black font-black text-base sm:text-lg shrink-0",children:e+1}),c.jsx(t.icon,{className:"h-6 w-6 text-brand-black shrink-0"})]}),c.jsx("h3",{className:"text-lg sm:text-xl font-bold uppercase tracking-wide mb-3 break-words",children:t.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm sm:text-base",children:t.desc})]},t.title))})]})}),c.jsx("section",{className:"py-24 bg-background",children:c.jsxs("div",{className:"container",children:[c.jsxs("div",{className:"max-w-2xl mb-14",children:[c.jsx("span",{className:"text-brand-black text-sm font-bold uppercase tracking-[0.25em]",children:"Our Impact"}),c.jsx("h2",{className:"mt-3 text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight break-words",children:"On the Ground. In Real Time."}),c.jsx("p",{className:"mt-4 text-muted-foreground text-base sm:text-lg",children:"For years, Endangered Kind has been working directly across Philadelphia — building relationships, stabilizing neighborhoods, and supporting families."})]}),c.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:M2.map(t=>c.jsxs("div",{className:"bg-muted p-6 sm:p-8 border-t-4 border-brand-black",children:[c.jsx(_2,{value:t.value,className:"text-4xl sm:text-5xl md:text-6xl font-black text-brand-black break-words"}),c.jsx("div",{className:"mt-2 text-xs sm:text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:t.label})]},t.label))})]})}),c.jsx("section",{className:"py-24 bg-muted",children:c.jsxs("div",{className:"container grid md:grid-cols-2 gap-12 items-center",children:[c.jsx("div",{className:"relative aspect-[4/3] overflow-hidden",children:c.jsx("img",{src:E2,alt:"Endangered Kind team conducting community outreach",className:"w-full h-full object-cover object-top"})}),c.jsxs("div",{children:[c.jsx("span",{className:"text-brand-black text-xs sm:text-sm font-bold uppercase tracking-[0.25em]",children:"Our Fight"}),c.jsx("h2",{className:"mt-3 text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6 break-words",children:"Breaking the Cycle at its Root"}),c.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4 text-sm sm:text-base",children:"Our fight is to break the cycle of community gun violence by addressing its root causes — not just reacting to its symptoms. Community safety cannot be sustained by reaction alone. It requires consistent presence, strong relationships, and long-term investment."}),c.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm sm:text-base",children:"While progress has been made, hundreds of families are still impacted each year. Our fight is to build the conditions that make safety sustainable."})]})]})}),c.jsx("section",{className:"py-20 bg-background border-y border-border",children:c.jsxs("div",{className:"container text-center",children:[c.jsx("span",{className:"text-brand-black text-sm font-bold uppercase tracking-[0.3em]",children:"Trusted By"}),c.jsx("p",{className:"mt-3 text-muted-foreground",children:"Featured by local and national media partners."}),c.jsx("div",{className:"mt-10 grid grid-cols-2 sm:grid-cols-3 md:hidden gap-x-4 sm:gap-x-8 gap-y-8 items-center justify-items-center",children:tg.map((t,e)=>c.jsx("div",{className:`flex items-center justify-center w-full h-14 sm:h-20 overflow-hidden ${e===8?"col-span-2 sm:col-span-1":""}`,children:c.jsx("img",{src:t.logo,alt:t.name,loading:"lazy",style:{transform:`scale(${Math.min(t.scale,1.15)})`},className:"max-h-full max-w-[85%] w-auto h-auto object-contain opacity-70 hover:opacity-100 transition-smooth"})},t.name))}),c.jsx("div",{className:"mt-10 mx-auto hidden md:grid max-w-4xl grid-cols-5 ga
441p-x-12 gap-y-10 items-center justify-items-center",children:tg.map((t,e)=>c.jsx("div",{className:"flex items-center justify-center h-24 w-full",style:e===5?{gridColumnStart:2}:void 0,children:c.jsx("img",{src:t.logo,alt:t.name,loading:"lazy",style:{transform:`scale(${t.scale})`},className:"max-h-full max-w-full w-auto h-auto object-contain opacity-70 hover:opacity-100 transition-smooth"})},t.name))})]})}),c.jsxs("section",{id:"get-involved",className:"relative py-20 sm:py-28 bg-brand-black text-secondary-foreground overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-5 flex items-center justify-center pointer-events-none",children:c.jsx("img",{src:If,alt:"",className:"max-h-[120%] w-auto invert"})}),c.jsxs("div",{className:"relative container max-w-4xl text-center",children:[c.jsx("span",{className:"text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.25em] sm:tracking-[0.3em]",children:"Get Involved"}),c.jsxs("h2",{className:"mt-4 text-3xl sm:text-4xl md:text-6xl font-black uppercase leading-tight break-words",children:["Everyone Has A Role In Building ",c.jsx("span",{className:"text-brand-green",children:"Stronger Communities."})]}),c.jsx("div",{className:"mt-10 sm:mt-12 grid sm:grid-cols-2 lg:grid-cols-3 gap-4 text-left",children:[{t:"Volunteer",d:"Show up and be a consistent, trusted presence.",href:"/contact",external:!1},{t:"Partner",d:"Collaborate to multiply our collective impact.",href:"/contact",external:!1},{t:"Donate",d:"Fuel the work that keeps neighborhoods safe.",href:"https://endangeredkind.harnessgiving.org/donate/",external:!0}].map(t=>{const e="block bg-secondary-foreground/5 border border-secondary-foreground/10 p-5 sm:p-6 hover:border-brand-green transition-smooth",r=c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"text-brand-green font-black uppercase tracking-wider mb-2 break-words",children:t.t}),c.jsx("p",{className:"text-sm text-secondary-foreground/75",children:t.d})]});return t.external?c.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:e,children:r},t.t):c.jsx(fe,{to:t.href,className:e,children:r},t.t)})}),c.jsx(le,{asChild:!0,size:"lg",className:"mt-10 sm:mt-12 w-full sm:w-auto bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:c.jsxs("a",{href:"https://endangeredkind.harnessgiving.org/donate/",target:"_blank",rel:"noopener noreferrer",children:["Donate Now ",c.jsx(nr,{className:"ml-2 h-4 w-4"})]})})]})]}),c.jsx(Ct,{})]}),F2="/assets/founder-portrait-D0UahxKE.jpg",z2="/assets/accomplishment-obama-B8OnC8AG.jpg",B2="/assets/accomplishment-citizen-C04tLZ8d.jpg",W2="/assets/accomplishment-prison-Cz1hGqOS.jpg",H2=[{text:"Introduced former President Barack Obama during Vice President Kamala Harris's presidential campaign.",image:z2,alt:"John Solomon with former President Barack Obama"},{text:"Named Citizen of the Week by The Philadelphia Citizen for grassroots leadership in community safety.",image:B2,alt:"John Solomon engaging with a community member on a Philadelphia street"},{text:"Returned to the prison he was once released from — this time as a guest speaker uplifting incarcerated men.",image:W2,alt:"John Solomon at the Pennsylvania Department of Corrections during a guest speaker visit"},{text:"Served on Governor Josh Shapiro's transition team, helping shape policy priorities for Pennsylvania."}],V2=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsxs("div",{className:"relative container max-w-6xl grid md:grid-cols-5 gap-10 md:gap-14 items-center",children:[c.jsxs("div",{className:"md:col-span-3 order-2 md:order-1",children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Our Founder"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-7xl font-black uppercase leading-[0.95] mb-4 break-words",children:["John ",c.jsx("span",{className:"text-brand-green",children:"Solomon."})]}),c.jsx("p",{className:"text-brand-green/90 text-sm sm:text-base font-bold uppercase tracking-[0.2em] mb-6",children:"Founder & Executive Director, Endangered Kind"}),c.jsx("p",{className:"text-base sm:text-lg text-secondary-foreground
441/85 leading-relaxed max-w-2xl",children:"A Philadelphia-based activist, advocate, and innovative grassroots leader whose journey from survival to service has made him a respected voice across Pennsylvania in the fight to end cycles of violence and neglect."})]}),c.jsx("div",{className:"md:col-span-2 order-1 md:order-2",children:c.jsx("div",{className:"relative aspect-square w-full max-w-sm mx-auto border-4 border-brand-green overflow-hidden",children:c.jsx("img",{src:F2,alt:"John Solomon, Founder of Endangered Kind",width:1024,height:1024,className:"w-full h-full object-cover object-top"})})})]})]}),c.jsx("section",{className:"py-20 sm:py-24 bg-background",children:c.jsxs("div",{className:"container max-w-4xl",children:[c.jsx("span",{className:"text-brand-black text-xs sm:text-sm font-bold uppercase tracking-[0.25em]",children:"Bio"}),c.jsx("div",{className:"h-1 w-16 bg-brand-black mt-3 mb-6"}),c.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-black uppercase leading-tight break-words mb-6",children:"Survival. Transformation. Service."}),c.jsxs("div",{className:"text-muted-foreground text-base sm:text-lg leading-relaxed space-y-4",children:[c.jsx("p",{children:"At just 15 years old, John was shot in the chest and arm — a turning point in a life shaped by systemic injustice, poverty, and community violence. A few years later, he was incarcerated for a gun-related offense and spent nearly five years in state prison."}),c.jsx("p",{children:"It was inside prison, while navigating the implications of survival, that John experienced a spiritual transformation. He became a Christian while incarcerated — a decision that grounded his life in faith, accountability, and a relentless commitment to uplift others."}),c.jsx("p",{children:"Since his release, John has built a track record of leadership that reflects both grit and grace. As founder and Executive Director of Endangered Kind, his work bridges neighborhoods, institutions, and generations — all in pursuit of a future where no family or young person is left behind."})]})]})}),c.jsx("section",{className:"py-20 sm:py-24 bg-muted",children:c.jsxs("div",{className:"container max-w-5xl",children:[c.jsxs("div",{className:"max-w-2xl mb-10",children:[c.jsx("span",{className:"text-brand-black text-sm font-bold uppercase tracking-[0.25em]",children:"Accomplishments"}),c.jsx("h2",{className:"mt-3 text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight break-words",children:"A Voice Across Pennsylvania."})]}),c.jsx("ul",{className:"space-y-4",children:H2.map(t=>c.jsxs("li",{className:"flex flex-col sm:flex-row sm:items-center gap-5 sm:gap-6 bg-background p-5 sm:p-6 border-l-4 border-brand-black",children:[c.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[c.jsx("span",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-brand-black"}),c.jsx("span",{className:"text-muted-foreground text-base sm:text-lg leading-relaxed",children:t.text})]}),t.image&&c.jsx("div",{className:"w-full sm:w-40 md:w-48 aspect-[4/3] sm:aspect-square shrink-0 overflow-hidden bg-muted sm:ml-auto",children:c.jsx("img",{src:t.image,alt:t.alt??"",loading:"lazy",className:"w-full h-full object-cover object-top"})})]},t.text))})]})}),c.jsx("section",{className:"py-20 sm:py-24 bg-background",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight break-words",children:["Stand With The ",c.jsx("span",{className:"text-brand-black",children:"Mission."})]}),c.jsx("p",{className:"mt-5 text-muted-foreground text-base sm:text-lg max-w-2xl mx-auto",children:"John's vision continues through Endangered Kind — community-led, faith-grounded, and built to last."}),c.jsxs("div",{className:"mt-8 flex flex-row flex-wrap gap-3 justify-center",children:[c.jsx(le,{asChild:!0,size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:c.jsxs(fe,{to:"/donate",children:["Donate Now ",c.jsx(nr,{className:"ml-2 h-4 w-4"})]})}),c.jsx(fe,{to:"/",children:c.jsx(le,{size:"lg",variant:"outline",className:"font-bold uppercase tracking-wide",children:"Back to Home"})})]})]})}),c.jsx(Ct,{})]}),rg="/assets/why-us-hero-1024-BLAm-d4Z.jpg",q2="/assets/why-us-hero-480-BQKTsHud.jpg",K2="/assets/why-us-hero-768-7h0Q-tx4.jpg",G2="/assets/why-us-hero-480-3ytwrrsw.webp",J2="/assets/why-us-hero-768-DB6po9UH.webp",Q2="/assets/why-us-hero-1024-D9XkD8SD.webp",Z2=[{icon:Li,title:"Community Outreach & Engagement",desc:"We meet people where they are — on the blocks, in the schools, and at the kitchen tables — building trust with the families and youth most affected by violence and neglect.",points:["
441Street-level mentorship and check-ins","Family support and resource navigation","Listening sessions with neighborhood leaders"]},{icon:Pc,title:"Violence Intervention",desc:"When crisis hits, we move quickly. Our team works alongside community members and partners to interrupt cycles of retaliation and stand with families in the aftermath.",points:["Conflict mediation and de-escalation","Post-incident response","Healing spaces for survivors and loved ones"]},{icon:XE,title:"Community Capacity Building",desc:"Lasting change requires lasting infrastructure. We invest in the residents, leaders, and grassroots organizations doing the work — so the impact outlives any single moment.",points:["Leadership development for emerging voices","Training and technical assistance for partners","Advocacy at the policy and city level"]}],Y2=[{icon:px,title:"Lived Experience",desc:"Our work is led by people who have walked the path — bringing credibility, empathy, and clarity to every room we enter."},{icon:mx,title:"Truth-Telling",desc:"We name what's broken and refuse to soften the story. Honesty is the only foundation real change can be built on."},{icon:sj,title:"Redemption Over Punishment",desc:"We believe families and youth are not disposable. Every program, partnership, and policy we touch is rooted in that conviction."}],X2=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsx("div",{className:"relative container max-w-6xl",children:c.jsxs("div",{className:"grid md:grid-cols-2 gap-10 lg:gap-14 items-center",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Why Us?"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-black uppercase leading-[0.95] mb-6",children:["Dignity, Voice, ",c.jsx("span",{className:"text-brand-green",children:"Leadership"})]}),c.jsx("p",{className:"text-base sm:text-lg text-secondary-foreground/85 leading-relaxed",children:"Families and youth in Philadelphia deserve more than broken systems and false choices. We center their dignity, voice, and leadership — turning margins into momentum."})]}),c.jsx("div",{className:"relative aspect-[16/10] sm:aspect-[16/9] md:aspect-[4/3] w-full overflow-hidden border border-brand-green/30 bg-muted",children:c.jsxs("picture",{children:[c.jsx("source",{type:"image/webp",srcSet:`${G2} 480w, ${J2} 768w, ${Q2} 1024w`,sizes:"(min-width: 768px) 50vw, 100vw"}),c.jsx("img",{src:rg,srcSet:`${q2} 480w, ${K2} 768w, ${rg} 1024w`,sizes:"(min-width: 768px) 50vw, 100vw",alt:"Endangered Kind founder speaking with community leaders at a podium",width:1024,height:849,className:"absolute inset-0 w-full h-full object-cover object-center",loading:"eager",fetchPriority:"high",decoding:"async"})]})})]})})]}),c.jsx("section",{className:"py-20 sm:py-24 bg-secondary",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"grid md:grid-cols-2 gap-10 lg:gap-16 items-start",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-4",children:"Our Specialty"}),c.jsxs("h2",{className:"text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black uppercase leading-tight text-secondary-foreground whitespace-nowrap",children:["Trust built ",c.jsx("span",{className:"text-brand-green",children:"block by block"})]})]}),c.jsxs("div",{className:"space-y-5 text-base sm:text-lg text-secondary-foreground/90 leading-relaxed",children:[c.jsx("p",{children:"We specialize in building trust with high-risk groups, using a neighborhood-based approach to mediate conflict, listen to residents and uncover what's really driving tension on the block, and strengthen local support networks."}),c.jsx("p",{children:"Whether it's through door-to-door outreach, coordinated service delivery, or strategic intervention, our work is deeply rooted in relationships and powered by tools that help us respond where the need is greatest."})]})]}),c.jsx("div",{className:"mt-12 lg:mt-16 max-w-4xl mx-auto",children:c.jsx("div",{className:"relative w-full aspect-video overflow-hidden border border-brand-green/30 shadow-lg bg-brand-black",children:c.jsx("iframe",{src:"https://www.youtube.com/embed/b9SneBBwdds",title:"Endangered Kind — Featured Video",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,loading:"lazy",className:"absolute inset-0 w-full h-full"})})})]})}),c.jsx("section",{className:"py-20 sm:py-28",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"max-w-3xl mb-14",children:[c.jsx("span",{className:"inline-block text-brand-black text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-4",children:"Our Programs"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Three programs, ",c.jsx("span",{className:"text-brand-black",children:"one mission"})]}
441),c.jsxs("p",{className:"text-base sm:text-lg text-foreground/80 leading-relaxed",children:["Through our three core programs — ",c.jsx("span",{className:"text-brand-black font-bold",children:"Community Outreach"}),", ",c.jsx("span",{className:"text-brand-black font-bold",children:"Violence Intervention"}),", and ",c.jsx("span",{className:"text-brand-black font-bold",children:"Community Capacity Building"})," — we foster safer neighborhoods, equip families and youth with the tools to build a life beyond survival, and transform the conditions that have historically left them behind."]})]}),c.jsx("div",{className:"grid md:grid-cols-3 gap-6 lg:gap-8",children:Z2.map(({icon:t,title:e,desc:r,points:n})=>c.jsxs("article",{className:"group bg-brand-black text-secondary-foreground p-8 border border-brand-green/20 hover:border-brand-green transition-smooth flex flex-col",children:[c.jsx("div",{className:"w-12 h-12 mb-6 flex items-center justify-center bg-brand-green text-brand-black",children:c.jsx(t,{className:"h-6 w-6"})}),c.jsx("h3",{className:"text-xl sm:text-2xl font-black uppercase mb-4 leading-tight",children:e}),c.jsx("p",{className:"text-secondary-foreground/80 leading-relaxed mb-6",children:r}),c.jsx("ul",{className:"mt-auto space-y-2 border-t border-brand-green/20 pt-5",children:n.map(s=>c.jsxs("li",{className:"flex gap-3 text-sm text-secondary-foreground/85",children:[c.jsx("span",{className:"text-brand-green font-bold mt-0.5",children:"›"}),c.jsx("span",{children:s})]},s))})]},e))})]})}),c.jsx("section",{className:"py-20 sm:py-28 bg-secondary",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"max-w-3xl mb-14",children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-4",children:"Our Approach"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight text-secondary-foreground",children:["How we ",c.jsx("span",{className:"text-brand-green",children:"show up."})]})]}),c.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:Y2.map(({icon:t,title:e,desc:r})=>c.jsxs("div",{className:"border-l-4 border-brand-green pl-6",children:[c.jsx(t,{className:"h-8 w-8 text-brand-green mb-4"}),c.jsx("h3",{className:"text-lg sm:text-xl font-black uppercase mb-3 text-secondary-foreground",children:e}),c.jsx("p",{className:"text-secondary-foreground/80 leading-relaxed",children:r})]},e))})]})}),c.jsx("section",{className:"py-20 sm:py-24 bg-brand-black text-secondary-foreground",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase mb-6 leading-tight",children:["The work is ",c.jsx("span",{className:"text-brand-green",children:"already underway"})]}),c.jsx("p",{className:"text-base sm:text-lg text-secondary-foreground/85 max-w-2xl mx-auto mb-8 leading-relaxed",children:"Stand with us. Whether you give, partner, or pass the message on — every action moves families and youth closer to a future worth fighting for."}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[c.jsx(le,{asChild:!0,size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:c.jsxs(fe,{to:"/donate",children:["Donate Now ",c.jsx(nr,{className:"ml-1 h-4 w-4"})]})}),c.jsx(le,{asChild:!0,size:"lg",variant:"outline",className:"border-brand-green text-brand-green hover:bg-brand-green hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/",children:"Back to Home"})})]})]})}),c.jsx(Ct,{})]}),eR="/assets/vision-bg-BA-JOpzD.jpg",tR=[{icon:rj,title:"Canvassing & Door-Knocking",desc:"Meet residents where they are — at their doors — to build trust, distribute information, and understand the needs of overlooked neighborhoods."},{icon:uj,title:"Asset Mapping & Community Assessments",desc:"Identify and document community strengths, key influencers, underused resources, and areas of concern to better guide service coordination and advocacy efforts."},{icon:xj,title:"Sharing Community Resources",desc:"Distribute timely information about food access, housing programs, employment opportunities, youth programs, and violence prevention services."},{icon:mx,title:"Raising Awareness",desc:"Educate the public about local challenges — from cycles of violence to housing instability — while promoting community-based solutions and engagement."},{icon:Sf,title:"Coordinating Services",desc:"Serve as a bridge between residents and institutions by linking individuals to support networks and ensuring services are delivered with care and dignity."},{icon:Li,title:"Youth & Family Engagement",desc:"Build lasting relationships with young people and their families through mentorship, recreational programming, and consistent support that meets them where they are."}],rR=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsx("div",{className:"relative container max-w-6xl",children:c.jsxs("div",{className:"grid md:grid-cols-2 gap-10 md:gap-12 items-center",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Our Programs"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-black uppercase leading-[0.95] mb-6",children:["Community ",c.jsx("span",{className:"text-brand-green",children:"Outreach"})]}),c.jsx("p",{className:"text-lg sm:text-xl text-secondary-foreground
441/80 leading-relaxed",children:"We build authentic relationships in neighborhoods most impacted by violence — mobilizing residents, responding to urgent needs, and restoring trust through consistent presence and care."})]}),c.jsx("div",{className:"relative overflow-hidden aspect-[4/3]",children:c.jsx("img",{src:eR,alt:"Community members receiving outreach support",className:"w-full h-full object-cover"})})]})})]}),c.jsx("section",{className:"bg-secondary border-y border-brand-green/20 py-12",children:c.jsx("div",{className:"container max-w-4xl text-center",children:c.jsx("p",{className:"text-base sm:text-lg text-secondary-foreground/85 leading-relaxed",children:"Outreach is the front door of our work. Every relationship we build, every resource we share, and every block we walk lays the groundwork for safer, stronger, more connected communities."})})}),c.jsx("section",{className:"py-20 sm:py-24",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"max-w-3xl mb-14",children:[c.jsx("span",{className:"inline-block text-brand-black text-xs font-bold uppercase tracking-[0.3em] mb-4",children:"What We Do"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight",children:["Presence with ",c.jsx("span",{className:"text-brand-black",children:"purpose"})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:tR.map(t=>c.jsxs("div",{className:"bg-card border border-border p-8 hover:border-brand-black transition-smooth",children:[c.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 bg-brand-black/10 text-brand-black mb-5",children:c.jsx(t.icon,{className:"h-6 w-6"})}),c.jsx("h3",{className:"text-xl font-black uppercase tracking-wide mb-3",children:t.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.desc})]},t.title))})]})}),c.jsx("section",{className:"bg-brand-black text-secondary-foreground py-20",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Walk the block ",c.jsx("span",{className:"text-brand-green",children:"with us"})]}),c.jsx("p",{className:"text-lg text-secondary-foreground/80 mb-8 max-w-2xl mx-auto",children:"Whether you live in the neighborhood, lead an organization, or want to support the work — there's a place for you on the team."}),c.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[c.jsxs(le,{size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:["Get Involved ",c.jsx(nr,{className:"ml-1 h-4 w-4"})]}),c.jsx(le,{asChild:!0,size:"lg",variant:"outline",className:"border-brand-green text-brand-green bg-transparent hover:bg-brand-green hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/what-we-do",children:"All Programs"})})]})]})}),c.jsx(Ct,{})]}),nR="/assets/ek-violence-hero-DpzA2LXs.jpg",sR=[{icon:Pc,title:"Real-Time Conflict Mediation",desc:"Intervene in real time to defuse disputes and prevent retaliation or escalation before harm spreads."},{icon:px,title:"Trauma-Informed Response",desc:"Provide immediate, trauma-informed support in the aftermath of violent incidents to promote healing and reduce further harm."},{icon:Li,title:"Safe Spaces for High-Risk Individuals",desc:"Facilitate safe spaces to process trauma, build coping strategies, and receive consistent mentorship."},{icon:nj,title:"Visible, Trusted Presence",desc:"Maintain a trusted, visible presence in areas most impacted by violence to build relationships and connect individuals to support."},{icon:ej,title:"Data-Driven Focus",desc:"Use real-time data and on-the-ground insight to focus interventions in areas experiencing the highest levels of violence."},{icon:hj,title:"Resident-Led Strategy",desc:"Involve local residents in identifying threats, co-creating strategies, and building a collective culture of safety and accountability."},{icon:oj,title:"Wraparound Services",desc:"Connect individuals to counseling, employment, and housing — services that support long-term stability beyond the moment of crisis."},{icon:Sf,title:"Coordinated Partnerships",desc:"Work alongside grassroots leaders, block captains, community organizations, and local partners to share insights and coordinate efforts."}],iR=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsx("div",{className:"relative container max-w-6xl",children:c.jsxs("div",{className:"grid md:grid-cols-2 gap-10 md:gap-12 items-center",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Our Programs"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-black uppercase leading-[0.95] mb-6",children:["Violence ",c.jsx("span",{className:"text-brand-green",children:"Intervention"})]}),c.jsx("p",{className:"text-lg sm:text-xl text-secondary-foreground
441/80 leading-relaxed",children:"We prevent shootings and retaliation by mediating conflict, supporting those at highest risk, and disrupting cycles of harm with credible messengers and street-level engagement."})]}),c.jsx("div",{className:"relative overflow-hidden aspect-[4/3]",children:c.jsx("img",{src:nR,alt:"Endangered Kind team members standing together in the community",className:"w-full h-full object-cover"})})]})})]}),c.jsx("section",{className:"bg-secondary border-y border-brand-green/20 py-12",children:c.jsx("div",{className:"container max-w-4xl text-center",children:c.jsx("p",{className:"text-base sm:text-lg text-secondary-foreground/85 leading-relaxed",children:"Endangered Kind applies Violence Intervention by leveraging community trust — moving in early, staying close after, and standing with the people most impacted until safety becomes the standard."})})}),c.jsx("section",{className:"py-20 sm:py-24",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"max-w-3xl mb-14",children:[c.jsx("span",{className:"inline-block text-brand-black text-xs font-bold uppercase tracking-[0.3em] mb-4",children:"How We Work"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight",children:["Disrupting cycles of ",c.jsx("span",{className:"text-brand-black",children:"harm"})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:sR.map(t=>c.jsxs("div",{className:"bg-card border border-border p-8 hover:border-brand-black transition-smooth",children:[c.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 bg-brand-black/10 text-brand-black mb-5",children:c.jsx(t.icon,{className:"h-6 w-6"})}),c.jsx("h3",{className:"text-xl font-black uppercase tracking-wide mb-3",children:t.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.desc})]},t.title))})]})}),c.jsx("section",{className:"bg-brand-black text-secondary-foreground py-20",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Stand with us in the ",c.jsx("span",{className:"text-brand-green",children:"work"})]}),c.jsx("p",{className:"text-lg text-secondary-foreground/80 mb-8 max-w-2xl mx-auto",children:"Partner, support, or join the team interrupting violence and rebuilding safety from the block up."}),c.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[c.jsxs(le,{size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:["Get Involved ",c.jsx(nr,{className:"ml-1 h-4 w-4"})]}),c.jsx(le,{asChild:!0,size:"lg",variant:"outline",className:"border-brand-green text-brand-green bg-transparent hover:bg-brand-green hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/what-we-do",children:"All Programs"})})]})]})}),c.jsx(Ct,{})]}),aR="/assets/ek-capacity-hero-gm8N54Bu.jpg",oR=[{icon:Li,title:"Support Local Leaders",desc:"Invest in grassroots leadership to drive long-term change from within the neighborhood."},{icon:Sf,title:"Strengthen Local Networks",desc:"Help residents, organizations, and institutions collaborate to create stronger support systems."},{icon:Sj,title:"Improve Neighborhood Conditions",desc:"Organize cleanups, beautification projects, and safety initiatives that build pride and well-being."},{icon:YE,title:"Expand Access to Resources",desc:"Connect residents with tools and opportunities that promote economic mobility and stability."},{icon:wj,title:"Foster Safe Environments",desc:"Work alongside residents to reclaim public spaces and create hubs for healing, connection, and opportunity."},{icon:kj,title:"Grow Small Businesses",desc:"Champion neighborhood entrepreneurs and small businesses as anchors of holistic ecosystems where local wealth, jobs, and culture thrive together."}],lR=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsx("div",{className:"relative container max-w-6xl",children:c.jsxs("div",{className:"grid md:grid-cols-2 gap-10 md:gap-12 items-center",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Our Programs"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-black uppercase leading-[0.95] mb-6",children:["Community ",c.jsx("span",{className:"text-brand-green",children:"Capacity"})]}),c.jsx("p",{className:"text-lg sm:text-xl text-secondary-foreground
441/80 leading-relaxed",children:"We strengthen local ecosystems by connecting people to resources, supporting grassroots leadership, and building the infrastructure needed for long-term peace and opportunity."})]}),c.jsx("div",{className:"relative overflow-hidden aspect-[4/3]",children:c.jsx("img",{src:aR,alt:"Community members gathered around a resource distribution table",className:"w-full h-full object-cover"})})]})})]}),c.jsx("section",{className:"bg-secondary border-y border-brand-green/20 py-12",children:c.jsx("div",{className:"container max-w-4xl text-center",children:c.jsx("p",{className:"text-base sm:text-lg text-secondary-foreground/85 leading-relaxed",children:"To successfully implement Community Capacity Building, Endangered Kind invests in the people, partnerships, and places that make neighborhoods whole — creating conditions where safety and opportunity can take root."})})}),c.jsx("section",{className:"py-20 sm:py-24",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"max-w-3xl mb-14",children:[c.jsx("span",{className:"inline-block text-brand-black text-xs font-bold uppercase tracking-[0.3em] mb-4",children:"How We Build"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight",children:["Building from the ",c.jsx("span",{className:"text-brand-black",children:"ground up"})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:oR.map(t=>c.jsxs("div",{className:"bg-card border border-border p-8 hover:border-brand-black transition-smooth",children:[c.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 bg-brand-black/10 text-brand-black mb-5",children:c.jsx(t.icon,{className:"h-6 w-6"})}),c.jsx("h3",{className:"text-xl font-black uppercase tracking-wide mb-3",children:t.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.desc})]},t.title))})]})}),c.jsx("section",{className:"bg-brand-black text-secondary-foreground py-20",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Grow with us from the ",c.jsx("span",{className:"text-brand-green",children:"block up"})]}),c.jsx("p",{className:"text-lg text-secondary-foreground/80 mb-8 max-w-2xl mx-auto",children:"Whether you are a resident, organizer, or partner — there is a place for you in building stronger, safer, more connected communities."}),c.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[c.jsxs(le,{size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:["Get Involved ",c.jsx(nr,{className:"ml-1 h-4 w-4"})]}),c.jsx(le,{asChild:!0,size:"lg",variant:"outline",className:"border-brand-green text-brand-green bg-transparent hover:bg-brand-green hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/what-we-do",children:"All Programs"})})]})]})}),c.jsx(Ct,{})]}),Du=t=>{const e={event_name:"donate_click",method:t,page_path:window.location.pathname};typeof window<"u"&&window.gtag?window.gtag("event","donate_click",{method:t}):typeof window<"u"&&window.dataLayer?window.dataLayer.push(e):console.log("[Analytics]",e)},cR=[{icon:Li,title:"Fuels Outreach",desc:"Funds the door-knocking, mentorship, and street-level engagement that builds trust block by block."},{icon:Pc,title:"Interrupts Violence",desc:"Supports credible messengers mediating conflict and standing with families in the aftermath of harm."},{icon:bj,title:"Builds Community",desc:"Invests in grassroots leaders, cleanups, and safe spaces that make neighborhoods whole."}],uR=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsx("section",{className:"py-20 sm:py-24",children:c.jsx("div",{className:"container max-w-3xl",children:c.jsxs("div",{className:"bg-card border border-border p-8 sm:p-10 text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-3 mb-8",children:[c.jsx(aj,{className:"h-6 w-6 text-brand-black"}),c.jsx("h2",{className:"text-2xl sm:text-3xl font-black uppercase tracking-tight",children:"Make a gift"})]}
441),c.jsx("p",{className:"text-foreground/80 leading-relaxed mb-2 max-w-xl mx-auto",children:"Your donation fuels outreach, intervention, and community capacity building across Philadelphia. Every gift moves families and youth closer to a future worth fighting for."}),c.jsx("p",{className:"text-muted-foreground text-sm mb-8 max-w-xl mx-auto",children:"Give once or monthly — in any amount you choose."}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[c.jsxs("a",{href:"https://endangeredkind.harnessgiving.org/donate/?selected-method=monthly&amount=50",target:"_blank",rel:"noopener noreferrer",onClick:()=>Du("monthly"),className:"inline-flex items-center justify-center gap-2 h-14 px-8 bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide text-base transition-smooth",children:["Donate Monthly",c.jsx(nr,{className:"h-4 w-4"})]}),c.jsxs("a",{href:"https://endangeredkind.harnessgiving.org/donate/",target:"_blank",rel:"noopener noreferrer",onClick:()=>Du("custom"),className:"inline-flex items-center justify-center gap-2 h-14 px-8 border-2 border-brand-black text-brand-black hover:bg-brand-black hover:text-brand-green font-bold uppercase tracking-wide text-sm transition-smooth",children:["Choose Your Own Gift",c.jsx(nr,{className:"h-4 w-4"})]})]}),c.jsxs("div",{className:"mt-6 flex items-center gap-3 max-w-lg mx-auto",children:[c.jsx("div",{className:"h-px flex-1 bg-border"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground",children:"or"}),c.jsx("div",{className:"h-px flex-1 bg-border"})]}),c.jsxs("a",{href:"https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=MZAEBJUKCLE78&source=url&ssrt=1778247116242",target:"_blank",rel:"noopener noreferrer",onClick:()=>Du("paypal"),className:"mt-6 inline-flex w-full max-w-lg mx-auto items-center justify-center gap-2 h-12 border-2 border-brand-black text-brand-black hover:bg-brand-black hover:text-brand-green font-bold uppercase tracking-wide text-sm transition-smooth",children:["Donate with PayPal",c.jsx(nr,{className:"h-4 w-4"})]}),c.jsx("p",{className:"text-xs text-muted-foreground text-center mt-8 leading-relaxed max-w-lg mx-auto",children:"Endangered Kind is a grassroots organization. Contributions support our outreach, intervention, and community capacity building programs. Secure giving powered by Harness & PayPal."})]})})}),c.jsx("section",{className:"bg-secondary py-20 sm:py-24 border-y border-brand-green/20",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsxs("div",{className:"max-w-3xl mb-14",children:[c.jsx("span",{className:"inline-block text-brand-green text-xs font-bold uppercase tracking-[0.3em] mb-4",children:"Your Impact"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight text-secondary-foreground",children:["Where your gift ",c.jsx("span",{className:"text-brand-green",children:"goes"})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-3",children:cR.map(t=>c.jsxs("div",{className:"border-l-4 border-brand-green pl-6",children:[c.jsx(t.icon,{className:"h-8 w-8 text-brand-green mb-4"}),c.jsx("h3",{className:"text-lg sm:text-xl font-black uppercase mb-3 text-secondary-foreground",children:t.title}),c.jsx("p",{className:"text-secondary-foreground/80 leading-relaxed",children:t.desc})]},t.title))})]})}),c.jsx("section",{className:"bg-brand-black text-secondary-foreground py-20",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Other ways to ",c.jsx("span",{className:"text-brand-green",children:"support"})]}),c.jsx("p",{className:"text-lg text-secondary-foreground/80 mb-8 max-w-2xl mx-auto",children:"Partner with us, volunteer your time, or share the mission. Every action moves the work forward."}),c.jsx("div",{className:"flex flex-wrap gap-4 justify-center",children:c.jsx(le,{asChild:!0,size:"lg",className:"bg-secondary-foreground text-brand-black hover:bg-secondary-foreground
441/90 font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/what-we-do",children:"Our Programs"})})})]})}),c.jsx(Ct,{})]});var he;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),a={};for(const o of i)a[o]=s[o];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(const a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(he||(he={}));var ng;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ng||(ng={}));const B=he.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sn=t=>{switch(typeof t){case"undefined":return B.undefined;case"string":return B.string;case"number":return Number.isNaN(t)?B.nan:B.number;case"boolean":return B.boolean;case"function":return B.function;case"bigint":return B.bigint;case"symbol":return B.symbol;case"object":return Array.isArray(t)?B.array:t===null?B.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?B.promise:typeof Map<"u"&&t instanceof Map?B.map:typeof Set<"u"&&t instanceof Set?B.set:typeof Date<"u"&&t instanceof Date?B.date:B.object;default:return B.unknown}}
vendor: 4,364 bytes, line 441
441,A=he.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Br extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(i){return i.message},n={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let o=n,l=0;for(;l<a.path.length;){const u=a.path[l];l===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(a))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return s(this),n}static assert(e){if(!(e instanceof Br))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,he.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];r[i]=r[i]||[],r[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Br.create=t=>new Br(t);const eh=(t,e)=>{let r;switch(t.code){case A.invalid_type:t.received===B.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case A.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,he.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:r=`Unrecognized key(s) in object: ${he.joinValues(t.keys,", ")}`;break;case A.invalid_union:r="Invalid input";break;case A.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${he.joinValues(t.options)}`;break;case A.invalid_enum_value:r=`Invalid enum value. Expected ${he.joinValues(t.options)}, received '${t.received}'`;break;case A.invalid_arguments:r="Invalid function arguments";break;case A.invalid_return_type:r="Invalid function return type";break;case A.invalid_date:r="Invalid date";break;case A.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:he.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case A.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case A.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case A.custom:r="Invalid input";break;
vendor: 5,130 bytes, line 441
441case A.invalid_intersection_types:r="Intersection results could not be merged";break;case A.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case A.not_finite:r="Number must be finite";break;default:r=e.defaultError,he.assertNever(t)}return{message:r}};let dR=eh;function hR(){return dR}const fR=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let o="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)o=u(a,{data:e,defaultError:o}).message;return{...s,path:i,message:o}};function D(t,e){const r=hR(),n=fR({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===eh?void 0:eh].filter(s=>!!s)});t.common.issues.push(n)}class Nt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return G;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const i=await s.key,a=await s.value;n.push({key:i,value:a})}return Nt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return G;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(n[i.value]=a.value)}return{status:e.value,value:n}}}const G=Object.freeze({status:"aborted"}),na=t=>({status:"dirty",value:t}),Ft=t=>({status:"valid",value:t}),sg=t=>t.status==="aborted",ig=t=>t.status==="dirty",ji=t=>t.status==="valid",Yl=t=>typeof Promise<"u"&&t instanceof Promise;var W;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(W||(W={}));class Ln{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ag=(t,e)=>{if(ji(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Br(t.common.issues);return this._error=r,this._error}}};function ne(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,o)=>{const{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??n??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:l??r??o.defaultError}},description:s}}class ue{get description(){return this._def.description}_getType(e){return sn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:sn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nt,ctx:{common:e.parent.common,data:e.data,parsedType:sn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Yl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sn(e)},s=this._parseSync({data:e,path:n.path,parent:n});return ag(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sn(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return ji(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(s=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>ji(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sn(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Yl(s)?s:Promise.resolve(s));return ag(n,i)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const a=e(s),o=()=>i.addIssue({code:A.custom,...n(s)});
vendor: 24,232 bytes, line 441
441return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new Ni({schema:this,typeName:J.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Nn.create(this,this._def)}nullable(){return Ti.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wr.create(this)}promise(){return rc.create(this,this._def)}or(e){return ec.create([this,e],this._def)}and(e){return tc.create(this,e,this._def)}transform(e){return new Ni({...ne(this._def),schema:this,typeName:J.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new rh({...ne(this._def),innerType:this,defaultValue:r,typeName:J.ZodDefault})}brand(){return new $R({typeName:J.ZodBranded,type:this,...ne(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new nh({...ne(this._def),innerType:this,catchValue:r,typeName:J.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Uf.create(this,e)}readonly(){return sh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const pR=/^c[^\s-]{8,}$/i,mR=/^[0-9a-z]+$/,gR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yR=/^[a-z0-9_-]{21}$/i,xR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mu;const _R=/^(?:(?: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])$/,SR=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ER=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,jR=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,NR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$w="((\\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])))",TR=new RegExp(`^${$w}$`);function Dw(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function RR(t){return new RegExp(`^${Dw(t)}$`)}function PR(t){let e=`${$w}T${Dw(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function AR(t,e){return!!((e==="v4"||!e)&&_R.test(t)||(e==="v6"||!e)&&ER.test(t))}function OR(t,e){if(!xR.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function IR(t,e){return!!((e==="v4"||!e)&&SR.test(t)||(e==="v6"||!e)&&jR.test(t))}class yn extends ue{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==B.string){const i=this._getOrReturnCtx(e);return D(i,{code:A.invalid_type,expected:B.string,received:i.parsedType}),G}const n=new Nt;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),D(s,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),D(s,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=e.data.length>i.value,o=e.data.length<i.value;(a||o)&&(s=this._getOrReturnCtx(e,s),a?D(s,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&D(s,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")bR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"email",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Mu||(Mu=new RegExp(kR,"u")),Mu.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"emoji",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")vR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"uuid",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")yR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"nanoid",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")pR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"cuid",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")mR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"cuid2",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")gR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"ulid",code:A.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),D(s,{validation:"url",code:A.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"regex",code:A.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),D(s,{code:A.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),D(s,{code:A.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),D(s,{code:A.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?PR(i).test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{code:A.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?TR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{code:A.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?RR(i).test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{code:A.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?wR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"duration",code:A.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?AR(e.data,i.version)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"ip",code:A.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?OR(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"jwt",code:A.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?IR(e.data,i.version)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"cidr",code:A.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?CR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"base64",code:A.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?NR.test(e.data)||(s=this._getOrReturnCtx(e,s),D(s,{validation:"base64url",code:A.invalid_string,message:i.message}),n.dirty()):he.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:A.invalid_string,...W.errToObj(n)})}_addCheck(e){return new yn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...W.errToObj(e)})}url(e){return this._addCheck({kind:"url",...W.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...W.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...W.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...W.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...W.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...W.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...W.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...W.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...W.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...W.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...W.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...W.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...W.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...W.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...W.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...W.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...W.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...W.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...W.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...W.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...W.errToObj(r)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}yn.create=t=>new yn({checks:[],typeName:J.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ne(t)});function LR(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}class Ha extends ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==B.number){const i=this._getOrReturnCtx(e);return D(i,{code:A.invalid_type,expected:B.number,received:i.parsedType}),G}let n;const s=new Nt;for(const i of this._def.checks)i.kind==="int"?he.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),D(n,{code:A.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),D(n,{code:A.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),D(n,{code:A.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?LR(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),D(n,{code:A.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),D(n,{code:A.not_finite,message:i.message}),s.dirty()):he.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,W.toString(r))}gt(e,r){return this.setLimit("min",e,!1,W.toString(r))}lte(e,r){return this.setLimit("max",e,!0,W.toString(r))}lt(e,r){return this.setLimit("max",e,!1,W.toString(r))}setLimit(e,r,n,s){return new Ha({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:W.toString(s)}]})}_addCheck(e){return new Ha({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:W.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:W.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&he.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Ha.create=t=>new Ha({checks:[],typeName:J.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ne(t)});class Va extends ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==B.bigint)return this._getInvalidInput(e);let n;const s=new Nt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),D(n,{code:A.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),D(n,{code:A.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),D(n,{code:A.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):he.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return D(r,{code:A.invalid_type,expected:B.bigint,received:r.parsedType}),G}gte(e,r){return this.setLimit("min",e,!0,W.toString(r))}gt(e,r){return this.setLimit("min",e,!1,W.toString(r))}lte(e,r){return this.setLimit("max",e,!0,W.toString(r))}lt(e,r){return this.setLimit("max",e,!1,W.toString(r))}setLimit(e,r,n,s){return new Va({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:W.toString(s)}]})}_addCheck(e){return new Va({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Va.create=t=>new Va({checks:[],typeName:J.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ne(t)});class og extends ue{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==B.boolean){const n=this._getOrReturnCtx(e);return D(n,{code:A.invalid_type,expected:B.boolean,received:n.parsedType}),G}return Ft(e.data)}}og.create=t=>new og({typeName:J.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ne(t)});class Xl extends ue{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==B.date){const i=this._getOrReturnCtx(e);return D(i,{code:A.invalid_type,expected:B.date,received:i.parsedType}),G}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return D(i,{code:A.invalid_date}),G}const n=new Nt;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),D(s,{code:A.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),D(s,{code:A.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):he.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Xl({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:W.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:W.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Xl.create=t=>new Xl({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:J.ZodDate,...ne(t)});class lg extends ue{_parse(e){if(this._getType(e)!==B.symbol){const n=this._getOrReturnCtx(e);return D(n,{code:A.invalid_type,expected:B.symbol,received:n.parsedType}),G}return Ft(e.data)}}lg.create=t=>new lg({typeName:J.ZodSymbol,...ne(t)});class cg extends ue{_parse(e){if(this._getType(e)!==B.undefined){const n=this._getOrReturnCtx(e);return D(n,{code:A.invalid_type,expected:B.undefined,received:n.parsedType}),G}return Ft(e.data)}}cg.create=t=>new cg({typeName:J.ZodUndefined,...ne(t)});class ug extends ue{_parse(e){if(this._getType(e)!==B.null){const n=this._getOrReturnCtx(e);return D(n,{code:A.invalid_type,expected:B.null,received:n.parsedType}),G}return Ft(e.data)}}ug.create=t=>new ug({typeName:J.ZodNull,...ne(t)});class dg extends ue{constructor(){super(...arguments),this._any=!0}_parse(e){return Ft(e.data)}}dg.create=t=>new dg({typeName:J.ZodAny,...ne(t)});class hg extends ue{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ft(e.data)}}hg.create=t=>new hg({typeName:J.ZodUnknown,...ne(t)});class $n extends ue{_parse(e){const r=this._getOrReturnCtx(e);return D(r,{code:A.invalid_type,expected:B.never,received:r.parsedType}),G}}$n.create=t=>new $n({typeName:J.ZodNever,...ne(t)});class fg extends ue{_parse(e){if(this._getType(e)!==B.undefined){const n=this._getOrReturnCtx(e);return D(n,{code:A.invalid_type,expected:B.void,received:n.parsedType}),G}return Ft(e.data)}}fg.create=t=>new fg({typeName:J.ZodVoid,...ne(t)});class wr extends ue{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==B.array)return D(r,{code:A.invalid_type,expected:B.array,received:r.parsedType}),G;if(s.exactLength!==null){const a=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(a||o)&&(D(r,{code:a?A.too_big:A.too_small,minimum:o?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(D(r,{code:A.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(D(r,{code:A.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>s.type._parseAsync(new Ln(r,a,r.path,o)))).then(a=>Nt.mergeArray(n,a));const i=[...r.data].map((a,o)=>s.type._parseSync(new Ln(r,a,r.path,o)));return Nt.mergeArray(n,i)}
vendor: 5,068 bytes, line 441
441get element(){return this._def.type}min(e,r){return new wr({...this._def,minLength:{value:e,message:W.toString(r)}})}max(e,r){return new wr({...this._def,maxLength:{value:e,message:W.toString(r)}})}length(e,r){return new wr({...this._def,exactLength:{value:e,message:W.toString(r)}})}nonempty(e){return this.min(1,e)}}wr.create=(t,e)=>new wr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:J.ZodArray,...ne(e)});function Is(t){if(t instanceof Re){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Nn.create(Is(n))}return new Re({...t._def,shape:()=>e})}else return t instanceof wr?new wr({...t._def,type:Is(t.element)}):t instanceof Nn?Nn.create(Is(t.unwrap())):t instanceof Ti?Ti.create(Is(t.unwrap())):t instanceof ps?ps.create(t.items.map(e=>Is(e))):t}class Re extends ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=he.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==B.object){const u=this._getOrReturnCtx(e);return D(u,{code:A.invalid_type,expected:B.object,received:u.parsedType}),G}const{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof $n&&this._def.unknownKeys==="strip"))for(const u in s.data)a.includes(u)||o.push(u);const l=[];for(const u of a){const d=i[u],h=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Ln(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof $n){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")o.length>0&&(D(s,{code:A.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of o){const h=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Ln(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const h=await d.key,p=await d.value;u.push({key:h,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>Nt.mergeObjectSync(n,u)):Nt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new Re({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,a;const s=((a=(i=this._def).errorMap)==null?void 0:a.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:W.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Re({...this._def,unknownKeys:"strip"})}passthrough(){return new Re({...this._def,unknownKeys:"passthrough"})}extend(e){return new Re({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Re({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:J.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Re({...this._def,catchall:e})}pick(e){const r={};for(const n of he.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Re({...this._def,shape:()=>r})}omit(e){const r={};for(const n of he.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Re({...this._def,shape:()=>r})}deepPartial(){return Is(this)}partial(e){const r={};for(const n of he.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new Re({...this._def,shape:()=>r})}required(e){const r={};for(const n of he.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Nn;)i=i._def.innerType;r[n]=i}return new Re({...this._def,shape:()=>r})}keyof(){return Mw(he.objectKeys(this.shape))}}Re.create=(t,e)=>new Re({shape:()=>t,unknownKeys:"strip",catchall:$n.create(),typeName:J.ZodObject,...ne(e)});Re.strictCreate=(t,e)=>new Re({shape:()=>t,unknownKeys:"strict",catchall:$n.create(),typeName:J.ZodObject,...ne(e)});Re.lazycreate=(t,e)=>new Re({shape:t,unknownKeys:"strip",catchall:$n.create(),typeName:J.ZodObject,...ne(e)});class ec extends ue{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(o=>new Br(o.ctx.common.issues));return D(r,{code:A.invalid_union,unionErrors:a}),G}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 4,993 bytes, line 441
441const o=a.map(l=>new Br(l));return D(r,{code:A.invalid_union,unionErrors:o}),G}}get options(){return this._def.options}}ec.create=(t,e)=>new ec({options:t,typeName:J.ZodUnion,...ne(e)});function th(t,e){const r=sn(t),n=sn(e);if(t===e)return{valid:!0,data:t};if(r===B.object&&n===B.object){const s=he.objectKeys(e),i=he.objectKeys(t).filter(o=>s.indexOf(o)!==-1),a={...t,...e};for(const o of i){const l=th(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(r===B.array&&n===B.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const a=t[i],o=e[i],l=th(a,o);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===B.date&&n===B.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class tc extends ue{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(i,a)=>{if(sg(i)||sg(a))return G;const o=th(i.value,a.value);return o.valid?((ig(i)||ig(a))&&r.dirty(),{status:r.value,value:o.data}):(D(n,{code:A.invalid_intersection_types}),G)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}tc.create=(t,e,r)=>new tc({left:t,right:e,typeName:J.ZodIntersection,...ne(r)});class ps extends ue{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.array)return D(n,{code:A.invalid_type,expected:B.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return D(n,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&n.data.length>this._def.items.length&&(D(n,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Ln(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Nt.mergeArray(r,a)):Nt.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new ps({...this._def,rest:e})}}ps.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ps({items:t,typeName:J.ZodTuple,rest:null,...ne(e)})};class pg extends ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.map)return D(n,{code:A.invalid_type,expected:B.map,received:n.parsedType}),G;const s=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([o,l],u)=>({key:s._parse(new Ln(n,o,n.path,[u,"key"])),value:i._parse(new Ln(n,l,n.path,[u,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return G;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(u.value,d.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const l of a){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return G;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(u.value,d.value)}return{status:r.value,value:o}}}}pg.create=(t,e,r)=>new pg({valueType:e,keyType:t,typeName:J.ZodMap,...ne(r)});class qa extends ue{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.set)return D(n,{code:A.invalid_type,expected:B.set,received:n.parsedType}),G;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(D(n,{code:A.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(D(n,{code:A.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function a(l){const u=new Set;for(const d of l){if(d.status==="aborted")return G;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const o=[...n.data.values()].map((l,u)=>i._parse(new Ln(n,l,n.path,u)));return n.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,r){return new qa({...this._def,minSize:{value:e,message:W.toString(r)}})}max(e,r){return new qa({...this._def,maxSize:{value:e,message:W.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}qa.create=(t,e)=>new qa({valueType:t,minSize:null,maxSize:null,typeName:J.ZodSet,...ne(e)});class mg extends ue{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}mg.create=(t,e)=>new mg({getter:t,typeName:J.ZodLazy,...ne(e)});class gg extends ue{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return D(r,{received:r.data,code:A.invalid_literal,expected:this._def.value}),G}
vendor: 5,139 bytes, line 441
441return{status:"valid",value:e.data}}get value(){return this._def.value}}gg.create=(t,e)=>new gg({value:t,typeName:J.ZodLiteral,...ne(e)});function Mw(t,e){return new Ci({values:t,typeName:J.ZodEnum,...ne(e)})}class Ci extends ue{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return D(r,{expected:he.joinValues(n),received:r.parsedType,code:A.invalid_type}),G}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return D(r,{received:r.data,code:A.invalid_enum_value,options:n}),G}return Ft(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Ci.create(e,{...this._def,...r})}exclude(e,r=this._def){return Ci.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Ci.create=Mw;class vg extends ue{_parse(e){const r=he.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==B.string&&n.parsedType!==B.number){const s=he.objectValues(r);return D(n,{expected:he.joinValues(s),received:n.parsedType,code:A.invalid_type}),G}if(this._cache||(this._cache=new Set(he.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=he.objectValues(r);return D(n,{received:n.data,code:A.invalid_enum_value,options:s}),G}return Ft(e.data)}get enum(){return this._def.values}}vg.create=(t,e)=>new vg({values:t,typeName:J.ZodNativeEnum,...ne(e)});class rc extends ue{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==B.promise&&r.common.async===!1)return D(r,{code:A.invalid_type,expected:B.promise,received:r.parsedType}),G;const n=r.parsedType===B.promise?r.data:Promise.resolve(r.data);return Ft(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}rc.create=(t,e)=>new rc({type:t,typeName:J.ZodPromise,...ne(e)});class Ni extends ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===J.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{D(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(n.data,i);if(n.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return G;const l=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return l.status==="aborted"?G:l.status==="dirty"||r.value==="dirty"?na(l.value):l});{if(r.value==="aborted")return G;const o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?G:o.status==="dirty"||r.value==="dirty"?na(o.value):o}}if(s.type==="refinement"){const a=o=>{const l=s.refinement(o,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?G:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?G:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ji(a))return G;const o=s.transform(a.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>ji(a)?Promise.resolve(s.transform(a.value,i)).then(o=>({status:r.value,value:o})):G);he.assertNever(s)}}Ni.create=(t,e,r)=>new Ni({schema:t,typeName:J.ZodEffects,effect:e,...ne(r)});Ni.createWithPreprocess=(t,e,r)=>new Ni({schema:e,effect:{type:"preprocess",transform:t},typeName:J.ZodEffects,...ne(r)});class Nn extends ue{_parse(e){return this._getType(e)===B.undefined?Ft(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Nn.create=(t,e)=>new Nn({innerType:t,typeName:J.ZodOptional,...ne(e)});class Ti extends ue{_parse(e){return this._getType(e)===B.null?Ft(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ti.create=(t,e)=>new Ti({innerType:t,typeName:J.ZodNullable,...ne(e)});class rh extends ue{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===B.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}rh.create=(t,e)=>new rh({innerType:t,typeName:J.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ne(e)});
vendor: 3,708 bytes, line 441
441class nh extends ue{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yl(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Br(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Br(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}nh.create=(t,e)=>new nh({innerType:t,typeName:J.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ne(e)});class yg extends ue{_parse(e){if(this._getType(e)!==B.nan){const n=this._getOrReturnCtx(e);return D(n,{code:A.invalid_type,expected:B.nan,received:n.parsedType}),G}return{status:"valid",value:e.data}}}yg.create=t=>new yg({typeName:J.ZodNaN,...ne(t)});class $R extends ue{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Uf extends ue{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?G:i.status==="dirty"?(r.dirty(),na(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?G:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new Uf({in:e,out:r,typeName:J.ZodPipeline})}}class sh extends ue{_parse(e){const r=this._def.innerType._parse(e),n=s=>(ji(s)&&(s.value=Object.freeze(s.value)),s);return Yl(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}sh.create=(t,e)=>new sh({innerType:t,typeName:J.ZodReadonly,...ne(e)});Re.lazycreate;var J;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(J||(J={}));const qo=yn.create;$n.create;wr.create;const DR=Re.create;Re.strictCreate;ec.create;tc.create;ps.create;Ci.create;rc.create;Nn.create;Ti.create;const tt=b.forwardRef(({className:t,type:e,...r},n)=>c.jsx("input",{type:e,className:Je("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));tt.displayName="Input";const Uw=b.forwardRef(({className:t,...e},r)=>c.jsx("textarea",{className:Je("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
441ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...e}));Uw.displayName="Textarea";var MR="Label",Fw=b.forwardRef((t,e)=>c.jsx(Oe.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Fw.displayName=MR;var zw=Fw;const UR=fo("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Me=b.forwardRef(({className:t,...e},r)=>c.jsx(zw,{ref:r,className:Je(UR(),t),...e}));Me.displayName=zw.displayName;function FR(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(d){try{u(n.next(d))}catch(h){a(h)}}function l(d){try{u(n.throw(d))}catch(h){a(h)}}function u(d){d.done?i(d.value):s(d.value).then(o,l)}u((n=n.apply(t,e||[])).next())})}const zR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Ff extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class BR extends Ff{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class xg extends Ff{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class wg extends Ff{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var ih;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(ih||(ih={}));class WR{constructor(e,{headers:r={},customFetch:n,region:s=ih.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=zR(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return FR(this,arguments,void 0,function*(r,n={}){var s;let i,a;try{const{headers:o,method:l,body:u,signal:d,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const y=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,y.searchParams.set("forceFunctionRegion",f));let m;u&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(p["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(p["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let w=d;h&&(a=new AbortController,i=setTimeout(()=>a.abort(),h),d?(w=a.signal,d.addEventListener("abort",()=>a.abort())):w=a.signal);const v=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),o),body:m,signal:w}).catch(_=>{throw new BR(_)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new xg(v);if(!v.ok)throw new wg(v);let x=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),k;return x==="application/json"?k=yield v.json():x==="application/octet-stream"||x==="application/pdf"?k=yield v.blob():x==="text/event-stream"?k=v:x==="multipart/form-data"?k=yield v.formData():k=yield v.text(),{data:k,error:null,response:v}}catch(o){return{data:null,error:o,response:o instanceof wg||o instanceof xg?o.context:void 0}}finally{i&&clearTimeout(i)}})}}const Bw=3,bg=t=>Math.min(1e3*2**t,3e4),HR=[520,503],Ww=["GET","HEAD","OPTIONS"];var VR=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
441de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function kg(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function qR(t,e,r,n){return!(!n||r>=Bw||!Ww.includes(t)||!HR.includes(e))}var KR=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.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(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=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 a=this.headers.get("Accept");a==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!a||a==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let a=0;for(;;){const u=new Headers(r.headers);a>0&&u.set("X-Retry-Count",String(a));let d;try{d=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body,(h,p)=>typeof p=="bigint"?p.toString():p),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!Ww.includes(r.method))throw h;if(r.retryEnabled&&a<Bw){const p=bg(a);a++,await kg(p,r.signal);continue}throw h}if(qR(r.method,d.status,a,r.retryEnabled)){var o,l;const h=(o=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&o!==void 0?o:null,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:bg(a);await d.text(),a++,await kg(p,r.signal);continue}return await r.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(a=>{var o;let l="",u="",d="";const h=a==null?void 0:a.cause;if(h){var p,f,y,m;const g=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",x=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(y=a==null?void 0:a.name)!==null&&y!==void 0?y:"FetchError"}: ${a==null?void 0:a.message}`,l+=`
442
443Caused by: ${(m=h==null?void 0:h.name)!==null&&m!==void 0?m:"Error"}: ${g}`,x&&(l+=` (${x})`),h!=null&&h.stack&&(l+=`
444${h.stack}`)}else{var w;l=(w=a==null?void 0:a.stack)!==null&&w!==void 0?w:""}const v=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${v} 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.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(u+=`. Your request URL is ${v} 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:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
444)),i.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,s=null,i=t.status,a=t.statusText;if(t.ok){var o,l;if(e.method!=="HEAD"){var u;const p=await t.text();p===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((u=e.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=p:n=JSON.parse(p))}const d=(o=e.headers.get("Prefer"))===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),h=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&h&&h.length>1&&(s=parseInt(h[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,a="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const d=await t.text();try{r=JSON.parse(d),Array.isArray(r)&&t.status===404&&(n=[],r=null,i=200,a="OK")}catch{t.status===404&&d===""?(i=204,a="No Content"):r={message:d}}if(r&&e.shouldThrowOnError)throw new VR(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:a}}returns(){return this}overrideTypes(){return this}},GR=class extends KR{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,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:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var a;const o=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${o};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const _g=new RegExp("[,()]");var Ls=class extends GR{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&_g.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&_g.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>
444r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},JR=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const a=(t??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:o,headers:l}=this.cloneRequestState();return o.searchParams.set("select",a),n&&l.append("Prefer",`count=${n}`),new Ls({method:s,url:o,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:a}=this.cloneRequestState();if(e&&a.append("Prefer",`count=${e}`),r||a.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(o.length>0){const l=[...new Set(o)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new Ls({method:s,url:i,headers:a,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const a="POST",{url:o,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&o.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);o.searchParams.set("columns",d.join(","))}}return new Ls({method:a,url:o,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Ls({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new Ls({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ka(t){"@babel/helpers - typeof";return Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ka(t)}function QR(t,e){if(Ka(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ZR(t){var e=QR(t,"string");return Ka(e)=="symbol"?e:e+""}function YR(t,e,r){return(e=ZR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Ko(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sg(Object(r),!0).forEach(function(n){YR(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var XR=class Hw{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=a;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),i),f=d==null?void 0:d.signal;if(f){if(f.aborted)return clearTimeout(p),l(u,d);const y=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",y,{once:!0}),l(u,Ko(Ko({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",y)})}return l(u,Ko(Ko({},d),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=o}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new JR(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Hw(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var a;let o;const l=new URL(`${this.url}/rpc/${e}`);let u;const d=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(d)),h=n&&Object.values(r).some(d);h?(o="POST",u=r):n||s?(o=n?"HEAD":"GET",Object.entries(r).filter(([f,y])=>y!==void 0).map(([f,y])=>[f,Array.isArray(y)?`{${y.join(",")}}`:`${y}
444`]).forEach(([f,y])=>{l.searchParams.append(f,y)})):(o="POST",u=r);const p=new Headers(this.headers);return h?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new Ls({method:o,url:l,headers:p,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class eP{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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 s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const a=i.node,o=parseInt(a.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
445import ws from "ws"
446new 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 e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
447
448Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const tP="2.105.4",rP=`realtime-js/${tP}`,nP="1.0.0",Vw="2.0.0",sP=Vw,iP=1e4,aP=100,ln={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},qw={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},ah={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class oP{constructor(e){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=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},a=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(e,r,n){var s,i;const a=e.topic,o=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",u=e.payload.event,d=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`ref length ${o.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+o.length+a.length+u.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let y=new DataView(f),m=0;y.setUint8(m++,this.KINDS.userBroadcastPush),y.setUint8(m++,l.length),y.setUint8(m++,o.length),y.setUint8(m++,a.length),y.setUint8(m++,u.length),y.setUint8(m++,h.length),y.setUint8(m++,r),Array.from(l,v=>y.setUint8(m++,v.charCodeAt(0))),Array.from(o,v=>y.setUint8(m++,v.charCodeAt(0))),Array.from(a,v=>y.setUint8(m++,v.charCodeAt(0))),Array.from(u,v=>y.setUint8(m++,v.charCodeAt(0))),Array.from(h,v=>y.setUint8(m++,v.charCodeAt(0)));var w=new Uint8Array(f.byteLength+n.byteLength);return w.set(new Uint8Array(f),0),w.set(new Uint8Array(n),f.byteLength),w.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[s,i,a,o,l]=n;return r({join_ref:s,ref:i,topic:a,event:o,payload:l})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodeUserBroadcast(e,r,n){const s=r.getUint8(1),i=r.getUint8(2),a=r.getUint8(3),o=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(e.slice(l,l+s));l=l+s;const d=n.decode(e.slice(l,l+i));l=l+i;const h=n.decode(e.slice(l,l+a));l=l+a;const p=e.slice(l,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,y={type:this.BROADCAST_EVENT,event:d,payload:f};return a>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}var ve;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
vendor: 9,945 bytes, line 448
448srange="tsrange",t.tstzrange="tstzrange"})(ve||(ve={}));const Eg=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,a)=>(i[a]=lP(a,t,e,s),i),{}):{}},lP=(t,e,r,n)=>{const s=e.find(o=>o.name===t),i=s==null?void 0:s.type,a=r[t];return i&&!n.includes(i)?Kw(i,a):oh(a)},Kw=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return hP(e,r)}switch(t){case ve.bool:return cP(e);case ve.float4:case ve.float8:case ve.int2:case ve.int4:case ve.int8:case ve.numeric:case ve.oid:return uP(e);case ve.json:case ve.jsonb:return dP(e);case ve.timestamp:return fP(e);case ve.abstime:case ve.date:case ve.daterange:case ve.int4range:case ve.int8range:case ve.money:case ve.reltime:case ve.text:case ve.time:case ve.timestamptz:case ve.timetz:case ve.tsrange:case ve.tstzrange:return oh(e);default:return oh(e)}},oh=t=>t,cP=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},uP=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},dP=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},hP=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const a=t.slice(1,r);try{i=JSON.parse("["+a+"]")}catch{i=a?a.split(","):[]}return i.map(o=>Kw(e,o))}return t},fP=t=>typeof t=="string"?t.replace(" ","T"):t,Gw=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var ga=t=>typeof t=="function"?t:function(){return t},pP=typeof self<"u"?self:null,$s=typeof window<"u"?window:null,dr=pP||$s||globalThis,mP="2.0.0",gP=1e4,vP=1e3,mr={connecting:0,open:1,closing:2,closed:3},dt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Nr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},lh={longpoll:"longpoll",websocket:"websocket"},yP={complete:4},ch="base64url.bearer.phx.",Go=class{constructor(t,e,r,n){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,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(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}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,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Jw=class{constructor(t,e){this.callback=t,this.timerCalc=e,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))}},xP=class{constructor(t,e,r){this.state=dt.closed,this.topic=t,this.params=ga(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Go(this,Nr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Jw(()=>{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=dt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=dt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=dt.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=dt.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 Go(this,Nr.leave,ga({}),this.timeout).send(),this.state=dt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Nr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(t=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=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=dt.closed,this.bindings=[]}onClose(t){this.on(Nr.close,t)}onError(t){return this.on(Nr.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Go(this,t,function(){return e},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=dt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Nr.close,"leave")},r=new Go(this,Nr.leave,ga({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=dt.joining,this.joinPush.resend(t))}trigger(t,e,r,n){let s=this.onMessage(t,e,r,n);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(a=>a.event===t&&this.filterBindings(a,e,r));for(let a=0;a<i.length;a++)i[a].callback(s,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===dt.closed}isErrored(){return this.state===dt.errored}isJoined(){return this.state===dt.joined}isJoining(){return this.state===dt.joining}isLeaving(){return this.state===dt.leaving}},nc=class{static request(t,e,r,n,s,i,a){if(dr.XDomainRequest){let o=new dr.XDomainRequest;return this.xdomainRequest(o,t,e,n,s,i,a)}else if(dr.XMLHttpRequest){let o=new dr.XMLHttpRequest;return this.xhrRequest(o,t,e,r,n,s,i,a)}else{if(dr.fetch&&dr.AbortController)return this.fetchRequest(t,e,r,n,s,i,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,s,i,a){let o={method:t,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),o.signal=l.signal),dr.fetch(e,o).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>a&&a(u)).catch(u=>{u.name==="AbortError"&&i?i():a&&a(null)}),l}static xdomainRequest(t,e,r,n,s,i,a){return t.timeout=s,t.open(e,r),t.onload=()=>{let o=this.parseJSON(t.responseText);a&&a(o)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,s,i,a,o){t.open(e,r,!0),t.timeout=i;for(let[l,u]of Object.entries(n))t.setRequestHeader(l,u);return t.onerror=()=>o&&o(null),t.onreadystatechange=()=>{if(t.readyState===yP.complete&&o){let l=this.parseJSON(t.responseText);o(l)}},a&&(t.ontimeout=a),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=e?`${e}[${n}]`:n,i=t[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},wP=t=>{let e="",r=new Uint8Array(t),n=r.byteLength;for(let s=0;s<n;s++)e+=String.fromCharCode(r[s]);return btoa(e)},Ts=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(ch)&&(this.authToken=atob(e[1].slice(ch.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(){}
vendor: 14,097 bytes, lines 448-449
448,this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=mr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+lh.websocket),"$1/"+lh.longpoll)}endpointURL(){return nc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=mr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===mr.open||this.readyState===mr.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:n,messages:s}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=mr.open,this.onopen({}),this.poll();break;case 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 ${r}`)}})}send(t){typeof t!="string"&&(t=wP(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
449`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let s of this.reqs)s.abort();this.readyState=mr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,r,n,s){let i,a=()=>{this.reqs.delete(i),n()};i=nc.request(t,this.endpointURL(),e,r,this.timeout,a,o=>{this.reqs.delete(i),this.isActive()&&s(o)}),this.reqs.add(i)}},bP=class sa{constructor(e,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel.joinRef(),this.state=sa.syncState(this.state,s,i,a),this.pendingDiffs.forEach(l=>{this.state=sa.syncDiff(this.state,l,i,a)}),this.pendingDiffs=[],o()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=sa.syncDiff(this.state,s,i,a),o())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return sa.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,s){let i=this.clone(e),a={},o={};return this.map(i,(l,u)=>{r[l]||(o[l]=u)}),this.map(r,(l,u)=>{let d=i[l];if(d){let h=u.metas.map(m=>m.phx_ref),p=d.metas.map(m=>m.phx_ref),f=u.metas.filter(m=>p.indexOf(m.phx_ref)<0),y=d.metas.filter(m=>h.indexOf(m.phx_ref)<0);f.length>0&&(a[l]=u,a[l].metas=f),y.length>0&&(o[l]=this.clone(d),o[l].metas=y)}else a[l]=u}),this.syncDiff(i,{joins:a,leaves:o},n,s)}static syncDiff(e,r,n,s){let{joins:i,leaves:a}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(o,l)=>{let u=e[o];if(e[o]=this.clone(l),u){let d=e[o].metas.map(p=>p.phx_ref),h=u.metas.filter(p=>d.indexOf(p.phx_ref)<0);e[o].metas.unshift(...h)}n(o,u,l)}),this.map(a,(o,l)=>{let u=e[o];if(!u)return;let d=l.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(o,u,l),u.metas.length===0&&delete e[o]}),e}static list(e,r){return r||(r=function(n,s){return s}),this.map(e,(n,s)=>r(n,s))}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Jo={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,n,s,i,a]=JSON.parse(t);return e({join_ref:r,ref:n,topic:s,event:i,payload:a})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:s,payload:i}=t,a=this.META_LENGTH+e.length+r.length+s.length+n.length,o=new ArrayBuffer(this.HEADER_LENGTH+a),l=new DataView(o),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,e.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(e,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(o.byteLength+i.byteLength);return d.set(new Uint8Array(o),0),d.set(new Uint8Array(i),o.byteLength),d.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,o=r.decode(t.slice(a,a+n));a=a+n;let l=r.decode(t.slice(a,a+s));a=a+s;let u=r.decode(t.slice(a,a+i));a=a+i;let d=t.slice(a,t.byteLength);return{join_ref:o,ref:null,topic:l,event:u,payload:d}},decodeReply(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),a=e.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(t.slice(o,o+n));o=o+n;let u=r.decode(t.slice(o,o+s));o=o+s;let d=r.decode(t.slice(o,o+i));o=o+i;let h=r.decode(t.slice(o,o+a));o=o+a;let p=t.slice(o,t.byteLength),f={status:h,response:p};return{join_ref:l,ref:u,topic:d,event:Nr.reply,payload:f}},decodeBroadcast(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,a=r.decode(t.slice(i,i+n));i=i+n;let o=r.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:a,event:o,payload:l}}},kP=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||gP,this.transport=e.transport||dr.WebSocket||Ts,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=dr&&dr.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Jo.encode.bind(Jo),this.defaultDecoder=Jo.decode.bind(Jo),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ts?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;$s&&$s.addEventListener&&($s.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),$s.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),$s.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,a)=>{console.log(`${s}: ${i}`,a)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ga(e.params||{}),this.endPoint=`${t}/${lh.websocket}`,this.vsn=e.vsn||mP,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Jw(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Ts}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=nc.appendParams(nc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ga(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ts?this.connectWithFallback(Ts,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(s=>{s.ref===e&&(this.off([n]),t(Date.now()-r))});return!0}transportName(t){switch(t){case Ts:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${ch}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,a=this.transportName(t),o=l=>{this.log("transport",`falling back to ${a}...`,l),this.off([s,i]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o("memorized");this.fallbackTimer=setTimeout(o,e),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),o(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,e),this.ping(l=>{this.log("transport","connected to primary after",l),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(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),vP,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===mr.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}
449triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Nr.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case mr.connecting:return"connecting";case mr.open:return"open";case mr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new xP(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:n,ref:s,join_ref:i}=t;this.log("push",`${e} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}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(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:n,payload:s,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){const o=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",o)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let o=0;o<this.channels.length;o++){const l=this.channels[o];l.isMember(r,n,s,a)&&l.trigger(n,s,i,a)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,n])=>{try{n(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class va{constructor(e,r){const n=SP(r);this.presence=new bP(e.getChannel(),n),this.presence.onJoin((s,i,a)=>{const o=va.onJoinPayload(s,i,a);e.getChannel().trigger("presence",o)}),this.presence.onLeave((s,i,a)=>{const o=va.onLeavePayload(s,i,a);e.getChannel().trigger("presence",o)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return va.transformState(this.presence.state)}static transformState(e){return e=_P(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return r[n]=yl(s),r},{})}static onJoinPayload(e,r,n){const s=jg(r),i=yl(n);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,r,n){const s=jg(r),i=yl(n);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function yl(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function _P(t){return JSON.parse(JSON.stringify(t))}function SP(t){return(t==null?void 0:t.events)&&{events:t.events}}function jg(t){return t!=null&&t.metas?yl(t):[]}var Cg;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Cg||(Cg={}));class EP{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new va(this.channel.channelAdapter,r)}}function jP(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
449if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class CP{constructor(e,r,n){const s=NP(n);this.channel=e.getSocket().channel(r,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,n){let s;try{s=this.channel.push(e,r,n)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>aP){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===ln.joined}isJoined(){return this.state===ln.joined}isJoining(){return this.state===ln.joining}isClosed(){return this.state===ln.closed}isLeaving(){return this.state===ln.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function NP(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Ng;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Ng||(Ng={}));var Zs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Zs||(Zs={}));var Tr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Tr||(Tr={}));class ya{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}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(e,r={config:{}},n){var s,i;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new CP(this.socket.socketAdapter,e,this.params),this.presence=new EP(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Gw(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:o,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Zs.PRESENCE]&&this.bindings[Zs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{e==null||e(Tr.CHANNEL_ERROR,jP(f))}),this._onClose(()=>e==null?void 0:e(Tr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){e==null||e(Tr.SUBSCRIBED);return}this._updatePostgresBindings(f,e)}).receive("error",f=>{this.state=ln.errored;const y=Object.values(f).join(", ")||"error";e==null||e(Tr.CHANNEL_ERROR,new Error(y,{cause:f}))}).receive("timeout",()=>{e==null||e(Tr.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,a=[];for(let o=0;o<i;o++){const l=s[o],{filter:{event:u,schema:d,table:h,filter:p}}=l,f=e&&e[o];if(f&&f.event===u&&ya.isFilterValueEqual(f.schema,d)&&ya.isFilterValueEqual(f.table,h)&&ya.isFilterValueEqual(f.filter,p))a.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=ln.errored,r==null||r(Tr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=ln.errored&&r&&r(Tr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Zs.PRESENCE||e===Zs.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,n)}async httpSend(e,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(o.status===202)return{success:!0};let l=o.statusText;
449try{const u=await o.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(e,r={}){var n,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:a}=e,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var a,o,l;const u=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),a}_on(e,r,n){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,n),a={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,n)=>{var s,i,a,o,l,u,d;const h=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const p=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===e.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in p){const f=p.id,y=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((a=r.ids)===null||a===void 0?void 0:a.includes(f))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((o=r.data)===null||o===void 0?void 0:o.type.toLocaleLowerCase()))}else{const f=(u=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return f==="*"||f===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,r){const{close:n,error:s,leave:i,join:a}=qw;return r&&[n,s,i,a].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:a,commit_timestamp:o,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:a,commit_timestamp:o,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const n of e.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Eg(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Eg(e.columns,e.old_record)),r}}class TP{constructor(e,r){this.socket=new kP(e,r)}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(e){this.socket.heartbeatCallback=e}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(e,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},r,n)})}push(e){this.socket.push(e)}log(e,r,n){this.socket.log(e,r,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==ah.connecting}isDisconnecting(){return this.socket.connectionState()==ah.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Tg={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},RP=[1e3,2e3,5e3,1e4],PP=1e4;function AP(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function OP(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return AP()}const IP=`
450  addEventListener("message", (e) => {
451    if (e.data.event === "start") {
452      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
453    }
454  });`;class LP{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(e,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
454,this.ref=0,this.serializer=new oP,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...a)=>i(...a):(...a)=>fetch(...a),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new TP(e,s),this.httpEndpoint=Gw(e),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r}
455
456To use Realtime in Node.js, you need to provide a WebSocket implementation:
457
458Option 1: Use Node.js 22+ which has native WebSocket support
459Option 2: Install and provide the "ws" package:
460
461  npm install ws
462
463  import ws from "ws"
464  const client = new RealtimeClient(url, {
465    ...options,
466    transport: ws
467  })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||ah.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new ya(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.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}
467this._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(e=null){let r,n=!1;if(e)r=e,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:rP};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(qw.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,n)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.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(e){let r;if(e)r=e;else{const n=new Blob([IP],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,s,i,a,o,l,u,d,h,p,f;this.worker=(r=e==null?void 0:e.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=e==null?void 0:e.accessToken)!==null&&n!==void 0?n:null;const y={};y.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:iP,y.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:Tg.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(a=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&a!==void 0?a:2*((o=e==null?void 0:e.heartbeatIntervalMs)!==null&&o!==void 0?o:Tg.HEARTBEAT_INTERVAL),y.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:eP.getWebSocketConstructor(),y.params=e==null?void 0:e.params,y.logger=e==null?void 0:e.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),y.sessionStorage=(u=e==null?void 0:e.sessionStorage)!==null&&u!==void 0?u:OP(),y.reconnectAfterMs=(d=e==null?void 0:e.reconnectAfterMs)!==null&&d!==void 0?d:g=>RP[g-1]||PP;let m,w;const v=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:sP;switch(v){case nP:m=(g,x)=>x(JSON.stringify(g)),w=(g,x)=>x(JSON.parse(g));break;case Vw:m=this.serializer.encode.bind(this.serializer),w=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=v,y.encode=(p=e==null?void 0:e.encode)!==null&&p!==void 0?p:m,y.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:w,y.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
467var Ga=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function $P(t,e,r){const n=new URL(e,t);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function DP(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function MP(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:a}){const o=$P(t.baseUrl,n,s),l=await DP(t.auth),u=await e(o,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...a},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),p=h&&d?JSON.parse(d):d;if(!u.ok){const f=h?p:void 0,y=f==null?void 0:f.error;throw new Ga((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:f})}return{status:u.status,headers:u.headers,data:p}}}}function Qo(t){return t.join("�")}var UP=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Qo(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qo(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qo(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qo(t.namespace)}`}),!0}catch(e){if(e instanceof Ga&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof Ga&&r.status===409)return;throw r}}};function Rs(t){return t.join("�")}var FP=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rs(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rs(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rs(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Rs(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rs(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Rs(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof Ga&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof Ga&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},zP=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=MP({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new UP(this.client,e),this.tableOps=new FP(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
467async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Ja(t){"@babel/helpers - typeof";return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ja(t)}function BP(t,e){if(Ja(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ja(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WP(t){var e=BP(t,"string");return Ja(e)=="symbol"?e:e+""}function HP(t,e,r){return(e=WP(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rg(Object(r),!0).forEach(function(n){HP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Fc=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function zc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var uh=class extends Fc{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return V({},super.toJSON())}},Qw=class extends Fc{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function sc(t,e,r){const n=V({},t),s=e.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function VP(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const qP=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),KP=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},dh=t=>{if(Array.isArray(t))return t.map(r=>dh(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=dh(n)}),e},GP=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Pg=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},JP=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||i+"";e(new uh(Pg(a),i,o,n))}).catch(()=>{const a=i+"";e(new uh(s.statusText||`HTTP ${i} error`,i,a,n))})}else e(new Qw(Pg(t),t,n))},QP=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return V(V({},s),r);if(KP(n)){var i;const a=(e==null?void 0:e.headers)||{};let o;for(const[l,u]of Object.entries(a))l.toLowerCase()==="content-type"&&(o=u);s.headers=sc(a,"Content-Type",(i=o)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return e!=null&&e.duplex&&(s.duplex=e.duplex),V(V({},s),r)};async function Yi(t,e,r,n,s,i,a){return new Promise((o,l)=>{t(r,QP(e,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(a==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>o(u)).catch(u=>JP(u,l,n,a))})}function Zw(t="storage"){return{get:async(e,r,n,s)=>Yi(e,"GET",r,n,s,void 0,t),post:async(e,r,n,s,i)=>Yi(e,"POST",r,s,i,n,t),put:async(e,r,n,s,i)=>Yi(e,"PUT",r,s,i,n,t),head:async(e,r,n,s)=>Yi(e,"HEAD",r,V(V({},n),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,r,n,s,i)=>Yi(e,"DELETE",r,s,i,n,t)}}const ZP=Zw("storage"),{get:Qa,post:Jt,put:hh,head:YP,remove:zf}=ZP,bt=Zw("vectors");var Ui=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=VP(e),this.fetch=qP(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=sc(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(zc(r))return{data:null,error:r};throw r}}},XP=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(zc(e))return{data:null,error:e};throw e}}};let Yw;Yw=Symbol.toStringTag;var eA=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Yw]="BlobDownloadBuilder",this.promise=null}asStream(){return new XP(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(zc(e))return{data:null,error:e};throw e}}};const tA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ag={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var rA=class extends Ui{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var s=this;return s.handleOperation(async()=>{let i;const a=V(V({},Ag),n);let o=V(V({},s.headers),t==="POST"&&{"x-upsert":String(a.upsert)});const l=a.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",a.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",a.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,l&&(o["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!a.duplex&&(a.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))o=sc(o,p,f);const u=s._removeEmptyFolders(e),d=s._getFinalPath(u),h=await(t=="PUT"?hh:Jt)(s.fetch,`${s.url}/object/${d}`,i,V({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}
467async uploadToSignedUrl(t,e,r,n){var s=this;const i=s._removeEmptyFolders(t),a=s._getFinalPath(i),o=new URL(s.url+`/object/upload/sign/${a}`);return o.searchParams.set("token",e),s.handleOperation(async()=>{let l;const u=V(V({},Ag),n);let d=V(V({},s.headers),{"x-upsert":String(u.upsert)});const h=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),h&&l.append("metadata",s.encodeMetadata(h)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),h&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(h))):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,h&&(d["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))d=sc(d,p,f);return{path:i,fullPath:(await hh(s.fetch,o.toString(),l,V({headers:d},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const s=V({},r.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Jt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),a=new URL(r.url+i.url),o=a.searchParams.get("token");if(!o)throw new Fc("No token returned by API");return{signedUrl:a.toString(),path:t,token:o}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await Jt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await Jt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(t);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let a=await Jt(n.fetch,`${n.url}/object/sign/${s}`,V({expiresIn:e},i?{transform:r.transform}:{}),{headers:n.headers});const o=new URLSearchParams;r!=null&&r.download&&o.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&o.set("cacheNonce",String(r.cacheNonce));const l=o.toString();return{signedUrl:encodeURI(`${n.url}${a.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const s=await Jt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const a=i.toString();return s.map(o=>V(V({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${a?`&${a}`:""}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),a=this._getFinalPath(t),o=()=>Qa(this.fetch,`${this.url}/${n}/${a}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new eA(o,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>dh(await Qa(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await YP(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(zc(s)){var n;const i=s instanceof uh?s.status:s instanceof Qw?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=new URLSearchParams;e!=null&&e.download&&n.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(n,e.transform),(e==null?void 0:e.cacheNonce)!=null&&n.set("cacheNonce",String(e.cacheNonce));const s=n.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await zf(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const s=V(V(V({},tA),e),{},{prefix:t||""});return await Jt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=V({},t);return await Jt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
467ity",e.quality.toString()),t}};const nA="2.105.4",mo={"X-Client-Info":`storage-js/${nA}`};var sA=class extends Ui{constructor(t,e={},r,n){const s=new URL(t);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),a=V(V({},mo),e);super(i,a,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await Qa(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Qa(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await Jt(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await hh(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Jt(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await zf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},iA=class extends Ui{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},mo),e);super(n,s,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Jt(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),s=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await Qa(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await zf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!GP(t))throw new Fc("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 r=new zP({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const a=s[i];return typeof a!="function"?a:async(...o)=>{try{return{data:await a.apply(s,o),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},aA=class extends Ui{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},mo),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await bt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await bt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},oA=class extends Ui{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},mo),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
467if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},lA=class extends Ui{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},mo),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await bt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},cA=class extends lA{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new uA(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},uA=class extends aA{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new dA(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},dA=class extends oA{constructor(t,e,r,n,s){super(t,e,s),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},hA=class extends sA{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new rA(this.url,this.headers,t,this.fetch)}get vectors(){return new cA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new iA(this.url+"/iceberg",this.headers,this.fetch)}};function Bc(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}const Xw="2.105.4",Ds=30*1e3,fh=3,Uu=fh*Ds,fA="http://localhost:9999",pA="supabase.auth.token",mA={"X-Client-Info":`gotrue-js/${Xw}`},ph="X-Supabase-Api-Version",eb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},gA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,vA=10*60*1e3;
467class Za extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function L(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class yA extends Za{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function xA(t){return L(t)&&t.name==="AuthApiError"}class er extends Za{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Hr extends Za{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class ze extends Hr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Zo(t){return L(t)&&t.name==="AuthSessionMissingError"}class Ps extends Hr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Yo extends Hr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Xo extends Hr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function wA(t){return L(t)&&t.name==="AuthImplicitGrantRedirectError"}class Og extends Hr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class bA extends Hr{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 mh extends Hr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Fu(t){return L(t)&&t.name==="AuthRetryableFetchError"}class Ig extends Hr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class gh extends Hr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const ic="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Lg=` 	
468\r=`.split(""),kA=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Lg.length;e+=1)t[Lg[e].charCodeAt(0)]=-2;for(let e=0;e<ic.length;e+=1)t[ic[e].charCodeAt(0)]=e;return t})();function $g(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(ic[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(ic[n]),e.queuedBits-=6}}function tb(t,e,r){const n=kA[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Dg(t){const e=[],r=a=>{e.push(String.fromCodePoint(a))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=a=>{EA(a,n,r)};for(let a=0;a<t.length;a+=1)tb(t.charCodeAt(a),s,i);return e.join("")}function _A(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function SA(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}_A(n,e)}}function EA(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function oi(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;
468s+=1)tb(t.charCodeAt(s),r,n);return new Uint8Array(e)}function jA(t){const e=[];return SA(t,r=>e.push(r)),new Uint8Array(e)}function Yn(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>$g(s,r,n)),$g(null,r,n),e.join("")}function CA(t){return Math.round(Date.now()/1e3)+t}function NA(){return Symbol("auth-callback")}const Ve=()=>typeof window<"u"&&typeof document<"u",Hn={tested:!1,writable:!1},rb=()=>{if(!Ve())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Hn.tested)return Hn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Hn.tested=!0,Hn.writable=!0}catch{Hn.tested=!0,Hn.writable=!1}return Hn.writable};function TA(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const nb=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),RA=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ms=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Vn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},He=async(t,e)=>{await t.removeItem(e)};class Wc{constructor(){this.promise=new Wc.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Wc.promiseConstructor=Promise;function el(t){const e=t.split(".");if(e.length!==3)throw new gh("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!gA.test(e[n]))throw new gh("JWT not in base64url format");return{header:JSON.parse(Dg(e[0])),payload:JSON.parse(Dg(e[1])),signature:oi(e[2]),raw:{header:e[0],payload:e[1]}}}async function PA(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function AA(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const a=await t(i);if(!e(i,null,a)){n(a);return}}catch(a){if(!e(i,a)){s(a);return}}})()})}function OA(t){return("0"+t.toString(16)).substr(-2)}function IA(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,OA).join("")}async function LA(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function $A(t){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."),t;const r=await LA(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function As(t,e,r=!1){const n=IA();let s=n;r&&(s+="/recovery"),await Ms(t,`${e}-code-verifier`,s);const i=await $A(n);return[i,n===i?"plain":"s256"]}const DA=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function MA(t){const e=t.headers.get(ph);if(!e||!e.match(DA))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function UA(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function FA(t){switch(t){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 zA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Er(t){if(!zA.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function qt(t){if(!t.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 zu(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function BA(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
468if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!e.value&&typeof n=="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."),e.value=!0),Reflect.get(r,n,s)}})}function Mg(t){return JSON.parse(JSON.stringify(t))}const Gn=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},WA=[502,503,504,520,521,522,523,524,530];async function Ug(t){var e;if(!RA(t))throw new mh(Gn(t),0);if(WA.includes(t.status))throw new mh(Gn(t),t.status);let r;try{r=await t.json()}catch(i){throw new er(Gn(i),i)}let n;const s=MA(t);if(s&&s.getTime()>=eb["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Ig(Gn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new ze}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,a)=>i&&typeof a=="string",!0))throw new Ig(Gn(r),t.status,r.weak_password.reasons);throw new yA(Gn(r),t.status||500,n)}const HA=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function z(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[ph]||(i[ph]=eb["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const a=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(a.redirect_to=n.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await VA(t,e,r+o,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function VA(t,e,r,n,s,i){const a=HA(e,n,s,i);let o;try{o=await t(r,Object.assign({},a))}catch(l){throw console.error(l),new mh(Gn(l),0)}if(o.ok||await Ug(o),n!=null&&n.noResolveJson)return o;try{return await o.json()}catch(l){await Ug(l)}}function At(t){var e;let r=null;GA(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=CA(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function Fg(t){const e=At(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function cn(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function qA(t){return{data:t,error:null}}function KA(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,a=Bc(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},a);return{data:{properties:o,user:l},error:null}}function zg(t){return t}function GA(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const Bu=["global","local","others"];class JA{constructor({url:e="",headers:r={},fetch:n,experimental:s}){this.url=e,this.headers=r,this.fetch=nb(n),this.experimental=s??{},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(e,r=Bu[0]){if(Bu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Bu.join(", ")}`);try{return await z(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(L(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await z(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:cn})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=Bc(e,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:KA,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(L(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await z(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:cn})}catch(r){if(L(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,a,o,l;try{const u={nextPage:null,lastPage:0,total:0},d=await z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:zg});if(d.error)throw d.error;const h=await d.json(),p=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,f=(l=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(y=>{const m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(L(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Er(e);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:cn})}catch(r){if(L(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Er(e);try{return await z(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:cn})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Er(e);
468try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:cn})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Er(e.userId);try{const{data:r,error:n}=await z(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Er(e.userId),Er(e.id);try{return{data:await z(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,a,o,l;try{const u={nextPage:null,lastPage:0,total:0},d=await z(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:zg});if(d.error)throw d.error;const h=await d.json(),p=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,f=(l=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(y=>{const m=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(L(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await z(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(L(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await z(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await z(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(L(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await z(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await z(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(L(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{return await z(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){qt(this.experimental),Er(e.userId);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){qt(this.experimental),Er(e.userId),Er(e.passkeyId);
468try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}}function Bg(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const cr={debug:!!(globalThis&&rb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class sb extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Wg extends sb{}async function QA(t,e,r){cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;let s;e>0&&(s=setTimeout(()=>{n.abort(),cr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(s),cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Wg(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(cr.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null,"  "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}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(s),await r()}})}catch(i){if(e>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&e>0){if(n.signal.aborted)return cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}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(t,{mode:"exclusive",steal:!0},async a=>{if(a){cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,a.name);try{return await r()}finally{cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,a.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new Wg(`Lock "${t}" was released because another request stole it`)}throw i}}function ZA(){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 ib(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function YA(t){return parseInt(t,16)}function XA(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function eO(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:l,resources:u,scheme:d,uri:h,version:p}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);
468if(!((e=t.statement)===null||e===void 0)&&e.includes(`
469`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const f=ib(t.address),y=d?`${d}://${n}`:n,m=t.statement?`${t.statement}
470`:"",w=`${y} wants you to sign in with your Ethereum account:
471${f}
472
473${m}`;let v=`URI: ${h}
474Version: ${p}
475Chain ID: ${r}${a?`
476Nonce: ${a}`:""}
477Issued At: ${i.toISOString()}`;if(s&&(v+=`
478Expiration Time: ${s.toISOString()}`),o&&(v+=`
479Not Before: ${o.toISOString()}`),l&&(v+=`
480Request ID: ${l}`),u){let g=`
481Resources:`;for(const x of u){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}`);g+=`
482- ${x}`}v+=g}return`${w}
483${v}`}class Le extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class ac extends Le{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function tO({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Le({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Le({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Le({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Le({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Le({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Le({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new Le({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Le({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(ab(a)){if(i.rp.id!==a)return new Le({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Le({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Le({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Le({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Le({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function rO({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Le({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Le({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;
483if(ab(n)){if(r.rpId!==n)return new Le({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Le({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Le({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Le({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class nO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const vh=new nO;function Hg(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=Bc(t,["challenge","user","excludeCredentials"]),i=oi(e).buffer,a=Object.assign(Object.assign({},r),{id:oi(r.id).buffer}),o=Object.assign(Object.assign({},s),{challenge:i,user:a});if(n&&n.length>0){o.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];o.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:oi(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function Vg(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=Bc(t,["challenge","allowCredentials"]),s=oi(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let a=0;a<r.length;a++){const o=r[a];i.allowCredentials[a]=Object.assign(Object.assign({},o),{id:oi(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return i}function qg(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Yn(new Uint8Array(t.response.attestationObject)),clientDataJSON:Yn(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Kg(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Yn(new Uint8Array(s.authenticatorData)),clientDataJSON:Yn(new Uint8Array(s.clientDataJSON)),signature:Yn(new Uint8Array(s.signature)),userHandle:s.userHandle?Yn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function ab(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function oc(){var t,e;return!!(Ve()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function ob(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new ac("Browser returned unexpected credential type",e)}:{data:null,error:new ac("Empty credential response",e)}}catch(e){return{data:null,error:tO({error:e,options:t})}}}async function lb(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new ac("Browser returned unexpected credential type",e)}:{data:null,error:new ac("Empty credential response",e)}}catch(e){return{data:null,error:rO({error:e,options:t})}}}const sO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},iO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function lc(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)if(s)for(const i in s){const a=s[i];if(a!==void 0)if(Array.isArray(a))n[i]=a;
483else if(r(a))n[i]=a;else if(e(a)){const o=n[i];e(o)?n[i]=lc(o,a):n[i]=lc(a)}else n[i]=a}return n}function aO(t,e){return lc(sO,t,e||{})}function oO(t,e){return lc(iO,t,e||{})}class lO{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){var a;try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!o)return{data:null,error:l};const u=s??vh.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:d}=o.webauthn.credential_options.publicKey;if(!d.name){const h=n;if(h)d.name=`${d.id}:${h}`;else{const f=(await this.client.getUser()).data.user,y=((a=f==null?void 0:f.user_metadata)===null||a===void 0?void 0:a.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";d.name=`${d.id}:${y}`}}d.displayName||(d.displayName=d.name)}switch(o.webauthn.type){case"create":{const d=aO(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:p}=await ob({publicKey:d,signal:u});return h?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const d=oO(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:p}=await lb(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(o){return L(o)?{data:null,error:o}:{data:null,error:new er("Unexpected error in challenge",o)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Za("rpId is required for WebAuthn authentication")};try{if(!oc())return{data:null,error:new er("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!a)return{data:null,error:o};const{webauthn:l}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(a){return L(a)?{data:null,error:a}:{data:null,error:new er("Unexpected error in authenticate",a)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Za("rpId is required for WebAuthn registration")};try{if(!oc())return{data:null,error:new er("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===e&&p.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:o};const{data:l,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:a.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(a){return L(a)?{data:null,error:a}:{data:null,error:new er("Unexpected error in register",a)}}}}ZA();const cO={url:fA,storageKey:pA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:mA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Gg(t,e,r){return await r()}const Os={};class Ya{get jwks(){var e,r;return(r=(e=Os[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Os[this.storageKey]=Object.assign(Object.assign({},Os[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Os[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Os[this.storageKey]=Object.assign(Object.assign({},Os[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s,i;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 a=Object.assign(Object.assign({},cO),e);if(this.storageKey=a.storageKey,this.instanceID=(r=Ya.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Ya.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Ve()){const o=`${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(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.experimental=(n=a.experimental)!==null&&n!==void 0?n:{},this.admin=new JA({url:a.url,headers:a.headers,fetch:a.fetch,experimental:this.experimental}),this.url=a.url,this.headers=a.headers,this.fetch=nb(a.fetch),this.lock=a.lock||Gg,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&Ve()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=QA:this.lock=Gg,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 lO(this)}
483,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?(a.storage?this.storage=a.storage:rb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Bg(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=Bg(this.memoryStorage)),Ve()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Xw}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),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 e;try{let r={},n="none";if(Ve()&&(r=TA(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ve()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),wA(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:a,redirectType:o}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return L(r)?this._returnResult({error:r}):this._returnResult({error:new er("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:At}),{data:a,error:o}=i;if(o||!a)return this._returnResult({data:{user:null,session:null},error:o});const l=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(L(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:d,password:h,options:p}=e;let f=null,y=null;this.flowType==="pkce"&&([f,y]=await As(this.storage,this.storageKey)),i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:y},xform:At})}else if("phone"in e){const{phone:d,password:h,options:p}=e;i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:At})}else throw new Yo("You must provide either an email or phone number and a password");const{data:a,error:o}=i;if(o||!a)return await He(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const l=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:a,options:o}=e;r=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Fg})}else if("phone"in e){const{phone:i,password:a,options:o}=e;r=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Fg})}else throw new Yo("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Ps;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,a,o,l,u,d,h,p;let f,y;if("message"in e)f=e.message,y=e.signature;else{const{chain:m,wallet:w,statement:v,options:g}=e;let x;if(Ve())if(typeof w=="object")x=w;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")x=O.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 w!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=w}const k=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),_=await x.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=ib(_[0]);let E=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const O=await x.request({method:"eth_chainId"});E=YA(O)}const T={domain:k.host,address:S,statement:v,uri:k.href,version:"1",chainId:E,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=g==null?void 0:g.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=eO(T),y=await x.request({method:"personal_sign",params:[XA(f),S]})}try{const{data:m,error:w}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:y}
483,!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:At});if(w)throw w;if(!m||!m.session||!m.user){const v=new Ps;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:w})}catch(m){if(L(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var r,n,s,i,a,o,l,u,d,h,p,f;let y,m;if("message"in e)y=e.message,m=e.signature;else{const{chain:w,wallet:v,statement:g,options:x}=e;let k;if(Ve())if(typeof v=="object")k=v;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))k=S.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 v!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=v}const _=new URL((r=x==null?void 0:x.url)!==null&&r!==void 0?r:window.location.href);
483if("signIn"in k&&k.signIn){const S=await k.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),g?{statement:g}:null));let E;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")E=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)E=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)y=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in k)||typeof k.signMessage!="function"||!("publicKey"in k)||typeof k!="object"||!k.publicKey||!("toBase58"in k.publicKey)||typeof k.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${_.host} wants you to sign in with your Solana account:`,k.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(n=x==null?void 0:x.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((h=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...x.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`
484`);const S=await k.signMessage(new TextEncoder().encode(y),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=S}}try{const{data:w,error:v}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Yn(m)},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:At});if(v)throw v;if(!w||!w.session||!w.user){const g=new Ps;return this._returnResult({data:{user:null,session:null},error:g})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:v})}catch(w){if(L(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const r=await Vn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new bA;const{data:i,error:a}=await z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:At});if(await He(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!i||!i.session||!i.user){const o=new Ps;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:a})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:a}=e,o=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:At}),{data:l,error:u}=o;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new Ps;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,a;try{if("email"in e){const{email:o,options:l}=e;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await As(this.storage,this.storageKey));const{error:h}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:o,options:l}=e,{data:u,error:d}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(a=l==null?void 0:l.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Yo("You must provide either an email or phone number.")}catch(o){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:a,error:o}=await z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:At});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const l=a.session,u=a.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(L(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,a;try{let o=null,l=null;this.flowType==="pkce"&&([o,l]=await As(this.storage,this.storageKey));const u=await z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}
484:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:l}),headers:this.headers,xform:qA});return!((i=u.data)===null||i===void 0)&&i.url&&Ve()&&!(!((a=e.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(o){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(o))return this._returnResult({data:null,error:o});throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new ze;const{error:s}=await z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:a}=await z(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:a,error:o}=await z(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o})}throw new Yo("You must provide either an email or phone number and a type")}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}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 e=null;const r=await Vn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Uu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const a=await Vn(this.userStorage,this.storageKey+"-user");a!=null&&a.user?e.user=a.user:e.user=zu()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};e.user=BA(e.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:cn}):await this._useSession(async r=>{var n,s,i;const{data:a,error:o}=r;if(o)throw o;return!(!((n=a.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ze}:await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:cn})})}catch(r){if(L(r))return Zo(r)&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new ze;
484const a=s.session;let o=null,l=null;this.flowType==="pkce"&&e.email!=null&&([o,l]=await As(this.storage,this.storageKey));const{data:u,error:d}=await z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:l}),jwt:a.access_token,xform:cn});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(n){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ze;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:a}=el(e.access_token);if(a.exp&&(n=a.exp,s=n<=r),s){const{data:o,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!o)return{data:{user:null,session:null},error:null};i=o}else{const{data:o,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:o.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(L(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:a,error:o}=r;if(o)throw o;e=(n=a.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new ze;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Ve())throw new Xo("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Xo(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Og("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Xo("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Og("No code detected.");const{data:x,error:k}=await this._exchangeCodeForSession(e.code);if(k)throw k;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:x.session,redirectType:(n=x.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:l,expires_at:u,token_type:d}=e;if(!a||!l||!o||!d)throw new Xo("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(l);let f=h+p;u&&(f=parseInt(u));const y=f-h;y*1e3<=Ds&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${p}s`);const m=f-p;h-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,f,h):h-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,f,h);const{data:w,error:v}=await this._getUser(a);if(v)throw v;const g={provider_token:s,provider_refresh_token:i,access_token:a,expires_in:p,expires_at:f,refresh_token:o,token_type:d,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(s){if(L(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Vn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Zo(i))return this._returnResult({error:i});const a=(n=s.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:o}=await this.admin.signOut(a,e);
484if(o&&!(xA(o)&&(o.status===404||o.status===401||o.status===403)||Zo(o)))return this._returnResult({error:o})}return e!=="others"&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=NA(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:a}=r;if(a)throw a;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),Zo(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await As(this.storage,this.storageKey,!0));try{return await z(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var a,o,l,u,d;const{data:h,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=e.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await z(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Ve()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(L(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:a,provider:o,token:l,access_token:u,nonce:d}=e,h=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:o,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:At}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Ps}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await He(this.storage,`${this.storageKey}-code-verifier`),L(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:a}=r;if(a)throw a;return await z(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await AA(async s=>(s>
4840&&await PA(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:At})),(s,i)=>{const a=200*Math.pow(2,s);return i&&Fu(i)&&Date.now()+a-n<Ds})}catch(n){if(this._debug(r,"error",n),L(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Ve()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Vn(this.storage,this.storageKey);if(s&&this.userStorage){let a=await Vn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await Ms(this.userStorage,this.storageKey+"-user",a)),s.user=(e=a==null?void 0:a.user)!==null&&e!==void 0?e:zu()}else if(s&&!s.user&&!s.user){const a=await Vn(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await He(this.storage,this.storageKey+"-user"),await Ms(this.storage,this.storageKey,s)):s.user=zu()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Uu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Uu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),Fu(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(s.access_token);!o&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(n,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new ze;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Wc;const{data:i,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!i.session)throw new ze;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const o={data:i.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(i){if(this._debug(s,"error",i),L(i)){const a={data:null,error:i};return Fu(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(a),a}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(e,r)}catch(l){i.push(l)}});if(await Promise.all(a),i.length>0){for(let o=0;o<i.length;o+=1)console.error(i[o]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await He(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Ms(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Mg(s);await Ms(this.storage,this.storageKey,i)}else{const s=Mg(r);await Ms(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await He(this.storage,this.storageKey),await He(this.storage,this.storageKey+"-code-verifier"),await He(this.storage,this.storageKey+"-user"),this.userStorage&&await He(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ve()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
484catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ds);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Ds);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ds}ms, refresh threshold is ${fh} ticks`),s<=fh&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof sb)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ve()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"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(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,a]=await As(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(o.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await z(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:u}=await z(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?qg(e.webauthn.credential_response):Kg(e.webauthn.credential_response)})}:{code:e.code}),{data:o,error:l}=await z(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:l}))})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=await z(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(a.error)return a;const{data:o}=a;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:Hg(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:Vg(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:f}=el(e);let y=null;f.aal&&(y=f.aal);let m=y;const{data:{user:w},error:v}=await this.getUser(e);if(v)return this._returnResult({data:null,error:v});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(k=>k.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const x=f.amr||[];return{data:{currentLevel:y,nextLevel:m,currentAuthenticationMethods:x},error:null}}catch(f){if(L(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:a},error:o}
484=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=el(a.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((i=(s=a.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const p=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await z(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ze})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ze});const a=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Ve()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ze});const a=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Ve()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await z(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ze})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await z(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ze})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(o=>o.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(o=>o.kid===e),n&&this.jwks_cached_at+vA>s)return n;const{data:i,error:a}=await z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(o=>o.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:f,error:y}
484=await this.getSession();if(y||!f.session)return this._returnResult({data:null,error:y});n=f.session.access_token}const{header:s,payload:i,signature:a,raw:{header:o,payload:l}}=el(n);r!=null&&r.allowExpired||UA(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:a},error:null}}const d=FA(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,a,jA(`${o}.${l}`)))throw new gh("Invalid JWT signature");return{data:{claims:i,header:s,signature:a},error:null}}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,s;qt(this.experimental);try{if(!oc())return this._returnResult({data:null,error:new er("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(a||!i)return this._returnResult({data:null,error:a});const o=Vg(i.options),l=(s=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:vh.createNewAbortSignal(),{data:u,error:d}=await lb({publicKey:o,signal:l});if(d||!u)return this._returnResult({data:null,error:d??new er("WebAuthn ceremony failed",null)});const h=Kg(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if(L(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var r,n;qt(this.experimental);try{if(!oc())return this._returnResult({data:null,error:new er("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const a=Hg(s.options),o=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:vh.createNewAbortSignal(),{data:l,error:u}=await ob({publicKey:a,signal:o});if(u||!l)return this._returnResult({data:null,error:u??new er("WebAuthn ceremony failed",null)});const d=qg(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if(L(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){qt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new ze});const{data:s,error:i}=await z(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){qt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new ze});const{data:i,error:a}=await z(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;qt(this.experimental);try{const{data:n,error:s}=await z(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){qt(this.experimental);try{const{data:r,error:n}=await z(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:At});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){qt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new ze});const{data:s,error:i}=await z(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:a=>({data:a,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){qt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new ze});const{data:i,error:a}=await z(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){qt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new ze});const{error:i}
484=await z(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}}Ya.nextInstanceID={};const uO=Ya,dO="2.105.4";let ia="";typeof Deno<"u"?ia="deno":typeof document<"u"?ia="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ia="react-native":ia="node";const hO={"X-Client-Info":`supabase-js-${ia}/${dO}`},fO={headers:hO},pO={schema:"public"},mO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},gO={};function Xa(t){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(t)}function vO(t,e){if(Xa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yO(t){var e=vO(t,"string");return Xa(e)=="symbol"?e:e+""}function xO(t,e,r){return(e=yO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Te(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jg(Object(r),!0).forEach(function(n){xO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const wO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),bO=()=>Headers,kO=(t,e,r)=>{const n=wO(r),s=bO();return async(i,a)=>{var o;const l=(o=await e())!==null&&o!==void 0?o:t;let u=new s(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,Te(Te({},a),{},{headers:u}))}};function _O(t){return t.endsWith("/")?t:t+"/"}function SO(t,e){var r,n;const{db:s,auth:i,realtime:a,global:o}=t,{db:l,auth:u,realtime:d,global:h}=e,p={db:Te(Te({},l),s),auth:Te(Te({},u),i),realtime:Te(Te({},d),a),storage:{},global:Te(Te(Te({},h),o),{},{headers:Te(Te({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=o==null?void 0:o.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?p.accessToken=t.accessToken:delete p.accessToken,p}function EO(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(_O(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var jO=class extends uO{constructor(t){super(t)}},CO=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=EO(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const a=`sb-${i.hostname.split(".")[0]}-auth-token`,o={db:pO,realtime:gO,auth:Te(Te({},mO),{},{storageKey:a}),global:fO},l=SO(r??{},o);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=kO(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Te({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new XR(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new hA(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new WR(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:a,lock:o,debug:l,throwOnError:u,experimental:d,lockAcquireTimeout:h,skipAutoInitialize:p},f,y){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new jO({url:this.authUrl.href,headers:Te(Te({},m),f),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:a,lock:o,debug:l,throwOnError:u,experimental:d,fetch:y,lockAcquireTimeout:h,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new LP(this.realtimeUrl.href,Te(Te({},t),{},{params:Te(Te({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const NO=(t,e,r)=>new CO(t,e,r);function TO(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}TO()&&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 N
484ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const RO="https://wgorcjiymbpafpraftnx.supabase.co",Qg="sb_publishable_L1qAQWHBdaeVEcBWIsFgQw_Iucj0RIi";function PO(t){return t.startsWith("sb_publishable_")||t.startsWith("sb_secret_")}function AO(t){return(e,r)=>{const n=new Headers(typeof Request<"u"&&e instanceof Request?e.headers:void 0);return r!=null&&r.headers&&new Headers(r.headers).forEach((s,i)=>n.set(i,s)),PO(t)&&n.get("Authorization")===`Bearer ${t}`&&n.delete("Authorization"),n.set("apikey",t),fetch(e,{...r,headers:n})}}const OO=NO(RO,Qg,{global:{fetch:AO(Qg)},auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}}),IO=DR({name:qo().trim().min(1,"Name is required").max(100,"Name is too long"),email:qo().trim().email("Enter a valid email").max(255),subject:qo().trim().min(1,"Subject is required").max(150),message:qo().trim().min(10,"Message must be at least 10 characters").max(2e3)}),LO=[{icon:lj,title:"Email",value:"[email protected]",href:"mailto:[email protected]"},{icon:cj,title:"Location",value:"Philadelphia, PA"},{icon:fj,title:"Cash App",value:"$EndangeredKind"},{icon:_f,title:"Instagram",value:"@endangered_kind",href:"https://www.instagram.com/endangered_kind/"},{icon:kf,title:"Facebook",value:"endangeredkind",href:"https://www.facebook.com/endangeredkind"}],$O=()=>{const[t,e]=b.useState({name:"",email:"",subject:"",message:""}),[r,n]=b.useState({}),[s,i]=b.useState(!1),a=(l,u)=>{e(d=>({...d,[l]:u})),r[l]&&n(d=>({...d,[l]:void 0}))},o=async l=>{l.preventDefault();const u=IO.safeParse(t);if(!u.success){const h={};u.error.errors.forEach(p=>{const f=p.path[0];h[f]=p.message}),n(h);return}i(!0);const{error:d}=await OO.from("contact_messages").insert({name:u.data.name,email:u.data.email,subject:u.data.subject,message:u.data.message});if(d){ql({title:"Couldn't send message",description:"Something went wrong. Please try again.",variant:"destructive"}),i(!1);return}ql({title:"Message sent",description:"Thanks for reaching out. We'll get back to you soon."}),e({name:"",email:"",subject:"",message:""}),i(!1)};return c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsxs("div",{className:"relative container max-w-5xl",children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Get In Touch"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-black uppercase leading-[0.95] mb-6",children:["Let's ",c.jsx("span",{className:"text-brand-green",children:"connect"})]}),c.jsx("p",{className:"text-lg sm:text-xl text-secondary-foreground/80 max-w-3xl leading-relaxed",children:"Whether you want to partner, volunteer, share your story, or learn more about the work — we'd love to hear from you."})]})]}),c.jsx("section",{className:"py-20 sm:py-24",children:c.jsxs("div",{className:"container max-w-6xl grid gap-12 lg:grid-cols-[1fr_1.5fr]",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-brand-black text-xs font-bold uppercase tracking-[0.3em] mb-4",children:"Reach Us"}),c.jsxs("h2",{className:"text-3xl sm:text-4xl font-black uppercase leading-tight mb-8",children:["Multiple ways to ",c.jsx("span",{className:"text-brand-black",children:"reach us"})]}),c.jsx("div",{className:"space-y-6",children:LO.map(l=>c.jsxs("div",{className:"flex gap-4 items-start",children:[c.jsx("div",{className:"inline-flex items-center justify-center h-11 w-11 bg-brand-black/10 text-brand-black shrink-0 rounded-lg",children:c.jsx(l.icon,{className:"h-5 w-5"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground mb-1",children:l.title}),l.href?c.jsx("a",{href:l.href,className:"text-base font-semibold hover:text-brand-black transition-smooth",children:l.value}):c.jsx("p",{className:"text-base font-semibold",children:l.value})]})]}
484,l.title))})]}),c.jsxs("form",{onSubmit:o,className:"bg-card border border-border rounded-xl p-8 sm:p-10 shadow-sm",noValidate:!0,children:[c.jsx("h2",{className:"text-2xl sm:text-3xl font-black uppercase tracking-tight mb-8",children:"Send a message"}),c.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 mb-5",children:[c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"name",className:"text-xs font-bold uppercase tracking-[0.2em] mb-2 block",children:"Name"}),c.jsx(tt,{id:"name",value:t.name,onChange:l=>a("name",l.target.value),maxLength:100,className:"h-12","aria-invalid":!!r.name}),r.name&&c.jsx("p",{className:"text-xs text-destructive mt-1.5",children:r.name})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"email",className:"text-xs font-bold uppercase tracking-[0.2em] mb-2 block",children:"Email"}),c.jsx(tt,{id:"email",type:"email",value:t.email,onChange:l=>a("email",l.target.value),maxLength:255,className:"h-12","aria-invalid":!!r.email}),r.email&&c.jsx("p",{className:"text-xs text-destructive mt-1.5",children:r.email})]})]}),c.jsxs("div",{className:"mb-5",children:[c.jsx(Me,{htmlFor:"subject",className:"text-xs font-bold uppercase tracking-[0.2em] mb-2 block",children:"Subject"}),c.jsx(tt,{id:"subject",value:t.subject,onChange:l=>a("subject",l.target.value),maxLength:150,className:"h-12","aria-invalid":!!r.subject}),r.subject&&c.jsx("p",{className:"text-xs text-destructive mt-1.5",children:r.subject})]}),c.jsxs("div",{className:"mb-6",children:[c.jsx(Me,{htmlFor:"message",className:"text-xs font-bold uppercase tracking-[0.2em] mb-2 block",children:"Message"}),c.jsx(Uw,{id:"message",value:t.message,onChange:l=>a("message",l.target.value),maxLength:2e3,rows:6,"aria-invalid":!!r.message}),r.message&&c.jsx("p",{className:"text-xs text-destructive mt-1.5",children:r.message})]}),c.jsxs(le,{type:"submit",size:"lg",disabled:s,className:"w-full bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide h-14",children:[s?"Sending...":"Send Message",c.jsx(yj,{className:"ml-1 h-4 w-4"})]})]})]})}),c.jsx("section",{className:"bg-brand-black text-secondary-foreground py-20",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Ready to ",c.jsx("span",{className:"text-brand-green",children:"stand with us?"})]}),c.jsx("p",{className:"text-lg text-secondary-foreground/80 mb-8 max-w-2xl mx-auto",children:"Support the work that's already underway in Philadelphia neighborhoods."}),c.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[c.jsx(le,{asChild:!0,size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:c.jsxs(fe,{to:"/donate",children:["Donate ",c.jsx(nr,{className:"ml-1 h-4 w-4"})]})}),c.jsx(le,{asChild:!0,size:"lg",variant:"outline",className:"border-secondary-foreground bg-transparent text-secondary-foreground hover:bg-secondary-foreground hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/what-we-do",children:"Our Programs"})})]})]})}),c.jsx(Ct,{})]})},DO="/assets/citizen-sTELEVMo.jpg",MO="/assets/council-BbwjBXEO.jpg",UO="/assets/inquirer-apr-CsglZyZS.jpg",FO="/assets/inquirer-mar-BnsMQ0jE.jpg",zO="/assets/whyy-CSgXVcxW.jpg",BO="/assets/nyt-U03ENa0U.jpg",WO=[{type:"Article",source:"The New York Times",date:"December 12, 2025",title:"How Philadelphia Is Using Environmental Design to Fight Gun Violence",excerpt:"The New York Times' Headway desk examines how Philadelphia is reshaping blocks, lots, and public spaces to reduce gun violence — featuring the community-rooted work driving change on the ground.",href:"https://www.nytimes.com/2025/12/12/headway/philadelphia-gun-violence-environmental-design.html",image:BO,featured:!0},{type:"Article",source:"The Philadelphia Citizen",date:"2024",title:"Citizen of the Week: John Solomon of Endangered Kind",excerpt:"A profile of founder John Solomon and the grassroots, community-rooted work powering Endangered Kind's mission across Philadelphia.",href:"https://thephiladelphiacitizen.org/citizen-of-the-week-john-solomon-of-endangered-kind/",image:DO,featured:!0},{type:"Recognition",source:"Philadelphia City Council",date:"2026",title:"Council honors violence-prevention group",excerpt:"Philadelphia City Council recognized Endangered Kind alongside Pushing Progress Philly for their impact on community safety and violence prevention.",href:"https://citizenportal.ai/articles/7391224/pennsylvania/philadelphia-city/council-honors-city-funded-violence-prevention-groups-pushing-progress-philly-and-endangered-kind",image:MO},{type:"Op-Ed",source:"The Philadelphia Inquirer",date:"April 2, 2021",title:"The reality of Philadelphia's gun-violence epidemic crashes a virtual hearing",excerpt:"Helen Ubiñas reports on the moment one of Endangered Kind's own — waiting to speak at a Philly gun-violence hearing — learned his brother had been shot.",href:"https://www.inquirer.com/opinion/philadelphia-guns-violence-endangered-kind-john-solomon-kenyatta-johnson-helen-ubinas-20210402.html",image:UO},{type:"Op-Ed",source:"The Philadelphia Inquirer",date:"March 2, 2021",title:"Philly's gun violence-prevention community needs a reckoning of its own",excerpt:"Helen Ubiñas highlights John Solomon and Endangered Kind as the kind of grassroots, community-rooted leadership Philadelphia's gun-violence response has been missing.",href:"https://www.inquirer.com/opinion/philadelphia-guns-violence-gun-control-endangered-kind-john-solomon-helen-ubinas-20210302.html",image:FO},{type:"Article",source:"WHYY",date:"2016",title:"Soon-to-be AG Shapiro gets grass-roots perspective on Philly gun violence",excerpt:"WHYY covers then-incoming Pennsylvania Attorney General Josh Shapiro meeting with John Solomon and Endangered Kind to hear directly from the streets about Philadelphia's gun-violence crisis.",href:"https://whyy.org/articles/soon-to-be-ag-shapiro-gets-grass-roots-perspective-on-philly-gun-violence/",image:zO},{type:"Video",source:"Instagram",date:"Recent",title:"Project Tour: Spring Garden Stop",excerpt:"Behind the scenes on the Endangered Kind Project Tour — meeting residents, building trust, and walking the blocks that fuel the mission.",href:"https://www.instagram.com/reel/DT0LA4ejU2A/"}],HO={Article:gj,Recognition:ZE,"Op-Ed":pj,Video:jj},VO=()=>c.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[c.jsx(jt,{}),c.jsxs("section",{className:"relative bg-brand-black text-secondary-foreground py-20 sm:py-28 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 opacity-10",style:{background:"var(--gradient-hero)"}}),c.jsxs("div",{className:"relative container max-w-5xl",children:[c.jsx("span",{className:"inline-block text-brand-green text-xs sm:text-sm font-bold uppercase tracking-[0.3em] mb-5",children:"Press & Media"}),c.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-black uppercase leading-[0.95] mb-6",children:["In the ",c.jsx("span",{className:"text-brand-green",children:"news"})]}),c.jsx("p",{className:"text-lg sm:text-xl text-secondary-foreground
484/80 max-w-3xl leading-relaxed",children:"Stories, features, and recognition of the Endangered Kind movement — from local press to City Council to the streets of Philadelphia."})]})]}),c.jsx("section",{className:"py-16 sm:py-20 bg-secondary border-b border-brand-green/20",children:c.jsxs("div",{className:"container max-w-6xl",children:[c.jsx("span",{className:"inline-block text-brand-green text-xs font-bold uppercase tracking-[0.3em] mb-8",children:"Featured Stories"}),c.jsx("div",{className:"space-y-6",children:WO.map(t=>{const e=HO[t.type];return c.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"group block bg-card border border-border rounded-xl overflow-hidden hover:border-brand-green transition-smooth",children:c.jsxs("div",{className:"grid md:grid-cols-[1.2fr_1fr]",children:[c.jsxs("div",{className:"p-8 sm:p-10 md:p-12 flex flex-col justify-center",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[c.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-brand-black/10 text-brand-black text-xs font-bold uppercase tracking-wider px-3 py-1.5 rounded",children:[c.jsx(e,{className:"h-3 w-3"})," ",t.type]}),c.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:[t.source," · ",t.date]})]}),c.jsx("h2",{className:"text-2xl sm:text-3xl md:text-4xl font-black uppercase leading-tight mb-4 group-hover:text-brand-black transition-smooth",children:t.title}),c.jsx("p",{className:"text-base sm:text-lg text-muted-foreground leading-relaxed mb-6",children:t.excerpt}),c.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-bold uppercase tracking-wider text-brand-black",children:["Read the story ",c.jsx(fx,{className:"h-4 w-4"})]})]}),c.jsx("div",{className:"bg-brand-black relative min-h-[240px] flex items-center justify-center overflow-hidden",children:t.image?c.jsx("img",{src:t.image,alt:t.title,loading:"lazy",decoding:"async",className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-smooth"}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"absolute inset-0 opacity-20",style:{background:"var(--gradient-hero)"}}),c.jsxs("div",{className:"relative text-center p-10",children:[c.jsx("div",{className:"text-6xl sm:text-7xl font-black text-brand-green mb-2",children:"EK"}),c.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-secondary-foreground/60",children:"In the Press"})]})]})})]})},t.title)})})]})}),c.jsx("section",{className:"bg-brand-black text-secondary-foreground py-20",children:c.jsxs("div",{className:"container max-w-4xl text-center",children:[c.jsxs("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-black uppercase leading-tight mb-6",children:["Press ",c.jsx("span",{className:"text-brand-green",children:"inquiries"})]}),c.jsx("p",{className:"text-lg text-secondary-foreground/80 mb-8 max-w-2xl mx-auto",children:"Writing a story or producing a segment about violence prevention, grassroots leadership, or community safety in Philadelphia? We'd love to talk."}),c.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[c.jsx(le,{asChild:!0,size:"lg",className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wide",children:c.jsxs(fe,{to:"/contact",children:["Contact Us ",c.jsx(nr,{className:"ml-1 h-4 w-4"})]})}),c.jsx(le,{asChild:!0,size:"lg",variant:"outline",className:"border-secondary-foreground bg-transparent text-secondary-foreground hover:bg-secondary-foreground hover:text-brand-black font-bold uppercase tracking-wide",children:c.jsx(fe,{to:"/what-we-do",children:"Our Work"})})]})]})}),c.jsx(Ct,{})]}),qO=()=>{const[t,e]=b.useState([]),[r,n]=b.useState(!0),s=Ei(a=>a.addItem),i=Ei(a=>a.isLoading);return b.useEffect(()=>{(async()=>{var a,o;try{const l=await ys(c2,{first:24,query:null});e(((o=(a=l==null?void 0:l.data)==null?void 0:a.products)==null?void 0:o.edges)??[])}catch(l){console.error(l)}finally{n(!1)}})()},[]),c.jsxs("div",{className:"min-h-screen flex flex-col bg-brand-black text-secondary-foreground",children:[c.jsx(jt,{}),c.jsxs("main",{className:"flex-1",children:[c.jsxs("div",{className:"container pt-8 pb-4 flex items-center gap-2 text-xs uppercase tracking-[0.2em] text-secondary-foreground
484/60",children:[c.jsx(fe,{to:"/",className:"hover:text-brand-green transition-smooth",children:"Home"}),c.jsx("span",{children:"/"}),c.jsx("span",{className:"text-brand-green",children:"Shop"})]}),c.jsxs("section",{className:"container pb-12",children:[c.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-brand-green font-semibold mb-3",children:"Endangered Kind / Apparel"}),c.jsxs("h1",{className:"text-4xl md:text-6xl font-bold uppercase leading-[0.95]",children:["Wear The ",c.jsx("span",{className:"text-brand-green",children:"Mission"})]}),c.jsx("p",{className:"mt-4 text-base text-secondary-foreground/80 max-w-2xl",children:"Every purchase directly funds community outreach, violence response, and capacity building in the neighborhoods we serve."})]}),c.jsx("section",{className:"container pb-20",children:r?c.jsx("div",{className:"flex items-center justify-center py-24",children:c.jsx(za,{className:"h-8 w-8 animate-spin text-brand-green"})}):t.length===0?c.jsxs("div",{className:"border border-brand-green/20 rounded-md py-24 text-center",children:[c.jsx("p",{className:"text-2xl md:text-4xl font-bold uppercase tracking-[0.15em] text-brand-green mb-3",children:"Coming Soon"}),c.jsx("p",{className:"text-sm uppercase tracking-[0.2em] text-secondary-foreground/60",children:"No products available yet"})]}):c.jsx("div",{className:"grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:t.map(a=>{var p,f,y;const o=a.node,l=(p=o.images.edges[0])==null?void 0:p.node,u=((f=o.variants.edges.find(m=>m.node.availableForSale))==null?void 0:f.node)??((y=o.variants.edges[0])==null?void 0:y.node),d=!o.variants.edges.some(m=>m.node.availableForSale),h=o.priceRange.minVariantPrice;return c.jsxs("div",{className:"group flex flex-col bg-brand-black border border-brand-green/20 rounded-md overflow-hidden",children:[c.jsx(fe,{to:`/product/${o.handle}`,className:"block aspect-square overflow-hidden bg-secondary/10",children:l?c.jsx("img",{src:l.url,alt:l.altText??o.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform"}):c.jsx("div",{className:"w-full h-full flex items-center justify-center text-brand-green text-xs uppercase tracking-[0.2em]",children:"No image"})}),c.jsxs("div",{className:"p-5 flex flex-col flex-1",children:[c.jsx(fe,{to:`/product/${o.handle}`,children:c.jsx("h3",{className:"text-lg font-bold uppercase tracking-wide hover:text-brand-green transition-smooth",children:o.title.replace(/pre[-\s]?order only/gi,"").trim()})}),c.jsx("p",{className:"mt-2 text-sm text-secondary-foreground/70 line-clamp-2 flex-1",children:o.description.replace(/pre[-\s]?order only/gi,"").trim()}),c.jsx("div",{className:"mt-4 flex items-center justify-between",children:c.jsxs("span",{className:"text-xl font-bold",children:[h.currencyCode," ",parseFloat(h.amount).toFixed(2)]})}),c.jsx(le,{onClick:()=>u&&s({product:a,variantId:u.id,variantTitle:u.title,price:u.price,quantity:1,selectedOptions:u.selectedOptions||[]}),disabled:!u||d||i,className:"mt-4 w-full bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-[0.2em]",children:d?"Sold Out":i?c.jsx(za,{className:"w-4 h-4 animate-spin"}):"Add to Cart"})]})]},o.id)})})})]}),c.jsx(Ct,{})]})},KO=()=>{var p,f;const{handle:t}=H_(),[e,r]=b.useState(null),[n,s]=b.useState(!0),[i,a]=b.useState(null),[o,l]=b.useState(0),u=Ei(y=>y.addItem),d=Ei(y=>y.isLoading);b.useEffect(()=>{t&&(async()=>{var y,m,w,v,g;try{const x=await ys(u2,{handle:t}),k=(y=x==null?void 0:x.data)==null?void 0:y.product;r(k),a(((g=(v=(w=(m=k==null?void 0:k.variants)==null?void 0:m.edges)==null?void 0:w[0])==null?void 0:v.node)==null?void 0:g.id)??null)}finally{s(!1)}})()},[t]);const h=(p=e==null?void 0:e.variants.edges.find(y=>y.node.id===i))==null?void 0:p.node;return c.jsxs("div",{className:"min-h-screen flex flex-col bg-brand-black text-secondary-foreground",children:[c.jsx(jt,{}),c.jsxs("main",{className:"flex-1",children:[c.jsxs("div",{className:"container pt-8 pb-4 flex items-center gap-2 text-xs uppercase tracking-[0.2em] text-secondary-foreground/60",children:[c.jsx(fe,{to:"/",className:"hover:text-brand-green transition-smooth",children:"Home"}),c.jsx("span",{children:"/"}),c.jsx(fe,{to:"/shop",className:"hover:text-brand-green transition-smooth",children:"Shop"}),e&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"/"}),c.jsx("span",{className:"text-brand-green truncate",children:e.title})]})]}),n?c.jsx("div",{className:"flex items-center justify-center py-24",children:c.jsx(za,{className:"h-8 w-8 animate-spin text-brand-green"})}):e?c.jsxs("section",{className:"container pb-20 grid gap-12 lg:grid-cols-2 lg:gap-16",children:[c.jsxs("div",{className:"flex flex-col gap-4",children:[c.jsx("div",{className:"aspect-square bg-secondary/10 rounded-md overflow-hidden",children:(f=e.images.edges[o])!=null&&f.node?c.jsx("img",{src:e.images.edges[o].node.url,alt:e.images.edges[o].node.altText??e.title,className:"w-full h-full object-cover"}):c.jsx("div",{className:"w-full h-full flex items-center justify-center text-brand-green text-xs uppercase tracking-[0.2em]",children:"No image"})}),e.images.edges.length>
4841&&c.jsx("div",{className:"grid grid-cols-5 gap-2",children:e.images.edges.map((y,m)=>c.jsx("button",{onClick:()=>l(m),className:`aspect-square rounded-sm overflow-hidden border ${o===m?"border-brand-green":"border-transparent"}`,children:c.jsx("img",{src:y.node.url,alt:"",className:"w-full h-full object-cover"})},m))})]}),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("h1",{className:"text-4xl md:text-5xl font-bold uppercase leading-[0.95]",children:e.title.replace(/pre[-\s]?order only/gi,"").trim()}),c.jsx("div",{className:"mt-5 flex items-center gap-4",children:c.jsxs("span",{className:"text-3xl font-bold",children:[h==null?void 0:h.price.currencyCode," ",parseFloat((h==null?void 0:h.price.amount)??"0").toFixed(2)]})}),c.jsx("p",{className:"mt-6 text-base text-secondary-foreground/80 leading-relaxed whitespace-pre-line",children:e.description.replace(/pre[-\s]?order only/gi,"").trim()}),e.variants.edges.length>1&&c.jsxs("div",{className:"mt-8",children:[c.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-secondary-foreground/60 mb-3",children:"Options"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:e.variants.edges.map(y=>c.jsx("button",{onClick:()=>a(y.node.id),disabled:!y.node.availableForSale,className:`px-4 py-2 text-sm uppercase tracking-wider border rounded-sm transition ${i===y.node.id?"border-brand-green bg-brand-green text-brand-black":"border-brand-green/30 hover:border-brand-green"} ${y.node.availableForSale?"":"opacity-40 line-through"}`,children:y.node.title},y.node.id))})]}),c.jsx(le,{onClick:()=>h&&u({product:{node:e},variantId:h.id,variantTitle:h.title,price:h.price,quantity:1,selectedOptions:h.selectedOptions||[]}
484),disabled:!h||d||!(h!=null&&h.availableForSale),size:"lg",className:"mt-8 w-full h-12 bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-[0.2em]",children:d?c.jsx(za,{className:"w-4 h-4 animate-spin"}):"Add to Cart"})]})]}):c.jsxs("div",{className:"container py-24 text-center",children:[c.jsx("p",{className:"text-2xl font-bold uppercase",children:"Product not found"}),c.jsx(le,{asChild:!0,className:"mt-6 bg-brand-green text-brand-black hover:bg-brand-green-glow",children:c.jsx(fe,{to:"/shop",children:"Back to Shop"})})]})]}),c.jsx(Ct,{})]})},GO=["XS","S","M","L","XL","XXL"],Wu=35,JO=()=>{const[t,e]=b.useState(null),[r,n]=b.useState(1),[s,i]=b.useState({firstName:"",lastName:"",email:"",phone:"",address:"",city:"",state:"",zip:"",cardName:"",cardNumber:"",cardExpiry:"",cardCvv:""}),[a,o]=b.useState(!1),l=(d,h)=>{i(p=>({...p,[d]:h}))},u=d=>{if(d.preventDefault(),!t){ql({title:"Pick a size",description:"Select a size before placing your order."});return}o(!0)};return a?c.jsxs("div",{className:"min-h-screen flex flex-col bg-brand-black text-secondary-foreground",children:[c.jsx(jt,{}),c.jsx("main",{className:"flex-1 flex items-center justify-center",children:c.jsxs("div",{className:"text-center px-6 max-w-lg",children:[c.jsx("div",{className:"mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-brand-green/20",children:c.jsx(tj,{className:"h-8 w-8 text-brand-green"})}),c.jsx("h1",{className:"text-3xl md:text-4xl font-bold uppercase leading-tight mb-4",children:"Order Received"}),c.jsxs("p",{className:"text-secondary-foreground/80 mb-8",children:["Thank you, ",s.firstName||"friend",". We have received your order for the Protect The Kind Tee",t?` (${t})`:""," × ",r,". You will receive a confirmation email at ",s.email||"the address provided"," shortly."]}),c.jsx(le,{asChild:!0,className:"bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-wider",children:c.jsx(fe,{to:"/",children:"Back to Home"})})]})}),c.jsx(Ct,{})]}):c.jsxs("div",{className:"min-h-screen flex flex-col bg-brand-black text-secondary-foreground",children:[c.jsx(jt,{}),c.jsxs("main",{className:"flex-1",children:[c.jsxs("div",{className:"container pt-8 pb-4 flex items-center gap-2 text-xs uppercase tracking-[0.2em] text-secondary-foreground/60",children:[c.jsx(fe,{to:"/",className:"hover:text-brand-green transition-smooth",children:"Home"}),c.jsx("span",{children:"/"}),c.jsx(fe,{to:"/shop",className:"hover:text-brand-green transition-smooth",children:"Shop"}),c.jsx("span",{children:"/"}),c.jsx("span",{className:"text-brand-green",children:"Order"})]}),c.jsxs("section",{className:"container pb-20 max-w-3xl mx-auto",children:[c.jsx("h1",{className:"text-3xl md:text-4xl font-bold uppercase leading-tight mb-2",children:"Complete Your Order"}),c.jsxs("p",{className:"text-sm text-secondary-foreground/60 uppercase tracking-wider mb-8",children:["Protect The Kind Tee — $",Wu," each"]}),c.jsxs("form",{onSubmit:u,className:"space-y-10",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx("h2",{className:"text-xs uppercase tracking-[0.2em] font-bold text-brand-green",children:"1. Size & Quantity"}),c.jsxs("div",{children:[c.jsx(Me,{className:"text-xs uppercase tracking-wider font-semibold mb-3 block",children:"Size"}),c.jsx("div",{className:"grid grid-cols-6 gap-2",children:GO.map(d=>c.jsx("button",{type:"button",onClick:()=>e(d),className:`h-12 text-sm font-bold uppercase tracking-wider rounded-sm border transition-smooth ${t===d?"bg-brand-green text-brand-black border-brand-green":"border-brand-green/30 text-secondary-foreground hover:border-brand-green hover:text-brand-green"}`,children:d},d))})]}),c.jsxs("div",{children:[c.jsx(Me,{className:"text-xs uppercase tracking-wider font-semibold mb-3 block",children:"Quantity"}),c.jsxs("div",{className:"inline-flex items-center border border-brand-green/30 rounded-sm",children:[c.jsx("button",{type:"button",onClick:()=>n(d=>Math.max(1,d-1)),className:"h-10 w-10 grid place-items-center text-secondary-foreground hover:text-brand-green transition-smooth",children:"−"}),c.jsx("span",{className:"w-10 text-center font-bold tabular-nums",children:r}),c.jsx("button",{type:"button",onClick:()=>n(d=>Math.min(10,d+1)),className:"h-10 w-10 grid place-items-center text-secondary-foreground hover:text-brand-green transition-smooth",children:"+"})]}),c.jsxs("span",{className:"ml-4 text-sm font-bold text-brand-green",children:["Total: $",Wu*r]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("h2",{className:"text-xs uppercase tracking-[0.2em] font-bold text-brand-green",children:"2. Shipping Information"}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"firstName",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"First Name"}),c.jsx(tt,{id:"firstName",value:s.firstName,onChange:d=>l("firstName",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"lastName",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Last Name"}),c.jsx(tt,{id:"lastName",value:s.lastName,onChange:d=>l("lastName",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"email",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Email"}),c.jsx(tt,{id:"email",type:"email",value:s.email,onChange:d=>l("email",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"phone",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Phone"}),c.jsx(tt,{id:"phone",type:"tel",value:s.phone,onChange:d=>l("phone",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{className:"sm:col-span-2",children:[c.jsx(Me,{htmlFor:"address",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Street Address"}),c.jsx(tt,{id:"address",value:s.address,onChange:d=>l("address",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"city",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"City"}),c.jsx(tt,{id:"city",value:s.city,onChange:d=>l("city",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"state",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"State"}),c.jsx(tt,{id:"state",value:s.state,onChange:d=>l("state",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"zip",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"ZIP"}),c.jsx(tt,{id:"zip",value:s.zip,onChange:d=>l("zip",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("h2",{className:"text-xs uppercase tracking-[0.2em] font-bold text-brand-green",children:"3. Payment Information"}
484),c.jsx("p",{className:"text-sm text-secondary-foreground/60",children:"Demo form — no real payment will be processed."}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs("div",{className:"sm:col-span-2",children:[c.jsx(Me,{htmlFor:"cardName",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Name on Card"}),c.jsx(tt,{id:"cardName",value:s.cardName,onChange:d=>l("cardName",d.target.value),required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{className:"sm:col-span-2",children:[c.jsx(Me,{htmlFor:"cardNumber",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Card Number"}),c.jsx(tt,{id:"cardNumber",value:s.cardNumber,onChange:d=>l("cardNumber",d.target.value),placeholder:"0000 0000 0000 0000",required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"cardExpiry",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"Expiry (MM/YY)"}),c.jsx(tt,{id:"cardExpiry",value:s.cardExpiry,onChange:d=>l("cardExpiry",d.target.value),placeholder:"MM/YY",required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]}),c.jsxs("div",{children:[c.jsx(Me,{htmlFor:"cardCvv",className:"text-xs uppercase tracking-wider font-semibold mb-2 block",children:"CVV"}),c.jsx(tt,{id:"cardCvv",type:"password",value:s.cardCvv,onChange:d=>l("cardCvv",d.target.value),placeholder:"123",required:!0,className:"bg-transparent border-brand-green/30 focus-visible:ring-brand-green"})]})]})]}),c.jsxs("div",{className:"pt-4 flex flex-col sm:flex-row gap-4 items-center",children:[c.jsxs(le,{type:"submit",size:"lg",className:"w-full sm:w-auto h-12 bg-brand-green text-brand-black hover:bg-brand-green-glow font-bold uppercase tracking-[0.2em] px-12",children:["Place Order · $",Wu*r]}),c.jsx(le,{asChild:!0,variant:"ghost",size:"lg",className:"text-secondary-foreground/60 hover:text-brand-green uppercase tracking-wider",children:c.jsxs(fe,{to:"/shop",children:[c.jsx(QE,{className:"h-4 w-4 mr-2"}),"Back to Shop"]})})]})]})]})]}),c.jsx(Ct,{})]})},QO=()=>{const t=co();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),c.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),c.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},ZO="https://lp.constantcontactpages.com/sl/KSAVtDn",YO=()=>{const[t,e]=b.useState(!1);return b.useEffect(()=>{if(typeof window>"u")return;const r=setTimeout(()=>e(!0),1200);return()=>clearTimeout(r)},[]),t?c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/70 p-4 animate-in fade-in duration-200",role:"dialog","aria-modal":"true","aria-label":"Join our mailing list",children:c.jsxs("div",{className:"relative w-full max-w-md bg-background border border-border shadow-2xl p-8",children:[c.jsx("button",{type:"button",onClick:()=>e(!1),"aria-label":"Close",className:"absolute -top-3 -right-3 z-10 inline-flex items-center justify-center h-9 w-9 rounded-full bg-background border border-border text-foreground hover:bg-muted transition-smooth shadow-md",children:c.jsx(Ac,{className:"h-5 w-5"})}),c.jsx("h2",{className:"text-2xl font-bold mb-3 text-foreground",children:"Join our mailing list"}),c.jsx("p",{className:"text-muted-foreground mb-6",children:"Stay connected with Endangered Kind. Sign up for updates, stories, and ways to get involved."}),c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsx(le,{asChild:!0,size:"lg",children:c.jsx("a",{href:ZO,target:"_blank",rel:"noopener noreferrer",onClick:()=>e(!1),children:"Sign up"})}),c.jsx("button",{type:"button",onClick:()=>e(!1),className:"text-sm text-muted-foreground hover:text-foreground transition-smooth",children:"Maybe later"})]})]})}):null};function XO(){const t=Ei(e=>e.syncCart);b.useEffect(()=>{t();const e=()=>{document.visibilityState==="visible"&&t()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[t])}const eI=new h_,tI=({children:t})=>(XO(),c.jsx(c.Fragment,{children:t})),rI=()=>c.jsx(p_,{client:eI,children:c.jsxs($N,{children:[c.jsx(lC,{}),c.jsx(GS,{}),c.jsx(hS,{children:c.jsxs(tI,{children:[c.jsx(YO,{}),c.jsxs(iS,{children:[c.jsx(ht,{path:"/",element:c.jsx(U2,{})}),c.jsx(ht,{path:"/our-founder",element:c.jsx(V2,{})}),c.jsx(ht,{path:"/what-we-do",element:c.jsx(X2,{})}),c.jsx(ht,{path:"/community-outreach",element:c.jsx(rR,{})}),c.jsx(ht,{path:"/violence-intervention",element:c.jsx(iR,{})}),c.jsx(ht,{path:"/community-capacity-building",element:c.jsx(lR,{})}),c.jsx(ht,{path:"/donate",element:c.jsx(uR,{})}),c.jsx(ht,{path:"/contact",element:c.jsx($O,{})}),c.jsx(ht,{path:"/in-the-news",element:c.jsx(VO,{})}),c.jsx(ht,{path:"/shop",element:c.jsx(qO,{})}),c.jsx(ht,{path:"/product/:handle",element:c.jsx(KO,{})}),c.jsx(ht,{path:"/order",element:c.jsx(JO,{})}),c.jsx(ht,{path:"*",element:c.jsx(QO,{})})]})]})})]})});x0(document.getElementById("root")).render(c.jsx(rI,{}));

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.