vendor: 4,691 bytes, lines 1-9
1var bp=t=>{throw TypeError(t)};var ou=(t,e,r)=>e.has(t)||bp("Cannot "+r);var R=(t,e,r)=>(ou(t,e,"read from private field"),r?r.call(t):e.get(t)),pe=(t,e,r)=>e.has(t)?bp("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ne=(t,e,r,n)=>(ou(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),st=(t,e,r)=>(ou(t,e,"access private method"),r);var Ra=(t,e,r,n)=>({set _(s){ne(t,e,s,r)},get _(){return R(t,e,n)}});function N_(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 o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).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 Pv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Av={exports:{}},yc={},Ov={exports:{}},le={};/** 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 pa=Symbol.for("react.element"),j_=Symbol.for("react.portal"),P_=Symbol.for("react.fragment"),A_=Symbol.for("react.strict_mode"),O_=Symbol.for("react.profiler"),I_=Symbol.for("react.provider"),L_=Symbol.for("react.context"),D_=Symbol.for("react.forward_ref"),$_=Symbol.for("react.suspense"),M_=Symbol.for("react.memo"),U_=Symbol.for("react.lazy"),_p=Symbol.iterator;function F_(t){return t===null||typeof t!="object"?null:(t=_p&&t[_p]||t["@@iterator"],typeof t=="function"?t:null)}var Iv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lv=Object.assign,Dv={};function Fi(t,e,r){this.props=t,this.context=e,this.refs=Dv,this.updater=r||Iv}Fi.prototype.isReactComponent={};Fi.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")};Fi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function $v(){}$v.prototype=Fi.prototype;function Lh(t,e,r){this.props=t,this.context=e,this.refs=Dv,this.updater=r||Iv}var Dh=Lh.prototype=new $v;Dh.constructor=Lh;Lv(Dh,Fi.prototype);Dh.isPureReactComponent=!0;var Sp=Array.isArray,Mv=Object.prototype.hasOwnProperty,$h={current:null},Uv={key:!0,ref:!0,__self:!0,__source:!0};function Fv(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)Mv.call(e,n)&&!Uv.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:pa,type:t,key:i,ref:o,props:s,_owner:$h.current}}function B_(t,e){return{$$typeof:pa,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Mh(t){return typeof t=="object"&&t!==null&&t.$$typeof===pa}function z_(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var kp=/\/+/g;function au(t,e){return typeof t=="object"&&t!==null&&t.key!=null?z_(""+t.key):e.toString(36)}function dl(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case pa:case j_:o=!0}}if(o)return o=t,s=s(o),t=n===""?"."+au(o,0):n,Sp(s)?(r="",t!=null&&(r=t.replace(kp,"$&/")+"/"),dl(s,e,r,"",function(c){return c})):s!=null&&(Mh(s)&&(s=B_(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(kp,"$&/")+"/")+t)),e.push(s)),1;if(o=0,n=n===""?".":n+":",Sp(t))for(var a=0;a<t.length;a++){i=t[a];var l=n+au(i,a);o+=dl(i,e,r,l,s)}
vendor: 4,235 bytes, lines 9-17
9else if(l=F_(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=n+au(i,a++),o+=dl(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 o}function Na(t,e,r){if(t==null)return t;var n=[],s=0;return dl(t,n,"","",function(i){return e.call(r,i,s++)}),n}function W_(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 pt={current:null},hl={transition:null},H_={ReactCurrentDispatcher:pt,ReactCurrentBatchConfig:hl,ReactCurrentOwner:$h};function Bv(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Na,forEach:function(t,e,r){Na(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Na(t,function(){e++}),e},toArray:function(t){return Na(t,function(e){return e})||[]},only:function(t){if(!Mh(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};le.Component=Fi;le.Fragment=P_;le.Profiler=O_;le.PureComponent=Lh;le.StrictMode=A_;le.Suspense=$_;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H_;le.act=Bv;le.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=Lv({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=$h.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Mv.call(e,l)&&!Uv.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:pa,type:t.type,key:s,ref:i,props:n,_owner:o}};le.createContext=function(t){return t={$$typeof:L_,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:I_,_context:t},t.Consumer=t};le.createElement=Fv;le.createFactory=function(t){var e=Fv.bind(null,t);return e.type=t,e};le.createRef=function(){return{current:null}};le.forwardRef=function(t){return{$$typeof:D_,render:t}};le.isValidElement=Mh;le.lazy=function(t){return{$$typeof:U_,_payload:{_status:-1,_result:t},_init:W_}};le.memo=function(t,e){return{$$typeof:M_,type:t,compare:e===void 0?null:e}};le.startTransition=function(t){var e=hl.transition;hl.transition={};try{t()}finally{hl.transition=e}};le.unstable_act=Bv;le.useCallback=function(t,e){return pt.current.useCallback(t,e)};le.useContext=function(t){return pt.current.useContext(t)};le.useDebugValue=function(){};le.useDeferredValue=function(t){return pt.current.useDeferredValue(t)};le.useEffect=function(t,e){return pt.current.useEffect(t,e)};le.useId=function(){return pt.current.useId()};le.useImperativeHandle=function(t,e,r){return pt.current.useImperativeHandle(t,e,r)};le.useInsertionEffect=function(t,e){return pt.current.useInsertionEffect(t,e)};le.useLayoutEffect=function(t,e){return pt.current.useLayoutEffect(t,e)};le.useMemo=function(t,e){return pt.current.useMemo(t,e)};le.useReducer=function(t,e,r){return pt.current.useReducer(t,e,r)};le.useRef=function(t){return pt.current.useRef(t)};le.useState=function(t){return pt.current.useState(t)};le.useSyncExternalStore=function(t,e,r){return pt.current.useSyncExternalStore(t,e,r)};le.useTransition=function(){return pt.current.useTransition()};le.version="18.3.1";Ov.exports=le;var y=Ov.exports;const I=Pv(y),Uh=N_({__proto__:null,default:I},[y]);/** 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 V_=y,q_=Symbol.for("react.element"),K_=Symbol.for("react.fragment"),G_=Object.prototype.hasOwnProperty,J_=V_.__SECRET_INT
vendor: 11,413 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Y_={key:!0,ref:!0,__self:!0,__source:!0};function zv(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)G_.call(e,n)&&!Y_.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:q_,type:t,key:i,ref:o,props:s,_owner:J_.current}}yc.Fragment=K_;yc.jsx=zv;yc.jsxs=zv;Av.exports=yc;var d=Av.exports,Wv={exports:{}},It={},Hv={exports:{}},Vv={};/** 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 $=C.length;C.push(N);e:for(;0<$;){var Z=$-1>>>1,q=C[Z];if(0<s(q,N))C[Z]=N,C[$]=q,$=Z;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],$=C.pop();if($!==N){C[0]=$;e:for(var Z=0,q=C.length,se=q>>>1;Z<se;){var te=2*(Z+1)-1,Se=C[te],Ie=te+1,M=C[Ie];if(0>s(Se,$))Ie<q&&0>s(M,Se)?(C[Z]=M,C[Ie]=$,Z=Ie):(C[Z]=Se,C[te]=$,Z=te);else if(Ie<q&&0>s(M,$))C[Z]=M,C[Ie]=$,Z=Ie;else break e}}return N}function s(C,N){var $=C.sortIndex-N.sortIndex;return $!==0?$:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,p=3,f=!1,b=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,w=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 v(C){for(var N=r(c);N!==null;){if(N.callback===null)n(c);else if(N.startTime<=C)n(c),N.sortIndex=N.expirationTime,e(l,N);else break;N=r(c)}}function _(C){if(m=!1,v(C),!b)if(r(l)!==null)b=!0,W(S);else{var N=r(c);N!==null&&G(_,N.startTime-C)}}function S(C,N){b=!1,m&&(m=!1,w(T),T=-1),f=!0;var $=p;try{for(v(N),h=r(l);h!==null&&(!(h.expirationTime>N)||C&&!V());){var Z=h.callback;if(typeof Z=="function"){h.callback=null,p=h.priorityLevel;var q=Z(h.expirationTime<=N);N=t.unstable_now(),typeof q=="function"?h.callback=q:h===r(l)&&n(l),v(N)}else n(l);h=r(l)}if(h!==null)var se=!0;else{var te=r(c);te!==null&&G(_,te.startTime-N),se=!1}return se}finally{h=null,p=$,f=!1}}var k=!1,E=null,T=-1,j=5,A=-1;function V(){return!(t.unstable_now()-A<j)}function D(){if(E!==null){var C=t.unstable_now();A=C;var N=!0;try{N=E(!0,C)}finally{N?J():(k=!1,E=null)}}else k=!1}var J;if(typeof g=="function")J=function(){g(D)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,Q=L.port2;L.port1.onmessage=D,J=function(){Q.postMessage(null)}}else J=function(){x(D,0)};function W(C){E=C,k||(k=!0,J())}function G(C,N){T=x(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(){b||f||(b=!0,W(S))},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"):j=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 $=p;p=N;try{return C()}finally{p=$}},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 $=p;p=C;try{return N()}finally{p=$}},t.unstable_scheduleCallback=function(C,N,$){var Z=t.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Z+$:Z):$=Z,C){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,C={id:u++,callback:N,priorityLevel:C,startTime:$,expirationTime:q,sortIndex:-1},$>Z?(C.sortIndex=$,e(c,C),r(l)===null&&C===r(c)&&(m?(w(T),T=-1):m=!0,G(_,$-Z))):(C.sortIndex=q,e(l,C),b||f||(b=!0,W(S))),C},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(C){var N=p;return function(){var $=p;p=N;try{return C.apply(this,arguments)}finally{p=$}}}})(Vv);Hv.exports=Vv;var Z_=Hv.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 Q_=y,At=Z_;function P(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 qv=new Set,Oo={};function _s(t,e){ki(t,e),ki(t+"Capture",e)}function ki(t,e){for(Oo[t]=e,t=0;t<e.length;t++)qv.add(e[t])}var zr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ed=Object.prototype.hasOwnProperty,X_=/^[: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]*$/,Ep={},Cp={};function e1(t){return ed.call(Cp,t)?!0:ed.call(Ep,t)?!1:X_.test(t)?Cp[t]=!0:(Ep[t]=!0,!1)}function t1(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 r1(t,e,r,n){if(e===null||typeof e>"u"||t1(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 mt(t,e,r,n,s,i,o){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=o}var tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){tt[t]=new mt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];tt[e]=new mt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){tt[t]=new mt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){tt[t]=new mt(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){tt[t]=new mt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){tt[t]=new mt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){tt[t]=new mt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){tt[t]=new mt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){tt[t]=new mt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Fh=/[\-:]([a-z])/g;function Bh(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(Fh,Bh);tt[e]=new mt(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(Fh,Bh);tt[e]=new mt(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(Fh,Bh);tt[e]=new mt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){tt[t]=new mt(t,1,!1,t.toLowerCase(),null,!1,!1)});tt.xlinkHref=new mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){tt[t]=new mt(t,1,!1,t.toLowerCase(),null,!0,!0)});function zh(t,e,r,n){var s=tt.hasOwnProperty(e)?tt[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(r1(e,r,s,n)&&(r=null),n||s===null?e1(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 Jr=Q_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ja=Symbol.for("react.element"),qs=Symbol.for("react.portal"),Ks=Symbol.for("react.fragment"),Wh=Symbol.for("react.strict_mode"),td=Symbol.for("react.profiler"),Kv=Symbol.for("react.provider"),Gv=Symbol.for("react.context"),Hh=Symbol.for("react.forward_ref"),rd=Symbol.for("react.suspense"),nd=Symbol.for("react.suspense_list"),Vh=Symbol.for("react.memo"),an=Symbol.for("react.lazy"),Jv=Symbol.for("react.offscreen"),Tp=Symbol.iterator;function eo(t){return t===null||typeof t!="object"?null:(t=Tp&&t[Tp]||t["@@iterator"],typeof t=="function"?t:null)}var Oe=Object.assign,lu;function ho(t){if(lu===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);lu=e&&e[1]||""}return` 34`+lu+t}var cu=!1;function uu(t,e){if(!t||cu)return"";cu=!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(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}
vendor: 16,737 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=n.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{cu=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ho(t):""}function n1(t){switch(t.tag){case 5:return ho(t.type);case 16:return ho("Lazy");case 13:return ho("Suspense");case 19:return ho("SuspenseList");case 0:case 2:case 15:return t=uu(t.type,!1),t;case 11:return t=uu(t.type.render,!1),t;case 1:return t=uu(t.type,!0),t;default:return""}}function sd(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 Ks:return"Fragment";case qs:return"Portal";case td:return"Profiler";case Wh:return"StrictMode";case rd:return"Suspense";case nd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Gv:return(t.displayName||"Context")+".Consumer";case Kv:return(t._context.displayName||"Context")+".Provider";case Hh:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Vh:return e=t.displayName||null,e!==null?e:sd(t.type)||"Memo";case an:e=t._payload,t=t._init;try{return sd(t(e))}catch{}}return null}function s1(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 sd(e);case 8:return e===Wh?"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 On(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Yv(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function i1(t){var e=Yv(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(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Pa(t){t._valueTracker||(t._valueTracker=i1(t))}function Zv(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Yv(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Nl(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 id(t,e){var r=e.checked;return Oe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Rp(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=On(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 Qv(t,e){e=e.checked,e!=null&&zh(t,"checked",e,!1)}function od(t,e){Qv(t,e);var r=On(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")?ad(t,e.type,r):e.hasOwnProperty("defaultValue")&&ad(t,e.type,On(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Np(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 ad(t,e,r){(e!=="number"||Nl(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var fo=Array.isArray;function ii(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=""+On(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 ld(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(P(91));return Oe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function jp(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(P(92));if(fo(r)){if(1<r.length)throw Error(P(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:On(r)}}function Xv(t,e){var r=On(e.value),n=On(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 Pp(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function ey(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 cd(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?ey(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Aa,ty=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(Aa=Aa||document.createElement("div"),Aa.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Aa.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Io(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var xo={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},o1=["Webkit","ms","Moz","O"];Object.keys(xo).forEach(function(t){o1.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),xo[e]=xo[t]})});function ry(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||xo.hasOwnProperty(t)&&xo[t]?(""+e).trim():e+"px"}function ny(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=ry(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var a1=Oe({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 ud(t,e){if(e){if(a1[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(P(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(P(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(P(61))}if(e.style!=null&&typeof e.style!="object")throw Error(P(62))}}function dd(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 hd=null;function qh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var fd=null,oi=null,ai=null;function Ap(t){if(t=va(t)){if(typeof fd!="function")throw Error(P(280));var e=t.stateNode;e&&(e=Sc(e),fd(t.stateNode,t.type,e))}}function sy(t){oi?ai?ai.push(t):ai=[t]:oi=t}function iy(){if(oi){var t=oi,e=ai;if(ai=oi=null,Ap(t),e)for(t=0;t<e.length;t++)Ap(e[t])}}function oy(t,e){return t(e)}function ay(){}var du=!1;function ly(t,e,r){if(du)return t(e,r);du=!0;try{return oy(t,e,r)}finally{du=!1,(oi!==null||ai!==null)&&(ay(),iy())}}function Lo(t,e){var r=t.stateNode;if(r===null)return null;var n=Sc(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(P(231,e,typeof r));return r}var pd=!1;if(zr)try{var to={};Object.defineProperty(to,"passive",{get:function(){pd=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{pd=!1}function l1(t,e,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(u){this.onError(u)}}var bo=!1,jl=null,Pl=!1,md=null,c1={onError:function(t){bo=!0,jl=t}};function u1(t,e,r,n,s,i,o,a,l){bo=!1,jl=null,l1.apply(c1,arguments)}function d1(t,e,r,n,s,i,o,a,l){if(u1.apply(this,arguments),bo){if(bo){var c=jl;bo=!1,jl=null}else throw Error(P(198));Pl||(Pl=!0,md=c)}}function Ss(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 cy(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 Op(t){if(Ss(t)!==t)throw Error(P(188))}function h1(t){var e=t.alternate;if(!e){if(e=Ss(t),e===null)throw Error(P(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 Op(s),t;if(i===n)return Op(s),e;i=i.sibling}throw Error(P(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?t:e}function uy(t){return t=h1(t),t!==null?dy(t):null}function dy(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=dy(t);if(e!==null)return e;t=t.sibling}return null}var hy=At.unstable_scheduleCallback,Ip=At.unstable_cancelCallback,f1=At.unstable_shouldYield,p1=At.unstable_requestPaint,Fe=At.unstable_now,m1=At.unstable_getCurrentPriorityLevel,Kh=At.unstable_ImmediatePriority,fy=At.unstable_UserBlockingPriority,Al=At.unstable_NormalPriority,g1=At.unstable_LowPriority,py=At.unstable_IdlePriority,wc=null,Er=null;function v1(t){if(Er&&typeof Er.onCommitFiberRoot=="function")try{Er.onCommitFiberRoot(wc,t,void 0,(t.current.flags&128)===128)}catch{}}var ar=Math.clz32?Math.clz32:x1,y1=Math.log,w1=Math.LN2;function x1(t){return t>>>=0,t===0?32:31-(y1(t)/w1|0)|0}var Oa=64,Ia=4194304;function po(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 Ol(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=po(a):(i&=o,i!==0&&(n=po(i)))}else o=r&~s,o!==0?n=po(o):i!==0&&(n=po(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-ar(e),s=1<<r,n|=t[r],e&=~s;return n}function b1(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 _1(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-ar(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=b1(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function gd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function my(){var t=Oa;return Oa<<=1,!(Oa&4194240)&&(Oa=64),t}function hu(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function ma(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ar(e),t[e]=r}function S1(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-ar(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function Gh(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-ar(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var we=0;function gy(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var vy,Jh,yy,wy,xy,vd=!1,La=[],Sn=null,kn=null,En=null,Do=new Map,$o=new Map,un=[],k1="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":Sn=null;break;case"dragenter":case"dragleave":kn=null;break;case"mouseover":case"mouseout":En=null;break;case"pointerover":case"pointerout":Do.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(e.pointerId)}}function ro(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=va(e),e!==null&&Jh(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function E1(t,e,r,n,s){switch(e){case"focusin":return Sn=ro(Sn,t,e,r,n,s),!0;case"dragenter":return kn=ro(kn,t,e,r,n,s),!0;case"mouseover":return En=ro(En,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return Do.set(i,ro(Do.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,$o.set(i,ro($o.get(i)||null,t,e,r,n,s)),!0}return!1}function by(t){var e=es(t.target);if(e!==null){var r=Ss(e);if(r!==null){if(e=r.tag,e===13){if(e=cy(r),e!==null){t.blockedOn=e,xy(t.priority,function(){yy(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 fl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=yd(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);hd=n,r.target.dispatchEvent(n),hd=null}else return e=va(r),e!==null&&Jh(e),t.blockedOn=r,!1;e.shift()}return!0}function Dp(t,e,r){fl(t)&&r.delete(e)}function C1(){vd=!1,Sn!==null&&fl(Sn)&&(Sn=null),kn!==null&&fl(kn)&&(kn=null),En!==null&&fl(En)&&(En=null),Do.forEac
vendor: 11,841 bytes, line 37
37h(Dp),$o.forEach(Dp)}function no(t,e){t.blockedOn===e&&(t.blockedOn=null,vd||(vd=!0,At.unstable_scheduleCallback(At.unstable_NormalPriority,C1)))}function Mo(t){function e(s){return no(s,t)}if(0<La.length){no(La[0],t);for(var r=1;r<La.length;r++){var n=La[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Sn!==null&&no(Sn,t),kn!==null&&no(kn,t),En!==null&&no(En,t),Do.forEach(e),$o.forEach(e),r=0;r<un.length;r++)n=un[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<un.length&&(r=un[0],r.blockedOn===null);)by(r),r.blockedOn===null&&un.shift()}var li=Jr.ReactCurrentBatchConfig,Il=!0;function T1(t,e,r,n){var s=we,i=li.transition;li.transition=null;try{we=1,Yh(t,e,r,n)}finally{we=s,li.transition=i}}function R1(t,e,r,n){var s=we,i=li.transition;li.transition=null;try{we=4,Yh(t,e,r,n)}finally{we=s,li.transition=i}}function Yh(t,e,r,n){if(Il){var s=yd(t,e,r,n);if(s===null)_u(t,e,n,Ll,r),Lp(t,n);else if(E1(s,t,e,r,n))n.stopPropagation();else if(Lp(t,n),e&4&&-1<k1.indexOf(t)){for(;s!==null;){var i=va(s);if(i!==null&&vy(i),i=yd(t,e,r,n),i===null&&_u(t,e,n,Ll,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else _u(t,e,n,null,r)}}var Ll=null;function yd(t,e,r,n){if(Ll=null,t=qh(n),t=es(t),t!==null)if(e=Ss(t),e===null)t=null;else if(r=e.tag,r===13){if(t=cy(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 Ll=t,null}function _y(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(m1()){case Kh:return 1;case fy:return 4;case Al:case g1:return 16;case py:return 536870912;default:return 16}default:return 16}}var wn=null,Zh=null,pl=null;function Sy(){if(pl)return pl;var t,e=Zh,r=e.length,n,s="value"in wn?wn.value:wn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===s[i-n];n++);return pl=s.slice(t,1<n?1-n:void 0)}function ml(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 Da(){return!0}function $p(){return!1}function Lt(t){function e(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Da:$p,this.isPropagationStopped=$p,this}return Oe(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=Da)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Da)},persist:function(){},isPersistent:Da}),e}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qh=Lt(Bi),ga=Oe({},Bi,{view:0,detail:0}),N1=Lt(ga),fu,pu,so,xc=Oe({},ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xh,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!==so&&(so&&t.type==="mousemove"?(fu=t.screenX-so.screenX,pu=t.screenY-so.screenY):pu=fu=0,so=t),fu)},movementY:function(t){return"movementY"in t?t.movementY:pu}}),Mp=Lt(xc),j1=Oe({},xc,{dataTransfer:0}),P1=Lt(j1),A1=Oe({},ga,{relatedTarget:0}),mu=Lt(A1),O1=Oe({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),I1=Lt(O1),L1=Oe({},Bi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),D1=Lt(L1),$1=Oe({},Bi,{data:0}),Up=Lt($1),M1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},U1={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"},F1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B1(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=F1[t])?!!e[t]:!1}function Xh(){return B1}var z1=Oe({},ga,{key:function(t){if(t.key){var e=M1[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ml(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?U1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xh,charCode:function(t){return t.type==="keypress"?ml(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ml(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),W1=Lt(z1),H1=Oe({},xc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fp=Lt(H1),V1=Oe({},ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xh}),q1=Lt(V1),K1=Oe({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),G1=Lt(K1),J1=Oe({},xc,{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}),Y1=Lt(J1),Z1=[9,13,27,32],ef=zr&&"CompositionEvent"in window,_o=null;zr&&"documentMode"in document&&(_o=document.documentMode);var Q1=zr&&"TextEvent"in window&&!_o,ky=zr&&(!ef||_o&&8<_o&&11>=_o),Bp=" ",zp=!1;function Ey(t,e){switch(t){case"keyup":return Z1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Gs=!1;function X1(t,e){switch(t){case"compositionend":return Cy(e);case"keypress":return e.which!==32?null:(zp=!0,Bp);case"textInput":return t=e.data,t===Bp&&zp?null:t;default:return null}}function eS(t,e){if(Gs)return t==="compositionend"||!ef&&Ey(t,e)?(t=Sy(),pl=Zh=wn=null,Gs=!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 ky&&e.locale!=="ko"?null:e.data;default:return null}}var tS={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 Wp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!tS[t.type]:e==="textarea"}function Ty(t,e,r,n){sy(n),e=Dl(e,"onChange"),0<e.length&&(r=new Qh("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var So=null,Uo=null;function rS(t){My(t,0)}function bc(t){var e=Zs(t);if(Zv(e))return t}function nS(t,e){if(t==="change")return e}var Ry=!1;if(zr){var gu;if(zr){var vu="oninput"in document;if(!vu){var Hp=document.createElement("div");Hp.setAttribute("oninput","return;"),vu=typeof Hp.oninput=="function"}gu=vu}else gu=!1;Ry=gu&&(!document.documentMode||9<document.documentMode)}function Vp(){So&&(So.detachEvent("onpropertychange",Ny),Uo=So=null)}function Ny(t){if(t.propertyName==="value"&&bc(Uo)){var e=[];Ty(e,Uo,t,qh(t)),ly(rS,e)}}function sS(t,e,r){t==="focusin"?(Vp(),So=e,Uo=r,So.attachEvent("onpropertychange",Ny)):t==="focusout"&&Vp()}function iS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return bc(Uo)}function oS(t,e){if(t==="click")return bc(e)}function aS(t,e){if(t==="input"||t==="change")return bc(e)}function lS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var cr=typeof Object.is=="function"?Object.is:lS;function Fo(t,e){if(cr(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(!ed.call(e,s)||!cr(t[s],e[s]))return!1}return!0}function qp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Kp(t,e){var r=qp(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=qp(r)}}function jy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Py(){for(var t=window,e=Nl();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Nl(t.document)}return e}function tf(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 cS(t){var e=Py(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&jy(r.ownerDocument.documentElement,r)){if(n!==null&&tf(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=Kp(r,i);var o=Kp(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.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 uS=zr&&"documentMode"in document&&11>=document.documentMode,Js=null,wd=null,ko=null,xd=!1;function Gp(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;xd||Js==null||Js!==Nl(n)||(n=Js,"selectionStart"in n&&tf(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),ko&&Fo(ko,n)||(ko=n,n=Dl(wd,"onSelect"),0<n.length&&(e=new Qh("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Js)))}function $a(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Ys={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionend:$a("Transition","TransitionEnd")},yu={},Ay={};zr&&(Ay=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function _c(t){if(yu[t])return yu[t];if(!Ys[t])return t;var e=Ys[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in Ay)return yu[t]=e[r];return t}var Oy=_c("animationend"),Iy=_c("animationiteration"),Ly=_c("animationstart"),Dy=_c("transitionend"),$y=new Map,Jp="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 Un(t,e){$y.set(t,e),_s(e,[t])}for(var wu=0;wu<Jp.length;wu++){var xu=Jp[wu],dS=xu.toLowerCase(),hS=xu[0].toUpperCase()+xu.slice(1);Un(dS,"on"+hS)}Un(Oy,"onAnimationEnd");Un(Iy,"onAnimationIteration");Un(Ly,"onAnimationStart");Un("dblclick","onDoubleClick");Un("focusin","onFocus");Un("focusout","onBlur");Un(Dy,"onTransitionEnd");ki("onMouseEnter",["mouseout","mouseover"]);ki("onMouseLeave",["mouseout","mouseover"]);ki("onPointerEnter",["pointerout","pointerover"]);ki("onPointerLeave",["pointerout","pointerover"]);_s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_s("onBeforeInput",["compositionend","keypress","textInput","paste"]);_s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),fS=new Set("cancel close invalid load scroll toggle".split(" ").concat(mo));function Yp(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,d1(n,e,void 0,t),t.currentTarget=null}function My(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 o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Yp(s,a,c),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Yp(s,a,c),i=l}}}if(Pl)throw t=md,Pl=!1,md=null,t}function Ee(t,e){var r=e[Ed];r===void 0&&(r=e[Ed]=new Set);var n=t+"__bubble";r.has(n)||(Uy(e,t,2,!1),r.add(n))}function bu(t,e,r){var n=0;e&&(n|=4),Uy(r,t,n,e)}var Ma="_reactListening"+Math.random().toString(36).slice(2);function Bo(t){if(!t[Ma]){t[Ma]=!0,qv.forEach(function(r){r!=="selectionchange"&&(fS.has(r)||bu(r,!1,t),bu(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ma]||(e[Ma]=!0,bu("selectionchange",!1,e))}}function Uy(t,e,r,n){switch(_y(e)){case 1:var s=T1;break;case 4:s=R1;break;default:s=Yh}r=s.bind(null,e,r,t),s=void 0,!pd||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 _u(t,e,r,n,s){var i=n;
vendor: 5,434 bytes, lines 37-38
37if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=es(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}ly(function(){var c=i,u=qh(r),h=[];e:{var p=$y.get(t);if(p!==void 0){var f=Qh,b=t;switch(t){case"keypress":if(ml(r)===0)break e;case"keydown":case"keyup":f=W1;break;case"focusin":b="focus",f=mu;break;case"focusout":b="blur",f=mu;break;case"beforeblur":case"afterblur":f=mu;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=Mp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=P1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=q1;break;case Oy:case Iy:case Ly:f=I1;break;case Dy:f=G1;break;case"scroll":f=N1;break;case"wheel":f=Y1;break;case"copy":case"cut":case"paste":f=D1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Fp}var m=(e&4)!==0,x=!m&&t==="scroll",w=m?p!==null?p+"Capture":null:p;m=[];for(var g=c,v;g!==null;){v=g;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,w!==null&&(_=Lo(g,w),_!=null&&m.push(zo(g,_,v)))),x)break;g=g.return}0<m.length&&(p=new f(p,b,null,r,u),h.push({event:p,listeners:m}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",p&&r!==hd&&(b=r.relatedTarget||r.fromElement)&&(es(b)||b[Wr]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(b=r.relatedTarget||r.toElement,f=c,b=b?es(b):null,b!==null&&(x=Ss(b),b!==x||b.tag!==5&&b.tag!==6)&&(b=null)):(f=null,b=c),f!==b)){if(m=Mp,_="onMouseLeave",w="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(m=Fp,_="onPointerLeave",w="onPointerEnter",g="pointer"),x=f==null?p:Zs(f),v=b==null?p:Zs(b),p=new m(_,g+"leave",f,r,u),p.target=x,p.relatedTarget=v,_=null,es(u)===c&&(m=new m(w,g+"enter",b,r,u),m.target=v,m.relatedTarget=x,_=m),x=_,f&&b)t:{for(m=f,w=b,g=0,v=m;v;v=Ps(v))g++;for(v=0,_=w;_;_=Ps(_))v++;for(;0<g-v;)m=Ps(m),g--;for(;0<v-g;)w=Ps(w),v--;for(;g--;){if(m===w||w!==null&&m===w.alternate)break t;m=Ps(m),w=Ps(w)}m=null}else m=null;f!==null&&Zp(h,p,f,m,!1),b!==null&&x!==null&&Zp(h,x,b,m,!0)}}e:{if(p=c?Zs(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var S=nS;else if(Wp(p))if(Ry)S=aS;else{S=iS;var k=sS}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=oS);if(S&&(S=S(t,c))){Ty(h,S,r,u);break e}k&&k(t,p,c),t==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&ad(p,"number",p.value)}switch(k=c?Zs(c):window,t){case"focusin":(Wp(k)||k.contentEditable==="true")&&(Js=k,wd=c,ko=null);break;case"focusout":ko=wd=Js=null;break;case"mousedown":xd=!0;break;case"contextmenu":case"mouseup":case"dragend":xd=!1,Gp(h,r,u);break;case"selectionchange":if(uS)break;case"keydown":case"keyup":Gp(h,r,u)}var E;if(ef)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 Gs?Ey(t,r)&&(T="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(ky&&r.locale!=="ko"&&(Gs||T!=="onCompositionStart"?T==="onCompositionEnd"&&Gs&&(E=Sy()):(wn=u,Zh="value"in wn?wn.value:wn.textContent,Gs=!0)),k=Dl(c,T),0<k.length&&(T=new Up(T,t,null,r,u),h.push({event:T,listeners:k}),E?T.data=E:(E=Cy(r),E!==null&&(T.data=E)))),(E=Q1?X1(t,r):eS(t,r))&&(c=Dl(c,"onBeforeInput"),0<c.length&&(u=new Up("onBeforeInput","beforeinput",null,r,u),h.push({event:u,listeners:c}),u.data=E))}My(h,e)})}function zo(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Dl(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Lo(t,r),i!=null&&n.unshift(zo(t,i,s)),i=Lo(t,e),i!=null&&n.push(zo(t,i,s))),t=t.return}return n}function Ps(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Zp(t,e,r,n,s){for(var i=e._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=Lo(r,i),l!=null&&o.unshift(zo(r,l,a))):s||(l=Lo(r,i),l!=null&&o.push(zo(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var pS=/\r\n?/g,mS=/\u0000|\uFFFD/g;function Qp(t){return(typeof t=="string"?t:""+t).replace(pS,` 38`).replace(mS,"")}function Ua(t,e,r){if(e=Qp(e),Qp(t)!==e&&r)throw Error(P(425))}function $l(){}var bd=null,_d=null;function Sd(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 kd=typeof setTimeout=="function"?setTimeout:void 0,gS=typeof clearTimeout=="function"?clearTimeout:void 0,Xp=typeof Promise=="function"?Promise:void 0,vS=typeof queueMicrotask=="function"?queueMicrotask:typeof Xp<"u"?function(t){return Xp.resolve(null).then(t).cat
vendor: 4,824 bytes, line 38
38ch(yS)}:kd;function yS(t){setTimeout(function(){throw t})}function Su(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),Mo(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Mo(e)}function Cn(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 em(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 zi=Math.random().toString(36).slice(2),_r="__reactFiber$"+zi,Wo="__reactProps$"+zi,Wr="__reactContainer$"+zi,Ed="__reactEvents$"+zi,wS="__reactListeners$"+zi,xS="__reactHandles$"+zi;function es(t){var e=t[_r];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Wr]||r[_r]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=em(t);t!==null;){if(r=t[_r])return r;t=em(t)}return e}t=r,r=t.parentNode}return null}function va(t){return t=t[_r]||t[Wr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Zs(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(P(33))}function Sc(t){return t[Wo]||null}var Cd=[],Qs=-1;function Fn(t){return{current:t}}function Ce(t){0>Qs||(t.current=Cd[Qs],Cd[Qs]=null,Qs--)}function _e(t,e){Qs++,Cd[Qs]=t.current,t.current=e}var In={},ct=Fn(In),bt=Fn(!1),hs=In;function Ei(t,e){var r=t.type.contextTypes;if(!r)return In;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 _t(t){return t=t.childContextTypes,t!=null}function Ml(){Ce(bt),Ce(ct)}function tm(t,e,r){if(ct.current!==In)throw Error(P(168));_e(ct,e),_e(bt,r)}function Fy(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(P(108,s1(t)||"Unknown",s));return Oe({},r,n)}function Ul(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||In,hs=ct.current,_e(ct,t),_e(bt,bt.current),!0}function rm(t,e,r){var n=t.stateNode;if(!n)throw Error(P(169));r?(t=Fy(t,e,hs),n.__reactInternalMemoizedMergedChildContext=t,Ce(bt),Ce(ct),_e(ct,t)):Ce(bt),_e(bt,r)}var $r=null,kc=!1,ku=!1;function By(t){$r===null?$r=[t]:$r.push(t)}function bS(t){kc=!0,By(t)}function Bn(){if(!ku&&$r!==null){ku=!0;var t=0,e=we;try{var r=$r;for(we=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}$r=null,kc=!1}catch(s){throw $r!==null&&($r=$r.slice(t+1)),hy(Kh,Bn),s}finally{we=e,ku=!1}}return null}var Xs=[],ei=0,Fl=null,Bl=0,Ut=[],Ft=0,fs=null,Ur=1,Fr="";function Yn(t,e){Xs[ei++]=Bl,Xs[ei++]=Fl,Fl=t,Bl=e}function zy(t,e,r){Ut[Ft++]=Ur,Ut[Ft++]=Fr,Ut[Ft++]=fs,fs=t;var n=Ur;t=Fr;var s=32-ar(n)-1;n&=~(1<<s),r+=1;var i=32-ar(e)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Ur=1<<32-ar(e)+s|r<<s|n,Fr=i+t}else Ur=1<<i|r<<s|n,Fr=t}function rf(t){t.return!==null&&(Yn(t,1),zy(t,1,0))}function nf(t){for(;t===Fl;)Fl=Xs[--ei],Xs[ei]=null,Bl=Xs[--ei],Xs[ei]=null;for(;t===fs;)fs=Ut[--Ft],Ut[Ft]=null,Fr=Ut[--Ft],Ut[Ft]=null,Ur=Ut[--Ft],Ut[Ft]=null}var jt=null,Nt=null,Ne=!1,ir=null;function Wy(t,e){var r=Bt(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 nm(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,jt=t,Nt=Cn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,jt=t,Nt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=fs!==null?{id:Ur,overflow:Fr}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Bt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,jt=t,Nt=null,!0):!1;default:return!1}}function Td(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Rd(t){if(Ne){var e=Nt;if(e){var r=e;if(!nm(t,e)){if(Td(t))throw Error(P(418));e=Cn(r.nextSibling);var n=jt;e&&nm(t,e)?Wy(n,r):(t.flags=t.flags&-4097|2,Ne=!1,jt=t)}}else{if(Td(t))throw Error(P(418));t.flags=t.flags&-4097|2,Ne=!1,jt=t}}}function sm(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;jt=t}function Fa(t){if(t!==jt)return!1;if(!Ne)return sm(t),Ne=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Sd(t.type,t.memoizedProps)),e&&(e=Nt)){if(Td(t))throw Hy(),Error(P(418));for(;e;)Wy(t,e),e=Cn(e.nextSibling)}if(sm(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(P(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 10,279 bytes, line 38
38){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Nt=Cn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Nt=null}}else Nt=jt?Cn(t.stateNode.nextSibling):null;return!0}function Hy(){for(var t=Nt;t;)t=Cn(t.nextSibling)}function Ci(){Nt=jt=null,Ne=!1}function sf(t){ir===null?ir=[t]:ir.push(t)}var _S=Jr.ReactCurrentBatchConfig;function io(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(P(309));var n=r.stateNode}if(!n)throw Error(P(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(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,t))}return t}function Ba(t,e){throw t=Object.prototype.toString.call(e),Error(P(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function im(t){var e=t._init;return e(t._payload)}function Vy(t){function e(w,g){if(t){var v=w.deletions;v===null?(w.deletions=[g],w.flags|=16):v.push(g)}}function r(w,g){if(!t)return null;for(;g!==null;)e(w,g),g=g.sibling;return null}function n(w,g){for(w=new Map;g!==null;)g.key!==null?w.set(g.key,g):w.set(g.index,g),g=g.sibling;return w}function s(w,g){return w=jn(w,g),w.index=0,w.sibling=null,w}function i(w,g,v){return w.index=v,t?(v=w.alternate,v!==null?(v=v.index,v<g?(w.flags|=2,g):v):(w.flags|=2,g)):(w.flags|=1048576,g)}function o(w){return t&&w.alternate===null&&(w.flags|=2),w}function a(w,g,v,_){return g===null||g.tag!==6?(g=Pu(v,w.mode,_),g.return=w,g):(g=s(g,v),g.return=w,g)}function l(w,g,v,_){var S=v.type;return S===Ks?u(w,g,v.props.children,_,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===an&&im(S)===g.type)?(_=s(g,v.props),_.ref=io(w,g,v),_.return=w,_):(_=_l(v.type,v.key,v.props,null,w.mode,_),_.ref=io(w,g,v),_.return=w,_)}function c(w,g,v,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Au(v,w.mode,_),g.return=w,g):(g=s(g,v.children||[]),g.return=w,g)}function u(w,g,v,_,S){return g===null||g.tag!==7?(g=ds(v,w.mode,_,S),g.return=w,g):(g=s(g,v),g.return=w,g)}function h(w,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Pu(""+g,w.mode,v),g.return=w,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ja:return v=_l(g.type,g.key,g.props,null,w.mode,v),v.ref=io(w,null,g),v.return=w,v;case qs:return g=Au(g,w.mode,v),g.return=w,g;case an:var _=g._init;return h(w,_(g._payload),v)}if(fo(g)||eo(g))return g=ds(g,w.mode,v,null),g.return=w,g;Ba(w,g)}return null}function p(w,g,v,_){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(w,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ja:return v.key===S?l(w,g,v,_):null;case qs:return v.key===S?c(w,g,v,_):null;case an:return S=v._init,p(w,g,S(v._payload),_)}if(fo(v)||eo(v))return S!==null?null:u(w,g,v,_,null);Ba(w,v)}return null}function f(w,g,v,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return w=w.get(v)||null,a(g,w,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ja:return w=w.get(_.key===null?v:_.key)||null,l(g,w,_,S);case qs:return w=w.get(_.key===null?v:_.key)||null,c(g,w,_,S);case an:var k=_._init;return f(w,g,v,k(_._payload),S)}if(fo(_)||eo(_))return w=w.get(v)||null,u(g,w,_,S,null);Ba(g,_)}return null}function b(w,g,v,_){for(var S=null,k=null,E=g,T=g=0,j=null;E!==null&&T<v.length;T++){E.index>T?(j=E,E=null):j=E.sibling;var A=p(w,E,v[T],_);if(A===null){E===null&&(E=j);break}t&&E&&A.alternate===null&&e(w,E),g=i(A,g,T),k===null?S=A:k.sibling=A,k=A,E=j}if(T===v.length)return r(w,E),Ne&&Yn(w,T),S;if(E===null){for(;T<v.length;T++)E=h(w,v[T],_),E!==null&&(g=i(E,g,T),k===null?S=E:k.sibling=E,k=E);return Ne&&Yn(w,T),S}for(E=n(w,E);T<v.length;T++)j=f(E,w,T,v[T],_),j!==null&&(t&&j.alternate!==null&&E.delete(j.key===null?T:j.key),g=i(j,g,T),k===null?S=j:k.sibling=j,k=j);return t&&E.forEach(function(V){return e(w,V)}),Ne&&Yn(w,T),S}function m(w,g,v,_){var S=eo(v);if(typeof S!="function")throw Error(P(150));if(v=S.call(v),v==null)throw Error(P(151));for(var k=S=null,E=g,T=g=0,j=null,A=v.next();E!==null&&!A.done;T++,A=v.next()){E.index>T?(j=E,E=null):j=E.sibling;var V=p(w,E,A.value,_);if(V===null){E===null&&(E=j);break}t&&E&&V.alternate===null&&e(w,E),g=i(V,g,T),k===null?S=V:k.sibling=V,k=V,E=j}if(A.done)return r(w,E),Ne&&Yn(w,T),S;if(E===null){for(;!A.done;T++,A=v.next())A=h(w,A.value,_),A!==null&&(g=i(A,g,T),k===null?S=A:k.sibling=A,k=A);return Ne&&Yn(w,T),S}for(E=n(w,E);!A.done;T++,A=v.next())A=f(E,w,T,A.value,_),A!==null&&(t&&A.alternate!==null&&E.delete(A.key===null?T:A.key),g=i(A,g,T),k===null?S=A:k.sibling=A,k=A);return t&&E.forEach(function(D){return e(w,D)}),Ne&&Yn(w,T),S}function x(w,g,v,_){if(typeof v=="object"&&v!==null&&v.type===Ks&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ja:e:{for(var S=v.key,k=g;k!==null;){if(k.key===S){if(S=v.type,S===Ks){if(k.tag===7){r(w,k.sibling),g=s(k,v.props.children),g.return=w,w=g;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===an&&im(S)===k.type){r(w,k.sibling),g=s(k,v.props),g.ref=io(w,k,v),g.return=w,w=g;break e}r(w,k);break}else e(w,k);k=k.sibling}v.type===Ks?(g=ds(v.props.children,w.mode,_,v.key),g.return=w,w=g):(_=_l(v.type,v.key,v.props,null,w.mode,_),_.ref=io(w,g,v),_.return=w,w=_)}return o(w);case qs:e:{for(k=v.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){r(w,g.sibling),g=s(g,v.children||[]),g.return=w,w=g;break e}else{r(w,g);break}else e(w,g);g=g.sibling}g=Au(v,w.mode,_),g.return=w,w=g}return o(w);case an:return k=v._init,x(w,g,k(v._payload),_)}if(fo(v))return b(w,g,v,_);if(eo(v))return m(w,g,v,_);Ba(w,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(r(w,g.sibling),g=s(g,v),g.return=w,w=g):(r(w,g),g=Pu(v,w.mode,_),g.return=w,w=g),o(w)):r(w,g)}return x}var Ti=Vy(!0),qy=Vy(!1),zl=Fn(null),Wl=null,ti=null,of=null;function af(){of=ti=Wl=null}function lf(t){var e=zl.current;Ce(zl),t._currentValue=e}function Nd(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 ci(t,e){Wl=t,of=ti=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(xt=!0),t.firstContext=null)}function Wt(t){var e=t._currentValue;if(of!==t)if(t={context:t,memoizedValue:e,next:null},ti===null){if(Wl===null)throw Error(P(308));ti=t,Wl.dependencies={lanes:0,firstContext:t}}else ti=ti.next=t;return e}var ts=null;function cf(t){ts===null?ts=[t]:ts.push(t)}function Ky(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,cf(e)):(r.next=s.next,s.next=r),e.interleaved=r,Hr(t,n)}function Hr(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 ln=!1;function uf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gy(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 Br(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Tn(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,de&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,Hr(t,r)}return s=n.interleaved,s===null?(e.next=e,cf(n)):(e.next=s.next,s.next=e),n.interleaved=e,Hr(t,r)}function gl(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,Gh(t,r)}}function om(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 o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,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 Hl(t,e,r,n){var s=t.updateQueue;ln=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,u=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=t,m=a;switch(p=e,f=r,m.tag){case 1:if(b=m.payload,typeof b=="function"){h=b.call(f,h,p);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=m.payload,p=typeof b=="function"?b.call(f,h,p):b,p==null)break e;h=Oe({},h,p);break e;case 2:ln=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=h):u=u.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(l=h),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);ms|=o,t.lanes=o,t.memoizedState=h}}function am(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(P(191,s));s.call(n)}}}var ya={},Cr=Fn(ya),Ho=Fn(ya),Vo=Fn(ya);function rs(t){if(t===ya)throw Error(P(174));return t}function df(t,e){switch(_e(Vo,e),_e(Ho,t),_e(Cr,ya),t=e.nodeType,t){case 9:case 11:e=(e
vendor: 6,847 bytes, line 38
38=e.documentElement)?e.namespaceURI:cd(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=cd(e,t)}Ce(Cr),_e(Cr,e)}function Ri(){Ce(Cr),Ce(Ho),Ce(Vo)}function Jy(t){rs(Vo.current);var e=rs(Cr.current),r=cd(e,t.type);e!==r&&(_e(Ho,t),_e(Cr,r))}function hf(t){Ho.current===t&&(Ce(Cr),Ce(Ho))}var Pe=Fn(0);function Vl(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 Eu=[];function ff(){for(var t=0;t<Eu.length;t++)Eu[t]._workInProgressVersionPrimary=null;Eu.length=0}var vl=Jr.ReactCurrentDispatcher,Cu=Jr.ReactCurrentBatchConfig,ps=0,Ae=null,Ve=null,Ke=null,ql=!1,Eo=!1,qo=0,SS=0;function it(){throw Error(P(321))}function pf(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!cr(t[r],e[r]))return!1;return!0}function mf(t,e,r,n,s,i){if(ps=i,Ae=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,vl.current=t===null||t.memoizedState===null?TS:RS,t=r(n,s),Eo){i=0;do{if(Eo=!1,qo=0,25<=i)throw Error(P(301));i+=1,Ke=Ve=null,e.updateQueue=null,vl.current=NS,t=r(n,s)}while(Eo)}if(vl.current=Kl,e=Ve!==null&&Ve.next!==null,ps=0,Ke=Ve=Ae=null,ql=!1,e)throw Error(P(300));return t}function gf(){var t=qo!==0;return qo=0,t}function gr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Ae.memoizedState=Ke=t:Ke=Ke.next=t,Ke}function Ht(){if(Ve===null){var t=Ae.alternate;t=t!==null?t.memoizedState:null}else t=Ve.next;var e=Ke===null?Ae.memoizedState:Ke.next;if(e!==null)Ke=e,Ve=t;else{if(t===null)throw Error(P(310));Ve=t,t={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Ke===null?Ae.memoizedState=Ke=t:Ke=Ke.next=t}return Ke}function Ko(t,e){return typeof e=="function"?e(t):e}function Tu(t){var e=Ht(),r=e.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=t;var n=Ve,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((ps&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var h={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=h,o=n):l=l.next=h,Ae.lanes|=u,ms|=u}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,cr(n,e.memoizedState)||(xt=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,Ae.lanes|=i,ms|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Ru(t){var e=Ht(),r=e.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);cr(i,e.memoizedState)||(xt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function Yy(){}function Zy(t,e){var r=Ae,n=Ht(),s=e(),i=!cr(n.memoizedState,s);if(i&&(n.memoizedState=s,xt=!0),n=n.queue,vf(e0.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||Ke!==null&&Ke.memoizedState.tag&1){if(r.flags|=2048,Go(9,Xy.bind(null,r,n,s,e),void 0,null),Ge===null)throw Error(P(349));ps&30||Qy(r,e,s)}return s}function Qy(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Ae.updateQueue,e===null?(e={lastEffect:null,stores:null},Ae.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Xy(t,e,r,n){e.value=r,e.getSnapshot=n,t0(e)&&r0(t)}function e0(t,e,r){return r(function(){t0(e)&&r0(t)})}function t0(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!cr(t,r)}catch{return!0}}function r0(t){var e=Hr(t,1);e!==null&&lr(e,t,1,-1)}function lm(t){var e=gr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},e.queue=t,t=t.dispatch=CS.bind(null,Ae,t),[e.memoizedState,t]}function Go(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ae.updateQueue,e===null?(e={lastEffect:null,stores:null},Ae.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 n0(){return Ht().memoizedState}function yl(t,e,r,n){var s=gr();Ae.flags|=t,s.memoizedState=Go(1|e,r,void 0,n===void 0?null:n)}function Ec(t,e,r,n){var s=Ht();n=n===void 0?null:n;var i=void 0;if(Ve!==null){var o=Ve.memoizedState;if(i=o.destroy,n!==null&&pf(n,o.deps)){s.memoizedState=Go(e,r,i,n);return}}Ae.flags|=t,s.memoizedState=Go(1|e,r,i,n)}function cm(t,e){return yl(8390656,8,t,e)}function vf(t,e){return Ec(2048,8,t,e)}function s0(t,e){return Ec(4,2,t,e)}function i0(t,e){return Ec(4,4,t,e)}function o0(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 a0(t,e,r){return r=r!=null?r.concat([t]):null,Ec(4,4,o0.bind(null,e,t),r)}function yf(){}function l0(t,e){var r=Ht();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&pf(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function c0(t,e){var r=Ht();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&pf(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function u0(t,e,r){return ps&21?(cr(r,e)||(r=my(),Ae.lanes|=r,ms|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,xt=!0),t.memoizedState=r)}function kS(t,e){var r=we;we=r!==0&&4>r?r:4,t(!0);var n=Cu.transition;Cu.transition={};try{t(!1),e()}finally{we=r,Cu.transition=n}}function d0(){return Ht().memoizedState}function ES(t,e,r){var n=Nn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},h0(t))f0(e,r);else if(r=Ky(t,e,r,n),r!==null){var s=ft();lr(r,t,n,s),p0(r,e,n)}}function CS(t,e,r){var n=Nn(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(h0(t))f0(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,cr(a,o)){var l=e.interleaved;l===null?(s.next=s,cf(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=Ky(t,e,s,n),r!==null&&(s=ft(),lr(r,t,n,s),p0(r,e,n))}}function h0(t){var e=t.alternate;return t===Ae||e!==null&&e===Ae}function f0(t,e){Eo=ql=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function p0(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,Gh(t,r)}}var Kl={readContext:Wt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},TS={readContext:Wt,useCallback:function(t,e){return gr().memoizedState=[t,e===void 0?null:e],t},useContext:Wt,useEffect:cm,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,yl(4194308,4,o0.bind(null,e,t),r)},useLayoutEffect:function(t,e){return yl(4194308,4,t,e)},useInsertionEffect:function(t,e){return yl(4,2,t,e)},useMemo:function(t,e){var r=gr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=gr();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=ES.bind(null,Ae,t),[n.memoizedState,t]},useRef:function(t){var e=gr();return t={current:t},e.memoizedState=t},useState:lm,useDebugValue:yf,useDeferredValue:function(t){return gr().memoizedState=t},useTransition:function(){var t=lm(!1),e=t[0];return t=kS.bind(null,t[1]),gr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ae,s=gr();if(Ne){if(r===void 0)throw Error(P(407));r=r()}else{if(r=e(),Ge===null)throw Error(P(349));ps&30||Qy(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,cm(e0.bind(null,n,i,t),[t]),n.flags|=2048,Go(9,Xy.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=gr(),e=Ge.identifierPrefix;if(Ne){var r=Fr,n=Ur;r=(n&~(1<<32-ar(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=qo++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=SS++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},RS={readContext:Wt,useCallback:l0,useContext:Wt,useEffect:vf,useImperativeHandle:a0,useInsertionEffect:s0,useLayoutEffect:i0,useMemo:c0,useReducer:Tu,useRef:n0,useState:function(){return Tu(Ko)},useDebugValue:yf,useDeferredValue:function(t){var e=Ht();return u0(e,Ve.memoizedState,t)},useTransition:function(){var t=Tu(Ko)[0],e=Ht().memoizedState;return[t,e]},useMutableSource:Yy,useSyncExternalStore:Zy,useId:d0,unstable_isNewReconciler:!1},NS={readContext:Wt,useCallback:l0,useContext:Wt,useEffect:vf,useImperativeHandle:a0,useInsertionEffect:s0,useLayoutEffect:i0,useMemo:c0,useReducer:Ru,useRef:n0,useState:function(){return Ru(Ko)},useDebugValue:yf,useDeferredValue:function(t){var e=Ht();return Ve===null?e.memoizedState=t:u0(e,Ve.memoizedState,t)},useTransition:function(){var t=Ru(Ko)[0],e=Ht().memoizedState;return[t,e]},useMutableSource:Yy,useSyncExternalStore:Zy,useId:d0,unstable_isNewReconciler:!1};function Xt(t,e){if(t&&t.defaultProps){e=Oe({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function jd(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Oe({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Cc={isMounted:function(t){return(t=t._reactInternals)?Ss(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ft(),s=Nn(t),i=Br(n,s);i.payload=e,r!=null&&(i.callback=r),e=Tn(t,i,s),e!==null&&(lr(e,t,s,n),gl(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ft(),s=Nn(t),i=Br(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=Tn(t,i,s),e!==null&&(lr(e,t,s,n),gl(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ft(),n=Nn(t),s=Br(r,n);s.tag=2,e!=null&&(s.callback=e),e=Tn(t,s,n),e!==null&&(lr(e,t,n,r),gl(e,t,n))}};function um(t,e,r,n,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!Fo(r,n)||!Fo(s,i):!0}function m0(t,e,r){var n=!1,s=In,i=e.contextType;return typeof i=="object"&&i!==null?i=Wt(i):(s=_t(e)?hs:ct.current,n=e.contextTypes,i=(n=n!=null)?Ei(t,s):In),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Cc,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function dm(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&&Cc.enqueueReplaceState(e,e.state,null)}function Pd(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},uf(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Wt(i):(i=_t(e)?hs:ct.current,s.context=Ei(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(jd(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&&Cc.enqueueReplaceState(s,s.state,null),Hl(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Ni(t,e){try{var r="",n=e;do r+=n1(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 Nu(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Ad(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var jS=typeof WeakMap=="function"?WeakMap:Map;function g0(t,e,r){r=Br(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Jl||(Jl=!0,zd=n),Ad(t,e)},r}function v0(t,e,r){r=Br(-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(){Ad(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Ad(t,e),typeof n!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function hm(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new jS;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=HS.bind(null,t,e,r),e.then(t,t))}function fm(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 pm(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=Br(-1,1),e.tag=2,Tn(r,e,1))),r.lanes|=1),t)}var PS=Jr.ReactCurrentOwner,xt=!1;function dt(t,e,r,n){e.child=t===null?qy(e,null,r,n):Ti(e,t.child,r,n)}function mm(t,e,r,n,s){r=r.render;var i=e.ref;return ci(e,s),n=mf(t,e,r,n,i,s),r=gf(),t!==null&&!xt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Vr(t,e,s)):(Ne&&r&&rf(e),e.flags|=1,dt(t,e,n,s),e.child)}function gm(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,y0(t,e,i,n,s)):(t=_l(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 o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Fo,r(o,n)&&t.ref===e.ref)return Vr(t,e,s)}return e.flags|=1,t=jn(i,n),t.ref=e.ref,t.return=e,e.child=t}function y0(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(Fo(i,n)&&t.ref===e.ref)if(xt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(xt=!0);else return e.lanes=t.lanes,Vr(t,e,s)}return Od(t,e,r,n,s)}function w0(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},_e(ni,Et),Et|=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,_e(ni,Et),Et|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,_e(ni,Et),Et|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,_e(ni,Et),Et|=n;return dt(t,e,s,r),e.child}function x0(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function Od(t,e,r,n,s){var i=_t(r)?hs:ct.current;return i=Ei(e,i),ci(e,s),r=mf(t,e,r,n,i,s),n=gf(),t!==null&&!xt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Vr(t,e,s)):(Ne&&n&&rf(e),e.flags|=1,dt(t,e,r,s),e.child)}function vm(t,e,r,n,s){if(_t(r)){var i=!0;Ul(e)}else i=!1;if(ci(e,s),e.stateNode===null)wl(t,e),m0(e,r,n),Pd(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Wt(c):(c=_t(r)?hs:ct.current,c=Ei(e,c));var u=r.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&dm(e,o,n,c),ln=!1;var p=e.memoizedState;o.state=p,Hl(e,n,o,s),l=e.memoizedState,a!==n||p!==l||bt.current||ln?(typeof u=="function"&&(jd(e,r,u,n),l=e.memoizedState),(a=ln||um(e,r,a,n,p,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,Gy(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Xt(e.type,a),o.props=c,h=e.pendingProps,p=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Wt(l):(l=_t(r)?hs:ct.current,l=Ei(e,l));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&dm(e,o,n,l),ln=!1,p=e.memoizedState,o.state=p,Hl(e,n,o,s);var b=e.memoizedState;a!==h||p!==b||bt.current||ln?(typeof f=="function"&&(jd(e,r,f,n),b=e.memoizedState),(c=ln||um(e,r,c,n,p,b,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,b,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,b,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=b),o.props=n,o.state=b,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return Id(t,e,r,n,i,s)}function Id(t,e,r,n,s,i){x0(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&rm(e,r,!1),Vr(t,e,i);n=e.stateNode,PS.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Ti(e,t.child,null,i),e.child=Ti(e,null,a,i)):dt(t,e,a,i),e.memoizedState=n.state,s&&rm(e,r,!0),e.child}function b0(t){var e=t.stateNode;e.pendingContext?tm(t,e.pendingContext,e.pendingContext!==e.context):e.context&&tm(t,e.context,!1),df(t,e.containerInfo)}function ym(t,e,r,n,s){return Ci(),sf(s),e.flags|=256,dt(t,e,r,n),e.child}var Ld={dehydrated:null,treeContext:null,retryLane:0};function Dd(t){return{baseLanes:t,cachePool:null,transitions:null}}function _0(t,e,r){var n=e.pendingProps,s=Pe.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),_e(Pe,s&1),t===null)return Rd(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):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Nc(o,n,0,null),t=ds(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Dd(r),e.memoizedState=Ld,t):wf(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return AS(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&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),a!==null?i=jn(a,i):(i=ds(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?Dd(r):{base
vendor: 4,804 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Ld,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 wf(t,e){return e=Nc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function za(t,e,r,n){return n!==null&&sf(n),Ti(e,t.child,null,r),t=wf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function AS(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=Nu(Error(P(422))),za(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=Nc({mode:"visible",children:n.children},s,0,null),i=ds(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&Ti(e,t.child,null,o),e.child.memoizedState=Dd(o),e.memoizedState=Ld,i);if(!(e.mode&1))return za(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(P(419)),n=Nu(i,n,void 0),za(t,e,o,n)}if(a=(o&t.childLanes)!==0,xt||a){if(n=Ge,n!==null){switch(o&-o){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|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Hr(t,s),lr(n,t,s,-1))}return Ef(),n=Nu(Error(P(421))),za(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=VS.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Nt=Cn(s.nextSibling),jt=e,Ne=!0,ir=null,t!==null&&(Ut[Ft++]=Ur,Ut[Ft++]=Fr,Ut[Ft++]=fs,Ur=t.id,Fr=t.overflow,fs=e),e=wf(e,n.children),e.flags|=4096,e)}function wm(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Nd(t.return,e,r)}function ju(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 S0(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(dt(t,e,n.children,r),n=Pe.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&&wm(t,r,e);else if(t.tag===19)wm(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(_e(Pe,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&&Vl(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),ju(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&&Vl(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}ju(e,!0,r,null,i);break;case"together":ju(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function wl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Vr(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),ms|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(P(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 OS(t,e,r){switch(e.tag){case 3:b0(e),Ci();break;case 5:Jy(e);break;case 1:_t(e.type)&&Ul(e);break;case 4:df(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;_e(zl,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(_e(Pe,Pe.current&1),e.flags|=128,null):r&e.child.childLanes?_0(t,e,r):(_e(Pe,Pe.current&1),t=Vr(t,e,r),t!==null?t.sibling:null);_e(Pe,Pe.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return S0(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),_e(Pe,Pe.current),n)break;return null;case 22:case 23:return e.lanes=0,w0(t,e,r)}return Vr(t,e,r)}var k0,$d,E0,C0;k0=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}};$d=function(){};E0=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,rs(Cr.current);var i=null;
vendor: 4,114 bytes, line 40
40switch(r){case"input":s=id(t,s),n=id(t,n),i=[];break;case"select":s=Oe({},s,{value:void 0}),n=Oe({},n,{value:void 0}),i=[];break;case"textarea":s=ld(t,s),n=ld(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=$l)}ud(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Oo.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Oo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};C0=function(t,e,r,n){r!==n&&(e.flags|=4)};function oo(t,e){if(!Ne)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 ot(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 IS(t,e,r){var n=e.pendingProps;switch(nf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(e),null;case 1:return _t(e.type)&&Ml(),ot(e),null;case 3:return n=e.stateNode,Ri(),Ce(bt),Ce(ct),ff(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Fa(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ir!==null&&(Vd(ir),ir=null))),$d(t,e),ot(e),null;case 5:hf(e);var s=rs(Vo.current);if(r=e.type,t!==null&&e.stateNode!=null)E0(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(P(166));return ot(e),null}if(t=rs(Cr.current),Fa(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[_r]=e,n[Wo]=i,t=(e.mode&1)!==0,r){case"dialog":Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":case"embed":Ee("load",n);break;case"video":case"audio":for(s=0;s<mo.length;s++)Ee(mo[s],n);break;case"source":Ee("error",n);break;case"img":case"image":case"link":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"input":Rp(n,i),Ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",n);break;case"textarea":jp(n,i),Ee("invalid",n)}ud(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Ua(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Ua(n.textContent,a,t),s=["children",""+a]):Oo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ee("scroll",n)}switch(r){case"input":Pa(n),Np(n,i,!0);break;case"textarea":Pa(n),Pp(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=$l)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=ey(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>
40",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[_r]=e,t[Wo]=n,k0(t,e,!1,!1),e.stateNode=t;e:{switch(o=dd(r,n),r){case"dialog":Ee("cancel",t),Ee("close",t),s=n;break;case"iframe":case"object":case"embed":Ee("load",t),s=n;break;case"video":case"audio":for(s=0;s<mo.length;s++)Ee(mo[s],t);s=n;break;case"source":Ee("error",t),s=n;break;case"img":case"image":case"link":Ee("error",t),Ee("load",t),s=n;break;case"details":Ee("toggle",t),s=n;break;case"input":Rp(t,n),s=id(t,n),Ee("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=Oe({},n,{value:void 0}),Ee("invalid",t);break;case"textarea":jp(t,n),s=ld(t,n),Ee("invalid",t);break;default:s=n}ud(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ny(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ty(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Io(t,l):typeof l=="number"&&Io(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Oo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",t):l!=null&&zh(t,i,l,o))}switch(r){case"input":Pa(t),Np(t,n,!1);break;case"textarea":Pa(t),Pp(t);break;case"option":n.value!=null&&t.setAttribute("value",""+On(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?ii(t,!!n.multiple,i,!1):n.defaultValue!=null&&ii(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=$l)}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 ot(e),null;case 6:if(t&&e.stateNode!=null)C0(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(P(166));if(r=rs(Vo.current),rs(Cr.current),Fa(e)){if(n=e.stateNode,r=e.memoizedProps,n[_r]=e,(i=n.nodeValue!==r)&&(t=jt,t!==null))switch(t.tag){case 3:Ua(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Ua(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[_r]=e,e.stateNode=n}return ot(e),null;case 13:if(Ce(Pe),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ne&&Nt!==null&&e.mode&1&&!(e.flags&128))Hy(),Ci(),e.flags|=98560,i=!1;else if(i=Fa(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(P(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(P(317));i[_r]=e}else Ci(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;ot(e),i=!1}else ir!==null&&(Vd(ir),ir=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||Pe.current&1?qe===0&&(qe=3):Ef())),e.updateQueue!==null&&(e.flags|=4),ot(e),null);case 4:return Ri(),$d(t,e),t===null&&Bo(e.stateNode.containerInfo),ot(e),null;case 10:return lf(e.type._context),ot(e),null;case 17:return _t(e.type)&&Ml(),ot(e),null;case 19:if(Ce(Pe),i=e.memoizedState,i===null)return ot(e),null;if(n=(e.flags&128)!==0,o=i.rendering,o===null)if(n)oo(i,!1);else{if(qe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Vl(t),o!==null){for(e.flags|=128,oo(i,!1),n=o.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,o=i.alternate,o===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=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return _e(Pe,Pe.current&1|2),e.child}t=t.sibling}i.tail!==null&&Fe()>ji&&(e.flags|=128,n=!0,oo(i,!1),e.lanes=4194304)}else{if(!n)if(t=Vl(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),oo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ne)return ot(e),null}else 2*Fe()-i.renderingStartTime>ji&&r!==1073741824&&(e.flags|=128,n=!0,oo(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Fe(),e.sibling=null,r=Pe.current,_e(Pe,n?r&1|2:r&1),e):(ot(e),null);case 22:case 23:return kf(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Et&1073741824&&(ot(e),e.subtreeFlags&6&&(e.flags|=8192)):ot(e),null;case 24:return null;case 25:return null}throw Error(P(156,e.tag))}function LS(t,e){switch(nf(e),e.tag){case 1:return _t(e.type)&&Ml(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;
vendor: 28,918 bytes, line 40
40case 3:return Ri(),Ce(bt),Ce(ct),ff(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return hf(e),null;case 13:if(Ce(Pe),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(P(340));Ci()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ce(Pe),null;case 4:return Ri(),null;case 10:return lf(e.type._context),null;case 22:case 23:return kf(),null;case 24:return null;default:return null}}var Wa=!1,lt=!1,DS=typeof WeakSet=="function"?WeakSet:Set,F=null;function ri(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ue(t,e,n)}else r.current=null}function Md(t,e,r){try{r()}catch(n){Ue(t,e,n)}}var xm=!1;function $S(t,e){if(bd=Il,t=Py(),tf(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 o=0,a=-1,l=-1,c=0,u=0,h=t,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(a=o+s),h!==i||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===t)break t;if(p===r&&++c===s&&(a=o),p===i&&++u===n&&(l=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(_d={focusedElem:t,selectionRange:r},Il=!1,F=e;F!==null;)if(e=F,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,F=t;else for(;F!==null;){e=F;try{var b=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var m=b.memoizedProps,x=b.memoizedState,w=e.stateNode,g=w.getSnapshotBeforeUpdate(e.elementType===e.type?m:Xt(e.type,m),x);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(_){Ue(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,F=t;break}F=e.return}return b=xm,xm=!1,b}function Co(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&&Md(e,r,i)}s=s.next}while(s!==n)}}function Tc(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 Ud(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[_r],delete e[Wo],delete e[Ed],delete e[wS],delete e[xS])),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 bm(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 Fd(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=$l));else if(n!==4&&(t=t.child,t!==null))for(Fd(t,e,r),t=t.sibling;t!==null;)Fd(t,e,r),t=t.sibling}function Bd(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(Bd(t,e,r),t=t.sibling;t!==null;)Bd(t,e,r),t=t.sibling}var Xe=null,sr=!1;function tn(t,e,r){for(r=r.child;r!==null;)N0(t,e,r),r=r.sibling}function N0(t,e,r){if(Er&&typeof Er.onCommitFiberUnmount=="function")try{Er.onCommitFiberUnmount(wc,r)}catch{}switch(r.tag){case 5:lt||ri(r,e);case 6:var n=Xe,s=sr;Xe=null,tn(t,e,r),Xe=n,sr=s,Xe!==null&&(sr?(t=Xe,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Xe.removeChild(r.stateNode));break;case 18:Xe!==null&&(sr?(t=Xe,r=r.stateNode,t.nodeType===8?Su(t.parentNode,r):t.nodeType===1&&Su(t,r),Mo(t)):Su(Xe,r.stateNode));break;case 4:n=Xe,s=sr,Xe=r.stateNode.containerInfo,sr=!0,tn(t,e,r),Xe=n,sr=s;break;case 0:case 11:case 14:case 15:if(!lt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Md(r,e,o),s=s.next}while(s!==n)}tn(t,e,r);break;case 1:if(!lt&&(ri(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ue(r,e,a)}tn(t,e,r);break;case 21:tn(t,e,r);break;case 22:r.mode&1?(lt=(n=lt)||r.memoizedState!==null,tn(t,e,r),lt=n):tn(t,e,r);break;default:tn(t,e,r)}}function _m(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new DS),e.forEach(function(n){var s=qS.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Jt(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,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Xe=a.stateNode,sr=!1;break e;case 3:Xe=a.stateNode.containerInfo,sr=!0;break e;case 4:Xe=a.stateNode.containerInfo,sr=!0;break e}a=a.return}if(Xe===null)throw Error(P(160));N0(i,o,s),Xe=null,sr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Ue(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)j0(e,t),e=e.sibling}function j0(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Jt(e,t),pr(t),n&4){try{Co(3,t,t.return),Tc(3,t)}catch(m){Ue(t,t.return,m)}try{Co(5,t,t.return)}catch(m){Ue(t,t.return,m)}}break;case 1:Jt(e,t),pr(t),n&512&&r!==null&&ri(r,r.return);break;case 5:if(Jt(e,t),pr(t),n&512&&r!==null&&ri(r,r.return),t.flags&32){var s=t.stateNode;try{Io(s,"")}catch(m){Ue(t,t.return,m)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=r!==null?r.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Qv(s,i),dd(a,o);var c=dd(a,i);for(o=0;o<l.length;o+=2){var u=l[o],h=l[o+1];u==="style"?ny(s,h):u==="dangerouslySetInnerHTML"?ty(s,h):u==="children"?Io(s,h):zh(s,u,h,c)}switch(a){case"input":od(s,i);break;case"textarea":Xv(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ii(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?ii(s,!!i.multiple,i.defaultValue,!0):ii(s,!!i.multiple,i.multiple?[]:"",!1))}s[Wo]=i}catch(m){Ue(t,t.return,m)}}break;case 6:if(Jt(e,t),pr(t),n&4){if(t.stateNode===null)throw Error(P(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){Ue(t,t.return,m)}}break;case 3:if(Jt(e,t),pr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Mo(e.containerInfo)}catch(m){Ue(t,t.return,m)}break;case 4:Jt(e,t),pr(t);break;case 13:Jt(e,t),pr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(_f=Fe())),n&4&&_m(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(lt=(c=lt)||u,Jt(e,t),lt=c):Jt(e,t),pr(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(F=t,u=t.child;u!==null;){for(h=F=u;F!==null;){switch(p=F,f=p.child,p.tag){case 0:case 11:case 14:case 15:Co(4,p,p.return);break;case 1:ri(p,p.return);var b=p.stateNode;if(typeof b.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,b.props=e.memoizedProps,b.state=e.memoizedState,b.componentWillUnmount()}catch(m){Ue(n,r,m)}}break;case 5:ri(p,p.return);break;case 22:if(p.memoizedState!==null){km(h);continue}}f!==null?(f.return=p,F=f):km(h)}u=u.sibling}e:for(u=null,h=t;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=ry("display",o))}catch(m){Ue(t,t.return,m)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(m){Ue(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;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Jt(e,t),pr(t),n&4&&_m(t);break;case 21:break;default:Jt(e,t),pr(t)}}function pr(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(P(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Io(s,""),n.flags&=-33);var i=bm(t);Bd(t,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=bm(t);Fd(t,a,o);break;default:throw Error(P(161))}}catch(l){Ue(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function MS(t,e,r){F=t,P0(t)}function P0(t,e,r){for(var n=(t.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Wa;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||lt;a=Wa;var c=lt;if(Wa=o,(lt=l)&&!c)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Em(s):l!==null?(l.return=o,F=l):Em(s);for(;i!==null;)F=i,P0(i),i=i.sibling;F=s,Wa=a,lt=c}Sm(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):Sm(t)}}function Sm(t){for(;F!==null;){var e=F;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:lt||Tc(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!lt)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Xt(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&am(e,i,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}am(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;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 c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&Mo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}lt||e.flags&512&&Ud(e)}catch(p){Ue(e,e.return,p)}}if(e===t){F=null;break}if(r=e.sibling,r!==null){r.return=e.return,F=r;break}F=e.return}}function km(t){for(;F!==null;){var e=F;if(e===t){F=null;break}var r=e.sibling;if(r!==null){r.return=e.return,F=r;break}F=e.return}}function Em(t){for(;F!==null;){var e=F;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Tc(4,e)}catch(l){Ue(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){Ue(e,s,l)}}var i=e.return;try{Ud(e)}catch(l){Ue(e,i,l)}break;case 5:var o=e.return;try{Ud(e)}catch(l){Ue(e,o,l)}}}catch(l){Ue(e,e.return,l)}if(e===t){F=null;break}var a=e.sibling;if(a!==null){a.return=e.return,F=a;break}F=e.return}}var US=Math.ceil,Gl=Jr.ReactCurrentDispatcher,xf=Jr.ReactCurrentOwner,zt=Jr.ReactCurrentBatchConfig,de=0,Ge=null,We=null,et=0,Et=0,ni=Fn(0),qe=0,Jo=null,ms=0,Rc=0,bf=0,To=null,yt=null,_f=0,ji=1/0,Ir=null,Jl=!1,zd=null,Rn=null,Ha=!1,xn=null,Yl=0,Ro=0,Wd=null,xl=-1,bl=0;function ft(){return de&6?Fe():xl!==-1?xl:xl=Fe()}function Nn(t){return t.mode&1?de&2&&et!==0?et&-et:_S.transition!==null?(bl===0&&(bl=my()),bl):(t=we,t!==0||(t=window.event,t=t===void 0?16:_y(t.type)),t):1}function lr(t,e,r,n){if(50<Ro)throw Ro=0,Wd=null,Error(P(185));ma(t,r,n),(!(de&2)||t!==Ge)&&(t===Ge&&(!(de&2)&&(Rc|=r),qe===4&&dn(t,et)),St(t,n),r===1&&de===0&&!(e.mode&1)&&(ji=Fe()+500,kc&&Bn()))}function St(t,e){var r=t.callbackNode;_1(t,e);var n=Ol(t,t===Ge?et:0);if(n===0)r!==null&&Ip(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&Ip(r),e===1)t.tag===0?bS(Cm.bind(null,t)):By(Cm.bind(null,t)),vS(function(){!(de&6)&&Bn()}),r=null;else{switch(gy(n)){case 1:r=Kh;break;case 4:r=fy;break;case 16:r=Al;break;case 536870912:r=py;break;default:r=Al}r=U0(r,A0.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function A0(t,e){if(xl=-1,bl=0,de&6)throw Error(P(327));var r=t.callbackNode;if(ui()&&t.callbackNode!==r)return null;var n=Ol(t,t===Ge?et:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Zl(t,n);else{e=n;var s=de;de|=2;var i=I0();(Ge!==t||et!==e)&&(Ir=null,ji=Fe()+500,us(t,e));do try{zS();break}catch(a){O0(t,a)}while(!0);af(),Gl.current=i,de=s,We!==null?e=0:(Ge=null,et=0,e=qe)}if(e!==0){if(e===2&&(s=gd(t),s!==0&&(n=s,e=Hd(t,s))),e===1)throw r=Jo,us(t,0),dn(t,n),St(t,Fe()),r;if(e===6)dn(t,n);else{if(s=t.current.alternate,!(n&30)&&!FS(s)&&(e=Zl(t,n),e===2&&(i=gd(t),i!==0&&(n=i,e=Hd(t,i))),e===1))throw r=Jo,us(t,0),dn(t,n),St(t,Fe()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(P(345));case 2:Zn(t,yt,Ir);break;case 3:if(dn(t,n),(n&130023424)===n&&(e=_f+500-Fe(),10<e)){if(Ol(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){ft(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=kd(Zn.bind(null,t,yt,Ir),e);break}Zn(t,yt,Ir);break;case 4:if(dn(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var o=31-ar(n);i=1<<o,o=e[o],o>s&&(s=o),n&=~i}if(n=s,n=Fe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*US(n/1960))-n,10<n){t.timeoutHandle=kd(Zn.bind(null,t,yt,Ir),n);break}Zn(t,yt,Ir);break;case 5:Zn(t,yt,Ir);break;default:throw Error(P(329))}}}return St(t,Fe()),t.callbackNode===r?A0.bind(null,t):null}function Hd(t,e){var r=To;return t.current.memoizedState.isDehydrated&&(us(t,e).flags|=256),t=Zl(t,e),t!==2&&(e=yt,yt=r,e!==null&&Vd(e)),t}function Vd(t){yt===null?yt=t:yt.push.apply(yt,t)}function FS(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(!cr(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 dn(t,e){for(e&=~bf,e&=~Rc,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-ar(e),n=1<<r;t[r]=-1,e&=~n}}function Cm(t){if(de&6)throw Error(P(327));ui();var e=Ol(t,0);if(!(e&1))return St(t,Fe()),null;var r=Zl(t,e);if(t.tag!==0&&r===2){var n=gd(t);n!==0&&(e=n,r=Hd(t,n))}if(r===1)throw r=Jo,us(t,0),dn(t,e),St(t,Fe()),r;if(r===6)throw Error(P(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Zn(t,yt,Ir),St(t,Fe()),null}function Sf(t,e){var r=de;de|=1;try{return t(e)}finally{de=r,de===0&&(ji=Fe()+500,kc&&Bn())}}function gs(t){xn!==null&&xn.tag===0&&!(de&6)&&ui();var e=de;de|=1;var r=zt.transition,n=we;try{if(zt.transition=null,we=1,t)return t()}finally{we=n,zt.transition=r,de=e,!(de&6)&&Bn()}}function kf(){Et=ni.current,Ce(ni)}function us(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,gS(r)),We!==null)for(r=We.return;r!==null;){var n=r;switch(nf(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ml();break;case 3:Ri(),Ce(bt),Ce(ct),ff();break;case 5:hf(n);break;case 4:Ri();break;case 13:Ce(Pe);break;case 19:Ce(Pe);break;case 10:lf(n.type._context);break;case 22:case 23:kf()}r=r.return}if(Ge=t,We=t=jn(t.current,null),et=Et=e,qe=0,Jo=null,bf=Rc=ms=0,yt=To=null,ts!==null){for(e=0;e<ts.length;e++)if(r=ts[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}ts=null}return t}function O0(t,e){do{var r=We;try{if(af(),vl.current=Kl,ql){for(var n=Ae.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}ql=!1}if(ps=0,Ke=Ve=Ae=null,Eo=!1,qo=0,xf.current=null,r===null||r.return===null){qe=1,Jo=e,We=null;break}e:{var i=t,o=r.return,a=r,l=e;if(e=et,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=fm(o);if(f!==null){f.flags&=-257,pm(f,o,a,i,e),f.mode&1&&hm(i,c,e),e=f,l=c;var b=e.updateQueue;if(b===null){var m=new Set;m.add(l),e.updateQueue=m}else b.add(l);break e}else{if(!(e&1)){hm(i,c,e),Ef();break e}l=Error(P(426))}}else if(Ne&&a.mode&1){var x=fm(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),pm(x,o,a,i,e),sf(Ni(l,a));break e}}i=l=Ni(l,a),qe!==4&&(qe=2),To===null?To=[i]:To.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var w=g0(i,l,e);om(i,w);break e;case 1:a=l;var g=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Rn===null||!Rn.has(v)))){i.flags|=65536,e&=-e,i.lanes|=e;var _=v0(i,a,e);om(i,_);break e}}i=i.return}while(i!==null)}D0(r)}catch(S){e=S,We===r&&r!==null&&(We=r=r.return);continue}break}while(!0)}function I0(){var t=Gl.current;return Gl.current=Kl,t===null?Kl:t}function Ef(){(qe===0||qe===3||qe===2)&&(qe=4),Ge===null||!(ms&268435455)&&!(Rc&268435455)||dn(Ge,et)}function Zl(t,e){var r=de;de|=2;var n=I0();(Ge!==t||et!==e)&&(Ir=null,us(t,e));do try{BS();break}catch(s){O0(t,s)}while(!0);if(af(),de=r,Gl.current=n,We!==null)throw Error(P(261));return Ge=null,et=0,qe}function BS(){for(;We!==null;)L0(We)}function zS(){for(;We!==null&&!f1();)L0(We)}function L0(t){var e=M0(t.alternate,t,Et);t.memoizedProps=t.pendingProps,e===null?D0(t):We=e,xf.current=null}function D0(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=LS(r,e),r!==null){r.flags&=32767,We=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{qe=6,We=null;return}}else if(r=IS(r,e,Et),r!==null){We=r;return}if(e=e.sibling,e!==null){We=e;return}We=e=t}while(e!==null);qe===0&&(qe=5)}function Zn(t,e,r){var n=we,s=zt.transition;try{zt.transition=null,we=1,WS(t,e,r,n)}finally{zt.transition=s,we=n}return null}function WS(t,e,r,n){do ui();while(xn!==null);if(de&6)throw Error(P(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(P(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(S1(t,i),t===Ge&&(We=Ge=null,et=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ha||(Ha=!0,U0(Al,function(){return ui(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=zt.transition,zt.transition=null;var o=we;we=1;var a=de;de|=4,xf.current=null,$S(t,r),j0(r,t),cS(_d),Il=!!bd,_d=bd=null,t.current=r,MS(r),p1(),de=a,we=o,zt.transition=i}else t.current=r;if(Ha&&(Ha=!1,xn=t,Yl=s),i=t.pendingLanes,i===0&&(Rn=null),v1(r.stateNode),St(t,Fe()),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(Jl)throw Jl=!1,t=zd,zd=null,t;return Yl&1&&t.tag!==0&&ui(),i=t.pendingLanes,i&1?t===Wd?Ro++:(Ro=0,Wd=t):Ro=0,Bn(),null}function ui(){if(xn!==null){var t=gy(Yl),e=zt.transition,r=we;try{if(zt.transition=null,we=16>t?16:t,xn===null)var n=!1;else{if(t=xn,xn=null,Yl=0,de&6)throw Error(P(331));var s=de;for(de|=4,F=t.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(F=c;F!==null;){var u=F;switch(u.tag){case 0:case 11:case 15:Co(8,u,i)}var h=u.child;if(h!==null)h.return=u,F=h;else for(;F!==null;){u=F;var p=u.sibling,f=u.return;if(T0(u),u===c){F=null;break}if(p!==null){p.return=f,F=p;break}F=f}}}var b=i.alternate;if(b!==null){var m=b.child;if(m!==null){b.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Co(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,F=w;break e}F=i.return}}var g=t.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Tc(9,a)}}catch(S){Ue(a,a.return,S)}if(a===o){F=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,F=_;break e}F=a.return}}if(de=s,Bn(),Er&&typeof Er.onPostCommitFiberRoot=="function")try{Er.onPostCommitFiberRoot(wc,t)}catch{}n=!0}return n}finally{we=r,zt.transition=e}}return!1}function Tm(t,e,r){e=Ni(r,e),e=g0(t,e,1),t=Tn(t,e,1),e=ft(),t!==null&&(ma(t,1,e),St(t,e))}function Ue(t,e,r){if(t.tag===3)Tm(t,t,r);else for(;e!==null;){if(e.tag===3){Tm(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rn===null||!Rn.has(n))){t=Ni(r,t),t=v0(e,t,1),e=Tn(e,t,1),t=ft(),e!==null&&(ma(e,1,t),St(e,t));break}}e=e.return}}function HS(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ft(),t.pingedLanes|=t.suspendedLanes&r,Ge===t&&(et&r)===r&&(qe===4||qe===3&&(et&130023424)===et&&500>Fe()-_f?us(t,0):bf|=r),St(t,e)}function $0(t,e){e===0&&(t.mode&1?(e=Ia,Ia<<=1,!(Ia&130023424)&&(Ia=4194304)):e=1);var r=ft();t=Hr(t,e),t!==null&&(ma(t,e,r),St(t,r))}function VS(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),$0(t,r)}function qS(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(P(314))}n!==null&&n.delete(e),$0(t,r)}var M0;M0=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||bt.current)xt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return xt=!1,OS(t,e,r);xt=!!(t.flags&131072)}else xt=!1,Ne&&e.flags&1048576&&zy(e,Bl,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;wl(t,e),t=e.pendingProps;var s=Ei(e,ct.current);ci(e,r),s=mf(null,e,n,t,s,r);var i=gf();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,_t(n)?(i=!0,Ul(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,uf(e),s.updater=Cc,e.stateNode=s,s._reactInternals=e,Pd(e,n,t,r),e=Id(null,e,n,!0,i,r)):(e.tag=0,Ne&&i&&rf(e),dt(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(wl(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=GS(n),t=Xt(n,t),s){case 0:e=Od(null,e,n,t,r);break e;case 1:e=vm(null,e,n,t,r);break e;case 11:e=mm(null,e,n,t,r);break e;case 14:e=gm(null,e,n,Xt(n.type,t),r);break e}throw Error(P(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Xt(n,s),Od(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Xt(n,s),vm(t,e,n,s,r);case 3:e:{if(b0(e),t===null)throw Error(P(387));n=e.pendingProps,i=e.memoizedState,s=i.element,Gy(t,e),Hl(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Ni(Error(P(423)),e),e=ym(t,e,n,r,s);break e}else if(n!==s){s=Ni(Error(P(424)),e),e=ym(t,e,n,r,s);break e}else for(Nt=Cn(e.stateNode.containerInfo.firstChild),jt=e,Ne=!0,ir=null,r=qy(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ci(),n===s){e=Vr(t,e,r);break e}dt(t,e,n,r)}e=e.child}return e;case 5:return Jy(e),t===null&&Rd(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Sd(n,s)?o=null:i!==null&&Sd(n,i)&&(e.flags|=32),x0(t,e),dt(t,e,o,r),e.child;case 6:return t===null&&Rd(e),null;case 13:return _0(t,e,r);case 4:return df(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Ti(e,null,n,r):dt(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Xt(n,s),mm(t,e,n,s,r);case 7:return dt(t,e,e.pendingProps,r),e.child;case 8:return dt(t,e,e.pendingProps.children,r),e.child;case 12:return dt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,_e(zl,n._currentValue),n._currentValue=o,i!==null)if(cr(i.value,o)){if(i.children===s.children&&!bt.current){e=Vr(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Br(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Nd(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(P(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Nd(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}dt(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,ci(e,r),s=Wt(s),n=n(s),e.flags|=1,dt(t,e,n,r),e.child;case 14:return n=e.type,s=Xt(n,e.pendingProps),s=Xt(n.type,s),gm(t,e,n,s,r);case 15:return y0(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Xt(n,s),wl(t,e),e.tag=1,_t(n)?(t=!0,Ul(e)):t=!1,ci(e,r),m0(e,n,s),Pd(e,n,s,r),Id(null,e,n,!0,t,r);case 19:return S0(t,e,r);case 22:return w0(t,e,r)}throw Error(P(156,e.tag))};function U0(t,e){return hy(t,e)}function KS(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 Bt(t,e,r,n){return new KS(t,e,r,n)}function Cf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function GS(t){if(typeof t=="function")return Cf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Hh)return 11;if(t===Vh)return 14}return 2}function jn(t,e){var r=t.alternate;return r===null?(r=Bt(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 _l(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")Cf(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ks:return ds(r.children,s,i,e);case Wh:o=8,s|=8;break;case td:return t=Bt(12,r,e,s|2),t.elementType=td,t.lanes=i,t;case rd:return t=Bt(13,r,e,s),t.elementType=rd,t.lanes=i,t;case nd:return t=Bt(19,r,e,s),t.elementType=nd,t.lanes=i,t;case Jv:return Nc(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Kv:o=10;break e;case Gv:o=9;break e;case Hh:o=11;break e;case Vh:o=14;break e;case an:o=16,n=null;break e}throw Error(P(130,t==null?t:typeof t,""))}return e=Bt(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function ds(t,e,r,n){return t=Bt(7,t,n,e),t.lanes=r,t}function Nc(t,e,r,n){return t=Bt(22,t,n,e),t.elementType=Jv,t.lanes=r,t.stateNode={isHidden:!1},t}function Pu(t,e,r){return t=Bt(6,t,null,e),t.lanes=r,t}function Au(t,e,r){return e=Bt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function JS(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=hu(0),this.expirationTimes=hu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Tf(t,e,r,n,s,i,o,a,l){return t=new JS(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Bt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},uf(i),t}function YS(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,591 bytes, line 40
40return{$$typeof:qs,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function F0(t){if(!t)return In;t=t._reactInternals;e:{if(Ss(t)!==t||t.tag!==1)throw Error(P(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(_t(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(P(171))}if(t.tag===1){var r=t.type;if(_t(r))return Fy(t,r,e)}return e}function B0(t,e,r,n,s,i,o,a,l){return t=Tf(r,n,!0,t,s,i,o,a,l),t.context=F0(null),r=t.current,n=ft(),s=Nn(r),i=Br(n,s),i.callback=e??null,Tn(r,i,s),t.current.lanes=s,ma(t,s,n),St(t,n),t}function jc(t,e,r,n){var s=e.current,i=ft(),o=Nn(s);return r=F0(r),e.context===null?e.context=r:e.pendingContext=r,e=Br(i,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Tn(s,e,o),t!==null&&(lr(t,s,o,i),gl(t,s,o)),o}function Ql(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 Rm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Rf(t,e){Rm(t,e),(t=t.alternate)&&Rm(t,e)}function ZS(){return null}var z0=typeof reportError=="function"?reportError:function(t){console.error(t)};function Nf(t){this._internalRoot=t}Pc.prototype.render=Nf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(P(409));jc(t,e,null,null)};Pc.prototype.unmount=Nf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;gs(function(){jc(null,t,null,null)}),e[Wr]=null}};function Pc(t){this._internalRoot=t}Pc.prototype.unstable_scheduleHydration=function(t){if(t){var e=wy();t={blockedOn:null,target:t,priority:e};for(var r=0;r<un.length&&e!==0&&e<un[r].priority;r++);un.splice(r,0,t),r===0&&by(t)}};function jf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Ac(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Nm(){}function QS(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=Ql(o);i.call(c)}}var o=B0(e,n,t,0,null,!1,!1,"",Nm);return t._reactRootContainer=o,t[Wr]=o.current,Bo(t.nodeType===8?t.parentNode:t),gs(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=Ql(l);a.call(c)}}var l=Tf(t,0,!1,null,null,!1,!1,"",Nm);return t._reactRootContainer=l,t[Wr]=l.current,Bo(t.nodeType===8?t.parentNode:t),gs(function(){jc(e,l,r,n)}),l}function Oc(t,e,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Ql(o);a.call(l)}}jc(e,o,t,s)}else o=QS(r,e,t,s,n);return Ql(o)}vy=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=po(e.pendingLanes);r!==0&&(Gh(e,r|1),St(e,Fe()),!(de&6)&&(ji=Fe()+500,Bn()))}break;case 13:gs(function(){var n=Hr(t,1);if(n!==null){var s=ft();lr(n,t,1,s)}}),Rf(t,1)}};Jh=function(t){if(t.tag===13){var e=Hr(t,134217728);if(e!==null){var r=ft();lr(e,t,134217728,r)}Rf(t,134217728)}};yy=function(t){if(t.tag===13){var e=Nn(t),r=Hr(t,e);if(r!==null){var n=ft();lr(r,t,e,n)}Rf(t,e)}};wy=function(){return we};xy=function(t,e){var r=we;try{return we=t,e()}finally{we=r}};fd=function(t,e,r){switch(e){case"input":if(od(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=Sc(n);if(!s)throw Error(P(90));Zv(n),od(n,s)}}}break;case"textarea":Xv(t,r);break;case"select":e=r.value,e!=null&&ii(t,!!r.multiple,e,!1)}};oy=Sf;ay=gs;var XS={usingClientEntryPoint:!1,Events:[va,Zs,Sc,sy,iy,Sf]},ao={findFiberByHostInstance:es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ek={bundleType:ao.bundleType,version:ao.version,rendererPackageName:ao.rendererPackageName,rendererConfig:ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=uy(t),t===null?null:t.stateNode},findFiberByHostInstance:ao.findFiberByHostInstance||ZS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Va=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Va.isDisabled&&Va.supportsFiber)try{wc=Va.inject(ek),Er=Va}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XS;It.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jf(e))throw Error(P(200));return YS(t,e,null,r)};It.createRoot=function(t,e){if(!jf(t))throw Error(P(299));var r=!1,n="",s=z0;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Tf(t,1,!1,null,null,r,!1,n,s),t[Wr]=e.current,Bo(t.nodeType===8?t.parentNode:t),new Nf(e)};It.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(P(188)):(t=Object.keys(t).join(","),Error(P(268,t)));return t=uy(e),t=t===null?null:t.stateNode,t};It.flushSync=function(t){return gs(t)};It.hydrate=function(t,e,r){if(!Ac(e))throw Error(P(200));return Oc(null,t,e,!0,r)};It.hydrateRoot=function(t,e,r){if(!jf(t))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=z0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=B0(e,null,t,1,r??null,s,!1,i,o),t[Wr]=e.current,Bo(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 Pc(e)};It.render=function(t,e,r){if(!Ac(e))throw Error(P(200));return Oc(null,t,e,!1,r)};It.unmountComponentAtNode=function(t){if(!Ac(t))throw Error(P(40));return t._reactRootContainer?(gs(function(){Oc(null,null,t,!1,function(){t._reactRootContainer=null,t[Wr]=null})}),!0):!1};It.unstable_batchedUpdates=Sf;It.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Ac(r))throw Error(P(200));if(t==null||t._reactInternals===void 0)throw Error(P(38));return Oc(t,e,r,!1,n)};It.version="18.3.1-next-f1338f8080-20240426";function W0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(W0)}catch(t){console.error(t)}}W0(),Wv.exports=It;var ks=Wv.exports;const H0=Pv(ks);var V0,jm=ks;V0=jm.createRoot,jm.hydrateRoot;var Ic=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(){}},Lc=typeof window>"u"||"Deno"in globalThis;function er(){}function tk(t,e){return typeof t=="function"?t(e):t}function rk(t){return typeof t=="number"&&t>=0&&t!==1/0}function nk(t,e){return Math.max(t+(e||0)-Date.now(),0)}function qd(t,e){return typeof t=="function"?t(e):t}function sk(t,e){return typeof t=="function"?t(e):t}function Pm(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==Pf(o,e.options))return!1}else if(!Zo(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Am(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(Yo(e.options.mutationKey)!==Yo(i))return!1}else if(!Zo(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)||Yo)(t)}function Yo(t){return JSON.stringify(t,(e,r)=>Kd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Zo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Zo(t[r],e[r])):!1}function q0(t,e){if(t===e)return t;const r=Om(t)&&Om(e);if(r||Kd(t)&&Kd(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<o;u++){const h=r?u:i[u];
vendor: 6,633 bytes, line 40
40(!r&&l.has(h)||r)&&t[h]===void 0&&e[h]===void 0?(a[h]=void 0,c++):(a[h]=q0(t[h],e[h]),a[h]===t[h]&&t[h]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function Om(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Kd(t){if(!Im(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Im(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Im(t){return Object.prototype.toString.call(t)==="[object Object]"}function ik(t){return new Promise(e=>{setTimeout(e,t)})}function ok(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?q0(t,e):e}function ak(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function lk(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var Af=Symbol();function K0(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Af?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ss,pn,gi,Sv,ck=(Sv=class extends Ic{constructor(){super();pe(this,ss);pe(this,pn);pe(this,gi);ne(this,gi,e=>{if(!Lc&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,pn)||this.setEventListener(R(this,gi))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,pn))==null||e.call(this),ne(this,pn,void 0))}setEventListener(e){var r;ne(this,gi,e),(r=R(this,pn))==null||r.call(this),ne(this,pn,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){R(this,ss)!==e&&(ne(this,ss,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof R(this,ss)=="boolean"?R(this,ss):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ss=new WeakMap,pn=new WeakMap,gi=new WeakMap,Sv),G0=new ck,vi,mn,yi,kv,uk=(kv=class extends Ic{constructor(){super();pe(this,vi,!0);pe(this,mn);pe(this,yi);ne(this,yi,e=>{if(!Lc&&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(){R(this,mn)||this.setEventListener(R(this,yi))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,mn))==null||e.call(this),ne(this,mn,void 0))}setEventListener(e){var r;ne(this,yi,e),(r=R(this,mn))==null||r.call(this),ne(this,mn,e(this.setOnline.bind(this)))}setOnline(e){R(this,vi)!==e&&(ne(this,vi,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return R(this,vi)}},vi=new WeakMap,mn=new WeakMap,yi=new WeakMap,kv),Xl=new uk;function dk(){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 hk(t){return Math.min(1e3*2**t,3e4)}function J0(t){return(t??"online")==="online"?Xl.isOnline():!0}var Y0=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Ou(t){return t instanceof Y0}function Z0(t){let e=!1,r=0,n=!1,s;const i=dk(),o=m=>{var x;n||(p(new Y0(m)),(x=t.abort)==null||x.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>G0.isFocused()&&(t.networkMode==="always"||Xl.isOnline())&&t.canRun(),u=()=>J0(t.networkMode)&&t.canRun(),h=m=>{var x;n||(n=!0,(x=t.onSuccess)==null||x.call(t,m),s==null||s(),i.resolve(m))},p=m=>{var x;n||(n=!0,(x=t.onError)==null||x.call(t,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var x;s=w=>{(n||c())&&m(w)},(x=t.onPause)==null||x.call(t)}).then(()=>{var m;s=void 0,n||(m=t.onContinue)==null||m.call(t)}),b=()=>{if(n)return;let m;const x=r===0?t.initialPromise:void 0;try{m=x??t.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(h).catch(w=>{var k;if(n)return;const g=t.retry??(Lc?0:3),v=t.retryDelay??hk,_=typeof v=="function"?v(r,w):v,S=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,w);if(e||!S){p(w);return}r++,(k=t.onFail)==null||k.call(t,r,w),ik(_).then(()=>c()?void 0:f()).then(()=>{e?p(w):b()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?b():f().then(b),i)}}var fk=t=>setTimeout(t,0);function pk(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=fk;const i=a=>{e?t.push(a):s(()=>{r(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var ht=pk(),is,Ev,Q0=(Ev=class{constructor(){pe(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rk(this.gcTime)&&ne(this,is,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Lc?1/0:5*60*1e3))}clearGcTimeout(){R(this,is)&&(clearTimeout(R(this,is)),ne(this,is,void 0))}},is=new WeakMap,Ev),wi,os,Mt,as,at,ha,ls,rr,Or,Cv,mk=(Cv=class extends Q0{constructor(e){super();pe(this,rr);pe(this,wi);pe(this,os);pe(this,Mt);pe(this,as);pe(this,at);pe(this,ha);pe(this,ls);ne(this,ls,!1),ne(this,ha,e.defaultOptions),this.setOptions(e.options),this.observers=[],ne(this,as,e.client),ne(this,Mt,R(this,as).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ne(this,wi,vk(this.options)),this.state=e.state??R(this,wi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,at))==null?void 0:e.promise}setOptions(e){this.options={...R(this,ha),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Mt).remove(this)}setData(e,r){const n=ok(this.state.data,e,this.options);return st(this,rr,Or).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){st(this,rr,Or).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=R(this,at))==null?void 0:n.promise;return(s=R(this,at))==null||s.cancel(e),r?r.then(er).catch(er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,wi))}isActive(){return this.observers.some(e=>sk(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Af||this.state.dataUpdateCount+this.state.errorUpdate
40Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>qd(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:!nk(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,at))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,at))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,Mt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(R(this,at)&&(R(this,ls)?R(this,at).cancel({revert:!0}):R(this,at).cancelRetry()),this.scheduleGc()),R(this,Mt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||st(this,rr,Or).call(this,{type:"invalidate"})}fetch(e,r){var c,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,at))return R(this,at).continueRetry(),R(this,at).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:()=>(ne(this,ls,!0),n.signal)})},i=()=>{const p=K0(this.options,r),b=(()=>{const m={client:R(this,as),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return ne(this,ls,!1),this.options.persister?this.options.persister(p,b,this):p(b)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,as),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,os,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&st(this,rr,Or).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,b,m,x;Ou(p)&&p.silent||st(this,rr,Or).call(this,{type:"error",error:p}),Ou(p)||((b=(f=R(this,Mt).config).onError)==null||b.call(f,p,this),(x=(m=R(this,Mt).config).onSettled)==null||x.call(m,this.state.data,p,this)),this.scheduleGc()};return ne(this,at,Z0({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,b,m,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(w){l(w);return}(b=(f=R(this,Mt).config).onSuccess)==null||b.call(f,p,this),(x=(m=R(this,Mt).config).onSettled)==null||x.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{st(this,rr,Or).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{st(this,rr,Or).call(this,{type:"pause"})},onContinue:()=>{st(this,rr,Or).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),R(this,at).start()}},wi=new WeakMap,os=new WeakMap,Mt=new WeakMap,as=new WeakMap,at=new WeakMap,ha=new WeakMap,ls=new WeakMap,rr=new WeakSet,Or=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,...gk(n.data,this.options),fetchMeta:e.meta??null};case"success":return ne(this,os,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 Ou(s)&&s.revert&&R(this,os)?{...R(this,os),fetchStatus:"idle"}
vendor: 3,703 bytes, line 40
40:{...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),ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,Mt).notify({query:this,type:"updated",action:e})})},Cv);function gk(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:J0(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function vk(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 yr,Tv,yk=(Tv=class extends Ic{constructor(e={}){super();pe(this,yr);this.config=e,ne(this,yr,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??Pf(s,r);let o=this.get(i);return o||(o=new mk({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){R(this,yr).has(e.queryHash)||(R(this,yr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=R(this,yr).get(e.queryHash);r&&(e.destroy(),r===e&&R(this,yr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ht.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,yr).get(e)}getAll(){return[...R(this,yr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Pm(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>Pm(e,n)):r}notify(e){ht.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},yr=new WeakMap,Tv),wr,ut,cs,xr,sn,Rv,wk=(Rv=class extends Q0{constructor(e){super();pe(this,xr);pe(this,wr);pe(this,ut);pe(this,cs);this.mutationId=e.mutationId,ne(this,ut,e.mutationCache),ne(this,wr,[]),this.state=e.state||xk(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,wr).includes(e)||(R(this,wr).push(e),this.clearGcTimeout(),R(this,ut).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ne(this,wr,R(this,wr).filter(r=>r!==e)),this.scheduleGc(),R(this,ut).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,wr).length||(this.state.status==="pending"?this.scheduleGc():R(this,ut).remove(this))}continue(){var e;return((e=R(this,cs))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,h,p,f,b,m,x,w,g,v,_,S,k,E,T;const r=()=>{st(this,xr,sn).call(this,{type:"continue"})};ne(this,cs,Z0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(j,A)=>{st(this,xr,sn).call(this,{type:"failed",failureCount:j,error:A})},onPause:()=>{st(this,xr,sn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,ut).canRun(this)}));const n=this.state.status==="pending",s=!R(this,cs).canStart();try{if(n)r();else{st(this,xr,sn).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=R(this,ut).config).onMutate)==null?void 0:o.call(i,e,this));
40const A=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));A!==this.state.context&&st(this,xr,sn).call(this,{type:"pending",context:A,variables:e,isPaused:s})}const j=await R(this,cs).start();return await((u=(c=R(this,ut).config).onSuccess)==null?void 0:u.call(c,j,e,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,j,e,this.state.context)),await((b=(f=R(this,ut).config).onSettled)==null?void 0:b.call(f,j,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,j,null,e,this.state.context)),st(this,xr,sn).call(this,{type:"success",data:j}),j}catch(j){try{throw await((g=(w=R(this,ut).config).onError)==null?void 0:g.call(w,j,e,this.state.context,this)),await((_=(v=this.options).onError)==null?void 0:_.call(v,j,e,this.state.context)),await((k=(S=R(this,ut).config).onSettled)==null?void 0:k.call(S,void 0,j,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,j,e,this.state.context)),j}finally{st(this,xr,sn).call(this,{type:"error",error:j})}}finally{R(this,ut).runNext(this)}}},wr=new WeakMap,ut=new WeakMap,cs=new WeakMap,xr=new WeakSet,sn=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),ht.batch(()=>{R(this,wr).forEach(n=>{n.onMutationUpdate(e)}),R(this,ut).notify({mutation:this,type:"updated",action:e})})},Rv);function xk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mr,nr,fa,Nv,bk=(Nv=class extends Ic{constructor(e={}){super();pe(this,Mr);pe(this,nr);pe(this,fa);this.config=e,ne(this,Mr,new Set),ne(this,nr,new Map),ne(this,fa,0)}build(e,r,n){const s=new wk({mutationCache:this,mutationId:++Ra(this,fa)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){R(this,Mr).add(e);const r=qa(e);if(typeof r=="string"){const n=R(this,nr).get(r);n?n.push(e):R(this,nr).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,Mr).delete(e)){const r=qa(e);if(typeof r=="string"){const n=R(this,nr).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&R(this,nr).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=qa(e);if(typeof r=="string"){const n=R(this,nr).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=qa(e);if(typeof r=="string"){const s=(n=R(this,nr).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(){ht.batch(()=>{R(this,Mr).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,Mr).clear(),R(this,nr).clear()})}getAll(){return Array.from(R(this,Mr))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Am(r,n))}findAll(e={}){return this.getAll().filter(r=>Am(e,r))}notify(e){ht.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>
vendor: 4,438 bytes, line 40
40r.state.isPaused);return ht.batch(()=>Promise.all(e.map(r=>r.continue().catch(er))))}},Mr=new WeakMap,nr=new WeakMap,fa=new WeakMap,Nv);function qa(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Lm(t){return{onFetch:(e,r)=>{var u,h,p,f,b;const n=e.options,s=(p=(h=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],o=((b=e.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const x=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},w=K0(e.options,e.fetchOptions),g=async(v,_,S)=>{if(m)return Promise.reject();if(_==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:_,direction:S?"backward":"forward",meta:e.options.meta};return x(V),V})(),T=await w(E),{maxPages:j}=e.options,A=S?lk:ak;return{pages:A(v.pages,T,j),pageParams:A(v.pageParams,_,j)}};if(s&&i.length){const v=s==="backward",_=v?_k:Dm,S={pages:i,pageParams:o},k=_(n,S);a=await g(S,k,v)}else{const v=t??i.length;do{const _=l===0?o[0]??n.initialPageParam:Dm(n,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<v)}return a};e.options.persister?e.fetchFn=()=>{var m,x;return(x=(m=e.options).persister)==null?void 0:x.call(m,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=c}}}function Dm(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 _k(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 De,gn,vn,xi,bi,yn,_i,Si,jv,Sk=(jv=class{constructor(t={}){pe(this,De);pe(this,gn);pe(this,vn);pe(this,xi);pe(this,bi);pe(this,yn);pe(this,_i);pe(this,Si);ne(this,De,t.queryCache||new yk),ne(this,gn,t.mutationCache||new bk),ne(this,vn,t.defaultOptions||{}),ne(this,xi,new Map),ne(this,bi,new Map),ne(this,yn,0)}mount(){Ra(this,yn)._++,R(this,yn)===1&&(ne(this,_i,G0.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,De).onFocus())})),ne(this,Si,Xl.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,De).onOnline())})))}unmount(){var t,e;Ra(this,yn)._--,R(this,yn)===0&&((t=R(this,_i))==null||t.call(this),ne(this,_i,void 0),(e=R(this,Si))==null||e.call(this),ne(this,Si,void 0))}isFetching(t){return R(this,De).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,gn).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,De).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=R(this,De).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(qd(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return R(this,De).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=R(this,De).get(n.queryHash),i=s==null?void 0:s.state.data,o=tk(e,i);if(o!==void 0)return R(this,De).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return ht.batch(()=>R(this,De).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,De).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=R(this,De);ht.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=R(this,De);return ht.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=ht.batch(()=>R(this,De).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(er).catch(er)}invalidateQueries(t,e={}){return ht.batch(()=>(R(this,De).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=ht.batch(()=>R(this,De).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(er)),s.state.fetchStatus==="paused"?Promise.resolve():i}
40));return Promise.all(n).then(er)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=R(this,De).build(this,e);return r.isStaleByTime(qd(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(er).catch(er)}fetchInfiniteQuery(t){return t.behavior=Lm(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(er).catch(er)}ensureInfiniteQueryData(t){return t.behavior=Lm(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Xl.isOnline()?R(this,gn).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,De)}getMutationCache(){return R(this,gn)}getDefaultOptions(){return R(this,vn)}setDefaultOptions(t){ne(this,vn,t)}setQueryDefaults(t,e){R(this,xi).set(Yo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,xi).values()],r={};return e.forEach(n=>{Zo(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){R(this,bi).set(Yo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,bi).values()],r={};return e.forEach(n=>{Zo(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,vn).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===Af&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,vn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,De).clear(),R(this,gn).clear()}},De=new WeakMap,gn=new WeakMap,vn=new WeakMap,xi=new WeakMap,bi=new WeakMap,yn=new WeakMap,_i=new WeakMap,Si=new WeakMap,jv),kk=y.createContext(void 0),Ek=({client:t,children:e})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),d.jsx(kk.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 Qo(){return Qo=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},Qo.apply(this,arguments)}var bn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(bn||(bn={}));const $m="popstate";function Ck(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:o,hash:a}=n.location;return Gd("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:ec(s)}return Rk(e,r,null,t)}function He(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function X0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Tk(){return Math.random().toString(36).substr(2,8)}function Mm(t,e){return{usr:t.state,key:t.key,idx:e}}function Gd(t,e,r,n){return r===void 0&&(r=null),Qo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Wi(e):e,{state:r,key:e&&e.key||n||Tk()})}function ec(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 Wi(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 Rk(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=bn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Qo({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=bn.Pop;let x=u(),w=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:w})}function p(x,w){a=bn.Push;let g=Gd(m.location,x,w);c=u()+1;let v=Mm(g,c),_=m.createHref(g);try{o.pushState(v,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:m.location,delta:1})}function f(x,w){a=bn.Replace;let g=Gd(m.location,x,w);c=u();let v=Mm(g,c),_=m.createHref(g);o.replaceState(v,"",_),i&&l&&l({action:a,location:m.location,delta:0})}function b(x){let w=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof x=="str
49ing"?x:ec(x);return g=g.replace(/ $/,"%20"),He(w,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,w)}let m={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener($m,h),l=x,()=>{s.removeEventListener($m,h),l=null}},createHref(x){return e(s,x)},createURL:b,encodeLocation(x){let w=b(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:f,go(x){return o.go(x)}};return m}var Um;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Um||(Um={}));function Nk(t,e,r){return r===void 0&&(r="/"),jk(t,e,r,!1)}function jk(t,e,r,n){let s=typeof e=="string"?Wi(e):e,i=Of(s.pathname||"/",r);if(i==null)return null;let o=ew(t);Pk(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=zk(i);a=Fk(o[l],c,n)}return a}function ew(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(He(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Pn([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(He(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),ew(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:Mk(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of tw(i.path))s(i,o,l)}),e}function tw(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 o=tw(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Pk(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Uk(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ak=/^:[\w-]+$/,Ok=3,Ik=2,Lk=1,Dk=10,$k=-2,Fm=t=>t==="*";function Mk(t,e){let r=t.split("/"),n=r.length;return r.some(Fm)&&(n+=$k),e&&(n+=Ik),r.filter(s=>!Fm(s)).reduce((s,i)=>s+(Ak.test(i)?Ok:i===""?Lk:Dk),n)}function Uk(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 Fk(t,e,r){let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,u=i==="/"?e:e.slice(i.length)||"/",h=Bm({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!h&&c&&r&&!n[n.length-1].route.index&&(h=Bm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!h)return null;
vendor: 9,180 bytes, lines 49-58
49Object.assign(s,h.params),o.push({params:s,pathname:Pn([i,h.pathname]),pathnameBase:qk(Pn([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=Pn([i,h.pathnameBase]))}return o}function Bm(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Bk(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,u,h)=>{let{paramName:p,isOptional:f}=u;if(p==="*"){let m=a[h]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const b=a[h];return f&&!b?c[p]=void 0:c[p]=(b||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function Bk(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),X0(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,(o,a,l)=>(n.push({paramName:a,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 zk(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return X0(!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 Of(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 Wk(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Wi(t):t;return{pathname:r?r.startsWith("/")?r:Hk(r,e):e,search:Kk(n),hash:Gk(s)}}function Hk(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 Iu(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 Vk(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function rw(t,e){let r=Vk(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function nw(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Wi(t):(s=Qo({},t),He(!s.pathname||!s.pathname.includes("?"),Iu("?","pathname","search",s)),He(!s.pathname||!s.pathname.includes("#"),Iu("#","pathname","hash",s)),He(!s.search||!s.search.includes("#"),Iu("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let h=e.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}a=h>=0?e[h]:"/"}let l=Wk(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Pn=t=>t.join("/").replace(/\/\/+/g,"/"),qk=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Kk=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Gk=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Jk(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const sw=["post","put","patch","delete"];new Set(sw);const Yk=["get",...sw];new Set(Yk);/** 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 Xo(){return Xo=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},Xo.apply(this,arguments)}const If=y.createContext(null),Zk=y.createContext(null),Es=y.createContext(null),Dc=y.createContext(null),Cs=y.createContext({outlet:null,matches:[],isDataRoute:!1}),iw=y.createContext(null);function Qk(t,e){let{relative:r}=e===void 0?{}:e;wa()||He(!1);let{basename:n,navigator:s}=y.useContext(Es),{hash:i,pathname:o,search:a}=lw(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Pn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function wa(){return y.useContext(Dc)!=null}function Hi(){return wa()||He(!1),y.useContext(Dc).location}function ow(t){y.useContext(Es).static||y.useLayoutEffect(t)}function aw(){let{isDataRoute:t}=y.useContext(Cs);return t?dE():Xk()}function Xk(){wa()||He(!1);let t=y.useContext(If),{basename:e,future:r,navigator:n}=y.useContext(Es),{matches:s}=y.useContext(Cs),{pathname:i}=Hi(),o=JSON.stringify(rw(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return ow(()=>{a.current=!0}),y.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let h=nw(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:Pn([e,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[e,n,o,i,t])}function lw(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=y.useContext(Es),{matches:s}=y.useContext(Cs),{pathname:i}=Hi(),o=JSON.stringify(rw(s,n.v7_relativeSplatPath));return y.useMemo(()=>nw(t,JSON.parse(o),i,r==="path"),[t,o,i,r])}function eE(t,e){return tE(t,e)}function tE(t,e,r,n){wa()||He(!1);let{navigator:s}=y.useContext(Es),{matches:i}=y.useContext(Cs),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Hi(),u;if(e){var h;let x=typeof e=="string"?Wi(e):e;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||He(!1),u=x}else u=c;let p=u.pathname||"/",f=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=Nk(t,{pathname:f}),m=oE(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Pn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Pn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return e&&m?y.createElement(Dc.Provider,{value:{location:Xo({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:bn.Pop}},m):m}function rE(){let t=uE(),e=Jk(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 y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:s},r):null,null)}const nE=y.createElement(rE,null);class sE extends y.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?y.createElement(Cs.Provider,{value:this.props.routeContext},y.createElement(iw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function iE(t){let{routeContext:e,match:r,children:n}=t,s=y.useContext(If);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Cs.Provider,{value:e},n)}function oE(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 o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||He(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let h=o[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=u),h.route.id){let{loaderData:p,errors:f}=r,b=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||b){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,p)=>{let f,b=!1,m=null,x=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||nE,l&&(c<0&&p===0?(b=!0,x=null):c===p&&(b=!0,x=h.route.hydrateFallbackElement||null)));let w=e.concat(o.slice(0,p+1)),g=()=>{let v;return f?v=m:b?v=x:h.route.Component?v=y.createElement(h.route.Component,null):h.route.element?v=h.route.element:v=u,y.createElement(iE,{match:h,routeC
58ontext:{outlet:u,matches:w,isDataRoute:r!=null},children:v})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?y.createElement(sE,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:g(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):g()},null)}var cw=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(cw||{}),tc=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}(tc||{});function aE(t){let e=y.useContext(If);return e||He(!1),e}function lE(t){let e=y.useContext(Zk);return e||He(!1),e}function cE(t){let e=y.useContext(Cs);return e||He(!1),e}function uw(t){let e=cE(),r=e.matches[e.matches.length-1];return r.route.id||He(!1),r.route.id}function uE(){var t;let e=y.useContext(iw),r=lE(tc.UseRouteError),n=uw(tc.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function dE(){let{router:t}=aE(cw.UseNavigateStable),e=uw(tc.UseNavigateStable),r=y.useRef(!1);return ow(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Xo({fromRouteId:e},i)))},[t,e])}function hE(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Be(t){He(!1)}function fE(t){let{basename:e="/",children:r=null,location:n,navigationType:s=bn.Pop,navigator:i,static:o=!1,future:a}=t;wa()&&He(!1);let l=e.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:o,future:Xo({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Wi(n));let{pathname:u="/",search:h="",hash:p="",state:f=null,key:b="default"}=n,m=y.useMemo(()=>{let x=Of(u,l);return x==null?null:{location:{pathname:x,search:h,hash:p,state:f,key:b},navigationType:s}},[l,u,h,p,f,b,s]);return m==null?null:y.createElement(Es.Provider,{value:c},y.createElement(Dc.Provider,{children:r,value:m}))}function pE(t){let{children:e,location:r}=t;return eE(Jd(e),r)}new Promise(()=>{});function Jd(t,e){e===void 0&&(e=[]);let r=[];return y.Children.forEach(t,(n,s)=>{if(!y.isValidElement(n))return;let i=[...e,s];if(n.type===y.Fragment){r.push.apply(r,Jd(n.props.children,i));return}n.type!==Be&&He(!1),!n.props.index||!n.props.children||He(!1);let o={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&&(o.children=Jd(n.props.children,i)),r.push(o)}),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 Yd(){return Yd=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},Yd.apply(this,arguments)}function mE(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 gE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function vE(t,e){return t.button===0&&(!e||e==="_self")&&!gE(t)}function Zd(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function yE(t,e){let r=Zd(t);return e&&e.forEach((n,s)=>{r.has(s)||e.getAll(s).forEach(i=>{r.append(s,i)})}),r}const wE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],xE="6";try{window.__reactRouterVersion=xE}catch{}const bE="startTransition",zm=Uh[bE];function _E(t){let{basename:e,children:r,future:n,window:s}=t,i=y.useRef();i.current==null&&(i.current=Ck({window:s,v5Compat:!0}));let o=i.current,[a,l]=y.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=y.useCallback(h=>{c&&zm?zm(()=>l(h)):l(h)},[l,c]);return y.useLayoutEffect(()=>o.listen(u),[o,u]),y.useEffect(()=>hE(n),[n]),y.createElement(fE,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const SE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ka=y.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h}=e,p=mE(e,wE),{basename:f}=y.useContext(Es),b,m=!1;if(typeof c=="string"&&kE.test(c)&&(b=c,SE))try{let v=new URL(window.location.href),_=c.startsWith("//")?new URL(v.protocol+c):new URL(c),S=Of(_.pathname,f);
67_.origin===v.origin&&S!=null?c=S+_.search+_.hash:m=!0}catch{}let x=Qk(c,{relative:s}),w=EE(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:h});function g(v){n&&n(v),v.defaultPrevented||w(v)}return y.createElement("a",Yd({},p,{href:b||x,onClick:m||i?n:g,ref:r,target:l}))});var Wm;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Wm||(Wm={}));var Hm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Hm||(Hm={}));function EE(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=aw(),c=Hi(),u=lw(t,{relative:o});return y.useCallback(h=>{if(vE(h,r)){h.preventDefault();let p=n!==void 0?n:ec(c)===ec(u);l(t,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,n,s,r,t,i,o,a])}function CE(t){let e=y.useRef(Zd(t)),r=y.useRef(!1),n=Hi(),s=y.useMemo(()=>yE(n.search,r.current?null:e.current),[n.search]),i=aw(),o=y.useCallback((a,l)=>{const c=Zd(typeof a=="function"?a(s):a);r.current=!0,i("?"+c,l)},[i,s]);return[s,o]}var Vm=["light","dark"],TE="(prefers-color-scheme: dark)",RE=y.createContext(void 0),NE={setTheme:t=>{},themes:[]},jE=()=>{var t;return(t=y.useContext(RE))!=null?t:NE};y.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?Vm.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(b,m=!1,x=!0)=>{let w=o?o[b]:b,g=m?b+"|| ''":`'${w}'`,v="";return s&&x&&!m&&Vm.includes(b)&&(v+=`d.style.colorScheme = '${b}';`),r==="class"?m||w?v+=`c.add(${g})`:v+="null":w&&(v+=`d[s](n,${g})`),v},f=t?`!function(){${u}${p(t)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${TE}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return y.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var PE=t=>{switch(t){case"success":return IE;case"info":return DE;case"warning":return LE;case"error":return $E;default:return null}},AE=Array(12).fill(0),OE=({visible:t,className:e})=>I.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},I.createElement("div",{className:"sonner-spinner"},AE.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),IE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),LE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.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"})),DE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),$E=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),ME=I.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"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),UE=()=>{let[t,e]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},Qd=1,FE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>
67{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:Qd++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:r}),{...a,...t,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,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,o=n.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(zE(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||Qd++;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}},vt=new FE,BE=(t,e)=>{let r=(e==null?void 0:e.id)||Qd++;return vt.addToast({title:t,...e,id:r}),r},zE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",WE=BE,HE=()=>vt.toasts,VE=()=>vt.getActiveToasts();Object.assign(WE,{success:vt.success,info:vt.info,warning:vt.warning,error:vt.error,custom:vt.custom,message:vt.message,promise:vt.promise,dismiss:vt.dismiss,loading:vt.loading},{getHistory:HE,getToasts:VE});function qE(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))}qE(`: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 Ga(t){return t.label!==void 0}var KE=3,GE="32px",JE="16px",qm=4e3,YE=356,ZE=14,QE=20,XE=200;function Yt(...t){return t.filter(Boolean).join(" ")}function eC(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var tC=t=>{var e,r,n,s,i,o,a,l,c,u,h;let{invert:p,toast:f,unstyled:b,interacting:m,setHeights:x,visibleToasts:w,heights:g,index:v,toasts:_,expanded:S,removeToast:k,defaultRichColors:E,closeButton:T,style:j,cancelButtonStyle:A,actionButtonStyle:V,className:D="",descriptionClassName:J="",duration:L,position:Q,gap:W,loadingIcon:G,expandByDefault:C,classNames:N,icons:$,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:q}
68=t,[se,te]=I.useState(null),[Se,Ie]=I.useState(null),[M,ye]=I.useState(!1),[Le,ve]=I.useState(!1),[ce,fe]=I.useState(!1),[nt,Dt]=I.useState(!1),[Hn,Zr]=I.useState(!1),[Vn,Qi]=I.useState(0),[Ts,mp]=I.useState(0),Xi=I.useRef(f.duration||L||qm),gp=I.useRef(null),qn=I.useRef(null),x_=v===0,b_=v+1<=w,$t=f.type,Rs=f.dismissible!==!1,__=f.className||"",S_=f.descriptionClassName||"",Ta=I.useMemo(()=>g.findIndex(re=>re.toastId===f.id)||0,[g,f.id]),k_=I.useMemo(()=>{var re;return(re=f.closeButton)!=null?re:T},[f.closeButton,T]),vp=I.useMemo(()=>f.duration||L||qm,[f.duration,L]),su=I.useRef(0),Ns=I.useRef(0),yp=I.useRef(0),js=I.useRef(null),[E_,C_]=Q.split("-"),wp=I.useMemo(()=>g.reduce((re,xe,Re)=>Re>=Ta?re:re+xe.height,0),[g,Ta]),xp=UE(),T_=f.invert||p,iu=$t==="loading";Ns.current=I.useMemo(()=>Ta*W+wp,[Ta,wp]),I.useEffect(()=>{Xi.current=vp},[vp]),I.useEffect(()=>{ye(!0)},[]),I.useEffect(()=>{let re=qn.current;if(re){let xe=re.getBoundingClientRect().height;return mp(xe),x(Re=>[{toastId:f.id,height:xe,position:f.position},...Re]),()=>x(Re=>Re.filter(qt=>qt.toastId!==f.id))}},[x,f.id]),I.useLayoutEffect(()=>{if(!M)return;let re=qn.current,xe=re.style.height;re.style.height="auto";let Re=re.getBoundingClientRect().height;re.style.height=xe,mp(Re),x(qt=>qt.find(Kt=>Kt.toastId===f.id)?qt.map(Kt=>Kt.toastId===f.id?{...Kt,height:Re}:Kt):[{toastId:f.id,height:Re,position:f.position},...qt])},[M,f.title,f.description,x,f.id]);let Qr=I.useCallback(()=>{ve(!0),Qi(Ns.current),x(re=>re.filter(xe=>xe.toastId!==f.id)),setTimeout(()=>{k(f)},XE)},[f,k,x,Ns]);I.useEffect(()=>{if(f.promise&&$t==="loading"||f.duration===1/0||f.type==="loading")return;let re;return S||m||q&&xp?(()=>{if(yp.current<su.current){let xe=new Date().getTime()-su.current;Xi.current=Xi.current-xe}yp.current=new Date().getTime()})():Xi.current!==1/0&&(su.current=new Date().getTime(),re=setTimeout(()=>{var xe;(xe=f.onAutoClose)==null||xe.call(f,f),Qr()},Xi.current)),()=>clearTimeout(re)},[S,m,f,$t,q,xp,Qr]),I.useEffect(()=>{f.delete&&Qr()},[Qr,f.delete]);function R_(){var re,xe,Re;return $!=null&&$.loading?I.createElement("div",{className:Yt(N==null?void 0:N.loader,(re=f==null?void 0:f.classNames)==null?void 0:re.loader,"sonner-loader"),"data-visible":$t==="loading"},$.loading):G?I.createElement("div",{className:Yt(N==null?void 0:N.loader,(xe=f==null?void 0:f.classNames)==null?void 0:xe.loader,"sonner-loader"),"data-visible":$t==="loading"},G):I.createElement(OE,{className:Yt(N==null?void 0:N.loader,(Re=f==null?void 0:f.classNames)==null?void 0:Re.loader),visible:$t==="loading"})}return I.createElement("li",{tabIndex:0,ref:qn,className:Yt(D,__,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[$t],(r=f==null?void 0:f.classNames)==null?void 0:r[$t]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:E,"data-styled":!(f.jsx||f.unstyled||b),"data-mounted":M,"data-promise":!!f.promise,"data-swiped":Hn,"data-removed":Le,"data-visible":b_,"data-y-position":E_,"data-x-position":C_,"data-index":v,"data-front":x_,"data-swiping":ce,"data-dismissible":Rs,"data-type":$t,"data-invert":T_,"data-swipe-out":nt,"data-swipe-direction":Se,"data-expanded":!!(S||C&&M),style:{"--index":v,"--toasts-before":v,"--z-index":_.length-v,"--offset":`${Le?Vn:Ns.current}px`,"--initial-height":C?"auto":`${Ts}px`,...j,...f.style},onDragEnd:()=>{fe(!1),te(null),js.current=null},onPointerDown:re=>{iu||!Rs||(gp.current=new Date,Qi(Ns.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(fe(!0),js.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,xe,Re,qt;if(nt||!Rs)return;js.current=null;let Kt=Number(((re=qn.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Xr=Number(((xe=qn.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Kn=new Date().getTime()-((Re=gp.current)==null?void 0:Re.getTime()),Gt=se==="x"?Kt:Xr,en=Math.abs(Gt)/Kn;if(Math.abs(Gt)>=QE||en>.11){Qi(Ns.current),(qt=f.onDismiss)==null||qt.call(f,f),Ie(se==="x"?Kt>0?"right":"left":Xr>0?"down":"up"),Qr(),Dt(!0),Zr(!1);return}fe(!1),te(null)},onPointerMove:re=>{var xe,Re,qt,Kt;if(!js.current||!Rs||((xe=window.getSelection())==null?void 0:xe.toString().length)>0)return;let Xr=re.clientY-js.current.y,Kn=re.clientX-js.current.x,Gt=(Re=t.swipeDirections)!=null?Re:eC(Q);!se&&(Math.abs(Kn)>1||Math.abs(Xr)>1)&&te(Math.abs(Kn)>Math.abs(Xr)?"x":"y");let en={x:0,y:0};se==="y"?(Gt.includes("top")||Gt.includes("bottom"))&&(Gt.includes("top")&&Xr<0||Gt.includes("bottom")&&Xr>0)&&(en.y=Xr):se==="x"&&(Gt.includes("left")||Gt.includes("right"))&&(Gt.includes("left")&&Kn<0||Gt.includes("right")&&Kn>0)&&(en.x=Kn),(Math.abs(en.x)>0||Math.abs(en.y)>0)&&Zr(!0),(qt=qn.current)==null||qt.style.setProperty("--swipe-amount-x",`${en.x}px`),(Kt=qn.current)==null||Kt.style.setProperty("--swipe-amount-y",`${en.y}px`)}},k_&&!f.jsx?I.createElement("button",{"aria-label":Z,"data-disabled":iu,"data-close-button":!0,onClick:iu||!Rs?()=>{}:()=>{var re;Qr(),(re=f.onDismiss)==null||re.call(f,f)},className:Yt(N==null?void 0:N.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:ME):null,f.jsx||y.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:I.createElement(I.Fragment,null,$t||f.icon||f.promise?I.createElement("div",{"data-icon":"",className:Yt(N==null?void 0:N.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||R_():null,f.type!=="loading"?f.icon||($==null?void 0:$[$t])||PE($t):null):null,I.createElement("div",{"data-content":"",className:Yt(N==null?void 0:N.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Yt(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?I.createElement("div",{"data-description":"",className:Yt(J,S_,N==null?void 0:N.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),y.isValidElement(f.cancel)?f.cancel:f.cancel&&Ga(f.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||A,onClick:re=>{var xe,Re;Ga(f.cancel)&&Rs&&((Re=(xe=f.cancel).onClick)==null||Re.call(xe,re),Qr())},className:Yt(N==null?void 0:N.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,y.isValidElement(f.action)?f.action:f.action&&Ga(f.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||V,onClick:re=>{var xe,Re;Ga(f.action)&&((Re=(xe=f.action).onClick)==null||Re.call(xe,re),!re.defaultPrevented&&Qr())},className:Yt(N==null?void 0:N.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};
68function Km(){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 rC(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?JE:GE;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=a:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var nC=y.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:h,duration:p,style:f,visibleToasts:b=KE,toastOptions:m,dir:x=Km(),gap:w=ZE,loadingIcon:g,icons:v,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=t,[k,E]=I.useState([]),T=I.useMemo(()=>Array.from(new Set([n].concat(k.filter(q=>q.position).map(q=>q.position)))),[k,n]),[j,A]=I.useState([]),[V,D]=I.useState(!1),[J,L]=I.useState(!1),[Q,W]=I.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=I.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=I.useRef(null),$=I.useRef(!1),Z=I.useCallback(q=>{E(se=>{var te;return(te=se.find(Se=>Se.id===q.id))!=null&&te.delete||vt.dismiss(q.id),se.filter(({id:Se})=>Se!==q.id)})},[]);return I.useEffect(()=>vt.subscribe(q=>{if(q.dismiss){E(se=>se.map(te=>te.id===q.id?{...te,delete:!0}:te));return}setTimeout(()=>{H0.flushSync(()=>{E(se=>{let te=se.findIndex(Se=>Se.id===q.id);return te!==-1?[...se.slice(0,te),{...se[te],...q},...se.slice(te+1)]:[q,...se]})})})}),[]),I.useEffect(()=>{if(u!=="system"){W(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:se})=>{W(se?"dark":"light")})}catch{q.addListener(({matches:te})=>{try{W(te?"dark":"light")}catch(Se){console.error(Se)}})}},[u]),I.useEffect(()=>{k.length<=1&&D(!1)},[k]),I.useEffect(()=>{let q=se=>{var te,Se;s.every(Ie=>se[Ie]||se.code===Ie)&&(D(!0),(te=G.current)==null||te.focus()),se.code==="Escape"&&(document.activeElement===G.current||(Se=G.current)!=null&&Se.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),I.useEffect(()=>{if(G.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,$.current=!1)}},[G.current]),I.createElement("section",{ref:e,"aria-label":`${_} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((q,se)=>{var te;let[Se,Ie]=q.split("-");return k.length?I.createElement("ol",{key:q,dir:x==="auto"?Km():x,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":Q,"data-y-position":Se,"data-lifted":V&&k.length>1&&!i,"data-x-position":Ie,style:{"--front-toast-height":`${((te=j[0])==null?void 0:te.height)||0}px`,"--width":`${YE}px`,"--gap":`${w}px`,...f,...rC(l,c)},onBlur:M=>{$.current&&!M.currentTarget.contains(M.relatedTarget)&&($.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:M=>{M.target instanceof HTMLElement&&M.target.dataset.dismissible==="false"||$.current||($.current=!0,N.current=M.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{J||D(!1)},onDragEnd:()=>D(!1),onPointerDown:M=>{M.target instanceof HTMLElement&&M.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},k.filter(M=>!M.position&&se===0||M.position===q).map((M,ye)=>{var Le,ve;return I.createElement(tC,{key:M.id,icons:v,index:ye,toast:M,defaultRichColors:h,duration:(Le=m==null?void 0:m.duration)!=null?Le:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:b,closeButton:(ve=m==null?void 0:m.closeButton)!=null?ve:o,interacting:J,position:q,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:Z,toasts:k.filter(ce=>ce.position==M.position),heights:j.filter(ce=>ce.position==M.position),setHeights:A,expandByDefault:i,gap:w,loadingIcon:g,expanded:V,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const sC=({...t})=>{const{theme:e="system"}=jE();return d.jsx(nC,{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})},iC=1,oC=1e6;let Lu=0;function aC(){return Lu=(Lu+1)%Number.MAX_SAFE_INTEGER,Lu.toString()}const Du=new Map,Gm=t=>{if(Du.has(t))return;const e=setTimeout(()=>{Du.delete(t),No({type:"REMOVE_TOAST",toastId:t})},oC);Du.set(t,e)},lC=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,iC)};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?Gm(r):t.toasts.forEach(n=>{Gm(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)}}},Sl=[];let kl={toasts:[]};function No(t){kl=lC(kl,t),Sl.forEach(e=>{e(kl)})}function cC({...t}){const e=aC(),r=s=>No({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>No({type:"DISMISS_TOAST",toastId:e});return No({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function xa(){const[t,e]=y.useState(kl);return y.useEffect(()=>(Sl.push(e),()=>{const r=Sl.indexOf(e);r>-1&&Sl.splice(r,1)}),[t]),{...t,toast:cC,dismiss:r=>No({type:"DISMISS_TOAST",toastId:r})}}function oe(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 Jm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function dw(...t){return e=>{let r=!1;const n=t.map(s=>{const i=Jm(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():Jm(t[s],null)}}}}function Te(...t){return y.useCallback(dw(...t),t)}function uC(t,e){const r=y.createContext(e),n=i=>{const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return d.jsx(r.Provider,{value:l,children:o})};n.displayName=t+"Provider";function s(i){const o=y.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[n,s]}function Vi(t,e=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];const c=h=>{var w;const{scope:p,children:f,...b}=h,m=((w=p==null?void 0:p[t])==null?void 0:w[l])||a,x=y.useMemo(()=>b,Object.values(b));return d.jsx(m.Provider,{value:x,children:f})};c.displayName=i+"Provider";function u(h,p){var m;const f=((m=p==null?void 0:p[t])==null?void 0:m[l])||a,b=y.useContext(f);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return y.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,dC(s,...e)]}function dC(...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 o=n.reduce((a,{useScope:l,scopeName:c})=>{const h=l(i)[`__scope${c}`];return{...a,...h}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Pi(t){const e=fC(t),r=y.forwardRef((n,s)=>{const{children:i,...o}=n,a=y.Children.toArray(i),l=a.find(mC);if(l){const c=l.props.children,u=a.map(h=>h===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:y.isValidElement(c)?y.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var hC=Pi("Slot");function fC(t){const e=y.forwardRef((r,n)=>{const{children:s,...i}=r;if(y.isValidElement(s)){const o=vC(s),a=gC(i,s.props);return s.type!==y.Fragment&&(a.ref=n?dw(n,o):o),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var hw=Symbol("radix.slottable");function pC(t){const e=({children:r})=>d.jsx(d.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=hw,e}function mC(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===hw}function gC(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]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function vC(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: 9,581 bytes, line 68
68isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function fw(t){const e=t+"CollectionProvider",[r,n]=Vi(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:x,children:w}=m,g=I.useRef(null),v=I.useRef(new Map).current;return d.jsx(s,{scope:x,itemMap:v,collectionRef:g,children:w})};o.displayName=e;const a=t+"CollectionSlot",l=Pi(a),c=I.forwardRef((m,x)=>{const{scope:w,children:g}=m,v=i(a,w),_=Te(x,v.collectionRef);return d.jsx(l,{ref:_,children:g})});c.displayName=a;const u=t+"CollectionItemSlot",h="data-radix-collection-item",p=Pi(u),f=I.forwardRef((m,x)=>{const{scope:w,children:g,...v}=m,_=I.useRef(null),S=Te(x,_),k=i(u,w);return I.useEffect(()=>(k.itemMap.set(_,{ref:_,...v}),()=>void k.itemMap.delete(_))),d.jsx(p,{[h]:"",ref:S,children:g})});f.displayName=u;function b(m){const x=i(t+"CollectionConsumer",m);return I.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((k,E)=>v.indexOf(k.ref.current)-v.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},b,n]}var yC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=yC.reduce((t,e)=>{const r=Pi(`Primitive.${e}`),n=y.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function pw(t,e){t&&ks.flushSync(()=>t.dispatchEvent(e))}function ur(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function wC(t,e=globalThis==null?void 0:globalThis.document){const r=ur(t);y.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 xC="DismissableLayer",Xd="dismissableLayer.update",bC="dismissableLayer.pointerDownOutside",_C="dismissableLayer.focusOutside",Ym,mw=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ba=y.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=y.useContext(mw),[u,h]=y.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=y.useState({}),b=Te(e,E=>h(E)),m=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(x),g=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,_=g>=w,S=kC(E=>{const T=E.target,j=[...c.branches].some(A=>A.contains(T));!_||j||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},p),k=EC(E=>{const T=E.target;[...c.branches].some(A=>A.contains(T))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},p);return wC(E=>{g===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),y.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ym=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Zm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ym)}},[u,p,r,c]),y.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Zm())},[u,c]),y.useEffect(()=>{const E=()=>f({});return document.addEventListener(Xd,E),()=>document.removeEventListener(Xd,E)},[]),d.jsx(ue.div,{...l,ref:b,style:{pointerEvents:v?_?"auto":"none":void 0,...t.style},onFocusCapture:oe(t.onFocusCapture,k.onFocusCapture),onBlurCapture:oe(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:oe(t.onPointerDownCapture,S.onPointerDownCapture)})});ba.displayName=xC;var SC="DismissableLayerBranch",gw=y.forwardRef((t,e)=>{const r=y.useContext(mw),n=y.useRef(null),s=Te(e,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),d.jsx(ue.div,{...t,ref:s})});gw.displayName=SC;function kC(t,e=globalThis==null?void 0:globalThis.document){const r=ur(t),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){vw(bC,r,c,{discrete:!0})};const c={originalEvent:a};a.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},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function EC(t,e=globalThis==null?void 0:globalThis.document){const r=ur(t),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&vw(_C,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 Zm(){const t=new CustomEvent(Xd);document.dispatchEvent(t)}function vw(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?pw(s,i):s.dispatchEvent(i)}var CC=ba,TC=gw,rt=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},RC="Portal",$c=y.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,i]=y.useState(!1);rt(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?H0.createPortal(d.jsx(ue.div,{...n,ref:e}),o):null});$c.displayName=RC;function NC(t,e){return y.useReducer((r,n)=>e[r][n]??r,t)}var qi=t=>{const{present:e,children:r}=t,n=jC(e),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=Te(n.ref,PC(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};qi.displayName="Presence";function jC(t){const[e,r]=y.useState(),n=y.useRef(null),s=y.useRef(t),i=y.useRef("none"),o=t?"mounted":"unmounted",[a,l]=NC(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=Ja(n.current);i.current=a==="mounted"?c:"none"},[a]),rt(()=>{const c=n.current,u=s.current;if(u!==t){const p=i.current,f=Ja(c);t?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),rt(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,h=f=>{const m=Ja(n.current).includes(f.animationName);if(f.target===e&&m&&(l("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},p=f=>{f.target===e&&(i.current=Ja(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Ja(t){return(t==null?void 0:t.animationName)||"none"}function PC(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 AC=Uh[" useInsertionEffect ".trim().toString()]||rt;function rc({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,o]=OC({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const u=y.useRef(t!==void 0);y.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"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.`),u.current=a},[a,n])}const c=y.useCallback(u=>{var h;if(a){const p=IC(u)?u(t):u;p!==t&&((h=o.current)==null||h.call(o,p))}else i(u)},[a,t,i,o]);return[l,c]}function OC({defaultProp:t,onChange:e}){const[r,n]=y.useState(t),s=y.useRef(r),i=y.useRef(e);return AC(()=>{i.current=e},[e]),y.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function IC(t){return typeof t=="function"}var yw=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"}),LC="VisuallyHidden",Mc=y.forwardRef((t,e)=>d.jsx(ue.span,{...t,ref:e,style:{...yw,...t.style}}));Mc.displayName=LC;var DC=Mc,Lf="ToastProvider",[Df,$C,MC]=fw("Toast"),[ww,qI]=Vi("Toast",[MC]),[UC,Uc]=ww(Lf),xw=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=y.useState(null),[c,u]=y.useState(0),h=y.useRef(!1),p=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Lf}\`. Expected non-empty \`string\`.`),d.jsx(Df.Provider,{scope:e,children:d.jsx(UC,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:
68a,onViewportChange:l,onToastAdd:y.useCallback(()=>u(f=>f+1),[]),onToastRemove:y.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};xw.displayName=Lf;var bw="ToastViewport",FC=["F8"],eh="toast.viewportPause",th="toast.viewportResume",_w=y.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=FC,label:s="Notifications ({hotkey})",...i}=t,o=Uc(bw,r),a=$C(r),l=y.useRef(null),c=y.useRef(null),u=y.useRef(null),h=y.useRef(null),p=Te(e,h,o.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=o.toastCount>0;y.useEffect(()=>{const x=w=>{var v;n.length!==0&&n.every(_=>w[_]||w.code===_)&&((v=h.current)==null||v.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,w=h.current;if(b&&x&&w){const g=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(eh);w.dispatchEvent(k),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(th);w.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&v()},S=()=>{x.contains(document.activeElement)||v()};return x.addEventListener("focusin",g),x.addEventListener("focusout",_),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",v),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",v)}}},[b,o.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:x})=>{const g=a().map(v=>{const _=v.ref.current,S=[_,...XC(_)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?g.reverse():g).flat()},[a]);return y.useEffect(()=>{const x=h.current;if(x){const w=g=>{var S,k,E;const v=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!v){const T=document.activeElement,j=g.shiftKey;if(g.target===x&&j){(S=c.current)==null||S.focus();return}const D=m({tabbingDirection:j?"backwards":"forwards"}),J=D.findIndex(L=>L===T);$u(D.slice(J+1))?g.preventDefault():j?(k=c.current)==null||k.focus():(E=u.current)==null||E.focus()}};return x.addEventListener("keydown",w),()=>x.removeEventListener("keydown",w)}},[a,m]),d.jsxs(TC,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&d.jsx(rh,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});$u(x)}}),d.jsx(Df.Slot,{scope:r,children:d.jsx(ue.ol,{tabIndex:-1,...i,ref:p})}),b&&d.jsx(rh,{ref:u,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});$u(x)}})]})});_w.displayName=bw;var Sw="ToastFocusProxy",rh=y.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Uc(Sw,r);return d.jsx(Mc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});rh.displayName=Sw;var _a="Toast",BC="toast.swipeStart",zC="toast.swipeMove",WC="toast.swipeCancel",HC="toast.swipeEnd",kw=y.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=rc({prop:n,defaultProp:s??!0,onChange:i,caller:_a});return d.jsx(qi,{present:r||a,children:d.jsx(KC,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:ur(t.onPause),onResume:ur(t.onResume),onSwipeStart:oe(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:oe(t.onSwipeMove,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:oe(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:oe(t.onSwipeEnd,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});kw.displayName=_a;var[VC,qC]=ww(_a,{onClose(){}}),KC=y.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...b}=t,m=Uc(_a,r),[x,w]=y.useState(null),g=Te(e,L=>w(L)),v=y.useRef(null),_=y.useRef(null),S=s||m.duration,k=y.useRef(0),E=y.useRef(S),T=y.useRef(0),{onToastAdd:j,onToastRemove:A}=m,V=ur(()=>{var Q;(x==null?void 0:x.contains(document.activeElement))&&((Q=m.viewport)==null||Q.focus()),o()}),D=y.useCallback(L=>
68{!L||L===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(V,L))},[V]);y.useEffect(()=>{const L=m.viewport;if(L){const Q=()=>{D(E.current),c==null||c()},W=()=>{const G=new Date().getTime()-k.current;E.current=E.current-G,window.clearTimeout(T.current),l==null||l()};return L.addEventListener(eh,W),L.addEventListener(th,Q),()=>{L.removeEventListener(eh,W),L.removeEventListener(th,Q)}}},[m.viewport,S,l,c,D]),y.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(S)},[i,S,m.isClosePausedRef,D]),y.useEffect(()=>(j(),()=>A()),[j,A]);const J=y.useMemo(()=>x?Pw(x):null,[x]);return m.viewport?d.jsxs(d.Fragment,{children:[J&&d.jsx(GC,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:J}),d.jsx(VC,{scope:r,onClose:V,children:ks.createPortal(d.jsx(Df.ItemSlot,{scope:r,children:d.jsx(CC,{asChild:!0,onEscapeKeyDown:oe(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||V(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(ue.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...b,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:oe(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:oe(t.onPointerDown,L=>{L.button===0&&(v.current={x:L.clientX,y:L.clientY})}),onPointerMove:oe(t.onPointerMove,L=>{if(!v.current)return;const Q=L.clientX-v.current.x,W=L.clientY-v.current.y,G=!!_.current,C=["left","right"].includes(m.swipeDirection),N=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=C?N(0,Q):0,Z=C?0:N(0,W),q=L.pointerType==="touch"?10:2,se={x:$,y:Z},te={originalEvent:L,delta:se};G?(_.current=se,Ya(zC,h,te,{discrete:!1})):Qm(se,m.swipeDirection,q)?(_.current=se,Ya(BC,u,te,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Q)>q||Math.abs(W)>q)&&(v.current=null)}),onPointerUp:oe(t.onPointerUp,L=>{const Q=_.current,W=L.target;if(W.hasPointerCapture(L.pointerId)&&W.releasePointerCapture(L.pointerId),_.current=null,v.current=null,Q){const G=L.currentTarget,C={originalEvent:L,delta:Q};Qm(Q,m.swipeDirection,m.swipeThreshold)?Ya(HC,f,C,{discrete:!0}):Ya(WC,p,C,{discrete:!0}),G.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),GC=t=>{const{__scopeToast:e,children:r,...n}=t,s=Uc(_a,e),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return ZC(()=>o(!0)),y.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx($c,{asChild:!0,children:d.jsx(Mc,{...n,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",r]})})})},JC="ToastTitle",Ew=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return d.jsx(ue.div,{...n,ref:e})});Ew.displayName=JC;var YC="ToastDescription",Cw=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return d.jsx(ue.div,{...n,ref:e})});Cw.displayName=YC;var Tw="ToastAction",Rw=y.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?d.jsx(jw,{altText:r,asChild:!0,children:d.jsx($f,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Tw}\`. Expected non-empty \`string\`.`),null)});Rw.displayName=Tw;var Nw="ToastClose",$f=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=qC(Nw,r);return d.jsx(jw,{asChild:!0,children:d.jsx(ue.button,{type:"button",...n,ref:e,onClick:oe(t.onClick,s.onClose)})})});$f.displayName=Nw;var jw=y.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return d.jsx(ue.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function Pw(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),QC(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Pw(n))}}),e}function Ya(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?pw(s,i):s.dispatchEvent(i)}var Qm=(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 ZC(t=()=>{}){const e=ur(t);rt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function QC(t){return t.nodeType===t.ELEMENT_NODE}function XC(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 $u(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var eT=xw,Aw=_w,Ow=kw,Iw=Ew,Lw=Cw,Dw=Rw,$w=$f;function Mw(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=Mw(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Uw(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Mw(t))&&(n&&(n+=" "),n+=e);return n}const Xm=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,eg=Uw,Mf=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return eg(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=r==null?void 0:r[c],h=i==null?void 0:i[c];if(u===null)return null;const p=Xm(u)||Xm(h);return s[c][p]}),a=r&&Object.entries(r).reduce((c,u)=>{let[h,p]=u;return p===void 0||(c[h]=p),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:h,className:p,...f}=u;return Object.entries(f).every(b=>{let[m,x]=b;return Array.isArray(x)?x.includes({...i,...a}[m]):{...i,...a}[m]===x})?[...c,h,p]:c},[]);return eg(t,o,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 tT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fw=(...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 rT={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 nT=y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...rT,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Fw("lucide",s),...a},[...o.map(([c,u])=>y.createElement(c,u)),...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 ge=(t,e)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(nT,{ref:i,iconNode:e,className:Fw(`lucide-${tT(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 sT=ge("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 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 Bw=ge("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 iT=ge("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 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 oT=ge("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 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 aT=ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 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 Uf=ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 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 zw=ge("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 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 lT=ge("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 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 Ai=ge("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 cT=ge("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/** 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 uT=ge("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 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 dT=ge("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 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 hT=ge("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 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 tg=ge("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"}]]);/** 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 fT=ge("GlassWater",[["path",{d:"M5.116 4.104A1 1 0 0 1 6.11 3h11.78a1 1 0 0 1 .994 1.105L17.19 20.21A2 2 0 0 1 15.2 22H8.8a2 2 0 0 1-2-1.79z",key:"p55z4y"}],["path",{d:"M6 12a5 5 0 0 1 6 0 5 5 0 0 0 6 0",key:"mjntcy"}]]);/** 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 pT=ge("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"}]]);/** 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 mT=ge("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 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 Oi=ge("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 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 gT=ge("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 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 vT=ge("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"}]]);/** 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 yT=ge("MapPinned",[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]]);/** 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 wT=ge("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 xT=ge("Martini",[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M12 11v11",key:"ur9y6a"}],["path",{d:"m19 3-7 8-7-8Z",key:"1sgpiw"}]]);/** 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 bT=ge("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 _T=ge("PlaneLanding",[["path",{d:"M2 22h20",key:"272qi7"}],["path",{d:"M3.77 10.77 2 9l2-4.5 1.1.55c.55.28.9.84.9 1.45s.35 1.17.9 1.45L8 8.5l3-6 1.05.53a2 2 0 0 1 1.09 1.52l.72 5.4a2 2 0 0 0 1.09 1.52l4.4 2.2c.42.22.78.55 1.01.96l.6 1.03c.49.88-.06 1.98-1.06 2.1l-1.18.15c-.47.06-.95-.02-1.37-.24L4.29 11.15a2 2 0 0 1-.52-.38Z",key:"1ma21e"}]]);/** 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 ST=ge("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 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 rg=ge("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 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 Ww=ge("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"}]]);/** 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 kT=ge("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 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 ET=ge("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 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 Ff=ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 9,918 bytes, lines 243-248
243],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 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 Bf=ge("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),zf="-",CT=t=>{const e=RT(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(zf);return a[0]===""&&a.length!==1&&a.shift(),Hw(a,e)||TT(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Hw=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Hw(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(zf);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ng=/^\[(.+)\]$/,TT=t=>{if(ng.test(t)){const e=ng.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},RT=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return jT(Object.entries(t.classGroups),r).forEach(([i,o])=>{nh(o,n,i,e)}),n},nh=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:sg(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(NT(s)){nh(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{nh(o,sg(e,i),r,n)})})},sg=(t,e)=>{let r=t;return e.split(zf).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},NT=t=>t.isThemeGetter,jT=(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(([o,a])=>[e+o,a])):i);return[r,s]}):t,PT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},Vw="!",AT=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,h;for(let x=0;x<a.length;x++){let w=a[x];if(c===0){if(w===s&&(n||a.slice(x,x+i)===e)){l.push(a.slice(u,x)),u=x+i;continue}if(w==="/"){h=x;continue}}w==="["?c++:w==="]"&&c--}const p=l.length===0?a:a.substring(u),f=p.startsWith(Vw),b=f?p.substring(1):p,m=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},OT=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},IT=t=>({cache:PT(t.cacheSize),parseClassName:AT(t),...CT(t)}),LT=/\s+/,DT=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(LT);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(c);let b=!!f,m=n(b?p.substring(0,f):p);if(!m){if(!b){a=c+(a.length>0?" "+a:a);continue}if(m=n(p),!m){a=c+(a.length>0?" "+a:a);continue}b=!1}const x=OT(u).join(":"),w=h?x+Vw:x,g=w+m;if(i.includes(g))continue;i.push(g);const v=s(m,b);for(let _=0;_<v.length;++_){const S=v[_];i.push(w+S)}a=c+(a.length>0?" "+a:a)}return a};function $T(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=qw(e))&&(n&&(n+=" "),n+=r);return n}const qw=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=qw(t[n]))&&(r&&(r+=" "),r+=e);return r};function MT(t,...e){let r,n,s,i=o;function o(l){const c=e.reduce((u,h)=>h(u),t());return r=IT(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=DT(l,r);return s(l,u),u}return function(){return i($T.apply(null,arguments))}}const ke=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Kw=/^\[(?:([a-z-]+):)?(.+)\]$/i,UT=/^\d+\/\d+$/,FT=new Set(["px","full","screen"]),BT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\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$/,WT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,HT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=t=>di(t)||FT.has(t)||UT.test(t),rn=t=>Ki(t,"length",XT),di=t=>!!t&&!Number.isNaN(Number(t)),Mu=t=>Ki(t,"number",di),lo=t=>!!t&&Number.isInteger(Number(t)),qT=t=>t.endsWith("%")&&di(t.slice(0,-1)),ie=t=>Kw.test(t),nn=t=>BT.test(t),KT=new Set(["length","size","percentage"]),GT=t=>Ki(t,KT,Gw),JT=t=>Ki(t,"position",Gw),YT=new Set(["image","url"]),ZT=t=>Ki(t,YT,tR),QT=t=>Ki(t,"",eR),co=()=>!0,Ki=(t,e,r)=>{const n=Kw.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},XT=t=>zT.test(t)&&!WT.test(t),Gw=()=>!1,eR=t=>HT.test(t),tR=t=>VT.test(t),rR=()=>{const t=ke("colors"),e=ke("spacing"),r=ke("blur"),n=ke("brightness"),s=ke("borderColor"),i=ke("borderRadius"),o=ke("borderSpacing"),a=ke("borderWidth"),l=ke("contrast"),c=ke("grayscale"),u=ke("hueRotate"),h=ke("invert"),p=ke("gap"),f=ke("gradientColorStops"),b=ke("gradientColorStopPositions"),m=ke("inset"),x=ke("margin"),w=ke("opacity"),g=ke("padding"),v=ke("saturate"),_=ke("scale"),S=ke("sepia"),k=ke("skew"),E=ke("space"),T=ke("translate"),j=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ie,e],D=()=>[ie,e],J=()=>["",Ar,rn],L=()=>["auto",di,ie],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],G=()=>["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",ie],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[di,ie];return{cacheSize:500,separator:":",theme:{colors:[co],spacing:[Ar,rn],blur:["none","",nn,ie],brightness:Z(),borderColor:[t],borderRadius:["none","","full",nn,ie],borderSpacing:D(),borderWidth:J(),contrast:Z(),grayscale:N(),hueRotate:Z(),invert:N(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[qT,rn],inset:V(),margin:V(),opacity:Z(),padding:D(),saturate:Z(),scale:Z(),sepia:N(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ie]}],container:["container"],columns:[{columns:[nn]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...Q(),ie]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],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",lo,ie]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ie]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",lo,ie]}],"grid-cols":[{"grid-cols":[co]}],"col-start-end":[{col:["auto",{span:["full",lo,ie]},ie]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[co]}],"row-start-end":[{row:["auto",{span:[lo,ie]},ie]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ie]}],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:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"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",
vendor: 8,427 bytes, line 248
248ie,e]}],"min-w":[{"min-w":[ie,e,"min","max","fit"]}],"max-w":[{"max-w":[ie,e,"none","full","min","max","fit","prose",{screen:[nn]},nn]}],h:[{h:[ie,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ie,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ie,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ie,e,"auto","min","max","fit"]}],"font-size":[{text:["base",nn,rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mu]}],"font-family":[{font:[co]}],"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",ie]}],"line-clamp":[{"line-clamp":["none",di,Mu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ar,ie]}],"list-image":[{"list-image":["none",ie]}],"list-style-type":[{list:["none","disc","decimal",ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ar,rn]}],"underline-offset":[{"underline-offset":["auto",Ar,ie]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie]}],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",ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),JT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZT]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:W()}],"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:["",...W()]}],"outline-offset":[{"outline-offset":[Ar,ie]}],"outline-w":[{outline:[Ar,rn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ar,rn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",nn,QT]}],"shadow-color":[{shadow:[co]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",nn,ie]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ie]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ie]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[lo,ie]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ie]}],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",ie]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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"]}],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",ie]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Ar,rn,Mu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
248none"]}]},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"]}}},nR=MT(rR);function je(...t){return nR(Uw(t))}const sR=eT,Jw=y.forwardRef(({className:t,...e},r)=>d.jsx(Aw,{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}));Jw.displayName=Aw.displayName;const iR=Mf("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"}}),Yw=y.forwardRef(({className:t,variant:e,...r},n)=>d.jsx(Ow,{ref:n,className:je(iR({variant:e}),t),...r}));Yw.displayName=Ow.displayName;const oR=y.forwardRef(({className:t,...e},r)=>d.jsx(Dw,{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}));oR.displayName=Dw.displayName;const Zw=y.forwardRef(({className:t,...e},r)=>d.jsx($w,{ref:r,className:je("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 13,149 bytes, line 248
248/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:d.jsx(Ff,{className:"h-4 w-4"})}));Zw.displayName=$w.displayName;const Qw=y.forwardRef(({className:t,...e},r)=>d.jsx(Iw,{ref:r,className:je("text-sm font-semibold",t),...e}));Qw.displayName=Iw.displayName;const Xw=y.forwardRef(({className:t,...e},r)=>d.jsx(Lw,{ref:r,className:je("text-sm opacity-90",t),...e}));Xw.displayName=Lw.displayName;function aR(){const{toasts:t}=xa();return d.jsxs(sR,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return d.jsxs(Yw,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[r&&d.jsx(Qw,{children:r}),n&&d.jsx(Xw,{children:n})]}),s,d.jsx(Zw,{})]},e)}),d.jsx(Jw,{})]})}var lR=Uh[" useId ".trim().toString()]||(()=>{}),cR=0;function hi(t){const[e,r]=y.useState(lR());return rt(()=>{r(n=>n??String(cR++))},[t]),e?`radix-${e}`:""}const uR=["top","right","bottom","left"],Ln=Math.min,Ct=Math.max,nc=Math.round,Za=Math.floor,Tr=t=>({x:t,y:t}),dR={left:"right",right:"left",bottom:"top",top:"bottom"},hR={start:"end",end:"start"};function sh(t,e,r){return Ct(t,Ln(e,r))}function qr(t,e){return typeof t=="function"?t(e):t}function Kr(t){return t.split("-")[0]}function Gi(t){return t.split("-")[1]}function Wf(t){return t==="x"?"y":"x"}function Hf(t){return t==="y"?"height":"width"}const fR=new Set(["top","bottom"]);function kr(t){return fR.has(Kr(t))?"y":"x"}function Vf(t){return Wf(kr(t))}function pR(t,e,r){r===void 0&&(r=!1);const n=Gi(t),s=Vf(t),i=Hf(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=sc(o)),[o,sc(o)]}function mR(t){const e=sc(t);return[ih(t),e,ih(e)]}function ih(t){return t.replace(/start|end/g,e=>hR[e])}const ig=["left","right"],og=["right","left"],gR=["top","bottom"],vR=["bottom","top"];function yR(t,e,r){switch(t){case"top":case"bottom":return r?e?og:ig:e?ig:og;case"left":case"right":return e?gR:vR;default:return[]}}function wR(t,e,r,n){const s=Gi(t);let i=yR(Kr(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(ih)))),i}function sc(t){return t.replace(/left|right|bottom|top/g,e=>dR[e])}function xR(t){return{top:0,right:0,bottom:0,left:0,...t}}function ex(t){return typeof t!="number"?xR(t):{top:t,right:t,bottom:t,left:t}}function ic(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 ag(t,e,r){let{reference:n,floating:s}=t;const i=kr(e),o=Vf(e),a=Hf(o),l=Kr(e),c=i==="y",u=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:n.y-s.height};break;case"bottom":f={x:u,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(Gi(e)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}const bR=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:h}=ag(c,n,l),p=n,f={},b=0;for(let m=0;m<a.length;m++){const{name:x,fn:w}=a[m],{x:g,y:v,data:_,reset:S}=await w({x:u,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:t,floating:e}});u=g??u,h=v??h,f={...f,[x]:{...f[x],..._}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:h}=ag(c,p,l)),m=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:f}};async function ea(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=qr(e,t),b=ex(f),x=a[p?h==="floating"?"reference":"floating":h],w=ic(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=h==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=ic(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(w.top-S.top+b.top)/_.y,bottom:(S.bottom-w.bottom+b.bottom)/_.y,left:(w.left-S.left+b.left)/_.x,right:(S.right-w.right+b.right)/_.x}}const _R=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=qr(t,e)||{};if(c==null)return{};const h=ex(u),p={x:r,y:n},f=Vf(s),b=Hf(f),m=await o.getDimensions(c),x=f==="y",w=x?"top":"left",g=x?"bottom":"right",v=x?"clientHeight":"clientWidth",_=i.reference[b]+i.reference[f]-p[f]-i.floating[b],S=p[f]-i.reference[f],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=k?k[v]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[v]||i.floating[b]);const T=_/2-S/2,j=E/2-m[b]/2-1,A=Ln(h[w],j),V=Ln(h[g],j),D=A,J=E-m[b]-V,L=E/2-m[b]/2+T,Q=sh(D,L,J),W=!l.arrow&&Gi(s)!=null&&L!==Q&&i.reference[b]/2-(L<D?A:V)-m[b]/2<0,G=W?L<D?L-D:L-J:0;return{[f]:p[f]+G,data:{[f]:Q,centerOffset:L-Q-G,...W&&{alignmentOffset:G}},reset:W}}}),SR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...x}=qr(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=Kr(s),g=kr(a),v=Kr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(v||!m?[sc(a)]:mR(a)),k=b!=="none";!p&&k&&S.push(...wR(a,m,b,_));const E=[a,...S],T=await ea(e,x),j=[];let A=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&j.push(T[w]),h){const L=pR(s,o,_);j.push(T[L[0]],T[L[1]])}if(A=[...A,{placement:s,overflows:j}],!j.every(L=>L<=0)){var V,D;const L=(((V=i.flip)==null?void 0:V.index)||0)+1,Q=E[L];if(Q&&(!(h==="alignment"?g!==kr(Q):!1)||A.every(C=>C.overflows[0]>0&&kr(C.placement)===g)))return{data:{index:L,overflows:A},reset:{placement:Q}};let W=(D=A.filter(G=>G.overflows[0]<=0).sort((G,C)=>G.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!W)switch(f){case"bestFit":{var J;const G=(J=A.filter(C=>{if(k){const N=kr(C.placement);return N===g||N==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(N=>N>0).reduce((N,$)=>N+$,0)]).sort((C,N)=>C[1]-N[1])[0])==null?void 0:J[0];G&&(W=G);break}case"initialPlacement":W=a;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function lg(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function cg(t){return uR.some(e=>t[e]>=0)}const kR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=qr(t,e);switch(n){case"referenceHidden":{const i=await ea(e,{...s,elementContext:"reference"}),o=lg(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:cg(o)}}}case"escaped":{const i=await ea(e,{...s,altBoundary:!0}),o=lg(i,r.floating);return{data:{escapedOffsets:o,escaped:cg(o)}}}default:return{}}}}},tx=new Set(["left","top"]);async function ER(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Kr(r),a=Gi(r),l=kr(r)==="y",c=tx.has(o)?-1:1,u=i&&l?-1:1,h=qr(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(f=a==="end"?b*-1:b),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const CR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await ER(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},TR=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:o=!1,limiter:a={fn:x=>{let{x:w,y:g}=x;return{x:w,y:g}}},...l}=qr(t,e),c={x:r,y:n},u=await ea(e,l),h=kr(Kr(s)),p=Wf(h);let f=c[p],b=c[h];if(i){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",g=f+u[x],v=f-u[w];f=sh(g,f,v)}if(o){const x=h==="y"?"top":"left",w=h==="y"?"bottom":"right",g=b+u[x],v=b-u[w];b=sh(g,b,v)}const m=a.fn({...e,[p]:f,[h]:b});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:i,[h]:o}}}}}},RR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=qr(t,e),u={x:r,y:n},h=kr(s),p=Wf(h);let f=u[p],b=u[h];const m=qr(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const v=p==="y"?"height":"width",_=i.reference[p]-i.floating[v]+x.mainAxis,S=i.reference[p]+i.reference[v]-x.mainAxis;f<_?f=_:f>S&&(f=S)}if(c){var w,g;const v=p==="y"?"width":"height",_=tx.has(Kr(s)),S=i.reference[h]-i.floating[v]+(_&&((w=o.offset)==null?void 0:w[h])||0)+(_?0:x.crossAxis),k=i.reference[h]+i.reference[v]+(_?0:((g=o.offset)==null?void 0:g[h])||0)-(_?x.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[p]:f,[h]:b}}}},NR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=qr(t,e),u=await ea(e,c),h=Kr(s),p=Gi(s),f=kr(s)==="y",{width:b,height:m}=i.floating;let x,w;h==="top"||h==="bottom"?(x=h,w=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=h,x=p==="end"?"top":"bottom");const g=m-u.top-u.bottom,v=b-u.left-u.right,_=Ln(m-u[x],g),S=Ln(b-u[w],v),k=!e.middlewareData.shift;let E=_,T=S;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(T=v),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(E=g),k&&!p){const A=Ct(u.left,0),V=Ct(u.right,0),D=Ct(u.top,0),J=Ct(u.bottom,0);f?T=b-2*(A!==0||V!==0?A+V:Ct(u.left,u.right)):E=m-2*(D!==0||J!==0?D+J:Ct(u.top,u.bottom))}await l({...e,availableWidth:T,availableHeight:E});const j=await o.getDimensions(a.floating);return b!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Fc(){return typeof window<"u"}function Ji(t){return rx(t)?(t.nodeName||"").toLowerCase():"#document"}function Pt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Pr(t){var e;return(e=(rx(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function rx(t){return Fc()?t instanceof Node||t instanceof Pt(t).Node:!1}function dr(t){return Fc()?t instanceof Element||t instanceof Pt(t).Element:!1}function jr(t){return Fc()?t instanceof HTMLElement||t instanceof Pt(t).HTMLElement:!1}function ug(t){return!Fc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pt(t).ShadowRoot}const jR=new Set(["inline","contents"]);function Sa(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=hr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!jR.has(s)}const PR=new Set(["table","td","th"]);function AR(t){return PR.has(Ji(t))}const OR=[":popover-open",":modal"];function Bc(t){return OR.some(e=>{try{return t.matches(e)}catch{return!1}})}const IR=["transform","translate","scale","rotate","perspective"],LR=["transform","translate","scale","rotate","perspective","filter"],DR=["paint","layout","strict","content"];function qf(t){const e=Kf(),r=dr(t)?hr(t):t;return IR.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||LR.some(n=>(r.willChange||"").includes(n))||DR.some(n=>(r.contain||"").includes(n))}function $R(t){let e=Dn(t);for(;jr(e)&&!Ii(e);){if(qf(e))return e;if(Bc(e))return null;e=Dn(e)}return null}function Kf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const MR=new Set(["html","body","#document"]);function Ii(t){return MR.has(Ji(t))}function hr(t){return Pt(t).getComputedStyle(t)}function zc(t){return dr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dn(t){if(Ji(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ug(t)&&t.host||Pr(t);return ug(e)?e.host:e}function nx(t){const e=Dn(t);return Ii(e)?t.ownerDocument?t.ownerDocument.body:t.body:jr(e)&&Sa(e)?e:nx(e)}function ta(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),o=Pt(s);if(i){const a=oh(o);
vendor: 4,267 bytes, line 248
248return e.concat(o,o.visualViewport||[],Sa(s)?s:[],a&&r?ta(a):[])}return e.concat(s,ta(s,[],r))}function oh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function sx(t){const e=hr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=jr(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=nc(r)!==i||nc(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Gf(t){return dr(t)?t:t.contextElement}function fi(t){const e=Gf(t);if(!jr(e))return Tr(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=sx(e);let o=(i?nc(r.width):r.width)/n,a=(i?nc(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const UR=Tr(0);function ix(t){const e=Pt(t);return!Kf()||!e.visualViewport?UR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function FR(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Pt(t)?!1:e}function vs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Gf(t);let o=Tr(1);e&&(n?dr(n)&&(o=fi(n)):o=fi(t));const a=FR(i,r,n)?ix(i):Tr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,h=s.height/o.y;if(i){const p=Pt(i),f=n&&dr(n)?Pt(n):n;let b=p,m=oh(b);for(;m&&n&&f!==b;){const x=fi(m),w=m.getBoundingClientRect(),g=hr(m),v=w.left+(m.clientLeft+parseFloat(g.paddingLeft))*x.x,_=w.top+(m.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,h*=x.y,l+=v,c+=_,b=Pt(m),m=oh(b)}}return ic({width:u,height:h,x:l,y:c})}function Jf(t,e){const r=zc(t).scrollLeft;return e?e.left+r:vs(Pr(t)).left+r}function ox(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-(r?0:Jf(t,n)),i=n.top+e.scrollTop;return{x:s,y:i}}function BR(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=Pr(n),a=e?Bc(e.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Tr(1);const u=Tr(0),h=jr(n);if((h||!h&&!i)&&((Ji(n)!=="body"||Sa(o))&&(l=zc(n)),jr(n))){const f=vs(n);c=fi(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}const p=o&&!h&&!i?ox(o,l,!0):Tr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function zR(t){return Array.from(t.getClientRects())}function WR(t){const e=Pr(t),r=zc(t),n=t.ownerDocument.body,s=Ct(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ct(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Jf(t);const a=-r.scrollTop;return hr(n).direction==="rtl"&&(o+=Ct(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function HR(t,e){const r=Pt(t),n=Pr(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Kf();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const VR=new Set(["absolute","fixed"]);function qR(t,e){const r=vs(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=jr(t)?fi(t):Tr(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function dg(t,e,r){let n;if(e==="viewport")n=HR(t,r);else if(e==="document")n=WR(Pr(t));else if(dr(e))n=qR(e,r);else{const s=ix(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return ic(n)}function ax(t,e){const r=Dn(t);return r===e||!dr(r)||Ii(r)?!1:hr(r).position==="fixed"||ax(r,e)}function KR(t,e){const r=e.get(t);if(r)return r;let n=ta(t,[],!1).filter(a=>dr(a)&&Ji(a)!=="body"),s=null;const i=hr(t).position==="fixed";let o=i?Dn(t):t;for(;dr(o)&&!Ii(o);){const a=hr(o),l=qf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&VR.has(s.position)||Sa(o)&&!l&&ax(t,o))?n=n.filter(u=>u!==o):s=a,o=Dn(o)}return e.set(t,n),n}function GR(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?Bc(e)?[]:KR(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const h=dg(e,u,s);return c.top=Ct(h.top,c.top),c.right=Ln(h.right,c.right),c.bottom=Ln(h.bottom,c.bottom),c.left=Ct(h.left,c.left),c},dg(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function JR(t){const{width:e,height:r}=sx(t);return{width:e,height:r}}function YR(t,e,r){const n=jr(e),s=Pr(e),i=r==="fixed",o=vs(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Tr(0);function c(){l.x=Jf(s)}
vendor: 9,647 bytes, line 248
248if(n||!n&&!i)if((Ji(e)!=="body"||Sa(s))&&(a=zc(e)),n){const f=vs(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&c();i&&!n&&s&&c();const u=s&&!n&&!i?ox(s,a):Tr(0),h=o.left+a.scrollLeft-l.x-u.x,p=o.top+a.scrollTop-l.y-u.y;return{x:h,y:p,width:o.width,height:o.height}}function Uu(t){return hr(t).position==="static"}function hg(t,e){if(!jr(t)||hr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Pr(t)===r&&(r=r.ownerDocument.body),r}function lx(t,e){const r=Pt(t);if(Bc(t))return r;if(!jr(t)){let s=Dn(t);for(;s&&!Ii(s);){if(dr(s)&&!Uu(s))return s;s=Dn(s)}return r}let n=hg(t,e);for(;n&&AR(n)&&Uu(n);)n=hg(n,e);return n&&Ii(n)&&Uu(n)&&!qf(n)?r:n||$R(t)||r}const ZR=async function(t){const e=this.getOffsetParent||lx,r=this.getDimensions,n=await r(t.floating);return{reference:YR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function QR(t){return hr(t).direction==="rtl"}const XR={convertOffsetParentRelativeRectToViewportRelativeRect:BR,getDocumentElement:Pr,getClippingRect:GR,getOffsetParent:lx,getElementRects:ZR,getClientRects:zR,getDimensions:JR,getScale:fi,isElement:dr,isRTL:QR};function cx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function eN(t,e){let r=null,n;const s=Pr(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:u,top:h,width:p,height:f}=c;if(a||e(),!p||!f)return;const b=Za(h),m=Za(s.clientWidth-(u+p)),x=Za(s.clientHeight-(h+f)),w=Za(u),v={rootMargin:-b+"px "+-m+"px "+-x+"px "+-w+"px",threshold:Ct(0,Ln(1,l))||1};let _=!0;function S(k){const E=k[0].intersectionRatio;if(E!==l){if(!_)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!cx(c,t.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,v)}r.observe(t)}return o(!0),i}function tN(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Gf(t),u=s||i?[...c?ta(c):[],...ta(e)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const h=c&&a?eN(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(w=>{let[g]=w;g&&g.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(e)})),r()}),c&&!l&&f.observe(c),f.observe(e));let b,m=l?vs(t):null;l&&x();function x(){const w=vs(t);m&&!cx(m,w)&&r(),m=w,b=requestAnimationFrame(x)}return r(),()=>{var w;u.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),h==null||h(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(b)}}const rN=CR,nN=TR,sN=SR,iN=NR,oN=kR,fg=_R,aN=RR,lN=(t,e,r)=>{const n=new Map,s={platform:XR,...r},i={...s.platform,_c:n};return bR(t,e,{...s,platform:i})};var cN=typeof document<"u",uN=function(){},El=cN?y.useLayoutEffect:uN;function oc(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(!oc(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)&&!oc(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ux(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pg(t,e){const r=ux(t);return Math.round(e*r)/r}function Fu(t){const e=y.useRef(t);return El(()=>{e.current=t}),e}function dN(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,h]=y.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=y.useState(n);oc(p,n)||f(n);const[b,m]=y.useState(null),[x,w]=y.useState(null),g=y.useCallback(C=>{C!==k.current&&(k.current=C,m(C))},[]),v=y.useCallback(C=>{C!==E.current&&(E.current=C,w(C))},[]),_=i||b,S=o||x,k=y.useRef(null),E=y.useRef(null),T=y.useRef(u),j=l!=null,A=Fu(l),V=Fu(s),D=Fu(c),J=y.useCallback(()=>{if(!k.current||!E.current)return;const C={placement:e,strategy:r,middleware:p};V.current&&(C.platform=V.current),lN(k.current,E.current,C).then(N=>{const $={...N,isPositioned:D.current!==!1};L.current&&!oc(T.current,$)&&(T.current=$,ks.flushSync(()=>{h($)}))})},[p,e,r,V,D]);El(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[c]);const L=y.useRef(!1);El(()=>(L.current=!0,()=>{L.current=!1}),[]),El(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(A.current)return A.current(_,S,J);J()}},[_,S,J,A,j]);const Q=y.useMemo(()=>({reference:k,floating:E,setReference:g,setFloating:v}),[g,v]),W=y.useMemo(()=>({reference:_,floating:S}),[_,S]),G=y.useMemo(()=>{const C={position:r,left:0,top:0};if(!W.floating)return C;const N=pg(W.floating,u.x),$=pg(W.floating,u.y);return a?{...C,transform:"translate("+N+"px, "+$+"px)",...ux(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:$}},[r,a,W.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:J,refs:Q,elements:W,floatingStyles:G}),[u,J,Q,W,G])}const hN=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?fg({element:n.current,padding:s}).fn(r):{}:n?fg({element:n,padding:s}).fn(r):{}}}},fN=(t,e)=>({...rN(t),options:[t,e]}),pN=(t,e)=>({...nN(t),options:[t,e]}),mN=(t,e)=>({...aN(t),options:[t,e]}),gN=(t,e)=>({...sN(t),options:[t,e]}),vN=(t,e)=>({...iN(t),options:[t,e]}),yN=(t,e)=>({...oN(t),options:[t,e]}),wN=(t,e)=>({...hN(t),options:[t,e]});var xN="Arrow",dx=y.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return d.jsx(ue.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});dx.displayName=xN;var bN=dx;function _N(t){const[e,r]=y.useState(void 0);return rt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Yf="Popper",[hx,Wc]=Vi(Yf),[SN,fx]=hx(Yf),px=t=>{const{__scopePopper:e,children:r}=t,[n,s]=y.useState(null);return d.jsx(SN,{scope:e,anchor:n,onAnchorChange:s,children:r})};px.displayName=Yf;var mx="PopperAnchor",gx=y.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=fx(mx,r),o=y.useRef(null),a=Te(e,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:d.jsx(ue.div,{...s,ref:a})});gx.displayName=mx;var Zf="PopperContent",[kN,EN]=hx(Zf),vx=y.forwardRef((t,e)=>{var M,ye,Le,ve,ce,fe;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:b,...m}=t,x=fx(Zf,r),[w,g]=y.useState(null),v=Te(e,nt=>g(nt)),[_,S]=y.useState(null),k=_N(_),E=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,j=n+(i!=="center"?"-"+i:""),A=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},V=Array.isArray(c)?c:[c],D=V.length>0,J={padding:A,boundary:V.filter(TN),altBoundary:D},{refs:L,floatingStyles:Q,placement:W,isPositioned:G,middlewareData:C}=dN({strategy:"fixed",placement:j,whileElementsMounted:(...nt)=>tN(...nt,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[fN({mainAxis:s+T,alignmentAxis:o}),l&&pN({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?mN():void 0,...J}),l&&gN({...J}),vN({...J,apply:({elements:nt,rects:Dt,availableWidth:Hn,availableHeight:Zr})=>{const{width:Vn,height:Qi}=Dt.reference,Ts=nt.floating.style;Ts.setProperty("--radix-popper-available-width",`${Hn}px`),Ts.setProperty("--radix-popper-available-height",`${Zr}px`),Ts.setProperty("--radix-popper-anchor-width",`${Vn}px`),Ts.setProperty("--radix-popper-anchor-height",`${Qi}px`)}}),_&&wN({element:_,padding:a}),RN({arrowWidth:E,arrowHeight:T}),p&&yN({strategy:"referenceHidden",...J})]}),[N,$]=xx(W),Z=ur(b);rt(()=>{G&&(Z==null||Z())},[G,Z]);const q=(M=C.arrow)==null?void 0:M.x,se=(ye=C.arrow)==null?void 0:ye.y,te=((Le=C.arrow)==null?void 0:Le.centerOffset)!==0,[Se,Ie]=y.useState();return rt(()=>{w&&Ie(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:G?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(ve=C.transformOrigin)==null?void 0:ve.x,(ce=C.transformOrigin)==null?void 0:ce.y].join(" "),...((fe=C.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(kN,{scope:r,placedSide:N,onArrowChange:S,arrowX:q,arrowY:se,shouldHideArrow:te,children:d.jsx(ue.div,{"data-side":N,"data-align":$,...m,ref:v,style:{...m.style,animation:G?void 0:"none"}})})})});vx.displayName=Zf;var yx="PopperArrow",CN={top:"bottom",right:"left",bottom:"top",left:"r
248ight"},wx=y.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=EN(yx,n),o=CN[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]: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:d.jsx(bN,{...s,ref:r,style:{...s.style,display:"block"}})})});wx.displayName=yx;function TN(t){return t!==null}var RN=t=>({name:"transformOrigin",options:t,fn(e){var x,w,g;const{placement:r,rects:n,middlewareData:s}=e,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=xx(r),h={start:"0%",center:"50%",end:"100%"}[u],p=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let b="",m="";return c==="bottom"?(b=o?h:`${p}px`,m=`${-l}px`):c==="top"?(b=o?h:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(b=`${-l}px`,m=o?h:`${f}px`):c==="left"&&(b=`${n.floating.width+l}px`,m=o?h:`${f}px`),{data:{x:b,y:m}}}});function xx(t){const[e,r="center"]=t.split("-");return[e,r]}var NN=px,bx=gx,_x=vx,Sx=wx,[Hc,KI]=Vi("Tooltip",[Wc]),Qf=Wc(),kx="TooltipProvider",jN=700,mg="tooltip.open",[PN,Ex]=Hc(kx),Cx=t=>{const{__scopeTooltip:e,delayDuration:r=jN,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),d.jsx(PN,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};Cx.displayName=kx;var Tx="Tooltip",[GI,Vc]=Hc(Tx),ah="TooltipTrigger",AN=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Vc(ah,r),i=Ex(ah,r),o=Qf(r),a=y.useRef(null),l=Te(e,a,s.onTriggerChange),c=y.useRef(!1),u=y.useRef(!1),h=y.useCallback(()=>c.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(bx,{asChild:!0,...o,children:d.jsx(ue.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:oe(t.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:oe(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:oe(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:oe(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:oe(t.onBlur,s.onClose),onClick:oe(t.onClick,s.onClose)})})});AN.displayName=ah;var ON="TooltipPortal",[JI,IN]=Hc(ON,{forceMount:void 0}),Li="TooltipContent",Rx=y.forwardRef((t,e)=>{const r=IN(Li,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=Vc(Li,t.__scopeTooltip);return d.jsx(qi,{present:n||o.open,children:o.disableHoverableContent?d.jsx(Nx,{side:s,...i,ref:e}):d.jsx(LN,{side:s,...i,ref:e})})}),LN=y.forwardRef((t,e)=>{const r=Vc(Li,t.__scopeTooltip),n=Ex(Li,t.__scopeTooltip),s=y.useRef(null),i=Te(e,s),[o,a]=y.useState(null),{trigger:l,onClose:c}=r,u=s.current,{onPointerInTransitChange:h}=n,p=y.useCallback(()=>{a(null),h(!1)},[h]),f=y.useCallback((b,m)=>{const x=b.currentTarget,w={x:b.clientX,y:b.clientY},g=FN(w,x.getBoundingClientRect()),v=BN(w,g),_=zN(m.getBoundingClientRect()),S=HN([...v,..._]);a(S),h(!0)},[h]);return y.useEffect(()=>()=>p(),[p]),y.useEffect(()=>{if(l&&u){const b=x=>f(x,u),m=x=>f(x,l);return l.addEventListener("pointerleave",b),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",m)}}},[l,u,f,p]),y.useEffect(()=>{if(o){const b=m=>{const x=m.target,w={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),v=!WN(w,o);g?p():v&&(p(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,u,o,c,p]),d.jsx(Nx,{...t,ref:i})}),[DN,$N]=Hc(Tx,{isInside:!1}),MN=pC("TooltipContent"),Nx=y.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Vc(Li,r),c=Qf(r),{onClose:u}=l;return y.useEffect(()=>(document.addEventListener(mg,u),()=>document.removeEventListener(mg,u)),[u]),y.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),d.jsx(ba,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:d.jsxs(_x,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.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:[d.jsx(MN,{children:n}),d.jsx(DN,{scope:r,isInside:!0,children:d.jsx(DC,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Rx.displayName=Li;var jx="TooltipArrow",UN=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Qf(r);return $N(jx,r).isInside?null:d.jsx(Sx,{...s,...n,ref:e})});UN.displayName=jx;function FN(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 BN(t,e,r=5){const n=[];
248switch(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 zN(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 WN(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,h=l.x,p=l.y;u>n!=p>n&&r<(h-c)*(n-u)/(p-u)+c&&(s=!s)}return s}function HN(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),VN(e)}function VN(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],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 qN=Cx,Px=Rx;const KN=qN,GN=y.forwardRef(({className:t,sideOffset:e=4,...r},n)=>d.jsx(Px,{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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));GN.displayName=Px.displayName;function JN(){const t=y.useRef(null);return y.useEffect(()=>{const r=(t.current??document).querySelectorAll(".reveal");if(!r.length)return;const n=new IntersectionObserver(s=>{s.forEach(i=>{i.isIntersecting&&(i.target.classList.add("is-visible"),n.unobserve(i.target))})},{threshold:.12,rootMargin:"0px 0px -40px 0px"});return r.forEach(s=>n.observe(s)),()=>n.disconnect()},[]),t}const Ax="/assets/creekmore-logo-DPgI2mC2.jpg",YN="/assets/retire2nc-logo-CMpbBfny.png",ZN=Mf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 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 [&_svg:last-child]:transition-transform [&_svg:last-child]:duration-200 hover:[&_svg:last-child]:translate-x-0.5",{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"}}),Je=y.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const o=n?hC:"button";return d.jsx(o,{className:je(ZN({variant:e,size:r,className:t})),ref:i,...s})});Je.displayName="Button";const gg=[{href:"#guide",label:"The Guide"},{href:"#video",label:"Our Method"},{href:"#testimonials",label:"Stories"},{href:"#why-us",label:"Why Us"}];function QN(){const[t,e]=y.useState(!1),[r,n]=y.useState(!1);return y.useEffect(()=>{const s=()=>e(window.scrollY>8);return s(),window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[]),d.jsxs("header",{className:`fixed top-0 inset-x-0 z-40 transition-all duration-300 bg-white ${t?"border-b border-border shadow-sm":""}`,children:[d.jsxs("div",{className:"container-tight flex items-center justify-between h-20 md:h-28",children:[d.jsxs("a",{href:"#top",className:"flex items-center gap-4","aria-label":"Creekmore Realty Group home",children:[d.jsx("img",{src:Ax,alt:"Creekmore Realty Group logo",className:"h-16 md:h-20 w-auto rounded-sm",width:200,height:80}),d.jsx("span",{className:"hidden sm:block h-10 md:h-12 w-px bg-border","aria-hidden":!0}),d.jsx("img",{src:YN,alt:"Retire2NC logo",className:"h-12 md:h-16 w-auto",width:160,height:64}),d.jsx("span",{className:"sr-only",children:"Creekmore Realty Group · Retire2NC"})]}),d.jsxs("nav",{className:"hidden md:flex items-center gap-8",children:[gg.map(s=>d.jsx("a",{href:s.href,className:"text-sm font-medium transition-colors text-foreground
248/80 hover:text-primary",children:s.label},s.href)),d.jsx(Je,{asChild:!0,size:"sm",className:"bg-primary hover:bg-primary/90 text-primary-foreground",children:d.jsx("a",{href:"#guide",children:"Get the Guide"})})]}),d.jsx("button",{className:"md:hidden p-2 rounded-md text-foreground",onClick:()=>n(s=>!s),"aria-label":"Toggle menu","aria-expanded":r,children:r?d.jsx(Ff,{}):d.jsx(bT,{})})]}),r&&d.jsx("div",{className:"md:hidden bg-background border-t border-border shadow-md",children:d.jsxs("div",{className:"container-tight py-4 flex flex-col gap-3",children:[gg.map(s=>d.jsx("a",{href:s.href,className:"py-2 text-foreground/80 hover:text-primary",onClick:()=>n(!1),children:s.label},s.href)),d.jsx(Je,{asChild:!0,className:"w-full mt-2",children:d.jsx("a",{href:"#guide",onClick:()=>n(!1),children:"Get the Guide"})})]})})]})}const XN="/assets/hero-coast-Cb6jGgzb.jpg",vg="https://www.flipsnack.com/9775EAF7C6F/relocation-guide-to-brunswick-county-nc.html",ej="https://player.flipsnack.com/?hash=OTc3NUVBRjdDNkYrMW5sYjlueDZyaA%3D%3D",tj="Em0Ujo8ezjU",rj=`https://www.youtube.com/embed/${tj}?rel=0&modestbranding=1`,Xf="https://www.youtube.com/@CreekmoreRealtyGroup",ep="368+ subscribers",Qa={name:"Creekmore Realty Group",brokerage:"eXp Realty",region:"Brunswick County, NC"},nj=[{quote:"Working with Chris and his team on our relocation from Connecticut to coastal North Carolina was such a positive experience. They listened, understood what we wanted, and walked us through every community until we found the perfect fit. We could not have done this move without them.",name:"S. Byam",location:"Connecticut â Brunswick County, NC"},{quote:"Chris and his team went above and beyond in every aspect of our home search to make our dreams of living in Leland a perfect reality. I first saw Chris two years ago on YouTube with his Creekmore Realty channel. I enjoyed his videos because he displayed such a command of the area and knowledge of the varied communities in the Leland area. These videos made me want to meet him in person. When my wife and I came down for our first visit two years ago, we knew that he was a fit for us. He not only had knowledge of the communities, but he truly knew which community was best for us. He spent endless months helping us to find our dream home in Brunswick Forest, and we could not be more happy with the results. I would highly recommend Chris and his team to anyone who is searching for their next forever home.",name:"T. Ruggiero",location:"Brunswick Forest, NC"},{quote:`Chris Creekmore is an exceptional realtor who provided outstanding service during my home search in Brunswick County. From the moment we started working together, Chris demonstrated a deep knowledge of the local market and a genuine commitment to helping me find the perfect home. He tirelessly drove me all around the area, showing me a variety of properties that matched my criteria. Not only did he show me homes, but since I am new to the area, he also drove me around to all the cool spots around so I could get familiar with the area. 249 250Chris's professionalism and attention to detail were evident throughout the process. He took the time to understand my needs and preferences, ensuring that every house we visited was a potential fit. His insightful advice and keen eye for quality helped me make informed decisions. 251 252What truly sets Chris apart is his unwavering dedication to his clients. He was always available to answer my questions, provide updates, and offer support, making the entire home-buying experience smooth and enjoyable. His patience, positive attitude, and genuine care for my satisfaction made a significant difference. I couldn't be happier with the outcome and am incredibly grateful for his assistance. 253 254Thanks to Chris's expertise and hard work, I found an amazing home that exceeded my expectations. Not only did I find a home and a good realtor, but Chris has also become a friend I will forever cherish.`,name:"J. Hunter",location:"Brunswick County, NC"}],sj={hunter:[{quote:"We had an outstanding experience working with John and could not be more pleased with the result. His deep knowledge of the local market was instrumental in helping us price the home strategically, which generated strong interest and led to a quick sale. He took the time to explain market conditions and his pricing approach, giving us confidence in the plan from the very beginning. He also went above and beyond in advising us on how to present the home so it stood out from competing listings and showcased its full value. From preparation through marketing, the attention to detail was exceptional. Having sold another home recently, the level of effort, communication, and professionalism he brought to this transaction was noticeably superior to our prior experience. Hopefully we won't need services of another realtor anytime soon, but if we do, will definitely be calling on John again!",name:"G. Green",location:"Bolivia, NC"},{quote:"John Hunter is an exceptional realtor! I had a property that was in poor condition and honestly didn't know
254what to expectâbut John stepped in with a clear plan, expert guidance, and a positive attitude that never wavered. He marketed the home strategically, communicated every step of the way, and handled all the challenges with true professionalism. Thanks to his hard work and determination, the house sold faster and for more than I expected. I had 4 other realtor groups who failed me, until John came along. I had given up, but again John came along and got it sold! If you need a realtor who gets results, no matter the condition of the property, John Hunter is the one to call. I can't recommend him highly enough!",name:"L. Marlow",location:"Carolina Shores, NC"},{quote:"We couldn't be happier with the professionalism and service John has provided to us. He has been quick to respond to all of our questions and concerns big or small during the process of the sale of our home in Carolina Shores NC. John has top notch negotiating skills and always made us feel like we were his top priority. John not only helped with the sale of our home, he is working with us to buy a new place. We would highly recommend him to anyone!!!",name:"L. McPherson",location:"Carolina Shores, NC"}]};function ij(){return d.jsxs("section",{id:"top",className:"relative min-h-[92vh] flex items-center overflow-hidden",children:[d.jsx("img",{src:XN,alt:"Calm coastal North Carolina beach at golden hour with sea oats and a pier in the distance",className:"absolute inset-0 w-full h-full object-cover",width:1920,height:1080}),d.jsx("div",{className:"absolute inset-0 gradient-hero","aria-hidden":!0}),d.jsx("div",{className:"container-tight relative z-10 pt-28 pb-20 md:pt-32 md:pb-24",children:d.jsxs("div",{className:"max-w-3xl text-primary-foreground animate-fade-in",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[d.jsx("span",{className:"h-px w-10 bg-secondary/80","aria-hidden":!0}),d.jsx("span",{className:"inline-flex items-center gap-2 text-xs md:text-sm tracking-[0.22em] uppercase text-white/85",children:"Brunswick County · Coastal North Carolina"})]}),d.jsxs("h1",{className:"font-display text-3xl sm:text-4xl md:text-5xl lg:text-6xl xl:text-7xl leading-[1.1] text-white",children:[d.jsx("span",{className:"whitespace-nowrap",children:"Thinking About Moving to"}),d.jsx("br",{})," ",d.jsx("span",{className:"italic text-secondary",children:"Coastal North Carolina?"})]}),d.jsx("p",{className:"mt-6 text-lg md:text-xl text-white/90 max-w-2xl leading-relaxed",children:"Get your complete relocation guide to Brunswick County â communities, lifestyle, costs, and the insider tips out-of-state buyers wish they'd had sooner."}),d.jsxs("div",{className:"mt-9 flex flex-col sm:flex-row gap-3",children:[d.jsx(Je,{asChild:!0,size:"lg",className:"bg-white text-primary hover:bg-white/90 h-12 px-7 text-base font-semibold shadow-elegant",children:d.jsxs("a",{href:"#guide",children:["Get Instant Access ",d.jsx(Bw,{className:"ml-1"})]})}),d.jsx(Je,{asChild:!0,size:"lg",variant:"outline",className:"h-12 px-7 text-base bg-transparent border-white/50 text-white hover:bg-white/10 hover:text-white",children:d.jsxs("a",{href:"#video",children:[d.jsx(ST,{className:"mr-1"})," Watch the Video"]})})]}),d.jsxs("div",{className:"mt-10 flex flex-wrap items-center gap-x-6 gap-y-3 text-white/85 text-sm",children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-secondary"}),"Trusted by relocating retirees"]}),d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-secondary"}),"Powered by eXp Realty"]}),d.jsxs("a",{href:Xf,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full border border-white/30 bg-white/10 backdrop-blur-sm px-3 py-1 hover:bg-white/15 transition-colors",children:[d.jsx(Bf,{className:"h-4 w-4 text-secondary"}),d.jsxs("span",{children:[ep," on YouTube"]})]})]})]})}),d.jsx("div",{className:"absolute inset-x-0 bottom-0 z-10",children:d.jsx("div",{className:"bg-primary/80 backdrop-blur-md border-t border-white/10",children:d.jsxs("div",{className:"container-tight py-5 grid grid-cols-3 gap-4 text-center text-white",children:[d.jsxs("div",{children:[d.jsx("div",{className:"font-display text-2xl md:text-3xl text-secondary",children:"368+"}),d.jsx("div",{className:"text-[11px] md:text-xs uppercase tracking-[0.14em] text-white/75 mt-1",children:"YouTube subscribers"})]}),d.jsxs("div",{className:"border-x border-white/15",children:[d.jsx("div",{className:"font-display text-2xl md:text-3xl text-secondary",children:"100+"}),d.jsx("div",{className:"text-[11px] md:text-xs uppercase tracking-[0.14em] text-white/75 mt-1",children:"Families relocated"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"font-display text-2xl md:text-3xl text-secondary",children:"30+ yrs"}),d.jsx("div",{className:"text-[11px] md:text-xs uppercase tracking-[0.14em] text-white/75 mt-1",children:"Coastal NC expertise"})]})]})})})]})}const oj=[{icon:mT,title:"Top Communities",body:"Compare St. James, Brunswick Forest, Compass Pointe, Leland, Southport, Calabash, and more."},{icon:dT,title:"Cost of Living",body:"Real numbers on housing, taxes, HOAs, insurance, and what your retirement dollar actually buys here."},{icon:ET,title:"Coastal Lifestyle",body:"Beaches, golf, dining, marinas, and the slower rhythm that brings people here in the first place."},{icon:wT,title:"Where to Look First",body:"Neighborhood-by-neighborhood breakdown matched to budget, lifestyle, and timeline."},{icon:uT,title:"The Relocation Roadmap",body:"A clear step-by-step plan â from research trip to closing day â built for out-of-state buyers."},{icon:pT,title:"Insider Tips",body:"Pitfalls to avoid, the right questions to ask, and the local pros you'll want in your corner."}];function aj(){return d.jsx("section",{className:"relative py-20 md:py-28 gradient-sand",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs("div",{className:"max-w-2xl reveal",children:[d.jsx("p",{className:"text-xs tracking-[0.18em] uppercase text-accent font-semibold",children:"Inside the guide"}),d.jsx("h2",{className:"font-display text-3xl md:text-5xl mt-3 text-primary leading-tight",children:"Everything you need to know â before you visit"}),d.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"A 60+ page relocation companion built specifically for buyers moving to Brunswick County from out of state."})]}),d.jsx("div",{className:"mt-14 grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:oj.map(({icon:t,title:e,body:r},n)=>d.jsxs("div",{className:"reveal group relative bg-card rounded-xl p-7 border border-border/60 shadow-card-soft hover:shadow-elegant transition-all duration-300 hover:-translate-y-1.5 overflow-hidden",style:{transitionDelay:`${n*60}ms`}
vendor: 2,305 bytes, line 254
254,children:[d.jsx("span",{"aria-hidden":!0,className:"absolute inset-x-0 top-0 h-[3px] gradient-sea scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-300"}),d.jsx("div",{className:"h-12 w-12 rounded-lg gradient-sea flex items-center justify-center text-primary-foreground mb-5 group-hover:scale-110 group-hover:rotate-3 transition-transform duration-300",children:d.jsx(t,{className:"h-6 w-6"})}),d.jsx("h3",{className:"font-display text-xl text-primary",children:e}),d.jsx("p",{className:"mt-2 text-muted-foreground leading-relaxed",children:r})]},e))})]})})}var me;(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 o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},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 o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},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(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(me||(me={}));var yg;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(yg||(yg={}));const z=me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cn=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}}
vendor: 5,704 bytes, line 254
254,O=me.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 Gr 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 o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),n}static assert(e){if(!(e instanceof Gr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,me.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()}}Gr.create=t=>new Gr(t);const lh=(t,e)=>{let r;switch(t.code){case O.invalid_type:t.received===z.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case O.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,me.jsonStringifyReplacer)}`;break;case O.unrecognized_keys:r=`Unrecognized key(s) in object: ${me.joinValues(t.keys,", ")}`;break;case O.invalid_union:r="Invalid input";break;case O.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${me.joinValues(t.options)}`;break;case O.invalid_enum_value:r=`Invalid enum value. Expected ${me.joinValues(t.options)}, received '${t.received}'`;break;case O.invalid_arguments:r="Invalid function arguments";break;case O.invalid_return_type:r="Invalid function return type";break;case O.invalid_date:r="Invalid date";break;case O.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}"`:me.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case O.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 O.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 O.custom:r="Invalid input";break;case O.invalid_intersection_types:r="Intersection results could not be merged";break;case O.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case O.not_finite:r="Number must be finite";break;default:r=e.defaultError,me.assertNever(t)}return{message:r}};let lj=lh;function cj(){return lj}const uj=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function U(t,e){const r=cj(),n=uj({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===lh?void 0:lh].filter(s=>!!s)});t.common.issues.push(n)}class Ot{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 X;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,o=await s.value;n.push({key:i,value:o})}return Ot.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:i,value:o}=s;
vendor: 6,183 bytes, line 254
254if(i.status==="aborted"||o.status==="aborted")return X;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const X=Object.freeze({status:"aborted"}),go=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),wg=t=>t.status==="aborted",xg=t=>t.status==="dirty",Di=t=>t.status==="valid",ac=t=>typeof Promise<"u"&&t instanceof Promise;var H;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(H||(H={}));class $n{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 bg=(t,e)=>{if(Di(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 Gr(t.common.issues);return this._error=r,this._error}}};function ae(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:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??r??a.defaultError}},description:s}}class he{get description(){return this._def.description}_getType(e){return cn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:cn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ot,ctx:{common:e.parent.common,data:e.data,parsedType:cn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(ac(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:cn(e)},s=this._parseSync({data:e,path:n.path,parent:n});return bg(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:cn(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return Di(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=>Di(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:cn(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(ac(s)?s:Promise.resolve(s));return bg(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 o=e(s),a=()=>i.addIssue({code:O.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!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 Mi({schema:this,typeName:ee.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 An.create(this,this._def)}nullable(){return Ui.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rr.create(this)}promise(){return dc.create(this,this._def)}or(e){return cc.create([this,e],this._def)}and(e){return uc.create(this,e,this._def)}transform(e){return new Mi({...ae(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new dh({...ae(this._def),innerType:this,defaultValue:r,typeName:ee.ZodDefault})}brand(){return new Oj({typeName:ee.ZodBranded,type:this,...ae(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new hh({...ae(this._def),innerType:this,catchValue:r,typeName:ee.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return tp.create(this,e)}readonly(){return fh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dj=/^c[^\s-]{8,}
vendor: 3,693 bytes, line 254
254$/i,hj=/^[0-9a-z]+$/,fj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pj=/^[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,mj=/^[a-z0-9_-]{21}$/i,gj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vj=/^[-+]?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)?)??$/,yj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Bu;const xj=/^(?:(?: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])$/,bj=/^(?:(?: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])$/,_j=/^(([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]))$/,Sj=/^(([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])$/,kj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ej=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ox="((\\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])))",Cj=new RegExp(`^${Ox}$`);function Ix(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 Tj(t){return new RegExp(`^${Ix(t)}$`)}function Rj(t){let e=`${Ox}T${Ix(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 Nj(t,e){return!!((e==="v4"||!e)&&xj.test(t)||(e==="v6"||!e)&&_j.test(t))}function jj(t,e){if(!gj.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 Pj(t,e){return!!((e==="v4"||!e)&&bj.test(t)||(e==="v6"||!e)&&Sj.test(t))}class _n extends he{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){const i=this._getOrReturnCtx(e);
vendor: 1,086 bytes, line 254
254return U(i,{code:O.invalid_type,expected:z.string,received:i.parsedType}),X}const n=new Ot;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),U(s,{code:O.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),U(s,{code:O.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?U(s,{code:O.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&U(s,{code:O.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")yj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"email",code:O.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Bu||(Bu=new RegExp(wj,"u")),Bu.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"emoji",code:O.invali
254d_string,message:i.message}),n.dirty());else if(i.kind==="uuid")pj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"uuid",code:O.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")mj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"nanoid",code:O.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")dj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"cuid",code:O.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")hj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"cuid2",code:O.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")fj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"ulid",code:O.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),U(s,{validation:"url",code:O.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),U(s,{validation:"regex",code:O.invali
vendor: 1,076 bytes, line 254
254d_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),U(s,{code:O.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),U(s,{code:O.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),U(s,{code:O.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Rj(i).test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{code:O.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Cj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{code:O.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Tj(i).test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{code:O.invali
254d_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?vj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"duration",code:O.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Nj(e.data,i.version)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"ip",code:O.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?jj(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"jwt",code:O.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Pj(e.data,i.version)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"cidr",code:O.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?kj.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"base64",code:O.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?Ej.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"base64url",code:O.invalid_string,message:i.message}),n.dirty()):me.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:O.invali
vendor: 11,452 bytes, line 254
254d_string,...H.errToObj(n)})}_addCheck(e){return new _n({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...H.errToObj(e)})}url(e){return this._addCheck({kind:"url",...H.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...H.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...H.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...H.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...H.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...H.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...H.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...H.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...H.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...H.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...H.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...H.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,...H.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,...H.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...H.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...H.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...H.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...H.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...H.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...H.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...H.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...H.errToObj(r)})}nonempty(e){return this.min(1,H.errToObj(e))}trim(){return new _n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _n({...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}}_n.create=t=>new _n({checks:[],typeName:ee.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ae(t)});function Aj(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(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class ra extends he{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)!==z.number){const i=this._getOrReturnCtx(e);return U(i,{code:O.invalid_type,expected:z.number,received:i.parsedType}),X}let n;const s=new Ot;for(const i of this._def.checks)i.kind==="int"?me.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:O.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),U(n,{code:O.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),U(n,{code:O.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Aj(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),U(n,{code:O.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:O.not_finite,message:i.message}),s.dirty()):me.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,H.toString(r))}gt(e,r){return this.setLimit("min",e,!1,H.toString(r))}lte(e,r){return this.setLimit("max",e,!0,H.toString(r))}lt(e,r){return this.setLimit("max",e,!1,H.toString(r))}setLimit(e,r,n,s){return new ra({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:H.toString(s)}]})}_addCheck(e){return new ra({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:H.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:H.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:H.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:H.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:H.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:H.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:H.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:H.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:H.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"&&me.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)}}ra.create=t=>new ra({checks:[],typeName:ee.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ae(t)});class na extends he{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)!==z.bigint)return this._getInvalidInput(e);let n;const s=new Ot;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),U(n,{code:O.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),U(n,{code:O.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),U(n,{code:O.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):me.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return U(r,{code:O.invalid_type,expected:z.bigint,received:r.parsedType}),X}gte(e,r){return this.setLimit("min",e,!0,H.toString(r))}gt(e,r){return this.setLimit("min",e,!1,H.toString(r))}lte(e,r){return this.setLimit("max",e,!0,H.toString(r))}lt(e,r){return this.setLimit("max",e,!1,H.toString(r))}setLimit(e,r,n,s){return new na({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:H.toString(s)}]})}_addCheck(e){return new na({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:H.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:H.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:H.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:H.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:H.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}}na.create=t=>new na({checks:[],typeName:ee.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ae(t)});class _g extends he{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){const n=this._getOrReturnCtx(e);return U(n,{code:O.invalid_type,expected:z.boolean,received:n.parsedType}),X}return Vt(e.data)}}_g.create=t=>new _g({typeName:ee.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ae(t)});class lc extends he{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){const i=this._getOrReturnCtx(e);return U(i,{code:O.invalid_type,expected:z.date,received:i.parsedType}),X}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return U(i,{code:O.invalid_date}),X}const n=new Ot;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),U(s,{code:O.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),U(s,{code:O.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):me.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new lc({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:H.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:H.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}}lc.create=t=>new lc({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ee.ZodDate,...ae(t)});class Sg extends he{_parse(e){if(this._getType(e)!==z.symbol){const n=this._getOrReturnCtx(e);
vendor: 1,228 bytes, line 254
254return U(n,{code:O.invalid_type,expected:z.symbol,received:n.parsedType}),X}return Vt(e.data)}}Sg.create=t=>new Sg({typeName:ee.ZodSymbol,...ae(t)});class kg extends he{_parse(e){if(this._getType(e)!==z.undefined){const n=this._getOrReturnCtx(e);return U(n,{code:O.invalid_type,expected:z.undefined,received:n.parsedType}),X}return Vt(e.data)}}kg.create=t=>new kg({typeName:ee.ZodUndefined,...ae(t)});class Eg extends he{_parse(e){if(this._getType(e)!==z.null){const n=this._getOrReturnCtx(e);return U(n,{code:O.invalid_type,expected:z.null,received:n.parsedType}),X}return Vt(e.data)}}Eg.create=t=>new Eg({typeName:ee.ZodNull,...ae(t)});class Cg extends he{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}}Cg.create=t=>new Cg({typeName:ee.ZodAny,...ae(t)});class Tg extends he{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}}Tg.create=t=>new Tg({typeName:ee.ZodUnknown,...ae(t)});class Mn extends he{_parse(e){const r=this._getOrReturnCtx(e);return U(r,{code:O.invalid_type,expected:z.never,received:r.parsedType}),X}}Mn.create=t=>new Mn({typeName:ee.ZodNever,...ae(t)});class Rg extends he{_parse(e){if(this._getType(e)!==z.undefined){const n=this._getOrReturnCtx(e);
vendor: 5,707 bytes, line 254
254return U(n,{code:O.invalid_type,expected:z.void,received:n.parsedType}),X}return Vt(e.data)}}Rg.create=t=>new Rg({typeName:ee.ZodVoid,...ae(t)});class Rr extends he{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==z.array)return U(r,{code:O.invalid_type,expected:z.array,received:r.parsedType}),X;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(U(r,{code:o?O.too_big:O.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?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&&(U(r,{code:O.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&&(U(r,{code:O.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((o,a)=>s.type._parseAsync(new $n(r,o,r.path,a)))).then(o=>Ot.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new $n(r,o,r.path,a)));return Ot.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new Rr({...this._def,minLength:{value:e,message:H.toString(r)}})}max(e,r){return new Rr({...this._def,maxLength:{value:e,message:H.toString(r)}})}length(e,r){return new Rr({...this._def,exactLength:{value:e,message:H.toString(r)}})}nonempty(e){return this.min(1,e)}}Rr.create=(t,e)=>new Rr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...ae(e)});function Bs(t){if(t instanceof Me){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=An.create(Bs(n))}return new Me({...t._def,shape:()=>e})}else return t instanceof Rr?new Rr({...t._def,type:Bs(t.element)}):t instanceof An?An.create(Bs(t.unwrap())):t instanceof Ui?Ui.create(Bs(t.unwrap())):t instanceof ys?ys.create(t.items.map(e=>Bs(e))):t}class Me extends he{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=me.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==z.object){const c=this._getOrReturnCtx(e);return U(c,{code:O.invalid_type,expected:z.object,received:c.parsedType}),X}const{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Mn&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],h=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new $n(s,h,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Mn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(U(s,{code:O.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const h=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new $n(s,h,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const h=await u.key,p=await u.value;c.push({key:h,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Ot.mergeObjectSync(n,c)):Ot.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return H.errToObj,new Me({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:H.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Me({...this._def,unknownKeys:"strip"})}passthrough(){return new Me({...this._def,unknownKeys:"passthrough"})}extend(e){return new Me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Me({...this._def,catchall:e})}pick(e){const r={};for(const n of me.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Me({...this._def,shape:()=>r})}omit(e){const r={};for(const n of me.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Me({...this._def,shape:()=>r})}deepPartial(){return Bs(this)}partial(e){const r={};for(const n of me.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new Me({...this._def,shape:()=>r})}required(e){const r={};for(const n of me.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof An;)i=i._def.innerType;r[n]=i}return new Me({...this._def,shape:()=>r})}keyof(){return Lx(me.objectKeys(this.shape))}}Me.create=(t,e)=>new Me({shape:()=>t,unknownKeys:"strip",catchall:Mn.create(),typeName:ee.ZodObject,...ae(e)});Me.strictCreate=(t,e)=>new Me({shape:()=>t,unknownKeys:"strict",catchall:Mn.create(),typeName:ee.ZodObject,...ae(e)});Me.lazycreate=(t,e)=>new Me({shape:t,unknownKeys:"strip",catchall:Mn.create(),typeName:ee.ZodObject,...ae(e)});class cc extends he{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Gr(a.ctx.common.issues));
vendor: 5,504 bytes, line 254
254return U(r,{code:O.invalid_union,unionErrors:o}),X}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Gr(l));return U(r,{code:O.invalid_union,unionErrors:a}),X}}get options(){return this._def.options}}cc.create=(t,e)=>new cc({options:t,typeName:ee.ZodUnion,...ae(e)});function ch(t,e){const r=cn(t),n=cn(e);if(t===e)return{valid:!0,data:t};if(r===z.object&&n===z.object){const s=me.objectKeys(e),i=me.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=ch(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===z.array&&n===z.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=ch(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===z.date&&n===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class uc extends he{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(i,o)=>{if(wg(i)||wg(o))return X;const a=ch(i.value,o.value);return a.valid?((xg(i)||xg(o))&&r.dirty(),{status:r.value,value:a.data}):(U(n,{code:O.invalid_intersection_types}),X)};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,o])=>s(i,o)):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}))}}uc.create=(t,e,r)=>new uc({left:t,right:e,typeName:ee.ZodIntersection,...ae(r)});class ys extends he{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.array)return U(n,{code:O.invalid_type,expected:z.array,received:n.parsedType}),X;if(n.data.length<this._def.items.length)return U(n,{code:O.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),X;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:O.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new $n(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>Ot.mergeArray(r,o)):Ot.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new ys({...this._def,rest:e})}}ys.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ys({items:t,typeName:ee.ZodTuple,rest:null,...ae(e)})};class Ng extends he{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!==z.map)return U(n,{code:O.invalid_type,expected:z.map,received:n.parsedType}),X;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new $n(n,a,n.path,[c,"key"])),value:i._parse(new $n(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return X;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return X;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}Ng.create=(t,e,r)=>new Ng({valueType:e,keyType:t,typeName:ee.ZodMap,...ae(r)});class sa extends he{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.set)return U(n,{code:O.invalid_type,expected:z.set,received:n.parsedType}),X;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(U(n,{code:O.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&&(U(n,{code:O.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return X;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>i._parse(new $n(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new sa({...this._def,minSize:{value:e,message:H.toString(r)}})}max(e,r){return new sa({...this._def,maxSize:{value:e,message:H.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}sa.create=(t,e)=>new sa({valueType:t,minSize:null,maxSize:null,typeName:ee.ZodSet,...ae(e)});class jg extends he{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})}}jg.create=(t,e)=>new jg({getter:t,typeName:ee.ZodLazy,...ae(e)});class uh extends he{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);
vendor: 5,564 bytes, line 254
254return U(r,{received:r.data,code:O.invalid_literal,expected:this._def.value}),X}return{status:"valid",value:e.data}}get value(){return this._def.value}}uh.create=(t,e)=>new uh({value:t,typeName:ee.ZodLiteral,...ae(e)});function Lx(t,e){return new $i({values:t,typeName:ee.ZodEnum,...ae(e)})}class $i extends he{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return U(r,{expected:me.joinValues(n),received:r.parsedType,code:O.invalid_type}),X}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 U(r,{received:r.data,code:O.invalid_enum_value,options:n}),X}return Vt(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 $i.create(e,{...this._def,...r})}exclude(e,r=this._def){return $i.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}$i.create=Lx;class Pg extends he{_parse(e){const r=me.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==z.string&&n.parsedType!==z.number){const s=me.objectValues(r);return U(n,{expected:me.joinValues(s),received:n.parsedType,code:O.invalid_type}),X}if(this._cache||(this._cache=new Set(me.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=me.objectValues(r);return U(n,{received:n.data,code:O.invalid_enum_value,options:s}),X}return Vt(e.data)}get enum(){return this._def.values}}Pg.create=(t,e)=>new Pg({values:t,typeName:ee.ZodNativeEnum,...ae(e)});class dc extends he{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.promise&&r.common.async===!1)return U(r,{code:O.invalid_type,expected:z.promise,received:r.parsedType}),X;const n=r.parsedType===z.promise?r.data:Promise.resolve(r.data);return Vt(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}dc.create=(t,e)=>new dc({type:t,typeName:ee.ZodPromise,...ae(e)});class Mi extends he{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.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:o=>{U(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return X;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?X:l.status==="dirty"||r.value==="dirty"?go(l.value):l});{if(r.value==="aborted")return X;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?X:a.status==="dirty"||r.value==="dirty"?go(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,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 a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?X:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?X:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Di(o))return X;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Di(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):X);me.assertNever(s)}}Mi.create=(t,e,r)=>new Mi({schema:t,typeName:ee.ZodEffects,effect:e,...ae(r)});Mi.createWithPreprocess=(t,e,r)=>new Mi({schema:e,effect:{type:"preprocess",transform:t},typeName:ee.ZodEffects,...ae(r)});class An extends he{_parse(e){return this._getType(e)===z.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}An.create=(t,e)=>new An({innerType:t,typeName:ee.ZodOptional,...ae(e)});class Ui extends he{_parse(e){return this._getType(e)===z.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ui.create=(t,e)=>new Ui({innerType:t,typeName:ee.ZodNullable,...ae(e)});class dh extends he{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===z.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}dh.create=(t,e)=>new dh({innerType:t,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ae(e)});class hh extends he{_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 ac(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Gr(n.common.issues)},input:n.data})}
254)):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Gr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}hh.create=(t,e)=>new hh({innerType:t,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ae(e)});class Ag extends he{_parse(e){if(this._getType(e)!==z.nan){const n=this._getOrReturnCtx(e);return U(n,{code:O.invalid_type,expected:z.nan,received:n.parsedType}),X}return{status:"valid",value:e.data}}}Ag.create=t=>new Ag({typeName:ee.ZodNaN,...ae(t)});class Oj extends he{_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 tp extends he{_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"?X:i.status==="dirty"?(r.dirty(),go(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"?X: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 tp({in:e,out:r,typeName:ee.ZodPipeline})}}class fh extends he{_parse(e){const r=this._def.innerType._parse(e),n=s=>(Di(s)&&(s.value=Object.freeze(s.value)),s);return ac(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}fh.create=(t,e)=>new fh({innerType:t,typeName:ee.ZodReadonly,...ae(e)});Me.lazycreate;var ee;(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"})(ee||(ee={}));const Tt=_n.create;Mn.create;Rr.create;const qc=Me.create;Me.strictCreate;cc.create;uc.create;ys.create;const zu=uh.create;$i.create;dc.create;An.create;Ui.create;function Ij(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}const Lj=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class rp 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 Dj extends rp{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Og extends rp{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Ig extends rp{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var ph;(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"})(ph||(ph={}));class $j{constructor(e,{headers:r={},customFetch:n,region:s=ph.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=Lj(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Ij(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const b=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,b.searchParams.set("forceFunctionRegion",f));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(p["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(p["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let x=u;h&&(o=new AbortController,i=setTimeout(()=>
254o.abort(),h),u?(x=o.signal,u.addEventListener("abort",()=>o.abort())):x=o.signal);const w=yield this.fetch(b.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:m,signal:x}).catch(S=>{throw new Dj(S)}),g=w.headers.get("x-relay-error");if(g&&g==="true")throw new Og(w);if(!w.ok)throw new Ig(w);let v=((s=w.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return v==="application/json"?_=yield w.json():v==="application/octet-stream"||v==="application/pdf"?_=yield w.blob():v==="text/event-stream"?_=w:v==="multipart/form-data"?_=yield w.formData():_=yield w.text(),{data:_,error:null,response:w}}catch(a){return{data:null,error:a,response:a instanceof Ig||a instanceof Og?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Dx=3,Lg=t=>Math.min(1e3*2**t,3e4),Mj=[520,503],$x=["GET","HEAD","OPTIONS"];var Uj=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Dg(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 Fj(t,e,r,n){return!(!n||r>=Dx||!$x.includes(t)||!Mj.includes(e))}var Bj=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 o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,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"||!$x.includes(r.method))throw h;if(r.retryEnabled&&o<Dx){const p=Lg(o);o++,await Dg(p,r.signal);continue}throw h}if(Fj(r.method,u.status,o,r.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:Lg(o);await u.text(),o++,await Dg(p,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var p,f,b,m;const g=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",v=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(b=o==null?void 0:o.name)!==null&&b!==void 0?b:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 255 256Caused by: ${(m=h==null?void 0:h.name)!==null&&m!==void 0?m:"Error"}: ${g}`,v&&(l+=` (${v})`),h!=null&&h.stack&&(l+=` 257${h.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const w=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${w} 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")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(c+=`. Your request URL is ${w} 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:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
257)),i.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const p=await t.text();p===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?n=p:n=JSON.parse(p))}const u=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&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,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const u=await t.text();try{r=JSON.parse(u),Array.isArray(r)&&t.status===404&&(n=[],r=null,i=200,o="OK")}catch{t.status===404&&u===""?(i=204,o="No Content"):r={message:u}}if(r&&e.shouldThrowOnError)throw new Uj(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},zj=class extends Bj{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",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${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 o;const a=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),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 zs=class extends zj{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])=>
257r!==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}},Wj=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 o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new zs({method:s,url:a,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:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),r||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2570){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new zs({method:s,url:i,headers:o,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 o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(c.length>0){const u=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",u.join(","))}}return new zs({method:o,url:a,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 zs({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 zs({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 ia(t){"@babel/helpers - typeof";return ia=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},ia(t)}function Hj(t,e){if(ia(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vj(t){var e=Hj(t,"string");return ia(e)=="symbol"?e:e+""}function qj(t,e,r){return(e=Vj(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mg(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 Xa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mg(Object(r),!0).forEach(function(n){qj(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Kj=class Mx{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(p),l(c,u);const b=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",b,{once:!0}),l(c,Xa(Xa({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",b)})}return l(c,Xa(Xa({},u),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Wj(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 Mx(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 o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=n&&Object.values(r).some(u);h?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,b])=>b!==void 0).map(([f,b])=>[f,Array.isArray(b)?`{${b.join(",")}}`:`${b}
257`]).forEach(([f,b])=>{l.searchParams.append(f,b)})):(a="POST",c=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 zs({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Gj{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.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 r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 258import ws from "ws" 259new 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.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 260 261Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const Jj="2.104.1",Yj=`realtime-js/${Jj}`,Zj="1.0.0",Ux="2.0.0",Qj=Ux,Xj=1e4,eP=100,hn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Fx={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},mh={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class tP{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:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,r,n){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",c=e.payload.event,u=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},h=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.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+a.length+o.length+c.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let b=new DataView(f),m=0;b.setUint8(m++,this.KINDS.userBroadcastPush),b.setUint8(m++,l.length),b.setUint8(m++,a.length),b.setUint8(m++,o.length),b.setUint8(m++,c.length),b.setUint8(m++,h.length),b.setUint8(m++,r),Array.from(l,w=>
261b.setUint8(m++,w.charCodeAt(0))),Array.from(a,w=>b.setUint8(m++,w.charCodeAt(0))),Array.from(o,w=>b.setUint8(m++,w.charCodeAt(0))),Array.from(c,w=>b.setUint8(m++,w.charCodeAt(0))),Array.from(h,w=>b.setUint8(m++,w.charCodeAt(0)));var x=new Uint8Array(f.byteLength+n.byteLength);return x.set(new Uint8Array(f),0),x.set(new Uint8Array(n),f.byteLength),x.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,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,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),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(e.slice(l,l+s));l=l+s;const u=n.decode(e.slice(l,l+i));l=l+i;const h=n.decode(e.slice(l,l+o));l=l+o;const p=e.slice(l,e.byteLength),f=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,b={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(b.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:b}}_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 be;(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.tsrange="tsrange",t.tstzrange="tstzrange"})(be||(be={}));const Ug=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=rP(o,t,e,s),i),{}):{}},rP=(t,e,r,n)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=r[t];return i&&!n.includes(i)?Bx(i,o):gh(o)},Bx=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return oP(e,r)}switch(t){case be.bool:return nP(e);case be.float4:case be.float8:case be.int2:case be.int4:case be.int8:case be.numeric:case be.oid:return sP(e);case be.json:case be.jsonb:return iP(e);case be.timestamp:return aP(e);case be.abstime:case be.date:case be.daterange:case be.int4range:case be.int8range:case be.money:case be.reltime:case be.text:case be.time:case be.timestamptz:case be.timetz:case be.tsrange:case be.tstzrange:return gh(e);default:return gh(e)}},gh=t=>t,nP=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},sP=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},iP=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},oP=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const o=t.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Bx(e,a))}return t},aP=t=>typeof t=="string"?t.replace(" ","T"):t,zx=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 jo=t=>typeof t=="function"?t:function(){return t},lP=typeof self<"u"?self:null,Ws=typeof window<"u"?window:null,vr=lP||Ws||globalThis,cP="2.0.0",uP=1e4,dP=1e3,br={connecting:0,open:1,closing:2,closed:3},gt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Lr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},vh={longpoll:"longpoll",websocket:"websocket"},hP={complete:4},yh="base64url.bearer.phx.",el=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.recHo
vendor: 21,658 bytes, lines 261-262
261oks=[],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})}},Wx=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))}},fP=class{constructor(t,e,r){this.state=gt.closed,this.topic=t,this.params=jo(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new el(this,Lr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Wx(()=>{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=gt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=gt.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=gt.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=gt.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 el(this,Lr.leave,jo({}),this.timeout).send(),this.state=gt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Lr.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=gt.closed,this.bindings=[]}onClose(t){this.on(Lr.close,t)}onError(t){return this.on(Lr.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 el(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=gt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Lr.close,"leave")},r=new el(this,Lr.leave,jo({}),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=gt.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(o=>o.event===t&&this.filterBindings(o,e,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===gt.closed}isErrored(){return this.state===gt.errored}isJoined(){return this.state===gt.joined}isJoining(){return this.state===gt.joining}isLeaving(){return this.state===gt.leaving}},hc=class{static request(t,e,r,n,s,i,o){if(vr.XDomainRequest){let a=new vr.XDomainRequest;return this.xdomainRequest(a,t,e,n,s,i,o)}else if(vr.XMLHttpRequest){let a=new vr.XMLHttpRequest;return this.xhrRequest(a,t,e,r,n,s,i,o)}else{if(vr.fetch&&vr.AbortController)return this.fetchRequest(t,e,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,s,i,o){let a={method:t,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),vr.fetch(e,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,r,n,s,i,o){return t.timeout=s,t.open(e,r),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,s,i,o,a){t.open(e,r,!0),t.timeout=i;for(let[l,c]of Object.entries(n))t.setRequestHeader(l,c);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===hP.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),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)}`}},pP=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)},As=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(yh)&&(this.authToken=atob(e[1].slice(yh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=br.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+vh.websocket),"$1/"+vh.longpoll)}endpointURL(){return hc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=br.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===br.open||this.readyState===br.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=br.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=pP(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(` 262`),()=>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=br.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,o=()=>{this.reqs.delete(i),n()};i=hc.request(t,this.endpointURL(),e,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},mP=class vo{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:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=vo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=vo.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=vo.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return vo.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,s){let i=this.clone(e),o={},a={};return this.map(i,(l,c)=>{r[l]||(a[l]=c)}),this.map(r,(l,c)=>{let u=i[l];if(u){let h=c.metas.map(m=>m.phx_ref),p=u.metas.map(m=>m.phx_ref),f=c.metas.filter(m=>p.indexOf(m.phx_ref)<0),b=u.metas.filter(m=>h.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),b.length>0&&(a[l]=this.clone(u),a[l].metas=b)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(e,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=e[a];if(e[a]=this.clone(l),c){let u=e[a].metas.map(p=>p.phx_ref),h=c.metas.filter(p=>u.indexOf(p.phx_ref)<0);e[a].metas.unshift(...h)}n(a,c,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;let u=l.metas.map(h=>h.phx_ref);c.metas=c.metas.filter(h=>u.indexOf(h.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete e[a]}),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))}},tl={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,o]=JSON.parse(t);return e({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:s,payload:i}=t,o=this.META_LENGTH+e.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,r.length),l.setUint8(c++,s.length),l.setUint8(c++,n.length),Array.from(e,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(s,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(c++,h.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.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),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(t.slice(o,o+n));o=o+n;let l=r.decode(t.slice(o,o+s));o=o+s;let c=r.decode(t.slice(o,o+i));o=o+i;let u=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(t.slice(a,a+n));a=a+n;let c=r.decode(t.slice(a,a+s));a=a+s;let u=r.decode(t.slice(a,a+i));a=a+i;let h=r.decode(t.slice(a,a+o));a=a+o;let p=t.slice(a,t.byteLength),f={status:h,response:p};return{join_ref:l,ref:c,topic:u,event:Lr.reply,payload:f}},decodeBroadcast(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(t.slice(i,i+n));i=i+n;let a=r.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},gP=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||uP,this.transport=e.transport||vr.WebSocket||As,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||vr&&vr.sessionStorage,this.establishedConnections=0,this.defaultEncoder=tl.encode.bind(tl),this.defaultDecoder=tl.decode.bind(tl),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!==As?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Ws&&Ws.addEventListener&&(Ws.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Ws.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),Ws.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=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(n,s,i)=>{console.log(`${n}: ${s}`,i)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=jo(e.params||{}),this.endPoint=`${t}/${vh.websocket}`,this.vsn=e.vsn||cP,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Wx(()=>{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 As}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=hc.appendParams(hc.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=jo(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==As?this.connectWithFallback(As,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 As:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${yh}${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,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(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(a,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(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),dP,"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===br.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(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError()}
262triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Lr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case br.connecting:return"connecting";case br.open:return"open";case br.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 fP(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:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}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 a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}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 Po{constructor(e,r){const n=yP(r);this.presence=new mP(e.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=Po.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Po.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Po.transformState(this.presence.state)}static transformState(e){return e=vP(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return r[n]=Cl(s),r},{})}static onJoinPayload(e,r,n){const s=Fg(r),i=Cl(n);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,r,n){const s=Fg(r),i=Cl(n);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function Cl(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function vP(t){return JSON.parse(JSON.stringify(t))}function yP(t){return(t==null?void 0:t.events)&&{events:t.events}}function Fg(t){return t!=null&&t.metas?Cl(t):[]}var Bg;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Bg||(Bg={}));class wP{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Po(this.channel.channelAdapter,r)}}class xP{constructor(e,r,n){const s=bP(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>eP){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===hn.joined}isJoined(){return this.state===hn.joined}isJoining(){return this.state===hn.joining}isClosed(){return this.state===hn.closed}isLeaving(){return this.state===hn.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function bP(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var zg;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
262E="DELETE"})(zg||(zg={}));var si;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(si||(si={}));var Dr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Dr||(Dr={}));class Ao{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 xP(this.socket.socketAdapter,e,this.params),this.presence=new wP(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=zx(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:o,presence:a,private:l}}=this.params,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[si.PRESENCE]&&this.bindings[si.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{e==null||e(Dr.CHANNEL_ERROR,f)}),this._onClose(()=>e==null?void 0:e(Dr.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(Dr.SUBSCRIBED);return}this._updatePostgresBindings(f,e)}).receive("error",f=>{this.state=hn.errored,e==null||e(Dr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(Dr.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,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:h,filter:p}}=l,f=e&&e[a];if(f&&f.event===c&&Ao.isFilterValueEqual(f.schema,u)&&Ao.isFilterValueEqual(f.table,h)&&Ao.isFilterValueEqual(f.filter,p))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=hn.errored,r==null||r(Dr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=hn.errored&&r&&r(Dr.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===si.PRESENCE||e===si.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 o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
262try{const c=await a.json();l=c.error||c.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:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.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),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(e,r,n){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],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,o,a,l,c,u;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,b=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((o=r.ids)===null||o===void 0?void 0:o.includes(f))&&(b==="*"||(b==null?void 0:b.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=r==null?void 0:r.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,r){const{close:n,error:s,leave:i,join:o}=Fx;return r&&[n,s,i,o].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:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),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=Ug(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Ug(e.columns,e.old_record)),r}}class _P{constructor(e,r){this.socket=new gP(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()==mh.connecting}isDisconnecting(){return this.socket.connectionState()==mh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const SP={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},kP=[1e3,2e3,5e3,1e4],EP=1e4,CP=` 263 addEventListener("message", (e) => { 264 if (e.data.event === "start") { 265 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 266 } 267 });`;class TP{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={}
267,this.ref=0,this.serializer=new tP,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((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 _P(e,s),this.httpEndpoint=zx(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} 268 269To use Realtime in Node.js, you need to provide a WebSocket implementation: 270 271Option 1: Use Node.js 22+ which has native WebSocket support 272Option 2: Install and provide the "ws" package: 273 274 npm install ws 275 276 import ws from "ws" 277 const client = new RealtimeClient(url, { 278 ...options, 279 transport: ws 280 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return 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(),this.channels.length===0&&this.disconnect(),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 this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||mh.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 Ao(`realtime:${e}`,r,this);return 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)}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:Yj};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(Fx.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([CP],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,s,i,o,a,l,c,u;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 h={};
280h.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:Xj,h.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:SP.HEARTBEAT_INTERVAL,h.transport=(o=e==null?void 0:e.transport)!==null&&o!==void 0?o:Gj.getWebSocketConstructor(),h.params=e==null?void 0:e.params,h.logger=e==null?void 0:e.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),h.reconnectAfterMs=(a=e==null?void 0:e.reconnectAfterMs)!==null&&a!==void 0?a:m=>kP[m-1]||EP;let p,f;const b=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:Qj;switch(b){case Zj:p=(m,x)=>x(JSON.stringify(m)),f=(m,x)=>x(JSON.parse(m));break;case Ux:p=this.serializer.encode.bind(this.serializer),f=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=b,h.encode=(c=e==null?void 0:e.encode)!==null&&c!==void 0?c:p,h.decode=(u=e==null?void 0:e.decode)!==null&&u!==void 0?u:f,h.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,h.params=Object.assign(Object.assign({},h.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,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var oa=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 RP(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 NP(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 jP(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=RP(t.baseUrl,n,s),l=await NP(t.auth),c=await e(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),p=h&&u?JSON.parse(u):u;if(!c.ok){const f=h?p:void 0,b=f==null?void 0:f.error;throw new oa((b==null?void 0:b.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function rl(t){return t.join("�")}var PP=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:rl(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/${rl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${rl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${rl(t.namespace)}`}),!0}catch(e){if(e instanceof oa&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof oa&&r.status===409)return;throw r}}};function Os(t){return t.join("�")}var AP=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/${Os(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/${Os(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/${Os(t.namespace)}
280/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/${Os(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/${Os(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/${Os(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof oa&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof oa&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},OP=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=jP({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new PP(this.client,e),this.tableOps=new AP(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)}async 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 aa(t){"@babel/helpers - typeof";return aa=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},aa(t)}function IP(t,e){if(aa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function LP(t){var e=IP(t,"string");return aa(e)=="symbol"?e:e+""}function DP(t,e,r){return(e=LP(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wg(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 Y(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wg(Object(r),!0).forEach(function(n){DP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Kc=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 Gc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var wh=class extends Kc{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 Y({},super.toJSON())}},Hx=class extends Kc{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function np(t,e,r){const n=Y({},t),s=e.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function $P(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const MP=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),UP=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);
280return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xh=t=>{if(Array.isArray(t))return t.map(r=>xh(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]=xh(n)}),e},FP=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Hg=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},BP=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&typeof t.json=="function"){const s=t;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new wh(Hg(o),i,a,n))}).catch(()=>{const o=i+"";e(new wh(s.statusText||`HTTP ${i} error`,i,o,n))})}else e(new Hx(Hg(t),t,n))},zP=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return Y(Y({},s),r);if(UP(n)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=np(o,"Content-Type",(i=a)!==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),Y(Y({},s),r)};async function uo(t,e,r,n,s,i,o){return new Promise((a,l)=>{t(r,zP(e,n,s,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>BP(c,l,n,o))})}function Vx(t="storage"){return{get:async(e,r,n,s)=>uo(e,"GET",r,n,s,void 0,t),post:async(e,r,n,s,i)=>uo(e,"POST",r,s,i,n,t),put:async(e,r,n,s,i)=>uo(e,"PUT",r,s,i,n,t),head:async(e,r,n,s)=>uo(e,"HEAD",r,Y(Y({},n),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,r,n,s,i)=>uo(e,"DELETE",r,s,i,n,t)}}const WP=Vx("storage"),{get:la,post:tr,put:bh,head:HP,remove:sp}=WP,Rt=Vx("vectors");var Yi=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=$P(e),this.fetch=MP(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=np(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(Gc(r))return{data:null,error:r};throw r}}},VP=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(Gc(e))return{data:null,error:e};throw e}}};let qx;qx=Symbol.toStringTag;var qP=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[qx]="BlobDownloadBuilder",this.promise=null}asStream(){return new VP(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(Gc(e))return{data:null,error:e};throw e}}};const KP={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Vg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var GP=class extends Yi{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 o=Y(Y({},Vg),n);let a=Y(Y({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.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",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))a=np(a,p,f);const c=s._removeEmptyFolders(e),u=s._getFinalPath(c),h=await(t=="PUT"?bh:tr)(s.fetch,`${s.url}/object/${u}`,i,Y({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:h.Id,fullPath:h.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}
280async uploadToSignedUrl(t,e,r,n){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const c=Y(Y({},Vg),n),u=Y(Y({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:i,fullPath:(await bh(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const s=Y({},r.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await tr(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new Kc("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}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 tr(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 tr(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 o=await tr(n.fetch,`${n.url}/object/sign/${s}`,Y({expiresIn:e},i?{transform:r.transform}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const s=await tr(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 o=i.toString();return s.map(a=>Y(Y({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):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(),o=this._getFinalPath(t),a=()=>la(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new qP(a,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>xh(await la(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await HP(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(Gc(s)){var n;const i=s instanceof wh?s.status:s instanceof Hx?(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 sp(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=Y(Y(Y({},KP),e),{},{prefix:t||""});return await tr(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=Y({},t);return await tr(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
280ity",e.quality.toString()),t}};const JP="2.104.1",ka={"X-Client-Info":`storage-js/${JP}`};var YP=class extends Yi{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(/\/$/,""),o=Y(Y({},ka),e);super(i,o,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await la(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await la(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await tr(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 bh(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 tr(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await sp(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():""}},ZP=class extends Yi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Y(Y({},ka),e);super(n,s,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await tr(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 la(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await sp(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!FP(t))throw new Kc("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 OP({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 o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},QP=class extends Yi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Y(Y({},ka),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Rt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await Rt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Rt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await Rt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},XP=class extends Yi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Y(Y({},ka),{},{"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 Rt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Rt.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");
280if(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 Rt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Rt.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 Rt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},eA=class extends Yi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Y(Y({},ka),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Rt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Rt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Rt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Rt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},tA=class extends eA{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new rA(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)}},rA=class extends QP{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,Y(Y({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,Y(Y({},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 nA(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},nA=class extends XP{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,Y(Y({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,Y(Y({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,Y(Y({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,Y(Y({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,Y(Y({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},sA=class extends YP{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new GP(this.url,this.headers,t,this.fetch)}get vectors(){return new tA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new ZP(this.url+"/iceberg",this.headers,this.fetch)}};function Jc(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 Kx="2.104.1",Hs=30*1e3,_h=3,Wu=_h*Hs,iA="http://localhost:9999",oA="supabase.auth.token",aA={"X-Client-Info":`gotrue-js/${Kx}`},Sh="X-Supabase-Api-Version",Gx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},lA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,cA=10*60*1e3;
280class ca 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 B(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class uA extends ca{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function dA(t){return B(t)&&t.name==="AuthApiError"}class Xn extends ca{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Yr extends ca{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class kt extends Yr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function nl(t){return B(t)&&t.name==="AuthSessionMissingError"}class Is extends Yr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class sl extends Yr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class il extends Yr{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 hA(t){return B(t)&&t.name==="AuthImplicitGrantRedirectError"}class qg extends Yr{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 fA extends Yr{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 kh extends Yr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Hu(t){return B(t)&&t.name==="AuthRetryableFetchError"}class Kg extends Yr{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 Eh extends Yr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const fc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Gg=` 281\r=`.split(""),pA=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Gg.length;e+=1)t[Gg[e].charCodeAt(0)]=-2;for(let e=0;e<fc.length;e+=1)t[fc[e].charCodeAt(0)]=e;return t})();function Jg(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(fc[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(fc[n]),e.queuedBits-=6}}function Jx(t,e,r){const n=pA[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 Yg(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{vA(o,n,r)};for(let o=0;o<t.length;o+=1)Jx(t.charCodeAt(o),s,i);return e.join("")}function mA(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 gA(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}mA(n,e)}}function vA(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 pi(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;
281s+=1)Jx(t.charCodeAt(s),r,n);return new Uint8Array(e)}function yA(t){const e=[];return gA(t,r=>e.push(r)),new Uint8Array(e)}function ns(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>Jg(s,r,n)),Jg(null,r,n),e.join("")}function wA(t){return Math.round(Date.now()/1e3)+t}function xA(){return Symbol("auth-callback")}const Qe=()=>typeof window<"u"&&typeof document<"u",Gn={tested:!1,writable:!1},Yx=()=>{if(!Qe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Gn.tested)return Gn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Gn.tested=!0,Gn.writable=!0}catch{Gn.tested=!0,Gn.writable=!1}return Gn.writable};function bA(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 Zx=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),_A=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Vs=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Jn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ye=async(t,e)=>{await t.removeItem(e)};class Yc{constructor(){this.promise=new Yc.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Yc.promiseConstructor=Promise;function ol(t){const e=t.split(".");if(e.length!==3)throw new Eh("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!lA.test(e[n]))throw new Eh("JWT not in base64url format");return{header:JSON.parse(Yg(e[0])),payload:JSON.parse(Yg(e[1])),signature:pi(e[2]),raw:{header:e[0],payload:e[1]}}}async function SA(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function kA(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){n(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function EA(t){return("0"+t.toString(16)).substr(-2)}function CA(){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,EA).join("")}async function TA(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 RA(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 TA(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ls(t,e,r=!1){const n=CA();let s=n;r&&(s+="/recovery"),await Vs(t,`${e}-code-verifier`,s);const i=await RA(n);return[i,n===i?"plain":"s256"]}const NA=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function jA(t){const e=t.headers.get(Sh);if(!e||!e.match(NA))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function PA(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 AA(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 OA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ds(t){if(!OA.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Vu(){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 IA(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
281if(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 Zg(t){return JSON.parse(JSON.stringify(t))}const Qn=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),LA=[502,503,504,520,521,522,523,524,530];async function Qg(t){var e;if(!_A(t))throw new kh(Qn(t),0);if(LA.includes(t.status))throw new kh(Qn(t),t.status);let r;try{r=await t.json()}catch(i){throw new Xn(Qn(i),i)}let n;const s=jA(t);if(s&&s.getTime()>=Gx["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 Kg(Qn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new kt}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,o)=>i&&typeof o=="string",!0))throw new Kg(Qn(r),t.status,r.weak_password.reasons);throw new uA(Qn(r),t.status||500,n)}const DA=(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 K(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Sh]||(i[Sh]=Gx["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await $A(t,e,r+a,{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 $A(t,e,r,n,s,i){const o=DA(e,n,s,i);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new kh(Qn(l),0)}if(a.ok||await Qg(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Qg(l)}}function Zt(t){var e;let r=null;FA(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=wA(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function Xg(t){const e=Zt(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 fn(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function MA(t){return{data:t,error:null}}function UA(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,o=Jc(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function ev(t){return t}function FA(t){return t.access_token&&t.refresh_token&&t.expires_in}const qu=["global","local","others"];class BA{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=Zx(n),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)}}async signOut(e,r=qu[0]){if(qu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qu.join(", ")}`);try{return await K(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await K(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:fn})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=Jc(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 K(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:UA,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(B(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await K(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:fn})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await K(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:ev});if(u.error)throw u.error;const h=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);c[`${x}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(B(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Ds(e);try{return await K(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:fn})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Ds(e);try{return await K(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:fn})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Ds(e);
281try{return await K(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:fn})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Ds(e.userId);try{const{data:r,error:n}=await K(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(B(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Ds(e.userId),Ds(e.id);try{return{data:await K(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await K(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:ev});if(u.error)throw u.error;const h=await u.json(),p=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);c[`${x}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(B(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await K(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await K(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await K(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await K(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(B(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await K(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await K(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await K(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{return await K(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}}function tv(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const mr={debug:!!(globalThis&&Yx()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
281class Qx extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class rv extends Qx{}async function zA(t,e,r){mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;let s;e>0&&(s=setTimeout(()=>{n.abort(),mr.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),mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new rv(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(mr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}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?void 0:i.name)==="AbortError"&&e>0){if(n.signal.aborted)return mr.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 o=>{if(o){mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,o.name);try{return await r()}finally{mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw mr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new rv(`Lock "${t}" was released because another request stole it`)}throw i}}function WA(){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 Xx(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function HA(t){return parseInt(t,16)}function VA(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function qA(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,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(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);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}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 282`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const f=Xx(t.address),b=u?`${u}://${n}`:n,m=t.statement?`${t.statement} 283`:"",x=`${b} wants you to sign in with your Ethereum account: 284${f} 285 286${m}`;let w=`URI: ${h} 287Version: ${p} 288Chain ID: ${r}${o?` 289Nonce: ${o}`:""} 290Issued At: ${i.toISOString()}`;if(s&&(w+=` 291Expiration Time: ${s.toISOString()}`),a&&(w+=` 292Not Before: ${a.toISOString()}`),l&&(w+=` 293Request ID: ${l}`),c){let g=` 294Resources:`;for(const v of c){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);g+=` 295- ${v}`}w+=g}return`${x} 296${w}`}
296class ze 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}}class pc extends ze{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function KA({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 ze({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 ze({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 ze({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 ze({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 ze({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new ze({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new ze({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new ze({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 o=window.location.hostname;if(eb(o)){if(i.rp.id!==o)return new ze({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ze({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 ze({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 ze({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 ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function GA({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 ze({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new ze({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(eb(n)){if(r.rpId!==n)return new ze({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new ze({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new ze({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 ze({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class JA{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 YA=new JA;function ZA(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=Jc(t,["challenge","user","excludeCredentials"]),i=pi(e).buffer,o=Object.assign(Object.assign({},r),{id:pi(r.id).buffer}),a=Object.assign(Object.assign({}
296,s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:pi(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function QA(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=Jc(t,["challenge","allowCredentials"]),s=pi(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:pi(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function XA(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:ns(new Uint8Array(t.response.attestationObject)),clientDataJSON:ns(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function eO(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:ns(new Uint8Array(s.authenticatorData)),clientDataJSON:ns(new Uint8Array(s.clientDataJSON)),signature:ns(new Uint8Array(s.signature)),userHandle:s.userHandle?ns(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function eb(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function nv(){var t,e;return!!(Qe()&&"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 tO(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new pc("Browser returned unexpected credential type",e)}:{data:null,error:new pc("Empty credential response",e)}}catch(e){return{data:null,error:KA({error:e,options:t})}}}async function rO(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new pc("Browser returned unexpected credential type",e)}:{data:null,error:new pc("Empty credential response",e)}}catch(e){return{data:null,error:GA({error:e,options:t})}}}const nO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},sO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function mc(...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 o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(e(o)){const a=n[i];e(a)?n[i]=mc(a,o):n[i]=mc(o)}else n[i]=o}return n}function iO(t,e){return mc(nO,t,e||{})}function oO(t,e){return mc(sO,t,e||{})}class aO{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 o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!a)return{data:null,error:l};const c=s??YA.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const h=n;if(h)u.name=`${u.id}:${h}`;else{const f=(await this.client.getUser()).data.user,b=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${b}`}}u.displayName||(u.displayName=u.name)}
296switch(a.webauthn.type){case"create":{const u=iO(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:p}=await tO({publicKey:u,signal:c});return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const u=oO(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:p}=await rO(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(a){return B(a)?{data:null,error:a}:{data:null,error:new Xn("Unexpected error in challenge",a)}}}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 ca("rpId is required for WebAuthn authentication")};try{if(!nv())return{data:null,error:new Xn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return B(o)?{data:null,error:o}:{data:null,error:new Xn("Unexpected error in authenticate",o)}}}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 ca("rpId is required for WebAuthn registration")};try{if(!nv())return{data:null,error:new Xn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var h;return(h=u.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===e&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return B(o)?{data:null,error:o}:{data:null,error:new Xn("Unexpected error in register",o)}}}}WA();const lO={url:iA,storageKey:oA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:aA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function sv(t,e,r){return await r()}const $s={};class ua{get jwks(){var e,r;return(r=(e=$s[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){$s[this.storageKey]=Object.assign(Object.assign({},$s[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=$s[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){$s[this.storageKey]=Object.assign(Object.assign({},$s[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s;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 i=Object.assign(Object.assign({},lO),e);if(this.storageKey=i.storageKey,this.instanceID=(r=ua.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,ua.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Qe()){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=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new BA({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Zx(i.fetch),this.lock=i.lock||sv,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&Qe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=zA:this.lock=sv,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 aO(this)}
296,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.persistSession?(i.storage?this.storage=i.storage:Yx()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=tv(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=tv(this.memoryStorage)),Qe()&&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)}(s=this.broadcastChannel)===null||s===void 0||s.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(a){this._debug("#broadcastChannel","error",a)}})}i.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} (${Kx}) ${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(Qe()&&(r=bA(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Qe()&&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),hA(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:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return B(r)?this._returnResult({error:r}):this._returnResult({error:new Xn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await K(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:Zt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(B(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:u,password:h,options:p}=e;let f=null,b=null;this.flowType==="pkce"&&([f,b]=await Ls(this.storage,this.storageKey)),i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:u,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:b},xform:Zt})}else if("phone"in e){const{phone:u,password:h,options:p}=e;i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,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:Zt})}else throw new sl("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ye(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),B(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:o,options:a}=e;r=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Xg})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Xg})}else throw new sl("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 Is;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(B(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,o,a,l,c,u,h,p;let f,b;if("message"in e)f=e.message,b=e.signature;else{const{chain:m,wallet:x,statement:w,options:g}=e;let v;if(Qe())if(typeof x=="object")v=x;else{const j=window;if("ethereum"in j&&typeof j.ethereum=="object"&&"request"in j.ethereum&&typeof j.ethereum.request=="function")v=j.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 x!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=x}const _=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),S=await v.request({method:"eth_requestAccounts"}).then(j=>j).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=Xx(S[0]);let E=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const j=await v.request({method:"eth_chainId"});E=HA(j)}const T={domain:_.host,address:k,statement:w,uri:_.href,version:"1",chainId:E,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=qA(T),b=await v.request({method:"personal_sign",params:[VA(f),k]})}try{const{data:m,error:x}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:b}
296,!((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:Zt});if(x)throw x;if(!m||!m.session||!m.user){const w=new Is;return this._returnResult({data:{user:null,session:null},error:w})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:x})}catch(m){if(B(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var r,n,s,i,o,a,l,c,u,h,p,f;let b,m;if("message"in e)b=e.message,m=e.signature;else{const{chain:x,wallet:w,statement:g,options:v}=e;let _;if(Qe())if(typeof w=="object")_=w;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.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 w!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=w}const S=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),g?{statement:g}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;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)b=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 _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((h=(u=v==null?void 0:v.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...v.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 297`);const k=await _.signMessage(new TextEncoder().encode(b),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:x,error:w}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:ns(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:Zt});if(w)throw w;if(!x||!x.session||!x.user){const g=new Is;return this._returnResult({data:{user:null,session:null},error:g})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:w})}
297catch(x){if(B(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(e){const r=await Jn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new fA;const{data:i,error:o}=await K(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Zt});if(await Ye(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Is;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}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:o})}catch(i){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),B(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:o}=e,a=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Zt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Is;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(B(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Ls(this.storage,this.storageKey));const{error:h}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,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:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,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:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new sl("You must provide either an email or phone number.")}catch(a){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),B(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}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:o,error:a}=await K(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Zt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.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:c,session:l},error:null})}catch(s){if(B(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Ls(this.storage,this.storageKey));const c=await K(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}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:MA});return!((i=c.data)===null||i===void 0)&&i.url&&Qe()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),B(a))return this._returnResult({data:null,error:a});throw a}}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 kt;const{error:s}=await K(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(B(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:o}=await K(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:o})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await K(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:o==null?void 0:o.message_id},error:a})}throw new sl("You must provide either an email or phone number and a type")}catch(r){if(B(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 Jn(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 val
297id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Wu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await Jn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Vu()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=IA(e.user,o),o.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 K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:fn}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new kt}:await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:fn})})}catch(r){if(B(r))return nl(r)&&(await this._removeSession(),await Ye(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 kt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Ls(this.storage,this.storageKey));const{data:c,error:u}=await K(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:fn});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),B(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 kt;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=ol(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,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:a.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(B(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:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new kt;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(B(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Qe())throw new il("No browser detected.");
297if(e.error||e.error_description||e.error_code)throw new il(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 qg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new il("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 qg("No code detected.");const{data:v,error:_}=await this._exchangeCodeForSession(e.code);if(_)throw _;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.session,redirectType:(n=v.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!o||!l||!a||!u)throw new il("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(l);let f=h+p;c&&(f=parseInt(c));const b=f-h;b*1e3<=Hs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${b}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:x,error:w}=await this._getUser(o);if(w)throw w;const g={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:p,expires_at:f,refresh_token:a,token_type:u,user:x.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(B(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 Jn(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&&!nl(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(dA(a)&&(a.status===404||a.status===401||a.status===403)||nl(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await Ye(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=xA(),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:o}=r;if(o)throw o;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),nl(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Ls(this.storage,this.storageKey,!0));try{return await K(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 Ye(this.storage,`${this.storageKey}-code-verifier`),B(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(B(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 o,a,l,c,u;const{data:h,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await K(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Qe()&&!(!((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(B(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:o,provider:a,token:l,access_token:c,nonce:u}=e,h=await K(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:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Zt}),{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 Is}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await Ye(this.storage,`${this.storageKey}-code-verifier`),B(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:o}=r;if(o)throw o;
297return await K(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(B(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 kA(async s=>(s>0&&await SA(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await K(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Zt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Hu(i)&&Date.now()+o-n<Hs})}catch(n){if(this._debug(r,"error",n),B(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),Qe()&&!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 Jn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Jn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Vs(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Vu()}else if(s&&!s.user&&!s.user){const o=await Jn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ye(this.storage,this.storageKey+"-user"),await Vs(this.storage,this.storageKey,s)):s.user=Vu()}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()<Wu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Wu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Hu(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}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 kt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Yc;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new kt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),B(i)){const o={data:null,error:i};return Hu(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}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=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ye(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 Vs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Zg(s);await Vs(this.storage,this.storageKey,i)}else{const s=Zg(r);await Vs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ye(this.storage,this.storageKey),await Ye(this.storage,this.storageKey+"-code-verifier"),await Ye(this.storage,this.storageKey+"-user"),this.userStorage&&await Ye(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
297catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Hs);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)/Hs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Hs}ms, refresh threshold is ${_h} ticks`),s<=_h&&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.isAcquireTimeout||e instanceof Qx)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Qe()||!(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,o]=await Ls(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.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 K(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(B(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:o}=r;if(o)return this._returnResult({data:null,error:o});const a=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:c}=await K(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(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(B(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 o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?XA(e.webauthn.credential_response):eO(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,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)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(B(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 o=await K(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(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:ZA(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:QA(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(B(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}=ol(e);let b=null;f.aal&&(b=f.aal);let m=b;const{data:{user:x},error:w}=await this.getUser(e);if(w)return this._returnResult({data:null,error:w});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const v=f.amr||[];return{data:{currentLevel:b,nextLevel:m,currentAuthenticationMethods:v},error:null}}catch(f){if(B(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
297=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=ol(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:u,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 K(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 kt})})}catch(r){if(B(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 kt});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(B(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 kt});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(B(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 K(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 kt})})}catch(e){if(B(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 K(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 kt})})}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+cA>s)return n;const{data:i,error:o}=await K(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:f,error:b}
297=await this.getSession();if(b||!f.session)return this._returnResult({data:null,error:b});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=ol(n);r!=null&&r.allowExpired||PA(i.exp);const c=!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(!c){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=AA(s.alg),h=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,yA(`${a}.${l}`)))throw new Eh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}}ua.nextInstanceID={};const cO=ua,uO="2.104.1";let yo="";typeof Deno<"u"?yo="deno":typeof document<"u"?yo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?yo="react-native":yo="node";const dO={"X-Client-Info":`supabase-js-${yo}/${uO}`},hO={headers:dO},fO={schema:"public"},pO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},mO={};function da(t){"@babel/helpers - typeof";return da=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},da(t)}function gO(t,e){if(da(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vO(t){var e=gO(t,"string");return da(e)=="symbol"?e:e+""}function yO(t,e,r){return(e=vO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iv(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 $e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iv(Object(r),!0).forEach(function(n){yO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iv(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),xO=()=>Headers,bO=(t,e,r)=>{const n=wO(r),s=xO();return async(i,o)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(i,$e($e({},o),{},{headers:c}))}};function _O(t){return t.endsWith("/")?t:t+"/"}function SO(t,e){var r,n;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:c,realtime:u,global:h}=e,p={db:$e($e({},l),s),auth:$e($e({},c),i),realtime:$e($e({},u),o),storage:{},global:$e($e($e({},h),a),{},{headers:$e($e({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?p.accessToken=t.accessToken:delete p.accessToken,p}function kO(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 EO=class extends cO{constructor(t){super(t)}},CO=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=kO(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 o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:fO,realtime:mO,auth:$e($e({},pO),{},{storageKey:o}),global:hO},l=SO(r??{},a);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:(u,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 c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=bO(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient($e({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new Kj(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 sA(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new $j(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:o,lock:a,debug:l,throwOnError:c},u,h){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new EO({url:this.authUrl.href,headers:$e($e({},p),u),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}
297_initRealtimeClient(t){return new TP(this.realtimeUrl.href,$e($e({},t),{},{params:$e($e({},{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 TO=(t,e,r)=>new CO(t,e,r);function RO(){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}RO()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function NO(){var x,w;if(typeof window>"u")return;const t=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>t===g||t.endsWith("."+g)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((x=t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((w=t.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:w[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(g,v,_)=>new Promise(S=>{const k=p();let E=!1,T;const j=D=>{E||(E=!0,clearTimeout(T),window.removeEventListener("message",A),S(D))},A=D=>{if(c.indexOf(D.origin)<0)return;const J=D.data;J&&J.type===u&&J.requestId===k&&j(J)};window.addEventListener("message",A);const V={type:g,requestId:k,projectId:s,key:v};_!==void 0&&(V.value=_);for(const D of c)window.parent.postMessage(V,D);T=setTimeout(()=>j(null),h)});let b=!0;const m=250;return{getItem:async g=>{let v=await f("lovable-preview-auth:get",g);return!v&&b&&(await new Promise(_=>setTimeout(_,m)),v=await f("lovable-preview-auth:get",g)),b=!1,v&&v.ok&&typeof v.value=="string"?v.value===""?(localStorage.removeItem(g),null):v.value:localStorage.getItem(g)},setItem:(g,v)=>(localStorage.setItem(g,v),f("lovable-preview-auth:set",g,v).then(_=>{_&&_.ok&&typeof _.value=="string"&&localStorage.getItem(g)===v&&(_.value===""?localStorage.removeItem(g):localStorage.setItem(g,_.value))})),removeItem:g=>(localStorage.removeItem(g),f("lovable-preview-auth:remove",g).then(()=>{}))}}const jO="https://pidhcrjyprxedbxdwwdd.supabase.co",PO="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBpZGhjcmp5cHJ4ZWRieGR3d2RkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY0MzY1NzEsImV4cCI6MjA5MjAxMjU3MX0.JxFp_knhfRrdTLpV7Fq9J1lg0sDzzp34THlgrKXYCO4",
297Nr=TO(jO,PO,{auth:{storage:NO(),persistSession:!0,autoRefreshToken:!0}});function Zc(t){try{Nr.functions.invoke("append-to-sheet",{body:t}).then(({error:e})=>{e&&console.warn("append-to-sheet failed",e)})}catch(e){console.warn("append-to-sheet threw",e)}}function Qc(t){try{Nr.functions.invoke("send-to-zapier",{body:t}).catch(e=>console.warn("[zapier] forward failed",e))}catch(e){console.warn("[zapier] invoke threw",e)}}const Ea={creekmore:{slug:"creekmore",displayName:"Chris Creekmore",cincName:"Chris Creekmore"},pigg:{slug:"pigg",displayName:"Karen Pigg",cincName:"Karen Pigg"},hunter:{slug:"hunter",displayName:"John Hunter",cincName:"John Hunter"},mueller:{slug:"mueller",displayName:"Margie Mueller",cincName:"Margie Mueller"},loflin:{slug:"loflin",displayName:"Perry Loflin",cincName:"Perry Loflin"},reardon:{slug:"reardon",displayName:"Derick Reardon",cincName:"Derick Reardon"},forrest:{slug:"forrest",displayName:"Beth Forrest",cincName:"Beth Forrest"},allen:{slug:"allen",displayName:"Christian Allen",cincName:"Christian Allen"}
297,scearce:{slug:"scearce",displayName:"Charlie Scearce",cincName:"Charlie Scearce"},spurgason:{slug:"spurgason",displayName:"Susan Purgason",cincName:"Susan Purgason"},epurgason:{slug:"epurgason",displayName:"Ed Purgason",cincName:"Ed Purgason"},delgiudice:{slug:"delgiudice",displayName:"John Delgiudice",cincName:"John Delgiudice"},mdahrooge:{slug:"mdahrooge",displayName:"Mark Dahrooge",cincName:"Mark Dahrooge"},bdahrooge:{slug:"bdahrooge",displayName:"Bobbi Dahrooge",cincName:"Bobbi Dahrooge"},conner:{slug:"conner",displayName:"Frannie Conner",cincName:"Frannie Conner"},boone:{slug:"boone",displayName:"Julie Boone",cincName:"Julie Boone"}},tb="creekmore";function AO(t){var r;const e=(r=t.split("/").filter(Boolean)[0])==null?void 0:r.toLowerCase();return e&&e in Ea?e:tb}function Ca(){return typeof window>"u"?tb:AO(window.location.pathname)}const or=y.forwardRef(({className:t,type:e,...r},n)=>d.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}));or.displayName="Input";var OO="Label",rb=y.forwardRef((t,e)=>d.jsx(ue.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())}}));rb.displayName=OO;var nb=rb;const IO=Mf("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wt=y.forwardRef(({className:t,...e},r)=>d.jsx(nb,{ref:r,className:je(IO(),t),...e}));wt.displayName=nb.displayName;const LO=20,ov="creekmore_flipbook_unlocked",DO=qc({first_name:Tt().trim().min(1,"Required").max(60),email:Tt().trim().email("Valid email required").max(255)});function $O(){const[t,e]=y.useState(!1),[r,n]=y.useState(!1),[s,i]=y.useState(LO),[o,a]=y.useState({first_name:"",email:""}),[l,c]=y.useState({}),[u,h]=y.useState(!1),p=y.useRef(null),f=y.useRef(!1),{toast:b}=xa();y.useEffect(()=>{typeof window>"u"||localStorage.getItem(ov)==="1"&&e(!0)},[]),y.useEffect(()=>{if(t||f.current)return;const w=p.current;if(!w)return;const g=new IntersectionObserver(v=>{v.forEach(_=>{if(_.isIntersecting&&!f.current){f.current=!0,g.disconnect();const S=window.setInterval(()=>{i(k=>k<=1?(window.clearInterval(S),n(!0),0):k-1)},1e3)}})},{threshold:.3});return g.observe(w),()=>g.disconnect()},[t]);const m=(w,g)=>a(v=>({...v,[w]:g})),x=async w=>{w.preventDefault(),c({});const g=DO.safeParse(o);if(!g.success){const E={};g.error.issues.forEach(T=>{E[T.path[0]]=T.message}),c(E);return}h(!0);const{error:v}=await Nr.from("leads").insert([{first_name:g.data.first_name,email:g.data.email,source:"flipbook_gate"}]);if(h(!1),v){b({title:"Couldn't unlock",description:"Please try again.",variant:"destructive"});return}const _=Ca(),S=Ea[_],k={type:"lead",source:"flipbook_gate",intent:"flipbook",first_name:g.data.first_name,last_name:"",email:g.data.email,phone:"",message:"",timeline:"",buying_situation:"",agent:_,agent_name:S.displayName,agent_cinc_name:S.cincName};Zc(k),Qc(k),localStorage.setItem(ov,"1"),e(!0),n(!1),b({title:"Unlocked! Opening the full guideâ¦",description:"We've also sent a copy to your email."}),window.open(vg,"_blank","noopener,noreferrer")};return d.jsx("section",{className:"py-20 md:py-28 bg-background",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs("div",{className:"text-center max-w-2xl mx-auto reveal",children:[d.jsxs("span",{className:"inline-flex items-center gap-2 text-xs tracking-[0.18em] uppercase text-accent font-semibold",children:[d.jsx(iT,{className:"h-4 w-4"})," Preview the guide"]}),d.jsx("h2",{className:"font-display text-3xl md:text-5xl mt-3 text-primary leading-tight",children:"Flip through it before you download"}),d.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"Take a peek at the Brunswick County Relocation Guide. Drop your email to unlock the full version."})]}),d.jsx("div",{className:"mt-12 reveal",ref:p,children:d.jsxs("div",{className:"relative mx-auto max-w-5xl",children:[d.jsx("div",{"aria-hidden":!0,
297className:"absolute -inset-x-8 -bottom-6 h-12 bg-primary/20 blur-2xl rounded-full"}),d.jsx("div",{className:"relative rounded-2xl p-[2px] bg-gradient-to-br from-secondary/60 via-accent/40 to-secondary/60 shadow-elegant",children:d.jsx("div",{className:"relative rounded-[14px] overflow-hidden bg-muted",children:d.jsxs("div",{className:"relative w-full",style:{paddingBottom:"62%"},children:[d.jsx("iframe",{title:"Brunswick County Relocation Guide",src:ej,className:"absolute inset-0 w-full h-full",allow:"fullscreen",allowFullScreen:!0,loading:"lazy"}),!t&&!r&&s>0&&d.jsxs("div",{className:"absolute top-4 right-4 z-10 inline-flex items-center gap-2 rounded-full bg-primary/90 backdrop-blur-sm text-primary-foreground text-xs font-medium px-3 py-1.5 shadow-card-soft",children:[d.jsx("span",{className:"h-2 w-2 rounded-full bg-secondary animate-pulse"}),"Free preview · ",s,"s"]}),r&&!t&&d.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center p-4 bg-primary/40 backdrop-blur-md animate-fade-in",children:d.jsxs("div",{className:"w-full max-w-md bg-card rounded-2xl shadow-elegant p-6 md:p-8 border border-border",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"h-11 w-11 rounded-lg gradient-sea text-primary-foreground inline-flex items-center justify-center",children:d.jsx(gT,{className:"h-5 w-5"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-display text-xl text-primary leading-tight",children:"Want to keep reading?"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Unlock the full guide â instant access."})]})]}),d.jsxs("form",{onSubmit:x,noValidate:!0,className:"mt-5 space-y-4",children:[d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"fb-fn",children:"First name"}),d.jsx(or,{id:"fb-fn",autoComplete:"given-name",value:o.first_name,onChange:w=>m("first_name",w.target.value),maxLength:60,className:"mt-1.5"}),l.first_name&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:l.first_name})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"fb-email",children:"Email"}),d.jsx(or,{id:"fb-email",type:"email",autoComplete:"email",value:o.email,onChange:w=>m("email",w.target.value),maxLength:255,className:"mt-1.5"}),l.email&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:l.email})]}),d.jsx(Je,{type:"submit",disabled:u,className:"w-full h-11",children:u?d.jsxs(d.Fragment,{children:[d.jsx(Oi,{className:"animate-spin"})," Unlockingâ¦"]}):d.jsxs(d.Fragment,{children:["Unlock the Full Guide ",d.jsx(tg,{className:"ml-1"})]})}),d.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Opens in a new tab. No spam â unsubscribe anytime."})]})]})})]})})})]})}),d.jsx("div",{className:"mt-10 flex justify-center reveal",children:t?d.jsx(Je,{asChild:!0,size:"lg",className:"h-12 px-7",children:d.jsxs("a",{href:vg,target:"_blank",rel:"noopener noreferrer",children:["Open the Full Guide ",d.jsx(tg,{className:"ml-1"})]})}):d.jsx(Je,{asChild:!0,size:"lg",className:"h-12 px-7",children:d.jsxs("a",{href:"#guide",children:["Get My Own Copy ",d.jsx(sT,{className:"ml-1"})]})})})]})})}function av(t,[e,r]){return Math.min(r,Math.max(e,t))}var MO=y.createContext(void 0);function UO(t){const e=y.useContext(MO);return t||e||"ltr"}var Ku=0;function sb(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??lv()),document.body.insertAdjacentElement("beforeend",t[1]??lv()),Ku++,()=>{Ku===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ku--}},[])}function lv(){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 Gu="focusScope.autoFocusOnMount",Ju="focusScope.autoFocusOnUnmount",cv={bubbles:!1,cancelable:!0},FO="FocusScope",ip=y.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=y.useState(null),c=ur(s),u=ur(i),h=y.useRef(null),p=Te(e,m=>l(m)),f=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let m=function(v){if(f.paused||!a)return;const _=v.target;a.contains(_)?h.current=_:on(h.current,{select:!0})},x=function(v){if(f.paused||!a)return;const _=v.relatedTarget;_!==null&&(a.contains(_)||on(h.current,{select:!0}))},w=function(v){if(document.activeElement===document.body)for(const S of v)S.removedNodes.length>0&&on(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const g=new MutationObserver(w);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),g.disconnect()}}},[n,a,f.paused]),y.useEffect(()=>{if(a){dv.add(f);
vendor: 4,956 bytes, line 297
297const m=document.activeElement;if(!a.contains(m)){const w=new CustomEvent(Gu,cv);a.addEventListener(Gu,c),a.dispatchEvent(w),w.defaultPrevented||(BO(qO(ib(a)),{select:!0}),document.activeElement===m&&on(a))}return()=>{a.removeEventListener(Gu,c),setTimeout(()=>{const w=new CustomEvent(Ju,cv);a.addEventListener(Ju,u),a.dispatchEvent(w),w.defaultPrevented||on(m??document.body,{select:!0}),a.removeEventListener(Ju,u),dv.remove(f)},0)}}},[a,c,u,f]);const b=y.useCallback(m=>{if(!r&&!n||f.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(x&&w){const g=m.currentTarget,[v,_]=zO(g);v&&_?!m.shiftKey&&w===_?(m.preventDefault(),r&&on(v,{select:!0})):m.shiftKey&&w===v&&(m.preventDefault(),r&&on(_,{select:!0})):w===g&&m.preventDefault()}},[r,n,f.paused]);return d.jsx(ue.div,{tabIndex:-1,...o,ref:p,onKeyDown:b})});ip.displayName=FO;function BO(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(on(n,{select:e}),document.activeElement!==r)return}function zO(t){const e=ib(t),r=uv(e,t),n=uv(e.reverse(),t);return[r,n]}function ib(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 uv(t,e){for(const r of t)if(!WO(r,{upTo:e}))return r}function WO(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 HO(t){return t instanceof HTMLInputElement&&"select"in t}function on(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&HO(t)&&e&&t.select()}}var dv=VO();function VO(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=hv(t,e),t.unshift(e)},remove(e){var r;t=hv(t,e),(r=t[0])==null||r.resume()}}}function hv(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function qO(t){return t.filter(e=>e.tagName!=="A")}function KO(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var GO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ms=new WeakMap,al=new WeakMap,ll={},Yu=0,ob=function(t){return t&&(t.host||ob(t.parentNode))},JO=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=ob(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})},YO=function(t,e,r,n){var s=JO(e,Array.isArray(t)?t:[t]);ll[r]||(ll[r]=new WeakMap);var i=ll[r],o=[],a=new Set,l=new Set(s),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};s.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var f=p.getAttribute(n),b=f!==null&&f!=="false",m=(Ms.get(p)||0)+1,x=(i.get(p)||0)+1;Ms.set(p,m),i.set(p,x),o.push(p),m===1&&b&&al.set(p,!0),x===1&&p.setAttribute(r,"true"),b||p.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return u(e),a.clear(),Yu++,function(){o.forEach(function(h){var p=Ms.get(h)-1,f=i.get(h)-1;Ms.set(h,p),i.set(h,f),p||(al.has(h)||h.removeAttribute(n),al.delete(h)),f||h.removeAttribute(r)}),Yu--,Yu||(Ms=new WeakMap,Ms=new WeakMap,al=new WeakMap,ll={})}},ab=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=GO(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),YO(n,s,r,"aria-hidden")):function(){return null}},Sr=function(){return Sr=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},Sr.apply(this,arguments)};function lb(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 ZO(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 Tl="right-scroll-bar-position",Rl="width-before-scroll-bar",QO="with-scroll-bars-hidden",XO="--removed-body-scroll-bar-size";function Zu(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function e2(t,e){var r=y.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}
vendor: 4,442 bytes, lines 297-312
297var t2=typeof window<"u"?y.useLayoutEffect:y.useEffect,fv=new WeakMap;function r2(t,e){var r=e2(null,function(n){return t.forEach(function(s){return Zu(s,n)})});return t2(function(){var n=fv.get(r);if(n){var s=new Set(n),i=new Set(t),o=r.current;s.forEach(function(a){i.has(a)||Zu(a,null)}),i.forEach(function(a){s.has(a)||Zu(a,o)})}fv.set(r,t)},[t]),r}function n2(t){return t}function s2(t,e){e===void 0&&(e=n2);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 o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),r}}}};return s}function i2(t){t===void 0&&(t={});var e=s2(null);return e.options=Sr({async:!0,ssr:!1},t),e}var cb=function(t){var e=t.sideCar,r=lb(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 y.createElement(n,Sr({},r))};cb.isSideCarExport=!0;function o2(t,e){return t.useMedium(e),cb}var ub=i2(),Qu=function(){},Xc=y.forwardRef(function(t,e){var r=y.useRef(null),n=y.useState({onScrollCapture:Qu,onWheelCapture:Qu,onTouchMoveCapture:Qu}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,h=t.shards,p=t.sideCar,f=t.noRelative,b=t.noIsolation,m=t.inert,x=t.allowPinchZoom,w=t.as,g=w===void 0?"div":w,v=t.gapMode,_=lb(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,k=r2([r,e]),E=Sr(Sr({},_),s);return y.createElement(y.Fragment,null,u&&y.createElement(S,{sideCar:ub,removeScrollBar:c,shards:h,noRelative:f,noIsolation:b,inert:m,setCallbacks:i,allowPinchZoom:!!x,lockRef:r,gapMode:v}),o?y.cloneElement(y.Children.only(a),Sr(Sr({},E),{ref:k})):y.createElement(g,Sr({},E,{className:l,ref:k}),a))});Xc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xc.classNames={fullWidth:Rl,zeroRight:Tl};var a2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function l2(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=a2();return e&&t.setAttribute("nonce",e),t}function c2(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function u2(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var d2=function(){var t=0,e=null;return{add:function(r){t==0&&(e=l2())&&(c2(e,r),u2(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},h2=function(){var t=d2();return function(e,r){y.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},db=function(){var t=h2(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},f2={left:0,top:0,right:0,gap:0},Xu=function(t){return parseInt(t||"",10)||0},p2=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[Xu(r),Xu(n),Xu(s)]},m2=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return f2;var e=p2(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])}},g2=db(),mi="data-scroll-locked",v2=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` 298 .`.concat(QO,` { 299 overflow: hidden `).concat(n,`; 300 padding-right: `).concat(a,"px ").concat(n,`; 301 } 302 body[`).concat(mi,`] { 303 overflow: hidden `).concat(n,`; 304 overscroll-behavior: contain; 305 `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` 306 padding-left: `.concat(s,`px; 307 padding-top: `).concat(i,`px; 308 padding-right: `).concat(o,`px; 309 margin-left:0; 310 margin-top:0; 311 margin-right: `).concat(a,"px ").concat(n,`; 312 `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
312")].filter(Boolean).join(""),` 313 } 314 315 .`).concat(Tl,` { 316 right: `).concat(a,"px ").concat(n,`; 317 } 318 319 .`).concat(Rl,` { 320 margin-right: `).concat(a,"px ").concat(n,`; 321 } 322 323 .`).concat(Tl," .").concat(Tl,` { 324 right: 0 `).concat(n,`; 325 } 326 327 .`).concat(Rl," .").concat(Rl,` { 328 margin-right: 0 `).concat(n,`; 329 } 330 331 body[`).concat(mi,`] { 332 `).concat(XO,": ").concat(a,`px; 333 } 334`)},pv=function(){var t=parseInt(document.body.getAttribute(mi)||"0",10);return isFinite(t)?t:0},y2=function(){y.useEffect(function(){return document.body.setAttribute(mi,(pv()+1).toString()),function(){var t=pv()-1;t<=0?document.body.removeAttribute(mi):document.body.setAttribute(mi,t.toString())}},[])},w2=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;y2();var i=y.useMemo(function(){return m2(s)},[s]);return y.createElement(g2,{styles:v2(i,!e,s,r?"":"!important")})},Ch=!1;if(typeof window<"u")try{var cl=Object.defineProperty({},"passive",{get:function(){return Ch=!0,!0}});window.addEventListener("test",cl,cl),window.removeEventListener("test",cl,cl)}catch{Ch=!1}var Us=Ch?{passive:!1}:!1,x2=function(t){return t.tagName==="TEXTAREA"},hb=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!x2(t)&&r[e]==="visible")},b2=function(t){return hb(t,"overflowY")},_2=function(t){return hb(t,"overflowX")},mv=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=fb(t,n);if(s){var i=pb(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},S2=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},k2=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},fb=function(t,e){return t==="v"?b2(e):_2(e)},pb=function(t,e){return t==="v"?S2(e):k2(e)},E2=function(t,e){return t==="h"&&e==="rtl"?-1:1},C2=function(t,e,r,n,s){var i=E2(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,u=o>0,h=0,p=0;do{if(!a)break;var f=pb(t,a),b=f[0],m=f[1],x=f[2],w=m-x-i*b;(b||w)&&fb(t,a)&&(h+=w,p+=b);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(h)<1||!s)||!u&&(Math.abs(p)<1||!s))&&(c=!0),c},ul=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},gv=function(t){return[t.deltaX,t.deltaY]},vv=function(t){return t&&"current"in t?t.current:t},T2=function(t,e){return t[0]===e[0]&&t[1]===e[1]},R2=function(t){return` 335 .block-interactivity-`.concat(t,` {pointer-events: none;} 336 .allow-interactivity-`).concat(t,` {pointer-events: all;} 337`)},N2=0,Fs=[];function j2(t){var e=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(N2++)[0],i=y.useState(db)[0],o=y.useRef(t);y.useEffect(function(){o.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=ZO([t.lockRef.current],(t.shards||[]).map(vv),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=y.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var w=ul(m),g=r.current,v="deltaX"in m?m.deltaX:g[0]-w[0],_="deltaY"in m?m.deltaY:g[1]-w[1],S,k=m.target,E=Math.abs(v)>Math.abs(_)?"h":"v";if("touches"in m&&E==="h"&&k.type==="range")return!1;var T=mv(E,k);if(!T)return!0;if(T?S=E:(S=E==="v"?"h":"v",T=mv(E,k)),!T)return!1;if(!n.current&&"changedTouches"in m&&(v||_)&&(n.current=S),!S)return!0;var j=n.current||S;return C2(j,x,m,j==="h"?v:_,!0)},[]),l=y.useCallback(function(m){var x=m;if(!(!Fs.length||Fs[Fs.length-1]!==i)){var w="deltaY"in x?gv(x):ul(x),g=e.current.filter(function(S){return S.name===x.type&&(S.target===x.target||x.target===S.shadowParent)&&T2(S.delta,w)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}
vendor: 4,125 bytes, line 337
337if(!g){var v=(o.current.shards||[]).map(vv).filter(Boolean).filter(function(S){return S.contains(x.target)}),_=v.length>0?a(x,v[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),c=y.useCallback(function(m,x,w,g){var v={name:m,delta:x,target:w,should:g,shadowParent:P2(w)};e.current.push(v),setTimeout(function(){e.current=e.current.filter(function(_){return _!==v})},1)},[]),u=y.useCallback(function(m){r.current=ul(m),n.current=void 0},[]),h=y.useCallback(function(m){c(m.type,gv(m),m.target,a(m,t.lockRef.current))},[]),p=y.useCallback(function(m){c(m.type,ul(m),m.target,a(m,t.lockRef.current))},[]);y.useEffect(function(){return Fs.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Us),document.addEventListener("touchmove",l,Us),document.addEventListener("touchstart",u,Us),function(){Fs=Fs.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Us),document.removeEventListener("touchmove",l,Us),document.removeEventListener("touchstart",u,Us)}},[]);var f=t.removeScrollBar,b=t.inert;return y.createElement(y.Fragment,null,b?y.createElement(i,{styles:R2(s)}):null,f?y.createElement(w2,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function P2(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const A2=o2(ub,j2);var op=y.forwardRef(function(t,e){return y.createElement(Xc,Sr({},t,{ref:e,sideCar:A2}))});op.classNames=Xc.classNames;var O2=[" ","Enter","ArrowUp","ArrowDown"],I2=[" ","Enter"],ws="Select",[eu,tu,L2]=fw(ws),[Zi,YI]=Vi(ws,[L2,Wc]),ru=Wc(),[D2,zn]=Zi(ws),[$2,M2]=Zi(ws),mb=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:h,disabled:p,required:f,form:b}=t,m=ru(e),[x,w]=y.useState(null),[g,v]=y.useState(null),[_,S]=y.useState(!1),k=UO(c),[E,T]=rc({prop:n,defaultProp:s??!1,onChange:i,caller:ws}),[j,A]=rc({prop:o,defaultProp:a,onChange:l,caller:ws}),V=y.useRef(null),D=x?b||!!x.closest("form"):!0,[J,L]=y.useState(new Set),Q=Array.from(J).map(W=>W.props.value).join(";");return d.jsx(NN,{...m,children:d.jsxs(D2,{required:f,scope:e,trigger:x,onTriggerChange:w,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:hi(),value:j,onValueChange:A,open:E,onOpenChange:T,dir:k,triggerPointerDownPosRef:V,disabled:p,children:[d.jsx(eu.Provider,{scope:e,children:d.jsx($2,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(W=>{L(G=>new Set(G).add(W))},[]),onNativeOptionRemove:y.useCallback(W=>{L(G=>{const C=new Set(G);return C.delete(W),C})},[]),children:r})}),D?d.jsxs(Ub,{"aria-hidden":!0,required:f,tabIndex:-1,name:u,autoComplete:h,value:j,onChange:W=>A(W.target.value),disabled:p,form:b,children:[j===void 0?d.jsx("option",{value:""}):null,Array.from(J)]},Q):null]})})};mb.displayName=ws;var gb="SelectTrigger",vb=y.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=ru(r),o=zn(gb,r),a=o.disabled||n,l=Te(e,o.onTriggerChange),c=tu(r),u=y.useRef("touch"),[h,p,f]=Bb(m=>{const x=c().filter(v=>!v.disabled),w=x.find(v=>v.value===o.value),g=zb(x,m,w);g!==void 0&&o.onValueChange(g.value)}),b=m=>{a||(o.onOpenChange(!0),f()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(bx,{asChild:!0,...i,children:d.jsx(ue.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Fb(o.value)?"":void 0,...s,ref:l,onClick:oe(s.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&b(m)}),onPointerDown:oe(s.onPointerDown,m=>{u.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(b(m),m.preventDefault())}),onKeyDown:oe(s.onKeyDown,m=>{const x=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(x&&m.key===" ")&&O2.includes(m.key)&&
vendor: 15,433 bytes, line 337
337(b(),m.preventDefault())})})})});vb.displayName=gb;var yb="SelectValue",wb=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,l=zn(yb,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,h=Te(e,l.onValueNodeChange);return rt(()=>{c(u)},[c,u]),d.jsx(ue.span,{...a,ref:h,style:{pointerEvents:"none"},children:Fb(l.value)?d.jsx(d.Fragment,{children:o}):i})});wb.displayName=yb;var U2="SelectIcon",xb=y.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return d.jsx(ue.span,{"aria-hidden":!0,...s,ref:e,children:n||"â¼"})});xb.displayName=U2;var F2="SelectPortal",bb=t=>d.jsx($c,{asChild:!0,...t});bb.displayName=F2;var xs="SelectContent",_b=y.forwardRef((t,e)=>{const r=zn(xs,t.__scopeSelect),[n,s]=y.useState();if(rt(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?ks.createPortal(d.jsx(Sb,{scope:t.__scopeSelect,children:d.jsx(eu.Slot,{scope:t.__scopeSelect,children:d.jsx("div",{children:t.children})})}),i):null}return d.jsx(kb,{...t,ref:e})});_b.displayName=xs;var Qt=10,[Sb,Wn]=Zi(xs),B2="SelectContentImpl",z2=Pi("SelectContent.RemoveScroll"),kb=y.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:b,hideWhenDetached:m,avoidCollisions:x,...w}=t,g=zn(xs,r),[v,_]=y.useState(null),[S,k]=y.useState(null),E=Te(e,M=>_(M)),[T,j]=y.useState(null),[A,V]=y.useState(null),D=tu(r),[J,L]=y.useState(!1),Q=y.useRef(!1);y.useEffect(()=>{if(v)return ab(v)},[v]),sb();const W=y.useCallback(M=>{const[ye,...Le]=D().map(fe=>fe.ref.current),[ve]=Le.slice(-1),ce=document.activeElement;for(const fe of M)if(fe===ce||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===ye&&S&&(S.scrollTop=0),fe===ve&&S&&(S.scrollTop=S.scrollHeight),fe==null||fe.focus(),document.activeElement!==ce))return},[D,S]),G=y.useCallback(()=>W([T,v]),[W,T,v]);y.useEffect(()=>{J&&G()},[J,G]);const{onOpenChange:C,triggerPointerDownPosRef:N}=g;y.useEffect(()=>{if(v){let M={x:0,y:0};const ye=ve=>{var ce,fe;M={x:Math.abs(Math.round(ve.pageX)-(((ce=N.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((fe=N.current)==null?void 0:fe.y)??0))}},Le=ve=>{M.x<=10&&M.y<=10?ve.preventDefault():v.contains(ve.target)||C(!1),document.removeEventListener("pointermove",ye),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Le,{capture:!0})}}},[v,C,N]),y.useEffect(()=>{const M=()=>C(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[C]);const[$,Z]=Bb(M=>{const ye=D().filter(ce=>!ce.disabled),Le=ye.find(ce=>ce.ref.current===document.activeElement),ve=zb(ye,M,Le);ve&&setTimeout(()=>ve.ref.current.focus())}),q=y.useCallback((M,ye,Le)=>{const ve=!Q.current&&!Le;(g.value!==void 0&&g.value===ye||ve)&&(j(M),ve&&(Q.current=!0))},[g.value]),se=y.useCallback(()=>v==null?void 0:v.focus(),[v]),te=y.useCallback((M,ye,Le)=>{const ve=!Q.current&&!Le;(g.value!==void 0&&g.value===ye||ve)&&V(M)},[g.value]),Se=n==="popper"?Th:Eb,Ie=Se===Th?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:b,hideWhenDetached:m,avoidCollisions:x}:{};return d.jsx(Sb,{scope:r,content:v,viewport:S,onViewportChange:k,itemRefCallback:q,selectedItem:T,onItemLeave:se,itemTextRefCallback:te,focusSelectedItem:G,selectedItemText:A,position:n,isPositioned:J,searchRef:$,children:d.jsx(op,{as:z2,allowPinchZoom:!0,children:d.jsx(ip,{asChild:!0,trapped:g.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:oe(s,M=>{var ye;(ye=g.trigger)==null||ye.focus({preventScroll:!0}),M.preventDefault()}),children:d.jsx(ba,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:d.jsx(Se,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:M=>M.preventDefault(),...w,...Ie,onPlaced:()=>L(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:oe(w.onKeyDown,M=>{const ye=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!ye&&M.key.length===1&&Z(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let ve=D().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(M.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const ce=M.target,fe=ve.indexOf(ce);ve=ve.slice(fe+1)}setTimeout(()=>W(ve)),M.preventDefault()}})})})})})})});kb.displayName=B2;var W2="SelectItemAlignedPosition",Eb=y.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=zn(xs,r),o=Wn(xs,r),[a,l]=y.useState(null),[c,u]=y.useState(null),h=Te(e,E=>u(E)),p=tu(r),f=y.useRef(!1),b=y.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:w,focusSelectedItem:g}=o,v=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&x&&w){const E=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),A=w.getBoundingClientRect();if(i.dir!=="rtl"){const ce=A.left-T.left,fe=j.left-ce,nt=E.left-fe,Dt=E.width+nt,Hn=Math.max(Dt,T.width),Zr=window.innerWidth-Qt,Vn=av(fe,[Qt,Math.max(Qt,Zr-Hn)]);a.style.minWidth=Dt+"px",a.style.left=Vn+"px"}else{const ce=T.right-A.right,fe=window.innerWidth-j.right-ce,nt=window.innerWidth-E.right-fe,Dt=E.width+nt,Hn=Math.max(Dt,T.width),Zr=window.innerWidth-Qt,Vn=av(fe,[Qt,Math.max(Qt,Zr-Hn)]);a.style.minWidth=Dt+"px",a.style.right=Vn+"px"}const V=p(),D=window.innerHeight-Qt*2,J=m.scrollHeight,L=window.getComputedStyle(c),Q=parseInt(L.borderTopWidth,10),W=parseInt(L.paddingTop,10),G=parseInt(L.borderBottomWidth,10),C=parseInt(L.paddingBottom,10),N=Q+W+J+C+G,$=Math.min(x.offsetHeight*5,N),Z=window.getComputedStyle(m),q=parseInt(Z.paddingTop,10),se=parseInt(Z.paddingBottom,10),te=E.top+E.height/2-Qt,Se=D-te,Ie=x.offsetHeight/2,M=x.offsetTop+Ie,ye=Q+W+M,Le=N-ye;if(ye<=te){const ce=V.length>0&&x===V[V.length-1].ref.current;a.style.bottom="0px";const fe=c.clientHeight-m.offsetTop-m.offsetHeight,nt=Math.max(Se,Ie+(ce?se:0)+fe+G),Dt=ye+nt;a.style.height=Dt+"px"}else{const ce=V.length>0&&x===V[0].ref.current;a.style.top="0px";const nt=Math.max(te,Q+m.offsetTop+(ce?q:0)+Ie)+Le;a.style.height=nt+"px",m.scrollTop=ye-te+m.offsetTop}a.style.margin=`${Qt}px 0`,a.style.minHeight=$+"px",a.style.maxHeight=D+"px",n==null||n(),requestAnimationFrame(()=>f.current=!0)}},[p,i.trigger,i.valueNode,a,c,m,x,w,i.dir,n]);rt(()=>v(),[v]);const[_,S]=y.useState();rt(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const k=y.useCallback(E=>{E&&b.current===!0&&(v(),g==null||g(),b.current=!1)},[v,g]);return d.jsx(V2,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:d.jsx(ue.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Eb.displayName=W2;var H2="SelectPopperPosition",Th=y.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Qt,...i}=t,o=ru(r);return d.jsx(_x,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Th.displayName=H2;var[V2,ap]=Zi(xs,{}),Rh="SelectViewport",Cb=y.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=Wn(Rh,r),o=ap(Rh,r),a=Te(e,i.onViewportChange),l=y.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(eu.Slot,{scope:r,children:d.jsx(ue.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:oe(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&h){const f=Math.abs(l.current-u.scrollTop);if(f>0){const b=window.innerHeight-Qt*2,m=parseFloat(h.style.minHeight),x=parseFloat(h.style.height),w=Math.max(m,x);if(w<b){const g=w+f,v=Math.min(b,g),_=g-v;h.style.height=v+"px",h.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,h.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Cb.displayName=Rh;var Tb="SelectGroup",[q2,K2]=Zi(Tb),G2=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=hi();return d.jsx(q2,{scope:r,id:s,children:d.jsx(ue.div,{role:"group","aria-labelledby":s,...n,ref:e})})});G2.displayName=Tb;var Rb="SelectLabel",Nb=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=K2(Rb,r);return d.jsx(ue.div,{id:s.id,...n,ref:e})});Nb.displayName=Rb;var gc="SelectItem",[J2,jb]=Zi(gc),Pb=y.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=zn(gc,r),l=Wn(gc,r),c=a.value===n,[u,h]=y.useState(i??""),[p,f]=y.useState(!1),b=Te(e,g=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,g,n,s)}),m=hi(),x=y.useRef("touch"),w=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(J2,{scope:r,value:n,disabled:s,textId:m,isSelected:c,onItemTextChange:y.useCallback(g=>{h(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:d.jsx(eu.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:d.jsx(ue.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:b,onFocus:oe(o.onFocus,()=>f(!0)),onBlur:oe(o.onBlur,()=>f(!1)),onClick:oe(o.onClick,()=>{x.current!=="mouse"&&w()}),onPointerUp:oe(o.onPointerUp,()=>{x.current==="mouse"&&w()}),onPointerDown:oe(o.onPointerDown,g=>{x.current=g.pointerType}),onPointerMove:oe(o.onPointerMove,g=>{var v;x.current=g.pointerType,s?(v=l.onItemLeave)==null||v.call(l):x.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(o.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:oe(o.onKeyDown,g=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&g.key===" "||(I2.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});Pb.displayName=gc;var wo="SelectItemText",Ab=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=zn(wo,r),a=Wn(wo,r),l=jb(wo,r),c=M2(wo,r),[u,h]=y.useState(null),p=Te(e,w=>h(w),l.onItemTextChange,w=>{var g;return(g=a.itemTextRefCallback)==null?void 0:g.call(a,w,l.value,l.disabled)}),f=u==null?void 0:u.textContent,b=y.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=c;return rt(()=>(m(b),()=>x(b)),[m,x,b]),d.jsxs(d.Fragment,{children:[d.jsx(ue.span,{id:l.textId,...i,ref:p}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ks.createPortal(i.children,o.valueNode):null]})});Ab.displayName=wo;var Ob="SelectItemIndicator",Ib=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return jb(Ob,r).isSelected?d.jsx(ue.span,{"aria-hidden":!0,...n,ref:e}):null});Ib.displayName=Ob;var Nh="SelectScrollUpButton",Lb=y.forwardRef((t,e)=>{const r=Wn(Nh,t.__scopeSelect),n=ap(Nh,t.__scopeSelect),[s,i]=y.useState(!1),o=Te(e,n.onScrollButtonChange);return rt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?d.jsx($b,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Lb.displayName=Nh;var jh="SelectScrollDownButton",Db=y.forwardRef((t,e)=>{const r=Wn(jh,t.__scopeSelect),n=ap(jh,t.__scopeSelect),[s,i]=y.useState(!1),o=Te(e,n.onScrollButtonChange);return rt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?d.jsx($b,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Db.displayName=jh;var $b=y.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=Wn("SelectScrollButton",r),o=y.useRef(null),a=tu(r),l=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),rt(()=>{var u;const c=a().find(h=>h.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),d.jsx(ue.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:oe(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:oe(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:oe(s.onPointerLeave,()=>{l()})})}),Y2="SelectSeparator",Mb=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return d.jsx(ue.div,{"aria-hidden":!0,...n,ref:e})});Mb.displayName=Y2;var Ph="SelectArrow",Z2=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=ru(r),i=zn(Ph,r),o=Wn(Ph,r);return i.open&&o.position==="popper"?d.jsx(Sx,{...s,...n,ref:e}):null});Z2.displayName=Ph;var Q2="SelectBubbleInput",Ub=y.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const s=y.useRef(null),i=Te(n,s),o=KO(e);return y.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const h=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(h)}},[o,e]),d.jsx(ue.select,{...r,style:{...yw,...r.style},ref:i,defaultValue:e})});Ub.displayName=Q2;function Fb(t){return t===""||t===void 0}function Bb(t){const e=ur(t),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function zb(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=X2(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function X2(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var eI=mb,Wb=vb,tI=wb,rI=xb,nI=bb,Hb=_b,sI=Cb,Vb=Nb,qb=Pb,iI=Ab,oI=Ib,Kb=Lb,Gb=Db,Jb=Mb;
337const yv=eI,wv=tI,Ah=y.forwardRef(({className:t,children:e,...r},n)=>d.jsxs(Wb,{ref:n,className:je("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[e,d.jsx(rI,{asChild:!0,children:d.jsx(Uf,{className:"h-4 w-4 opacity-50"})})]}));Ah.displayName=Wb.displayName;const Yb=y.forwardRef(({className:t,...e},r)=>d.jsx(Kb,{ref:r,className:je("flex cursor-default items-center justify-center py-1",t),...e,children:d.jsx(zw,{className:"h-4 w-4"})}));Yb.displayName=Kb.displayName;const Zb=y.forwardRef(({className:t,...e},r)=>d.jsx(Gb,{ref:r,className:je("flex cursor-default items-center justify-center py-1",t),...e,children:d.jsx(Uf,{className:"h-4 w-4"})}));Zb.displayName=Gb.displayName;const Oh=y.forwardRef(({className:t,children:e,position:r="popper",...n},s)=>d.jsx(nI,{children:d.jsxs(Hb,{ref:s,className:je("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:[d.jsx(Yb,{}),d.jsx(sI,{className:je("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),d.jsx(Zb,{})]})}));Oh.displayName=Hb.displayName;const aI=y.forwardRef(({className:t,...e},r)=>d.jsx(Vb,{ref:r,className:je("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));aI.displayName=Vb.displayName;const Ih=y.forwardRef(({className:t,children:e,...r},n)=>d.jsxs(qb,{ref:n,className:je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(oI,{children:d.jsx(aT,{className:"h-4 w-4"})})}),d.jsx(iI,{children:e})]}));Ih.displayName=qb.displayName;const lI=y.forwardRef(({className:t,...e},r)=>d.jsx(Jb,{ref:r,className:je("-mx-1 my-1 h-px bg-muted",t),...e}));lI.displayName=Jb.displayName;const cI=qc({first_name:Tt().trim().min(1,"First name is required").max(60),email:Tt().trim().email("Please enter a valid email").max(255),timeline:Tt().min(1,"Please choose a timeline"),buying_situation:Tt().min(1,"Please choose your situation")}),uI=["0â3 months","3â6 months","6â12 months","Just researching"],dI=["Buying a primary residence","Buying a second home","Retiring / relocating","Investment property"];function hI(){const[t,e]=y.useState(!1),[r,n]=y.useState(!1),[s,i]=y.useState({}),[o,a]=y.useState({first_name:"",email:"",timeline:"",buying_situation:""}),{toast:l}=xa(),c=(h,p)=>a(f=>({...f,[h]:p})),u=async h=>{h.preventDefault(),i({});const p=cI.safeParse(o);if(!p.success){const g={};p.error.issues.forEach(v=>{g[v.path[0]]=v.message}),i(g);return}e(!0);const f=crypto.randomUUID(),{error:b}=await Nr.from("leads").insert([{id:f,first_name:p.data.first_name,email:p.data.email,timeline:p.data.timeline,buying_situation:p.data.buying_situation,source:"guide_form"}]);if(e(!1),b){l({title:"Something went wrong",description:"Please try again in a moment.",variant:"destructive"});return}const m=Ca(),x=Ea[m],w={type:"lead",source:"guide_form",intent:"guide",first_name:p.data.first_name,last_name:"",email:p.data.email,phone:"",message:"",timeline:p.data.timeline,buying_situation:p.data.buying_situation,agent:m,agent_name:x.displayName,agent_cinc_name:x.cincName};Zc(w),Qc(w),Nr.functions.invoke("send-transactional-email",{body:{templateName:"guide-delivery",recipientEmail:p.data.email,idempotencyKey:`guide-delivery-${f}`,templateData:{name:p.data.first_name}}}),Nr.functions.invoke("send-transactional-email",{body:{templateName:"guide-internal-notification",recipientEmail:"[email protected]",idempotencyKey:`guide-internal-${f}`,templateData:{name:p.data.first_name,email:p.data.email,timeline:p.data.timeline,buyingSituation:p.data.buying_situation}}}),n(!0),l({title:"You're in!",description:"Check your inbox â your guide is on the way."})};return d.jsx("section",{id:"guide",className:"py-20 md:py-28 bg-background",children:d.jsx("div",{className:"container-tight",children:d.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[d.jsxs("div",{className:"reveal",children:[d.jsx("span",{className:"text-xs tracking-[0.18em] uppercase text-accent font-semibold",children:"Free Download"}),d.jsx("h2",{className:"font-display text-3xl md:text-5xl mt-3 text-primary leading-tight",children:"Get the complete Brunswick County Relocation Guide"}),d.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:"60+ pages of community profiles, cost breakdowns, lifestyle insights, and the relocation roadmap our out-of-state clients use to land in the right home, the first time."}),d.jsx("ul",{className:"mt-6 space-y-3 text-foreground",children:["Instant PDF download","Updated for the current market","No spam â ever"].map(h=>d.jsxs("li",{className:"flex items-center gap-3",children:[d.jsx(Ai,{className:"h-5 w-5 text-accent shrink-0"}),d.jsx("span",{children:h})]},h))})]}),d.jsx("div",{className:"reveal",children:d.jsx("div",{className:"bg-card border border-border rounded-2xl p-7 md:p-9 shadow-elegant",children:r?d.jsxs("div",{className:"text-center py-10",children:[d.jsx("div",{className:"h-14 w-14 roun
337ded-full bg-accent/15 text-accent inline-flex items-center justify-center mb-4",children:d.jsx(Ai,{className:"h-7 w-7"})}),d.jsxs("h3",{className:"font-display text-2xl text-primary",children:["You're all set, ",o.first_name,"!"]}),d.jsxs("p",{className:"mt-2 text-muted-foreground",children:["We've sent your guide to ",d.jsx("strong",{children:o.email}),". Keep an eye on your inbox."]})]}):d.jsxs("form",{onSubmit:u,noValidate:!0,className:"space-y-5",children:[d.jsxs("div",{className:"flex items-center gap-2 text-primary mb-1",children:[d.jsx(hT,{className:"h-5 w-5"}),d.jsx("h3",{className:"font-display text-2xl",children:"Send me the guide"})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"first_name",children:"First name"}),d.jsx(or,{id:"first_name",autoComplete:"given-name",value:o.first_name,onChange:h=>c("first_name",h.target.value),maxLength:60,className:"mt-1.5"}),s.first_name&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:s.first_name})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"email",children:"Email"}),d.jsx(or,{id:"email",type:"email",autoComplete:"email",value:o.email,onChange:h=>c("email",h.target.value),maxLength:255,className:"mt-1.5"}),s.email&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:s.email})]}),d.jsxs("div",{children:[d.jsx(wt,{children:"Timeline"}),d.jsxs(yv,{value:o.timeline,onValueChange:h=>c("timeline",h),children:[d.jsx(Ah,{className:"mt-1.5",children:d.jsx(wv,{placeholder:"When are you looking to move?"})}),d.jsx(Oh,{children:uI.map(h=>d.jsx(Ih,{value:h,children:h},h))})]}),s.timeline&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:s.timeline})]}),d.jsxs("div",{children:[d.jsx(wt,{children:"Your situation"}),d.jsxs(yv,{value:o.buying_situation,onValueChange:h=>c("buying_situation",h),children:[d.jsx(Ah,{className:"mt-1.5",children:d.jsx(wv,{placeholder:"Which best describes you?"})}),d.jsx(Oh,{children:dI.map(h=>d.jsx(Ih,{value:h,children:h},h))})]}),s.buying_situation&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:s.buying_situation})]}),d.jsx(Je,{type:"submit",disabled:t,className:"w-full h-12 text-base",children:t?d.jsxs(d.Fragment,{children:[d.jsx(Oi,{className:"animate-spin"})," Sendingâ¦"]}):d.jsx(d.Fragment,{children:"Send Me the Guide"})}),d.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"We respect your privacy. No spam â unsubscribe anytime."})]})})})]})})})}const fI=[{icon:fT,title:"The Glass",body:"We start with the foundation â your goals, budget, and what 'home' actually looks like for you."},{icon:xT,title:"The Cocktail",body:"We curate the right blend of communities, neighborhoods, and homes that fit your unique mix."},{icon:cT,title:"The Olive",body:"The finishing touch â local insights, vendors, and the transition support that make it feel like yours."}];function pI({onContact:t}){return d.jsxs("section",{id:"video",className:"py-20 md:py-28 bg-primary text-primary-foreground relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 opacity-[0.06] pointer-events-none",style:{backgroundImage:"radial-gradient(circle at 20% 20%, hsl(var(--secondary)) 0, transparent 40%), radial-gradient(circle at 80% 80%, hsl(var(--secondary)) 0, transparent 40%)"},"aria-hidden":!0}),d.jsxs("div",{className:"container-tight relative",children:[d.jsxs("div",{className:"max-w-2xl reveal",children:[d.jsx("span",{className:"text-xs tracking-[0.18em] uppercase text-secondary font-semibold",children:"Our approach"}),d.jsx("h2",{className:"font-display text-3xl md:text-5xl mt-3 leading-tight",children:"The Martini Method"}),d.jsx("p",{className:"mt-4 text-lg text-primary-foreground/85",children:"Relocation is more than a transaction. Watch how we help out-of-state buyers find the right community â not just the right house."})]}),d.jsx("div",{className:"mt-10 reveal",children:d.jsx("div",{className:"relative mx-auto max-w-4xl rounded-2xl overflow-hidden shadow-elegant border border-white/10",children:d.jsx("div",{className:"relative w-full",style:{paddingBottom:"56.25%"},children:d.jsx("iframe",{title:"The Martini Method by Creekmore Realty Group",src:rj,className:"absolute inset-0 w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,loading:"lazy"})})})}),d.jsx("div",{className:"mt-14 grid md:grid-cols-3 gap-6",children:fI.map(({icon:e,title:r,body:n},s)=>d.jsxs("div",{className:"reveal bg-white/5 backdrop-blur-sm border border-white/10 rounded-xl p-7 hover:bg-white/10 transition-colors",style:{transitionDelay:`${s*80}ms`},children:[d.jsx("div",{className:"h-12 w-12 rounded-lg bg-secondary text-primary inline-flex items-center justify-center mb-4",children:d.jsx(e,{className:"h-6 w-6"})}),d.jsx("h3",{className:"font-display text-xl",children:r}
337),d.jsx("p",{className:"mt-2 text-primary-foreground/80 leading-relaxed",children:n})]},r))}),d.jsxs("div",{className:"mt-12 flex flex-col sm:flex-row gap-3 justify-center items-center reveal",children:[d.jsxs(Je,{size:"lg",onClick:()=>t("discovery_call"),className:"bg-secondary text-primary hover:bg-secondary/90 h-12 px-7 text-base font-semibold",children:["Schedule a Discovery Call ",d.jsx(Bw,{className:"ml-1"})]}),d.jsx(Je,{asChild:!0,size:"lg",variant:"outline",className:"h-12 px-7 text-base bg-transparent border-white/40 text-white hover:bg-white/10 hover:text-white",children:d.jsxs("a",{href:Xf,target:"_blank",rel:"noopener noreferrer",children:[d.jsx(Bf,{className:"mr-1"})," Subscribe â join ",ep]})})]})]})]})}const xv=280;function mI({t,delay:e,alt:r}){const[n,s]=y.useState(!1),i=t.quote.length>xv,o=!n&&i?t.quote.slice(0,xv).trimEnd()+"â¦":t.quote;return d.jsxs("figure",{className:`reveal relative overflow-hidden border border-border rounded-xl p-7 pt-9 shadow-card-soft hover:shadow-elegant transition-all duration-300 hover:-translate-y-1 flex flex-col h-full ${r?"bg-gradient-to-br from-card to-sand":"bg-card"}`,style:{transitionDelay:`${e}ms`},children:[d.jsx(rg,{"aria-hidden":!0,className:"absolute -top-3 -right-3 h-28 w-28 text-secondary/15 rotate-12 pointer-events-none"}),d.jsx(rg,{className:"h-7 w-7 text-secondary shrink-0 relative"}),d.jsx("div",{className:"flex gap-0.5 mt-4 relative",children:Array.from({length:5}).map((a,l)=>d.jsx(kT,{className:"h-4 w-4 fill-accent text-accent"},l))}),d.jsxs("blockquote",{className:"mt-4 text-foreground/90 leading-relaxed flex-1 whitespace-pre-line relative",children:['"',o,'"']}),i&&d.jsx("button",{type:"button",onClick:()=>s(a=>!a),className:"mt-3 inline-flex items-center gap-1 text-sm font-semibold text-accent hover:text-primary transition-colors self-start relative","aria-expanded":n,children:n?d.jsxs(d.Fragment,{children:["Show less ",d.jsx(zw,{className:"h-4 w-4"})]}):d.jsxs(d.Fragment,{children:["Read more ",d.jsx(Uf,{className:"h-4 w-4"})]})}),d.jsxs("figcaption",{className:"mt-6 pt-5 border-t border-border relative",children:[d.jsx("div",{className:"font-semibold text-primary",children:t.name}),d.jsx("div",{className:"text-sm text-muted-foreground",children:t.location})]})]})}function gI(){return d.jsx("section",{id:"testimonials",className:"py-20 md:py-28 gradient-sand",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs("div",{className:"max-w-2xl reveal",children:[d.jsx("span",{className:"text-xs tracking-[0.18em] uppercase text-accent font-semibold",children:"Real stories"}),d.jsx("h2",{className:"font-display text-3xl md:text-5xl mt-3 text-primary leading-tight",children:"Families who already made the move"})]}),d.jsx("div",{className:"mt-12 grid md:grid-cols-2 lg:grid-cols-3 gap-6 items-stretch",children:(sj[Ca()]??nj).map((t,e)=>d.jsx(mI,{t,delay:e*80,alt:e%2===1},t.name))})]})})}const vI=[{icon:yT,title:"We know the communities",body:"Years specializing in Brunswick County means we can match you to the right neighborhood â not just any home with a 'For Sale' sign."},{icon:_T,title:"Built for out-of-state buyers",body:"Video tours, virtual walk-throughs, market briefings, and a step-by-step roadmap that respects your time and your distance."},{icon:Ww,title:"Lifestyle first, always",body:"We start with how you want to live â beach, golf, boating, dining, community â then find the home that fits the life."}];function yI(){return d.jsx("section",{id:"why-us",className:"py-20 md:py-28 bg-background",children:d.jsxs("div",{className:"container-tight",children:[d.jsxs("div",{className:"max-w-2xl reveal",children:[d.jsx("span",{className:"text-xs tracking-[0.18em] uppercase text-accent font-semibold",children:"Why work with us"}),d.jsx("h2",{className:"font-display text-3xl md:text-5xl mt-3 text-primary leading-tight",children:"Local expertise. Relocation specialists. Lifestyle-first advisors."})]}),d.jsx("div",{className:"mt-14 grid md:grid-cols-3 gap-6",children:vI.map(({icon:t,title:e,body:r},n)=>d.jsxs("div",{className:"reveal group relative rounded-xl p-7 border border-border bg-card hover:bg-sand transition-all duration-300 hover:-translate-y-1.5 hover:shadow-elegant overflow-hidden",style:{transitionDelay:`${n*80}ms`}
337,children:[d.jsx("span",{"aria-hidden":!0,className:"absolute inset-x-0 top-0 h-[3px] gradient-sea scale-x-0 group-hover:scale-x-100 origin-left transition-transform duration-300"}),d.jsx("div",{className:"h-14 w-14 rounded-xl gradient-sea text-primary-foreground inline-flex items-center justify-center mb-5 group-hover:scale-110 group-hover:rotate-3 transition-transform duration-300",children:d.jsx(t,{className:"h-7 w-7"})}),d.jsx("h3",{className:"font-display text-2xl text-primary",children:e}),d.jsx("p",{className:"mt-3 text-muted-foreground leading-relaxed",children:r})]},e))})]})})}function wI({onContact:t}){return d.jsxs("section",{className:"py-20 md:py-28 bg-primary text-primary-foreground relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 opacity-10 pointer-events-none",style:{backgroundImage:"radial-gradient(circle at 30% 50%, hsl(var(--secondary)) 0, transparent 50%)"},"aria-hidden":!0}),d.jsxs("div",{className:"container-tight relative text-center",children:[d.jsx("h2",{className:"font-display text-3xl md:text-5xl leading-tight reveal",children:"Ready to make Coastal North Carolina home?"}),d.jsx("p",{className:"mt-5 text-lg text-primary-foreground/85 max-w-2xl mx-auto reveal",children:"Whether you want a no-pressure conversation or you're already planning your visit, we'll meet you where you are."}),d.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-3 justify-center reveal",children:[d.jsxs(Je,{size:"lg",onClick:()=>t("discovery_call"),className:"bg-secondary text-primary hover:bg-secondary/90 h-12 px-7 text-base font-semibold",children:[d.jsx(oT,{className:"mr-1"})," Schedule a Discovery Call"]}),d.jsxs(Je,{size:"lg",variant:"outline",onClick:()=>t("plan_visit"),className:"h-12 px-7 text-base bg-transparent border-white/40 text-white hover:bg-white/10 hover:text-white",children:[d.jsx(vT,{className:"mr-1"})," Plan Your Visit"]})]})]})]})}function xI(){return d.jsxs("footer",{className:"relative bg-card border-t border-border overflow-hidden",children:[d.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 opacity-[0.04]",style:{backgroundImage:"radial-gradient(circle at 20% 30%, hsl(var(--primary)) 0, transparent 35%), radial-gradient(circle at 80% 70%, hsl(var(--accent)) 0, transparent 40%), repeating-radial-gradient(circle at 50% 120%, hsl(var(--primary)) 0 1px, transparent 1px 22px)"}}),d.jsxs("div",{className:"relative container-tight py-14 grid md:grid-cols-3 gap-10",children:[d.jsxs("div",{children:[d.jsx("img",{src:Ax,alt:"Creekmore Realty Group logo",className:"h-14 w-auto rounded-sm",width:140,height:56,loading:"lazy"}),d.jsxs("p",{className:"mt-4 text-sm text-muted-foreground max-w-xs",children:["Helping out-of-state buyers and retirees relocate to ",Qa.region," with confidence."]}),d.jsxs("a",{href:Xf,target:"_blank",rel:"noopener noreferrer",className:"mt-5 inline-flex items-center gap-2 text-sm font-medium text-primary hover:text-accent transition-colors group",children:[d.jsx("span",{className:"h-9 w-9 rounded-full bg-primary text-primary-foreground inline-flex items-center justify-center group-hover:bg-accent transition-colors",children:d.jsx(Bf,{className:"h-4 w-4"})}),d.jsxs("span",{children:[d.jsx("span",{className:"block leading-tight",children:"@CreekmoreRealtyGroup"}),d.jsxs("span",{className:"block text-xs text-muted-foreground font-normal",children:[ep," on YouTube"]})]})]})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"font-display text-lg text-primary",children:"Explore"}),d.jsxs("ul",{className:"mt-3 space-y-2 text-sm text-muted-foreground",children:[d.jsx("li",{children:d.jsx("a",{href:"#guide",className:"hover:text-primary",children:"Get the guide"})}),d.jsx("li",{children:d.jsx("a",{href:"#video",className:"hover:text-primary",children:"The Martini Method"})}),d.jsx("li",{children:d.jsx("a",{href:"#testimonials",className:"hover:text-primary",children:"Stories"})}),d.jsx("li",{children:d.jsx("a",{href:"#why-us",className:"hover:text-primary",children:"Why work with us"})})]})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"font-display text-lg text-primary",children:"Brokerage"}),d.jsxs("p",{className:"mt-3 text-sm text-muted-foreground leading-relaxed",children:[Qa.name,d.jsx("br",{}),"Powered by ",Qa.brokerage,d.jsx("br",{}),"Brunswick County, North Carolina"]})]})]}),d.jsx("div",{className:"border-t border-border",children:d.jsxs("div",{className:"container-tight py-5 flex flex-col sm:flex-row justify-between gap-2 text-xs text-muted-foreground",children:[d.jsxs("span",{children:["© ",new Date().getFullYear()," ",Qa.name,". All rights reserved."]}),d.jsx("span",{children:"Equal Housing Opportunity · Licensed in North Carolina"})]})})]})}var nu="Dialog",[Qb,ZI]=Vi(nu),[bI,fr]=Qb(nu),Xb=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=y.useRef(null),l=y.useRef(null),[c,u]=rc({prop:n,defaultProp:s??!1,onChange:i,caller:nu});return d.jsx(bI,{scope:e,triggerRef:a,contentRef:l,contentId:hi(),titleId:hi(),descriptionId:hi(),open:c,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(h=>!h),[u]),modal:o,children:r})};Xb.displayName=nu;var e_="DialogTrigger",_I=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=fr(e_,r),i=Te(e,s.triggerRef);return d.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":up(s.open),...n,ref:i,onClick:oe(t.onClick,s.onOpenToggle)})});_I.displayName=e_;var lp="DialogPortal",[SI,t_]=Qb(lp,{forceMount:void 0}),r_=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=fr(lp,e);return d.jsx(SI,{scope:e,forceMount:r,children:y.Children.map(n,o=>d.jsx(qi,{present:r||i.open,children:d.jsx($c,{asChild:!0,container:s,children:o})}))})};r_.displayName=lp;var vc="DialogOverlay",n_=y.forwardRef((t,e)=>{const r=t_(vc,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=fr(vc,t.__scopeDialog);return i.modal?d.jsx(qi,{present:n||i.open,children:d.jsx(EI,{...s,ref:e})}):null});
vendor: 3,806 bytes, lines 337-341
337n_.displayName=vc;var kI=Pi("DialogOverlay.RemoveScroll"),EI=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=fr(vc,r);return d.jsx(op,{as:kI,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(ue.div,{"data-state":up(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),bs="DialogContent",s_=y.forwardRef((t,e)=>{const r=t_(bs,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=fr(bs,t.__scopeDialog);return d.jsx(qi,{present:n||i.open,children:i.modal?d.jsx(CI,{...s,ref:e}):d.jsx(TI,{...s,ref:e})})});s_.displayName=bs;var CI=y.forwardRef((t,e)=>{const r=fr(bs,t.__scopeDialog),n=y.useRef(null),s=Te(e,r.contentRef,n);return y.useEffect(()=>{const i=n.current;if(i)return ab(i)},[]),d.jsx(i_,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:oe(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:oe(t.onFocusOutside,i=>i.preventDefault())})}),TI=y.forwardRef((t,e)=>{const r=fr(bs,t.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return d.jsx(i_,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),i_=y.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=fr(bs,r),l=y.useRef(null),c=Te(e,l);return sb(),d.jsxs(d.Fragment,{children:[d.jsx(ip,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:d.jsx(ba,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":up(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(RI,{titleId:a.titleId}),d.jsx(jI,{contentRef:l,descriptionId:a.descriptionId})]})]})}),cp="DialogTitle",o_=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=fr(cp,r);return d.jsx(ue.h2,{id:s.titleId,...n,ref:e})});o_.displayName=cp;var a_="DialogDescription",l_=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=fr(a_,r);return d.jsx(ue.p,{id:s.descriptionId,...n,ref:e})});l_.displayName=a_;var c_="DialogClose",u_=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=fr(c_,r);return d.jsx(ue.button,{type:"button",...n,ref:e,onClick:oe(t.onClick,()=>s.onOpenChange(!1))})});u_.displayName=c_;function up(t){return t?"open":"closed"}var d_="DialogTitleWarning",[QI,h_]=uC(d_,{contentName:bs,titleName:cp,docsSlug:"dialog"}),RI=({titleId:t})=>{const e=h_(d_),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 338 339If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 340 341For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},NI="DialogDescriptionWarning",jI=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${h_(NI).contentName}}.`;return y.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},PI=Xb,AI=r_,f_=n_,p_=s_,m_=o_,g_=l_,OI=u_;
341const v_=PI,II=AI,y_=y.forwardRef(({className:t,...e},r)=>d.jsx(f_,{ref:r,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}));y_.displayName=f_.displayName;const dp=y.forwardRef(({className:t,children:e,...r},n)=>d.jsxs(II,{children:[d.jsx(y_,{}),d.jsxs(p_,{ref:n,className:je("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...r,children:[e,d.jsxs(OI,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[d.jsx(Ff,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dp.displayName=p_.displayName;const hp=({className:t,...e})=>d.jsx("div",{className:je("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});hp.displayName="DialogHeader";const fp=y.forwardRef(({className:t,...e},r)=>d.jsx(m_,{ref:r,className:je("text-lg font-semibold leading-none tracking-tight",t),...e}));fp.displayName=m_.displayName;const pp=y.forwardRef(({className:t,...e},r)=>d.jsx(g_,{ref:r,className:je("text-sm text-muted-foreground",t),...e}));pp.displayName=g_.displayName;const w_=y.forwardRef(({className:t,...e},r)=>d.jsx("textarea",{className:je("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
341ing-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}));w_.displayName="Textarea";const LI=qc({first_name:Tt().trim().min(1,"Required").max(60),last_name:Tt().trim().max(60).optional().or(zu("")),email:Tt().trim().email("Valid email required").max(255),phone:Tt().trim().max(40).optional().or(zu("")),message:Tt().trim().max(1e3).optional().or(zu(""))}),bv={discovery_call:{title:"Schedule a Discovery Call",description:"Tell us a little about you. We'll reach out within one business day to set a time.",cta:"Request my call"},plan_visit:{title:"Plan Your Visit",description:"We'll help you map out a productive trip â communities, showings, and the spots only locals know.",cta:"Help me plan"},general:{title:"Get in touch",description:"Send us a note. We read every message.",cta:"Send message"}};function DI({open:t,intent:e,onOpenChange:r}){const n=bv[e]??bv.general,[s,i]=y.useState(!1),[o,a]=y.useState(!1),[l,c]=y.useState({}),[u,h]=y.useState({first_name:"",last_name:"",email:"",phone:"",message:""}),{toast:p}=xa();y.useEffect(()=>{if(!t){const m=setTimeout(()=>{a(!1),c({}),h({first_name:"",last_name:"",email:"",phone:"",message:""})},250);return()=>clearTimeout(m)}},[t]);const f=(m,x)=>h(w=>({...w,[m]:x})),b=async m=>{m.preventDefault(),c({});const x=LI.safeParse(u);if(!x.success){const S={};x.error.issues.forEach(k=>{S[k.path[0]]=k.message}),c(S);return}i(!0);const{error:w}=await Nr.from("contact_requests").insert([{intent:e,first_name:x.data.first_name,last_name:x.data.last_name||null,email:x.data.email,phone:x.data.phone||null,message:x.data.message||null}]);if(i(!1),w){p({title:"Couldn't send your message",description:"Please try again in a moment.",variant:"destructive"});return}const g=Ca(),v=Ea[g],_={type:"contact",source:`contact_${e}`,intent:e,first_name:x.data.first_name,last_name:x.data.last_name||"",email:x.data.email,phone:x.data.phone||"",message:x.data.message||"",timeline:"",buying_situation:"",agent:g,agent_name:v.displayName,agent_cinc_name:v.cincName};Zc(_),Qc(_),a(!0),p({title:"Message received",description:"We'll be in touch shortly."})};return d.jsx(v_,{open:t,onOpenChange:r,children:d.jsx(dp,{className:"max-w-lg",children:o?d.jsxs("div",{className:"text-center py-8",children:[d.jsx("div",{className:"h-14 w-14 rounded-full bg-accent/15 text-accent inline-flex items-center justify-center mb-4",children:d.jsx(Ai,{className:"h-7 w-7"})}),d.jsxs("h3",{className:"font-display text-2xl text-primary",children:["Thanks, ",u.first_name,"!"]}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"We've got your request and will be in touch shortly."}),d.jsx(Je,{className:"mt-6",onClick:()=>r(!1),children:"Close"})]}):d.jsxs(d.Fragment,{children:[d.jsxs(hp,{children:[d.jsx(fp,{className:"font-display text-2xl text-primary",children:n.title}),d.jsx(pp,{children:n.description})]}),d.jsxs("form",{onSubmit:b,noValidate:!0,className:"space-y-4 mt-2",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"c-fn",children:"First name"}),d.jsx(or,{id:"c-fn",autoComplete:"given-name",value:u.first_name,onChange:m=>f("first_name",m.target.value),maxLength:60,className:"mt-1.5"}),l.first_name&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:l.first_name})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"c-ln",children:"Last name"}),d.jsx(or,{id:"c-ln",autoComplete:"family-name",value:u.last_name,onChange:m=>f("last_name",m.target.value),maxLength:60,className:"mt-1.5"})]})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"c-email",children:"Email"}),d.jsx(or,{id:"c-email",type:"email",autoComplete:"email",value:u.email,onChange:m=>f("email",m.target.value),maxLength:255,className:"mt-1.5"}),l.email&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:l.email})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"c-phone",children:"Phone (optional)"}),d.jsx(or,{id:"c-phone",type:"tel",autoComplete:"tel",value:u.phone,onChange:m=>f("phone",m.target.value),maxLength:40,className:"mt-1.5"})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"c-msg",children:"How can we help?
341(optional)"}),d.jsx(w_,{id:"c-msg",rows:4,value:u.message,onChange:m=>f("message",m.target.value),maxLength:1e3,className:"mt-1.5",placeholder:"Timeline, areas of interest, questionsâ¦"})]}),d.jsx(Je,{type:"submit",disabled:s,className:"w-full h-11",children:s?d.jsxs(d.Fragment,{children:[d.jsx(Oi,{className:"animate-spin"})," Sendingâ¦"]}):n.cta})]})]})})})}const _v="creekmore_exit_shown",$I=qc({first_name:Tt().trim().min(1,"Required").max(60),email:Tt().trim().email("Valid email required").max(255)});function MI(){const[t,e]=y.useState(!1),[r,n]=y.useState(!1),[s,i]=y.useState(!1),[o,a]=y.useState({}),[l,c]=y.useState({first_name:"",email:""}),u=y.useRef(!1),{toast:h}=xa();y.useEffect(()=>{if(typeof window>"u"||sessionStorage.getItem(_v))return;const b=()=>{u.current||(u.current=!0,sessionStorage.setItem(_v,"1"),e(!0))},m=g=>{g.clientY<=0&&!g.relatedTarget&&b()};let x;const w=()=>{u.current||(window.clearTimeout(x),x=window.setTimeout(()=>{window.scrollY>600&&b()},3e4))};return document.addEventListener("mouseout",m),window.addEventListener("scroll",w,{passive:!0}),()=>{document.removeEventListener("mouseout",m),window.removeEventListener("scroll",w),x&&window.clearTimeout(x)}},[]);const p=(b,m)=>c(x=>({...x,[b]:m})),f=async b=>{b.preventDefault(),a({});const m=$I.safeParse(l);if(!m.success){const S={};m.error.issues.forEach(k=>{S[k.path[0]]=k.message}),a(S);return}n(!0);const x=crypto.randomUUID(),{error:w}=await Nr.from("leads").insert([{id:x,first_name:m.data.first_name,email:m.data.email,source:"exit_popup"}]);if(n(!1),w){h({title:"Couldn't submit",description:"Please try again.",variant:"destructive"});return}const g=Ca(),v=Ea[g],_={type:"lead",source:"exit_popup",intent:"custom_list",first_name:m.data.first_name,last_name:"",email:m.data.email,phone:"",message:"",timeline:"",buying_situation:"",agent:g,agent_name:v.displayName,agent_cinc_name:v.cincName};Zc(_),Qc(_),Nr.functions.invoke("send-transactional-email",{body:{templateName:"custom-list-internal-notification",recipientEmail:"[email protected]",idempotencyKey:`custom-list-${x}`,templateData:{name:m.data.first_name,email:m.data.email}}}),i(!0),h({title:"On its way",description:"Watch your inbox for your custom list."})};return d.jsx(v_,{open:t,onOpenChange:e,children:d.jsx(dp,{className:"max-w-md",children:s?d.jsxs("div",{className:"text-center py-8",children:[d.jsx("div",{className:"h-14 w-14 rounded-full bg-accent/15 text-accent inline-flex items-center justify-center mb-4",children:d.jsx(Ai,{className:"h-7 w-7"})}),d.jsxs("h3",{className:"font-display text-2xl text-primary",children:["Got it, ",l.first_name,"!"]}),d.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Your custom community list is on its way to ",d.jsx("strong",{children:l.email}),"."]}),d.jsx(Je,{className:"mt-6",onClick:()=>e(!1),children:"Close"})]}):d.jsxs(d.Fragment,{children:[d.jsxs(hp,{children:[d.jsx("div",{className:"h-11 w-11 rounded-lg gradient-sea text-primary-foreground inline-flex items-center justify-center mb-2",children:d.jsx(Ww,{className:"h-5 w-5"})}),d.jsx(fp,{className:"font-display text-2xl text-primary",children:"Not Sure Where to Start?"}),d.jsx(pp,{children:"Get a custom list of communities that match your lifestyle, budget, and timeline."})]}),d.jsxs("form",{onSubmit:f,noValidate:!0,className:"space-y-4 mt-2",children:[d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"x-fn",children:"First name"}),d.jsx(or,{id:"x-fn",autoComplete:"given-name",value:l.first_name,onChange:b=>p("first_name",b.target.value),maxLength:60,className:"mt-1.5"}),o.first_name&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:o.first_name})]}),d.jsxs("div",{children:[d.jsx(wt,{htmlFor:"x-email",children:"Email"}),d.jsx(or,{id:"x-email",type:"email",autoComplete:"email",value:l.email,onChange:b=>p("email",b.target.value),maxLength:255,className:"mt-1.5"}),o.email&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:o.email})]}),d.jsx(Je,{type:"submit",disabled:r,className:"w-full h-11",children:r?d.jsxs(d.Fragment,{children:[d.jsx(Oi,{className:"animate-spin"})," Sendingâ¦"]}):"Send Me My Custom List"}),d.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"No spam. Unsubscribe anytime."})]})]})})})}const Ze=()=>{JN();const[t,e]=y.useState({open:!1,intent:"general"}),r=n=>e({open:!0,intent:n});return d.jsxs("main",{className:"min-h-screen bg-background",children:[d.jsx(QN,{}),d.jsx(ij,{}),d.jsx(aj,{}),d.jsx($O,{}),d.jsx(hI,{}),d.jsx(pI,{onContact:r}),d.jsx(gI,{}),d.jsx(yI,{}),d.jsx(wI,{onContact:r}),d.jsx(xI,{}),d.jsx(DI,{open:t.open,intent:t.intent,onOpenChange:n=>e(s=>({...s,open:n}))}),d.jsx(MI,{})]})},UI=()=>{const t=Hi();return y.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),d.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),d.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},FI="https://pidhcrjyprxedbxdwwdd.supabase.co",BI="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBpZGhjcmp5cHJ4ZWRieGR3d2RkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY0MzY1NzEsImV4cCI6MjA5MjAxMjU3MX0.JxFp_knhfRrdTLpV7Fq9J1lg0sDzzp34THlgrKXYCO4";function zI(){const[t]=CE(),e=t.get("token"),[r,n]=y.useState("validating");y.useEffect(()=>{if(!e){n("invalid");return}(async()=>{try{const o=await(await fetch(`${FI}/functions/v1/handle-email-unsubscribe?token=${encodeURIComponent(e)}`,{headers:{apikey:BI}})).json();o.valid?n("valid"):o.reason==="already_unsubscribed"?n("already"):n("invalid")}catch{n("invalid")}})()},[e]);const s=async()=>
341{if(!e)return;n("submitting");const{data:i,error:o}=await Nr.functions.invoke("handle-email-unsubscribe",{body:{token:e}});if(o||!(i!=null&&i.success)){(i==null?void 0:i.reason)==="already_unsubscribed"?n("already"):n("error");return}n("done")};return d.jsx("main",{className:"min-h-screen bg-background flex items-center justify-center px-4 py-16",children:d.jsxs("div",{className:"w-full max-w-md bg-card border border-border rounded-2xl shadow-elegant p-8 text-center",children:[r==="validating"&&d.jsxs(d.Fragment,{children:[d.jsx(Oi,{className:"h-10 w-10 text-muted-foreground animate-spin mx-auto"}),d.jsx("p",{className:"mt-4 text-muted-foreground",children:"Checking your linkâ¦"})]}),r==="valid"&&d.jsxs(d.Fragment,{children:[d.jsx("h1",{className:"font-display text-2xl text-primary",children:"Unsubscribe?"}),d.jsx("p",{className:"mt-3 text-muted-foreground",children:"Click below to stop receiving emails from Creekmore Realty Group."}),d.jsx(Je,{onClick:s,className:"mt-6 w-full h-11",children:"Confirm Unsubscribe"}),d.jsx(Ka,{to:"/",className:"block mt-4 text-sm text-muted-foreground underline",children:"Back to site"})]}),r==="submitting"&&d.jsxs(d.Fragment,{children:[d.jsx(Oi,{className:"h-10 w-10 text-muted-foreground animate-spin mx-auto"}),d.jsx("p",{className:"mt-4 text-muted-foreground",children:"Processingâ¦"})]}),r==="done"&&d.jsxs(d.Fragment,{children:[d.jsx(Ai,{className:"h-12 w-12 text-accent mx-auto"}),d.jsx("h1",{className:"mt-4 font-display text-2xl text-primary",children:"You're unsubscribed"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"You won't receive any further emails from us. Sorry to see you go!"}),d.jsx(Ka,{to:"/",className:"block mt-6 text-sm text-primary underline",children:"Back to site"})]}),r==="already"&&d.jsxs(d.Fragment,{children:[d.jsx(Ai,{className:"h-12 w-12 text-accent mx-auto"}),d.jsx("h1",{className:"mt-4 font-display text-2xl text-primary",children:"Already unsubscribed"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"This email address is already removed from our list."}),d.jsx(Ka,{to:"/",className:"block mt-6 text-sm text-primary underline",children:"Back to site"})]}),(r==="invalid"||r==="error")&&d.jsxs(d.Fragment,{children:[d.jsx(lT,{className:"h-12 w-12 text-destructive mx-auto"}),d.jsx("h1",{className:"mt-4 font-display text-2xl text-primary",children:"Link invali
341d"}),d.jsx("p",{className:"mt-2 text-muted-foreground",children:"This unsubscribe link is invalid or has expired."}),d.jsx(Ka,{to:"/",className:"block mt-6 text-sm text-primary underline",children:"Back to site"})]})]})})}const WI=new Sk,HI=()=>d.jsx(Ek,{client:WI,children:d.jsxs(KN,{children:[d.jsx(aR,{}),d.jsx(sC,{}),d.jsx(_E,{children:d.jsxs(pE,{children:[d.jsx(Be,{path:"/",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/creekmore",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/pigg",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/hunter",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/mueller",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/loflin",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/reardon",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/forrest",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/allen",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/scearce",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/spurgason",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/epurgason",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/delgiudice",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/mdahrooge",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/bdahrooge",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/conner",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/boone",element:d.jsx(Ze,{})}),d.jsx(Be,{path:"/unsubscribe",element:d.jsx(zI,{})}),d.jsx(Be,{path:"*",element:d.jsx(UI,{})})]})})]})});V0(document.getElementById("root")).render(d.jsx(HI,{}));
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.