vendor: 6,952 bytes, lines 1-18
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Partners-B4SdNNQt.js","assets/vendor-C4MYEBvH.js","assets/ui-MtONsL4w.js","assets/About-3U-V1Z5i.js","assets/Services-CniFh0JV.js","assets/Portfolio-CsjR9HZH.js","assets/Differentiator-DV8raBZz.js","assets/Audience-ruH1XGd5.js","assets/Media-CcIzKNCA.js","assets/Results-BotyKUSO.js","assets/Contact-BFvDWRZs.js","assets/useFormTracking-B05XLbO6.js","assets/ServiceEmailMarketing-DWJH5EVj.js","assets/ServiceDynamic-BI3_IYic.js","assets/ServiceChatbots-Z2VO6JOk.js","assets/ServiceCRM-DhT6Qmun.js","assets/ServiceActiveCampaign-BMnj5InL.js","assets/ServiceAutomation-B2lnr_cX.js","assets/ServiceIASolutions-DfRqjQB8.js","assets/ServiceWhiteLabel-3RmNuJyl.js","assets/ServiceAccountingAutomation-CCMAfUDr.js","assets/ServiceNewsletter-CJsXRxNc.js","assets/BlogIndex-CY3KjXQW.js","assets/SuccessStoriesIndex-BzyPepB4.js","assets/Team-D9oUXvWz.js","assets/Reviews-934ME0dl.js","assets/AdminLayout-S8jEhDmP.js","assets/ThankYou-BJG6i94u.js","assets/CookiesPolicy-DyoFWmWb.js","assets/LegalNotice-BqpnW8KP.js","assets/DynamicContentDispatcher--cxoqKQG.js","assets/LandingSistemaCaptacion-CGUTi7xK.js","assets/DemoVenecia2026-UG8Mfekk.js"])))=>i.map(i=>d[i]); 2var mv=Object.defineProperty;var gv=(r,n,i)=>n in r?mv(r,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[n]=i;var Wa=(r,n,i)=>gv(r,typeof n!="symbol"?n+"":n,i);import{a as pv,b as vv,g as kl,r as be,R as M,c as yv,u as Ml,L as st,B as bv,d as _v,e as wv,f as Mt}from"./vendor-C4MYEBvH.js";import{C as Sv,X as Ev,M as Tv,a as Og,Z as yc,b as jg,c as xv,D as Av,R as Ov,d as jv,P as Rv,e as Cv,F as Nv,I as Dv,L as zv,T as Uv,S as kv,A as Mv,U as Bv,f as qv,g as Lv,h as Hv}from"./ui-MtONsL4w.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();var Pu={exports:{}},Wi={};/** 3 * @license React 4 * react-jsx-runtime.production.js 5 * 6 * Copyright (c) Meta Platforms, Inc. and 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 zm;function $v(){if(zm)return Wi;zm=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,c,d){var f=null;if(d!==void 0&&(f=""+d),c.key!==void 0&&(f=""+c.key),"key"in c){d={};for(var m in c)m!=="key"&&(d[m]=c[m])}else d=c;return c=d.ref,{$$typeof:r,type:l,key:f,ref:c!==void 0?c:null,props:d}}return Wi.Fragment=n,Wi.jsx=i,Wi.jsxs=i,Wi}var Um;function Vv(){return Um||(Um=1,Pu.exports=$v()),Pu.exports}var b=Vv(),Wu={exports:{}},Fi={},Fu={exports:{}},ec={};/** 11 * @license React 12 * scheduler.production.js 13 * 14 * Copyright (c) Meta Platforms, Inc. and 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 km;function Gv(){return km||(km=1,(function(r){function n(C,G){var ee=C.length;C.push(G);e:for(;0<ee;){var _e=ee-1>>>1,me=C[_e];if(0<c(me,G))C[_e]=G,C[ee]=me,ee=_e;else break e}}function i(C){return C.length===0?null:C[0]}function l(C){if(C.length===0)return null;var G=C[0],ee=C.pop();if(ee!==G){C[0]=ee;e:for(var _e=0,me=C.length,He=me>>>1;_e<He;){var Ce=2*(_e+1)-1,J=C[Ce],ce=Ce+1,we=C[ce];if(0>c(J,ee))ce<me&&0>c(we,J)?(C[_e]=we,C[ce]=ee,_e=ce):(C[_e]=J,C[Ce]=ee,_e=Ce);else if(ce<me&&0>c(we,ee))C[_e]=we,C[ce]=ee,_e=ce;else break e}}return G}function c(C,G){var ee=C.sortIndex-G.sortIndex;return ee!==0?ee:C.id-G.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();r.unstable_now=function(){return f.now()-m}}var g=[],p=[],S=1,y=null,T=3,R=!1,N=!1,H=!1,Y=!1,$=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function te(C){for(var G=i(p);G!==null;){if(G.callback===null)l(p);else if(G.startTime<=C)l(p),G.sortIndex=G.expirationTime,n(g,G);else break;G=i(p)}}function Ae(C){if(H=!1,te(C),!N)if(i(g)!==null)N=!0,ie||(ie=!0,Le());else{var G=i(p);G!==null&&dt(Ae,G.startTime-C)}}var ie=!1,he=-1,Oe=5,Xe=-1;function qt(){return Y?!0:!(r.unstable_now()-Xe<Oe)}function Ft(){if(Y=!1,ie){var C=r.unstable_now();Xe=C;var G=!0;try{e:{N=!1,H&&(H=!1,Q(he),he=-1),R=!0;var ee=T;try{t:{for(te(C),y=i(g);y!==null&&!(y.expirationTime>C&&qt());){var _e=y.callback;if(typeof _e=="function"){y.callback=null,T=y.priorityLevel;var me=_e(y.expirationTime<=C);if(C=r.unstable_now(),typeof me=="function"){y.callback=me,te(C),G=!0;break t}y===i(g)&&l(g),te(C)}else l(g);y=i(g)}if(y!==null)G=!0;else{var He=i(p);He!==null&&dt(Ae,He.startTime-C),G=!1}}break e}finally{y=null,T=ee,R=!1}G=void 0}}finally{G?Le():ie=!1}}}var Le;if(typeof I=="function")Le=function(){I(Ft)};else if(typeof MessageChannel<"u"){var ot=new MessageChannel,Lt=ot.port2;ot.port1.onmessage=Ft,Le=function(){Lt.postMessage(null)}}else Le=function(){$(Ft,0)};function dt(C,G){he=$(function(){C(r.unstable_now())},G)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(C){C.callback=null},r.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Oe=0<C?Math.floor(1e3/C):5},r.unstable_getCurrentPriorityLevel=function(){return T},r.unstable_next=function(C){switch(T){case 1:case 2:case 3:var G=3;break;default:G=T}var ee=T;T=G;try{return C()}finally{T=ee}},r.unstable_requestPaint=function(){Y=!0},r.unstable_runWithPriority=function(C,G){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var ee=T;T=C;try{return G()}finally{T=ee}},r.unstable_scheduleCallback=function(C,G,ee){var _e=r.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?_e+ee:_e):ee=_e,C){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=ee+me,C={id:S++,callback:G,priorityLevel:C,startTime:ee,expirationTime:me,sortIndex:-1},ee>_e?(C.sortIndex=ee,n(p,C),i(g)===null&&C===i(p)&&(H?(Q(he),he=-1):H=!0,dt(Ae,ee-_e))):(C.sortIndex=me,n(g,C),N||R||(N=!0,ie||(ie=!0,Le()))),
vendor: 4,253 bytes, lines 18-26
18C},r.unstable_shouldYield=qt,r.unstable_wrapCallback=function(C){var G=T;return function(){var ee=T;T=G;try{return C.apply(this,arguments)}finally{T=ee}}}})(ec)),ec}var Mm;function Iv(){return Mm||(Mm=1,Fu.exports=Gv()),Fu.exports}/** 19 * @license React 20 * react-dom-client.production.js 21 * 22 * Copyright (c) Meta Platforms, Inc. and 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 */var Bm;function Yv(){if(Bm)return Fi;Bm=1;var r=Iv(),n=pv(),i=vv();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function f(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 m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(d(e)!==e)throw Error(l(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(l(188));return t!==e?null:e}for(var a=e,s=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(s=o.return,s!==null){a=s;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return g(o),e;if(u===s)return g(o),t;u=u.sibling}throw Error(l(188))}if(a.return!==s.return)a=o,s=u;else{for(var h=!1,v=o.child;v;){if(v===a){h=!0,a=o,s=u;break}if(v===s){h=!0,s=o,a=u;break}v=v.sibling}if(!h){for(v=u.child;v;){if(v===a){h=!0,a=u,s=o;break}if(v===s){h=!0,s=u,a=o;break}v=v.sibling}if(!h)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,T=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),I=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),he=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),qt=Symbol.for("react.memo_cache_sentinel"),Ft=Symbol.iterator;function Le(e){return e===null||typeof e!="object"?null:(e=Ft&&e[Ft]||e["@@iterator"],typeof e=="function"?e:null)}var ot=Symbol.for("react.client.reference");function Lt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ot?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case $:return"Profiler";case Y:return"StrictMode";case Ae:return"Suspense";case ie:return"SuspenseList";case Xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case I:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case he:return t=e.displayName||null,t!==null?t:Lt(e.type)||"Memo";case Oe:t=e._payload,e=e._init;try{return Lt(e(t))}catch{}}return null}var dt=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},_e=[],me=-1;function He(e){return{current:e}}function Ce(e){0>me||(e.current=_e[me],_e[me]=null,me--)}function J(e,t){me++,_e[me]=e.current,e.current=t}var ce=He(null),we=He(null),Ie=He(null),Ht=He(null);function je(e,t){switch(J(Ie,t),J(we,e),J(ce,null),t.nodeType){case 9:case 11:e=(e
vendor: 10,633 bytes, lines 26-33
26=t.documentElement)&&(e=e.namespaceURI)?am(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=am(t),e=nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ce(ce),J(ce,e)}function Et(){Ce(ce),Ce(we),Ce(Ie)}function Sa(e){e.memoizedState!==null&&J(Ht,e);var t=ce.current,a=nm(t,e.type);t!==a&&(J(we,e),J(ce,a))}function fa(e){we.current===e&&(Ce(ce),Ce(we)),Ht.current===e&&(Ce(Ht),Qi._currentValue=ee)}var ea,rs;function $t(e){if(ea===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ea=t&&t[1]||"",rs=-1<a.stack.indexOf(` 27 at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return` 28`+ea+e+rs}var Cn=!1;function tn(e,t){if(!e||Cn)return"";Cn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(D){var j=D}Reflect.construct(e,[],L)}else{try{L.call()}catch(D){j=D}e.call(L.prototype)}}else{try{throw Error()}catch(D){j=D}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(D){if(D&&j&&typeof D.stack=="string")return[D.stack,j.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),h=u[0],v=u[1];if(h&&v){var w=h.split(` 29`),O=v.split(` 30`);for(o=s=0;s<w.length&&!w[s].includes("DetermineComponentFrameRoot");)s++;for(;o<O.length&&!O[o].includes("DetermineComponentFrameRoot");)o++;if(s===w.length||o===O.length)for(s=w.length-1,o=O.length-1;1<=s&&0<=o&&w[s]!==O[o];)o--;for(;1<=s&&0<=o;s--,o--)if(w[s]!==O[o]){if(s!==1||o!==1)do if(s--,o--,0>o||w[s]!==O[o]){var k=` 31`+w[s].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=s&&0<=o);break}}}finally{Cn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?$t(a):""}function Ca(e,t){switch(e.tag){case 26:case 27:case 5:return $t(e.type);case 16:return $t("Lazy");case 13:return e.child!==t&&t!==null?$t("Suspense Fallback"):$t("Suspense");case 19:return $t("SuspenseList");case 0:case 15:return tn(e.type,!1);case 11:return tn(e.type.render,!1);case 1:return tn(e.type,!0);case 31:return $t("Activity");default:return""}}function Nn(e){try{var t="",a=null;do t+=Ca(e,a),a=e,e=e.return;while(e);return t}catch(s){return` 32Error generating stack: `+s.message+` 33`+s.stack}}var Tt=Object.prototype.hasOwnProperty,Dn=r.unstable_scheduleCallback,zn=r.unstable_cancelCallback,ft=r.unstable_shouldYield,Ea=r.unstable_requestPaint,ht=r.unstable_now,oi=r.unstable_getCurrentPriorityLevel,Na=r.unstable_ImmediatePriority,ls=r.unstable_UserBlockingPriority,Da=r.unstable_NormalPriority,Un=r.unstable_LowPriority,ha=r.unstable_IdlePriority,os=r.log,Ta=r.unstable_setDisableYieldValue,za=null,mt=null;function Vt(e){if(typeof os=="function"&&Ta(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(za,e)}catch{}}var _=Math.clz32?Math.clz32:B,z=Math.log,U=Math.LN2;function B(e){return e>>>=0,e===0?32:31-(z(e)/U|0)|0}var K=256,V=262144,ue=4194304;function P(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function X(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var v=s&134217727;return v!==0?(s=v&~u,s!==0?o=P(s):(h&=v,h!==0?o=P(h):a||(a=v&~e,a!==0&&(o=P(a))))):(v=s&~u,v!==0?o=P(v):h!==0?o=P(h):a||(a=s&~e,a!==0&&(o=P(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function Ee(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function St(){var e=ue;return ue<<=1,(ue&62914560)===0&&(ue=4194304),e}function an(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function At(e,t,a,s,o,u){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,w=e.expirationTimes,O=e.hiddenUpdates;for(a=h&~a;0<a;){var k=31-_(a),L=1<<k;v[k]=0,w[k]=-1;var j=O[k];if(j!==null)for(O[k]=null,k=0;k<j.length;k++){var D=j[k];D!==null&&(D.lane&=-536870913)}a&=~L}s!==0&&kn(e,s,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function kn(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-_(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function Ot(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-_(a),o=1<<s;o&t|e[s]&t&&(e[s]|=t),a&=~o}}function jt(e,t){var a=t&-t;return a=(a&42)!==0?1:us(a),(a&(e.suspendedLanes|t))!==0?0:a}function us(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ma(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hl(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:Am(e.type))}function $c(e,t){var a=G.p;try{return G.p=e,t()}finally{G.p=a}}var nn=Math.random().toString(36).slice(2),gt="__reactFiber$"+nn,Rt="__reactProps$"+nn,cs="__reactContainer$"+nn,$l="__reactEvents$"+nn,np="__reactListeners$"+nn,sp="__reactHandles$"+nn,Vc="__reactResources$"+nn,ui="__reactMarker$"+nn;function Vl(e){delete e[gt],delete e[Rt],delete e[$l],delete e[np],delete e[sp]}function ds(e){var t=e[gt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[cs]||a[gt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=cm(e);e!==null;){if(a=e[gt])return a;e=cm(e)}return t}e=a,a=e.parentNode}return null}function fs(e){if(e=e[gt]||e[cs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ci(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function hs(e){var t=e[Vc];return t||(t=e[Vc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[ui]=!0}var Gc=new Set,Ic={};function Mn(e,t){ms(e,t),ms(e+"Capture",t)}function ms(e,t){for(Ic[e]=t,e=0;e<t.length;e++)Gc.add(t[e])}var ip=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Yc={},Kc={};function rp(e){return Tt.call(Kc,e)?!0:Tt.call(Yc,e)?!1:ip.test(e)?Kc[e]=!0:(Yc[e]=!0,!1)}function hr(e,t,a){if(rp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function mr(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ua(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}function ta(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lp(e,t,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gl(e){if(!e._valueTracker){var t=Xc(e)?"checked":"value";e._valueTracker=lp(e,t,""+e[t])}}function Qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=Xc(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function gr(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}}var op=/[\n"\\]/g;function aa(e){return e.replace(op,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Il(e,t,a,s,o,u,h,v){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ta(t)):e.value!==""+ta(t)&&(e.value=""+ta(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Yl(e,h,ta(t)):a!=null?Yl(e,h,ta(a)):s!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+ta(v):e.removeAttribute("name")}
vendor: 5,537 bytes, line 33
33function Jc(e,t,a,s,o,u,h,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Gl(e);return}a=a!=null?""+ta(a):"",t=t!=null?""+ta(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=v?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Gl(e)}function Yl(e,t,a){t==="number"&&gr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function gs(e,t,a,s){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&s&&(e[a].defaultSelected=!0)}else{for(a=""+ta(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Zc(e,t,a){if(t!=null&&(t=""+ta(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ta(a):""}function Pc(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(l(92));if(dt(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=ta(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),Gl(e)}function ps(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var up=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wc(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||up.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Fc(e,t,a){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&a[o]!==s&&Wc(e,o,s)}else for(var u in t)t.hasOwnProperty(u)&&Wc(e,u,t[u])}function Kl(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
33-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),dp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function pr(e){return dp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ka(){}var Xl=null;function Ql(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vs=null,ys=null;function ed(e){var t=fs(e);if(t&&(e=t.stateNode)){var a=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Il(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+aa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var o=s[Rt]||null;if(!o)throw Error(l(90));Il(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&Qc(s)}break e;case"textarea":Zc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&gs(e,!!a.multiple,t,!1)}}}var Jl=!1;function td(e,t,a){if(Jl)return e(t,a);Jl=!0;try{var s=e(t);return s}finally{if(Jl=!1,(vs!==null||ys!==null)&&(nl(),vs&&(t=vs,e=ys,ys=vs=null,ed(t),e)))for(t=0;t<e.length;t++)ed(e[t])}}function di(e,t){var a=e.stateNode;if(a===null)return null;var s=a[Rt]||null;if(s===null)return null;a=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,t,typeof a));return a}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zl=!1;if(Ma)try{var fi={};Object.defineProperty(fi,"passive",{get:function(){Zl=!0}}),window.addEventListener("test",fi,fi),window.removeEventListener("test",fi,fi)}catch{Zl=!1}var sn=null,Pl=null,vr=null;function ad(){if(vr)return vr;var e,t=Pl,a=t.length,s,o="value"in sn?sn.value:sn.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var h=a-e;for(s=1;s<=h&&t[a-s]===o[u-s];s++);return vr=o.slice(e,1<s?1-s:void 0)}function yr(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 br(){return!0}function nd(){return!1}function Ct(e){function t(a,s,o,u,h){this._reactName=a,this._targetInst=o,this.type=s,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?br:nd,this.isPropagationStopped=nd,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=br)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=br)},persist:function(){},isPersistent:br}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_r=Ct(Bn),hi=y({},Bn,{view:0,detail:0}),fp=Ct(hi),Wl,Fl,mi,wr=y({},hi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:to,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!==mi&&(mi&&e.type==="mousemove"?(Wl=e.screenX-mi.screenX,Fl=e.screenY-mi.screenY):Fl=Wl=0,mi=e),Wl)},movementY:function(e){return"movementY"in e?e.movementY:Fl}}),sd=Ct(wr),hp=y({},wr,{dataTransfer:0}),mp=Ct(hp),gp=y({},hi,{relatedTarget:0}),eo=Ct(gp),pp=y({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),vp=Ct(pp),yp=y({},Bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bp=Ct(yp),_p=y({},Bn,{data:0}),id=Ct(_p),wp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sp={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"},Ep={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ep[e])?!!t[e]:!1}function to(){return Tp}var xp=y({},hi,{key:function(e){if(e.key){var t=wp[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 5,186 bytes, line 33
33return e.type==="keypress"?(e=yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:to,charCode:function(e){return e.type==="keypress"?yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ap=Ct(xp),Op=y({},wr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rd=Ct(Op),jp=y({},hi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:to}),Rp=Ct(jp),Cp=y({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Np=Ct(Cp),Dp=y({},wr,{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}),zp=Ct(Dp),Up=y({},Bn,{newState:0,oldState:0}),kp=Ct(Up),Mp=[9,13,27,32],ao=Ma&&"CompositionEvent"in window,gi=null;Ma&&"documentMode"in document&&(gi=document.documentMode);var Bp=Ma&&"TextEvent"in window&&!gi,ld=Ma&&(!ao||gi&&8<gi&&11>=gi),od=" ",ud=!1;function cd(e,t){switch(e){case"keyup":return Mp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function qp(e,t){switch(e){case"compositionend":return dd(t);case"keypress":return t.which!==32?null:(ud=!0,od);case"textInput":return e=t.data,e===od&&ud?null:e;default:return null}}function Lp(e,t){if(bs)return e==="compositionend"||!ao&&cd(e,t)?(e=ad(),vr=Pl=sn=null,bs=!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 ld&&t.locale!=="ko"?null:t.data;default:return null}}var Hp={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 fd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hp[e.type]:t==="textarea"}function hd(e,t,a,s){vs?ys?ys.push(s):ys=[s]:vs=s,t=cl(t,"onChange"),0<t.length&&(a=new _r("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var pi=null,vi=null;function $p(e){Zh(e,0)}function Sr(e){var t=ci(e);if(Qc(t))return e}function md(e,t){if(e==="change")return t}var gd=!1;if(Ma){var no;if(Ma){var so="oninput"in document;if(!so){var pd=document.createElement("div");pd.setAttribute("oninput","return;"),so=typeof pd.oninput=="function"}no=so}else no=!1;gd=no&&(!document.documentMode||9<document.documentMode)}function vd(){pi&&(pi.detachEvent("onpropertychange",yd),vi=pi=null)}function yd(e){if(e.propertyName==="value"&&Sr(vi)){var t=[];hd(t,vi,e,Ql(e)),td($p,t)}}function Vp(e,t,a){e==="focusin"?(vd(),pi=t,vi=a,pi.attachEvent("onpropertychange",yd)):e==="focusout"&&vd()}function Gp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sr(vi)}function Ip(e,t){if(e==="click")return Sr(t)}function Yp(e,t){if(e==="input"||e==="change")return Sr(t)}function Kp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:Kp;function yi(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var o=a[s];if(!Tt.call(t,o)||!Gt(e[o],t[o]))return!1}return!0}function bd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _d(e,t){var a=bd(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=bd(a)}}function wd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=gr(e.document)}return t}function io(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Xp=Ma&&"documentMode"in document&&11>=document.documentMode,_s=null,ro=null,bi=null,lo=!1;function Ed(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;lo||_s==null||_s!==gr(s)||(s=_s,"selectionStart"in s&&io(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focu
vendor: 22,134 bytes, line 33
33sNode:s.focusNode,focusOffset:s.focusOffset}),bi&&yi(bi,s)||(bi=s,s=cl(ro,"onSelect"),0<s.length&&(t=new _r("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=_s)))}function qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ws={animationend:qn("Animation","AnimationEnd"),animationiteration:qn("Animation","AnimationIteration"),animationstart:qn("Animation","AnimationStart"),transitionrun:qn("Transition","TransitionRun"),transitionstart:qn("Transition","TransitionStart"),transitioncancel:qn("Transition","TransitionCancel"),transitionend:qn("Transition","TransitionEnd")},oo={},Td={};Ma&&(Td=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function Ln(e){if(oo[e])return oo[e];if(!ws[e])return e;var t=ws[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Td)return oo[e]=t[a];return e}var xd=Ln("animationend"),Ad=Ln("animationiteration"),Od=Ln("animationstart"),Qp=Ln("transitionrun"),Jp=Ln("transitionstart"),Zp=Ln("transitioncancel"),jd=Ln("transitionend"),Rd=new Map,uo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");uo.push("scrollEnd");function ga(e,t){Rd.set(e,t),Mn(t,[e])}var Er=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},na=[],Ss=0,co=0;function Tr(){for(var e=Ss,t=co=Ss=0;t<e;){var a=na[t];na[t++]=null;var s=na[t];na[t++]=null;var o=na[t];na[t++]=null;var u=na[t];if(na[t++]=null,s!==null&&o!==null){var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}u!==0&&Cd(a,o,u)}}function xr(e,t,a,s){na[Ss++]=e,na[Ss++]=t,na[Ss++]=a,na[Ss++]=s,co|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function fo(e,t,a,s){return xr(e,t,a,s),Ar(e)}function Hn(e,t){return xr(e,null,null,t),Ar(e)}function Cd(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,s=u.alternate,s!==null&&(s.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-_(a),e=u.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=a|536870912),u):null}function Ar(e){if(50<$i)throw $i=0,wu=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Es={};function Pp(e,t,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,a,s){return new Pp(e,t,a,s)}function ho(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ba(e,t){var a=e.alternate;return a===null?(a=It(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Nd(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Or(e,t,a,s,o,u){var h=0;if(s=e,typeof e=="function")ho(e)&&(h=1);else if(typeof e=="string")h=av(e,a,ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Xe:return e=It(31,a,t,o),e.elementType=Xe,e.lanes=u,e;case H:return $n(a.children,o,u,t);case Y:h=8,o|=24;break;case $:return e=It(12,a,t,o|2),e.elementType=$,e.lanes=u,e;case Ae:return e=It(13,a,t,o),e.elementType=Ae,e.lanes=u,e;case ie:return e=It(19,a,t,o),e.elementType=ie,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I:h=10;break e;case Q:h=9;break e;case te:h=11;break e;case he:h=14;break e;case Oe:h=16,s=null;break e}h=29,a=Error(l(130,e===null?"null":typeof e,"")),s=null}return t=It(h,a,t,o),t.elementType=e,t.type=s,t.lanes=u,t}function $n(e,t,a,s){return e=It(7,e,s,t),e.lanes=a,e}function mo(e,t,a){return e=It(6,e,null,t),e.lanes=a,e}function Dd(e){var t=It(18,null,null,0);return t.stateNode=e,t}function go(e,t,a){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zd=new WeakMap;function sa(e,t){if(typeof e=="object"&&e!==null){var a=zd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Nn(t)},zd.set(e,t),t)}return{value:e,source:t,stack:Nn(t)}}var Ts=[],xs=0,jr=null,_i=0,ia=[],ra=0,rn=null,xa=1,Aa="";function qa(e,t){Ts[xs++]=_i,Ts[xs++]=jr,jr=e,_i=t}function Ud(e,t,a){ia[ra++]=xa,ia[ra++]=Aa,ia[ra++]=rn,rn=e;var s=xa;e=Aa;var o=32-_(s)-1;s&=~(1<<o),a+=1;var u=32-_(t)+o;if(30<u){var h=o-o%5;u=(s&(1<<h)-1).toString(32),s>>=h,o-=h,xa=1<<32-_(t)+o|a<<o|s,Aa=u+e}else xa=1<<u|a<<o|s,Aa=e}function po(e){e.return!==null&&(qa(e,1),Ud(e,1,0))}function vo(e){for(;e===jr;)jr=Ts[--xs],Ts[xs]=null,_i=Ts[--xs],Ts[xs]=null;for(;e===rn;)rn=ia[--ra],ia[ra]=null,Aa=ia[--ra],ia[ra]=null,xa=ia[--ra],ia[ra]=null}function kd(e,t){ia[ra++]=xa,ia[ra++]=Aa,ia[ra++]=rn,xa=t.id,Aa=t.overflow,rn=e}var pt=null,$e=null,Se=!1,ln=null,la=!1,yo=Error(l(519));function on(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wi(sa(t,e)),yo}function Md(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[gt]=e,t[Rt]=s,a){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(a=0;a<Gi.length;a++)pe(Gi[a],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),Jc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),Pc(t,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||em(t.textContent,a)?(s.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),s.onScroll!=null&&pe("scroll",t),s.onScrollEnd!=null&&pe("scrollend",t),s.onClick!=null&&(t.onclick=ka),t=!0):t=!1,t||on(e,!0)}function Bd(e){for(pt=e.return;pt;)switch(pt.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:pt=pt.return}}function As(e){if(e!==pt)return!1;if(!Se)return Bd(e),Se=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Mu(e.type,e.memoizedProps)),a=!a),a&&$e&&on(e),Bd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));$e=um(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));$e=um(e)}else t===27?(t=$e,Sn(e.type)?(e=$u,$u=null,$e=e):$e=t):$e=pt?ua(e.stateNode.nextSibling):null;return!0}function Vn(){$e=pt=null,Se=!1}function bo(){var e=ln;return e!==null&&(Ut===null?Ut=e:Ut.push.apply(Ut,e),ln=null),e}function wi(e){ln===null?ln=[e]:ln.push(e)}var _o=He(null),Gn=null,La=null;function un(e,t,a){J(_o,t._currentValue),t._currentValue=a}function Ha(e){e._currentValue=_o.current,Ce(_o)}function wo(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function So(e,t,a,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var v=u;u=o;for(var w=0;w<t.length;w++)if(v.context===t[w]){u.lanes|=a,v=u.alternate,v!==null&&(v.lanes|=a),wo(u.return,a,e),s||(h=null);break e}u=v.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(l(341));h.lanes|=a,u=h.alternate,u!==null&&(u.lanes|=a),wo(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Os(e,t,a,s){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(l(387));if(h=h.memoizedProps,h!==null){var v=o.type;Gt(o.pendingProps.value,h.value)||(e!==null?e.push(v):e=[v])}}else if(o===Ht.current){if(h=o.alternate,h===null)throw Error(l(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Qi):e=[Qi])}o=o.return}e!==null&&So(t,e,a,s),t.flags|=262144}function Rr(e){for(e=e.firstContext;e!==null;){if(!Gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function In(e){Gn=e,La=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return qd(Gn,e)}function Cr(e,t){return Gn===null&&In(e),qd(e,t)}function qd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},La===null){if(e===null)throw Error(l(308));La=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else La=La.next=t;return a}var Wp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Fp=r.unstable_scheduleCallback,e0=r.unstable_NormalPriority,et={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eo(){return{controller:new Wp,data:new Map,refCount:0}}function Si(e){e.refCount--,e.refCount===0&&Fp(e0,function(){e.controller.abort()})}var Ei=null,To=0,js=0,Rs=null;function t0(e,t){if(Ei===null){var a=Ei=[];To=0,js=Ou(),Rs={status:"pending",value:void 0,then:function(s){a.push(s)}}}return To++,t.then(Ld,Ld),t}function Ld(){if(--To===0&&Ei!==null){Rs!==null&&(Rs.status="fulfilled");var e=Ei;Ei=null,js=0,Rs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function a0(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),s}var Hd=C.S;C.S=function(e,t){Th=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&t0(e,t),Hd!==null&&Hd(e,t)};var Yn=He(null);function xo(){var e=Yn.current;return e!==null?e:Be.pooledCache}function Nr(e,t){t===null?J(Yn,Yn.current):J(Yn,t.pool)}function $d(){var e=xo();return e===null?null:{parent:et._currentValue,pool:e}}var Cs=Error(l(460)),Ao=Error(l(474)),Dr=Error(l(542)),zr={then:function(){}};function Vd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Gd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ka,ka),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yd(e),e;default:if(typeof t.status=="string")t.then(ka,ka);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yd(e),e}throw Xn=t,Cs}}function Kn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Xn=a,Cs):a}}var Xn=null;function Id(){if(Xn===null)throw Error(l(459));var e=Xn;return Xn=null,e}function Yd(e){if(e===Cs||e===Dr)throw Error(l(483))}var Ns=null,Ti=0;function Ur(e){var t=Ti;return Ti+=1,Ns===null&&(Ns=[]),Gd(Ns,e,t)}function xi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function kr(e,t){throw t.$$typeof===T?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kd(e){function t(x,E){if(e){var A=x.deletions;A===null?(x.deletions=[E],x.flags|=16):A.push(E)}}function a(x,E){if(!e)return null;for(;E!==null;)t(x,E),E=E.sibling;return null}function s(x){for(var E=new Map;x!==null;)x.key!==null?E.set(x.key,x):E.set(x.index,x),x=x.sibling;return E}function o(x,E){return x=Ba(x,E),x.index=0,x.sibling=null,x}function u(x,E,A){return x.index=A,e?(A=x.alternate,A!==null?(A=A.index,A<E?(x.flags|=67108866,E):A):(x.flags|=67108866,E)):(x.flags|=1048576,E)}function h(x){return e&&x.alternate===null&&(x.flags|=67108866),x}function v(x,E,A,q){return E===null||E.tag!==6?(E=mo(A,x.mode,q),E.return=x,E):(E=o(E,A),E.return=x,E)}function w(x,E,A,q){var ae=A.type;return ae===H?k(x,E,A.props.children,q,A.key):E!==null&&(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Oe&&Kn(ae)===E.type)?(E=o(E,A.props),xi(E,A),E.return=x,E):(E=Or(A.type,A.key,A.props,null,x.mode,q),xi(E,A),E.return=x,E)}function O(x,E,A,q){return E===null||E.tag!==4||E.stateNode.containerInfo!==A.containerInfo||E.stateNode.implementation!==A.implementation?(E=go(A,x.mode,q),E.return=x,E):(E=o(E,A.children||[]),E.return=x,E)}function k(x,E,A,q,ae){return E===null||E.tag!==7?(E=$n(A,x.mode,q,ae),E.return=x,E):(E=o(E,A),E.return=x,E)}function L(x,E,A){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=mo(""+E,x.mode,A),E.return=x,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case R:return A=Or(E.type,E.key,E.props,null,x.mode,A),xi(A,E),A.return=x,A;case N:return E=go(E,x.mode,A),E.return=x,E;case Oe:return E=Kn(E),L(x,E,A)}if(dt(E)||Le(E))return E=$n(E,x.mode,A,null),E.return=x,E;if(typeof E.then=="function")return L(x,Ur(E),A);if(E.$$typeof===I)return L(x,Cr(x,E),A);kr(x,E)}return null}function j(x,E,A,q){var ae=E!==null?E.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ae!==null?null:v(x,E,""+A,q);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case R:return A.key===ae?w(x,E,A,q):null;case N:return A.key===ae?O(x,E,A,q):null;case Oe:return A=Kn(A),j(x,E,A,q)}if(dt(A)||Le(A))return ae!==null?null:k(x,E,A,q,null);if(typeof A.then=="function")return j(x,E,Ur(A),q);if(A.$$typeof===I)return j(x,E,Cr(x,A),q);kr(x,A)}return null}function D(x,E,A,q,ae){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return x=x.get(A)||null,v(E,x,""+q,ae);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case R:return x=x.get(q.key===null?A:q.key)||null,w(E,x,q,ae);case N:return x=x.get(q.key===null?A:q.key)||null,O(E,x,q,ae);case Oe:return q=Kn(q),D(x,E,A,q,ae)}if(dt(q)||Le(q))return x=x.get(A)||null,k(E,x,q,ae,null);if(typeof q.then=="function")return D(x,E,A,Ur(q),ae);if(q.$$typeof===I)return D(x,E,A,Cr(E,q),ae);kr(E,q)}return null}function Z(x,E,A,q){for(var ae=null,Te=null,W=E,fe=E=0,ye=null;W!==null&&fe<A.length;fe++){W.index>fe?(ye=W,W=null):ye=W.sibling;var xe=j(x,W,A[fe],q);if(xe===null){W===null&&(W=ye);break}e&&W&&xe.alternate===null&&t(x,W),E=u(xe,E,fe),Te===null?ae=xe:Te.sibling=xe,Te=xe,W=ye}if(fe===A.length)return a(x,W),Se&&qa(x,fe),ae;if(W===null){for(;fe<A.length;fe++)W=L(x,A[fe],q),W!==null&&(E=u(W,E,fe),Te===null?ae=W:Te.sibling=W,Te=W);return Se&&qa(x,fe),ae}for(W=s(W);fe<A.length;fe++)ye=D(W,x,fe,A[fe],q),ye!==null&&(e&&ye.alternate!==null&&W.delete(ye.key===null?fe:ye.key),E=u(ye,E,fe),Te===null?ae=ye:Te.sibling=ye,Te=ye);return e&&W.forEach(function(On){return t(x,On)}),Se&&qa(x,fe),ae}function se(x,E,A,q){if(A==null)throw Error(l(151));for(var ae=null,Te=null,W=E,fe=E=0,ye=null,xe=A.next();W!==null&&!xe.done;fe++,xe=A.next()){W.index>fe?(ye=W,W=null):ye=W.sibling;var On=j(x,W,xe.value,q);if(On===null){W===null&&(W=ye);break}e&&W&&On.alternate===null&&t(x,W),E=u(On,E,fe),Te===null?ae=On:Te.sibling=On,Te=On,W=ye}if(xe.done)return a(x,W),Se&&qa(x,fe),ae;if(W===null){for(;!xe.done;fe++,xe=A.next())xe=L(x,xe.value,q),xe!==null&&(E=u(xe,E,fe),Te===null?ae=xe:Te.sibling=xe,Te=xe);return Se&&qa(x,fe),ae}for(W=s(W);!xe.done;fe++,xe=A.next())xe=D(W,x,fe,xe.value,q),xe!==null&&(e&&xe.alternate!==null&&W.delete(xe.key===null?fe:xe.key),E=u(xe,E,fe),Te===null?ae=xe:Te.sibling=xe,Te=xe);return e&&W.forEach(function(hv){return t(x,hv)}),Se&&qa(x,fe),ae}function Me(x,E,A,q){if(typeof A=="object"&&A!==null&&A.type===H&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case R:e:{for(var ae=A.key;E!==null;){if(E.key===ae){if(ae=A.type,ae===H){if(E.tag===7){a(x,E.sibling),q=o(E,A.props.children),q.return=x,x=q;break e}}else if(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Oe&&Kn(ae)===E.type){a(x,E.sibling),q=o(E,A.props),xi(q,A),q.return=x,x=q;break e}a(x,E);break}else t(x,E);E=E.sibling}A.type===H?(q=$n(A.props.children,x.mode,q,A.key),q.return=x,x=q):(q=Or(A.type,A.key,A.props,null,x.mode,q),xi(q,A),q.return=x,x=q)}return h(x);case N:e:{for(ae=A.key;E!==null;){if(E.key===ae)if(E.tag===4&&E.stateNode.containerInfo===A.containerInfo&&E.stateNode.implementation===A.implementation){a(x,E.sibling),q=o(E,A.children||[]),q.return=x,x=q;break e}else{a(x,E);break}else t(x,E);E=E.sibling}q=go(A,x.mode,q),q.return=x,x=q}return h(x);case Oe:return A=Kn(A),Me(x,E,A,q)}if(dt(A))return Z(x,E,A,q);if(Le(A)){if(ae=Le(A),typeof ae!="function")throw Error(l(150));return A=ae.call(A),se(x,E,A,q)}if(typeof A.then=="function")return Me(x,E,Ur(A),q);if(A.$$typeof===I)return Me(x,E,Cr(x,A),q);kr(x,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,E!==null&&E.tag===6?(a(x,E.sibling),q=o(E,A),q.return=x,x=q):(a(x,E),q=mo(A,x.mode,q),q.return=x,x=q),h(x)):a(x,E)}return function(x,E,A,q){try{Ti=0;var ae=Me(x,E,A,q);return Ns=null,ae}catch(W){if(W===Cs||W===Dr)throw W;var Te=It(29,W,null,x.mode);return Te.lanes=q,Te.return=x,Te}finally{}}}var Qn=Kd(!0),Xd=Kd(!1),cn=!1;function Oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function dn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fn(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Re&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=Ar(e),Cd(e,null,a),t}return xr(e,s,t,a),Ar(e)}function Ai(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,Ot(e,a)}}function Ro(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Co=!1;function Oi(){if(Co){var e=Rs;if(e!==null)throw e}}function ji(e,t,a,s){Co=!1;var o=e.updateQueue;cn=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var w=v,O=w.next;w.next=null,h===null?u=O:h.next=O,h=w;var k=e.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==h&&(v===null?k.firstBaseUpdate=O:v.next=O,k.lastBaseUpdate=w))}if(u!==null){var L=o.baseState;h=0,k=O=w=null,v=u;do{var j=v.lane&-536870913,D=j!==v.lane;if(D?(ve&j)===j:(s&j)===j){j!==0&&j===js&&(Co=!0),k!==null&&(k=k.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var Z=e,se=v;j=t;var Me=a;switch(se.tag){case 1:if(Z=se.payload,typeof Z=="function"){L=Z.call(Me,L,j);break e}L=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=se.payload,j=typeof Z=="function"?Z.call(Me,L,j):Z,j==null)break e;L=y({},L,j);break e;case 2:cn=!0}}j=v.callback,j!==null&&(e.flags|=64,D&&(e.flags|=8192),D=o.callbacks,D===null?o.callbacks=[j]:D.push(j))}else D={lane:j,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(O=k=D,w=L):k=k.next=D,h|=j;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;D=v,v=D.next,D.next=null,o.lastBaseUpdate=D,o.shared.pending=null}}while(!0);k===null&&(w=L),o.baseState=w,o.firstBaseUpdate=O,o.lastBaseUpdate=k,u===null&&(o.shared.lanes=0),vn|=h,e.lanes=h,e.memoizedState=L}}function Qd(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function Jd(e,t){var a=e.callbacks;
vendor: 4,971 bytes, line 33
33if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Qd(a[e],t)}var Ds=He(null),Mr=He(0);function Zd(e,t){e=Ja,J(Mr,e),J(Ds,t),Ja=e|t.baseLanes}function No(){J(Mr,Ja),J(Ds,Ds.current)}function Do(){Ja=Mr.current,Ce(Ds),Ce(Mr)}var Yt=He(null),oa=null;function hn(e){var t=e.alternate;J(We,We.current&1),J(Yt,e),oa===null&&(t===null||Ds.current!==null||t.memoizedState!==null)&&(oa=e)}function zo(e){J(We,We.current),J(Yt,e),oa===null&&(oa=e)}function Pd(e){e.tag===22?(J(We,We.current),J(Yt,e),oa===null&&(oa=e)):mn()}function mn(){J(We,We.current),J(Yt,Yt.current)}function Kt(e){Ce(Yt),oa===e&&(oa=null),Ce(We)}var We=He(0);function Br(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Lu(a)||Hu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 $a=0,de=null,Ue=null,tt=null,qr=!1,zs=!1,Jn=!1,Lr=0,Ri=0,Us=null,n0=0;function Je(){throw Error(l(321))}function Uo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Gt(e[a],t[a]))return!1;return!0}function ko(e,t,a,s,o,u){return $a=u,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?kf:Zo,Jn=!1,u=a(s,o),Jn=!1,zs&&(u=Fd(t,a,s,o)),Wd(e),u}function Wd(e){C.H=Di;var t=Ue!==null&&Ue.next!==null;if($a=0,tt=Ue=de=null,qr=!1,Ri=0,Us=null,t)throw Error(l(300));e===null||at||(e=e.dependencies,e!==null&&Rr(e)&&(at=!0))}function Fd(e,t,a,s){de=e;var o=0;do{if(zs&&(Us=null),Ri=0,zs=!1,25<=o)throw Error(l(301));if(o+=1,tt=Ue=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}C.H=Mf,u=t(a,s)}while(zs);return u}function s0(){var e=C.H,t=e.useState()[0];return t=typeof t.then=="function"?Ci(t):t,e=e.useState()[0],(Ue!==null?Ue.memoizedState:null)!==e&&(de.flags|=1024),t}function Mo(){var e=Lr!==0;return Lr=0,e}function Bo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function qo(e){if(qr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qr=!1}$a=0,tt=Ue=de=null,zs=!1,Ri=Lr=0,Us=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?de.memoizedState=tt=e:tt=tt.next=e,tt}function Fe(){if(Ue===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=tt===null?de.memoizedState:tt.next;if(t!==null)tt=t,Ue=e;else{if(e===null)throw de.alternate===null?Error(l(467)):Error(l(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},tt===null?de.memoizedState=tt=e:tt=tt.next=e}return tt}function Hr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ci(e){var t=Ri;return Ri+=1,Us===null&&(Us=[]),e=Gd(Us,e,t),t=de,(tt===null?t.memoizedState:tt.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?kf:Zo),e}function $r(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ci(e);if(e.$$typeof===I)return vt(e)}throw Error(l(438,String(e)))}function Lo(e){var t=null,a=de.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=de.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Hr(),de.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=qt;return t.index++,a}function Va(e,t){return typeof t=="function"?t(e):t}function Vr(e){var t=Fe();return Ho(t,Ue,e)}function Ho(e,t,a){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var o=e.baseQueue,u=s.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,s.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var v=h=null,w=null,O=t,k=!1;do{var L=O.lane&-536870913;if(L!==O.lane?(ve&L)===L:($a&L)===L){var j=O.revertLane;if(j===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),L===js&&(k=!0);else if(($a&j)===j){O=O.next,j===js&&(k=!0);continue}else L={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},w===null?(v=w=L,h=u):w=w.next=L,de.lanes|=j,vn|=j;L=O.action,Jn&&a(u,L),u=O.hasEagerState?O.eagerState:a(u,L)}else j={lane:L,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},w===null?(v=w=j,h=u):w=w.next=j,de.lanes|=L,vn|=L;O=O.next}
vendor: 3,277 bytes, line 33
33while(O!==null&&O!==t);if(w===null?h=u:w.next=v,!Gt(u,e.memoizedState)&&(at=!0,k&&(a=Rs,a!==null)))throw a;e.memoizedState=u,e.baseState=h,e.baseQueue=w,s.lastRenderedState=u}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function $o(e){var t=Fe(),a=t.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var s=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);Gt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,s]}function ef(e,t,a){var s=de,o=Fe(),u=Se;if(u){if(a===void 0)throw Error(l(407));a=a()}else a=t();var h=!Gt((Ue||o).memoizedState,a);if(h&&(o.memoizedState=a,at=!0),o=o.queue,Io(nf.bind(null,s,o,e),[e]),o.getSnapshot!==t||h||tt!==null&&tt.memoizedState.tag&1){if(s.flags|=2048,ks(9,{destroy:void 0},af.bind(null,s,o,a,t),null),Be===null)throw Error(l(349));u||($a&127)!==0||tf(s,t,a)}return a}function tf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=de.updateQueue,t===null?(t=Hr(),de.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function af(e,t,a,s){t.value=a,t.getSnapshot=s,sf(t)&&rf(e)}function nf(e,t,a){return a(function(){sf(t)&&rf(e)})}function sf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Gt(e,a)}catch{return!0}}function rf(e){var t=Hn(e,2);t!==null&&kt(t,e,2)}function Vo(e){var t=xt();if(typeof e=="function"){var a=e;if(e=a(),Jn){Vt(!0);try{a()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:e},t}function lf(e,t,a,s){return e.baseState=a,Ho(e,Ue,typeof s=="function"?s:Va)}function i0(e,t,a,s,o){if(Yr(e))throw Error(l(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};C.T!==null?a(!0):u.isTransition=!1,s(u),a=t.pending,a===null?(u.next=t.pending=u,of(t,u)):(u.next=a.next,t.pending=a.next=u)}}function of(e,t){var a=t.action,s=t.payload,o=e.state;if(t.isTransition){var u=C.T,h={};C.T=h;try{var v=a(o,s),w=C.S;w!==null&&w(h,v),uf(e,t,v)}catch(O){Go(e,t,O)}finally{u!==null&&h.types!==null&&(u.types=h.types),C.T=u}}else try{u=a(o,s),uf(e,t,u)}catch(O){Go(e,t,O)}}function uf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){cf(e,t,s)},function(s){return Go(e,t,s)}):cf(e,t,a)}function cf(e,t,a){t.status="fulfilled",t.value=a,df(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,of(e,a)))}function Go(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,df(t),t=t.next;while(t!==s)}e.action=null}function df(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ff(e,t){return t}function hf(e,t){if(Se){var a=Be.formState;if(a!==null){e:{var s=de;if(Se){if($e){t:{for(var o=$e,u=la;o.nodeType!==8;){if(!u){o=null;break t}if(o=ua(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){$e=ua(o.nextSibling),s=o.data==="F!";break e}}on(s)}s=!1}s&&(t=a[0])}}return a=xt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ff,lastRenderedState:t}
vendor: 11,918 bytes, line 33
33,a.queue=s,a=Df.bind(null,de,s),s.dispatch=a,s=Vo(!1),u=Jo.bind(null,de,!1,s.queue),s=xt(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,a=i0.bind(null,de,o,u,a),o.dispatch=a,s.memoizedState=e,[t,a,!1]}function mf(e){var t=Fe();return gf(t,Ue,e)}function gf(e,t,a){if(t=Ho(e,t,ff)[0],e=Vr(Va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ci(t)}catch(h){throw h===Cs?Dr:h}else s=t;t=Fe();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(de.flags|=2048,ks(9,{destroy:void 0},r0.bind(null,o,a),null)),[s,u,e]}function r0(e,t){e.action=t}function pf(e){var t=Fe(),a=Ue;if(a!==null)return gf(t,a,e);Fe(),t=t.memoizedState,a=Fe();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function ks(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=de.updateQueue,t===null&&(t=Hr(),de.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function vf(){return Fe().memoizedState}function Gr(e,t,a,s){var o=xt();de.flags|=e,o.memoizedState=ks(1|t,{destroy:void 0},a,s===void 0?null:s)}function Ir(e,t,a,s){var o=Fe();s=s===void 0?null:s;var u=o.memoizedState.inst;Ue!==null&&s!==null&&Uo(s,Ue.memoizedState.deps)?o.memoizedState=ks(t,u,a,s):(de.flags|=e,o.memoizedState=ks(1|t,u,a,s))}function yf(e,t){Gr(8390656,8,e,t)}function Io(e,t){Ir(2048,8,e,t)}function l0(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=Hr(),de.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function bf(e){var t=Fe().memoizedState;return l0({ref:t,nextImpl:e}),function(){if((Re&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function _f(e,t){return Ir(4,2,e,t)}function wf(e,t){return Ir(4,4,e,t)}function Sf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ef(e,t,a){a=a!=null?a.concat([e]):null,Ir(4,4,Sf.bind(null,t,e),a)}function Yo(){}function Tf(e,t){var a=Fe();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Uo(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function xf(e,t){var a=Fe();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Uo(t,s[1]))return s[0];if(s=e(),Jn){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[s,t],s}function Ko(e,t,a){return a===void 0||($a&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ah(),de.lanes|=e,vn|=e,a)}function Af(e,t,a,s){return Gt(a,t)?a:Ds.current!==null?(e=Ko(e,a,s),Gt(e,t)||(at=!0),e):($a&42)===0||($a&1073741824)!==0&&(ve&261930)===0?(at=!0,e.memoizedState=a):(e=Ah(),de.lanes|=e,vn|=e,t)}function Of(e,t,a,s,o){var u=G.p;G.p=u!==0&&8>u?u:8;var h=C.T,v={};C.T=v,Jo(e,!1,t,a);try{var w=o(),O=C.S;if(O!==null&&O(v,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var k=a0(w,s);Ni(e,t,k,Jt(e))}else Ni(e,t,s,Jt(e))}catch(L){Ni(e,t,{then:function(){},status:"rejected",reason:L},Jt())}finally{G.p=u,h!==null&&v.types!==null&&(h.types=v.types),C.T=h}}function o0(){}function Xo(e,t,a,s){if(e.tag!==5)throw Error(l(476));var o=jf(e).queue;Of(e,o,t,ee,a===null?o0:function(){return Rf(e),a(s)})}function jf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:ee},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Rf(e){var t=jf(e);t.next===null&&(t=e.alternate.memoizedState),Ni(e,t.next.queue,{},Jt())}function Qo(){return vt(Qi)}function Cf(){return Fe().memoizedState}function Nf(){return Fe().memoizedState}function u0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Jt();e=dn(a);var s=fn(t,e,a);s!==null&&(kt(s,t,a),Ai(s,t,a)),t={cache:Eo()},e.payload=t;return}t=t.return}}function c0(e,t,a){var s=Jt();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Yr(e)?zf(t,a):(a=fo(e,t,a,s),a!==null&&(kt(a,e,s),Uf(a,t,s)))}function Df(e,t,a){var s=Jt();Ni(e,t,a,s)}function Ni(e,t,a,s){var o={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Yr(e))zf(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,v=u(h,a);if(o.hasEagerState=!0,o.eagerState=v,Gt(v,h))return xr(e,t,o,0),Be===null&&Tr(),!1}catch{}finally{}if(a=fo(e,t,o,s),a!==null)return kt(a,e,s),Uf(a,t,s),!0}return!1}function Jo(e,t,a,s){if(s={lane:2,revertLane:Ou(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Yr(e)){if(t)throw Error(l(479))}else t=fo(e,a,s,2),t!==null&&kt(t,e,2)}function Yr(e){var t=e.alternate;return e===de||t!==null&&t===de}function zf(e,t){zs=qr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Uf(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,Ot(e,a)}}var Di={readContext:vt,use:$r,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Di.useEffectEvent=Je;var kf={readContext:vt,use:$r,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:yf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Gr(4194308,4,Sf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Gr(4194308,4,e,t)},useInsertionEffect:function(e,t){Gr(4,2,e,t)},useMemo:function(e,t){var a=xt();t=t===void 0?null:t;var s=e();if(Jn){Vt(!0);try{e()}finally{Vt(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=xt();if(a!==void 0){var o=a(t);if(Jn){Vt(!0);try{a(t)}finally{Vt(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=c0.bind(null,de,e),[s.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,a=Df.bind(null,de,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Yo,useDeferredValue:function(e,t){var a=xt();return Ko(a,e,t)},useTransition:function(){var e=Vo(!1);return e=Of.bind(null,de,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=de,o=xt();if(Se){if(a===void 0)throw Error(l(407));a=a()}else{if(a=t(),Be===null)throw Error(l(349));(ve&127)!==0||tf(s,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,yf(nf.bind(null,s,u,e),[e]),s.flags|=2048,ks(9,{destroy:void 0},af.bind(null,s,u,a,t),null),a},useId:function(){var e=xt(),t=Be.identifierPrefix;if(Se){var a=Aa,s=xa;a=(s&~(1<<32-_(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Lr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=n0++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qo,useFormState:hf,useActionState:hf,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Jo.bind(null,de,!0,a),a.dispatch=t,[e,t]},useMemoCache:Lo,useCacheRefresh:function(){return xt().memoizedState=u0.bind(null,de)},useEffectEvent:function(e){var t=xt(),a={impl:e};return t.memoizedState=a,function(){if((Re&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Zo={readContext:vt,use:$r,useCallback:Tf,useContext:vt,useEffect:Io,useImperativeHandle:Ef,useInsertionEffect:_f,useLayoutEffect:wf,useMemo:xf,useReducer:Vr,useRef:vf,useState:function(){return Vr(Va)},useDebugValue:Yo,useDeferredValue:function(e,t){var a=Fe();return Af(a,Ue.memoizedState,e,t)},useTransition:function(){var e=Vr(Va)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:ef,useId:Cf,useHostTransitionStatus:Qo,useFormState:mf,useActionState:mf,useOptimistic:function(e,t){var a=Fe();return lf(a,Ue,e,t)},useMemoCache:Lo,useCacheRefresh:Nf};Zo.useEffectEvent=bf;var Mf={readContext:vt,use:$r,useCallback:Tf,useContext:vt,useEffect:Io,useImperativeHandle:Ef,useInsertionEffect:_f,useLayoutEffect:wf,useMemo:xf,useReducer:$o,useRef:vf,useState:function(){return $o(Va)},useDebugValue:Yo,useDeferredValue:function(e,t){var a=Fe();return Ue===null?Ko(a,e,t):Af(a,Ue.memoizedState,e,t)},useTransition:function(){var e=$o(Va)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:ef,useId:Cf,useHostTransitionStatus:Qo,useFormState:pf,useActionState:pf,useOptimistic:function(e,t){var a=Fe();return Ue!==null?lf(a,Ue,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Lo,useCacheRefresh:Nf};Mf.useEffectEvent=bf;function Po(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Wo={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=Jt(),o=dn(s);o.payload=t,a!=null&&(o.callback=a),t=fn(e,o,s),t!==null&&(kt(t,e,s),Ai(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=Jt(),o=dn(s);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=fn(e,o,s),t!==null&&(kt(t,e,s),Ai(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Jt(),s=dn(a);s.tag=2,t!=null&&(s.callback=t),t=fn(e,s,a),t!==null&&(kt(t,e,a),Ai(t,e,a))}};function Bf(e,t,a,s,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,h):t.prototype&&t.prototype.isPureReactComponent?!yi(a,s)||!yi(o,u):!0}function qf(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Wo.enqueueReplaceState(t,t.state,null)}function Zn(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Lf(e){Er(e)}function Hf(e){console.error(e)}function $f(e){Er(e)}function Kr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Vf(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Fo(e,t,a){return a=dn(a),a.tag=3,a.payload={element:null},a.callback=function(){Kr(e,t)},a}function Gf(e){return e=dn(e),e.tag=3,e}function If(e,t,a,s){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=s.value;e.payload=function(){return o(u)},e.callback=function(){Vf(t,a,s)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Vf(t,a,s),typeof o!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var v=s.stack;this.componentDidCatch(s.value,{componentStack:v!==null?v:""})})}function d0(e,t,a,s,o){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Os(t,a,o,!0),a=Yt.current,a!==null){switch(a.tag){case 31:case 13:return oa===null?sl():a.alternate===null&&Ze===0&&(Ze=3),a.flags&=-257,a.flags|=65536,a.lanes=o,s===zr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),Tu(e,s,o)),!1;case 22:return a.flags|=65536,s===zr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),Tu(e,s,o)),!1}throw Error(l(435,a.tag))}return Tu(e,s,o),sl(),!1}if(Se)return t=Yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==yo&&(e=Error(l(422),{cause:s}
vendor: 10,660 bytes, line 33
33),wi(sa(e,a)))):(s!==yo&&(t=Error(l(423),{cause:s}),wi(sa(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=sa(s,a),o=Fo(e.stateNode,s,o),Ro(e,o),Ze!==4&&(Ze=2)),!1;var u=Error(l(520),{cause:s});if(u=sa(u,a),Hi===null?Hi=[u]:Hi.push(u),Ze!==4&&(Ze=2),t===null)return!0;s=sa(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Fo(a.stateNode,s,e),Ro(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(yn===null||!yn.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Gf(o),If(o,e,a,s),Ro(a,o),!1}a=a.return}while(a!==null);return!1}var eu=Error(l(461)),at=!1;function yt(e,t,a,s){t.child=e===null?Xd(t,null,a,s):Qn(t,e.child,a,s)}function Yf(e,t,a,s,o){a=a.render;var u=t.ref;if("ref"in s){var h={};for(var v in s)v!=="ref"&&(h[v]=s[v])}else h=s;return In(t),s=ko(e,t,a,h,u,o),v=Mo(),e!==null&&!at?(Bo(e,t,o),Ga(e,t,o)):(Se&&v&&po(t),t.flags|=1,yt(e,t,s,o),t.child)}function Kf(e,t,a,s,o){if(e===null){var u=a.type;return typeof u=="function"&&!ho(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Xf(e,t,u,s,o)):(e=Or(a.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!ou(e,o)){var h=u.memoizedProps;if(a=a.compare,a=a!==null?a:yi,a(h,s)&&e.ref===t.ref)return Ga(e,t,o)}return t.flags|=1,e=Ba(u,s),e.ref=t.ref,e.return=t,t.child=e}function Xf(e,t,a,s,o){if(e!==null){var u=e.memoizedProps;if(yi(u,s)&&e.ref===t.ref)if(at=!1,t.pendingProps=s=u,ou(e,o))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Ga(e,t,o)}return tu(e,t,a,s,o)}function Qf(e,t,a,s){var o=s.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(s=t.child=e.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~u}else s=0,t.child=null;return Jf(e,t,u,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Nr(t,u!==null?u.cachePool:null),u!==null?Zd(t,u):No(),Pd(t);else return s=t.lanes=536870912,Jf(e,t,u!==null?u.baseLanes|a:a,a,s)}else u!==null?(Nr(t,u.cachePool),Zd(t,u),mn(),t.memoizedState=null):(e!==null&&Nr(t,null),No(),mn());return yt(e,t,o,a),t.child}function zi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jf(e,t,a,s,o){var u=xo();return u=u===null?null:{parent:et._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Nr(t,null),No(),Pd(t),e!==null&&Os(e,t,s,!0),t.childLanes=o,null}function Xr(e,t){return t=Jr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zf(e,t,a){return Qn(t,e.child,null,a),e=Xr(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function f0(e,t,a){var s=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(s.mode==="hidden")return e=Xr(t,s),t.lanes=536870912,zi(null,e);if(zo(t),(e=$e)?(e=om(e,la),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rn!==null?{id:xa,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},a=Dd(e),a.return=t,t.child=a,pt=t,$e=null)):e=null,e===null)throw on(t);return t.lanes=536870912,null}return Xr(t,s)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(zo(t),o)if(t.flags&256)t.flags&=-257,t=Zf(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(at||Os(e,t,a,!1),o=(a&e.childLanes)!==0,at||o){if(s=Be,s!==null&&(h=jt(s,a),h!==0&&h!==u.retryLane))throw u.retryLane=h,Hn(e,h),kt(s,e,h),eu;sl(),t=Zf(e,t,a)}else e=u.treeContext,$e=ua(h.nextSibling),pt=t,Se=!0,ln=null,la=!1,e!==null&&kd(t,e),t=Xr(t,s),t.flags|=4096;return t}return e=Ba(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Qr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function tu(e,t,a,s,o){return In(t),a=ko(e,t,a,s,void 0,o),s=Mo(),e!==null&&!at?(Bo(e,t,o),Ga(e,t,o)):(Se&&s&&po(t),t.flags|=1,yt(e,t,a,o),t.child)}function Pf(e,t,a,s,o,u){return In(t),t.updateQueue=null,a=Fd(t,s,a,o),Wd(e),s=Mo(),e!==null&&!at?(Bo(e,t,u),Ga(e,t,u)):(Se&&s&&po(t),t.flags|=1,yt(e,t,a,u),t.child)}function Wf(e,t,a,s,o){if(In(t),t.stateNode===null){var u=Es,h=a.contextType;typeof h=="object"&&h!==null&&(u=vt(h)),u=new a(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Wo,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},Oo(t),h=a.contextType,u.context=typeof h=="object"&&h!==null?vt(h):Es,u.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Po(t,a,h,s),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&Wo.enqueueReplaceState(u,u.state,null),ji(t,s,u,o),Oi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var v=t.memoizedProps,w=Zn(a,v);u.props=w;var O=u.context,k=a.contextType;h=Es,typeof k=="object"&&k!==null&&(h=vt(k));var L=a.getDerivedStateFromProps;k=typeof L=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,k||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||O!==h)&&qf(t,u,s,h),cn=!1;var j=t.memoizedState;u.state=j,ji(t,s,u,o),Oi(),O=t.memoizedState,v||j!==O||cn?(typeof L=="function"&&(Po(t,a,L,s),O=t.memoizedState),(w=cn||Bf(t,a,w,s,j,O,h))?(k||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=O),u.props=s,u.state=O,u.context=h,s=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,jo(e,t),h=t.memoizedProps,k=Zn(a,h),u.props=k,L=t.pendingProps,j=u.context,O=a.contextType,w=Es,typeof O=="object"&&O!==null&&(w=vt(O)),v=a.getDerivedStateFromProps,(O=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==L||j!==w)&&qf(t,u,s,w),cn=!1,j=t.memoizedState,u.state=j,ji(t,s,u,o),Oi();var D=t.memoizedState;h!==L||j!==D||cn||e!==null&&e.dependencies!==null&&Rr(e.dependencies)?(typeof v=="function"&&(Po(t,a,v,s),D=t.memoizedState),(k=cn||Bf(t,a,k,s,j,D,w)||e!==null&&e.dependencies!==null&&Rr(e.dependencies))?(O||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,D,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,D,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=D),u.props=s,u.state=D,u.context=w,s=k):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Qr(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=Qn(t,e.child,null,o),t.child=Qn(t,null,a,o)):yt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=Ga(e,t,o),e}function Ff(e,t,a,s){return Vn(),t.flags|=256,yt(e,t,a,s),t.child}var au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nu(e){return{baseLanes:e,cachePool:$d()}}function su(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Qt),e}function eh(e,t,a){var s=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(We.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(o?hn(t):mn(),(e=$e)?(e=om(e,la),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rn!==null?{id:xa,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},a=Dd(e),a.return=t,t.child=a,pt=t,$e=null)):e=null,e===null)throw on(t);return Hu(e)?t.lanes=32:t.lanes=536870912,null}var v=s.children;return s=s.fallback,o?(mn(),o=t.mode,v=Jr({mode:"hidden",children:v},o),s=$n(s,o,a,null),v.return=t,s.return=t,v.sibling=s,t.child=v,s=t.child,s.memoizedState=nu(a),s.childLanes=su(e,h,a),t.memoizedState=au,zi(null,s)):(hn(t),iu(t,v))}var w=e.memoizedState;if(w!==null&&(v=w.dehydrated,v!==null)){if(u)t.flags&256?(hn(t),t.flags&=-257,t=ru(e,t,a)):t.memoizedState!==null?(mn(),t.child=e.child,t.flags|=128,t=null):(mn(),v=s.fallback,o=t.mode,s=Jr({mode:"visible",children:s.children},o),v=$n(v,o,a,null),v.flags|=2,s.return=t,v.return=t,s.sibling=v,t.child=s,Qn(t,e.child,null,a),s=t.child,s.memoizedState=nu(a),s.childLanes=su(e,h,a),t.memoizedState=au,t=zi(null,s));else if(hn(t),Hu(v)){if(h=v.nextSibling&&v.nextSibling.dataset,h)var O=h.dgst;h=O,s=Error(l(419)),s.stack="",s.digest=h,wi({value:s,source:null,stack:null}),t=ru(e,t,a)}else if(at||Os(e,t,a,!1),h=(a&e.childLanes)!==0,at||h){if(h=Be,h!==null&&(s=jt(h,a),s!==0&&s!==w.retryLane))throw w.retryLane=s,Hn(e,s),kt(h,e,s),eu;Lu(v)||sl(),t=ru(e,t,a)}else Lu(v)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,$e=ua(v.nextSibling),pt=t,Se=!0,ln=null,la=!1,e!==null&&kd(t,e),t=iu(t,s.children),t.flags|=4096);return t}return o?(mn(),v=s.fallback,o=t.mode,w=e.child,O=w.sibling,s=Ba(w,{mode:"hidden",children:s.children}),s.subtreeFlags=w.subtreeFlags&65011712,O!==null?v=Ba(O,v):(v=$n(v,o,a,null),v.flags|=2),v.return=t,s.return=t,s.sibling=v,t.child=s,zi(null,s),s=t.child,v=e.child.memoizedState,v===null?v=nu(a):(o=v.cachePool,o!==null?(w=et._currentValue,o=o.parent!==w?{parent:w,pool:w}
vendor: 5,585 bytes, line 33
33:o):o=$d(),v={baseLanes:v.baseLanes|a,cachePool:o}),s.memoizedState=v,s.childLanes=su(e,h,a),t.memoizedState=au,zi(e.child,s)):(hn(t),a=e.child,e=a.sibling,a=Ba(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function iu(e,t){return t=Jr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Jr(e,t){return e=It(22,e,null,t),e.lanes=0,e}function ru(e,t,a){return Qn(t,e.child,null,a),e=iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function th(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),wo(e.return,t,a)}function lu(e,t,a,s,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=a,h.tailMode=o,h.treeForkCount=u)}function ah(e,t,a){var s=t.pendingProps,o=s.revealOrder,u=s.tail;s=s.children;var h=We.current,v=(h&2)!==0;if(v?(h=h&1|2,t.flags|=128):h&=1,J(We,h),yt(e,t,s,a),s=Se?_i:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&th(e,a,t);else if(e.tag===19)th(e,a,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}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Br(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),lu(t,!1,o,a,u,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Br(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}lu(t,!0,a,null,u,s);break;case"together":lu(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ga(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Os(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,a=Ba(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ba(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ou(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Rr(e)))}function h0(e,t,a){switch(t.tag){case 3:je(t,t.stateNode.containerInfo),un(t,et,e.memoizedState.cache),Vn();break;case 27:case 5:Sa(t);break;case 4:je(t,t.stateNode.containerInfo);break;case 10:un(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zo(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(hn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?eh(e,t,a):(hn(t),e=Ga(e,t,a),e!==null?e.sibling:null);hn(t);break;case 19:var o=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Os(e,t,a,!1),s=(a&t.childLanes)!==0),o){if(s)return ah(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),J(We,We.current),s)break;return null;case 22:return t.lanes=0,Qf(e,t,a,t.pendingProps);case 24:un(t,et,e.memoizedState.cache)}return Ga(e,t,a)}function nh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!ou(e,a)&&(t.flags&128)===0)return at=!1,h0(e,t,a);at=(e.flags&131072)!==0}else at=!1,Se&&(t.flags&1048576)!==0&&Ud(t,_i,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Kn(t.elementType),t.type=e,typeof e=="function")ho(e)?(s=Zn(e,s),t.tag=1,t=Wf(null,t,e,s,a)):(t.tag=0,t=tu(null,t,e,s,a));else{if(e!=null){var o=e.$$typeof;if(o===te){t.tag=11,t=Yf(null,t,e,s,a);break e}else if(o===he){t.tag=14,t=Kf(null,t,e,s,a);break e}}throw t=Lt(e)||e,Error(l(306,t,""))}}return t;case 0:return tu(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,o=Zn(s,t.pendingProps),Wf(e,t,s,o,a);case 3:e:{if(je(t,t.stateNode.containerInfo),e===null)throw Error(l(387));s=t.pendingProps;var u=t.memoizedState;o=u.element,jo(e,t),ji(t,s,null,a);var h=t.memoizedState;if(s=h.cache,un(t,et,s),s!==u.cache&&So(t,[et],a,!0),Oi(),s=h.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Ff(e,t,s,a);break e}else if(s!==o){o=sa(Error(l(424)),t),wi(o),t=Ff(e,t,s,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for($e=ua(e.firstChild),pt=t,Se=!0,ln=null,la=!0,a=Xd(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vn(),s===o){t=Ga(e,t,a);break e}yt(e,t,s,a)}t=t.child}return t;case 26:return Qr(e,t),e===null?(a=mm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Se||(a=t.type,e=t.pendingProps,s=dl(Ie.current).createElement(a),s[gt]=t,s[Rt]=e,bt(s,a,e),ut(s),t.stateNode=s):t.memoizedState=mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Sa(t),e===null&&Se&&(s=t.stateNode=dm(t.type,t.pendingProps,Ie.current),pt=t,la=!0,o=$e,Sn(t.type)?($u=o,$e=ua(s.firstChild)):$e=o),yt(e,t,t.pendingProps.children,a),Qr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((o=s=$e)&&(s=G0(s,t.type,t.pendingProps,la),s!==null?(t.stateNode=s,pt=t,$e=ua(s.firstChild),la=!1,o=!0):o=!1),o||on(t)),Sa(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,s=u.children,Mu(o,u)?s=null:h!==null&&Mu(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=ko(e,t,s0,null,null,a),Qi._currentValue=o),Qr
vendor: 4,214 bytes, line 33
33(e,t),yt(e,t,s,a),t.child;case 6:return e===null&&Se&&((e=a=$e)&&(a=I0(a,t.pendingProps,la),a!==null?(t.stateNode=a,pt=t,$e=null,e=!0):e=!1),e||on(t)),null;case 13:return eh(e,t,a);case 4:return je(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Qn(t,null,s,a):yt(e,t,s,a),t.child;case 11:return Yf(e,t,t.type,t.pendingProps,a);case 7:return yt(e,t,t.pendingProps,a),t.child;case 8:return yt(e,t,t.pendingProps.children,a),t.child;case 12:return yt(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,un(t,t.type,s.value),yt(e,t,s.children,a),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,In(t),o=vt(o),s=s(o),t.flags|=1,yt(e,t,s,a),t.child;case 14:return Kf(e,t,t.type,t.pendingProps,a);case 15:return Xf(e,t,t.type,t.pendingProps,a);case 19:return ah(e,t,a);case 31:return f0(e,t,a);case 22:return Qf(e,t,a,t.pendingProps);case 24:return In(t),s=vt(et),e===null?(o=xo(),o===null&&(o=Be,u=Eo(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:s,cache:o},Oo(t),un(t,et,o)):((e.lanes&a)!==0&&(jo(e,t),ji(t,null,null,a),Oi()),o=e.memoizedState,u=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),un(t,et,s)):(s=u.cache,un(t,et,s),s!==o.cache&&So(t,[et],a,!0))),yt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Ia(e){e.flags|=4}function uu(e,t,a,s,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Ch())e.flags|=8192;else throw Xn=zr,Ao}else e.flags&=-16777217}function sh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bm(t))if(Ch())e.flags|=8192;else throw Xn=zr,Ao}function Zr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?St():536870912,e.lanes|=t,Ls|=t)}function Ui(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function m0(e,t,a){var s=t.pendingProps;switch(vo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ha(et),Et(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(As(t)?Ia(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,bo())),Ve(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Ia(t),u!==null?(Ve(t),sh(t,u)):(Ve(t),uu(t,o,null,s,a))):u?u!==e.memoizedState?(Ia(t),Ve(t),sh(t,u)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ia(t),Ve(t),uu(t,o,e,s,a)),null;case 27:if(fa(t),a=Ie.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ia(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return Ve(t),null}e=ce.current,As(t)?Md(t):(e=dm(o,s,a),t.stateNode=e,Ia(t))}return Ve(t),null;case 5:if(fa(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ia(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return Ve(t),null}if(u=ce.current,As(t))Md(t);else{var h=dl(Ie.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;
vendor: 19,861 bytes, line 33
33case"select":u=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?h.createElement(o,{is:s.is}):h.createElement(o)}}u[gt]=t,u[Rt]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(bt(u,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ia(t)}}return Ve(t),uu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ia(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(e=Ie.current,As(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,o=pt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[gt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||em(e.nodeValue,a)),e||on(t,!0)}else e=dl(e).createTextNode(s),e[gt]=t,t.stateNode=e}return Ve(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=As(t),a!==null){if(e===null){if(!s)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[gt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else a=bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(l(558))}return Ve(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=As(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(l(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(l(317));o[gt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),o=!1}else o=bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==o&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Zr(t,t.updateQueue),Ve(t),null);case 4:return Et(),e===null&&Nu(t.stateNode.containerInfo),Ve(t),null;case 10:return Ha(t.type),Ve(t),null;case 19:if(Ce(We),s=t.memoizedState,s===null)return Ve(t),null;if(o=(t.flags&128)!==0,u=s.rendering,u===null)if(o)Ui(s,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Br(e),u!==null){for(t.flags|=128,Ui(s,!1),e=u.updateQueue,t.updateQueue=e,Zr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Nd(a,e),a=a.sibling;return J(We,We.current&1|2),Se&&qa(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ht()>tl&&(t.flags|=128,o=!0,Ui(s,!1),t.lanes=4194304)}else{if(!o)if(e=Br(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Zr(t,e),Ui(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!Se)return Ve(t),null}else 2*ht()-s.renderingStartTime>tl&&a!==536870912&&(t.flags|=128,o=!0,Ui(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ht(),e.sibling=null,a=We.current,J(We,o?a&1|2:a&1),Se&&qa(t,s.treeForkCount),e):(Ve(t),null);case 22:case 23:return Kt(t),Do(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),a=t.updateQueue,a!==null&&Zr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&Ce(Yn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ha(et),Ve(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function g0(e,t){switch(vo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ha(et),Et(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fa(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(l(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(We),null;case 4:return Et(),null;case 10:return Ha(t.type),null;case 22:case 23:return Kt(t),Do(),e!==null&&Ce(Yn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ha(et),null;case 25:return null;default:return null}}function ih(e,t){switch(vo(t),t.tag){case 3:Ha(et),Et();break;case 26:case 27:case 5:fa(t);break;case 4:Et();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:Ce(We);break;case 10:Ha(t.type);break;case 22:case 23:Kt(t),Do(),e!==null&&Ce(Yn);break;case 24:Ha(et)}}function ki(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var o=s.next;a=o;do{if((a.tag&e)===e){s=void 0;var u=a.create,h=a.inst;s=u(),h.destroy=s}a=a.next}while(a!==o)}}catch(v){ze(t,t.return,v)}}function gn(e,t,a){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var u=o.next;s=u;do{if((s.tag&e)===e){var h=s.inst,v=h.destroy;if(v!==void 0){h.destroy=void 0,o=t;var w=a,O=v;try{O()}catch(k){ze(o,w,k)}}}s=s.next}while(s!==u)}}catch(k){ze(t,t.return,k)}}function rh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Jd(t,a)}catch(s){ze(e,e.return,s)}}}function lh(e,t,a){a.props=Zn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){ze(e,t,s)}}function Mi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(o){ze(e,t,o)}}function Oa(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(o){ze(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){ze(e,t,o)}else a.current=null}function oh(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(o){ze(e,e.return,o)}}function cu(e,t,a){try{var s=e.stateNode;B0(s,e.type,a,t),s[Rt]=t}catch(o){ze(e,e.return,o)}}function uh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sn(e.type)||e.tag===4}function du(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sn(e.type)||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 fu(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ka));else if(s!==4&&(s===27&&Sn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(fu(e,t,a),e=e.sibling;e!==null;)fu(e,t,a),e=e.sibling}function Pr(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&Sn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Pr(e,t,a),e=e.sibling;e!==null;)Pr(e,t,a),e=e.sibling}function ch(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);bt(t,s,a),t[gt]=e,t[Rt]=a}catch(u){ze(e,e.return,u)}}var Ya=!1,nt=!1,hu=!1,dh=typeof WeakSet=="function"?WeakSet:Set,ct=null;function p0(e,t){if(e=e.containerInfo,Uu=yl,e=Sd(e),io(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var o=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var h=0,v=-1,w=-1,O=0,k=0,L=e,j=null;t:for(;;){for(var D;L!==a||o!==0&&L.nodeType!==3||(v=h+o),L!==u||s!==0&&L.nodeType!==3||(w=h+s),L.nodeType===3&&(h+=L.nodeValue.length),(D=L.firstChild)!==null;)j=L,L=D;for(;;){if(L===e)break t;if(j===a&&++O===o&&(v=h),j===u&&++k===s&&(w=h),(D=L.nextSibling)!==null)break;L=j,j=L.parentNode}L=D}a=v===-1||w===-1?null:{start:v,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(ku={focusedElem:e,selectionRange:a},yl=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,s=a.stateNode;try{var Z=Zn(a.type,o);e=s.getSnapshotBeforeUpdate(Z,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(se){ze(a,a.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)qu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}}function fh(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Xa(e,a),s&4&&ki(5,a);break;case 1:if(Xa(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){ze(a,a.return,h)}else{var o=Zn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){ze(a,a.return,h)}}s&64&&rh(a),s&512&&Mi(a,a.return);break;case 3:if(Xa(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Jd(e,t)}catch(h){ze(a,a.return,h)}}break;case 27:t===null&&s&4&&ch(a);case 26:case 5:Xa(e,a),t===null&&s&4&&oh(a),s&512&&Mi(a,a.return);break;case 12:Xa(e,a);break;case 31:Xa(e,a),s&4&&gh(e,a);break;case 13:Xa(e,a),s&4&&ph(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=x0.bind(null,a),Y0(e,a))));break;case 22:if(s=a.memoizedState!==null||Ya,!s){t=t!==null&&t.memoizedState!==null||nt,o=Ya;var u=nt;Ya=s,(nt=t)&&!u?Qa(e,a,(a.subtreeFlags&8772)!==0):Xa(e,a),Ya=o,nt=u}break;case 30:break;default:Xa(e,a)}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vl(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ge=null,Nt=!1;function Ka(e,t,a){for(a=a.child;a!==null;)mh(e,t,a),a=a.sibling}function mh(e,t,a){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(za,a)}catch{}switch(a.tag){case 26:nt||Oa(a,t),Ka(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:nt||Oa(a,t);var s=Ge,o=Nt;Sn(a.type)&&(Ge=a.stateNode,Nt=!1),Ka(e,t,a),Yi(a.stateNode),Ge=s,Nt=o;break;case 5:nt||Oa(a,t);case 6:if(s=Ge,o=Nt,Ge=null,Ka(e,t,a),Ge=s,Nt=o,Ge!==null)if(Nt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(a.stateNode)}catch(u){ze(a,t,u)}else try{Ge.removeChild(a.stateNode)}catch(u){ze(a,t,u)}break;case 18:Ge!==null&&(Nt?(e=Ge,rm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Xs(e)):rm(Ge,a.stateNode));break;case 4:s=Ge,o=Nt,Ge=a.stateNode.containerInfo,Nt=!0,Ka(e,t,a),Ge=s,Nt=o;break;case 0:case 11:case 14:case 15:gn(2,a,t),nt||gn(4,a,t),Ka(e,t,a);break;case 1:nt||(Oa(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&lh(a,t,s)),Ka(e,t,a);break;case 21:Ka(e,t,a);break;case 22:nt=(s=nt)||a.memoizedState!==null,Ka(e,t,a),nt=s;break;default:Ka(e,t,a)}}function gh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xs(e)}catch(a){ze(t,t.return,a)}}}function ph(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xs(e)}catch(a){ze(t,t.return,a)}}function v0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dh),t;default:throw Error(l(435,e.tag))}}function Wr(e,t){var a=v0(e);t.forEach(function(s){if(!a.has(s)){a.add(s);var o=A0.bind(null,e,s);s.then(o,o)}})}function Dt(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var o=a[s],u=e,h=t,v=h;e:for(;v!==null;){switch(v.tag){case 27:if(Sn(v.type)){Ge=v.stateNode,Nt=!1;break e}break;case 5:Ge=v.stateNode,Nt=!1;break e;case 3:case 4:Ge=v.stateNode.containerInfo,Nt=!0;break e}v=v.return}if(Ge===null)throw Error(l(160));mh(u,h,o),Ge=null,Nt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}var pa=null;function vh(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),zt(e),s&4&&(gn(3,e,e.return),ki(3,e),gn(5,e,e.return));break;case 1:Dt(t,e),zt(e),s&512&&(nt||a===null||Oa(a,a.return)),s&64&&Ya&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var o=pa;if(Dt(t,e),zt(e),s&512&&(nt||a===null||Oa(a,a.return)),s&4){var u=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":u=o.getElementsByTagName("title")[0],(!u||u[ui]||u[gt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(s),o.head.insertBefore(u,o.querySelector("head > title"))),bt(u,s,a),u[gt]=e,ut(u),s=u;break e;case"link":var h=vm("link","href",o).get(s+(a.href||""));if(h){for(var v=0;v<h.length;v++)if(u=h[v],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(v,1);break t}}u=o.createElement(s),bt(u,s,a),o.head.appendChild(u);break;case"meta":if(h=vm("meta","content",o).get(s+(a.content||""))){for(v=0;v<h.length;v++)if(u=h[v],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(v,1);break t}}u=o.createElement(s),bt(u,s,a),o.head.appendChild(u);break;default:throw Error(l(468,s))}u[gt]=e,ut(u),s=u}e.stateNode=s}else ym(o,e.type,e.stateNode);else e.stateNode=pm(o,s,e.memoizedProps);else u!==s?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,s===null?ym(o,e.type,e.stateNode):pm(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&cu(e,e.memoizedProps,a.memoizedProps)}break;case 27:Dt(t,e),zt(e),s&512&&(nt||a===null||Oa(a,a.return)),a!==null&&s&4&&cu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Dt(t,e),zt(e),s&512&&(nt||a===null||Oa(a,a.return)),e.flags&32){o=e.stateNode;try{ps(o,"")}catch(Z){ze(e,e.return,Z)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,cu(e,o,a!==null?a.memoizedProps:o)),s&1024&&(hu=!0);break;case 6:if(Dt(t,e),zt(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(Z){ze(e,e.return,Z)}}break;case 3:if(ml=null,o=pa,pa=fl(t.containerInfo),Dt(t,e),pa=o,zt(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{Xs(t.containerInfo)}catch(Z){ze(e,e.return,Z)}hu&&(hu=!1,yh(e));break;case 4:s=pa,pa=fl(e.stateNode.containerInfo),Dt(t,e),zt(e),pa=s;break;case 12:Dt(t,e),zt(e);break;case 31:Dt(t,e),zt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Wr(e,s)));break;case 13:Dt(t,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(el=ht()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Wr(e,s)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,O=Ya,k=nt;if(Ya=O||o,nt=k||w,Dt(t,e),nt=k,Ya=O,zt(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||Ya||nt||Pn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{v=w.stateNode;var L=w.memoizedProps.style,j=L!=null&&L.hasOwnProperty("display")?L.display:null;v.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(Z){ze(w,w.return,Z)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(Z){ze(w,w.return,Z)}}}else if(t.tag===18){if(a===null){w=t;try{var D=w.stateNode;o?lm(D,!0):lm(w.stateNode,!1)}catch(Z){ze(w,w.return,Z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Wr(e,a))));break;case 19:Dt(t,e),zt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Wr(e,s)));break;case 30:break;case 21:break;default:Dt(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(uh(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var o=a.stateNode,u=du(e);Pr(e,u,o);break;case 5:var h=a.stateNode;a.flags&32&&(ps(h,""),a.flags&=-33);var v=du(e);Pr(e,v,h);break;case 3:case 4:var w=a.stateNode.containerInfo,O=du(e);fu(e,O,w);break;default:throw Error(l(161))}}catch(k){ze(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fh(e,t.alternate,t),t=t.sibling}function Pn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gn(4,t,t.return),Pn(t);break;case 1:Oa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&lh(t,t.return,a),Pn(t);break;case 27:Yi(t.stateNode);case 26:case 5:Oa(t,t.return),Pn(t);break;case 22:t.memoizedState===null&&Pn(t);break;case 30:Pn(t);break;default:Pn(t)}e=e.sibling}}function Qa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Qa(o,u,a),ki(4,u);break;case 1:if(Qa(o,u,a),s=u,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(O){ze(s,s.return,O)}if(s=u,o=s.updateQueue,o!==null){var v=s.stateNode;try{var w=o.shared.hiddenCallbacks;
vendor: 7,409 bytes, line 33
33if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)Qd(w[o],v)}catch(O){ze(s,s.return,O)}}a&&h&64&&rh(u),Mi(u,u.return);break;case 27:ch(u);case 26:case 5:Qa(o,u,a),a&&s===null&&h&4&&oh(u),Mi(u,u.return);break;case 12:Qa(o,u,a);break;case 31:Qa(o,u,a),a&&h&4&&gh(o,u);break;case 13:Qa(o,u,a),a&&h&4&&ph(o,u);break;case 22:u.memoizedState===null&&Qa(o,u,a),Mi(u,u.return);break;case 30:break;default:Qa(o,u,a)}t=t.sibling}}function mu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Si(a))}function gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e))}function va(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bh(e,t,a,s),t=t.sibling}function bh(e,t,a,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:va(e,t,a,s),o&2048&&ki(9,t);break;case 1:va(e,t,a,s);break;case 3:va(e,t,a,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e)));break;case 12:if(o&2048){va(e,t,a,s),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,v=u.onPostCommit;typeof v=="function"&&v(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){ze(t,t.return,w)}}else va(e,t,a,s);break;case 31:va(e,t,a,s);break;case 13:va(e,t,a,s);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?va(e,t,a,s):Bi(e,t):u._visibility&2?va(e,t,a,s):(u._visibility|=2,Ms(e,t,a,s,(t.subtreeFlags&10256)!==0||!1)),o&2048&&mu(h,t);break;case 24:va(e,t,a,s),o&2048&&gu(t.alternate,t);break;default:va(e,t,a,s)}}function Ms(e,t,a,s,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,v=a,w=s,O=h.flags;switch(h.tag){case 0:case 11:case 15:Ms(u,h,v,w,o),ki(8,h);break;case 23:break;case 22:var k=h.stateNode;h.memoizedState!==null?k._visibility&2?Ms(u,h,v,w,o):Bi(u,h):(k._visibility|=2,Ms(u,h,v,w,o)),o&&O&2048&&mu(h.alternate,h);break;case 24:Ms(u,h,v,w,o),o&&O&2048&&gu(h.alternate,h);break;default:Ms(u,h,v,w,o)}t=t.sibling}}function Bi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,o=s.flags;switch(s.tag){case 22:Bi(a,s),o&2048&&mu(s.alternate,s);break;case 24:Bi(a,s),o&2048&&gu(s.alternate,s);break;default:Bi(a,s)}t=t.sibling}}var qi=8192;function Bs(e,t,a){if(e.subtreeFlags&qi)for(e=e.child;e!==null;)_h(e,t,a),e=e.sibling}function _h(e,t,a){switch(e.tag){case 26:Bs(e,t,a),e.flags&qi&&e.memoizedState!==null&&nv(a,pa,e.memoizedState,e.memoizedProps);break;case 5:Bs(e,t,a);break;case 3:case 4:var s=pa;pa=fl(e.stateNode.containerInfo),Bs(e,t,a),pa=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=qi,qi=16777216,Bs(e,t,a),qi=s):Bs(e,t,a));break;default:Bs(e,t,a)}}function wh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Li(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];ct=s,Eh(s,e)}wh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sh(e),e=e.sibling}function Sh(e){switch(e.tag){case 0:case 11:case 15:Li(e),e.flags&2048&&gn(9,e,e.return);break;case 3:Li(e);break;case 12:Li(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fr(e)):Li(e);break;default:Li(e)}}function Fr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];ct=s,Eh(s,e)}wh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gn(8,t,t.return),Fr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Fr(t));break;default:Fr(t)}e=e.sibling}}function Eh(e,t){for(;ct!==null;){var a=ct;switch(a.tag){case 0:case 11:case 15:gn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Si(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,ct=s;else e:for(a=e;ct!==null;){s=ct;var o=s.sibling,u=s.return;if(hh(s),s===a){ct=null;break e}if(o!==null){o.return=u,ct=o;break e}ct=u}}}var y0={getCacheForType:function(e){var t=vt(et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return vt(et).controller.signal}},b0=typeof WeakMap=="function"?WeakMap:Map,Re=0,Be=null,ge=null,ve=0,De=0,Xt=null,pn=!1,qs=!1,pu=!1,Ja=0,Ze=0,vn=0,Wn=0,vu=0,Qt=0,Ls=0,Hi=null,Ut=null,yu=!1,el=0,Th=0,tl=1/0,al=null,yn=null,rt=0,bn=null,Hs=null,Za=0,bu=0,_u=null,xh=null,$i=0,wu=null;function Jt(){return(Re&2)!==0&&ve!==0?ve&-ve:C.T!==null?Ou():Hl()}function Ah(){if(Qt===0)if((ve&536870912)===0||Se){var e=V;V<<=1,(V&3932160)===0&&(V=262144),Qt=e}else Qt=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Qt}function kt(e,t,a){(e===Be&&(De===2||De===9)||e.cancelPendingCommit!==null)&&($s(e,0),_n(e,ve,Qt,!1)),Ye(e,a),((Re&2)===0||e!==Be)&&(e===Be&&((Re&2)===0&&(Wn|=a),Ze===4&&_n(e,ve,Qt,!1)),ja(e))}function Oh(e,t,a){if((Re&6)!==0)throw Error(l(327));var s=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ee(e,t),o=s?S0(e,t):Eu(e,t,!0),u=s;do{if(o===0){qs&&!s&&_n(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!_0(a)){o=Eu(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var v=e;o=Hi;var w=v.current.memoizedState.isDehydrated;if(w&&($s(v,h).flags|=256),h=Eu(v,h,!1),h!==2){if(pu&&!w){v.errorRecoveryDisabledLanes|=u,Wn|=u,o=4;break e}u=Ut,Ut=o,u!==null&&(Ut===null?Ut=u:Ut.push.apply(Ut,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){$s(e,0),_n(e,t,0,!0);break}e:{switch(s=e,u=o,u){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:_n(s,t,Qt,!pn);break e;case 2:Ut=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(o=el+300-ht(),10<o)){if(_n(s,t,Qt,!pn),X(s,0,!0)!==0)break e;Za=t,s.timeoutHandle=sm(jh.bind(null,s,a,Ut,al,yu,t,Qt,Wn,Ls,pn,u,"Throttled",-0,0),o);break e}jh(s,a,Ut,al,yu,t,Qt,Wn,Ls,pn,u,null,-0,0)}}break}while(!0);ja(e)}function jh(e,t,a,s,o,u,h,v,w,O,k,L,j,D){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ka},_h(t,u,L);var Z=(u&62914560)===u?el-ht():(u&4194048)===u?Th-ht():0;if(Z=sv(L,Z),Z!==null){Za=u,e.cancelPendingCommit=Z(Mh.bind(null,e,t,u,a,s,o,h,v,w,k,L,null,j,D)),_n(e,u,h,!O);return}}Mh(e,t,u,a,s,o,h,v,w)}function _0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var o=a[s],u=o.getSnapshot;o=o.value;try{if(!Gt(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 _n(e,t,a,s){t&=~vu,t&=~Wn,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var u=31-_(o),h=1<<u;s[u]=-1,o&=~h}a!==0&&kn(e,a,t)}function nl(){return(Re&6)===0?(Vi(0),!1):!0}
vendor: 4,824 bytes, line 33
33function Su(){if(ge!==null){if(De===0)var e=ge.return;else e=ge,La=Gn=null,qo(e),Ns=null,Ti=0,e=ge;for(;e!==null;)ih(e.alternate,e),e=e.return;ge=null}}function $s(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,H0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Za=0,Su(),Be=e,ge=a=Ba(e.current,null),ve=t,De=0,Xt=null,pn=!1,qs=Ee(e,t),pu=!1,Ls=Qt=vu=Wn=vn=Ze=0,Ut=Hi=null,yu=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-_(s),u=1<<o;t|=e[o],s&=~u}return Ja=t,Tr(),a}function Rh(e,t){de=null,C.H=Di,t===Cs||t===Dr?(t=Id(),De=3):t===Ao?(t=Id(),De=4):De=t===eu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Xt=t,ge===null&&(Ze=1,Kr(e,sa(t,e.current)))}function Ch(){var e=Yt.current;return e===null?!0:(ve&4194048)===ve?oa===null:(ve&62914560)===ve||(ve&536870912)!==0?e===oa:!1}function Nh(){var e=C.H;return C.H=Di,e===null?Di:e}function Dh(){var e=C.A;return C.A=y0,e}function sl(){Ze=4,pn||(ve&4194048)!==ve&&Yt.current!==null||(qs=!0),(vn&134217727)===0&&(Wn&134217727)===0||Be===null||_n(Be,ve,Qt,!1)}function Eu(e,t,a){var s=Re;Re|=2;var o=Nh(),u=Dh();(Be!==e||ve!==t)&&(al=null,$s(e,t)),t=!1;var h=Ze;e:do try{if(De!==0&&ge!==null){var v=ge,w=Xt;switch(De){case 8:Su(),h=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var O=De;if(De=0,Xt=null,Vs(e,v,w,O),a&&qs){h=0;break e}break;default:O=De,De=0,Xt=null,Vs(e,v,w,O)}}w0(),h=Ze;break}catch(k){Rh(e,k)}while(!0);return t&&e.shellSuspendCounter++,La=Gn=null,Re=s,C.H=o,C.A=u,ge===null&&(Be=null,ve=0,Tr()),h}function w0(){for(;ge!==null;)zh(ge)}function S0(e,t){var a=Re;Re|=2;var s=Nh(),o=Dh();Be!==e||ve!==t?(al=null,tl=ht()+500,$s(e,t)):qs=Ee(e,t);e:do try{if(De!==0&&ge!==null){t=ge;var u=Xt;t:switch(De){case 1:De=0,Xt=null,Vs(e,t,u,1);break;case 2:case 9:if(Vd(u)){De=0,Xt=null,Uh(t);break}t=function(){De!==2&&De!==9||Be!==e||(De=7),ja(e)},u.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Vd(u)?(De=0,Xt=null,Uh(t)):(De=0,Xt=null,Vs(e,t,u,7));break;case 5:var h=null;switch(ge.tag){case 26:h=ge.memoizedState;case 5:case 27:var v=ge;if(h?bm(h):v.stateNode.complete){De=0,Xt=null;var w=v.sibling;if(w!==null)ge=w;else{var O=v.return;O!==null?(ge=O,il(O)):ge=null}break t}}De=0,Xt=null,Vs(e,t,u,5);break;case 6:De=0,Xt=null,Vs(e,t,u,6);break;case 8:Su(),Ze=6;break e;default:throw Error(l(462))}}E0();break}catch(k){Rh(e,k)}while(!0);return La=Gn=null,C.H=s,C.A=o,Re=a,ge!==null?0:(Be=null,ve=0,Tr(),Ze)}function E0(){for(;ge!==null&&!ft();)zh(ge)}function zh(e){var t=nh(e.alternate,e,Ja);e.memoizedProps=e.pendingProps,t===null?il(e):ge=t}function Uh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Pf(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=Pf(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:qo(t);default:ih(a,t),t=ge=Nd(t,Ja),t=nh(a,t,Ja)}e.memoizedProps=e.pendingProps,t===null?il(e):ge=t}function Vs(e,t,a,s){La=Gn=null,qo(t),Ns=null,Ti=0;var o=t.return;try{if(d0(e,o,t,a,ve)){Ze=1,Kr(e,sa(a,e.current)),ge=null;return}}catch(u){if(o!==null)throw ge=o,u;Ze=1,Kr(e,sa(a,e.current)),ge=null;return}t.flags&32768?(Se||s===1?e=!0:qs||(ve&536870912)!==0?e=!1:(pn=e=!0,(s===2||s===9||s===3||s===6)&&(s=Yt.current,s!==null&&s.tag===13&&(s.flags|=16384))),kh(t,e)):il(t)}function il(e){var t=e;do{if((t.flags&32768)!==0){kh(t,pn);return}e=t.return;var a=m0(t.alternate,t,Ja);if(a!==null){ge=a;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Ze===0&&(Ze=5)}function kh(e,t){do{var a=g0(e.alternate,e);if(a!==null){a.flags&=32767,ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=a}while(e!==null);Ze=6,ge=null}function Mh(e,t,a,s,o,u,h,v,w){e.cancelPendingCommit=null;do rl();while(rt!==0);if((Re&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(u=t.lanes|t.childLanes,u|=co,At(e,a,u,h,v,w),e===Be&&(ge=Be=null,ve=0),Hs=t,bn=e,Za=a,bu=u,_u=o,xh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,O0(Da,function(){return $h(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=C.T,C.T=null,o=G.p,G.p=2,h=Re,Re|=4;try{p0(e,t,a)}finally{Re=h,G.p=o,C.T=s}}rt=1,Bh(),qh(),Lh()}}function Bh(){if(rt===1){rt=0;var e=bn,t=Hs,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=C.T,C.T=null;var s=G.p;G.p=2;var o=Re;Re|=4;try{vh(t,e);var u=ku,h=Sd(e.containerInfo),v=u.focusedElem,w=u.selectionRange;if(h!==v&&v&&v.ownerDocument&&wd(v.ownerDocument.documentElement,v)){if(w!==null&&io(v)){var O=w.start,k=w.end;if(k===void 0&&(k=O),"selectionStart"in v)v.selectionStart=O,v.selectionEnd=Math.min(k,v.value.length);else{var L=v.ownerDocument||document,j=L&&L.defaultView||window;
vendor: 17,091 bytes, lines 33-34
33if(j.getSelection){var D=j.getSelection(),Z=v.textContent.length,se=Math.min(w.start,Z),Me=w.end===void 0?se:Math.min(w.end,Z);!D.extend&&se>Me&&(h=Me,Me=se,se=h);var x=_d(v,se),E=_d(v,Me);if(x&&E&&(D.rangeCount!==1||D.anchorNode!==x.node||D.anchorOffset!==x.offset||D.focusNode!==E.node||D.focusOffset!==E.offset)){var A=L.createRange();A.setStart(x.node,x.offset),D.removeAllRanges(),se>Me?(D.addRange(A),D.extend(E.node,E.offset)):(A.setEnd(E.node,E.offset),D.addRange(A))}}}}for(L=[],D=v;D=D.parentNode;)D.nodeType===1&&L.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<L.length;v++){var q=L[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}yl=!!Uu,ku=Uu=null}finally{Re=o,G.p=s,C.T=a}}e.current=t,rt=2}}function qh(){if(rt===2){rt=0;var e=bn,t=Hs,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=C.T,C.T=null;var s=G.p;G.p=2;var o=Re;Re|=4;try{fh(e,t.alternate,t)}finally{Re=o,G.p=s,C.T=a}}rt=3}}function Lh(){if(rt===4||rt===3){rt=0,Ea();var e=bn,t=Hs,a=Za,s=xh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,Hs=bn=null,Hh(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(yn=null),ma(a),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(za,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=C.T,o=G.p,G.p=2,C.T=null;try{for(var u=e.onRecoverableError,h=0;h<s.length;h++){var v=s[h];u(v.value,{componentStack:v.stack})}}finally{C.T=t,G.p=o}}(Za&3)!==0&&rl(),ja(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===wu?$i++:($i=0,wu=e):$i=0,Vi(0)}}function Hh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Si(t)))}function rl(){return Bh(),qh(),Lh(),$h()}function $h(){if(rt!==5)return!1;var e=bn,t=bu;bu=0;var a=ma(Za),s=C.T,o=G.p;try{G.p=32>a?32:a,C.T=null,a=_u,_u=null;var u=bn,h=Za;if(rt=0,Hs=bn=null,Za=0,(Re&6)!==0)throw Error(l(331));var v=Re;if(Re|=4,Sh(u.current),bh(u,u.current,h,a),Re=v,Vi(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(za,u)}catch{}return!0}finally{G.p=o,C.T=s,Hh(e,t)}}function Vh(e,t,a){t=sa(a,t),t=Fo(e.stateNode,t,2),e=fn(e,t,2),e!==null&&(Ye(e,2),ja(e))}function ze(e,t,a){if(e.tag===3)Vh(e,e,a);else for(;t!==null;){if(t.tag===3){Vh(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(yn===null||!yn.has(s))){e=sa(a,e),a=Gf(2),s=fn(t,a,2),s!==null&&(If(a,s,t,e),Ye(s,2),ja(s));break}}t=t.return}}function Tu(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new b0;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(a)||(pu=!0,o.add(a),e=T0.bind(null,e,t,a),t.then(e,e))}function T0(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Be===e&&(ve&a)===a&&(Ze===4||Ze===3&&(ve&62914560)===ve&&300>ht()-el?(Re&2)===0&&$s(e,0):vu|=a,Ls===ve&&(Ls=0)),ja(e)}function Gh(e,t){t===0&&(t=St()),e=Hn(e,t),e!==null&&(Ye(e,t),ja(e))}function x0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Gh(e,a)}function A0(e,t){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(t),Gh(e,a)}function O0(e,t){return Dn(e,t)}var ll=null,Gs=null,xu=!1,ol=!1,Au=!1,wn=0;function ja(e){e!==Gs&&e.next===null&&(Gs===null?ll=Gs=e:Gs=Gs.next=e),ol=!0,xu||(xu=!0,R0())}function Vi(e,t){if(!Au&&ol){Au=!0;do for(var a=!1,s=ll;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var u=0;else{var h=s.suspendedLanes,v=s.pingedLanes;u=(1<<31-_(42|e)+1)-1,u&=o&~(h&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Xh(s,u))}else u=ve,u=X(s,s===Be?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||Ee(s,u)||(a=!0,Xh(s,u));s=s.next}while(a);Au=!1}}function j0(){Ih()}function Ih(){ol=xu=!1;var e=0;wn!==0&&L0()&&(e=wn);for(var t=ht(),a=null,s=ll;s!==null;){var o=s.next,u=Yh(s,t);u===0?(s.next=null,a===null?ll=o:a.next=o,o===null&&(Gs=a)):(a=s,(e!==0||(u&3)!==0)&&(ol=!0)),s=o}rt!==0&&rt!==5||Vi(e),wn!==0&&(wn=0)}function Yh(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-_(u),v=1<<h,w=o[h];w===-1?((v&a)===0||(v&s)!==0)&&(o[h]=Qe(v,t)):w<=t&&(e.expiredLanes|=v),u&=~v}if(t=Be,a=ve,a=X(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&zn(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ee(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&zn(s),ma(a)){case 2:case 8:a=ls;break;case 32:a=Da;break;case 268435456:a=ha;break;default:a=Da}return s=Kh.bind(null,e),a=Dn(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&zn(s),e.callbackPriority=2,e.callbackNode=null,2}function Kh(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(rl()&&e.callbackNode!==a)return null;var s=ve;return s=X(e,e===Be?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Oh(e,s,t),Yh(e,ht()),e.callbackNode!=null&&e.callbackNode===a?Kh.bind(null,e):null)}function Xh(e,t){if(rl())return null;Oh(e,t,!0)}function R0(){$0(function(){(Re&6)!==0?Dn(Na,j0):Ih()})}function Ou(){if(wn===0){var e=js;e===0&&(e=K,K<<=1,(K&261888)===0&&(K=256)),wn=e}return wn}function Qh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pr(""+e)}function Jh(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function C0(e,t,a,s,o){if(t==="submit"&&a&&a.stateNode===o){var u=Qh((o[Rt]||null).action),h=s.submitter;h&&(t=(t=h[Rt]||null)?Qh(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var v=new _r("action","action",null,s,o);e.push({event:v,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(wn!==0){var w=h?Jh(o,h):new FormData(o);Xo(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(v.preventDefault(),w=h?Jh(o,h):new FormData(o),Xo(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var ju=0;ju<uo.length;ju++){var Ru=uo[ju],N0=Ru.toLowerCase(),D0=Ru[0].toUpperCase()+Ru.slice(1);ga(N0,"on"+D0)}ga(xd,"onAnimationEnd"),ga(Ad,"onAnimationIteration"),ga(Od,"onAnimationStart"),ga("dblclick","onDoubleClick"),ga("focusin","onFocus"),ga("focusout","onBlur"),ga(Qp,"onTransitionRun"),ga(Jp,"onTransitionStart"),ga(Zp,"onTransitionCancel"),ga(jd,"onTransitionEnd"),ms("onMouseEnter",["mouseout","mouseover"]),ms("onMouseLeave",["mouseout","mouseover"]),ms("onPointerEnter",["pointerout","pointerover"]),ms("onPointerLeave",["pointerout","pointerover"]),Mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="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(" "),z0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gi));function Zh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],o=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var h=s.length-1;0<=h;h--){var v=s[h],w=v.instance,O=v.currentTarget;if(v=v.listener,w!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=O;try{u(o)}catch(k){Er(k)}o.currentTarget=null,u=w}else for(h=0;h<s.length;h++){if(v=s[h],w=v.instance,O=v.currentTarget,v=v.listener,w!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=O;try{u(o)}catch(k){Er(k)}o.currentTarget=null,u=w}}}}function pe(e,t){var a=t[$l];a===void 0&&(a=t[$l]=new Set);var s=e+"__bubble";a.has(s)||(Ph(t,e,2,!1),a.add(s))}function Cu(e,t,a){var s=0;t&&(s|=4),Ph(a,e,s,t)}var ul="_reactListening"+Math.random().toString(36).slice(2);function Nu(e){if(!e[ul]){e[ul]=!0,Gc.forEach(function(a){a!=="selectionchange"&&(z0.has(a)||Cu(a,!1,e),Cu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ul]||(t[ul]=!0,Cu("selectionchange",!1,t))}}function Ph(e,t,a,s){switch(Am(t)){case 2:var o=lv;break;case 8:o=ov;break;default:o=Ku}a=o.bind(null,t,a,e),o=void 0,!Zl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Du(e,t,a,s,o){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var v=s.stateNode.containerInfo;if(v===o)break;if(h===4)for(h=s.return;h!==null;){var w=h.tag;if((w===3||w===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;v!==null;){if(h=ds(v),h===null)return;if(w=h.tag,w===5||w===6||w===26||w===27){s=u=h;continue e}v=v.parentNode}}s=s.return}td(function(){var O=u,k=Ql(a),L=[];e:{var j=Rd.get(e);if(j!==void 0){var D=_r,Z=e;switch(e){case"keypress":if(yr(a)===0)break e;case"keydown":case"keyup":D=Ap;break;case"focusin":Z="focus",D=eo;break;case"focusout":Z="blur",D=eo;break;case"beforeblur":case"afterblur":D=eo;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=mp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Rp;break;case xd:case Ad:case Od:D=vp;break;case jd:D=Np;break;case"scroll":case"scrollend":D=fp;break;case"wheel":D=zp;break;case"copy":case"cut":case"paste":D=bp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=rd;break;case"toggle":case"beforetoggle":D=kp}var se=(t&4)!==0,Me=!se&&(e==="scroll"||e==="scrollend"),x=se?j!==null?j+"Capture":null:j;se=[];for(var E=O,A;E!==null;){var q=E;if(A=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||A===null||x===null||(q=di(E,x),q!=null&&se.push(Ii(E,q,A))),Me)break;E=E.return}0<se.length&&(j=new D(j,Z,null,a,k),L.push({event:j,listeners:se}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",j&&a!==Xl&&(Z=a.relatedTarget||a.fromElement)&&(ds(Z)||Z[cs]))break e;if((D||j)&&(j=k.window===k?k:(j=k.ownerDocument)?j.defaultView||j.parentWindow:window,D?(Z=a.relatedTarget||a.toElement,D=O,Z=Z?ds(Z):null,Z!==null&&(Me=d(Z),se=Z.tag,Z!==Me||se!==5&&se!==27&&se!==6)&&(Z=null)):(D=null,Z=O),D!==Z)){if(se=sd,q="onMouseLeave",x="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(se=rd,q="onPointerLeave",x="onPointerEnter",E="pointer"),Me=D==null?j:ci(D),A=Z==null?j:ci(Z),j=new se(q,E+"leave",D,a,k),j.target=Me,j.relatedTarget=A,q=null,ds(k)===O&&(se=new se(x,E+"enter",Z,a,k),se.target=A,se.relatedTarget=Me,q=se),Me=q,D&&Z)t:{for(se=U0,x=D,E=Z,A=0,q=x;q;q=se(q))A++;q=0;for(var ae=E;ae;ae=se(ae))q++;for(;0<A-q;)x=se(x),A--;for(;0<q-A;)E=se(E),q--;for(;A--;){if(x===E||E!==null&&x===E.alternate){se=x;break t}x=se(x),E=se(E)}se=null}else se=null;D!==null&&Wh(L,j,D,se,!1),Z!==null&&Me!==null&&Wh(L,Me,Z,se,!0)}}e:{if(j=O?ci(O):window,D=j.nodeName&&j.nodeName.toLowerCase(),D==="select"||D==="input"&&j.type==="file")var Te=md;else if(fd(j))if(gd)Te=Yp;else{Te=Gp;var W=Vp}else D=j.nodeName,!D||D.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?O&&Kl(O.elementType)&&(Te=md):Te=Ip;if(Te&&(Te=Te(e,O))){hd(L,Te,a,k);break e}W&&W(e,j,O),e==="focusout"&&O&&j.type==="number"&&O.memoizedProps.value!=null&&Yl(j,"number",j.value)}switch(W=O?ci(O):window,e){case"focusin":(fd(W)||W.contentEditable==="true")&&(_s=W,ro=O,bi=null);break;case"focusout":bi=ro=_s=null;break;case"mousedown":lo=!0;break;case"contextmenu":case"mouseup":case"dragend":lo=!1,Ed(L,a,k);break;case"selectionchange":if(Xp)break;case"keydown":case"keyup":Ed(L,a,k)}var fe;if(ao)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else bs?cd(e,a)&&(ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ye="onCompositionStart");ye&&(ld&&a.locale!=="ko"&&(bs||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&bs&&(fe=ad()):(sn=k,Pl="value"in sn?sn.value:sn.textContent,bs=!0)),W=cl(O,ye),0<W.length&&(ye=new id(ye,e,null,a,k),L.push({event:ye,listeners:W}),fe?ye.data=fe:(fe=dd(a),fe!==null&&(ye.data=fe)))),(fe=Bp?qp(e,a):Lp(e,a))&&(ye=cl(O,"onBeforeInput"),0<ye.length&&(W=new id("onBeforeInput","beforeinput",null,a,k),L.push({event:W,listeners:ye}),W.data=fe)),C0(L,e,O,a,k)}Zh(L,t)})}function Ii(e,t,a){return{instance:e,listener:t,currentTarget:a}}function cl(e,t){for(var a=t+"Capture",s=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=di(e,a),o!=null&&s.unshift(Ii(e,o,u)),o=di(e,t),o!=null&&s.push(Ii(e,o,u))),e.tag===3)return s;e=e.return}return[]}function U0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wh(e,t,a,s,o){for(var u=t._reactName,h=[];a!==null&&a!==s;){var v=a,w=v.alternate,O=v.stateNode;if(v=v.tag,w!==null&&w===s)break;v!==5&&v!==26&&v!==27||O===null||(w=O,o?(O=di(a,u),O!=null&&h.unshift(Ii(a,O,w))):o||(O=di(a,u),O!=null&&h.push(Ii(a,O,w)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var k0=/\r\n?/g,M0=/\u0000|\uFFFD/g;function Fh(e){return(typeof e=="string"?e:""+e).replace(k0,` 34`).replace(M0,"")}function em(e,t){return t=Fh(t),Fh(e)===t}function ke(e,t,a,s,o,u){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ps(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ps(e,""+s);break;case"className":mr(e,"class",s);break;case"tabIndex":mr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":mr(e,a,s);break;case"style":Fc(e,s,u);break;case"data":if(t!=="object"){mr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=pr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&ke(e,t,"name",o.name,o,null),ke(e,t,"formEncType",o.formEncType,o,null),ke(e,t,"formMethod",o.formMethod,o,null),ke(e,t,"formTarget",o.formTarget,o,null)):(ke(e,t,"encType",o.encType,o,null),ke(e,t,"method",o.method,o,null),ke(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=pr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=ka);break;case"onScroll":s!=null&&pe("scroll",e);break;case"onScrollEnd":s!=null&&pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=pr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
34ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":pe("beforetoggle",e),pe("toggle",e),hr(e,"popover",s);break;case"xlinkActuate":Ua(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ua(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ua(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ua(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ua(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ua(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ua(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ua(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ua(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;
vendor: 7,150 bytes, line 34
34case"is":hr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=cp.get(a)||a,hr(e,a,s))}}function zu(e,t,a,s,o,u){switch(a){case"style":Fc(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"children":typeof s=="string"?ps(e,s):(typeof s=="number"||typeof s=="bigint")&&ps(e,""+s);break;case"onScroll":s!=null&&pe("scroll",e);break;case"onScrollEnd":s!=null&&pe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ka);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ic.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[Rt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof s=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,o);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):hr(e,a,s)}}}function bt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("load",e);var s=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var h=a[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ke(e,t,u,h,a,null)}}o&&ke(e,t,"srcSet",a.srcSet,a,null),s&&ke(e,t,"src",a.src,a,null);return;case"input":pe("invalid",e);var v=u=h=o=null,w=null,O=null;for(s in a)if(a.hasOwnProperty(s)){var k=a[s];if(k!=null)switch(s){case"name":o=k;break;case"type":h=k;break;case"checked":w=k;break;case"defaultChecked":O=k;break;case"value":u=k;break;case"defaultValue":v=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(l(137,t));break;default:ke(e,t,s,k,a,null)}}Jc(e,u,v,w,O,h,o,!1);return;case"select":pe("invalid",e),s=h=u=null;for(o in a)if(a.hasOwnProperty(o)&&(v=a[o],v!=null))switch(o){case"value":u=v;break;case"defaultValue":h=v;break;case"multiple":s=v;default:ke(e,t,o,v,a,null)}t=u,a=h,e.multiple=!!s,t!=null?gs(e,!!s,t,!1):a!=null&&gs(e,!!s,a,!0);return;case"textarea":pe("invalid",e),u=o=s=null;for(h in a)if(a.hasOwnProperty(h)&&(v=a[h],v!=null))switch(h){case"value":s=v;break;case"defaultValue":o=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(l(91));break;default:ke(e,t,h,v,a,null)}Pc(e,s,o,u);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(s=a[w],s!=null))switch(w){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ke(e,t,w,s,a,null)}return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(s=0;s<Gi.length;s++)pe(Gi[s],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in a)if(a.hasOwnProperty(O)&&(s=a[O],s!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:ke(e,t,O,s,a,null)}return;default:if(Kl(t)){for(k in a)a.hasOwnProperty(k)&&(s=a[k],s!==void 0&&zu(e,t,k,s,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(s=a[v],s!=null&&ke(e,t,v,s,a,null))}function B0(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,v=null,w=null,O=null,k=null;for(D in a){var L=a[D];if(a.hasOwnProperty(D)&&L!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":w=L;default:s.hasOwnProperty(D)||ke(e,t,D,null,s,L)}}for(var j in s){var D=s[j];if(L=a[j],s.hasOwnProperty(j)&&(D!=null||L!=null))switch(j){case"type":u=D;break;case"name":o=D;break;case"checked":O=D;break;case"defaultChecked":k=D;break;case"value":h=D;break;case"defaultValue":v=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(l(137,t));break;default:D!==L&&ke(e,t,j,D,s,L)}}Il(e,h,v,w,O,k,u,o);return;case"select":D=h=v=j=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":D=w;default:s.hasOwnProperty(u)||ke(e,t,u,null,s,w)}for(o in s)if(u=s[o],w=a[o],s.hasOwnProperty(o)&&(u!=null||w!=null))switch(o){case"value":j=u;break;case"defaultValue":v=u;break;case"multiple":h=u;default:u!==w&&ke(e,t,o,u,s,w)}t=v,a=h,s=D,j!=null?gs(e,!!a,j,!1):!!s!=!!a&&(t!=null?gs(e,!!a,t,!0):gs(e,!!a,a?[]:"",!1));return;case"textarea":D=j=null;for(v in a)if(o=a[v],a.hasOwnProperty(v)&&o!=null&&!s.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:ke(e,t,v,null,s,o)}for(h in s)if(o=s[h],u=a[h],s.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":j=o;break;case"defaultValue":D=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==u&&ke(e,t,h,o,s,u)}Zc(e,j,D);return;case"option":for(var Z in a)if(j=a[Z],a.hasOwnProperty(Z)&&j!=null&&!s.hasOwnProperty(Z))switch(Z){case"selected":e.selected=!1;break;default:ke(e,t,Z,null,s,j)}for(w in s)if(j=s[w],D=a[w],s.hasOwnProperty(w)&&j!==D&&(j!=null||D!=null))switch(w){case"selected":e.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:ke(e,t,w,j,s,D)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in a)j=a[se],a.hasOwnProperty(se)&&j!=null&&!s.hasOwnProperty(se)&&ke(e,t,se,null,s,j);for(O in s)if(j=s[O],D=a[O],s.hasOwnProperty(O)&&j!==D&&(j!=null||D!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(l(137,t));break;default:ke(e,t,O,j,s,D)}return;default:if(Kl(t)){for(var Me in a)j=a[Me],a.hasOwnProperty(Me)&&j!==void 0&&!s.hasOwnProperty(Me)&&zu(e,t,Me,void 0,s,j);for(k in s)j=s[k],D=a[k],!s.hasOwnProperty(k)||j===D||j===void 0&&D===void 0||zu(e,t,k,j,s,D);return}}for(var x in a)j=a[x],a.hasOwnProperty(x)&&j!=null&&!s.hasOwnProperty(x)&&ke(e,t,x,null,s,j);for(L in s)j=s[L],D=a[L],!s.hasOwnProperty(L)||j===D||j==null&&D==null||ke(e,t,L,j,s,D)}function tm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function q0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var o=a[s],u=o.transferSize,h=o.initiatorType,v=o.duration;if(u&&v&&tm(h)){for(h=0,v=o.responseEnd,s+=1;s<a.length;s++){var w=a[s],O=w.startTime;if(O>v)break;var k=w.transferSize,L=w.initiatorType;k&&tm(L)&&(w=w.responseEnd,h+=k*(w<v?1:(v-O)/(w-O)))}if(--s,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Uu=null,ku=null;
vendor: 14,014 bytes, line 34
34function dl(e){return e.nodeType===9?e:e.ownerDocument}function am(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function nm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Mu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bu=null;function L0(){var e=window.event;return e&&e.type==="popstate"?e===Bu?!1:(Bu=e,!0):(Bu=null,!1)}var sm=typeof setTimeout=="function"?setTimeout:void 0,H0=typeof clearTimeout=="function"?clearTimeout:void 0,im=typeof Promise=="function"?Promise:void 0,$0=typeof queueMicrotask=="function"?queueMicrotask:typeof im<"u"?function(e){return im.resolve(null).then(e).catch(V0)}:sm;function V0(e){setTimeout(function(){throw e})}function Sn(e){return e==="head"}function rm(e,t){var a=t,s=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(o),Xs(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")Yi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Yi(a);for(var u=a.firstChild;u;){var h=u.nextSibling,v=u.nodeName;u[ui]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=h}}else a==="body"&&Yi(e.ownerDocument.body);a=o}while(a);Xs(t)}function lm(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function qu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qu(a),Vl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function G0(e,t,a,s){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[ui])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=ua(e.nextSibling),e===null)break}return null}function I0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ua(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ua(e.nextSibling),e===null))return null;return e}function Lu(e){return e.data==="$?"||e.data==="$~"}function Hu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function ua(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var $u=null;function um(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ua(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function cm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function dm(e,t,a){switch(t=dl(a),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Yi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vl(e)}var ca=new Map,fm=new Set;function fl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pa=G.d;G.d={f:K0,r:X0,D:Q0,C:J0,L:Z0,m:P0,X:F0,S:W0,M:ev};function K0(){var e=Pa.f(),t=nl();return e||t}function X0(e){var t=fs(e);t!==null&&t.tag===5&&t.type==="form"?Rf(t):Pa.r(e)}var Is=typeof document>"u"?null:document;function hm(e,t,a){var s=Is;if(s&&typeof t=="string"&&t){var o=aa(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),fm.has(o)||(fm.add(o),e={rel:e,crossOrigin:a,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),bt(t,"link",e),ut(t),s.head.appendChild(t)))}}function Q0(e){Pa.D(e),hm("dns-prefetch",e,null)}function J0(e,t){Pa.C(e,t),hm("preconnect",e,t)}function Z0(e,t,a){Pa.L(e,t,a);var s=Is;if(s&&e&&t){var o='link[rel="preload"][as="'+aa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+aa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+aa(a.imageSizes)+'"]')):o+='[href="'+aa(e)+'"]';var u=o;switch(t){case"style":u=Ys(e);break;case"script":u=Ks(e)}ca.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ca.set(u,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(Ki(u))||t==="script"&&s.querySelector(Xi(u))||(t=s.createElement("link"),bt(t,"link",e),ut(t),s.head.appendChild(t)))}}function P0(e,t){Pa.m(e,t);var a=Is;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+aa(s)+'"][href="'+aa(e)+'"]',u=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ks(e)}if(!ca.has(u)&&(e=y({rel:"modulepreload",href:e},t),ca.set(u,e),a.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Xi(u)))return}s=a.createElement("link"),bt(s,"link",e),ut(s),a.head.appendChild(s)}}}function W0(e,t,a){Pa.S(e,t,a);var s=Is;if(s&&e){var o=hs(s).hoistableStyles,u=Ys(e);t=t||"default";var h=o.get(u);if(!h){var v={loading:0,preload:null};if(h=s.querySelector(Ki(u)))v.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ca.get(u))&&Vu(e,a);var w=h=s.createElement("link");ut(w),bt(w,"link",e),w._p=new Promise(function(O,k){w.onload=O,w.onerror=k}),w.addEventListener("load",function(){v.loading|=1}),w.addEventListener("error",function(){v.loading|=2}),v.loading|=4,hl(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:v},o.set(u,h)}}}function F0(e,t){Pa.X(e,t);var a=Is;if(a&&e){var s=hs(a).hoistableScripts,o=Ks(e),u=s.get(o);u||(u=a.querySelector(Xi(o)),u||(e=y({src:e,async:!0},t),(t=ca.get(o))&&Gu(e,t),u=a.createElement("script"),ut(u),bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function ev(e,t){Pa.M(e,t);var a=Is;if(a&&e){var s=hs(a).hoistableScripts,o=Ks(e),u=s.get(o);u||(u=a.querySelector(Xi(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=ca.get(o))&&Gu(e,t),u=a.createElement("script"),ut(u),bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function mm(e,t,a,s){var o=(o=Ie.current)?fl(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ys(a.href),a=hs(o).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ys(a.href);var u=hs(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(Ki(e)))&&!u._p&&(h.instance=u,h.state.loading=5),ca.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ca.set(e,a),u||tv(o,e,a,h.state))),t&&s===null)throw Error(l(528,""));return h}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ks(a),a=hs(o).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Ys(e){return'href="'+aa(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function gm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function tv(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),bt(t,"link",a),ut(t),e.head.appendChild(t))}function Ks(e){return'[src="'+aa(e)+'"]'}function Xi(e){return"script[async]"+e}function pm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+aa(a.href)+'"]');if(s)return t.instance=s,ut(s),s;var o=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),bt(s,"style",o),hl(s,a.precedence,e),t.instance=s;case"stylesheet":o=Ys(a.href);var u=e.querySelector(Ki(o));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;s=gm(a),(o=ca.get(o))&&Vu(s,o),u=(e.ownerDocument||e).createElement("link"),ut(u);var h=u;return h._p=new Promise(function(v,w){h.onload=v,h.onerror=w}),bt(u,"link",s),t.state.loading|=4,hl(u,a.precedence,e),t.instance=u;case"script":return u=Ks(a.src),(o=e.querySelector(Xi(u)))?(t.instance=o,ut(o),o):(s=a,(o=ca.get(u))&&(s=y({},a),Gu(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),ut(o),bt(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,hl(s,a.precedence,e));return t.instance}function hl(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,u=o,h=0;h<s.length;h++){var v=s[h];if(v.dataset.precedence===t)u=v;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Vu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ml=null;function vm(e,t,a){if(ml===null){var s=new Map,o=ml=new Map;o.set(a,s)}else o=ml,s=o.get(a),s||(s=new Map,o.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[ui]||u[gt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var v=s.get(h);v?v.push(u):s.set(h,[u])}}return s}function ym(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function av(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function bm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function nv(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Ys(s.href),u=t.querySelector(Ki(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=gl.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,ut(u);return}u=t.ownerDocument||t,s=gm(s),(o=ca.get(o))&&Vu(s,o),u=u.createElement("link"),ut(u);var h=u;h._p=new Promise(function(v,w){h.onload=v,h.onerror=w}),bt(u,"link",s),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=gl.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Iu=0;function sv(e,t){return e.stylesheets&&e.count===0&&vl(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&vl(e,e.stylesheets),e.unsu
vendor: 10,524 bytes, line 34
34spend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Iu===0&&(Iu=62500*q0());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vl(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Iu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function gl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pl=null;function vl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pl=new Map,t.forEach(iv,e),pl=null,gl.call(e))}function iv(e,t){if(!(t.state.loading&4)){var a=pl.get(e);if(a)var s=a.get(null);else{a=new Map,pl.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),s=h)}s&&a.set(null,s)}o=t.instance,h=o.getAttribute("data-precedence"),u=a.get(h)||s,u===s&&a.set(null,o),a.set(h,o),this.count++,s=gl.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Qi={$$typeof:I,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function rv(e,t,a,s,o,u,h,v,w){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=an(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.hiddenUpdates=an(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function _m(e,t,a,s,o,u,h,v,w,O,k,L){return e=new rv(e,t,a,h,w,O,k,L,v),t=1,u===!0&&(t|=24),u=It(3,null,null,t),e.current=u,u.stateNode=e,t=Eo(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:a,cache:t},Oo(u),e}function wm(e){return e?(e=Es,e):Es}function Sm(e,t,a,s,o,u){o=wm(o),s.context===null?s.context=o:s.pendingContext=o,s=dn(t),s.payload={element:a},u=u===void 0?null:u,u!==null&&(s.callback=u),a=fn(e,s,t),a!==null&&(kt(a,e,t),Ai(a,e,t))}function Em(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Yu(e,t){Em(e,t),(e=e.alternate)&&Em(e,t)}function Tm(e){if(e.tag===13||e.tag===31){var t=Hn(e,67108864);t!==null&&kt(t,e,67108864),Yu(e,67108864)}}function xm(e){if(e.tag===13||e.tag===31){var t=Jt();t=us(t);var a=Hn(e,t);a!==null&&kt(a,e,t),Yu(e,t)}}var yl=!0;function lv(e,t,a,s){var o=C.T;C.T=null;var u=G.p;try{G.p=2,Ku(e,t,a,s)}finally{G.p=u,C.T=o}}function ov(e,t,a,s){var o=C.T;C.T=null;var u=G.p;try{G.p=8,Ku(e,t,a,s)}finally{G.p=u,C.T=o}}function Ku(e,t,a,s){if(yl){var o=Xu(s);if(o===null)Du(e,t,s,bl,a),Om(e,s);else if(cv(o,e,t,a,s))s.stopPropagation();else if(Om(e,s),t&4&&-1<uv.indexOf(e)){for(;o!==null;){var u=fs(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=P(u.pendingLanes);if(h!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var w=1<<31-_(h);v.entanglements[1]|=w,h&=~w}ja(u),(Re&6)===0&&(tl=ht()+500,Vi(0))}}break;case 31:case 13:v=Hn(u,2),v!==null&&kt(v,u,2),nl(),Yu(u,2)}if(u=Xu(s),u===null&&Du(e,t,s,bl,a),u===o)break;o=u}o!==null&&s.stopPropagation()}else Du(e,t,s,null,a)}}function Xu(e){return e=Ql(e),Qu(e)}var bl=null;function Qu(e){if(bl=null,e=ds(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return bl=e,null}function Am(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oi()){case Na:return 2;case ls:return 8;case Da:case Un:return 32;case ha:return 268435456;default:return 32}default:return 32}}var Ju=!1,En=null,Tn=null,xn=null,Ji=new Map,Zi=new Map,An=[],uv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Om(e,t){switch(e){case"focusin":case"focusout":En=null;break;case"dragenter":case"dragleave":Tn=null;break;case"mouseover":case"mouseout":xn=null;break;case"pointerover":case"pointerout":Ji.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Pi(e,t,a,s,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:u,targetContainers:[o]},t!==null&&(t=fs(t),t!==null&&Tm(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function cv(e,t,a,s,o){switch(t){case"focusin":return En=Pi(En,e,t,a,s,o),!0;case"dragenter":return Tn=Pi(Tn,e,t,a,s,o),!0;case"mouseover":return xn=Pi(xn,e,t,a,s,o),!0;case"pointerover":var u=o.pointerId;return Ji.set(u,Pi(Ji.get(u)||null,e,t,a,s,o)),!0;case"gotpointercapture":return u=o.pointerId,Zi.set(u,Pi(Zi.get(u)||null,e,t,a,s,o)),!0}return!1}function jm(e){var t=ds(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,$c(e.priority,function(){xm(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,$c(e.priority,function(){xm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Xu(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Xl=s,a.target.dispatchEvent(s),Xl=null}else return t=fs(a),t!==null&&Tm(t),e.blockedOn=a,!1;t.shift()}return!0}function Rm(e,t,a){_l(e)&&a.delete(t)}function dv(){Ju=!1,En!==null&&_l(En)&&(En=null),Tn!==null&&_l(Tn)&&(Tn=null),xn!==null&&_l(xn)&&(xn=null),Ji.forEach(Rm),Zi.forEach(Rm)}function wl(e,t){e.blockedOn===t&&(e.blockedOn=null,Ju||(Ju=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,dv)))}var Sl=null;function Cm(e){Sl!==e&&(Sl=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Sl===e&&(Sl=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(Qu(s||a)===null)continue;break}var u=fs(a);u!==null&&(e.splice(t,3),t-=3,Xo(u,{pending:!0,data:o,method:a.method,action:s},s,o))}}))}function Xs(e){function t(w){return wl(w,e)}En!==null&&wl(En,e),Tn!==null&&wl(Tn,e),xn!==null&&wl(xn,e),Ji.forEach(t),Zi.forEach(t);for(var a=0;a<An.length;a++){var s=An[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<An.length&&(a=An[0],a.blockedOn===null);)jm(a),a.blockedOn===null&&An.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var o=a[s],u=a[s+1],h=o[Rt]||null;if(typeof u=="function")h||Cm(a);else if(h){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[Rt]||null)v=h.formAction;else if(Qu(o)!==null)continue}else v=h.action;typeof v=="function"?a[s+1]=v:(a.splice(s,3),s-=3),Cm(a)}}}function Nm(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Zu(e){this._internalRoot=e}El.prototype.render=Zu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var a=t.current,s=Jt();Sm(a,s,e,t,null,null)},El.prototype.unmount=Zu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sm(e.current,2,null,e,null,null),nl(),t[cs]=null}};function El(e){this._internalRoot=e}El.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hl();e={blockedOn:null,target:e,priority:t};for(var a=0;a<An.length&&t!==0&&t<An[a].priority;a++);An.splice(a,0,e),a===0&&jm(e)}};var Dm=n.version;if(Dm!=="19.2.3")throw Error(l(527,Dm,"19.2.3"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var fv={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.3"};
34if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tl.isDisabled&&Tl.supportsFiber)try{za=Tl.inject(fv),mt=Tl}catch{}}return Fi.createRoot=function(e,t){if(!c(e))throw Error(l(299));var a=!1,s="",o=Lf,u=Hf,h=$f;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=_m(e,1,!1,null,null,a,s,null,o,u,h,Nm),e[cs]=t.current,Nu(e),new Zu(t)},Fi.hydrateRoot=function(e,t,a){if(!c(e))throw Error(l(299));var s=!1,o="",u=Lf,h=Hf,v=$f,w=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=_m(e,1,!0,t,a??null,s,o,w,u,h,v,Nm),t.context=wm(null),a=t.current,s=Jt(),s=us(s),o=dn(s),o.callback=null,fn(a,o,s),a=s,t.current.lanes=a,Ye(t,a),ja(t),e[cs]=t.current,Nu(e),new El(t)},Fi.version="19.2.3",Fi}var qm;function Kv(){if(qm)return Wu.exports;qm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}return r(),Wu.exports=Yv(),Wu.exports}var Xv=Kv();const Qv=kl(Xv),Jv="modulepreload",Zv=function(r){return"/"+r},Lm={},Ne=function(n,i,l){let c=Promise.resolve();if(i&&i.length>0){let f=function(p){return Promise.all(p.map(S=>Promise.resolve(S).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));c=f(i.map(p=>{if(p=Zv(p),p in Lm)return;Lm[p]=!0;const S=p.endsWith(".css"),y=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=S?"stylesheet":Jv,S||(T.as="script"),T.crossOrigin="",T.href=p,g&&T.setAttribute("nonce",g),document.head.appendChild(T),S)return new Promise((R,N)=>{T.addEventListener("load",R),T.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${p}`)))})}))}function d(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return c.then(f=>{for(const m of f||[])m.status==="rejected"&&d(m.reason);return n().catch(d)})};var tc,Hm;function Pv(){if(Hm)return tc;Hm=1;var r=typeof Element<"u",n=typeof Map=="function",i=typeof Set=="function",l=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function c(d,f){if(d===f)return!0;if(d&&f&&typeof d=="object"&&typeof f=="object"){if(d.constructor!==f.constructor)return!1;var m,g,p;if(Array.isArray(d)){if(m=d.length,m!=f.length)return!1;for(g=m;g--!==0;)if(!c(d[g],f[g]))return!1;return!0}var S;if(n&&d instanceof Map&&f instanceof Map){if(d.size!==f.size)return!1;for(S=d.entries();!(g=S.next()).done;)if(!f.has(g.value[0]))return!1;for(S=d.entries();!(g=S.next()).done;)if(!c(g.value[1],f.get(g.value[0])))return!1;return!0}if(i&&d instanceof Set&&f instanceof Set){if(d.size!==f.size)return!1;for(S=d.entries();!(g=S.next()).done;)if(!f.has(g.value[0]))return!1;return!0}if(l&&ArrayBuffer.isView(d)&&ArrayBuffer.isView(f)){if(m=d.length,m!=f.length)return!1;for(g=m;g--!==0;)if(d[g]!==f[g])return!1;return!0}if(d.constructor===RegExp)return d.source===f.source&&d.flags===f.flags;if(d.valueOf!==Object.prototype.valueOf&&typeof d.valueOf=="function"&&typeof f.valueOf=="function")return d.valueOf()===f.valueOf();if(d.toString!==Object.prototype.toString&&typeof d.toString=="function"&&typeof f.toString=="function")return d.toString()===f.toString();if(p=Object.keys(d),m=p.length,m!==Object.keys(f).length)return!1;for(g=m;g--!==0;)if(!Object.prototype.hasOwnProperty.call(f,p[g]))return!1;if(r&&d instanceof Element)return!1;for(g=m;g--!==0;)if(!((p[g]==="_owner"||p[g]==="__v"||p[g]==="__o")&&d.$$typeof)&&!c(d[p[g]],f[p[g]]))return!1;return!0}return d!==d&&f!==f}return tc=function(f,m){try{return c(f,m)}
34catch(g){if((g.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw g}},tc}var Wv=Pv();const Fv=kl(Wv);var ac,$m;function ey(){if($m)return ac;$m=1;var r=function(n,i,l,c,d,f,m,g){if(!n){var p;if(i===void 0)p=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var S=[l,c,d,f,m,g],y=0;p=new Error(i.replace(/%s/g,function(){return S[y++]})),p.name="Invariant Violation"}throw p.framesToPop=1,p}};return ac=r,ac}var ty=ey();const Vm=kl(ty);var nc,Gm;function ay(){return Gm||(Gm=1,nc=function(n,i,l,c){var d=l?l.call(c,n,i):void 0;if(d!==void 0)return!!d;if(n===i)return!0;if(typeof n!="object"||!n||typeof i!="object"||!i)return!1;var f=Object.keys(n),m=Object.keys(i);if(f.length!==m.length)return!1;for(var g=Object.prototype.hasOwnProperty.bind(i),p=0;p<f.length;p++){var S=f[p];if(!g(S))return!1;var y=n[S],T=i[S];if(d=l?l.call(c,y,T,S):void 0,d===!1||d===void 0&&y!==T)return!1}return!0}),nc}var ny=ay();const sy=kl(ny);var Rg=(r=>(r.BASE="base",r.BODY="body",r.HEAD="head",r.HTML="html",r.LINK="link",r.META="meta",r.NOSCRIPT="noscript",r.SCRIPT="script",r.STYLE="style",r.TITLE="title",r.FRAGMENT="Symbol(react.fragment)",r))(Rg||{}),sc={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"]}},Im=Object.values(Rg),kc={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},iy=Object.entries(kc).reduce((r,[n,i])=>(r[i]=n,r),{}),wa="data-rh",ii={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ri=(r,n)=>{for(let i=r.length-1;i>=0;i-=1){const l=r[i];if(Object.prototype.hasOwnProperty.call(l,n))return l[n]}return null},ry=r=>{let n=ri(r,"title");const i=ri(r,ii.TITLE_TEMPLATE);if(Array.isArray(n)&&(n=n.join("")),i&&n)return i.replace(/%s/g,()=>n);const l=ri(r,ii.DEFAULT_TITLE);return n||l||void 0},ly=r=>ri(r,ii.ON_CHANGE_CLIENT_STATE)||(()=>{}),ic=(r,n)=>n.filter(i=>typeof i[r]<"u").map(i=>i[r]).reduce((i,l)=>({...i,...l}),{}),oy=(r,n)=>n.filter(i=>typeof i.base<"u").map(i=>i.base).reverse().reduce((i,l)=>{if(!i.length){const c=Object.keys(l);for(let d=0;d<c.length;d+=1){const m=c[d].toLowerCase();if(r.indexOf(m)!==-1&&l[m])return i.concat(l)}}return i},[]),uy=r=>console&&typeof console.warn=="function"&&console.warn(r),er=(r,n,i)=>{const l={};return i.filter(c=>Array.isArray(c[r])?!0:(typeof c[r]<"u"&&uy(`Helmet: ${r} should be of type "Array". Instead found type "${typeof c[r]}"`),!1)).map(c=>c[r]).reverse().reduce((c,d)=>{const f={};d.filter(g=>{let p;const S=Object.keys(g);for(let T=0;T<S.length;T+=1){const R=S[T],N=R.toLowerCase();n.indexOf(N)!==-1&&!(p==="rel"&&g[p].toLowerCase()==="canonical")&&!(N==="rel"&&g[N].toLowerCase()==="stylesheet")&&(p=N),n.indexOf(R)!==-1&&(R==="innerHTML"||R==="cssText"||R==="itemprop")&&(p=R)}if(!p||!g[p])return!1;const y=g[p].toLowerCase();return l[p]||(l[p]={}),f[p]||(f[p]={}),l[p][y]?!1:(f[p][y]=!0,!0)}).reverse().forEach(g=>c.push(g));const m=Object.keys(f);for(let g=0;g<m.length;g+=1){const p=m[g],S={...l[p],...f[p]};l[p]=S}return c},[]).reverse()},cy=(r,n)=>{if(Array.isArray(r)&&r.length){for(let i=0;i<r.length;i+=1)if(r[i][n])return!0}return!1},dy=r=>({baseTag:oy(["href"],r),bodyAttributes:ic("bodyAttributes",r),defer:ri(r,ii.DEFER),encode:ri(r,ii.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:ic("htmlAttributes",r),linkTags:er("link",["rel","href"],r),metaTags:er("meta",["name","charset","http-equiv","property","itemprop"],r),noscriptTags:er("noscript",["innerHTML"],r),onChangeClientState:ly(r),scriptTags:er("script",["src","innerHTML"],r),styleTags:er("style",["cssText"],r),title:ry(r),titleAttributes:ic("titleAttributes",r),prioritizeSeoTags:cy(r,ii.PRIORITIZE_SEO_TAGS)}),Cg=r=>Array.isArray(r)?r.join(""):r,fy=(r,n)=>{const i=Object.keys(r);for(let l=0;l<i.length;l+=1)if(n[i[l]]&&n[i[l]].includes(r[i[l]]))return!0;return!1},rc=(r,n)=>Array.isArray(r)?r.reduce((i,l)=>
34(fy(l,n)?i.priority.push(l):i.default.push(l),i),{priority:[],default:[]}):{default:r,priority:[]},Ym=(r,n)=>({...r,[n]:void 0}),hy=["noscript","script","style"],bc=(r,n=!0)=>n===!1?String(r):String(r).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Ng=r=>Object.keys(r).reduce((n,i)=>{const l=typeof r[i]<"u"?`${i}="${r[i]}"`:`${i}`;return n?`${n} ${l}`:l},""),my=(r,n,i,l)=>{const c=Ng(i),d=Cg(n);return c?`<${r} ${wa}="true" ${c}>${bc(d,l)}</${r}>`:`<${r} ${wa}="true">${bc(d,l)}</${r}>`},gy=(r,n,i=!0)=>n.reduce((l,c)=>{const d=c,f=Object.keys(d).filter(p=>!(p==="innerHTML"||p==="cssText")).reduce((p,S)=>{const y=typeof d[S]>"u"?S:`${S}="${bc(d[S],i)}"`;return p?`${p} ${y}`:y},""),m=d.innerHTML||d.cssText||"",g=hy.indexOf(r)===-1;return`${l}<${r} ${wa}="true" ${f}${g?"/>":`>${m}</${r}>`}`},""),Dg=(r,n={})=>Object.keys(r).reduce((i,l)=>{const c=kc[l];return i[c||l]=r[l],i},n),py=(r,n,i)=>{const l={key:n,[wa]:!0},c=Dg(i,l);return[M.createElement("title",c,n)]},Nl=(r,n)=>n.map((i,l)=>{const c={key:l,[wa]:!0};
34return Object.keys(i).forEach(d=>{const m=kc[d]||d;if(m==="innerHTML"||m==="cssText"){const g=i.innerHTML||i.cssText;c.dangerouslySetInnerHTML={__html:g}}else c[m]=i[d]}),M.createElement(r,c)}),da=(r,n,i=!0)=>{switch(r){case"title":return{toComponent:()=>py(r,n.title,n.titleAttributes),toString:()=>my(r,n.title,n.titleAttributes,i)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Dg(n),toString:()=>Ng(n)};default:return{toComponent:()=>Nl(r,n),toString:()=>gy(r,n,i)}}},vy=({metaTags:r,linkTags:n,scriptTags:i,encode:l})=>{const c=rc(r,sc.meta),d=rc(n,sc.link),f=rc(i,sc.script);return{priorityMethods:{toComponent:()=>[...Nl("meta",c.priority),...Nl("link",d.priority),...Nl("script",f.priority)],toString:()=>`${da("meta",c.priority,l)} ${da("link",d.priority,l)} ${da("script",f.priority,l)}`},metaTags:c.default,linkTags:d.default,scriptTags:f.default}},yy=r=>{const{baseTag:n,bodyAttributes:i,encode:l=!0,htmlAttributes:c,noscriptTags:d,styleTags:f,title:m="",titleAttributes:g,prioritizeSeoTags:p}=r;let{linkTags:S,metaTags:y,scriptTags:T}=r,R={toComponent:()=>{},toString:()=>""};return p&&({priorityMethods:R,linkTags:S,metaTags:y,scriptTags:T}=vy(r)),{priority:R,base:da("base",n,l),bodyAttributes:da("bodyAttributes",i,l),htmlAttributes:da("htmlAttributes",c,l),link:da("link",S,l),meta:da("meta",y,l),noscript:da("noscript",d,l),script:da("script",T,l),style:da("style",f,l),title:da("title",{title:m,titleAttributes:g},l)}},_c=yy,xl=[],zg=!!(typeof window<"u"&&window.document&&window.document.createElement),wc=class{constructor(r,n){Wa(this,"instances",[]);Wa(this,"canUseDOM",zg);Wa(this,"context");Wa(this,"value",{setHelmet:r=>{this.context.helmet=r},helmetInstances:{get:()=>this.canUseDOM?xl:this.instances,add:r=>{(this.canUseDOM?xl:this.instances).push(r)},remove:r=>{const n=(this.canUseDOM?xl:this.instances).indexOf(r);(this.canUseDOM?xl:this.instances).splice(n,1)}}});this.context=r,this.canUseDOM=n||!1,n||(r.helmet=_c({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},by={},Ug=M.createContext(by),is,kg=(is=class extends be.Component{constructor(i){super(i);Wa(this,"helmetData");this.helmetData=new wc(this.props.context||{},is.canUseDOM)}render(){return M.createElement(Ug.Provider,{value:this.helmetData.value},this.props.children)}},Wa(is,"canUseDOM",zg),is),Qs=(r,n)=>{const i=document.head||document.querySelector("head"),l=i.querySelectorAll(`${r}[${wa}]`),c=[].slice.call(l),d=[];let f;return n&&n.length&&n.forEach(m=>{const g=document.createElement(r);for(const p in m)if(Object.prototype.hasOwnProperty.call(m,p))if(p==="innerHTML")g.innerHTML=m.innerHTML;else if(p==="cssText")g.styleSheet?g.styleSheet.cssText=m.cssText:g.appendChild(document.createTextNode(m.cssText));else{const S=p,y=typeof m[S]>"u"?"":m[S];g.setAttribute(p,y)}g.setAttribute(wa,"true"),c.some((p,S)=>(f=S,g.isEqualNode(p)))?c.splice(f,1):d.push(g)}),c.forEach(m=>{var g;return(g=m.parentNode)==null?void 0:g.removeChild(m)}),d.forEach(m=>i.appendChild(m)),{oldTags:c,newTags:d}},Sc=(r,n)=>{const i=document.getElementsByTagName(r)[0];if(!i)return;const l=i.getAttribute(wa),c=l?l.split(","):[],d=[...c],f=Object.keys(n);for(const m of f){const g=n[m]||"";i.getAttribute(m)!==g&&i.setAttribute(m,g),c.indexOf(m)===-1&&c.push(m);const p=d.indexOf(m);p!==-1&&d.splice(p,1)}for(let m=d.length-1;m>=0;m-=1)i.removeAttribute(d[m]);c.length===d.length?i.removeAttribute(wa):i.getAttribute(wa)!==f.join(",")&&i.setAttribute(wa,f.join(","))},_y=(r,n)=>{typeof r<"u"&&document.title!==r&&(document.title=Cg(r)),Sc("title",n)},Km=(r,n)=>{const{baseTag:i,bodyAttributes:l,htmlAttributes:c,linkTags:d,metaTags:f,noscriptTags:m,onChangeClientState:g,scriptTags:p,styleTags:S,title:y,titleAttributes:T}=r;Sc("body",l),Sc("html",c),_y(y,T);const R={baseTag:Qs("base",i),linkTags:Qs("link",d),metaTags:Qs("meta",f),noscriptTags:Qs("noscript",m),scriptTags:Qs("script",p),styleTags:Qs("style",S)},N={},H={};Object.keys(R).forEach(Y=>{const{newTags:$,oldTags:Q}=R[Y];$.length&&(N[Y]=$),Q.length&&(H[Y]=R[Y].oldTags)}),n&&n(),g(r,N,H)},tr=null,wy=r=>{tr&&cancelAnimationFrame(tr),r.defer?tr=requestAnimationFrame(()=>{Km(r,()=>{tr=null})}):(Km(r),tr=null)},Sy=wy,Xm=class extends be.Component{constructor(){super(...arguments);Wa(this,"rendered",!1)}shouldComponentUpdate(n){return!sy(n,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:n}=this.props.context;n.remove(this),this.emitChange()}emitChange(){const{helmetInstances:n,setHelmet:i}=this.props.context;let l=null;const c=dy(n.get().map(d=>{const f={...d.props};return delete f.context,f}));kg.canUseDOM?Sy(c):_c&&(l=_c(c)),i(l)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:n}=this.props.context;n.add(this),this.emitChange()}render(){return this.init(),null}},vc,Mg=(vc=class extends be.Component{shouldComponentUpdate(r){return!Fv(Ym(this.props,"helmetData"),Ym(r,"helmetData"))}mapNestedChildrenToProps(r,n){if(!n)return null;switch(r.type){case"script":case"noscript":return{innerHTML:n};case"style":return{cssText:n};default:throw new Error(`<${r.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(r,n,i,l){return{...n,[r.type]:[...n[r.type]||[],{...i,...this.mapNestedChildrenToProps(r,l)}]}}mapObjectTypeChildren(r,n,i,l){switch(r.type){case"title":return{...n,[r.type]:l,titleAttributes:{...i}};case"body":return{...n,bodyAttributes:{...i}};case"html":return{...n,htmlAttributes:{...i}};default:return{...n,[r.type]:{...i}}}}mapArrayTypeChildrenToProps(r,n){let i={...n};return Object.keys(r).forEach(l=>{i={...i,[l]:r[l]}}),i}
34warnOnInvalidChildren(r,n){return Vm(Im.some(i=>r.type===i),typeof r.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 ${Im.join(", ")} are allowed. Helmet does not support rendering <${r.type}> elements. Refer to our API for more information.`),Vm(!n||typeof n=="string"||Array.isArray(n)&&!n.some(i=>typeof i!="string"),`Helmet expects a string as a child of <${r.type}>. Did you forget to wrap your children in braces? ( <${r.type}>{\`\`}</${r.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(r,n){let i={};return M.Children.forEach(r,l=>{if(!l||!l.props)return;const{children:c,...d}=l.props,f=Object.keys(d).reduce((g,p)=>(g[iy[p]||p]=d[p],g),{});let{type:m}=l;switch(typeof m=="symbol"?m=m.toString():this.warnOnInvalidChildren(l,c),m){case"Symbol(react.fragment)":n=this.mapChildrenToProps(c,n);break;case"link":case"meta":case"noscript":case"script":case"style":i=this.flattenArrayTypeChildren(l,i,f,c);break;default:n=this.mapObjectTypeChildren(l,n,f,c);break}}),this.mapArrayTypeChildrenToProps(i,n)}render(){const{children:r,...n}=this.props;let i={...n},{helmetData:l}=n;if(r&&(i=this.mapChildrenToProps(r,i)),l&&!(l instanceof wc)){const c=l;l=new wc(c.context,!0),delete i.helmetData}return l?M.createElement(Xm,{...i,context:l.value}):M.createElement(Ug.Consumer,null,c=>M.createElement(Xm,{...i,context:c}))}},Wa(vc,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),vc);function Ey(r){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n.appendChild(i),i.styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r))}const Ty=r=>{switch(r){case"success":return Oy;case"info":return Ry;case"warning":return jy;case"error":return Cy;default:return null}},xy=Array(12).fill(0),Ay=({visible:r,className:n})=>M.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":r},M.createElement("div",{className:"sonner-spinner"},xy.map((i,l)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),Oy=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),jy=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.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"})),Ry=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),Cy=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),Ny=M.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"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Dy=()=>{const[r,n]=M.useState(document.hidden);return M.useEffect(()=>{const i=()=>{n(document.hidden)};
vendor: 3,939 bytes, line 34
34return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),r};let Ec=1;class zy{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const i=this.subscribers.indexOf(n);this.subscribers.splice(i,1)}),this.publish=n=>{this.subscribers.forEach(i=>i(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var i;const{message:l,...c}=n,d=typeof(n==null?void 0:n.id)=="number"||((i=n.id)==null?void 0:i.length)>0?n.id:Ec++,f=this.toasts.find(g=>g.id===d),m=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),f?this.toasts=this.toasts.map(g=>g.id===d?(this.publish({...g,...n,id:d,title:l}),{...g,...n,id:d,dismissible:m,title:l}):g):this.addToast({title:l,...c,dismissible:m,id:d}),d},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:n,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(l=>l({id:i.id,dismiss:!0}))}),n),this.message=(n,i)=>this.create({...i,message:n}),this.error=(n,i)=>this.create({...i,message:n,type:"error"}),this.success=(n,i)=>this.create({...i,type:"success",message:n}),this.info=(n,i)=>this.create({...i,type:"info",message:n}),this.warning=(n,i)=>this.create({...i,type:"warning",message:n}),this.loading=(n,i)=>this.create({...i,type:"loading",message:n}),this.promise=(n,i)=>{if(!i)return;let l;i.loading!==void 0&&(l=this.create({...i,promise:n,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const c=Promise.resolve(n instanceof Function?n():n);let d=l!==void 0,f;const m=c.then(async p=>{if(f=["resolve",p],M.isValidElement(p))d=!1,this.create({id:l,type:"default",message:p});else if(ky(p)&&!p.ok){d=!1;const y=typeof i.error=="function"?await i.error(`HTTP error! status: ${p.status}`):i.error,T=typeof i.description=="function"?await i.description(`HTTP error! status: ${p.status}`):i.description,N=typeof y=="object"&&!M.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...N})}else if(p instanceof Error){d=!1;const y=typeof i.error=="function"?await i.error(p):i.error,T=typeof i.description=="function"?await i.description(p):i.description,N=typeof y=="object"&&!M.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...N})}else if(i.success!==void 0){d=!1;const y=typeof i.success=="function"?await i.success(p):i.success,T=typeof i.description=="function"?await i.description(p):i.description,N=typeof y=="object"&&!M.isValidElement(y)?y:{message:y};this.create({id:l,type:"success",description:T,...N})}}).catch(async p=>{if(f=["reject",p],i.error!==void 0){d=!1;const S=typeof i.error=="function"?await i.error(p):i.error,y=typeof i.description=="function"?await i.description(p):i.description,R=typeof S=="object"&&!M.isValidElement(S)?S:{message:S};this.create({id:l,type:"error",description:y,...R})}}).finally(()=>{d&&(this.dismiss(l),l=void 0),i.finally==null||i.finally.call(i)}),g=()=>new Promise((p,S)=>m.then(()=>f[0]==="reject"?S(f[1]):p(f[1])).catch(S));return typeof l!="string"&&typeof l!="number"?{unwrap:g}:Object.assign(l,{unwrap:g})},this.custom=(n,i)=>{const l=(i==null?void 0:i.id)||Ec++;return this.create({jsx:n(l),id:l,...i}),l},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Bt=new zy,Uy=(r,n)=>{const i=(n==null?void 0:n.id)||Ec++;return Bt.addToast({title:r,...n,id:i}),i},ky=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",My=Uy,By=()=>Bt.toasts,qy=()=>Bt.getActiveToasts(),re=Object.assign(My,{success:Bt.success,info:Bt.info,warning:Bt.warning,error:Bt.error,custom:Bt.custom,message:Bt.message,promise:Bt.promise,dismiss:Bt.dismiss,loading:Bt.loading},{getHistory:By,getToasts:qy});Ey
vendor: 4,787 bytes, line 34
34("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 34
34left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
vendor: 630 bytes, line 34
34Al(r){return r.label!==void 0}const Ly=3,Hy="24px",$y="16px",Qm=4e3,Vy=356,Gy=14,Iy=45,Yy=200;function Ra(...r){return r.filter(Boolean).join(" ")}function Ky(r){const[n,i]=r.split("-"),l=[];return n&&l.push(n),i&&l.push(i),l}const Xy=r=>{var n,i,l,c,d,f,m,g,p;const{invert:S,toast:y,unstyled:T,interacting:R,setHeights:N,visibleToasts:H,heights:Y,index:$,toasts:Q,expanded:I,removeToast:te,defaultRichColors:Ae,closeButton:ie,style:he,cancelButtonStyle:Oe,actionButtonStyle:Xe,className:qt="",descriptionClassName:Ft="",duration:Le,position:ot,gap:Lt,expandByDefault:dt,classNames:C,icons:G,closeButtonAriaLabel:ee="Close toast"}
vendor: 12,419 bytes, line 34
34=r,[_e,me]=M.useState(null),[He,Ce]=M.useState(null),[J,ce]=M.useState(!1),[we,Ie]=M.useState(!1),[Ht,je]=M.useState(!1),[Et,Sa]=M.useState(!1),[fa,ea]=M.useState(!1),[rs,$t]=M.useState(0),[Cn,tn]=M.useState(0),Ca=M.useRef(y.duration||Le||Qm),Nn=M.useRef(null),Tt=M.useRef(null),Dn=$===0,zn=$+1<=H,ft=y.type,Ea=y.dismissible!==!1,ht=y.className||"",oi=y.descriptionClassName||"",Na=M.useMemo(()=>Y.findIndex(X=>X.toastId===y.id)||0,[Y,y.id]),ls=M.useMemo(()=>{var X;return(X=y.closeButton)!=null?X:ie},[y.closeButton,ie]),Da=M.useMemo(()=>y.duration||Le||Qm,[y.duration,Le]),Un=M.useRef(0),ha=M.useRef(0),os=M.useRef(0),Ta=M.useRef(null),[za,mt]=ot.split("-"),Vt=M.useMemo(()=>Y.reduce((X,Ee,Qe)=>Qe>=Na?X:X+Ee.height,0),[Y,Na]),_=Dy(),z=y.invert||S,U=ft==="loading";ha.current=M.useMemo(()=>Na*Lt+Vt,[Na,Vt]),M.useEffect(()=>{Ca.current=Da},[Da]),M.useEffect(()=>{ce(!0)},[]),M.useEffect(()=>{const X=Tt.current;if(X){const Ee=X.getBoundingClientRect().height;return tn(Ee),N(Qe=>[{toastId:y.id,height:Ee,position:y.position},...Qe]),()=>N(Qe=>Qe.filter(St=>St.toastId!==y.id))}},[N,y.id]),M.useLayoutEffect(()=>{if(!J)return;const X=Tt.current,Ee=X.style.height;X.style.height="auto";const Qe=X.getBoundingClientRect().height;X.style.height=Ee,tn(Qe),N(St=>St.find(Ye=>Ye.toastId===y.id)?St.map(Ye=>Ye.toastId===y.id?{...Ye,height:Qe}:Ye):[{toastId:y.id,height:Qe,position:y.position},...St])},[J,y.title,y.description,N,y.id,y.jsx,y.action,y.cancel]);const B=M.useCallback(()=>{Ie(!0),$t(ha.current),N(X=>X.filter(Ee=>Ee.toastId!==y.id)),setTimeout(()=>{te(y)},Yy)},[y,te,N,ha]);M.useEffect(()=>{if(y.promise&&ft==="loading"||y.duration===1/0||y.type==="loading")return;let X;return I||R||_?(()=>{if(os.current<Un.current){const St=new Date().getTime()-Un.current;Ca.current=Ca.current-St}os.current=new Date().getTime()})():(()=>{Ca.current!==1/0&&(Un.current=new Date().getTime(),X=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),B()},Ca.current))})(),()=>clearTimeout(X)},[I,R,y,ft,_,B]),M.useEffect(()=>{y.delete&&(B(),y.onDismiss==null||y.onDismiss.call(y,y))},[B,y.delete]);function K(){var X;if(G!=null&&G.loading){var Ee;return M.createElement("div",{className:Ra(C==null?void 0:C.loader,y==null||(Ee=y.classNames)==null?void 0:Ee.loader,"sonner-loader"),"data-visible":ft==="loading"},G.loading)}return M.createElement(Ay,{className:Ra(C==null?void 0:C.loader,y==null||(X=y.classNames)==null?void 0:X.loader),visible:ft==="loading"})}const V=y.icon||(G==null?void 0:G[ft])||Ty(ft);var ue,P;return M.createElement("li",{tabIndex:0,ref:Tt,className:Ra(qt,ht,C==null?void 0:C.toast,y==null||(n=y.classNames)==null?void 0:n.toast,C==null?void 0:C.default,C==null?void 0:C[ft],y==null||(i=y.classNames)==null?void 0:i[ft]),"data-sonner-toast":"","data-rich-colors":(ue=y.richColors)!=null?ue:Ae,"data-styled":!(y.jsx||y.unstyled||T),"data-mounted":J,"data-promise":!!y.promise,"data-swiped":fa,"data-removed":we,"data-visible":zn,"data-y-position":za,"data-x-position":mt,"data-index":$,"data-front":Dn,"data-swiping":Ht,"data-dismissible":Ea,"data-type":ft,"data-invert":z,"data-swipe-out":Et,"data-swipe-direction":He,"data-expanded":!!(I||dt&&J),"data-testid":y.testId,style:{"--index":$,"--toasts-before":$,"--z-index":Q.length-$,"--offset":`${we?rs:ha.current}px`,"--initial-height":dt?"auto":`${Cn}px`,...he,...y.style},onDragEnd:()=>{je(!1),me(null),Ta.current=null},onPointerDown:X=>{X.button!==2&&(U||!Ea||(Nn.current=new Date,$t(ha.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(je(!0),Ta.current={x:X.clientX,y:X.clientY})))},onPointerUp:()=>{var X,Ee,Qe;if(Et||!Ea)return;Ta.current=null;const St=Number(((X=Tt.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),an=Number(((Ee=Tt.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ye=new Date().getTime()-((Qe=Nn.current)==null?void 0:Qe.getTime()),At=_e==="x"?St:an,kn=Math.abs(At)/Ye;if(Math.abs(At)>=Iy||kn>.11){$t(ha.current),y.onDismiss==null||y.onDismiss.call(y,y),Ce(_e==="x"?St>0?"right":"left":an>0?"down":"up"),B(),Sa(!0);return}else{var Ot,jt;(Ot=Tt.current)==null||Ot.style.setProperty("--swipe-amount-x","0px"),(jt=Tt.current)==null||jt.style.setProperty("--swipe-amount-y","0px")}ea(!1),je(!1),me(null)},onPointerMove:X=>{var Ee,Qe,St;if(!Ta.current||!Ea||((Ee=window.getSelection())==null?void 0:Ee.toString().length)>0)return;const Ye=X.clientY-Ta.current.y,At=X.clientX-Ta.current.x;var kn;const Ot=(kn=r.swipeDirections)!=null?kn:Ky(ot);!_e&&(Math.abs(At)>1||Math.abs(Ye)>1)&&me(Math.abs(At)>Math.abs(Ye)?"x":"y");let jt={x:0,y:0};const us=ma=>1/(1.5+Math.abs(ma)/20);if(_e==="y"){if(Ot.includes("top")||Ot.includes("bottom"))if(Ot.includes("top")&&Ye<0||Ot.includes("bottom")&&Ye>0)jt.y=Ye;else{const ma=Ye*us(Ye);jt.y=Math.abs(ma)<Math.abs(Ye)?ma:Ye}}else if(_e==="x"&&(Ot.includes("left")||Ot.includes("right")))if(Ot.includes("left")&&At<0||Ot.includes("right")&&At>0)jt.x=At;else{const ma=At*us(At);jt.x=Math.abs(ma)<Math.abs(At)?ma:At}(Math.abs(jt.x)>0||Math.abs(jt.y)>0)&&ea(!0),(Qe=Tt.current)==null||Qe.style.setProperty("--swipe-amount-x",`${jt.x}px`),(St=Tt.current)==null||St.style.setProperty("--swipe-amount-y",`${jt.y}px`)}},ls&&!y.jsx&&ft!=="loading"?M.createElement("button",{"aria-label":ee,"data-disabled":U,"data-close-button":!0,onClick:U||!Ea?()=>{}:()=>{B(),y.onDismiss==null||y.onDismiss.call(y,y)},className:Ra(C==null?void 0:C.closeButton,y==null||(l=y.classNames)==null?void 0:l.closeButton)},(P=G==null?void 0:G.close)!=null?P:Ny):null,(ft||y.icon||y.promise)&&y.icon!==null&&((G==null?void 0:G[ft])!==null||y.icon)?M.createElement("div",{"data-icon":"",className:Ra(C==null?void 0:C.icon,y==null||(c=y.classNames)==null?void 0:c.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||K():null,y.type!=="loading"?V:null):null,M.createElement("div",{"data-content":"",className:Ra(C==null?void 0:C.content,y==null||(d=y.classNames)==null?void 0:d.content)},M.createElement("div",{"data-title":"",className:Ra(C==null?void 0:C.title,y==null||(f=y.classNames)==null?void 0:f.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?M.createElement("div",{"data-description":"",className:Ra(Ft,oi,C==null?void 0:C.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),M.isValidElement(y.cancel)?y.cancel:y.cancel&&Al(y.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||Oe,onClick:X=>{Al(y.cancel)&&Ea&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,X),B())},className:Ra(C==null?void 0:C.cancelButton,y==null||(g=y.classNames)==null?void 0:g.cancelButton)},y.cancel.label):null,M.isValidElement(y.action)?y.action:y.action&&Al(y.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||Xe,onClick:X=>{Al(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,X),!X.defaultPrevented&&B())},className:Ra(C==null?void 0:C.actionButton,y==null||(p=y.classNames)==null?void 0:p.actionButton)},y.action.label):null)};function Jm(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function Qy(r,n){const i={};return[r,n].forEach((l,c)=>{const d=c===1,f=d?"--mobile-offset":"--offset",m=d?$y:Hy;function g(p){["top","right","bottom","left"].forEach(S=>{i[`${f}-${S}`]=typeof p=="number"?`${p}px`:p})}typeof l=="number"||typeof l=="string"?g(l):typeof l=="object"?["top","right","bottom","left"].forEach(p=>{l[p]===void 0?i[`${f}-${p}`]=m:i[`${f}-${p}`]=typeof l[p]=="number"?`${l[p]}px`:l[p]}):g(m)}),i}const Jy=M.forwardRef(function(n,i){const{id:l,invert:c,position:d="bottom-right",hotkey:f=["altKey","KeyT"],expand:m,closeButton:g,className:p,offset:S,mobileOffset:y,theme:T="light",richColors:R,duration:N,style:H,visibleToasts:Y=Ly,toastOptions:$,dir:Q=Jm(),gap:I=Gy,icons:te,containerAriaLabel:Ae="Notifications"}=n,[ie,he]=M.useState([]),Oe=M.useMemo(()=>l?ie.filter(J=>J.toasterId===l):ie.filter(J=>!J.toasterId),[ie,l]),Xe=M.useMemo(()=>Array.from(new Set([d].concat(Oe.filter(J=>J.position).map(J=>J.position)))),[Oe,d]),[qt,Ft]=M.useState([]),[Le,ot]=M.useState(!1),[Lt,dt]=M.useState(!1),[C,G]=M.useState(T!=="system"?T:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=M.useRef(null),_e=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),me=M.useRef(null),He=M.useRef(!1),Ce=M.useCallback(J=>{he(ce=>{var we;return(we=ce.find(Ie=>Ie.id===J.id))!=null&&we.delete||Bt.dismiss(J.id),ce.filter(({id:Ie})=>Ie!==J.id)})},[]);return M.useEffect(()=>Bt.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{he(ce=>ce.map(we=>we.id===J.id?{...we,delete:!0}:we))});return}setTimeout(()=>{yv.flushSync(()=>{he(ce=>{const we=ce.findIndex(Ie=>Ie.id===J.id);return we!==-1?[...ce.slice(0,we),{...ce[we],...J},...ce.slice(we+1)]:[J,...ce]})})})}),[ie]),M.useEffect(()=>{if(T!=="system"){G(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:ce})=>{G(ce?"dark":"light")})}catch{J.addListener(({matches:we})=>{try{G(we?"dark":"light")}catch(Ie){console.error(Ie)}})}},[T]),M.useEffect(()=>{ie.length<=1&&ot(!1)},[ie]),M.useEffect(()=>{const J=ce=>{var we;if(f.every(je=>ce[je]||ce.code===je)){var Ht;ot(!0),(Ht=ee.current)==null||Ht.focus()}ce.code==="Escape"&&(document.activeElement===ee.current||(we=ee.current)!=null&&we.contains(document.activeElement))&&ot(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[f]),M.useEffect(()=>{if(ee.current)return()=>{me.current&&(me.current.focus({preventScroll:!0}),me.current=null,He.current=!1)}},[ee.current]),M.createElement("section",{ref:i,"aria-label":`${Ae} ${_e}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Xe.map((J,ce)=>{var we;const[Ie,Ht]=J.split("-");return Oe.length?M.createElement("ol",{key:J,dir:Q==="auto"?Jm():Q,tabIndex:-1,ref:ee,className:p,"data-sonner-toaster":!0,"data-sonner-theme":C,"data-y-position":Ie,"data-x-position":Ht,style:{"--front-toast-height":`${((we=qt[0])==null?void 0:we.height)||0}px`,"--width":`${Vy}px`,"--gap":`${I}px`,...H,...Qy(S,y)},onBlur:je=>{He.current&&!je.currentTarget.contains(je.relatedTarget)&&(He.current=!1,me.current&&(me.current.focus({preventScroll:!0}),me.current=null))},onFocus:je=>{je.target instanceof HTMLElement&&je.target.dataset.dismissible==="false"||He.current||(He.current=!0,me.current=je.relatedTarget)},onMouseEnter:()=>ot(!0),onMouseMove:()=>ot(!0),onMouseLeave:()=>{Lt||ot(!1)},onDragEnd:()=>ot(!1),onPointerDown:je=>{je.target instanceof HTMLElement&&je.target.dataset.dismissible==="false"||dt(!0)},onPointerUp:()=>dt(!1)},Oe.filter(je=>!je.position&&ce===0||je.position===J).map((je,Et)=>{var Sa,fa;return M.createElement(Xy,{key:je.id,icons:te,index:Et,toast:je,defaultRichColors:R,duration:(Sa=$==null?void 0:$.duration)!=null?Sa:N,className:$==null?void 0:$.className,descriptionClassName:$==null?void 0:$.descriptionClassName,invert:c,visibleToasts:Y,closeButton:(fa=$==null?void 0:$.closeButton)!=null?fa:g,interacting:Lt,position:J,style:$==null?void 0:$.style,unstyled:$==null?void 0:$.unstyled,classNames:$==null?void 0:$.classNames,cancelButtonStyle:$==null?void 0:$.cancelButtonStyle,actionButtonStyle:$==null?void 0:$.actionButtonStyle,closeButtonAriaLabel:$==null?void 0:$.closeButtonAriaLabel,removeToast:Ce,toasts:Oe.filter(ea=>ea.position==je.position),heights:qt.filter(ea=>ea.position==je.position),setHeights:Ft,expandByDefault:m,gap:I,expanded:Le,swipeDirections:n.swipeDirections})})):null}))});function Bl(r,n){var i={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&n.indexOf(l)<0&&(i[l]=r[l]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(r);c<l.length;c++)n.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(r,l[c])&&(i[l[c]]=r[l[c]]);return i}function Zy(r,n,i,l){function c(d){return d instanceof i?d:new i(function(f){f(d)})}
34return new(i||(i=Promise))(function(d,f){function m(S){try{p(l.next(S))}catch(y){f(y)}}function g(S){try{p(l.throw(S))}catch(y){f(y)}}function p(S){S.done?d(S.value):c(S.value).then(m,g)}p((l=l.apply(r,n||[])).next())})}const Py=r=>r?(...n)=>r(...n):(...n)=>fetch(...n);class Mc extends Error{constructor(n,i="FunctionsError",l){super(n),this.name=i,this.context=l}}class Wy extends Mc{constructor(n){super("Failed to send a request to the Edge Function","FunctionsFetchError",n)}}class Zm extends Mc{constructor(n){super("Relay Error invoking the Edge Function","FunctionsRelayError",n)}}class Pm extends Mc{constructor(n){super("Edge Function returned a non-2xx status code","FunctionsHttpError",n)}}var Tc;(function(r){r.Any="any",r.ApNortheast1="ap-northeast-1",r.ApNortheast2="ap-northeast-2",r.ApSouth1="ap-south-1",r.ApSoutheast1="ap-southeast-1",r.ApSoutheast2="ap-southeast-2",r.CaCentral1="ca-central-1",r.EuCentral1="eu-central-1",r.EuWest1="eu-west-1",r.EuWest2="eu-west-2",r.EuWest3="eu-west-3",r.SaEast1="sa-east-1",r.UsEast1="us-east-1",r.UsWest1="us-west-1",r.UsWest2="us-west-2"})(Tc||(Tc={}));class Fy{constructor(n,{headers:i={},customFetch:l,region:c=Tc.Any}={}){this.url=n,this.headers=i,this.region=c,this.fetch=Py(l)}setAuth(n){this.headers.Authorization=`Bearer ${n}`}invoke(n){return Zy(this,arguments,void 0,function*(i,l={}){var c;let d,f;try{const{headers:m,method:g,body:p,signal:S,timeout:y}=l;let T={},{region:R}=l;R||(R=this.region);const N=new URL(`${this.url}/${i}`);R&&R!=="any"&&(T["x-region"]=R,N.searchParams.set("forceFunctionRegion",R));let H;p&&(m&&!Object.prototype.hasOwnProperty.call(m,"Content-Type")||!m)?typeof Blob<"u"&&p instanceof Blob||p instanceof ArrayBuffer?(T["Content-Type"]="application/octet-stream",H=p):typeof p=="string"?(T["Content-Type"]="text/plain",H=p):typeof FormData<"u"&&p instanceof FormData?H=p:(T["Content-Type"]="application/json",H=JSON.stringify(p)):H=p;let Y=S;y&&(f=new AbortController,d=setTimeout(()=>f.abort(),y),S?(Y=f.signal,S.addEventListener("abort",()=>f.abort())):Y=f.signal);const $=yield this.fetch(N.toString(),{method:g||"POST",headers:Object.assign(Object.assign(Object.assign({},T),this.headers),m),body:H,signal:Y}).catch(Ae=>{throw new Wy(Ae)}),Q=$.headers.get("x-relay-error");if(Q&&Q==="true")throw new Zm($);if(!$.ok)throw new Pm($);let I=((c=$.headers.get("Content-Type"))!==null&&c!==void 0?c:"text/plain").split(";")[0].trim(),te;return I==="application/json"?te=yield $.json():I==="application/octet-stream"||I==="application/pdf"?te=yield $.blob():I==="text/event-stream"?te=$:I==="multipart/form-data"?te=yield $.formData():te=yield $.text(),{data:te,error:null,response:$}}catch(m){return{data:null,error:m,response:m instanceof Pm||m instanceof Zm?m.context:void 0}}finally{d&&clearTimeout(d)}})}}var eb=class extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
34de=r.code}},tb=class{constructor(r){var n,i;this.shouldThrowOnError=!1,this.method=r.method,this.url=r.url,this.headers=new Headers(r.headers),this.schema=r.schema,this.body=r.body,this.shouldThrowOnError=(n=r.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=r.signal,this.isMaybeSingle=(i=r.isMaybeSingle)!==null&&i!==void 0?i:!1,r.fetch?this.fetch=r.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(r,n){return this.headers=new Headers(this.headers),this.headers.set(r,n),this}then(r,n){var i=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 l=this.fetch;let c=l(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async d=>{let f=null,m=null,g=null,p=d.status,S=d.statusText;if(d.ok){var y,T;if(i.method!=="HEAD"){var R;const $=await d.text();$===""||(i.headers.get("Accept")==="text/csv"||i.headers.get("Accept")&&(!((R=i.headers.get("Accept"))===null||R===void 0)&&R.includes("application/vnd.pgrst.plan+text"))?m=$:m=JSON.parse($))}const H=(y=i.headers.get("Prefer"))===null||y===void 0?void 0:y.match(/count=(exact|planned|estimated)/),Y=(T=d.headers.get("content-range"))===null||T===void 0?void 0:T.split("/");H&&Y&&Y.length>1&&(g=parseInt(Y[1])),i.isMaybeSingle&&i.method==="GET"&&Array.isArray(m)&&(m.length>1?(f={code:"PGRST116",details:`Results contain ${m.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},m=null,g=null,p=406,S="Not Acceptable"):m.length===1?m=m[0]:m=null)}else{var N;const H=await d.text();try{f=JSON.parse(H),Array.isArray(f)&&d.status===404&&(m=[],f=null,p=200,S="OK")}catch{d.status===404&&H===""?(p=204,S="No Content"):f={message:H}}if(f&&i.isMaybeSingle&&(!(f==null||(N=f.details)===null||N===void 0)&&N.includes("0 rows"))&&(f=null,p=200,S="OK"),f&&i.shouldThrowOnError)throw new eb(f)}return{error:f,data:m,count:g,status:p,statusText:S}});return this.shouldThrowOnError||(c=c.catch(d=>{var f;let m="";const g=d==null?void 0:d.cause;if(g){var p,S,y,T;const N=(p=g==null?void 0:g.message)!==null&&p!==void 0?p:"",H=(S=g==null?void 0:g.code)!==null&&S!==void 0?S:"";m=`${(y=d==null?void 0:d.name)!==null&&y!==void 0?y:"FetchError"}: ${d==null?void 0:d.message}`,m+=` 35 36Caused by: ${(T=g==null?void 0:g.name)!==null&&T!==void 0?T:"Error"}: ${N}`,H&&(m+=` (${H})`),g!=null&&g.stack&&(m+=` 37${g.stack}`)}else{var R;m=(R=d==null?void 0:d.stack)!==null&&R!==void 0?R:""}return{error:{message:`${(f=d==null?void 0:d.name)!==null&&f!==void 0?f:"FetchError"}: ${d==null?void 0:d.message}`,details:m,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),c.then(r,n)}returns(){return this}overrideTypes(){return this}},ab=class extends tb{select(r){let n=!1;const i=(r??"*").split("").map(l=>/\s/.test(l)&&!n?"":(l==='"'&&(n=!n),l)).join("");return this.url.searchParams.set("select",i),this.headers.append("Prefer","return=representation"),this}order(r,{ascending:n=!0,nullsFirst:i,foreignTable:l,referencedTable:c=l}={}){const d=c?`${c}.order`:"order",f=this.url.searchParams.get(d);return this.url.searchParams.set(d,`${f?`${f},`:""}${r}.${n?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(r,{foreignTable:n,referencedTable:i=n}={}){const l=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(l,`${r}`),this}range(r,n,{foreignTable:i,referencedTable:l=i}={}){const c=typeof l>"u"?"offset":`${l}.offset`,d=typeof l>"u"?"limit":`${l}.limit`;return this.url.searchParams.set(c,`${r}`),this.url.searchParams.set(d,`${n-r+1}`),this}abortSignal(r){return this.signal=r,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}
37explain({analyze:r=!1,verbose:n=!1,settings:i=!1,buffers:l=!1,wal:c=!1,format:d="text"}={}){var f;const m=[r?"analyze":null,n?"verbose":null,i?"settings":null,l?"buffers":null,c?"wal":null].filter(Boolean).join("|"),g=(f=this.headers.get("Accept"))!==null&&f!==void 0?f:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${d}; for="${g}"; options=${m};`),d==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(r){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${r}`),this}};const Wm=new RegExp("[,()]");var ti=class extends ab{eq(r,n){return this.url.searchParams.append(r,`eq.${n}`),this}neq(r,n){return this.url.searchParams.append(r,`neq.${n}`),this}gt(r,n){return this.url.searchParams.append(r,`gt.${n}`),this}gte(r,n){return this.url.searchParams.append(r,`gte.${n}`),this}lt(r,n){return this.url.searchParams.append(r,`lt.${n}`),this}lte(r,n){return this.url.searchParams.append(r,`lte.${n}`),this}like(r,n){return this.url.searchParams.append(r,`like.${n}`),this}likeAllOf(r,n){return this.url.searchParams.append(r,`like(all).{${n.join(",")}}`),this}likeAnyOf(r,n){return this.url.searchParams.append(r,`like(any).{${n.join(",")}}`),this}ilike(r,n){return this.url.searchParams.append(r,`ilike.${n}`),this}ilikeAllOf(r,n){return this.url.searchParams.append(r,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(r,n){return this.url.searchParams.append(r,`ilike(any).{${n.join(",")}}`),this}regexMatch(r,n){return this.url.searchParams.append(r,`match.${n}`),this}regexIMatch(r,n){return this.url.searchParams.append(r,`imatch.${n}`),this}is(r,n){return this.url.searchParams.append(r,`is.${n}`),this}isDistinct(r,n){return this.url.searchParams.append(r,`isdistinct.${n}`),this}in(r,n){const i=Array.from(new Set(n)).map(l=>typeof l=="string"&&Wm.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(r,`in.(${i})`),this}notIn(r,n){const i=Array.from(new Set(n)).map(l=>typeof l=="string"&&Wm.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(r,`not.in.(${i})`),this}contains(r,n){return typeof n=="string"?this.url.searchParams.append(r,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(r,`cs.{${n.join(",")}}`):this.url.searchParams.append(r,`cs.${JSON.stringify(n)}`),this}containedBy(r,n){return typeof n=="string"?this.url.searchParams.append(r,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(r,`cd.{${n.join(",")}}`):this.url.searchParams.append(r,`cd.${JSON.stringify(n)}`),this}rangeGt(r,n){return this.url.searchParams.append(r,`sr.${n}`),this}rangeGte(r,n){return this.url.searchParams.append(r,`nxl.${n}`),this}rangeLt(r,n){return this.url.searchParams.append(r,`sl.${n}`),this}rangeLte(r,n){return this.url.searchParams.append(r,`nxr.${n}`),this}rangeAdjacent(r,n){return this.url.searchParams.append(r,`adj.${n}`),this}overlaps(r,n){return typeof n=="string"?this.url.searchParams.append(r,`ov.${n}`):this.url.searchParams.append(r,`ov.{${n.join(",")}}`),this}textSearch(r,n,{config:i,type:l}={}){let c="";l==="plain"?c="pl":l==="phrase"?c="ph":l==="websearch"&&(c="w");const d=i===void 0?"":`(${i})`;return this.url.searchParams.append(r,`${c}fts${d}.${n}`),this}match(r){return Object.entries(r).forEach(([n,i])=>{this.url.searchParams.append(n,`eq.${i}`)}),this}not(r,n,i){return this.url.searchParams.append(r,`not.${n}.${i}`),this}or(r,{foreignTable:n,referencedTable:i=n}={}){const l=i?`${i}.or`:"or";return this.url.searchParams.append(l,`(${r})`),this}filter(r,n,i){return this.url.searchParams.append(r,`${n}.${i}`),this}},nb=class{constructor(r,{headers:n={},schema:i,fetch:l}){this.url=r,this.headers=new Headers(n),this.schema=i,this.fetch=l}select(r,n){const{head:i=!1,count:l}=n??{},c=i?"HEAD":"GET";let d=!1;const f=(r??"*").split("").map(m=>/\s/.test(m)&&!d?"":(m==='"'&&(d=!d),m)).join("");return this.url.searchParams.set("select",f),l&&this.headers.append("Prefer",`count=${l}`),new ti({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(r,{count:n,defaultToNull:i=!0}={}){var l;const c="POST";if(n&&this.headers.append("Prefer",`count=${n}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(r)){const d=r.reduce((f,m)=>f.concat(Object.keys(m)),[]);if(d.length>0){const f=[...new Set(d)].map(m=>`"${m}"`);this.url.searchParams.set("columns",f.join(","))}}return new ti({method:c,url:this.url,headers:this.headers,schema:this.schema,body:r,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}upsert(r,{onConflict:n,ignoreDuplicates:i=!1,count:l,defaultToNull:c=!0}={}){var d;const f="POST";if(this.headers.append("Prefer",`resolution=${i?"ignore":"merge"}-duplicates`),n!==void 0&&this.url.searchParams.set("on_conflict",n),l&&this.headers.append("Prefer",`count=${l}`),c||this.headers.append("Prefer","missing=default"),Array.isArray(r)){const m=r.reduce((g,p)=>g.concat(Object.keys(p)),[]);if(m.length>0){const g=[...new Set(m)].map(p=>`"${p}"`);this.url.searchParams.set("columns",g.join(","))}}return new ti({method:f,url:this.url,headers:this.headers,schema:this.schema,body:r,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch})}update(r,{count:n}={}){var i;const l="PATCH";return n&&this.headers.append("Prefer",`count=${n}`),new ti({method:l,url:this.url,headers:this.headers,schema:this.schema,body:r,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}delete({count:r}={}){var n;const i="DELETE";return r&&this.headers.append("Prefer",`count=${r}`),new ti({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}},sb=class Bg{constructor(n,{headers:i={},schema:l,fetch:c}={}){this.url=n,this.headers=new Headers(i),this.schemaName=l,this.fetch=c}
37from(n){if(!n||typeof n!="string"||n.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new nb(new URL(`${this.url}/${n}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(n){return new Bg(this.url,{headers:this.headers,schema:n,fetch:this.fetch})}rpc(n,i={},{head:l=!1,get:c=!1,count:d}={}){var f;let m;const g=new URL(`${this.url}/rpc/${n}`);let p;l||c?(m=l?"HEAD":"GET",Object.entries(i).filter(([y,T])=>T!==void 0).map(([y,T])=>[y,Array.isArray(T)?`{${T.join(",")}}`:`${T}`]).forEach(([y,T])=>{g.searchParams.append(y,T)})):(m="POST",p=i);const S=new Headers(this.headers);return d&&S.set("Prefer",`count=${d}`),new ti({method:m,url:g,headers:S,schema:this.schemaName,body:p,fetch:(f=this.fetch)!==null&&f!==void 0?f:fetch})}};class ib{constructor(){}static detectEnvironment(){var n;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"&&(!((n=navigator.userAgent)===null||n===void 0)&&n.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."};if(typeof process<"u"){const i=process.versions;if(i&&i.node){const l=i.node,c=parseInt(l.replace(/^v/,"").split(".")[0]);return c>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${c} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${c} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 38import ws from "ws" 39new 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 n=this.detectEnvironment();if(n.constructor)return n.constructor;let i=n.error||"WebSocket not supported in this environment.";throw n.workaround&&(i+=` 40 41Suggested solution: ${n.workaround}`),new Error(i)}static createWebSocket(n,i){const l=this.getWebSocketConstructor();return new l(n,i)}static isWebSocketSupported(){try{const n=this.detectEnvironment();return n.type==="native"||n.type==="ws"}catch{return!1}}}const rb="2.88.0",lb=`realtime-js/${rb}`,qg="1.0.0",ob="2.0.0",Fm=qg,xc=1e4,ub=1e3,cb=100;var jn;(function(r){r[r.connecting=0]="connecting",r[r.open=1]="open",r[r.closing=2]="closing",r[r.closed=3]="closed"})(jn||(jn={}));var lt;(function(r){r.closed="closed",r.errored="errored",r.joined="joined",r.joining="joining",r.leaving="leaving"})(lt||(lt={}));var _a;(function(r){r.close="phx_close",r.error="phx_error",r.join="phx_join",r.reply="phx_reply",r.leave="phx_leave",r.access_token="access_token"})(_a||(_a={}));var Ac;(function(r){r.websocket="websocket"})(Ac||(Ac={}));var as;(function(r){r.Connecting="connecting",r.Open="open",r.Closing="closing",r.Closed="closed"})(as||(as={}));class db{constructor(n){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=n??[]}encode(n,i){if(n.event===this.BROADCAST_EVENT&&!(n.payload instanceof ArrayBuffer)&&typeof n.payload.event=="string")return i(this._binaryEncodeUserBroadcastPush(n));let l=[n.join_ref,n.ref,n.topic,n.event,n.payload];return i(JSON.stringify(l))}_binaryEncodeUserBroadcastPush(n){var i;return this._isArrayBuffer((i=n.payload)===null||i===void 0?void 0:i.payload)?this._encodeBinaryUserBroadcastPush(n):this._encodeJsonUserBroadcastPush(n)}_encodeBinaryUserBroadcastPush(n){var i,l;const c=(l=(i=n.payload)===null||i===void 0?void 0:i.payload)!==null&&l!==void 0?l:new ArrayBuffer(0);return this._encodeUserBroadcastPush(n,this.BINARY_ENCODING,c)}_encodeJsonUserBroadcastPush(n){var i,l;const c=(l=(i=n.payload)===null||i===void 0?void 0:i.payload)!==null&&l!==void 0?l:{},f=new TextEncoder().encode(JSON.stringify(c)).buffer;return this._encodeUserBroadcastPush(n,this.JSON_ENCODING,f)}_encodeUserBroadcastPush(n,i,l){var c,d;const f=n.topic,m=(c=n.ref)!==null&&c!==void 0?c:"",g=(d=n.join_ref)!==null&&d!==void 0?d:"",p=n.payload.event,S=this.allowedMetadataKeys?this._pick(n.payload,this.allowedMetadataKeys):{},y=Object.keys(S).length===0?"":JSON.stringify(S);if(g.length>255)throw new Error(`joinRef length ${g.length} exceeds maximum of 255`);if(m.length>255)throw new Error(`ref length ${m.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`topic length ${f.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`userEvent length ${p.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`metadata length ${y.length} exceeds maximum of 255`);const T=this.USER_BROADCAST_PUSH_META_LENGTH+g.length+m.length+f.length+p.length+y.length,R=new ArrayBuffer(this.HEADER_LENGTH+T);let N=new DataView(R),H=0;N.setUint8(H++,this.KINDS.userBroadcastPush),N.setUint8(H++,g.length),N.setUint8(H++,m.length),N.setUint8(H++,f.length),N.setUint8(H++,p.length),N.setUint8(H++,y.length),N.setUint8(H++,i),Array.from(g,$=>N.setUint8(H++,$.charCodeAt(0))),Array.from(m,$=>N.setUint8(H++,$.charCodeAt(0))),Array.from(f,$=>N.setUint8(H++,$.charCodeAt(0))),Array.from(p,$=>N.setUint8(H++,$.charCodeAt(0))),Array.from(y,$=>N.setUint8(H++,$.charCodeAt(0)));var Y=new Uint8Array(R.byteLength+l.byteLength);return Y.set(new Uint8Array(R),0),Y.set(new Uint8Array(l),R.byteLength),Y.buffer}decode(n,i){if(this._isArrayBuffer(n)){let l=this._binaryDecode(n);return i(l)}if(typeof n=="string"){const l=JSON.parse(n),[c,d,f,m,g]=l;return i({join_ref:c,ref:d,topic:f,event:m,payload:g})}return i({})}_binaryDecode(n){const i=new DataView(n),l=i.getUint8(0),c=new TextDecoder;switch(l){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(n,i,c)}}_decodeUserBroadcast(n,i,l){const c=i.getUint8(1),d=i.getUint8(2),f=i.getUint8(3),m=i.getUint8(4);let g=this.HEADER_LENGTH+4;const p=l.decode(n.slice(g,g+c));g=g+c;const S=l.decode(n.slice(g,g+d));g=g+d;const y=l.decode(n.slice(g,g+f));g=g+f;const T=n.slice(g,n.byteLength),R=m===this.JSON_ENCODING?JSON.parse(l.decode(T)):T,N={type:this.BROADCAST_EVENT,event:S,payload:R};return f>0&&(N.meta=JSON.parse(y)),{join_ref:null,ref:null,topic:p,event:this.BROADCAST_EVENT,payload:N}}_isArrayBuffer(n){var i;return n instanceof ArrayBuffer||((i=n==null?void 0:n.constructor)===null||i===void 0?void 0:i.name)==="ArrayBuffer"}_pick(n,i){return!n||typeof n!="object"?{}:Object.fromEntries(Object.entries(n).filter(([l])=>i.includes(l)))}}class Lg{constructor(n,i){this.callback=n,this.timerCalc=i,this.timer=void 0,this.tries=0,this.callback=n,this.timerCalc=i}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 qe;(function(r){r.abstime="abstime",r.bool="bool",r.date="date",r.daterange="daterange",r.float4="float4",r.float8="float8",r.int2="int2",r.int4="int4",r.int4range="int4range",r.int8="int8",r.int8range="int8range",r.json="json",r.jsonb="jsonb",r.money="money",r.numeric="numeric",r.oid="oid",r.reltime="reltime",r.text="text",r.time="time",r.timestamp="timestamp",r.timestamptz="timestamptz",r.timetz="timetz",r.tsrange="tsrange",r.tstzrange="tstzrange"})(qe||(qe={}));const eg=(r,n,i={})=>{var l;const c=(l=i.skipTypes)!==null&&l!==void 0?l:[];return n?Object.keys(n).reduce((d,f)=>(d[f]=fb(f,r,n,c),d),{}):{}},fb=(r,n,i,l)=>{const c=n.find(m=>m.name===r),d=c==null?void 0:c.type,f=i[r];return d&&!l.includes(d)?Hg(d,f):Oc(f)},Hg=(r,n)=>{if(r.charAt(0)==="_"){const i=r.slice(1,r.length);return pb(n,i)}switch(r){case qe.bool:return hb(n);case qe.float4:case qe.float8:case qe.int2:case qe.int4:case qe.int8:case qe.numeric:case qe.oid:return mb(n);case qe.json:case qe.jsonb:return gb(n);case qe.timestamp:return vb(n);case qe.abstime:case qe.date:case qe.daterange:case qe.int4range:case qe.int8range:case qe.money:case qe.reltime:case qe.text:case qe.time:case qe.timestamptz:case qe.timetz:case qe.tsrange:case qe.tstzrange:return Oc(n);default:return Oc(n)}},Oc=r=>r,hb=r=>{switch(r){case"t":return!0;case"f":return!1;default:return r}},mb=r=>{if(typeof r=="string"){const n=parseFloat(r);if(!Number.isNaN(n))return n}return r},gb=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch{return r}return r},pb=(r,n)=>{if(typeof r!="string")return r;const i=r.length-1,l=r[i];if(r[0]==="{"&&l==="}"){let d;const f=r.slice(1,i);try{d=JSON.parse("["+f+"]")}catch{d=f?f.split(","):[]}return d.map(m=>Hg(n,m))}return r},vb=r=>typeof r=="string"?r.replace(" ","T"):r,$g=r=>{const n=new URL(r);return n.protocol=n.protocol.replace(/^ws/i,"http"),n.pathname=n.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),n.pathname===""||n.pathname==="/"?n.pathname="/api/broadcast":n.pathname=n.pathname+"/api/broadcast",n.href};class lc{constructor(n,i,l={},c=xc){this.channel=n,this.event=i,this.payload=l,this.timeout=c,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHo
41oks=[],this.refEvent=null}resend(n){this.timeout=n,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,join_ref:this.channel._joinRef()}))}updatePayload(n){this.payload=Object.assign(Object.assign({},this.payload),n)}receive(n,i){var l;return this._hasReceived(n)&&i((l=this.receivedResp)===null||l===void 0?void 0:l.response),this.recHooks.push({status:n,callback:i}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const n=i=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=i,this._matchReceive(i)};this.channel._on(this.refEvent,{},n),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(n,i){this.refEvent&&this.channel._trigger(this.refEvent,{status:n,response:i})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:n,response:i}){this.recHooks.filter(l=>l.status===n).forEach(l=>l.callback(i))}_hasReceived(n){return this.receivedResp&&this.receivedResp.status===n}}var tg;(function(r){r.SYNC="sync",r.JOIN="join",r.LEAVE="leave"})(tg||(tg={}));class nr{constructor(n,i){this.channel=n,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const l=(i==null?void 0:i.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(l.state,{},c=>{const{onJoin:d,onLeave:f,onSync:m}=this.caller;this.joinRef=this.channel._joinRef(),this.state=nr.syncState(this.state,c,d,f),this.pendingDiffs.forEach(g=>{this.state=nr.syncDiff(this.state,g,d,f)}),this.pendingDiffs=[],m()}),this.channel._on(l.diff,{},c=>{const{onJoin:d,onLeave:f,onSync:m}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(c):(this.state=nr.syncDiff(this.state,c,d,f),m())}),this.onJoin((c,d,f)=>{this.channel._trigger("presence",{event:"join",key:c,currentPresences:d,newPresences:f})}),this.onLeave((c,d,f)=>{this.channel._trigger("presence",{event:"leave",key:c,currentPresences:d,leftPresences:f})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(n,i,l,c){const d=this.cloneDeep(n),f=this.transformState(i),m={},g={};return this.map(d,(p,S)=>{f[p]||(g[p]=S)}),this.map(f,(p,S)=>{const y=d[p];if(y){const T=S.map(Y=>Y.presence_ref),R=y.map(Y=>Y.presence_ref),N=S.filter(Y=>R.indexOf(Y.presence_ref)<0),H=y.filter(Y=>T.indexOf(Y.presence_ref)<0);N.length>0&&(m[p]=N),H.length>0&&(g[p]=H)}else m[p]=S}),this.syncDiff(d,{joins:m,leaves:g},l,c)}static syncDiff(n,i,l,c){const{joins:d,leaves:f}={joins:this.transformState(i.joins),leaves:this.transformState(i.leaves)};return l||(l=()=>{}),c||(c=()=>{}),this.map(d,(m,g)=>{var p;const S=(p=n[m])!==null&&p!==void 0?p:[];if(n[m]=this.cloneDeep(g),S.length>0){const y=n[m].map(R=>R.presence_ref),T=S.filter(R=>y.indexOf(R.presence_ref)<0);n[m].unshift(...T)}l(m,S,g)}),this.map(f,(m,g)=>{let p=n[m];if(!p)return;const S=g.map(y=>y.presence_ref);p=p.filter(y=>S.indexOf(y.presence_ref)<0),n[m]=p,c(m,p,g),p.length===0&&delete n[m]}),n}static map(n,i){return Object.getOwnPropertyNames(n).map(l=>i(l,n[l]))}static transformState(n){return n=this.cloneDeep(n),Object.getOwnPropertyNames(n).reduce((i,l)=>{const c=n[l];return"metas"in c?i[l]=c.metas.map(d=>(d.presence_ref=d.phx_ref,delete d.phx_ref,delete d.phx_ref_prev,d)):i[l]=c,i},{})}static cloneDeep(n){return JSON.parse(JSON.stringify(n))}onJoin(n){this.caller.onJoin=n}onLeave(n){this.caller.onLeave=n}onSync(n){this.caller.onSync=n}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var ag;(function(r){r.ALL="*",r.INSERT="INSERT",r.UPDATE="UPDATE",r.DELETE="DELETE"})(ag||(ag={}));var sr;(function(r){r.BROADCAST="broadcast",r.PRESENCE="presence",r.POSTGRES_CHANGES="postgres_changes",r.SYSTEM="system"})(sr||(sr={}));var Fa;(function(r){r.SUBSCRIBED="SUBSCRIBED",r.TIMED_OUT="TIMED_OUT",r.CLOSED="CLOSED",r.CHANNEL_ERROR="CHANNEL_ERROR"})(Fa||(Fa={}));class si{constructor(n,i={config:{}},l){var c,d;if(this.topic=n,this.params=i,this.socket=l,this.bindings={},this.state=lt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=n.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},i.config),this.timeout=this.socket.timeout,this.joinPush=new lc(this,_a.join,this.params,this.timeout),this.rejoinTimer=new Lg(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=lt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(f=>f.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=lt.closed,this.socket._remove(this)}),this._onError(f=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,f),this.state=lt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=lt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",f=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,f),this.state=lt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(_a.reply,{},(f,m)=>{this._trigger(this._replyEventName(m),f)}),this.presence=new nr(this),this.broadcastEndpointURL=$g(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((d=(c=this.params.config)===null||c===void 0?void 0:c.broadcast)===null||d===void 0)&&d.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(n,i=this.timeout){var l,c,d;if(this.socket.isConnected()||this.socket.connect(),this.state==lt.closed){const{config:{broadcast:f,presence:m,private:g}}=this.params,p=(c=(l=this.bindings.postgres_changes)===null||l===void 0?void 0:l.map(R=>R.filter))!==null&&c!==void 0?c:[],S=!!this.bindings[sr.PRESENCE]&&this.bindings[sr.PRESENCE].length>0||((d=this.params.config.presence)===null||d===void 0?void 0:d.enabled)===!0,y={},T={broadcast:f,presence:Object.assign(Object.assign({},m),{enabled:S}),postgres_changes:p,private:g};this.socket.accessTokenValue&&(y.access_token=this.socket.accessTokenValue),this._onError(R=>n==null?void 0:n(Fa.CHANNEL_ERROR,R)),this._onClose(()=>n==null?void 0:n(Fa.CLOSED)),this.updateJoinPayload(Object.assign({config:T},y)),this.joinedOnce=!0,this._rejoin(i),this.joinPush.receive("ok",async({postgres_changes:R})=>{var N;if(this.socket._isManualToken()||this.socket.setAuth(),R===void 0){n==null||n(Fa.SUBSCRIBED);return}else{const H=this.bindings.postgres_changes,Y=(N=H==null?void 0:H.length)!==null&&N!==void 0?N:0,$=[];for(let Q=0;Q<Y;Q++){const I=H[Q],{filter:{event:te,schema:Ae,table:ie,filter:he}}=I,Oe=R&&R[Q];if(Oe&&Oe.event===te&&si.isFilterValueEqual(Oe.schema,Ae)&&si.isFilterValueEqual(Oe.table,ie)&&si.isFilterValueEqual(Oe.filter,he))$.push(Object.assign(Object.assign({},I),{id:Oe.id}));else{this.unsubscribe(),this.state=lt.errored,n==null||n(Fa.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=$,n&&n(Fa.SUBSCRIBED);return}}).receive("error",R=>{this.state=lt.errored,n==null||n(Fa.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(R).join(", ")||"error")))}).receive("timeout",()=>{n==null||n(Fa.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(n,i={}){return await this.send({type:"presence",event:"track",payload:n},i.timeout||this.timeout)}async untrack(n={}){return await this.send({type:"presence",event:"untrack"},n)}on(n,i,l){return this.state===lt.joined&&n===sr.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(n,i,l)}async httpSend(n,i,l={}){var c;if(i==null)return Promise.reject("Payload is required for httpSend()");const d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:d,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:i,private:this.private}]})},m=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(c=l.timeout)!==null&&c!==void 0?c:this.timeout);if(m.status===202)return{success:!0};let g=m.statusText;
41try{const p=await m.json();g=p.error||p.message||g}catch{}return Promise.reject(new Error(g))}async send(n,i={}){var l,c;if(!this._canPush()&&n.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:d,payload:f}=n,m={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(m.Authorization=`Bearer ${this.socket.accessTokenValue}`);const g={method:"POST",headers:m,body:JSON.stringify({messages:[{topic:this.subTopic,event:d,payload:f,private:this.private}]})};try{const p=await this._fetchWithTimeout(this.broadcastEndpointURL,g,(l=i.timeout)!==null&&l!==void 0?l:this.timeout);return await((c=p.body)===null||c===void 0?void 0:c.cancel()),p.ok?"ok":"error"}catch(p){return p.name==="AbortError"?"timed out":"error"}}else return new Promise(d=>{var f,m,g;const p=this._push(n.type,n,i.timeout||this.timeout);n.type==="broadcast"&&!(!((g=(m=(f=this.params)===null||f===void 0?void 0:f.config)===null||m===void 0?void 0:m.broadcast)===null||g===void 0)&&g.ack)&&d("ok"),p.receive("ok",()=>d("ok")),p.receive("error",()=>d("error")),p.receive("timeout",()=>d("timed out"))})}updateJoinPayload(n){this.joinPush.updatePayload(n)}unsubscribe(n=this.timeout){this.state=lt.leaving;const i=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(_a.close,"leave",this._joinRef())};this.joinPush.destroy();let l=null;return new Promise(c=>{l=new lc(this,_a.leave,{},n),l.receive("ok",()=>{i(),c("ok")}).receive("timeout",()=>{i(),c("timed out")}).receive("error",()=>{c("error")}),l.send(),this._canPush()||l.trigger("ok",{})}).finally(()=>{l==null||l.destroy()})}teardown(){this.pushBuffer.forEach(n=>n.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=lt.closed,this.bindings={}}async _fetchWithTimeout(n,i,l){const c=new AbortController,d=setTimeout(()=>c.abort(),l),f=await this.socket.fetch(n,Object.assign(Object.assign({},i),{signal:c.signal}));return clearTimeout(d),f}_push(n,i,l=this.timeout){if(!this.joinedOnce)throw`tried to push '${n}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let c=new lc(this,n,i,l);return this._canPush()?c.send():this._addToPushBuffer(c),c}_addToPushBuffer(n){if(n.startTimeout(),this.pushBuffer.push(n),this.pushBuffer.length>cb){const i=this.pushBuffer.shift();i&&(i.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload))}}_onMessage(n,i,l){return i}_isMember(n){return this.topic===n}_joinRef(){return this.joinPush.ref}_trigger(n,i,l){var c,d;const f=n.toLocaleLowerCase(),{close:m,error:g,leave:p,join:S}=_a;if(l&&[m,g,p,S].indexOf(f)>=0&&l!==this._joinRef())return;let T=this._onMessage(f,i,l);if(i&&!T)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(f)?(c=this.bindings.postgres_changes)===null||c===void 0||c.filter(R=>{var N,H,Y;return((N=R.filter)===null||N===void 0?void 0:N.event)==="*"||((Y=(H=R.filter)===null||H===void 0?void 0:H.event)===null||Y===void 0?void 0:Y.toLocaleLowerCase())===f}).map(R=>R.callback(T,l)):(d=this.bindings[f])===null||d===void 0||d.filter(R=>{var N,H,Y,$,Q,I;if(["broadcast","presence","postgres_changes"].includes(f))if("id"in R){const te=R.id,Ae=(N=R.filter)===null||N===void 0?void 0:N.event;return te&&((H=i.ids)===null||H===void 0?void 0:H.includes(te))&&(Ae==="*"||(Ae==null?void 0:Ae.toLocaleLowerCase())===((Y=i.data)===null||Y===void 0?void 0:Y.type.toLocaleLowerCase()))}else{const te=(Q=($=R==null?void 0:R.filter)===null||$===void 0?void 0:$.event)===null||Q===void 0?void 0:Q.toLocaleLowerCase();return te==="*"||te===((I=i==null?void 0:i.event)===null||I===void 0?void 0:I.toLocaleLowerCase())}else return R.type.toLocaleLowerCase()===f}).map(R=>{if(typeof T=="object"&&"ids"in T){const N=T.data,{schema:H,table:Y,commit_timestamp:$,type:Q,errors:I}=N;T=Object.assign(Object.assign({},{schema:H,table:Y,commit_timestamp:$,eventType:Q,new:{},old:{},errors:I}),this._getPayloadRecords(N))}R.callback(T,l)})}_isClosed(){return this.state===lt.closed}_isJoined(){return this.state===lt.joined}_isJoining(){return this.state===lt.joining}_isLeaving(){return this.state===lt.leaving}_replyEventName(n){return`chan_reply_${n}`}_on(n,i,l){const c=n.toLocaleLowerCase(),d={type:c,filter:i,callback:l};return this.bindings[c]?this.bindings[c].push(d):this.bindings[c]=[d],this}_off(n,i){const l=n.toLocaleLowerCase();return this.bindings[l]&&(this.bindings[l]=this.bindings[l].filter(c=>{var d;return!(((d=c.type)===null||d===void 0?void 0:d.toLocaleLowerCase())===l&&si.isEqual(c.filter,i))})),this}static isEqual(n,i){if(Object.keys(n).length!==Object.keys(i).length)return!1;for(const l in n)if(n[l]!==i[l])return!1;return!0}static isFilterValueEqual(n,i){return(n??void 0)===(i??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(n){this._on(_a.close,{},n)}_onError(n){this._on(_a.error,{},i=>n(i))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(n=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=lt.joining,this.joinPush.resend(n))}_getPayloadRecords(n){const i={new:{},old:{}};
41return(n.type==="INSERT"||n.type==="UPDATE")&&(i.new=eg(n.columns,n.record)),(n.type==="UPDATE"||n.type==="DELETE")&&(i.old=eg(n.columns,n.old_record)),i}}const oc=()=>{},Ol={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},yb=[1e3,2e3,5e3,1e4],bb=1e4,_b=` 42 addEventListener("message", (e) => { 43 if (e.data.event === "start") { 44 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 45 } 46 });`;class wb{constructor(n,i){var l;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=xc,this.transport=null,this.heartbeatIntervalMs=Ol.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=oc,this.ref=0,this.reconnectTimer=null,this.vsn=Fm,this.logger=oc,this.conn=null,this.sendBuffer=[],this.serializer=new db,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=c=>c?(...d)=>c(...d):(...d)=>fetch(...d),!(!((l=i==null?void 0:i.params)===null||l===void 0)&&l.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=i.params.apikey,this.endPoint=`${n}/${Ac.websocket}`,this.httpEndpoint=$g(n),this._initializeOptions(i),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(i==null?void 0:i.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=ib.createWebSocket(this.endpointURL())}catch(n){this._setConnectionState("disconnected");const i=n.message;throw i.includes("Node.js")?new Error(`${i} 47 48To use Realtime in Node.js, you need to provide a WebSocket implementation: 49 50Option 1: Use Node.js 22+ which has native WebSocket support 51Option 2: Install and provide the "ws" package: 52 53 npm install ws 54 55 import ws from "ws" 56 const client = new RealtimeClient(url, { 57 ...options, 58 transport: ws 59 })`):new Error(`WebSocket not available: ${i}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(n,i){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const l=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(l),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(n?this.conn.close(n,i??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(n){const i=await n.unsubscribe();return this.channels.length===0&&this.disconnect(),i}async removeAllChannels(){const n=await Promise.all(this.channels.map(i=>i.unsubscribe()));return this.channels=[],this.disconnect(),n}log(n,i,l){this.logger(n,i,l)}connectionState(){switch(this.conn&&this.conn.readyState){case jn.connecting:return as.Connecting;case jn.open:return as.Open;case jn.closing:return as.Closing;default:return as.Closed}}isConnected(){return this.connectionState()===as.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(n,i={config:{}}){const l=`realtime:${n}`,c=this.getChannels().find(d=>d.topic===l);if(c)return c;{const d=new si(`realtime:${n}`,i,this);return this.channels.push(d),d}}push(n){const{topic:i,event:l,payload:c,ref:d}=n,f=()=>{this.encode(n,m=>{var g;(g=this.conn)===null||g===void 0||g.send(m)})};this.log("push",`${i} ${l} (${d})`,c),this.isConnected()?f():this.sendBuffer.push(f)}async setAuth(n=null){this._authPromise=this._performAuth(n);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var n;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(i){this.log("error","error in heartbeat callback",i)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(i){this.log("error","error in heartbeat callback",i)}this._wasManualDisconnect=!1,(n=this.conn)===null||n===void 0||n.close(ub,"heartbeat timeout"),setTimeout(()=>{var i;this.isConnected()||(i=this.reconnectTimer)===null||i===void 0||i.scheduleTimeout()},Ol.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(i){this.log("error","error in heartbeat callback",i)}this._setAuthSafely("heartbeat")}onHeartbeat(n){this.heartbeatCallback=n}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(n=>n()),this.sendBuffer=[])}_makeRef(){let n=this.ref+1;return n===this.ref?this.ref=0:this.ref=n,this.ref.toString()}_leaveOpenTopic(n){let i=this.channels.find(l=>l.topic===n&&(l._isJoined()||l._isJoining()));i&&(this.log("transport",`leaving duplicate topic "${n}"`),i.unsubscribe())}_remove(n){this.channels=this.channels.filter(i=>i.topic!==n.topic)}_onConnMessage(n){this.decode(n.data,i=>
59{if(i.topic==="phoenix"&&i.event==="phx_reply")try{this.heartbeatCallback(i.payload.status==="ok"?"ok":"error")}catch(p){this.log("error","error in heartbeat callback",p)}i.ref&&i.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:l,event:c,payload:d,ref:f}=i,m=f?`(${f})`:"",g=d.status||"";this.log("receive",`${g} ${l} ${c} ${m}`.trim(),d),this.channels.filter(p=>p._isMember(l)).forEach(p=>p._trigger(c,d,f)),this._triggerStateCallbacks("message",i)})}_clearTimer(n){var i;n==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):n==="reconnect"&&((i=this.reconnectTimer)===null||i===void 0||i.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=n=>this._onConnError(n),this.conn.onmessage=n=>this._onConnMessage(n),this.conn.onclose=n=>this._onConnClose(n),this.conn.readyState===jn.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===jn.open||this.conn.readyState===jn.connecting)try{this.conn.close()}catch(n){this.log("error","Error closing connection",n)}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(n=>n.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(i=>{this.log("error","error waiting for auth on connect",i),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 n=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(n),this.workerRef.onerror=i=>{this.log("worker","worker error",i.message),this._terminateWorker()},this.workerRef.onmessage=i=>{i.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(n){var i;this._setConnectionState("disconnected"),this.log("transport","close",n),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(i=this.reconnectTimer)===null||i===void 0||i.scheduleTimeout(),this._triggerStateCallbacks("close",n)}_onConnError(n){this._setConnectionState("disconnected"),this.log("transport",`${n}`),this._triggerChanError(),this._triggerStateCallbacks("error",n)}_triggerChanError(){this.channels.forEach(n=>n._trigger(_a.error))}_appendParams(n,i){if(Object.keys(i).length===0)return n;const l=n.match(/\?/)?"&":"?",c=new URLSearchParams(i);return`${n}${l}${c}`}_workerObjectUrl(n){let i;if(n)i=n;else{const l=new Blob([_b],{type:"application/javascript"});i=URL.createObjectURL(l)}return i}_setConnectionState(n,i=!1){this._connectionState=n,n==="connecting"?this._wasManualDisconnect=!1:n==="disconnecting"&&(this._wasManualDisconnect=i)}async _performAuth(n=null){let i,l=!1;if(n)i=n,l=!0;else if(this.accessToken)try{i=await this.accessToken()}catch(c){this.log("error","Error fetching access token from callback",c),i=this.accessTokenValue}else i=this.accessTokenValue;l?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=i&&(this.accessTokenValue=i,this.channels.forEach(c=>{const d={access_token:i,version:lb};i&&c.updateJoinPayload(d),c.joinedOnce&&c._isJoined()&&c._push(_a.access_token,{access_token:i})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(n="general"){this._isManualToken()||this.setAuth().catch(i=>{this.log("error",`Error setting auth in ${n}`,i)})}_triggerStateCallbacks(n,i){try{this.stateChangeCallbacks[n].forEac
59h(l=>{try{l(i)}catch(c){this.log("error",`error in ${n} callback`,c)}})}catch(l){this.log("error",`error triggering ${n} callbacks`,l)}}_setupReconnectionTimer(){this.reconnectTimer=new Lg(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Ol.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(n){var i,l,c,d,f,m,g,p,S,y,T,R;switch(this.transport=(i=n==null?void 0:n.transport)!==null&&i!==void 0?i:null,this.timeout=(l=n==null?void 0:n.timeout)!==null&&l!==void 0?l:xc,this.heartbeatIntervalMs=(c=n==null?void 0:n.heartbeatIntervalMs)!==null&&c!==void 0?c:Ol.HEARTBEAT_INTERVAL,this.worker=(d=n==null?void 0:n.worker)!==null&&d!==void 0?d:!1,this.accessToken=(f=n==null?void 0:n.accessToken)!==null&&f!==void 0?f:null,this.heartbeatCallback=(m=n==null?void 0:n.heartbeatCallback)!==null&&m!==void 0?m:oc,this.vsn=(g=n==null?void 0:n.vsn)!==null&&g!==void 0?g:Fm,n!=null&&n.params&&(this.params=n.params),n!=null&&n.logger&&(this.logger=n.logger),(n!=null&&n.logLevel||n!=null&&n.log_level)&&(this.logLevel=n.logLevel||n.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(p=n==null?void 0:n.reconnectAfterMs)!==null&&p!==void 0?p:(N=>yb[N-1]||bb),this.vsn){case qg:this.encode=(S=n==null?void 0:n.encode)!==null&&S!==void 0?S:((N,H)=>H(JSON.stringify(N))),this.decode=(y=n==null?void 0:n.decode)!==null&&y!==void 0?y:((N,H)=>H(JSON.parse(N)));break;case ob:this.encode=(T=n==null?void 0:n.encode)!==null&&T!==void 0?T:this.serializer.encode.bind(this.serializer),this.decode=(R=n==null?void 0:n.decode)!==null&&R!==void 0?R: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=n==null?void 0:n.workerUrl}}}var ir=class extends Error{constructor(r,n){var i;super(r),this.name="IcebergError",this.status=n.status,this.icebergType=n.icebergType,this.icebergCode=n.icebergCode,this.details=n.details,this.isCommitStateUnknown=n.icebergType==="CommitStateUnknownException"||[500,502,504].includes(n.status)&&((i=n.icebergType)==null?void 0:i.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Sb(r,n,i){const l=new URL(n,r);if(i)for(const[c,d]of Object.entries(i))d!==void 0&&l.searchParams.set(c,d);return l.toString()}async function Eb(r){return!r||r.type==="none"?{}:r.type==="bearer"?{Authorization:`Bearer ${r.token}`}:r.type==="header"?{[r.name]:r.value}:r.type==="custom"?await r.getHeaders():{}}function Tb(r){const n=r.fetchImpl??globalThis.fetch;return{async request({method:i,path:l,query:c,body:d,headers:f}){const m=Sb(r.baseUrl,l,c),g=await Eb(r.auth),p=await n(m,{method:i,headers:{...d?{"Content-Type":"application/json"}:{},...g,...f},body:d?JSON.stringify(d):void 0}),S=await p.text(),y=(p.headers.get("content-type")||"").includes("application/json"),T=y&&S?JSON.parse(S):S;if(!p.ok){const R=y?T:void 0,N=R==null?void 0:R.error;throw new ir((N==null?void 0:N.message)??`Request failed with status ${p.status}`,{status:p.status,icebergType:N==null?void 0:N.type,icebergCode:N==null?void 0:N.code,details:R})}return{status:p.status,headers:p.headers,data:T}}}}function jl(r){return r.join("�")}var xb=class{constructor(r,n=""){this.client=r,this.prefix=n}async listNamespaces(r){const n=r?{parent:jl(r.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:n})).data.namespaces.map(l=>({namespace:l}))}async createNamespace(r,n){const i={namespace:r.namespace,properties:n==null?void 0:n.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:i})).data}async dropNamespace(r){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${jl(r.namespace)}`})}async loadNamespaceMetadata(r){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${jl(r.namespace)}`})).data.properties}}async namespaceExists(r){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${jl(r.namespace)}`}),!0}catch(n){if(n instanceof ir&&n.status===404)return!1;throw n}}async createNamespaceIfNotExists(r,n){try{return await this.createNamespace(r,n)}catch(i){if(i instanceof ir&&i.status===409)return;throw i}}};function Js(r){return r.join("�")}var Ab=class{constructor(r,n="",i){this.client=r,this.prefix=n,this.accessDelegation=i}async listTables(r){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Js(r.namespace)}/tables`})).data.identifiers}async createTable(r,n){const i={};return this.accessDelegation&&(i["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Js(r.namespace)}/tables`,body:n,headers:i})).data.metadata}async updateTable(r,n){const i=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Js(r.namespace)}/tables/${r.name}`,body:n});return{"metadata-location":i.data["metadata-location"],metadata:i.data.metadata}}async dropTable(r,n){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Js(r.namespace)}/tables/${r.name}`,query:{purgeRequested:String((n==null?void 0:n.purge)??!1)}})}async loadTable(r){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Js(r.namespace)}/tables/${r.name}`,headers:n})).data.metadata}async tableExists(r){const n={};this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Js(r.namespace)}/tables/${r.name}`,headers:n}),!0}catch(i){if(i instanceof ir&&i.status===404)return!1;throw i}}async createTableIfNotExists(r,n){try{return await this.createTable(r,n)}catch(i){if(i instanceof ir&&i.status===409)return await this.loadTable({namespace:r.namespace,name:n.name});throw i}}},Ob=class{constructor(r){var l;let n="v1";r.catalogName&&(n+=`/${r.catalogName}`);const i=r.baseUrl.endsWith("/")?r.baseUrl:`${r.baseUrl}/`;this.client=Tb({baseUrl:i,auth:r.auth,fetchImpl:r.fetch}),this.accessDelegation=(l=r.accessDelegation)==null?void 0:l.join(","),this.namespaceOps=new xb(this.client,n),this.tableOps=new Ab(this.client,n,this.accessDelegation)}async listNamespaces(r){return this.namespaceOps.listNamespaces(r)}async createNamespace(r,n){return this.namespaceOps.createNamespace(r,n)}async dropNamespace(r){await this.namespaceOps.dropNamespace(r)}async loadNamespaceMetadata(r){return this.namespaceOps.loadNamespaceMetadata(r)}
59async listTables(r){return this.tableOps.listTables(r)}async createTable(r,n){return this.tableOps.createTable(r,n)}async updateTable(r,n){return this.tableOps.updateTable(r,n)}async dropTable(r,n){await this.tableOps.dropTable(r,n)}async loadTable(r){return this.tableOps.loadTable(r)}async namespaceExists(r){return this.namespaceOps.namespaceExists(r)}async tableExists(r){return this.tableOps.tableExists(r)}async createNamespaceIfNotExists(r,n){return this.namespaceOps.createNamespaceIfNotExists(r,n)}async createTableIfNotExists(r,n){return this.tableOps.createTableIfNotExists(r,n)}},ql=class extends Error{constructor(r){super(r),this.__isStorageError=!0,this.name="StorageError"}};function Ke(r){return typeof r=="object"&&r!==null&&"__isStorageError"in r}var jb=class extends ql{constructor(r,n,i){super(r),this.name="StorageApiError",this.status=n,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},jc=class extends ql{constructor(r,n){super(r),this.name="StorageUnknownError",this.originalError=n}};const Bc=r=>r?(...n)=>r(...n):(...n)=>fetch(...n),Rb=()=>Response,Rc=r=>{if(Array.isArray(r))return r.map(i=>Rc(i));if(typeof r=="function"||r!==Object(r))return r;const n={};return Object.entries(r).forEach(([i,l])=>{const c=i.replace(/([-_][a-z])/gi,d=>d.toUpperCase().replace(/[-_]/g,""));n[c]=Rc(l)}),n},Cb=r=>{if(typeof r!="object"||r===null)return!1;const n=Object.getPrototypeOf(r);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Nb=r=>!r||typeof r!="string"||r.length===0||r.length>100||r.trim()!==r||r.includes("/")||r.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(r);function rr(r){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rr(r)}function Db(r,n){if(rr(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var l=i.call(r,n);if(rr(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function zb(r){var n=Db(r,"string");return rr(n)=="symbol"?n:n+""}function Ub(r,n,i){return(n=zb(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function ng(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);n&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),i.push.apply(i,l)}return i}function oe(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?ng(Object(i),!0).forEach(function(l){Ub(r,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ng(Object(i)).forEach(function(l){Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(i,l))})}return r}const uc=r=>{var n;return r.msg||r.message||r.error_description||(typeof r.error=="string"?r.error:(n=r.error)===null||n===void 0?void 0:n.message)||JSON.stringify(r)},kb=async(r,n,i)=>{r instanceof await Rb()&&!(i!=null&&i.noResolveJson)?r.json().then(l=>{const c=r.status||500,d=(l==null?void 0:l.statusCode)||c+"";n(new jb(uc(l),c,d))}).catch(l=>{n(new jc(uc(l),l))}):n(new jc(uc(r),r))},Mb=(r,n,i,l)=>{const c={method:r,headers:(n==null?void 0:n.headers)||{}};return r==="GET"||!l?c:(Cb(l)?(c.headers=oe({"Content-Type":"application/json"},n==null?void 0:n.headers),c.body=JSON.stringify(l)):c.body=l,n!=null&&n.duplex&&(c.duplex=n.duplex),oe(oe({},c),i))};async function dr(r,n,i,l,c,d){return new Promise((f,m)=>{r(i,Mb(n,l,c,d)).then(g=>{if(!g.ok)throw g;return l!=null&&l.noResolveJson?g:g.json()}).then(g=>f(g)).catch(g=>kb(g,m,l))})}async function lr(r,n,i,l){return dr(r,"GET",n,i,l)}async function ba(r,n,i,l,c){return dr(r,"POST",n,l,c,i)}async function Cc(r,n,i,l,c){return dr(r,"PUT",n,l,c,i)}async function Bb(r,n,i,l){return dr(r,"HEAD",n,oe(oe({},i),{},{noResolveJson:!0}),l)}async function qc(r,n,i,l,c){return dr(r,"DELETE",n,l,c,i)}var qb=class{constructor(r,n){this.downloadFn=r,this.shouldThrowOnError=n}then(r,n){return this.execute().then(r,n)}async execute(){var r=this;try{return{data:(await r.downloadFn()).body,error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Ke(n))return{data:null,error:n};throw n}}};let Vg;Vg=Symbol.toStringTag;var Lb=class{constructor(r,n){this.downloadFn=r,this.shouldThrowOnError=n,this[Vg]="BlobDownloadBuilder",this.promise=null}asStream(){return new qb(this.downloadFn,this.shouldThrowOnError)}then(r,n){return this.getPromise().then(r,n)}catch(r){return this.getPromise().catch(r)}finally(r){return this.getPromise().finally(r)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var r=this;try{return{data:await(await r.downloadFn()).blob(),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(Ke(n))return{data:null,error:n};throw n}}};const Hb={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},sg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var $b=class{constructor(r,n={},i,l){this.shouldThrowOnError=!1,this.url=r,this.headers=n,this.bucketId=i,this.fetch=Bc(l)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(r,n,i,l){var c=this;try{let d;const f=oe(oe({},sg),l);let m=oe(oe({},c.headers),r==="POST"&&{"x-upsert":String(f.upsert)});const g=f.metadata;typeof Blob<"u"&&i instanceof Blob?(d=new FormData,d.append("cacheControl",f.cacheControl),g&&d.append("metadata",c.encodeMetadata(g)),d.append("",i)):typeof FormData<"u"&&i instanceof FormData?(d=i,d.has("cacheControl")||d.append("cacheControl",f.cacheControl),g&&!d.has("metadata")&&d.append("metadata",c.encodeMetadata(g))):(d=i,m["cache-control"]=`max-age=${f.cac
59heControl}`,m["content-type"]=f.contentType,g&&(m["x-metadata"]=c.toBase64(c.encodeMetadata(g))),(typeof ReadableStream<"u"&&d instanceof ReadableStream||d&&typeof d=="object"&&"pipe"in d&&typeof d.pipe=="function")&&!f.duplex&&(f.duplex="half")),l!=null&&l.headers&&(m=oe(oe({},m),l.headers));const p=c._removeEmptyFolders(n),S=c._getFinalPath(p),y=await(r=="PUT"?Cc:ba)(c.fetch,`${c.url}/object/${S}`,d,oe({headers:m},f!=null&&f.duplex?{duplex:f.duplex}:{}));return{data:{path:p,id:y.Id,fullPath:y.Key},error:null}}catch(d){if(c.shouldThrowOnError)throw d;if(Ke(d))return{data:null,error:d};throw d}}async upload(r,n,i){return this.uploadOrUpdate("POST",r,n,i)}async uploadToSignedUrl(r,n,i,l){var c=this;const d=c._removeEmptyFolders(r),f=c._getFinalPath(d),m=new URL(c.url+`/object/upload/sign/${f}`);m.searchParams.set("token",n);try{let g;const p=oe({upsert:sg.upsert},l),S=oe(oe({},c.headers),{"x-upsert":String(p.upsert)});return typeof Blob<"u"&&i instanceof Blob?(g=new FormData,g.append("cacheControl",p.cacheControl),g.append("",i)):typeof FormData<"u"&&i instanceof FormData?(g=i,g.append("cacheControl",p.cacheControl)):(g=i,S["cache-control"]=`max-age=${p.cacheControl}`,S["content-type"]=p.contentType),{data:{path:d,fullPath:(await Cc(c.fetch,m.toString(),g,{headers:S})).Key},error:null}}catch(g){if(c.shouldThrowOnError)throw g;if(Ke(g))return{data:null,error:g};throw g}}async createSignedUploadUrl(r,n){var i=this;try{let l=i._getFinalPath(r);const c=oe({},i.headers);n!=null&&n.upsert&&(c["x-upsert"]="true");const d=await ba(i.fetch,`${i.url}/object/upload/sign/${l}`,{},{headers:c}),f=new URL(i.url+d.url),m=f.searchParams.get("token");if(!m)throw new ql("No token returned by API");return{data:{signedUrl:f.toString(),path:r,token:m},error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Ke(l))return{data:null,error:l};throw l}}async update(r,n,i){return this.uploadOrUpdate("PUT",r,n,i)}async move(r,n,i){var l=this;try{return{data:await ba(l.fetch,`${l.url}/object/move`,{bucketId:l.bucketId,sourceKey:r,destinationKey:n,destinationBucket:i==null?void 0:i.destinationBucket},{headers:l.headers}),error:null}}catch(c){if(l.shouldThrowOnError)throw c;if(Ke(c))return{data:null,error:c};throw c}}async copy(r,n,i){var l=this;try{return{data:{path:(await ba(l.fetch,`${l.url}/object/copy`,{bucketId:l.bucketId,sourceKey:r,destinationKey:n,destinationBucket:i==null?void 0:i.destinationBucket},{headers:l.headers})).Key},error:null}}catch(c){if(l.shouldThrowOnError)throw c;if(Ke(c))return{data:null,error:c};throw c}}async createSignedUrl(r,n,i){var l=this;try{let c=l._getFinalPath(r),d=await ba(l.fetch,`${l.url}/object/sign/${c}`,oe({expiresIn:n},i!=null&&i.transform?{transform:i.transform}:{}),{headers:l.headers});const f=i!=null&&i.download?`&download=${i.download===!0?"":i.download}`:"";return d={signedUrl:encodeURI(`${l.url}${d.signedURL}${f}`)},{data:d,error:null}}catch(c){if(l.shouldThrowOnError)throw c;if(Ke(c))return{data:null,error:c};throw c}}async createSignedUrls(r,n,i){var l=this;try{const c=await ba(l.fetch,`${l.url}/object/sign/${l.bucketId}`,{expiresIn:n,paths:r},{headers:l.headers}),d=i!=null&&i.download?`&download=${i.download===!0?"":i.download}`:"";return{data:c.map(f=>oe(oe({},f),{},{signedUrl:f.signedURL?encodeURI(`${l.url}${f.signedURL}${d}`):null})),error:null}}catch(c){if(l.shouldThrowOnError)throw c;if(Ke(c))return{data:null,error:c};throw c}}download(r,n){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),c=l?`?${l}`:"",d=this._getFinalPath(r),f=()=>lr(this.fetch,`${this.url}/${i}/${d}${c}`,{headers:this.headers,noResolveJson:!0});return new Lb(f,this.shouldThrowOnError)}async info(r){var n=this;const i=n._getFinalPath(r);try{return{data:Rc(await lr(n.fetch,`${n.url}/object/info/${i}`,{headers:n.headers})),error:null}}catch(l){if(n.shouldThrowOnError)throw l;if(Ke(l))return{data:null,error:l};throw l}}async exists(r){var n=this;const i=n._getFinalPath(r);try{return await Bb(n.fetch,`${n.url}/object/${i}`,{headers:n.headers}),{data:!0,error:null}}catch(l){if(n.shouldThrowOnError)throw l;if(Ke(l)&&l instanceof jc){const c=l.originalError;if([400,404].includes(c==null?void 0:c.status))return{data:!1,error:l}}throw l}}getPublicUrl(r,n){const i=this._getFinalPath(r),l=[],c=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";c!==""&&l.push(c);const d=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",f=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});f!==""&&l.push(f);let m=l.join("&");return m!==""&&(m=`?${m}`),{data:{publicUrl:encodeURI(`${this.url}/${d}/public/${i}${m}`)}}}async remove(r){var n=this;try{return{data:await qc(n.fetch,`${n.url}/object/${n.bucketId}`,{prefixes:r},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}async list(r,n,i){var l=this;try{const c=oe(oe(oe({},Hb),n),{},{prefix:r||""});return{data:await ba(l.fetch,`${l.url}/object/list/${l.bucketId}`,c,{headers:l.headers},i),error:null}}catch(c){if(l.shouldThrowOnError)throw c;if(Ke(c))return{data:null,error:c};throw c}}async listV2(r,n){var i=this;try{const l=oe({},r);return{data:await ba(i.fetch,`${i.url}/object/list-v2/${i.bucketId}`,l,{headers:i.headers},n),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Ke(l))return{data:null,error:l};throw l}}encodeMetadata(r){return JSON.stringify(r)}toBase64(r){return typeof Buffer<"u"?Buffer.from(r).toString("base64"):btoa(r)}_getFinalPath(r){return`${this.bucketId}/${r.replace(/^\/+/,"")}`}_removeEmptyFolders(r){return r.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(r){const n=[];return r.width&&n.push(`width=${r.width}`),r.height&&n.push(`height=${r.height}`),r.resize&&n.push(`resize=${r.resize}`),r.format&&n.push(`format=${r.format}`),r.quality&&n.push(`quality=${r.quality}`),n.join("&")}};const Gg="2.88.0",Ig={"X-Client-Info":`storage-js/${Gg}`};var Vb=class{constructor(r,n={},i,l){this.shouldThrowOnError=!1;const c=new URL(r);l!=null&&l.useNewHostname&&/supabase\.(co|in|red)$/.test(c.hostname)&&!c.hostname.includes("storage.supabase.")&&(c.hostname=c.hostname.replace("supabase.","storage.supabase.")),this.url=c.href.replace(/\/$/,""),this.headers=oe(oe({},Ig),n),this.fetch=Bc(i)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(r){var n=this;try{const i=n.listBucketOptionsToQueryString(r);return{data:await lr(n.fetch,`${n.url}/bucket${i}`,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}async getBucket(r){var n=this;try{return{data:await lr(n.fetch,`${n.url}/bucket/${r}`,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}async createBucket(r,n={public:!1}){var i=this;try{return{data:await ba(i.fetch,`${i.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:i.headers}),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Ke(l))return{data:null,error:l};throw l}}async updateBucket(r,n){var i=this;try{return{data:await Cc(i.fetch,`${i.url}/bucket/${r}`,{id:r,name:r,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:i.headers}),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Ke(l))return{data:null,error:l};throw l}}async emptyBucket(r){var n=this;try{return{data:await ba(n.fetch,`${n.url}/bucket/${r}/empty`,{},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}async deleteBucket(r){var n=this;try{return{data:await qc(n.fetch,`${n.url}/bucket/${r}`,{},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}listBucketOptionsToQueryString(r){const n={};return r&&("limit"in r&&(n.limit=String(r.limit)),"offset"in r&&(n.offset=String(r.offset)),r.search&&(n.search=r.search),r.s
59ortColumn&&(n.sortColumn=r.sortColumn),r.sortOrder&&(n.sortOrder=r.sortOrder)),Object.keys(n).length>0?"?"+new URLSearchParams(n).toString():""}},Gb=class{constructor(r,n={},i){this.shouldThrowOnError=!1,this.url=r.replace(/\/$/,""),this.headers=oe(oe({},Ig),n),this.fetch=Bc(i)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(r){var n=this;try{return{data:await ba(n.fetch,`${n.url}/bucket`,{name:r},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}async listBuckets(r){var n=this;try{const i=new URLSearchParams;(r==null?void 0:r.limit)!==void 0&&i.set("limit",r.limit.toString()),(r==null?void 0:r.offset)!==void 0&&i.set("offset",r.offset.toString()),r!=null&&r.sortColumn&&i.set("sortColumn",r.sortColumn),r!=null&&r.sortOrder&&i.set("sortOrder",r.sortOrder),r!=null&&r.search&&i.set("search",r.search);const l=i.toString(),c=l?`${n.url}/bucket?${l}`:`${n.url}/bucket`;return{data:await lr(n.fetch,c,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}async deleteBucket(r){var n=this;try{return{data:await qc(n.fetch,`${n.url}/bucket/${r}`,{},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Ke(i))return{data:null,error:i};throw i}}from(r){var n=this;if(!Nb(r))throw new ql("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 i=new Ob({baseUrl:this.url,catalogName:r,auth:{type:"custom",getHeaders:async()=>n.headers},fetch:this.fetch}),l=this.shouldThrowOnError;return new Proxy(i,{get(c,d){const f=c[d];return typeof f!="function"?f:async(...m)=>{try{return{data:await f.apply(c,m),error:null}}catch(g){if(l)throw g;return{data:null,error:g}}}}})}};const Lc={"X-Client-Info":`storage-js/${Gg}`,"Content-Type":"application/json"};var Yg=class extends Error{constructor(r){super(r),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Pt(r){return typeof r=="object"&&r!==null&&"__isStorageVectorsError"in r}var cc=class extends Yg{constructor(r,n,i){super(r),this.name="StorageVectorsApiError",this.status=n,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Ib=class extends Yg{constructor(r,n){super(r),this.name="StorageVectorsUnknownError",this.originalError=n}};const Hc=r=>r?(...n)=>r(...n):(...n)=>fetch(...n),Yb=r=>{if(typeof r!="object"||r===null)return!1;const n=Object.getPrototypeOf(r);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},ig=r=>r.msg||r.message||r.error_description||r.error||JSON.stringify(r),Kb=async(r,n,i)=>{if(r&&typeof r=="object"&&"status"in r&&"ok"in r&&typeof r.status=="number"&&!(i!=null&&i.noResolveJson)){const l=r.status||500,c=r;if(typeof c.json=="function")c.json().then(d=>{const f=(d==null?void 0:d.statusCode)||(d==null?void 0:d.code)||l+"";n(new cc(ig(d),l,f))}).catch(()=>{const d=l+"";n(new cc(c.statusText||`HTTP ${l} error`,l,d))});else{const d=l+"";n(new cc(c.statusText||`HTTP ${l} error`,l,d))}}else n(new Ib(ig(r),r))},Xb=(r,n,i,l)=>{const c={method:r,headers:(n==null?void 0:n.headers)||{}};return l?(Yb(l)?(c.headers=oe({"Content-Type":"application/json"},n==null?void 0:n.headers),c.body=JSON.stringify(l)):c.body=l,oe(oe({},c),i)):c};async function Qb(r,n,i,l,c,d){return new Promise((f,m)=>{r(i,Xb(n,l,c,d)).then(g=>{if(!g.ok)throw g;if(l!=null&&l.noResolveJson)return g;const p=g.headers.get("content-type");return!p||!p.includes("application/json")?{}:g.json()}).then(g=>f(g)).catch(g=>Kb(g,m,l))})}async function Wt(r,n,i,l,c){return Qb(r,"POST",n,l,c,i)}var Jb=class{constructor(r,n={},i){this.shouldThrowOnError=!1,this.url=r.replace(/\/$/,""),this.headers=oe(oe({},Lc),n),this.fetch=Hc(i)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/CreateIndex`,r,{headers:n.headers})||{},error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async getIndex(r,n){var i=this;try{return{data:await Wt(i.fetch,`${i.url}/GetIndex`,{vectorBucketName:r,indexName:n},{headers:i.headers}),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Pt(l))return{data:null,error:l};throw l}}async listIndexes(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/ListIndexes`,r,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async deleteIndex(r,n){var i=this;try{return{data:await Wt(i.fetch,`${i.url}/DeleteIndex`,{vectorBucketName:r,indexName:n},{headers:i.headers})||{},error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Pt(l))return{data:null,error:l};throw l}}},Zb=class{constructor(r,n={},i){this.shouldThrowOnError=!1,this.url=r.replace(/\/$/,""),this.headers=oe(oe({},Lc),n),this.fetch=Hc(i)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(r){var n=this;try{if(r.vectors.length<1||r.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await Wt(n.fetch,`${n.url}/PutVectors`,r,{headers:n.headers})||{},error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async getVectors(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/GetVectors`,r,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async listVectors(r){var n=this;try{if(r.segmentCount!==void 0){if(r.segmentCount<1||r.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
59if(r.segmentIndex!==void 0&&(r.segmentIndex<0||r.segmentIndex>=r.segmentCount))throw new Error(`segmentIndex must be between 0 and ${r.segmentCount-1}`)}return{data:await Wt(n.fetch,`${n.url}/ListVectors`,r,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async queryVectors(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/QueryVectors`,r,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async deleteVectors(r){var n=this;try{if(r.keys.length<1||r.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await Wt(n.fetch,`${n.url}/DeleteVectors`,r,{headers:n.headers})||{},error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}},Pb=class{constructor(r,n={},i){this.shouldThrowOnError=!1,this.url=r.replace(/\/$/,""),this.headers=oe(oe({},Lc),n),this.fetch=Hc(i)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/CreateVectorBucket`,{vectorBucketName:r},{headers:n.headers})||{},error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async getBucket(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/GetVectorBucket`,{vectorBucketName:r},{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async listBuckets(r={}){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/ListVectorBuckets`,r,{headers:n.headers}),error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}async deleteBucket(r){var n=this;try{return{data:await Wt(n.fetch,`${n.url}/DeleteVectorBucket`,{vectorBucketName:r},{headers:n.headers})||{},error:null}}catch(i){if(n.shouldThrowOnError)throw i;if(Pt(i))return{data:null,error:i};throw i}}},Wb=class extends Pb{constructor(r,n={}){super(r,n.headers||{},n.fetch)}from(r){return new Fb(this.url,this.headers,r,this.fetch)}async createBucket(r){var n=()=>super.createBucket,i=this;return n().call(i,r)}async getBucket(r){var n=()=>super.getBucket,i=this;return n().call(i,r)}async listBuckets(r={}){var n=()=>super.listBuckets,i=this;return n().call(i,r)}async deleteBucket(r){var n=()=>super.deleteBucket,i=this;return n().call(i,r)}},Fb=class extends Jb{constructor(r,n,i,l){super(r,n,l),this.vectorBucketName=i}async createIndex(r){var n=()=>super.createIndex,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName}))}async listIndexes(r={}){var n=()=>super.listIndexes,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName}))}async getIndex(r){var n=()=>super.getIndex,i=this;return n().call(i,i.vectorBucketName,r)}async deleteIndex(r){var n=()=>super.deleteIndex,i=this;return n().call(i,i.vectorBucketName,r)}index(r){return new e_(this.url,this.headers,this.vectorBucketName,r,this.fetch)}},e_=class extends Zb{constructor(r,n,i,l,c){super(r,n,c),this.vectorBucketName=i,this.indexName=l}async putVectors(r){var n=()=>super.putVectors,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async getVectors(r){var n=()=>super.getVectors,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async listVectors(r={}){var n=()=>super.listVectors,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async queryVectors(r){var n=()=>super.queryVectors,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async deleteVectors(r){var n=()=>super.deleteVectors,i=this;return n().call(i,oe(oe({},r),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}},t_=class extends Vb{constructor(r,n={},i,l){super(r,n,i,l)}from(r){return new $b(this.url,this.headers,r,this.fetch)}get vectors(){return new Wb(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Gb(this.url+"/iceberg",this.headers,this.fetch)}};const Kg="2.88.0",ai=30*1e3,Nc=3,dc=Nc*ai,a_="http://localhost:9999",n_="supabase.auth.token",s_={"X-Client-Info":`gotrue-js/${Kg}`},Dc="X-Supabase-Api-Version",Xg={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},i_=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,r_=600*1e3;
59class or extends Error{constructor(n,i,l){super(n),this.__isAuthError=!0,this.name="AuthError",this.status=i,this.code=l}}function F(r){return typeof r=="object"&&r!==null&&"__isAuthError"in r}class l_ extends or{constructor(n,i,l){super(n,i,l),this.name="AuthApiError",this.status=i,this.code=l}}function o_(r){return F(r)&&r.name==="AuthApiError"}class ns extends or{constructor(n,i){super(n),this.name="AuthUnknownError",this.originalError=i}}class en extends or{constructor(n,i,l,c){super(n,l,c),this.name=i,this.status=l}}class Zt extends en{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function u_(r){return F(r)&&r.name==="AuthSessionMissingError"}class Zs extends en{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Rl extends en{constructor(n){super(n,"AuthInvalidCredentialsError",400,void 0)}}class Cl extends en{constructor(n,i=null){super(n,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=i}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function c_(r){return F(r)&&r.name==="AuthImplicitGrantRedirectError"}class rg extends en{constructor(n,i=null){super(n,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=i}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class d_ extends en{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 zc extends en{constructor(n,i){super(n,"AuthRetryableFetchError",i,void 0)}}function fc(r){return F(r)&&r.name==="AuthRetryableFetchError"}class lg extends en{constructor(n,i,l){super(n,"AuthWeakPasswordError",i,"weak_password"),this.reasons=l}}class Uc extends en{constructor(n){super(n,"AuthInvalidJwtError",400,"invalid_jwt")}}const Dl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),og=` 60\r=`.split(""),f_=(()=>{const r=new Array(128);for(let n=0;n<r.length;n+=1)r[n]=-1;for(let n=0;n<og.length;n+=1)r[og[n].charCodeAt(0)]=-2;for(let n=0;n<Dl.length;n+=1)r[Dl[n].charCodeAt(0)]=n;return r})();function ug(r,n,i){if(r!==null)for(n.queue=n.queue<<8|r,n.queuedBits+=8;n.queuedBits>=6;){const l=n.queue>>n.queuedBits-6&63;i(Dl[l]),n.queuedBits-=6}else if(n.queuedBits>0)for(n.queue=n.queue<<6-n.queuedBits,n.queuedBits=6;n.queuedBits>=6;){const l=n.queue>>n.queuedBits-6&63;i(Dl[l]),n.queuedBits-=6}}function Qg(r,n,i){const l=f_[r];if(l>-1)for(n.queue=n.queue<<6|l,n.queuedBits+=6;n.queuedBits>=8;)i(n.queue>>n.queuedBits-8&255),n.queuedBits-=8;else{if(l===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(r)}"`)}}function cg(r){const n=[],i=f=>{n.push(String.fromCodePoint(f))},l={utf8seq:0,codepoint:0},c={queue:0,queuedBits:0},d=f=>{g_(f,l,i)};for(let f=0;f<r.length;f+=1)Qg(r.charCodeAt(f),c,d);return n.join("")}function h_(r,n){if(r<=127){n(r);return}else if(r<=2047){n(192|r>>6),n(128|r&63);return}else if(r<=65535){n(224|r>>12),n(128|r>>6&63),n(128|r&63);return}else if(r<=1114111){n(240|r>>18),n(128|r>>12&63),n(128|r>>6&63),n(128|r&63);return}throw new Error(`Unrecognized Unicode codepoint: ${r.toString(16)}`)}function m_(r,n){for(let i=0;i<r.length;i+=1){let l=r.charCodeAt(i);if(l>55295&&l<=56319){const c=(l-55296)*1024&65535;l=(r.charCodeAt(i+1)-56320&65535|c)+65536,i+=1}h_(l,n)}}function g_(r,n,i){if(n.utf8seq===0){if(r<=127){i(r);return}for(let l=1;l<6;l+=1)if((r>>7-l&1)===0){n.utf8seq=l;break}if(n.utf8seq===2)n.codepoint=r&31;else if(n.utf8seq===3)n.codepoint=r&15;else if(n.utf8seq===4)n.codepoint=r&7;else throw new Error("Invalid UTF-8 sequence");n.utf8seq-=1}else if(n.utf8seq>0){if(r<=127)throw new Error("Invalid UTF-8 sequence");n.codepoint=n.codepoint<<6|r&63,n.utf8seq-=1,n.utf8seq===0&&i(n.codepoint)}}function li(r){const n=[],i={queue:0,queuedBits:0},l=c=>{n.push(c)};for(let c=0;c<r.length;c+=1)Qg(r.charCodeAt(c),i,l);return new Uint8Array(n)}function p_(r){const n=[];return m_(r,i=>n.push(i)),new Uint8Array(n)}function ss(r){const n=[],i={queue:0,queuedBits:0},l=c=>{n.push(c)};return r.forEach(c=>ug(c,i,l)),ug(null,i,l),n.join("")}function v_(r){return Math.round(Date.now()/1e3)+r}function y_(){return Symbol("auth-callback")}const wt=()=>typeof window<"u"&&typeof document<"u",Fn={tested:!1,writable:!1},Jg=()=>{if(!wt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Fn.tested)return Fn.writable;const r=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(r,r),globalThis.localStorage.removeItem(r),Fn.tested=!0,Fn.writable=!0}catch{Fn.tested=!0,Fn.writable=!1}return Fn.writable};function b_(r){const n={},i=new URL(r);if(i.hash&&i.hash[0]==="#")try{new URLSearchParams(i.hash.substring(1)).forEac
60h((c,d)=>{n[d]=c})}catch{}return i.searchParams.forEach((l,c)=>{n[c]=l}),n}const Zg=r=>r?(...n)=>r(...n):(...n)=>fetch(...n),__=r=>typeof r=="object"&&r!==null&&"status"in r&&"ok"in r&&"json"in r&&typeof r.json=="function",ni=async(r,n,i)=>{await r.setItem(n,JSON.stringify(i))},es=async(r,n)=>{const i=await r.getItem(n);if(!i)return null;try{return JSON.parse(i)}catch{return i}},_t=async(r,n)=>{await r.removeItem(n)};class Ll{constructor(){this.promise=new Ll.promiseConstructor((n,i)=>{this.resolve=n,this.reject=i})}}Ll.promiseConstructor=Promise;function hc(r){const n=r.split(".");if(n.length!==3)throw new Uc("Invalid JWT structure");for(let l=0;l<n.length;l++)if(!i_.test(n[l]))throw new Uc("JWT not in base64url format");return{header:JSON.parse(cg(n[0])),payload:JSON.parse(cg(n[1])),signature:li(n[2]),raw:{header:n[0],payload:n[1]}}}async function w_(r){return await new Promise(n=>{setTimeout(()=>n(null),r)})}function S_(r,n){return new Promise((l,c)=>{(async()=>{for(let d=0;d<1/0;d++)try{const f=await r(d);if(!n(d,null,f)){l(f);return}}catch(f){if(!n(d,f)){c(f);return}}})()})}function E_(r){return("0"+r.toString(16)).substr(-2)}function T_(){const n=new Uint32Array(56);if(typeof crypto>"u"){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",l=i.length;let c="";for(let d=0;d<56;d++)c+=i.charAt(Math.floor(Math.random()*l));return c}return crypto.getRandomValues(n),Array.from(n,E_).join("")}async function x_(r){const i=new TextEncoder().encode(r),l=await crypto.subtle.digest("SHA-256",i),c=new Uint8Array(l);return Array.from(c).map(d=>String.fromCharCode(d)).join("")}async function A_(r){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."),r;const i=await x_(r);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ps(r,n,i=!1){const l=T_();let c=l;i&&(c+="/PASSWORD_RECOVERY"),await ni(r,`${n}-code-verifier`,c);const d=await A_(l);return[d,l===d?"plain":"s256"]}const O_=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function j_(r){const n=r.headers.get(Dc);if(!n||!n.match(O_))return null;try{return new Date(`${n}T00:00:00.0Z`)}catch{return null}}function R_(r){if(!r)throw new Error("Missing exp claim");const n=Math.floor(Date.now()/1e3);if(r<=n)throw new Error("JWT has expired")}function C_(r){switch(r){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 N_=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ws(r){if(!N_.test(r))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function mc(){const r={};return new Proxy(r,{get:(n,i)=>{if(i==="__isUserNotAvailableProxy")return!0;if(typeof i=="symbol"){const l=i.toString();if(l==="Symbol(Symbol.toPrimitive)"||l==="Symbol(Symbol.toStringTag)"||l==="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 "${i}" property of the session object is not supported. Please use getUser() instead.`)},set:(n,i)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${i}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(n,i)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${i}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function D_(r,n){return new Proxy(r,{get:(i,l,c)=>{if(l==="__isInsecureUserWarningProxy")return!0;if(typeof l=="symbol"){const d=l.toString();if(d==="Symbol(Symbol.toPrimitive)"||d==="Symbol(Symbol.toStringTag)"||d==="Symbol(util.inspect.custom)"||d==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(i,l,c)}return!n.value&&typeof l=="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."),n.value=!0),Reflect.get(i,l,c)}})}function dg(r){return JSON.parse(JSON.stringify(r))}const ts=r=>r.msg||r.message||r.error_description||r.error||JSON.stringify(r),z_=[502,503,504];async function fg(r){var n;if(!__(r))throw new zc(ts(r),0);if(z_.includes(r.status))throw new zc(ts(r),r.status);let i;try{i=await r.json()}catch(d){throw new ns(ts(d),d)}let l;const c=j_(r);if(c&&c.getTime()>=Xg["2024-01-01"].timestamp&&typeof i=="object"&&i&&typeof i.code=="string"?l=i.code:typeof i=="object"&&i&&typeof i.error_code=="string"&&(l=i.error_code),l){if(l==="weak_password")throw new lg(ts(i),r.status,((n=i.weak_password)===null||n===void 0?void 0:n.reasons)||[]);if(l==="session_not_found")throw new Zt}else if(typeof i=="object"&&i&&typeof i.weak_password=="object"&&i.weak_password&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.reasons.reduce((d,f)=>d&&typeof f=="string",!0))throw new lg(ts(i),r.status,i.weak_password.reasons);throw new l_(ts(i),r.status||500,l)}const U_=(r,n,i,l)=>{const c={method:r,headers:(n==null?void 0:n.headers)||{}};return r==="GET"?c:(c.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},n==null?void 0:n.headers),c.body=JSON.stringify(l),Object.assign(Object.assign({},c),i))};async function le(r,n,i,l){var c;const d=Object.assign({},l==null?void 0:l.headers);d[Dc]||(d[Dc]=Xg["2024-01-01"].name),l!=null&&l.jwt&&(d.Authorization=`Bearer ${l.jwt}`);const f=(c=l==null?void 0:l.query)!==null&&c!==void 0?c:{};l!=null&&l.redirectTo&&(f.redirect_to=l.redirectTo);const m=Object.keys(f).length?"?"+new URLSearchParams(f).toString():"",g=await k_(r,n,i+m,{headers:d,noResolveJson:l==null?void 0:l.noResolveJson},{},l==null?void 0:l.body);return l!=null&&l.xform?l==null?void 0:l.xform(g):{data:Object.assign({},g),error:null}}async function k_(r,n,i,l,c,d){const f=U_(n,l,c,d);let m;try{m=await r(i,Object.assign({},f))}catch(g){throw console.error(g),new zc(ts(g),0)}if(m.ok||await fg(m),l!=null&&l.noResolveJson)return m;try{return await m.json()}catch(g){await fg(g)}}function ya(r){var n;let i=null;q_(r)&&(i=Object.assign({},r),r.expires_at||(i.expires_at=v_(r.expires_in)));const l=(n=r.user)!==null&&n!==void 0?n:r;return{data:{session:i,user:l},error:null}}function hg(r){const n=ya(r);return!n.error&&r.weak_password&&typeof r.weak_password=="object"&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.message&&typeof r.weak_password.message=="string"&&r.weak_password.reasons.reduce((i,l)=>i&&typeof l=="string",!0)&&(n.data.weak_password=r.weak_password),n}function Rn(r){var n;return{data:{user:(n=r.user)!==null&&n!==void 0?n:r},error:null}}function M_(r){return{data:r,error:null}}function B_(r){const{action_link:n,email_otp:i,hashed_token:l,redirect_to:c,verification_type:d}=r,f=Bl(r,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),m={action_link:n,email_otp:i,hashed_token:l,redirect_to:c,verification_type:d},g=Object.assign({},f);return{data:{properties:m,user:g},error:null}}function mg(r){return r}function q_(r){return r.access_token&&r.refresh_token&&r.expires_in}const gc=["global","local","others"];class L_{constructor({url:n="",headers:i={},fetch:l}){this.url=n,this.headers=i,this.fetch=Zg(l),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)}}
vendor: 4,766 bytes, line 60
60async signOut(n,i=gc[0]){if(gc.indexOf(i)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${gc.join(", ")}`);try{return await le(this.fetch,"POST",`${this.url}/logout?scope=${i}`,{headers:this.headers,jwt:n,noResolveJson:!0}),{data:null,error:null}}catch(l){if(F(l))return{data:null,error:l};throw l}}async inviteUserByEmail(n,i={}){try{return await le(this.fetch,"POST",`${this.url}/invite`,{body:{email:n,data:i.data},headers:this.headers,redirectTo:i.redirectTo,xform:Rn})}catch(l){if(F(l))return{data:{user:null},error:l};throw l}}async generateLink(n){try{const{options:i}=n,l=Bl(n,["options"]),c=Object.assign(Object.assign({},l),i);return"newEmail"in l&&(c.new_email=l==null?void 0:l.newEmail,delete c.newEmail),await le(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:c,headers:this.headers,xform:B_,redirectTo:i==null?void 0:i.redirectTo})}catch(i){if(F(i))return{data:{properties:null,user:null},error:i};throw i}}async createUser(n){try{return await le(this.fetch,"POST",`${this.url}/admin/users`,{body:n,headers:this.headers,xform:Rn})}catch(i){if(F(i))return{data:{user:null},error:i};throw i}}async listUsers(n){var i,l,c,d,f,m,g;try{const p={nextPage:null,lastPage:0,total:0},S=await le(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(l=(i=n==null?void 0:n.page)===null||i===void 0?void 0:i.toString())!==null&&l!==void 0?l:"",per_page:(d=(c=n==null?void 0:n.perPage)===null||c===void 0?void 0:c.toString())!==null&&d!==void 0?d:""},xform:mg});if(S.error)throw S.error;const y=await S.json(),T=(f=S.headers.get("x-total-count"))!==null&&f!==void 0?f:0,R=(g=(m=S.headers.get("link"))===null||m===void 0?void 0:m.split(","))!==null&&g!==void 0?g:[];return R.length>0&&(R.forEach(N=>{const H=parseInt(N.split(";")[0].split("=")[1].substring(0,1)),Y=JSON.parse(N.split(";")[1].split("=")[1]);p[`${Y}Page`]=H}),p.total=parseInt(T)),{data:Object.assign(Object.assign({},y),p),error:null}}catch(p){if(F(p))return{data:{users:[]},error:p};throw p}}async getUserById(n){Ws(n);try{return await le(this.fetch,"GET",`${this.url}/admin/users/${n}`,{headers:this.headers,xform:Rn})}catch(i){if(F(i))return{data:{user:null},error:i};throw i}}async updateUserById(n,i){Ws(n);try{return await le(this.fetch,"PUT",`${this.url}/admin/users/${n}`,{body:i,headers:this.headers,xform:Rn})}catch(l){if(F(l))return{data:{user:null},error:l};throw l}}async deleteUser(n,i=!1){Ws(n);try{return await le(this.fetch,"DELETE",`${this.url}/admin/users/${n}`,{headers:this.headers,body:{should_soft_delete:i},xform:Rn})}catch(l){if(F(l))return{data:{user:null},error:l};throw l}}async _listFactors(n){Ws(n.userId);try{const{data:i,error:l}=await le(this.fetch,"GET",`${this.url}/admin/users/${n.userId}/factors`,{headers:this.headers,xform:c=>({data:{factors:c},error:null})});return{data:i,error:l}}catch(i){if(F(i))return{data:null,error:i};throw i}}async _deleteFactor(n){Ws(n.userId),Ws(n.id);try{return{data:await le(this.fetch,"DELETE",`${this.url}/admin/users/${n.userId}/factors/${n.id}`,{headers:this.headers}),error:null}}catch(i){if(F(i))return{data:null,error:i};throw i}}async _listOAuthClients(n){var i,l,c,d,f,m,g;try{const p={nextPage:null,lastPage:0,total:0},S=await le(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(l=(i=n==null?void 0:n.page)===null||i===void 0?void 0:i.toString())!==null&&l!==void 0?l:"",per_page:(d=(c=n==null?void 0:n.perPage)===null||c===void 0?void 0:c.toString())!==null&&d!==void 0?d:""},xform:mg});if(S.error)throw S.error;const y=await S.json(),T=(f=S.headers.get("x-total-count"))!==null&&f!==void 0?f:0,R=(g=(m=S.headers.get("link"))===null||m===void 0?void 0:m.split(","))!==null&&g!==void 0?g:[];return R.length>0&&(R.forEach(N=>{const H=parseInt(N.split(";")[0].split("=")[1].substring(0,1)),Y=JSON.parse(N.split(";")[1].split("=")[1]);p[`${Y}Page`]=H}),p.total=parseInt(T)),{data:Object.assign(Object.assign({},y),p),error:null}}catch(p){if(F(p))return{data:{clients:[]},error:p};throw p}}async _createOAuthClient(n){try{return await le(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:n,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(F(i))return{data:null,error:i};throw i}}async _getOAuthClient(n){try{return await le(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(F(i))return{data:null,error:i};throw i}}async _updateOAuthClient(n,i){try{return await le(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:i,headers:this.headers,xform:l=>({data:l,error:null})})}catch(l){if(F(l))return{data:null,error:l};throw l}}async _deleteOAuthClient(n){try{return await le(this.fetch,"DELET
60E",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(F(i))return{data:null,error:i};throw i}}async _regenerateOAuthClientSecret(n){try{return await le(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(F(i))return{data:null,error:i};throw i}}}function gg(r={}){return{getItem:n=>r[n]||null,setItem:(n,i)=>{r[n]=i},removeItem:n=>{delete r[n]}}}const Fs={debug:!!(globalThis&&Jg()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Pg extends Error{constructor(n){super(n),this.isAcquireTimeout=!0}}class H_ extends Pg{}async function $_(r,n,i){Fs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",r,n);const l=new globalThis.AbortController;return n>0&&setTimeout(()=>{l.abort(),Fs.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",r)},n),await Promise.resolve().then(()=>globalThis.navigator.locks.request(r,n===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:l.signal},async c=>{if(c){Fs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",r,c.name);try{return await i()}finally{Fs.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",r,c.name)}}else{if(n===0)throw Fs.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",r),new H_(`Acquiring an exclusive Navigator LockManager lock "${r}" immediately failed`);if(Fs.debug)try{const d=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(d,null," "))}catch(d){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",d)}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 i()}}))}function V_(){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 Wg(r){if(!/^0x[a-fA-F0-9]{40}$/.test(r))throw new Error(`@supabase/auth-js: Address "${r}" is invalid.`);return r.toLowerCase()}function G_(r){return parseInt(r,16)}function I_(r){const n=new TextEncoder().encode(r);return"0x"+Array.from(n,l=>l.toString(16).padStart(2,"0")).join("")}function Y_(r){var n;const{chainId:i,domain:l,expirationTime:c,issuedAt:d=new Date,nonce:f,notBefore:m,requestId:g,resources:p,scheme:S,uri:y,version:T}=r;{if(!Number.isInteger(i))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${i}`);if(!l)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(f&&f.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${f}`);if(!y)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(T!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${T}`);if(!((n=r.statement)===null||n===void 0)&&n.includes(` 61`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${r.statement}`)}const R=Wg(r.address),N=S?`${S}://${l}`:l,H=r.statement?`${r.statement} 62`:"",Y=`${N} wants you to sign in with your Ethereum account: 63${R} 64 65${H}`;let $=`URI: ${y} 66Version: ${T} 67Chain ID: ${i}${f?` 68Nonce: ${f}`:""} 69Issued At: ${d.toISOString()}`;if(c&&($+=` 70Expiration Time: ${c.toISOString()}`),m&&($+=` 71Not Before: ${m.toISOString()}`),g&&($+=` 72Request ID: ${g}`),p){let Q=` 73Resources:`;for(const I of p){if(!I||typeof I!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${I}`);Q+=` 74- ${I}`}$+=Q}return`${Y} 75${$}`}
75class it extends Error{constructor({message:n,code:i,cause:l,name:c}){var d;super(n,{cause:l}),this.__isWebAuthnError=!0,this.name=(d=c??(l instanceof Error?l.name:void 0))!==null&&d!==void 0?d:"Unknown Error",this.code=i}}class zl extends it{constructor(n,i){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i,message:n}),this.name="WebAuthnUnknownError",this.originalError=i}}function K_({error:r,options:n}){var i,l,c;const{publicKey:d}=n;if(!d)throw Error("options was missing required publicKey property");if(r.name==="AbortError"){if(n.signal instanceof AbortSignal)return new it({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:r})}else if(r.name==="ConstraintError"){if(((i=d.authenticatorSelection)===null||i===void 0?void 0:i.requireResidentKey)===!0)return new it({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:r});if(n.mediation==="conditional"&&((l=d.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new it({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:r});if(((c=d.authenticatorSelection)===null||c===void 0?void 0:c.userVerification)==="required")return new it({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:r})}else{if(r.name==="InvalidStateError")return new it({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:r});if(r.name==="NotAllowedError")return new it({message:r.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r});if(r.name==="NotSupportedError")return d.pubKeyCredParams.filter(m=>m.type==="public-key").length===0?new it({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:r}):new it({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:r});if(r.name==="SecurityError"){const f=window.location.hostname;if(Fg(f)){if(d.rp.id!==f)return new it({message:`The RP ID "${d.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:r})}else return new it({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:r})}else if(r.name==="TypeError"){if(d.user.id.byteLength<1||d.user.id.byteLength>64)return new it({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:r})}else if(r.name==="UnknownError")return new it({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:r})}return new it({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r})}function X_({error:r,options:n}){const{publicKey:i}=n;if(!i)throw Error("options was missing required publicKey property");if(r.name==="AbortError"){if(n.signal instanceof AbortSignal)return new it({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:r})}else{if(r.name==="NotAllowedError")return new it({message:r.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r});if(r.name==="SecurityError"){const l=window.location.hostname;if(Fg(l)){if(i.rpId!==l)return new it({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:r})}else return new it({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:r})}else if(r.name==="UnknownError")return new it({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:r})}return new it({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r})}class Q_{createNewAbortSignal(){if(this.controller){const i=new Error("Cancelling existing WebAuthn API call for new one");i.name="AbortError",this.controller.abort(i)}const n=new AbortController;return this.controller=n,n.signal}cancelCeremony(){if(this.controller){const n=new Error("Manually cancelling existing WebAuthn API call");n.name="AbortError",this.controller.abort(n),this.controller=void 0}}}const J_=new Q_;function Z_(r){if(!r)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(r);const{challenge:n,user:i,excludeCredentials:l}=r,c=Bl(r,["challenge","user","excludeCredentials"]),d=li(n).buffer,f=Object.assign(Object.assign({},i),{id:li(i.id).buffer}),m=Object.assign(Object.assign({},c),{challenge:d,user:f});if(l&&l.length>0){m.excludeCredentials=new Array(l.length);for(let g=0;g<l.length;g++){const p=l[g];m.excludeCredentials[g]=Object.assign(Object.assign({},p),{id:li(p.id).buffer,type:p.type||"public-key",transports:p.transports})}}return m}function P_(r){if(!r)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(r);const{challenge:n,allowCredentials:i}=r,l=Bl(r,["challenge","allowCredentials"]),c=li(n).buffer,d=Object.assign(Object.assign({},l),{challenge:c});if(i&&i.length>0){d.allowCredentials=new Array(i.length);for(let f=0;f<i.length;f++){const m=i[f];d.allowCredentials[f]=Object.assign(Object.assign({},m),{id:li(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return d}function W_(r){var n;if("toJSON"in r&&typeof r.toJSON=="function")return r.toJSON();const i=r;return{id:r.id,rawId:r.id,response:{attestationObject:ss(new Uint8Array(r.response.attestationObject)),clientDataJSON:ss(new Uint8Array(r.response.clientDataJSON))},type:"public-key",clientExtensionResults:r.getClientExtensionResults(),authenticatorAttachment:(n=i.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function F_(r){var n;if("toJSON"in r&&typeof r.toJSON=="function")return r.toJSON();const i=r,l=r.getClientExtensionResults(),c=r.response;return{id:r.id,rawId:r.id,response:{authenticatorData:ss(new Uint8Array(c.authenticatorData)),clientDataJSON:ss(new Uint8Array(c.clientDataJSON)),signature:ss(new Uint8Array(c.signature)),userHandle:c.userHandle?ss(new Uint8Array(c.userHandle)):void 0},type:"public-key",clientExtensionResults:l,authenticatorAttachment:(n=i.authenticatorAttachment)!==null&&n!==void 0?n:void 0}}function Fg(r){return r==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(r)}function pg(){var r,n;return!!(wt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((r=navigator==null?void 0:navigator.credentials)===null||r===void 0?void 0:r.create)=="function"&&typeof((n=navigator==null?void 0:navigator.credentials)===null||n===void 0?void 0:n.get)=="function")}async function ew(r){try{const n=await navigator.credentials.create(r);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new zl("Browser returned unexpected credential type",n)}:{data:null,error:new zl("Empty credential response",n)}}catch(n){return{data:null,error:K_({error:n,options:r})}}}async function tw(r){try{const n=await navigator.credentials.get(r);return n?n instanceof PublicKeyCredential?{data:n,error:null}:{data:null,error:new zl("Browser returned unexpected credential type",n)}:{data:null,error:new zl("Empty credential response",n)}}catch(n){return{data:null,error:X_({error:n,options:r})}}}const aw={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},nw={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ul(...r){const n=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),i=c=>c instanceof ArrayBuffer||ArrayBuffer.isView(c),l={};for(const c of r)if(c)for(const d in c){const f=c[d];if(f!==void 0)if(Array.isArray(f))l[d]=f;else if(i(f))l[d]=f;else if(n(f)){const m=l[d];n(m)?l[d]=Ul(m,f):l[d]=Ul(f)}else l[d]=f}return l}function sw(r,n){return Ul(aw,r,n||{})}function iw(r,n){return Ul(nw,r,n||{})}class rw{constructor(n){this.client=n,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(n){return this.client.mfa.enroll(Object.assign(Object.assign({},n),{factorType:"webauthn"}))}async _challenge({factorId:n,webauthn:i,friendlyName:l,signal:c},d){try{const{data:f,error:m}=await this.client.mfa.challenge({factorId:n,webauthn:i});if(!f)return{data:null,error:m};const g=c??J_.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:p}=f.webauthn.credential_options.publicKey;p.name||(p.name=`${p.id}:${l}`),p.displayName||(p.displayName=p.name)}switch(f.webauthn.type){case"create":{const p=sw(f.webauthn.credential_options.publicKey,d==null?void 0:d.create),{data:S,error:y}=await ew({publicKey:p,signal:g});return S?{data:{factorId:n,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:S}},error:null}:{data:null,error:y}}case"request":{const p=iw(f.webauthn.credential_options.publicKey,d==null?void 0:d.request),{data:S,error:y}=await tw(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:p,signal:g}));return S?{data:{factorId:n,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:S}},error:null}:{data:null,error:y}}}}catch(f){return F(f)?{data:null,error:f}:{data:null,error:new ns("Unexpected error in challenge",f)}}}async _verify({challengeId:n,factorId:i,webauthn:l}){return this.client.mfa.verify({factorId:i,challengeId:n,webauthn:l})}async _authenticate({factorId:n,webauthn:{rpId:i=typeof window<"u"?window.location.hostname:void 0,rpOrigins:l=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},d){if(!i)return{data:null,error:new or("rpId is required for WebAuthn authentication")};
75try{if(!pg())return{data:null,error:new ns("Browser does not support WebAuthn",null)};const{data:f,error:m}=await this.challenge({factorId:n,webauthn:{rpId:i,rpOrigins:l},signal:c},{request:d});if(!f)return{data:null,error:m};const{webauthn:g}=f;return this._verify({factorId:n,challengeId:f.challengeId,webauthn:{type:g.type,rpId:i,rpOrigins:l,credential_response:g.credential_response}})}catch(f){return F(f)?{data:null,error:f}:{data:null,error:new ns("Unexpected error in authenticate",f)}}}async _register({friendlyName:n,webauthn:{rpId:i=typeof window<"u"?window.location.hostname:void 0,rpOrigins:l=typeof window<"u"?[window.location.origin]:void 0,signal:c}={}},d){if(!i)return{data:null,error:new or("rpId is required for WebAuthn registration")};try{if(!pg())return{data:null,error:new ns("Browser does not support WebAuthn",null)};const{data:f,error:m}=await this._enroll({friendlyName:n});if(!f)return await this.client.mfa.listFactors().then(S=>{var y;return(y=S.data)===null||y===void 0?void 0:y.all.find(T=>T.factor_type==="webauthn"&&T.friendly_name===n&&T.status!=="unverified")}).then(S=>S?this.client.mfa.unenroll({factorId:S==null?void 0:S.id}):void 0),{data:null,error:m};const{data:g,error:p}=await this._challenge({factorId:f.id,friendlyName:f.friendly_name,webauthn:{rpId:i,rpOrigins:l},signal:c},{create:d});return g?this._verify({factorId:f.id,challengeId:g.challengeId,webauthn:{rpId:i,rpOrigins:l,type:g.webauthn.type,credential_response:g.webauthn.credential_response}}):{data:null,error:p}}catch(f){return F(f)?{data:null,error:f}:{data:null,error:new ns("Unexpected error in register",f)}}}}V_();const lw={url:a_,storageKey:n_,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:s_,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function vg(r,n,i){return await i()}const ei={};class ur{get jwks(){var n,i;return(i=(n=ei[this.storageKey])===null||n===void 0?void 0:n.jwks)!==null&&i!==void 0?i:{keys:[]}}set jwks(n){ei[this.storageKey]=Object.assign(Object.assign({},ei[this.storageKey]),{jwks:n})}get jwks_cached_at(){var n,i;return(i=(n=ei[this.storageKey])===null||n===void 0?void 0:n.cachedAt)!==null&&i!==void 0?i:Number.MIN_SAFE_INTEGER}set jwks_cached_at(n){ei[this.storageKey]=Object.assign(Object.assign({},ei[this.storageKey]),{cachedAt:n})}constructor(n){var i,l,c;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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 d=Object.assign(Object.assign({},lw),n);if(this.storageKey=d.storageKey,this.instanceID=(i=ur.nextInstanceID[this.storageKey])!==null&&i!==void 0?i:0,ur.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!d.debug,typeof d.debug=="function"&&(this.logger=d.debug),this.instanceID>0&&wt()){const f=`${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(f),this.logDebugMessages&&console.trace(f)}if(this.persistSession=d.persistSession,this.autoRefreshToken=d.autoRefreshToken,this.admin=new L_({url:d.url,headers:d.headers,fetch:d.fetch}),this.url=d.url,this.headers=d.headers,this.fetch=Zg(d.fetch),this.lock=d.lock||vg,this.detectSessionInUrl=d.detectSessionInUrl,this.flowType=d.flowType,this.hasCustomAuthorizationHeader=d.hasCustomAuthorizationHeader,this.throwOnError=d.throwOnError,d.lock?this.lock=d.lock:this.persistSession&&wt()&&(!((l=globalThis==null?void 0:globalThis.navigator)===null||l===void 0)&&l.locks)?this.lock=$_:this.lock=vg,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 rw(this)}
75,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?(d.storage?this.storage=d.storage:Jg()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=gg(this.memoryStorage)),d.userStorage&&(this.userStorage=d.userStorage)):(this.memoryStorage={},this.storage=gg(this.memoryStorage)),wt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(f){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",f)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async f=>{this._debug("received broadcast notification from other tab or client",f),await this._notifyAllSubscribers(f.data.event,f.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(n){if(this.throwOnError&&n&&n.error)throw n.error;return n}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Kg}) ${new Date().toISOString()}`}_debug(...n){return this.logDebugMessages&&this.logger(this._logPrefix(),...n),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var n;try{let i={},l="none";if(wt()&&(i=b_(window.location.href),this._isImplicitGrantCallback(i)?l="implicit":await this._isPKCECallback(i)&&(l="pkce")),wt()&&this.detectSessionInUrl&&l!=="none"){const{data:c,error:d}=await this._getSessionFromURL(i,l);if(d){if(this._debug("#_initialize()","error detecting session from URL",d),c_(d)){const g=(n=d.details)===null||n===void 0?void 0:n.code;if(g==="identity_already_exists"||g==="identity_not_found"||g==="single_identity_not_deletable")return{error:d}}return await this._removeSession(),{error:d}}const{session:f,redirectType:m}=c;return this._debug("#_initialize()","detected session in URL",f,"redirect type",m),await this._saveSession(f),setTimeout(async()=>{m==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",f):await this._notifyAllSubscribers("SIGNED_IN",f)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(i){return F(i)?this._returnResult({error:i}):this._returnResult({error:new ns("Unexpected error during initialization",i)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(n){var i,l,c;try{const d=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(l=(i=n==null?void 0:n.options)===null||i===void 0?void 0:i.data)!==null&&l!==void 0?l:{},gotrue_meta_security:{captcha_token:(c=n==null?void 0:n.options)===null||c===void 0?void 0:c.captchaToken}},xform:ya}),{data:f,error:m}=d;if(m||!f)return this._returnResult({data:{user:null,session:null},error:m});const g=f.session,p=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",g)),this._returnResult({data:{user:p,session:g},error:null})}catch(d){if(F(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async signUp(n){var i,l,c;try{let d;if("email"in n){const{email:S,password:y,options:T}=n;let R=null,N=null;this.flowType==="pkce"&&([R,N]=await Ps(this.storage,this.storageKey)),d=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:T==null?void 0:T.emailRedirectTo,body:{email:S,password:y,data:(i=T==null?void 0:T.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:T==null?void 0:T.captchaToken},code_challenge:R,code_challenge_method:N},xform:ya})}else if("phone"in n){const{phone:S,password:y,options:T}=n;d=await le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:S,password:y,data:(l=T==null?void 0:T.data)!==null&&l!==void 0?l:{},channel:(c=T==null?void 0:T.channel)!==null&&c!==void 0?c:"sms",gotrue_meta_security:{captcha_token:T==null?void 0:T.captchaToken}},xform:ya})}else throw new Rl("You must provide either an email or phone number and a password");const{data:f,error:m}=d;if(m||!f)return await _t(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:m});const g=f.session,p=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",g)),this._returnResult({data:{user:p,session:g},error:null})}catch(d){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async signInWithPassword(n){try{let i;if("email"in n){const{email:d,password:f,options:m}=n;i=await le(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:d,password:f,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:hg})}else if("phone"in n){const{phone:d,password:f,options:m}=n;i=await le(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:d,password:f,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:hg})}else throw new Rl("You must provide either an email or phone number and a password");const{data:l,error:c}=i;
75if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new Zs;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:Object.assign({user:l.user,session:l.session},l.weak_password?{weakPassword:l.weak_password}:null),error:c})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithOAuth(n){var i,l,c,d;return await this._handleProviderSignIn(n.provider,{redirectTo:(i=n.options)===null||i===void 0?void 0:i.redirectTo,scopes:(l=n.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=n.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:(d=n.options)===null||d===void 0?void 0:d.skipBrowserRedirect})}async exchangeCodeForSession(n){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(n))}async signInWithWeb3(n){const{chain:i}=n;switch(i){case"ethereum":return await this.signInWithEthereum(n);case"solana":return await this.signInWithSolana(n);default:throw new Error(`@supabase/auth-js: Unsupported chain "${i}"`)}}async signInWithEthereum(n){var i,l,c,d,f,m,g,p,S,y,T;let R,N;if("message"in n)R=n.message,N=n.signature;else{const{chain:H,wallet:Y,statement:$,options:Q}=n;let I;if(wt())if(typeof Y=="object")I=Y;else{const Xe=window;if("ethereum"in Xe&&typeof Xe.ethereum=="object"&&"request"in Xe.ethereum&&typeof Xe.ethereum.request=="function")I=Xe.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 Y!="object"||!(Q!=null&&Q.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");I=Y}const te=new URL((i=Q==null?void 0:Q.url)!==null&&i!==void 0?i:window.location.href),Ae=await I.request({method:"eth_requestAccounts"}).then(Xe=>Xe).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Ae||Ae.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const ie=Wg(Ae[0]);let he=(l=Q==null?void 0:Q.signInWithEthereum)===null||l===void 0?void 0:l.chainId;if(!he){const Xe=await I.request({method:"eth_chainId"});he=G_(Xe)}const Oe={domain:te.host,address:ie,statement:$,uri:te.href,version:"1",chainId:he,nonce:(c=Q==null?void 0:Q.signInWithEthereum)===null||c===void 0?void 0:c.nonce,issuedAt:(f=(d=Q==null?void 0:Q.signInWithEthereum)===null||d===void 0?void 0:d.issuedAt)!==null&&f!==void 0?f:new Date,expirationTime:(m=Q==null?void 0:Q.signInWithEthereum)===null||m===void 0?void 0:m.expirationTime,notBefore:(g=Q==null?void 0:Q.signInWithEthereum)===null||g===void 0?void 0:g.notBefore,requestId:(p=Q==null?void 0:Q.signInWithEthereum)===null||p===void 0?void 0:p.requestId,resources:(S=Q==null?void 0:Q.signInWithEthereum)===null||S===void 0?void 0:S.resources};R=Y_(Oe),N=await I.request({method:"personal_sign",params:[I_(R),ie]})}try{const{data:H,error:Y}=await le(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:R,signature:N},!((y=n.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(T=n.options)===null||T===void 0?void 0:T.captchaToken}}:null),xform:ya});if(Y)throw Y;if(!H||!H.session||!H.user){const $=new Zs;return this._returnResult({data:{user:null,session:null},error:$})}return H.session&&(await this._saveSession(H.session),await this._notifyAllSubscribers("SIGNED_IN",H.session)),this._returnResult({data:Object.assign({},H),error:Y})}catch(H){if(F(H))return this._returnResult({data:{user:null,session:null},error:H});throw H}}async signInWithSolana(n){var i,l,c,d,f,m,g,p,S,y,T,R;let N,H;if("message"in n)N=n.message,H=n.signature;else{const{chain:Y,wallet:$,statement:Q,options:I}=n;let te;if(wt())if(typeof $=="object")te=$;else{const ie=window;if("solana"in ie&&typeof ie.solana=="object"&&("signIn"in ie.solana&&typeof ie.solana.signIn=="function"||"signMessage"in ie.solana&&typeof ie.solana.signMessage=="function"))te=ie.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 $!="object"||!(I!=null&&I.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");te=$}const Ae=new URL((i=I==null?void 0:I.url)!==null&&i!==void 0?i:window.location.href);if("signIn"in te&&te.signIn){const ie=await te.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},I==null?void 0:I.signInWithSolana),{version:"1",domain:Ae.host,uri:Ae.href}),Q?{statement:Q}:null));let he;if(Array.isArray(ie)&&ie[0]&&typeof ie[0]=="object")he=ie[0];else if(ie&&typeof ie=="object"&&"signedMessage"in ie&&"signature"in ie)he=ie;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in he&&"signature"in he&&(typeof he.signedMessage=="string"||he.signedMessage instanceof Uint8Array)&&he.signature instanceof Uint8Array)N=typeof he.signedMessage=="string"?he.signedMessage:new TextDecoder().decode(he.signedMessage),H=he.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in te)||typeof te.signMessage!="function"||!("publicKey"in te)||typeof te!="object"||!te.publicKey||!("toBase58"in te.publicKey)||typeof te.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");N=[`${Ae.host} wants you to sign in with your Solana account:`,te.publicKey.toBase58(),...Q?["",Q,""]:[""],"Version: 1",`URI: ${Ae.href}`,`Issued At: ${(c=(l=I==null?void 0:I.signInWithSolana)===null||l===void 0?void 0:l.issuedAt)!==null&&c!==void 0?c:new Date().toISOString()}`,...!((d=I==null?void 0:I.signInWithSolana)===null||d===void 0)&&d.notBefore?[`Not Before: ${I.signInWithSolana.notBefore}`]:[],...!((f=I==null?void 0:I.signInWithSolana)===null||f===void 0)&&f.expirationTime?[`Expiration Time: ${I.signInWithSolana.expirationTime}`]:[],...!((m=I==null?void 0:I.signInWithSolana)===null||m===void 0)&&m.chainId?[`Chain ID: ${I.signInWithSolana.chainId}`]:[],...!((g=I==null?void 0:I.signInWithSolana)===null||g===void 0)&&g.nonce?[`Nonce: ${I.signInWithSolana.nonce}`]:[],...!((p=I==null?void 0:I.signInWithSolana)===null||p===void 0)&&p.requestId?[`Request ID: ${I.signInWithSolana.requestId}`]:[],...!((y=(S=I==null?void 0:I.signInWithSolana)===null||S===void 0?void 0:S.resources)===null||y===void 0)&&y.length?["Resources",...I.signInWithSolana.resources.map(he=>`- ${he}`)]:[]].join(` 76`);const ie=await te.signMessage(new TextEncoder().encode(N),"utf8");if(!ie||!(ie instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");H=ie}}try{const{data:Y,error:$}=await le(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:N,signature:ss(H)},!((T=n.options)===null||T===void 0)&&T.captchaToken?{gotrue_meta_security:{captcha_token:(R=n.options)===null||R===void 0?void 0:R.captchaToken}}:null),xform:ya});if($)throw $;if(!Y||!Y.session||!Y.user){const Q=new Zs;return this._returnResult({data:{user:null,session:null},error:Q})}return Y.session&&(await this._saveSession(Y.session),await this._notifyAllSubscribers("SIGNED_IN",Y.session)),this._returnResult({data:Object.assign({},Y),error:$})}catch(Y){if(F(Y))return this._returnResult({data:{user:null,session:null},error:Y});throw Y}}async _exchangeCodeForSession(n){const i=await es(this.storage,`${this.storageKey}-code-verifier`),[l,c]=(i??"").split("/");try{if(!l&&this.flowType==="pkce")throw new d_;const{data:d,error:f}=await le(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:n,code_verifier:l},xform:ya});if(await _t(this.storage,`${this.storageKey}-code-verifier`),f)throw f;
76if(!d||!d.session||!d.user){const m=new Zs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:m})}return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",d.session)),this._returnResult({data:Object.assign(Object.assign({},d),{redirectType:c??null}),error:f})}catch(d){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(d))return this._returnResult({data:{user:null,session:null,redirectType:null},error:d});throw d}}async signInWithIdToken(n){try{const{options:i,provider:l,token:c,access_token:d,nonce:f}=n,m=await le(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:l,id_token:c,access_token:d,nonce:f,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:ya}),{data:g,error:p}=m;if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!g||!g.session||!g.user){const S=new Zs;return this._returnResult({data:{user:null,session:null},error:S})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:g,error:p})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithOtp(n){var i,l,c,d,f;try{if("email"in n){const{email:m,options:g}=n;let p=null,S=null;this.flowType==="pkce"&&([p,S]=await Ps(this.storage,this.storageKey));const{error:y}=await le(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:m,data:(i=g==null?void 0:g.data)!==null&&i!==void 0?i:{},create_user:(l=g==null?void 0:g.shouldCreateUser)!==null&&l!==void 0?l:!0,gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},code_challenge:p,code_challenge_method:S},redirectTo:g==null?void 0:g.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:y})}if("phone"in n){const{phone:m,options:g}=n,{data:p,error:S}=await le(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:m,data:(c=g==null?void 0:g.data)!==null&&c!==void 0?c:{},create_user:(d=g==null?void 0:g.shouldCreateUser)!==null&&d!==void 0?d:!0,gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},channel:(f=g==null?void 0:g.channel)!==null&&f!==void 0?f:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:p==null?void 0:p.message_id},error:S})}throw new Rl("You must provide either an email or phone number.")}catch(m){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async verifyOtp(n){var i,l;try{let c,d;"options"in n&&(c=(i=n.options)===null||i===void 0?void 0:i.redirectTo,d=(l=n.options)===null||l===void 0?void 0:l.captchaToken);const{data:f,error:m}=await le(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},n),{gotrue_meta_security:{captcha_token:d}}),redirectTo:c,xform:ya});if(m)throw m;if(!f)throw new Error("An error occurred on token verification.");const g=f.session,p=f.user;return g!=null&&g.access_token&&(await this._saveSession(g),await this._notifyAllSubscribers(n.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",g)),this._returnResult({data:{user:p,session:g},error:null})}catch(c){if(F(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithSSO(n){var i,l,c,d,f;try{let m=null,g=null;this.flowType==="pkce"&&([m,g]=await Ps(this.storage,this.storageKey));const p=await le(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in n?{provider_id:n.providerId}:null),"domain"in n?{domain:n.domain}:null),{redirect_to:(l=(i=n.options)===null||i===void 0?void 0:i.redirectTo)!==null&&l!==void 0?l:void 0}),!((c=n==null?void 0:n.options)===null||c===void 0)&&c.captchaToken?{gotrue_meta_security:{captcha_token:n.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:m,code_challenge_method:g}),headers:this.headers,xform:M_});return!((d=p.data)===null||d===void 0)&&d.url&&wt()&&!(!((f=n.options)===null||f===void 0)&&f.skipBrowserRedirect)&&window.location.assign(p.data.url),this._returnResult(p)}catch(m){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(m))return this._returnResult({data:null,error:m});throw m}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async n=>{const{data:{session:i},error:l}=n;if(l)throw l;if(!i)throw new Zt;const{error:c}=await le(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:i.access_token});return this._returnResult({data:{user:null,session:null},error:c})})}catch(n){if(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async resend(n){try{const i=`${this.url}/resend`;if("email"in n){const{email:l,type:c,options:d}=n,{error:f}=await le(this.fetch,"POST",i,{headers:this.headers,body:{email:l,type:c,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},redirectTo:d==null?void 0:d.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}else if("phone"in n){const{phone:l,type:c,options:d}=n,{data:f,error:m}=await le(this.fetch,"POST",i,{headers:this.headers,body:{phone:l,type:c,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:f==null?void 0:f.message_id},error:m})}throw new Rl("You must provide either an email or phone number and a type")}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async i=>i))}async _acquireLock(n,i){this._debug("#_acquireLock","begin",n);try{if(this.lockAcquired){const l=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),c=(async()=>(await l,await i()))();return this.pendingInLock.push((async()=>{try{await c}catch{}})()),c}return await this.lock(`lock:${this.storageKey}`,n,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const l=i();for(this.pendingInLock.push((async()=>{try{await l}catch{}})()),await l;this.pendingInLock.length;){const c=[...this.pendingInLock];await Promise.all(c),this.pendingInLock.splice(0,c.length)}return await l}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(n){this._debug("#_useSession","begin");try{const i=await this.__loadSession();return await n(i)}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 n=null;const i=await es(this.storage,this.storageKey);
76if(this._debug("#getSession()","session from storage",i),i!==null&&(this._isValidSession(i)?n=i:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!n)return{data:{session:null},error:null};const l=n.expires_at?n.expires_at*1e3-Date.now()<dc:!1;if(this._debug("#__loadSession()",`session has${l?"":" not"} expired`,"expires_at",n.expires_at),!l){if(this.userStorage){const f=await es(this.userStorage,this.storageKey+"-user");f!=null&&f.user?n.user=f.user:n.user=mc()}if(this.storage.isServer&&n.user&&!n.user.__isUserNotAvailableProxy){const f={value:this.suppressGetSessionWarning};n.user=D_(n.user,f),f.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:n},error:null}}const{data:c,error:d}=await this._callRefreshToken(n.refresh_token);return d?this._returnResult({data:{session:null},error:d}):this._returnResult({data:{session:c},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(n){if(n)return await this._getUser(n);await this.initializePromise;const i=await this._acquireLock(-1,async()=>await this._getUser());return i.data.user&&(this.suppressGetSessionWarning=!0),i}async _getUser(n){try{return n?await le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:n,xform:Rn}):await this._useSession(async i=>{var l,c,d;const{data:f,error:m}=i;if(m)throw m;return!(!((l=f.session)===null||l===void 0)&&l.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Zt}:await le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0,xform:Rn})})}catch(i){if(F(i))return u_(i)&&(await this._removeSession(),await _t(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:i});throw i}}async updateUser(n,i={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(n,i))}async _updateUser(n,i={}){try{return await this._useSession(async l=>{const{data:c,error:d}=l;if(d)throw d;if(!c.session)throw new Zt;const f=c.session;let m=null,g=null;this.flowType==="pkce"&&n.email!=null&&([m,g]=await Ps(this.storage,this.storageKey));const{data:p,error:S}=await le(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:i==null?void 0:i.emailRedirectTo,body:Object.assign(Object.assign({},n),{code_challenge:m,code_challenge_method:g}),jwt:f.access_token,xform:Rn});if(S)throw S;return f.user=p.user,await this._saveSession(f),await this._notifyAllSubscribers("USER_UPDATED",f),this._returnResult({data:{user:f.user},error:null})})}catch(l){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(l))return this._returnResult({data:{user:null},error:l});throw l}}async setSession(n){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(n))}async _setSession(n){try{if(!n.access_token||!n.refresh_token)throw new Zt;const i=Date.now()/1e3;let l=i,c=!0,d=null;const{payload:f}=hc(n.access_token);if(f.exp&&(l=f.exp,c=l<=i),c){const{data:m,error:g}=await this._callRefreshToken(n.refresh_token);if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!m)return{data:{user:null,session:null},error:null};d=m}else{const{data:m,error:g}=await this._getUser(n.access_token);if(g)throw g;d={access_token:n.access_token,refresh_token:n.refresh_token,user:m.user,token_type:"bearer",expires_in:l-i,expires_at:l},await this._saveSession(d),await this._notifyAllSubscribers("SIGNED_IN",d)}return this._returnResult({data:{user:d.user,session:d},error:null})}catch(i){if(F(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}}async refreshSession(n){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(n))}async _refreshSession(n){try{return await this._useSession(async i=>{var l;if(!n){const{data:f,error:m}=i;if(m)throw m;n=(l=f.session)!==null&&l!==void 0?l:void 0}if(!(n!=null&&n.refresh_token))throw new Zt;const{data:c,error:d}=await this._callRefreshToken(n.refresh_token);return d?this._returnResult({data:{user:null,session:null},error:d}):c?this._returnResult({data:{user:c.user,session:c},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async _getSessionFromURL(n,i){try{if(!wt())throw new Cl("No browser detected.");
76if(n.error||n.error_description||n.error_code)throw new Cl(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});switch(i){case"implicit":if(this.flowType==="pkce")throw new rg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Cl("Not a valid implicit grant flow url.");break;default:}if(i==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!n.code)throw new rg("No code detected.");const{data:Q,error:I}=await this._exchangeCodeForSession(n.code);if(I)throw I;const te=new URL(window.location.href);return te.searchParams.delete("code"),window.history.replaceState(window.history.state,"",te.toString()),{data:{session:Q.session,redirectType:null},error:null}}const{provider_token:l,provider_refresh_token:c,access_token:d,refresh_token:f,expires_in:m,expires_at:g,token_type:p}=n;if(!d||!m||!f||!p)throw new Cl("No session defined in URL");const S=Math.round(Date.now()/1e3),y=parseInt(m);let T=S+y;g&&(T=parseInt(g));const R=T-S;R*1e3<=ai&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${R}s, should have been closer to ${y}s`);const N=T-y;S-N>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",N,T,S):S-N<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",N,T,S);const{data:H,error:Y}=await this._getUser(d);if(Y)throw Y;const $={provider_token:l,provider_refresh_token:c,access_token:d,expires_in:y,expires_at:T,refresh_token:f,token_type:p,user:H.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:$,redirectType:n.type},error:null})}catch(l){if(F(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(n){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),n):!!(n.access_token||n.error_description)}async _isPKCECallback(n){const i=await es(this.storage,`${this.storageKey}-code-verifier`);return!!(n.code&&i)}async signOut(n={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(n))}async _signOut({scope:n}={scope:"global"}){return await this._useSession(async i=>{var l;const{data:c,error:d}=i;if(d)return this._returnResult({error:d});const f=(l=c.session)===null||l===void 0?void 0:l.access_token;if(f){const{error:m}=await this.admin.signOut(f,n);if(m&&!(o_(m)&&(m.status===404||m.status===401||m.status===403)))return this._returnResult({error:m})}return n!=="others"&&(await this._removeSession(),await _t(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(n){const i=y_(),l={id:i,callback:n,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",i),this.stateChangeEmitters.delete(i)}};return this._debug("#onAuthStateChange()","registered callback with id",i),this.stateChangeEmitters.set(i,l),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(i)})))(),{data:{subscription:l}}}async _emitInitialSession(n){return await this._useSession(async i=>{var l,c;try{const{data:{session:d},error:f}=i;if(f)throw f;await((l=this.stateChangeEmitters.get(n))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",d)),this._debug("INITIAL_SESSION","callback id",n,"session",d)}catch(d){await((c=this.stateChangeEmitters.get(n))===null||c===void 0?void 0:c.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",n,"error",d),console.error(d)}})}async resetPasswordForEmail(n,i={}){let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Ps(this.storage,this.storageKey,!0));try{return await le(this.fetch,"POST",`${this.url}/recover`,{body:{email:n,code_challenge:l,code_challenge_method:c,gotrue_meta_security:{captcha_token:i.captchaToken}},headers:this.headers,redirectTo:i.redirectTo})}catch(d){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(d))return this._returnResult({data:null,error:d});throw d}}async getUserIdentities(){var n;try{const{data:i,error:l}=await this.getUser();if(l)throw l;return this._returnResult({data:{identities:(n=i.user.identities)!==null&&n!==void 0?n:[]},error:null})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async linkIdentity(n){return"token"in n?this.linkIdentityIdToken(n):this.linkIdentityOAuth(n)}async linkIdentityOAuth(n){var i;try{const{data:l,error:c}=await this._useSession(async d=>{var f,m,g,p,S;const{data:y,error:T}=d;if(T)throw T;const R=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,n.provider,{redirectTo:(f=n.options)===null||f===void 0?void 0:f.redirectTo,scopes:(m=n.options)===null||m===void 0?void 0:m.scopes,queryParams:(g=n.options)===null||g===void 0?void 0:g.queryParams,skipBrowserRedirect:!0});return await le(this.fetch,"GET",R,{headers:this.headers,jwt:(S=(p=y.session)===null||p===void 0?void 0:p.access_token)!==null&&S!==void 0?S:void 0})});if(c)throw c;return wt()&&!(!((i=n.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(l==null?void 0:l.url),this._returnResult({data:{provider:n.provider,url:l==null?void 0:l.url},error:null})}catch(l){if(F(l))return this._returnResult({data:{provider:n.provider,url:null},error:l});throw l}}async linkIdentityIdToken(n){return await this._useSession(async i=>{var l;try{const{error:c,data:{session:d}}=i;if(c)throw c;const{options:f,provider:m,token:g,access_token:p,nonce:S}=n,y=await le(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(l=d==null?void 0:d.access_token)!==null&&l!==void 0?l:void 0,body:{provider:m,id_token:g,access_token:p,nonce:S,link_identity:!0,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:ya}),{data:T,error:R}=y;return R?this._returnResult({data:{user:null,session:null},error:R}):!T||!T.session||!T.user?this._returnResult({data:{user:null,session:null},error:new Zs}):(T.session&&(await this._saveSession(T.session),await this._notifyAllSubscribers("USER_UPDATED",T.session)),this._returnResult({data:T,error:R}))}catch(c){if(await _t(this.storage,`${this.storageKey}-code-verifier`),F(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}})}async unlinkIdentity(n){try{return await this._useSession(async i=>{var l,c;const{data:d,error:f}=i;if(f)throw f;
76return await le(this.fetch,"DELETE",`${this.url}/user/identities/${n.identity_id}`,{headers:this.headers,jwt:(c=(l=d.session)===null||l===void 0?void 0:l.access_token)!==null&&c!==void 0?c:void 0})})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async _refreshAccessToken(n){const i=`#_refreshAccessToken(${n.substring(0,5)}...)`;this._debug(i,"begin");try{const l=Date.now();return await S_(async c=>(c>0&&await w_(200*Math.pow(2,c-1)),this._debug(i,"refreshing attempt",c),await le(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:n},headers:this.headers,xform:ya})),(c,d)=>{const f=200*Math.pow(2,c);return d&&fc(d)&&Date.now()+f-l<ai})}catch(l){if(this._debug(i,"error",l),F(l))return this._returnResult({data:{session:null,user:null},error:l});throw l}finally{this._debug(i,"end")}}_isValidSession(n){return typeof n=="object"&&n!==null&&"access_token"in n&&"refresh_token"in n&&"expires_at"in n}async _handleProviderSignIn(n,i){const l=await this._getUrlForProvider(`${this.url}/authorize`,n,{redirectTo:i.redirectTo,scopes:i.scopes,queryParams:i.queryParams});return this._debug("#_handleProviderSignIn()","provider",n,"options",i,"url",l),wt()&&!i.skipBrowserRedirect&&window.location.assign(l),{data:{provider:n,url:l},error:null}}async _recoverAndRefresh(){var n,i;const l="#_recoverAndRefresh()";this._debug(l,"begin");try{const c=await es(this.storage,this.storageKey);if(c&&this.userStorage){let f=await es(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!f&&(f={user:c.user},await ni(this.userStorage,this.storageKey+"-user",f)),c.user=(n=f==null?void 0:f.user)!==null&&n!==void 0?n:mc()}else if(c&&!c.user&&!c.user){const f=await es(this.storage,this.storageKey+"-user");f&&(f!=null&&f.user)?(c.user=f.user,await _t(this.storage,this.storageKey+"-user"),await ni(this.storage,this.storageKey,c)):c.user=mc()}if(this._debug(l,"session from storage",c),!this._isValidSession(c)){this._debug(l,"session is not valid"),c!==null&&await this._removeSession();return}const d=((i=c.expires_at)!==null&&i!==void 0?i:1/0)*1e3-Date.now()<dc;if(this._debug(l,`session has${d?"":" not"} expired with margin of ${dc}s`),d){if(this.autoRefreshToken&&c.refresh_token){const{error:f}=await this._callRefreshToken(c.refresh_token);f&&(console.error(f),fc(f)||(this._debug(l,"refresh failed with a non-retryable error, removing the session",f),await this._removeSession()))}}else if(c.user&&c.user.__isUserNotAvailableProxy===!0)try{const{data:f,error:m}=await this._getUser(c.access_token);!m&&(f!=null&&f.user)?(c.user=f.user,await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)):this._debug(l,"could not get user data, skipping SIGNED_IN notification")}catch(f){console.error("Error getting user data:",f),this._debug(l,"error getting user data, skipping SIGNED_IN notification",f)}else await this._notifyAllSubscribers("SIGNED_IN",c)}catch(c){this._debug(l,"error",c),console.error(c);return}finally{this._debug(l,"end")}}async _callRefreshToken(n){var i,l;if(!n)throw new Zt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const c=`#_callRefreshToken(${n.substring(0,5)}...)`;this._debug(c,"begin");try{this.refreshingDeferred=new Ll;const{data:d,error:f}=await this._refreshAccessToken(n);if(f)throw f;if(!d.session)throw new Zt;await this._saveSession(d.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",d.session);const m={data:d.session,error:null};return this.refreshingDeferred.resolve(m),m}catch(d){if(this._debug(c,"error",d),F(d)){const f={data:null,error:d};return fc(d)||await this._removeSession(),(i=this.refreshingDeferred)===null||i===void 0||i.resolve(f),f}throw(l=this.refreshingDeferred)===null||l===void 0||l.reject(d),d}finally{this.refreshingDeferred=null,this._debug(c,"end")}}async _notifyAllSubscribers(n,i,l=!0){const c=`#_notifyAllSubscribers(${n})`;this._debug(c,"begin",i,`broadcast = ${l}`);try{this.broadcastChannel&&l&&this.broadcastChannel.postMessage({event:n,session:i});const d=[],f=Array.from(this.stateChangeEmitters.values()).map(async m=>{try{await m.callback(n,i)}catch(g){d.push(g)}});if(await Promise.all(f),d.length>0){for(let m=0;m<d.length;m+=1)console.error(d[m]);throw d[0]}}finally{this._debug(c,"end")}}async _saveSession(n){this._debug("#_saveSession()",n),this.suppressGetSessionWarning=!0,await _t(this.storage,`${this.storageKey}-code-verifier`);const i=Object.assign({},n),l=i.user&&i.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!l&&i.user&&await ni(this.userStorage,this.storageKey+"-user",{user:i.user});const c=Object.assign({},i);delete c.user;const d=dg(c);await ni(this.storage,this.storageKey,d)}else{const c=dg(i);await ni(this.storage,this.storageKey,c)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await _t(this.storage,this.storageKey),await _t(this.storage,this.storageKey+"-code-verifier"),await _t(this.storage,this.storageKey+"-user"),this.userStorage&&await _t(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const n=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{n&&wt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",n)}
76catch(i){console.error("removing visibilitychange callback failed",i)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const n=setInterval(()=>this._autoRefreshTokenTick(),ai);this.autoRefreshTicker=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const n=this.autoRefreshTicker;this.autoRefreshTicker=null,n&&clearInterval(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 n=Date.now();try{return await this._useSession(async i=>{const{data:{session:l}}=i;if(!l||!l.refresh_token||!l.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const c=Math.floor((l.expires_at*1e3-n)/ai);this._debug("#_autoRefreshTokenTick()",`access token expires in ${c} ticks, a tick lasts ${ai}ms, refresh threshold is ${Nc} ticks`),c<=Nc&&await this._callRefreshToken(l.refresh_token)})}catch(i){console.error("Auto refresh tick failed with error. This is likely a transient error.",i)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(n){if(n.isAcquireTimeout||n instanceof Pg)this._debug("auto refresh token tick lock not available");else throw n}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!wt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(n){console.error("_handleVisibilityChange",n)}}async _onVisibilityChanged(n){const i=`#_onVisibilityChanged(${n})`;this._debug(i,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),n||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(i,"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(n,i,l){const c=[`provider=${encodeURIComponent(i)}`];if(l!=null&&l.redirectTo&&c.push(`redirect_to=${encodeURIComponent(l.redirectTo)}`),l!=null&&l.scopes&&c.push(`scopes=${encodeURIComponent(l.scopes)}`),this.flowType==="pkce"){const[d,f]=await Ps(this.storage,this.storageKey),m=new URLSearchParams({code_challenge:`${encodeURIComponent(d)}`,code_challenge_method:`${encodeURIComponent(f)}`});c.push(m.toString())}if(l!=null&&l.queryParams){const d=new URLSearchParams(l.queryParams);c.push(d.toString())}return l!=null&&l.skipBrowserRedirect&&c.push(`skip_http_redirect=${l.skipBrowserRedirect}`),`${n}?${c.join("&")}`}async _unenroll(n){try{return await this._useSession(async i=>{var l;const{data:c,error:d}=i;return d?this._returnResult({data:null,error:d}):await le(this.fetch,"DELETE",`${this.url}/factors/${n.factorId}`,{headers:this.headers,jwt:(l=c==null?void 0:c.session)===null||l===void 0?void 0:l.access_token})})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async _enroll(n){try{return await this._useSession(async i=>{var l,c;const{data:d,error:f}=i;if(f)return this._returnResult({data:null,error:f});const m=Object.assign({friendly_name:n.friendlyName,factor_type:n.factorType},n.factorType==="phone"?{phone:n.phone}:n.factorType==="totp"?{issuer:n.issuer}:{}),{data:g,error:p}=await le(this.fetch,"POST",`${this.url}/factors`,{body:m,headers:this.headers,jwt:(l=d==null?void 0:d.session)===null||l===void 0?void 0:l.access_token});return p?this._returnResult({data:null,error:p}):(n.factorType==="totp"&&g.type==="totp"&&(!((c=g==null?void 0:g.totp)===null||c===void 0)&&c.qr_code)&&(g.totp.qr_code=`data:image/svg+xml;utf-8,${g.totp.qr_code}`),this._returnResult({data:g,error:null}))})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async _verify(n){return this._acquireLock(-1,async()=>{try{return await this._useSession(async i=>{var l;const{data:c,error:d}=i;if(d)return this._returnResult({data:null,error:d});const f=Object.assign({challenge_id:n.challengeId},"webauthn"in n?{webauthn:Object.assign(Object.assign({},n.webauthn),{credential_response:n.webauthn.type==="create"?W_(n.webauthn.credential_response):F_(n.webauthn.credential_response)})}:{code:n.code}),{data:m,error:g}=await le(this.fetch,"POST",`${this.url}/factors/${n.factorId}/verify`,{body:f,headers:this.headers,jwt:(l=c==null?void 0:c.session)===null||l===void 0?void 0:l.access_token});return g?this._returnResult({data:null,error:g}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+m.expires_in},m)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",m),this._returnResult({data:m,error:g}))})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}})}async _challenge(n){return this._acquireLock(-1,async()=>{try{return await this._useSession(async i=>{var l;const{data:c,error:d}=i;if(d)return this._returnResult({data:null,error:d});const f=await le(this.fetch,"POST",`${this.url}/factors/${n.factorId}/challenge`,{body:n,headers:this.headers,jwt:(l=c==null?void 0:c.session)===null||l===void 0?void 0:l.access_token});if(f.error)return f;const{data:m}=f;if(m.type!=="webauthn")return{data:m,error:null};switch(m.webauthn.type){case"create":return{data:Object.assign(Object.assign({},m),{webauthn:Object.assign(Object.assign({},m.webauthn),{credential_options:Object.assign(Object.assign({},m.webauthn.credential_options),{publicKey:Z_(m.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},m),{webauthn:Object.assign(Object.assign({},m.webauthn),{credential_options:Object.assign(Object.assign({},m.webauthn.credential_options),{publicKey:P_(m.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}})}async _challengeAndVerify(n){const{data:i,error:l}=await this._challenge({factorId:n.factorId});return l?this._returnResult({data:null,error:l}):await this._verify({factorId:n.factorId,challengeId:i.id,code:n.code})}async _listFactors(){var n;const{data:{user:i},error:l}=await this.getUser();if(l)return{data:null,error:l};const c={all:[],phone:[],totp:[],webauthn:[]};for(const d of(n=i==null?void 0:i.factors)!==null&&n!==void 0?n:[])c.all.push(d),d.status==="verified"&&c[d.factor_type].push(d);return{data:c,error:null}}async _getAuthenticatorAssuranceLevel(){var n,i;const{data:{session:l},error:c}
76=await this.getSession();if(c)return this._returnResult({data:null,error:c});if(!l)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:d}=hc(l.access_token);let f=null;d.aal&&(f=d.aal);let m=f;((i=(n=l.user.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(m="aal2");const p=d.amr||[];return{data:{currentLevel:f,nextLevel:m,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(n){try{return await this._useSession(async i=>{const{data:{session:l},error:c}=i;return c?this._returnResult({data:null,error:c}):l?await le(this.fetch,"GET",`${this.url}/oauth/authorizations/${n}`,{headers:this.headers,jwt:l.access_token,xform:d=>({data:d,error:null})}):this._returnResult({data:null,error:new Zt})})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async _approveAuthorization(n,i){try{return await this._useSession(async l=>{const{data:{session:c},error:d}=l;if(d)return this._returnResult({data:null,error:d});if(!c)return this._returnResult({data:null,error:new Zt});const f=await le(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"approve"},xform:m=>({data:m,error:null})});return f.data&&f.data.redirect_url&&wt()&&!(i!=null&&i.skipBrowserRedirect)&&window.location.assign(f.data.redirect_url),f})}catch(l){if(F(l))return this._returnResult({data:null,error:l});throw l}}async _denyAuthorization(n,i){try{return await this._useSession(async l=>{const{data:{session:c},error:d}=l;if(d)return this._returnResult({data:null,error:d});if(!c)return this._returnResult({data:null,error:new Zt});const f=await le(this.fetch,"POST",`${this.url}/oauth/authorizations/${n}/consent`,{headers:this.headers,jwt:c.access_token,body:{action:"deny"},xform:m=>({data:m,error:null})});return f.data&&f.data.redirect_url&&wt()&&!(i!=null&&i.skipBrowserRedirect)&&window.location.assign(f.data.redirect_url),f})}catch(l){if(F(l))return this._returnResult({data:null,error:l});throw l}}async _listOAuthGrants(){try{return await this._useSession(async n=>{const{data:{session:i},error:l}=n;return l?this._returnResult({data:null,error:l}):i?await le(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new Zt})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _revokeOAuthGrant(n){try{return await this._useSession(async i=>{const{data:{session:l},error:c}=i;return c?this._returnResult({data:null,error:c}):l?(await le(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:l.access_token,query:{client_id:n.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Zt})})}catch(i){if(F(i))return this._returnResult({data:null,error:i});throw i}}async fetchJwk(n,i={keys:[]}){let l=i.keys.find(m=>m.kid===n);if(l)return l;const c=Date.now();if(l=this.jwks.keys.find(m=>m.kid===n),l&&this.jwks_cached_at+r_>c)return l;const{data:d,error:f}=await le(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(f)throw f;return!d.keys||d.keys.length===0||(this.jwks=d,this.jwks_cached_at=c,l=d.keys.find(m=>m.kid===n),!l)?null:l}async getClaims(n,i={}){try{let l=n;if(!l){const{data:R,error:N}
76=await this.getSession();if(N||!R.session)return this._returnResult({data:null,error:N});l=R.session.access_token}const{header:c,payload:d,signature:f,raw:{header:m,payload:g}}=hc(l);i!=null&&i.allowExpired||R_(d.exp);const p=!c.alg||c.alg.startsWith("HS")||!c.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(c.kid,i!=null&&i.keys?{keys:i.keys}:i==null?void 0:i.jwks);if(!p){const{error:R}=await this.getUser(l);if(R)throw R;return{data:{claims:d,header:c,signature:f},error:null}}const S=C_(c.alg),y=await crypto.subtle.importKey("jwk",p,S,!0,["verify"]);if(!await crypto.subtle.verify(S,y,f,p_(`${m}.${g}`)))throw new Uc("Invalid JWT signature");return{data:{claims:d,header:c,signature:f},error:null}}catch(l){if(F(l))return this._returnResult({data:null,error:l});throw l}}}ur.nextInstanceID={};const ow=ur,uw="2.88.0";let ar="";typeof Deno<"u"?ar="deno":typeof document<"u"?ar="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ar="react-native":ar="node";const cw={"X-Client-Info":`supabase-js-${ar}/${uw}`},dw={headers:cw},fw={schema:"public"},hw={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},mw={};function cr(r){"@babel/helpers - typeof";return cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cr(r)}function gw(r,n){if(cr(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var l=i.call(r,n);if(cr(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function pw(r){var n=gw(r,"string");return cr(n)=="symbol"?n:n+""}function vw(r,n,i){return(n=pw(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function yg(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);n&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),i.push.apply(i,l)}return i}function Pe(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?yg(Object(i),!0).forEach(function(l){vw(r,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):yg(Object(i)).forEach(function(l){Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(i,l))})}return r}const yw=r=>r?(...n)=>r(...n):(...n)=>fetch(...n),bw=()=>Headers,_w=(r,n,i)=>{const l=yw(i),c=bw();return async(d,f)=>{var m;const g=(m=await n())!==null&&m!==void 0?m:r;let p=new c(f==null?void 0:f.headers);return p.has("apikey")||p.set("apikey",r),p.has("Authorization")||p.set("Authorization",`Bearer ${g}`),l(d,Pe(Pe({},f),{},{headers:p}))}};function ww(r){return r.endsWith("/")?r:r+"/"}function Sw(r,n){var i,l;const{db:c,auth:d,realtime:f,global:m}=r,{db:g,auth:p,realtime:S,global:y}=n,T={db:Pe(Pe({},g),c),auth:Pe(Pe({},p),d),realtime:Pe(Pe({},S),f),storage:{},global:Pe(Pe(Pe({},y),m),{},{headers:Pe(Pe({},(i=y==null?void 0:y.headers)!==null&&i!==void 0?i:{}),(l=m==null?void 0:m.headers)!==null&&l!==void 0?l:{})}),accessToken:async()=>""};return r.accessToken?T.accessToken=r.accessToken:delete T.accessToken,T}function Ew(r){const n=r==null?void 0:r.trim();if(!n)throw new Error("supabaseUrl is required.");if(!n.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(ww(n))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Tw=class extends ow{constructor(r){super(r)}},xw=class{constructor(r,n,i){var l,c;this.supabaseUrl=r,this.supabaseKey=n;const d=Ew(r);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",d),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",d),this.storageUrl=new URL("storage/v1",d),this.functionsUrl=new URL("functions/v1",d);const f=`sb-${d.hostname.split(".")[0]}-auth-token`,m={db:fw,realtime:mw,auth:Pe(Pe({},hw),{},{storageKey:f}),global:dw},g=Sw(i??{},m);if(this.storageKey=(l=g.auth.storageKey)!==null&&l!==void 0?l:"",this.headers=(c=g.global.headers)!==null&&c!==void 0?c:{},g.accessToken)this.accessToken=g.accessToken,this.auth=new Proxy({},{get:(S,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}});else{var p;this.auth=this._initSupabaseAuthClient((p=g.auth)!==null&&p!==void 0?p:{},this.headers,g.global.fetch)}this.fetch=_w(n,this._getAccessToken.bind(this),g.global.fetch),this.realtime=this._initRealtimeClient(Pe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},g.realtime)),this.accessToken&&this.accessToken().then(S=>this.realtime.setAuth(S)).catch(S=>console.warn("Failed to set initial Realtime auth token:",S)),this.rest=new sb(new
76URL("rest/v1",d).href,{headers:this.headers,schema:g.db.schema,fetch:this.fetch}),this.storage=new t_(this.storageUrl.href,this.headers,this.fetch,i==null?void 0:i.storage),g.accessToken||this._listenForAuthEvents()}get functions(){return new Fy(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(r){return this.rest.from(r)}schema(r){return this.rest.schema(r)}rpc(r,n={},i={head:!1,get:!1,count:void 0}){return this.rest.rpc(r,n,i)}channel(r,n={config:{}}){return this.realtime.channel(r,n)}getChannels(){return this.realtime.getChannels()}removeChannel(r){return this.realtime.removeChannel(r)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var r=this,n,i;if(r.accessToken)return await r.accessToken();const{data:l}=await r.auth.getSession();return(n=(i=l.session)===null||i===void 0?void 0:i.access_token)!==null&&n!==void 0?n:r.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:r,persistSession:n,detectSessionInUrl:i,storage:l,userStorage:c,storageKey:d,flowType:f,lock:m,debug:g,throwOnError:p},S,y){const T={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Tw({url:this.authUrl.href,headers:Pe(Pe({},T),S),storageKey:d,autoRefreshToken:r,persistSession:n,detectSessionInUrl:i,storage:l,userStorage:c,flowType:f,lock:m,debug:g,throwOnError:p,fetch:y,hasCustomAuthorizationHeader:Object.keys(this.headers).some(R=>R.toLowerCase()==="authorization")})}_initRealtimeClient(r){return new wb(this.realtimeUrl.href,Pe(Pe({},r),{},{params:Pe(Pe({},{apikey:this.supabaseKey}),r==null?void 0:r.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(r,n,i){(r==="TOKEN_REFRESHED"||r==="SIGNED_IN")&&this.changedAccessToken!==i?(this.changedAccessToken=i,this.realtime.setAuth(i)):r==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Aw=(r,n,i)=>new xw(r,n,i);function Ow(){if(typeof window<"u"||typeof process>"u")return!1;const r=process.version;if(r==null)return!1;const n=r.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}Ow()&&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");const jw="https://nuwonsxgzzgfdbrilwgs.supabase.co",Rw="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im51d29uc3hnenpnZmRicmlsd2dzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU5NjIyNDYsImV4cCI6MjA4MTUzODI0Nn0.FAgiAJ2OGcyJNuDY8ycGt8m78zAHB42BTR6Enp7NB1Y",ne=Aw(jw,Rw),_S=Object.freeze(Object.defineProperty({__proto__:null,supabase:ne},Symbol.toStringTag,{value:"Module"})),ep=be.createContext(void 0),bg={siteName:"Agencia Funneltropia",siteDescription:"Agencia de Automatización e IA",contactEmail:"[email protected]",categories:["Estrategia","Automatización","Email Marketing","Inteligencia Artificial","Casos de Ãxito"],brandVoicePrompt:"Eres Funneltropia, una agencia experta en automatización. Tu tono es directo, profesional pero moderno...",logoUrl:"https://nuwonsxgzzgfdbrilwgs.supabase.co/storage/v1/object/public/media/1766054411457.png",socials:{linkedin:"https://linkedin.com",instagram:"https://instagram.com"},scripts:{headCode:"",bodyCode:""},formWebhooks:{newsletter:"",forms:""},analyticsId:"",aiSettings:{provider:"openai",apiKeys:{openai:"",gemini:"",anthropic:""}}},pc=[{id:"sys-home",title:"Home",slug:"",content:"",isSystem:!0,status:"published",seo:{metaTitle:"Agencia Funneltropia",metaDescription:"Expertos en Automatización e IA.",keywords:[]}},{id:"sys-blog",title:"Blog",slug:"blog",content:"",isSystem:!0,status:"published",seo:{metaTitle:"Blog - Funneltropia",metaDescription:"ArtÃculos y Novedades.",keywords:[]}},{id:"sys-team",title:"Equipo",slug:"equipo",content:"",isSystem:!0,status:"published",seo:{metaTitle:"Nuestro Equipo",metaDescription:"Conoce a los expertos.",keywords:[]}},{id:"sys-contact",title:"Contacto",slug:"contacto",content:"",isSystem:!0,status:"published",seo:{metaTitle:"Contactar",metaDescription:"Hablemos de tu proyecto.",keywords:[]}},{id:"sys-cookies",title:"PolÃtica de Privacidad y Cookies",slug:"politica-de-cookie
76s",content:"",isSystem:!0,status:"published",seo:{metaTitle:"PolÃtica de Privacidad y Cookies",metaDescription:"Información legal sobre cookies y privacidad.",keywords:[]}},{id:"sys-legal",title:"Aviso Legal",slug:"aviso-legal",content:"",isSystem:!0,status:"published",seo:{metaTitle:"Aviso Legal - Funneltropia",metaDescription:"Información legal.",keywords:[]}},{id:"sys-whitelabel",title:"Agencia Marca Blanca",slug:"servicio/marca-blanca-agencias-freelance",content:"",isSystem:!0,status:"published",seo:{metaTitle:"Marca Blanca - Funneltropia",metaDescription:"Soluciones de marca blanca para agencias.",keywords:[]}}],_g=[{id:"1",slug:"marketing-automation",navTitle:"Automatización de Negocios",navSubtitle:"Conecta tus herramientas.",title:"Automatización de Negocios 360º",subtitle:"Conectamos tus herramientas (Facturación, Marketing, LogÃstica) para eliminar el trabajo manual. Deja que Zapier y Make trabajen por ti.",heroImage:"https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=2070&auto=format&fit=crop",painPoints:["Copias y pegas datos entre herramientas.","Cometes errores humanos en facturas.","Pierdes tiempo en burocracia."],solutionTitle:"Operaciones sin Fricción",solutionDescription:"Mapeamos tus procesos operativos y los digitalizamos. Desde que entra un lead hasta que se emite la factura y se pide la reseña.",features:["Conexión vÃa API / Webhooks","Automatización de facturación","Onboarding de clientes automático","Sincronización de datos"],benefitTitle:"Beneficios de Automatizar",callToAction:"Automatizar Procesos"},{id:"2",slug:"chatbots-ia",navTitle:"Chatbots IA",navSubtitle:"Atención al cliente 24/7.",title:"Automatiza tu Atención al Cliente 24/7",subtitle:"No pierdas leads fuera de horario. Implementamos chatbots inteligentes entrenados con tu información que cualifican, agendan y venden por ti.",heroImage:"https://images.unsplash.com/photo-1531746790731-6c087fecd65a?q=80&w=2006&auto=format&fit=crop",painPoints:["Pasas horas respondiendo las mismas preguntas.","Pierdes clientes por no contestar rápido.","Tu equipo de soporte está saturado."],solutionTitle:"Tu mejor comercial, disponible siempre",solutionDescription:"Creamos asistentes virtuales avanzados (con ManyChat, Voiceflow o GPT) que se integran en WhatsApp, Instagram y Web. No es un simple árbol de decisiones; es una IA que entiende a tu cliente.",features:["Respuestas instantáneas en WhatsApp","Cualificación automática de leads","Agendamiento directo en Calendly","Integración con tu CRM"],benefitTitle:"Ventajas de un Chatbot IA",callToAction:"Quiero mi Chatbot"},{id:"3",slug:"agencia-partner-activecampaign-servicios",navTitle:"Agencia ActiveCampaign",navSubtitle:"Expertos en automatización de marketing.",title:"Exprime al Máximo ActiveCampaign",subtitle:"Somos Partners Certificados. Configuramos tu cuenta, limpiamos tu base de datos y creamos automatizaciones complejas que funcionan como un reloj suizo.",heroImage:"https://images.unsplash.com/photo-1551288049-bebda4e38f71?q=80&w=2070&auto=format&fit=crop",painPoints:["Pagas una herramienta cara que no usas bien.","Tus correos llegan a SPAM.","No tienes segmentada tu lista."],solutionTitle:"IngenierÃa de Automatización",solutionDescription:"AuditorÃa completa, configuración técnica (DKIM, SPF, DMARC) y diseño de Customer Journeys que acompañan al cliente desde el lead hasta la fidelización.",features:["Migraciones seguras","Lead Scoring avanzado","Integración con E-commerce","Informes de rendimiento"],benefitTitle:"Por qué elegirnos como Partner",callToAction:"Optimizar mi ActiveCampaign"},{id:"4",slug:"agencia-de-email-marketing",navTitle:"Email Marketing Estratégico",navSubtitle:"Vende más con cada correo.",title:"Convierte Suscriptores en Clientes",subtitle:"Estrategias de retención y venta a través del email. Copywriting persuasivo, diseño optimizado y secuencias que generan ingresos recurrentes.",heroImage:"https://images.unsplash.com/photo-1563986768609-322da13575f3?q=80&w=1470&auto=format&fit=crop",painPoints:["Tus tasas de apertura son bajas.","No sabes qué escribir.","EnvÃas emails solo cuando necesitas vender."],solutionTitle:"El Canal con Mayor ROI",solutionDescription:"Diseñamos tu calendario editorial y tus flujos automatizados (Bienvenida, Carrito Abandonado, Win-back). Nos encargamos de todo: estrategia, copy y diseño.",features:["Secuencias de Nurturing","Newsletters semanales","Tests A/B continuos","Limpieza de listas"],benefitTitle:"Resultados del Email Marketing",callToAction:"Mejorar mi Email Marketing"},{id:"4-1",slug:"automatizacion-contable",navTitle:"Automatización Contable",navSubtitle:"Control total sin esfuerzo.",title:"Automatización de contabilidad para pymes y freelancers",subtitle:"Deja de perder horas con facturas y gastos desordenados. Automatiza la contabilidad de tu negocio y gana control total con inteligencia artificial.",heroImage:"https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?q=80&w=2070&auto=format&fit=crop",painPoints:["No subes todas las facturas de gastos.","Pierdes horas registrando documentos.","No sabes exactamente cuánto ganas."],solutionTitle:"Control Financiero en Tiempo Real",solutionDescription:"Creamos un sistema que conecta tu negocio con tu herramienta contable para que el registro de gastos y facturas funcione de forma automática.",features:["Registro automático de gastos","Facturación sin intervención","Seguimiento de pagos","Integración con bancos/CRM"],benefitTitle:"Qué consigues al automatizar",callToAction:"Solicitar Demo"}
76,{id:"5",slug:"crm-inteligente",navTitle:"Sistemas de Ventas CRM",navSubtitle:"Organiza tu equipo comercial.",title:"Tu Equipo de Ventas, Organizado",subtitle:"Centraliza todos tus leads en un solo lugar. Implementamos CRMs (HubSpot, Pipedrive, GoHighLevel) que dicen a tus comerciales a quién llamar y cuándo.",heroImage:"https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=2070&auto=format&fit=crop",painPoints:["Usas Excel para llevar las ventas.","Pierdes el seguimiento de las propuestas.","No sabes por qué no cierras ventas."],solutionTitle:"Control Total de tu Pipeline",solutionDescription:"Configuramos embudos de venta visuales, automatizamos tareas repetitivas (creación de fichas, recordatorios) y te damos dashboards claros.",features:["Centralización de leads","Automatización de tareas comerciales","Dashboards de ventas","Integración con teléfono/email"],benefitTitle:"El impacto de un buen CRM",callToAction:"Implementar CRM"},{id:"6",slug:"soluciones-ia",navTitle:"Soluciones a Medida con IA",navSubtitle:"Lleva tu empresa al futuro.",title:"Software e IA para tu Empresa",subtitle:"Desarrollamos micro-SaaS, herramientas internas y soluciones especÃficas usando la potencia de la Inteligencia Artificial Generativa.",heroImage:"https://images.unsplash.com/photo-1620712943543-bcc4688e7485?q=80&w=1965&auto=format&fit=crop",painPoints:["Ningún
76software del mercado se adapta a ti.","Necesitas procesar muchos datos rápido.","Quieres innovar en tu sector."],solutionTitle:"TecnologÃa Propia",solutionDescription:"Creamos herramientas que analizan documentos, generan contenido a escala o toman decisiones basadas en datos. Tu ventaja competitiva.",features:["Desarrollo de scripts Python/JS","Integración con OpenAI/Gemini","Dashboards personalizados","Automatización de procesos complejos"],benefitTitle:"Innovación Real",callToAction:"Consultar Proyecto IA"},{id:"7",slug:"creacion-de-newsletters",navTitle:"Gestión de Newsletters",navSubtitle:"Retén a tu audiencia.",title:"Servicio de Newsletter Profesional",subtitle:"Nos encargamos de todo: ideamos, diseñamos, maquetamos y enviamos tus newsletters. Tú céntrate en tu negocio. Nosotros hacemos que tus suscriptores compren.",heroImage:"https://images.unsplash.com/photo-1596526131083-e8c633c948d2?q=80&w=2070&auto=format&fit=crop",painPoints:["Te falta tiempo para escribir regularmente.","Tus emails no generan ventas.","No sabes de qué hablar en cada envÃo."],solutionTitle:"Newsletters que Convierten",solutionDescription:"Una estrategia integral para mantener tu lista activa, aportando valor constante y generando un flujo recurrente de ingresos sin depender de anuncios.",features:["Calendario editorial","Copywriting persuasivo","Diseño y maquetación","Análisis de métricas"],benefitTitle:"El poder de una buena Newsletter",callToAction:"Quiero mi Newsletter"}],Cw=[{id:"1",title:"Ecommerce de Moda",slug:"ecommerce-moda-email-marketing",clientName:"Brand X",website:"https://brandx.com",category:"Email Marketing",coverImage:"https://images.unsplash.com/photo-1441986300917-64674bd600d8?q=80&w=2070&auto=format&fit=crop",summary:"Aumentamos su facturación un 40% con flujos de email.",challenge:'TenÃan una lista de 50.000 suscriptores "muerta" y solo enviaban promos en Black Friday.',challengeImage:"",solution:"Implementamos Klaviyo, segmentamos por comportamiento y creamos flujos de bienvenida y recuperación.",solutionImage:"",whatWeLearned:"La segmentación es clave.",results:[{label:"Facturación",value:"+40%"},{label:"ROAS",value:"x15"},{label:"Apertura",value:"45%"}],testimonial:{quote:"IncreÃble trabajo, ahora el email es nuestro canal #1.",author:"Ana GarcÃa",role:"CEO Brand X"},status:"published",seo:{metaTitle:"Caso Ãxito Ecommerce",metaDescription:"Cómo escalamos un ecommerce.",keywords:[]},order:1,features:[]},{id:"2",title:"ClÃnica Dental",slug:"clinica-dental-automatizacion",clientName:"ClÃnica Sonrisas",website:"https://clinica.com",category:"Automatización",coverImage:"https://images.unsplash.com/photo-1629909613654-28e377c37b09?q=80&w=2068&auto=format&fit=crop",summary:"Automatización de citas y recordatorios por WhatsApp.",challenge:'PerdÃan el 30% de las citas por "no show" y la recepción estaba colapsada.',challengeImage:"",solution:"Chatbot en WhatsApp para confirmar citas y reprogramar automáticamente.",solutionImage:"",whatWeLearned:"La inmediatez reduce el absentismo.",results:[{label:"No Shows",value:"-90%"},{label:"Recepción",value:"Liberada"},{label:"Pacientes",value:"+20%"}],testimonial:{quote:"Nuestra recepción respira tranquila ahora.",author:"Dr. Pérez",role:"Director Médico"},status:"published",seo:{metaTitle:"Caso ClÃnica Dental",metaDescription:"Automatización para clÃnicas.",keywords:[]},order:2,features:[]}],Nw=({children:r})=>{const[n,i]=be.useState(null),[l,c]=be.useState([]),[d,f]=be.useState(pc),[m,g]=be.useState(bg),[p,S]=be.useState([]),[y,T]=be.useState([]),[R,N]=be.useState(Cw),[H,Y]=be.useState([]),[$,Q]=be.useState([]),[I,te]=be.useState([]),[Ae,ie]=be.useState([]),[he,Oe]=be.useState(_g),[Xe,qt]=be.useState(!0),Ft=be.useCallback(async()=>{const{data:_}=await ne.from("partners").select("*").order("display_order",{ascending:!0});_&&ie(_)},[]),Le=be.useCallback(_=>{const z=(()=>{let B=_.category;if(!B)return[];if(Array.isArray(B))return B.map(String).filter(Boolean);let K=String(B).trim();if(K.startsWith('"')&&K.endsWith('"')&&(K=K.slice(1,-1),K=K.replace(/\\"/g,'"')),!K.startsWith("["))return K.split(",").map(ue=>
76ue.trim().replace(/^["']|["']$/g,"")).filter(Boolean);try{const ue=JSON.parse(K);if(Array.isArray(ue))return ue.map(String)}catch{}try{const ue=K.replace(/'/g,'"'),P=JSON.parse(ue);if(Array.isArray(P))return P.map(String)}catch{}const V=K.replace(/^\[|\]$/g,"");return V.trim()?V.split(",").map(ue=>ue.trim().replace(/^["']|["']$/g,"").trim()).filter(ue=>ue.length>0):[]})(),U=z.length>0?z[0]:"Blog";return{id:_.id,title:_.title,slug:_.slug,content:_.content||"",excerpt:_.excerpt,coverImage:_.cover_image,category:U,categories:z,author:_.author,date:_.date,scheduledDate:_.scheduled_date,readingTime:_.reading_time,status:_.status,seo:_.seo||{metaTitle:"",metaDescription:"",keywords:[]},seoScore:_.seo_score,faqs:_.faqs}},[]),ot=be.useCallback(_=>({title:_.title,slug:_.slug,content:_.content,excerpt:_.excerpt,cover_image:_.coverImage,category:JSON.stringify(_.categories),author:_.author,date:_.date||null,scheduled_date:_.scheduledDate||null,reading_time:_.readingTime,status:_.status,seo:_.seo,seo_score:_.seoScore,faqs:_.faqs}),[]);be.useEffect(()=>{ne.auth.getSession().then(({data:{session:z}})=>{i(z)});const{data:{subscription:_}}=ne.auth.onAuthStateChange((z,U)=>{i(U)});return()=>_.unsubscribe()},[]);const Lt=be.useCallback(async(_=!1)=>{try{if(!_&&l.length>0&&d.length>0&&he.length>0){console.log("â¡ Skipping redundant fetch (Data already loaded)"),qt(!1);return}const z=ne.from("partners").select("*").order("display_order",{ascending:!0}).then(({data:V})=>{V&&V.length>0&&ie(V)}),U=ne.from("success_stories").select("*").then(({data:V})=>{if(V&&V.length>0){const ue=V.map(P=>({id:P.id,title:P.title,slug:P.slug,clientName:P.client_name,website:P.website,category:P.category,coverImage:P.cover_image,summary:P.summary,challenge:P.challenge,challengeImage:P.challenge_image,solution:P.solution,solutionImage:P.solution_image,whatWeLearned:P.what_we_learned,results:P.results,testimonial:P.testimonial,status:P.status,seo:P.seo,order:P.order,features:P.features}));N(ue.sort((P,X)=>(P.order||0)-(X.order||0)))}});Promise.allSettled([z,U]).then(()=>{}),ne.from("global_settings").select("*").maybeSingle().then(({data:V})=>{var ue,P;V&&g({id:V.id,siteName:V.site_name,siteDescription:V.site_description,logoUrl:V.logo_url||bg.logoUrl,faviconUrl:V.favicon_url,categories:V.categories||[],brandVoicePrompt:V.brand_voice_prompt,contactEmail:V.contact_email,socials:V.socials||{},scripts:V.scripts||{},formWebhooks:V.form_webhooks||{},analyticsId:((ue=V.scripts)==null?void 0:ue.analyticsId)||"",aiSettings:((P=V.scripts)==null?void 0:P.aiSettings)||{provider:"openai",apiKeys:{openai:"",gemini:""}}})});const B=()=>{ne.from("pages").select("*").then(({data:V})=>{if(V){const P=[...V];pc.forEach(X=>{const Ee=P.findIndex(Qe=>Qe.slug===X.slug);Ee>=0?P[Ee]={...P[Ee],isSystem:!0}:P.push(X)}),f(P)}else f(pc)}),ne.from("reviews").select("*").then(({data:V})=>{V&&Y(V)}),ne.from("team_members").select("*").order("order").then(({data:V})=>{V&&Q(V)}),ne.from("redirect_rules").select("*").then(({data:V})=>{V&&te(V)}),ne.from("service_pages").select("*").order("id").then(({data:V})=>{if(V&&V.length>0){const ue=V.map(X=>({id:X.id,slug:X.slug,navTitle:X.nav_title,navSubtitle:X.nav_subtitle||"",title:X.title,subtitle:X.subtitle,heroImage:X.hero_image,painPoints:X.pain_points||[],solutionTitle:X.solution_title,solutionDescription:X.solution_description,features:X.features||[],benefitTitle:X.benefit_title,callToAction:X.call_to_action,seo:X.seo})),P=[..._g];ue.forEach(X=>{const Ee=P.findIndex(Qe=>Qe.slug===X.slug);Ee!==-1?P[Ee]={...P[Ee],...X}:P.push(X)}),Oe(P)}}),ne.from("media_items").select("*").order("date_added",{ascending:!1}).limit(50).then(({data:V})=>{if(V){const ue=V.map(P=>({id:P.id,url:P.url,name:P.name,altText:P.alt_text,type:P.type,dateAdded:P.date_added}));T(ue)}})},{data:{session:K}}=await ne.auth.getSession();try{let V=ne.from("blog_posts").select("*");K?V=V.order("date",{ascending:!1}).limit(12):V=V.eq("status","published").order("date",{ascending:!1}).limit(10),V.then(({data:ue,error:P})=>{if(P){console.warn("Blog posts could not be loaded (Check RLS Policies):",P.message);return}if(ue)try{const X=ue.map(Le);c(X)}catch(X){console.warn("Error mapping posts",X)}})}catch{console.warn("Blog fetch skipped.")}B(),qt(!1)}catch(z){console.error("Error fetching data:",z),qt(!1)}},[n]);be.useEffect(()=>{Lt()},[n]),be.useEffect(()=>{n&&ne.from("post_ideas").select("*").then(({data:_})=>{_&&S(_)})},[n]);const dt=async(_,z="[email protected]")=>{const{error:U}=await ne.auth.signInWithPassword({email:z,password:_});return U?(re.error(U.message),!1):!0},C=async()=>{await ne.auth.signOut()},G=async _=>{const z=ot(_),{data:U,error:B}=await ne.from("blog_posts").insert(z).select().single();if(B){re.error(B.message);return}U&&(c(K=>[...K,Le(U)]),re.success("Post creado correctamente"))},ee=async _=>{const z=ot(_),{error:U}=await ne.from("blog_posts").update(z).eq("id",_.id);if(U){re.error(U.message);return}c(B=>B.map(K=>K.id===_.id?_:K)),re.success("Post actualizado")},_e=async _=>{const{error:z}=await ne.from("blog_posts").delete().eq("id",_);if(z){re.error(z.message);return}c(U=>
76U.filter(B=>B.id!==_)),re.success("Post eliminado")},me=async _=>{const{data:z,error:U}=await ne.from("blog_posts").select("*").ilike("slug",_).maybeSingle();if(U)return console.error("Error fetching single post:",U),null;if(z){const B=Le(z);return c(K=>K.find(V=>V.id===B.id)?K:[...K,B]),B}return null},He=async(_=1,z=10)=>{const U=(_-1)*z,B=U+z-1,{data:K,count:V,error:ue}=await ne.from("blog_posts").select("id, title, slug, status, date, seo_score, author",{count:"exact"}).order("date",{ascending:!1}).range(U,B);return ue?(console.error("Error fetching admin posts:",ue),{posts:[],total:0,error:!0}):{posts:K?K.map(Le):[],total:V||0}},Ce=async()=>{const{data:_,error:z}=await ne.from("media_items").select("*").order("date_added",{ascending:!1}).limit(1e3);return z?(console.error("Error fetching admin media:",z),[]):_?_.map(U=>({id:U.id,url:U.url,name:U.name,altText:U.alt_text,type:U.type,dateAdded:U.date_added})):[]},J=_=>{const z=B=>B.toLowerCase().replace(/^\/+|\/+$/g,"").replace(/^blog\//,"").trim(),U=z(_);return l.find(B=>z(B.slug)===U)},ce=async _=>{var U;const z=J(_);if(z){const{data:B,error:K}=await ne.from("blog_posts").select("content, faqs, seo").eq("id",z.id).single();!K&&B?(console.log(`â
Post Content Loaded for ${_}:`,{faqs:(U=B.faqs)==null?void 0:U.length}),c(V=>V.map(ue=>ue.id===z.id?{...ue,content:B.content,faqs:B.faqs||[],seo:B.seo||ue.seo}:ue))):console.error("â Failed to fetch detailed post content:",K)}},we=async _=>{const{id:z,...U}=_,{data:B,error:K}=await ne.from("pages").insert(U).select().single();if(K){re.error(K.message);return}B&&(f(V=>[...V,B]),re.success("Página creada"))},Ie=async _=>{try{const z=!_.id||_.id.startsWith("sys-")||_.id.includes("Date"),U={title:_.title,slug:_.slug,status:_.status||"published",seo:_.seo,isSystem:_.isSystem};if(_.content!==void 0&&(U.content=_.content),_.id&&!_.id.startsWith("sys-")){const{error:B}=await ne.from("pages").update(U).eq("id",_.id);if(B)throw B}else{U.content===void 0&&(U.content="");const{data:B,error:K}=await ne.from("pages").insert(U).select().single();if(K)throw K;B&&(_.id=B.id)}f(B=>B.find(V=>V.id===_.id)?B.map(V=>V.id===_.id?{...V,..._}:V):[...B,_]),re.success("Página guardada correctamente")}catch(z){console.error("Critical Save Error:",z),z.message==="Failed to fetch"?re.error("Error de conexión (posible exceso de tamaño). Intenta guardar sin cambiar el contenido principal."):re.error(`Error al guardar: ${z.message}`)}},Ht=async _=>{const{error:z}=await ne.from("pages").delete().eq("id",_);if(z){re.error(z.message);return}f(U=>U.filter(B=>B.id!==_)),re.success("Página eliminada")},je=_=>{const z=B=>B.toLowerCase().replace(/^\/+|\/+$/g,"").trim(),U=z(_);return d.find(B=>z(B.slug)===U)},Et=async _=>{const{id:z,...U}=_,B={title:U.title,slug:U.slug,client_name:U.clientName,website:U.website,category:U.category,cover_image:U.coverImage,summary:U.summary,challenge:U.challenge,challenge_image:U.challengeImage,solution:U.solution,solution_image:U.solutionImage,what_we_learned:U.whatWeLearned,results:U.results,testimonial:U.testimonial,status:U.status,seo:U.seo,order:U.order,features:U.features},{data:K,error:V}=await ne.from("success_stories").insert(B).select().single();return V?(re.error(V.message),!1):K?(N(ue=>[...ue,{..._,id:K.id}]),re.success("Caso de éxito añadido"),!0):!1},Sa=async _=>{const z={title:_.title,slug:_.slug,client_name:_.clientName,website:_.website,category:_.category,cover_image:_.coverImage,summary:_.summary,challenge:_.challenge,challenge_image:_.challengeImage,solution:_.solution,solution_image:_.solutionImage,what_we_learned:_.whatWeLearned,results:_.results,testimonial:_.testimonial,status:_.status,seo:_.seo,order:_.order,features:_.features},{error:U}=await ne.from("success_stories").update(z).eq("id",_.id);return U?(re.error(U.message),!1):(N(B=>B.map(K=>K.id===_.id?_:K)),re.success("Caso de éxito actualizado"),!0)},fa=async _=>{const{error:z}=await ne.from("success_stories").delete().eq("id",_);if(z){re.error(z.message);return}N(U=>U.filter(B=>B.id!==_)),re.success("Caso de éxito eliminado")},ea=_=>{const z=B=>B.toLowerCase().replace(/^\/+|\/+$/g,"").trim(),U=z(_);return R.find(B=>z(B.slug)===U)},rs=async _=>{const{data:z,error:U}=await ne.from("success_stories").select("*").eq("slug",_).single();if(U||!z)return null;const B={id:z.id,title:z.title,slug:z.slug,clientName:z.client_name,website:z.website,category:z.category,coverImage:z.cover_image,summary:z.summary,challenge:z.challenge,challengeImage:z.challenge_image,solution:z.solution,solutionImage:z.solution_image,whatWeLearned:z.
76what_we_learned,results:z.results,testimonial:z.testimonial,status:z.status,seo:z.seo,order:z.order,features:z.features};return N(K=>{const V=K.findIndex(ue=>ue.id===B.id);if(V>=0){const ue=[...K];return ue[V]=B,ue}else return[...K,B]}),B},$t=async _=>{const{id:z,...U}=_,{data:B,error:K}=await ne.from("reviews").insert(U).select().single();if(K){re.error(K.message);return}B&&(Y(V=>[...V,B]),re.success("Reseña añadida"))},Cn=async _=>{const{error:z}=await ne.from("reviews").update(_).eq("id",_.id);if(z){re.error(z.message);return}Y(U=>U.map(B=>B.id===_.id?_:B)),re.success("Reseña actualizada")},tn=async _=>{const{error:z}=await ne.from("reviews").delete().eq("id",_);if(z){re.error(z.message);return}Y(U=>U.filter(B=>B.id!==_)),re.success("Reseña eliminada")},Ca=async _=>{const{id:z,...U}=_,{data:B,error:K}=await ne.from("team_members").insert(U).select().single();if(K){re.error(K.message);return}B&&(Q(V=>[...V,B]),re.success("Miembro añadido"))},Nn=async _=>{const{error:z}=await ne.from("team_members").update(_).eq("id",_.id);if(z){re.error(z.message);return}Q(U=>U.map(B=>B.id===_.id?_:B)),re.success("Miembro actualizado")},Tt=async _=>{const{error:z}=await ne.from("team_members").delete().eq("id",_);if(z){re.error(z.message);return}Q(U=>U.filter(B=>B.id!==_)),re.success("Miembro eliminado")},Dn=async _=>{const z={..._.scripts,analyticsId:_.analyticsId,aiSettings:_.aiSettings},U={site_name:_.siteName,site_description:_.siteDescription,logo_url:_.logoUrl,favicon_url:_.faviconUrl,categories:_.categories,brand_voice_prompt:_.brandVoicePrompt,contact_email:_.contactEmail,socials:_.socials,scripts:z,form_webhooks:_.formWebhooks},{error:B}=await ne.from("global_settings").update(U).eq("id",_.id||m.id);if(B){re.error(B.message);return}g(_),re.success("Configuración guardada")},zn=async _=>{const z=_.map(({id:K,...V})=>V),{data:U,error:B}=await ne.from("post_ideas").insert(z).select();if(B){re.error(B.message);return}U&&(S(K=>[...K,...U]),re.success(`${U.length} ideas añadidas`))},ft=async(_,z)=>{const{error:U}=await ne.from("post_ideas").update({status:z}).eq("id",_);U&&console.error(U),S(B=>B.map(K=>K.id===_?{...K,status:z}:K))},Ea=async _=>{const{error:z}=await ne.from("post_ideas").delete().eq("id",_);if(z){re.error(z.message);return}S(U=>U.filter(B=>B.id!==_)),re.success("Idea eliminada")},ht=async _=>{},oi=()=>{},Na=()=>{},ls=()=>{},Da=async _=>{const z={url:_.url,name:_.name,alt_text:_.altText,type:_.type},{data:U,error:B}=await ne.from("media_items").insert(z).select().single();if(B){re.error(B.message);return}U&&T(K=>[{..._,id:U.id,dateAdded:U.date_added},...K])},Un=async _=>{const{error:z}=await ne.from("media_items").update({url:_.url,name:_.name,alt_text:_.altText,type:_.type}).eq("id",_.id);if(z){re.error(z.message);return}T(U=>U.map(B=>B.id===_.id?_:B))},ha=async _=>{const{error:z}=await ne.from("media_items").delete().eq("id",_);if(z){re.error(z.message);return}T(U=>U.filter(B=>B.id!==_)),re.success("Media eliminada")},os=async _=>{const{id:z,...U}=_,{data:B,error:K}=await ne.from("redirect_rules").insert(U).select().single();if(K){re.error(K.message);return}B&&(te(V=>[...V,B]),re.success("Redirección creada"))},Ta=async _=>{const{error:z}=await ne.from("redirect_rules").delete().eq("id",_);if(z){re.error(z.message);return}te(U=>U.filter(B=>B.id!==_)),re.success("Redirección eliminada")},za=()=>{const _="https://funneltropia.com";let z=`<?xml version="1.0" encoding="UTF-8"?> 77 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">`;return z+=` 78 <url><loc>${_}/</loc><priority>1.0</priority></url> 79 <url><loc>${_}/contacto</loc><priority>0.8</priority></url> 80 <url><loc>${_}/equipo</loc><priority>0.8</priority></url> 81 <url><loc>${_}/casos-de-exito</loc><priority>0.8</priority></url> 82 <url><loc>${_}/blog</loc><priority>0.8</priority></url>`,he.forEach(U=>{const B=U.slug.startsWith("/")?U.slug:`/servicio/${U.slug}`;z+=` 83 <url><loc>${_}${B}</loc><priority>0.9</priority></url>`}),l.filter(U=>U.status==="published").forEach(U=>{z+=` 84 <url><loc>${_}/${U.slug}</loc><priority>0.7</priority></url>`}),R.filter(U=>U.status==="published").forEach(U=>{z+=` 85 <url><loc>${_}/${U.slug}</loc><priority>0.7</priority></url>`}),z+=` 86 </urlset>`,z},mt=async _=>{try{const z={slug:_.slug,nav_title:_.navTitle,title:_.title,subtitle:_.subtitle,hero_image:_.heroImage,pain_points:_.painPoints,solution_title:_.solutionTitle,solution_description:_.solutionDescription,features:_.features,benefit_title:_.benefitTitle,call_to_action:_.callToAction,seo:_.seo};console.log("Saving Service Page Payload:",z);const{data:U,error:B}=await ne.from("service_pages").select("id").eq("slug",_.slug).single();if(B&&B.code!=="PGRST116")throw B;if(U){const{error:K}=await ne.from("service_pages").update(z).eq("id",U.id);if(K)throw K;re.success("Página actualizada")}else{const{error:K}=await ne.from("service_pages").insert(z);if(K)throw K;re.success("Página creada en DB")}Oe(K=>K.map(V=>V.slug===_.slug?_:V))}catch(z){console.error("Error updating Service Page:",z),z.message==="Failed to fetch"?re.error("Error de conexión (Network Error). Verifica tu internet o si la carga es muy pesada."):re.error(`Error al guardar: ${z.message||z}`)}},Vt=be.useCallback(async({page:_=1,limit:z=12,search:U="",category:B=""})=>{let K=ne.from("blog_posts").select("*").eq("status","published").order("date",{ascending:!1});U&&(K=K.or(`title.ilike.%${U}%,excerpt.ilike.%${U}%`)),B&&B!=="Todos"&&(K=K.ilike("category",`%${B}%`));const V=(_-1)*z,ue=V+z-1,{data:P,error:X}=await K.range(V,ue),Ee=0;if(X)throw X;return{posts:P?P.map(Le):[],total:Ee||0}},[Le]);return b.jsx(ep.Provider,{value:{posts:l,pages:d,settings:m,ideas:p,media:y,successStories:R,reviews:H,teamMembers:$,redirects:I,partners:Ae,landingServices:he,loading:Xe,isAuthenticated:!!n,login:dt,logout:C,addPost:G,updatePost:ee,deletePost:_e,getPostBySlug:J,addPage:we,updatePage:Ie,deletePage:Ht,getPageBySlug:je,addSuccessStory:Et,updateSuccessStory:Sa,deleteSuccessStory:fa,getSuccessStoryBySlug:ea,addReview:$t,updateReview:Cn,deleteReview:tn,addTeamMember:Ca,updateTeamMember:Nn,deleteTeamMember:Tt,updateSettings:Dn,addIdeas:zn,updateIdeaStatus:ft,deleteIdea:Ea,generatePostFromIdea:ht,addUser:oi,deleteUser:Na,updateUser:ls,users:[],addMedia:Da,updateMedia:Un,deleteMedia:ha,fetchPostContent:ce,addRedirect:os,deleteRedirect:Ta,generateSitemapXML:za,refreshPartners:Ft,updateServicePage:mt,refresh:Lt,fetchBlogPosts:Vt,fetchPostBySlug:me,fetchSuccessStoryBySlug:rs,fetchAdminPosts:He,fetchAdminMedia:Ce},children:r})},fr=()=>{const r=be.useContext(ep);if(!r)throw new Error("useContent must be used within a ContentProvider");return r},Dw=()=>{const[r,n]=be.useState(!1),[i,l]=be.useState(!1),c=Ml(),{settings:d,landingServices:f}=fr(),m=p=>p.includes("chatbots")?b.jsx(Og,{className:"w-4 h-4 text-teal-500"}):p.includes("activecampaign")?b.jsx(yc,{className:"w-4 h-4 text-blue-500"}):p.includes("email-marketing")?b.jsx(jg,{className:"w-4 h-4 text-purple-500"}):p.includes("automatizacion-contable")?b.jsx(xv,{className:"w-4 h-4 text-emerald-500"}):p.includes("crm")?b.jsx(Av,{className:"w-4 h-4 text-orange-500"}):p.includes("marketing-automation")?b.jsx(Ov,{className:"w-4 h-4 text-green-500"}):p.includes("soluciones-ia")?b.jsx(jv,{className:"w-4 h-4 text-indigo-500"}):b.jsx(yc,{className:"w-4 h-4"}),g=p=>p==="agencia-de-email-marketing"?`/${p}`:`/servicio/${p.replace(/^\//,"")}`;return b.jsxs("nav",{className:"sticky top-0 z-50 bg-white/90 backdrop-blur-md border-b border-slate-100 shadow-sm",children:[b.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:b.jsxs("div",{className:"flex justify-between h-20",children:[b.jsx("div",{className:"flex-shrink-0 flex items-center",children:b.jsx(st,{to:"/",children:b.jsx("img",{src:d.logoUrl||"https://nuwonsxgzzgfdbrilwgs.supabase.co/storage/v1/object/public/media/1766054411457.png",alt:d.siteName,width:"150",height:"40",className:`h-10 w-auto transition-all duration-500 ${i?"opacity-100 blur-0":"opacity-0 blur-sm"}`,onLoad:()=>l(!0),onError:p=>{const S=p.target;S.src!=="https://nuwonsxgzzgfdbrilwgs.supabase.co/storage/v1/object/public/media/1766054411457.png"&&(S.src="https://nuwonsxgzzgfdbrilwgs.supabase.co/storage/v1/object/public/media/1766054411457.png"),l(!0)}})})}),b.jsxs("div",{className:"hidden md:flex md:items-center md:space-x-8",children:[b.jsx(st,{to:"/",className:"text-sm font-medium text-slate-600 hover:text-teal-600 transition-colors",children:"Home"}),b.jsxs("div",{className:"relative group",children:[b.jsxs("button",{className:"inline-flex items-center text-sm font-medium text-slate-600 hover:text-teal-600 transition-colors cursor-pointer py-2",children:["Servicios",b.jsx(Sv,{className:"ml-1 h-4 w-4"})]}),b.jsxs("div",{className:"absolute left-1/2 -translate-x-1/2 mt-0 w-[600px] rounded-2xl shadow-xl bg-white ring-1 ring-black ring-opacity-5 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 transform z-50 top-full p-2 border border-slate-100",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.map(p=>b.jsxs(st,{to:g(p.slug),className:"block px-4 py-3 rounded-xl hover:bg-slate-50 transition-colors group/item",children:[b.jsxs("div",{className:"flex items-center mb-1",children:[b.jsx("div",{className:"mr-3 bg-slate-100 p-1.5 rounded-lg group-hover/item:bg-white group-hover/item:shadow-sm transition-all",children:m(p.slug)}),b.jsx("span",{className:"text-sm font-bold text-slate-800 group-hover/item:text-teal-600",children:p.navTitle})]}),b.jsx("p",{className:"text-xs text-slate-500 pl-10 leading-tight",children:p.navSubtitle||"Soluciones especializadas para escalar."})]}
86,p.id)),b.jsxs(st,{to:"/servicio/marca-blanca-agencias-freelance",className:"block px-4 py-3 rounded-xl hover:bg-slate-50 transition-colors group/item",children:[b.jsxs("div",{className:"flex items-center mb-1",children:[b.jsxs("div",{className:"mr-3 bg-slate-100 p-1.5 rounded-lg group-hover/item:bg-white group-hover/item:shadow-sm transition-all",children:[m("soluciones-ia")," "]}),b.jsx("span",{className:"text-sm font-bold text-slate-800 group-hover/item:text-teal-600",children:"Marca Blanca (Agencias)"})]}),b.jsx("p",{className:"text-xs text-slate-500 pl-10 leading-tight",children:"Soluciones invisibles para agencias."})]})]}),b.jsx("div",{className:"bg-slate-50 -m-2 mt-2 p-3 text-center rounded-b-xl border-t border-slate-100",children:b.jsx(st,{to:"/contacto",className:"text-xs font-bold text-teal-600 hover:underline",children:"¿No encuentras lo que buscas? Contáctanos â"})})]})]}),b.jsx(st,{to:"/equipo",className:`text-sm font-medium transition-colors ${c.pathname==="/equipo"?"text-teal-600 font-bold":"text-slate-600 hover:text-teal-600"}`,children:"Equipo"}),b.jsx(st,{to:"/casos-de-exito",className:`text-sm font-medium transition-colors ${c.pathname.includes("/casos")?"text-teal-600 font-bold":"text-slate-600 hover:text-teal-600"}`,children:"Portafolio"}),b.jsx(st,{to:"/contacto",className:`text-sm font-medium transition-colors ${c.pathname==="/contacto"?"text-teal-600 font-bold":"text-slate-600 hover:text-teal-600"}`,children:"Contacto"})]}),b.jsx("div",{className:"flex items-center md:hidden",children:b.jsxs("button",{onClick:()=>n(!r),"aria-label":"Abrir menú principal",className:"inline-flex items-center justify-center p-2 rounded-md text-slate-400 hover:text-slate-500 hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500",children:[b.jsx("span",{className:"sr-only",children:"Open main menu"}),r?b.jsx(Ev,{className:"block h-6 w-6"}):b.jsx(Tv,{className:"block h-6 w-6"})]})})]})}),r&&b.jsx("div",{className:"md:hidden bg-white border-b border-slate-100 max-h-[90vh] overflow-y-auto",children:b.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1 sm:px-3 flex flex-col",children:[b.jsx(st,{to:"/",onClick:()=>n(!1),className:"block px-3 py-2 rounded-md text-base font-medium text-slate-700 hover:text-teal-600 hover:bg-slate-50",children:"Home"}),b.jsxs("div",{className:"space-y-1 pl-4 border-l-2 border-slate-100 my-1",children:[b.jsx("span",{className:"block px-3 py-2 text-xs font-bold text-slate-400 uppercase",children:"Servicios"}),f.map(p=>b.jsx(st,{to:g(p.slug),onClick:()=>n(!1),className:"block px-3 py-2 rounded-md text-sm font-medium text-slate-700 hover:text-teal-600 hover:bg-slate-50",children:p.navTitle},p.id)),b.jsx(st,{to:"/servicio/marca-blanca-agencias-freelance",className:"block px-3 py-2 rounded-md text-sm font-medium text-slate-700 hover:text-teal-600 hover:bg-slate-50",onClick:()=>n(!1),children:"Marca Blanca (Agencias)"})]}),b.jsx(st,{to:"/equipo",onClick:()=>n(!1),className:"block px-3 py-2 rounded-md text-base font-medium text-slate-700 hover:text-teal-600 hover:bg-slate-50",children:"Equipo"}),b.jsx(st,{to:"/casos-de-exito",onClick:()=>n(!1),className:"block px-3 py-2 rounded-md text-base font-medium text-slate-700 hover:text-teal-600 hover:bg-slate-50",children:"Portafolio"}),b.jsx(st,{to:"/contacto",onClick:()=>n(!1),className:"block px-3 py-2 rounded-md text-base font-medium text-teal-600 bg-teal-50 hover:bg-teal-100",children:"Contacto"})]})})]})},zw=()=>{var n,i,l,c;const{settings:r}=fr();return b.jsx("footer",{className:"bg-white border-t border-slate-200 pt-16 pb-8",children:b.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[b.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center mb-12",children:[b.jsxs("div",{className:"mb-8 md:mb-0 max-w-xs",children:[b.jsx("img",{src:r.logoUrl||"https://www.funneltropia.com/wp-content/uploads/2025/12/LOGOTIPO-FUNNELTROPIA-3.png",alt:r.siteName,width:"120",height:"20",className:"h-5 mb-6 transition-opacity duration-300 opacity-0",onLoad:d=>d.currentTarget.classList.remove("opacity-0")}),b.jsx("h3",{className:"text-xl font-bold text-slate-900 leading-tight",children:r.siteDescription||"El motor invisible que escala tu negocio"}),b.jsx("div",{className:"h-1 w-12 bg-teal-500 mt-4 rounded-full"})]}),b.jsxs("div",{className:"text-left md:text-right",children:[b.jsx("h4",{className:"text-lg font-bold text-slate-900 mb-4",children:"Contáctanos"}),b.jsxs("ul",{className:"space-y-3",children:[b.jsxs("li",{className:"flex items-center md:justify-end text-slate-600 hover:text-teal-600 transition-colors",children:[b.jsx(Rv,{className:"h-4 w-4 mr-2"}),b.jsx("span",{children:"919 932 170"})]}),b.jsxs("li",{className:"flex items-center md:justify-end text-slate-600 hover:text-teal-600 transition-colors",children:[b.jsx(jg,{className:"h-4 w-4 mr-2"}),b.jsx("a",{href:`mailto:${r.contactEmail||"[email protected]"}`,children:r.contactEmail||"[email protected]"})]}),b.jsxs("li",{className:"flex items-center md:justify-end text-slate-600",children:[b.jsx(Cv,{className:"h-4 w-4 mr-2"}),b.jsx("span",{children:"Madrid, España"})]})]})]})]}),b.jsx("hr",{className:"border-slate-100 mb-8"}),b.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center",children:[b.jsxs("div",{className:"flex space-x-6 mb-4 md:mb-0",children:[((n=r.socials)==null?void 0:n.facebook)&&b.jsx("a",{href:r.socials.facebook,target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"text-slate-400 hover:text-teal-600 transition-colors",children:b.jsx(Nv,{className:"h-6 w-6"})}),((i=r.socials)==null?void 0:i.instagram)&&b.jsx("a",{href:r.socials.instagram,target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"text-slate-400 hover:text-teal-600 transition-colors",children:b.jsx(Dv,{className:"h-6 w-6"})}),((l=r.socials)==null?void 0:l.linkedin)&&b.jsx("a",{href:r.socials.linkedin,target:"_blank",rel:"noopener noreferrer","aria-label":"LinkedIn",className:"text-slate-400 hover:text-teal-600 transition-colors",children:b.jsx(zv,{className:"h-6 w-6"})}),((c=r.socials)==null?void 0:c.twitter)&&b.jsx("a",{href:r.socials.twitter,target:"_blank",rel:"noopener noreferrer","aria-label":"Twitter",className:"text-slate-400 hover:text-teal-600 transition-colors",children:b.jsx(Uv,{className:"h-6 w-6"})})]}),b.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-2 text-sm text-slate-500 justify-center md:justify-end",children:[b.jsx(st,{to:"/blog",className:"hover:text-slate-900 transition-colors font-medium",children:"Blog"}),b.jsx(st,{to:"/aviso-legal",className:"hover:text-slate-900 transition-colors",children:"Aviso legal"}
86),b.jsx(st,{to:"/politica-de-cookies",className:"hover:text-slate-900 transition-colors",children:"PolÃtica de Privacidad y Cookies"})]})]}),b.jsx("div",{className:"mt-8 text-center text-xs text-slate-300 flex flex-col items-center gap-2",children:b.jsxs("p",{children:["© ",new Date().getFullYear()," Funneltropia S.L."]})})]})})},Uw=()=>{const[r,n]=be.useState(!1);be.useEffect(()=>{localStorage.getItem("funneltropia_cookie_consent")||n(!0)},[]);const i=()=>{localStorage.setItem("funneltropia_cookie_consent","accepted"),n(!1)},l=()=>{localStorage.setItem("funneltropia_cookie_consent","declined"),n(!1)};return r?b.jsx("div",{className:"fixed bottom-0 left-0 w-full bg-slate-900 text-white z-50 p-4 shadow-lg animate-float-up border-t border-slate-700",children:b.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4",children:[b.jsx("div",{className:"text-sm text-slate-300",children:b.jsxs("p",{children:["Usamos cookies propias y de terceros para analizar nuestros servicios y mostrarte publicidad relacionada con tus preferencias. Puedes obtener más información en nuestra ",b.jsx("a",{href:"/politica-de-cookies",className:"text-teal-400 hover:underline",children:"PolÃtica de Cookies"}),"."]})}),b.jsxs("div",{className:"flex gap-4 flex-shrink-0",children:[b.jsx("button",{onClick:l,className:"text-sm text-slate-400 hover:text-white underline",children:"Rechazar"}),b.jsx("button",{onClick:i,className:"bg-teal-500 text-slate-900 px-6 py-2 rounded-full text-sm font-bold hover:bg-teal-400 transition-colors",children:"Aceptar Todo"})]})]})}):null},kw=({html:r})=>{const n=be.useRef(null);return be.useEffect(()=>{if(!n.current)return;const i=setTimeout(()=>{if(!n.current)return;n.current.innerHTML=r,n.current.querySelectorAll("script").forEach(c=>{var d;if(c.src){if(document.querySelector(`script[src="${c.src}"]`)){console.log(`Script already loaded: ${c.src}`);return}const f=document.createElement("script");Array.from(c.attributes).forEach(m=>{f.setAttribute(m.name,m.value)}),document.body.appendChild(f)}else{const f=document.createElement("script");Array.from(c.attributes).forEach(m=>{f.setAttribute(m.name,m.value)}),f.appendChild(document.createTextNode(c.innerHTML)),(d=c.parentNode)==null||d.replaceChild(f,c)}})},2500);return()=>clearTimeout(i)},[r]),b.jsx("div",{ref:n})},Mw=()=>b.jsxs("div",{className:"relative overflow-hidden bg-slate-50 pt-12 pb-20 lg:pt-20 lg:pb-28 rounded-b-[3rem] shadow-sm z-0",children:[b.jsx("div",{className:"absolute top-0 right-0 -mr-20 -mt-20 w-96 h-96 rounded-full bg-teal-100 opacity-50 blur-3xl z-0 pointer-events-none"}),b.jsx("div",{className:"absolute bottom-0 left-0 -ml-20 -mb-20 w-96 h-96 rounded-full bg-blue-100 opacity-50 blur-3xl z-0 pointer-events-none"}),b.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-purple-100 rounded-full mix-blend-multiply filter blur-3xl op
86acity-30 animate-float z-0 pointer-events-none"}),b.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 z-10",children:b.jsxs("div",{className:"lg:grid lg:grid-cols-12 lg:gap-16 items-center",children:[b.jsxs("div",{className:"lg:col-span-6 text-center lg:text-left mb-12 lg:mb-0 relative",children:[b.jsx("span",{className:"inline-block py-1 px-3 rounded-full bg-teal-100 text-teal-700 text-xs font-semibold tracking-wider uppercase mb-6",children:"Agencia de Automatización & IA"}),b.jsxs("h1",{className:"text-4xl tracking-tight font-extrabold text-slate-900 sm:text-5xl md:text-6xl mb-6 leading-tight",children:["Automatizamos negocios con ",b.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-teal-600 to-blue-600",children:"IA"})," para que vendan más."]}),b.jsx("p",{className:"mt-4 text-xl text-slate-600 mb-8 leading-relaxed max-w-2xl mx-auto lg:mx-0",children:"Diseñamos sistemas de automatización, aplicaciones a medida y soluciones con IA que optimizan procesos, conectan herramientas y convierten la tecnologÃa en resultados reales."}),b.jsxs("div",{className:"flex flex-col sm:flex-row justify-center lg:justify-start gap-4",children:[b.jsxs(st,{to:"/contacto",className:"inline-flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-full text-white bg-slate-900 hover:bg-slate-800 md:py-4 md:text-lg md:px-10 transition-all hover:-translate-y-1 shadow-lg hover:shadow-xl z-20 relative gap-2",children:[b.jsx(kv,{className:"w-5 h-5"})," Hablar con un especialista"]}),b.jsxs(st,{to:"/casos-de-exito",className:"inline-flex items-center justify-center px-8 py-3 border border-slate-300 text-base font-medium rounded-full text-slate-700 bg-white hover:bg-slate-50 md:py-4 md:text-lg md:px-10 transition-colors shadow-sm z-20 relative gap-2",children:["Ver soluciones ",b.jsx(Mv,{className:"w-5 h-5"})]})]})]}),b.jsxs("div",{className:"lg:col-span-6 relative perspective-1000",children:[b.jsxs("div",{className:"relative w-full max-w-lg mx-auto lg:max-w-none h-[400px] lg:h-[500px] flex items-center justify-center",children:[b.jsxs("div",{className:"absolute top-4 right-0 lg:-right-6 w-3/4 h-3/4 bg-white rounded-xl shadow-2xl border border-slate-200 p-4 transform rotate-6 hover:rotate-3 transition-transform duration-700 ease-out z-10 overflow-hidden",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-4 border-b border-slate-100 pb-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full bg-red-400"}),b.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-400"}),b.jsx("div",{className:"w-3 h-3 rounded-full bg-green-400"})]}),b.jsxs("div",{className:"flex gap-4",children:[b.jsxs("div",{className:"w-1/4 space-y-2",children:[b.jsx("div",{className:"h-2 bg-slate-100 rounded w-full"}),b.jsx("div",{className:"h-2 bg-slate-100 rounded w-3/4"}),b.jsx("div",{className:"h-2 bg-slate-100 rounded w-5/6"})]}),b.jsxs("div",{className:"w-3/4 space-y-4",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsx("div",{className:"h-8 w-8 bg-teal-100 rounded-full flex items-center justify-center",children:b.jsx(Bv,{className:"w-4 h-4 text-teal-600"})}),b.jsx("div",{className:"h-8 w-24 bg-slate-50 rounded"})]}),b.jsx("div",{className:"h-32 bg-slate-50 rounded-lg flex items-end justify-between p-2 gap-1",children:[40,60,45,70,50,80,65].map((r,n)=>b.jsx("div",{className:"w-full bg-teal-200 rounded-t",style:{height:`${r}%`}},n))})]})]})]}),b.jsxs("div",{className:"absolute bottom-6 left-0 lg:-left-4 w-3/4 h-3/4 bg-white rounded-xl shadow-2xl border border-slate-100 p-6 flex flex-col transform -rotate-3 hover:rotate-0 transition-transform duration-700 ease-out z-20 animate-float",children:[b.jsxs("div",{className:"flex justify-between items-center mb-0 mt-4",children:[b.jsxs("div",{className:"text-slate-900 font-bold text-lg flex items-center gap-2",children:[b.jsx(yc,{className:"w-5 h-5 text-teal-500"})," AutoFlow"]}),b.jsx("div",{className:"text-xs text-slate-500 px-2 py-1 bg-slate-100 rounded",children:"v2.4 Connected"})]}),b.jsxs("div",{className:"space-y-4 my-auto h-full flex flex-col justify-center",children:[b.jsxs("div",{className:"bg-slate-50 p-2.5 rounded-lg flex items-center justify-between border border-slate-100",children:[b.jsx("span",{className:"text-slate-600 text-sm",children:"Lead Cualificado"}),b.jsx("span",{className:"text-green-600 text-xs font-bold",children:"+24%"})]}),b.jsxs("div",{className:"bg-slate-50 p-2.5 rounded-lg flex items-center justify-between border border-slate-100",children:[b.jsx("span",{className:"text-slate-600 text-sm",children:"Ventas Realizadas"}),b.jsx("span",{className:"text-green-600 text-xs font-bold",children:"+15%"})]}),b.jsxs("div",{className:"bg-slate-50 p-2.5 rounded-lg flex items-center justify-between border border-slate-100",children:[b.jsx("span",{className:"text-slate-600 text-sm",children:"Facturas Enviadas"}),b.jsx("span",{className:"text-blue-600 text-xs font-bold",children:"850"})]}),b.jsxs("div",{className:"bg-slate-50 p-2.5 rounded-lg flex items-center justify-between border border-slate-100",children:[b.jsx("span",{className:"text-slate-600 text-sm",children:"Tiempo Ahorrado"}),b.jsx("span",{className:"text-blue-600 text-xs font-bold",children:"142h"})]})]})]}),b.jsxs("div",{className:"absolute -bottom-6 left-1/2 -translate-x-1/2 bg-white p-2 pr-4 rounded-full shadow-md border border-slate-100 z-30 flex items-center gap-2 animate-[float_4s_ease-in-out_infinite_1.5s]",children:[b.jsx("div",{className:"bg-green-100 p-1.5 rounded-full",children:b.jsx(qv,{className:"w-4 h-4 text-green-600"})}),b.jsx("span",{className:"text-xs font-bold text-slate-600",children:"Venta Realizada"})]}),b.jsxs("div",{className:"absolute top-16 left-4 bg-white p-3 rounded-lg shadow-xl border border-slate-100 z-30 animate-[float_4s_ease-in-out_infinite_1s] flex items-center gap-3",children:[b.jsx("div",{className:"h-8 w-8 bg-green-100 rounded-full flex items-center justify-center",children:b.jsx(Lv,{className:"w-5 h-5 text-green-600"})}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs font-bold text-slate-800",children:"Tarea Completada"}),b.jsx("div",{className:"text-[10px] text-slate-500",children:"Sincronización finalizada"})]})]}),b.jsxs("div",{className:"absolute bottom-24 -right-4 bg-white p-3 rounded-lg shadow-xl border border-slate-100 z-30 animate-[float_5s_ease-in-out_infinite_2s] max-w-[150px]",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b.jsx("div",{className:"h-6 w-6 bg-blue-100 rounded-full flex items-center justify-center",children:b.jsx(Og,{className:"w-3 h-3 text-blue-600"})}),b.jsx("div",{className:"text-[10px] font-bold text-slate-700",children:"AI Assistant"})]}),b.jsx("div",{className:"text-[10px] text-slate-500 leading-tight",children:"Nuevo cliente registrado en CRM. Correo enviado."})]})]}),b.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[80%] h-[80%
86] bg-teal-400/20 filter blur-[100px] -z-10 rounded-full pointer-events-none"})]})]})})]}),Bw=({pageId:r,data:n,forceTitle:i,canonicalUrl:l})=>{const{pages:c,landingServices:d,settings:f}=fr(),m=Ml();let g=i||f.siteName,p=f.siteDescription,S=f.logoUrl||"https://funneltropia.com/wp-content/uploads/2025/12/LOGOTIPO-FUNNELTROPIA-3.png",y=typeof window<"u"?window.location.href:`https://funneltropia.com${m.pathname}`;if(r){const R=c.find(H=>H.slug===r||r==="home"&&H.slug==="");R&&R.seo&&(g=R.seo.metaTitle||g,p=R.seo.metaDescription||p,R.seo.ogImage&&(S=R.seo.ogImage));const N=d.find(H=>H.id===r||H.slug===r);N&&N.seo&&(g=N.seo.metaTitle||N.title,p=N.seo.metaDescription||N.subtitle,N.seo.ogImage&&(S=N.seo.ogImage))}n&&(g=n.metaTitle||g,p=n.metaDescription||p,n.ogImage&&(S=n.ogImage)),g&&!g.includes("Funneltropia")&&(g=`${g} | Funneltropia`);const T=l||(typeof window<"u"?window.location.origin+window.location.pathname:y.split("?")[0]);return b.jsxs(Mg,{children:[b.jsx("title",{children:g}),b.jsx("meta",{name:"title",content:g}),b.jsx("meta",{name:"description",content:p}),b.jsx("meta",{property:"og:type",content:"website"}),b.jsx("meta",{property:"og:url",content:y}),b.jsx("meta",{property:"og:title",content:g}),b.jsx("meta",{property:"og:description",content:p}),b.jsx("meta",{property:"og:image",content:S}),b.jsx("meta",{property:"twitter:card",content:"summary_large_image"}),b.jsx("meta",{property:"twitter:url",content:y}),b.jsx("meta",{property:"twitter:title",content:g}),b.jsx("meta",{property:"twitter:description",content:p}),b.jsx("meta",{property:"twitter:image",content:S}),b.jsx("link",{rel:"canonical",href:T})]})},qw=M.lazy(()=>Ne(()=>import("./Partners-B4SdNNQt.js"),__vite__mapDeps([0,1,2]))),Lw=M.lazy(()=>Ne(()=>import("./About-3U-V1Z5i.js"),__vite__mapDeps([3,2,1]))),Hw=M.lazy(()=>Ne(()=>import("./Services-CniFh0JV.js"),__vite__mapDeps([4,1,2]))),$w=M.lazy(()=>Ne(()=>import("./Portfolio-CsjR9HZH.js"),__vite__mapDeps([5,1,2]))),Vw=M.lazy(()=>Ne(()=>import("./Differentiator-DV8raBZz.js"),__vite__mapDeps([6,2,1]))),Gw=M.lazy(()=>Ne(()=>import("./Audience-ruH1XGd5.js"),__vite__mapDeps([7,2,1]))),Iw=M.lazy(()=>Ne(()=>import("./Media-CcIzKNCA.js"),__vite__mapDeps([8,1,2]))),Yw=M.lazy(()=>Ne(()=>import("./Results-BotyKUSO.js"),__vite__mapDeps([9,1,2]))),Kw=()=>b.jsx("div",{className:"w-full h-32 bg-transparent"}),Xw=()=>b.jsxs("div",{className:"bg-slate-50",children:[b.jsx(Bw,{pageId:"home"}),b.jsx(Mw,{}),b.jsxs(M.Suspense,{fallback:b.jsx(Kw,{}),children:[b.jsx(qw,{}),b.jsx(Lw,{}),b.jsx(Hw,{}),b.jsx($w,{}),b.jsx(Vw,{}),b.jsx(Gw,{}),b.jsx(Iw,{}),b.jsx(Yw,{})]})]});class Qw extends be.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,i){console.error("Uncaught error:",n,i)}render(){return this.state.hasError?b.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 p-4",children:b.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-xl max-w-lg w-full text-center border border-red-100",children:[b.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"¡Ups! Algo salió mal."}),b.jsx("p",{className:"text-slate-600 mb-6",children:"Hemos detectado un error inesperado al cargar esta página."}),this.state.error&&b.jsx("div",{className:"bg-slate-100 p-4 rounded text-left overflow-auto text-xs text-red-800 mb-6 max-h-40 font-mono",children:this.state.error.toString()}),b.jsxs("div",{className:"flex gap-4 justify-center",children:[b.jsx("button",{onClick:()=>window.location.reload(),className:"bg-slate-900 text-white px-6 py-2 rounded-lg font-bold hover:bg-slate-800 transition-colors",children:"Recargar Página"}),b.jsx(st,{to:"/",className:"text-teal-600 hover:text-teal-800 flex items-center font-bold px-4 py-2 hover:bg-teal-50 rounded-lg transition-colors",children:"Ir al Inicio"})]})]})}):this.props.children}}const Jw=M.lazy(()=>Ne(()=>import("./Contact-BFvDWRZs.js"),__vite__mapDeps([10,1,11,2]))),wg=M.lazy(()=>Ne(()=>import("./ServiceEmailMarketing-DWJH5EVj.js"),__vite__mapDeps([12,1,11,2]))),tp=M.lazy(()=>Ne(()=>import("./ServiceDynamic-BI3_IYic.js"),__vite__mapDeps([13,1,2]))),Sg=M.lazy(()=>Ne(()=>import("./ServiceChatbots-Z2VO6JOk.js"),__vite__mapDeps([14,1,11,2]))),Eg=M.lazy(()=>Ne(()=>import("./ServiceCRM-DhT6Qmun.js"),__vite__mapDeps([15,1,11,2]))),Tg=M.lazy(()=>Ne(()=>import("./ServiceActiveCampaign-BMnj5InL.js"),__vite__mapDeps([16,1,11,2]))),Zw=M.lazy(()=>Ne(()=>import("./ServiceAutomation-B2lnr_cX.js"),__vite__mapDeps([17,1,11,2]))),xg=
86M.lazy(()=>Ne(()=>import("./ServiceIASolutions-DfRqjQB8.js"),__vite__mapDeps([18,1,11,2]))),Pw=M.lazy(()=>Ne(()=>import("./ServiceWhiteLabel-3RmNuJyl.js"),__vite__mapDeps([19,1,11,2]))),Ww=M.lazy(()=>Ne(()=>import("./ServiceAccountingAutomation-CCMAfUDr.js"),__vite__mapDeps([20,1,11,2]))),Ag=M.lazy(()=>Ne(()=>import("./ServiceNewsletter-CJsXRxNc.js"),__vite__mapDeps([21,1,11,2]))),Fw=M.lazy(()=>Ne(()=>import("./BlogIndex-CY3KjXQW.js"),__vite__mapDeps([22,1,2]))),eS=M.lazy(()=>Ne(()=>import("./SuccessStoriesIndex-BzyPepB4.js"),__vite__mapDeps([23,1,2]))),tS=M.lazy(()=>Ne(()=>import("./Team-D9oUXvWz.js"),__vite__mapDeps([24,2,1]))),aS=M.lazy(()=>Ne(()=>import("./Reviews-934ME0dl.js"),__vite__mapDeps([25,1,2]))),nS=M.lazy(()=>Ne(()=>import("./AdminLayout-S8jEhDmP.js"),__vite__mapDeps([26,1,2]))),sS=M.lazy(()=>Ne(()=>import("./ThankYou-BJG6i94u.js"),__vite__mapDeps([27,1,2]))),iS=M.lazy(()=>Ne(()=>import("./CookiesPolicy-DyoFWmWb.js"),__vite__mapDeps([28,1,2]))),rS=M.lazy(()=>Ne(()=>import("./LegalNotice-BqpnW8KP.js"),__vite__mapDeps([29,1,2]))),lS=M.lazy(()=>Ne(()=>import("./DynamicContentDispatcher--cxoqKQG.js"),__vite__mapDeps([30,1,2]))),oS=M.lazy(()=>Ne(()=>import("./LandingSistemaCaptacion-CGUTi7xK.js"),__vite__mapDeps([31,1,11,2]))),uS=M.lazy(()=>Ne(()=>import("./DemoVenecia2026-UG8Mfekk.js"),__vite__mapDeps([32,1,2]))),cS=()=>b.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:b.jsx(Hv,{className:"w-12 h-12 text-teal-600 animate-spin"})}),dS=()=>{const{hash:r,pathname:n}=Ml();return be.useEffect(()=>{if(!r)window.scrollTo(0,0);else{const i=document.getElementById(r.replace("#",""));i&&setTimeout(()=>{i.scrollIntoView({behavior:"smooth"})},100)}},[r,n]),null},fS=({children:r})=>{var g,p;const n=Ml(),i=_v(),{settings:l,redirects:c}=fr(),d=n.pathname.startsWith("/admin");be.useEffect(()=>{if(c.length>0){const S=R=>R.toLowerCase().replace(/\/$/,""),y=S(n.pathname),T=c.find(R=>S(R.from)===y);T&&S(T.to)!==y&&(console.log(`ð Redirecting from ${T.from} to ${T.to}`),i(T.to,{replace:!0}))}},[n.pathname,c,i]),be.useEffect(()=>{if(l.analyticsId){const S="ga4-script";if(!document.getElementById(S)){const y=document.createElement("script");y.id=S,y.async=!0,y.src=`https://www.googletagmanager.com/gtag/js?id=${l.analyticsId}`,document.head.appendChild(y);const T=document.createElement("script");T.id="ga4-config",T.innerHTML=` 87 window.dataLayer = window.dataLayer || []; 88 function gtag(){dataLayer.push(arguments);} 89 gtag('js', new Date()); 90 gtag('config', '${l.analyticsId}'); 91 `,document.head.appendChild(T)}}},[l.analyticsId]);const f=n.pathname==="/demo-venecia-2026",m=d||f;return b.jsxs("div",{className:"min-h-screen bg-slate-50 font-sans text-slate-900 flex flex-col",children:[b.jsx(dS,{}),b.jsxs(Mg,{children:[l.faviconUrl&&b.jsx("link",{rel:"icon",href:l.faviconUrl.startsWith("http")||l.faviconUrl.startsWith("/")?l.faviconUrl:`/${l.faviconUrl}`}),l.siteName&&b.jsx("title",{children:l.siteName}),((g=l.scripts)==null?void 0:g.headCode)&&b.jsx("script",{type:"text/javascript",children:l.scripts.headCode})]}),!m&&b.jsx(Dw,{}),b.jsx("main",{className:"flex-grow",children:b.jsx(M.Suspense,{fallback:b.jsx(cS,{}),children:r})}),!m&&b.jsx(M.Suspense,{fallback:null,children:b.jsx(aS,{})}),!m&&b.jsx(zw,{}),b.jsx(Uw,{}),((p=l.scripts)==null?void 0:p.bodyCode)&&b.jsx(kw,{html:l.scripts.bodyCode})]})},hS={"marketing-automation":Zw,"chatbots-ia":Sg,"agencia-partner-activecampaign-servicios":Tg,"agencia-de-email-marketing":wg,"automatizacion-contable":Ww,"crm-inteligente":Eg,"soluciones-ia":xg,"creacion-de-newsletters":Ag,newsletter:Ag,chatbots:Sg,activecampaign:Tg,crm:Eg,"mobile-apps":tp,"ia-solutions":xg,"email-marketing":wg},mS=()=>{const{landingServices:r,pages:n}=fr(),i=l=>{const c=n.find(d=>d.slug===l);return c?c.slug:l};return b.jsxs(wv,{children:[b.jsx(Mt,{path:"/",element:b.jsx(Xw,{})}),b.jsx(Mt,{path:`/${i("contacto")}`,element:b.jsx(Jw,{})}),b.jsx(Mt,{path:"/gracias",element:b.jsx(sS,{})}),b.jsx(Mt,{path:`/${i("equipo")}`,element:b.jsx(tS,{})}),b.jsx(Mt,{path:"/demo-venecia-2026",element:b.jsx(uS,{})}),b.jsx(Mt,{path:"/conseguir-mas-clientes",element:b.jsx(oS,{})}),r.map(l=>{const c=hS[l.slug]||tp,f=l.slug==="agencia-de-email-marketing"?`/${l.slug}`:`/servicio/${l.slug}`;return b.jsx(M.Fragment,{children:b.jsx(Mt,{path:f,element:b.jsx(c,{})})},l.id)}),b.jsx(Mt,{path:"/blog",element:b.jsx(Fw,{})}),b.jsx(Mt,{path:"/casos-de-exito",element:b.jsx(eS,{})}
91),b.jsx(Mt,{path:"/politica-de-cookies",element:b.jsx(iS,{})}),b.jsx(Mt,{path:"/aviso-legal",element:b.jsx(rS,{})}),b.jsx(Mt,{path:"/servicio/marca-blanca-agencias-freelance",element:b.jsx(Pw,{})}),b.jsx(Mt,{path:"/admin",element:b.jsx(nS,{})}),b.jsx(Mt,{path:"/:slug",element:b.jsx(lS,{})})]})};function gS(){return b.jsxs(Nw,{children:[b.jsx(Jy,{position:"top-right",richColors:!0}),b.jsx(bv,{children:b.jsx(fS,{children:b.jsx(Qw,{children:b.jsx(mS,{})})})})]})}const ap=document.getElementById("root");if(!ap)throw new Error("Could not find root element to mount to");const pS=Qv.createRoot(ap);pS.render(b.jsx(M.StrictMode,{children:b.jsx(kg,{children:b.jsx(gS,{})})}));export{Mg as H,Bw as S,Ne as _,_S as a,b as j,ne as s,re as t,fr as u};
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.