vendor: 5,159 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-CHQQl4TL.js","assets/NoIndex-HWvczRPw.js","assets/trending-up-CyE1es9A.js","assets/SearchHistoryList-DTC44FtQ.js","assets/SearchHistoryItem-7YVE9VbH.js","assets/formatDistanceToNow-Cc_IrjW0.js","assets/globe-ZzUhBVZi.js","assets/select-PleXXOes.js","assets/alert-dialog-BaFFDqvP.js","assets/sparkles-CKDYBox_.js","assets/Settings-C7y3Lb5o.js","assets/arrow-left-DA2kOF0X.js","assets/SearchDetail-iX31ufzI.js","assets/SearchHistory-DN3qXox_.js","assets/AuthCallback-Bth8lwaX.js","assets/NotFound-CgU6hWbJ.js","assets/wholio-avatar-C1eSvAf0.js","assets/Admin-C0rhUkzI.js","assets/target-WXTOB0-0.js","assets/user-check-bBp4aU3e.js","assets/format-D16O7clG.js","assets/database-Cz6y_jWO.js","assets/gift-DkZWsH6R.js","assets/AdminUserDetail-DXqMYRzp.js","assets/AdminSearchDetail-Cxg75T3C.js","assets/AdminComp-ZlYXIClQ.js","assets/Recruiters-Dgl6APvQ.js","assets/HeroInput-BYlPAQwT.js","assets/building-2-CJMmucWn.js","assets/mic-BnvgebzK.js","assets/trophy-DLZUsdhq.js","assets/bot-BjONCKgt.js","assets/Agencies-B6MFrr-c.js","assets/SalesMarketing-CTZiIstJ.js","assets/shield-C945D-RO.js","assets/WholioVsClay-kZPoh3YD.js","assets/circle-check-B5DO0ck9.js","assets/WholioVsSalesNavigator-xxksP8PO.js","assets/WholioVsPhantomBuster-LoUxHSSL.js","assets/WholioVsApollo-B2Bly--M.js","assets/WholioVsEvaboot-C87ballW.js","assets/Integrations-UlvhU4Ng.js","assets/Compliance-D2NRXKh0.js","assets/About-D9CJAIlY.js","assets/CheckoutReturn-DzhoXSP3.js"])))=>i.map(i=>d[i]); 2var Ik=Object.defineProperty;var bg=e=>{throw TypeError(e)};var Dk=(e,t,n)=>t in e?Ik(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var lr=(e,t,n)=>Dk(e,typeof t!="symbol"?t+"":t,n),xd=(e,t,n)=>t.has(e)||bg("Cannot "+n);var D=(e,t,n)=>(xd(e,t,"read from private field"),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?bg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),we=(e,t,n,r)=>(xd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),St=(e,t,n)=>(xd(e,t,"access private method"),n);var ml=(e,t,n,r)=>({set _(s){we(e,t,s,n)},get _(){return D(e,t,r)}});function Lk(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var dU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q0={exports:{}},wu={},K0={exports:{}},ke={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Ha=Symbol.for("react.element"),Mk=Symbol.for("react.portal"),$k=Symbol.for("react.fragment"),Fk=Symbol.for("react.strict_mode"),Uk=Symbol.for("react.profiler"),zk=Symbol.for("react.provider"),Bk=Symbol.for("react.context"),Wk=Symbol.for("react.forward_ref"),Vk=Symbol.for("react.suspense"),Hk=Symbol.for("react.memo"),qk=Symbol.for("react.lazy"),_g=Symbol.iterator;function Kk(e){return e===null||typeof e!="object"?null:(e=_g&&e[_g]||e["@@iterator"],typeof e=="function"?e:null)}var G0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y0=Object.assign,J0={};function hi(e,t,n){this.props=e,this.context=t,this.refs=J0,this.updater=n||G0}hi.prototype.isReactComponent={};hi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Q0(){}Q0.prototype=hi.prototype;function gp(e,t,n){this.props=e,this.context=t,this.refs=J0,this.updater=n||G0}var vp=gp.prototype=new Q0;vp.constructor=gp;Y0(vp,hi.prototype);vp.isPureReactComponent=!0;var Sg=Array.isArray,X0=Object.prototype.hasOwnProperty,yp={current:null},Z0={key:!0,ref:!0,__self:!0,__source:!0};
vendor: 5,587 bytes, lines 10-18
10function ew(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)X0.call(t,r)&&!Z0.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Ha,type:e,key:o,ref:i,props:s,_owner:yp.current}}function Gk(e,t){return{$$typeof:Ha,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ha}function Yk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Eg=/\/+/g;function bd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Yk(""+e.key):t.toString(36)}function nc(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ha:case Mk:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+bd(i,0):r,Sg(s)?(n="",e!=null&&(n=e.replace(Eg,"$&/")+"/"),nc(s,t,n,"",function(u){return u})):s!=null&&(wp(s)&&(s=Gk(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Eg,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Sg(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+bd(o,a);i+=nc(o,t,n,c,s)}else if(c=Kk(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+bd(o,a++),i+=nc(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function gl(e,t,n){if(e==null)return e;var r=[],s=0;return nc(e,r,"","",function(o){return t.call(n,o,s++)}),r}function Jk(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var It={current:null},rc={transition:null},Qk={ReactCurrentDispatcher:It,ReactCurrentBatchConfig:rc,ReactCurrentOwner:yp};function tw(){throw Error("act(...) is not supported in production builds of React.")}ke.Children={map:gl,forEach:function(e,t,n){gl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gl(e,function(){t++}),t},toArray:function(e){return gl(e,function(t){return t})||[]},only:function(e){if(!wp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Component=hi;ke.Fragment=$k;ke.Profiler=Uk;ke.PureComponent=gp;ke.StrictMode=Fk;ke.Suspense=Vk;ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qk;ke.act=tw;ke.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Y0({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=yp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)X0.call(t,c)&&!Z0.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Ha,type:e.type,key:s,ref:o,props:r,_owner:i}};ke.createContext=function(e){return e={$$typeof:Bk,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zk,_context:e},e.Consumer=e};ke.createElement=ew;ke.createFactory=function(e){var t=ew.bind(null,e);return t.type=e,t};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:Wk,render:e}};ke.isValidElement=wp;ke.lazy=function(e){return{$$typeof:qk,_payload:{_status:-1,_result:e},_init:Jk}};ke.memo=function(e,t){return{$$typeof:Hk,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=rc.transition;rc.transition={};try{e()}finally{rc.transition=t}};ke.unstable_act=tw;ke.useCallback=function(e,t){return It.current.useCallback(e,t)};ke.useContext=function(e){return It.current.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e){return It.current.useDeferredValue(e)};ke.useEffect=function(e,t){return It.current.useEffect(e,t)};ke.useId=function(){return It.current.useId()};ke.useImperativeHandle=function(e,t,n){return It.current.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return It.current.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return It.current.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return It.current.useMemo(e,t)};ke.useReducer=function(e,t,n){return It.current.useReducer(e,t,n)};ke.useRef=function(e){return It.current.useRef(e)};ke.useState=function(e){return It.current.useState(e)};ke.useSyncExternalStore=function(e,t,n){return It.current.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return It.current.useTransition()};ke.version="18.3.1";K0.exports=ke;var f=K0.exports;const T=fi(f),xu=Lk({__proto__:null,default:T},[f]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var Xk=f,Zk=Symbol.for("react.element"),eC=Symbol.for("react.fragment"),tC=Object.prototype.hasOwnProperty,nC=Xk.__SECRET_INT
vendor: 11,442 bytes, lines 18-35
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rC={key:!0,ref:!0,__self:!0,__source:!0};function nw(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)tC.call(t,r)&&!rC.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Zk,type:e,key:o,ref:i,props:s,_owner:nC.current}}wu.Fragment=eC;wu.jsx=nw;wu.jsxs=nw;q0.exports=wu;var l=q0.exports,rw={exports:{}},on={},sw={exports:{}},ow={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(R,C){var $=R.length;R.push(C);e:for(;0<$;){var te=$-1>>>1,Z=R[te];if(0<s(Z,C))R[te]=C,R[$]=Z,$=te;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var C=R[0],$=R.pop();if($!==C){R[0]=$;e:for(var te=0,Z=R.length,ue=Z>>>1;te<ue;){var fe=2*(te+1)-1,he=R[fe],xe=fe+1,ge=R[xe];if(0>s(he,$))xe<Z&&0>s(ge,he)?(R[te]=ge,R[xe]=$,te=xe):(R[te]=he,R[fe]=$,te=fe);else if(xe<Z&&0>s(ge,$))R[te]=ge,R[xe]=$,te=xe;else break e}}return C}function s(R,C){var $=R.sortIndex-C.sortIndex;return $!==0?$:R.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var c=[],u=[],d=1,h=null,m=3,p=!1,b=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,y=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 w(R){for(var C=n(u);C!==null;){if(C.callback===null)r(u);else if(C.startTime<=R)r(u),C.sortIndex=C.expirationTime,t(c,C);else break;C=n(u)}}function _(R){if(v=!1,w(R),!b)if(n(c)!==null)b=!0,W(S);else{var C=n(u);C!==null&&X(_,C.startTime-R)}}function S(R,C){b=!1,v&&(v=!1,y(j),j=-1),p=!0;var $=m;try{for(w(C),h=n(c);h!==null&&(!(h.expirationTime>C)||R&&!H());){var te=h.callback;if(typeof te=="function"){h.callback=null,m=h.priorityLevel;var Z=te(h.expirationTime<=C);C=e.unstable_now(),typeof Z=="function"?h.callback=Z:h===n(c)&&r(c),w(C)}else r(c);h=n(c)}if(h!==null)var ue=!0;else{var fe=n(u);fe!==null&&X(_,fe.startTime-C),ue=!1}return ue}finally{h=null,m=$,p=!1}}var k=!1,E=null,j=-1,A=5,O=-1;function H(){return!(e.unstable_now()-O<A)}function K(){if(E!==null){var R=e.unstable_now();O=R;var C=!0;try{C=E(!0,R)}finally{C?J():(k=!1,E=null)}}else k=!1}var J;if(typeof g=="function")J=function(){g(K)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,le=U.port2;U.port1.onmessage=K,J=function(){le.postMessage(null)}}else J=function(){x(K,0)};function W(R){E=R,k||(k=!0,J())}function X(R,C){j=x(function(){R(e.unstable_now())},C)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){b||p||(b=!0,W(S))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var C=3;break;default:C=m}var $=m;m=C;try{return R()}finally{m=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,C){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var $=m;m=R;try{return C()}finally{m=$}},e.unstable_scheduleCallback=function(R,C,$){var te=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?te+$:te):$=te,R){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=$+Z,R={id:d++,callback:C,priorityLevel:R,startTime:$,expirationTime:Z,sortIndex:-1},$>te?(R.sortIndex=$,t(u,R),n(c)===null&&R===n(u)&&(v?(y(j),j=-1):v=!0,X(_,$-te))):(R.sortIndex=Z,t(c,R),b||p||(b=!0,W(S))),R},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(R){var C=m;return function(){var $=m;m=C;try{return R.apply(this,arguments)}finally{m=$}}}})(ow);sw.exports=ow;var sC=sw.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var oC=f,rn=sC;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var iw=new Set,ca={};function Js(e,t){ei(e,t),ei(e+"Capture",t)}function ei(e,t){for(ca[e]=t,e=0;e<t.length;e++)iw.add(t[e])}var br=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rf=Object.prototype.hasOwnProperty,iC=/^[: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]*$/,kg={},Cg={};function aC(e){return Rf.call(Cg,e)?!0:Rf.call(kg,e)?!1:iC.test(e)?Cg[e]=!0:(kg[e]=!0,!1)}function lC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cC(e,t,n,r){if(t===null||typeof t>"u"||lC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Dt(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Dt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Dt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Dt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Dt(e,2,!1,e,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(e){bt[e]=new Dt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Dt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Dt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Dt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Dt(e,5,!1,e.toLowerCase(),null,!1,!1)});var xp=/[\-:]([a-z])/g;function bp(e){return e[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(e){var t=e.replace(xp,bp);bt[t]=new Dt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xp,bp);bt[t]=new Dt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xp,bp);bt[t]=new Dt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Dt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Dt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Dt(e,1,!1,e.toLowerCase(),null,!0,!0)});function _p(e,t,n,r){var s=bt.hasOwnProperty(t)?bt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(cC(t,n,s,r)&&(n=null),r||s===null?aC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var jr=oC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vl=Symbol.for("react.element"),xo=Symbol.for("react.portal"),bo=Symbol.for("react.fragment"),Sp=Symbol.for("react.strict_mode"),Af=Symbol.for("react.profiler"),aw=Symbol.for("react.provider"),lw=Symbol.for("react.context"),Ep=Symbol.for("react.forward_ref"),Pf=Symbol.for("react.suspense"),Of=Symbol.for("react.suspense_list"),kp=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),cw=Symbol.for("react.offscreen"),jg=Symbol.iterator;function ji(e){return e===null||typeof e!="object"?null:(e=jg&&e[jg]||e["@@iterator"],typeof e=="function"?e:null)}var Ye=Object.assign,_d;function Wi(e){if(_d===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_d=t&&t[1]||""}return` 35`+_d+e}var Sd=!1;function Ed(e,t){if(!e||Sd)return"";Sd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 15,597 bytes, lines 35-38
35catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),o=r.stack.split(` 37`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var c=` 38`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{Sd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wi(e):""}function uC(e){switch(e.tag){case 5:return Wi(e.type);case 16:return Wi("Lazy");case 13:return Wi("Suspense");case 19:return Wi("SuspenseList");case 0:case 2:case 15:return e=Ed(e.type,!1),e;case 11:return e=Ed(e.type.render,!1),e;case 1:return e=Ed(e.type,!0),e;default:return""}}function If(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bo:return"Fragment";case xo:return"Portal";case Af:return"Profiler";case Sp:return"StrictMode";case Pf:return"Suspense";case Of:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lw:return(e.displayName||"Context")+".Consumer";case aw:return(e._context.displayName||"Context")+".Provider";case Ep:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kp:return t=e.displayName||null,t!==null?t:If(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return If(e(t))}catch{}}return null}function dC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return If(t);case 8:return t===Sp?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ls(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fC(e){var t=uw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yl(e){e._valueTracker||(e._valueTracker=fC(e))}function dw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=uw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Df(e,t){var n=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ng(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ls(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function fw(e,t){t=t.checked,t!=null&&_p(e,"checked",t,!1)}function Lf(e,t){fw(e,t);var n=ls(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mf(e,t.type,ls(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mf(e,t,n){(t!=="number"||Nc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vi=Array.isArray;function Oo(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ls(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function $f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return Ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Rg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if(Vi(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ls(n)}}function hw(e,t){var n=ls(t.value),r=ls(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ag(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function pw(e){switch(e){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 Ff(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?pw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wl,mw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wl=wl||document.createElement("div"),wl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ua(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qi={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},hC=["Webkit","ms","Moz","O"];Object.keys(Qi).forEach(function(e){hC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qi[t]=Qi[e]})});function gw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qi.hasOwnProperty(e)&&Qi[e]?(""+t).trim():t+"px"}function vw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=gw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var pC=Ye({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 Uf(e,t){if(t){if(pC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function zf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bf=null;function Cp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wf=null,Io=null,Do=null;function Pg(e){if(e=Ga(e)){if(typeof Wf!="function")throw Error(V(280));var t=e.stateNode;t&&(t=ku(t),Wf(e.stateNode,e.type,t))}}function yw(e){Io?Do?Do.push(e):Do=[e]:Io=e}function ww(){if(Io){var e=Io,t=Do;if(Do=Io=null,Pg(e),t)for(e=0;e<t.length;e++)Pg(t[e])}}function xw(e,t){return e(t)}function bw(){}var kd=!1;function _w(e,t,n){if(kd)return e(t,n);kd=!0;try{return xw(e,t,n)}finally{kd=!1,(Io!==null||Do!==null)&&(bw(),ww())}}function da(e,t){var n=e.stateNode;if(n===null)return null;var r=ku(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var Vf=!1;if(br)try{var Ni={};Object.defineProperty(Ni,"passive",{get:function(){Vf=!0}}),window.addEventListener("test",Ni,Ni),window.removeEventListener("test",Ni,Ni)}catch{Vf=!1}function mC(e,t,n,r,s,o,i,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Xi=!1,Tc=null,Rc=!1,Hf=null,gC={onError:function(e){Xi=!0,Tc=e}};function vC(e,t,n,r,s,o,i,a,c){Xi=!1,Tc=null,mC.apply(gC,arguments)}function yC(e,t,n,r,s,o,i,a,c){if(vC.apply(this,arguments),Xi){if(Xi){var u=Tc;Xi=!1,Tc=null}else throw Error(V(198));Rc||(Rc=!0,Hf=u)}}function Qs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Sw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Og(e){if(Qs(e)!==e)throw Error(V(188))}function wC(e){var t=e.alternate;if(!t){if(t=Qs(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Og(s),e;if(o===r)return Og(s),t;o=o.sibling}throw Error(V(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(V(189))}}if(n.alternate!==r)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function Ew(e){return e=wC(e),e!==null?kw(e):null}function kw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kw(e);if(t!==null)return t;e=e.sibling}return null}var Cw=rn.unstable_scheduleCallback,Ig=rn.unstable_cancelCallback,xC=rn.unstable_shouldYield,bC=rn.unstable_requestPaint,nt=rn.unstable_now,_C=rn.unstable_getCurrentPriorityLevel,jp=rn.unstable_ImmediatePriority,jw=rn.unstable_UserBlockingPriority,Ac=rn.unstable_NormalPriority,SC=rn.unstable_LowPriority,Nw=rn.unstable_IdlePriority,bu=null,Zn=null;function EC(e){if(Zn&&typeof Zn.onCommitFiberRoot=="function")try{Zn.onCommitFiberRoot(bu,e,void 0,(e.current.flags&128)===128)}catch{}}var Mn=Math.clz32?Math.clz32:jC,kC=Math.log,CC=Math.LN2;function jC(e){return e>>>=0,e===0?32:31-(kC(e)/CC|0)|0}var xl=64,bl=4194304;function Hi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Hi(a):(o&=i,o!==0&&(r=Hi(o)))}else i=n&~s,i!==0?r=Hi(i):o!==0&&(r=Hi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mn(t),s=1<<n,r|=e[n],t&=~s;return r}function NC(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 TC(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Mn(o),a=1<<i,c=s[i];c===-1?(!(a&n)||a&r)&&(s[i]=NC(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function qf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Tw(){var e=xl;return xl<<=1,!(xl&4194240)&&(xl=64),e}function Cd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mn(t),e[t]=n}function RC(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Mn(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Np(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Oe=0;function Rw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Aw,Tp,Pw,Ow,Iw,Kf=!1,_l=[],Xr=null,Zr=null,es=null,fa=new Map,ha=new Map,zr=[],AC="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 Dg(e,t){switch(e){case"focusin":case"focusout":Xr=null;break;case"dragenter":case"dragleave":Zr=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":fa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ha.delete(t.pointerId)}}function Ti(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Ga(t),t!==null&&Tp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 1,155 bytes, line 38
38function PC(e,t,n,r,s){switch(t){case"focusin":return Xr=Ti(Xr,e,t,n,r,s),!0;case"dragenter":return Zr=Ti(Zr,e,t,n,r,s),!0;case"mouseover":return es=Ti(es,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return fa.set(o,Ti(fa.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,ha.set(o,Ti(ha.get(o)||null,e,t,n,r,s)),!0}return!1}function Dw(e){var t=Ns(e.target);if(t!==null){var n=Qs(t);if(n!==null){if(t=n.tag,t===13){if(t=Sw(n),t!==null){e.blockedOn=t,Iw(e.priority,function(){Pw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bf=r,n.target.dispatchEvent(r),Bf=null}else return t=Ga(n),t!==null&&Tp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lg(e,t,n){sc(e)&&n.delete(t)}function OC(){Kf=!1,Xr!==null&&sc(Xr)&&(Xr=null),Zr!==null&&sc(Zr)&&(Zr=null),es!==null&&sc(es)&&(es=null),fa.forEach(Lg),ha.forEac
vendor: 11,826 bytes, line 38
38h(Lg)}function Ri(e,t){e.blockedOn===t&&(e.blockedOn=null,Kf||(Kf=!0,rn.unstable_scheduleCallback(rn.unstable_NormalPriority,OC)))}function pa(e){function t(s){return Ri(s,e)}if(0<_l.length){Ri(_l[0],e);for(var n=1;n<_l.length;n++){var r=_l[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xr!==null&&Ri(Xr,e),Zr!==null&&Ri(Zr,e),es!==null&&Ri(es,e),fa.forEach(t),ha.forEach(t),n=0;n<zr.length;n++)r=zr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<zr.length&&(n=zr[0],n.blockedOn===null);)Dw(n),n.blockedOn===null&&zr.shift()}var Lo=jr.ReactCurrentBatchConfig,Oc=!0;function IC(e,t,n,r){var s=Oe,o=Lo.transition;Lo.transition=null;try{Oe=1,Rp(e,t,n,r)}finally{Oe=s,Lo.transition=o}}function DC(e,t,n,r){var s=Oe,o=Lo.transition;Lo.transition=null;try{Oe=4,Rp(e,t,n,r)}finally{Oe=s,Lo.transition=o}}function Rp(e,t,n,r){if(Oc){var s=Gf(e,t,n,r);if(s===null)Ld(e,t,r,Ic,n),Dg(e,r);else if(PC(s,e,t,n,r))r.stopPropagation();else if(Dg(e,r),t&4&&-1<AC.indexOf(e)){for(;s!==null;){var o=Ga(s);if(o!==null&&Aw(o),o=Gf(e,t,n,r),o===null&&Ld(e,t,r,Ic,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}var Ic=null;function Gf(e,t,n,r){if(Ic=null,e=Cp(r),e=Ns(e),e!==null)if(t=Qs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Sw(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ic=e,null}function Lw(e){switch(e){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(_C()){case jp:return 1;case jw:return 4;case Ac:case SC:return 16;case Nw:return 536870912;default:return 16}default:return 16}}var Yr=null,Ap=null,oc=null;function Mw(){if(oc)return oc;var e,t=Ap,n=t.length,r,s="value"in Yr?Yr.value:Yr.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return oc=s.slice(e,1<r?1-r:void 0)}function ic(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sl(){return!0}function Mg(){return!1}function an(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Sl:Mg,this.isPropagationStopped=Mg,this}return Ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Sl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sl)},persist:function(){},isPersistent:Sl}),t}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pp=an(pi),Ka=Ye({},pi,{view:0,detail:0}),LC=an(Ka),jd,Nd,Ai,_u=Ye({},Ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Op,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ai&&(Ai&&e.type==="mousemove"?(jd=e.screenX-Ai.screenX,Nd=e.screenY-Ai.screenY):Nd=jd=0,Ai=e),jd)},movementY:function(e){return"movementY"in e?e.movementY:Nd}}),$g=an(_u),MC=Ye({},_u,{dataTransfer:0}),$C=an(MC),FC=Ye({},Ka,{relatedTarget:0}),Td=an(FC),UC=Ye({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),zC=an(UC),BC=Ye({},pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),WC=an(BC),VC=Ye({},pi,{data:0}),Fg=an(VC),HC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qC={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"},KC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=KC[e])?!!t[e]:!1}function Op(){return GC}var YC=Ye({},Ka,{key:function(e){if(e.key){var t=HC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ic(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Op,charCode:function(e){return e.type==="keypress"?ic(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ic(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),JC=an(YC),QC=Ye({},_u,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ug=an(QC),XC=Ye({},Ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Op}),ZC=an(XC),ej=Ye({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),tj=an(ej),nj=Ye({},_u,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),rj=an(nj),sj=[9,13,27,32],Ip=br&&"CompositionEvent"in window,Zi=null;br&&"documentMode"in document&&(Zi=document.documentMode);var oj=br&&"TextEvent"in window&&!Zi,$w=br&&(!Ip||Zi&&8<Zi&&11>=Zi),zg=" ",Bg=!1;function Fw(e,t){switch(e){case"keyup":return sj.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _o=!1;function ij(e,t){switch(e){case"compositionend":return Uw(t);case"keypress":return t.which!==32?null:(Bg=!0,zg);case"textInput":return e=t.data,e===zg&&Bg?null:e;default:return null}}function aj(e,t){if(_o)return e==="compositionend"||!Ip&&Fw(e,t)?(e=Mw(),oc=Ap=Yr=null,_o=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $w&&t.locale!=="ko"?null:t.data;default:return null}}var lj={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 Wg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lj[e.type]:t==="textarea"}function zw(e,t,n,r){yw(r),t=Dc(t,"onChange"),0<t.length&&(n=new Pp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ea=null,ma=null;function cj(e){Xw(e,0)}function Su(e){var t=ko(e);if(dw(t))return e}function uj(e,t){if(e==="change")return t}var Bw=!1;if(br){var Rd;if(br){var Ad="oninput"in document;if(!Ad){var Vg=document.createElement("div");Vg.setAttribute("oninput","return;"),Ad=typeof Vg.oninput=="function"}Rd=Ad}else Rd=!1;Bw=Rd&&(!document.documentMode||9<document.documentMode)}function Hg(){ea&&(ea.detachEvent("onpropertychange",Ww),ma=ea=null)}function Ww(e){if(e.propertyName==="value"&&Su(ma)){var t=[];zw(t,ma,e,Cp(e)),_w(cj,t)}}function dj(e,t,n){e==="focusin"?(Hg(),ea=t,ma=n,ea.attachEvent("onpropertychange",Ww)):e==="focusout"&&Hg()}function fj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Su(ma)}function hj(e,t){if(e==="click")return Su(t)}function pj(e,t){if(e==="input"||e==="change")return Su(t)}function mj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fn=typeof Object.is=="function"?Object.is:mj;function ga(e,t){if(Fn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Rf.call(t,s)||!Fn(e[s],t[s]))return!1}return!0}function qg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kg(e,t){var n=qg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qg(n)}}function Vw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hw(){for(var e=window,t=Nc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nc(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gj(e){var t=Hw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vw(n.ownerDocument.documentElement,n)){if(r!==null&&Dp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Kg(n,o);var i=Kg(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vj=br&&"documentMode"in document&&11>=document.documentMode,So=null,Yf=null,ta=null,Jf=!1;function Gg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jf||So==null||So!==Nc(r)||(r=So,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 38
38sNode:r.focusNode,focusOffset:r.focusOffset}),ta&&ga(ta,r)||(ta=r,r=Dc(Yf,"onSelect"),0<r.length&&(t=new Pp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=So)))}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Eo={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionend:El("Transition","TransitionEnd")},Pd={},qw={};br&&(qw=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function Eu(e){if(Pd[e])return Pd[e];if(!Eo[e])return e;var t=Eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qw)return Pd[e]=t[n];return e}var Kw=Eu("animationend"),Gw=Eu("animationiteration"),Yw=Eu("animationstart"),Jw=Eu("transitionend"),Qw=new Map,Yg="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 fs(e,t){Qw.set(e,t),Js(t,[e])}for(var Od=0;Od<Yg.length;Od++){var Id=Yg[Od],yj=Id.toLowerCase(),wj=Id[0].toUpperCase()+Id.slice(1);fs(yj,"on"+wj)}fs(Kw,"onAnimationEnd");fs(Gw,"onAnimationIteration");fs(Yw,"onAnimationStart");fs("dblclick","onDoubleClick");fs("focusin","onFocus");fs("focusout","onBlur");fs(Jw,"onTransitionEnd");ei("onMouseEnter",["mouseout","mouseover"]);ei("onMouseLeave",["mouseout","mouseover"]);ei("onPointerEnter",["pointerout","pointerover"]);ei("onPointerLeave",["pointerout","pointerover"]);Js("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Js("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Js("onBeforeInput",["compositionend","keypress","textInput","paste"]);Js("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Js("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Js("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qi="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(" "),xj=new Set("cancel close invalid load scroll toggle".split(" ").concat(qi));function Jg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,yC(r,t,void 0,e),e.currentTarget=null}function Xw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&s.isPropagationStopped())break e;Jg(s,a,u),o=c}else for(i=0;i<r.length;i++){if(a=r[i],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&s.isPropagationStopped())break e;Jg(s,a,u),o=c}}}if(Rc)throw e=Hf,Rc=!1,Hf=null,e}function ze(e,t){var n=t[th];n===void 0&&(n=t[th]=new Set);var r=e+"__bubble";n.has(r)||(Zw(t,e,2,!1),n.add(r))}function Dd(e,t,n){var r=0;t&&(r|=4),Zw(n,e,r,t)}var kl="_reactListening"+Math.random().toString(36).slice(2);function va(e){if(!e[kl]){e[kl]=!0,iw.forEach(function(n){n!=="selectionchange"&&(xj.has(n)||Dd(n,!1,e),Dd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kl]||(t[kl]=!0,Dd("selectionchange",!1,t))}}function Zw(e,t,n,r){switch(Lw(t)){case 1:var s=IC;break;case 4:s=DC;break;default:s=Rp}n=s.bind(null,t,n,e),s=void 0,!Vf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 4,454 bytes, line 38
38function Ld(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Ns(a),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}a=a.parentNode}}r=r.return}_w(function(){var u=o,d=Cp(n),h=[];e:{var m=Qw.get(e);if(m!==void 0){var p=Pp,b=e;switch(e){case"keypress":if(ic(n)===0)break e;case"keydown":case"keyup":p=JC;break;case"focusin":b="focus",p=Td;break;case"focusout":b="blur",p=Td;break;case"beforeblur":case"afterblur":p=Td;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=$g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=$C;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=ZC;break;case Kw:case Gw:case Yw:p=zC;break;case Jw:p=tj;break;case"scroll":p=LC;break;case"wheel":p=rj;break;case"copy":case"cut":case"paste":p=WC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ug}var v=(t&4)!==0,x=!v&&e==="scroll",y=v?m!==null?m+"Capture":null:m;v=[];for(var g=u,w;g!==null;){w=g;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,y!==null&&(_=da(g,y),_!=null&&v.push(ya(g,_,w)))),x)break;g=g.return}0<v.length&&(m=new p(m,b,null,n,d),h.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",m&&n!==Bf&&(b=n.relatedTarget||n.fromElement)&&(Ns(b)||b[_r]))break e;if((p||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,p?(b=n.relatedTarget||n.toElement,p=u,b=b?Ns(b):null,b!==null&&(x=Qs(b),b!==x||b.tag!==5&&b.tag!==6)&&(b=null)):(p=null,b=u),p!==b)){if(v=$g,_="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=Ug,_="onPointerLeave",y="onPointerEnter",g="pointer"),x=p==null?m:ko(p),w=b==null?m:ko(b),m=new v(_,g+"leave",p,n,d),m.target=x,m.relatedTarget=w,_=null,Ns(d)===u&&(v=new v(y,g+"enter",b,n,d),v.target=w,v.relatedTarget=x,_=v),x=_,p&&b)t:{for(v=p,y=b,g=0,w=v;w;w=so(w))g++;for(w=0,_=y;_;_=so(_))w++;for(;0<g-w;)v=so(v),g--;for(;0<w-g;)y=so(y),w--;for(;g--;){if(v===y||y!==null&&v===y.alternate)break t;v=so(v),y=so(y)}v=null}else v=null;p!==null&&Qg(h,m,p,v,!1),b!==null&&x!==null&&Qg(h,x,b,v,!0)}}e:{if(m=u?ko(u):window,p=m.nodeName&&m.nodeName.toLowerCase(),p==="select"||p==="input"&&m.type==="file")var S=uj;else if(Wg(m))if(Bw)S=pj;else{S=fj;var k=dj}else(p=m.nodeName)&&p.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(S=hj);if(S&&(S=S(e,u))){zw(h,S,n,d);break e}k&&k(e,m,u),e==="focusout"&&(k=m._wrapperState)&&k.controlled&&m.type==="number"&&Mf(m,"number",m.value)}switch(k=u?ko(u):window,e){case"focusin":(Wg(k)||k.contentEditable==="true")&&(So=k,Yf=u,ta=null);break;case"focusout":ta=Yf=So=null;break;case"mousedown":Jf=!0;break;case"contextmenu":case"mouseup":case"dragend":Jf=!1,Gg(h,n,d);break;case"selectionchange":if(vj)break;case"keydown":case"keyup":Gg(h,n,d)}var E;if(Ip)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else _o?Fw(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&($w&&n.locale!=="ko"&&(_o||j!=="onCompositionStart"?j==="onCompositionEnd"&&_o&&(E=Mw()):(Yr=d,Ap="value"in Yr?Yr.value:Yr.textContent,_o=!0)),k=Dc(u,j),0<k.length&&(j=new Fg(j,e,null,n,d),h.push({event:j,listeners:k}),E?j.data=E:(E=Uw(n),E!==null&&(j.data=E)))),(E=oj?ij(e,n):aj(e,n))&&(u=Dc(u,"onBeforeInput"),0<u.length&&(d=new Fg("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=E))}Xw(h,t)})}function ya(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=da(e,n),o!=null&&r.unshift(ya(e,o,s)),o=da(e,t),o!=null&&r.push(ya(e,o,s))),e=e.return}return r}function so(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}
vendor: 4,594 bytes, lines 38-39
38function Qg(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=da(n,o),c!=null&&i.unshift(ya(n,c,a))):s||(c=da(n,o),c!=null&&i.push(ya(n,c,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var bj=/\r\n?/g,_j=/\u0000|\uFFFD/g;function Xg(e){return(typeof e=="string"?e:""+e).replace(bj,` 39`).replace(_j,"")}function Cl(e,t,n){if(t=Xg(t),Xg(e)!==t&&n)throw Error(V(425))}function Lc(){}var Qf=null,Xf=null;function Zf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var eh=typeof setTimeout=="function"?setTimeout:void 0,Sj=typeof clearTimeout=="function"?clearTimeout:void 0,Zg=typeof Promise=="function"?Promise:void 0,Ej=typeof queueMicrotask=="function"?queueMicrotask:typeof Zg<"u"?function(e){return Zg.resolve(null).then(e).catch(kj)}:eh;function kj(e){setTimeout(function(){throw e})}function Md(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),pa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);pa(t)}function ts(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ev(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var mi=Math.random().toString(36).slice(2),Jn="__reactFiber$"+mi,wa="__reactProps$"+mi,_r="__reactContainer$"+mi,th="__reactEvents$"+mi,Cj="__reactListeners$"+mi,jj="__reactHandles$"+mi;function Ns(e){var t=e[Jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_r]||n[Jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ev(e);e!==null;){if(n=e[Jn])return n;e=ev(e)}return t}e=n,n=e.parentNode}return null}function Ga(e){return e=e[Jn]||e[_r],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ko(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function ku(e){return e[wa]||null}var nh=[],Co=-1;function hs(e){return{current:e}}function Be(e){0>Co||(e.current=nh[Co],nh[Co]=null,Co--)}function Fe(e,t){Co++,nh[Co]=e.current,e.current=t}var cs={},Nt=hs(cs),Bt=hs(!1),Ws=cs;function ti(e,t){var n=e.type.contextTypes;if(!n)return cs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Wt(e){return e=e.childContextTypes,e!=null}function Mc(){Be(Bt),Be(Nt)}function tv(e,t,n){if(Nt.current!==cs)throw Error(V(168));Fe(Nt,t),Fe(Bt,n)}function ex(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(V(108,dC(e)||"Unknown",s));return Ye({},n,r)}function $c(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cs,Ws=Nt.current,Fe(Nt,e),Fe(Bt,Bt.current),!0}function nv(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=ex(e,t,Ws),r.__reactInternalMemoizedMergedChildContext=e,Be(Bt),Be(Nt),Fe(Nt,e)):Be(Bt),Fe(Bt,n)}var mr=null,Cu=!1,$d=!1;function tx(e){mr===null?mr=[e]:mr.push(e)}function Nj(e){Cu=!0,tx(e)}function ps(){if(!$d&&mr!==null){$d=!0;var e=0,t=Oe;try{var n=mr;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}mr=null,Cu=!1}catch(s){throw mr!==null&&(mr=mr.slice(e+1)),Cw(jp,ps),s}finally{Oe=t,$d=!1}}return null}var jo=[],No=0,Fc=null,Uc=0,mn=[],gn=0,Vs=null,vr=1,yr="";function _s(e,t){jo[No++]=Uc,jo[No++]=Fc,Fc=e,Uc=t}function nx(e,t,n){mn[gn++]=vr,mn[gn++]=yr,mn[gn++]=Vs,Vs=e;var r=vr;e=yr;var s=32-Mn(r)-1;r&=~(1<<s),n+=1;var o=32-Mn(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,vr=1<<32-Mn(t)+s|n<<s|r,yr=o+e}else vr=1<<o|n<<s|r,yr=e}function Lp(e){e.return!==null&&(_s(e,1),nx(e,1,0))}function Mp(e){for(;e===Fc;)Fc=jo[--No],jo[No]=null,Uc=jo[--No],jo[No]=null;for(;e===Vs;)Vs=mn[--gn],mn[gn]=null,yr=mn[--gn],mn[gn]=null,vr=mn[--gn],mn[gn]=null}var en=null,Zt=null,Ve=!1,Dn=null;function rx(e,t){var n=vn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function rv(e,t){switch(e.tag){case 5:var n=e.type;
vendor: 4,805 bytes, line 39
39return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,en=e,Zt=ts(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,en=e,Zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vs!==null?{id:vr,overflow:yr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,en=e,Zt=null,!0):!1;default:return!1}}function rh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sh(e){if(Ve){var t=Zt;if(t){var n=t;if(!rv(e,t)){if(rh(e))throw Error(V(418));t=ts(n.nextSibling);var r=en;t&&rv(e,t)?rx(r,n):(e.flags=e.flags&-4097|2,Ve=!1,en=e)}}else{if(rh(e))throw Error(V(418));e.flags=e.flags&-4097|2,Ve=!1,en=e}}}function sv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;en=e}function jl(e){if(e!==en)return!1;if(!Ve)return sv(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zf(e.type,e.memoizedProps)),t&&(t=Zt)){if(rh(e))throw sx(),Error(V(418));for(;t;)rx(e,t),t=ts(t.nextSibling)}if(sv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Zt=ts(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Zt=null}}else Zt=en?ts(e.stateNode.nextSibling):null;return!0}function sx(){for(var e=Zt;e;)e=ts(e.nextSibling)}function ni(){Zt=en=null,Ve=!1}function $p(e){Dn===null?Dn=[e]:Dn.push(e)}var Tj=jr.ReactCurrentBatchConfig;function Pi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(V(309));var r=n.stateNode}if(!r)throw Error(V(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(V(284));if(!n._owner)throw Error(V(290,e))}return e}function Nl(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ov(e){var t=e._init;return t(e._payload)}function ox(e){function t(y,g){if(e){var w=y.deletions;w===null?(y.deletions=[g],y.flags|=16):w.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function s(y,g){return y=os(y,g),y.index=0,y.sibling=null,y}function o(y,g,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<g?(y.flags|=2,g):w):(y.flags|=2,g)):(y.flags|=1048576,g)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,g,w,_){return g===null||g.tag!==6?(g=Hd(w,y.mode,_),g.return=y,g):(g=s(g,w),g.return=y,g)}function c(y,g,w,_){var S=w.type;return S===bo?d(y,g,w.props.children,_,w.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===$r&&ov(S)===g.type)?(_=s(g,w.props),_.ref=Pi(y,g,w),_.return=y,_):(_=hc(w.type,w.key,w.props,null,y.mode,_),_.ref=Pi(y,g,w),_.return=y,_)}function u(y,g,w,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=qd(w,y.mode,_),g.return=y,g):(g=s(g,w.children||[]),g.return=y,g)}function d(y,g,w,_,S){return g===null||g.tag!==7?(g=Us(w,y.mode,_,S),g.return=y,g):(g=s(g,w),g.return=y,g)}function h(y,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Hd(""+g,y.mode,w),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case vl:return w=hc(g.type,g.key,g.props,null,y.mode,w),w.ref=Pi(y,null,g),w.return=y,w;case xo:return g=qd(g,y.mode,w),g.return=y,g;case $r:var _=g._init;return h(y,_(g._payload),w)}if(Vi(g)||ji(g))return g=Us(g,y.mode,w,null),g.return=y,g;Nl(y,g)}return null}function m(y,g,w,_){var S=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(y,g,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case vl:return w.key===S?c(y,g,w,_):null;case xo:return w.key===S?u(y,g,w,_):null;case $r:return S=w._init,m(y,g,S(w._payload),_)}if(Vi(w)||ji(w))return S!==null?null:d(y,g,w,_,null);Nl(y,w)}return null}function p(y,g,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(w)||null,a(g,y,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case vl:return y=y.get(_.key===null?w:_.key)||null,c(g,y,_,S);case xo:return y=y.get(_.key===null?w:_.key)||null,u(g,y,_,S);case $r:var k=_._init;return p(y,g,w,k(_._payload),S)}if(Vi(_)||ji(_))return y=y.get(w)||null,d(g,y,_,S,null);Nl(g,_)}return null}function b(y,g,w,_){for(var S=null,k=null,E=g,j=g=0,A=null;E!==null&&j<w.length;
vendor: 2,338 bytes, line 39
39j++){E.index>j?(A=E,E=null):A=E.sibling;var O=m(y,E,w[j],_);if(O===null){E===null&&(E=A);break}e&&E&&O.alternate===null&&t(y,E),g=o(O,g,j),k===null?S=O:k.sibling=O,k=O,E=A}if(j===w.length)return n(y,E),Ve&&_s(y,j),S;if(E===null){for(;j<w.length;j++)E=h(y,w[j],_),E!==null&&(g=o(E,g,j),k===null?S=E:k.sibling=E,k=E);return Ve&&_s(y,j),S}for(E=r(y,E);j<w.length;j++)A=p(E,y,j,w[j],_),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?j:A.key),g=o(A,g,j),k===null?S=A:k.sibling=A,k=A);return e&&E.forEach(function(H){return t(y,H)}),Ve&&_s(y,j),S}function v(y,g,w,_){var S=ji(w);if(typeof S!="function")throw Error(V(150));if(w=S.call(w),w==null)throw Error(V(151));for(var k=S=null,E=g,j=g=0,A=null,O=w.next();E!==null&&!O.done;j++,O=w.next()){E.index>j?(A=E,E=null):A=E.sibling;var H=m(y,E,O.value,_);if(H===null){E===null&&(E=A);break}e&&E&&H.alternate===null&&t(y,E),g=o(H,g,j),k===null?S=H:k.sibling=H,k=H,E=A}if(O.done)return n(y,E),Ve&&_s(y,j),S;if(E===null){for(;!O.done;j++,O=w.next())O=h(y,O.value,_),O!==null&&(g=o(O,g,j),k===null?S=O:k.sibling=O,k=O);return Ve&&_s(y,j),S}for(E=r(y,E);!O.done;j++,O=w.next())O=p(E,y,j,O.value,_),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?j:O.key),g=o(O,g,j),k===null?S=O:k.sibling=O,k=O);return e&&E.forEach(function(K){return t(y,K)}),Ve&&_s(y,j),S}function x(y,g,w,_){if(typeof w=="object"&&w!==null&&w.type===bo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case vl:e:{for(var S=w.key,k=g;k!==null;){if(k.key===S){if(S=w.type,S===bo){if(k.tag===7){n(y,k.sibling),g=s(k,w.props.children),g.return=y,y=g;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===$r&&ov(S)===k.type){n(y,k.sibling),g=s(k,w.props),g.ref=Pi(y,k,w),g.return=y,y=g;break e}n(y,k);break}else t(y,k);k=k.sibling}w.type===bo?(g=Us(w.props.children,y.mode,_,w.key),g.return=y,y=g):(_=hc(w.type,w.key,w.props,null,y.mode,_),_.ref=Pi(y,g,w),_.return=y,y=_)}return i(y);case xo:e:{for(k=w.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(y,g.sibling),g=s(g,w.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=qd(w,y.mode,_),g.return=y,y=g}return i(y);case $r:return k=w._init,x(y,g,k(w._payload),_)}if(Vi(w))return b(y,g,w,_);
vendor: 8,314 bytes, line 39
39if(ji(w))return v(y,g,w,_);Nl(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,w),g.return=y,y=g):(n(y,g),g=Hd(w,y.mode,_),g.return=y,y=g),i(y)):n(y,g)}return x}var ri=ox(!0),ix=ox(!1),zc=hs(null),Bc=null,To=null,Fp=null;function Up(){Fp=To=Bc=null}function zp(e){var t=zc.current;Be(zc),e._currentValue=t}function oh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mo(e,t){Bc=e,Fp=To=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(zt=!0),e.firstContext=null)}function bn(e){var t=e._currentValue;if(Fp!==e)if(e={context:e,memoizedValue:t,next:null},To===null){if(Bc===null)throw Error(V(308));To=e,Bc.dependencies={lanes:0,firstContext:e}}else To=To.next=e;return t}var Ts=null;function Bp(e){Ts===null?Ts=[e]:Ts.push(e)}function ax(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Bp(t)):(n.next=s.next,s.next=n),t.interleaved=n,Sr(e,r)}function Sr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fr=!1;function Wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ns(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ne&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Sr(e,n)}return s=r.interleaved,s===null?(t.next=t,Bp(r)):(t.next=s.next,s.next=t),r.interleaved=t,Sr(e,n)}function ac(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Np(e,n)}}function iv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wc(e,t,n,r){var s=e.updateQueue;Fr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var h=s.baseState;i=0,d=u=c=null,a=o;do{var m=a.lane,p=a.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,v=a;switch(m=t,p=n,v.tag){case 1:if(b=v.payload,typeof b=="function"){h=b.call(p,h,m);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=v.payload,m=typeof b=="function"?b.call(p,h,m):b,m==null)break e;h=Ye({},h,m);break e;case 2:Fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else p={eventTime:p,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,i|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);qs|=i,e.lanes=i,e.memoizedState=h}}function av(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(V(191,s));s.call(r)}}}var Ya={},er=hs(Ya),xa=hs(Ya),ba=hs(Ya);function Rs(e){if(e===Ya)throw Error(V(174));return e}function Vp(e,t){switch(Fe(ba,t),Fe(xa,e),Fe(er,Ya),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ff(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ff(t,e)}Be(er),Fe(er,t)}function si(){Be(er),Be(xa),Be(ba)}function cx(e){Rs(ba.current);var t=Rs(er.current),n=Ff(t,e.type);t!==n&&(Fe(xa,e),Fe(er,n))}function Hp(e){xa.current===e&&(Be(er),Be(xa))}var Ke=hs(0);function Vc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fd=[];function qp(){for(var e=0;e<Fd.length;e++)Fd[e]._workInProgressVersionPrimary=null;Fd.length=0}var lc=jr.ReactCurrentDispatcher,Ud=jr.ReactCurrentBatchConfig,Hs=0,Ge=null,ft=null,pt=null,Hc=!1,na=!1,_a=0,Rj=0;function Et(){throw Error(V(321))}function Kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fn(e[n],t[n]))return!1;return!0}function Gp(e,t,n,r,s,o){if(Hs=o,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,lc.current=e===null||e.memoizedState===null?Ij:Dj,e=n(r,s),na){o=0;do{if(na=!1,_a=0,25<=o)throw Error(V(301));o+=1,pt=ft=null,t.updateQueue=null,lc.current=Lj,e=n(r,s)}while(na)}if(lc.current=qc,t=ft!==null&&ft.next!==null,Hs=0,pt=ft=Ge=null,Hc=!1,t)throw Error(V(300));return e}function Yp(){var e=_a!==0;return _a=0,e}function qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ge.memoizedState=pt=e:pt=pt.next=e,pt}function _n(){if(ft===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=pt===null?Ge.memoizedState:pt.next;if(t!==null)pt=t,ft=e;else{if(e===null)throw Error(V(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},pt===null?Ge.memoizedState=pt=e:pt=pt.next=e}return pt}function Sa(e,t){return typeof t=="function"?t(e):t}function zd(e){var t=_n(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=ft,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,c=null,u=o;do{var d=u.lane;if((Hs&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=h,i=r):c=c.next=h,Ge.lanes|=d,qs|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=a,Fn(r,t.memoizedState)||(zt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Ge.lanes|=o,qs|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bd(e){var t=_n(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Fn(o,t.memoizedState)||(zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ux(){}function dx(e,t){var n=Ge,r=_n(),s=t(),o=!Fn(r.memoizedState,s);if(o&&(r.memoizedState=s,zt=!0),r=r.queue,Jp(px.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,Ea(9,hx.bind(null,n,r,s,t),void 0,null),mt===null)throw Error(V(349));Hs&30||fx(n,t,s)}return s}function fx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hx(e,t,n,r){t.value=n,t.getSnapshot=r,mx(t)&&gx(e)}
vendor: 5,411 bytes, line 39
39function px(e,t,n){return n(function(){mx(t)&&gx(e)})}function mx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fn(e,n)}catch{return!0}}function gx(e){var t=Sr(e,1);t!==null&&$n(t,e,1,-1)}function lv(e){var t=qn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t.queue=e,e=e.dispatch=Oj.bind(null,Ge,e),[t.memoizedState,e]}function Ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function vx(){return _n().memoizedState}function cc(e,t,n,r){var s=qn();Ge.flags|=e,s.memoizedState=Ea(1|t,n,void 0,r===void 0?null:r)}function ju(e,t,n,r){var s=_n();r=r===void 0?null:r;var o=void 0;if(ft!==null){var i=ft.memoizedState;if(o=i.destroy,r!==null&&Kp(r,i.deps)){s.memoizedState=Ea(t,n,o,r);return}}Ge.flags|=e,s.memoizedState=Ea(1|t,n,o,r)}function cv(e,t){return cc(8390656,8,e,t)}function Jp(e,t){return ju(2048,8,e,t)}function yx(e,t){return ju(4,2,e,t)}function wx(e,t){return ju(4,4,e,t)}function xx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bx(e,t,n){return n=n!=null?n.concat([e]):null,ju(4,4,xx.bind(null,t,e),n)}function Qp(){}function _x(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sx(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ex(e,t,n){return Hs&21?(Fn(n,t)||(n=Tw(),Ge.lanes|=n,qs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,zt=!0),e.memoizedState=n)}function Aj(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=Ud.transition;Ud.transition={};try{e(!1),t()}finally{Oe=n,Ud.transition=r}}function kx(){return _n().memoizedState}function Pj(e,t,n){var r=ss(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cx(e))jx(t,n);else if(n=ax(e,t,n,r),n!==null){var s=Ot();$n(n,e,r,s),Nx(n,t,r)}}function Oj(e,t,n){var r=ss(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cx(e))jx(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,Fn(a,i)){var c=t.interleaved;c===null?(s.next=s,Bp(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=ax(e,t,s,r),n!==null&&(s=Ot(),$n(n,e,r,s),Nx(n,t,r))}}function Cx(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function jx(e,t){na=Hc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Np(e,n)}}var qc={readContext:bn,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},Ij={readContext:bn,useCallback:function(e,t){return qn().memoizedState=[e,t===void 0?null:t],e},useContext:bn,useEffect:cv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cc(4194308,4,xx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cc(4194308,4,e,t)},useInsertionEffect:function(e,t){return cc(4,2,e,t)},useMemo:function(e,t){var n=qn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Pj.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=qn();return e={current:e},t.memoizedState=e},useState:lv,useDebugValue:Qp,useDeferredValue:function(e){return qn().memoizedState=e},useTransition:function(){var e=lv(!1),t=e[0];return e=Aj.bind(null,e[1]),qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,s=qn();if(Ve){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),mt===null)throw Error(V(349));Hs&30||fx(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,cv(px.bind(null,r,o,e),[e]),r.flags|=2048,Ea(9,hx.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=qn(),t=mt.identifierPrefix;if(Ve){var n=yr,r=vr;n=(r&~(1<<32-Mn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_a++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Rj++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Dj={readContext:bn,useCallback:_x,useContext:bn,useEffect:Jp,useImperativeHandle:bx,useInsertionEffect:yx,useLayoutEffect:wx,useMemo:Sx,useReducer:zd,useRef:vx,useState:function(){return zd(Sa)},useDebugValue:Qp,useDeferredValue:function(e){var t=_n();return Ex(t,ft.memoizedState,e)},useTransition:function(){var e=zd(Sa)[0],t=_n().memoizedState;return[e,t]},useMutableSource:ux,useSyncExternalStore:dx,useId:kx,unstable_isNewReconciler:!1},Lj={readContext:bn,useCallback:_x,useContext:bn,useEffect:Jp,useImperativeHandle:bx,useInsertionEffect:yx,useLayoutEffect:wx,useMemo:Sx,useReducer:Bd,useRef
vendor: 4,086 bytes, lines 39-41
39:vx,useState:function(){return Bd(Sa)},useDebugValue:Qp,useDeferredValue:function(e){var t=_n();return ft===null?t.memoizedState=e:Ex(t,ft.memoizedState,e)},useTransition:function(){var e=Bd(Sa)[0],t=_n().memoizedState;return[e,t]},useMutableSource:ux,useSyncExternalStore:dx,useId:kx,unstable_isNewReconciler:!1};function Nn(e,t){if(e&&e.defaultProps){t=Ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ih(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nu={isMounted:function(e){return(e=e._reactInternals)?Qs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ot(),s=ss(e),o=wr(r,s);o.payload=t,n!=null&&(o.callback=n),t=ns(e,o,s),t!==null&&($n(t,e,s,r),ac(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ot(),s=ss(e),o=wr(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ns(e,o,s),t!==null&&($n(t,e,s,r),ac(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ot(),r=ss(e),s=wr(n,r);s.tag=2,t!=null&&(s.callback=t),t=ns(e,s,r),t!==null&&($n(t,e,r,n),ac(t,e,r))}};function uv(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!ga(n,r)||!ga(s,o):!0}function Tx(e,t,n){var r=!1,s=cs,o=t.contextType;return typeof o=="object"&&o!==null?o=bn(o):(s=Wt(t)?Ws:Nt.current,r=t.contextTypes,o=(r=r!=null)?ti(e,s):cs),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Nu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function dv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Nu.enqueueReplaceState(t,t.state,null)}function ah(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Wp(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=bn(o):(o=Wt(t)?Ws:Nt.current,s.context=ti(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ih(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Nu.enqueueReplaceState(s,s.state,null),Wc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function oi(e,t){try{var n="",r=t;do n+=uC(r),r=r.return;while(r);var s=n}catch(o){s=` 40Error generating stack: `+o.message+` 41`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Wd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function lh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Mj=typeof WeakMap=="function"?WeakMap:Map;function Rx(e,t,n){n=wr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gc||(Gc=!0,yh=r),lh(e,t)},n}function Ax(e,t,n){n=wr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){lh(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){lh(e,t),typeof r!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function fv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Mj;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Qj.bind(null,e,t,n),t.then(e,e))}function hv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}
vendor: 10,782 bytes, line 41
41function pv(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wr(-1,1),t.tag=2,ns(n,t,1))),n.lanes|=1),e)}var $j=jr.ReactCurrentOwner,zt=!1;function At(e,t,n,r){t.child=e===null?ix(t,null,n,r):ri(t,e.child,n,r)}function mv(e,t,n,r,s){n=n.render;var o=t.ref;return Mo(t,s),r=Gp(e,t,n,r,o,s),n=Yp(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Er(e,t,s)):(Ve&&n&&Lp(t),t.flags|=1,At(e,t,r,s),t.child)}function gv(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!om(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Px(e,t,o,r,s)):(e=hc(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:ga,n(i,r)&&e.ref===t.ref)return Er(e,t,s)}return t.flags|=1,e=os(o,r),e.ref=t.ref,e.return=t,t.child=e}function Px(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(ga(o,r)&&e.ref===t.ref)if(zt=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(zt=!0);else return t.lanes=e.lanes,Er(e,t,s)}return ch(e,t,n,r,s)}function Ox(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(Ao,Jt),Jt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fe(Ao,Jt),Jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Fe(Ao,Jt),Jt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Fe(Ao,Jt),Jt|=r;return At(e,t,s,n),t.child}function Ix(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ch(e,t,n,r,s){var o=Wt(n)?Ws:Nt.current;return o=ti(t,o),Mo(t,s),n=Gp(e,t,n,r,o,s),r=Yp(),e!==null&&!zt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Er(e,t,s)):(Ve&&r&&Lp(t),t.flags|=1,At(e,t,n,s),t.child)}function vv(e,t,n,r,s){if(Wt(n)){var o=!0;$c(t)}else o=!1;if(Mo(t,s),t.stateNode===null)uc(e,t),Tx(t,n,r),ah(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=bn(u):(u=Wt(n)?Ws:Nt.current,u=ti(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||c!==u)&&dv(t,i,r,u),Fr=!1;var m=t.memoizedState;i.state=m,Wc(t,r,i,s),c=t.memoizedState,a!==r||m!==c||Bt.current||Fr?(typeof d=="function"&&(ih(t,n,d,r),c=t.memoizedState),(a=Fr||uv(t,n,a,r,m,c,u))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,lx(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nn(t.type,a),i.props=u,h=t.pendingProps,m=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=bn(c):(c=Wt(n)?Ws:Nt.current,c=ti(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==h||m!==c)&&dv(t,i,r,c),Fr=!1,m=t.memoizedState,i.state=m,Wc(t,r,i,s);var b=t.memoizedState;a!==h||m!==b||Bt.current||Fr?(typeof p=="function"&&(ih(t,n,p,r),b=t.memoizedState),(u=Fr||uv(t,n,u,r,m,b,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,b,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,b,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),i.props=r,i.state=b,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return uh(e,t,n,r,o,s)}function uh(e,t,n,r,s,o){Ix(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&nv(t,n,!1),Er(e,t,o);r=t.stateNode,$j.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ri(t,e.child,null,o),t.child=ri(t,null,a,o)):At(e,t,a,o),t.memoizedState=r.state,s&&nv(t,n,!0),t.child}function Dx(e){var t=e.stateNode;t.pendingContext?tv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tv(e,t.context,!1),Vp(e,t.containerInfo)}function yv(e,t,n,r,s){return ni(),$p(s),t.flags|=256,At(e,t,n,r),t.child}var dh={dehydrated:null,treeContext:null,retryLane:0};function fh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lx(e,t,n){var r=t.pendingProps,s=Ke.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Fe(Ke,s&1),e===null)return sh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Au(i,r,0,null),e=Us(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=fh(n),t.memoizedState=dh,e):Xp(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Fj(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=os(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=os(a,o):(o=Us(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?fh(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=dh,r}return o=e.child,e=o.sibling,r=os(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xp(e,t){return t=Au({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,n,r){return r!==null&&$p(r),ri(t,e.child,null,n),e=Xp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fj(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Wd(Error(V(422))),Tl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Au({mode:"visible",children:r.children},s,0,null),o=Us(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ri(t,e.child,null,i),t.child.memoizedState=fh(i),t.memoizedState=dh,o);if(!(t.mode&1))return Tl(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(V(419)),r=Wd(o,r,void 0),Tl(e,t,i,r)}if(a=(i&e.childLanes)!==0,zt||a){if(r=mt,r!==null){switch(i&-i){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&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Sr(e,s),$n(r,e,s,-1))}return sm(),r=Wd(Error(V(421))),Tl(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Xj.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Zt=ts(s.nextSibling),en=t,Ve=!0,Dn=null,e!==null&&(mn[gn++]=vr,mn[gn++]=yr,mn[gn++]=Vs,vr=e.id,yr=e.overflow,Vs=t),t=Xp(t,r.children),t.flags|=4096,t)}function wv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),oh(e.return,t,n)}function Vd(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function Mx(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(At(e,t,r.children,n),r=Ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wv(e,n,t);else if(e.tag===19)wv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Fe(Ke,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Vc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Vd(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Vc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Vd(t,!0,n,null,o);break;case"together":Vd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=os(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=os(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Uj(e,t,n){switch(t.tag){case 3:Dx(t),ni();break;case 5:cx(t);break;case 1:Wt(t.type)&&$c(t);break;case 4:Vp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Fe(zc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Fe(Ke,Ke.current&1),t.flags|=128,null):n&t.child.childLanes?Lx(e,t,n):(Fe(Ke,Ke.current&1),e=Er(e,t,n),e!==null?e.sibling:null);Fe(Ke,Ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Mx(e,t,n
vendor: 4,730 bytes, line 41
41);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Fe(Ke,Ke.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return Er(e,t,n)}var $x,hh,Fx,Ux;$x=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hh=function(){};Fx=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Rs(er.current);var o=null;switch(n){case"input":s=Df(e,s),r=Df(e,r),o=[];break;case"select":s=Ye({},s,{value:void 0}),r=Ye({},r,{value:void 0}),o=[];break;case"textarea":s=$f(e,s),r=$f(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Lc)}Uf(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ca.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ca.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ze("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Ux=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oi(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function kt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zj(e,t,n){var r=t.pendingProps;switch(Mp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(t),null;case 1:return Wt(t.type)&&Mc(),kt(t),null;case 3:return r=t.stateNode,si(),Be(Bt),Be(Nt),qp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(jl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dn!==null&&(bh(Dn),Dn=null))),hh(e,t),kt(t),null;case 5:Hp(t);var s=Rs(ba.current);if(n=t.type,e!==null&&t.stateNode!=null)Fx(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(V(166));return kt(t),null}if(e=Rs(er.current),jl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Jn]=t,r[wa]=o,e=(t.mode&1)!==0,n){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(s=0;s<qi.length;s++)ze(qi[s],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":Ng(r,o),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ze("invalid",r);break;case"textarea":Rg(r,o),ze("invalid",r)}Uf(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Cl(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Cl(r.textContent,a,e),s=["children",""+a]):ca.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ze("scroll",r)}switch(n){case"input":yl(r),Tg(r,o,!0);break;case"textarea":yl(r),Ag(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Lc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=pw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>
41",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Jn]=t,e[wa]=r,$x(e,t,!1,!1),t.stateNode=e;e:{switch(i=zf(n,r),n){case"dialog":ze("cancel",e),ze("close",e),s=r;break;case"iframe":case"object":case"embed":ze("load",e),s=r;break;case"video":case"audio":for(s=0;s<qi.length;s++)ze(qi[s],e);s=r;break;case"source":ze("error",e),s=r;break;case"img":case"image":case"link":ze("error",e),ze("load",e),s=r;break;case"details":ze("toggle",e),s=r;break;case"input":Ng(e,r),s=Df(e,r),ze("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ye({},r,{value:void 0}),ze("invalid",e);break;case"textarea":Rg(e,r),s=$f(e,r),ze("invalid",e);break;default:s=r}Uf(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?vw(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&mw(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&ua(e,c):typeof c=="number"&&ua(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ca.hasOwnProperty(o)?c!=null&&o==="onScroll"&&ze("scroll",e):c!=null&&_p(e,o,c,i))}switch(n){case"input":yl(e),Tg(e,r,!1);break;case"textarea":yl(e),Ag(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ls(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Oo(e,!!r.multiple,o,!1):r.defaultValue!=null&&Oo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Lc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return kt(t),null;case 6:if(e&&t.stateNode!=null)Ux(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(V(166));if(n=Rs(ba.current),Rs(er.current),jl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Jn]=t,(o=r.nodeValue!==n)&&(e=en,e!==null))switch(e.tag){case 3:Cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Jn]=t,t.stateNode=r}return kt(t),null;case 13:if(Be(Ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&Zt!==null&&t.mode&1&&!(t.flags&128))sx(),ni(),t.flags|=98560,o=!1;else if(o=jl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(V(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(V(317));o[Jn]=t}else ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kt(t),o=!1}else Dn!==null&&(bh(Dn),Dn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ke.current&1?ht===0&&(ht=3):sm())),t.updateQueue!==null&&(t.flags|=4),kt(t),null);case 4:return si(),hh(e,t),e===null&&va(t.stateNode.containerInfo),kt(t),null;case 10:return zp(t.type._context),kt(t),null;case 17:return Wt(t.type)&&Mc(),kt(t),null;case 19:if(Be(Ke),o=t.memoizedState,o===null)return kt(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)Oi(o,!1);else{if(ht!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Vc(e),i!==null){for(t.flags|=128,Oi(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fe(Ke,Ke.current&1|2),t.child}e=e.sibling}o.tail!==null&&nt()>ii&&(t.flags|=128,r=!0,Oi(o,!1),t.lanes=4194304)}else{if(!r)if(e=Vc(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Ve)return kt(t),null}else 2*nt()-o.renderingStartTime>ii&&n!==1073741824&&(t.flags|=128,r=!0,Oi(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=nt(),t.sibling=null,n=Ke.current,Fe(Ke,r?n&1|2:n&1),t):(kt(t),null);case 22:case 23:return rm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Jt&1073741824&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Bj(e,t){switch(Mp(t),t.tag){case 1:return Wt(t.type)&&Mc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 23,211 bytes, line 41
41case 3:return si(),Be(Bt),Be(Nt),qp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Hp(t),null;case 13:if(Be(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(Ke),null;case 4:return si(),null;case 10:return zp(t.type._context),null;case 22:case 23:return rm(),null;case 24:return null;default:return null}}var Rl=!1,jt=!1,Wj=typeof WeakSet=="function"?WeakSet:Set,se=null;function Ro(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){et(e,t,r)}else n.current=null}function ph(e,t,n){try{n()}catch(r){et(e,t,r)}}var xv=!1;function Vj(e,t){if(Qf=Oc,e=Hw(),Dp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,c=-1,u=0,d=0,h=e,m=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(a=i+s),h!==o||r!==0&&h.nodeType!==3||(c=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(p=h.firstChild)!==null;)m=h,h=p;for(;;){if(h===e)break t;if(m===n&&++u===s&&(a=i),m===o&&++d===r&&(c=i),(p=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=p}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xf={focusedElem:e,selectionRange:n},Oc=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var v=b.memoizedProps,x=b.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:Nn(t.type,v),x);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(_){et(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return b=xv,xv=!1,b}function ra(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&ph(t,n,o)}s=s.next}while(s!==r)}}function Tu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zx(e){var t=e.alternate;t!==null&&(e.alternate=null,zx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[wa],delete t[th],delete t[Cj],delete t[jj])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bx(e){return e.tag===5||e.tag===3||e.tag===4}function bv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lc));else if(r!==4&&(e=e.child,e!==null))for(gh(e,t,n),e=e.sibling;e!==null;)gh(e,t,n),e=e.sibling}function vh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(vh(e,t,n),e=e.sibling;e!==null;)vh(e,t,n),e=e.sibling}var yt=null,On=!1;function Pr(e,t,n){for(n=n.child;n!==null;)Wx(e,t,n),n=n.sibling}function Wx(e,t,n){if(Zn&&typeof Zn.onCommitFiberUnmount=="function")try{Zn.onCommitFiberUnmount(bu,n)}catch{}switch(n.tag){case 5:jt||Ro(n,t);case 6:var r=yt,s=On;yt=null,Pr(e,t,n),yt=r,On=s,yt!==null&&(On?(e=yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):yt.removeChild(n.stateNode));break;case 18:yt!==null&&(On?(e=yt,n=n.stateNode,e.nodeType===8?Md(e.parentNode,n):e.nodeType===1&&Md(e,n),pa(e)):Md(yt,n.stateNode));break;case 4:r=yt,s=On,yt=n.stateNode.containerInfo,On=!0,Pr(e,t,n),yt=r,On=s;break;case 0:case 11:case 14:case 15:if(!jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ph(n,t,i),s=s.next}while(s!==r)}Pr(e,t,n);break;case 1:if(!jt&&(Ro(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){et(n,t,a)}Pr(e,t,n);break;case 21:Pr(e,t,n);break;case 22:n.mode&1?(jt=(r=jt)||n.memoizedState!==null,Pr(e,t,n),jt=r):Pr(e,t,n);break;default:Pr(e,t,n)}}function _v(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Wj),t.forEach(function(r){var s=Zj.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:yt=a.stateNode,On=!1;break e;case 3:yt=a.stateNode.containerInfo,On=!0;break e;case 4:yt=a.stateNode.containerInfo,On=!0;break e}a=a.return}if(yt===null)throw Error(V(160));Wx(o,i,s),yt=null,On=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){et(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Vx(t,e),t=t.sibling}function Vx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kn(t,e),Hn(e),r&4){try{ra(3,e,e.return),Tu(3,e)}catch(v){et(e,e.return,v)}try{ra(5,e,e.return)}catch(v){et(e,e.return,v)}}break;case 1:kn(t,e),Hn(e),r&512&&n!==null&&Ro(n,n.return);break;case 5:if(kn(t,e),Hn(e),r&512&&n!==null&&Ro(n,n.return),e.flags&32){var s=e.stateNode;try{ua(s,"")}catch(v){et(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&fw(s,o),zf(a,i);var u=zf(a,o);for(i=0;i<c.length;i+=2){var d=c[i],h=c[i+1];d==="style"?vw(s,h):d==="dangerouslySetInnerHTML"?mw(s,h):d==="children"?ua(s,h):_p(s,d,h,u)}switch(a){case"input":Lf(s,o);break;case"textarea":hw(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Oo(s,!!o.multiple,p,!1):m!==!!o.multiple&&(o.defaultValue!=null?Oo(s,!!o.multiple,o.defaultValue,!0):Oo(s,!!o.multiple,o.multiple?[]:"",!1))}s[wa]=o}catch(v){et(e,e.return,v)}}break;case 6:if(kn(t,e),Hn(e),r&4){if(e.stateNode===null)throw Error(V(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){et(e,e.return,v)}}break;case 3:if(kn(t,e),Hn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pa(t.containerInfo)}catch(v){et(e,e.return,v)}break;case 4:kn(t,e),Hn(e);break;case 13:kn(t,e),Hn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(tm=nt())),r&4&&_v(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(jt=(u=jt)||d,kn(t,e),jt=u):kn(t,e),Hn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(se=e,d=e.child;d!==null;){for(h=se=d;se!==null;){switch(m=se,p=m.child,m.tag){case 0:case 11:case 14:case 15:ra(4,m,m.return);break;case 1:Ro(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(v){et(r,n,v)}}break;case 5:Ro(m,m.return);break;case 22:if(m.memoizedState!==null){Ev(h);continue}}p!==null?(p.return=m,se=p):Ev(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=h.stateNode,c=h.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=gw("display",i))}catch(v){et(e,e.return,v)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(v){et(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:kn(t,e),Hn(e),r&4&&_v(e);break;case 21:break;default:kn(t,e),Hn(e)}}function Hn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Bx(n)){var r=n;break e}n=n.return}throw Error(V(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ua(s,""),r.flags&=-33);var o=bv(e);vh(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=bv(e);gh(e,a,i);break;default:throw Error(V(161))}}catch(c){et(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hj(e,t,n){se=e,Hx(e)}function Hx(e,t,n){for(var r=(e.mode&1)!==0;se!==null;){var s=se,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||Rl;if(!i){var a=s.alternate,c=a!==null&&a.memoizedState!==null||jt;a=Rl;var u=jt;if(Rl=i,(jt=c)&&!u)for(se=s;se!==null;)i=se,c=i.child,i.tag===22&&i.memoizedState!==null?kv(s):c!==null?(c.return=i,se=c):kv(s);for(;o!==null;)se=o,Hx(o),o=o.sibling;se=s,Rl=a,jt=u}Sv(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,se=o):Sv(e)}}function Sv(e){for(;se!==null;){var t=se;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:jt||Tu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!jt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Nn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&av(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}av(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&pa(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}jt||t.flags&512&&mh(t)}catch(m){et(t,t.return,m)}}if(t===e){se=null;break}if(n=t.sibling,n!==null){n.return=t.return,se=n;break}se=t.return}}function Ev(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var n=t.sibling;if(n!==null){n.return=t.return,se=n;break}se=t.return}}function kv(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tu(4,t)}catch(c){et(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){et(t,s,c)}}var o=t.return;try{mh(t)}catch(c){et(t,o,c)}break;case 5:var i=t.return;try{mh(t)}catch(c){et(t,i,c)}}}catch(c){et(t,t.return,c)}if(t===e){se=null;break}var a=t.sibling;if(a!==null){a.return=t.return,se=a;break}se=t.return}}var qj=Math.ceil,Kc=jr.ReactCurrentDispatcher,Zp=jr.ReactCurrentOwner,wn=jr.ReactCurrentBatchConfig,Ne=0,mt=null,ot=null,xt=0,Jt=0,Ao=hs(0),ht=0,ka=null,qs=0,Ru=0,em=0,sa=null,Ut=null,tm=0,ii=1/0,hr=null,Gc=!1,yh=null,rs=null,Al=!1,Jr=null,Yc=0,oa=0,wh=null,dc=-1,fc=0;function Ot(){return Ne&6?nt():dc!==-1?dc:dc=nt()}function ss(e){return e.mode&1?Ne&2&&xt!==0?xt&-xt:Tj.transition!==null?(fc===0&&(fc=Tw()),fc):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:Lw(e.type)),e):1}function $n(e,t,n,r){if(50<oa)throw oa=0,wh=null,Error(V(185));qa(e,n,r),(!(Ne&2)||e!==mt)&&(e===mt&&(!(Ne&2)&&(Ru|=n),ht===4&&Br(e,xt)),Vt(e,r),n===1&&Ne===0&&!(t.mode&1)&&(ii=nt()+500,Cu&&ps()))}function Vt(e,t){var n=e.callbackNode;TC(e,t);var r=Pc(e,e===mt?xt:0);if(r===0)n!==null&&Ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ig(n),t===1)e.tag===0?Nj(Cv.bind(null,e)):tx(Cv.bind(null,e)),Ej(function(){!(Ne&6)&&ps()}),n=null;else{switch(Rw(r)){case 1:n=jp;break;case 4:n=jw;break;case 16:n=Ac;break;case 536870912:n=Nw;break;default:n=Ac}n=Zx(n,qx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qx(e,t){if(dc=-1,fc=0,Ne&6)throw Error(V(327));var n=e.callbackNode;if($o()&&e.callbackNode!==n)return null;var r=Pc(e,e===mt?xt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Jc(e,r);else{t=r;var s=Ne;Ne|=2;var o=Gx();(mt!==e||xt!==t)&&(hr=null,ii=nt()+500,Fs(e,t));do try{Yj();break}catch(a){Kx(e,a)}while(!0);Up(),Kc.current=o,Ne=s,ot!==null?t=0:(mt=null,xt=0,t=ht)}if(t!==0){if(t===2&&(s=qf(e),s!==0&&(r=s,t=xh(e,s))),t===1)throw n=ka,Fs(e,0),Br(e,r),Vt(e,nt()),n;if(t===6)Br(e,r);else{if(s=e.current.alternate,!(r&30)&&!Kj(s)&&(t=Jc(e,r),t===2&&(o=qf(e),o!==0&&(r=o,t=xh(e,o))),t===1))throw n=ka,Fs(e,0),Br(e,r),Vt(e,nt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(V(345));case 2:Ss(e,Ut,hr);break;case 3:if(Br(e,r),(r&130023424)===r&&(t=tm+500-nt(),10<t)){if(Pc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ot(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=eh(Ss.bind(null,e,Ut,hr),t);break}Ss(e,Ut,hr);break;case 4:if(Br(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Mn(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=nt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qj(r/1960))-r,10<r){e.timeoutHandle=eh(Ss.bind(null,e,Ut,hr),r);break}Ss(e,Ut,hr);break;case 5:Ss(e,Ut,hr);break;default:throw Error(V(329))}}}return Vt(e,nt()),e.callbackNode===n?qx.bind(null,e):null}function xh(e,t){var n=sa;return e.current.memoizedState.isDehydrated&&(Fs(e,t).flags|=256),e=Jc(e,t),e!==2&&(t=Ut,Ut=n,t!==null&&bh(t)),e}function bh(e){Ut===null?Ut=e:Ut.push.apply(Ut,e)}function Kj(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Fn(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Br(e,t){for(t&=~em,t&=~Ru,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mn(t),r=1<<n;e[n]=-1,t&=~r}}function Cv(e){if(Ne&6)throw Error(V(327));$o();var t=Pc(e,0);if(!(t&1))return Vt(e,nt()),null;var n=Jc(e,t);if(e.tag!==0&&n===2){var r=qf(e);r!==0&&(t=r,n=xh(e,r))}if(n===1)throw n=ka,Fs(e,0),Br(e,t),Vt(e,nt()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ss(e,Ut,hr),Vt(e,nt()),null}function nm(e,t){var n=Ne;Ne|=1;try{return e(t)}finally{Ne=n,Ne===0&&(ii=nt()+500,Cu&&ps())}}function Ks(e){Jr!==null&&Jr.tag===0&&!(Ne&6)&&$o();var t=Ne;Ne|=1;var n=wn.transition,r=Oe;try{if(wn.transition=null,Oe=1,e)return e()}finally{Oe=r,wn.transition=n,Ne=t,!(Ne&6)&&ps()}}function rm(){Jt=Ao.current,Be(Ao)}function Fs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sj(n)),ot!==null)for(n=ot.return;n!==null;){var r=n;switch(Mp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Mc();break;case 3:si(),Be(Bt),Be(Nt),qp();break;case 5:Hp(r);break;case 4:si();break;case 13:Be(Ke);break;case 19:Be(Ke);break;case 10:zp(r.type._context);break;case 22:case 23:rm()}n=n.return}if(mt=e,ot=e=os(e.current,null),xt=Jt=t,ht=0,ka=null,em=Ru=qs=0,Ut=sa=null,Ts!==null){for(t=0;t<Ts.length;t++)if(n=Ts[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Ts=null}return e}function Kx(e,t){do{var n=ot;try{if(Up(),lc.current=qc,Hc){for(var r=Ge.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Hc=!1}if(Hs=0,pt=ft=Ge=null,na=!1,_a=0,Zp.current=null,n===null||n.return===null){ht=1,ka=t,ot=null;break}e:{var o=e,i=n.return,a=n,c=t;if(t=xt,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=hv(i);if(p!==null){p.flags&=-257,pv(p,i,a,o,t),p.mode&1&&fv(o,u,t),t=p,c=u;var b=t.updateQueue;if(b===null){var v=new Set;v.add(c),t.updateQueue=v}else b.add(c);break e}else{if(!(t&1)){fv(o,u,t),sm();break e}c=Error(V(426))}}else if(Ve&&a.mode&1){var x=hv(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),pv(x,i,a,o,t),$p(oi(c,a));break e}}o=c=oi(c,a),ht!==4&&(ht=2),sa===null?sa=[o]:sa.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=Rx(o,c,t);iv(o,y);break e;case 1:a=c;var g=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(rs===null||!rs.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=Ax(o,a,t);iv(o,_);break e}}o=o.return}while(o!==null)}Jx(n)}catch(S){t=S,ot===n&&n!==null&&(ot=n=n.return);continue}break}while(!0)}function Gx(){var e=Kc.current;return Kc.current=qc,e===null?qc:e}function sm(){(ht===0||ht===3||ht===2)&&(ht=4),mt===null||!(qs&268435455)&&!(Ru&268435455)||Br(mt,xt)}function Jc(e,t){var n=Ne;Ne|=2;var r=Gx();(mt!==e||xt!==t)&&(hr=null,Fs(e,t));do try{Gj();break}catch(s){Kx(e,s)}while(!0);if(Up(),Ne=n,Kc.current=r,ot!==null)throw Error(V(261));return mt=null,xt=0,ht}function Gj(){for(;ot!==null;)Yx(ot)}function Yj(){for(;ot!==null&&!xC();)Yx(ot)}function Yx(e){var t=Xx(e.alternate,e,Jt);e.memoizedProps=e.pendingProps,t===null?Jx(e):ot=t,Zp.current=null}function Jx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Bj(n,t),n!==null){n.flags&=32767,ot=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ht=6,ot=null;return}}else if(n=zj(n,t,Jt),n!==null){ot=n;return}if(t=t.sibling,t!==null){ot=t;return}ot=t=e}while(t!==null);ht===0&&(ht=5)}function Ss(e,t,n){var r=Oe,s=wn.transition;try{wn.transition=null,Oe=1,Jj(e,t,n,r)}finally{wn.transition=s,Oe=r}return null}function Jj(e,t,n,r){do $o();while(Jr!==null);if(Ne&6)throw Error(V(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(RC(e,o),e===mt&&(ot=mt=null,xt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Al||(Al=!0,Zx(Ac,function(){return $o(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=wn.transition,wn.transition=null;var i=Oe;Oe=1;var a=Ne;Ne|=4,Zp.current=null,Vj(e,n),Vx(n,e),gj(Xf),Oc=!!Qf,Xf=Qf=null,e.current=n,Hj(n),bC(),Ne=a,Oe=i,wn.transition=o}else e.current=n;if(Al&&(Al=!1,Jr=e,Yc=s),o=e.pendingLanes,o===0&&(rs=null),EC(n.stateNode),Vt(e,nt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Gc)throw Gc=!1,e=yh,yh=null,e;return Yc&1&&e.tag!==0&&$o(),o=e.pendingLanes,o&1?e===wh?oa++:(oa=0,wh=e):oa=0,ps(),null}function $o(){if(Jr!==null){var e=Rw(Yc),t=wn.transition,n=Oe;try{if(wn.transition=null,Oe=16>e?16:e,Jr===null)var r=!1;else{if(e=Jr,Jr=null,Yc=0,Ne&6)throw Error(V(331));var s=Ne;for(Ne|=4,se=e.current;se!==null;){var o=se,i=o.child;if(se.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(se=u;se!==null;){var d=se;switch(d.tag){case 0:case 11:case 15:ra(8,d,o)}var h=d.child;if(h!==null)h.return=d,se=h;else for(;se!==null;){d=se;var m=d.sibling,p=d.return;if(zx(d),d===u){se=null;break}if(m!==null){m.return=p,se=m;break}se=p}}}var b=o.alternate;if(b!==null){var v=b.child;if(v!==null){b.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}se=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,se=i;else e:for(;se!==null;){if(o=se,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ra(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,se=y;break e}se=o.return}}var g=e.current;for(se=g;se!==null;){i=se;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,se=w;else e:for(i=g;se!==null;){if(a=se,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Tu(9,a)}}catch(S){et(a,a.return,S)}if(a===i){se=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,se=_;break e}se=a.return}}if(Ne=s,ps(),Zn&&typeof Zn.onPostCommitFiberRoot=="function")try{Zn.onPostCommitFiberRoot(bu,e)}catch{}r=!0}return r}finally{Oe=n,wn.transition=t}}return!1}function jv(e,t,n){t=oi(n,t),t=Rx(e,t,1),e=ns(e,t,1),t=Ot(),e!==null&&(qa(e,1,t),Vt(e,t))}function et(e,t,n){if(e.tag===3)jv(e,e,n);else for(;t!==null;){if(t.tag===3){jv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(rs===null||!rs.has(r))){e=oi(n,e),e=Ax(t,e,1),t=ns(t,e,1),e=Ot(),t!==null&&(qa(t,1,e),Vt(t,e));break}}t=t.return}}function Qj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ot(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(xt&n)===n&&(ht===4||ht===3&&(xt&130023424)===xt&&500>nt()-tm?Fs(e,0):em|=n),Vt(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=bl,bl<<=1,!(bl&130023424)&&(bl=4194304)):t=1);var n=Ot();e=Sr(e,t),e!==null&&(qa(e,t,n),Vt(e,n))}function Xj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function Zj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),Qx(e,n)}var Xx;Xx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bt.current)zt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zt=!1,Uj(e,t,n);zt=!!(e.flags&131072)}else zt=!1,Ve&&t.flags&1048576&&nx(t,Uc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;uc(e,t),e=t.pendingProps;var s=ti(t,Nt.current);Mo(t,n),s=Gp(null,t,r,e,s,n);var o=Yp();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Wt(r)?(o=!0,$c(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Wp(t),s.updater=Nu,t.stateNode=s,s._reactInternals=t,ah(t,r,e,n),t=uh(null,t,r,!0,o,n)):(t.tag=0,Ve&&o&&Lp(t),At(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(uc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=tN(r),e=Nn(r,e),s){case 0:t=ch(null,t,r,e,n);break e;case 1:t=vv(null,t,r,e,n);break e;case 11:t=mv(null,t,r,e,n);break e;case 14:t=gv(null,t,r,Nn(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),ch(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),vv(e,t,r,s,n);case 3:e:{if(Dx(t),e===null)throw Error(V(387));
vendor: 4,674 bytes, line 41
41r=t.pendingProps,o=t.memoizedState,s=o.element,lx(e,t),Wc(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=oi(Error(V(423)),t),t=yv(e,t,r,n,s);break e}else if(r!==s){s=oi(Error(V(424)),t),t=yv(e,t,r,n,s);break e}else for(Zt=ts(t.stateNode.containerInfo.firstChild),en=t,Ve=!0,Dn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ni(),r===s){t=Er(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return cx(t),e===null&&sh(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Zf(r,s)?i=null:o!==null&&Zf(r,o)&&(t.flags|=32),Ix(e,t),At(e,t,i,n),t.child;case 6:return e===null&&sh(t),null;case 13:return Lx(e,t,n);case 4:return Vp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ri(t,null,r,n):At(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),mv(e,t,r,s,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Fe(zc,r._currentValue),r._currentValue=i,o!==null)if(Fn(o.value,i)){if(o.children===s.children&&!Bt.current){t=Er(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=wr(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),oh(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(V(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),oh(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}At(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Mo(t,n),s=bn(s),r=r(s),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,s=Nn(r,t.pendingProps),s=Nn(r.type,s),gv(e,t,r,s,n);case 15:return Px(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nn(r,s),uc(e,t),t.tag=1,Wt(r)?(e=!0,$c(t)):e=!1,Mo(t,n),Tx(t,r,s),ah(t,r,s,n),uh(null,t,r,!0,e,n);case 19:return Mx(e,t,n);case 22:return Ox(e,t,n)}throw Error(V(156,t.tag))};function Zx(e,t){return Cw(e,t)}function eN(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,r){return new eN(e,t,n,r)}function om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tN(e){if(typeof e=="function")return om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ep)return 11;if(e===kp)return 14}return 2}function os(e,t){var n=e.alternate;return n===null?(n=vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function hc(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")om(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case bo:return Us(n.children,s,o,t);case Sp:i=8,s|=8;break;case Af:return e=vn(12,n,t,s|2),e.elementType=Af,e.lanes=o,e;case Pf:return e=vn(13,n,t,s),e.elementType=Pf,e.lanes=o,e;case Of:return e=vn(19,n,t,s),e.elementType=Of,e.lanes=o,e;case cw:return Au(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aw:i=10;break e;case lw:i=9;break e;case Ep:i=11;break e;case kp:i=14;break e;case $r:i=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=vn(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function Us(e,t,n,r){return e=vn(7,e,r,t),e.lanes=n,e}function Au(e,t,n,r){return e=vn(22,e,r,t),e.elementType=cw,e.lanes=n,e.stateNode={isHidden:!1},e}
vendor: 5,691 bytes, line 41
41function Hd(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function qd(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nN(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cd(0),this.expirationTimes=Cd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function im(e,t,n,r,s,o,i,a,c){return e=new nN(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wp(o),e}function rN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function eb(e){if(!e)return cs;e=e._reactInternals;e:{if(Qs(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Wt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(Wt(n))return ex(e,n,t)}return t}function tb(e,t,n,r,s,o,i,a,c){return e=im(n,r,!0,e,s,o,i,a,c),e.context=eb(null),n=e.current,r=Ot(),s=ss(n),o=wr(r,s),o.callback=t??null,ns(n,o,s),e.current.lanes=s,qa(e,s,r),Vt(e,r),e}function Pu(e,t,n,r){var s=t.current,o=Ot(),i=ss(s);return n=eb(n),t.context===null?t.context=n:t.pendingContext=n,t=wr(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ns(s,t,i),e!==null&&($n(e,s,i,o),ac(e,s,i)),i}function Qc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Nv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function am(e,t){Nv(e,t),(e=e.alternate)&&Nv(e,t)}function sN(){return null}var nb=typeof reportError=="function"?reportError:function(e){console.error(e)};function lm(e){this._internalRoot=e}Ou.prototype.render=lm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Pu(e,t,null,null)};Ou.prototype.unmount=lm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ks(function(){Pu(null,e,null,null)}),t[_r]=null}};function Ou(e){this._internalRoot=e}Ou.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ow();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zr.length&&t!==0&&t<zr[n].priority;n++);zr.splice(n,0,e),n===0&&Dw(e)}};function cm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Tv(){}function oN(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Qc(i);o.call(u)}}var i=tb(t,r,e,0,null,!1,!1,"",Tv);return e._reactRootContainer=i,e[_r]=i.current,va(e.nodeType===8?e.parentNode:e),Ks(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Qc(c);a.call(u)}}var c=im(e,0,!1,null,null,!1,!1,"",Tv);return e._reactRootContainer=c,e[_r]=c.current,va(e.nodeType===8?e.parentNode:e),Ks(function(){Pu(t,c,n,r)}),c}function Du(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var c=Qc(i);a.call(c)}}Pu(t,i,e,s)}else i=oN(n,t,e,s,r);return Qc(i)}Aw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Hi(t.pendingLanes);n!==0&&(Np(t,n|1),Vt(t,nt()),!(Ne&6)&&(ii=nt()+500,ps()))}break;case 13:Ks(function(){var r=Sr(e,1);if(r!==null){var s=Ot();$n(r,e,1,s)}}),am(e,1)}};Tp=function(e){if(e.tag===13){var t=Sr(e,134217728);if(t!==null){var n=Ot();$n(t,e,134217728,n)}am(e,134217728)}};Pw=function(e){if(e.tag===13){var t=ss(e),n=Sr(e,t);if(n!==null){var r=Ot();$n(n,e,t,r)}am(e,t)}};Ow=function(){return Oe};Iw=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};Wf=function(e,t,n){switch(t){case"input":if(Lf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=ku(r);if(!s)throw Error(V(90));dw(r),Lf(r,s)}}}break;case"textarea":hw(e,n);break;case"select":t=n.value,t!=null&&Oo(e,!!n.multiple,t,!1)}};xw=nm;bw=Ks;var iN={usingClientEntryPoint:!1,Events:[Ga,ko,ku,yw,ww,nm]},Ii={findFiberByHostInstance:Ns,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aN={bundleType:Ii.bundleType,version:Ii.version,rendererPackageName:Ii.rendererPackageName,rendererConfig:Ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ew(e),e===null?null:e.stateNode},findFiberByHostInstance:Ii.findFiberByHostInstance||sN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{bu=Pl.inject(aN),Zn=Pl}catch{}}on.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iN;on.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cm(t))throw Error(V(200));return rN(e,t,null,n)};on.createRoot=function(e,t){if(!cm(e))throw Error(V(299));var n=!1,r="",s=nb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=im(e,1,!1,null,null,n,!1,r,s),e[_r]=t.current,va(e.nodeType===8?e.parentNode:e),new lm(t)};on.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=Ew(t),e=e===null?null:e.stateNode,e};on.flushSync=function(e){return Ks(e)};on.hydrate=function(e,t,n){if(!Iu(t))throw Error(V(200));return Du(null,e,t,!0,n)};on.hydrateRoot=function(e,t,n){if(!cm(e))throw Error(V(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=nb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=tb(t,null,e,1,n??null,s,!1,o,i),e[_r]=t.current,va(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ou(t)};on.render=function(e,t,n){if(!Iu(t))throw Error(V(200));return Du(null,e,t,!1,n)};on.unmountComponentAtNode=function(e){if(!Iu(e))throw Error(V(40));return e._reactRootContainer?(Ks(function(){Du(null,null,e,!1,function(){e._reactRootContainer=null,e[_r]=null})}),!0):!1};on.unstable_batchedUpdates=nm;on.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Iu(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return Du(e,t,n,!1,r)};on.version="18.3.1-next-f1338f8080-20240426";function rb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rb)}catch(e){console.error(e)}}rb(),rw.exports=on;var Ja=rw.exports;const sb=fi(Ja);var ob,Rv=Ja;ob=Rv.createRoot,Rv.hydrateRoot;var lN=typeof Element<"u",cN=typeof Map=="function",uN=typeof Set=="function",dN=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function pc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!pc(e[r],t[r]))return!1;return!0}var o;if(cN&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!pc(r.value[1],t.get(r.value[0])))return!1;return!0}if(uN&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(dN&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(lN&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!pc(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var fN=function(t,n){try{return pc(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const hN=fi(fN);var pN=function(e,t,n,r,s,o,i,a){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,o,i,a],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},mN=pN;const Av=fi(mN);var gN=function(t,n,r,s){var o=r?r.call(s,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;
41if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),u=0;u<i.length;u++){var d=i[u];if(!c(d))return!1;var h=t[d],m=n[d];if(o=r?r.call(s,h,m,d):void 0,o===!1||o===void 0&&h!==m)return!1}return!0};const vN=fi(gN);var ib=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(ib||{}),Kd={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Pv=Object.values(ib),Lu={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ab=Object.entries(Lu).reduce((e,[t,n])=>(e[n]=t,e),{}),Ln="data-rh",Fo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Uo=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},yN=e=>{let t=Uo(e,"title");const n=Uo(e,Fo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Uo(e,Fo.DEFAULT_TITLE);return t||r||void 0},wN=e=>Uo(e,Fo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Gd=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),xN=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let o=0;o<s.length;o+=1){const a=s[o].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),bN=e=>console&&typeof console.warn=="function"&&console.warn(e),Di=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&bN(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const i={};o.filter(c=>{let u;const d=Object.keys(c);for(let m=0;m<d.length;m+=1){const p=d[m],b=p.toLowerCase();t.indexOf(b)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(b==="rel"&&c[b].toLowerCase()==="stylesheet")&&(u=b),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(u=p)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return r[u]||(r[u]={}),i[u]||(i[u]={}),r[u][h]?!1:(i[u][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const a=Object.keys(i);for(let c=0;c<a.length;c+=1){const u=a[c],d={...r[u],...i[u]};r[u]=d}return s},[]).reverse()},_N=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},SN=e=>({baseTag:xN(["href"],e),bodyAttributes:Gd("bodyAttributes",e),defer:Uo(e,Fo.DEFER),encode:Uo(e,Fo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Gd("htmlAttributes",e),linkTags:Di("link",["rel","href"],e),metaTags:Di("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Di("noscript",["innerHTML"],e),onChangeClientState:wN(e),scriptTags:Di("script",["src","innerHTML"],e),styleTags:Di("style",["cssText"],e),title:yN(e),titleAttributes:Gd("titleAttributes",e),prioritizeSeoTags:_N(e,Fo.PRIORITIZE_SEO_TAGS)}),lb=e=>Array.isArray(e)?e.join(""):e,EN=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Yd=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(EN(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Ov=(e,t)=>({...e,[t]:void 0}),kN=["noscript","script","style"],_h=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),cb=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),CN=(e,t,n,r)=>{const s=cb(n),o=lb(t);return s?`<${e} ${Ln}="true" ${s}>${_h(o,r)}</${e}>`:`<${e} ${Ln}="true">${_h(o,r)}</${e}>`},jN=(e,t,n=!0)=>t.reduce((r,s)=>{const o=s,i=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof o[d]>"u"?d:`${d}="${_h(o[d],n)}"`;return u?`${u} ${h}`:h},""),a=o.innerHTML||o.cssText||"",c=kN.indexOf(e)===-1;return`${r}<${e} ${Ln}="true" ${i}${c?"/>":`>${a}</${e}>`}`},""),ub=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=Lu[r];return n[s||r]=e[r],n},t),NN=(e,t,n)=>{const r={key:t,[Ln]:!0},s=ub(n,r);return[T.createElement("title",s,t)]},mc=(e,t)=>t.map((n,r)=>{const s={key:r,[Ln]:!0};
41return Object.keys(n).forEach(o=>{const a=Lu[o]||o;if(a==="innerHTML"||a==="cssText"){const c=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[a]=n[o]}),T.createElement(e,s)}),hn=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>NN(e,t.title,t.titleAttributes),toString:()=>CN(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>ub(t),toString:()=>cb(t)};default:return{toComponent:()=>mc(e,t),toString:()=>jN(e,t,n)}}},TN=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Yd(e,Kd.meta),o=Yd(t,Kd.link),i=Yd(n,Kd.script);return{priorityMethods:{toComponent:()=>[...mc("meta",s.priority),...mc("link",o.priority),...mc("script",i.priority)],toString:()=>`${hn("meta",s.priority,r)} ${hn("link",o.priority,r)} ${hn("script",i.priority,r)}`},metaTags:s.default,linkTags:o.default,scriptTags:i.default}},RN=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:o,styleTags:i,title:a="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:m}=e,p={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:p,linkTags:d,metaTags:h,scriptTags:m}=TN(e)),{priority:p,base:hn("base",t,r),bodyAttributes:hn("bodyAttributes",n,r),htmlAttributes:hn("htmlAttributes",s,r),link:hn("link",d,r),meta:hn("meta",h,r),noscript:hn("noscript",o,r),script:hn("script",m,r),style:hn("style",i,r),title:hn("title",{title:a,titleAttributes:c},r)}},Sh=RN,Ol=[],um=!!(typeof window<"u"&&window.document&&window.document.createElement),Eh=class{constructor(e,t){lr(this,"instances",[]);lr(this,"canUseDOM",um);lr(this,"context");lr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ol:this.instances,add:e=>{(this.canUseDOM?Ol:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ol:this.instances).indexOf(e);(this.canUseDOM?Ol:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Sh({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},AN=parseInt(T.version.split(".")[0],10),kh=AN>=19,PN={},db=T.createContext(PN),Ps,fb=(Ps=class extends f.Component{constructor(n){super(n);lr(this,"helmetData");kh?this.helmetData=null:this.helmetData=new Eh(this.props.context||{},Ps.canUseDOM)}render(){return kh?T.createElement(T.Fragment,null,this.props.children):T.createElement(db.Provider,{value:this.helmetData.value},this.props.children)}},lr(Ps,"canUseDOM",um),Ps),oo=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Ln}]`),s=[].slice.call(r),o=[];let i;return t&&t.length&&t.forEach(a=>{const c=document.createElement(e);for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u))if(u==="innerHTML")c.innerHTML=a.innerHTML;else if(u==="cssText"){const d=a.cssText;c.appendChild(document.createTextNode(d))}else{const d=u,h=typeof a[d]>"u"?"":a[d];c.setAttribute(u,h)}c.setAttribute(Ln,"true"),s.some((u,d)=>(i=d,c.isEqualNode(u)))?s.splice(i,1):o.push(c)}),s.forEach(a=>{var c;return(c=a.parentNode)==null?void 0:c.removeChild(a)}),o.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:o}},Ch=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Ln),s=r?r.split(","):[],o=[...s],i=Object.keys(t);for(const a of i){const c=t[a]||"";n.getAttribute(a)!==c&&n.setAttribute(a,c),s.indexOf(a)===-1&&s.push(a);const u=o.indexOf(a);u!==-1&&o.splice(u,1)}for(let a=o.length-1;a>=0;a-=1)n.removeAttribute(o[a]);s.length===o.length?n.removeAttribute(Ln):n.getAttribute(Ln)!==i.join(",")&&n.setAttribute(Ln,i.join(","))},ON=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=lb(e)),Ch("title",t)},Iv=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:o,metaTags:i,noscriptTags:a,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:m}=e;Ch("body",r),Ch("html",s),ON(h,m);const p={baseTag:oo("base",n),linkTags:oo("link",o),metaTags:oo("meta",i),noscriptTags:oo("noscript",a),scriptTags:oo("script",u),styleTags:oo("style",d)},b={},v={};
41Object.keys(p).forEach(x=>{const{newTags:y,oldTags:g}=p[x];y.length&&(b[x]=y),g.length&&(v[x]=p[x].oldTags)}),t&&t(),c(e,b,v)},Li=null,IN=e=>{Li&&cancelAnimationFrame(Li),e.defer?Li=requestAnimationFrame(()=>{Iv(e,()=>{Li=null})}):(Iv(e),Li=null)},DN=IN,Dv=class extends f.Component{constructor(){super(...arguments);lr(this,"rendered",!1)}shouldComponentUpdate(t){return!vN(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=SN(t.get().map(o=>{const{context:i,...a}=o.props;return a}));fb.canUseDOM?DN(s):Sh&&(r=Sh(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},gc=[],Lv=e=>{const t={};for(const n of Object.keys(e))t[ab[n]||n]=e[n];return t},ws=e=>{const t={};for(const n of Object.keys(e)){const r=Lu[n];t[r||n]=e[n]}return t},Mv=(e,t)=>{if(!um)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),o=s?s.split(","):[],i=Object.keys(t);for(const a of o)i.includes(a)||n.removeAttribute(a);for(const a of i){const c=t[a];c==null||c===!1?n.removeAttribute(a):c===!0?n.setAttribute(a,""):n.setAttribute(a,String(c))}i.length>0?n.setAttribute(r,i.join(",")):n.removeAttribute(r)},Jd=()=>{const e={},t={};for(const n of gc){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,Lv(r)),s&&Object.assign(t,Lv(s))}Mv("html",e),Mv("body",t)},LN=class extends f.Component{componentDidMount(){gc.push(this),Jd()}componentDidUpdate(){Jd()}componentWillUnmount(){const e=gc.indexOf(this);e!==-1&&gc.splice(e,1),Jd()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return T.createElement("title",ws(t),e)}renderBase(){const{base:e}=this.props;return e?T.createElement("base",ws(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>T.createElement("meta",{key:n,...ws(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>T.createElement("link",{key:n,...ws(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,o=ws(s);return r&&(o.dangerouslySetInnerHTML={__html:r}),T.createElement("script",{key:n,...o})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,o=ws(s);return r&&(o.dangerouslySetInnerHTML={__html:r}),T.createElement("style",{key:n,...o})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,o=ws(s);return r&&(o.dangerouslySetInnerHTML={__html:r}),T.createElement("noscript",{key:n,...o})})}render(){return T.createElement(T.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Tf,MN=(Tf=class extends f.Component{shouldComponentUpdate(e){return!hN(Ov(this.props,"helmetData"),Ov(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
41warnOnInvalidChildren(e,t){return Av(Pv.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Pv.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Av(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return T.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...o}=r.props,i=Object.keys(o).reduce((c,u)=>(c[ab[u]||u]=o[u],c),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,i,s);break;default:t=this.mapObjectTypeChildren(r,t,i,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Eh)){const s=r;r=new Eh(s.context,!0),delete n.helmetData}return kh?T.createElement(LN,{...n}):r?T.createElement(Dv,{...n,context:r.value}):T.createElement(db.Consumer,null,s=>T.createElement(Dv,{...n,context:s}))}},lr(Tf,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Tf);const $N="modulepreload",FN=function(e){return"/"+e},$v={},Je=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=FN(c),c in $v)return;$v[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":$N,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((m,p)=>{h.addEventListener("load",m),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},UN=1,zN=1e6;let Qd=0;function BN(){return Qd=(Qd+1)%Number.MAX_SAFE_INTEGER,Qd.toString()}const Xd=new Map,Fv=e=>{if(Xd.has(e))return;const t=setTimeout(()=>{Xd.delete(e),ia({type:"REMOVE_TOAST",toastId:e})},zN);Xd.set(e,t)},WN=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,UN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Fv(n):e.toasts.forEach(r=>{Fv(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},vc=[];let yc={toasts:[]};function ia(e){yc=WN(yc,e),vc.forEach(t=>{t(yc)})}function VN({...e}){const t=BN(),n=s=>ia({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>ia({type:"DISMISS_TOAST",toastId:t});return ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Mu(){const[e,t]=f.useState(yc);return f.useEffect(()=>(vc.push(t),()=>{const n=vc.indexOf(t);n>-1&&vc.splice(n,1)}),[e]),{...e,toast:VN,dismiss:n=>ia({type:"DISMISS_TOAST",toastId:n})}}function ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Uv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qa(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Uv(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Uv(e[s],null)}}}}function De(...e){return f.useCallback(Qa(...e),e)}function HN(e,t){const n=f.createContext(t),r=o=>{const{children:i,...a}=o,c=f.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function s(o){const i=f.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function Ht(e,t=[]){let n=[];function r(o,i){const a=f.createContext(i),c=n.length;n=[...n,i];const u=h=>{var y;const{scope:m,children:p,...b}=h,v=((y=m==null?void 0:m[e])==null?void 0:y[c])||a,x=f.useMemo(()=>b,Object.values(b));return l.jsx(v.Provider,{value:x,children:p})};u.displayName=o+"Provider";function d(h,m){var v;const p=((v=m==null?void 0:m[e])==null?void 0:v[c])||a,b=f.useContext(p);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=n.map(i=>f.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,qN(s,...t)]}function qN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...a,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ai(e){const t=GN(e),n=f.forwardRef((r,s)=>{const{children:o,...i}=r,a=f.Children.toArray(o),c=a.find(JN);if(c){const u=c.props.children,d=a.map(h=>h===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:h);return l.jsx(t,{...i,ref:s,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return l.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var KN=ai("Slot");function GN(e){const t=f.forwardRef((n,r)=>{const{children:s,...o}=n;if(f.isValidElement(s)){const i=XN(s),a=QN(o,s.props);
vendor: 9,369 bytes, line 41
41return s.type!==f.Fragment&&(a.ref=r?Qa(r,i):i),f.cloneElement(s,a)}return f.Children.count(s)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hb=Symbol("radix.slottable");function YN(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=hb,t}function JN(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hb}function QN(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const c=o(...a);return s(...a),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function XN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $u(e){const t=e+"CollectionProvider",[n,r]=Ht(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:x,children:y}=v,g=T.useRef(null),w=T.useRef(new Map).current;return l.jsx(s,{scope:x,itemMap:w,collectionRef:g,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=ai(a),u=T.forwardRef((v,x)=>{const{scope:y,children:g}=v,w=o(a,y),_=De(x,w.collectionRef);return l.jsx(c,{ref:_,children:g})});u.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=ai(d),p=T.forwardRef((v,x)=>{const{scope:y,children:g,...w}=v,_=T.useRef(null),S=De(x,_),k=o(d,y);return T.useEffect(()=>(k.itemMap.set(_,{ref:_,...w}),()=>void k.itemMap.delete(_))),l.jsx(m,{[h]:"",ref:S,children:g})});p.displayName=d;function b(v){const x=o(e+"CollectionConsumer",v);return T.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},b,r]}var ZN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ye=ZN.reduce((e,t)=>{const n=ai(`Primitive.${t}`),r=f.forwardRef((s,o)=>{const{asChild:i,...a}=s,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dm(e,t){e&&Ja.flushSync(()=>e.dispatchEvent(t))}function sn(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function e2(e,t=globalThis==null?void 0:globalThis.document){const n=sn(e);f.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var t2="DismissableLayer",jh="dismissableLayer.update",n2="dismissableLayer.pointerDownOutside",r2="dismissableLayer.focusOutside",zv,pb=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xa=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=f.useContext(pb),[d,h]=f.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),b=De(t,E=>h(E)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(x),g=d?v.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,_=g>=y,S=o2(E=>{const j=E.target,A=[...u.branches].some(O=>O.contains(j));!_||A||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},m),k=i2(E=>{const j=E.target;[...u.branches].some(O=>O.contains(j))||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},m);return e2(E=>{g===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},m),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(zv=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Bv(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=zv)}},[d,m,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Bv())},[d,u]),f.useEffect(()=>{const E=()=>p({});return document.addEventListener(jh,E),()=>document.removeEventListener(jh,E)},[]),l.jsx(ye.div,{...c,ref:b,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ie(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ie(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ie(e.onPointerDownCapture,S.onPointerDownCapture)})});Xa.displayName=t2;var s2="DismissableLayerBranch",mb=f.forwardRef((e,t)=>{const n=f.useContext(pb),r=f.useRef(null),s=De(t,r);return f.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),l.jsx(ye.div,{...e,ref:s})});mb.displayName=s2;function o2(e,t=globalThis==null?void 0:globalThis.document){const n=sn(e),r=f.useRef(!1),s=f.useRef(()=>{});return f.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){gb(n2,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function i2(e,t=globalThis==null?void 0:globalThis.document){const n=sn(e),r=f.useRef(!1);return f.useEffect(()=>{const s=o=>{o.target&&!r.current&&gb(r2,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bv(){const e=new CustomEvent(jh);document.dispatchEvent(e)}function gb(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?dm(s,o):s.dispatchEvent(o)}var a2=Xa,l2=mb,nr=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},c2="Portal",Fu=f.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=f.useState(!1);nr(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?sb.createPortal(l.jsx(ye.div,{...r,ref:t}),i):null});Fu.displayName=c2;function u2(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ln=e=>{const{present:t,children:n}=e,r=d2(t),s=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),o=De(r.ref,f2(s));return typeof n=="function"||r.isPresent?f.cloneElement(s,{ref:o}):null};ln.displayName="Presence";function d2(e){const[t,n]=f.useState(),r=f.useRef(null),s=f.useRef(e),o=f.useRef("none"),i=e?"mounted":"unmounted",[a,c]=u2(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Il(r.current);o.current=a==="mounted"?u:"none"},[a]),nr(()=>{const u=r.current,d=s.current;if(d!==e){const m=o.current,p=Il(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),nr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const v=Il(r.current).includes(p.animationName);if(p.target===t&&v&&(c("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=p=>{p.target===t&&(o.current=Il(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Il(e){return(e==null?void 0:e.animationName)||"none"}function f2(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var h2=xu[" useInsertionEffect ".trim().toString()]||nr;function sr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,i]=p2({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:s;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${r} 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.`),d.current=a},[a,r])}const u=f.useCallback(d=>{var h;if(a){const m=m2(d)?d(e):d;
41m!==e&&((h=i.current)==null||h.call(i,m))}else o(d)},[a,e,o,i]);return[c,u]}function p2({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),s=f.useRef(n),o=f.useRef(t);return h2(()=>{o.current=t},[t]),f.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}function m2(e){return typeof e=="function"}var g2=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"}),v2="VisuallyHidden",fm=f.forwardRef((e,t)=>l.jsx(ye.span,{...e,ref:t,style:{...g2,...e.style}}));fm.displayName=v2;var hm="ToastProvider",[pm,y2,w2]=$u("Toast"),[vb,fU]=Ht("Toast",[w2]),[x2,Uu]=vb(hm),yb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,c]=f.useState(null),[u,d]=f.useState(0),h=f.useRef(!1),m=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),l.jsx(pm.Provider,{scope:t,children:l.jsx(x2,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:i})})};yb.displayName=hm;var wb="ToastViewport",b2=["F8"],Nh="toast.viewportPause",Th="toast.viewportResume",xb=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=b2,label:s="Notifications ({hotkey})",...o}=e,i=Uu(wb,n),a=y2(n),c=f.useRef(null),u=f.useRef(null),d=f.useRef(null),h=f.useRef(null),m=De(t,h,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;f.useEffect(()=>{const x=y=>{var w;r.length!==0&&r.every(_=>y[_]||y.code===_)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),f.useEffect(()=>{const x=c.current,y=h.current;if(b&&x&&y){const g=()=>{if(!i.isClosePausedRef.current){const k=new CustomEvent(Nh);y.dispatchEvent(k),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const k=new CustomEvent(Th);y.dispatchEvent(k),i.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&w()},S=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",g),x.addEventListener("focusout",_),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[b,i.isClosePausedRef]);const v=f.useCallback(({tabbingDirection:x})=>{const g=a().map(w=>{const _=w.ref.current,S=[_,...I2(_)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?g.reverse():g).flat()},[a]);return f.useEffect(()=>{const x=h.current;if(x){const y=g=>{var S,k,E;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const j=document.activeElement,A=g.shiftKey;if(g.target===x&&A){(S=u.current)==null||S.focus();return}const K=v({tabbingDirection:A?"backwards":"forwards"}),J=K.findIndex(U=>U===j);Zd(K.slice(J+1))?g.preventDefault():A?(k=u.current)==null||k.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,v]),l.jsxs(l2,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&l.jsx(Rh,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});Zd(x)}}),l.jsx(pm.Slot,{scope:n,children:l.jsx(ye.ol,{tabIndex:-1,...o,ref:m})}),b&&l.jsx(Rh,{ref:d,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});Zd(x)}})]})});xb.displayName=wb;var bb="ToastFocusProxy",Rh=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Uu(bb,n);return l.jsx(fm,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});Rh.displayName=bb;var Za="Toast",_2="toast.swipeStart",S2="toast.swipeMove",E2="toast.swipeCancel",k2="toast.swipeEnd",_b=f.forwardRef((e,t)=>
41{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a,c]=sr({prop:r,defaultProp:s??!0,onChange:o,caller:Za});return l.jsx(ln,{present:n||a,children:l.jsx(N2,{open:a,...i,ref:t,onClose:()=>c(!1),onPause:sn(e.onPause),onResume:sn(e.onResume),onSwipeStart:ie(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ie(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:ie(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ie(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});_b.displayName=Za;var[C2,j2]=vb(Za,{onClose(){}}),N2=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:p,...b}=e,v=Uu(Za,n),[x,y]=f.useState(null),g=De(t,U=>y(U)),w=f.useRef(null),_=f.useRef(null),S=s||v.duration,k=f.useRef(0),E=f.useRef(S),j=f.useRef(0),{onToastAdd:A,onToastRemove:O}=v,H=sn(()=>{var le;(x==null?void 0:x.contains(document.activeElement))&&((le=v.viewport)==null||le.focus()),i()}),K=f.useCallback(U=>{!U||U===1/0||(window.clearTimeout(j.current),k.current=new Date().getTime(),j.current=window.setTimeout(H,U))},[H]);f.useEffect(()=>{const U=v.viewport;if(U){const le=()=>{K(E.current),u==null||u()},W=()=>{const X=new Date().getTime()-k.current;E.current=E.current-X,window.clearTimeout(j.current),c==null||c()};return U.addEventListener(Nh,W),U.addEventListener(Th,le),()=>{U.removeEventListener(Nh,W),U.removeEventListener(Th,le)}}},[v.viewport,S,c,u,K]),f.useEffect(()=>{o&&!v.isClosePausedRef.current&&K(S)},[o,S,v.isClosePausedRef,K]),f.useEffect(()=>(A(),()=>O()),[A,O]);const J=f.useMemo(()=>x?Tb(x):null,[x]);return v.viewport?l.jsxs(l.Fragment,{children:[J&&l.jsx(T2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:J}),l.jsx(C2,{scope:n,onClose:H,children:Ja.createPortal(l.jsx(pm.ItemSlot,{scope:n,children:l.jsx(a2,{asChild:!0,onEscapeKeyDown:ie(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||H(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(ye.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...b,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ie(e.onKeyDown,U=>{U.key==="Escape"&&(a==null||a(U.nativeEvent),U.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:ie(e.onPointerDown,U=>{U.button===0&&(w.current={x:U.clientX,y:U.clientY})}),onPointerMove:ie(e.onPointerMove,U=>{if(!w.current)return;const le=U.clientX-w.current.x,W=U.clientY-w.current.y,X=!!_.current,R=["left","right"].includes(v.swipeDirection),C=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,$=R?C(0,le):0,te=R?0:C(0,W),Z=U.pointerType==="touch"?10:2,ue={x:$,y:te},fe={originalEvent:U,delta:ue};X?(_.current=ue,Dl(S2,h,fe,{discrete:!1})):Wv(ue,v.swipeDirection,Z)?(_.current=ue,Dl(_2,d,fe,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(le)>Z||Math.abs(W)>Z)&&(w.current=null)}),onPointerUp:ie(e.onPointerUp,U=>{const le=_.current,W=U.target;if(W.hasPointerCapture(U.pointerId)&&W.releasePointerCapture(U.pointerId),_.current=null,w.current=null,le){const X=U.currentTarget,R={originalEvent:U,delta:le};
41Wv(le,v.swipeDirection,v.swipeThreshold)?Dl(k2,p,R,{discrete:!0}):Dl(E2,m,R,{discrete:!0}),X.addEventListener("click",C=>C.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),T2=e=>{const{__scopeToast:t,children:n,...r}=e,s=Uu(Za,t),[o,i]=f.useState(!1),[a,c]=f.useState(!1);return P2(()=>i(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(Fu,{asChild:!0,children:l.jsx(fm,{...r,children:o&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},R2="ToastTitle",Sb=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(ye.div,{...r,ref:t})});Sb.displayName=R2;var A2="ToastDescription",Eb=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(ye.div,{...r,ref:t})});Eb.displayName=A2;var kb="ToastAction",Cb=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(Nb,{altText:n,asChild:!0,children:l.jsx(mm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${kb}\`. Expected non-empty \`string\`.`),null)});Cb.displayName=kb;var jb="ToastClose",mm=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=j2(jb,n);return l.jsx(Nb,{asChild:!0,children:l.jsx(ye.button,{type:"button",...r,ref:t,onClick:ie(e.onClick,s.onClose)})})});mm.displayName=jb;var Nb=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(ye.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Tb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),O2(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Tb(r))}}),t}function Dl(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?dm(s,o):s.dispatchEvent(o)}var Wv=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function P2(e=()=>{}){const t=sn(e);nr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function O2(e){return e.nodeType===e.ELEMENT_NODE}function I2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var D2=yb,Rb=xb,Ab=_b,Pb=Sb,Ob=Eb,Ib=Cb,Db=mm;function Lb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Lb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mb(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Lb(e))&&(r&&(r+=" "),r+=t);return r}const Vv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Hv=Mb,el=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Hv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=o==null?void 0:o[u];if(d===null)return null;const m=Vv(d)||Vv(h);return s[u][m]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,m]=d;return m===void 0||(u[h]=m),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:m,...p}=d;return Object.entries(p).every(b=>{let[v,x]=b;return Array.isArray(x)?x.includes({...o,...a}[v]):{...o,...a}[v]===x})?[...u,h,m]:u},[]);return Hv(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const L2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$b=(...e)=>
vendor: 4,637 bytes, lines 46-125
46e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var M2={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const $2=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>f.createElement("svg",{ref:c,...M2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:$b("lucide",s),...a},[...i.map(([u,d])=>f.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const Se=(e,t)=>{const n=f.forwardRef(({className:r,...s},o)=>f.createElement($2,{ref:o,iconNode:t,className:$b(`lucide-${L2(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const qv=Se("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const wt=Se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const F2=Se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const U2=Se("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const ms=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const zs=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const z2=Se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const Fb=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const B2=Se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const W2=Se("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const Ub=Se("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const V2=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree.
126 */const H2=Se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const zb=Se("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"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const Bb=Se("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"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const Ah=Se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const q2=Se("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const Wb=Se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const K2=Se("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const G2=Se("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const Vb=Se("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const yn=Se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const Y2=Se("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"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const Kv=Se("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 182 * @license lucide-react v0.462.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const J2=Se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 187 * @license lucide-react v0.462.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const Q2=Se("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"}]]);/** 192 * @license lucide-react v0.462.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const Ph=Se("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 197 * @license lucide-react v0.462.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const Ca=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 202 * @license lucide-react v0.462.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const Hb=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 207 * @license lucide-react v0.462.0 - ISC 208 * 209 * This source code is licensed under the ISC license. 210 * See the LICENSE file in the root directory of this source tree. 211 */const X2=Se("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 4,442 bytes, lines 211-256
211y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 212 * @license lucide-react v0.462.0 - ISC 213 * 214 * This source code is licensed under the ISC license. 215 * See the LICENSE file in the root directory of this source tree. 216 */const Z2=Se("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 217 * @license lucide-react v0.462.0 - ISC 218 * 219 * This source code is licensed under the ISC license. 220 * See the LICENSE file in the root directory of this source tree. 221 */const eT=Se("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/** 222 * @license lucide-react v0.462.0 - ISC 223 * 224 * This source code is licensed under the ISC license. 225 * See the LICENSE file in the root directory of this source tree. 226 */const tT=Se("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** 227 * @license lucide-react v0.462.0 - ISC 228 * 229 * This source code is licensed under the ISC license. 230 * See the LICENSE file in the root directory of this source tree. 231 */const nT=Se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 232 * @license lucide-react v0.462.0 - ISC 233 * 234 * This source code is licensed under the ISC license. 235 * See the LICENSE file in the root directory of this source tree. 236 */const rT=Se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 237 * @license lucide-react v0.462.0 - ISC 238 * 239 * This source code is licensed under the ISC license. 240 * See the LICENSE file in the root directory of this source tree. 241 */const qb=Se("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 242 * @license lucide-react v0.462.0 - ISC 243 * 244 * This source code is licensed under the ISC license. 245 * See the LICENSE file in the root directory of this source tree. 246 */const Kb=Se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 247 * @license lucide-react v0.462.0 - ISC 248 * 249 * This source code is licensed under the ISC license. 250 * See the LICENSE file in the root directory of this source tree. 251 */const tn=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 252 * @license lucide-react v0.462.0 - ISC 253 * 254 * This source code is licensed under the ISC license. 255 * See the LICENSE file in the root directory of this source tree. 256 */const sT=Se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),gm="-",oT=e=>{const t=aT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(gm);return a[0]===""&&a.length!==1&&a.shift(),Gb(a,t)||iT(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Gb=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Gb(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(gm);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Gv=/^\[(.+)\]$/,iT=e=>{if(Gv.test(e)){const t=Gv.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},aT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,123 bytes, line 256
256return cT(Object.entries(e.classGroups),n).forEach(([o,i])=>{Oh(i,r,o,t)}),r},Oh=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Yv(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(lT(s)){Oh(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{Oh(i,Yv(t,o),n,r)})})},Yv=(e,t)=>{let n=e;return t.split(gm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lT=e=>e.isThemeGetter,cT=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,uT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},Yb="!",dT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const c=[];let u=0,d=0,h;for(let x=0;x<a.length;x++){let y=a[x];if(u===0){if(y===s&&(r||a.slice(x,x+o)===t)){c.push(a.slice(d,x)),d=x+o;continue}if(y==="/"){h=x;continue}}y==="["?u++:y==="]"&&u--}const m=c.length===0?a:a.substring(d),p=m.startsWith(Yb),b=p?m.substring(1):m,v=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:i}):i},fT=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},hT=e=>({cache:uT(e.cacheSize),parseClassName:dT(e),...oT(e)}),pT=/\s+/,mT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(pT);let a="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(u);let b=!!p,v=r(b?m.substring(0,p):m);if(!v){if(!b){a=u+(a.length>0?" "+a:a);continue}if(v=r(m),!v){a=u+(a.length>0?" "+a:a);continue}b=!1}const x=fT(d).join(":"),y=h?x+Yb:x,g=y+v;if(o.includes(g))continue;o.push(g);const w=s(v,b);for(let _=0;_<w.length;++_){const S=w[_];o.push(y+S)}a=u+(a.length>0?" "+a:a)}return a};function gT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Jb(t))&&(r&&(r+=" "),r+=n);return r}const Jb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Jb(e[r]))&&(n&&(n+=" "),n+=t);return n};function vT(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,h)=>h(d),e());return n=hT(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=mT(c,n);return s(c,d),d}return function(){return o(gT.apply(null,arguments))}}const Ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qb=/^\[(?:([a-z-]+):)?(.+)\]$/i,yT=/^\d+\/\d+$/,wT=new Set(["px","full","screen"]),xT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bT=/\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$/,_T=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ST=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ET=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cr=e=>zo(e)||wT.has(e)||yT.test(e),Or=e=>gi(e,"length",PT),zo=e=>!!e&&!Number.isNaN(Number(e)),ef=e=>gi(e,"number",zo),Mi=e=>!!e&&Number.isInteger(Number(e)),kT=e=>e.endsWith("%")&&zo(e.slice(0,-1)),_e=e=>Qb.test(e),Ir=e=>xT.test(e),CT=new Set(["length","size","percentage"]),jT=e=>gi(e,CT,Xb),NT=e=>gi(e,"position",Xb),TT=new Set(["image","url"]),RT=e=>gi(e,TT,IT),AT=e=>gi(e,"",OT),$i=()=>!0,gi=(e,t,n)=>{const r=Qb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PT=e=>bT.test(e)&&!_T.test(e),Xb=()=>!1,OT=e=>ST.test(e),IT=e=>ET.test(e),DT=()=>{const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),s=Ue("borderColor"),o=Ue("borderRadius"),i=Ue("borderSpacing"),a=Ue("borderWidth"),c=Ue("contrast"),u=Ue("grayscale"),d=Ue("hueRotate"),h=Ue("invert"),m=Ue("gap"),p=Ue("gradientColorStops"),b=Ue("gradientColorStopPositions"),v=Ue("inset"),x=Ue("margin"),y=Ue("opacity"),g=Ue("padding"),w=Ue("saturate"),_=Ue("scale"),S=Ue("sepia"),k=Ue("skew"),E=Ue("space"),j=Ue("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",_e,t],K=()=>[_e,t],J=()=>["",cr,Or],U=()=>["auto",zo,_e],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],C=()=>["","0",_e],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[zo,_e];return{cacheSize:500,separator:":",theme:{colors:[$i],spacing:[cr,Or],blur:["none","",Ir,_e],brightness:te(),borderColor:[e],borderRadius:["n
256one","","full",Ir,_e],borderSpacing:K(),borderWidth:J(),contrast:te(),grayscale:C(),hueRotate:te(),invert:C(),gap:K(),gradientColorStops:[e],gradientColorStopPositions:[kT,Or],inset:H(),margin:H(),opacity:te(),padding:K(),saturate:te(),scale:te(),sepia:C(),skew:te(),space:K(),translate:K()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[Ir]}],"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:[...le(),_e]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mi,_e]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",Mi,_e]}],"grid-cols":[{"grid-cols":[$i]}],"col-start-end":[{col:["auto",{span:["full",Mi,_e]},_e]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[$i]}],"row-start-end":[{row:["auto",{span:[Mi,_e]},_e]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"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",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[Ir]},Ir]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ir,Or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ef]}],"font-family":[{font:[$i]}],"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",_e]}],"line-clamp":[{"line-clamp":["none",zo,ef]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",cr,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",cr,Or]}],"underline-offset":[{"underline-offset":["auto",cr,_e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e]}],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",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),NT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}
256],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[y]}],"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":[y]}
vendor: 4,469 bytes, line 256
256],"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":[cr,_e]}],"outline-w":[{outline:[cr,Or]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[cr,Or]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ir,AT]}],"shadow-color":[{shadow:[$i]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ir,_e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_e]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Mi,_e]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"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",_e]}],accent:[{accent:["auto",e]}],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",_e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"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",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[cr,Or,ef]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
256none"]}]},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"]}}},LT=vT(DT);function F(...e){return LT(Mb(e))}const MT=D2,Zb=f.forwardRef(({className:e,...t},n)=>l.jsx(Rb,{ref:n,className:F("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]",e),...t}));Zb.displayName=Rb.displayName;const $T=el("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"}}),e_=f.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(Ab,{ref:r,className:F($T({variant:t}),e),...n}));e_.displayName=Ab.displayName;const FT=f.forwardRef(({className:e,...t},n)=>l.jsx(Ib,{ref:n,className:F("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",e),...t}));FT.displayName=Ib.displayName;const t_=f.forwardRef(({className:e,...t},n)=>l.jsx(Db,{ref:n,className:F("absolute right-2 top-2 rounded-md p-1 text-foreground
256/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",e),"toast-close":"",...t,children:l.jsx(tn,{className:"h-4 w-4"})}));t_.displayName=Db.displayName;const n_=f.forwardRef(({className:e,...t},n)=>l.jsx(Pb,{ref:n,className:F("text-sm font-semibold",e),...t}));n_.displayName=Pb.displayName;const r_=f.forwardRef(({className:e,...t},n)=>l.jsx(Ob,{ref:n,className:F("text-sm opacity-90",e),...t}));r_.displayName=Ob.displayName;function UT(){const{toasts:e}=Mu();return l.jsxs(MT,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return l.jsxs(e_,{...o,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(n_,{children:n}),r&&l.jsx(r_,{children:r})]}),s,l.jsx(t_,{})]},t)}),l.jsx(Zb,{})]})}var Jv=["light","dark"],zT="(prefers-color-scheme: dark)",BT=f.createContext(void 0),WT={setTheme:e=>{},themes:[]},VT=()=>{var e;return(e=f.useContext(BT))!=null?e:WT};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:c})=>{let u=o==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Jv.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(b,v=!1,x=!0)=>{let y=i?i[b]:b,g=v?b+"|| ''":`'${y}'`,w="";return s&&x&&!v&&Jv.includes(b)&&(w+=`d.style.colorScheme = '${b}';`),n==="class"?v||y?w+=`c.add(${g})`:w+="null":y&&(w+=`d[s](n,${g})`),w},p=e?`!function(){${d}${m(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${zT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${m(i?"x[e]":"e",!0)}}${u?"":"else{"+m(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${m(i?"x[e]":"e",!0)}}else{${m(o,!1,!1)};}${h}}catch(t){}}();`;return f.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var HT=e=>{switch(e){case"success":return GT;case"info":return JT;case"warning":return YT;case"error":return QT;default:return null}},qT=Array(12).fill(0),KT=({visible:e,className:t})=>T.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},T.createElement("div",{className:"sonner-spinner"},qT.map((n,r)=>T.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),GT=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.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"})),YT=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},T.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"})),JT=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.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"})),QT=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.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"})),XT=T.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"},T.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),T.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ZT=()=>{let[e,t]=T.useState(document.hidden);return T.useEffect(()=>{let n=()=>{t(document.hidden)};
256return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ih=1,eR=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ih++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
256this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,o,i=r.then(async c=>{if(o=["resolve",c],T.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(nR(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),a=()=>new Promise((c,u)=>i.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ih++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ft=new eR,tR=(e,t)=>{let n=(t==null?void 0:t.id)||Ih++;return Ft.addToast({title:e,...t,id:n}),n},nR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",rR=tR,sR=()=>Ft.toasts,oR=()=>Ft.getActiveToasts(),tf=Object.assign(rR,{success:Ft.success,info:Ft.info,warning:Ft.warning,error:Ft.error,custom:Ft.custom,message:Ft.message,promise:Ft.promise,dismiss:Ft.dismiss,loading:Ft.loading},{getHistory:sR,getToasts:oR});function iR(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}iR(`: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;
256left: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}
256: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%);
256--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%)} 257`);function Ll(e){return e.label!==void 0}var aR=3,lR="32px",cR="16px",Qv=4e3,uR=356,dR=14,fR=20,hR=200;function Cn(...e){return e.filter(Boolean).join(" ")}function pR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var mR=e=>{var t,n,r,s,o,i,a,c,u,d,h;let{invert:m,toast:p,unstyled:b,interacting:v,setHeights:x,visibleToasts:y,heights:g,index:w,toasts:_,expanded:S,removeToast:k,defaultRichColors:E,closeButton:j,style:A,cancelButtonStyle:O,actionButtonStyle:H,className:K="",descriptionClassName:J="",duration:U,position:le,gap:W,loadingIcon:X,expandByDefault:R,classNames:C,icons:$,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:Z}=e,[ue,fe]=T.useState(null),[he,xe]=T.useState(null),[ge,N]=T.useState(!1),[I,z]=T.useState(!1),[ae,Pe]=T.useState(!1),[je,Le]=T.useState(!1),[He,cn]=T.useState(!1),[un,Mt]=T.useState(0),[qt,ys]=T.useState(0),Sn=T.useRef(p.duration||U||Qv),Kt=T.useRef(null),Qe=T.useRef(null),to=w===0,En=w+1<=y,Ie=p.type,$t=p.dismissible!==!1,_t=p.className||"",Tr=p.descriptionClassName||"",ar=T.useMemo(()=>g.findIndex(M=>M.toastId===p.id)||0,[g,p.id]),Si=T.useMemo(()=>{var M;return(M=p.closeButton)!=null?M:j},[p.closeButton,j]),no=T.useMemo(()=>p.duration||U||Qv,[p.duration,U]),Rr=T.useRef(0),Gt=T.useRef(0),ro=T.useRef(0),lt=T.useRef(null),[P,Q]=le.split("-"),ee=T.useMemo(()=>g.reduce((M,Y,ne)=>ne>=ar?M:M+Y.height,0),[g,ar]),de=ZT(),Ae=p.invert||m,Ce=Ie==="loading";Gt.current=T.useMemo(()=>ar*W+ee,[ar,ee]),T.useEffect(()=>{Sn.current=no},[no]),T.useEffect(()=>{N(!0)},[]),T.useEffect(()=>{let M=Qe.current;if(M){let Y=M.getBoundingClientRect().height;return ys(Y),x(ne=>[{toastId:p.id,height:Y,position:p.position},...ne]),()=>x(ne=>ne.filter(B=>B.toastId!==p.id))}},[x,p.id]),T.useLayoutEffect(()=>{if(!ge)return;let M=Qe.current,Y=M.style.height;M.style.height="auto";let ne=M.getBoundingClientRect().height;M.style.height=Y,ys(ne),x(B=>B.find(G=>G.toastId===p.id)?B.map(G=>G.toastId===p.id?{...G,height:ne}:G):[{toastId:p.id,height:ne,position:p.position},...B])},[ge,p.title,p.description,x,p.id]);let L=T.useCallback(()=>{z(!0),Mt(Gt.current),x(M=>M.filter(Y=>Y.toastId!==p.id)),setTimeout(()=>{k(p)},hR)},[p,k,x,Gt]);T.useEffect(()=>{if(p.promise&&Ie==="loading"||p.duration===1/0||p.type==="loading")return;let M;return S||v||Z&&de?(()=>
257{if(ro.current<Rr.current){let Y=new Date().getTime()-Rr.current;Sn.current=Sn.current-Y}ro.current=new Date().getTime()})():Sn.current!==1/0&&(Rr.current=new Date().getTime(),M=setTimeout(()=>{var Y;(Y=p.onAutoClose)==null||Y.call(p,p),L()},Sn.current)),()=>clearTimeout(M)},[S,v,p,Ie,Z,de,L]),T.useEffect(()=>{p.delete&&L()},[L,p.delete]);function q(){var M,Y,ne;return $!=null&&$.loading?T.createElement("div",{className:Cn(C==null?void 0:C.loader,(M=p==null?void 0:p.classNames)==null?void 0:M.loader,"sonner-loader"),"data-visible":Ie==="loading"},$.loading):X?T.createElement("div",{className:Cn(C==null?void 0:C.loader,(Y=p==null?void 0:p.classNames)==null?void 0:Y.loader,"sonner-loader"),"data-visible":Ie==="loading"},X):T.createElement(KT,{className:Cn(C==null?void 0:C.loader,(ne=p==null?void 0:p.classNames)==null?void 0:ne.loader),visible:Ie==="loading"})}return T.createElement("li",{tabIndex:0,ref:Qe,className:Cn(K,_t,C==null?void 0:C.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[Ie],(n=p==null?void 0:p.classNames)==null?void 0:n[Ie]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":ge,"data-promise":!!p.promise,"data-swiped":He,"data-removed":I,"data-visible":En,"data-y-position":P,"data-x-position":Q,"data-index":w,"data-front":to,"data-swiping":ae,"data-dismissible":$t,"data-type":Ie,"data-invert":Ae,"data-swipe-out":je,"data-swipe-direction":he,"data-expanded":!!(S||R&&ge),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${I?un:Gt.current}px`,"--initial-height":R?"auto":`${qt}px`,...A,...p.style},onDragEnd:()=>{Pe(!1),fe(null),lt.current=null},onPointerDown:M=>{Ce||!$t||(Kt.current=new Date,Mt(Gt.current),M.target.setPointerCapture(M.pointerId),M.target.tagName!=="BUTTON"&&(Pe(!0),lt.current={x:M.clientX,y:M.clientY}))},onPointerUp:()=>{var M,Y,ne,B;if(je||!$t)return;lt.current=null;let G=Number(((M=Qe.current)==null?void 0:M.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),oe=Number(((Y=Qe.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ee=new Date().getTime()-((ne=Kt.current)==null?void 0:ne.getTime()),re=ue==="x"?G:oe,be=Math.abs(re)/Ee;if(Math.abs(re)>=fR||be>.11){Mt(Gt.current),(B=p.onDismiss)==null||B.call(p,p),xe(ue==="x"?G>0?"right":"left":oe>0?"down":"up"),L(),Le(!0),cn(!1);return}Pe(!1),fe(null)},onPointerMove:M=>{var Y,ne,B,G;if(!lt.current||!$t||((Y=window.getSelection())==null?void 0:Y.toString().length)>0)return;let oe=M.clientY-lt.current.y,Ee=M.clientX-lt.current.x,re=(ne=e.swipeDirections)!=null?ne:pR(le);!ue&&(Math.abs(Ee)>1||Math.abs(oe)>1)&&fe(Math.abs(Ee)>Math.abs(oe)?"x":"y");let be={x:0,y:0};ue==="y"?(re.includes("top")||re.includes("bottom"))&&(re.includes("top")&&oe<0||re.includes("bottom")&&oe>0)&&(be.y=oe):ue==="x"&&(re.includes("left")||re.includes("right"))&&(re.includes("left")&&Ee<0||re.includes("right")&&Ee>0)&&(be.x=Ee),(Math.abs(be.x)>0||Math.abs(be.y)>0)&&cn(!0),(B=Qe.current)==null||B.style.setProperty("--swipe-amount-x",`${be.x}px`),(G=Qe.current)==null||G.style.setProperty("--swipe-amount-y",`${be.y}px`)}},Si&&!p.jsx?T.createElement("button",{"aria-label":te,"data-disabled":Ce,"data-close-button":!0,onClick:Ce||!$t?()=>{}:()=>{var M;L(),(M=p.onDismiss)==null||M.call(p,p)},className:Cn(C==null?void 0:C.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(o=$==null?void 0:$.close)!=null?o:XT):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:T.createElement(T.Fragment,null,Ie||p.icon||p.promise?T.createElement("div",{"data-icon":"",className:Cn(C==null?void 0:C.icon,(i=p==null?void 0:p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||q():null,p.type!=="loading"?p.icon||($==null?void 0:$[Ie])||HT(Ie):null):null,T.createElement("div",{"data-content":"",className:Cn(C==null?void 0:C.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},T.createElement("div",{"data-title":"",className:Cn(C==null?void 0:C.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?T.createElement("div",{"data-description":"",className:Cn(J,Tr,C==null?void 0:C.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&Ll(p.cancel)?T.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||O,onClick:M=>{var Y,ne;Ll(p.cancel)&&$t&&((ne=(Y=p.cancel).onClick)==null||ne.call(Y,M),L())},className:Cn(C==null?void 0:C.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&Ll(p.action)?T.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:M=>{var Y,ne;Ll(p.action)&&((ne=(Y=p.action).onClick)==null||ne.call(Y,M),!M.defaultPrevented&&L())},className:Cn(C==null?void 0:C.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};
vendor: 5,434 bytes, line 257
257function Xv(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function gR(e,t){let n={};return[e,t].forEach((r,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?cR:lR;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${i}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(a)}),n}var vR=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:m,style:p,visibleToasts:b=aR,toastOptions:v,dir:x=Xv(),gap:y=dR,loadingIcon:g,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[k,E]=T.useState([]),j=T.useMemo(()=>Array.from(new Set([r].concat(k.filter(Z=>Z.position).map(Z=>Z.position)))),[k,r]),[A,O]=T.useState([]),[H,K]=T.useState(!1),[J,U]=T.useState(!1),[le,W]=T.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=T.useRef(null),R=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=T.useRef(null),$=T.useRef(!1),te=T.useCallback(Z=>{E(ue=>{var fe;return(fe=ue.find(he=>he.id===Z.id))!=null&&fe.delete||Ft.dismiss(Z.id),ue.filter(({id:he})=>he!==Z.id)})},[]);return T.useEffect(()=>Ft.subscribe(Z=>{if(Z.dismiss){E(ue=>ue.map(fe=>fe.id===Z.id?{...fe,delete:!0}:fe));return}setTimeout(()=>{sb.flushSync(()=>{E(ue=>{let fe=ue.findIndex(he=>he.id===Z.id);return fe!==-1?[...ue.slice(0,fe),{...ue[fe],...Z},...ue.slice(fe+1)]:[Z,...ue]})})})}),[]),T.useEffect(()=>{if(d!=="system"){W(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:ue})=>{W(ue?"dark":"light")})}catch{Z.addListener(({matches:fe})=>{try{W(fe?"dark":"light")}catch(he){console.error(he)}})}},[d]),T.useEffect(()=>{k.length<=1&&K(!1)},[k]),T.useEffect(()=>{let Z=ue=>{var fe,he;s.every(xe=>ue[xe]||ue.code===xe)&&(K(!0),(fe=X.current)==null||fe.focus()),ue.code==="Escape"&&(document.activeElement===X.current||(he=X.current)!=null&&he.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[s]),T.useEffect(()=>{if(X.current)return()=>{C.current&&(C.current.focus({preventScroll:!0}),C.current=null,$.current=!1)}},[X.current]),T.createElement("section",{ref:t,"aria-label":`${_} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((Z,ue)=>{var fe;let[he,xe]=Z.split("-");return k.length?T.createElement("ol",{key:Z,dir:x==="auto"?Xv():x,tabIndex:-1,ref:X,className:a,"data-sonner-toaster":!0,"data-theme":le,"data-y-position":he,"data-lifted":H&&k.length>1&&!o,"data-x-position":xe,style:{"--front-toast-height":`${((fe=A[0])==null?void 0:fe.height)||0}px`,"--width":`${uR}px`,"--gap":`${y}px`,...p,...gR(c,u)},onBlur:ge=>{$.current&&!ge.currentTarget.contains(ge.relatedTarget)&&($.current=!1,C.current&&(C.current.focus({preventScroll:!0}),C.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||$.current||($.current=!0,C.current=ge.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{J||K(!1)},onDragEnd:()=>K(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},k.filter(ge=>!ge.position&&ue===0||ge.position===Z).map((ge,N)=>{var I,z;return T.createElement(mR,{key:ge.id,icons:w,index:N,toast:ge,defaultRichColors:h,duration:(I=v==null?void 0:v.duration)!=null?I:m,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:b,closeButton:(z=v==null?void 0:v.closeButton)!=null?z:i,interacting:J,position:Z,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:te,toasts:k.filter(ae=>ae.position==ge.position),heights:A.filter(ae=>ae.position==ge.position),setHeights:O,expandByDefault:o,gap:y,loadingIcon:g,expanded:H,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const yR=({...e})=>{const{theme:t="system"}=VT();return l.jsx(vR,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var wR=xu[" useId ".trim().toString()]||(()=>{}),xR=0;function xr(e){const[t,n]=f.useState(wR());return nr(()=>{n(r=>r??String(xR++))},[e]),t?`radix-${t}`:""}const bR=["top","right","bottom","left"],us=Math.min,Qt=Math.max,Xc=Math.round,Ml=Math.floor,tr=e=>({x:e,y:e}
vendor: 19,325 bytes, line 257
257),_R={left:"right",right:"left",bottom:"top",top:"bottom"},SR={start:"end",end:"start"};function Dh(e,t,n){return Qt(e,us(t,n))}function kr(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function vi(e){return e.split("-")[1]}function vm(e){return e==="x"?"y":"x"}function ym(e){return e==="y"?"height":"width"}const ER=new Set(["top","bottom"]);function Xn(e){return ER.has(Cr(e))?"y":"x"}function wm(e){return vm(Xn(e))}function kR(e,t,n){n===void 0&&(n=!1);const r=vi(e),s=wm(e),o=ym(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Zc(i)),[i,Zc(i)]}function CR(e){const t=Zc(e);return[Lh(e),t,Lh(t)]}function Lh(e){return e.replace(/start|end/g,t=>SR[t])}const Zv=["left","right"],ey=["right","left"],jR=["top","bottom"],NR=["bottom","top"];function TR(e,t,n){switch(e){case"top":case"bottom":return n?t?ey:Zv:t?Zv:ey;case"left":case"right":return t?jR:NR;default:return[]}}function RR(e,t,n,r){const s=vi(e);let o=TR(Cr(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Lh)))),o}function Zc(e){return e.replace(/left|right|bottom|top/g,t=>_R[t])}function AR(e){return{top:0,right:0,bottom:0,left:0,...e}}function s_(e){return typeof e!="number"?AR(e):{top:e,right:e,bottom:e,left:e}}function eu(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ty(e,t,n){let{reference:r,floating:s}=e;const o=Xn(t),i=wm(t),a=ym(i),c=Cr(t),u=o==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,m=r[a]/2-s[a]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(vi(t)){case"start":p[i]-=m*(n&&u?-1:1);break;case"end":p[i]+=m*(n&&u?-1:1);break}return p}const PR=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=ty(u,r,c),m=r,p={},b=0;for(let v=0;v<a.length;v++){const{name:x,fn:y}=a[v],{x:g,y:w,data:_,reset:S}=await y({x:d,y:h,initialPlacement:r,placement:m,strategy:s,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});d=g??d,h=w??h,p={...p,[x]:{...p[x],..._}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:h}=ty(u,m,c)),v=-1)}return{x:d,y:h,placement:m,strategy:s,middlewareData:p}};async function ja(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=kr(t,e),b=s_(p),x=a[m?h==="floating"?"reference":"floating":h],y=eu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),g=h==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=eu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:c}):g);return{top:(y.top-S.top+b.top)/_.y,bottom:(S.bottom-y.bottom+b.bottom)/_.y,left:(y.left-S.left+b.left)/_.x,right:(S.right-y.right+b.right)/_.x}}const OR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=kr(e,t)||{};if(u==null)return{};const h=s_(d),m={x:n,y:r},p=wm(s),b=ym(p),v=await i.getDimensions(u),x=p==="y",y=x?"top":"left",g=x?"bottom":"right",w=x?"clientHeight":"clientWidth",_=o.reference[b]+o.reference[p]-m[p]-o.floating[b],S=m[p]-o.reference[p],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=k?k[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(k)))&&(E=a.floating[w]||o.floating[b]);const j=_/2-S/2,A=E/2-v[b]/2-1,O=us(h[y],A),H=us(h[g],A),K=O,J=E-v[b]-H,U=E/2-v[b]/2+j,le=Dh(K,U,J),W=!c.arrow&&vi(s)!=null&&U!==le&&o.reference[b]/2-(U<K?O:H)-v[b]/2<0,X=W?U<K?U-K:U-J:0;return{[p]:m[p]+X,data:{[p]:le,centerOffset:U-le-X,...W&&{alignmentOffset:X}},reset:W}}}),IR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...x}=kr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Cr(s),g=Xn(a),w=Cr(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=m||(w||!v?[Zc(a)]:CR(a)),k=b!=="none";!m&&k&&S.push(...RR(a,v,b,_));const E=[a,...S],j=await ja(t,x),A=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(j[y]),h){const U=kR(s,i,_);A.push(j[U[0]],j[U[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(U=>U<=0)){var H,K;const U=(((H=o.flip)==null?void 0:H.index)||0)+1,le=E[U];if(le&&(!(h==="alignment"?g!==Xn(le):!1)||O.every(R=>R.overflows[0]>0&&Xn(R.placement)===g)))return{data:{index:U,overflows:O},reset:{placement:le}};let W=(K=O.filter(X=>X.overflows[0]<=0).sort((X,R)=>X.overflows[1]-R.overflows[1])[0])==null?void 0:K.placement;if(!W)switch(p){case"bestFit":{var J;const X=(J=O.filter(R=>{if(k){const C=Xn(R.placement);return C===g||C==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(C=>C>0).reduce((C,$)=>C+$,0)]).sort((R,C)=>R[1]-C[1])[0])==null?void 0:J[0];X&&(W=X);break}case"initialPlacement":W=a;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function ny(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ry(e){return bR.some(t=>e[t]>=0)}const DR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=kr(e,t);switch(r){case"referenceHidden":{const o=await ja(t,{...s,elementContext:"reference"}),i=ny(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ry(i)}}}case"escaped":{const o=await ja(t,{...s,altBoundary:!0}),i=ny(o,n.floating);return{data:{escapedOffsets:i,escaped:ry(i)}}}default:return{}}}}},o_=new Set(["left","top"]);async function LR(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Cr(n),a=vi(n),c=Xn(n)==="y",u=o_.has(i)?-1:1,d=o&&c?-1:1,h=kr(t,e);let{mainAxis:m,crossAxis:p,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"&&(p=a==="end"?b*-1:b),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const MR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await LR(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},$R=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:y,y:g}=x;return{x:y,y:g}}},...c}=kr(e,t),u={x:n,y:r},d=await ja(t,c),h=Xn(Cr(s)),m=vm(h);let p=u[m],b=u[h];if(o){const x=m==="y"?"top":"left",y=m==="y"?"bottom":"right",g=p+d[x],w=p-d[y];p=Dh(g,p,w)}if(i){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",g=b+d[x],w=b-d[y];b=Dh(g,b,w)}const v=a.fn({...t,[m]:p,[h]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:o,[h]:i}}}}}},FR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=kr(e,t),d={x:n,y:r},h=Xn(s),m=vm(h);let p=d[m],b=d[h];const v=kr(a,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",_=o.reference[m]-o.floating[w]+x.mainAxis,S=o.reference[m]+o.reference[w]-x.mainAxis;p<_?p=_:p>S&&(p=S)}if(u){var y,g;const w=m==="y"?"width":"height",_=o_.has(Cr(s)),S=o.reference[h]-o.floating[w]+(_&&((y=i.offset)==null?void 0:y[h])||0)+(_?0:x.crossAxis),k=o.reference[h]+o.reference[w]+(_?0:((g=i.offset)==null?void 0:g[h])||0)-(_?x.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[m]:p,[h]:b}}}},UR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:c=()=>{},...u}=kr(e,t),d=await ja(t,u),h=Cr(s),m=vi(s),p=Xn(s)==="y",{width:b,height:v}=o.floating;let x,y;h==="top"||h==="bottom"?(x=h,y=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,x=m==="end"?"top":"bottom");const g=v-d.top-d.bottom,w=b-d.left-d.right,_=us(v-d[x],g),S=us(b-d[y],w),k=!t.middlewareData.shift;let E=_,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=g),k&&!m){const O=Qt(d.left,0),H=Qt(d.right,0),K=Qt(d.top,0),J=Qt(d.bottom,0);p?j=b-2*(O!==0||H!==0?O+H:Qt(d.left,d.right)):E=v-2*(K!==0||J!==0?K+J:Qt(d.top,d.bottom))}await c({...t,availableWidth:j,availableHeight:E});const A=await i.getDimensions(a.floating);return b!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function zu(){return typeof window<"u"}function yi(e){return i_(e)?(e.nodeName||"").toLowerCase():"#document"}function nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function or(e){var t;return(t=(i_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function i_(e){return zu()?e instanceof Node||e instanceof nn(e).Node:!1}function Un(e){return zu()?e instanceof Element||e instanceof nn(e).Element:!1}function rr(e){return zu()?e instanceof HTMLElement||e instanceof nn(e).HTMLElement:!1}function sy(e){return!zu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nn(e).ShadowRoot}const zR=new Set(["inline","contents"]);function tl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zR.has(s)}const BR=new Set(["table","td","th"]);function WR(e){return BR.has(yi(e))}const VR=[":popover-open",":modal"];function Bu(e){return VR.some(t=>{try{return e.matches(t)}catch{return!1}})}const HR=["transform","translate","scale","rotate","perspective"],qR=["transform","translate","scale","rotate","perspective","filter"],KR=["paint","layout","strict","content"];function xm(e){const t=bm(),n=Un(e)?zn(e):e;return HR.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||qR.some(r=>(n.willChange||"").includes(r))||KR.some(r=>(n.contain||"").includes(r))}function GR(e){let t=ds(e);for(;rr(t)&&!li(t);){if(xm(t))return t;if(Bu(t))return null;t=ds(t)}return null}function bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const YR=new Set(["html","body","#document"]);function li(e){return YR.has(yi(e))}function zn(e){return nn(e).getComputedStyle(e)}function Wu(e){return Un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ds(e){if(yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sy(e)&&e.host||or(e);return sy(t)?t.host:t}function a_(e){const t=ds(e);return li(t)?e.ownerDocument?e.ownerDocument.body:e.body:rr(t)&&tl(t)?t:a_(t)}function Na(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=a_(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=nn(s);if(o){const a=Mh(i);return t.concat(i,i.visualViewport||[],tl(s)?s:[],a&&n?Na(a):[])}return t.concat(s,Na(s,[],n))}function Mh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function l_(e){const t=zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=rr(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=Xc(n)!==o||Xc(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function _m(e){return Un(e)?e:e.contextElement}function Bo(e){const t=_m(e);if(!rr(t))return tr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=l_(t);let i=(o?Xc(n.width):n.width)/r,a=(o?Xc(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const JR=tr(0);function c_(e){const t=nn(e);return!bm()||!t.visualViewport?JR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nn(e)?!1:t}function Gs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=_m(e);let i=tr(1);t&&(r?Un(r)&&(i=Bo(r)):i=Bo(e));const a=QR(o,n,r)?c_(o):tr(0);let c=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,h=s.height/i.y;if(o){const m=nn(o),p=r&&Un(r)?nn(r):r;let b=m,v=Mh(b);for(;v&&r&&p!==b;){const x=Bo(v),y=v.getBoundingClientRect(),g=zn(v),w=y.left+(v.clientLeft+parseFloat(g.paddingLeft))*x.x,_=y.top+(v.clientTop+parseFloat(g.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,h*=x.y,c+=w,u+=_,b=nn(v),v=Mh(b)}}return eu({width:d,height:h,x:c,y:u})}function Sm(e,t){const n=Wu(e).scrollLeft;return t?t.left+n:Gs(or(e)).left+n}function u_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Sm(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function XR(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=or(r),a=t?Bu(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=tr(1);const d=tr(0),h=rr(r);if((h||!h&&!o)&&((yi(r)!=="body"||tl(i))&&(c=Wu(r)),rr(r))){const p=Gs(r);u=Bo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=i&&!h&&!o?u_(i,c,!0):tr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-c.scrollTop*u.y+d.y+m.y}}function ZR(e){return Array.from(e.getClientRects())}function eA(e){const t=or(e),n=Wu(e),r=e.ownerDocument.body,s=Qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Sm(e);const a=-n.scrollTop;return zn(r).direction==="rtl"&&(i+=Qt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function tA(e,t){const n=nn(e),r=or(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const u=bm();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}const nA=new Set(["absolute","fixed"]);function rA(e,t){const n=Gs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=rr(e)?Bo(e):tr(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:a,x:c,y:u}}function oy(e,t,n){let r;if(t==="viewport")r=tA(e,n);else if(t==="document")r=eA(or(e));else if(Un(t))r=rA(t,n);else{const s=c_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return eu(r)}function d_(e,t){const n=ds(e);return n===t||!Un(n)||li(n)?!1:zn(n).position==="fixed"||d_(n,t)}function sA(e,t){const n=t.get(e);if(n)return n;let r=Na(e,[],!1).filter(a=>Un(a)&&yi(a)!=="body"),s=null;const o=zn(e).position==="fixed";let i=o?ds(e):e;for(;Un(i)&&!li(i);){const a=zn(i),c=xm(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&nA.has(s.position)||tl(i)&&!c&&d_(e,i))?r=r.filter(d=>d!==i):s=a,i=ds(i)}return t.set(e,r),r}function oA(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Bu(t)?[]:sA(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,d)=>{const h=oy(t,d,s);return u.top=Qt(h.top,u.top),u.right=us(h.right,u.right),u.bottom=us(h.bottom,u.bottom),u.left=Qt(h.left,u.left),u},oy(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function iA(e){const{width:t,height:n}=l_(e);return{width:t,height:n}}function aA(e,t,n){const r=rr(t),s=or(t),o=n==="fixed",i=Gs(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=tr(0);function u(){c.x=Sm(s)}if(r||!r&&!o)if((yi(t)!=="body"||tl(s))&&(a=Wu(t)),r){const p=Gs(t,!0,o,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else s&&u();o&&!r&&s&&u();const d=s&&!r&&!o?u_(s,a):tr(0),h=i.left+a.scrollLeft-c.x-d.x,m=i.top+a.scrollTop-c.y-d.y;return{x:h,y:m,width:i.width,height:i.height}}function nf(e){return zn(e).position==="static"}function iy(e,t){if(!rr(e)||zn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return or(e)===n&&(n=n.ownerDocument.body),n}function f_(e,t){const n=nn(e);if(Bu(e))return n;if(!rr(e)){let s=ds(e);for(;s&&!li(s);){if(Un(s)&&!nf(s))return s;s=ds(s)}return n}let r=iy(e,t);for(;r&&WR(r)&&nf(r);)r=iy(r,t);return r&&li(r)&&nf(r)&&!xm(r)?n:r||GR(e)||n}const lA=async function(e){const t=this.getOffsetParent||f_,n=this.getDimensions,r=await n(e.floating);return{reference:aA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cA(e){return zn(e).direction==="rtl"}const uA={convertOffsetParentRelativeRectToViewportRelativeRect:XR,getDocumentElement:or,getClippingRect:oA,getOffsetParent:f_,getElementRects:lA,getClientRects:ZR,getDimensions:iA,getScale:Bo,isElement:Un,isRTL:cA};function h_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dA(e,t){let n=null,r;const s=or(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:d,top:h,width:m,height:p}=u;if(a||t(),!m||!p)return;const b=Ml(h),v=Ml(s.clientWidth-(d+m)),x=Ml(s.clientHeight-(h+p)),y=Ml(d),w={rootMargin:-b+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Qt(0,us(1,c))||1};let _=!0;function S(k){const E=k[0].intersectionRatio;if(E!==c){if(!_)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!h_(u,e.getBoundingClientRect())&&i(),_=!1}try{n=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),o}function fA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=_m(e),d=s||o?[...u?Na(u):[],...Na(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const h=u&&a?dA(u,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(y=>{let[g]=y;g&&g.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,v=c?Gs(e):null;c&&x();function x(){const y=Gs(e);v&&!h_(v,y)&&n(),v=y,b=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(g=>{s&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),h==null||h(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const hA=MR,pA=$R,mA=IR,gA=UR,vA=DR,ay=OR,yA=FR,wA=(e,t,n)=>{const r=new Map,s={platform:uA,...n},o={...s.platform,_c:r};return PR(e,t,{...s,platform:o})};var xA=typeof document<"u",bA=function(){},wc=xA?f.useLayoutEffect:bA;function tu(e,t){if(e===t)return!0;
vendor: 4,146 bytes, line 257
257if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!tu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function p_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ly(e,t){const n=p_(e);return Math.round(t*n)/n}function rf(e){const t=f.useRef(e);return wc(()=>{t.current=e}),t}function _A(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,h]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=f.useState(r);tu(m,r)||p(r);const[b,v]=f.useState(null),[x,y]=f.useState(null),g=f.useCallback(R=>{R!==k.current&&(k.current=R,v(R))},[]),w=f.useCallback(R=>{R!==E.current&&(E.current=R,y(R))},[]),_=o||b,S=i||x,k=f.useRef(null),E=f.useRef(null),j=f.useRef(d),A=c!=null,O=rf(c),H=rf(s),K=rf(u),J=f.useCallback(()=>{if(!k.current||!E.current)return;const R={placement:t,strategy:n,middleware:m};H.current&&(R.platform=H.current),wA(k.current,E.current,R).then(C=>{const $={...C,isPositioned:K.current!==!1};U.current&&!tu(j.current,$)&&(j.current=$,Ja.flushSync(()=>{h($)}))})},[m,t,n,H,K]);wc(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(R=>({...R,isPositioned:!1})))},[u]);const U=f.useRef(!1);wc(()=>(U.current=!0,()=>{U.current=!1}),[]),wc(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(O.current)return O.current(_,S,J);J()}},[_,S,J,O,A]);const le=f.useMemo(()=>({reference:k,floating:E,setReference:g,setFloating:w}),[g,w]),W=f.useMemo(()=>({reference:_,floating:S}),[_,S]),X=f.useMemo(()=>{const R={position:n,left:0,top:0};if(!W.floating)return R;const C=ly(W.floating,d.x),$=ly(W.floating,d.y);return a?{...R,transform:"translate("+C+"px, "+$+"px)",...p_(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:C,top:$}},[n,a,W.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:J,refs:le,elements:W,floatingStyles:X}),[d,J,le,W,X])}const SA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ay({element:r.current,padding:s}).fn(n):{}:r?ay({element:r,padding:s}).fn(n):{}}}},EA=(e,t)=>({...hA(e),options:[e,t]}),kA=(e,t)=>({...pA(e),options:[e,t]}),CA=(e,t)=>({...yA(e),options:[e,t]}),jA=(e,t)=>({...mA(e),options:[e,t]}),NA=(e,t)=>({...gA(e),options:[e,t]}),TA=(e,t)=>({...vA(e),options:[e,t]}),RA=(e,t)=>({...SA(e),options:[e,t]});var AA="Arrow",m_=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return l.jsx(ye.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});m_.displayName=AA;var PA=m_;function Em(e){const[t,n]=f.useState(void 0);return nr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var km="Popper",[g_,Vu]=Ht(km),[OA,v_]=g_(km),y_=e=>{const{__scopePopper:t,children:n}=e,[r,s]=f.useState(null);return l.jsx(OA,{scope:t,anchor:r,onAnchorChange:s,children:n})};y_.displayName=km;var w_="PopperAnchor",x_=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=v_(w_,n),i=f.useRef(null),a=De(t,i);return f.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:l.jsx(ye.div,{...s,ref:a})});x_.displayName=w_;var Cm="PopperContent",[IA,DA]=g_(Cm),b_=f.forwardRef((e,t)=>
vendor: 4,887 bytes, line 257
257{var ge,N,I,z,ae,Pe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:b,...v}=e,x=v_(Cm,n),[y,g]=f.useState(null),w=De(t,je=>g(je)),[_,S]=f.useState(null),k=Em(_),E=(k==null?void 0:k.width)??0,j=(k==null?void 0:k.height)??0,A=r+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},H=Array.isArray(u)?u:[u],K=H.length>0,J={padding:O,boundary:H.filter(MA),altBoundary:K},{refs:U,floatingStyles:le,placement:W,isPositioned:X,middlewareData:R}=_A({strategy:"fixed",placement:A,whileElementsMounted:(...je)=>fA(...je,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[EA({mainAxis:s+j,alignmentAxis:i}),c&&kA({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?CA():void 0,...J}),c&&jA({...J}),NA({...J,apply:({elements:je,rects:Le,availableWidth:He,availableHeight:cn})=>{const{width:un,height:Mt}=Le.reference,qt=je.floating.style;qt.setProperty("--radix-popper-available-width",`${He}px`),qt.setProperty("--radix-popper-available-height",`${cn}px`),qt.setProperty("--radix-popper-anchor-width",`${un}px`),qt.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),_&&RA({element:_,padding:a}),$A({arrowWidth:E,arrowHeight:j}),m&&TA({strategy:"referenceHidden",...J})]}),[C,$]=E_(W),te=sn(b);nr(()=>{X&&(te==null||te())},[X,te]);const Z=(ge=R.arrow)==null?void 0:ge.x,ue=(N=R.arrow)==null?void 0:N.y,fe=((I=R.arrow)==null?void 0:I.centerOffset)!==0,[he,xe]=f.useState();return nr(()=>{y&&xe(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:X?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(z=R.transformOrigin)==null?void 0:z.x,(ae=R.transformOrigin)==null?void 0:ae.y].join(" "),...((Pe=R.hide)==null?void 0:Pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(IA,{scope:n,placedSide:C,onArrowChange:S,arrowX:Z,arrowY:ue,shouldHideArrow:fe,children:l.jsx(ye.div,{"data-side":C,"data-align":$,...v,ref:w,style:{...v.style,animation:X?void 0:"none"}})})})});b_.displayName=Cm;var __="PopperArrow",LA={top:"bottom",right:"left",bottom:"top",left:"right"},S_=f.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=DA(__,r),i=LA[o.placedSide];return l.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:l.jsx(PA,{...s,ref:n,style:{...s.style,display:"block"}})})});S_.displayName=__;function MA(e){return e!==null}var $A=e=>({name:"transformOrigin",options:e,fn(t){var x,y,g;const{placement:n,rects:r,middlewareData:s}=t,i=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=E_(n),h={start:"0%",center:"50%",end:"100%"}[d],m=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,p=(((g=s.arrow)==null?void 0:g.y)??0)+c/2;let b="",v="";return u==="bottom"?(b=i?h:`${m}px`,v=`${-c}px`):u==="top"?(b=i?h:`${m}px`,v=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,v=i?h:`${p}px`):u==="left"&&(b=`${r.floating.width+c}px`,v=i?h:`${p}px`),{data:{x:b,y:v}}}});function E_(e){const[t,n="center"]=e.split("-");return[t,n]}var k_=y_,C_=x_,j_=b_,N_=S_,FA=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"}),UA="VisuallyHidden",T_=f.forwardRef((e,t)=>l.jsx(ye.span,{...e,ref:t,style:{...FA,...e.style}}));T_.displayName=UA;var zA=T_,[Hu,hU]=Ht("Tooltip",[Vu]),qu=Vu(),R_="TooltipProvider",BA=700,$h="tooltip.open",[WA,jm]=Hu(R_),A_=e=>{const{__scopeTooltip:t,delayDuration:n=BA,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,i=f.useRef(!0),a=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(WA,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:o})};A_.displayName=R_;var Ta="Tooltip",[VA,Ku]=Hu(Ta),P_=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=jm(Ta,e.__scopeTooltip),u=qu(t),[d,h]=f.useState(null),m=xr(
vendor: 4,669 bytes, line 257
257),p=f.useRef(0),b=i??c.disableHoverableContent,v=a??c.delayDuration,x=f.useRef(!1),[y,g]=sr({prop:r,defaultProp:s??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent($h))):c.onClose(),o==null||o(E)},caller:Ta}),w=f.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),_=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,g(!0)},[g]),S=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),k=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,g(!0),p.current=0},v)},[v,g]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),l.jsx(k_,{...u,children:l.jsx(VA,{scope:t,contentId:m,open:y,stateAttribute:w,trigger:d,onTriggerChange:h,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayedRef.current?k():_()},[c.isOpenDelayedRef,k,_]),onTriggerLeave:f.useCallback(()=>{b?S():(window.clearTimeout(p.current),p.current=0)},[S,b]),onOpen:_,onClose:S,disableHoverableContent:b,children:n})})};P_.displayName=Ta;var Fh="TooltipTrigger",O_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ku(Fh,n),o=jm(Fh,n),i=qu(n),a=f.useRef(null),c=De(t,a,s.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),h=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(C_,{asChild:!0,...i,children:l.jsx(ye.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ie(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ie(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ie(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ie(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ie(e.onBlur,s.onClose),onClick:ie(e.onClick,s.onClose)})})});O_.displayName=Fh;var HA="TooltipPortal",[pU,qA]=Hu(HA,{forceMount:void 0}),ci="TooltipContent",I_=f.forwardRef((e,t)=>{const n=qA(ci,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Ku(ci,e.__scopeTooltip);return l.jsx(ln,{present:r||i.open,children:i.disableHoverableContent?l.jsx(D_,{side:s,...o,ref:t}):l.jsx(KA,{side:s,...o,ref:t})})}),KA=f.forwardRef((e,t)=>{const n=Ku(ci,e.__scopeTooltip),r=jm(ci,e.__scopeTooltip),s=f.useRef(null),o=De(t,s),[i,a]=f.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,m=f.useCallback(()=>{a(null),h(!1)},[h]),p=f.useCallback((b,v)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},g=XA(y,x.getBoundingClientRect()),w=ZA(y,g),_=eP(v.getBoundingClientRect()),S=nP([...w,..._]);a(S),h(!0)},[h]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(c&&d){const b=x=>p(x,d),v=x=>p(x,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",v)}}},[c,d,p,m]),f.useEffect(()=>{if(i){const b=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},g=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),w=!tP(y,i);g?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,i,u,m]),l.jsx(D_,{...e,ref:o})}),[GA,YA]=Hu(Ta,{isInside:!1}),JA=YN("TooltipContent"),D_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Ku(ci,n),u=qu(n),{onClose:d}=c;return f.useEffect(()=>(document.addEventListener($h,d),()=>document.removeEventListener($h,d)),[d]),f.useEffect(()=>{if(c.trigger){const h=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),l.jsx(Xa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:l.jsxs(j_,{"data-state":c.stateAttribute,...u,...a,ref:t,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:[l.jsx(JA,{children:r}),l.jsx(GA,{scope:n,isInside:!0,children:l.jsx(zA,{id:c.contentId,role:"tooltip",children:s||r})})]})})});I_.displayName=ci;var L_="TooltipArrow",QA=f.forwardRef((e,t)=>
257{const{__scopeTooltip:n,...r}=e,s=qu(n);return YA(L_,n).isInside?null:l.jsx(N_,{...s,...r,ref:t})});QA.displayName=L_;function XA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ZA(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function eP(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function tP(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],c=t[i],u=a.x,d=a.y,h=c.x,m=c.y;d>r!=m>r&&n<(h-u)*(r-d)/(m-d)+u&&(s=!s)}return s}function nP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),rP(t)}function rP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var sP=A_,oP=P_,iP=O_,M_=I_;const aP=sP,mU=oP,gU=iP,lP=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(M_,{ref:r,sideOffset:t,className:F("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",e),...n}));lP.displayName=M_.displayName;var Gu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yu=typeof window>"u"||"Deno"in globalThis;function Tn(){}function cP(e,t){return typeof e=="function"?e(t):e}function uP(e){return typeof e=="number"&&e>=0&&e!==1/0}function dP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Uh(e,t){return typeof e=="function"?e(t):e}function fP(e,t){return typeof e=="function"?e(t):e}function cy(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Nm(i,t.options))return!1}else if(!Aa(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function uy(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ra(t.options.mutationKey)!==Ra(o))return!1}else if(!Aa(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Nm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ra)(e)}function Ra(e){return JSON.stringify(e,(t,n)=>zh(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Aa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Aa(e[n],t[n])):!1}function $_(e,t){if(e===t)return e;const n=dy(e)&&dy(t);if(n||zh(e)&&zh(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<i;d++){const h=n?d:o[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,u++):(a[h]=$_(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&u++)}return s===i&&u===s?e:a}return t}function dy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zh(e){if(!fy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!fy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function fy(e){return Object.prototype.toString.call(e)==="[object Object]"}function hP(e){return new Promise(t=>{setTimeout(t,e)})}function pP(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$_(e,t):t}function mP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function gP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tm=Symbol();function F_(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Os,Vr,qo,$0,vP=($0=class extends Gu{constructor(){super();Te(this,Os);Te(this,Vr);Te(this,qo);we(this,qo,t=>{if(!Yu&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}
vendor: 5,328 bytes, line 257
257onSubscribe(){D(this,Vr)||this.setEventListener(D(this,qo))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Vr))==null||t.call(this),we(this,Vr,void 0))}setEventListener(t){var n;we(this,qo,t),(n=D(this,Vr))==null||n.call(this),we(this,Vr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,Os)!==t&&(we(this,Os,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,Os)=="boolean"?D(this,Os):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Os=new WeakMap,Vr=new WeakMap,qo=new WeakMap,$0),U_=new vP,Ko,Hr,Go,F0,yP=(F0=class extends Gu{constructor(){super();Te(this,Ko,!0);Te(this,Hr);Te(this,Go);we(this,Go,t=>{if(!Yu&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,Hr)||this.setEventListener(D(this,Go))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Hr))==null||t.call(this),we(this,Hr,void 0))}setEventListener(t){var n;we(this,Go,t),(n=D(this,Hr))==null||n.call(this),we(this,Hr,t(this.setOnline.bind(this)))}setOnline(t){D(this,Ko)!==t&&(we(this,Ko,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,Ko)}},Ko=new WeakMap,Hr=new WeakMap,Go=new WeakMap,F0),nu=new yP;function wP(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function xP(e){return Math.min(1e3*2**e,3e4)}function z_(e){return(e??"online")==="online"?nu.isOnline():!0}var B_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function sf(e){return e instanceof B_}function W_(e){let t=!1,n=0,r=!1,s;const o=wP(),i=v=>{var x;r||(m(new B_(v)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},c=()=>{t=!1},u=()=>U_.isFocused()&&(e.networkMode==="always"||nu.isOnline())&&e.canRun(),d=()=>z_(e.networkMode)&&e.canRun(),h=v=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,v),s==null||s(),o.resolve(v))},m=v=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,v),s==null||s(),o.reject(v))},p=()=>new Promise(v=>{var x;s=y=>{(r||u())&&v(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;s=void 0,r||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(r)return;let v;const x=n===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(h).catch(y=>{var k;if(r)return;const g=e.retry??(Yu?0:3),w=e.retryDelay??xP,_=typeof w=="function"?w(n,y):w,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,y);if(t||!S){m(y);return}n++,(k=e.onFail)==null||k.call(e,n,y),hP(_).then(()=>u()?void 0:p()).then(()=>{t?m(y):b()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?b():p().then(b),o)}}var bP=e=>setTimeout(e,0);function _P(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=bP;const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{o(()=>{a(...c)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Pt=_P(),Is,U0,V_=(U0=class{constructor(){Te(this,Is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uP(this.gcTime)&&we(this,Is,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yu?1/0:5*60*1e3))}clearGcTimeout(){D(this,Is)&&(clearTimeout(D(this,Is)),we(this,Is,void 0))}},Is=new WeakMap,U0),Yo,Ds,pn,Ls,Ct,Wa,Ms,An,dr,z0,SP=(z0=class extends V_{constructor(t){super();Te(this,An);Te(this,Yo);Te(this,Ds);Te(this,pn);Te(this,Ls);Te(this,Ct);Te(this,Wa);Te(this,Ms);we(this,Ms,!1),we(this,Wa,t.defaultOptions),this.setOptions(t.options),this.observers=[],we(this,Ls,t.client),we(this,pn,D(this,Ls).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,we(this,Yo,kP(this.options)),this.state=t.state??D(this,Yo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,Ct))==null?void 0:t.promise}setOptions(t){this.options={...D(this,Wa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,pn).remove(this)}setData(t,n){const r=pP(this.state.data,t,this.options);return St(this,An,dr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){St(this,An,dr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=D(this,Ct))==null?void 0:r.promise;return(s=D(this,Ct))==null||s.cancel(t),n?n.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,Yo))}isActive(){return this.observers.some(t=>fP(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tm||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 257
257Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Uh(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!dP(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Ct))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,Ct))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,pn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,Ct)&&(D(this,Ms)?D(this,Ct).cancel({revert:!0}):D(this,Ct).cancelRetry()),this.scheduleGc()),D(this,pn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||St(this,An,dr).call(this,{type:"invalidate"})}
vendor: 8,667 bytes, line 257
257fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,Ct))return D(this,Ct).continueRetry(),D(this,Ct).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,s=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(we(this,Ms,!0),r.signal)})},o=()=>{const m=F_(this.options,n),b=(()=>{const v={client:D(this,Ls),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return we(this,Ms,!1),this.options.persister?this.options.persister(m,b,this):m(b)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Ls),state:this.state,fetchFn:o};return s(m),m})();(u=this.options.behavior)==null||u.onFetch(a,this),we(this,Ds,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&St(this,An,dr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const c=m=>{var p,b,v,x;sf(m)&&m.silent||St(this,An,dr).call(this,{type:"error",error:m}),sf(m)||((b=(p=D(this,pn).config).onError)==null||b.call(p,m,this),(x=(v=D(this,pn).config).onSettled)==null||x.call(v,this.state.data,m,this)),this.scheduleGc()};return we(this,Ct,W_({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var p,b,v,x;if(m===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(y){c(y);return}(b=(p=D(this,pn).config).onSuccess)==null||b.call(p,m,this),(x=(v=D(this,pn).config).onSettled)==null||x.call(v,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,p)=>{St(this,An,dr).call(this,{type:"failed",failureCount:m,error:p})},onPause:()=>{St(this,An,dr).call(this,{type:"pause"})},onContinue:()=>{St(this,An,dr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),D(this,Ct).start()}},Yo=new WeakMap,Ds=new WeakMap,pn=new WeakMap,Ls=new WeakMap,Ct=new WeakMap,Wa=new WeakMap,Ms=new WeakMap,An=new WeakSet,dr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...EP(r.data,this.options),fetchMeta:t.meta??null};case"success":return we(this,Ds,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return sf(s)&&s.revert&&D(this,Ds)?{...D(this,Ds),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Pt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,pn).notify({query:this,type:"updated",action:t})})},z0);function EP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kn,B0,CP=(B0=class extends Gu{constructor(t={}){super();Te(this,Kn);this.config=t,we(this,Kn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Nm(s,n);let i=this.get(o);return i||(i=new SP({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){D(this,Kn).has(t.queryHash)||(D(this,Kn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,Kn).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,Kn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Pt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,Kn).get(t)}getAll(){return[...D(this,Kn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>cy(t,r)):n}notify(t){Pt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kn=new WeakMap,B0),Gn,Rt,$s,Yn,Lr,W0,jP=(W0=class extends V_{constructor(t){super();Te(this,Yn);Te(this,Gn);Te(this,Rt);Te(this,$s);this.mutationId=t.mutationId,we(this,Rt,t.mutationCache),we(this,Gn,[]),this.state=t.state||NP(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,Gn).includes(t)||(D(this,Gn).push(t),this.clearGcTimeout(),D(this,Rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){we(this,Gn,D(this,Gn).filter(n=>n!==t)),this.scheduleGc(),D(this,Rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,Gn).length||(this.state.status==="pending"?this.scheduleGc():D(this,Rt).remove(this))}continue(){var t;return((t=D(this,$s))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,c,u,d,h,m,p,b,v,x,y,g,w,_,S,k,E,j;const n=()=>{St(this,Yn,Lr).call(this,{type:"continue"})};we(this,$s,W_({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{St(this,Yn,Lr).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{St(this,Yn,Lr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,Rt).canRun(this)}));const r=this.state.status==="pending",s=!D(this,$s).canStart();try{if(r)n();else{St(this,Yn,Lr).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=D(this,Rt).config).onMutate)==null?void 0:i.call(o,t,this));const O=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,t));O!==this.state.context&&St(this,Yn,Lr).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const A=await D(this,$s).start();return await((d=(u=D(this,Rt).config).onSuccess)==null?void 0:d.call(u,A,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,A,t,this.state.context)),await((b=(p=D(this,Rt).config).onSettled)==null?void 0:b.call(p,A,null,this.state.variables,this.state.context,this)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,A,null,t,this.state.context)),St(this,Yn,Lr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((g=(y=D(this,Rt).config).onError)==null?void 0:g.call(y,A,t,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,A,t,this.state.context)),await((k=(S=D(this,Rt).config).onSettled)==null?void 0:k.call(S,void 0,A,this.state.variables,this.state.context,this)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,A,t,this.state.context)),A}finally{St(this,Yn,Lr).call(this,{type:"error",error:A})}}finally{D(this,Rt).runNext(this)}}},Gn=new WeakMap,Rt=new WeakMap,$s=new WeakMap,Yn=new WeakSet,Lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Pt.batch(()=>{D(this,Gn).forEach(r=>{r.onMutationUpdate(t)}),D(this,Rt).notify({mutation:this,type:"updated",action:t})})},W0);function NP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}
257var gr,Pn,Va,V0,TP=(V0=class extends Gu{constructor(t={}){super();Te(this,gr);Te(this,Pn);Te(this,Va);this.config=t,we(this,gr,new Set),we(this,Pn,new Map),we(this,Va,0)}build(t,n,r){const s=new jP({mutationCache:this,mutationId:++ml(this,Va)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){D(this,gr).add(t);const n=$l(t);if(typeof n=="string"){const r=D(this,Pn).get(n);r?r.push(t):D(this,Pn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,gr).delete(t)){const n=$l(t);if(typeof n=="string"){const r=D(this,Pn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&D(this,Pn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=$l(t);if(typeof n=="string"){const r=D(this,Pn).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=$l(t);if(typeof n=="string"){const s=(r=D(this,Pn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Pt.batch(()=>{D(this,gr).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,gr).clear(),D(this,Pn).clear()})}getAll(){return Array.from(D(this,gr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uy(n,r))}findAll(t={}){return this.getAll().filter(n=>uy(t,n))}notify(t){Pt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Pt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tn))))}},gr=new WeakMap,Pn=new WeakMap,Va=new WeakMap,V0);function $l(e){var t;return(t=e.options.scope)==null?void 0:t.id}function hy(e){return{onFetch:(t,n)=>{var d,h,m,p,b;const r=t.options,s=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((p=t.state.data)==null?void 0:p.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},y=F_(t.options,t.fetchOptions),g=async(w,_,S)=>{if(v)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return x(H),H})(),j=await y(E),{maxPages:A}=t.options,O=S?gP:mP;return{pages:O(w.pages,j,A),pageParams:O(w.pageParams,_,A)}};if(s&&o.length){const w=s==="backward",_=w?RP:py,S={pages:o,pageParams:i},k=_(r,S);a=await g(S,k,w)}else{const w=e??o.length;do{const _=c===0?i[0]??r.initialPageParam:py(r,a);if(c>0&&_==null)break;a=await g(a,_),c++}while(c<w)}return a};t.options.persister?t.fetchFn=()=>{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function py(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function RP(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Xe,qr,Kr,Jo,Qo,Gr,Xo,Zo,H0,AP=(H0=class{constructor(e={}){Te(this,Xe);Te(this,qr);Te(this,Kr);Te(this,Jo);Te(this,Qo);Te(this,Gr);Te(this,Xo);Te(this,Zo);we(this,Xe,e.queryCache||new CP),we(this,qr,e.mutationCache||new TP),we(this,Kr,e.defaultOptions||{}),we(this,Jo,new Map),we(this,Qo,new Map),we(this,Gr,0)}mount(){ml(this,Gr)._++,D(this,Gr)===1&&(we(this,Xo,U_.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Xe).onFocus())})),we(this,Zo,nu.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Xe).onOnline())})))}unmount(){var e,t;ml(this,Gr)._--,D(this,Gr)===0&&((e=D(this,Xo))==null||e.call(this),we(this,Xo,void 0),(t=D(this,Zo))==null||t.call(this),we(this,Zo,void 0))}isFetching(e){return D(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,qr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,Xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,Xe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Uh(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return D(this,Xe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=D(this,Xe).get(r.queryHash),o=s==null?void 0:s.state.data,i=cP(t,o);if(i!==void 0)return D(this,Xe).build(this,r).setData(i,{...n,manual:!0})}
257setQueriesData(e,t,n){return Pt.batch(()=>D(this,Xe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,Xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,Xe);Pt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,Xe);return Pt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Pt.batch(()=>D(this,Xe).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Tn).catch(Tn)}invalidateQueries(e,t={}){return Pt.batch(()=>(D(this,Xe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Pt.batch(()=>D(this,Xe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Tn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Tn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,Xe).build(this,t);return n.isStaleByTime(Uh(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tn).catch(Tn)}fetchInfiniteQuery(e){return e.behavior=hy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tn).catch(Tn)}ensureInfiniteQueryData(e){return e.behavior=hy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nu.isOnline()?D(this,qr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,Xe)}getMutationCache(){return D(this,qr)}getDefaultOptions(){return D(this,Kr)}setDefaultOptions(e){we(this,Kr,e)}setQueryDefaults(e,t){D(this,Jo).set(Ra(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,Jo).values()],n={};return t.forEach(r=>{Aa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){D(this,Qo).set(Ra(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,Qo).values()],n={};return t.forEach(r=>{Aa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,Kr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Nm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Tm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,Kr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,Xe).clear(),D(this,qr).clear()}},Xe=new WeakMap,qr=new WeakMap,Kr=new WeakMap,Jo=new WeakMap,Qo=new WeakMap,Gr=new WeakMap,Xo=new WeakMap,Zo=new WeakMap,H0),PP=f.createContext(void 0),OP=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(PP.Provider,{value:e,children:t}));/** 258 * @remix-run/router v1.23.0 259 * 260 * Copyright (c) Remix Software Inc. 261 * 262 * This source code is licensed under the MIT license found in the 263 * LICENSE.md file in the root directory of this source tree. 264 * 265 * @license MIT 266 */function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pa.apply(this,arguments)}var Qr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Qr||(Qr={}));const my="popstate";function IP(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:i,hash:a}=r.location;return Bh("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:ru(s)}return LP(t,n,null,e)}function it(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function H_(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DP(){return Math.random().toString(36).substr(2,8)}function gy(e,t){return{usr:e.state,key:e.key,idx:t}}function Bh(e,t,n,r){return n===void 0&&(n=null),Pa({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?wi(t):t,{state:n,key:t&&t.key||r||DP()})}function ru(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function wi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function LP(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Qr.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Pa({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function h(){a=Qr.Pop;let x=d(),y=x==null?null:x-u;u=x,c&&c({action:a,location:v.location,delta:y})}function m(x,y){a=Qr.Push;let g=Bh(v.location,x,y);u=d()+1;let w=gy(g,u),_=v.createHref(g);try{i.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}o&&c&&c({action:a,location:v.location,delta:1})}function p(x,y){a=Qr.Replace;let g=Bh(v.location,x,y);u=d();let w=gy(g,u),_=v.createHref(g);i.replaceState(w,"",_),o&&c&&c({action:a,location:v.location,delta:0})}function b(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof x=="str
266ing"?x:ru(x);return g=g.replace(/ $/,"%20"),it(y,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,y)}let v={get action(){return a},get location(){return e(s,i)},listen(x){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(my,h),c=x,()=>{s.removeEventListener(my,h),c=null}},createHref(x){return t(s,x)},createURL:b,encodeLocation(x){let y=b(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:m,replace:p,go(x){return i.go(x)}};return v}var vy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(vy||(vy={}));function MP(e,t,n){return n===void 0&&(n="/"),$P(e,t,n,!1)}function $P(e,t,n,r){let s=typeof t=="string"?wi(t):t,o=Rm(s.pathname||"/",n);if(o==null)return null;let i=q_(e);FP(i);let a=null;for(let c=0;a==null&&c<i.length;++c){let u=JP(o);a=GP(i[c],u,r)}return a}function q_(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(it(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=is([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(it(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),q_(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:qP(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let c of K_(o.path))s(o,i,c)}),t}function K_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=K_(r.join("/")),a=[];return a.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&a.push(...i),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function FP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:KP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const UP=/^:[\w-]+$/,zP=3,BP=2,WP=1,VP=10,HP=-2,yy=e=>e==="*";function qP(e,t){let n=e.split("/"),r=n.length;return n.some(yy)&&(r+=HP),t&&(r+=BP),n.filter(s=>!yy(s)).reduce((s,o)=>s+(UP.test(o)?zP:o===""?WP:VP),r)}function KP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function GP(e,t,n){let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",h=wy({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=wy({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,263 bytes, lines 266-275
266Object.assign(s,h.params),i.push({params:s,pathname:is([o,h.pathname]),pathnameBase:eO(is([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=is([o,h.pathnameBase]))}return i}function wy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=YP(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:m,isOptional:p}=d;if(m==="*"){let v=a[h]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const b=a[h];return p&&!b?u[m]=void 0:u[m]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function YP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),H_(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function JP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return H_(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Rm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function QP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?wi(e):e;return{pathname:n?n.startsWith("/")?n:XP(n,t):t,search:tO(r),hash:nO(s)}}function XP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function of(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ZP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function G_(e,t){let n=ZP(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Y_(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=wi(e):(s=Pa({},e),it(!s.pathname||!s.pathname.includes("?"),of("?","pathname","search",s)),it(!s.pathname||!s.pathname.includes("#"),of("#","pathname","hash",s)),it(!s.search||!s.search.includes("#"),of("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let h=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}a=h>=0?t[h]:"/"}let c=QP(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const is=e=>e.join("/").replace(/\/\/+/g,"/"),eO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const J_=["post","put","patch","delete"];new Set(J_);const sO=["get",...J_];new Set(sO);/** 267 * React Router v6.30.1 268 * 269 * Copyright (c) Remix Software Inc. 270 * 271 * This source code is licensed under the MIT license found in the 272 * LICENSE.md file in the root directory of this source tree. 273 * 274 * @license MIT 275 */function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oa.apply(this,arguments)}const Am=f.createContext(null),oO=f.createContext(null),Xs=f.createContext(null),Ju=f.createContext(null),gs=f.createContext({outlet:null,matches:[],isDataRoute:!1}),Q_=f.createContext(null);function iO(e,t){let{relative:n}=t===void 0?{}:t;nl()||it(!1);let{basename:r,navigator:s}=f.useContext(Xs),{hash:o,pathname:i,search:a}=Z_(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:is([r,i])),s.createHref({pathname:c,search:a,hash:o})}function nl(){return f.useContext(Ju)!=null}function ir(){return nl()||it(!1),f.useContext(Ju).location}function X_(e){f.useContext(Xs).static||f.useLayoutEffect(e)}function xi(){let{isDataRoute:e}=f.useContext(gs);return e?wO():aO()}function aO(){nl()||it(!1);let e=f.useContext(Am),{basename:t,future:n,navigator:r}=f.useContext(Xs),{matches:s}=f.useContext(gs),{pathname:o}=ir(),i=JSON.stringify(G_(s,n.v7_relativeSplatPath)),a=f.useRef(!1);return X_(()=>{a.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let h=Y_(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:is([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,i,o,e])}function vU(){let{matches:e}=f.useContext(gs),t=e[e.length-1];return t?t.params:{}}function Z_(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=f.useContext(Xs),{matches:s}=f.useContext(gs),{pathname:o}=ir(),i=JSON.stringify(G_(s,r.v7_relativeSplatPath));return f.useMemo(()=>Y_(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function lO(e,t){return cO(e,t)}function cO(e,t,n,r){nl()||it(!1);let{navigator:s}=f.useContext(Xs),{matches:o}=f.useContext(gs),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=ir(),d;if(t){var h;let x=typeof t=="string"?wi(t):t;c==="/"||(h=x.pathname)!=null&&h.startsWith(c)||it(!1),d=x}else d=u;let m=d.pathname||"/",p=m;if(c!=="/"){let x=c.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=MP(e,{pathname:p}),v=pO(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:is([c,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:is([c,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,n,r);return t&&v?f.createElement(Ju.Provider,{value:{location:Oa({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Qr.Pop}},v):v}function uO(){let e=yO(),t=rO(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:s},n):null,null)}const dO=f.createElement(uO,null);class fO extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(gs.Provider,{value:this.props.routeContext},f.createElement(Q_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hO(e){let{routeContext:t,match:n,children:r}=e,s=f.useContext(Am);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(gs.Provider,{value:t},r)}function pO(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||it(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:m,errors:p}=n,b=h.route.loader&&m[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||b){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,h,m)=>{let p,b=!1,v=null,x=null;n&&(p=a&&h.route.id?a[h.route.id]:void 0,v=h.route.errorElement||dO,c&&(u<0&&m===0?(b=!0,x=null):u===m&&(b=!0,x=h.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,m+1)),g=()=>{let w;return p?w=v:b?w=x:h.route.Component?w=f.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,f.createElement(hO,{match:h,routeC
275ontext:{outlet:d,matches:y,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?f.createElement(fO,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):g()},null)}var e1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(e1||{}),su=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(su||{});function mO(e){let t=f.useContext(Am);return t||it(!1),t}function gO(e){let t=f.useContext(oO);return t||it(!1),t}function vO(e){let t=f.useContext(gs);return t||it(!1),t}function t1(e){let t=vO(),n=t.matches[t.matches.length-1];return n.route.id||it(!1),n.route.id}function yO(){var e;let t=f.useContext(Q_),n=gO(su.UseRouteError),r=t1(su.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function wO(){let{router:e}=mO(e1.UseNavigateStable),t=t1(su.UseNavigateStable),n=f.useRef(!1);return X_(()=>{n.current=!0}),f.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Oa({fromRouteId:t},o)))},[e,t])}function xO(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function We(e){it(!1)}function bO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Qr.Pop,navigator:o,static:i=!1,future:a}=e;nl()&&it(!1);let c=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:c,navigator:o,static:i,future:Oa({v7_relativeSplatPath:!1},a)}),[c,a,o,i]);typeof r=="string"&&(r=wi(r));let{pathname:d="/",search:h="",hash:m="",state:p=null,key:b="default"}=r,v=f.useMemo(()=>{let x=Rm(d,c);return x==null?null:{location:{pathname:x,search:h,hash:m,state:p,key:b},navigationType:s}},[c,d,h,m,p,b,s]);return v==null?null:f.createElement(Xs.Provider,{value:u},f.createElement(Ju.Provider,{children:n,value:v}))}function _O(e){let{children:t,location:n}=e;return lO(Wh(t),n)}new Promise(()=>{});function Wh(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,s)=>{if(!f.isValidElement(r))return;let o=[...t,s];if(r.type===f.Fragment){n.push.apply(n,Wh(r.props.children,o));return}r.type!==We&&it(!1),!r.props.index||!r.props.children||it(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Wh(r.props.children,o)),n.push(i)}),n}/** 276 * React Router DOM v6.30.1 277 * 278 * Copyright (c) Remix Software Inc. 279 * 280 * This source code is licensed under the MIT license found in the 281 * LICENSE.md file in the root directory of this source tree. 282 * 283 * @license MIT 284 */function Vh(){return Vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vh.apply(this,arguments)}function SO(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function EO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kO(e,t){return e.button===0&&(!t||t==="_self")&&!EO(e)}function Hh(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function CO(e,t){let n=Hh(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const jO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],NO="6";try{window.__reactRouterVersion=NO}catch{}const TO="startTransition",xy=xu[TO];function RO(e){let{basename:t,children:n,future:r,window:s}=e,o=f.useRef();o.current==null&&(o.current=IP({window:s,v5Compat:!0}));let i=o.current,[a,c]=f.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},d=f.useCallback(h=>{u&&xy?xy(()=>c(h)):c(h)},[c,u]);return f.useLayoutEffect(()=>
284i.listen(d),[i,d]),f.useEffect(()=>xO(r),[r]),f.createElement(bO,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}const AO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dt=f.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,m=SO(t,jO),{basename:p}=f.useContext(Xs),b,v=!1;if(typeof u=="string"&&PO.test(u)&&(b=u,AO))try{let w=new URL(window.location.href),_=u.startsWith("//")?new URL(w.protocol+u):new URL(u),S=Rm(_.pathname,p);_.origin===w.origin&&S!=null?u=S+_.search+_.hash:v=!0}catch{}let x=iO(u,{relative:s}),y=OO(u,{replace:i,state:a,target:c,preventScrollReset:d,relative:s,viewTransition:h});function g(w){r&&r(w),w.defaultPrevented||y(w)}return f.createElement("a",Vh({},m,{href:b||x,onClick:v||o?r:g,ref:n,target:c}))});var by;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(by||(by={}));var _y;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(_y||(_y={}));function OO(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,c=xi(),u=ir(),d=Z_(e,{relative:i});return f.useCallback(h=>{if(kO(h,n)){h.preventDefault();let m=r!==void 0?r:ru(u)===ru(d);c(e,{replace:m,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[u,c,d,r,s,n,e,o,i,a])}function IO(e){let t=f.useRef(Hh(e)),n=f.useRef(!1),r=ir(),s=f.useMemo(()=>CO(r.search,n.current?null:t.current),[r.search]),o=xi(),i=f.useCallback((a,c)=>{const u=Hh(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}function DO(){const{pathname:e}=ir();return f.useEffect(()=>{window.scrollTo(0,0)},[e]),null}const LO="https://wholio.ai",MO=()=>{const{pathname:e}=ir();return f.useEffect(()=>{const t=e==="/"?"/":e.replace(/\/$/,""),n=`${LO}${t}`;document.querySelectorAll('link[rel="canonical"]').forEach(o=>o.remove());const s=document.createElement("link");return s.setAttribute("rel","canonical"),s.setAttribute("href",n),s.setAttribute("data-canonical-owner","app"),document.head.appendChild(s),()=>{s.remove()}},[e]),null},$O="https://wholio.ai";function FO({path:e,title:t,description:n,ogTitle:r,ogDescription:s}){const o=`${$O}${e}`,i=r??t,a=s??n;return l.jsxs(MN,{children:[l.jsx("title",{children:t}),l.jsx("meta",{name:"description",content:n}),l.jsx("meta",{property:"og:title",content:i}),l.jsx("meta",{property:"og:description",content:a}),l.jsx("meta",{property:"og:url",content:o}),l.jsx("meta",{name:"twitter:title",content:i}),l.jsx("meta",{name:"twitter:description",content:a})]})}const UO=({data:e})=>(f.useEffect(()=>{document.head.querySelectorAll('script[data-structured-data="true"]').forEach(n=>n.remove());const t=document.createElement("script");return t.type="application/ld+json",t.textContent=JSON.stringify(e),t.setAttribute("data-structured-data","true"),document.head.appendChild(t),()=>{t.remove()}},[e]),null),zO={"@context":"https://schema.org","@type":"WebSite",name:"Wholio",url:"https://wholio.ai",description:"Turn any webpage, screenshot, or PDF into a LinkedIn prospect list. Wholio finds people and matches them to their LinkedIn profiles instantly."},BO={"@context":"https://schema.org","@type":"SoftwareApplication",name:"Wholio",applicationCategory:"BusinessApplication",operatingSystem:"Web",url:"https://wholio.ai",description:"Extract people from any webpage, screenshot, or PDF and match them to their LinkedIn profiles.",featureList:["Extract names from webpages, PDFs, and screenshots","Match to LinkedIn profiles with confidence scoring","Export to CSV, Excel, or copy LinkedIn URLs","Batch processing for large lists","Resume matching from PDF uploads"],offers:[{"@type":"Offer",name:"Free",price:"0",priceCurrency:"USD",description:"50 contacts/month, URL and screenshot input, PDF upload, LinkedIn profile matching, CSV and Excel export"},{"@type":"Offer",name:"Professional",price:"59",priceCurrency:"USD",priceSpecification:{"@type":"UnitPriceSpecification",price:"59",priceCurrency:"USD",billingDuration:"P1M"},description:"1,000 contacts/month, search history, priority matching, email support"}]},yU={"@context":"https://schema.org","@type":"Organization",name:"Wholio",url:"https://wholio.ai",logo:"https://wholio.ai/favicon.png",founder:{"@type":"Person",name:"Nick Thelander",jobTitle:"Founder"},description:"Wholio extracts people from webpages, screenshots, and PDF documents and matches each to their LinkedIn profile."},WO=e=>({"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>
vendor: 8,280 bytes, line 284
284({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer}}))}),wU=e=>({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((t,n)=>({"@type":"ListItem",position:n+1,name:t.name,item:`https://wholio.ai${t.path}`}))}),VO=el("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[10px] text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-cta text-cta-foreground hover:bg-cta-hover",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-[rgba(255,255,255,0.25)] bg-transparent text-foreground hover:bg-white/10",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-white/10 hover:text-foreground",link:"text-primary underline-offset-4 hover:underline",cta:"bg-cta text-cta-foreground hover:bg-cta-hover"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-[10px] px-3",lg:"h-11 rounded-[10px] px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ve=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?KN:"button";return l.jsx(i,{className:F(VO({variant:t,size:n,className:e})),ref:o,...s})});ve.displayName="Button";var HO=f.createContext(void 0);function Qu(e){const t=f.useContext(HO);return e||t||"ltr"}var af=0;function n1(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sy()),document.body.insertAdjacentElement("beforeend",e[1]??Sy()),af++,()=>{af===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),af--}},[])}function Sy(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lf="focusScope.autoFocusOnMount",cf="focusScope.autoFocusOnUnmount",Ey={bubbles:!1,cancelable:!0},qO="FocusScope",Pm=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=f.useState(null),u=sn(s),d=sn(o),h=f.useRef(null),m=De(t,v=>c(v)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let v=function(w){if(p.paused||!a)return;const _=w.target;a.contains(_)?h.current=_:Mr(h.current,{select:!0})},x=function(w){if(p.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||Mr(h.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Mr(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const g=new MutationObserver(y);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),g.disconnect()}}},[r,a,p.paused]),f.useEffect(()=>{if(a){Cy.add(p);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(lf,Ey);a.addEventListener(lf,u),a.dispatchEvent(y),y.defaultPrevented||(KO(XO(r1(a)),{select:!0}),document.activeElement===v&&Mr(a))}return()=>{a.removeEventListener(lf,u),setTimeout(()=>{const y=new CustomEvent(cf,Ey);a.addEventListener(cf,d),a.dispatchEvent(y),y.defaultPrevented||Mr(v??document.body,{select:!0}),a.removeEventListener(cf,d),Cy.remove(p)},0)}}},[a,u,d,p]);const b=f.useCallback(v=>{if(!n&&!r||p.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(x&&y){const g=v.currentTarget,[w,_]=GO(g);w&&_?!v.shiftKey&&y===_?(v.preventDefault(),n&&Mr(w,{select:!0})):v.shiftKey&&y===w&&(v.preventDefault(),n&&Mr(_,{select:!0})):y===g&&v.preventDefault()}},[n,r,p.paused]);return l.jsx(ye.div,{tabIndex:-1,...i,ref:m,onKeyDown:b})});Pm.displayName=qO;function KO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Mr(r,{select:t}),document.activeElement!==n)return}function GO(e){const t=r1(e),n=ky(t,e),r=ky(t.reverse(),e);return[n,r]}function r1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ky(e,t){for(const n of e)if(!YO(n,{upTo:t}))return n}function YO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JO(e){return e instanceof HTMLInputElement&&"select"in e}function Mr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JO(e)&&t&&e.select()}}var Cy=QO();function QO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jy(e,t),e.unshift(t)},remove(t){var n;e=jy(e,t),(n=e[0])==null||n.resume()}}}function jy(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function XO(e){return e.filter(t=>t.tagName!=="A")}var uf="rovingFocusGroup.onEntryFocus",ZO={bubbles:!1,cancelable:!0},rl="RovingFocusGroup",[qh,s1,eI]=$u(rl),[tI,Xu]=Ht(rl,[eI]),[nI,rI]=tI(rl),o1=f.forwardRef((e,t)=>l.jsx(qh.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(qh.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(sI,{...e,ref:t})})}));o1.displayName=rl;var sI=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,m=f.useRef(null),p=De(t,m),b=Qu(o),[v,x]=sr({prop:i,defaultProp:a??null,onChange:c,caller:rl}),[y,g]=f.useState(!1),w=sn(u),_=s1(n),S=f.useRef(!1),[k,E]=f.useState(0);return f.useEffect(()=>{const j=m.current;if(j)return j.addEventListener(uf,w),()=>j.removeEventListener(uf,w)},[w]),l.jsx(nI,{scope:n,orientation:r,dir:b,loop:s,currentTabStopId:v,onItemFocus:f.useCallback(j=>x(j),[x]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>E(j=>j+1),[]),onFocusableItemRemove:f.useCallback(()=>E(j=>j-1),[]),children:l.jsx(ye.div,{tabIndex:y||k===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:ie(e.onMouseDown,()=>{S.current=!0}),onFocus:ie(e.onFocus,j=>{const A=!S.current;if(j.target===j.currentTarget&&A&&!y){const O=new CustomEvent(uf,ZO);if(j.currentTarget.dispatchEvent(O),!O.defaultPrevented){const H=_().filter(W=>W.focusable),K=H.find(W=>W.active),J=H.find(W=>W.id===v),le=[K,J,...H].filter(Boolean).map(W=>W.ref.current);l1(le,d)}}S.current=!1}),onBlur:ie(e.onBlur,()=>g(!1))})})}),i1="RovingFocusGroupItem",a1=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:i,...a}=e,c=xr(),u=o||c,d=rI(i1,n),h=d.currentTabStopId===u,m=s1(n),{onFocusableItemAdd:p,onFocusableItemRemove:b,currentTabStopId:v}=d;return f.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),l.jsx(qh.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:l.jsx(ye.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:ie(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:ie(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:ie(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=aI(x,d.orientation,d.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=m().filter(_=>_.focusable).map(_=>_.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const _=w.indexOf(x.currentTarget);w=d.loop?lI(w,_+1):w.slice(_+1)}setTimeout(()=>l1(w))}}),children:typeof i=="function"?i({isCurrentTabStop:h,hasTabStop:v!=null}):i})})});a1.displayName=i1;var oI={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iI(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}
vendor: 14,607 bytes, lines 284-324
284function aI(e,t,n){const r=iI(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return oI[r]}function l1(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var c1=o1,u1=a1,cI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},io=new WeakMap,Fl=new WeakMap,Ul={},df=0,d1=function(e){return e&&(e.host||d1(e.parentNode))},uI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=d1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},dI=function(e,t,n,r){var s=uI(t,Array.isArray(e)?e:[e]);Ul[n]||(Ul[n]=new WeakMap);var o=Ul[n],i=[],a=new Set,c=new Set(s),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(a.has(m))d(m);else try{var p=m.getAttribute(r),b=p!==null&&p!=="false",v=(io.get(m)||0)+1,x=(o.get(m)||0)+1;io.set(m,v),o.set(m,x),i.push(m),v===1&&b&&Fl.set(m,!0),x===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return d(t),a.clear(),df++,function(){i.forEach(function(h){var m=io.get(h)-1,p=o.get(h)-1;io.set(h,m),o.set(h,p),m||(Fl.has(h)||h.removeAttribute(r),Fl.delete(h)),p||h.removeAttribute(n)}),df--,df||(io=new WeakMap,io=new WeakMap,Fl=new WeakMap,Ul={})}},f1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=cI(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),dI(r,s,n,"aria-hidden")):function(){return null}},Qn=function(){return Qn=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Qn.apply(this,arguments)};function bi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function fI(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{u(r.next(d))}catch(h){i(h)}}function c(d){try{u(r.throw(d))}catch(h){i(h)}}function u(d){d.done?o(d.value):s(d.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function hI(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var xc="right-scroll-bar-position",bc="width-before-scroll-bar",pI="with-scroll-bars-hidden",mI="--removed-body-scroll-bar-size";function ff(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gI(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var vI=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ny=new WeakMap;function yI(e,t){var n=gI(null,function(r){return e.forEach(function(s){return ff(s,r)})});return vI(function(){var r=Ny.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||ff(a,null)}),o.forEach(function(a){s.has(a)||ff(a,i)})}Ny.set(n,e)},[e]),n}function wI(e){return e}function xI(e,t){t===void 0&&(t=wI);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return s}function bI(e){e===void 0&&(e={});var t=xI(null);return t.options=Qn({async:!0,ssr:!1},e),t}var h1=function(e){var t=e.sideCar,n=bi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Qn({},n))};h1.isSideCarExport=!0;function _I(e,t){return e.useMedium(t),h1}var p1=bI(),hf=function(){},Zu=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:hf,onWheelCapture:hf,onTouchMoveCapture:hf}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,p=e.noRelative,b=e.noIsolation,v=e.inert,x=e.allowPinchZoom,y=e.as,g=y===void 0?"div":y,w=e.gapMode,_=bi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,k=yI([n,t]),E=Qn(Qn({},_),s);return f.createElement(f.Fragment,null,d&&f.createElement(S,{sideCar:p1,removeScrollBar:u,shards:h,noRelative:p,noIsolation:b,inert:v,setCallbacks:o,allowPinchZoom:!!x,lockRef:n,gapMode:w}),i?f.cloneElement(f.Children.only(a),Qn(Qn({},E),{ref:k})):f.createElement(g,Qn({},E,{className:c,ref:k}),a))});Zu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zu.classNames={fullWidth:bc,zeroRight:xc};var SI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function EI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=SI();return t&&e.setAttribute("nonce",t),e}function kI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function CI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=EI())&&(kI(t,n),CI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},NI=function(){var e=jI();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},m1=function(){var e=NI(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},TI={left:0,top:0,right:0,gap:0},pf=function(e){return parseInt(e||"",10)||0},RI=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[pf(n),pf(r),pf(s)]},AI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TI;var t=RI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},PI=m1(),Wo="data-scroll-locked",OI=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` 285 .`.concat(pI,` { 286 overflow: hidden `).concat(r,`; 287 padding-right: `).concat(a,"px ").concat(r,`; 288 } 289 body[`).concat(Wo,`] { 290 overflow: hidden `).concat(r,`; 291 overscroll-behavior: contain; 292 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 293 padding-left: `.concat(s,`px; 294 padding-top: `).concat(o,`px; 295 padding-right: `).concat(i,`px; 296 margin-left:0; 297 margin-top:0; 298 margin-right: `).concat(a,"px ").concat(r,`; 299 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` 300 } 301 302 .`).concat(xc,` { 303 right: `).concat(a,"px ").concat(r,`; 304 } 305 306 .`).concat(bc,` { 307 margin-right: `).concat(a,"px ").concat(r,`; 308 } 309 310 .`).concat(xc," .").concat(xc,` { 311 right: 0 `).concat(r,`; 312 } 313 314 .`).concat(bc," .").concat(bc,` { 315 margin-right: 0 `).concat(r,`; 316 } 317 318 body[`).concat(Wo,`] { 319 `).concat(mI,": ").concat(a,`px; 320 } 321`)},Ty=function(){var e=parseInt(document.body.getAttribute(Wo)||"0",10);return isFinite(e)?e:0},II=function(){f.useEffect(function(){return document.body.setAttribute(Wo,(Ty()+1).toString()),function(){var e=Ty()-1;e<=0?document.body.removeAttribute(Wo):document.body.setAttribute(Wo,e.toString())}},[])},DI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;II();var o=f.useMemo(function(){return AI(s)},[s]);return f.createElement(PI,{styles:OI(o,!t,s,n?"":"!important")})},Kh=!1;if(typeof window<"u")try{var zl=Object.defineProperty({},"passive",{get:function(){return Kh=!0,!0}});window.addEventListener("test",zl,zl),window.removeEventListener("test",zl,zl)}catch{Kh=!1}var ao=Kh?{passive:!1}:!1,LI=function(e){return e.tagName==="TEXTAREA"},g1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LI(e)&&n[t]==="visible")},MI=function(e){return g1(e,"overflowY")},$I=function(e){return g1(e,"overflowX")},Ry=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=v1(e,r);if(s){var o=y1(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FI=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},UI=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},v1=function(e,t){return e==="v"?MI(t):$I(t)},y1=function(e,t){return e==="v"?FI(t):UI(t)},zI=function(e,t){return e==="h"&&t==="rtl"?-1:1},BI=function(e,t,n,r,s){var o=zI(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),u=!1,d=i>0,h=0,m=0;do{if(!a)break;var p=y1(e,a),b=p[0],v=p[1],x=p[2],y=v-x-o*b;(b||y)&&v1(e,a)&&(h+=y,m+=b);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},Bl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ay=function(e){return[e.deltaX,e.deltaY]},Py=function(e){return e&&"current"in e?e.current:e},WI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VI=function(e){return` 322 .block-interactivity-`.concat(e,` {pointer-events: none;} 323 .allow-interactivity-`).concat(e,` {pointer-events: all;} 324`)},HI=0,lo=[];function qI(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),s=f.useState(HI++)[0],o=f.useState(m1)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=hI([e.lockRef.current],(e.shards||[]).map(Py),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var y=Bl(v),g=n.current,w="deltaX"in v?v.deltaX:g[0]-y[0],_="deltaY"in v?v.deltaY:g[1]-y[1],S,k=v.target,E=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in v&&E==="h"&&k.type==="range")return!1;var j=Ry(E,k);if(!j)return!0;if(j?S=E:(S=E==="v"?"h":"v",j=Ry(E,k)),!j)return!1;if(!r.current&&"changedTouches"in v&&(w||_)&&(r.current=S),!S)return!0;var A=r.current||S;return BI(A,x,v,A==="h"?w:_,!0)},[]),c=f.useCallback(function(v){var x=v;if(!(!lo.length||lo[lo.length-1]!==o)){var y="deltaY"in x?Ay(x):Bl(x),g=t.current.filter(function(S){return S.name===x.type&&(S.target===x.target||x.target===S.shadowParent)&&WI(S.delta,y)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var w=(i.current.shards||[]).map(Py).filter(Boolean).filter(function(S){return S.contains(x.target)}),_=w.length>0?a(x,w[0]):!i.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),u=f.useCallback(function(v,x,y,g){var w={name:v,delta:x,target:y,should:g,shadowParent:KI(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),d=f.useCallback(function(v){n.current=Bl(v),r.current=void 0},[]),h=f.useCallback(function(v){u(v.type,Ay(v),v.target,a(v,e.lockRef.current))},[]),m=f.useCallback(function(v){u(v.type,Bl(v),v.target,a(v,e.lockRef.current))},[]);f.useEffect(function(){return lo.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ao),document.addEventListener("touchmove",c,ao),document.addEventListener("touchstart",d,ao),function(){lo=lo.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,ao),document.removeEventListener("touchmove",c,ao),document.removeEventListener("touchstart",d,ao)}},[]);var p=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(o,{styles:VI(s)}):null,p?f.createElement(DI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function KI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const GI=_I(p1,qI);var Om=f.forwardRef(function(e,t){return f.createElement(Zu,Qn({},e,{ref:t,sideCar:GI}))});Om.classNames=Zu.classNames;var Gh=["Enter"," "],YI=["ArrowDown","PageUp","Home"],w1=["ArrowUp","PageDown","End"],JI=[...YI,...w1],QI={ltr:[...Gh,"ArrowRight"],rtl:[...Gh,"ArrowLeft"]},XI={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sl="Menu",[Ia,ZI,eD]=$u(sl),[Zs,x1]=Ht(sl,[eD,Vu,Xu]),ed=Vu(),b1=Xu(),[tD,eo]=Zs(sl),[nD,ol]=Zs(sl),_1=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=ed(t),[c,u]=f.useState(null),d=f.useRef(!1),h=sn(o),m=Qu(s);return f.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),l.jsx(k_,{...a,children:l.jsx(tD,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:l.jsx(nD,{scope:t,onClose:f.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:m,modal:i,children:r})})})};_1.displayName=sl;var rD="MenuAnchor",Im=f.forwardRef((e,t)=>
vendor: 12,908 bytes, line 324
324{const{__scopeMenu:n,...r}=e,s=ed(n);return l.jsx(C_,{...s,...r,ref:t})});Im.displayName=rD;var Dm="MenuPortal",[sD,S1]=Zs(Dm,{forceMount:void 0}),E1=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=eo(Dm,t);return l.jsx(sD,{scope:t,forceMount:n,children:l.jsx(ln,{present:n||o.open,children:l.jsx(Fu,{asChild:!0,container:s,children:r})})})};E1.displayName=Dm;var xn="MenuContent",[oD,Lm]=Zs(xn),k1=f.forwardRef((e,t)=>{const n=S1(xn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=eo(xn,e.__scopeMenu),i=ol(xn,e.__scopeMenu);return l.jsx(Ia.Provider,{scope:e.__scopeMenu,children:l.jsx(ln,{present:r||o.open,children:l.jsx(Ia.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(iD,{...s,ref:t}):l.jsx(aD,{...s,ref:t})})})})}),iD=f.forwardRef((e,t)=>{const n=eo(xn,e.__scopeMenu),r=f.useRef(null),s=De(t,r);return f.useEffect(()=>{const o=r.current;if(o)return f1(o)},[]),l.jsx(Mm,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ie(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),aD=f.forwardRef((e,t)=>{const n=eo(xn,e.__scopeMenu);return l.jsx(Mm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),lD=ai("MenuContent.ScrollLock"),Mm=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:p,disableOutsideScroll:b,...v}=e,x=eo(xn,n),y=ol(xn,n),g=ed(n),w=b1(n),_=ZI(n),[S,k]=f.useState(null),E=f.useRef(null),j=De(t,E,x.onContentChange),A=f.useRef(0),O=f.useRef(""),H=f.useRef(0),K=f.useRef(null),J=f.useRef("right"),U=f.useRef(0),le=b?Om:f.Fragment,W=b?{as:lD,allowPinchZoom:!0}:void 0,X=C=>{var ge,N;const $=O.current+C,te=_().filter(I=>!I.disabled),Z=document.activeElement,ue=(ge=te.find(I=>I.ref.current===Z))==null?void 0:ge.textValue,fe=te.map(I=>I.textValue),he=xD(fe,$,ue),xe=(N=te.find(I=>I.textValue===he))==null?void 0:N.ref.current;(function I(z){O.current=z,window.clearTimeout(A.current),z!==""&&(A.current=window.setTimeout(()=>I(""),1e3))})($),xe&&setTimeout(()=>xe.focus())};f.useEffect(()=>()=>window.clearTimeout(A.current),[]),n1();const R=f.useCallback(C=>{var te,Z;return J.current===((te=K.current)==null?void 0:te.side)&&_D(C,(Z=K.current)==null?void 0:Z.area)},[]);return l.jsx(oD,{scope:n,searchRef:O,onItemEnter:f.useCallback(C=>{R(C)&&C.preventDefault()},[R]),onItemLeave:f.useCallback(C=>{var $;R(C)||(($=E.current)==null||$.focus(),k(null))},[R]),onTriggerLeave:f.useCallback(C=>{R(C)&&C.preventDefault()},[R]),pointerGraceTimerRef:H,onPointerGraceIntentChange:f.useCallback(C=>{K.current=C},[]),children:l.jsx(le,{...W,children:l.jsx(Pm,{asChild:!0,trapped:s,onMountAutoFocus:ie(o,C=>{var $;C.preventDefault(),($=E.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Xa,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:m,onDismiss:p,children:l.jsx(c1,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:k,onEntryFocus:ie(c,C=>{y.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(j_,{role:"menu","aria-orientation":"vertical","data-state":z1(x.open),"data-radix-menu-content":"",dir:y.dir,...g,...v,ref:j,style:{outline:"none",...v.style},onKeyDown:ie(v.onKeyDown,C=>{const te=C.target.closest("[data-radix-menu-content]")===C.currentTarget,Z=C.ctrlKey||C.altKey||C.metaKey,ue=C.key.length===1;te&&(C.key==="Tab"&&C.preventDefault(),!Z&&ue&&X(C.key));const fe=E.current;if(C.target!==fe||!JI.includes(C.key))return;C.preventDefault();const xe=_().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);w1.includes(C.key)&&xe.reverse(),yD(xe)}),onBlur:ie(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:ie(e.onPointerMove,Da(C=>{const $=C.target,te=U.current!==C.clientX;if(C.currentTarget.contains($)&&te){const Z=C.clientX>U.current?"right":"left";J.current=Z,U.current=C.clientX}}))})})})})})})});k1.displayName=xn;var cD="MenuGroup",$m=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(ye.div,{role:"group",...r,ref:t})});$m.displayName=cD;var uD="MenuLabel",C1=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(ye.div,{...r,ref:t})});C1.displayName=uD;var ou="MenuItem",Oy="menu.itemSelect",td=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=f.useRef(null),i=ol(ou,e.__scopeMenu),a=Lm(ou,e.__scopeMenu),c=De(t,o),u=f.useRef(!1),d=()=>{const h=o.current;if(!n&&h){const m=new CustomEvent(Oy,{bubbles:!0,cancelable:!0});h.addEventListener(Oy,p=>r==null?void 0:r(p),{once:!0}),dm(h,m),m.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(j1,{...s,ref:c,disabled:n,onClick:ie(e.onClick,d),onPointerDown:h=>{var m;(m=e.onPointerDown)==null||m.call(e,h),u.current=!0},onPointerUp:ie(e.onPointerUp,h=>{var m;u.current||(m=h.currentTarget)==null||m.click()}),onKeyDown:ie(e.onKeyDown,h=>{const m=a.searchRef.current!=="";n||m&&h.key===" "||Gh.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});td.displayName=ou;var j1=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Lm(ou,n),a=b1(n),c=f.useRef(null),u=De(t,c),[d,h]=f.useState(!1),[m,p]=f.useState("");return f.useEffect(()=>{const b=c.current;b&&p((b.textContent??"").trim())},[o.children]),l.jsx(Ia.ItemSlot,{scope:n,disabled:r,textValue:s??m,children:l.jsx(u1,{asChild:!0,...a,focusable:!r,children:l.jsx(ye.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ie(e.onPointerMove,Da(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ie(e.onPointerLeave,Da(b=>i.onItemLeave(b))),onFocus:ie(e.onFocus,()=>h(!0)),onBlur:ie(e.onBlur,()=>h(!1))})})})}),dD="MenuCheckboxItem",N1=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return l.jsx(O1,{scope:e.__scopeMenu,checked:n,children:l.jsx(td,{role:"menuitemcheckbox","aria-checked":iu(n)?"mixed":n,...s,ref:t,"data-state":Um(n),onSelect:ie(s.onSelect,()=>r==null?void 0:r(iu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});N1.displayName=dD;var T1="MenuRadioGroup",[fD,hD]=Zs(T1,{value:void 0,onValueChange:()=>{}}),R1=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=sn(r);return l.jsx(fD,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx($m,{...s,ref:t})})});R1.displayName=T1;var A1="MenuRadioItem",P1=f.forwardRef((e,t)=>{const{value:n,...r}=e,s=hD(A1,e.__scopeMenu),o=n===s.value;return l.jsx(O1,{scope:e.__scopeMenu,checked:o,children:l.jsx(td,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Um(o),onSelect:ie(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});P1.displayName=A1;var Fm="MenuItemIndicator",[O1,pD]=Zs(Fm,{checked:!1}),I1=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=pD(Fm,n);return l.jsx(ln,{present:r||iu(o.checked)||o.checked===!0,children:l.jsx(ye.span,{...s,ref:t,"data-state":Um(o.checked)})})});I1.displayName=Fm;var mD="MenuSeparator",D1=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(ye.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});D1.displayName=mD;var gD="MenuArrow",L1=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=ed(n);return l.jsx(N_,{...s,...r,ref:t})});L1.displayName=gD;var vD="MenuSub",[xU,M1]=Zs(vD),Ki="MenuSubTrigger",$1=f.forwardRef((e,t)=>{const n=eo(Ki,e.__scopeMenu),r=ol(Ki,e.__scopeMenu),s=M1(Ki,e.__scopeMenu),o=Lm(Ki,e.__scopeMenu),i=f.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),c(null)}},[a,c]),l.jsx(Im,{asChild:!0,...u,children:l.jsx(j1,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":z1(n.open),...e,ref:Qa(t,s.onTriggerChange),onClick:h=>{var m;(m=e.onClick)==null||m.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ie(e.onPointerMove,Da(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ie(e.onPointerLeave,Da(h=>{var p,b;d();const m=(p=n.content)==null?void 0:p.getBoundingClientRect();if(m){const v=(b=n.content)==null?void 0:b.dataset.side,x=v==="right",y=x?-5:5,g=m[x?"left":"right"],w=m[x?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+y,y:h.clientY},{x:g,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:g,y:m.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ie(e.onKeyDown,h=>{var p;const m=o.searchRef.current!=="";e.disabled||m&&h.key===" "||QI[r.dir].includes(h.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),h.preventDefault())})})})});$1.displayName=Ki;var F1="MenuSubContent",U1=f.forwardRef((e,t)=>{const n=S1(xn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=eo(xn,e.__scopeMenu),i=ol(xn,e.__scopeMenu),a=M1(F1,e.__scopeMenu),c=f.useRef(null),u=De(t,c);return l.jsx(Ia.Provider,{scope:e.__scopeMenu,children:l.jsx(ln,{present:r||o.open,children:l.jsx(Ia.Slot,{scope:e.__scopeMenu,children:l.jsx(Mm,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;i.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ie(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ie(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ie(e.onKeyDown,d=>{var p;const h=d.currentTarget.contains(d.target),m=XI[i.dir].includes(d.key);h&&m&&(o.onOpenChange(!1),(p=a.trigger)==null||p.focus(),d.preventDefault())})})})})})});U1.displayName=F1;function z1(e){return e?"open":"closed"}function iu(e){return e==="indeterminate"}function Um(e){return iu(e)?"indeterminate":e?"checked":"unchecked"}function yD(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xD(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=wD(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function bD(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],c=t[i],u=a.x,d=a.y,h=c.x,m=c.y;d>r!=m>r&&n<(h-u)*(r-d)/(m-d)+u&&(s=!s)}return s}function _D(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bD(n,t)}function Da(e){return t=>t.pointerType==="mouse"?e(t):void 0}var SD=_1,ED=Im,kD=E1,CD=k1,jD=$m,ND=C1,TD=td,RD=N1,AD=R1,PD=P1,OD=I1,ID=D1,DD=L1,LD=$1,MD=U1,nd="DropdownMenu",[$D,bU]=Ht(nd,[x1]),Lt=x1(),[FD,B1]=$D(nd),W1=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=Lt(t),u=f.useRef(null),[d,h]=sr({prop:s,defaultProp:o??!1,onChange:i,caller:nd});return l.jsx(FD,{scope:t,triggerId:xr(),triggerRef:u,contentId:xr(),open:d,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(m=>!m),[h]),modal:a,children:l.jsx(SD,{...c,open:d,onOpenChange:h,dir:r,modal:a,children:n})})};W1.displayName=nd;var V1="DropdownMenuTrigger",H1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=B1(V1,n),i=Lt(n);return l.jsx(ED,{asChild:!0,...i,children:l.jsx(ye.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Qa(t,o.triggerRef),onPointerDown:ie(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ie(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});H1.displayName=V1;var UD="DropdownMenuPortal",q1=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Lt(t);return l.jsx(kD,{...r,...n})};q1.displayName=UD;var K1="DropdownMenuContent",G1=f.forwardRef((e,t)=>
324{const{__scopeDropdownMenu:n,...r}=e,s=B1(K1,n),o=Lt(n),i=f.useRef(!1);return l.jsx(CD,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ie(e.onCloseAutoFocus,a=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ie(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});G1.displayName=K1;var zD="DropdownMenuGroup",BD=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(jD,{...s,...r,ref:t})});BD.displayName=zD;var WD="DropdownMenuLabel",Y1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(ND,{...s,...r,ref:t})});Y1.displayName=WD;var VD="DropdownMenuItem",J1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(TD,{...s,...r,ref:t})});J1.displayName=VD;var HD="DropdownMenuCheckboxItem",Q1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(RD,{...s,...r,ref:t})});Q1.displayName=HD;var qD="DropdownMenuRadioGroup",KD=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(AD,{...s,...r,ref:t})});KD.displayName=qD;var GD="DropdownMenuRadioItem",X1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(PD,{...s,...r,ref:t})});X1.displayName=GD;var YD="DropdownMenuItemIndicator",Z1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(OD,{...s,...r,ref:t})});Z1.displayName=YD;var JD="DropdownMenuSeparator",eS=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(ID,{...s,...r,ref:t})});eS.displayName=JD;var QD="DropdownMenuArrow",XD=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(DD,{...s,...r,ref:t})});XD.displayName=QD;var ZD="DropdownMenuSubTrigger",tS=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(LD,{...s,...r,ref:t})});tS.displayName=ZD;var eL="DropdownMenuSubContent",nS=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Lt(n);return l.jsx(MD,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nS.displayName=eL;var tL=W1,nL=H1,rL=q1,rS=G1,sS=Y1,oS=J1,iS=Q1,aS=X1,lS=Z1,cS=eS,uS=tS,dS=nS;const fS=tL,hS=nL,sL=f.forwardRef(({className:e,inset:t,children:n,...r},s)=>l.jsxs(uS,{ref:s,className:F("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,l.jsx(Fb,{className:"ml-auto h-4 w-4"})]}));sL.displayName=uS.displayName;const oL=f.forwardRef(({className:e,...t},n)=>l.jsx(dS,{ref:n,className:F("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));oL.displayName=dS.displayName;const zm=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(rL,{children:l.jsx(rS,{ref:r,sideOffset:t,className:F("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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]:sli
324de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));zm.displayName=rS.displayName;const Vo=f.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(oS,{ref:r,className:F("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Vo.displayName=oS.displayName;const iL=f.forwardRef(({className:e,children:t,checked:n,...r},s)=>l.jsxs(iS,{ref:s,className:F("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(lS,{children:l.jsx(ms,{className:"h-4 w-4"})})}),t]}));iL.displayName=iS.displayName;const aL=f.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(aS,{ref:r,className:F("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(lS,{children:l.jsx(Ub,{className:"h-2 w-2 fill-current"})})}),t]}));aL.displayName=aS.displayName;const lL=f.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(sS,{ref:r,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));lL.displayName=sS.displayName;const pS=f.forwardRef(({className:e,...t},n)=>l.jsx(cS,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));pS.displayName=cS.displayName;var rd="Dialog",[mS,_U]=Ht(rd),[cL,Bn]=mS(rd),gS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=f.useRef(null),c=f.useRef(null),[u,d]=sr({prop:r,defaultProp:s??!1,onChange:o,caller:rd});return l.jsx(cL,{scope:t,triggerRef:a,contentRef:c,contentId:xr(),titleId:xr(),descriptionId:xr(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(h=>!h),[d]),modal:i,children:n})};gS.displayName=rd;var vS="DialogTrigger",yS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Bn(vS,n),o=De(t,s.triggerRef);return l.jsx(ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Vm(s.open),...r,ref:o,onClick:ie(e.onClick,s.onOpenToggle)})});yS.displayName=vS;var Bm="DialogPortal",[uL,wS]=mS(Bm,{forceMount:void 0}),xS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Bn(Bm,t);return l.jsx(uL,{scope:t,forceMount:n,children:f.Children.map(r,i=>l.jsx(ln,{present:n||o.open,children:l.jsx(Fu,{asChild:!0,container:s,children:i})}))})};xS.displayName=Bm;var au="DialogOverlay",bS=f.forwardRef((e,t)=>{const n=wS(au,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Bn(au,e.__scopeDialog);return o.modal?l.jsx(ln,{present:r||o.open,children:l.jsx(fL,{...s,ref:t})}):null});bS.displayName=au;var dL=ai("DialogOverlay.RemoveScroll"),fL=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Bn(au,n);return l.jsx(Om,{as:dL,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(ye.div,{"data-state":Vm(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ys="DialogContent",_S=f.forwardRef((e,t)=>{const n=wS(Ys,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Bn(Ys,e.__scopeDialog);return l.jsx(ln,{present:r||o.open,children:o.modal?l.jsx(hL,{...s,ref:t}):l.jsx(pL,{...s,ref:t})})});_S.displayName=Ys;var hL=f.forwardRef((e,t)=>{const n=Bn(Ys,e.__scopeDialog),r=f.useRef(null),s=De(t,n.contentRef,r);return f.useEffect(()=>{const o=r.current;if(o)return f1(o)},[]),l.jsx(SS,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ie(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ie(e.onFocusOutside,o=>o.preventDefault())})}),pL=f.forwardRef((e,t)=>
vendor: 3,932 bytes, lines 324-328
324{const n=Bn(Ys,e.__scopeDialog),r=f.useRef(!1),s=f.useRef(!1);return l.jsx(SS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),SS=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Bn(Ys,n),c=f.useRef(null),u=De(t,c);return n1(),l.jsxs(l.Fragment,{children:[l.jsx(Pm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:l.jsx(Xa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Vm(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(mL,{titleId:a.titleId}),l.jsx(vL,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Wm="DialogTitle",ES=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Bn(Wm,n);return l.jsx(ye.h2,{id:s.titleId,...r,ref:t})});ES.displayName=Wm;var kS="DialogDescription",CS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Bn(kS,n);return l.jsx(ye.p,{id:s.descriptionId,...r,ref:t})});CS.displayName=kS;var jS="DialogClose",NS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Bn(jS,n);return l.jsx(ye.button,{type:"button",...r,ref:t,onClick:ie(e.onClick,()=>s.onOpenChange(!1))})});NS.displayName=jS;function Vm(e){return e?"open":"closed"}var TS="DialogTitleWarning",[SU,RS]=HN(TS,{contentName:Ys,titleName:Wm,docsSlug:"dialog"}),mL=({titleId:e})=>{const t=RS(TS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 325 326If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 327 328For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gL="DialogDescriptionWarning",vL=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RS(gL).contentName}}.`;return f.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Hm=gS,yL=yS,qm=xS,il=bS,al=_S,ll=ES,sd=CS,AS=NS;const wL=Hm,xL=yL,bL=qm,PS=f.forwardRef(({className:e,...t},n)=>l.jsx(il,{className:F("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",e),...t,ref:n}));PS.displayName=il.displayName;const _L=el("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),OS=f.forwardRef(({side:e="right",className:t,children:n,...r},s)=>l.jsxs(bL,{children:[l.jsx(PS,{}),l.jsxs(al,{ref:s,className:F(_L({side:e}),t),...r,children:[n,l.jsxs(AS,{className:"absolute right-4 top-4 roun
328ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(tn,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));OS.displayName=al.displayName;const IS=f.forwardRef(({className:e,...t},n)=>l.jsx(ll,{ref:n,className:F("text-lg font-semibold text-foreground",e),...t}));IS.displayName=ll.displayName;const SL=f.forwardRef(({className:e,...t},n)=>l.jsx(sd,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));SL.displayName=sd.displayName;var od="Collapsible",[EL,DS]=Ht(od),[kL,Km]=EL(od),LS=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c,u]=sr({prop:r,defaultProp:s??!1,onChange:i,caller:od});return l.jsx(kL,{scope:n,disabled:o,contentId:xr(),open:c,onOpenToggle:f.useCallback(()=>u(d=>!d),[u]),children:l.jsx(ye.div,{"data-state":Qm(c),"data-disabled":o?"":void 0,...a,ref:t})})});LS.displayName=od;var MS="CollapsibleTrigger",Gm=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=Km(MS,n);return l.jsx(ye.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Qm(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ie(e.onClick,s.onOpenToggle)})});Gm.displayName=MS;var Ym="CollapsibleContent",Jm=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Km(Ym,e.__scopeCollapsible);return l.jsx(ln,{present:n||s.open,children:({present:o})=>l.jsx(CL,{...r,ref:t,present:o})})});Jm.displayName=Ym;var CL=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=Km(Ym,n),[a,c]=f.useState(r),u=f.useRef(null),d=De(t,u),h=f.useRef(0),m=h.current,p=f.useRef(0),b=p.current,v=i.open||a,x=f.useRef(v),y=f.useRef(void 0);return f.useEffect(()=>{const g=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(g)},[]),nr(()=>{const g=u.current;if(g){y.current=y.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const w=g.getBoundingClientRect();h.current=w.height,p.current=w.width,x.current||(g.style.transitionDuration=y.current.transitionDuration,g.style.animationName=y.current.animationName),c(r)}},[i.open,r]),l.jsx(ye.div,{"data-state":Qm(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...o,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&s})});function Qm(e){return e?"open":"closed"}var $S=LS,jL=Gm,NL=Jm;const Iy=$S,Dy=Gm,Ly=Jm,id=Hm,TL=qm,FS=f.forwardRef(({className:e,...t},n)=>l.jsx(il,{ref:n,className:F("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",e),...t}));FS.displayName=il.displayName;const cl=f.forwardRef(({className:e,children:t,hideCloseButton:n,...r},s)=>l.jsxs(TL,{children:[l.jsx(FS,{}),l.jsxs(al,{ref:s,className:F("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",e),...r,children:[t,!n&&l.jsxs(AS,{className:"absolute right-4 top-4 roun
328ded-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:[l.jsx(tn,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));cl.displayName=al.displayName;const ul=({className:e,...t})=>l.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ul.displayName="DialogHeader";const US=({className:e,...t})=>l.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});US.displayName="DialogFooter";const dl=f.forwardRef(({className:e,...t},n)=>l.jsx(ll,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));dl.displayName=ll.displayName;const Xm=f.forwardRef(({className:e,...t},n)=>l.jsx(sd,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));Xm.displayName=sd.displayName;const vs=f.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:F("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",e),ref:r,...n}));vs.displayName="Input";var RL="Label",zS=f.forwardRef((e,t)=>l.jsx(ye.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));zS.displayName=RL;var BS=zS;const AL=el("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Zm=f.forwardRef(({className:e,...t},n)=>l.jsx(BS,{ref:n,className:F(AL(),e),...t}));Zm.displayName=BS.displayName;const PL=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class eg extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class OL extends eg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class My extends eg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class $y extends eg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Yh;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Yh||(Yh={}));class IL{constructor(t,{headers:n={},customFetch:r,region:s=Yh.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=PL(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return fI(this,arguments,void 0,function*(n,r={}){var s;let o,i;try{const{headers:a,method:c,body:u,signal:d,timeout:h}=r;let m={},{region:p}=r;p||(p=this.region);const b=new URL(`${this.url}/${n}`);p&&p!=="any"&&(m["x-region"]=p,b.searchParams.set("forceFunctionRegion",p));let v;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(m["Content-Type"]="application/octet-stream",v=u):typeof u=="string"?(m["Content-Type"]="text/plain",v=u):typeof FormData<"u"&&u instanceof FormData?v=u:(m["Content-Type"]="application/json",v=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?v=JSON.stringify(u):v=u;let x=d;h&&(i=new AbortController,o=setTimeout(()=>i.abort(),h),d?(x=i.signal,d.addEventListener("abort",()=>i.abort())):x=i.signal);const y=yield this.fetch(b.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},m),this.headers),a),body:v,signal:x}).catch(S=>{throw new OL(S)}),g=y.headers.get("x-relay-error");
328if(g&&g==="true")throw new My(y);if(!y.ok)throw new $y(y);let w=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return w==="application/json"?_=yield y.json():w==="application/octet-stream"||w==="application/pdf"?_=yield y.blob():w==="text/event-stream"?_=y:w==="multipart/form-data"?_=yield y.formData():_=yield y.text(),{data:_,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof $y||a instanceof My?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var DL=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},LL=class{constructor(e){var t,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;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");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let i=null,a=null,c=null,u=o.status,d=o.statusText;if(o.ok){var h,m;if(n.method!=="HEAD"){var p;const y=await o.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?a=y:a=JSON.parse(y))}const v=(h=n.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),x=(m=o.headers.get("content-range"))===null||m===void 0?void 0:m.split("/");v&&x&&x.length>1&&(c=parseInt(x[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(a)&&(a.length>1?(i={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,c=null,u=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var b;const v=await o.text();try{i=JSON.parse(v),Array.isArray(i)&&o.status===404&&(a=[],i=null,u=200,d="OK")}catch{o.status===404&&v===""?(u=204,d="No Content"):i={message:v}}if(i&&n.isMaybeSingle&&(!(i==null||(b=i.details)===null||b===void 0)&&b.includes("0 rows"))&&(i=null,u=200,d="OK"),i&&n.shouldThrowOnError)throw new DL(i)}return{error:i,data:a,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(o=>{var i;let a="";const c=o==null?void 0:o.cause;if(c){var u,d,h,m;const b=(u=c==null?void 0:c.message)!==null&&u!==void 0?u:"",v=(d=c==null?void 0:c.code)!==null&&d!==void 0?d:"";a=`${(h=o==null?void 0:o.name)!==null&&h!==void 0?h:"FetchError"}: ${o==null?void 0:o.message}`,a+=` 329 330Caused by: ${(m=c==null?void 0:c.name)!==null&&m!==void 0?m:"Error"}: ${b}`,v&&(a+=` (${v})`),c!=null&&c.stack&&(a+=` 331${c.stack}`)}else{var p;a=(p=o==null?void 0:o.stack)!==null&&p!==void 0?p:""}return{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:a,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},ML=class extends LL{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
331explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:o="text"}={}){var i;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${c}"; options=${a};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Fy=new RegExp("[,()]");var vo=class extends ML{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Fy.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Fy.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},$L=class{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(u=>/\s/.test(u)&&!o?"":(u==='"'&&(o=!o),u)).join(""),{url:a,headers:c}=this.cloneRequestState();return a.searchParams.set("select",i),r&&c.append("Prefer",`count=${r}`),new vo({method:s,url:a,headers:c,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),n||i.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(a.length>
3310){const c=[...new Set(a)].map(u=>`"${u}"`);o.searchParams.set("columns",c.join(","))}}return new vo({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var o;const i="POST",{url:a,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new vo({method:i,url:a,headers:c,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new vo({method:r,url:s,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new vo({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},FL=class WS{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new $L(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new WS(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:o}={}){var i;let a;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),h=r&&Object.values(n).some(d);h?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([p,b])=>b!==void 0).map(([p,b])=>[p,Array.isArray(b)?`{${b.join(",")}}`:`${b}`]).forEach(([p,b])=>{c.searchParams.append(p,b)})):(a="POST",u=n);const m=new Headers(this.headers);return h?m.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&m.set("Prefer",`count=${o}`),new vo({method:a,url:c,headers:m,schema:this.schemaName,body:u,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}};class UL{constructor(){}static detectEnvironment(){var t;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"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 332import ws from "ws" 333new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 334 335Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const zL="2.93.3",BL=`realtime-js/${zL}`,WL="1.0.0",VS="2.0.0",Uy=VS,Jh=1e4,VL=1e3,HL=100;var Ur;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Ur||(Ur={}));var ut;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(ut||(ut={}));var In;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(In||(In={}));var Qh;(function(e){e.websocket="websocket"})(Qh||(Qh={}));var ks;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ks||(ks={}));class qL{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,n,r){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",c=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const m=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+a.length+i.length+u.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+m);let b=new DataView(p),v=0;b.setUint8(v++,this.KINDS.userBroadcastPush),b.setUint8(v++,c.length),b.setUint8(v++,a.length),b.setUint8(v++,i.length),b.setUint8(v++,u.length),b.setUint8(v++,h.length),b.setUint8(v++,n),Array.from(c,y=>
335b.setUint8(v++,y.charCodeAt(0))),Array.from(a,y=>b.setUint8(v++,y.charCodeAt(0))),Array.from(i,y=>b.setUint8(v++,y.charCodeAt(0))),Array.from(u,y=>b.setUint8(v++,y.charCodeAt(0))),Array.from(h,y=>b.setUint8(v++,y.charCodeAt(0)));var x=new Uint8Array(p.byteLength+r.byteLength);return x.set(new Uint8Array(p),0),x.set(new Uint8Array(r),p.byteLength),x.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,o,i,a,c]=r;return n({join_ref:s,ref:o,topic:i,event:a,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),o=n.getUint8(2),i=n.getUint8(3),a=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+s));c=c+s;const d=r.decode(t.slice(c,c+o));c=c+o;const h=r.decode(t.slice(c,c+i));c=c+i;const m=t.slice(c,t.byteLength),p=a===this.JSON_ENCODING?JSON.parse(r.decode(m)):m,b={type:this.BROADCAST_EVENT,event:d,payload:p};return i>0&&(b.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:b}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class HS{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var $e;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})($e||($e={}));const zy=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=KL(i,e,t,s),o),{}):{}},KL=(e,t,n,r)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=n[e];return o&&!r.includes(o)?qS(o,i):Xh(i)},qS=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return QL(t,n)}switch(e){case $e.bool:return GL(t);case $e.float4:case $e.float8:case $e.int2:case $e.int4:case $e.int8:case $e.numeric:case $e.oid:return YL(t);case $e.json:case $e.jsonb:return JL(t);case $e.timestamp:return XL(t);case $e.abstime:case $e.date:case $e.daterange:case $e.int4range:case $e.int8range:case $e.money:case $e.reltime:case $e.text:case $e.time:case $e.timestamptz:case $e.timetz:case $e.tsrange:case $e.tstzrange:return Xh(t);default:return Xh(t)}},Xh=e=>e,GL=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},YL=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},JL=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},QL=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const i=e.slice(1,n);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>qS(t,a))}return e},XL=e=>typeof e=="string"?e.replace(" ","T"):e,KS=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class mf{constructor(t,n,r={},s=Jh){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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,j
vendor: 4,598 bytes, line 335
335oin_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var By;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(By||(By={}));class aa{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=aa.syncState(this.state,s,o,i),this.pendingDiffs.forEach(c=>{this.state=aa.syncDiff(this.state,c,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=aa.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const o=this.cloneDeep(t),i=this.transformState(n),a={},c={};return this.map(o,(u,d)=>{i[u]||(c[u]=d)}),this.map(i,(u,d)=>{const h=o[u];if(h){const m=d.map(x=>x.presence_ref),p=h.map(x=>x.presence_ref),b=d.filter(x=>p.indexOf(x.presence_ref)<0),v=h.filter(x=>m.indexOf(x.presence_ref)<0);b.length>0&&(a[u]=b),v.length>0&&(c[u]=v)}else a[u]=d}),this.syncDiff(o,{joins:a,leaves:c},r,s)}static syncDiff(t,n,r,s){const{joins:o,leaves:i}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(a,c)=>{var u;const d=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(c),d.length>0){const h=t[a].map(p=>p.presence_ref),m=d.filter(p=>h.indexOf(p.presence_ref)<0);t[a].unshift(...m)}r(a,d,c)}),this.map(i,(a,c)=>{let u=t[a];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[a]=u,s(a,u,c),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Wy;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Wy||(Wy={}));var la;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(la||(la={}));var pr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(pr||(pr={}));class Po{constructor(t,n={config:{}},r){var s,o;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=ut.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new mf(this,In.join,this.params,this.timeout),this.rejoinTimer=new HS(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ut.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>
335i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=ut.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=ut.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=ut.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=ut.errored,this.rejoinTimer.scheduleTimeout())}),this._on(In.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new aa(this),this.broadcastEndpointURL=KS(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==ut.closed){const{config:{broadcast:i,presence:a,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[la.PRESENCE]&&this.bindings[la.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},m={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t(pr.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t(pr.CLOSED)),this.updateJoinPayload(Object.assign({config:m},h)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var b;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(pr.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,x=(b=v==null?void 0:v.length)!==null&&b!==void 0?b:0,y=[];for(let g=0;g<x;g++){const w=v[g],{filter:{event:_,schema:S,table:k,filter:E}}=w,j=p&&p[g];if(j&&j.event===_&&Po.isFilterValueEqual(j.schema,S)&&Po.isFilterValueEqual(j.table,k)&&Po.isFilterValueEqual(j.filter,E))y.push(Object.assign(Object.assign({},w),{id:j.id}));else{this.unsubscribe(),this.state=ut.errored,t==null||t(pr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(pr.SUBSCRIBED);return}}).receive("error",p=>{this.state=ut.errored,t==null||t(pr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(pr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===ut.joined&&t===la.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let c=a.statusText;try{const u=await a.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
335in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,c;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=ut.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(In.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new mf(this,In.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ut.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),i=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),i}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new mf(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>HL){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:c,leave:u,join:d}=In;if(r&&[a,c,u,d].indexOf(i)>=0&&r!==this._joinRef())return;let m=this._onMessage(i,n,r);if(n&&!m)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var b,v,x;return((b=p.filter)===null||b===void 0?void 0:b.event)==="*"||((x=(v=p.filter)===null||v===void 0?void 0:v.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===i}).map(p=>p.callback(m,r)):(o=this.bindings[i])===null||o===void 0||o.filter(p=>{var b,v,x,y,g,w;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in p){const _=p.id,S=(b=p.filter)===null||b===void 0?void 0:b.event;return _&&((v=n.ids)===null||v===void 0?void 0:v.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((x=n.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const _=(g=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((w=n==null?void 0:n.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===i}).map(p=>{if(typeof m=="object"&&"ids"in m){const b=m.data,{schema:v,table:x,commit_timestamp:y,type:g,errors:w}=b;m=Object.assign(Object.assign({},{schema:v,table:x,commit_timestamp:y,eventType:g,new:{},old:{},errors:w}),this._getPayloadRecords(b))}p.callback(m,r)})}_isClosed(){return this.state===ut.closed}_isJoined(){return this.state===ut.joined}_isJoining(){return this.state===ut.joining}_isLeaving(){return this.state===ut.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&Po.isEqual(s.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(In.close,{},t)}_onError(t){this._on(In.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ut.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=zy(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=zy(t.columns,t.old_record)),n}}const gf=()=>{},Wl={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},ZL=[1e3,2e3,5e3,1e4],eM=1e4,tM=` 336 addEventListener("message", (e) => { 337 if (e.data.event === "start") { 338 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 339 } 340 });`;class nM{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Jh,this.transport=null,this.heartbeatIntervalMs=Wl.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=gf,this.ref=0,this.reconnectTimer=null,this.vsn=Uy,this.logger=gf,this.conn=null,this.sendBuffer=[],this.serializer
340=new qL,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${Qh.websocket}`,this.httpEndpoint=KS(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=UL.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n} 341 342To use Realtime in Node.js, you need to provide a WebSocket implementation: 343 344Option 1: Use Node.js 22+ which has native WebSocket support 345Option 2: Install and provide the "ws" package: 346 347 npm install ws 348 349 import ws from "ws" 350 const client = new RealtimeClient(url, { 351 ...options, 352 transport: ws 353 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Ur.connecting:return ks.Connecting;case Ur.open:return ks.Open;case Ur.closing:return ks.Closing;default:return ks.Closed}}isConnected(){return this.connectionState()===ks.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===r);if(s)return s;{const o=new Po(`realtime:${t}`,n,this);return this.channels.push(o),o}}push(t){const{topic:n,event:r,payload:s,ref:o}=t,i=()=>{this.encode(t,a=>{var c;(c=this.conn)===null||c===void 0||c.send(a)})};this.log("push",`${n} ${r} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(VL,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},Wl.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>
353{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:s,payload:o,ref:i}=n,a=i?`(${i})`:"",c=o.status||"";this.log("receive",`${c} ${r} ${s} ${a}`.trim(),o),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(s,o,i)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Ur.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Ur.open||this.conn.readyState===Ur.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(In.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([tM],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEac
353h(s=>{const o={access_token:n,version:BL};n&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(In.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new HS(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Wl.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,o,i,a,c,u,d,h,m,p;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Jh,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Wl.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:gf,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:Uy,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:b=>ZL[b-1]||eM,this.vsn){case WL:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(b,v)=>v(JSON.stringify(b)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(b,v)=>v(JSON.parse(b));break;case VS:this.encode=(m=t==null?void 0:t.encode)!==null&&m!==void 0?m:this.serializer.encode.bind(this.serializer),this.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var La=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function rM(e,t,n){const r=new URL(t,e);if(n)for(const[s,o]of Object.entries(n))o!==void 0&&r.searchParams.set(s,o);return r.toString()}async function sM(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function oM(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:o,headers:i}){const a=rM(e.baseUrl,r,s),c=await sM(e.auth),u=await t(a,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...c,...i},body:o?JSON.stringify(o):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),m=h&&d?JSON.parse(d):d;if(!u.ok){const p=h?m:void 0,b=p==null?void 0:p.error;throw new La((b==null?void 0:b.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:p})}return{status:u.status,headers:u.headers,data:m}}}}function Vl(e){return e.join("�")}var iM=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Vl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Vl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Vl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Vl(e.namespace)}`}),!0}catch(t){if(t instanceof La&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof La&&n.status===409)return;throw n}}};function co(e){return e.join("�")}var aM=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${co(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${co(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${co(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${co(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${co(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${co(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof La&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof La&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},lM=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=oM({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new iM(this.client,t),this.tableOps=new aM(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
353async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},ad=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function ld(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Hl=class extends ad{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},GS=class extends ad{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const cM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),uM=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Zh=e=>{if(Array.isArray(e))return e.map(n=>Zh(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Zh(r)}),t},dM=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Ma(e){"@babel/helpers - typeof";return Ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(e)}function fM(e,t){if(Ma(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ma(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hM(e){var t=fM(e,"string");return Ma(t)=="symbol"?t:t+""}function pM(e,t,n){return(t=hM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vy(Object(n),!0).forEach(function(r){pM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Hy=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},mM=async(e,t,n,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const s=e,o=s.status||500;if(typeof s.json=="function")s.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Hl(Hy(i),o,a,r))}).catch(()=>{if(r==="vectors"){const i=o+"";t(new Hl(s.statusText||`HTTP ${o} error`,o,i,r))}else{const i=o+"";t(new Hl(s.statusText||`HTTP ${o} error`,o,i,r))}});else{const i=o+"";t(new Hl(s.statusText||`HTTP ${o} error`,o,i,r))}}else t(new GS(Hy(e),e,r))},gM=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?me(me({},s),n):(uM(r)?(s.headers=me({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),me(me({},s),n))};async function Fi(e,t,n,r,s,o,i){return new Promise((a,c)=>{e(n,gM(t,r,s,o)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(i==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>mM(u,c,r,i))})}function YS(e="storage"){return{get:async(t,n,r,s)=>Fi(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,o)=>Fi(t,"POST",n,s,o,r,e),put:async(t,n,r,s,o)=>Fi(t,"PUT",n,s,o,r,e),head:async(t,n,r,s)=>Fi(t,"HEAD",n,me(me({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,o)=>Fi(t,"DELETE",n,s,o,r,e)}}const vM=YS("storage"),{get:$a,post:Rn,put:ep,head:yM,remove:tg}=vM,Xt=YS("vectors");var _i=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=cM(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ld(n))return{data:null,error:n};throw n}}}
353,wM=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ld(t))return{data:null,error:t};throw t}}};let JS;JS=Symbol.toStringTag;var xM=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[JS]="BlobDownloadBuilder",this.promise=null}asStream(){return new wM(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ld(t))return{data:null,error:t};throw t}}};const bM={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},qy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var _M=class extends _i{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let o;const i=me(me({},qy),r);let a=me(me({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const c=i.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),c&&o.append("metadata",s.encodeMetadata(c)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),c&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(c))):(o=n,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,c&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),r!=null&&r.headers&&(a=me(me({},a),r.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?ep:Rn)(s.fetch,`${s.url}/object/${d}`,o,me({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),a=new URL(s.url+`/object/upload/sign/${i}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let c;const u=me({upsert:qy.upsert},r),d=me(me({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:o,fullPath:(await ep(s.fetch,a.toString(),c,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=me({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Rn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),i=new URL(n.url+o.url),a=i.searchParams.get("token");if(!a)throw new ad("No token returned by API");return{signedUrl:i.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Rn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
353stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Rn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e),o=await Rn(r.fetch,`${r.url}/object/sign/${s}`,me({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${o.signedURL}${i}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await Rn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(i=>me(me({},i),{},{signedUrl:i.signedURL?encodeURI(`${r.url}${i.signedURL}${o}`):null}))})}download(e,t){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",r=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=r?`?${r}`:"",o=this._getFinalPath(e),i=()=>$a(this.fetch,`${this.url}/${n}/${o}${s}`,{headers:this.headers,noResolveJson:!0});return new xM(i,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Zh(await $a(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await yM(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ld(r)&&r instanceof GS){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});i!==""&&r.push(i);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await tg(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=me(me(me({},bM),t),{},{prefix:e||""});return await Rn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=me({},e);return await Rn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const SM="2.93.3",fl={"X-Client-Info":`storage-js/${SM}`};var EM=class extends _i{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const o=s.href.replace(/\/$/,""),i=me(me({},fl),t);super(o,i,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await $a(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await $a(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Rn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await ep(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Rn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await tg(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},kM=class extends _i{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=me(me({},fl),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Rn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await $a(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await tg(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!dM(e))throw new ad("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new lM({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
353),r=this.shouldThrowOnError;return new Proxy(n,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...a)=>{try{return{data:await i.apply(s,a),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},CM=class extends _i{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=me(me({},fl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Xt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Xt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},jM=class extends _i{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=me(me({},fl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},NM=class extends _i{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=me(me({},fl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Xt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},TM=class extends NM{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new RM(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},RM=class extends CM{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new AM(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
353,AM=class extends jM{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,me(me({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},PM=class extends EM{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new _M(this.url,this.headers,e,this.fetch)}get vectors(){return new TM(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new kM(this.url+"/iceberg",this.headers,this.fetch)}};const QS="2.93.3",yo=30*1e3,tp=3,vf=tp*yo,OM="http://localhost:9999",IM="supabase.auth.token",DM={"X-Client-Info":`gotrue-js/${QS}`},np="X-Supabase-Api-Version",XS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},LM=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,MM=10*60*1e3;class Fa extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ce(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class $M extends Fa{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function FM(e){return ce(e)&&e.name==="AuthApiError"}class Cs extends Fa{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Nr extends Fa{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Yt extends Nr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function yf(e){return ce(e)&&e.name==="AuthSessionMissingError"}class uo extends Nr{constructor(){super("Auth session or user missing","AuthInvalidToken
353ResponseError",500,void 0)}}class ql extends Nr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Kl extends Nr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function UM(e){return ce(e)&&e.name==="AuthImplicitGrantRedirectError"}class Ky extends Nr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class zM extends Nr{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 rp extends Nr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function wf(e){return ce(e)&&e.name==="AuthRetryableFetchError"}class Gy extends Nr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class sp extends Nr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const lu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Yy=` 354\r=`.split(""),BM=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Yy.length;t+=1)e[Yy[t].charCodeAt(0)]=-2;for(let t=0;t<lu.length;t+=1)e[lu[t].charCodeAt(0)]=t;return e})();function Jy(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(lu[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(lu[r]),t.queuedBits-=6}}function ZS(e,t,n){const r=BM[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Qy(e){const t=[],n=i=>{t.push(String.fromCodePoint(i))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{HM(i,r,n)};for(let i=0;i<e.length;i+=1)ZS(e.charCodeAt(i),s,o);return t.join("")}function WM(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function VM(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}WM(r,t)}}function HM(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Ho(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)ZS(e.charCodeAt(s),n,r);return new Uint8Array(t)}function qM(e){const t=[];return VM(e,n=>t.push(n)),new Uint8Array(t)}function As(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Jy(s,n,r)),Jy(null,n,r),t.join("")}function KM(e){return Math.round(Date.now()/1e3)+e}function GM(){return Symbol("auth-callback")}const vt=()=>typeof window<"u"&&typeof document<"u",xs={tested:!1,writable:!1},eE=()=>{if(!vt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(xs.tested)return xs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),xs.tested=!0,xs.writable=!0}catch{xs.tested=!0,xs.writable=!1}return xs.writable};function YM(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
354h((s,o)=>{t[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const tE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),JM=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",wo=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},bs=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},gt=async(e,t)=>{await e.removeItem(t)};class cd{constructor(){this.promise=new cd.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}cd.promiseConstructor=Promise;function Gl(e){const t=e.split(".");if(t.length!==3)throw new sp("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!LM.test(t[r]))throw new sp("JWT not in base64url format");return{header:JSON.parse(Qy(t[0])),payload:JSON.parse(Qy(t[1])),signature:Ho(t[2]),raw:{header:t[0],payload:t[1]}}}async function QM(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function XM(e,t){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){r(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function ZM(e){return("0"+e.toString(16)).substr(-2)}function e$(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,ZM).join("")}async function t$(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function n$(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await t$(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function fo(e,t,n=!1){const r=e$();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await wo(e,`${t}-code-verifier`,s);const o=await n$(r);return[o,r===o?"plain":"s256"]}const r$=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function s$(e){const t=e.headers.get(np);if(!t||!t.match(r$))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function o$(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function i$(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const a$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ho(e){if(!a$.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function xf(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function l$(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const o=r.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function Xy(e){return JSON.parse(JSON.stringify(e))}const Es=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),c$=[502,503,504];async function Zy(e){var t;if(!JM(e))throw new rp(Es(e),0);if(c$.includes(e.status))throw new rp(Es(e),e.status);let n;try{n=await e.json()}catch(o){throw new Cs(Es(o),o)}let r;const s=s$(e);if(s&&s.getTime()>=XS["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Gy(Es(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Yt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new Gy(Es(n),e.status,n.weak_password.reasons);throw new $M(Es(n),e.status||500,r)}const u$=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function pe(e,t,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);o[np]||(o[np]=XS["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const i=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(i.redirect_to=r.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",c=await d$(e,t,n+a,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function d$(e,t,n,r,s,o){const i=u$(t,r,s,o);let a;try{a=await e(n,Object.assign({},i))}catch(c){throw console.error(c),new rp(Es(c),0)}if(a.ok||await Zy(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(c){await Zy(c)}}function jn(e){var t;let n=null;p$(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=KM(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function e0(e){const t=jn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Wr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function f$(e){return{data:e,error:null}}function h$(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=e,i=bi(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},c=Object.assign({},i);return{data:{properties:a,user:c},error:null}}function t0(e){return e}function p$(e){return e.access_token&&e.refresh_token&&e.expires_in}const bf=["global","local","others"];class m${constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=tE(r),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)}}async signOut(t,n=bf[0]){if(bf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${bf.join(", ")}`);try{return await pe(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ce(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await pe(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Wr})}catch(r){if(ce(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=bi(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await pe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:h$,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ce(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await pe(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Wr})}catch(n){if(ce(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,o,i,a,c;try{const u={nextPage:null,lastPage:0,total:0},d=await pe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:t0});if(d.error)throw d.error;const h=await d.json(),m=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,p=(c=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&c!==void 0?c:[];return p.length>
3540&&(p.forEach(b=>{const v=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);u[`${x}Page`]=v}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(ce(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ho(t);try{return await pe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Wr})}catch(n){if(ce(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ho(t);try{return await pe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Wr})}catch(r){if(ce(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){ho(t);try{return await pe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Wr})}catch(r){if(ce(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){ho(t.userId);try{const{data:n,error:r}=await pe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ho(t.userId),ho(t.id);try{return{data:await pe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,o,i,a,c;try{const u={nextPage:null,lastPage:0,total:0},d=await pe(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:t0});if(d.error)throw d.error;const h=await d.json(),m=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,p=(c=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(b=>{const v=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(b.split(";")[1].split("=")[1]);u[`${x}Page`]=v}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(ce(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await pe(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await pe(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await pe(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ce(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await pe(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await pe(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}}function n0(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const po={debug:!!(globalThis&&eE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
354class nE extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class g$ extends nE{}async function v$(e,t,n){po.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),po.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){po.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{po.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw po.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new g$(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(po.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"),await n()}}))}function y$(){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 rE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function w$(e){return parseInt(e,16)}function x$(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function b$(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:c,resources:u,scheme:d,uri:h,version:m}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(m!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${m}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 355`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=rE(e.address),b=d?`${d}://${r}`:r,v=e.statement?`${e.statement} 356`:"",x=`${b} wants you to sign in with your Ethereum account: 357${p} 358 359${v}`;let y=`URI: ${h} 360Version: ${m} 361Chain ID: ${n}${i?` 362Nonce: ${i}`:""} 363Issued At: ${o.toISOString()}`;if(s&&(y+=` 364Expiration Time: ${s.toISOString()}`),a&&(y+=` 365Not Before: ${a.toISOString()}`),c&&(y+=` 366Request ID: ${c}`),u){let g=` 367Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);g+=` 368- ${w}`}y+=g}return`${x} 369${y}`}class st extends Error{constructor({message:t,code:n,cause:r,name:s}){var o;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(o=s??(r instanceof Error?r.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=n}}class cu extends st{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function _$({error:e,options:t}){var n,r,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new st({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=o.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new st({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=o.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new st({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new st({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new st({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new st({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new st({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new st({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(sE(i)){if(o.rp.id!==i)return new st({message:`The RP ID "${o.rp.id}
369" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new st({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new st({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new st({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new st({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function S$({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new st({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new st({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(sE(r)){if(n.rpId!==r)return new st({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new st({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new st({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new st({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class E${createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const k$=new E$;function C$(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=bi(e,["challenge","user","excludeCredentials"]),o=Ho(t).buffer,i=Object.assign(Object.assign({},n),{id:Ho(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:o,user:i});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];a.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Ho(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function j$(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=bi(e,["challenge","allowCredentials"]),s=Ho(t).buffer,o=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){o.allowCredentials=new Array(n.length);for(let i=0;i<n.length;i++){const a=n[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:Ho(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function N$(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:As(new Uint8Array(e.response.attestationObject)),clientDataJSON:As(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function T$(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:As(new Uint8Array(s.authenticatorData)),clientDataJSON:As(new Uint8Array(s.clientDataJSON)),signature:As(new Uint8Array(s.signature)),userHandle:s.userHandle?As(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function r0(){var e,t;return!!(vt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function R$(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cu("Browser returned unexpected credential type",t)}:{data:null,error:new cu("Empty credential response",t)}}
369catch(t){return{data:null,error:_$({error:t,options:e})}}}async function A$(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cu("Browser returned unexpected credential type",t)}:{data:null,error:new cu("Empty credential response",t)}}catch(t){return{data:null,error:S$({error:t,options:e})}}}const P$={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},O$={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function uu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))r[o]=i;else if(n(i))r[o]=i;else if(t(i)){const a=r[o];t(a)?r[o]=uu(a,i):r[o]=uu(i)}else r[o]=i}return r}function I$(e,t){return uu(P$,e,t||{})}function D$(e,t){return uu(O$,e,t||{})}class L${constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},o){var i;try{const{data:a,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:c};const u=s??k$.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const h=r;if(h)d.name=`${d.id}:${h}`;else{const p=(await this.client.getUser()).data.user,b=((i=p==null?void 0:p.user_metadata)===null||i===void 0?void 0:i.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${b}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=I$(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:h,error:m}=await R$({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:m}}case"request":{const d=D$(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:h,error:m}=await A$(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:m}}}}catch(a){return ce(a)?{data:null,error:a}:{data:null,error:new Cs("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!n)return{data:null,error:new Fa("rpId is required for WebAuthn authentication")};try{if(!r0())return{data:null,error:new Cs("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:c}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(i){return ce(i)?{data:null,error:i}:{data:null,error:new Cs("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!n)return{data:null,error:new Fa("rpId is required for WebAuthn registration")};try{if(!r0())return{data:null,error:new Cs("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(d=>{var h;
369return(h=d.data)===null||h===void 0?void 0:h.all.find(m=>m.factor_type==="webauthn"&&m.friendly_name===t&&m.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:c,error:u}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:o});return c?this._verify({factorId:i.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(i){return ce(i)?{data:null,error:i}:{data:null,error:new Cs("Unexpected error in register",i)}}}}y$();const M$={url:OM,storageKey:IM,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DM,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function s0(e,t,n){return await n()}const mo={};class Ua{get jwks(){var t,n;return(n=(t=mo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){mo[this.storageKey]=Object.assign(Object.assign({},mo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=mo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){mo[this.storageKey]=Object.assign(Object.assign({},mo[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,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 o=Object.assign(Object.assign({},M$),t);if(this.storageKey=o.storageKey,this.instanceID=(n=Ua.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ua.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&vt()){const i=`${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(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new m$({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=tE(o.fetch),this.lock=o.lock||s0,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&vt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=v$:this.lock=s0,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 L$(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:eE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=n0(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=n0(this.memoryStorage)),vt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i);try{await this._notifyAllSubscribers(i.data.event,i.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}this.initialize().catch(i=>{this._debug("#initialize()","error",i)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${QS}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(vt()&&(n=YM(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),vt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),UM(o)){const c=(t=o.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ce(n)?this._returnResult({error:n}):this._returnResult({error:new Cs("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const o=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:jn}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const c=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(ce(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var n,r,s;try{let o;if("email"in t){const{email:d,password:h,options:m}=t;let p=null,b=null;this.flowType==="pkce"&&([p,b]=await fo(this.storage,this.storageKey)),o=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:m==null?void 0:m.emailRedirectTo,body:{email:d,password:h,data:(n=m==null?void 0:m.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:p,code_challenge_method:b},xform:jn})}else if("phone"in t){const{phone:d,password:h,options:m}=t;o=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=m==null?void 0:m.data)!==null&&r!==void 0?r:{},channel:(s=m==null?void 0:m.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:jn})}else throw new ql("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await gt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const c=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:o,password:i,options:a}=t;n=await pe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:e0})}else if("phone"in t){const{phone:o,password:i,options:a}=t;n=await pe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:e0})}else throw new ql("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const o=new uo;return this._returnResult({data:{user:null,session:null},error:o})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.o
369ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,o,i,a,c,u,d,h,m;let p,b;if("message"in t)p=t.message,b=t.signature;else{const{chain:v,wallet:x,statement:y,options:g}=t;let w;if(vt())if(typeof x=="object")w=x;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")w=A.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.");w=x}const _=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(A=>A).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=rE(S[0]);let E=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const A=await w.request({method:"eth_chainId"});E=w$(A)}const j={domain:_.host,address:k,statement:y,uri:_.href,version:"1",chainId:E,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=g==null?void 0:g.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=b$(j),b=await w.request({method:"personal_sign",params:[x$(p),k]})}try{const{data:v,error:x}=await pe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:b},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:jn});if(x)throw x;if(!v||!v.session||!v.user){const y=new uo;return this._returnResult({data:{user:null,session:null},error:y})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(ce(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(t){var n,r,s,o,i,a,c,u,d,h,m,p;let b,v;if("message"in t)b=t.message,v=t.signature;else{const{chain:x,wallet:y,statement:g,options:w}=t;let _;if(vt())if(typeof y=="object")_=y;
369else{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 y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=y}const S=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.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),v=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=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 370`);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");v=k}}try{const{data:x,error:y}=await pe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:As(v)},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:jn});if(y)throw y;if(!x||!x.session||!x.user){const g=new uo;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:y})}catch(x){if(ce(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await bs(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new zM;const{data:o,error:i}=await pe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:jn});if(await gt(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new uo;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:o,nonce:i}=t,a=await pe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:jn}),{data:c,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new uo;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,o,i;try{if("email"in t){const{email:a,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await fo(this.storage,this.storageKey));const{error:h}=await pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:c}=t,{data:u,error:d}=await pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(i=c==null?void 0:c.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new ql("You must provide either an email or phone number.")}catch(a){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,o;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:i,error:a}=await pe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:jn});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const c=i.session,u=i.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(ce(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,o,i;try{let a=null,c=null;this.flowType==="pkce"&&([a,c]=await fo(this.storage,this.storageKey));const u=await pe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:c}),headers:this.headers,xform:f$});return!((o=u.data)===null||o===void 0)&&o.url&&vt()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(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 t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Yt;const{error:s}=await pe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(ce(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:o}=t,{error:i}=await pe(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:r,type:s,options:o}=t,{data:i,error:a}=await pe(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new ql("You must provide either an email or phone number and a type")}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await bs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
370id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<vf:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const i=await bs(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=xf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=l$(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Wr}):await this._useSession(async n=>{var r,s,o;const{data:i,error:a}=n;if(a)throw a;return!(!((r=i.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Yt}:await pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Wr})})}catch(n){if(ce(n))return yf(n)&&(await this._removeSession(),await gt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new Yt;const i=s.session;let a=null,c=null;this.flowType==="pkce"&&t.email!=null&&([a,c]=await fo(this.storage,this.storageKey));const{data:u,error:d}=await pe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:c}),jwt:i.access_token,xform:Wr});if(d)throw d;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(r){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Yt;const n=Date.now()/1e3;let r=n,s=!0,o=null;const{payload:i}=Gl(t.access_token);if(i.exp&&(r=i.exp,s=r<=n),s){const{data:a,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(n){if(ce(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:i,error:a}=n;if(a)throw a;t=(r=i.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Yt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!vt())throw new Kl("No browser detected.");
370if(t.error||t.error_description||t.error_code)throw new Kl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Ky("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Kl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Ky("No code detected.");const{data:g,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:c,token_type:u}=t;if(!o||!a||!i||!u)throw new Kl("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let m=d+h;c&&(m=parseInt(c));const p=m-d;p*1e3<=yo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${h}s`);const b=m-h;d-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,m,d):d-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,m,d);const{data:v,error:x}=await this._getUser(o);if(x)throw x;const y={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:m,refresh_token:i,token_type:u,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(r){if(ce(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await bs(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o&&!yf(o))return this._returnResult({error:o});const i=(r=s.session)===null||r===void 0?void 0:r.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(FM(a)&&(a.status===404||a.status===401||a.status===403)||yf(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await gt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=GM(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:o},error:i}=n;if(i)throw i;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await fo(this.storage,this.storageKey,!0));try{return await pe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async o=>{var i,a,c,u,d;const{data:h,error:m}=o;if(m)throw m;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await pe(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return vt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(ce(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:o}}=n;if(s)throw s;const{options:i,provider:a,token:c,access_token:u,nonce:d}=t,h=await pe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=o==null?void 0:o.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:jn}),{data:m,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!m||!m.session||!m.user?this._returnResult({data:{user:null,session:null},error:new uo}):(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("USER_UPDATED",m.session)),this._returnResult({data:m,error:p}))}catch(s){if(await gt(this.storage,`${this.storageKey}-code-verifier`),ce(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)throw i;
370return await pe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await XM(async s=>(s>0&&await QM(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await pe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:jn})),(s,o)=>{const i=200*Math.pow(2,s);return o&&wf(o)&&Date.now()+i-r<yo})}catch(r){if(this._debug(n,"error",r),ce(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),vt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await bs(this.storage,this.storageKey);if(s&&this.userStorage){let i=await bs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await wo(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:xf()}else if(s&&!s.user&&!s.user){const i=await bs(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await gt(this.storage,this.storageKey+"-user"),await wo(this.storage,this.storageKey,s)):s.user=xf()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const o=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<vf;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${vf}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),wf(i)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(r,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Yt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new cd;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new Yt;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),ce(o)){const i={data:null,error:o};return wf(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(i),i}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(c){o.push(c)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await gt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await wo(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const o=Xy(s);await wo(this.storage,this.storageKey,o)}else{const s=Xy(n);await wo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await gt(this.storage,this.storageKey),await gt(this.storage,this.storageKey+"-code-verifier"),await gt(this.storage,this.storageKey+"-user"),this.userStorage&&await gt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&vt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
370catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),yo);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/yo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${yo}ms, refresh threshold is ${tp} ticks`),s<=tp&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof nE)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!vt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,i]=await fo(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?this._returnResult({data:null,error:o}):await pe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await pe(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;
370if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?N$(t.webauthn.credential_response):T$(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:c}=await pe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(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:c}))})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return this._returnResult({data:null,error:o});const i=await pe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(i.error)return i;const{data:a}=i;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:C$(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:j$(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,o;if(t)try{const{payload:p}=Gl(t);let b=null;p.aal&&(b=p.aal);let v=b;const{data:{user:x},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(v="aal2");const w=p.amr||[];return{data:{currentLevel:b,nextLevel:v,currentAuthenticationMethods:w},error:null}}catch(p){if(ce(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:i},error:a}
370=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Gl(i.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((o=(s=i.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(d="aal2");const m=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:m},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await pe(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Yt})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Yt});const i=await pe(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&vt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(r){if(ce(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Yt});const i=await pe(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&vt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(r){if(ce(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await pe(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Yt})})}catch(t){if(ce(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await pe(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Yt})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+MM>s)return r;const{data:o,error:i}=await pe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,r=o.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:b}
370=await this.getSession();if(b||!p.session)return this._returnResult({data:null,error:b});r=p.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:c}}=Gl(r);n!=null&&n.allowExpired||o$(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:o,header:s,signature:i},error:null}}const d=i$(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,i,qM(`${a}.${c}`)))throw new sp("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(r){if(ce(r))return this._returnResult({data:null,error:r});throw r}}}Ua.nextInstanceID={};const $$=Ua,F$="2.93.3";let Gi="";typeof Deno<"u"?Gi="deno":typeof document<"u"?Gi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Gi="react-native":Gi="node";const U$={"X-Client-Info":`supabase-js-${Gi}/${F$}`},z$={headers:U$},B$={schema:"public"},W$={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},V$={};function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function H$(e,t){if(za(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q$(e){var t=H$(e,"string");return za(t)=="symbol"?t:t+""}function K$(e,t,n){return(t=q$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o0(Object(n),!0).forEach(function(r){K$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const G$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Y$=()=>Headers,J$=(e,t,n)=>{const r=G$(n),s=Y$();return async(o,i)=>{var a;const c=(a=await t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(o,Ze(Ze({},i),{},{headers:u}))}};function Q$(e){return e.endsWith("/")?e:e+"/"}function X$(e,t){var n,r;const{db:s,auth:o,realtime:i,global:a}=e,{db:c,auth:u,realtime:d,global:h}=t,m={db:Ze(Ze({},c),s),auth:Ze(Ze({},u),o),realtime:Ze(Ze({},d),i),storage:{},global:Ze(Ze(Ze({},h),a),{},{headers:Ze(Ze({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?m.accessToken=e.accessToken:delete m.accessToken,m}function Z$(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Q$(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var e5=class extends $${constructor(e){super(e)}},t5=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const o=Z$(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,a={db:B$,realtime:V$,auth:Ze(Ze({},W$),{},{storageKey:i}),global:z$},c=X$(n??{},a);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=J$(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Ze({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new FL(new URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new PM(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new IL(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
370channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:o,flowType:i,lock:a,debug:c,throwOnError:u},d,h){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new e5({url:this.authUrl.href,headers:Ze(Ze({},m),d),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:i,lock:a,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new nM(this.realtimeUrl.href,Ze(Ze({},e),{},{params:Ze(Ze({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const n5=(e,t,n)=>new t5(e,t,n);function r5(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}r5()&&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 s5(){var x,y;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>e===g||e.endsWith("."+g)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((y=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:y[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=c&&a.test(c)?[c]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d="lovable-preview-auth:result",h=2e3,m=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),p=(g,w,_)=>new Promise(S=>{const k=m();let E=!1,j;const A=K=>{E||(E=!0,clearTimeout(j),window.removeEventListener("message",O),S(K))},O=K=>{if(u.indexOf(K.origin)<0)return;const J=K.data;J&&J.type===d&&J.requestId===k&&A(J)};window.addEventListener("message",O);const H={type:g,requestId:k,projectId:s,key:w};_!==void 0&&(H.value=_);for(const K of u)window.parent.postMessage(H,K);j=setTimeout(()=>A(null),h)});let b=!0;const v=250;return{getItem:async g=>{let w=await p("lovable-preview-auth:get",g);return!w&&b&&(await new Promise(_=>setTimeout(_,v)),w=await p("lovable-preview-auth:get",g)),b=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(g),null):w.value:localStorage.getItem(g)},setItem:(g,w)=>(localStorage.setItem(g,w),p("lovable-preview-auth:set",g,w).then(()=>{})),removeItem:g=>(localStorage.removeItem(g),p("lovable-preview-auth:remove",g).then(()=>{}))}}const o5="https://gjgbwfwumiznuzszjhqx.supabase.co",i5="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdqZ2J3Znd1bWl6bnV6c3pqaHF4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njk3Nzk2NzMsImV4cCI6MjA4NTM1NTY3M30.K0uZEQ99kgFxwE9CHTQwosn8Uoge3ZRz6luEupaWC8Q",Re=n5(o5,i5,{auth:{storage:s5(),persistSession:!0,autoRefreshToken:!0}});async function a5(e){try{const{data:t,error:n}=await Re.functions.invoke("ensure-signup-setup",{headers:{Authorization:`Bearer ${e}`}});if(n){console.warn("ensure-signup-setup invoke skipped:",n.message??n);return}console.log("ensure-signup-setup result:",t)}catch(t){console.error("ensure-signup-setup failed:",t)}}function l5(){const e=window.location.origin;return e.includes("localhost")||e.includes("127.0.0.1")?e:(e.includes("wholio.ai"),"https://wholio.ai")}function c5(){return window.location.origin}const u5=l5,op="wholio_google_auth_intent",ng="wholio_post_auth_redirect",oE="wholio:post-auth-redirect-change",ip="wholio_pre_auth_state",d5="pending_checkout",f5=10*60*1e3,h5=2*60*1e3,p5=30*60*1e3,iE=()=>{try{window.dispatchEvent(new Event(oE))}catch{}},aE=(e={})=>{try{localStorage.setItem(op,JSON.stringify({timestamp:Date.now()})),e.showDashboardGate!==!1&&(localStorage.setItem(ng,JSON.stringify({path:"/dashboard",timestamp:Date.now()})),iE())}catch{}},ui=()=>{try{localStorage.removeItem(ng),iE()}catch{}},i0=()=>{try{const e=localStorage.getItem(ng);if(!e)return null;const t=JSON.parse(e);return!t.path||!t.timestamp||Date.now()-t.timestamp>h5?(ui(),null):t}catch{return ui(),null}},a0=oE,m5=()=>{try{const e=localStorage.getItem(op);if(localStorage.removeItem(op),!e)return!1;const t=JSON.parse(e);return!!t.timestamp&&Date.now()-t.timestamp<f5}catch{return!1}},g5=()=>{try{const e=localStorage.getItem(ip);return e?JSON.parse(e):null}catch{return null}},v5=(e,t)=>{window.history.pushState(t??null,"",e),window.dispatchEvent(new PopStateEvent("popstate",{state:t??null}))},rg=()=>{const e=g5();if(e!=null&&e.pendingCheckout){localStorage.removeItem(ip),ui();try{localStorage.setItem(d5,JSON.stringify(e.pendingCheckout))}catch{}return}const t=e==null?void 0:e.redirectPath,n=!!t&&t!=="/auth/callback"&&!t.startsWith("/auth"),r=e!=null&&e.timestamp?Date.now()-e.timestamp<p5:!1;if(e!=null&&e.pendingResults&&n&&r){window.location.pathname+window.location.search===t?v5(t,{pendingResults:e.pendingResults,pendingCheckout:e.pendingCheckout,timestamp:e.timestamp}):window.location.assign(t);return}localStorage.removeItem(ip),window.location.pathname!=="/dashboard"?window.location.assign("/dashboard"):ui()};function Wn(){const[e,t]=f.useState(null),[n,r]=f.useState(null),[s,o]=f.useState(!0);return f.useEffect(()=>{const{data:{subscription:c}}=Re.auth.onAuthStateChange((u,d)=>{r(d),t((d==null?void 0:d.user)??null),o(!1),u==="SIGNED_IN"&&(d!=null&&d.access_token)&&window.__wholio_setup_token!==d.access_token&&(window.__wholio_setup_token=d.access_token,Re.auth.getUser().then(({data:m,error:p})=>{p||!(m!=null&&m.user)||(a5(d.access_token).catch(()=>{}),m5()&&rg())}))});return Re.auth.getSession().then(({data:{session:u}})=>{r(u),t((u==null?void 0:u.user)??null),o(!1)}),()=>c.unsubscribe()},[]),{user:e,session:n,loading:s,signInWithOtp:async(c,u)=>{const d=u5(),h=u?`${d}/auth/callback?restore=${u}`:`${d}/auth/callback`,{error:m}=await Re.auth.signInWithOtp({email:c,options:{emailRedirectTo:h}});return{error:m}},signOut:async()=>{const{error:c}=await Re.auth.signOut();return{error:c}}}}var y5="authorization_response",w5="/~oauth/initiate",x5=["https://oauth.lovable.app","https://lovable.dev"],b5="lovable://oauth-callback",_5="http://127.0.0.1/iframe-oauth/callback",S5=500,E5=12e4;function k5(e){let t;const n=new Promise(o=>{t=o}),r=o=>{if(!e.some(c=>
370o.origin===c))return;const a=o.data;!a||typeof a!="object"||a.type===y5&&t(a.response)},s=()=>{window.removeEventListener("message",r)};return window.addEventListener("message",r),{cleanup:s,messagePromise:n}}function C5(e){const t=window.screenX!==0||window.screenY!==0||!e,n=t?window.outerWidth*.5:window.screen.width*.5,r=t?window.outerHeight*.5:window.screen.height*.5,s=t?window.screenX+(window.outerWidth-n)/2:(window.screen.width-n)/2,o=t?window.screenY+(window.outerHeight-r)/2:(window.screen.height-r)/2;return{width:n,height:r,left:s,top:o}}function l0(e,t){return e.state!==t?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function j5(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function N5(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function T5(e={}){const t=e.oauthBrokerUrl??w5,n=e.supportedOAuthOrigins??x5;async function r(s,o={}){let i=!1;try{i=window.self!==window.top}catch{i=!0}const a=navigator.userAgent,c=/LovableApp\//.test(a),u=!c&&/lovable/i.test(a),d=N5();let h=o.redirect_uri??window.location.origin;c&&i?h=b5:u&&i&&(h=_5);const m=new URLSearchParams({...o.extraParams,provider:s,redirect_uri:h,state:d});if(!i)return window.location.href=`${t}?${m.toString()}`,{error:null,redirected:!0};!c&&!u&&m.set("response_mode","web_message");const p=`${t}?${m.toString()}`,b=u?[...n,window.location.origin]:n,{messagePromise:v,cleanup:x}=k5(b);let y;if(j5())y=window.open(p,"_blank");else{const{width:_,height:S,left:k,top:E}=C5(i);y=window.open(p,"oauth",`width=${_},height=${S},left=${k},top=${E}`)}if(!y&&(c||u)){let _;const S=new Promise((k,E)=>{_=setTimeout(()=>{E(new Error("OAuth timed out waiting for response"))},E5)});try{const k=await Promise.race([v,S]);return l0(k,d)}catch(k){return{error:k instanceof Error?k:new Error(String(k))}}finally{_&&clearTimeout(_),x()}}if(!y)return x(),{error:new Error("Popup was blocked")};let g;const w=new Promise((_,S)=>{g=setInterval(()=>{y.closed&&(clearInterval(g),S(new Error("Sign in was cancelled")))},S5)});try{const _=await Promise.race([v,w]);return l0(_,d)}catch(_){return{error:_ instanceof Error?_:new Error(String(_))}}finally{clearInterval(g),x(),y==null||y.close()}}return{signInWithOAuth:r}}var R5={name:"@lovable.dev/cloud-auth-js",version:"1.1.1",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}};typeof window<"u"&&(window.__lovable_cloud_auth_js_version=R5.version);function A5(e={}){return T5(e)}const P5=A5({}),lE={auth:{signInWithOAuth:async(e,t)=>{const n=await P5.signInWithOAuth(e,{redirect_uri:t==null?void 0:t.redirect_uri,extraParams:{...t==null?void 0:t.extraParams}});if(n.redirected||n.error)return n;try{await Re.auth.setSession(n.tokens)}catch(r){return{error:r instanceof Error?r:new Error(String(r))}}return n}}};var O5="Separator",c0="horizontal",I5=["horizontal","vertical"],cE=f.forwardRef((e,t)=>{const{decorative:n,orientation:r=c0,...s}=e,o=D5(r)?r:c0,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(ye.div,{"data-orientation":o,...a,...s,ref:t})});cE.displayName=O5;function D5(e){return I5.includes(e)}var uE=cE;const dE=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(uE,{ref:s,decorative:n,orientation:t,className:F("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));dE.displayName=uE.displayName;const sg="/assets/wholio-head-DDeiisVi.png";function ud({isOpen:e,onClose:t,mode:n,dismissible:r=!0}){const[s,o]=f.useState(""),[i,a]=f.useState(!1),[c,u]=f.useState(!1),[d,h]=f.useState(!1),[m,p]=f.useState(null),{signInWithOtp:b,user:v}=Wn();f.useEffect(()=>{!e||!v||t()},[e,v==null?void 0:v.id]);const x=async()=>{const _=localStorage.getItem("pendingSearchResults"),S=localStorage.getItem("pending_checkout");let k=null;if(S)try{k=JSON.parse(S)}catch{}const E={redirectPath:window.location.pathname+window.location.search,pendingResults:_?JSON.parse(_):null,pendingCheckout:k,timestamp:Date.now()};if(localStorage.removeItem("pendingSearchResults"),localStorage.setItem("wholio_pre_auth_state",JSON.stringify(E)),!E.pendingResults&&!E.pendingCheckout)return null;try{const{data:j,error:A}=await Re.functions.invoke("auth-restore-state",{method:"POST",body:{payload:E}});return A||!(j!=null&&j.token)?(console.error("Failed to save restore state:",A),null):j.token}catch(j){return console.error("Failed to save restore state:",j),null}},y=async()=>{u(!0),p(null);const _=!localStorage.getItem("pendingSearchResults")&&!localStorage.getItem("pending_checkout");aE({showDashboardGate:_});const S=await x(),k=c5(),E=S?`${k}/auth/callback?restore=${S}`:`${k}/auth/callback`,j=await lE.auth.signInWithOAuth("google",{redirect_uri:E});if(!j.redirected){if(j.error){p(j.error.message||"Failed to sign in with Google"),u(!1),localStorage.removeItem("wholio_google_auth_intent"),ui();return}t(),rg()}},g=async _=>{_.preventDefault(),a(!0),p(null);const S=await x(),{error:k}=await b(s,S||void 0);k?(p(k.message),a(!1)):(h(!0),a(!1))},w=()=>{o(""),h(!1),p(null),t()};return l.jsx(id,{open:e,onOpenChange:_=>{(r||_)&&w()},children:l.jsxs(cl,{className:"sm:max-w-md",onInteractOutside:_=>{r||_.preventDefault()},onEscapeKeyDown:_=>{r||_.preventDefault()},...!r&&{hideCloseButton:!0},children:[l.jsxs(ul,{children:[l.jsx("div",{className:"flex justify-center mb-2",children:l.jsx("img",{src:sg,alt:"Wholio",className:"h-12 w-auto"})}),l.jsx(dl,{className:"text-xl font-semibold text-center",children:"Log in or create your account"})]}),d?l.jsxs("div",{className:"flex flex-col items-center py-6 space-y-4 animate-fade-in",children:[l.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-primary/10",children:l.jsx(W2,{className:"w-8 h-8 text-primary"})}),l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("p",{className:"font-medium",children:"Check your email"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a magic link to ",l.jsx("strong",{children:s})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Click the link in the email to sign in."})]})]}):l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs(ve,{type:"button",variant:"outline",className:"w-full h-12 text-base font-medium border-2 hover:bg-accent",onClick:y,disabled:c||i,children:[c?l.jsx(yn,{className:"mr-2 h-5 w-5 animate-spin"}):l.jsxs("svg",{className:"mr-2 h-5 w-5",viewBox:"0 0 24 24",children:[l.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),l.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),l.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),l.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx(dE,{className:"w-full"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),l.jsxs("form",{onSubmit:g,className:"space-y-3",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zm,{htmlFor:"email",className:"text-sm text-muted-foreground",children:"Continue with email"}),l.jsxs("div",{className:"relative",children:[l.jsx(J2,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),l.jsx(vs,{id:"email",type:"email",placeholder:"[email protected]",value:s,onChange:_=>o(_.target.value),className:"pl-10",required:!0,disabled:i||c})]})]}),m&&l.jsx("p",{className:"text-sm text-destructive",children:m}),l.jsx(ve,{type:"submit",variant:"secondary",className:"w-full",disabled:i||c||!s,children:i?l.jsxs(l.Fragment,{children:[l.jsx(yn,{className:"mr-2 h-4 w-4 animate-spin"}),"Sending..."]}):"Send magic link"})]}),l.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"We'll send you a magic link to sign in. No password needed."})]})]})})}const u0={free:{contacts:100,seats:1}
370,professional:{contacts:1500,seats:1},team:{contacts:4e3,seats:5},enterprise:{contacts:999999,seats:999}};function fE(){const{user:e,loading:t}=Wn(),[n,r]=f.useState(null),[s,o]=f.useState([]),[i,a]=f.useState(null),[c,u]=f.useState(!0),[d,h]=f.useState(null),m=f.useRef(!1),p=f.useCallback(x=>{const y=new Date(x),S=30-Math.floor((new Date().getTime()-y.getTime())/(1e3*60*60*24))%30;return Math.max(1,S)},[]),b=f.useCallback(async()=>{if(!e){r(null),o([]),a(null),u(!1);return}m.current||u(!0),h(null);try{const[x,y,g,w]=await Promise.all([Re.from("profiles").select("*").eq("id",e.id).maybeSingle(),Re.from("searches").select("*").eq("user_id",e.id).order("created_at",{ascending:!1}).limit(50),Re.from("contacts").select("id",{count:"exact",head:!0}).eq("user_id",e.id),Re.from("contacts").select("id",{count:"exact",head:!0}).eq("user_id",e.id).or("and(confidence_score.gte.70,linkedin_url.not.is.null),match_status.eq.confirmed")]);if(x.error?(console.error("Error fetching profile:",x.error),h("Failed to load profile data")):r(x.data),y.error)console.error("Error fetching searches:",y.error),h("Failed to load search history");else{const _=(y.data||[]).map(S=>({...S,page_context:S.page_context}));o(_)}g.error||w.error?console.error("Error fetching contact stats:",g.error||w.error):a({total:g.count??0,successful:w.count??0})}catch(x){console.error("Unexpected error fetching user data:",x),h("An unexpected error occurred")}finally{m.current=!0,u(!1)}},[e]);f.useEffect(()=>{t||b()},[t,b]);const v=n?(()=>{const x=u0[n.plan]||u0.free,y=n.contacts_used_this_month,g=x.contacts,w=g>0?y/g*100:0,_=p(n.billing_cycle_start);return{used:y,limit:g,percentage:Math.min(w,100),daysUntilReset:_,isNearLimit:w>=80,isAtLimit:y>=g}})():null;return{profile:n,searches:s,contactStats:i,usage:v,isLoading:t||c,error:d,refetch:b}}function d0({label:e,items:t,active:n}){const[r,s]=f.useState(!1),o=f.useRef(null),i=()=>{o.current&&clearTimeout(o.current),s(!0)},a=()=>{o.current=setTimeout(()=>s(!1),150)};return l.jsxs("div",{className:"relative",onMouseEnter:i,onMouseLeave:a,children:[l.jsxs("button",{className:F("relative flex items-center gap-1 px-3 py-2 text-sm transition-colors",n?"text-white":"text-white/70 hover:text-white"),onClick:()=>s(!r),children:[e,l.jsx(zs,{className:F("h-4 w-4 transition-transform duration-200",r&&"rotate-180")}),n&&l.jsx("span",{className:"absolute left-3 right-3 -bottom-px h-[2px] rounded-full bg-primary"})]}),l.jsx("div",{className:F("absolute top-full left-0 mt-1 min-w-[280px] rounded-[16px] border border-[rgba(255,255,255,0.10)] bg-[#161616] shadow-lg z-50","transition-all duration-150 ease-out origin-top",r?"opacity-100 translate-y-0 scale-100":"opacity-0 -translate-y-1 scale-95 pointer-events-none"),children:l.jsx("div",{className:"p-2",children:t.map(c=>l.jsxs(dt,{to:c.href,className:"block rounded-md px-3 py-2.5 hover:bg-white/5 transition-colors",onClick:()=>s(!1),children:[l.jsx("div",{className:"text-sm font-medium text-white",children:c.label}),l.jsx("div",{className:"text-xs text-[#9A9A9A] mt-0.5",children:c.description})]},c.href))})})]})}function Yl({label:e,to:t,onClick:n,active:r}){const s=F("relative flex items-center px-3 py-2 text-sm transition-colors",r?"text-white":"text-white/70 hover:text-white"),o=l.jsxs(l.Fragment,{children:[e,r&&l.jsx("span",{className:"absolute left-3 right-3 -bottom-px h-[2px] rounded-full bg-primary"})]});return t?l.jsx(dt,{to:t,className:s,children:o}):l.jsx("button",{type:"button",onClick:n,className:s,children:o})}const f0=[{label:"B2B GTM & Sales Agencies",description:"Build prospect lists from any webpage â at scale",href:"/use-cases/agencies"},{label:"Sales & Marketing Teams",description:"Fill the gap your database can't cover",href:"/use-cases/sales-marketing"},{label:"Recruiters & Search",description:"Source passive candidates from any webpage",href:"/use-cases/recruiters"}],h0=[{label:"Wholio vs Clay",description:"Extraction meets enrichment",href:"/compare/wholio-vs-clay"},{label:"Wholio vs Apollo",description:"Your database can't read a webpage",href:"/compare/wholio-vs-apollo"},{label:"Wholio vs Evaboot",description:"One extracts from Sales Navigator, one from everywhere else",href:"/compare/wholio-vs-evaboot"},{label:"Wholio vs Sales Navigator",description:"Outside LinkedIn, not inside it",href:"/compare/wholio-vs-sales-navigator"},{label:"Wholio vs PhantomBuster",description:"No scripts, no account risk",href:"/compare/wholio-vs-phantombuster"}];function L5(){const{user:e,loading:t,signOut:n}=Wn(),{usage:r}=fE(),s=xi(),o=ir(),[i,a]=f.useState({isOpen:!1,mode:"login"}),[c,u]=f.useState(!1),[d,h]=f.useState(!1),[m,p]=f.useState(!1);f.useEffect(()=>{localStorage.getItem("openAuthModal")==="true"&&(localStorage.removeItem("openAuthModal"),a({isOpen:!0,mode:"login"}))},[]);const b=async()=>{await n(),s("/")},v=()=>{u(!1);const O=document.getElementById("pricing");O?O.scrollIntoView({behavior:"smooth"}):(s("/"),setTimeout(()=>{var H;(H=document.getElementById("pricing"))==null||H.scrollIntoView({behavior:"smooth"})},100))},x=()=>u(!1),y=o.pathname,g=o.hash,w=y.startsWith("/use-cases"),_=y.startsWith("/compare"),S=y.startsWith("/works-with"),k=y.startsWith("/about"),E=y==="/"&&g==="#pricing",j=y==="/dashboard"||y.startsWith("/dashboard/"),A=()=>r?l.jsxs("button",{onClick:()=>
370s("/dashboard"),className:"hidden md:flex flex-col items-end leading-tight px-3 py-1.5 rounded-[10px] border border-[rgba(255,255,255,0.10)] hover:bg-white/5 transition-colors","aria-label":"View usage on dashboard",children:[l.jsxs("span",{className:"text-xs font-medium text-white tabular-nums",children:[r.used.toLocaleString()," / ",r.limit.toLocaleString()]}),l.jsx("span",{className:"text-[10px] text-white/50",children:"this month"})]}):l.jsx("div",{className:"hidden md:block w-20 h-9 bg-white/5 animate-pulse rounded-[10px]"});return l.jsxs(l.Fragment,{children:[l.jsx("header",{className:"w-full border-b border-[rgba(255,255,255,0.10)] bg-[#0C0C0C] sticky top-0 z-50",children:l.jsxs("div",{className:"container mx-auto px-4 h-16 flex items-center justify-between",children:[l.jsxs("button",{onClick:()=>{e?s("/dashboard"):(s("/"),window.scrollTo({top:0,behavior:"smooth"}))},className:"flex items-center gap-2 shrink-0",children:[l.jsx("img",{src:sg,alt:"Wholio",className:"h-9 w-auto"}),l.jsx("span",{className:"text-xl font-medium text-white",style:{fontFamily:"'DM Serif Display', serif",letterSpacing:"-0.01em"},children:"Wholio"})]}),l.jsxs("nav",{className:"hidden lg:flex items-center gap-0.5",children:[l.jsx(d0,{label:"Use Cases",items:f0,active:w}),l.jsx(d0,{label:"Compare",items:h0,active:_}),l.jsx(Yl,{label:"Works With",to:"/works-with",active:S}),l.jsx(Yl,{label:"Pricing",onClick:v,active:E}),l.jsx(Yl,{label:"About",to:"/about",active:k}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"h-5 w-px bg-white/10 mx-3","aria-hidden":"true"}),l.jsx(Yl,{label:"Dashboard",to:"/dashboard",active:j}),l.jsx(A,{}),l.jsxs(fS,{children:[l.jsx(hS,{asChild:!0,children:l.jsxs(ve,{variant:"ghost",size:"sm",className:"gap-1 ml-2 text-white/70 hover:text-white",children:[e.email,l.jsx(zs,{className:"h-4 w-4"})]})}),l.jsxs(zm,{align:"end",className:"bg-[#161616] border-[rgba(255,255,255,0.10)] rounded-[16px] min-w-[200px]",children:[l.jsx(Vo,{onClick:()=>s("/settings"),className:"text-white/70 hover:text-white",children:"Billing & invoices"}),l.jsx(Vo,{onClick:()=>s("/settings"),className:"text-white/70 hover:text-white",children:"Account settings"}),l.jsx(pS,{className:"bg-[rgba(255,255,255,0.10)]"}),l.jsxs(Vo,{onClick:b,className:"gap-2 text-white/70 hover:text-white",children:[l.jsx(Kv,{className:"h-4 w-4"}),"Log out"]})]})]})]}):t?l.jsx("div",{className:"w-20 h-9 bg-muted animate-pulse rounded-[10px] ml-2"}):l.jsxs(l.Fragment,{children:[l.jsx(ve,{variant:"outline",size:"sm",className:"ml-2",onClick:()=>a({isOpen:!0,mode:"login"}),children:"Sign in"}),l.jsx(ve,{variant:"cta",size:"sm",className:"font-medium",onClick:v,children:"Get started"})]})]}),l.jsx("div",{className:"lg:hidden",children:l.jsxs(wL,{open:c,onOpenChange:u,children:[l.jsx(xL,{asChild:!0,children:l.jsx(ve,{variant:"ghost",size:"icon","aria-label":"Open navigation menu",children:l.jsx(Q2,{className:"h-5 w-5"})})}),l.jsxs(OS,{side:"right",className:"w-[300px] bg-[#0C0C0C] border-[rgba(255,255,255,0.10)]",children:[l.jsx(IS,{className:"sr-only",children:"Navigation Menu"}),l.jsxs("div",{className:"flex flex-col gap-2 mt-8",children:[l.jsxs(Iy,{open:d,onOpenChange:h,children:[l.jsxs(Dy,{className:"flex items-center justify-between w-full px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md",children:["Use Cases",l.jsx(zs,{className:F("h-4 w-4 transition-transform duration-200",d&&"rotate-180")})]}),l.jsx(Ly,{className:"pl-4",children:f0.map(O=>l.jsxs(dt,{to:O.href,className:"block px-3 py-2 rounded-md hover:bg-white/5",onClick:x,children:[l.jsx("div",{className:"text-sm font-medium text-white",children:O.label}),l.jsx("div",{className:"text-xs text-[#9A9A9A]",children:O.description})]},O.href))})]}),l.jsxs(Iy,{open:m,onOpenChange:p,children:[l.jsxs(Dy,{className:"flex items-center justify-between w-full px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md",children:["Compare",l.jsx(zs,{className:F("h-4 w-4 transition-transform duration-200",m&&"rotate-180")})]}),l.jsx(Ly,{className:"pl-4",children:h0.map(O=>l.jsxs(dt,{to:O.href,className:"block px-3 py-2 rounded-md hover:bg-white/5",onClick:x,children:[l.jsx("div",{className:"text-sm font-medium text-white",children:O.label}),l.jsx("div",{className:"text-xs text-[#9A9A9A]",children:O.description})]},O.href))})]}),l.jsx(dt,{to:"/works-with",className:"px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md",onClick:x,children:"Works With"}),l.jsx("button",{className:"px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md text-left",onClick:v,children:"Pricing"}),l.jsx(dt,{to:"/about",className:"px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md",onClick:x,children:"About"}),l.jsx("div",{className:"border-t border-[rgba(255,255,255,0.10)] pt-4 mt-2",children:e?l.jsxs("div",{className:"space-y-2",children:[l.jsx(dt,{to:"/dashboard",className:F("block px-3 py-2 text-sm font-medium hover:bg-white/5 rounded-md",j?"text-white":"text-white/80"),onClick:x,children:"Dashboard"}),r&&l.jsxs("div",{className:"px-3 py-1",children:[l.jsxs("div",{className:"text-xs font-medium text-white tabular-nums",children:[r.used.toLocaleStr
370ing()," / ",r.limit.toLocaleString()]}),l.jsx("div",{className:"text-[10px] text-white/50",children:"this month"})]}),l.jsx("div",{className:"px-3 py-2 text-sm text-[#9A9A9A] truncate",children:e.email}),l.jsx(dt,{to:"/settings",className:"block px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md",onClick:x,children:"Billing & invoices"}),l.jsx(dt,{to:"/settings",className:"block px-3 py-2 text-sm font-medium text-white hover:bg-white/5 rounded-md",onClick:x,children:"Account settings"}),l.jsxs(ve,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:()=>{b(),x()},children:[l.jsx(Kv,{className:"h-4 w-4"}),"Log out"]})]}):t?l.jsx("div",{className:"w-full h-9 bg-muted animate-pulse rounded-[10px]"}):l.jsxs("div",{className:"space-y-2",children:[l.jsx(ve,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:()=>{a({isOpen:!0,mode:"login"}),x()},children:"Sign in"}),l.jsx(ve,{variant:"cta",size:"sm",className:"w-full font-medium",onClick:()=>{v()},children:"Get started"})]})})]})]})]})})]})}),l.jsx(ud,{isOpen:i.isOpen,onClose:()=>a({...i,isOpen:!1}),mode:i.mode})]})}function hE(e,t,n=!0){var r;e.key==="Enter"&&(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey||(r=e.nativeEvent)!=null&&r.isComposing||(e.preventDefault(),n&&t()))}function M5(e){try{const t=new URL(e),n=t.pathname.replace(/\/+$/,"");return!!(n===""||n==="/"||/^\/(home|index|welcome|en|us|uk|en-us|en-gb|fr|de|es|it|nl|pt|ja|ko|zh)$/i.test(n)||n===""&&t.search)}catch{return!1}}function du(e){if(!e)return!1;const t=e.replace(/[\u200B-\u200F\uFEFF\u00AD\u034F\u061C\u180E\u2060-\u2069\uFFF9-\uFFFC]/gu,"").replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"").trim();return!t||/[\s\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/u.test(t)?!1:ap(t)!==null}function ap(e){if(!e)return null;let t=e;t=t.replace(/[\s\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/gu,""),t=t.replace(/[\u200B-\u200F\u2028-\u202F\uFEFF\u00AD\u034F\u061C\u180E\u2060-\u2069\uFFF9-\uFFFC]/gu,""),t=t.replace(/[\x00-\x1F\x7F]/g,""),t=t.replace(/^<(.+)>$/,"$1"),t=t.replace(/[.,;:!?)}\]]+$/,""),t=t.replace(/[^a-zA-Z0-9\-._~:/?#[\]@!$&'()*+,;=%]/g,""),t=t.replace(/^(https?):\/*/i,"$1://"),t.startsWith("//")&&(t=`https:${t}`),/^https?:\/\//i.test(t)||(t=`https://${t}`),e!==t&&console.debug("[normalizeUrl]",{rawLen:e.length,cleanedLen:t.length,raw:e.substring(0,120),cleaned:t.substring(0,120)});try{const n=new URL(t);return!n.hostname||!n.hostname.includes(".")?(console.warn("[normalizeUrl] No valid hostname:",t),null):n.href}catch(n){return console.warn("[normalizeUrl] Failed to parse:",t,n),null}}const lp=2e5,dd=40,p0="wholio_pending_text";function fd(e){return e.replace(/\r\n?/g,` 371`).replace(/[ \t]+\n/g,` 372`).trim()}function Bs(e){const t=fd(e);return!t||du(t)?!1:t.length>dd||t.includes(` 373`)}function Ba(e){const t=fd(e);return t.length<=lp?{text:t,truncated:!1}:{text:t.slice(0,lp),truncated:!0}}function fu(e){return fd(e).length>=dd}function pE(e){return fd(e).split(` 374`).filter(t=>t.trim().length>0).length}const _c=["image/png","image/jpeg","image/jpg","image/webp"],Sc="application/pdf",m0=[..._c,Sc],mE=10,$5=mE*1024*1024,gE=50,F5=gE*1024*1024,_f=10,g0=e=>du(e);function U5({url:e,onUrlChange:t,onUrlSubmit:n,files:r,onFilesChange:s,onFilesSubmit:o,examplePreviewDomain:i,onExampleClick:a,isDisabled:c=!1,pulseTrigger:u=0,pastedText:d="",onPastedTextChange:h,onPastedTextSubmit:m}){Wn();const[p,b]=f.useState(!1),[v,x]=f.useState(null),[y,g]=f.useState(new Map),w=f.useRef(null),[_,S]=f.useState(!1);f.useEffect(()=>{if(u===0)return;S(!0);const N=setTimeout(()=>S(!1),4e3);return()=>clearTimeout(N)},[u]);const k=f.useRef(null),E=f.useRef(null);f.useEffect(()=>{if(r.length===0)return;const N=setTimeout(()=>{var I;return(I=E.current)==null?void 0:I.focus()},60);return()=>clearTimeout(N)},[r.length]);const j=r.some(N=>N.type===Sc),A=!j,O=r.length>0;e.trim().length>0;const H=d.trim().length>0,K=pE(d),J=fu(d),U=f.useCallback(N=>{if(!h)return!1;const{text:I,truncated:z}=Ba(N);return I?(h(I),x(z?"That paste was very long â we kept the first part of it.":null),!0):!1},[h]);f.useEffect(()=>{const N=new Map;return r.forEach(I=>
374{if(_c.includes(I.type)){const z=`${I.name}-${I.size}-${I.lastModified}`;if(y.has(z))N.set(z,y.get(z));else{const ae=URL.createObjectURL(I);N.set(z,ae)}}}),y.forEach((I,z)=>{N.has(z)||URL.revokeObjectURL(I)}),g(N),()=>{N.forEach(I=>URL.revokeObjectURL(I))}},[r]);const le=N=>N.reduce((I,z)=>I+z.size,0),W=(N,I)=>{if(!m0.includes(N.type))return"Please upload a PDF, PNG, JPG, or WebP file";if(N.size>$5)return`File size must be under ${mE}MB`;const z=N.type===Sc,ae=I.some(Le=>Le.type===Sc),Pe=I.some(Le=>_c.includes(Le.type));return z&&Pe?"Cannot mix PDF with images. Clear screenshots first.":!z&&ae?"Cannot add images to a PDF upload. Remove the PDF first.":z&&I.length>0?"Only one PDF can be uploaded at a time":!z&&I.length>=_f?`Maximum ${_f} screenshots per search`:le(I)+N.size>F5?`Total size must be under ${gE}MB`:null},X=f.useCallback(N=>{x(null);let I=[...r];for(const z of N){const ae=W(z,I);if(ae){x(ae);continue}I.some(je=>je.name===z.name&&je.size===z.size&&je.lastModified===z.lastModified)||I.push(z)}s(I)},[r,s]),R=f.useCallback(N=>{N.preventDefault(),b(!1);const I=Array.from(N.dataTransfer.files);if(I.length>0){X(I);return}const z=N.dataTransfer.getData("text/plain");if(z&&g0(z.trim())){t(z.trim());return}z&&Bs(z)&&U(d?`${d} 375${z}`:z)},[X,t,U,d]),C=f.useCallback(N=>{N.preventDefault(),b(!0)},[]),$=f.useCallback(N=>{N.preventDefault(),b(!1)},[]),te=N=>{const I=Array.from(N.target.files||[]);I.length>0&&X(I),N.target.value=""},Z=f.useCallback(N=>{var Pe,je,Le;const I=(Pe=N.clipboardData)==null?void 0:Pe.items;if(!I)return;const z=[];for(const He of I)if(He.type.startsWith("image/")){N.preventDefault();const cn=He.getAsFile();cn&&z.push(cn)}if(z.length>0){X(z);return}const ae=(Le=(je=N.clipboardData)==null?void 0:je.getData("text"))==null?void 0:Le.trim();if(ae&&g0(ae)){N.preventDefault(),t(ae);return}ae&&Bs(ae)&&(N.preventDefault(),U(d?`${d} 376${ae}`:ae))},[X,t,U,d]);f.useEffect(()=>(document.addEventListener("paste",Z),()=>document.removeEventListener("paste",Z)),[Z]),f.useEffect(()=>{if(!O)return;const N=I=>{if(I.key!=="Enter"||I.shiftKey||I.metaKey||I.ctrlKey||I.altKey)return;const z=I.target,ae=z==null?void 0:z.tagName;ae==="INPUT"||ae==="TEXTAREA"||z!=null&&z.isContentEditable||(I.preventDefault(),c||o())};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[O,c,o]);const ue=N=>{const I=r.filter((z,ae)=>ae!==N);s(I),x(null)},fe=()=>{s([]),x(null)},he=()=>{var N;(N=w.current)==null||N.click()},xe=N=>`${N.name}-${N.size}-${N.lastModified}`,ge=N=>{N.preventDefault(),e.trim()&&n()};return H&&!O?l.jsxs("form",{onSubmit:N=>{N.preventDefault(),!c&&J&&(m==null||m())},className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Pasted text (",K," ",K===1?"line":"lines",")"]}),l.jsx(ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>{h==null||h(""),x(null)},className:"h-8 text-muted-foreground hover:text-foreground",children:"Clear"})]}),l.jsx("div",{onDrop:R,onDragOver:C,onDragLeave:$,className:F("relative rounded-xl border-2 transition-all duration-200",p?"border-primary bg-primary/10 border-dashed":"border-border bg-card"),children:l.jsx("textarea",{value:d,onChange:N=>h==null?void 0:h(N.target.value),onKeyDown:N=>hE(N,()=>m==null?void 0:m(),!c&&J),spellCheck:!1,"aria-label":"Pasted people text",className:"w-full h-48 resize-y rounded-xl bg-transparent p-4 text-sm leading-relaxed text-foreground placeholder:text-muted-foreground focus:outline-none",placeholder:"Paste names, titles and companiesâ¦"})}),l.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Return to search · Shift+Return for a new line"}),l.jsxs(ve,{type:"submit",variant:"cta",size:"lg",className:"w-full h-12 text-base font-medium gap-2 rounded-xl",disabled:c||!J,children:["Find Everyone in Pasted Text",l.jsx(wt,{className:"h-4 w-4"})]}),!J&&l.jsxs("p",{className:"text-sm text-muted-foreground text-center",children:["Paste a bit more â we need names with titles or companies (at least ",dd," characters)."]}),v&&l.jsx("p",{className:"text-sm text-destructive text-center",children:v})]}):O?l.jsxs("form",{onSubmit:N=>{N.preventDefault(),c||o()},className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:j?"Document":`Screenshots (${r.length})`}),l.jsxs("div",{className:"flex items-center gap-2",children:[A&&r.length<_f&&l.jsxs(ve,{type:"button",variant:"outline",size:"sm",onClick:he,className:"h-8 gap-1.5",children:[l.jsx(Ca,{className:"h-3.5 w-3.5"}),"Add more"]}),l.jsx(ve,{type:"button",variant:"ghost",size:"sm",onClick:fe,className:"h-8 text-muted-foreground hover:text-foreground",children:"Clear all"})]})]}),l.jsx("div",{onDrop:R,onDragOver:C,onDragLeave:$,className:F("relative p-4 border-2 rounded-xl transition-all duration-200",p?"border-primary bg-primary/10 border-dashed":"border-border bg-card"),children:j?l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center justify-center w-12 h-12 rounded-lg bg-primary/10",children:l.jsx(Ah,{className:"w-6 h-6 text-primary"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium truncate text-foreground",children:r[0].name}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[(r[0].size/1024/1024).toFixed(2)," MB"]})]}),l.jsx("button",{onClick:()=>ue(0),className:"p-2 rounded-lg hover:bg-muted transition-colors","aria-label":"Remove file",children:l.jsx(tn,{className:"w-4 h-4 text-muted-foreground"})})]}):l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex gap-3 overflow-x-auto pb-2 scrollbar-thin",children:r.map((N,I)=>{const z=xe(N),ae=y.get(z);return l.jsxs("div",{className:"relative flex-shrink-0 group",children:[l.jsx("div",{className:"w-20 h-20 rounded-lg overflow-hidden bg-muted border border-border",children:ae?l.jsx("img",{src:ae,alt:`Screenshot ${I+1}`,className:"w-full h-full object-cover"}):l.jsx("div",{className:"w-full h-full flex items-center justify-center",children:l.jsx(Wb,{className:"w-6 h-6 text-muted-foreground"})})}),l.jsx("button",{onClick:()=>ue(I),className:"absolute -top-2 -right-2 w-6 h-6 rounded-full bg-destructive text-destructive-foreground flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-md","aria-label":`Remove screenshot ${I+1}`,children:l.jsx(tn,{className:"w-3.5 h-3.5"})})]},z)})}),l.jsx("p",{className:"text-xs text-muted-foreground text-center",children:p?"Drop to add screenshot":"Paste (Ctrl+V) or drag more screenshots"})]})}),l.jsxs(ve,{ref:E,type:"submit",variant:"cta",size:"lg",className:"w-full h-12 text-base font-medium gap-2 rounded-xl",disabled:c,
376children:[r.length===1&&r[0].type==="application/pdf"?"Find Everyone in PDF":r.length===1?"Find Everyone in Screenshot":`Find Everyone in ${r.length} Screenshots`,l.jsx(wt,{className:"h-4 w-4"})]}),l.jsx("input",{ref:w,type:"file",accept:A?_c.join(","):m0.join(","),multiple:A,onChange:te,className:"sr-only"}),v&&l.jsx("p",{className:"text-sm text-destructive text-center",children:v})]}):l.jsxs("div",{className:"space-y-6",onDrop:R,onDragOver:C,onDragLeave:$,children:[p&&l.jsx("div",{className:"fixed inset-0 bg-primary/10 backdrop-blur-sm z-50 flex items-center justify-center pointer-events-none",children:l.jsxs("div",{className:"bg-card border-2 border-dashed border-primary rounded-xl p-8 text-center",children:[l.jsx(qb,{className:"w-12 h-12 text-primary mx-auto mb-3"}),l.jsx("p",{className:"text-lg font-medium text-foreground",children:"Drop files here"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Screenshots, PDF or copied text"})]})}),l.jsxs("form",{onSubmit:ge,className:"w-full space-y-3",children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx(vs,{ref:k,type:"text",placeholder:"Paste a URL, a screenshot, or copied text",value:e,onChange:N=>t(N.target.value),className:"h-14 pl-5 pr-5 sm:pr-44 text-base rounded-xl border-[rgba(255,255,255,0.15)] bg-[#161616] text-white placeholder:text-[#5C5C5C] focus:bg-[#161616] focus:border-primary/50",disabled:c}),l.jsxs(ve,{type:"submit",variant:"cta",size:"lg",className:F("hidden sm:flex absolute right-1.5 h-11 px-5 rounded-lg font-medium gap-2",i?"animate-pulse":""),disabled:!e.trim()||c,children:["Find everyone",l.jsx(wt,{className:"h-4 w-4"})]})]}),l.jsxs(ve,{type:"submit",variant:"cta",size:"lg",className:F("sm:hidden w-full h-12 rounded-xl font-medium gap-2",i?"animate-pulse":""),disabled:!e.trim()||c,children:["Find everyone",l.jsx(wt,{className:"h-4 w-4"})]})]}),l.jsx("div",{className:"text-center",children:l.jsx("button",{type:"button",onClick:he,className:"text-sm text-muted-foreground hover:text-foreground border-b border-dashed border-muted-foreground/50 hover:border-foreground transition-colors",children:"or upload a PDF document here"})}),l.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-1.5 pt-1",children:["No sign-up needed","No credit card","No LinkedIn login"].map(N=>l.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-medium text-[#1B5E3F]",children:[l.jsx(ms,{className:"h-4 w-4 text-[#1B5E3F]"}),N]},N))}),l.jsx("input",{ref:w,type:"file",accept:".png,.jpg,.jpeg,.webp,.pdf",multiple:!0,onChange:te,className:"sr-only"}),l.jsxs("div",{className:"space-y-3 pt-8",children:[l.jsx("p",{className:"text-xs font-medium tracking-widest text-muted-foreground text-center uppercase",children:"SEE WHOLIO IN ACTION â SELECT A DEMO BELOW"}),l.jsxs("div",{className:"flex items-stretch gap-0",children:[l.jsxs("button",{type:"button",onClick:()=>a("https://www.datadoghq.com/about/leadership/"),style:_?{animationDelay:"0ms"}:void 0,className:F("relative flex-1 flex flex-col items-start py-4 pl-6 pr-10 text-sm text-[#5A5448] border border-[rgba(0,0,0,0.08)] rounded-lg bg-[#FAF5E8] hover:bg-white hover:text-[#0A0A0A] hover:shadow-md transition-all text-left group",_&&"animate-pulse-attention"),children:[l.jsx("span",{className:"text-[10px] uppercase text-[#8A8275] group-hover:text-[#FAFAFA] tracking-wider mb-1",children:"Team page"}),l.jsx("span",{className:"font-medium",children:"Datadog leadership team"}),l.jsx(wt,{className:"absolute right-4 top-1/2 -translate-y-1/2 h-4 w-4 text-[#8A8275] transition-transform duration-200 group-hover:translate-x-0.5"})]}),l.jsx("div",{className:"flex items-center justify-center px-2 shrink-0","aria-hidden":"true"}),l.jsxs("button",{type:"button",onClick:()=>a("https://hottopics.ht/awards/global-b2b-cmo-100-awards#CMO-100"),style:_?{animationDelay:"1200ms"}:void 0,className:F("relative flex-1 flex flex-col items-start py-4 pl-6 pr-10 text-sm text-[#5A5448] border border-[rgba(0,0,0,0.08)] rounded-lg bg-[#FAF5E8] hover:bg-white hover:text-[#0A0A0A] hover:shadow-md transition-all text-left group",_&&"animate-pulse-attention"),children:[l.jsx("span",{className:"text-[10px] uppercase text-[#8A8275] group-hover:text-[#FAFAFA] tracking-wider mb-1",children:"Awards"}),l.jsx("span",{className:"font-medium",children:"HotTopics B2B CMO 100"}),l.jsx(wt,{className:"absolute right-4 top-1/2 -translate-y-1/2 h-4 w-4 text-[#8A8275] transition-transform duration-200 group-hover:translate-x-0.5"})]}),l.jsx("div",{className:"flex items-center justify-center px-2 shrink-0","aria-hidden":"true"}),l.jsxs("button",{type:"button",onClick:()=>
376a("https://reg.salesforce.com/flow/plus/tdx26/tdx26speakers/page/speakers"),style:_?{animationDelay:"2400ms"}:void 0,className:F("relative flex-1 flex flex-col items-start py-4 pl-6 pr-10 text-sm text-[#5A5448] border border-[rgba(0,0,0,0.08)] rounded-lg bg-[#FAF5E8] hover:bg-white hover:text-[#0A0A0A] hover:shadow-md transition-all text-left group",_&&"animate-pulse-attention"),children:[l.jsx("span",{className:"text-[10px] uppercase text-[#8A8275] group-hover:text-[#FAFAFA] tracking-wider mb-1",children:"Conference"}),l.jsx("span",{className:"font-medium",children:"Salesforce TDX speakers"}),l.jsx(wt,{className:"absolute right-4 top-1/2 -translate-y-1/2 h-4 w-4 text-[#8A8275] transition-transform duration-200 group-hover:translate-x-0.5"})]})]})]}),v&&l.jsx("p",{className:"text-sm text-destructive text-center",children:v})]})}const Dr=e=>{const t=e==null?"":String(e);return/^[=+\-@\t\r]/.test(t)?"'"+t:t},hu=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));hu.displayName="Card";const z5=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("flex flex-col space-y-1.5 p-6",e),...t}));z5.displayName="CardHeader";const B5=f.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:F("text-2xl font-semibold leading-none tracking-tight",e),...t}));B5.displayName="CardTitle";const W5=f.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:F("text-sm text-muted-foreground",e),...t}));W5.displayName="CardDescription";const V5=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("p-6 pt-0",e),...t}));V5.displayName="CardContent";const H5=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("flex items-center p-6 pt-0",e),...t}));H5.displayName="CardFooter";const vE=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full max-w-full overflow-x-auto overflow-y-hidden",children:l.jsx("table",{ref:n,className:F("w-full caption-bottom text-sm",e),...t})}));vE.displayName="Table";const yE=f.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:F("sticky top-0 z-10 bg-card [&_tr]:border-b",e),...t}));yE.displayName="TableHeader";const wE=f.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:F("[&_tr:last-child]:border-0",e),...t}));wE.displayName="TableBody";const q5=f.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:F("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));q5.displayName="TableFooter";const Ec=f.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:F("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));Ec.displayName="TableRow";const og=f.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:F("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));og.displayName="TableHead";const fr=f.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:F("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));fr.displayName="TableCell";const K5=f.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:F("mt-4 text-sm text-muted-foreground",e),...t}));K5.displayName="TableCaption";const G5=el("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function cp({className:e,variant:t,...n}){return l.jsx("div",{className:F(G5({variant:t}),e),...n})}function xE({className:e,...t}){return l.jsx("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}function Y5(e,t){const r=(e+t).split(` 377`),s=r.pop()??"";return{lines:r,remainder:s}}function J5(e){if(!e.startsWith("data: "))return null;const t=e.slice(6);if(!t||t==="[DONE]")return null;try{return JSON.parse(t)}catch{return null}}function Q5(e,t){const{lines:n,remainder:r}=Y5(e,t),s=[];for(const o of n){const i=J5(o);i!==null&&s.push(i)}return{events:s,remainder:r}}function ig(){return{url:"https://gjgbwfwumiznuzszjhqx.supabase.co",key:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdqZ2J3Znd1bWl6bnV6c3pqaHF4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njk3Nzk2NzMsImV4cCI6MjA4NTM1NTY3M30.K0uZEQ99kgFxwE9CHTQwosn8Uoge3ZRz6luEupaWC8Q"}}async function ag(){const{data:{session:e}}=await Re.auth.getSession();return e!=null&&e.access_token?`Bearer ${e.access_token}`:new Promise(t=>{const n=setTimeout(()=>{t("")},3e3),{data:{subscription:r}}=Re.auth.onAuthStateChange((s,o)=>{o!=null&&o.access_token&&(clearTimeout(n),r.unsubscribe(),t(`Bearer ${o.access_token}`))})})}function X5(e,t){var n,r,s,o;switch(e==null?void 0:e.event){case"search_created":return(n=t.onSearchCreated)==null||n.call(t,e.search_id),!1;case"redirect_url":return(r=t.onRedirect)==null||r.call(t,{original_url:e.original_url,redirect_url:e.redirect_url,message:e.message}),!1;case"extraction_progress":return(s=t.onExtractionProgress)==null||s.call(t,{people:e.people,total_so_far:e.total_so_far}),!1;case"extraction_complete":return t.onExtraction({page_context:e.page_context,people:e.people,testimonial_people:e.testimonial_people||[]}),!1;case"batch_complete":return t.onBatchComplete({batch_index:e.batch_index,results:e.results}),!1;case"complete":return t.onComplete({people:e.people}),!0;case"quota_paused":return(o=t.onQuotaPaused)==null||o.call(t,e),!1;case"error":return t.onError(e.error||"Something went wrong"),!1;default:return!1}}async function hd(e,t,n,r={}){var m;const{url:s,key:o}=ig(),i=n?`Bearer ${n}`:await ag();if(r.requireAuth&&!i){t.onError("Authentication required to resume matching");return}const a=await fetch(`${s}/functions/v1/analyze-page`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",apikey:o,...i&&{Authorization:i}},body:JSON.stringify(e)});if(!a.ok){t.onError("Network error. Please try again.");return}const c=(m=a.body)==null?void 0:m.getReader();if(!c){t.onError("Streaming not supported");return}const u=new TextDecoder;let d="",h=!1;for(;;){const{done:p,value:b}=await c.read();if(p)break;const v=u.decode(b,{stream:!0}),{events:x,remainder:y}=Q5(d,v);d=y;for(const g of x)X5(g,t)&&(h=!0)}h||t.onComplete()}function v0(e,t,n,r){return hd({type:"url",url:e,...n&&{skip_cache:!0}},t,r)}function y0(e,t,n){return hd({type:"images",images_base64:e},t,n)}function w0(e,t,n){return hd({type:"pdf",pdf_base64:e},t,n)}function x0(e,t,n){return hd({type:"text",text:e},t,n)}async function up(e,t,n){const{url:r,key:s}=ig(),o=n?`Bearer ${n}`:await ag(),i=await fetch(`${r}/functions/v1/analyze-page`,{method:"POST",headers:{"Content-Type":"application/json",apikey:s,...o&&{Authorization:o}},body:JSON.stringify({type:"match_people",people_to_match:e,page_context:t})});
377return i.ok?i.json():{success:!1,error:"Network error. Please try again."}}async function Z5(e,t,n,r){const{url:s,key:o}=ig(),i=r?`Bearer ${r}`:await ag();if(!i)return{success:!1,error:"Authentication required"};const a=await fetch(`${s}/functions/v1/analyze-page`,{method:"POST",headers:{"Content-Type":"application/json",apikey:o,Authorization:i},body:JSON.stringify({type:"persist_restored_search",restored_people:e,page_context:t,original_url:n})});return a.ok?a.json():{success:!1,error:"Network error. Please try again."}}function Jl(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Failed to convert file to base64"))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function bE(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var pd="Checkbox",[e4,EU]=Ht(pd),[t4,lg]=e4(pd);function n4(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:o,form:i,name:a,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[m,p]=sr({prop:n,defaultProp:s??!1,onChange:c,caller:pd}),[b,v]=f.useState(null),[x,y]=f.useState(null),g=f.useRef(!1),w=b?!!i||!!b.closest("form"):!0,_={checked:m,disabled:o,setChecked:p,control:b,setControl:v,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:as(s)?!1:s,isFormControl:w,bubbleInput:x,setBubbleInput:y};return l.jsx(t4,{scope:t,..._,children:r4(h)?h(_):r})}var _E="CheckboxTrigger",SE=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:o,value:i,disabled:a,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:b}=lg(_E,e),v=De(s,d),x=f.useRef(c);return f.useEffect(()=>{const y=o==null?void 0:o.form;if(y){const g=()=>h(x.current);return y.addEventListener("reset",g),()=>y.removeEventListener("reset",g)}},[o,h]),l.jsx(ye.button,{type:"button",role:"checkbox","aria-checked":as(c)?"mixed":c,"aria-required":u,"data-state":NE(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:v,onKeyDown:ie(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:ie(n,y=>{h(g=>as(g)?!0:!g),b&&p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});SE.displayName=_E;var cg=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:c,onCheckedChange:u,form:d,...h}=e;return l.jsx(n4,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:a,required:i,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(SE,{...h,ref:t,__scopeCheckbox:n}),m&&l.jsx(jE,{__scopeCheckbox:n})]})})});cg.displayName=pd;var EE="CheckboxIndicator",kE=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,o=lg(EE,n);return l.jsx(ln,{present:r||as(o.checked)||o.checked===!0,children:l.jsx(ye.span,{"data-state":NE(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});kE.displayName=EE;var CE="CheckboxBubbleInput",jE=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:i,required:a,disabled:c,name:u,value:d,form:h,bubbleInput:m,setBubbleInput:p}=lg(CE,e),b=De(n,p),v=bE(o),x=Em(r);f.useEffect(()=>{const g=m;if(!g)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,k=!s.current;if(v!==o&&S){const E=new Event("click",{bubbles:k});g.indeterminate=as(o),S.call(g,as(o)?!1:o),g.dispatchEvent(E)}},[m,v,o,s]);const y=f.useRef(as(o)?!1:o);return l.jsx(ye.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jE.displayName=CE;function r4(e){return typeof e=="function"}function as(e){return e==="indeterminate"}function NE(e){return as(e)?"indeterminate":e?"checked":"unchecked"}const pu=f.forwardRef(({className:e,...t},n)=>l.jsx(cg,{ref:n,className:F("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-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",e),...t,children:l.jsx(kE,{className:F("flex items-center justify-center text-current"),children:l.jsx(ms,{className:"h-4 w-4"})})}));pu.displayName=cg.displayName;const Yi=["image/png","image/jpeg","image/jpg","image/webp"],Ji="application/pdf",s4=[...Yi,Ji],dp=10,b0=dp*1024*1024,Sf=10;function o4({onAddUrl:e,onAddFiles:t,onAddText:n,isAdding:r,disabled:s}){const[o,i]=f.useState(""),[a,c]=f.useState(""),[u,d]=f.useState([]),[h,m]=f.useState(null),[p,b]=f.useState(!1),[v,x]=f.useState(null),[y,g]=f.useState(new Map),w=f.useRef(null),_=f.useRef(null),S=f.useRef([]),k=f.useRef(""),E=r||s,j=a.trim().length>0,A=pE(a),O=fu(a);f.useEffect(()=>{k.current=a},[a]);const H=f.useCallback(N=>{const{text:I,truncated:z}=Ba(N);
377c(I),i(""),x(z?`Text trimmed to the first ${lp.toLocaleString()} characters.`:null)},[]);f.useEffect(()=>{S.current=u},[u]),f.useEffect(()=>{const N=new Map;return u.forEach(I=>{if(Yi.includes(I.type)){const z=`${I.name}-${I.size}-${I.lastModified}`;if(y.has(z))N.set(z,y.get(z));else{const ae=URL.createObjectURL(I);N.set(z,ae)}}}),y.forEach((I,z)=>{N.has(z)||URL.revokeObjectURL(I)}),g(N),()=>{N.forEach(I=>URL.revokeObjectURL(I))}},[u]);const K=(N,I)=>{if(!s4.includes(N.type))return"Please upload a PDF, PNG, JPG, or WebP file";if(N.size>b0)return`File size must be under ${dp}MB`;const z=N.type===Ji,ae=I.some(je=>je.type===Ji),Pe=I.some(je=>Yi.includes(je.type));return z&&Pe?"Cannot mix PDF with images":!z&&ae?"Cannot add images to a PDF upload":z&&I.length>0?"Only one PDF can be uploaded at a time":!z&&I.length>=Sf?`Maximum ${Sf} screenshots`:null},J=f.useCallback(N=>{x(null);let I=[...S.current];for(const z of N){const ae=K(z,I);if(ae){x(ae);continue}I.some(je=>je.name===z.name&&je.size===z.size&&je.lastModified===z.lastModified)||I.push(z)}d(I)},[]),U=f.useCallback(N=>{if(N.preventDefault(),b(!1),E)return;const I=Array.from(N.dataTransfer.files);if(I.length>0){J(I);return}const z=N.dataTransfer.getData("text/plain");if(n&&z&&Bs(z)){const ae=k.current;H(ae?`${ae} 378${z}`:z)}},[J,E,n,H]),le=f.useCallback(N=>{N.preventDefault(),E||b(!0)},[E]),W=f.useCallback(N=>{N.preventDefault(),b(!1)},[]),X=N=>{const I=Array.from(N.target.files||[]);I.length>0&&J(I),N.target.value=""},R=f.useCallback(N=>{var z;if(S.current.length===0||E)return;const I=(z=N.clipboardData)==null?void 0:z.items;if(I){for(const ae of I)if(ae.type.startsWith("image/")){N.preventDefault();const Pe=ae.getAsFile();Pe&&J([Pe]);return}}},[J,E]);f.useEffect(()=>(document.addEventListener("paste",R),()=>document.removeEventListener("paste",R)),[R]);const C=N=>{d(I=>I.filter((z,ae)=>ae!==N)),x(null)},$=()=>{d([]),x(null)},te=async N=>{if(N.preventDefault(),!(!o.trim()||E)){if(n&&Bs(o)){H(o),i("");return}await e(o.trim()),i("")}},Z=async()=>{u.length===0||E||(await t(u),d([]))},ue=async N=>{if(N==null||N.preventDefault(),!n||E||!O)return;const{text:I}=Ba(a);await n(I),c(""),x(null)},fe=N=>{var z;const I=(z=N.target.files)==null?void 0:z[0];if(I){if(I.type!==Ji){x("Please upload a PDF file");return}if(I.size>b0){x(`File size must be under ${dp}MB`);return}x(null),m(I),N.target.value=""}},he=async()=>{!h||E||(await t([h]),m(null))},xe=N=>`${N.name}-${N.size}-${N.lastModified}`,ge=f.useCallback(N=>{var ae,Pe;const I=(ae=N.clipboardData)==null?void 0:ae.items;if(!I)return;for(const je of I)if(je.type.startsWith("image/")){N.preventDefault();const Le=je.getAsFile();Le&&(J([Le]),i(""));return}const z=(Pe=N.clipboardData)==null?void 0:Pe.getData("text");n&&z&&Bs(z)&&(N.preventDefault(),H(z))},[J,n,H]);return j&&n?l.jsxs("div",{className:"space-y-3 p-4 bg-primary/5 rounded-[16px] border border-primary/20 ring-1 ring-primary/10",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("p",{className:"text-sm font-medium text-primary flex items-center gap-2",children:[l.jsx(Ah,{className:"h-4 w-4 text-primary"}),"Text (",A," ",A===1?"line":"lines",")"]}),l.jsxs(ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>{c(""),x(null)},disabled:E,className:"h-8 text-muted-foreground hover:text-foreground",children:[l.jsx(tn,{className:"h-4 w-4 mr-1"}),"Remove"]})]}),l.jsxs("form",{onSubmit:ue,className:"space-y-3",children:[l.jsx("div",{onDrop:U,onDragOver:le,onDragLeave:W,className:F("rounded-xl border transition-all",p?"border-primary bg-primary/10 border-dashed":"border-border bg-background"),children:l.jsx("textarea",{value:a,onChange:N=>c(N.target.value),onKeyDown:N=>hE(N,()=>{ue()},!E&&O),spellCheck:!1,"aria-label":"Pasted people text",disabled:E,placeholder:"Paste names, titles and companiesâ¦",className:"w-full h-32 resize-y rounded-xl bg-transparent p-3 text-sm leading-relaxed text-foreground placeholder:text-muted-foreground focus:outline-none"})}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Return to add · Shift+Return for a new line"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ve,{type:"submit",size:"sm",disabled:E||!O,className:"flex-1",children:r?l.jsxs(l.Fragment,{children:[l.jsx(yn,{className:"h-4 w-4 mr-1 animate-spin"}),"Adding..."]}):l.jsxs(l.Fragment,{children:["Add text",l.jsx(wt,{className:"h-4 w-4 ml-1"})]})}),l.jsx(ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>{c(""),x(null)},disabled:E,children:"Cancel"})]}),!O&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Paste a bit more â we need names with titles or companies (at least ",dd," characters)."]}),v&&l.jsx("p",{className:"text-xs text-destructive",children:v})]})]}):l.jsxs("div",{className:"space-y-3 p-4 bg-primary/5 rounded-[16px] border border-primary/20 ring-1 ring-primary/10",children:[l.jsxs("p",{className:"text-sm font-medium text-primary flex items-center gap-2",children:[l.jsx(Ca,{className:"h-4 w-4 text-primary"}),n?"Or paste any other URL, text or screenshot here":"Or paste any other URL or screenshot here"]}),u.length===0?l.jsx("form",{onSubmit:te,children:l.jsxs("div",{className:"relative",children:[l.jsx(vs,{type:"text",placeholder:n?"Paste a URL, text, or Ctrl+V any screenshot":"Paste a URL or Ctrl+V any screenshot",value:o,onChange:N=>i(N.target.value),onPaste:ge,disabled:E,className:"h-10 pl-3 pr-10 text-sm rounded-xl bg-background"}),l.jsx(ve,{type:"submit",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 -translate-y-1/2 h-8 w-8",disabled:!o.trim()||E,children:r?l.jsx(yn,{className:"h-4 w-4 animate-spin"}):l.jsx(wt,{className:"h-4 w-4"})})]})}):l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{onDrop:U,onDragOver:le,onDragLeave:W,className:F("p-3 rounded-lg border transition-all",p?"border-primary bg-primary/10":"border-border bg-background"),children:l.jsxs("div",{className:"flex gap-2 overflow-x-auto pb-1",children:[u.filter(N=>Yi.includes(N.type)).map((N,I)=>{const z=xe(N),ae=y.get(z);return l.jsxs("div",{className:"relative flex-shrink-0 group",children:[l.jsx("div",{className:"w-14 h-14 roun
378ded-lg overflow-hidden bg-muted border border-border",children:ae?l.jsx("img",{src:ae,alt:`Screenshot ${I+1}`,className:"w-full h-full object-cover"}):l.jsx("div",{className:"w-full h-full flex items-center justify-center",children:l.jsx(Wb,{className:"w-4 h-4 text-muted-foreground"})})}),l.jsx("button",{onClick:()=>C(I),className:"absolute -top-1.5 -right-1.5 w-5 h-5 rounded-full bg-destructive text-destructive-foreground flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-sm",disabled:E,children:l.jsx(tn,{className:"w-3 h-3"})})]},z)}),u.length<Sf&&l.jsx("button",{onClick:()=>{var N;return(N=w.current)==null?void 0:N.click()},className:"flex-shrink-0 w-14 h-14 rounded-lg border-2 border-dashed border-border hover:border-primary/40 flex items-center justify-center transition-colors",disabled:E,children:l.jsx(Ca,{className:"w-4 h-4 text-muted-foreground"})})]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ve,{type:"button",size:"sm",onClick:Z,disabled:E,className:"flex-1",children:r?l.jsxs(l.Fragment,{children:[l.jsx(yn,{className:"h-4 w-4 mr-1 animate-spin"}),"Adding..."]}):l.jsxs(l.Fragment,{children:["Add ",u.length," ",u.length===1?"screenshot":"screenshots",l.jsx(wt,{className:"h-4 w-4 ml-1"})]})}),l.jsx(ve,{type:"button",variant:"ghost",size:"sm",onClick:$,disabled:E,children:"Cancel"})]}),l.jsx("input",{ref:w,type:"file",accept:Yi.join(","),multiple:!0,onChange:X,className:"sr-only",disabled:E})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex-1 h-px bg-border"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),l.jsx("div",{className:"flex-1 h-px bg-border"})]}),l.jsxs("div",{onClick:()=>{var N;return!E&&((N=_.current)==null?void 0:N.click())},className:F("flex items-center justify-center gap-2 p-3 border-2 border-dashed rounded-[16px] cursor-pointer transition-all","border-border hover:border-primary/40 hover:bg-background/50",E&&"opacity-50 cursor-not-allowed"),children:[l.jsx(qb,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"or upload a document here"}),l.jsx("input",{ref:_,type:"file",accept:Ji,onChange:fe,className:"sr-only",disabled:E})]}),h&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-[16px] border border-border bg-background",children:[l.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10",children:l.jsx(Ah,{className:"w-5 h-5 text-primary"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium truncate",children:h.name}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[(h.size/1024/1024).toFixed(2)," MB"]})]}),l.jsx("button",{onClick:()=>m(null),className:"p-1.5 rounded-lg hover:bg-muted transition-colors",disabled:E,children:l.jsx(tn,{className:"w-4 h-4 text-muted-foreground"})})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ve,{type:"button",size:"sm",onClick:he,disabled:E,className:"flex-1",children:r?l.jsxs(l.Fragment,{children:[l.jsx(yn,{className:"h-4 w-4 mr-1 animate-spin"}),"Adding..."]}):l.jsxs(l.Fragment,{children:["Add PDF",l.jsx(wt,{className:"h-4 w-4 ml-1"})]})}),l.jsx(ve,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),disabled:E,children:"Cancel"})]})]}),v&&l.jsx("p",{className:"text-xs text-destructive",children:v})]})}var TE={exports:{}},i4="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",a4=i4,l4=a4;function RE(){}function AE(){}AE.resetWarningCache=RE;var c4=function(){function e(r,s,o,i,a,c){if(c!==l4){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:AE,resetWarningCache:RE};return n.PropTypes=n,n};TE.exports=c4();var u4=TE.exports;const tt=fi(u4);function _0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function S0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 5,645 bytes, lines 378-379
378t%2?_0(Object(n),!0).forEach(function(r){PE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kc=function(t){return typeof t}:kc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function PE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d4(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function f4(e,t){if(e==null)return{};var n=d4(e,t),r,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)r=o[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OE(e,t){return h4(e)||p4(e,t)||m4(e,t)||g4()}function h4(e){if(Array.isArray(e))return e}function p4(e,t){var n=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(n!=null){var r=[],s=!0,o=!1,i,a;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));s=!0);}catch(c){o=!0,a=c}finally{try{!s&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function m4(e,t){if(e){if(typeof e=="string")return E0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E0(e,t)}}function E0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 379In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Tt=function(t,n,r){var s=!!r,o=T.useRef(r);T.useEffect(function(){o.current=r},[r]),T.useEffect(function(){if(!s||!t)return function(){};var i=function(){o.current&&o.current.apply(o,arguments)};return t.on(n,i),function(){t.off(n,i)}},[s,n,t,o])},fp=function(t){var n=T.useRef(t);return T.useEffect(function(){n.current=t},[t]),n.current},di=function(t){return t!==null&&kc(t)==="object"},v4=function(t){return di(t)&&typeof t.then=="function"},y4=function(t){return di(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},k0="[object Object]",w4=function e(t,n){if(!di(t)||!di(n))return t===n;var r=Array.isArray(t),s=Array.isArray(n);if(r!==s)return!1;var o=Object.prototype.toString.call(t)===k0,i=Object.prototype.toString.call(n)===k0;if(o!==i)return!1;if(!o&&!r)return t===n;var a=Object.keys(t),c=Object.keys(n);if(a.length!==c.length)return!1;for(var u={},d=0;d<a.length;d+=1)u[a[d]]=!0;for(var h=0;h<c.length;h+=1)u[c[h]]=!0;var m=Object.keys(u);if(m.length!==a.length)return!1;var p=t,b=n,v=function(y){return e(p[y],b[y])};return m.every(v)},x4=function(t,n,r){return di(t)?Object.keys(t).reduce(function(s,o){var i=!di(n)||!w4(t[o],n[o]);return r.includes(o)?(i&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),s):i?S0(S0({},s||{}),{},PE({},o,t[o])):s},null):null},IE="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",C0=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:IE;if(t===null||y4(t))return t;throw new Error(n)},b4=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:IE;if(v4(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(s){return C0(s,n)})};var r=C0(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},_4=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"6.2.0"}),t.registerAppInfo({name:"react-stripe-js",version:"6.2.0",url:"https://stripe.com/docs/stripe-js/react"}))},DE=T.createContext(null);DE.displayName="ElementsContext";var S4=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t};tt.any,tt.object;tt.func.isRequired;var LE=T.createContext(null);LE.displayName="CheckoutContext";var j0=function(t){var n=T.useContext(LE),r=T.useContext(DE);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both a checkout provider and <Elements> provider."));return n}else return S4(r,t)},E4=["mode"],k4=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},at=function(t,n,r){var s="".concat(k4(t),"Element"),o=function(u){var d=u.id,h=u.className,m=u.options,p=m===void 0?{}:m,b=u.onBlur,v=u.onFocus,x=u.onReady,y=u.onChange,g=u.onEscape,w=u.onClick,_=u.onLoadError,S=u.onLoaderStart,k=u.onNetworksChange,E=u.onConfirm,j=u.onCancel,A=u.onShippingAddressChange,O=u.onShippingRateChange,H=u.onSavedPaymentMethodRemove,K=u.onSavedPaymentMethodUpdate,J=j0("mounts <".concat(s,">")),U="elements"in J?J.elements:null,le="checkoutState"in J?J.checkoutState:null,W=(le==null?void 0:le.type)==="success"||(le==null?void 0:le.type)==="loading"?le.sdk:null,X=T.useState(null),R=OE(X,2),C=R[0],$=R[1],te=T.useRef(null),Z=T.useRef(null);Tt(C,"blur",b),Tt(C,"focus",v),Tt(C,"escape",g),Tt(C,"click",w),Tt(C,"loaderror",_),Tt(C,"loaderstart",S),Tt(C,"networksch
379ange",k),Tt(C,"confirm",E),Tt(C,"cancel",j),Tt(C,"shippingaddresschange",A),Tt(C,"shippingratechange",O),Tt(C,"savedpaymentmethodremove",H),Tt(C,"savedpaymentmethodupdate",K),Tt(C,"change",y);var ue;x&&(t==="expressCheckout"?ue=x:ue=function(){x(C)}),Tt(C,"ready",ue),T.useLayoutEffect(function(){if(te.current===null&&Z.current!==null&&(U||W)){var he=null;if(W){var xe=W,ge=W;switch(t){case"paymentForm":he=ge.createForm(p);break;case"payment":he=xe.createPaymentElement(p);break;case"address":if("mode"in p){var N=p.mode,I=f4(p,E4);if(N==="shipping")he=xe.createShippingAddressElement(I);else if(N==="billing")he=xe.createBillingAddressElement(I);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":he=xe.createExpressCheckoutElement(p);break;case"currencySelector":he=W.createCurrencySelectorElement();break;case"taxId":he=xe.createTaxIdElement(p);break;case"contactDetails":he=xe.createContactDetailsElement();break;default:throw new Error("<".concat(s,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else U&&(he=U.create(t,p));te.current=he,$(he),he&&he.mount(Z.current)}},[U,W,p]);var fe=fp(p);return T.useEffect(function(){if(te.current){var he=x4(p,fe,["paymentRequest"]);he&&"update"in te.current&&te.current.update(he)}},[p,fe]),T.useLayoutEffect(function(){return function(){if(te.current&&typeof te.current.destroy=="function")try{te.current.destroy(),te.current=null}catch{}}},[]),T.createElement("div",{id:d,className:h,ref:Z})},i=function(u){j0("mounts <".concat(s,">"));var d=u.id,h=u.className;return T.createElement("div",{id:d,className:h})},a=n?i:o;return a.propTypes={id:tt.string,className:tt.string,onChange:tt.func,onBlur:tt.func,onFocus:tt.func,onReady:tt.func,onEscape:tt.func,onClick:tt.func,onLoadError:tt.func,onLoaderStart:tt.func,onNetworksChange:tt.func,onConfirm:tt.func,onCancel:tt.func,onShippingAddressChange:tt.func,onShippingRateChange:tt.func,onSavedPaymentMethodRemove:tt.func,onSavedPaymentMethodUpdate:tt.func,options:tt.object},a.displayName=s,a.__elementType=t,a},rt=typeof window>"u",ug=T.createContext(null);ug.displayName="EmbeddedCheckoutProviderContext";var ME=function(){var t=T.useContext(ug);if(!t)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return t},C4="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",j4=function(t){var n=t.stripe,r=t.options,s=t.children,o=T.useMemo(function(){return b4(n,C4)},[n]),i=T.useRef(null),a=T.useRef(null),c=T.useState({embeddedCheckout:null}),u=OE(c,2),d=u[0],h=u[1];T.useEffect(function(){if(!(a.current||i.current)){var b=function(x){a.current||i.current||(a.current=x,i.current=a.current.createEmbeddedCheckoutPage(r).then(function(y){h({embeddedCheckout:y})}))};o.tag==="async"&&!a.current&&(r.clientSecret||r.fetchClientSecret)?o.stripePromise.then(function(v){v&&b(v)}):o.tag==="sync"&&!a.current&&(r.clientSecret||r.fetchClientSecret)&&b(o.stripe)}},[o,r,d,a]),T.useEffect(function(){return function(){d.embeddedCheckout?(i.current=null,d.embeddedCheckout.destroy()):i.current&&i.current.then(function(){i.current=null,d.embeddedCheckout&&d.embeddedCheckout.destroy()})}},[d.embeddedCheckout]),T.useEffect(function(){_4(a)},[a]);var m=fp(n);T.useEffect(function(){m!==null&&m!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[m,n]);var p=fp(r);return T.useEffect(function(){if(p!=null){if(r==null){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}r.clientSecret===void 0&&r.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),p.clientSecret!=null&&r.clientSecret!==p.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),p.fetchClientSecret!=null&&r.fetchClientSecret!==p.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),p.onComplete!=null&&r.onComplete!==p.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),p.onShippingDetailsChange!=null&&r.onShippingDetailsChange!==p.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),p.onLineItemsChange!=null&&r.onLineItemsChange!==p.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[p,r]),T.createElement(ug.Provider,{value:d},s)},N4=function(t){var n=t.id,r=t.className,s=ME(),o=s.embeddedCheckout,i=T.useRef(!1),a=T.useRef(null);return T.useLayoutEffect(function(){return!i.current&&o&&a.current!==null&&(o.mount(a.current),i.current=!0),function(){if(i.current&&o)try{o.unmount(),i.current=!1}catch{}}}
379,[o]),T.createElement("div",{ref:a,id:n,className:r})},T4=function(t){var n=t.id,r=t.className;return ME(),T.createElement("div",{id:n,className:r})},R4=rt?T4:N4;at("auBankAccount",rt);at("card",rt);at("cardNumber",rt);at("cardExpiry",rt);at("cardCvc",rt);at("iban",rt);at("payment",rt);at("expressCheckout",rt);at("paymentRequestButton",rt);at("linkAuthentication",rt);at("contactDetails",rt);at("address",rt);at("shippingAddress",rt);at("paymentMethodMessaging",rt);at("taxId",rt);at("issuingCardNumberDisplay",rt);at("issuingCardCvcDisplay",rt);at("issuingCardExpiryDisplay",rt);at("issuingCardPinDisplay",rt);at("issuingCardCopyButton",rt);function Cc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cc=function(t){return typeof t}:Cc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}var $E="dahlia",A4=function(t){return t===3?"v3":t},FE="https://js.stripe.com",P4="".concat(FE,"/").concat($E,"/stripe.js"),O4=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,I4=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,N0="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",D4=function(t){return O4.test(t)||I4.test(t)},L4=function(){for(var t=document.querySelectorAll('script[src^="'.concat(FE,'"]')),n=0;n<t.length;n++){var r=t[n];if(D4(r.src))return r}return null},T0=function(t){var n="",r=document.createElement("script");r.src="".concat(P4).concat(n);var s=document.head||document.body;if(!s)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return s.appendChild(r),r},M4=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.2.0",startTime:n})},Ui=null,Ql=null,Xl=null,$4=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},F4=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},U4=function(t){return Ui!==null?Ui:(Ui=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(N0),window.Stripe){n(window.Stripe);return}try{var s=L4();if(s&&t)console.warn(N0);else if(!s)s=T0(t);else if(s&&Xl!==null&&Ql!==null){var o;s.removeEventListener("load",Xl),s.removeEventListener("error",Ql),(o=s.parentNode)===null||o===void 0||o.removeChild(s),s=T0(t)}Xl=F4(n,r),Ql=$4(r),s.addEventListener("load",Xl),s.addEventListener("error",Ql)}catch(i){r(i);return}}),Ui.catch(function(n){return Ui=null,Promise.reject(n)}))},z4=function(t,n,r){if(t===null)return null;var s=n[0];if(typeof s!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Cc(s)," instead."));var o=s.match(/^pk_test/),i=A4(t.version),a=$E;o&&i!==a&&console.warn("Stripe.js@".concat(i," was loaded on the page, but @stripe/stripe-js@").concat("9.2.0"," expected Stripe.js@").concat(a,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var c=t.apply(void 0,n);return M4(c,r),c},zi,UE=!1,zE=function(){return zi||(zi=U4(null).catch(function(t){return zi=null,Promise.reject(t)}),zi)};Promise.resolve().then(function(){return zE()}).catch(function(e){UE||console.warn(e)});var B4=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];UE=!0;var s=Date.now();return zE().then(function(o){return z4(o,n,s)})};const jc="pk_live_51TWI2EQ8AOnfCu8YNnXSiZO3mhOxBvCDpkvwseTidPqQ95uNftwbfdrVpCiJoi8S60GBEcJqusoJpzVCUTApREZI00WxqAfQTF",W4=jc!=null&&jc.startsWith("pk_test_")?"sandbox":"live";let Ef=null;function V4(){return Ef||(Ef=B4(jc)),Ef}function dg(){return W4}function H4({priceId:e,customerEmail:t,userId:n,returnUrl:r}){const s=async()=>{const{data:o,error:i}=await Re.functions.invoke("create-checkout",{body:{priceId:e,customerEmail:t,userId:n,returnUrl:r,environment:dg()}});if(i||!(o!=null&&o.clientSecret))throw new Error((i==null?void 0:i.message)||"Failed to create checkout session");return o.clientSecret};return l.jsx("div",{id:"checkout",children:l.jsx(j4,{stripe:V4(),options:{fetchClientSecret:s},children:l.jsx(R4,{})})})}function BE(){const[e,t]=f.useState(!1),[n,r]=f.useState(null),s=f.useCallback(a=>{r(a),t(!0)},[]),o=f.useCallback(()=>{t(!1),r(null)},[]),i=e&&n?l.jsx(id,{open:e,onOpenChange:a=>!a&&o(),children:l.jsxs(cl,{className:"max-w-3xl p-0 max-h-[90vh] overflow-y-auto",children:[l.jsx(ul,{className:"px-6 pt-6",children:l.jsx(dl,{children:"Complete your purchase"})}),l.jsx("div",{className:"p-2",children:l.jsx(H4,{...n})})]})}):null;return{openCheckout:s,closeCheckout:o,isOpen:e,checkoutElement:i}}function WE({isOpen:e,onClose:t,currentUsage:n,limit:r,remainingLocked:s}){const{user:o}=Wn(),{openCheckout:i,checkoutElement:a}=BE(),[c,u]=f.useState(!1),d=()=>
379{if(t(),!o){window.location.href="/#pricing";return}i({priceId:c?"professional_annual":"professional_monthly",userId:o.id,customerEmail:o.email??void 0,returnUrl:`${window.location.origin}/checkout/return?session_id={CHECKOUT_SESSION_ID}`})},h=c?47:59,m=c?"/mo, billed annually":"/mo";return l.jsxs(l.Fragment,{children:[l.jsx(id,{open:e,onOpenChange:t,children:l.jsxs(cl,{className:"sm:max-w-md text-center",children:[l.jsxs(ul,{className:"space-y-4",children:[l.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-emerald-500/10 flex items-center justify-center",children:l.jsx(sT,{className:"h-8 w-8 text-emerald-500"})}),l.jsx(dl,{className:"text-2xl font-bold text-foreground",children:s&&s>0?"We paused matching at your monthly cap":"You've hit your monthly limit"}),l.jsxs(Xm,{className:"text-base text-muted-foreground space-y-2",children:[l.jsxs("p",{children:["You've used"," ",l.jsxs("span",{className:"font-semibold text-foreground",children:[(n==null?void 0:n.toLocaleString())??"all"," of ",(r==null?void 0:r.toLocaleString())??"your"," contacts"]})," ","this month.",s&&s>0?l.jsxs(l.Fragment,{children:[" Upgrade to unlock the remaining"," ",l.jsx("span",{className:"font-semibold text-foreground",children:s})," ",s===1?"contact":"contacts"," from this search."]}):null]}),l.jsx("p",{className:"text-sm",children:"Professional gives you 1,500 contacts per month, search history, and priority matching."})]})]}),l.jsxs("div",{className:"mt-6 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-center gap-1 p-1 rounded-full bg-muted w-fit mx-auto",children:[l.jsx("button",{type:"button",onClick:()=>u(!1),className:F("px-3 py-1 rounded-full text-xs font-medium transition-colors",c?"text-muted-foreground":"bg-background text-foreground shadow-sm"),children:"Monthly"}),l.jsxs("button",{type:"button",onClick:()=>u(!0),className:F("px-3 py-1 rounded-full text-xs font-medium transition-colors",c?"bg-background text-foreground shadow-sm":"text-muted-foreground"),children:["Annual ",l.jsx("span",{className:"text-emerald-600",children:"â20%"})]})]}),l.jsxs(ve,{onClick:d,className:"w-full bg-emerald-600 hover:bg-emerald-700 text-white text-base py-6",children:["Upgrade to Professional â $",h,m,l.jsx(wt,{className:"ml-2 h-4 w-4"})]}),l.jsx(ve,{variant:"ghost",onClick:t,className:"w-full text-muted-foreground",children:"Maybe later"}),l.jsx("p",{className:"text-xs text-muted-foreground text-center -mt-1",children:"Have a promo code? Enter it at checkout."})]})]})}),a]})}var fg="Progress",hg=100,[q4,kU]=Ht(fg),[K4,G4]=q4(fg),VE=f.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:o=Y4,...i}=e;(s||s===0)&&!R0(s)&&console.error(J4(`${s}`,"Progress"));const a=R0(s)?s:hg;r!==null&&!A0(r,a)&&console.error(Q4(`${r}`,"Progress"));const c=A0(r,a)?r:null,u=mu(c)?o(c,a):void 0;return l.jsx(K4,{scope:n,value:c,max:a,children:l.jsx(ye.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":mu(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":KE(c,a),"data-value":c??void 0,"data-max":a,...i,ref:t})})});VE.displayName=fg;var HE="ProgressIndicator",qE=f.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,s=G4(HE,n);return l.jsx(ye.div,{"data-state":KE(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:t})});qE.displayName=HE;function Y4(e,t){return`${Math.round(e/t*100)}%`}function KE(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function mu(e){return typeof e=="number"}function R0(e){return mu(e)&&!isNaN(e)&&e>0}function A0(e,t){return mu(e)&&!isNaN(e)&&e<=t&&e>=0}function J4(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${hg}\`.`}function Q4(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 380 - a positive number 381 - less than the value passed to \`max\` (or ${hg} if no \`max\` prop is set) 382 - \`null\` or \`undefined\` if the progress is indeterminate. 383 384Defaulting to \`null\`.`}var GE=VE,X4=qE;const hp=f.forwardRef(({className:e,value:t,...n},r)=>l.jsx(GE,{ref:r,className:F("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:l.jsx(X4,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));hp.displayName=GE.displayName;function Z4({totalPeople:e,matchedCount:t,isExtracting:n,isComplete:r}){const s=f.useRef([]),o=f.useRef(null),i=f.useRef(0),a=f.useRef(null),[c,u]=f.useState(null),d=f.useRef(!1);f.useEffect(()=>{if(n||r||e===0)return;if(t>0&&!a.current){a.current=Date.now(),o.current=Date.now(),i.current=t;return}if(t<=i.current)return;const y=Date.now(),g=t-i.current,w=y-(o.current||y);if(g>0&&w>0){const _=w/g;if(s.current.push(_),s.current.length>10&&(s.current=s.current.slice(-10)),s.current.length>
384=2&&(d.current=!0),d.current){const k=s.current.reduce((A,O)=>A+O,0)/s.current.length,E=e-t,j=Math.round(k*E/1e3);u(A=>{if(A===null)return j;const O=Math.ceil(A*1.3);return Math.min(j,O)})}}o.current=y,i.current=t},[t,n,r,e]),f.useEffect(()=>{n&&(s.current=[],o.current=null,i.current=0,a.current=null,d.current=!1,u(null))},[n]);const h=e>0?Math.round(t/e*100):0,m=e-t,p=!n&&m>0&&e>0,b=t*53,v=f.useMemo(()=>{if(b<60)return`${b}s`;const y=Math.floor(b/60);if(y<60)return`${y} min`;const g=Math.floor(y/60),w=y%60;return`${g}h ${w}m`},[b]),x=f.useMemo(()=>c===null||!d.current?"Calculating ETAâ¦":c<5?"Almost done":c>120?`~${Math.round(c/60)} min remaining`:`~${c} seconds remaining`,[c]);if(n||e===0)return null;if(r){const y=t>=e;return l.jsxs("div",{className:"space-y-2 mb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ms,{className:"h-5 w-5 text-primary"}),l.jsx("span",{className:"text-lg font-semibold text-foreground",children:y?`All ${e} profiles matched â`:`${t} of ${e} profiles matched â`})]}),l.jsx(hp,{value:100,className:"h-1.5 bg-muted"})]})}return p?l.jsxs("div",{className:"space-y-2 mb-3",children:[l.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1",children:[l.jsxs("span",{className:"text-lg font-semibold text-foreground",children:["Matching LinkedIn profiles⦠",t,"/",e," (",h,"%)"]}),l.jsx("span",{className:"text-lg font-semibold text-muted-foreground",children:x})]}),l.jsx(hp,{value:h,className:"h-1.5 bg-muted [&>div]:bg-primary"}),t>0&&l.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l.jsx(q2,{className:"h-3 w-3 text-orange-400"}),l.jsxs("span",{children:["Time saved so far: ",v," vs manual search"]})]})]}):null}var e3=Symbol.for("react.lazy"),gu=xu[" use ".trim().toString()];function t3(e){return typeof e=="object"&&e!==null&&"then"in e}function YE(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===e3&&"_payload"in e&&t3(e._payload)}function n3(e){const t=r3(e),n=f.forwardRef((r,s)=>{let{children:o,...i}=r;YE(o)&&typeof gu=="function"&&(o=gu(o._payload));const a=f.Children.toArray(o),c=a.find(o3);if(c){const u=c.props.children,d=a.map(h=>h===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:h);return l.jsx(t,{...i,ref:s,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return l.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function r3(e){const t=f.forwardRef((n,r)=>{let{children:s,...o}=n;if(YE(s)&&typeof gu=="function"&&(s=gu(s._payload)),f.isValidElement(s)){const i=a3(s),a=i3(o,s.props);return s.type!==f.Fragment&&(a.ref=r?Qa(r,i):i),f.cloneElement(s,a)}return f.Children.count(s)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s3=Symbol("radix.slottable");function o3(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s3}function i3(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const c=o(...a);return s(...a),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function a3(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var l3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],c3=l3.reduce((e,t)=>{const n=n3(`Primitive.${t}`),r=f.forwardRef((s,o)=>{const{asChild:i,...a}=s,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),u3=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"}),d3="VisuallyHidden",JE=f.forwardRef((e,t)=>l.jsx(c3.span,{...e,ref:t,style:{...u3,...e.style}}));JE.displayName=d3;const f3="/assets/wholio-avatar-head-DhuO4Fuo.png",h3={"post-demo":{headline:"Like what you see?!",subhead:"Sign up free, no card details needed, to try Wholio on your own pages.",primary:"Get started â",secondary:"Maybe later"}
384,"export-gate":{headline:"Almost there.",subhead:"Sign up free, no card details needed, to export lists and run Wholio on your own pages.",primary:"Sign up free â",secondary:"Cancel"}};function P0({isOpen:e,onClose:t,onSignUp:n,variant:r}){const s=h3[r];return l.jsx(Hm,{open:e,onOpenChange:o=>!o&&t(),children:l.jsxs(qm,{children:[l.jsx(il,{className:"fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),l.jsxs(al,{className:"fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-[#FAF7F0] shadow-xl 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 focus:outline-none overflow-visible",children:[l.jsx("img",{src:f3,alt:"","aria-hidden":"true",className:"absolute -top-4 -left-4 h-10 w-10 rounded-full object-cover ring-2 ring-white shadow-md"}),l.jsx(JE,{children:l.jsx(ll,{children:s.headline})}),l.jsxs("div",{className:"relative px-8 pt-10 pb-7 text-center",children:[l.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"absolute top-3 right-3 p-1.5 rounded-md text-neutral-500 hover:text-neutral-900 hover:bg-black/5 transition-colors",children:l.jsx(tn,{className:"h-4 w-4"})}),l.jsx("h2",{className:"text-2xl font-semibold text-neutral-900 tracking-tight",children:s.headline}),l.jsx("p",{className:"mt-2 text-sm text-neutral-600 leading-relaxed max-w-sm mx-auto",children:s.subhead}),l.jsxs("div",{className:"mt-6 flex flex-col items-center gap-2",children:[l.jsx(ve,{type:"button",onClick:()=>{n(),t()},className:"w-full h-11 bg-[#0A0A0A] text-[#FAFAFA] hover:bg-[#1f1f1f] font-medium rounded-lg",children:s.primary}),l.jsx("button",{type:"button",onClick:t,className:"text-sm text-neutral-500 hover:text-neutral-900 transition-colors py-2",children:s.secondary})]})]})]})]})})}function go({column:e,label:t,currentSort:n,direction:r,disabled:s,onSort:o}){const i=n===e;return l.jsx(og,{className:F("text-muted-foreground whitespace-nowrap",!s&&"cursor-pointer hover:text-foreground transition-colors select-none",i&&"text-foreground"),onClick:()=>!s&&o(e),children:l.jsxs("div",{className:"flex items-center gap-1",children:[t,i&&(r==="asc"?l.jsx(B2,{className:"h-3 w-3"}):l.jsx(zs,{className:"h-3 w-3"}))]})})}function p3({confidence:e,status:t}){return t==="pending"?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(yn,{className:"h-3 w-3 animate-spin text-muted-foreground"}),l.jsx("span",{className:"text-muted-foreground text-sm",children:"Matching..."})]}):e===0?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-destructive"}),l.jsx("span",{className:"text-muted-foreground text-sm font-mono",children:"0%"})]}):t==="confirmed"?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"}),l.jsxs("span",{className:"text-primary text-sm font-medium font-mono",children:[e,"%"]}),l.jsx(cp,{variant:"outline",className:"text-primary border-primary/50 text-xs",children:"Confirmed"})]}):t==="rejected"?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground"}),l.jsxs("span",{className:"text-muted-foreground text-sm line-through font-mono",children:[e,"%"]}),l.jsx(cp,{variant:"outline",className:"text-muted-foreground border-muted-foreground/50 text-xs",children:"Rejected"})]}):t==="auto"||e>=70?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"}),l.jsxs("span",{className:"text-primary text-sm font-medium font-mono",children:[e,"%"]})]}):t==="flagged"||e>=60?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-yellow-600"}),l.jsxs("span",{className:"text-yellow-600 text-sm font-medium font-mono",children:[e,"%"]})]}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-destructive"}),l.jsxs("span",{className:"text-destructive text-sm font-mono",children:[e,"%"]})]})}function m3({person:e,onSave:t}){const[n,r]=f.useState(!1),[s,o]=f.useState(""),[i,a]=f.useState(""),c=f.useRef(null),u=e.match_status!=="pending"&&e.match_status!=="locked"&&!e.locked,d=()=>{o(e.linkedin_url||""),a(""),r(!0),setTimeout(()=>{var b;return(b=c.current)==null?void 0:b.focus()},50)},h=()=>{r(!1),o(""),a("")},m=()=>{const b=s.trim();if(!b){a("URL is required");return}let v=b;if(v.startsWith("http")||(v="https://"+v),!/linkedin\.com\/in\//i.test(v)){a("Must be a linkedin.com/in/ URL");return}t(e,v),r(!1),a("")},p=b=>{b.key==="Enter"&&m(),b.key==="Escape"&&h()};return e.match_status==="pending"?l.jsx(xE,{className:"h-4 w-32"}):e.match_status==="locked"||e.locked?l.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-muted text-muted-foreground text-xs",style:{userSelect:"none",WebkitUserSelect:"none"},onCopy:b=>b.preventDefault(),children:[l.jsx(Y2,{className:"h-3 w-3"}),"linkedin.com/in/â¢â¢â¢â¢â¢â¢"]}):n?l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(vs,{ref:c,value:s,onChange:b=>{o(b.target.value),a("")},onKeyDown:p,placeholder:"linkedin.com/in/username",className:"h-7 text-sm w-[200px]"}),l.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7 text-primary hover:text-primary hover:bg-primary/10",onClick:m,title:"Save",children:l.jsx(ms,{className:"h-3.5 w-3.5"})}),l.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:h,title:"Cancel",children:l.jsx(tn,{className:"h-3.5 w-3.5"})})]}),i&&l.jsx("span",{className:"text-destructive text-xs",children:i})]}):e.match_status==="rejected"?l.jsxs("div",{className:"flex items-center gap-1 group",children:[l.jsx("span",{className:"text-muted-foreground line-through text-sm",children:"Rejected"}),u&&l.jsx("button",{onClick:d,className:"opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",title:"Add URL manually",children:l.jsx(Ph,{className:"h-3 w-3"})})]}):e.linkedin_url?l.jsxs("div",{className:"flex items-center gap-1 group",children:[l.jsxs("a",{href:e.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1 text-sm max-w-[200px] truncate font-mono",title:e.linkedin_url,children:[e.linkedin_url.replace("https://www.linkedin.com/in/","").replace("https://linkedin.com/in/",""),l.jsx(Bb,{className:"h-3 w-3 flex-shrink-0"})]}),u&&l.jsx("button",{onClick:d,className:"opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",title:"Edit URL",children:l.jsx(Ph,{className:"h-3 w-3"})})]}):l.jsxs("button",{onClick:d,className:"flex items-center gap-1 text-muted-foreground hover:text-primary text-sm transition-colors",children:[l.jsx(Ca,{className:"h-3 w-3"}
384),"Add URL"]})}function Zl({person:e,field:t,placeholder:n,onSave:r}){const[s,o]=f.useState(!1),[i,a]=f.useState(""),c=f.useRef(null),u=e.match_status!=="pending",d=e[t]||"",h=()=>{a(d),o(!0),setTimeout(()=>{var x;return(x=c.current)==null?void 0:x.focus()},50)},m=()=>{o(!1),a("")},p=()=>{const x=i.trim();if(x===d){m();return}r(e,t,x),o(!1)},b=x=>{x.key==="Enter"&&p(),x.key==="Escape"&&m()};if(e.match_status==="pending"&&!d)return l.jsx(xE,{className:"h-4 w-24"});if(s)return l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(vs,{ref:c,value:i,onChange:x=>a(x.target.value),onKeyDown:b,placeholder:n,className:"h-7 text-sm w-[180px]"}),l.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7 text-primary hover:text-primary hover:bg-primary/10",onClick:p,title:"Save",children:l.jsx(ms,{className:"h-3.5 w-3.5"})}),l.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:m,title:"Cancel",children:l.jsx(tn,{className:"h-3.5 w-3.5"})})]});if(!d)return l.jsxs("button",{onClick:h,className:"flex items-center gap-1 text-muted-foreground hover:text-primary text-sm transition-colors",children:[l.jsx(Ca,{className:"h-3 w-3"}),"Add"]});const v=t==="first_name"||t==="last_name";return l.jsxs("div",{className:"flex items-center gap-1 group",children:[l.jsx("span",{className:F("text-sm",v?"font-medium font-mono":"text-muted-foreground"),children:d}),u&&l.jsx("button",{onClick:h,className:"opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-foreground",title:`Edit ${n.toLowerCase()}`,children:l.jsx(Ph,{className:"h-3 w-3"})})]})}const vu=e=>(e.confidence_score>=70||e.match_status==="confirmed"||e.match_status==="locked")&&!["pending","rejected","flagged","filtered"].includes(e.match_status),js=e=>e.match_status==="flagged",QE=e=>{if(vu(e)||js(e)||["pending","filtered"].includes(e.match_status))return!1;const t=["none","low","rejected"].includes(e.match_status),n=!e.linkedin_url&&e.confidence_score<70;return t||n},g3=e=>`${e.first_name}-${e.last_name}`,v3=(e,t)=>[t,e.first_name,e.last_name,e.title_on_page??"",e.company_on_page??"",e.linkedin_url??"",e.match_status,e.confidence_score].join("|");function kf({label:e,count:t,color:n,isActive:r,hasOtherActive:s,onClick:o}){const a={green:{active:"bg-green-950/80 text-green-400 border-green-800",dot:"bg-primary"},yellow:{active:"bg-yellow-950/80 text-yellow-400 border-yellow-800",dot:"bg-yellow-600"},red:{active:"bg-red-950/80 text-red-400 border-red-800",dot:"bg-destructive"}}[n];return l.jsxs("button",{onClick:o,className:F("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-sm transition-all duration-150 border",r?a.active:s?"bg-zinc-800/50 text-muted-foreground border-transparent opacity-60 cursor-pointer hover:opacity-100 hover:bg-zinc-700 hover:text-foreground hover:border-zinc-600":"bg-zinc-800/50 text-muted-foreground border-transparent cursor-pointer hover:bg-zinc-700 hover:text-foreground hover:border-zinc-600"),children:[l.jsx("div",{className:F("w-2 h-2 rounded-full",a.dot)}),l.jsx("span",{className:F("font-medium",r&&n==="green"&&"text-green-400",r&&n==="yellow"&&"text-yellow-400",r&&n==="red"&&"text-red-400"),children:t}),l.jsx("span",{children:e})]})}function y3({people:e,filteredCount:t,isStreaming:n,isExtracting:r,activeFilters:s,onFilterChange:o,onClearFilters:i,searchDuration:a,onAcceptAllReview:c}){const u=e.filter(x=>x.match_status==="pending").length,d=e.filter(vu).length,h=e.filter(js).length,m=e.filter(QE).length,p=s.size>0,b=p;!r&&e.length>0;const v=x=>{if(x<60)return`${x.toFixed(1)}s`;const y=Math.floor(x/60),g=(x%60).toFixed(0);return`${y}m ${g}s`};return l.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[r?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(yn,{className:"h-3 w-3 animate-spin text-muted-foreground"}),l.jsx("span",{className:"text-muted-foreground",children:"Extracting names..."}),l.jsx("span",{className:"font-semibold text-foreground",children:e.length}),l.jsx("span",{className:"text-muted-foreground",children:"found"})]}):u>0?null:l.jsxs("span",{className:"text-muted-foreground",children:[p?l.
384jsxs(l.Fragment,{children:["Showing ",l.jsx("span",{className:"font-semibold text-foreground",children:t})," of ",e.length]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"font-semibold text-foreground",children:e.length})," people found"]}),a&&u===0&&!r&&l.jsxs(l.Fragment,{children:[" ","in ",v(a),e.length>0&&l.jsxs(l.Fragment,{children:[" â saving you ",Math.round(e.length*53/60)," minutes."]})]})]}),!r&&u===0&&l.jsxs(l.Fragment,{children:[d>0&&l.jsx(kf,{label:"matched",count:d,color:"green",isActive:s.has("matched"),hasOtherActive:b&&!s.has("matched"),onClick:()=>o("matched")}),h>0&&l.jsx(kf,{label:"needs review",count:h,color:"yellow",isActive:s.has("needs_review"),hasOtherActive:b&&!s.has("needs_review"),onClick:()=>o("needs_review")}),s.has("needs_review")&&h>0&&c&&l.jsxs(ve,{variant:"outline",size:"sm",className:"h-6 text-xs gap-1 border-yellow-800 text-yellow-400 hover:bg-yellow-950/50",onClick:c,children:[l.jsx(U2,{className:"h-3 w-3"}),"Accept All"]}),m>0&&l.jsx(kf,{label:"no match",count:m,color:"red",isActive:s.has("no_match"),hasOtherActive:b&&!s.has("no_match"),onClick:()=>o("no_match")})]}),p&&l.jsxs("button",{onClick:i,className:"flex items-center gap-1 px-2 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(tn,{className:"h-3 w-3"}),"Clear"]})]})}function w3({people:e,pageContext:t,onFindSelected:n}){const[r,s]=f.useState(new Set),[o,i]=f.useState(!1);if(e.length===0)return null;const a=r.size===e.length,c=r.size>0,u=m=>{s(m?new Set(e.map((p,b)=>b)):new Set)},d=(m,p)=>{const b=new Set(r);p?b.add(m):b.delete(m),s(b)},h=async()=>{if(r.size!==0){i(!0);try{await n(Array.from(r)),s(new Set)}finally{i(!1)}}};return l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 px-1",children:[l.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["Also mentioned on this page (",e.length,")"]}),c&&l.jsx(ve,{size:"sm",onClick:h,disabled:o,className:"shrink-0",children:o?l.jsxs(l.Fragment,{children:[l.jsx(yn,{className:"h-4 w-4 mr-1 animate-spin"}),"Searching..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Hb,{className:"h-4 w-4 mr-1"}),"Find Selected (",r.size,")"]})})]}),l.jsxs("div",{className:"bg-muted/30 rounded-lg p-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 pb-2 border-b border-border",children:[l.jsx(pu,{id:"select-all-testimonials",checked:a,onCheckedChange:u}),l.jsx("label",{htmlFor:"select-all-testimonials",className:"text-sm font-medium text-muted-foreground cursor-pointer",children:"Select all, or pick individually, to add to the list and find their LinkedIn profiles"})]}),e.map((m,p)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(pu,{id:`testimonial-${p}`,checked:r.has(p),onCheckedChange:b=>d(p,!!b)}),l.jsxs("label",{htmlFor:`testimonial-${p}`,className:"flex items-center gap-2 cursor-pointer flex-1",children:[l.jsxs("span",{className:"font-medium text-foreground",children:[m.first_name," ",m.last_name]}),(m.title_on_page||m.company_on_page)&&l.jsx("span",{className:"text-muted-foreground",children:m.title_on_page&&m.company_on_page?`${m.title_on_page} at ${m.company_on_page}`:m.title_on_page||m.company_on_page})]})]},p)),l.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"These people were also mentioned on the page but weren't the main featured people."})]})]})}const Cf=["Teaching AI to read org charts","Your competitors are still copy-pasting","Scanning for humans, ignoring stock photos","Replacing 47 browser tabs","Asking the internet nicely for profile URLs","Almost done. Unlike your last enrichment project","Cross-referencing with the LinkedIn universe","Convert
384ing pixels into prospects","Parsing team pages like a caffeinated developer","Reading org charts so you don't have to","Turning webpage chaos into clean data","Working harder than your lead gen agency","What took hours now takes seconds","Better than stalking LinkedIn manually","No interns were harmed in this process","Saving you from spreadsheet purgatory","One less thing on your Monday to-do list","Your pipeline is about to look impressive","Summoning LinkedIn profiles from the void","Herding digital business cards","Finding needles in the LinkedIn haystack","Turning strangers into prospects","Building lists while you sip coffee"];function O0(e){let t;do t=Math.floor(Math.random()*Cf.length);while(t===e&&Cf.length>1);return{message:Cf[t],index:t}}function x3(){return l.jsxs("span",{className:"inline-flex ml-0.5",children:[l.jsx("span",{className:"animate-ellipsis-1 opacity-40",children:"."}),l.jsx("span",{className:"animate-ellipsis-2 opacity-40",children:"."}),l.jsx("span",{className:"animate-ellipsis-3 opacity-40",children:"."})]})}function b3({title:e,subtitle:t,onClose:n}){const[r,s]=f.useState(!1);return f.useEffect(()=>{const o=requestAnimationFrame(()=>s(!0)),i=setTimeout(n,3e3),a=c=>{c.key==="Escape"&&n()};return window.addEventListener("keydown",a),()=>{cancelAnimationFrame(o),clearTimeout(i),window.removeEventListener("keydown",a)}},[n]),l.jsx("div",{className:F("fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-[2px] transition-opacity duration-200",r?"opacity-100":"opacity-0"),onClick:n,role:"dialog","aria-live":"polite",children:l.jsxs("div",{onClick:n,className:F("relative mx-4 w-full max-w-[420px] rounded-2xl border border-white/10 bg-[#0F0F10] px-8 py-6 text-left shadow-[0_20px_60px_-10px_rgba(0,0,0,0.6)] transition-all duration-200",r?"opacity-100 scale-100":"opacity-0 scale-95"),children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[#10B981]/15",children:l.jsx(ms,{className:"h-5 w-5 text-[#10B981]",strokeWidth:2.5})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"text-lg font-semibold text-white",children:e}),t&&l.jsx("div",{className:"mt-1 text-sm text-white/60",children:t})]})]}),l.jsx("div",{className:"mt-4 text-right text-xs text-white/30",children:"Click anywhere to dismiss"})]})})}function _3({isVisible:e}){const[t,n]=f.useState(()=>O0()),[r,s]=f.useState(!1);return f.useEffect(()=>{if(!e)return;const o=setInterval(()=>{s(!0),setTimeout(()=>{n(i=>O0(i.index)),s(!1)},300)},7e3);return()=>clearInterval(o)},[e]),e?l.jsxs("p",{className:`text-sm text-muted-foreground/70 transition-opacity duration-300 ${r?"opacity-0":"opacity-100"}`,children:[t.message,l.jsx(x3,{})]}):null}function S3({people:e,testimonialPeople:t=[],pageContext:n,isLoggedIn:r,onSignUp:s,onGoogleSignIn:o,onEmailSignIn:i,isStreaming:a=!1,isExtracting:c=!1,onAddUrl:u,onAddFiles:d,onAddText:h,isAddingMore:m=!1,searchDuration:p,usageUsed:b=0,usageLimit:v,searchId:x,sourceUrl:y,onNewSearch:g,isDemo:w=!1,onPeopleChange:_}){const S=P=>{E(P),_==null||_(P)},[k,E]=f.useState(e),[j,A]=f.useState(t),[O,H]=f.useState(new Set),[K,J]=f.useState(new Set),[U,le]=f.useState(new Set),[W,X]=f.useState(null),[R,C]=f.useState("asc"),[$,te]=f.useState(!1),[Z,ue]=f.useState(!1),[fe,he]=f.useState(null),[xe,ge]=f.useState(!1),[N,I]=f.useState(!1),[z,ae]=f.useState(!1),Pe=f.useRef(!1),je=f.useRef(!1),Le=f.useRef([]),{toast:He}=Mu();f.useEffect(()=>{E(e)},[e]),f.useEffect(()=>{A(t)},[t]),f.useEffect(()=>{Pe.current=!1,je.current=!1,I(!1),ae(!1)},[y]),f.useEffect(()=>{if(!a&&!c&&k.length>0&&k.every(Q=>Q.match_status!=="pending")&&(je.current||(je.current=!0,ae(!0),setTimeout(()=>ae(!1),650)),w&&!r&&!Pe.current)){Pe.current=!0;const Q=setTimeout(()=>I(!0),3e3);return()=>clearTimeout(Q)}},[a,c,k,w,r]),f.useEffect(()=>{const P=new Set,Q=new Set;k.forEach(ee=>{const de=`${ee.first_name}-${ee.last_name}`,Ae=Le.current.find(Ce=>Ce.first_name===ee.first_name&&Ce.last_name===ee.last_name);Ae?Ae.match_status==="pending"&&ee.match_status!=="pending"&&P.add(de):Q.add(de)}),Q.size>0&&(J(Q),setTimeout(()=>J(new Set),400)),P.size>0&&(H(P),setTimeout(()=>H(new Set),1200)),Le.current=[...k]},[k]);const cn=async P=>{const Q=j.filter((de,Ae)=>P.includes(Ae)).map(de=>({first_name:de.first_name,last_name:de.last_name,title_on_page:de.title_on_page||null,company_on_page:de.company_on_page||null})),ee=Q.map(de=>({...de,linkedin_url:null,confidence_score:0,match_status:"pending",match_reasoning:null,is_testimonial:!1}));E(de=>[...de,...ee]),A(de=>de.filter((Ae,Ce)=>!P.includes(Ce)));try{const de=await up(Q,n);de.success&&de.people?(E(Ae=>Ae.map(Ce=>{const L=de.people.find(q=>q.first_name===Ce.first_name&&q.last_name===Ce.last_name);return L&&Ce.match_status==="pending"?{...Ce,linkedin_url:L.linkedin_url,confidence_score:L.confidence_score,match_status:L.match_status,match_reasoning:L.match_reasoning,runner_up:L.runner_up}:Ce})),He({description:`Found ${de.people.filter(Ae=>Ae.linkedin_url).length} LinkedIn profiles`})):(E(Ae=>Ae.map(Ce=>Ce.match_status==="pending"?{...Ce,match_status:"none",confidence_score:0}:Ce)),He({description:de.error||"Could not find LinkedIn profiles",variant:"destructive"}))}catch(de){console.error("Error matching testimonial people:",de),E(Ae=>Ae.map(Ce=>Ce.match_status==="pending"?{...Ce,match_status:"none",confidence_score:0}:Ce)),He({description:"Something went wrong. Please try again.",variant:"destructive"})}},un=P=>{le(Q=>Q.has(P)?new Set:new Set([P]))},Mt=()=>{le(new Set)},qt=async P=>{if(S(Q=>Q.map(ee=>ee.first_name===P.first_name&&ee.last_name===P.last_name?{...ee,match_status:"confirmed",confidence_score:100}:ee)),He({description:`${P.first_name} ${P.last_name} confirmed as match`}),x&&r){const{error:Q}=await Re.from("contacts").update({match_status:"confirmed",confidence_score:100}).eq("search_id",x).eq("first_name",P.first_name).eq("last_name",P.last_name);Q&&console.error("Error persisting accept:",Q)}if((y||x)&&P.linkedin_url&&r)try{const{data:{session:Q}}=await Re.auth.getSession();Q&&fetch("https://gjgbwfwumiznuzszjhqx.supabase.co/functions/v1/confirm-match",{method:"POST",headers:{Authorization:`Bearer ${Q.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({...y?{url:y}:{},search_id:x,first_name:P.first_name,last_name:P.last_name,title_on_page:P.title_on_page,company_on_page:P.company_on_page,linkedin_url:P.linkedin_url,confidence_score:P.confidence_score})}).catch(ee=>console.error("Cache enrichment error:",ee))}catch(Q){console.error("Cache enrichment error:",Q)}},ys=async()=>{const P=k.filter(js);
384if(P.length!==0&&(S(Q=>Q.map(ee=>js(ee)?{...ee,match_status:"confirmed",confidence_score:100}:ee)),He({description:`${P.length} contacts accepted`}),x&&r)){const{error:Q}=await Re.from("contacts").update({match_status:"confirmed",confidence_score:100}).eq("search_id",x).eq("match_status","flagged");Q&&console.error("Error bulk-accepting reviews:",Q)}},Sn=async P=>{if(S(Q=>Q.map(ee=>ee.first_name===P.first_name&&ee.last_name===P.last_name?{...ee,match_status:"rejected",confidence_score:0}:ee)),He({description:`${P.first_name} ${P.last_name} rejected`}),x&&r){const{error:Q}=await Re.from("contacts").update({match_status:"rejected",confidence_score:0}).eq("search_id",x).eq("first_name",P.first_name).eq("last_name",P.last_name);Q&&console.error("Error persisting reject:",Q)}},Kt=async(P,Q)=>{if(S(ee=>ee.map(de=>de.first_name===P.first_name&&de.last_name===P.last_name?{...de,linkedin_url:Q,match_status:"confirmed",confidence_score:100}:de)),He({description:`LinkedIn URL saved for ${P.first_name} ${P.last_name}`}),x&&r){const{error:ee}=await Re.from("contacts").update({linkedin_url:Q,match_status:"confirmed",confidence_score:100}).eq("search_id",x).eq("first_name",P.first_name).eq("last_name",P.last_name);ee&&console.error("Error persisting manual URL:",ee)}if((y||x)&&r)try{const{data:{session:ee}}=await Re.auth.getSession();ee&&fetch("https://gjgbwfwumiznuzszjhqx.supabase.co/functions/v1/confirm-match",{method:"POST",headers:{Authorization:`Bearer ${ee.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({...y?{url:y}:{},search_id:x,first_name:P.first_name,last_name:P.last_name,title_on_page:P.title_on_page,company_on_page:P.company_on_page,linkedin_url:Q,confidence_score:100})}).catch(de=>console.error("Cache enrichment error:",de))}catch(ee){console.error("Cache enrichment error:",ee)}},Qe=async(P,Q,ee)=>{const de=P.first_name,Ae=P.last_name;if(S(L=>L.map(q=>q.first_name===de&&q.last_name===Ae?{...q,[Q]:Q==="first_name"||Q==="last_name"?ee||"":ee||null}:q)),He({description:`${{first_name:"First name",last_name:"Last name",title_on_page:"Title",company_on_page:"Company"}[Q]} updated for ${de} ${Ae}`}),x&&r){const L=Q==="first_name"||Q==="last_name"?ee||"":ee||null,{error:q}=await Re.from("contacts").update({[Q]:L}).eq("search_id",x).eq("first_name",de).eq("last_name",Ae);q&&console.error(`Error persisting ${Q}:`,q)}},to=async P=>{if(S(Q=>Q.filter(ee=>!(ee.first_name===P.first_name&&ee.last_name===P.last_name))),He({description:`${P.first_name} ${P.last_name} removed`}),x&&r){const{error:Q}=await Re.from("contacts").delete().eq("search_id",x).eq("first_name",P.first_name).eq("last_name",P.last_name);Q&&console.error("Error deleting contact:",Q)}},En=f.useMemo(()=>{const P=k.filter(Q=>Q.match_status!=="filtered");return U.size===0?P:P.filter(Q=>U.has("matched")?vu(Q):U.has("needs_review")?js(Q):U.has("no_match")?QE(Q):!1)},[k,U]),Ie=P=>{W===P?C(Q=>Q==="asc"?"desc":"asc"):(X(P),C("asc"))},$t=f.useMemo(()=>W?[...En].sort((P,Q)=>{let ee=P[W],de=Q[W];if(ee==null&&(ee=""),de==null&&(de=""),W==="confidence_score"){const Ce=ee-de;return R==="asc"?Ce:-Ce}const Ae=String(ee).localeCompare(String(de),void 0,{sensitivity:"base"});return R==="asc"?Ae:-Ae}):En,[En,W,R]),_t=(P=!1)=>{let Q=xe?En:En.filter(ee=>!ee.is_testimonial);return Q=Q.filter(ee=>ee.match_status!=="rejected"&&ee.match_status!=="filtered"),P&&(Q=Q.filter(ee=>ee.linkedin_url)),Q},Tr=(P,Q)=>{Re.auth.getSession().then(({data:{session:ee}})=>{ee&&fetch("https://gjgbwfwumiznuzszjhqx.supabase.co/functions/v1/log-activity",{method:"POST",headers:{Authorization:`Bearer ${ee.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({activity_type:"export",metadata:{format:P,count:Q}})}).catch(()=>{})})},ar=()=>{var ne;if(!r){te(!0);return}const P=_t().filter(B=>B.linkedin_url&&B.linkedin_url.trim()!=="");if(P.length===0){He({description:"No matched contacts with a LinkedIn URL to export",variant:"destructive"});return}const Q=["First Name","Last Name","Title","Company","LinkedIn URL","Confidence","Geography"],ee=(n==null?void 0:n.geography)||"",de=P.map(B=>[B.first_name,B.last_name,B.title_on_page||"",B.company_on_page||"",B.linkedin_url||"",B.confidence_score.toString(),ee].map(Dr)),Ae=[Q,...de].map(B=>B.map(G=>`"${G.replace(/"/g,'""')}"`).join(",")).join(` 385`),Ce=((ne=n==null?void 0:n.event_or_company)==null?void 0:ne.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase())||"export",L=new Date().toISOString().split("T")[0],q=`wholio-${Ce}-${L}.csv`,M=new Blob([Ae],{type:"text/csv;charset=utf-8;"}),Y=document.createElement("a");Y.href=URL.createObjectURL(M),Y.download=q,Y.click(),URL.revokeObjectURL(Y.href),he({title:P.length===1?"CSV exported â 1 contact":`CSV exported â ${P.length}
385 contacts`,subtitle:"Check your downloads folder, then import into your CRM or sequencer."}),Tr("csv",P.length)},Si=async()=>{var B;if(!r){te(!0);return}const P=_t().filter(G=>G.linkedin_url&&G.linkedin_url.trim()!=="");if(P.length===0){He({description:"No matched contacts with a LinkedIn URL to export",variant:"destructive"});return}const{default:Q}=await Je(async()=>{const{default:G}=await import("./exceljs.min-i3-9A-Z5.js").then(oe=>oe.e);return{default:G}},[]),ee=new Q.Workbook,de=ee.addWorksheet("Contacts");de.columns=[{header:"First Name",key:"firstName",width:15},{header:"Last Name",key:"lastName",width:15},{header:"Title",key:"title",width:25},{header:"Company",key:"company",width:20},{header:"LinkedIn URL",key:"linkedinUrl",width:40},{header:"Confidence",key:"confidence",width:12},{header:"Geography",key:"geography",width:20}],de.getRow(1).font={bold:!0},de.getRow(1).fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFE0E0E0"}};const Ae=(n==null?void 0:n.geography)||"";P.forEach(G=>{const oe=de.addRow({firstName:Dr(G.first_name),lastName:Dr(G.last_name),title:Dr(G.title_on_page||""),company:Dr(G.company_on_page||""),linkedinUrl:Dr(G.linkedin_url||""),confidence:Dr(G.confidence_score),geography:Dr(Ae)});if(G.linkedin_url){const Ee=oe.getCell("linkedinUrl");Ee.value={text:G.linkedin_url,hyperlink:G.linkedin_url},Ee.font={color:{argb:"FF0563C1"},underline:!0}}}),de.views=[{state:"frozen",ySplit:1}];const Ce=((B=n==null?void 0:n.event_or_company)==null?void 0:B.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase())||"export",L=new Date().toISOString().split("T")[0],q=`wholio-${Ce}-${L}.xlsx`,M=await ee.xlsx.writeBuffer(),Y=new Blob([M],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),ne=document.createElement("a");ne.href=URL.createObjectURL(Y),ne.download=q,ne.click(),URL.revokeObjectURL(ne.href),he({title:P.length===1?"Excel file exported â 1 contact":`Excel file exported â ${P.length} contacts`,subtitle:"Check your downloads folder. Ready to open in Excel, Sheets, or Numbers."}),Tr("excel",P.length)},no=()=>{if(!r){te(!0);return}const P=_t(!0).map(Q=>Q.linkedin_url);if(P.length===0){He({description:"No LinkedIn URLs to copy within your remaining quota",variant:"destructive"});return}navigator.clipboard.writeText(P.join(` 386`)),he({title:P.length===1?"1 LinkedIn URL copied":`${P.length} LinkedIn URLs copied`,subtitle:"Paste them into your CRM, Sales Nav list, or outreach tool."}),Tr("copy_linkedin",P.length)},Rr=k.some(P=>P.match_status==="pending");k.filter(P=>P.match_status==="pending").length;const Gt=_t(!0).length,ro=r&&u&&d,lt=c||Rr;return l.jsxs("div",{className:"space-y-4",children:[l.jsxs(hu,{className:"bg-card border-border",children:[l.jsxs("div",{className:"p-4 border-b border-border space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[l.jsxs("h3",{className:"text-lg font-semibold flex items-baseline gap-2",children:[l.jsx(Kb,{className:"h-5 w-5 text-primary"}),"Results",y&&l.jsxs("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-normal text-muted-foreground hover:text-primary truncate max-w-[300px]",children:["for: ",(()=>{try{const P=new URL(y);return P.hostname.replace("www.","")+(P.pathname!=="/"?P.pathname:"")}catch{return y}})(),l.jsx(Bb,{className:"inline h-3 w-3 ml-1"})]})]}),l.jsx("div",{className:"flex items-center gap-2",children:!lt&&l.jsxs(l.Fragment,{children:[j.length>0&&l.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer mr-1",children:[l.jsx(pu,{checked:xe,onCheckedChange:P=>ge(P===!0),className:"h-3.5 w-3.5"}),"Include testimonials (",j.length,")"]}),l.jsxs(fS,{children:[l.jsx(hS,{asChild:!0,children:l.jsxs(ve,{variant:"cta",size:"sm",className:F(z&&"animate-pulse-green"),children:[l.jsx(zb,{className:"h-4 w-4 mr-1"}),"Export",l.jsx(zs,{className:"h-3 w-3 ml-1"})]})}),l.jsxs(zm,{align:"end",className:"bg-popover",children:[l.jsx(Vo,{onClick:Si,children:"Excel (.xlsx)"}),l.jsx(Vo,{onClick:ar,children:"CSV (.csv)"})]})]}),l.jsxs(ve,{variant:"default",size:"sm",onClick:no,disabled:Gt===0,
386className:F(z&&"animate-pulse-green"),children:[l.jsx(H2,{className:"h-4 w-4 mr-1"}),"Copy URLs (",Gt,")"]})]})})]}),(()=>{const P=k.filter(ee=>ee.match_status!=="filtered"&&ee.match_status!=="rejected"),Q=P.filter(ee=>vu(ee)||js(ee)).length;return l.jsx(Z4,{totalPeople:P.length,matchedCount:Q,isExtracting:!!c,isComplete:!c&&!a&&P.length>0&&P.every(ee=>ee.match_status!=="pending")})})(),l.jsx(y3,{people:k.filter(P=>P.match_status!=="filtered"),filteredCount:En.length,isStreaming:a,isExtracting:c,activeFilters:U,onFilterChange:un,onClearFilters:Mt,searchDuration:p,onAcceptAllReview:ys}),l.jsx(_3,{isVisible:lt})]}),l.jsx("div",{className:F("max-h-[600px] overflow-y-auto",!r&&"select-none"),children:l.jsxs(vE,{className:"min-w-[800px]",children:[l.jsx(yE,{children:l.jsxs(Ec,{className:"border-border hover:bg-muted/50",children:[l.jsx(go,{column:"first_name",label:"First Name",currentSort:W,direction:R,disabled:lt,onSort:Ie}),l.jsx(go,{column:"last_name",label:"Last Name",currentSort:W,direction:R,disabled:lt,onSort:Ie}),l.jsx(go,{column:"title_on_page",label:"Title",currentSort:W,direction:R,disabled:lt,onSort:Ie}),l.jsx(go,{column:"company_on_page",label:"Company",currentSort:W,direction:R,disabled:lt,onSort:Ie}),l.jsx(go,{column:"confidence_score",label:"Confidence",currentSort:W,direction:R,disabled:lt,onSort:Ie}),l.jsx(go,{column:"linkedin_url",label:"LinkedIn URL",currentSort:W,direction:R,disabled:lt,onSort:Ie}),l.jsx(og,{className:"w-8"})]})}),l.jsx(wE,{children:$t.length===0&&c?l.jsx(Ec,{className:"border-border",children:l.jsx(fr,{colSpan:6,className:"text-center py-12",children:l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsx(yn,{className:"h-6 w-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Extracting people from page..."})]})})}):l.jsx(l.Fragment,{children:$t.map(P=>{const Q=k.findIndex(M=>M===P),ee=v3(P,Q),de=g3(P),Ae=O.has(de),Ce=K.has(de),L=!!P.linkedin_url&&js(P),q=P.match_status==="filtered";return l.jsxs(Ec,{className:F("border-border hover:bg-muted/50 group/row",Ce&&"animate-fade-in",Ae&&"animate-row-highlight",q&&"opacity-60"),children:[l.jsx(fr,{children:q?l.jsx("span",{className:"font-medium font-mono select-none",children:P.first_name}):l.jsx(Zl,{person:P,field:"first_name",placeholder:"First name",onSave:Qe})}),l.jsx(fr,{children:q?l.jsx("span",{className:"font-medium font-mono select-none",children:P.last_name}):l.jsx(Zl,{person:P,field:"last_name",placeholder:"Last name",onSave:Qe})}),l.jsx(fr,{children:q?l.jsx("span",{className:"text-muted-foreground select-none text-sm",children:"â"}):l.jsx(Zl,{person:P,field:"title_on_page",placeholder:"Title",onSave:Qe})}),l.jsx(fr,{children:q?l.jsx("span",{className:"text-muted-foreground select-none text-sm",children:"â"}):l.jsx(Zl,{person:P,field:"company_on_page",placeholder:"Company",onSave:Qe})}),l.jsx(fr,{children:q?l.jsx(cp,{variant:"outline",className:"text-xs text-muted-foreground select-none border-dashed",children:"Locked"}):l.jsx(p3,{confidence:P.confidence_score,status:P.match_status})}),l.jsx(fr,{children:q?l.jsx("span",{className:"text-xs text-muted-foreground select-none italic",children:"Upgrade to unlock"}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(m3,{person:P,onSave:Kt}),L&&l.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[l.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7 text-primary hover:text-primary hover:bg-primary/10",onClick:()=>qt(P),title:"Accept match",children:l.jsx(tT,{className:"h-4 w-4"})}),l.jsx(ve,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>Sn(P),title:"Reject match",children:l.jsx(eT,{className:"h-4 w-4"})})]})]})}),l.jsx(fr,{className:"w-8 p-0",children:!q&&P.match_status!=="pending"&&l.jsx("button",{onClick:()=>to(P),className:"opacity-0 group-hover/row:opacity-100 transition-opacity p-1.5 text-muted-foreground hover:text-destructive",title:"Remove from results",children:l.jsx(nT,{className:"h-3.5 w-3.5"})})})]},ee)})})})]})})]}),!r&&k.some(P=>P.match_status==="locked"||P.locked)&&!lt&&l.jsxs("div",{className:"flex flex-col items-center gap-3 px-6 py-4 rounded-lg border border-[#D9D4CC] bg-background",children:[l.jsx("p",{className:"text-sm text-foreground font-medium",children:"Sign up free to reveal all LinkedIn URLs"}),l.jsxs(ve,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>o==null?void 0:o(),children:[l.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",children:[l.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),l.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),l.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),l.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]})]}),l.jsx(w3,{people:j,pageContext:n,onFindSelected:cn}),ro&&l.jsx(o4,{onAddUrl:u,onAddText:h,onAddFiles:d,isAdding:m,disabled:a}),l.jsx(P0,{isOpen:$,onClose:()=>te(!1),onSignUp:()=>s(),variant:"export-gate"}),l.jsx(P0,{isOpen:N,onClose:()=>I(!1),onSignUp:()=>s(),variant:"post-demo"}),l.jsx(WE,{isOpen:Z,onClose:()=>ue(!1),currentUsage:b,limit:v}),fe&&l.jsx(b3,{title:fe.title,subtitle:fe.subtitle,onClose:()=>he(null)})]})}var pg="Radio",[E3,XE]=Ht(pg),[k3,C3]=E3(pg),ZE=f.forwardRef((e,t)=>
386{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:c,form:u,...d}=e,[h,m]=f.useState(null),p=De(t,x=>m(x)),b=f.useRef(!1),v=h?u||!!h.closest("form"):!0;return l.jsxs(k3,{scope:n,checked:s,disabled:i,children:[l.jsx(ye.button,{type:"button",role:"radio","aria-checked":s,"data-state":rk(s),"data-disabled":i?"":void 0,disabled:i,value:a,...d,ref:p,onClick:ie(e.onClick,x=>{s||c==null||c(),v&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})}),v&&l.jsx(nk,{control:h,bubbles:!b.current,name:r,value:a,checked:s,required:o,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});ZE.displayName=pg;var ek="RadioIndicator",tk=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=C3(ek,n);return l.jsx(ln,{present:r||o.checked,children:l.jsx(ye.span,{"data-state":rk(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});tk.displayName=ek;var j3="RadioBubbleInput",nk=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...s},o)=>{const i=f.useRef(null),a=De(i,o),c=bE(n),u=Em(t);return f.useEffect(()=>{const d=i.current;if(!d)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&p){const b=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(b)}},[c,n,r]),l.jsx(ye.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:a,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nk.displayName=j3;function rk(e){return e?"checked":"unchecked"}var N3=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],md="RadioGroup",[T3,CU]=Ht(md,[Xu,XE]),sk=Xu(),ok=XE(),[R3,A3]=T3(md),ik=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:h,...m}=e,p=sk(n),b=Qu(u),[v,x]=sr({prop:o,defaultProp:s??null,onChange:h,caller:md});return l.jsx(R3,{scope:n,name:r,required:i,disabled:a,value:v,onValueChange:x,children:l.jsx(c1,{asChild:!0,...p,orientation:c,dir:b,loop:d,children:l.jsx(ye.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:b,...m,ref:t})})})});ik.displayName=md;var ak="RadioGroupItem",lk=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=A3(ak,n),i=o.disabled||r,a=sk(n),c=ok(n),u=f.useRef(null),d=De(t,u),h=o.value===s.value,m=f.useRef(!1);return f.useEffect(()=>{const p=v=>{N3.includes(v.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.jsx(u1,{asChild:!0,...a,focusable:!i,active:h,children:l.jsx(ZE,{disabled:i,required:o.required,checked:h,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ie(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:ie(s.onFocus,()=>{var p;m.current&&((p=u.current)==null||p.click())})})})});lk.displayName=ak;var P3="RadioGroupIndicator",ck=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=ok(n);return l.jsx(tk,{...s,...r,ref:t})});ck.displayName=P3;var uk=ik,dk=lk,O3=ck;const fk=f.forwardRef(({className:e,...t},n)=>l.jsx(uk,{className:F("grid gap-2",e),...t,ref:n}));fk.displayName=uk.displayName;const hk=f.forwardRef(({className:e,...t},n)=>l.jsx(dk,{ref:n,className:F("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(O3,{className:"flex items-center justify-center",children:l.jsx(Ub,{className:"h-2.5 w-2.5 fill-current text-current"})})}));hk.displayName=dk.displayName;const I0=[{value:"linkedin",label:"LinkedIn"},{value:"referral",label:"Referral"},{value:"google_search",label:"Google Search"},{value:"other",label:"Other"}];function I3({isOpen:e,userId:t,onComplete:n}){const[r,s]=f.useState(""),[o,i]=f.useState(""),[a,c]=f.useState(!1),{toast:u}=Mu(),d=async()=>{var m;if(!r){u({title:"Please select an option",description:"Let us know how you heard about us",variant:"destructive"});return}c(!0);const h=r==="other"&&o.trim()?`Other: ${o.trim()}`:r==="other"?"Other":((m=I0.find(p=>p.value===r))==null?void 0:m.label)||r;try{const{error:p}=await Re.from("profiles").update({referral_source:h}).eq("id",t);if(p)throw p;u({description:"Thanks for letting us know!"}),n()}catch(p){console.error("Error saving referral source:",p),u({title:"Error",description:"Failed to save your response. Please try again.",variant:"destructive"})}finally{c(!1)}};return l.jsx(id,{open:e,onOpenChange:()=>{},children:l.jsxs(cl,{className:"sm:max-w-[400px] [&>button]:hidden",onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),onEscapeKeyDown:h=>h.preventDefault(),children:[l.jsxs(ul,{className:"text-center space-y-2 pb-2",children:[l.jsx("div",{className:"flex justify-center",children:l.jsx("img",{src:sg,alt:"Wholio",className:"w-10 h-10"})}),l.jsx(dl,{className:"text-lg",children:"How did you hear about us?"}),l.jsx(Xm,{className:"text-sm",children:"This helps us understand our community better"})]}),l.jsx(fk,{value:r,onValueChange:s,className:"space-y-2",children:I0.map(h=>l.jsxs("div",{className:"flex items-center space-x-3",onClick:m=>m.stopPropagation(),children:[l.jsx(hk,{value:h.value,id:h.value}),l.jsx(Zm,{htmlFor:h.value,className:"text-sm font-medium cursor-pointer flex-1",children:h.label})]},h.value))}),r==="other"&&l.jsx(vs,{placeholder:"Please specify...",value:o,onChange:h=>i(h.target.value),className:"ml-7 max-w-xs"}),l.jsx(US,{className:"pt-2",children:l.jsx(ve,{onClick:d,disabled:!r||a,className:"w-full",children:a?"Saving...":"Continue"})})]})})}
386const D3="/assets/wholio-pointing-left-BHHvN3Kx.png",L3=[{title:"Conference speakers",description:"Get every speaker's LinkedIn from any event page"},{title:"Company team pages",description:"Extract the entire leadership team instantly"},{title:"LinkedIn events",description:"Screenshot the attendee list â we'll find them"},{title:"Award lists",description:"40 Under 40 dropped? Build your list in seconds, start connecting in a minute"},{title:"Industry articles",description:"Article mentions interesting profiles? Find their LinkedIn URLs and connect"},{title:"Podcast guests",description:"Great list of guests? Screenshot, find profiles, and connect"}],M3=({title:e,description:t})=>l.jsxs("div",{className:F("bg-[#FAF5E8] rounded-[16px] p-6 shadow-[0_2px_8px_rgba(0,0,0,0.06)] border border-[rgba(0,0,0,0.08)]","transition-all duration-200 ease-out","hover:-translate-y-0.5 hover:shadow-md"),children:[l.jsx("h3",{className:"text-lg font-semibold text-[#0C0C0C] mb-1",children:e}),l.jsx("p",{className:"text-sm text-[#5A5448]",children:t})]}),$3=({onCtaClick:e})=>{const{user:t}=Wn(),n=f.useRef(null),[r,s]=f.useState(!1);f.useEffect(()=>{const i=n.current;if(!i)return;const a=new IntersectionObserver(([c])=>{c.isIntersecting&&(s(!0),a.disconnect())},{threshold:.15});return a.observe(i),()=>a.disconnect()},[]);const o=()=>{e?e():window.scrollTo({top:0,behavior:"smooth"})};return l.jsx("section",{className:"py-20 bg-[#F3EBD8] rounded-3xl mx-2 sm:mx-4",children:l.jsxs("div",{className:"container max-w-6xl mx-auto px-4",children:[l.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between md:gap-10 mb-12",children:[l.jsx("h2",{className:"flex-1 text-3xl sm:text-4xl font-serif font-normal text-[#0C0C0C] text-center md:text-left mb-4 md:mb-0",children:"Every time you see people on a page and think 'I need to reach them' â that's a Wholio moment"}),l.jsx("img",{src:D3,alt:"","aria-hidden":"true",className:"hidden md:block shrink-0 h-[200px] lg:h-[280px] w-auto"})]}),l.jsx("div",{ref:n,className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:L3.map((i,a)=>l.jsx("div",{className:F("transition-all duration-700 ease-out",r?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:r?`${a*80}ms`:"0ms"},children:l.jsx(M3,{...i})},i.title))}),l.jsx("div",{className:"flex justify-center mt-10",children:l.jsxs(ve,{variant:"cta",size:"default",onClick:o,className:"gap-2 bg-[#0C0C0C] text-white hover:bg-[#1A1A1A]",children:[l.jsx(F2,{className:"w-4 h-4"}),t?"Try now":"Try now, no credit card"]})})]})})},F3="/assets/testimonial-photo-DlZKq9yP.jpg",D0=[{name:"Anya Patel",linkedin:"li/anyapatel",score:97},{name:"Marcus Lee",linkedin:"li/marcuslee",score:94},{name:"Sara Okonkwo",linkedin:"li/saraso",score:91}],U3=()=>{const e=f.useRef(null),[t,n]=f.useState(!1);return f.useEffect(()=>{const r=e.current;if(!r)return;const s=new IntersectionObserver(([o])=>{o.isIntersecting&&(n(!0),s.disconnect())},{threshold:.15});return s.observe(r),()=>s.disconnect()},[]),l.jsx("section",{ref:e,className:"rounded-3xl mx-2 sm:mx-4 mb-6 overflow-hidden relative bg-[#161616]",children:l.jsxs("div",{className:"relative min-h-[520px] md:min-h-[600px]",children:[l.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${F3})`}}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-[#161616]/90 via-[#161616]/70 to-[#161616]/30"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#161616] via-[#161616]/50 to-transparent"}),l.jsx("div",{className:F("relative z-10 px-6 sm:px-10 lg:px-16 lg:pl-24 pb-28 pt-14 max-w-2xl flex flex-col justify-start min-h-[520px] md:min-h-[600px] transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),children:l.jsxs("div",{className:"flex flex-col gap-5",children:[l.jsx("span",{className:"text-[#5FCF8C] font-bold tracking-[0.2em] text-xs uppercase",children:"What users say"}),l.jsxs("blockquote",{className:"text-xl md:text-2xl lg:text-[28px] font-medium text-white leading-relaxed",children:['"Wholio identified 57 people, found their LinkedIn URLs, and exported everything ',l.jsx("span",{className:"text-[#5FCF8C]",children:"in under a minute"}),". That"," ","would have taken my team ",l.jsx("span",{className:"text-[#5FCF8C]",children:"over an hour"}),' manually."']}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-9 h-9 rounded-full bg-[#5FCF8C] flex items-center justify-center text-[#0C0C0C] font-bold text-xs shrink-0",children:"HP"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-white font-semibold text-sm leading-tight",children:"Humaira Parveen"}),l.jsx("p",{className:"text-white/50 text-sm leading-tight",children:"Founder's Office at Chore"})]})]})]})}),l.jsxs("div",{className:F("absolute bottom-6 left-1/2 -translate-x-1/2 z-20 flex gap-8 bg-[#1E1E1E]/80 backdrop-blur-sm rounded-xl border border-white/[0.06] px-8 py-4 transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:t?"200ms":"0ms"},children:[l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-[#5FCF8C] text-2xl font-bold",children:"57"}),l.jsx("p",{className:"text-white/50 text-xs mt-0.5",children:"Profiles found"})]}),l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-[#5FCF8C] text-2xl font-bold",children:"<60s"}),l.jsx("p",{className:"text-white/50 text-xs mt-0.5",children:"Time to complete"})]}),l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-[#5FCF8C] text-2xl font-bold",children:"1hr+"}),l.jsx("p",{className:"text-white/50 text-xs mt-0.5",children:"Time saved"})]})]}),l.jsxs("div",{className:F("hidden lg:flex absolute top-[55%] left-[38%] -translate-x-1/2 -translate-y-1/2 -rotate-1 z-20 bg-[#1E1E1E]/90 backdrop-blur-sm rounded-xl border border-white/[0.06] shadow-2xl px-5 py-4 items-center gap-3 transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:t?"400ms":"0ms"},children:[l.jsx(V2,{className:"w-5 h-5 text-[#5FCF8C] shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[#5FCF8C] text-xl font-bold leading-tight",children:"7 hrs"}),l.jsx("p",{className:"text-[#9A9A9A] text-[11px] leading-tight",children:"saved this week"})]})]}),l.jsxs("div",{className:F("hidden lg:block absolute top-28 right-12 z-20 w-[340px] bg-[#1E1E1E]/90 backdrop-blur-sm rounded-xl border border-white/[0.06] shadow-2xl overflow-hidden transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:t?"300ms":"0ms"},children:[l.jsxs("div",{className:"px-4 py-3 border-b border-white/[0.06] flex items-center gap-2",children:[l.jsx("span",{className:"inline-flex items-center bg-[#5FCF8C]/15 text-[#5FCF8C] text-[11px] font-semibold px-2 py-0.5 rounded-full",children:"57 profiles found"}),l.jsx("span",{className:"text-[#9A9A9A] text-[11px] font-mono",children:"fintechconference.com/speakers"})]}),l.jsx("div",{className:"px-4 pt-3 pb-1",children:l.jsx("span",{className:"text-[#9A9A9A] text-[10px] font-semibold tracking-wider up
386percase",children:"Results"})}),l.jsx("div",{className:"px-4 pb-4 space-y-0",children:D0.map((r,s)=>l.jsxs("div",{className:`flex items-center justify-between py-2.5 ${s<D0.length-1?"border-b border-white/[0.06]":""}`,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-white text-sm font-medium",children:r.name}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-[#5FCF8C] text-[11px] font-mono",children:[l.jsx(Vb,{className:"w-3 h-3"}),r.linkedin]})]}),l.jsxs("span",{className:"text-[#5FCF8C] text-xs font-mono font-semibold",children:[r.score,"%"]})]},r.name))})]}),l.jsxs("div",{className:F("hidden lg:flex absolute bottom-20 right-16 -rotate-1 z-20 items-center gap-3 bg-[#1E1E1E]/90 backdrop-blur-sm rounded-xl border border-white/[0.06] shadow-2xl px-6 py-4 transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:t?"500ms":"0ms"},children:[l.jsx(zb,{className:"w-5 h-5 text-[#5FCF8C] shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-white text-base font-medium leading-tight",children:"Exported to Apollo"}),l.jsx("p",{className:"text-[#9A9A9A] text-xs leading-tight",children:"57 contacts · campaign ready"})]})]})]})})},z3=({isAnnual:e,onToggle:t})=>l.jsx("div",{className:"flex items-center justify-center gap-2 mb-12",children:l.jsxs("div",{className:"relative flex items-center bg-muted p-1 rounded-full",children:[l.jsx("button",{onClick:()=>t(!1),className:F("relative z-10 px-4 py-2 text-sm font-medium rounded-full transition-colors duration-200",e?"text-muted-foreground":"text-foreground"),children:"Monthly"}),l.jsxs("button",{onClick:()=>t(!0),className:F("relative z-10 px-4 py-2 text-sm font-medium rounded-full transition-colors duration-200 flex items-center gap-2",e?"text-foreground":"text-muted-foreground"),children:["Annual",e&&l.jsx("span",{className:"bg-[#D4E8DA] text-[#1B5E3F] text-xs font-semibold px-2 py-0.5 rounded-full animate-scale-in",children:"Save 20%"})]}),l.jsx("div",{className:F("absolute top-1 bottom-1 w-[calc(50%-4px)] bg-background rounded-full shadow-sm transition-transform duration-300 ease-out",e?"translate-x-[calc(100%+4px)]":"translate-x-0")})]})}),B3=({name:e,monthlyPrice:t,annualPrice:n,annualTotal:r,contacts:s,features:o,buttonText:i,isPopular:a=!1,isCustom:c=!1,isAvailable:u=!0,isAnnual:d,onGetStarted:h,isCurrentPlan:m=!1,isCurrentInterval:p=!1})=>{const b=d?n:t,v=d&&r>0,x=!c,g=!1,w=m&&p?"Current plan":m?`Switch to ${d?"annual":"monthly"}`:i;return l.jsxs("div",{className:F("relative bg-[#161616] rounded-[20px] p-8 border flex flex-col","transition-all duration-200",a?"border-2 border-white/[0.15] shadow-lg scale-105 z-10":"border-[rgba(255,255,255,0.10)] shadow-sm"),children:[!u&&l.jsx("div",{className:"absolute inset-0 rounded-[20px] bg-[rgba(12,12,12,0.85)] backdrop-blur-[2px] flex items-center justify-center z-20",children:l.jsx("span",{className:"bg-[#161616] text-[#9A9A9A] text-sm font-medium px-4 py-2 rounded-full",children:"Coming soon"})}),l.jsx("div",{className:"mb-4 text-center h-4",children:m?l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest text-[#5FCF8C]",children:"Your plan"}):a&&l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest text-[#5FCF8C]",children:"Most popular"})}),l.jsxs("div",{className:"text-center mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:e}),l.jsx("div",{className:"flex items-baseline justify-center gap-1",children:x?l.jsx(l.Fragment,{children:l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-4xl font-bold text-white",children:["$",b]}),l.jsx("span",{className:"text-[#9A9A9A]",children:"/month"})]})}):l.jsx("span",{className:"text-4xl font-bold text-white",children:"Custom"})}),x&&v&&!g&&l.jsxs("p",{className:"text-sm text-[#9A9A9A] mt-1",children:["billed annually at $",r.toLocaleString()]}),l.jsx("p",{className:"text-white mt-2",children:s})]}),l.jsxs("div",{className:"flex-1 flex flex-col",children:[l.jsx("ul",{className:"space-y-3 mb-6",children:o.map(_=>l.jsxs("li",{className:"flex items-start gap-2",children:[l.jsx(ms,{className:"h-5 w-5 text-[#5FCF8C] shrink-0 mt-0.5"}),l.jsx("span",{className:"text-sm text-[#9A9A9A]",children:_})]},_))}),l.jsxs("div",{className:"mt-auto",children:[l.jsx(ve,{variant:a?"cta":"outline",className:"w-full",disabled:!u||m&&p,onClick:()=>u&&(h==null?void 0:h(e)),children:w}),a&&!m&&l.jsx("p",{className:"text-xs text-[#9A9A9A] text-center mt-3",children:"Have a promo code? Enter it at checkout."})]})]})]})},W3=[{name:"Free",monthlyPrice:0,annualPrice:0,annualTotal:0,contacts:"100 contacts/month ⢠1 seat",features:["URL and screenshot input","PDF upload","LinkedIn profile matching","CSV and Excel export"],buttonText:"Get started",isAvailable:!0},{name:"Professional",monthlyPrice:59,annualPrice:47,annualTotal:564,contacts:"1,500 contacts/month ⢠1 seat",features:["Everything in Free","Search history","Priority matching","Email support"],buttonText:"Get started",isPopular:!0,isAvailable:!0},{name:"Agency",monthlyPrice:0,annualPrice:0,annualTotal:0,contacts:"High volume & team plans",features:["Everything in Professional","Multiple seats & shared history","Dedicated account manager","Custom SLA & invoicing"],buttonText:"Get in touch",isCustom:!0,isAvailable:!0}];function V3(){const{user:e}=Wn(),[t,n]=f.useState(null),[r,s]=f.useState(!0),o=async()=>
386{if(!e){n(null),s(!1);return}const{data:a}=await Re.from("subscriptions").select("id, status, price_id, current_period_end, cancel_at_period_end, stripe_subscription_id, stripe_customer_id").eq("user_id",e.id).eq("environment",dg()).order("created_at",{ascending:!1}).limit(1).maybeSingle();n(a??null),s(!1)};f.useEffect(()=>{if(o(),!e)return;const a=Re.channel(`subscriptions:${e.id}`).on("postgres_changes",{event:"*",schema:"public",table:"subscriptions",filter:`user_id=eq.${e.id}`},()=>o()).subscribe();return()=>{Re.removeChannel(a)}},[e==null?void 0:e.id]);const i=!!t&&(["active","trialing","past_due"].includes(t.status)&&(!t.current_period_end||new Date(t.current_period_end)>new Date)||t.status==="canceled"&&t.current_period_end!=null&&new Date(t.current_period_end)>new Date);return{subscription:t,loading:r,isActive:i,refetch:o}}const H3=()=>{const[e,t]=f.useState(!0),[n,r]=f.useState(!1),{user:s}=Wn(),o=xi(),i=ir(),{openCheckout:a,checkoutElement:c}=BE(),{isActive:u,subscription:d,loading:h}=V3(),m=f.useRef(null),[p,b]=f.useState(!1),v=(d==null?void 0:d.price_id)==="professional_annual"?"annual":(d==null?void 0:d.price_id)==="professional_monthly"?"monthly":null,x=async()=>{try{const{data:{session:g}}=await Re.auth.getSession(),{data:w,error:_}=await Re.functions.invoke("create-portal-session",{headers:{Authorization:`Bearer ${g==null?void 0:g.access_token}`},body:{environment:dg(),returnUrl:`${window.location.origin}/dashboard`}});if(_||!(w!=null&&w.url))throw new Error((_==null?void 0:_.message)||"Failed to open billing portal");window.open(w.url,"_blank","noopener,noreferrer")}catch(g){console.error("billing portal error:",g),tf.error("Could not open billing portal. Please try again.")}};f.useEffect(()=>{const g=m.current;if(!g)return;const w=new IntersectionObserver(([_])=>{_.isIntersecting&&(b(!0),w.disconnect())},{threshold:.15});return w.observe(g),()=>w.disconnect()},[]);const y=async g=>{const w=g.toLowerCase();if(!s){try{localStorage.setItem("pending_checkout",JSON.stringify({plan:w,isAnnual:e}))}catch{}r(!0);return}if(w==="free"){o("/dashboard");return}if(w==="professional"){if(u){v===(e?"annual":"monthly")?(tf.info("You're already on this plan."),o("/dashboard")):(tf.info("Opening Stripe billing portal to switch billing interval."),await x());return}a({priceId:e?"professional_annual":"professional_monthly",userId:s.id,customerEmail:s.email??void 0,returnUrl:`${window.location.origin}/checkout/return?session_id={CHECKOUT_SESSION_ID}`});return}window.location.href="mailto:[email protected]?subject=Plan%20enquiry"};return f.useEffect(()=>{var g;if(s&&!h)try{const w=((g=i.state)==null?void 0:g.pendingCheckout)??null,_=localStorage.getItem("pending_checkout"),S=w??(_?JSON.parse(_):null);if(!S)return;if(localStorage.removeItem("pending_checkout"),w&&o(i.pathname+i.search,{replace:!0,state:{}}),S.plan==="professional"&&!u){const k=S.isAnnual?"professional_annual":"professional_monthly";setTimeout(()=>{var E;(E=m.current)==null||E.scrollIntoView({behavior:"smooth",block:"start"})},0),a({priceId:k,userId:s.id,customerEmail:s.email??void 0,returnUrl:`${window.location.origin}/checkout/return?session_id={CHECKOUT_SESSION_ID}`})}}catch{}},[s==null?void 0:s.id,u,h]),l.jsx(l.Fragment,{children:l.jsxs("section",{id:"pricing",className:"py-20 bg-[#161616] scroll-mt-20 rounded-3xl mx-2 sm:mx-4",children:[l.jsxs("div",{ref:m,className:"container max-w-7xl mx-auto px-4",children:[l.jsxs("div",{className:F("text-center mb-8 transition-all duration-700 ease-out",p?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),children:[l.jsx("h2",{className:"text-3xl sm:text-4xl font-serif font-normal text-white mb-4",children:"Simple pricing"}),l.jsx("p",{className:"text-lg text-[#9A9A9A]",children:"Start free. Upgrade when you need more."})]}),l.jsx(z3,{isAnnual:e,onToggle:t}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 items-stretch",children:W3.map((g,w)=>l.jsx("div",{className:F("transition-all duration-700 ease-out",p?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:p?`${150+w*80}ms`:"0ms"}
386,children:l.jsx(B3,{...g,isAnnual:e,onGetStarted:y,isCurrentPlan:u&&g.name==="Professional",isCurrentInterval:u&&g.name==="Professional"&&(e&&v==="annual"||!e&&v==="monthly")})},g.name))}),l.jsxs("p",{className:"text-center text-[#9A9A9A] mt-8",children:["Need more?"," ",l.jsx("a",{href:"mailto:[email protected]",className:"text-[#5FCF8C] hover:underline",children:"Contact us"})," ","for custom volume pricing."]}),l.jsx("p",{className:"text-center text-[#9A9A9A] mt-4",children:"All plans include the same matching accuracy. No hidden fees."})]}),l.jsx(ud,{isOpen:n,onClose:()=>r(!1),mode:"signup"}),c]})})},q3=()=>{const e=f.useRef(null),[t,n]=f.useState(!1);return f.useEffect(()=>{const r=e.current;if(!r)return;const s=new IntersectionObserver(([o])=>{o.isIntersecting&&(n(!0),s.disconnect())},{threshold:.15});return s.observe(r),()=>s.disconnect()},[]),l.jsxs("section",{id:"compliance",className:"py-20 bg-[#1E1E1E] rounded-3xl mx-2 sm:mx-4 relative overflow-hidden",children:[l.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] rounded-full bg-[#5FCF8C]/[0.06] blur-[120px] pointer-events-none"}),l.jsxs("div",{className:"container max-w-4xl mx-auto px-4 text-center relative z-10",children:[l.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-[#5FCF8C]/10 mb-6",children:l.jsx(X2,{className:"w-8 h-8 text-[#5FCF8C]"})}),l.jsx("h2",{className:"text-3xl sm:text-4xl font-serif font-normal text-white mb-4",children:"Your LinkedIn account stays safe"}),l.jsx("p",{className:"text-lg text-[#9A9A9A] font-light opacity-70 mb-12 max-w-2xl mx-auto",children:"Wholio never logs into your LinkedIn. Your account stays untouched and safe."}),l.jsxs("div",{ref:e,className:"grid sm:grid-cols-3 gap-8 text-left mb-12",children:[l.jsxs("div",{className:F("space-y-3 transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:"0ms"},children:[l.jsx("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-[#5FCF8C]/10",children:l.jsx(K2,{className:"w-5 h-5 text-[#5FCF8C]"})}),l.jsx("h3",{className:"font-semibold text-white",children:"No login required"}),l.jsx("p",{className:"text-sm text-[#9A9A9A]",children:"We never ask for your LinkedIn credentials. Your account, your control."})]}),l.jsxs("div",{className:F("space-y-3 transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:t?"80ms":"0ms"},children:[l.jsx("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-[#5FCF8C]/10",children:l.jsx(Z2,{className:"w-5 h-5 text-[#5FCF8C]"})}),l.jsx("h3",{className:"font-semibold text-white",children:"Zero account risk"}),l.jsx("p",{className:"text-sm text-[#9A9A9A]",children:"Nothing we do touches your LinkedIn profile or triggers platform alerts."})]}),l.jsxs("div",{className:F("space-y-3 transition-all duration-700 ease-out",t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:t?"160ms":"0ms"},children:[l.jsx("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-[#5FCF8C]/10",children:l.jsx(Kb,{className:"w-5 h-5 text-[#5FCF8C]"})}),l.jsx("h3",{className:"font-semibold text-white",children:"Extract hundreds, risk nothing"}),l.jsx("p",{className:"text-sm text-[#9A9A9A]",children:"Process entire team pages without worrying about rate limits or flags."})]})]})]})]})},pk="/assets/saastr_europa_speakers-Du7hHS9e.webp",K3="/assets/heyreach-DIOGrFpe.svg",G3="/assets/hunter-B2mLoHEB.png",Y3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='161'%20height='35'%20viewBox='0%200%20161%2035'%2
3860fill='none'%3e%3cpath%20d='m37.3%209-.3.3a17%2017%200%200%201-3.5%203.2h.9c3.6%200%206.6%203%206.6%206.8%200%203.9-3%207-6.6%207a6%206%200%200%201-3.2-1l-1.2-.8c-2%202.7-4.5%205.3-7.5%206.8a10%2010%200%200%201-8%20.2q3%203%207.2%203.1%204.4-.1%207.2-3.2.9-1%201.4-2%202%20.9%204%20.9c5.8%200%2010.5-4.9%2010.5-11%200-4.9-3.2-9-7.5-10.4m-10.5%208.7-.1-.2-4.3%202%201.8-4.4-.2-.2-3.3%203.4-6%206.3a6%206%200%200%201-4.3%201.8%207%207%200%200%201-6.6-7c0-3.8%203-6.9%206.6-6.9q2.6.1%204.5%202%202.8-4.1%207-6.6%201.3-.8%202.8-1%202.2-.5%204.4%200l.1-.1.2-.2a9.7%209.7%200%200%200-13.6.8l-1.5%202a10%2010%200%200%200-4-.8C4.7%208.5%200%2013.4%200%2019.5s4.6%2010.8%2010.4%2010.8q4.6-.1%207.5-3.3l6.2-6.4z'%20fill='white'%3e%3c/path%3e%3cpath%20d='m36.6%209%20.2-.3c1.7-2%203.2-5%203.3-8.7a14%2014%200%200%200-10%206.3H30l-.1.3-.2.2-.1.2-.2.2-.9%201.8-4.1-.2-2.9%203.3%204%20.9-1%201.4.2.2L27%2017l.2.2.2-.1.1-.2%201-.9%201%204.2%203-3.2-.4-4v-.3l.4-.2c.7-.5%202.4-1.6%204-3.5M34%205.7q.2-1%201.2-.8.9.3.7%201.3a1%201%200%200%201-1.1.8%201%201%200%200%201-.8-1.3'%20fill='%2321ABE1'%3e%3c/path%3e%3cpath%20d='M49.5%2024.3v-11l.3-.6.5-.2H60q.3%200%20.5.2l.3.6v.9l-.3.6-.5.2h-7.2v2.6H59q.3%200%20.5.2l.3.6v.8q0%20.4-.3.6-.2.3-.5.3h-6.2v2.6H60q.3%200%20.5.2t.2.6v.9l-.2.6-.6.2h-9.5q-.3%200-.5-.2zm12.3.9q-.4%200-.5-.4l.2-.4%204.2-5.7-4-5.4-.1-.4q0-.4.4-.4h1.8q.8%200%201.4.8l2.3%203.1%202.3-3q.6-.9%201.4-1H73q.5%200%20.5.5l-.2.4-4%205.4%204.2%205.7q.3.2.2.3v.2q0%20.3-.4.3h-1.8q-.8%200-1.4-.8l-2.6-3.5-2.5%203.5q-.6.8-1.5.8zm13.4-.8v-11q0-.4.3-.7l.5-.2h6.3q5%200%205%205t-5%204.9h-4v2q0%20.3-.2.5t-.5.3H76q-.3%200-.5-.3zm3.2-4.5h3q1.4%200%202.1-.5t.7-2-.7-1.9-2.1-.5h-3zm9.4%204.5%202.1-8.5q.9-3.4%205.5-3.4h4.5q.3%200%20.5.2l.2.6v11q0%20.4-.2.7l-.6.2h-1.6q-.3%200-.5-.2l-.2-.6V22h-6l-.5%202.3q0%20.3-.4.6l-.6.2h-1.6q-.3%200-.5-.2l-.1-.4zm4.4-4.8h5.3V15H95q-.8%200-1.4.5t-.8%201.3zm10.9%204.8v-11q0-.4.2-.7l.6-.2h2.4l.6.2.6.6%205%208.3v-8.3l.2-.6.6-.2h1.4q.3%200%20.5.2l.3.6v11q0%20.4-.3.6-.2.3-.5.3h-2.8q-.3%200-.6-.3l-.6-.5-4.5-7.6v7.6q0%20.3-.3.5t-.5.3h-1.5q-.3%200-.6-.3zm14.9%200v-11q0-.4.2-.7l.6-.2h4.6q3.6%200%205.3%201.5%201.6%201.6%201.6%204.8%200%203.3-1.6%204.9-1.7%201.5-5.3%201.5h-4.6l-.6-.2zm3.1-1.7h2.2q2.2%200%203-.9.9-.9.9-3t-.8-3q-.9-.8-3-.8H121zm11.1%201.7v-11q0-.4.2-.7l.6-.2h1.5l.6.2.2.6v11q0%20.4-.2.6l-.6.3H133q-.4%200-.6-.2zm7.3-2.1q1%200%201%201.2v.6q0%20.5-.2.9-.3.3-.8.3h-1q-.6%200-.9-.3-.3-.4-.3-1v-.5q0-.6.3-.9t.8-.3zm3.1%202.1v-11q0-.4.2-.7l.6-.2h1.5q.4%200%20.6.2.3.3.2.6v11q0%20.4-.2.6-.2.3-.6.3h-1.5l-.6-.2zm16.7-.5q-1.7%201.6-5%201.6t-5-1.6-1.7-5%201.7-5%205-1.7%205%201.6%201.6%205-1.6%205m-2.3-8.2q-.9-1-2.7-1-2%200-2.7%201-.9%201-.9%203.1t.9%203.2%202.7%201%202.7-1%20.8-3.2q0-2-.8-3.1'%20fill='white'%3e%3c/path%3e%3c/svg%3e",J3="/assets/apollo-Dd_xmrPJ.png",Q3="/assets/outreach-CW4zXVbY.svg",X3=[{name:"Heyreach",logo:K3,type:"image"},{name:"Expandi",logo:Y3,type:"image"},{name:"Apollo",logo:J3,type:"image"},{name:"Hunter",logo:G3,type:"image"},{name:"Outreach",logo:Q3,type:"image"},{name:"CSV",logo:null,type:"icon"}];function Z3(){return l.jsx("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-serif font-normal text-white mb-3 leading-tight",children:"From page to prospect list in seconds."})}const eF=[{name:"Sarah K.",role:"CEO at Braze",url:"linkedin.com/in/sarah-kim..."},{name:"Marcus R.",role:"CEO at Cockroach",url:"linkedin.com/in/marcus-r..."},{name:"Anya P.",role:"CMO at Zapier",url:"linkedin.com/in/anya-pat..."},{name:"Sterling S.",role:"Founder at Bill",url:"linkedin.com/in/sterling-s..."},{name:"Jane R.",role:"Partner at Dawn Capital",url:"linkedin.com/in/jane-rod..."},{name:"Jason L.",role:"CEO at Saastr",url:"linkedin.com/in/jason-l..."}],tF=()=>l.jsx("div",{className:"w-full flex items-center justify-center lg:justify-end",children:l.jsx("div",{className:"relative w-full max-w-[260px] aspect-[1000/924] rounded-[16px] overflow-hidden shadow-xl border border-[rgba(255,255,255,0.06)] bg-[#0A0A0A] isolate",children:l.jsx("img",{src:pk,alt:"SaaStr Europa featured speakers page",className:"absolute inset-0 w-full h-full object-cover rounded-[16px]"})})}),nF=()=>{const{user:e}=Wn(),t=f.useRef(null),[n,r]=f.useState(!1),[s,o]=f.useState(!1),i=()=>{e?window.scrollTo({top:0,behavior:"smooth"}):o(!0)};return f.useEffect(()=>{const a=t.current;if(!a)return;const c=new IntersectionObserver(([u])=>{u.isIntersecting&&(r(!0),c.disconnect())},{threshold:.15});return c.observe(a),()=>c.disconnect()},[]),l.jsxs("section",{className:"pt-20 pb-32 md:pb-40 bg-[#0A0A0A] rounded-3xl mx-2 sm:mx-4",children:[l.jsxs("div",{ref:t,className:"container max-w-7xl mx-auto px-4",children:[l.jsxs("div",{className:F("text-center mb-14 lg:mb-16 transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),children:[l.jsx(Z3,{}),l.jsx("p",{className:"text-lg text-[#9A9A9A] max-w-2xl mx-auto",children:"Wholio identifies every person on a page and finds their LinkedIn profiles. Ready for your outbound stack. Note: Wholio never touches your LinkedIn, keeping your account safe."})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-3 lg:gap-0",children:[l.jsx("div",{className:F("w-full lg:w-[26%] flex-shrink-0 transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:n?"150ms":"0ms"},children:l.jsx(tF,{})}),l.jsxs("div",{className:"flex items-center justify-center flex-shrink-0 lg:mx-2",children:[l.jsx(wt,{className:"hidden lg:block w-8 h-8 text-white/70",strokeWidth:1.5}),l.jsx(qv,{className:"block lg:hidden w-8 h-8 text-white/70",strokeWidth:1.5})]}),l.jsx("div",{className:F("w-full lg:w-[40%] flex-shrink-0 transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:n?"300ms":"0ms"},children:l.jsxs(hu,{className:"overflow-hidden border-black/[0.06] bg-white shadow-2xl shadow-black/50 rounded-[16px]",children:[l.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-2 border-b border-black/[0.06] bg-[#F5F5F5]",children:[l.jsx("div",{className:"w-2 h-2 rounded-full bg-destructive/60"}),l.jsx("div",{className:"w-2 h-2 rounded-full bg-[#9A9A9A]/60"}),l.jsx("div",{className:"w-2 h-2 rounded-full bg-[#5FCF8C]/60"}),l.jsx("span",{className:"ml-2 text-[10px] text-[#8A8A8A] font-mono",children:"wholio.ai â results"})]}),l.jsxs("div",{children:[eF.map((a,c)=>l.jsxs("div",{className:`flex items-center justify-between gap-3 px-3 py-2 border-b border-black/[0.04] ${c%2===1?"bg-[#FAFAFA]":"bg-white"}`,children:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-[#0A0A0A] text-xs font-medium leading-tight",children:a.name}),l.jsx("span",{className:"text-[10px] text-[#8A8A8A] leading-tight mt-0.5",children:a.role})]}),l.jsxs("span",{className:"inline-flex items-center gap-1 font-mono text-[11px] font-semibold text-[#0A66C2] whitespace-nowrap",children:[l.jsx(Vb,{className:"w-3 h-3"}),a.url]})]},a.name)),l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-white border-t border-black/[0.06]",children:[l.jsx("span",{className:"text-[10px] text-[#8A8A8A]",children:"+ 12 more"}),l.jsx(ve,{size:"sm",className:"h-7 text-[11px] font-medium bg-[#0A0A0A] text-white hover:bg-[#1a1a1a] rounded-lg px-3",onClick:i,children:"Export URLs"})]})]})]})}),l.jsxs("div",{className:"flex items-center justify-center flex-shrink-0 lg:mx-2",children:[l.jsx(wt,{className:"hidden lg:block w-8 h-8 text-white/70",strokeWidth:1.5}),l.jsx(qv,{className:"block lg:hidden w-8 h-8 text-white/70",strokeWidth:1.5})]}),l.jsx("div",{className:F("w-full lg:w-[22%] flex-shrink-0 transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:n?"450ms":"0ms"},children:l.jsx(hu,{className:"border-white/[0.08] bg-[#141414] backdrop-blur-sm p-2.5 rounded-[16px] shadow-2xl shadow-black/50",children:l.jsxs("div",{className:"grid grid-cols-2 gap-1 place-items-center",children:[X3.filter(a=>a.type==="image").map(a=>l.jsx("div",{className:"w-[90px] h-[72px] rounded-md bg-white flex items-center justify-center",children:l.jsx("img",{src:a.logo,alt:a.name,className:"w-[76px] h-[62px] object-contain grayscale brightness-0 opacity-80"})},a.name)),l.jsx("div",{className:"w-[90px] h-[72px] rounded-md bg-white border border-black/[0.08] flex items-center justify-center",children:l.jsx("span",{className:"text-sm font-normal text-black",children:".csv / .xlsx"})})]})})})]})]}),l.jsx(ud,{isOpen:s,onClose:()=>o(!1),mode:"signup"})]})},rF=({onCtaClick:e})=>{const t=f.useRef(null),[n,r]=f.useState(!1);f.useEffect(()=>{const o=t.current;if(!o)return;const i=new IntersectionObserver(([a])=>{a.isIntersecting&&(r(!0),i.disconnect())},{threshold:.15});return i.observe(o),()=>i.disconnect()},[]);const s=()=>{e?e():window.scrollTo({top:0,behavior:"smooth"})};return l.jsx("section",{className:"py-20 bg-[#0C0C0C] rounded-3xl mx-2 sm:mx-4",children:l.jsxs("div",{ref:t,className:"container max-w-4xl mx-auto px-4 text-center",children:[l.jsx("h2",{className:F("text-3xl sm:text-4xl lg:text-5xl font-serif font-normal text-white mb-6 transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),children:"Ready to build your prospect list?"}),l.jsx("p",{className:F("text-lg sm:text-xl text-white/70 mb-8 max-w-2xl mx-auto transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:n?"150ms":"0ms"},children:"Stop wasting hours on manual research. Paste any page and get LinkedIn URLs for everyone mentioned â in seconds."}),l.jsxs("div",{className:F("transition-all duration-700 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),style:{transitionDelay:n?"300ms":"0ms"},children:[l.jsxs(ve,{variant:"cta",size:"lg",onClick:s,className:"h-14 px-8 text-lg font-semibold gap-2 rounded-xl",children:["Get started free",l.jsx(wt,{className:"w-5 h-5"})]}),l.jsx("p",{className:"mt-4 text-sm text-[rgba(255,255,255,0.45)]",children:"No credit card required ⢠Start with 100 free contacts"})]})]})})};var Vn="Accordion",sF=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[mg,oF,iF]=$u(Vn),[gd,jU]=Ht(Vn,[iF,DS]),gg=DS(),mk=T.forwardRef((e,t)=>
386{const{type:n,...r}=e,s=r,o=r;return l.jsx(mg.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(uF,{...o,ref:t}):l.jsx(cF,{...s,ref:t})})});mk.displayName=Vn;var[gk,aF]=gd(Vn),[vk,lF]=gd(Vn,{collapsible:!1}),cF=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,c]=sr({prop:n,defaultProp:r??"",onChange:s,caller:Vn});return l.jsx(gk,{scope:e.__scopeAccordion,value:T.useMemo(()=>a?[a]:[],[a]),onItemOpen:c,onItemClose:T.useCallback(()=>o&&c(""),[o,c]),children:l.jsx(vk,{scope:e.__scopeAccordion,collapsible:o,children:l.jsx(yk,{...i,ref:t})})})}),uF=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i,a]=sr({prop:n,defaultProp:r??[],onChange:s,caller:Vn}),c=T.useCallback(d=>a((h=[])=>[...h,d]),[a]),u=T.useCallback(d=>a((h=[])=>h.filter(m=>m!==d)),[a]);return l.jsx(gk,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:l.jsx(vk,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(yk,{...o,ref:t})})})}),[dF,vd]=gd(Vn),yk=T.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,a=T.useRef(null),c=De(a,t),u=oF(n),h=Qu(s)==="ltr",m=ie(e.onKeyDown,p=>{var j;if(!sF.includes(p.key))return;const b=p.target,v=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),x=v.findIndex(A=>A.ref.current===b),y=v.length;if(x===-1)return;p.preventDefault();let g=x;const w=0,_=y-1,S=()=>{g=x+1,g>_&&(g=w)},k=()=>{g=x-1,g<w&&(g=_)};switch(p.key){case"Home":g=w;break;case"End":g=_;break;case"ArrowRight":o==="horizontal"&&(h?S():k());break;case"ArrowDown":o==="vertical"&&S();break;case"ArrowLeft":o==="horizontal"&&(h?k():S());break;case"ArrowUp":o==="vertical"&&k();break}const E=g%y;(j=v[E].ref.current)==null||j.focus()});return l.jsx(dF,{scope:n,disabled:r,direction:s,orientation:o,children:l.jsx(mg.Slot,{scope:n,children:l.jsx(ye.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:m})})})}),yu="AccordionItem",[fF,vg]=gd(yu),wk=T.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=vd(yu,n),i=aF(yu,n),a=gg(n),c=xr(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return l.jsx(fF,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx($S,{"data-orientation":o.orientation,"data-state":kk(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:h=>{h?i.onItemOpen(r):i.onItemClose(r)}})})});wk.displayName=yu;var xk="AccordionHeader",bk=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=vd(Vn,n),o=vg(xk,n);return l.jsx(ye.h3,{"data-orientation":s.orientation,"data-state":kk(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});bk.displayName=xk;var pp="AccordionTrigger",_k=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=vd(Vn,n),o=vg(pp,n),i=lF(pp,n),a=gg(n);return l.jsx(mg.ItemSlot,{scope:n,children:l.jsx(jL,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...r,ref:t})})});_k.displayName=pp;var Sk="AccordionContent",Ek=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=vd(Vn,n),o=vg(Sk,n),i=gg(n);return l.jsx(NL,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ek.displayName=Sk;function kk(e){return e?"open":"closed"}var hF=mk,pF=wk,mF=bk,Ck=_k,jk=Ek;const gF=hF,Nk=f.forwardRef(({className:e,...t},n)=>l.jsx(pF,{ref:n,className:F("border-b",e),...t}));Nk.displayName="AccordionItem";const Tk=f.forwardRef(({className:e,children:t,...n},r)=>l.jsx(mF,{className:"flex",children:l.jsxs(Ck,{ref:r,className:F("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(zs,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Tk.displayName=Ck.displayName;const Rk=f.forwardRef(({className:e,children:t,...n},r)=>l.jsx(jk,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:F("pb-4 pt-0",e),children:t})}));Rk.displayName=jk.displayName;const vF=[{q:"Does Wholio log into LinkedIn or scrape it?",a:"No. Wholio never logs into LinkedIn, never asks for your LinkedIn credentials, and never automates actions on LinkedIn. It only works with public data and public search results to identify the right LinkedIn URL for each person."},{q:"What inputs does Wholio accept?",a:"Any public webpage URL, screenshots (PNG, JPG, WEBP), and PDFs up to 20MB. Common sources include company team pages, conference speaker lists, podcast guest pages, press releases, awards roundups, panel screenshots, and attendee PDFs."},{q:"What does Wholio return?",a:"For each person found, Wholio returns their name, company, role, a verified LinkedIn URL, and a confidence score. You can export the list as CSV on any plan or as Excel on Pro."},{q:"How is Wholio different from Apollo, Clay, Evaboot, or PhantomBuster?",a:"Wholio is the discovery layer upstream of those tools. Apollo and Clay require structured input like a name plus company. Evaboot and PhantomBuster require a starting point inside LinkedIn and run from the user's account. Wholio takes any unstructured webpage, screenshot, or PDF and returns verified LinkedIn URLs without LinkedIn login or automation."},{q:"How much does Wholio cost?",a:"Free includes 100 contacts per month. Pro is $59 per month and includes 1,500 contacts per month."},{q:"Do I need an account to try Wholio?",a:"No. You can paste a URL or upload a file and see the full extracted list immediately. LinkedIn URLs are unlocked after you sign in with Google or a magic link."},{q:"Is Wholio compliant with LinkedIn's terms of service?",a:"Yes. Wholio does not log into LinkedIn, does not scrape LinkedIn, and does not automate any action on the LinkedIn platform. It relies only on public search results to identify the correct public LinkedIn URL for each person."},{q:"How fast is extraction?",a:"Most pages return a fully matched LinkedIn prospect list in under a minute, with results streaming progressively as each person is identified."}],yF=()=>l.jsx("section",{id:"faq",className:"keep-light w-full py-20 md:py-28 bg-[#F3EBD8]",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-12",children:[l.jsx("p",{className:"text-sm font-medium text-black/60 uppercase tracking-wider mb-3",children:"FAQ"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-serif font-normal text-black tracking-tight",children:"Questions, answered"})]}),l.jsx(gF,{type:"single",collapsible:!0,className:"w-full",children:vF.map((e,t)=>l.jsxs(Nk,{value:`item-${t}`,className:"border-b border-black/10",children:[l.jsx(Tk,{className:"text-left text-base md:text-lg font-medium text-black hover:no-underline py-5",children:e.q}),l.jsx(Rk,{className:"text-black/70 text-base leading-relaxed pb-5",children:e.a})]},t))})]})}),wF=[{label:"B2B GTM & Sales Agencies",href:"/use-cases/agencies"},{label:"Sales & Marketing Teams",href:"/use-cases/sales-marketing"},{label:"Recruiters & Search",href:"/use-cases/recruiters"}],xF=[{label:"Wholio vs Clay",href:"/compare/wholio-vs-clay"},{label:"Wholio vs Apollo",href:"/compare/wholio-vs-apollo"},{label:"Wholio vs Evaboot",href:"/compare/wholio-vs-evaboot"},{label:"Wholio vs Sales Navigator",href:"/compare/wholio-vs-sales-navigator"},{label:"Wholio vs PhantomBuster",href:"/compare/wholio-vs-phantombuster"}],ur="text-sm text-[#9A9A9A] hover:text-white transition-colors",ec="text-sm font-medium text-white mb-3";function bF(){return l.jsx("footer",{className:"py-12 border-t border-[rgba(255,255,255,0.10)] bg-[#0C0C0C]",children:l.jsxs("div",{className:"container max-w-6xl mx-auto px-4",children:[l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 ga
386p-8",children:[l.jsx("div",{className:"col-span-2 md:col-span-3 lg:col-span-1",children:l.jsx(dt,{to:"/",className:"font-semibold text-white text-lg",children:"Wholio"})}),l.jsxs("div",{children:[l.jsx("h3",{className:ec,children:"Product"}),l.jsxs("ul",{className:"space-y-2",children:[l.jsx("li",{children:l.jsx(dt,{to:"/#pricing",className:ur,children:"Pricing"})}),l.jsx("li",{children:l.jsx(dt,{to:"/works-with",className:ur,children:"Works With"})})]})]}),l.jsxs("div",{children:[l.jsx("h3",{className:ec,children:"Use Cases"}),l.jsx("ul",{className:"space-y-2",children:wF.map(e=>l.jsx("li",{children:l.jsx(dt,{to:e.href,className:ur,children:e.label})},e.href))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:ec,children:"Compare"}),l.jsx("ul",{className:"space-y-2",children:xF.map(e=>l.jsx("li",{children:l.jsx(dt,{to:e.href,className:ur,children:e.label})},e.href))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:ec,children:"Company"}),l.jsxs("ul",{className:"space-y-2",children:[l.jsx("li",{children:l.jsx(dt,{to:"/about",className:ur,children:"About"})}),l.jsx("li",{children:l.jsx(dt,{to:"/compliance",className:ur,children:"Compliance"})}),l.jsx("li",{children:l.jsx(dt,{to:"/compliance#privacy",className:ur,children:"Privacy Notice"})}),l.jsx("li",{children:l.jsx(dt,{to:"/compliance#terms",className:ur,children:"Terms of Service"})}),l.jsx("li",{children:l.jsx(dt,{to:"/compliance#cookies",className:ur,children:"Cookie Policy"})})]})]})]}),l.jsxs("div",{className:"mt-8 pt-8 border-t border-[rgba(255,255,255,0.10)] text-center text-sm text-[#9A9A9A]",children:["© ",new Date().getFullYear()," Wholio. All rights reserved."]})]})})}const Ak={"https://reg.salesforce.com/flow/plus/tdx26/tdx26speakers/page/speakers":{targetDurationMs:3e4},"https://www.datadoghq.com/about/leadership/":{targetDurationMs:3e4},"https://hottopics.ht/awards/global-b2b-cmo-100-awards#CMO-100":{targetDurationMs:3e4}};function jf(e){return e in Ak}function _F(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function SF(e){let t=e>>>0;return()=>{t=t+1831565813>>>0;let n=t;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}function mp(e,t,n){return t+(n-t)*e()}function EF(e){const t=[[3,2],[4,3],[5,2]],n=t.reduce((s,[,o])=>s+o,0);let r=e()*n;for(const[s,o]of t)if(r-=o,r<=0)return s;return 4}function L0(e,t){const n=[];let r=0;for(;r<e.length;){const s=Math.min(EF(t),e.length-r);n.push(e.slice(r,r+s)),r+=s}return n}function M0(e,t,n,r=!1){if(e<=0)return[];const s=Array.from({length:e},()=>mp(n,.45,1.55));if(r&&e>=3&&n()<.25){const a=Math.floor(n()*e);s[a]*=1.8}const o=s.reduce((a,c)=>a+c,0),i=t/o;return s.map(a=>a*i)}async function kF(e,t){var g;const n=Ak[e];if(!n){t.onError("URL not configured for demo mode");return}const r="https://gjgbwfwumiznuzszjhqx.supabase.co",s="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdqZ2J3Znd1bWl6bnV6c3pqaHF4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njk3Nzk2NzMsImV4cCI6MjA4NTM1NTY3M30.K0uZEQ99kgFxwE9CHTQwosn8Uoge3ZRz6luEupaWC8Q";let o;try{const w=await fetch(`${r}/functions/v1/demo-cached-results`,{method:"POST",headers:{"Content-Type":"application/json",apikey:s},body:JSON.stringify({url:e})});if(!w.ok){t.onError("Could not load demo data");return}o=await w.json()}catch{t.onError("Could not load demo data");return}const i=(o.people||[]).map(w=>({...w,match_status:w.match_status==="confirmed"?"auto":w.match_status})),a=o.page_context,c=o.testimonial_people||[],u=n.targetDurationMs,d=u*.4,h=u*.6,m=SF(_F(e)),p=i.map(w=>({first_name:w.first_name,last_name:w.last_name,title_on_page:w.title_on_page,company_on_page:w.company_on_page,linkedin_url:null,confidence_score:0,match_reasoning:null,match_status:"pending",is_testimonial:w.is_testimonial})),b=L0(p,m),v=M0(Math.max(0,b.length-1),d,m);await tc(mp(m,2200,3400));for(let w=0;w<b.length;w++){w>0&&await tc(v[w-1]);const _=b.slice(0,w+1).flat();(g=t.onExtractionProgress)==null||g.call(t,{people:_,total_so_far:_.length})}t.onExtraction({page_context:a,people:p,testimonial_people:c}),await tc(mp(m,350,750));const x=L0(i,m),y=M0(Math.max(0,x.length-1),h,m,!0);for(let w=0;w<x.length;w++)w>0&&await tc(y[w-1]),t.onBatchComplete({batch_index:w,results:x[w]});t.onComplete({people:i})}function tc(e){return new Promise(t=>setTimeout(t,e))}function CF({domain:e,suggestions:t,isLoading:n,onSelectUrl:r,onSearchAnyway:s}){if(n)return l.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-muted-foreground animate-fade-in",children:[l.jsx(yn,{className:"h-4 w-4 animate-spin"}),l.jsx("span",{className:"text-sm",children:"Checking for team pages..."})]});const o=t.length>0;return l.jsxs("div",{className:"animate-fade-in rounded-xl border border-border bg-card/50 p-5 space-y-4",children:[l.jsxs("div",{className:"flex items-start gap-2.5",children:[l.jsx(G2,{className:"h-4 w-4 text-primary mt-0.5 flex-shrink-0"}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:o?"This looks like a homepage. We found these pages with people:":"This looks like a homepage â we couldn't find a team page. Try pasting a direct link to their team or about page."})]}),l.jsxs("div",{className:"space-y-2",children:[o&&t.map(i=>l.jsxs("button",{type:"button",onClick:()=>r(i.url),className:"flex items-center gap-3 w-full text-left rounded-lg border border-border bg-background/60 hover:bg-accent/50 px-4 py-3 transition-colors group",children:[l.jsx(wt,{className:"h-4 w-4 text-muted-foreground group-hover:text-foreground flex-shrink-0"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:i.label}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new URL(i.url).pathname})]})]},i.url)),l.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-3 w-full text-left rounded-lg border border-border bg-background/60 hover:bg-accent/50 px-4 py-3 transition-colors group",children:[l.jsx(Hb,{className:"h-4 w-4 text-muted-foreground group-hover:text-foreground flex-shrink-0"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Search homepage instead"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Find testimonials, quotes & mentions â useful for identifying clients"})]})]})]})]})}const jF="/assets/team_page-C7V0e-fO.png",NF="/assets/forbes_40_under_40-DrAis329.jpg",TF="/assets/ifgs_fintech_week-1CFGryWX.jpg",RF="/assets/cpo_of_the_year-D0DVIiYf.png",AF="/assets/forbes_australia-D9cTodB8.jpeg",PF="/assets/future_of_banking_panel-Bm9uUhex.jpg",OF="/assets/lennys_podcast_guests-4vkbyMC7.png",Bi=[{src:jF,alt:"Company leadership team page"},{src:OF,alt:"Lenny's Podcast guest roster"},{src:NF,alt:"Forbes 40 Under 40 list page"},{src:pk,alt:"SaaStr Europa featured speakers page"},{src:PF,alt:"Future of Banking panel speakers"},{src:RF,alt:"Product-Led Alliance CPO of the Year shortlist"},{src:TF,alt:"IFGS UK Fintech Week speakers"},{src:AF,alt:"Forbes Australia cover feature"}],IF=({onImageClick:e}={})=>{const[t,n]=f.useState(0),r=()=>n(o=>(o+1)%Bi.length),s=()=>n(o=>(o-1+Bi.length)%Bi.length);return l.jsxs("div",{className:"w-full",children:[l.jsxs("div",{className:"relative w-full max-w-md mx-auto",children:[l.jsxs("button",{type:"button",onClick:()=>{e==null||e(),r()},"aria-label":"Show next example",className:"group relative block w-full overflow-hidden rounded-2xl border border-[#0A0A0A]/[0.06] bg-white shadow-[0_20px_60px_-2
3860px_rgba(0,0,0,0.25)] cursor-pointer transition-shadow duration-200 hover:shadow-[0_24px_70px_-20px_rgba(0,0,0,0.32)]",children:[l.jsxs("div",{className:"flex items-center gap-2 px-3 h-8 bg-[#F1EEE8] border-b border-[#0A0A0A]/[0.08]",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#FF5F57]"}),l.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#FEBC2E]"}),l.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#28C840]"})]}),l.jsx("div",{className:"flex-1 flex justify-center",children:l.jsx("div",{className:"h-[18px] w-3/5 rounded-full bg-white/70 border border-[#0A0A0A]/[0.06]"})}),l.jsx("div",{className:"w-[42px]","aria-hidden":!0})]}),l.jsx("div",{className:"relative w-full aspect-[16/10] bg-[#FAFAFA]",children:Bi.map((o,i)=>l.jsx("img",{src:o.src,alt:o.alt,loading:i===0?"eager":"lazy",className:F("absolute inset-0 w-full h-full object-contain transition-opacity duration-700 ease-in-out",i===t?"opacity-100":"opacity-0")},o.src))})]}),l.jsx("button",{type:"button",onClick:s,"aria-label":"Show previous example",className:"absolute left-2 top-1/2 -translate-y-1/2 h-9 w-9 rounded-full bg-white/95 border border-black/10 shadow-md text-[#0A0A0A] flex items-center justify-center hover:bg-white hover:scale-105 transition",children:l.jsx(z2,{className:"h-5 w-5"})}),l.jsx("button",{type:"button",onClick:r,"aria-label":"Show next example",className:"absolute right-2 top-1/2 -translate-y-1/2 h-9 w-9 rounded-full bg-white/95 border border-black/10 shadow-md text-[#0A0A0A] flex items-center justify-center hover:bg-white hover:scale-105 transition",children:l.jsx(Fb,{className:"h-5 w-5"})})]}),l.jsx("div",{className:"flex items-center justify-center gap-2 mt-4",children:Bi.map((o,i)=>{const a=i===t;return l.jsx("button",{type:"button",onClick:()=>n(i),"aria-label":`Show example ${i+1}`,className:F("h-2.5 rounded-full transition-all duration-300 cursor-pointer",a?"bg-[#0A0A0A] w-6":"bg-[#0A0A0A]/40 w-2.5 hover:bg-[#0A0A0A]/70")},o.src)})})]})};function DF({attemptedUrl:e,message:t,onRetry:n,onDismiss:r,examples:s}){const[o,i]=f.useState(e);return l.jsxs("div",{className:"mx-auto max-w-2xl rounded-2xl border border-destructive/30 bg-card p-6 sm:p-8 shadow-lg space-y-6",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-destructive/10 text-destructive",children:l.jsx(rT,{className:"h-5 w-5"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"We couldn't find people on that page"}),l.jsx("p",{className:"mt-1 text-sm text-muted-foreground break-words",children:t})]}),l.jsx("button",{type:"button",onClick:r,className:"rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors","aria-label":"Dismiss",children:l.jsx(tn,{className:"h-4 w-4"})})]}),l.jsxs("form",{onSubmit:a=>{a.preventDefault(),o.trim()&&n(o.trim())},className:"space-y-2",children:[l.jsx("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Edit the URL and try again"}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[l.jsx(vs,{type:"text",value:o,onChange:a=>i(a.target.value),className:"h-11 flex-1 rounded-lg border-border bg-background text-sm",placeholder:"https://â¦"}),l.jsxs(ve,{type:"submit",size:"lg",className:"h-11 rounded-lg gap-2",disabled:!o.trim(),children:["Try again",l.jsx(wt,{className:"h-4 w-4"})]})]})]}),l.jsxs("div",{className:"space-y-3 border-t border-border pt-5",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Or try a verified demo"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(a=>l.jsx("button",{type:"button",onClick:()=>n(a.url),className:"text-xs px-3 py-1.5 rounded-full border border-border bg-card hover:bg-muted text-foreground/80 hover:text-foreground transition-colors",children:a.label},a.url))})]})]})}const fn=e=>[(e.first_name||"").toLowerCase().trim(),(e.last_name||"").toLowerCase().trim(),(e.title_on_page||"").toLowerCase().trim(),(e.company_on_page||"").toLowerCase().trim()].join("|"),LF=()=>{const e=xi(),{user:t,session:n,loading:r}=Wn(),{profile:s,usage:o,isLoading:i,refetch:a}=fE(),{toast:c}=Mu(),u=ir(),[d,h]=IO(),[m,p]=f.useState(""),[b,v]=f.useState(null),[x,y]=f.useState(null),[g,w]=f.useState(0),[_,S]=f.useState([]),[k,E]=f.useState(""),[j,A]=f.useState(!1),[O,H]=f.useState(!1),[K,J]=f.useState(!1),[U,le]=f.useState(!1),[W,X]=f.useState(null),R=f.useRef(!1),C=f.useRef(null),$=f.useRef(null),[te,Z]=f.useState(null),[ue,fe]=f.useState(null),[he,xe]=f.useState(!1),[ge,N]=f.useState(null),[I,z]=f.useState(null),[ae,Pe]=f.useState({isOpen:!1,mode:"signup"}),[je,Le]=f.useState(!1),[He,cn]=f.useState(null),[un,Mt]=f.useState(null),[qt,ys]=f.useState(!1),Sn=f.useRef(null),[Kt,Qe]=f.useState(null);f.useEffect(()=>{const q=localStorage.getItem("wholio_pre_auth_state")!==null;t&&s&&s.referral_source===null&&q&&ys(!0)},[t,s]),t&&s&&(s.referral_source!==null||localStorage.getItem("wholio_pre_auth_state")),f.useEffect(()=>{u.key!=="default"&&W&&(X(null),p(""),S([]),H(!1),J(!1),xe(!1),Z(null),N(null),C.current=null,$.current&&(clearInterval($.current),$.current=null))},[u.key]),f.useEffect(()=>()=>{$.current&&(clearInterval($.current),$.current=null)},[]),f.useEffect(()=>{const L=d.get("url");L&&(p(L),v(L),d.delete("url"),h(d,{replace:!0}))},[d]),f.useEffect(()=>{if(r||!t||U||qt)return;const L=u.state,q=localStorage.getItem("wholio_pre_auth_state");let M=null,Y=0;
386if(L!=null&&L.pendingResults)M=L.pendingResults,Y=L.timestamp||0,window.history.replaceState({},"");else if(q){try{const oe=JSON.parse(q);M=oe.pendingResults,Y=oe.timestamp||0}catch{}localStorage.removeItem("wholio_pre_auth_state")}if(!M||(le(!0),Date.now()-Y>=30*60*1e3))return;const ne=M.people||[],B=M.pageContext;X({people:ne,testimonialPeople:M.testimonialPeople||[],pageContext:B}),M.searchUrl&&p(M.searchUrl);const G=ne.filter(oe=>(oe.match_status==="pending"||oe.match_status==="locked"||oe.locked===!0)&&!oe.linkedin_url);G.length>0?(H(!0),c({description:`Restoring search â matching ${G.length} peopleâ¦`}),up(G.map(oe=>({first_name:oe.first_name,last_name:oe.last_name,title_on_page:oe.title_on_page,company_on_page:oe.company_on_page})),B,n==null?void 0:n.access_token).then(oe=>{if(oe.success&&oe.people){const Ee=new Map(oe.people.map(re=>[fn(re),re]));X(re=>re&&{...re,people:re.people.map(be=>Ee.get(fn(be))||be)})}H(!1)}).catch(oe=>{console.error("Post-restore matching failed:",oe),H(!1)})):(ne.filter(Ee=>Ee.linkedin_url&&Ee.confidence_score>=60).length>0&&(n!=null&&n.access_token)&&Z5(ne,B,M.searchUrl,n.access_token).then(()=>{a()}).catch(Ee=>{console.error("Failed to persist restored search:",Ee)}),c({description:"Your search results have been restored"}))},[t,r,U,qt,c,u.state]);const to=f.useRef(!1);f.useEffect(()=>{if(!t||!(n!=null&&n.access_token)||!W||to.current)return;const L=W.people.filter(q=>q.locked===!0||q.match_status==="locked");L.length!==0&&(to.current=!0,H(!0),c({description:`Revealing ${L.length} LinkedIn URLsâ¦`}),up(L.map(q=>({first_name:q.first_name,last_name:q.last_name,title_on_page:q.title_on_page,company_on_page:q.company_on_page})),W.pageContext,n.access_token).then(q=>{if(q.success&&q.people){const M=new Map(q.people.map(Y=>[fn(Y),Y]));X(Y=>Y&&{...Y,people:Y.people.map(ne=>M.get(fn(ne))||ne)})}H(!1),a()}).catch(q=>{console.error("Post-auth URL reveal failed:",q),H(!1)}))},[t,n,W]);const En=f.useCallback((L,q)=>L.linkedin_url&&q.some(M=>M.linkedin_url&&M.linkedin_url===L.linkedin_url)?!0:q.some(M=>M.first_name.toLowerCase()===L.first_name.toLowerCase()&&M.last_name.toLowerCase()===L.last_name.toLowerCase()&&(M.company_on_page||"").toLowerCase()===(L.company_on_page||"").toLowerCase()),[]),Ie=f.useCallback((L,q,M=!1,Y)=>{let ne=null;return{onSearchCreated:B=>{console.log("[Stream] Search created:",B),C.current=B,fe(B)},onRedirect:B=>{console.log("[Stream] Redirect:",B.original_url,"â",B.redirect_url),p(B.redirect_url),c({description:B.message})},onExtractionProgress:B=>{B.people.length>0&&(R.current=!0),X(G=>{if(!G)return{people:B.people,testimonialPeople:[],pageContext:void 0};const oe=new Set(G.people.map(be=>`${be.first_name}|${be.last_name}`.toLowerCase())),Ee=new Set(G.people.filter(be=>be.linkedin_url).map(be=>be.linkedin_url)),re=B.people.filter(be=>!oe.has(`${be.first_name}|${be.last_name}`.toLowerCase())&&!(be.linkedin_url&&Ee.has(be.linkedin_url)));return re.length===0?G:{...G,people:[...G.people,...re]}})},onExtraction:B=>{M?(X(G=>{if(!G)return G;
386const oe=G.people,Ee=B.people.filter(qe=>!En(qe,oe)),re=B.testimonial_people.filter(qe=>!G.testimonialPeople.some(Me=>Me.first_name.toLowerCase()===qe.first_name.toLowerCase()&&Me.last_name.toLowerCase()===qe.last_name.toLowerCase())),be=B.people.length-Ee.length;return be>0&&c({description:`Found ${Ee.length} new people, ${be} duplicates skipped`}),{people:[...oe,...Ee],testimonialPeople:[...G.testimonialPeople,...re],pageContext:G.pageContext}}),J(!1),H(!0)):(A(!1),H(!0),X(G=>{const oe=B.people;if(G&&G.people.length>0){const be={people:oe.map(qe=>{const Me=fn(qe),ct=G.people.find(Ei=>fn(Ei)===Me);return ct&&ct.match_status!=="pending"?{...qe,...ct}:qe}),testimonialPeople:B.testimonial_people,pageContext:B.page_context};return ne=be,be}const Ee={people:oe,testimonialPeople:B.testimonial_people,pageContext:B.page_context};return ne=Ee,Ee}))},onBatchComplete:B=>{console.log(`[Stream] batch_complete #${B.batch_index}: ${B.results.length} results`,B.results.map(G=>`${G.first_name} ${G.last_name} â ${G.match_status}`)),X(G=>{if(!G)return G;const oe=G.people.map(re=>{const be=fn(re),qe=B.results.find(Me=>fn(Me)===be);return qe?{...re,linkedin_url:qe.linkedin_url,confidence_score:qe.confidence_score,match_reasoning:qe.match_reasoning,match_status:qe.match_status,runner_up:qe.runner_up}:re}),Ee={...G,people:oe};return ne=Ee,Ee})},onComplete:B=>{var oe,Ee;if(console.log(`[Stream] onComplete called â has final data: ${!!((oe=B==null?void 0:B.people)!=null&&oe.length)}, count: ${((Ee=B==null?void 0:B.people)==null?void 0:Ee.length)??0}`),B!=null&&B.people&&B.people.length>0){console.log(`[Stream] Final results: ${B.people.filter(re=>re.match_status!=="pending"&&re.match_status!=="locked").length} matched, ${B.people.filter(re=>re.match_status==="pending").length} pending, ${B.people.filter(re=>re.match_status==="locked").length} locked`),X(re=>{if(!re)return re;const qe=re.people.map(Me=>{const ct=fn(Me);return B.people.find(yd=>fn(yd)===ct)||Me}).map(Me=>Me.match_status==="pending"?{...Me,match_status:"none",confidence_score:0}:Me);return ne={...re,people:qe},{...re,people:qe}}),H(!1),J(!1),Y&&!M&&N((Date.now()-Y)/1e3),t&&a(),!t&&ne&&localStorage.setItem("pendingSearchResults",JSON.stringify({people:ne.people.map(re=>({first_name:re.first_name,last_name:re.last_name,company_on_page:re.company_on_page,title_on_page:re.title_on_page,linkedin_url:re.linkedin_url,confidence_score:re.confidence_score,match_status:re.match_status,match_reasoning:re.match_reasoning})),testimonialPeople:ne.testimonialPeople,pageContext:ne.pageContext,searchUrl:L,timestamp:Date.now()}));return}const G=C.current;X(re=>{if(!re)return re;const be=re.people.some(ct=>ct.match_status==="pending"),qe=re.people.filter(ct=>ct.match_status==="pending").length,Me=re.people.length;if(console.log(`[Stream] onComplete fallback check â pending:${qe}/${Me}, searchId:${G}, user:${!!t}`),be&&G&&t){console.log("[Polling] SSE stream ended with pending people, starting polling fallback for search:",G),xe(!0);let ct=0,Ei=0;$.current&&clearInterval($.current);const yd=Date.now();$.current=setInterval(async()=>{try{const{data:Ar,error:Pk}=await Re.from("contacts").select("*").eq("search_id",G);if(Pk||!Ar||Ar.length===0){ct++,ct>=5&&(console.log("[Polling] No results after 5 polls, stopping"),clearInterval($.current),$.current=null,xe(!1),H(!1),Y&&!M&&N((Date.now()-Y)/1e3),t&&a());return}X(dn=>{if(!dn)return dn;const ki=dn.people.map(hl=>{const Ok=fn(hl),Ci=Ar.find(pl=>fn({first_name:pl.first_name,last_name:pl.last_name,title_on_page:pl.title_on_page,company_on_page:pl.company_on_page})===Ok);return Ci&&hl.match_status==="pending"?{...hl,linkedin_url:Ci.linkedin_url,confidence_score:Ci.confidence_score??0,match_reasoning:Ci.match_reasoning,match_status:Ci.match_status||"none"}:hl});return{...dn,people:ki}});const wd=Ar.filter(dn=>dn.match_status&&dn.match_status!=="pending").length;wd===Ei?ct++:(ct=0,Ei=wd);const yg=Ar.length>0&&wd>=Ar.length,wg=Date.now()-yd>18e4,xg=ct>=5;(yg||wg||xg)&&(console.log(`[Polling] Stopping â resolved:${yg} timeout:${wg} stale:${xg}`),clearInterval($.current),$.current=null,xe(!1),H(!1),J(!1),Y&&!M&&N((Date.now()-Y)/1e3),t&&a(),X(dn=>dn&&{...dn,people:dn.people.map(ki=>ki.match_status==="pending"?{...ki,match_status:"none",confidence_score:0}:ki)}))}catch(Ar){console.error("[Polling] Error:",Ar)}},4e3)}else return{...re,people:re.people.map(ct=>ct.match_status==="pending"?{...ct,match_status:"none",confidence_score:0}:ct)};return re}),X(re=>{if(!re)return re;const be=re.people.some(Me=>Me.match_status==="pending"),qe=C.current;return be&&qe&&t||(H(!1),J(!1),Y&&!M&&N((Date.now()-Y)/1e3),t&&a(),!t&&ne&&localStorage.setItem("pendingSearchResults",JSON.stringify({people:ne.people.map(Me=>({first_name:Me.first_name,last_name:Me.last_name,company_on_page:Me.company_on_page,title_on_page:Me.title_on_page,linkedin_url:Me.linkedin_url,confidence_score:Me.confidence_score,match_status:Me.match_status,match_reasoning:Me.match_reasoning})),testimonialPeople:ne.testimonialPeople,pageContext:ne.pageContext,searchUrl:L,timestamp:Date.now()}))),re})},onError:B=>{if(A(!1),H(!1),J(!1),B.toLowerCase().includes("limit")||B.includes("QUOTA"))X(null),Le(!0);else{let G=!1;X(oe=>oe&&oe.people.length>0?(G=!0,oe):null),G||Mt({url:L||"",message:B}),c({title:"Error",description:B,variant:"destructive"})}},onQuotaPaused:B=>{console.log(`[Stream] Quota paused: matched ${B.matched_count}/${B.total_extracted}, ${B.remaining_locked} locked`),cn({remainingLocked:B.remaining_locked}),Le(!0),c({description:`Matched ${B.matched_count} of ${B.total_extracted} people. Upgrade to unlock ${B.remaining_locked} more.`})}}},[t,n,c,En,a]),$t=f.useRef(null),_t=f.useCallback(async(L,q=!1)=>{var B;if(t&&(o!=null&&o.isAtLimit)){Le(!0);return}const M=typeof L=="string"&&L.trim()?L:m;if(!M.trim()){c({title:"Hmm, that doesn't look right",description:"Please check the link and paste again.",variant:"destructive"});return}if(!du(M)&&Bs(M)){await((B=$t.current)==null?void 0:B.call($t,M));return}const Y=ap(M);if(!Y){c({title:"Hmm, that doesn't look right",description:"Please check the link and paste again.",variant:"destructive"});return}if(M5(Y)&&!q&&!jf(Y)){Qe({isChecking:!0,suggestions:[],domain:"",originalUrl:Y});try{const G=new URL(Y).hostname.replace(/^www\./,"");Qe(be=>be?{...be,domain:G}:null);const{data:oe,error:Ee}=await Re.functions.invoke("scan-team-pages",{body:{url:Y}}),re=(oe==null?void 0:oe.suggestedPages)||[];Qe(be=>be?{...be,isChecking:!1,suggestions:re}:null),sessionStorage.setItem("wholio_homepage_suggestions",JSON.stringify({domain:G,suggestions:re}))}catch{const G=new URL(Y).hostname.replace(/^www\./,"");Qe({isChecking:!1,suggestions:[],domain:G,originalUrl:Y})}return}Qe(null),sessionStorage.removeItem("wholio_homepage_suggestions"),Mt(null);const ne=Date.now();if(y(null),C.current=null,xe(!1),$.current&&(clearInterval($.current),$.current=null),A(!0),X({people:[],testimonialPeople:[],pageContext:void 0}),Z(ne),N(null),z(Y),jf(Y)&&!t){try{await kF(Y,Ie(Y,!1,!1,ne))}catch(G){console.error("Error in simulated demo:",G),A(!1),H(!1),X(null),Mt({url:Y,message:"Something went wrong loading this demo. Please try another."}),c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}return}try{await v0(Y,Ie(Y,!1,!1,ne),!1,n==null?void 0:n.access_token)}catch(G){console.error("Error analyzing URL:",G),A(!1),H(!1);let oe=!1;X(Ee=>Ee&&Ee.people.length>0?(oe=!0,Ee):null),oe||Mt({url:Y,message:"Something went wrong. Please try again."}),R.current||c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}},[t,n,o,m,c,Ie]);f.useEffect(()=>{if(b){const L=b;v(null),_t(L,!0)}},[b,_t]);const Tr=f.useRef(!1);f.useEffect(()=>{var q;if(Tr.current)return;const L=sessionStorage.getItem("wholio_pending_upload");if(L){Tr.current=!0,sessionStorage.removeItem("wholio_pending_upload");try{const M=JSON.parse(L);if(!((q=M==null?void 0:M.files)!=null&&q.length)||M.ts&&Date.now()-M.ts>5*60*1e3)return;const Y=M.files.map(ne=>{const B=atob(ne.data),G=new Uint8Array(B.length);for(let oe=0;oe<B.length;
386oe++)G[oe]=B.charCodeAt(oe);return new File([G],ne.name,{type:ne.type})});S(Y),Rr(Y)}catch(M){console.error("Failed to restore pending upload:",M)}}},[]);const ar=f.useRef(!1);f.useEffect(()=>{if(ar.current)return;const L=sessionStorage.getItem(p0);if(L){ar.current=!0,sessionStorage.removeItem(p0);try{const q=JSON.parse(L);if(!(q!=null&&q.text)||q.ts&&Date.now()-q.ts>5*60*1e3)return;E(q.text),Gt(q.text)}catch(q){console.error("Failed to restore pending text:",q)}}},[]);const Si=L=>{Qe(null),p(L),_t(L,!0)},no=()=>{if(Kt!=null&&Kt.originalUrl){const L=Kt.originalUrl;Qe(null),_t(L,!0)}},Rr=async L=>{const q=L??_;if(q.length===0)return;if(t&&(o!=null&&o.isAtLimit)){Le(!0);return}const M=q.length===1&&q[0].type==="application/pdf",Y=q.length>0&&q.every(B=>B.type.startsWith("image/")),ne=Date.now();A(!0),X({people:[],testimonialPeople:[],pageContext:void 0}),Z(ne),N(null);try{const B=Ie(void 0,M,!1,ne);if(M){const G=await Jl(q[0]);await w0(G,B,n==null?void 0:n.access_token)}else if(Y){const G=await Promise.all(q.map(oe=>Jl(oe)));await y0(G,B,n==null?void 0:n.access_token)}}catch(B){console.error("Error analyzing file(s):",B),A(!1),H(!1),X(G=>G&&G.people.length>0?G:null),R.current||c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}},Gt=async L=>{const{text:q}=Ba(L??k);if(!fu(q))return;if(t&&(o!=null&&o.isAtLimit)){Le(!0);return}const M=Date.now();A(!0),X({people:[],testimonialPeople:[],pageContext:void 0}),Z(M),N(null);try{const Y=Ie(void 0,!1,!1,M);await x0(q,Y,n==null?void 0:n.access_token)}catch(Y){console.error("Error analyzing pasted text:",Y),A(!1),H(!1),X(ne=>ne&&ne.people.length>0?ne:null),R.current||c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}};$t.current=Gt;const ro=async L=>{if(t&&(o!=null&&o.isAtLimit)){Le(!0);return}if(!du(L)&&Bs(L)){await lt(L);return}const q=ap(L);if(!q){c({title:"Hmm, that doesn't look right",description:"Please check the link and paste again.",variant:"destructive"});return}J(!0);try{await v0(q,Ie(q,!1,!0),void 0,n==null?void 0:n.access_token)}catch(M){console.error("Error adding URL:",M),J(!1),c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}},lt=async L=>{const{text:q}=Ba(L);if(fu(q)){if(t&&(o!=null&&o.isAtLimit)){Le(!0);return}J(!0);try{await x0(q,Ie(void 0,!1,!0),n==null?void 0:n.access_token)}catch(M){console.error("Error adding pasted text:",M),J(!1),c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}}},P=async L=>{if(L.length===0)return;if(t&&(o!=null&&o.isAtLimit)){Le(!0);return}const q=L.length===1&&L[0].type==="application/pdf";J(!0);try{const M=Ie(void 0,q,!0);if(q){const Y=await Jl(L[0]);await w0(Y,M,n==null?void 0:n.access_token)}else{const Y=await Promise.all(L.map(ne=>Jl(ne)));await y0(Y,M,n==null?void 0:n.access_token)}}catch(M){console.error("Error adding files:",M),J(!1),c({title:"Error",description:"Something went wrong. Please try again.",variant:"destructive"})}},Q=f.useCallback(()=>{const L=W?{people:W.people.map(M=>({first_name:M.first_name,last_name:M.last_name,company_on_page:M.company_on_page,title_on_page:M.title_on_page,linkedin_url:M.linkedin_url,confidence_score:M.confidence_score,match_status:M.match_status,match_reasoning:M.match_reasoning,runner_up:M.runner_up})),testimonialPeople:W.testimonialPeople,pageContext:W.pageContext,searchUrl:m,timestamp:Date.now()}:null,q={redirectPath:window.location.pathname+window.location.search,pendingResults:L,timestamp:Date.now()};localStorage.setItem("wholio_pre_auth_state",JSON.stringify(q)),localStorage.removeItem("pendingSearchResults")},[W,m]),ee=f.useCallback(async()=>{Q(),aE({showDashboardGate:!1});const L=await lE.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});L.redirected||L.error||rg()},[Q]),de=()=>{Pe({isOpen:!0,mode:"signup"})},Ae=f.useCallback(L=>{p(L),y(null),_t(L,!0)},[_t]),Ce=()=>{X(null),R.current=!1,p(""),S([]),E(""),H(!1),J(!1),Z(null),N(null),fe(null),z(null),Mt(null)};return l.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[l.jsx(FO,{path:"/",title:"Extract LinkedIn Profiles from Any Webpage or PDF | Wholio",description:"Turn any webpage, screenshot, or PDF into a LinkedIn prospect list. Wholio finds people and matches them to their LinkedIn profiles instantly."}),l.jsx(UO,{data:[zO,BO,WO([{question:"Does Wholio log into LinkedIn or scrape it?",answer:"No. Wholio never logs into LinkedIn, never asks for your LinkedIn credentials, and never automates actions on LinkedIn. It only works with public data and public search results to identify the right LinkedIn URL for each person."},{question:"What inputs does Wholio accept?",answer:"Any public webpage URL, screenshots (PNG, JPG, WEBP), and PDFs up to 20MB. Common sources include company team pages, conference speaker lists, podcast guest pages, press releases, awards roundups, panel screenshots, and attendee PDFs."},{question:"What does Wholio return?",answer:"For each person found, Wholio returns their name, company, role, a verified LinkedIn URL, and a confidence score. You can export the list as CSV on any plan or as Excel on Pro."},{question:"How is Wholio different from Apollo, Clay, Evaboot, or PhantomBuster?",answer:"Wholio is the discovery layer upstream of those tools. Apollo and Clay require structured input like a name plus company. Evaboot and PhantomBuster require a starting point inside LinkedIn and run from the user's account. Wholio takes any unstructured webpage, screenshot, or PDF and returns verified LinkedIn URLs without LinkedIn login or automation."},{question:"How much does Wholio cost?",answer:"Free includes 100 contacts per month. Pro is $59 per month and includes 1,500 contacts per month."},{question:"Do I need an account to try Wholio?",answer:"No. You can paste a URL or upload a file and see the full extracted list immediately. LinkedIn URLs are unlocked after you sign in with Google or a magic link."},{question:"Is Wholio compliant with LinkedIn's terms of service?",answer:"Yes. Wholio does not log into LinkedIn, does not scrape LinkedIn, and does not automate any action on the LinkedIn platform. It relies only on public search results to identify the correct public LinkedIn URL for each person."},{question:"How fast is extraction?",answer:"Most pages return a fully matched LinkedIn prospect list in under a minute, with results streaming progressively as each person is identified."}])]}),l.jsx(L5,{}),l.jsx("main",{className:`flex-1 ${W||un?"flex items-center justify-center px-4 pt-10 pb-20":"pt-4 pb-10"}`,children:l.jsx("div",{className:`w-full mx-auto ${W||un?"max-w-5xl space-y-10 animate-fade-in":""}`,children:un&&!W?l.jsx(DF,{attemptedUrl:un.url,message:un.message,onRetry:L=>{Mt(null),p(L),_t(L,!0)},onDismiss:Ce,examples:[{label:"Team page â Datadog leadership",url:"https://www.datadoghq.com/about/leadership/"},{label:"Awards â HotTopics B2B CMO 100",url:"https://hottopics.ht/awards/global-b2b-cmo-100-awards#CMO-100"},{label:"Conference â Salesforce TDX",url:"https://reg.salesforce.com/flow/plus/tdx26
386/tdx26speakers/page/speakers"}]}):W?l.jsxs("div",{className:"space-y-6",children:[l.jsx(S3,{people:W.people,testimonialPeople:W.testimonialPeople,pageContext:W.pageContext,isLoggedIn:!!t,onSignUp:de,onGoogleSignIn:ee,onEmailSignIn:de,isStreaming:O,isExtracting:j,onAddUrl:ro,onAddFiles:P,onAddText:lt,isAddingMore:K,searchDuration:ge,usageUsed:o==null?void 0:o.used,usageLimit:o==null?void 0:o.limit,sourceUrl:I||m||void 0,searchId:ue||void 0,isDemo:jf(I||m||""),onNewSearch:L=>{Ce(),window.scrollTo({top:0,behavior:"smooth"}),p(L),_t(L,!0)},onPeopleChange:L=>X(q=>q&&{...q,people:L(q.people)})}),l.jsx("div",{className:"text-center",children:l.jsx(ve,{variant:"ghost",onClick:()=>{t?e("/dashboard?tab=search"):(Ce(),window.scrollTo({top:0,behavior:"smooth"}))},children:"â Search another page"})})]}):l.jsx("section",{className:"hero-light mx-2 sm:mx-4 rounded-3xl bg-[#F3EBD8] px-4 sm:px-8 pt-12 pb-20 sm:pt-16 sm:pb-24 animate-fade-in",children:l.jsxs("div",{className:"max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-5 gap-10 lg:gap-12 items-start",children:[l.jsxs("div",{className:"lg:col-span-3 space-y-10",children:[l.jsxs("div",{className:"text-left space-y-6",children:[l.jsx("h1",{className:"font-serif font-normal text-4xl sm:text-5xl lg:text-6xl tracking-tight text-[#0A0A0A] leading-[1.05]",children:l.jsx("span",{children:"Paste any page with people on it. Get everyone's LinkedIn. No scraping."})}),l.jsx("p",{className:"text-lg text-[#5A5448] max-w-2xl",children:"Paste a URL, screenshot, or PDF. Get every person's LinkedIn in seconds, ready to export to HeyReach, Expandi, or your CRM. No LinkedIn login, no risk to your account."})]}),l.jsx("div",{ref:Sn,children:l.jsx(U5,{url:m,onUrlChange:L=>{p(L),Qe(null)},onUrlSubmit:L=>_t(L),files:_,onFilesChange:S,onFilesSubmit:Rr,pastedText:k,onPastedTextChange:L=>{E(L),Qe(null)},onPastedTextSubmit:()=>Gt(),examplePreviewDomain:x,onExampleClick:Ae,pulseTrigger:g})}),Kt&&l.jsx(CF,{domain:Kt.domain,suggestions:Kt.suggestions,isLoading:Kt.isChecking,onSelectUrl:Si,onSearchAnyway:no})]}),l.jsx("div",{className:"lg:col-span-2 lg:pt-14",children:l.jsx(IF,{onImageClick:()=>w(L=>L+1)})})]})})})}),!W&&!un&&l.jsxs(l.Fragment,{children:[l.jsx(nF,{}),l.jsx(U3,{}),l.jsx($3,{onCtaClick:()=>{var L;t?(L=Sn.current)==null||L.scrollIntoView({behavior:"smooth",block:"center"}):Pe({isOpen:!0,mode:"signup"})}}),l.jsx(q3,{}),l.jsx(H3,{}),l.jsx(rF,{onCtaClick:()=>{var L;return(L=Sn.current)==null?void 0:L.scrollIntoView({behavior:"smooth",block:"center"})}}),l.jsx(yF,{})]}),l.jsx(bF,{}),l.jsx(ud,{isOpen:ae.isOpen,onClose:()=>Pe({...ae,isOpen:!1}),mode:ae.mode}),l.jsx(WE,{isOpen:je,onClose:()=>{Le(!1),cn(null)},currentUsage:o==null?void 0:o.used,limit:o==null?void 0:o.limit,remainingLocked:He==null?void 0:He.remainingLocked}),t&&qt&&l.jsx(I3,{isOpen:qt,userId:t.id,onComplete:()=>{ys(!1),le(!1),a()}})]})},Nf="pk_live_51TWI2EQ8AOnfCu8YNnXSiZO3mhOxBvCDpkvwseTidPqQ95uNftwbfdrVpCiJoi8S60GBEcJqusoJpzVCUTApREZI00WxqAfQTF";function MF(){return Nf!=null&&Nf.startsWith("pk_test_")?l.jsxs("div",{className:"w-full bg-orange-100 border-b border-orange-300 px-4 py-2 text-center text-sm text-orange-800",children:["All payments made in the preview are in test mode."," ",l.jsx("a",{href:"https://docs.lovable.dev/features/payments#test-and-live-environments",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"Read more"})]}):null}const $F=f.lazy(()=>Je(()=>import("./Dashboard-CHQQl4TL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),FF=f.lazy(()=>Je(()=>import("./Settings-C7y3Lb5o.js"),__vite__mapDeps([10,1,8,11]))),UF=f.lazy(()=>Je(()=>import("./SearchDetail-iX31ufzI.js"),__vite__mapDeps([12,1,11,6,5]))),zF=f.lazy(()=>Je(()=>import("./SearchHistory-DN3qXox_.js"),__vite__mapDeps([13,1,3,4,5,6,11]))),BF=f.lazy(()=>Je(()=>import("./AuthCallback-Bth8lwaX.js"),__vite__mapDeps([14,1]))),WF=f.lazy(()=>Je(()=>import("./NotFound-CgU6hWbJ.js"),__vite__mapDeps([15,16]))),VF=f.lazy(()=>Je(()=>import("./Admin-C0rhUkzI.js"),__vite__mapDeps([17,18,19,7,2,5,20,21,1,22]))),HF=f.lazy(()=>Je(()=>import("./AdminUserDetail-DXqMYRzp.js"),__vite__mapDeps([23,4,5,6,1,11,20]))),qF=f.lazy(()=>Je(()=>import("./AdminSearchDetail-Cxg75T3C.js"),__vite__mapDeps([24,1,11,6,5]))),KF=f.lazy(()=>Je(()=>import("./AdminComp-ZlYXIClQ.js"),__vite__mapDeps([25,1,11,22,5]))),GF=f.lazy(()=>Je(()=>import("./Recruiters-Dgl6APvQ.js"),__vite__mapDeps([26,27,28,29,30,6,31]))),YF=f.lazy(()=>Je(()=>
386import("./Agencies-B6MFrr-c.js"),__vite__mapDeps([32,27,28,2,30,18,9]))),JF=f.lazy(()=>Je(()=>import("./SalesMarketing-CTZiIstJ.js"),__vite__mapDeps([33,27,18,2,28,29,34,19]))),QF=f.lazy(()=>Je(()=>import("./WholioVsClay-kZPoh3YD.js"),__vite__mapDeps([35,27,21,36]))),XF=f.lazy(()=>Je(()=>import("./WholioVsSalesNavigator-xxksP8PO.js"),__vite__mapDeps([37,27,34,18]))),ZF=f.lazy(()=>Je(()=>import("./WholioVsPhantomBuster-LoUxHSSL.js"),__vite__mapDeps([38,27,34,31,6,36]))),eU=f.lazy(()=>Je(()=>import("./WholioVsApollo-B2Bly--M.js"),__vite__mapDeps([39,27,21,36]))),tU=f.lazy(()=>Je(()=>import("./WholioVsEvaboot-C87ballW.js"),__vite__mapDeps([40,27,21,6]))),nU=f.lazy(()=>Je(()=>import("./Integrations-UlvhU4Ng.js"),__vite__mapDeps([41,27,9]))),rU=f.lazy(()=>Je(()=>import("./Compliance-D2NRXKh0.js"),__vite__mapDeps([42,36]))),sU=f.lazy(()=>Je(()=>import("./About-D9CJAIlY.js"),__vite__mapDeps([43,16,6,28]))),oU=f.lazy(()=>Je(()=>import("./CheckoutReturn-DzhoXSP3.js"),__vite__mapDeps([44,1,36]))),iU=new AP,aU=({children:e})=>{const t=xi(),{user:n}=Wn(),[r,s]=f.useState(()=>i0());return f.useEffect(()=>{const o=()=>s(i0());window.addEventListener(a0,o),window.addEventListener("storage",o);const i=window.setInterval(o,1e3);return()=>{window.removeEventListener(a0,o),window.removeEventListener("storage",o),window.clearInterval(i)}},[]),f.useEffect(()=>{if(!r||!n)return;const o=r.path;ui(),s(null),t(o,{replace:!0})},[r,n,t]),r?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:l.jsx(yn,{className:"h-8 w-8 animate-spin text-primary"})}):l.jsx(l.Fragment,{children:e})},lU=()=>l.jsx(OP,{client:iU,children:l.jsxs(aP,{children:[l.jsx(UT,{}),l.jsx(yR,{}),l.jsxs(RO,{children:[l.jsx(DO,{}),l.jsx(MO,{}),l.jsx(MF,{}),l.jsx(aU,{children:l.jsx(f.Suspense,{fallback:null,children:l.jsxs(_O,{children:[l.jsx(We,{path:"/",element:l.jsx(LF,{})}),l.jsx(We,{path:"/dashboard",element:l.jsx($F,{})}),l.jsx(We,{path:"/settings",element:l.jsx(FF,{})}),l.jsx(We,{path:"/dashboard/search/:searchId",element:l.jsx(UF,{})}),l.jsx(We,{path:"/dashboard/history",element:l.jsx(zF,{})}),l.jsx(We,{path:"/auth/callback",element:l.jsx(BF,{})}),l.jsx(We,{path:"/use-cases/recruiters",element:l.jsx(GF,{})}),l.jsx(We,{path:"/use-cases/agencies",element:l.jsx(YF,{})}),l.jsx(We,{path:"/use-cases/sales-marketing",element:l.jsx(JF,{})}),l.jsx(We,{path:"/compare/wholio-vs-clay",element:l.jsx(QF,{})}),l.jsx(We,{path:"/compare/wholio-vs-sales-navigator",element:l.jsx(XF,{})}),l.jsx(We,{path:"/compare/wholio-vs-phantombuster",element:l.jsx(ZF,{})}),l.jsx(We,{path:"/compare/wholio-vs-apollo",element:l.jsx(eU,{})}),l.jsx(We,{path:"/compare/wholio-vs-evaboot",element:l.jsx(tU,{})}),l.jsx(We,{path:"/works-with",element:l.jsx(nU,{})}),l.jsx(We,{path:"/compliance",element:l.jsx(rU,{})}),l.jsx(We,{path:"/about",element:l.jsx(sU,{})}),l.jsx(We,{path:"/checkout/return",element:l.jsx(oU,{})}),l.jsx(We,{path:"/admin",element:l.jsx(VF,{})}),l.jsx(We,{path:"/admin/comp",element:l.jsx(KF,{})}),l.jsx(We,{path:"/admin/user/:userId",element:l.jsx(HF,{})}),l.jsx(We,{path:"/admin/user/:userId/search/:searchId",element:l.jsx(qF,{})}),l.jsx(We,{path:"*",element:l.jsx(WF,{})})]})})})]})]})}),cU=Node.prototype.removeChild;Node.prototype.removeChild=function(e){return e.parentNode!==this?(console.warn("removeChild: node not a child â likely a browser extension conflict"),e):cU.call(this,e)};ob(document.getElementById("root")).render(l.jsx(fb,{children:l.jsx(lU,{})}));export{Fb as $,V3 as A,cp as B,hu as C,fS as D,Bb as E,wt as F,dg as G,dt as H,vs as I,xi as J,Mu as K,yn as L,ap as M,Jl as N,Ba as O,hp as P,fu as Q,p0 as R,Hb as S,rT as T,Kb as U,pE as V,hE as W,tn as X,qb as Y,Bs as Z,Je as _,z5 as a,k_ as a$,Wb as a0,Ah as a1,Ht as a2,Xu as a3,Qu as a4,sr as a5,xr as a6,ye as a7,c1 as a8,u1 as a9,nr as aA,B2 as aB,zs as aC,aP as aD,mU as aE,gU as aF,lP as aG,dU as aH,fi as aI,Mb as aJ,T as aK,tt as aL,sT as aM,xE as aN,sg as aO,$u as aP,Vu as aQ,C_ as aR,Ja as aS,f1 as aT,n1 as aU,Om as aV,Pm as aW,Xa as aX,j_ as aY,N_ as aZ,bE as a_,ie as aa,ln as ab,fE as ac,BE as ad,IO as ae,L5 as af,Kv as ag,_U as ah,yL as ai,il as aj,De as ak,SU as al,al as am,ll as an,sd as ao,AS as ap,Hm as aq,qm as ar,YN as as,VO as at,vU as au,S3 as av,el as aw,J2 as ax,ir as ay,sn as az,B5 as b,Fu as b0,ai as b1,ms as b2,Zm as b3,WO as b4,FO as b5,UO as b6,wU as b7,X2 as b8,K2 as b9,gF as ba,Nk as bb,Tk as bc,Rk as bd,bF as be,ud as bf,K3 as bg,Y3 as bh,Vb as bi,qv as bj,Z2 as bk,Y2 as bl,yU as bm,Se as c,V5 as d,F as e,V2 as f,ve as g,nT as h,Wn as i,l as j,pu as k,hS as l,zb as m,zm as n,Vo as o,H2 as p,vE as q,f as r,Re as s,yE as t,tf as u,Ec as v,og as w,wE as x,fr as y,Dr as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.