PageSourceSearch

https://alltaxsolution.com/assets/index-DFrRKUBX.js

js alltaxsolution.com collected 2026-10-07 03:05:11 UTC 801,664 bytes, 28 lines download raw bytes

vendor: 12,524 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SoftwarePage-BsvGZ63Y.js","assets/jsx-runtime-PusITdGv.js","assets/clock-CaANHijd.js","assets/database-B--ITcrg.js","assets/laptop-DVfhB_1k.js","assets/user-check-Ck41invi.js","assets/AcademyPage-DiUdIg4w.js","assets/dollar-sign-OC-qHWG2.js","assets/SignaturesPage-CE4Y0rUk.js","assets/file-text-uxkBEhL9.js","assets/serviceCatalogs-BgV2PO7p.js","assets/AtsLinkPage-Dq9ZpICX.js","assets/BankProductsPage-D6eclEbF.js","assets/zap-DNGoyfn8.js","assets/ContactPage-CCbZoJjH.js","assets/AboutPage-CrlUEn90.js","assets/calendar-ByCGH2_U.js","assets/ResourcesPage-CSp8_MGM.js","assets/BlogPage-Rd6q00aB.js","assets/arrow-left-Dzk6Uxpd.js","assets/search-DlM5PeFJ.js","assets/AdminPage-IwPvXlTj.js","assets/eye-9-vVzsJM.js","assets/ChangelogAdmin-Bb-zQMpT.js","assets/shield-alert-Bol5HPjt.js","assets/TranslationManager-B8UEF5k7.js","assets/BlueprintViewer-BSv4XDEB.js","assets/PrivacyPage-Cxu248nh.js","assets/TermsPage-bLb4VU9P.js"])))=>i.map(i=>d[i]);
2import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./jsx-runtime-PusITdGv.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var s=r((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}var S=!1,C=-1,ee=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<ee)}function re(){if(g=!1,S){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ee=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),c=r(((e,t)=>{t.exports=s()})),l=r((t=>{var n=e();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},t.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},t.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},t.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},t.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},t.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},t.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},t.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},t.useFormStatus=function(){return c.H.useHostTransitionStatus()},t.version=`19.2.7`})),u=r(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=r((t=>{var n=c(),r=e(),i=u();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function l(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 d(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 f(e){if(s(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,w=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},pe=[],me=-1;function he(e){return{current:e}}function ge(e){0>me||(e.current=pe[me],pe[me]=null,me--)}function E(e,t){me++,pe[me]=e.current,e.current=t}var _e=he(null),ve=he(null),ye=he(null),be=he(null);function xe(e,t){switch(E(ye,t),E(ve,e),E(_e,null),t.nodeType){case 9:case 11:e=(e
vendor: 145,107 bytes, lines 2-10
2=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ge(_e),E(_e,e)}function Se(){ge(_e),ge(ve),ge(ye)}function Ce(e){e.memoizedState!==null&&E(be,e);var t=_e.current,n=Gd(t,e.type);t!==n&&(E(ve,e),E(_e,n))}function we(e){ve.current===e&&(ge(_e),ge(ve)),be.current===e&&(ge(be),tp._currentValue=fe)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
3    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4`+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5`),l=s.split(`
6`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8Error generating stack: `+e.message+`
9`+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=n.unstable_scheduleCallback,Pe=n.unstable_cancelCallback,Fe=n.unstable_shouldYield,Ie=n.unstable_requestPaint,Le=n.unstable_now,Re=n.unstable_getCurrentPriorityLevel,ze=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,Ve=n.unstable_NormalPriority,He=n.unstable_LowPriority,Ue=n.unstable_IdlePriority,We=n.log,Ge=n.unstable_setDisableYieldValue,Ke=null,qe=null;function Je(e){if(typeof We==`function`&&Ge(e),qe&&typeof qe.setStrictMode==`function`)try{qe.setStrictMode(Ke,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,tt=4194304;function nt(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 rt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=nt(n))):i=nt(o):i=nt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=nt(n))):i=nt(o)):i=nt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function at(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 ot(){var e=tt;return tt<<=1,!(tt&62914560)&&(tt=4194304),e}function st(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ye(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ut(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ut(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function dt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ft(e,t){var n=t&-t;return n=n&42?1:pt(n),(n&(e.suspendedLanes|t))===0?n:0}function pt(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 mt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ht(){var e=T.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function gt(e,t){var n=T.p;try{return T.p=e,t()}finally{T.p=n}}var _t=Math.random().toString(36).slice(2),vt=`__reactFiber$`+_t,yt=`__reactProps$`+_t,bt=`__reactContainer$`+_t,xt=`__reactEvents$`+_t,St=`__reactListeners$`+_t,Ct=`__reactHandles$`+_t,wt=`__reactResources$`+_t,Tt=`__reactMarker$`+_t;function Et(e){delete e[vt],delete e[yt],delete e[xt],delete e[St],delete e[Ct]}function Dt(e){var t=e[vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bt]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[vt])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function Ot(e){if(e=e[vt]||e[bt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function At(e){var t=e[wt];return t||=e[wt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function jt(e){e[Tt]=!0}var Mt=new Set,Nt={};function Pt(e,t){Ft(e,t),Ft(e+`Capture`,t)}function Ft(e,t){for(Nt[e]=t,e=0;e<t.length;e++)Mt.add(t[e])}var It=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]*$`),Lt={},D={};function Rt(e){return Me.call(D,e)?!0:Me.call(Lt,e)?!1:It.test(e)?D[e]=!0:(Lt[e]=!0,!1)}function zt(e,t,n){if(Rt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function O(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ut(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wt(e){if(!e._valueTracker){var t=Ht(e)?`checked`:`value`;e._valueTracker=Ut(e,t,``+e[t])}}function Gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ht(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var qt=/[\n"\\]/g;function Jt(e){return e.replace(qt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Yt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+O(t)):e.value!==``+O(t)&&(e.value=``+O(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Zt(e,o,O(n)):Zt(e,o,O(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+O(s):e.removeAttribute(`name`)}function Xt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Wt(e);return}n=n==null?``:``+O(n),t=t==null?n:``+O(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Wt(e)}function Zt(e,t,n){t===`number`&&Kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+O(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $t(e,t,n){if(t!=null&&(t=``+O(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+O(n)}function en(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(de(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=O(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Wt(e)}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nn=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 rn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||nn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function an(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&rn(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&rn(e,o,t[o])}function on(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 sn=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-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`]]),cn=/^[\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 ln(e){return cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function un(){}var dn=null;function fn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pn=null,mn=null;function hn(e){var t=Ot(e);if(t&&(e=t.stateNode)){var n=e[yt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[yt]||null;if(!i)throw Error(a(90));Yt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Gt(r)}break a;case`textarea`:$t(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Qt(e,!!n.multiple,t,!1)}}}var gn=!1;function _n(e,t,n){if(gn)return e(t,n);gn=!0;try{return e(t)}finally{if(gn=!1,(pn!==null||mn!==null)&&(Cu(),pn&&(t=pn,e=mn,mn=pn=null,hn(t),e)))for(t=0;t<e.length;t++)hn(e[t])}}function vn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[yt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var yn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),bn=!1;if(yn)try{var xn={};Object.defineProperty(xn,"passive",{get:function(){bn=!0}}),window.addEventListener(`test`,xn,xn),window.removeEventListener(`test`,xn,xn)}catch{bn=!1}var Sn=null,Cn=null,wn=null;function Tn(){if(wn)return wn;var e,t=Cn,n=t.length,r,i=`value`in Sn?Sn.value:Sn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return wn=i.slice(e,1<r?1-r:void 0)}function En(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 Dn(){return!0}function On(){return!1}function k(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Dn:On,this.isPropagationStopped=On,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Dn)},persist:function(){},isPersistent:Dn}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=k(kn),jn=h({},kn,{view:0,detail:0}),Mn=k(jn),Nn,Pn,Fn,In=h({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qn,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!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Ln=k(In),Rn=k(h({},In,{dataTransfer:0})),zn=k(h({},jn,{relatedTarget:0})),Bn=k(h({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Vn=k(h({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Hn=k(h({},kn,{data:0})),Un={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Wn={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`},Gn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gn[e])?!!t[e]:!1}function qn(){return Kn}var Jn=k(h({},jn,{key:function(e){if(e.key){var t=Un[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=En(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Wn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qn,charCode:function(e){return e.type===`keypress`?En(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?En(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Yn=k(h({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xn=k(h({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qn})),Zn=k(h({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qn=k(h({},In,{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})),$n=k(h({},kn,{newState:0,oldState:0})),er=[9,13,27,32],tr=yn&&`CompositionEvent`in window,nr=null;yn&&`documentMode`in document&&(nr=document.documentMode);var rr=yn&&`TextEvent`in window&&!nr,ir=yn&&(!tr||nr&&8<nr&&11>=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=Tn(),wn=Cn=Sn=null,lr=!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 ir&&t.locale!==`ko`?null:t.data;default:return null}}var fr={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 pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!fr[e.type]:t===`textarea`}function mr(e,t,n,r){pn?mn?mn.push(r):mn=[r]:pn=r,t=Od(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){xd(e,0)}function vr(e){if(Gt(kt(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(yn){var xr;if(yn){var Sr=`oninput`in document;if(!Sr){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),Sr=typeof Cr.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function wr(){hr&&(hr.detachEvent(`onpropertychange`,Tr),gr=hr=null)}function Tr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,fn(e)),_n(_r,t)}}function Er(e,t,n){e===`focusin`?(wr(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Or(e,t){if(e===`click`)return vr(t)}function kr(e,t){if(e===`input`||e===`change`)return vr(t)}function Ar(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var jr=typeof Object.is==`function`?Object.is:Ar;function Mr(e,t){if(jr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Me.call(t,i)||!jr(e[i],t[i]))return!1}return!0}function Nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pr(e,t){var n=Nr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kt(e.document)}return t}function Lr(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 Rr=yn&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==Kt(r)||(r=zr,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&Mr(Vr,r)||(Vr=r,r=Od(Br,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=zr)))}function Wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Gr={animationend:Wr(`Animation`,`AnimationEnd`),animationiteration:Wr(`Animation`,`AnimationIteration`),animationstart:Wr(`Animation`,`AnimationStart`),transitionrun:Wr(`Transition`,`TransitionRun`),transitionstart:Wr(`Transition`,`TransitionStart`),transitioncancel:Wr(`Transition`,`TransitionCancel`),transitionend:Wr(`Transition`,`TransitionEnd`)},Kr={},qr={};yn&&(qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),`TransitionEvent`in window||delete Gr.transitionend.transition);function Jr(e){if(Kr[e])return Kr[e];if(!Gr[e])return e;var t=Gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qr)return Kr[e]=t[n];return e}var Yr=Jr(`animationend`),Xr=Jr(`animationiteration`),Zr=Jr(`animationstart`),Qr=Jr(`transitionrun`),$r=Jr(`transitionstart`),ei=Jr(`transitioncancel`),ti=Jr(`transitionend`),ni=new Map,ri=`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(` `);ri.push(`scrollEnd`);function ii(e,t){ni.set(e,t),Pt(t,[e])}var ai=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&&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)},oi=[],si=0,ci=0;function li(){for(var e=si,t=ci=si=0;t<e;){var n=oi[t];oi[t++]=null;var r=oi[t];oi[t++]=null;var i=oi[t];oi[t++]=null;var a=oi[t];if(oi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&pi(n,i,a)}}function ui(e,t,n,r){oi[si++]=e,oi[si++]=t,oi[si++]=n,oi[si++]=r,ci|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function di(e,t,n,r){return ui(e,t,n,r),mi(e)}function fi(e,t){return ui(e,null,null,t),mi(e)}function pi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function mi(e){if(50<mu)throw mu=0,hu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hi={};function gi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _i(e,t,n,r){return new gi(e,t,n,r)}function vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yi(e,t){var n=e.alternate;return n===null?(n=_i(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function bi(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)vi(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ae:return e=_i(31,n,t,i),e.elementType=ae,e.lanes=o,e;case y:return Si(n.children,i,o,t);case b:s=8,i|=24;break;case x:return e=_i(12,n,t,i|2),e.elementType=x,e.lanes=o,e;case te:return e=_i(13,n,t,i),e.elementType=te,e.lanes=o,e;case ne:return e=_i(19,n,t,i),e.elementType=ne,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case ee:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=_i(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Si(e,t,n,r){return e=_i(7,e,r,t),e.lanes=n,e}function Ci(e,t,n){return e=_i(6,e,null,t),e.lanes=n,e}function wi(e){var t=_i(18,null,null,0);return t.stateNode=e,t}function Ti(e,t,n){return t=_i(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ei=new WeakMap;function Di(e,t){if(typeof e==`object`&&e){var n=Ei.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Ei.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Oi=[],ki=0,Ai=null,A=0,ji=[],Mi=0,Ni=null,Pi=1,Fi=``;function Ii(e,t){Oi[ki++]=A,Oi[ki++]=Ai,Ai=e,A=t}function Li(e,t,n){ji[Mi++]=Pi,ji[Mi++]=Fi,ji[Mi++]=Ni,Ni=e;var r=Pi;e=Fi;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Pi=1<<32-Ye(t)+i|n<<i|r,Fi=a+e}else Pi=1<<a|n<<i|r,Fi=e}function Ri(e){e.return!==null&&(Ii(e,1),Li(e,1,0))}function zi(e){for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,A=Oi[--ki],Oi[ki]=null;for(;e===Ni;)Ni=ji[--Mi],ji[Mi]=null,Fi=ji[--Mi],ji[Mi]=null,Pi=ji[--Mi],ji[Mi]=null}function Bi(e,t){ji[Mi++]=Pi,ji[Mi++]=Fi,ji[Mi++]=Ni,Pi=t.id,Fi=t.overflow,Ni=e}var Vi=null,Hi=null,j=!1,Ui=null,Wi=!1,Gi=Error(a(519));function Ki(e){throw Qi(Di(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Gi}function qi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[vt]=e,t[yt]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)X(yd[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),Xt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),en(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Pd(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||Ki(e,!0)}function Ji(e){for(Vi=e.return;Vi;)switch(Vi.tag){case 5:case 31:case 13:Wi=!1;return;case 27:case 3:Wi=!0;return;default:Vi=Vi.return}}function Yi(e){if(e!==Vi)return!1;if(!j)return Ji(e),j=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Kd(e.type,e.memoizedProps)),n=!n),n&&Hi&&Ki(e),Ji(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Hi=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Hi=pf(e)}else t===27?(t=Hi,ef(e.type)?(e=ff,ff=null,Hi=e):Hi=t):Hi=Vi?df(e.stateNode.nextSibling):null;return!0}function Xi(){Hi=Vi=null,j=!1}function Zi(){var e=Ui;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),Ui=null),e}function Qi(e){Ui===null?Ui=[e]:Ui.push(e)}var $i=he(null),ea=null,ta=null;function na(e,t,n){E($i,t._currentValue),t._currentValue=n}function ra(e){e._currentValue=$i.current,ge($i)}function ia(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function aa(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ia(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ia(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function oa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;jr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===be.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}i=i.return}e!==null&&aa(t,e,n,r),t.flags|=262144}function sa(e){for(e=e.firstContext;e!==null;){if(!jr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ca(e){ea=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function la(e){return da(ea,e)}function ua(e,t){return ea===null&&ca(e),da(e,t)}function da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ta===null){if(e===null)throw Error(a(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return n}var fa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},pa=n.unstable_scheduleCallback,ma=n.unstable_NormalPriority,ha={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ga(){return{controller:new fa,data:new Map,refCount:0}}function _a(e){e.refCount--,e.refCount===0&&pa(ma,function(){e.controller.abort()})}var va=null,ya=0,ba=0,xa=null;function Sa(e,t){if(va===null){var n=va=[];ya=0,ba=pd(),xa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ya++,t.then(Ca,Ca),t}function Ca(){if(--ya===0&&va!==null){xa!==null&&(xa.status=`fulfilled`);var e=va;va=null,ba=0,xa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ta=w.S;w.S=function(e,t){ru=Le(),typeof t==`object`&&t&&typeof t.then==`function`&&Sa(e,t),Ta!==null&&Ta(e,t)};var Ea=he(null);function Da(){var e=Ea.current;return e===null?Bl.pooledCache:e}function Oa(e,t){t===null?E(Ea,Ea.current):E(Ea,t.pool)}function ka(){var e=Da();return e===null?null:{parent:ha._currentValue,pool:e}}var Aa=Error(a(460)),ja=Error(a(474)),Ma=Error(a(542)),Na={then:function(){}};function Pa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Fa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(un,un),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,za(e),e;default:if(typeof t.status==`string`)t.then(un,un);else{if(e=Bl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,za(e),e}throw La=t,Aa}}function Ia(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(La=e,Aa):e}}var La=null;function Ra(){if(La===null)throw Error(a(459));var e=La;return La=null,e}function za(e){if(e===Aa||e===Ma)throw Error(a(483))}var Ba=null,Va=0;function Ha(e){var t=Va;return Va+=1,Ba===null&&(Ba=[]),Fa(Ba,e,t)}function Ua(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Wa(e,t){throw t.$$typeof===g?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ga(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=yi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ci(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===ie&&Ia(a)===t.type)?(t=i(t,n.props),Ua(t,n),t.return=e,t):(t=xi(n.type,n.key,n.props,null,e.mode,r),Ua(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ti(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Si(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=xi(t.type,t.key,t.props,null,e.mode,n),Ua(n,t),n.return=e,n;case v:return t=Ti(t,e.mode,n),t.return=e,t;case ie:return t=Ia(t),f(e,t,n)}if(de(t)||ce(t))return t=Si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ha(t),n);if(t.$$typeof===C)return f(e,ua(e,t),n);Wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case ie:return n=Ia(n),p(e,t,n,r)}if(de(n)||ce(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ha(n),r);if(n.$$typeof===C)return p(e,t,ua(e,n),r);Wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=Ia(r),m(e,t,n,r,i)}if(de(r)||ce(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ha(r),i);if(r.$$typeof===C)return m(e,t,n,ua(t,r),i);Wa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),j&&Ii(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return j&&Ii(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),j&&Ii(i,h),l}function g(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),j&&Ii(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return j&&Ii(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),j&&Ii(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Ia(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ua(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=Si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=xi(o.type,o.key,o.props,null,e.mode,c),Ua(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ti(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Ia(o),b(e,r,o,c)}if(de(o))return h(e,r,o,c);if(ce(o)){if(l=ce(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ha(o),c);if(o.$$typeof===C)return b(e,r,ua(e,o),c);Wa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Va=0;var i=b(e,t,n,r);return Ba=null,i}catch(t){if(t===Aa||t===Ma)throw t;var a=_i(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ka=Ga(!0),qa=Ga(!1),Ja=!1;function Ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xa(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 Za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=mi(e),pi(e,null,n),t}return ui(e,r,t,n),mi(e)}function $a(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}function eo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var to=!1;function no(){if(to){var e=xa;if(e!==null)throw e}}function ro(e,t,n,r){to=!1;var i=e.updateQueue;Ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===ba&&(to=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ja=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function io(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function ao(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)io(n[e],t)}var oo=he(null),so=he(0);function co(e,t){e=Kl,E(so,e),E(oo,t),Kl=e|t.baseLanes}function lo(){E(so,Kl),E(oo,oo.current)}function uo(){Kl=so.current,ge(oo),ge(so)}var fo=he(null),po=null;function mo(e){var t=e.alternate;E(yo,yo.current&1),E(fo,e),po===null&&(t===null||oo.current!==null||t.memoizedState!==null)&&(po=e)}function ho(e){E(yo,yo.current),E(fo,e),po===null&&(po=e)}function go(e){e.tag===22?(E(yo,yo.current),E(fo,e),po===null&&(po=e)):_o(e)}function _o(){E(yo,yo.current),E(fo,fo.current)}function vo(e){ge(fo),po===e&&(po=null),ge(yo)}var yo=he(0);function bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(n)))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)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 xo=0,M=null,N=null,So=null,Co=!1,wo=!1,To=!1,Eo=0,Do=0,Oo=null,ko=0;function Ao(){throw Error(a(321))}function jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Mo(e,t,n,r,i,a){return xo=a,M=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?zs:Bs,To=!1,a=n(r,i),To=!1,wo&&(a=No(t,n,r,i)),P(e),a}function P(e){w.H=Rs;var t=N!==null&&N.next!==null;if(xo=0,So=N=M=null,Co=!1,Do=0,Oo=null,t)throw Error(a(300));e===null||rc||(e=e.dependencies,e!==null&&sa(e)&&(rc=!0))}function No(e,t,n,r){M=e;var i=0;do{if(wo&&(Oo=null),Do=0,wo=!1,25<=i)throw Error(a(301));if(i+=1,So=N=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}w.H=Vs,o=t(n,r)}while(wo);return o}function Po(){var e=w.H,t=e.useState()[0];return t=typeof t.then==`function`?z(t):t,e=e.useState()[0],(N===null?null:N.memoizedState)!==e&&(M.flags|=1024),t}function Fo(){var e=Eo!==0;return Eo=0,e}function F(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Io(e){if(Co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Co=!1}xo=0,So=N=M=null,wo=!1,Do=Eo=0,Oo=null}function I(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return So===null?M.memoizedState=So=e:So=So.next=e,So}function L(){if(N===null){var e=M.alternate;e=e===null?null:e.memoizedState}else e=N.next;var t=So===null?M.memoizedState:So.next;if(t!==null)So=t,N=e;else{if(e===null)throw M.alternate===null?Error(a(467)):Error(a(310));N=e,e={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null},So===null?M.memoizedState=So=e:So=So.next=e}return So}function R(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function z(e){var t=Do;return Do+=1,Oo===null&&(Oo=[]),e=Fa(Oo,e,t),t=M,(So===null?t.memoizedState:So.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?zs:Bs),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return z(e);if(e.$$typeof===C)return la(e)}throw Error(a(438,String(e)))}function Ro(e){var t=null,n=M.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=M.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=R(),M.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=oe;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(L(),N,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(xo&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ba&&(d=!0);else if((xo&p)===p){u=u.next,p===ba&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,M.lanes|=p,Jl|=p;f=u.action,To&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,M.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!jr(o,e.memoizedState)&&(rc=!0,d&&(n=xa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=L(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);jr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=M,i=L(),o=j;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!jr((N||i).memoizedState,n);if(s&&(i.memoizedState=n,rc=!0),i=i.queue,fs(Ko.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||So!==null&&So.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Go.bind(null,r,i,n,t),null),Bl===null)throw Error(a(349));o||xo&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=M.updateQueue,t===null?(t=R(),M.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&B(e)}function Ko(e,t,n){return n(function(){qo(t)&&B(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function B(e){var t=fi(e,2);t!==null&&vu(t,e,2)}function Jo(e){var t=I();if(typeof e==`function`){var n=e;if(e=n(),To){Je(!0);try{n()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Yo(e,t,n,r){return e.baseState=n,Vo(e,N,typeof r==`function`?r:zo)}function Xo(e,t,n,r,i){if(Fs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};w.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=w.T,o={};w.T=o;try{var s=n(i,r),c=w.S;c!==null&&c(o,s),Qo(e,t,s)}catch(n){es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),w.T=a}}else try{a=n(i,r),Qo(e,t,a)}catch(n){es(e,t,n)}}function Qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){$o(e,t,n)},function(n){return es(e,t,n)}):$o(e,t,n)}function $o(e,t,n){t.status=`fulfilled`,t.value=n,ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zo(e,n)))}function es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ts(t),t=t.next;while(t!==r)}e.action=null}function ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(j){var n=Bl.formState;if(n!==null){a:{var r=M;if(j){if(Hi){b:{for(var i=Hi,a=Wi;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Hi=df(i.nextSibling),r=i.data===`F!`;break a}}Ki(r)}r=!1}r&&(t=n[0])}}return n=I(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Ms.bind(null,M,r),r.dispatch=n,r=Jo(!1),a=Ps.bind(null,M,!1,r.queue),r=I(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xo.bind(null,M,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function V(e){return is(L(),N,e)}function is(e,t,n){if(t=Vo(e,t,ns)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=z(t)}catch(e){throw e===Aa?Ma:e}else r=t;t=L();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(M.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=L(),n=N;if(n!==null)return is(t,n,e);L(),t=t.memoizedState,n=L();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=M.updateQueue,t===null&&(t=R(),M.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function cs(){return L().memoizedState}function ls(e,t,n,r){var i=I();M.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=L();r=r===void 0?null:r;var a=i.memoizedState.inst;N!==null&&r!==null&&jo(r,N.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(M.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){M.flags|=4;var t=M.updateQueue;if(t===null)t=R(),M.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=L().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(G&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function H(e,t){return us(4,4,e,t)}function gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){n=n==null?null:n.concat([e]),us(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=L();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&jo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=L();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&jo(t,r[1]))return r[0];if(r=e(),To){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||xo&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),M.lanes|=e,Jl|=e,n)}function Ss(e,t,n,r){return jr(n,t)?n:oo.current===null?!(xo&42)||xo&1073741824&&!(q&261930)?(rc=!0,e.memoizedState=n):(e=_u(),M.lanes|=e,Jl|=e,t):(e=xs(e,n,r),jr(e,t)||(rc=!0),e)}function Cs(e,t,n,r,i){var a=T.p;T.p=a!==0&&8>a?a:8;var o=w.T,s={};w.T=s,Ps(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,wa(c,r),gu(e)):Ns(e,t,r,gu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{T.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function ws(){}function U(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ts(e).queue;Cs(e,i,t,fe,n===null?ws:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},gu())}function Ds(){return la(tp)}function Os(){return L().memoizedState}function ks(){return L().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Za(n);var r=Qa(t,e,n);r!==null&&(vu(r,t,n),$a(r,t,n)),t={cache:ga()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=di(e,t,n,r),n!==null&&(vu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,gu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o))return ui(e,t,i,0),Bl===null&&li(),!1}catch{}if(n=di(e,t,i,r),n!==null)return vu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(a(479))}else t=di(e,n,r,2),t!==null&&vu(t,e,2)}function Fs(e){var t=e.alternate;return e===M||t!==null&&t===M}function Is(e,t){wo=Co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}var Rs={readContext:la,use:Lo,useCallback:Ao,useContext:Ao,useEffect:Ao,useImperativeHandle:Ao,useLayoutEffect:Ao,useInsertionEffect:Ao,useMemo:Ao,useReducer:Ao,useRef:Ao,useState:Ao,useDebugValue:Ao,useDeferredValue:Ao,useTransition:Ao,useSyncExternalStore:Ao,useId:Ao,useHostTransitionStatus:Ao,useFormState:Ao,useActionState:Ao,useOptimistic:Ao,useMemoCache:Ao,useCacheRefresh:Ao};Rs.useEffectEvent=Ao;var zs={readContext:la,use:Lo,useCallback:function(e,t){return I().memoizedState=[e,t===void 0?null:t],e},useContext:la,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=I();t=t===void 0?null:t;var r=e();if(To){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=I();if(n!==void 0){var i=n(t);if(To){Je(!0);try{n(t)}finally{Je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,M,e),[r.memoizedState,e]},useRef:function(e){var t=I();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Ms.bind(null,M,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(I(),e,t)},useTransition:function(){var e=Jo(!1);return e=Cs.bind(null,M,e.queue,!0,!1),I().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=M,i=I();if(j){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Bl===null)throw Error(a(349));q&127||Wo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ds(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=I(),t=Bl.identifierPrefix;if(j){var n=Fi,r=Pi;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Eo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ko++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=I();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,M,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return I().memoizedState=As.bind(null,M)},useEffectEvent:function(e){var t=I(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:la,use:Lo,useCallback:ys,useContext:la,useEffect:fs,useImperativeHandle:_s,useInsertionEffect:hs,useLayoutEffect:H,useMemo:bs,useReducer:Bo,useRef:cs,useState:function(){return Bo(zo)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(L(),N.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=L().memoizedState;return[typeof e==`boolean`?e:z(e),t]},useSyncExternalStore:Uo,useId:Os,useHostTransitionStatus:Ds,useFormState:V,useActionState:V,useOptimistic:function(e,t){return Yo(L(),N,e,t)},useMemoCache:Ro,useCacheRefresh:ks};Bs.useEffectEvent=ms;var Vs={readContext:la,use:Lo,useCallback:ys,useContext:la,useEffect:fs,useImperativeHandle:_s,useInsertionEffect:hs,useLayoutEffect:H,useMemo:bs,useReducer:Ho,useRef:cs,useState:function(){return Ho(zo)},useDebugValue:vs,useDeferredValue:function(e,t){var n=L();return N===null?xs(n,e,t):Ss(n,N.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=L().memoizedState;return[typeof e==`boolean`?e:z(e),t]},useSyncExternalStore:Uo,useId:Os,useHostTransitionStatus:Ds,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=L();return N===null?(n.baseState=e,[e,n.queue.dispatch]):Yo(n,N,e,t)},useMemoCache:Ro,useCacheRefresh:ks};Vs.useEffectEvent=ms;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Za(r);i.payload=t,n!=null&&(i.callback=n),t=Qa(e,i,r),t!==null&&(vu(t,e,r),$a(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Qa(e,i,r),t!==null&&(vu(t,e,r),$a(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=Za(n);r.tag=2,t!=null&&(r.callback=t),t=Qa(e,r,n),t!==null&&(vu(t,e,n),$a(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){ai(e)}function Js(e){console.error(e)}function Ys(e){ai(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Za(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Za(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(ou===null?ou=new Set([this]):ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&oa(t,n,i,!0),n=fo.current,n!==null){switch(n.tag){case 31:case 13:return po===null?ku():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Na?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,i)),!1;case 22:return n.flags|=65536,r===Na?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),qu(e,r,i)),!1}throw Error(a(435,n.tag))}return qu(e,r,i),ku(),!1}if(j)return t=fo.current,t===null?(r!==Gi&&(t=Error(a(423),{cause:r}),Qi(Di(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Di(r,n),i=Qs(e.stateNode,r,i),eo(e,i),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Gi&&(e=Error(a(422),{cause:r}),Qi(Di(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Di(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=Di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Qs(n.stateNode,r,e),eo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ou===null||!ou.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=$s(i),ec(i,e,n,r),eo(n,i),!1}n=n.return}while(n!==null);return!1}var nc=Error(a(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?qa(t,null,n,r):Ka(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ca(t),r=Mo(e,t,n,o,a,i),s=Fo(),e!==null&&!rc?(F(e,t,i),kc(e,t,i)):(j&&s&&Ri(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!vi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=xi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Mr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=yi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Mr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Oa(t,a===null?null:a.cachePool),a===null?lo():co(t,a),go(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Oa(t,null),lo(),_o(t)):(Oa(t,a.cachePool),co(t,a),_o(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=Da();return a=a===null?null:{parent:ha._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Oa(t,null),lo(),go(t),e!==null&&oa(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Ka(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,vo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(j){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ho(t),(e=Hi)?(e=sf(e,Wi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ni===null?null:{id:Pi,overflow:Fi},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,Vi=t,Hi=null)):e=null,e===null)throw Ki(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ho(t),i)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(rc||oa(e,t,n,!1),i=(n&e.childLanes)!==0,rc||i){if(r=Bl,r!==null&&(s=ft(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,fi(e,s),vu(r,e,s),nc;ku(),t=fc(e,t,n)}else e=o.treeContext,Hi=df(s.nextSibling),Vi=t,j=!0,Ui=null,Wi=!1,e!==null&&Bi(t,e),t=dc(t,r),t.flags|=4096;return t}return e=yi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return ca(t),n=Mo(e,t,n,r,void 0,i),r=Fo(),e!==null&&!rc?(F(e,t,i),kc(e,t,i)):(j&&r&&Ri(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return ca(t),t.updateQueue=null,n=No(t,r,n,i),P(e),r=Fo(),e!==null&&!rc?(F(e,t,a),kc(e,t,a)):(j&&r&&Ri(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(ca(t),t.stateNode===null){var a=hi,o=n.contextType;typeof o==`object`&&o&&(a=la(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ya(t),o=n.contextType,a.context=typeof o==`object`&&o?la(o):hi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),ro(t,r,a,i),no(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=hi,typeof u==`object`&&u&&(o=la(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),Ja=!1;var f=t.memoizedState;a.state=f,ro(t,r,a,i),no(),l=t.memoizedState,s||f!==l||Ja?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=Ja||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Xa(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=hi,typeof l==`object`&&l&&(c=la(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),Ja=!1,f=t.memoizedState,a.state=f,ro(t,r,a,i),no();var p=t.memoizedState;o!==d||f!==p||Ja||e!==null&&e.dependencies!==null&&sa(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=Ja||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ka(t,e.child,null,i),t.child=Ka(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return Xi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:ka()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function Sc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(yo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(j){if(i?mo(t):_o(t),(e=Hi)?(e=sf(e,Wi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ni===null?null:{id:Pi,overflow:Fi},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,Vi=t,Hi=null)):e=null,e===null)throw Ki(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(_o(t),i=t.mode,c=wc({mode:`hidden`,children:c},i),r=Si(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(mo(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(mo(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(_o(t),c=r.fallback,i=t.mode,r=wc({mode:`visible`,children:r.children},i),c=Si(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ka(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(_o(t),t.child=e.child,t.flags|=128,t=null);else if(mo(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Qi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||oa(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Bl,s!==null&&(r=ft(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,fi(e,r),vu(s,e,r),nc;cf(c)||ku(),t=Tc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Hi=df(c.nextSibling),Vi=t,j=!0,Ui=null,Wi=!1,e!==null&&Bi(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return i?(_o(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=yi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Si(c,i,n,null),c.flags|=2):c=yi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(i=c.cachePool,i===null?i=ka():(l=ha._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(mo(t),n=e.child,e=n.sibling,n=yi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=_i(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Ka(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ia(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=yo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,E(yo,o),ic(e,t,r,n),r=j?A:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&bo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(oa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=yi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&sa(e))):!0}function jc(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),na(t,ha,e.memoizedState.cache),Xi();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ho(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(mo(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(mo(t),t.flags|=128,null);mo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(oa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),E(yo,yo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:na(t,ha,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,j&&t.flags&1048576&&Li(t,A,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ia(t.elementType),t.type=e,typeof e==`function`)vi(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=ac(null,t,e,r,n);break a}else if(i===re){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=ue(e)||e,Error(a(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Ks(r,t.pendingProps),_c(e,t,r,i,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Xa(e,t),ro(t,r,null,n);var s=t.memoizedState;if(r=s.cache,na(t,ha,r),r!==o.cache&&aa(t,[ha],n,!0),no(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}else if(r!==i){i=Di(Error(a(424)),t),Qi(i),t=vc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Hi=df(e.firstChild),Vi=t,j=!0,Ui=null,Wi=!0,n=qa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Xi(),r===i){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:j||(n=t.type,e=t.pendingProps,r=Ud(ye.current).createElement(n),r[vt]=t,r[yt]=e,Ld(r,n,e),jt(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&j&&(r=t.stateNode=hf(t.type,t.pendingProps,ye.current),Vi=t,Wi=!0,i=Hi,ef(t.type)?(ff=i,Hi=df(r.firstChild)):Hi=i),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&j&&((i=r=Hi)&&(r=af(r,t.type,t.pendingProps,Wi),r===null?i=!1:(t.stateNode=r,Vi=t,Hi=df(r.firstChild),Wi=!1,i=!0)),i||Ki(t)),Ce(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(i,o)?r=null:s!==null&&Kd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Mo(e,t,Po,null,null,n),tp._currentValue=i),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&j&&((e=n=Hi)&&(n=of(n,t.pendingProps,Wi),n===null?e=!1:(t.stateNode=n,Vi=t,Hi=null,e=!0)),e||Ki(t)),null;case 13:return Sc(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ka(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,na(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ca(t),i=la(i),r=r(i),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return ca(t),r=la(ha),e===null?(i=Da(),i===null&&(i=Bl,o=ga(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ya(t),na(t,ha,i)):((e.lanes&n)!==0&&(Xa(e,t),ro(t,null,null,n),no()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,na(t,ha,r),r!==i.cache&&aa(t,[ha],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),na(t,ha,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Eu())e.flags|=8192;else throw La=Na,ja}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(Eu())e.flags|=8192;else throw La=Na,ja}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ot(),e.lanes|=t,Ql|=t)}function Lc(e,t){if(!j)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ra(ha),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zi())),Rc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,i,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,i,e,r,n)),null;case 27:if(we(t),n=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Rc(t),null}e=_e.current,Yi(t)?qi(t,e):(e=hf(i,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(we(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Rc(t),null}if(o=_e.current,Yi(t))qi(t,o);else{var s=Ud(ye.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[vt]=t,o[yt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ye.current,Yi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Vi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Ki(t,!0)}else e=Ud(e).createTextNode(r),e[vt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Yi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[vt]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vo(t),t):(vo(t),null);if(t.flags&128)throw Error(a(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Yi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[vt]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),i=!1}else i=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(vo(t),t):(vo(t),null)}return vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return Se(),e===null&&wd(t.stateNode.containerInfo),Rc(t),null;case 10:return ra(t.type),Rc(t),null;case 19:if(ge(yo),r=t.memoizedState,r===null)return Rc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Lc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=bo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bi(n,e),n=n.sibling;return E(yo,yo.current&1|2),j&&Ii(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Le()>iu&&(t.flags|=128,i=!0,Lc(r,!1),t.lanes=4194304)}else{if(!i)if(e=bo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!j)return Rc(t),null}else 2*Le()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,i=!0,Lc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Le(),e.sibling=null,n=yo.current,E(yo,i?n&1|2:n&1),j&&Ii(t,r.treeForkCount),e);case 22:case 23:return vo(t),uo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ge(Ea),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(ha),Rc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Bc(e,t){switch(zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(ha),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(vo(t),t.alternate===null)throw Error(a(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(yo),null;case 4:return Se(),null;case 10:return ra(t.type),null;case 22:case 23:return vo(t),uo(),e!==null&&ge(Ea),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(ha),null;case 25:return null;default:return null}}function Vc(e,t){switch(zi(t),t.tag){case 3:ra(ha),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&vo(t);break;case 13:vo(t);break;case 19:ge(yo);break;case 10:ra(t.type);break;case 22:case 23:vo(t),uo(),e!==null&&ge(Ea);break;case 24:ra(ha)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Y(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Y(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Y(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ao(t,n)}catch(t){Y(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Y(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Y(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Y(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Y(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Y(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[yt]=t}catch(t){Y(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=un));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[vt]=e,t[yt]=n}catch(t){Y(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Vd=up,e=Ir(e),Lr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Y(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Y(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Y(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ao(e,t)}catch(e){Y(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Et(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 ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==`function`)try{qe.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;ef(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),gf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Y(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Y(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Y(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Y(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(a(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(a(160));fl(o,s,i),ll=null,ul=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[Tt]||o[vt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Ld(o,r,n),o[vt]=e,jt(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Ld(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Ld(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[vt]=e,jt(o),r=o}e.stateNode=r}else Gf(i,e.type,e.stateNode);else e.stateNode=zf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(i,e.type,e.stateNode):zf(i,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){i=e.stateNode;try{tn(i,``)}catch(t){Y(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Yc(e,i,n===null?i:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Y(e,e.return,t)}}break;case 3:if(Uf=null,i=vl,vl=yf(t.containerInfo),_l(t,e),vl=i,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Y(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=yf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=Le()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||i,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Y(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Y(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?nf(m,!0):nf(l.stateNode,!1)}catch(e){Y(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;$c(e,Zc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(tn(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(a(161))}}catch(t){Y(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:gf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Y(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)io(c[i],s)}catch(e){Y(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&_a(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Y(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Jf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=yf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(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 Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,W(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,W(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function W(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:_a(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=la(ha),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return la(ha).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,Bl=null,K=null,q=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,ou=null,su=0,cu=null,lu=null,uu=0,du=0,fu=null,pu=null,mu=0,hu=null;function gu(){return G&2&&q!==0?q&-q:w.T===null?ht():pd()}function _u(){if(Zl===0)if(!(q&536870912)||j){var e=et;et<<=1,!(et&3932160)&&(et=262144),Zl=e}else Zl=536870912;return e=fo.current,e!==null&&(e.flags|=32),Zl}function vu(e,t,n){(e===Bl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),Su(e,q,Zl,!1)),ct(e,n),(!(G&2)||e!==Bl)&&(e===Bl&&(!(G&2)&&(Yl|=n),ql===4&&Su(e,q,Zl,!1)),ad(e))}function yu(e,t,n){if(G&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||it(e,t),i=r?Mu(e,t):Au(e,t,!0),o=r;do{if(i===0){Wl&&!r&&Su(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!xu(n)){i=Au(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,i=4;break a}o=eu,eu=i,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){wu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=nu+300-Le(),10<i)){if(Su(r,t,Zl,!Ul),rt(r,0,!0)!==0)break a;uu=t,r.timeoutHandle=Yd(bu.bind(null,r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),i);break a}bu(r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);ad(e)}function bu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},Nl(t,a,d);var m=(a&62914560)===a?nu-Le():(a&4194048)===a?ru-Le():0;if(m=Xf(d,m),m!==null){uu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function xu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!jr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Su(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ut(e,n,t)}function Cu(){return G&6?!0:(od(0,!1),!1)}function J(){if(K!==null){if(Vl===0)var e=K.return;else e=K,ta=ea=null,Io(e),Ba=null,Va=0,e=K;for(;e!==null;)Vc(e.alternate,e),e=e.return;K=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),uu=0,J(),Bl=e,K=n=yi(e.current,null),q=t,Vl=0,Hl=null,Ul=!1,Wl=it(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ye(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,li(),n}function Tu(e,t){M=null,w.H=Rs,t===Aa||t===Ma?(t=Ra(),Vl=3):t===ja?(t=Ra(),Vl=4):Vl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,K===null&&(ql=1,Xs(e,Di(t,e.current)))}function Eu(){var e=fo.current;return e===null?!0:(q&4194048)===q?po===null:(q&62914560)===q||q&536870912?e===po:!1}function Du(){var e=w.H;return w.H=Rs,e===null?Rs:e}function Ou(){var e=w.A;return w.A=Rl,e}function ku(){ql=4,Ul||(q&4194048)!==q&&fo.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Bl===null||Su(Bl,q,Zl,!1)}function Au(e,t,n){var r=G;G|=2;var i=Du(),a=Ou();(Bl!==e||q!==t)&&(au=null,wu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&K!==null){var s=K,c=Hl;switch(Vl){case 8:J(),o=6;break a;case 3:case 2:case 9:case 6:fo.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Iu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Iu(e,s,c,l)}}ju(),o=ql;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,ta=ea=null,G=r,w.H=i,w.A=a,K===null&&(Bl=null,q=0,li()),o}function ju(){for(;K!==null;)Pu(K)}function Mu(e,t){var n=G;G|=2;var r=Du(),i=Ou();Bl!==e||q!==t?(au=null,iu=Le()+500,wu(e,t)):Wl=it(e,t);a:do try{if(Vl!==0&&K!==null){t=K;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Iu(e,t,o,1);break;case 2:case 9:if(Pa(o)){Vl=0,Hl=null,Fu(t);break}t=function(){Vl!==2&&Vl!==9||Bl!==e||(Vl=7),ad(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:Pa(o)?(Vl=0,Hl=null,Fu(t)):(Vl=0,Hl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?qf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,Lu(u))}break b}}Vl=0,Hl=null,Iu(e,t,o,5);break;case 6:Vl=0,Hl=null,Iu(e,t,o,6);break;case 8:J(),ql=6;break a;default:throw Error(a(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return ta=ea=null,w.H=r,w.A=i,G=n,K===null?(Bl=null,q=0,li(),ql):0}function Nu(){for(;K!==null&&!Fe();)Pu(K)}function Pu(e){var t=Mc(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Lu(e):K=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:Io(t);default:Vc(n,t),t=K=bi(t,Kl),t=Mc(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):K=t}function Iu(e,t,n,r){ta=ea=null,Io(t),Ba=null,Va=0;var i=t.return;try{if(tc(e,i,t,n,q)){ql=1,Xs(e,Di(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;ql=1,Xs(e,Di(n,e.current)),K=null;return}t.flags&32768?(j||r===1?e=!0:Wl||q&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=fo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Ul);return}e=t.return;var n=zc(t.alternate,t,Kl);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);ql===0&&(ql=5)}function Ru(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);ql=6,K=null}function zu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(su!==0);if(G&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ci,lt(e,n,o,s,c,l),e===Bl&&(K=Bl=null,q=0),lu=t,cu=e,uu=n,du=o,fu=i,pu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(Ve,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=w.T,w.T=null,i=T.p,T.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,T.p=i,w.T=r}}su=1,Bu(),Vu(),Hu()}}function Bu(){if(su===1){su=0;var e=cu,t=lu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=w.T,w.T=null;var r=T.p;T.p=2;var i=G;G|=4;try{yl(t,e);var a=Hd,o=Ir(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Fr(s.ownerDocument.documentElement,s)){if(c!==null&&Lr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Pr(s,h),v=Pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Vd,Hd=Vd=null}finally{G=i,T.p=r,w.T=n}}e.current=t,su=2}}function Vu(){if(su===2){su=0;var e=cu,t=lu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=w.T,w.T=null;var r=T.p;T.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,T.p=r,w.T=n}}su=3}}function Hu(){if(su===4||su===3){su=0,Ie();var e=cu,t=lu,n=uu,r=pu;t.subtreeFlags&10256||t.flags&10256?su=5:(su=0,lu=cu=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ou=null),mt(n),t=t.stateNode,qe&&typeof qe.onCommitFiberRoot==`function`)try{qe.onCommitFiberRoot(Ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=w.T,i=T.p,T.p=2,w.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{w.T=t,T.p=i}}uu&3&&Wu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===hu?mu++:(mu=0,hu=e):mu=0,od(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_a(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(su!==5)return!1;var e=cu,t=du;du=0;var n=mt(uu),r=w.T,i=T.p;try{T.p=32>n?32:n,w.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,G&6)throw Error(a(331));var c=G;if(G|=4,Il(o.current),Ol(o,o.current,s,n),G=c,od(0,!1),qe&&typeof qe.onPostCommitFiberRoot==`function`)try{qe.onPostCommitFiberRoot(Ke,o)}catch{}return!0}finally{T.p=i,w.T=r,Uu(e,t)}}function Ku(e,t,n){t=Di(n,t),t=Qs(e.stateNode,t,2),e=Qa(e,t,2),e!==null&&(ct(e,2),ad(e))}function Y(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=Di(n,e),n=$s(2),r=Qa(t,n,2),r!==null&&(ec(n,r,t,e),ct(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Bl===e&&(q&n)===n&&(ql===4||ql===3&&(q&62914560)===q&&300>Le()-nu?!(G&2)&&wu(e,0):Xl|=n,Ql===q&&(Ql=0)),ad(e)}function Yu(e,t){t===0&&(t=ot()),e=fi(e,t),e!==null&&(ct(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return Ne(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=q,a=rt(r,r===Bl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||it(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Jd()&&(e=id);for(var t=Le(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}su!==0&&su!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=at(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Bl,n=q,n=rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||it(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),mt(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=ud.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(su!==0&&su!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=q;return r=rt(e,e===Bl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),ld(e,Le()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Wu())return null;yu(e,t,!0)}function fd(){Qd(function(){G&6?Ne(ze,sd):cd()})}function pd(){if(id===0){var e=ba;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:ln(``+e)}function hd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[yt]||null).action),o=r.submitter;o&&(t=(t=o[yt]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);U(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),U(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<ri.length;_d++){var vd=ri[_d];ii(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}ii(Yr,`onAnimationEnd`),ii(Xr,`onAnimationIteration`),ii(Zr,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(Qr,`onTransitionRun`),ii($r,`onTransitionStart`),ii(ei,`onTransitionCancel`),ii(ti,`onTransitionEnd`),Ft(`onMouseEnter`,[`mouseout`,`mouseover`]),Ft(`onMouseLeave`,[`mouseout`,`mouseover`]),Ft(`onPointerEnter`,[`pointerout`,`pointerover`]),Ft(`onPointerLeave`,[`pointerout`,`pointerover`]),Pt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Pt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Pt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Pt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Pt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Pt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`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(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ai(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ai(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[xt];n===void 0&&(n=t[xt]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,Mt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!bn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Dt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}_n(function(){var r=a,i=fn(n),o=[];a:{var c=ni.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(En(n)===0)break a;case`keydown`:case`keyup`:l=Jn;break;case`focusin`:u=`focus`,l=zn;break;case`focusout`:u=`blur`,l=zn;break;case`beforeblur`:case`afterblur`:l=zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Ln;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Rn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Xn;break;case Yr:case Xr:case Zr:l=Bn;break;case ti:l=Zn;break;case`scroll`:case`scrollend`:l=Mn;break;case`wheel`:l=Qn;break;case`copy`:case`cut`:case`paste`:l=Vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Yn;break;case`toggle`:case`beforetoggle`:l=$n}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=vn(m,p),g!=null&&d.push(Dd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==dn&&(u=n.relatedTarget||n.fromElement)&&(Dt(u)||u[bt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Dt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Ln,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Yn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:kt(l),h=u==null?c:kt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Dt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ad(o,c,l,d,!1),u!==null&&f!==null&&Ad(o,f,u,d,!0)}}a:{if(c=r?kt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=yr;else if(pr(c))if(br)v=kr;else{v=Dr;var y=Er}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&on(r.elementType)&&(v=yr):v=Or;if(v&&=v(e,r)){mr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Zt(c,`number`,c.value)}switch(y=r?kt(r):window,e){case`focusin`:(pr(y)||y.contentEditable===`true`)&&(zr=y,Br=r,Vr=null);break;case`focusout`:Vr=Br=zr=null;break;case`mousedown`:Hr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Hr=!1,Ur(o,n,i);break;case`selectionchange`:if(Rr)break;case`keydown`:case`keyup`:Ur(o,n,i)}var b;if(tr)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else lr?sr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(ir&&n.locale!==`ko`&&(lr||x!==`onCompositionStart`?x===`onCompositionEnd`&&lr&&(b=Tn()):(Sn=i,Cn=`value`in Sn?Sn.value:Sn.textContent,lr=!0)),y=Od(r,x),0<y.length&&(x=new Hn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=cr(n),b!==null&&(x.data=b)))),(b=rr?ur(e,n):dr(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new Hn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),gd(o,e,r,n,i)}xd(o,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=vn(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=vn(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=vn(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=vn(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
10`).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&tn(e,``+r);break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:an(e,r,o);break;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=ln(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,i.name,i,null),Fd(e,t,`formEncType`,i.formEncType,i,null),Fd(e,t,`formMethod`,i.formMethod,i,null),Fd(e,t,`formTarget`,i.formTarget,i,null)):(Fd(e,t,`encType`,i.encType,i,null),Fd(e,t,`method`,i.method,i,null),Fd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=ln(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=un);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=ln(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:X(`beforetoggle`,e),X(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=sn.get(n)||n,zt(e,n,r))}}function Id(e,t,n,r,i,o){switch(n){case`style`:an(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&tn(e,``+r);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=un);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Nt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[yt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Fd(e,t,o,s,n,null)}}i&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:X(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Fd(e,t,r,d,n,null)}}Xt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in X(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Fd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Qt(e,!!r,n,!0):Qt(e,!!r,t,!1);return;case`textarea`:for(s in X(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Fd(e,t,s,c,n,null)}en(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Fd(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)X(yd[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Fd(e,t,u,r,n,null)}return;default:if(on(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Fd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Fd(e,t,p,m,r,f)}}Yt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Fd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Fd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Qt(e,!!n,n?[]:``,!1):Qt(e,!!n,t,!0)):Qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Fd(e,t,s,i,r,o)}$t(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Fd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Fd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Fd(e,t,u,p,r,m)}return;default:if(on(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);
vendor: 4,463 bytes, line 10
10for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e===qd?!1:(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Tt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),Et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Tt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;
vendor: 17,788 bytes, line 10
10e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Et(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=T.d;T.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=Cu();return e||t}function Sf(e){var t=Ot(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),jt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),jt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=h({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),jt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=At(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);jt(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=At(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=h({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),jt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=At(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),jt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var i=(i=ye.current)?yf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=At(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=At(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=At(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Nf(e){return`href="`+Jt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),jt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Jt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,jt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),jt(r),Ld(r,`style`,i),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Nf(n.href);var o=e.querySelector(Pf(i));if(o)return t.state.loading|=4,t.instance=o,jt(o),o;r=Ff(n),(i=_f.get(i))&&Vf(r,i),o=(e.ownerDocument||e).createElement(`link`),jt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(i=e.querySelector(Rf(o)))?(t.instance=i,jt(i),i):(r=n,(i=_f.get(o))&&(r=h({},n),Hf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),jt(i),Ld(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Tt]||a[vt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,jt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),jt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:C,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){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=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=_i(3,null,null,t),e.current=a,a.stateNode=e,t=ga(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ya(a),e}function ip(e){return e?(e=hi,e):hi}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Qa(e,r,t),n!==null&&(vu(n,e,t),$a(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=fi(e,67108864);t!==null&&vu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=gu();t=pt(t);var n=fi(e,t);n!==null&&vu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=2,pp(e,t,n,r)}finally{T.p=a,w.T=i}}function fp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=8,pp(e,t,n,r)}finally{T.p=a,w.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=Ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}ad(a),!(G&6)&&(iu=Le()+500,od(0,!1))}}break;case 31:case 13:s=fi(a,2),s!==null&&vu(s,a,2),Cu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=fn(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=Dt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(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(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ot(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=Dt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,gt(e.priority,function(){lp(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,gt(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);dn=r,n.target.dispatchEvent(r),dn=null}else return t=Ot(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}
10function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,t){e.blockedOn===t&&(e.blockedOn=null,vp||(vp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=Ot(n);a!==null&&(e.splice(t,3),t-=3,U(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[yt]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[yt]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;ap(n,gu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),Cu(),t[bt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ht();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=r.version;if(Bp!==`19.2.7`)throw Error(a(527,Bp,`19.2.7`));T.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:w,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Ke=Hp.inject(Vp),qe=Hp}catch{}}t.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,i,s,c,Lp),e[bt]=t.current,wd(e),new Rp(t)}})),f=r(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=d()})),p=a(e(),1),m=f(),h=`modulepreload`,g=function(e){return`/`+e},_={},v=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=g(t,n),t in _)return;_[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:h,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n
10)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},y=`popstate`;function b(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function x(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ne(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:re(t)}return ae(t,n,null,e)}function S(e,t){if(e===!1||e==null)throw Error(t)}function C(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ee(){return Math.random().toString(36).substring(2,10)}function te(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ne(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ie(t):t,state:n,key:t&&t.key||r||ee(),mask:i}}function re({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ie(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ae(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=b(e)?e:ne(h.location,e,t);n&&n(r,e),l=u()+1;let d=te(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=b(e)?e:ne(h.location,e,t);n&&n(r,e),l=u();let i=te(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return oe(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(y,d),c=e,()=>{i.removeEventListener(y,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function oe(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),S(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:re(t);return i=i.replace(/ $/,`%20`),!n&&i.startsWith(`//`)&&(i=r+i),new URL(i,r)}function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r,i){let a=we((typeof t==`string`?ie(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ue(e),s=null,c=Ce(a);for(let e=0;s==null&&e<o.length;++e)s=be(o[e],c,r);return s}function le(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ue(e){let t=de(e);return T(t),t}function de(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;S(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ne([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(S(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),de(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ve(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);
10else for(let n of w(e.path))a(e,t,!0,n)}),t}function w(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=w(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function T(e){e.sort((e,t)=>e.score===t.score?ye(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var fe=/^:[\w-]+$/,pe=3,me=2,he=1,ge=10,E=-2,_e=e=>e===`*`;function ve(e,t){let n=e.split(`/`),r=n.length;return n.some(_e)&&(r+=E),t&&(r+=me),n.filter(e=>!_e(e)).reduce((e,t)=>e+(fe.test(t)?pe:t===``?he:ge),r)}function ye(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function be(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=xe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=xe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
10Object.assign(i,u.params),o.push({params:i,pathname:Ne([a,u.pathname]),pathnameBase:Fe(Ne([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Ne([a,u.pathnameBase]))}return o}function xe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Se(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Se(e,t=!1,n=!0){C(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ce(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function we(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var Te=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ee(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ie(e):e,a;return n?(n=Me(n),a=n.startsWith(`/`)?De(n.substring(1),`/`):De(n,t)):a=t,{pathname:a,search:Ie(r),hash:Le(i)}}function De(e,t){let n=Pe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Oe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ke(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ae(e){let t=ke(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function je(e,t,n,r=!1){let i;typeof e==`string`?i=ie(e):(i={...e},S(!i.pathname||!i.pathname.includes(`?`),Oe(`?`,`pathname`,`search`,i)),S(!i.pathname||!i.pathname.includes(`#`),Oe(`#`,`pathname`,`hash`,i)),S(!i.search||!i.search.includes(`#`),Oe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Ee(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Me=e=>e.replace(/\/\/+/g,`/`),Ne=e=>Me(e.join(`/`)),Pe=e=>e.replace(/\/+$/,``),Fe=e=>Pe(e).replace(/^\/*/,`/`),Ie=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Le=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Re=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ze(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Be(e){return Ne(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ve=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function He(e,t){let n=e;if(typeof n!=`string`||!Te.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ve)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=we(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{C(!1,`<Link to="${n}">
10 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ue=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ue);var We=[`GET`,...Ue];new Set(We);var Ge=p.createContext(null);Ge.displayName=`DataRouter`;var Ke=p.createContext(null);Ke.displayName=`DataRouterState`;var qe=p.createContext(!1);function Je(){return p.useContext(qe)}var Ye=p.createContext({isTransitioning:!1});Ye.displayName=`ViewTransition`;var Xe=p.createContext(new Map);Xe.displayName=`Fetchers`;var Ze=p.createContext(null);Ze.displayName=`Await`;var Qe=p.createContext(null);Qe.displayName=`Navigation`;var $e=p.createContext(null);$e.displayName=`Location`;var et=p.createContext({outlet:null,matches:[],isDataRoute:!1});et.displayName=`Route`;var tt=p.createContext(null);tt.displayName=`RouteError`;var nt=`REACT_ROUTER_ERROR`,rt=`REDIRECT`,it=`ROUTE_ERROR_RESPONSE`;function at(e){if(e.startsWith(`${nt}:${rt}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function ot(e){if(e.startsWith(`${nt}:${it}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Re(t.status,t.statusText,t.data)}catch{}}function st(e,{relative:t}={}){S(ct(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=p.useContext(Qe),{hash:i,pathname:a,search:o}=mt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ne([n,a])),r.createHref({pathname:s,search:o,hash:i})}function ct(){return p.useContext($e)!=null}function lt(){return S(ct(),`useLocation() may be used only in the context of a <Router> component.`),p.useContext($e).location}var ut=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function dt(e){p.useContext(Qe).static||p.useLayoutEffect(e)}function ft(){let{isDataRoute:e}=p.useContext(et);return e?Nt():pt()}function pt(){S(ct(),`useNavigate() may be used only in the context of a <Router> component.`);let e=p.useContext(Ge),{basename:t,navigator:n}=p.useContext(Qe),{matches:r}=p.useContext(et),{pathname:i}=lt(),a=JSON.stringify(Ae(r)),o=p.useRef(!1);return dt(()=>{o.current=!0}),p.useCallback((r,s={})=>{if(C(o.current,ut),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=je(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ne([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}p.createContext(null);function mt(e,{relative:t}={}){let{matches:n}=p.useContext(et),{pathname:r}=lt(),i=JSON.stringify(Ae(n));return p.useMemo(()=>je(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ht(e,t){return gt(e,t)}function gt(e,t,n){S(ct(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=p.useContext(Qe),{matches:i}=p.useContext(et),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Ft(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
12Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=lt(),d;if(t){let e=typeof t==`string`?ie(t):t;S(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,m=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):se(e,{pathname:m});C(l||h!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),C(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Ct(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ne([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ne([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?p.createElement($e.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},g):g}function _t(){let e=Mt(),t=ze(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=p.createElement(p.Fragment,null,p.createElement(`p`,null,`💿 Hey developer 👋`),p.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,p.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,p.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),p.createElement(p.Fragment,null,p.createElement(`h2`,null,`Unexpected Application 
12Error!`),p.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?p.createElement(`pre`,{style:i},n):null,o)}var vt=p.createElement(_t,null),yt=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=ot(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:p.createElement(et.Provider,{value:this.props.routeContext},p.createElement(tt.Provider,{value:e,children:this.props.component}));return this.context?p.createElement(xt,{error:e},t):t}};yt.contextType=qe;var bt=new WeakMap;function xt({children:e,error:t}){let{basename:n}=p.useContext(Qe);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=at(t.digest);if(e){let r=bt.get(t);if(r)throw r;let i=He(e.location,n);if(Ve&&!bt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw bt.set(t,n),n}return p.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function St({routeContext:e,match:t,children:n}){let r=p.useContext(Ge);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(et.Provider,{value:e},n)}function Ct(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Be(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,m=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||vt,o&&(s<0&&c===0?(Ft(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,m=null):s===c&&(d=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?m:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:e,p.createElement(St,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?p.createElement(yt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function wt(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tt(e){let t=p.useContext(Ge);return S(t,wt(e)),t}function Et(e){let t=p.useContext(Ke);return S(t,wt(e)),t}function Dt(e){let t=p.useContext(et);return S(t,wt(e)),t}function Ot(e){let t=Dt(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function kt(){return Ot(`useRouteId`)}function At(){let e=Et(`useNavigation`);return p.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function jt(){let{matches:e,loaderData:t}=Et(`useMatches`);return p.useMemo(()=>e.map(e=>le(e,t)),[e,t])}function Mt(){let e=p.useContext(tt),t=Et(`useRouteError`),n=Ot(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Nt(){let{router:e}=Tt(`useNavigate`),t=Ot(`useNavigate`),n=p.useRef(!1);return dt(()=>{n.current=!0}),p.useCallback(async(r,i={})=>{C(n.current,ut),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Pt={};function Ft(e,t,n){!t&&!Pt[e]&&(Pt[e]=!0,C(!1,n))}p.memo(It);function It({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return gt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Lt({to:e,replace:t,state:n,relative:r}){S(ct(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=p.useContext(Qe);C(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=p.useContext(et),{pathname:o}=lt(),s=ft(),c=je(e,Ae(a),o,r===`path`),l=JSON.stringify(c);return p.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function D(e){S(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Rt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){S(!ct(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=p.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ie(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:m=`default`,mask:h}=n,g=p.useMemo(()=>{let e=we(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:m,mask:h},navigationType:r}},[s,l,u,d,f,m,r,h]);
12return C(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:p.createElement(Qe.Provider,{value:c},p.createElement($e.Provider,{children:t,value:g}))}function zt({children:e,location:t}){return ht(Bt(e),t)}p.Component;function Bt(e,t=[]){let n=[];return p.Children.forEach(e,(e,r)=>{if(!p.isValidElement(e))return;let i=[...t,r];if(e.type===p.Fragment){n.push.apply(n,Bt(e.props.children,i));return}S(e.type===D,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),S(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Bt(e.props.children,i)),n.push(a)}),n}var Vt=`get`,O=`application/x-www-form-urlencoded`;function Ht(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ut(e){return Ht(e)&&e.tagName.toLowerCase()===`button`}function Wt(e){return Ht(e)&&e.tagName.toLowerCase()===`form`}function Gt(e){return Ht(e)&&e.tagName.toLowerCase()===`input`}function Kt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qt(e,t){return e.button===0&&(!t||t===`_self`)&&!Kt(e)}var Jt=null;function Yt(){if(Jt===null)try{new FormData(document.createElement(`form`),0),Jt=!1}catch{Jt=!0}return Jt}var Xt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Zt(e){return e!=null&&!Xt.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${O}"`),null):e}function Qt(e,t){let n,r,i,a,o;if(Wt(e)){let o=e.getAttribute(`action`);r=o?we(o,t):null,n=e.getAttribute(`method`)||Vt,i=Zt(e.getAttribute(`enctype`))||O,a=new FormData(e)}else if(Ut(e)||Gt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?we(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Vt,i=Zt(e.getAttribute(`formenctype`))||Zt(o.getAttribute(`enctype`))||O,a=new FormData(o,e),!Yt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Ht(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Vt,r=null,i=O,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var $t={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},en=/[&><\u2028\u2029]/g;function tn(e){return e.replace(en,e=>$t[e])}function nn(e,t){if(e===!1||e==null)throw Error(t)}function rn(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&we(i.pathname,t)===`/`?i.pathname=`${Pe(t)}/_root.${r}`:i.pathname=`${Pe(i.pathname)}.${r}`,i}async function an(e,t){if(e.id in t)return t[e.id];try{let n=await v(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function on(e){return e!=null&&typeof e.page==`string`}function sn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function cn(e,t,n){return pn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await an(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(sn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ln(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>
12o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function un(e,t,{includeHydrateFallback:n}={}){return dn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function dn(e){return[...new Set(e)]}function fn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function pn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!on(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(fn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function mn(){let e=p.useContext(Ge);return nn(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function hn(){let e=p.useContext(Ke);return nn(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var gn=p.createContext(void 0);gn.displayName=`FrameworkContext`;function _n(){let e=p.useContext(gn);return nn(e,`You must render this element inside a <HydratedRouter> element`),e}function vn(e,t){let n=p.useContext(gn),[r,i]=p.useState(!1),[a,o]=p.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=p.useRef(null);p.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),p.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:yn(s,m),onBlur:yn(c,h),onMouseEnter:yn(l,m),onMouseLeave:yn(u,h),onTouchStart:yn(d,m)}]:[a,f,{}]:[!1,f,{}]}function yn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bn({page:e,...t}){let n=Je(),{router:r}=mn(),i=p.useMemo(()=>se(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?p.createElement(Sn,{page:e,matches:i,...t}):p.createElement(Cn,{page:e,matches:i,...t}):null}function xn(e){let{manifest:t,routeModules:n}=_n(),[r,i]=p.useState([]);return p.useEffect(()=>{let r=!1;return cn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Sn({page:e,matches:t,...n}){let r=lt(),{future:i}=_n(),{basename:a}=mn(),o=p.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=rn(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return p.createElement(p.Fragment,null,o.map(e=>p.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Cn({page:e,matches:t,...n}){let r=lt(),{future:i,manifest:a,routeModules:o}=_n(),{basename:s}=mn(),{loaderData:c,matches:l}=hn(),u=p.useMemo(()=>ln(e,t,l,a,r,`data`),[e,t,l,a,r]),d=p.useMemo(()=>ln(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=p.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=rn(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),m=p.useMemo(()=>un(d,a),[d,a]),h=xn(d);return p.createElement(p.Fragment,null,f.map(e=>p.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>p.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>p.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function wn(...e){return t=>
12{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}p.Component;var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Tn&&(window.__reactRouterVersion=`7.17.0`)}catch{}function En({basename:e,children:t,useTransitions:n,window:r}){let i=p.useRef();i.current??=x({window:r,v5Compat:!0});let a=i.current,[o,s]=p.useState({action:a.action,location:a.location}),c=p.useCallback(e=>{n===!1?s(e):p.startTransition(()=>s(e))},[n]);return p.useLayoutEffect(()=>a.listen(c),[a,c]),p.createElement(Rt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Dn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=p.useState({action:n.action,location:n.location}),o=p.useCallback(e=>{r===!1?a(e):p.startTransition(()=>a(e))},[r]);return p.useLayoutEffect(()=>n.listen(o),[n,o]),p.createElement(Rt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Dn.displayName=`unstable_HistoryRouter`;var On=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,k=p.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...m},h){let{basename:g,navigator:_,useTransitions:v}=p.useContext(Qe),y=typeof l==`string`&&On.test(l),b=He(l,g);l=b.to;let x=st(l,{relative:r}),S=lt(),C=null;if(o){let e=je(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:Ne([g,e.pathname])),C=_.createHref(e)}let[ee,te,ne]=vn(n,m),re=Fn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function ie(t){e&&e(t),t.defaultPrevented||re(t)}let ae=!(b.isExternal||i),oe=p.createElement(`a`,{...m,...ne,href:(ae?C:void 0)||b.absoluteURL||x,onClick:ae?ie:e,ref:wn(h,te),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return ee&&!y?p.createElement(p.Fragment,null,oe,p.createElement(bn,{page:x})):oe});k.displayName=`Link`;var kn=p.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=mt(a,{relative:c.relative}),d=lt(),f=p.useContext(Ke),{navigator:m,basename:h}=p.useContext(Qe),g=f!=null&&Gn(u)&&o===!0,_=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=we(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},ee=x?e:void 0,te;te=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let ne=typeof i==`function`?i(C):i;return p.createElement(k,{...c,"aria-current":ee,className:te,ref:l,style:ne,to:a,viewTransition:o},typeof s==`function`?s(C):s)});kn.displayName=`NavLink`;var An=p.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Vt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...m},h)=>{let{useTransitions:g}=p.useContext(Qe),_=Rn(),v=zn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&On.test(s);return p.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});g&&n!==!1?p.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});An.displayName=`Form`;function jn({getKey:e,storageKey:t,...n}){let r=p.useContext(gn),{basename:i}=p.useContext(Qe),a=lt(),o=jt();Un({getKey:e,storageKey:t});let s=p.useMemo(()=>
12{if(!r||!e)return null;let t=Hn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return p.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${tn(JSON.stringify(t||Bn))}, ${tn(JSON.stringify(s))})`}})}jn.displayName=`ScrollRestoration`;function Mn(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Nn(e){let t=p.useContext(Ge);return S(t,Mn(e)),t}function Pn(e){let t=p.useContext(Ke);return S(t,Mn(e)),t}function Fn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ft(),d=lt(),f=mt(e,{relative:o});return p.useCallback(m=>{if(qt(m,t)){m.preventDefault();let t=n===void 0?re(d)===re(f):n,h=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?p.startTransition(()=>h()):h()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var In=0,Ln=()=>`__${String(++In)}__`;function Rn(){let{router:e}=Nn(`useSubmit`),{basename:t}=p.useContext(Qe),n=kt(),r=e.fetch,i=e.navigate;return p.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Qt(e,t);a.navigate===!1?await r(a.fetcherKey||Ln(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function zn(e,{relative:t}={}){let{basename:n}=p.useContext(Qe),r=p.useContext(et);S(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...mt(e||`.`,{relative:t})},o=lt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Ne([n,a.pathname])),re(a)}var Bn=`react-router-scroll-positions`,Vn={};function Hn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:we(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Un({getKey:e,storageKey:t}={}){let{router:n}=Nn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Pn(`useScrollRestoration`),{basename:a}=p.useContext(Qe),o=lt(),s=jt(),c=At();p.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Wn(p.useCallback(()=>{if(c.state===`idle`){let t=Hn(o,s,a,e);Vn[t]=window.scrollY}try{sessionStorage.setItem(t||Bn,JSON.stringify(Vn))}catch(e){C(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(p.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Bn);e&&(Vn=JSON.parse(e))}catch{}},[t]),p.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Vn,()=>window.scrollY,e?(t,n)=>Hn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),p.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{C(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Wn(e,t){let{capture:n}=t||{};p.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Gn(e,{relative:t}={}){let n=p.useContext(Ye);S(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Nn(`useViewTransitionState`),i=mt(e,{relative:t});if(!n.isTransitioning)return!1;let a=we(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=we(n.nextLocation.pathname,r)||n.nextLocation.pathname;return xe(i.pathname,o)!=null||xe(i.pathname,a)!=null}var Kn=t(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),qn=t(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Jn=t(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),Yn=t(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Xn=t(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Zn=t(`briefcase`,[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}
12],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),Qn=t(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),$n=t(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),er=t(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),tr=t(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),nr=t(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),rr=t(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ir=t(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ar=t(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),or=t(`graduation-cap`,[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]),sr=t(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),cr=t(`lock-open`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`,key:`1mm8w8`}]]),lr=t(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ur=t(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),dr=t(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),fr=t(`message-square-quote`,[[`path`,{d:`M14 14a2 2 0 0 0 2-2V8h-2`,key:`1r06pg`}],[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M8 14a2 2 0 0 0 2-2V8H8`,key:`1jzu5j`}]]),pr=t(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),mr=t(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),hr=t(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),gr=t(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),_r=t(`phone-call`,[[`path`,{d:`M13 2a9 9 0 0 1 9 9`,key:`1itnx2`}],[`path`,{d:`M13 6a5 5 0 0 1 5 5`,key:`11nki7`}],[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),vr=t(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),yr=t(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),br=t(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),xr=t(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Sr=t(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Cr=t(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 
121.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),wr=t(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Tr=t(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Er=t(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Dr=t(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Or=t(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),kr=t(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),Ar=t(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),jr=()=>void 0,Mr=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)==56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},Nr=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let a=e[n++];t[r++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){let a=e[n++],o=e[n++],s=e[n++],c=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{let a=e[n++],o=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return t.join(``)},Pr={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`,get ENCODED_VALS(){return this.ENCODED_VALS_BASE+`+/=`},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+`-_.`},HAS_NATIVE_SUPPORT:typeof atob==`function`,encodeByteArray(e,t){if(!Array.isArray(e))throw Error(`encodeByteArray takes an array as a parameter`);this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],a=t+1<e.length,o=a?e[t+1]:0,s=t+2<e.length,c=s?e[t+2]:0,l=i>>2,u=(i&3)<<4|o>>4,d=(o&15)<<2|c>>6,f=c&63;s||(f=64,a||(d=64)),r.push(n[l],n[u],n[d],n[f])}return r.join(``)},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Mr(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):Nr(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let i=n[e.charAt(t++)],a=t<e.length?n[e.charAt(t)]:0;++t;let o=t<e.length?n[e.charAt(t)]:64;++t;let s=t<e.length?n[e.charAt(t)]:64;if(++t,i==null||a==null||o==null||s==null)throw new Fr;let c=i<<2|a>>4;if(r.push(c),o!==64){let e=a<<4&240|o>>2;if(r.push(e),s!==64){let e=o<<6&192|s;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}}
12,Fr=class extends Error{constructor(){super(...arguments),this.name=`DecodeBase64StringError`}},Ir=function(e){let t=Mr(e);return Pr.encodeByteArray(t,!0)},Lr=function(e){return Ir(e).replace(/\./g,``)},Rr=function(e){try{return Pr.decodeString(e,!0)}catch(e){console.error(`base64Decode failed: `,e)}return null};function zr(){if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`Unable to locate global object.`)}var Br=()=>zr().__FIREBASE_DEFAULTS__,Vr=()=>{if(typeof process>`u`)return;let e={}.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Hr=()=>{if(typeof document>`u`)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=e&&Rr(e[1]);return t&&JSON.parse(t)},Ur=()=>{try{return jr()||Br()||Vr()||Hr()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},Wr=e=>Ur()?.emulatorHosts?.[e],Gr=e=>{let t=Wr(e);if(!t)return;let n=t.lastIndexOf(`:`);if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return t[0]===`[`?[t.substring(1,n-1),r]:[t.substring(0,n),r]},Kr=()=>Ur()?.config,qr=e=>Ur()?.[`_${e}`],Jr=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),typeof e==`function`&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,n))}}};function Yr(e,t){if(e.uid)throw Error(`The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.`);let n={alg:`none`,type:`JWT`},r=t||`demo-project`,i=e.iat||0,a=e.sub||e.user_id;if(!a)throw Error(`mockUserToken must contain 'sub' or 'user_id' field!`);let o={iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:a,user_id:a,firebase:{sign_in_provider:`custom`,identities:{}},...e};return[Lr(JSON.stringify(n)),Lr(JSON.stringify(o)),``].join(`.`)}function Xr(){return typeof navigator<`u`&&typeof navigator.userAgent==`string`?navigator.userAgent:``}function Zr(){return typeof window<`u`&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Xr())}function Qr(){let e=Ur()?.forceEnvironment;if(e===`node`)return!0;if(e===`browser`)return!1;try{return Object.prototype.toString.call(global.process)===`[object process]`}catch{return!1}}function $r(){return typeof navigator<`u`&&navigator.userAgent===`Cloudflare-Workers`}function ei(){let e=typeof chrome==`object`?chrome.runtime:typeof browser==`object`?browser.runtime:void 0;return typeof e==`object`&&e.id!==void 0}function ti(){return typeof navigator==`object`&&navigator.product===`ReactNative`}function ni(){let e=Xr();return e.indexOf(`MSIE `)>=0||e.indexOf(`Trident/`)>=0}function ri(){return!Qr()&&!!navigator.userAgent&&navigator.userAgent.includes(`Safari`)&&!navigator.userAgent.includes(`Chrome`)}function ii(){try{return typeof indexedDB==`object`}catch{return!1}}function ai(){return new Promise((e,t)=>{try{let n=!0,r=`validate-browser-context-for-indexeddb-analytics-module`,i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{t(i.error?.message||``)}}catch(e){t(e)}})}var oi=`FirebaseError`,si=class e extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=oi,Object.setPrototypeOf(this,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ci.prototype.create)}},ci=class{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?li(i,n):`Error`;return new si(r,`${this.serviceName}: ${a} (${r}).`,n)}};function li(e,t){return e.replace(ui,(e,n)=>{let r=t[n];return r==null?`<${n}?>`:String(r)})}var ui=/\{\$([^}]+)}/g;function di(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function fi(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);for(let i of n){if(!r.includes(i))return!1;let n=e[i],a=t[i];if(pi(n)&&pi(a)){if(!fi(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}function pi(e){return typeof e==`object`&&!!e}function mi(e){let t=[];
12for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+`=`+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+`=`+encodeURIComponent(r));return t.length?`&`+t.join(`&`):``}function hi(e){let t={};return e.replace(/^\?/,``).split(`&`).forEach(e=>{if(e){let[n,r]=e.split(`=`);t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function gi(e){let t=e.indexOf(`?`);if(!t)return``;let n=e.indexOf(`#`,t);return e.substring(t,n>0?n:void 0)}function _i(e,t){let n=new vi(e,t);return n.subscribe.bind(n)}var vi=class{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(e===void 0&&t===void 0&&n===void 0)throw Error(`Missing Observer.`);r=yi(e,[`next`,`error`,`complete`])?e:{next:e,error:t,complete:n},r.next===void 0&&(r.next=bi),r.error===void 0&&(r.error=bi),r.complete===void 0&&(r.complete=bi);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),i}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],--this.observerCount,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(e){typeof console<`u`&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function yi(e,t){if(typeof e!=`object`||!e)return!1;for(let n of t)if(n in e&&typeof e[n]==`function`)return!0;return!1}function bi(){}function xi(e){return e&&e._delegate?e._delegate:e}function Si(e){try{return(e.startsWith(`http://`)||e.startsWith(`https://`)?new URL(e).hostname:e).endsWith(`.cloudworkstations.dev`)}catch{return!1}}async function Ci(e){return(await fetch(e,{credentials:`include`})).ok}var wi=class{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode=`LAZY`,this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}},Ti=`[DEFAULT]`,Ei=class{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new Jr;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),n=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}else if(n)return null;else throw Error(`Service ${this.name} is not available`)}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(Oi(e))try{this.getOrInitializeService({instanceIdentifier:Ti})}catch{}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch{}}}}clearInstance(e=Ti){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>`INTERNAL`in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>`_delete`in e).map(e=>e._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Ti){return this.instances.has(e)}getOptions(e=Ti){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){let n=this.normalizeInstanceIdentifier(t),r=this.onInitCallbacks.get(n)??new Set;r.add(e),this.onInitCallbacks.set(n,r);let i=this.instances.get(n);return i&&e(i,n),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:Di(e),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=Ti){return this.component?this.component.multipleInstances?e:Ti:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!==`EXPLICIT`}};function Di(e){return e===Ti?void 0:e}function Oi(e){return e.instantiationMode===`EAGER`}var ki=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new Ei(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}},Ai=[],A;(function(e){e[e.DEBUG=0]=`DEBUG`,e[e.VERBOSE=1]=`VERBOSE`,e[e.INFO=2]=`INFO`,e[e.WARN=3]=`WARN`,e[e.ERROR=4]=`ERROR`,e[e.SILENT=5]=`SILENT`})(A||={});var ji={debug:A.DEBUG,verbose:A.VERBOSE,info:A.INFO,warn:A.WARN,error:A.ERROR,silent:A.SILENT},Mi=A.INFO,Ni={[A.DEBUG]:`log`,[A.VERBOSE]:`log`,[A.INFO]:`info`,[A.WARN]:`warn`,[A.ERROR]:`error`},Pi=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=Ni[t];if(i)console[i](`[${r}]  ${e.name}:`,...n);
vendor: 14,061 bytes, line 12
12else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)},Fi=class{constructor(e){this.name=e,this._logLevel=Mi,this._logHandler=Pi,this._userLogHandler=null,Ai.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in A))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e==`string`?ji[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!=`function`)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,A.DEBUG,...e),this._logHandler(this,A.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,A.VERBOSE,...e),this._logHandler(this,A.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,A.INFO,...e),this._logHandler(this,A.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,A.WARN,...e),this._logHandler(this,A.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,A.ERROR,...e),this._logHandler(this,A.ERROR,...e)}},Ii=(e,t)=>t.some(t=>e instanceof t),Li,Ri;function zi(){return Li||=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]}function Bi(){return Ri||=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]}var Vi=new WeakMap,Hi=new WeakMap,j=new WeakMap,Ui=new WeakMap,Wi=new WeakMap;function Gi(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`success`,i),e.removeEventListener(`error`,a)},i=()=>{t(Zi(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener(`success`,i),e.addEventListener(`error`,a)});return t.then(t=>{t instanceof IDBCursor&&Vi.set(t,e)}).catch(()=>{}),Wi.set(t,e),t}function Ki(e){if(Hi.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`complete`,i),e.removeEventListener(`error`,a),e.removeEventListener(`abort`,a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException(`AbortError`,`AbortError`)),r()};e.addEventListener(`complete`,i),e.addEventListener(`error`,a),e.addEventListener(`abort`,a)});Hi.set(e,t)}var qi={get(e,t,n){if(e instanceof IDBTransaction){if(t===`done`)return Hi.get(e);if(t===`objectStoreNames`)return e.objectStoreNames||j.get(e);if(t===`store`)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Zi(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t===`done`||t===`store`)?!0:t in e}};function Ji(e){qi=e(qi)}function Yi(e){return e===IDBDatabase.prototype.transaction&&!(`objectStoreNames`in IDBTransaction.prototype)?function(t,...n){let r=e.call(Qi(this),t,...n);return j.set(r,t.sort?t.sort():[t]),Zi(r)}:Bi().includes(e)?function(...t){return e.apply(Qi(this),t),Zi(Vi.get(this))}:function(...t){return Zi(e.apply(Qi(this),t))}}function Xi(e){return typeof e==`function`?Yi(e):(e instanceof IDBTransaction&&Ki(e),Ii(e,zi())?new Proxy(e,qi):e)}function Zi(e){if(e instanceof IDBRequest)return Gi(e);if(Ui.has(e))return Ui.get(e);let t=Xi(e);return t!==e&&(Ui.set(e,t),Wi.set(t,e)),t}var Qi=e=>Wi.get(e);function $i(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){let o=indexedDB.open(e,t),s=Zi(o);return r&&o.addEventListener(`upgradeneeded`,e=>{r(Zi(o.result),e.oldVersion,e.newVersion,Zi(o.transaction),e)}),n&&o.addEventListener(`blocked`,e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{a&&e.addEventListener(`close`,()=>a()),i&&e.addEventListener(`versionchange`,e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}var ea=[`get`,`getKey`,`getAll`,`getAllKeys`,`count`],ta=[`put`,`add`,`delete`,`clear`],na=new Map;function ra(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==`string`))return;if(na.get(t))return na.get(t);let n=t.replace(/FromIndex$/,``),r=t!==n,i=ta.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ea.includes(n)))return;let a=async function(e,...t){let a=this.transaction(e,i?`readwrite`:`readonly`),o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return na.set(t,a),a}Ji(e=>({...e,get:(t,n,r)=>ra(t,n)||e.get(t,n,r),has:(t,n)=>!!ra(t,n)||e.has(t,n)}));var ia=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(aa(e)){let t=e.getImmediate();return`${t.library}/${t.version}`}else return null}).filter(e=>e).join(` `)}};function aa(e){return e.getComponent()?.type===`VERSION`}var oa=`@firebase/app`,sa=`0.14.13`,ca=new Fi(`@firebase/app`),la=`@firebase/app-compat`,ua=`@firebase/analytics-compat`,da=`@firebase/analytics`,fa=`@firebase/app-check-compat`,pa=`@firebase/app-check`,ma=`@firebase/auth`,ha=`@firebase/auth-compat`,ga=`@firebase/database`,_a=`@firebase/data-connect`,va=`@firebase/database-compat`,ya=`@firebase/functions`,ba=`@firebase/functions-compat`,xa=`@firebase/installations`,Sa=`@firebase/installations-compat`,Ca=`@firebase/messaging`,wa=`@firebase/messaging-compat`,Ta=`@firebase/performance`,Ea=`@firebase/performance-compat`,Da=`@firebase/remote-config`,Oa=`@firebase/remote-config-compat`,ka=`@firebase/storage`,Aa=`@firebase/storage-compat`,ja=`@firebase/firestore`,Ma=`@firebase/ai`,Na=`@firebase/firestore-compat`,Pa=`firebase`,Fa=`12.14.0`,Ia=`[DEFAULT]`,La={[oa]:`fire-core`,[la]:`fire-core-compat`,[da]:`fire-analytics`,[ua]:`fire-analytics-compat`,[pa]:`fire-app-check`,[fa]:`fire-app-check-compat`,[ma]:`fire-auth`,[ha]:`fire-auth-compat`,[ga]:`fire-rtdb`,[_a]:`fire-data-connect`,[va]:`fire-rtdb-compat`,[ya]:`fire-fn`,[ba]:`fire-fn-compat`,[xa]:`fire-iid`,[Sa]:`fire-iid-compat`,[Ca]:`fire-fcm`,[wa]:`fire-fcm-compat`,[Ta]:`fire-perf`,[Ea]:`fire-perf-compat`,[Da]:`fire-rc`,[Oa]:`fire-rc-compat`,[ka]:`fire-gcs`,[Aa]:`fire-gcs-compat`,[ja]:`fire-fst`,[Na]:`fire-fst-compat`,[Ma]:`fire-vertex`,"fire-js":`fire-js`,[Pa]:`fire-js-all`},Ra=new Map,za=new Map,Ba=new Map;function Va(e,t){try{e.container.addComponent(t)}catch(n){ca.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Ha(e){let t=e.name;if(Ba.has(t))return ca.debug(`There were multiple attempts to register component ${t}.`),!1;Ba.set(t,e);for(let t of Ra.values())Va(t,e);for(let t of za.values())Va(t,e);return!0}function Ua(e,t){let n=e.container.getProvider(`heartbeat`).getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Wa(e){return e==null?!1:e.settings!==void 0}var Ga=new ci(`app`,`Firebase`,{"no-app":`No Firebase App '{$appName}' has been created - call initializeApp() first`,"bad-app-name":`Illegal App name: '{$appName}'`,"duplicate-app":`Firebase App named '{$appName}' already exists with different options or config`,"app-deleted":`Firebase App named '{$appName}' already deleted`,"server-app-deleted":`Firebase Server App has been deleted`,"no-options":`Need to provide options, when not being deployed to hosting via source.`,"invalid-app-argument":`firebase.{$appName}() takes either no argument or a Firebase App instance.`,"invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":`Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.`,"idb-get":`Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.`,"idb-set":`Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.`,"idb-delete":`Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.`,"finalization-registry-not-supported":`FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.`,"invalid-server-app-environment":`FirebaseServerApp is not for use in browser environments.`}),Ka=class{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new wi(`app`,()=>this,`PUBLIC`))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Ga.create(`app-deleted`,{appName:this._name})}},qa=Fa;function Ja(e,t={}){let n=e;typeof t!=`object`&&(t={name:t});let r={name:Ia,automaticDataCollectionEnabled:!0,...t},i=r.name;if(typeof i!=`string`||!i)throw Ga.create(`bad-app-name`,{appName:String(i)});if(n||=Kr(),!n)throw Ga.create(`no-options`);let a=Ra.get(i);if(a){if(fi(n,a.options)&&fi(r,a.config))return a;throw Ga.create(`duplicate-app`,{appName:i})}let o=new ki(i);for(let e of Ba.values())o.addComponent(e);let s=new Ka(n,r,o);return Ra.set(i,s),s}function Ya(e=Ia){let t=Ra.get(e);if(!t&&e===`[DEFAULT]`&&Kr())return Ja();if(!t)throw Ga.create(`no-app`,{appName:e});return t}function Xa(){return Array.from(Ra.values())}function Za(e,t,n){let r=La[e]??e;n&&(r+=`-${n}`);let i=r.match(/\s|\//),a=t.match(/\s|\//);if(i||a){let e=[`Unable to register library "${r}" with version "${t}":`];i&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&a&&e.push(`and`),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),ca.warn(e.join(` `));return}Ha(new wi(`${r}-version`,()=>({library:r,version:t}),`VERSION`))}var Qa=`firebase-heartbeat-database`,$a=1,eo=`firebase-heartbeat-store`,to=null;function no(){return to||=$i(Qa,$a,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(eo)}catch(e){console.warn(e)}}}}).catch(e=>{throw Ga.create(`idb-open`,{originalErrorMessage:e.message})}),to}async function ro(e){try{let t=(await no()).transaction(eo),n=await t.objectStore(eo).get(ao(e));return await t.done,n}catch(e){if(e instanceof si)ca.warn(e.message);else{let t=Ga.create(`idb-get`,{originalErrorMessage:e?.message});ca.warn(t.message)}}}async function io(e,t){try{let n=(await no()).transaction(eo,`readwrite`);await n.objectStore(eo).put(t,ao(e)),await n.done}catch(e){if(e instanceof si)ca.warn(e.message);else{let t=Ga.create(`idb-set`,{originalErrorMessage:e?.message});ca.warn(t.message)}}}function ao(e){return`${e.name}!${e.options.appId}`}var oo=1024,so=30,co=class{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider(`app`).getImmediate();this._storage=new fo(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider(`platform-logger`).getImmediate().getPlatformInfoString(),t=lo();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>so){let e=mo(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){ca.warn(e)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return``;let e=lo(),{heartbeatsToSend:t,unsentEntries:n}=uo(this._heartbeatsCache.heartbeats),r=Lr(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}catch(e){return ca.warn(e),``}}};function lo(){return new Date().toISOString().substring(0,10)}function uo(e,t=oo){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(!e){if(n.push({agent:i.agent,dates:[i.date]}),po(n)>t){n.pop();break}}else if(e.dates.push(i.date),po(n)>t){e.dates.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}var fo=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return ii()?ai().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let e=await ro(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return io(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return io(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}else return}};function po(e){return Lr(JSON.stringify({version:2,heartbeats:e})).length}function mo(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}function ho(e){Ha(new wi(`platform-logger`,e=>new ia(e),`PRIVATE`)),Ha(new wi(`heartbeat`,e=>new co(e),`PRIVATE`)),Za(oa,sa,e),Za(oa,sa,`esm2020`),Za(`fire-js`,``)}ho(``);var go=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},_o={},vo,yo;(function(){var e;function t(e,t){function n(){}n.prototype=t.prototype,e.F=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.D=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.C=Array(this.blockSize),this.o=this.h=0,this.u()}
12t(r,n),r.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(e,t,n){n||=0;let r=Array(16);if(typeof t==`string`)for(var i=0;i<16;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;i<16;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];let a=e.g[3],o;o=t+(a^n&(i^a))+r[0]+3614090360&4294967295,t=n+(o<<7&4294967295|o>>>25),o=a+(i^t&(n^i))+r[1]+3905402710&4294967295,a=t+(o<<12&4294967295|o>>>20),o=i+(n^a&(t^n))+r[2]+606105819&4294967295,i=a+(o<<17&4294967295|o>>>15),o=n+(t^i&(a^t))+r[3]+3250441966&4294967295,n=i+(o<<22&4294967295|o>>>10),o=t+(a^n&(i^a))+r[4]+4118548399&4294967295,t=n+(o<<7&4294967295|o>>>25),o=a+(i^t&(n^i))+r[5]+1200080426&4294967295,a=t+(o<<12&4294967295|o>>>20),o=i+(n^a&(t^n))+r[6]+2821735955&4294967295,i=a+(o<<17&4294967295|o>>>15),o=n+(t^i&(a^t))+r[7]+4249261313&4294967295,n=i+(o<<22&4294967295|o>>>10),o=t+(a^n&(i^a))+r[8]+1770035416&4294967295,t=n+(o<<7&4294967295|o>>>25),o=a+(i^t&(n^i))+r[9]+2336552879&4294967295,a=t+(o<<12&4294967295|o>>>20),o=i+(n^a&(t^n))+r[10]+4294925233&4294967295,i=a+(o<<17&4294967295|o>>>15),o=n+(t^i&(a^t))+r[11]+2304563134&4294967295,n=i+(o<<22&4294967295|o>>>10),o=t+(a^n&(i^a))+r[12]+1804603682&4294967295,t=n+(o<<7&4294967295|o>>>25),o=a+(i^t&(n^i))+r[13]+4254626195&4294967295,a=t+(o<<12&4294967295|o>>>20),o=i+(n^a&(t^n))+r[14]+2792965006&4294967295,i=a+(o<<17&4294967295|o>>>15),o=n+(t^i&(a^t))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=t+(i^a&(n^i))+r[1]+4129170786&4294967295,t=n+(o<<5&4294967295|o>>>27),o=a+(n^i&(t^n))+r[6]+3225465664&4294967295,a=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(a^t))+r[11]+643717713&4294967295,i=a+(o<<14&4294967295|o>>>18),o=n+(a^t&(i^a))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^a&(n^i))+r[5]+3593408605&4294967295,t=n+(o<<5&4294967295|o>>>27),o=a+(n^i&(t^n))+r[10]+38016083&4294967295,a=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(a^t))+r[15]+3634488961&4294967295,i=a+(o<<14&4294967295|o>>>18),o=n+(a^t&(i^a))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^a&(n^i))+r[9]+568446438&4294967295,t=n+(o<<5&4294967295|o>>>27),o=a+(n^i&(t^n))+r[14]+3275163606&4294967295,a=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(a^t))+r[3]+4107603335&4294967295,i=a+(o<<14&4294967295|o>>>18),o=n+(a^t&(i^a))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^a&(n^i))+r[13]+2850285829&4294967295,t=n+(o<<5&4294967295|o>>>27),o=a+(n^i&(t^n))+r[2]+4243563512&4294967295,a=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(a^t))+r[7]+1735328473&4294967295,i=a+(o<<14&4294967295|o>>>18),o=n+(a^t&(i^a))+r[12]+2368359562&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(n^i^a)+r[5]+4294588738&4294967295,t=n+(o<<4&4294967295|o>>>28),o=a+(t^n^i)+r[8]+2272392833&4294967295,a=t+(o<<11&4294967295|o>>>21),o=i+(a^t^n)+r[11]+1839030562&4294967295,i=a+(o<<16&4294967295|o>>>16),o=n+(i^a^t)+r[14]+4259657740&4294967295,n=i+(o<<23&4294967295|o>>>9),o=t+(n^i^a)+r[1]+2763975236&4294967295,t=n+(o<<4&4294967295|o>>>28),o=a+(t^n^i)+r[4]+1272893353&4294967295,a=t+(o<<11&4294967295|o>>>21),o=i+(a^t^n)+r[7]+4139469664&4294967295,i=a+(o<<16&4294967295|o>>>16),o=n+(i^a^t)+r[10]+3200236656&4294967295,n=i+(o<<23&4294967295|o>>>9),o=t+(n^i^a)+r[13]+681279174&4294967295,t=n+(o<<4&4294967295|o>>>28),o=a+(t^n^i)+r[0]+3936430074&4294967295,a=t+(o<<11&4294967295|o>>>21),o=i+(a^t^n)+r[3]+3572445317&4294967295,i=a+(o<<16&4294967295|o>>>16),o=n+(i^a^t)+r[6]+76029189&4294967295,n=i+(o<<23&4294967295|o>>>9),o=t+(n^i^a)+r[9]+3654602809&4294967295,t=n+(o<<4&4294967295|o>>>28),o=a+(t^n^i)+r[12]+3873151461&4294967295,a=t+(o<<11&4294967295|o>>>21),o=i+(a^t^n)+r[15]+530742520&4294967295,i=a+(o<<16&4294967295|o>>>16),o=n+(i^a^t)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=t+(i^(n|~a))+r[0]+4096336452&4294967295,t=n+(o<<6&4294967295|o>>>26),o=a+(n^(t|~i))+r[7]+1126891415&4294967295,a=t+(o<<10&4294967295|o>>>22),o=i+(t^(a|~n))+r[14]+2878612391&4294967295,i=a+(o<<15&4294967295|o>>>17),o=n+(a^(i|~t))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~a))+r[12]+1700485571&4294967295,t=n+(o<<6&4294967295|o>>>26),o=a+(n^(t|~i))+r[3]+2399980690&4294967295,a=t+(o<<10&4294967295|o>>>22),o=i+(t^(a|~n))+r[10]+4293915773&4294967295,i=a+(o<<15&4294967295|o>>>17),o=n+(a^(i|~t))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~a))+r[8]+1873313359&4294967295,t=n+(o<<6&4294967295|o>>>26),o=a+(n^(t|~i))+r[15]+4264355552&4294967295,a=t+(o<<10&4294967295|o>>>22),o=i+(t^(a|~n))+r[6]+2734768916&4294967295,i=a+(o<<15&4294967295|o>>>17),o=n+(a^(i|~t))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~a))+r[4]+4149444226&4294967295,t=n+(o<<6&4294967295|o>>>
1226),o=a+(n^(t|~i))+r[11]+3174756917&4294967295,a=t+(o<<10&4294967295|o>>>22),o=i+(t^(a|~n))+r[2]+718787259&4294967295,i=a+(o<<15&4294967295|o>>>17),o=n+(a^(i|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+a&4294967295}r.prototype.v=function(e,t){t===void 0&&(t=e.length);let n=t-this.blockSize,r=this.C,a=this.h,o=0;for(;o<t;){if(a==0)for(;o<=n;)i(this,e,o),o+=this.blockSize;if(typeof e==`string`){for(;o<t;)if(r[a++]=e.charCodeAt(o++),a==this.blockSize){i(this,r),a=0;break}}else for(;o<t;)if(r[a++]=e[o++],a==this.blockSize){i(this,r),a=0;break}}this.h=a,this.o+=t},r.prototype.A=function(){var e=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;t=this.o*8;for(var n=e.length-8;n<e.length;++n)e[n]=t&255,t/=256;for(this.v(e),e=Array(16),t=0,n=0;n<4;++n)for(let r=0;r<32;r+=8)e[t++]=this.g[n]>>>r&255;return e};function a(e,t){var n=s;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}function o(e,t){this.h=t;let n=[],r=!0;for(let i=e.length-1;i>=0;i--){let a=e[i]|0;r&&a==t||(n[i]=a,r=!1)}this.g=n}var s={};function c(e){return-128<=e&&e<128?a(e,function(e){return new o([e|0],e<0?-1:0)}):new o([e|0],e<0?-1:0)}function l(e){if(isNaN(e)||!isFinite(e))return d;if(e<0)return g(l(-e));let t=[],n=1;for(let r=0;e>=n;r++)t[r]=e/n|0,n*=4294967296;return new o(t,0)}function u(e,t){if(e.length==0)throw Error(`number format error: empty string`);if(t||=10,t<2||36<t)throw Error(`radix out of range: `+t);if(e.charAt(0)==`-`)return g(u(e.substring(1),t));if(e.indexOf(`-`)>=0)throw Error(`number format error: interior "-" character`);let n=l(t**8),r=d;for(let a=0;a<e.length;a+=8){var i=Math.min(8,e.length-a);let o=parseInt(e.substring(a,a+i),t);i<8?(i=l(t**+i),r=r.j(i).add(l(o))):(r=r.j(n),r=r.add(l(o)))}return r}var d=c(0),f=c(1),p=c(16777216);e=o.prototype,e.m=function(){if(h(this))return-g(this).m();let e=0,t=1;for(let n=0;n<this.g.length;n++){let r=this.i(n);e+=(r>=0?r:4294967296+r)*t,t*=4294967296}return e},e.toString=function(e){if(e||=10,e<2||36<e)throw Error(`radix out of range: `+e);if(m(this))return`0`;if(h(this))return`-`+g(this).toString(e);let t=l(e**6);var n=this;let r=``;for(;;){let i=b(n,t).g;n=_(n,i.j(t));let a=((n.g.length>0?n.g[0]:n.h)>>>0).toString(e);if(n=i,m(n))return a+r;for(;a.length<6;)a=`0`+a;r=a+r}},e.i=function(e){return e<0?0:e<this.g.length?this.g[e]:this.h};function m(e){if(e.h!=0)return!1;for(let t=0;t<e.g.length;t++)if(e.g[t]!=0)return!1;return!0}function h(e){return e.h==-1}e.l=function(e){return e=_(this,e),h(e)?-1:+!m(e)};function g(e){let t=e.g.length,n=[];for(let r=0;r<t;r++)n[r]=~e.g[r];return new o(n,~e.h).add(f)}e.abs=function(){return h(this)?g(this):this},e.add=function(e){let t=Math.max(this.g.length,e.g.length),n=[],r=0;for(let i=0;i<=t;i++){let t=r+(this.i(i)&65535)+(e.i(i)&65535),a=(t>>>16)+(this.i(i)>>>16)+(e.i(i)>>>16);r=a>>>16,t&=65535,a&=65535,n[i]=a<<16|t}return new o(n,n[n.length-1]&-2147483648?-1:0)};function _(e,t){return e.add(g(t))}e.j=function(e){if(m(this)||m(e))return d;if(h(this))return h(e)?g(this).j(g(e)):g(g(this).j(e));if(h(e))return g(this.j(g(e)));if(this.l(p)<0&&e.l(p)<0)return l(this.m()*e.m());let t=this.g.length+e.g.length,n=[];for(var r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(let t=0;t<e.g.length;t++){let i=this.i(r)>>>16,a=this.i(r)&65535,o=e.i(t)>>>16,s=e.i(t)&65535;n[2*r+2*t]+=a*s,v(n,2*r+2*t),n[2*r+2*t+1]+=i*s,v(n,2*r+2*t+1),n[2*r+2*t+1]+=a*o,v(n,2*r+2*t+1),n[2*r+2*t+2]+=i*o,v(n,2*r+2*t+2)}for(e=0;e<t;e++)n[e]=n[2*e+1]<<16|n[2*e];for(e=t;e<2*t;e++)n[e]=0;return new o(n,0)};function v(e,t){for(;(e[t]&65535)!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function y(e,t){this.g=e,this.h=t}function b(e,t){if(m(t))throw Error(`division by zero`);if(m(e))return new y(d,d);if(h(e))return t=b(g(e),t),new y(g(t.g),g(t.h));if(h(t))return t=b(e,g(t)),new y(g(t.g),t.h);if(e.g.length>30){if(h(e)||h(t))throw Error(`slowDivide_ only works with positive integers.`);for(var n=f,r=t;r.l(e)<=0;)n=x(n),r=x(r);var i=S(n,1),a=S(r,1);for(r=S(r,2),n=S(n,2);!m(r);){var o=a.add(r);o.l(e)<=0&&(i=i.add(n),a=o),r=S(r,1),n=S(n,1)}return t=_(e,i.j(t)),new y(i,t)}for(i=d;
12e.l(t)>=0;){for(n=Math.max(1,Math.floor(e.m()/t.m())),r=Math.ceil(Math.log(n)/Math.LN2),r=r<=48?1:2**(r-48),a=l(n),o=a.j(t);h(o)||o.l(e)>0;)n-=r,a=l(n),o=a.j(t);m(a)&&(a=f),i=i.add(a),e=_(e,o)}return new y(i,e)}e.B=function(e){return b(this,e).h},e.and=function(e){let t=Math.max(this.g.length,e.g.length),n=[];for(let r=0;r<t;r++)n[r]=this.i(r)&e.i(r);return new o(n,this.h&e.h)},e.or=function(e){let t=Math.max(this.g.length,e.g.length),n=[];for(let r=0;r<t;r++)n[r]=this.i(r)|e.i(r);return new o(n,this.h|e.h)},e.xor=function(e){let t=Math.max(this.g.length,e.g.length),n=[];for(let r=0;r<t;r++)n[r]=this.i(r)^e.i(r);return new o(n,this.h^e.h)};function x(e){let t=e.g.length+1,n=[];for(let r=0;r<t;r++)n[r]=e.i(r)<<1|e.i(r-1)>>>31;return new o(n,e.h)}function S(e,t){let n=t>>5;t%=32;let r=e.g.length-n,i=[];for(let a=0;a<r;a++)i[a]=t>0?e.i(a+n)>>>t|e.i(a+n+1)<<32-t:e.i(a+n);return new o(i,e.h)}r.prototype.digest=r.prototype.A,r.prototype.reset=r.prototype.u,r.prototype.update=r.prototype.v,yo=_o.Md5=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.B,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=l,o.fromString=u,vo=_o.Integer=o}).apply(go===void 0?typeof self<`u`?self:typeof window<`u`?window:{}:go);var bo=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},xo={},M,N,So,Co,wo,To,Eo,Do;(function(){var e,t=Object.defineProperty;function n(e){e=[typeof globalThis==`object`&&globalThis,e,typeof window==`object`&&window,typeof self==`object`&&self,typeof bo==`object`&&bo];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error(`Cannot find global object`)}var r=n(this);function i(e,n){if(n)a:{var i=r;e=e.split(`.`);for(var a=0;a<e.length-1;a++){var o=e[a];if(!(o in i))break a;i=i[o]}e=e[e.length-1],a=i[e],n=n(a),n!=a&&n!=null&&t(i,e,{configurable:!0,writable:!0,value:n})}}i(`Symbol.dispose`,function(e){return e||Symbol(`Symbol.dispose`)}),i(`Array.prototype.values`,function(e){return e||function(){return this[Symbol.iterator]()}}),i(`Object.entries`,function(e){return e||function(e){var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push([n,e[n]]);return t}});var a=a||{},o=this||self;function s(e){var t=typeof e;return t==`object`&&e!=null||t==`function`}function c(e,t,n){return e.call.apply(e.bind,arguments)}function l(e,t,n){return l=c,l.apply(null,arguments)}function u(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function d(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Ob=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}var f=typeof AsyncContext<`u`&&typeof AsyncContext.Snapshot==`function`?e=>e&&AsyncContext.Snapshot.wrap(e):e=>e;function p(e){let t=e.length;if(t>0){let n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function m(e,t){for(let t=1;t<arguments.length;t++){let r=arguments[t];var n=typeof r;if(n=n==`object`?r?Array.isArray(r)?`array`:n:`null`:n,n==`array`||n==`object`&&typeof r.length==`number`){n=e.length||0;let t=r.length||0;e.length=n+t;for(let i=0;i<t;i++)e[n+i]=r[i]}else e.push(r)}}class h{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return this.h>0?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}function g(e){o.setTimeout(()=>{throw e},0)}function _(){var e=C;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}class v{constructor(){this.h=this.g=null}add(e,t){let n=y.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}var y=new h(()=>new b,e=>e.reset());class b{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let x,S=!1,C=new v,ee=()=>{let e=Promise.resolve(void 0);x=()=>{e.then(te)}};function te(){for(var e;e=_();){try{e.h.call(e.g)}catch(e){g(e)}var t=y;t.j(e),t.h<100&&(t.h++,e.next=t.g,t.g=e)}S=!1}function ne(){this.u=this.u,this.C=this.C}ne.prototype.u=!1,ne.prototype.dispose=function(){this.u||(this.u=!0,this.N())},ne.prototype[Symbol.dispose]=function(){this.dispose()},ne.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function re(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}re.prototype.h=function(){this.defaultPrevented=!0};var ie=function(){if(!o.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{let e=()=>{};o.addEventListener(`test`,e,t),o.removeEventListener(`test`,e,t)}catch{}return e}();function ae(e){return/^[\s\xa0]*$/.test(e)}function oe(e,t){re.call(this,e?e.type:``),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key=``,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType=``,this.i=null,e&&this.init(e,t)}d(oe,re),oe.prototype.init=function(e,t){let n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget,t||(n==`mouseover`?t=e.fromElement:n==`mouseout`&&(t=e.toElement)),this.relatedTarget=t,r?(this.clientX=r.clientX===void 0?r.pageX:r.clientX,this.clientY=r.clientY===void 0?r.pageY:r.clientY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=e.clientX===void 0?e.pageX:e.clientX,this.clientY=e.clientY===void 0?e.pageY:e.clientY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||``,this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=e.pointerType,this.state=e.state,this.i=e,e.defaultPrevented&&oe.Z.h.call(this)},oe.prototype.h=function(){oe.Z.h.call(this);let e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var se=`closure_listenable_`+(Math.random()*1e6|0),ce=0;function le(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++ce,this.da=this.fa=!1}function ue(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function de(e,t,n){for(let r in e)t.call(n,e[r],r,e)}function w(e,t){for(let n in e)t.call(void 0,e[n],n,e)}function T(e){let t={};for(let n in e)t[n]=e[n];return t}let fe=`constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
12ing toString valueOf`.split(` `);function pe(e,t){let n,r;for(let t=1;t<arguments.length;t++){for(n in r=arguments[t],r)e[n]=r[n];for(let t=0;t<fe.length;t++)n=fe[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function me(e){this.src=e,this.g={},this.h=0}me.prototype.add=function(e,t,n,r,i){let a=e.toString();e=this.g[a],e||(e=this.g[a]=[],this.h++);let o=ge(e,t,r,i);return o>-1?(t=e[o],n||(t.fa=!1)):(t=new le(t,this.src,a,!!r,i),t.fa=n,e.push(t)),t};function he(e,t){let n=t.type;if(n in e.g){var r=e.g[n],i=Array.prototype.indexOf.call(r,t,void 0),a;(a=i>=0)&&Array.prototype.splice.call(r,i,1),a&&(ue(t),e.g[n].length==0&&(delete e.g[n],e.h--))}}function ge(e,t,n,r){for(let i=0;i<e.length;++i){let a=e[i];if(!a.da&&a.listener==t&&a.capture==!!n&&a.ha==r)return i}return-1}var E=`closure_lm_`+(Math.random()*1e6|0),_e={};function ve(e,t,n,r,i){if(r&&r.once)return xe(e,t,n,r,i);if(Array.isArray(t)){for(let a=0;a<t.length;a++)ve(e,t[a],n,r,i);return null}return n=Oe(n),e&&e[se]?e.J(t,n,s(r)?!!r.capture:!!r,i):ye(e,t,n,!1,r,i)}function ye(e,t,n,r,i,a){if(!t)throw Error(`Invalid event type`);let o=s(i)?!!i.capture:!!i,c=Ee(e);if(c||(e[E]=c=new me(e)),n=c.add(t,n,r,o,a),n.proxy)return n;if(r=be(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)ie||(i=o),i===void 0&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(we(t.toString()),r);else if(e.addListener&&e.removeListener)e.addListener(r);else throw Error(`addEventListener and attachEvent are unavailable.`);return n}function be(){function e(n){return t.call(e.src,e.listener,n)}let t=Te;return e}function xe(e,t,n,r,i){if(Array.isArray(t)){for(let a=0;a<t.length;a++)xe(e,t[a],n,r,i);return null}return n=Oe(n),e&&e[se]?e.K(t,n,s(r)?!!r.capture:!!r,i):ye(e,t,n,!0,r,i)}function Se(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)Se(e,t[a],n,r,i);else r=s(r)?!!r.capture:!!r,n=Oe(n),e&&e[se]?(e=e.i,a=String(t).toString(),a in e.g&&(t=e.g[a],n=ge(t,n,r,i),n>-1&&(ue(t[n]),Array.prototype.splice.call(t,n,1),t.length==0&&(delete e.g[a],e.h--)))):(e&&=Ee(e))&&(t=e.g[t.toString()],e=-1,t&&(e=ge(t,n,r,i)),(n=e>-1?t[e]:null)&&Ce(n))}function Ce(e){if(typeof e!=`number`&&e&&!e.da){var t=e.src;if(t&&t[se])he(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(we(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Ee(t))?(he(n,e),n.h==0&&(n.src=null,t[E]=null)):ue(e)}}}function we(e){return e in _e?_e[e]:_e[e]=`on`+e}function Te(e,t){if(e.da)e=!0;else{t=new oe(t,this);let n=e.listener,r=e.ha||e.src;e.fa&&Ce(e),e=n.call(r,t)}return e}function Ee(e){return e=e[E],e instanceof me?e:null}var De=`__closure_events_fn_`+(Math.random()*1e9>>>0);function Oe(e){return typeof e==`function`?e:(e[De]||(e[De]=function(t){return e.handleEvent(t)}),e[De])}function ke(){ne.call(this),this.i=new me(this),this.M=this,this.G=null}d(ke,ne),ke.prototype[se]=!0,ke.prototype.removeEventListener=function(e,t,n,r){Se(this,e,t,n,r)};function Ae(e,t){var n,r=e.G;if(r)for(n=[];r;r=r.G)n.push(r);if(e=e.M,r=t.type||t,typeof t==`string`)t=new re(t,e);else if(t instanceof re)t.target=t.target||e;else{var i=t;t=new re(r,e),pe(t,i)}i=!0;let a,o;if(n)for(o=n.length-1;o>=0;o--)a=t.g=n[o],i=je(a,r,!0,t)&&i;if(a=t.g=e,i=je(a,r,!0,t)&&i,i=je(a,r,!1,t)&&i,n)for(o=0;o<n.length;o++)a=t.g=n[o],i=je(a,r,!1,t)&&i}ke.prototype.N=function(){if(ke.Z.N.call(this),this.i){var e=this.i;for(let t in e.g){let n=e.g[t];for(let e=0;e<n.length;e++)ue(n[e]);delete e.g[t],e.h--}}this.G=null},ke.prototype.J=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},ke.prototype.K=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};function je(e,t,n,r){if(t=e.i.g[String(t)],!t)return!0;t=t.concat();let i=!0;for(let a=0;a<t.length;++a){let o=t[a];if(o&&!o.da&&o.capture==n){let t=o.listener,n=o.ha||o.src;o.fa&&he(e.i,o),i=t.call(n,r)!==!1&&i}}return i&&!r.defaultPrevented}function Me(e,t){if(typeof e!=`function`)if(e&&typeof e.handleEvent==`function`)e=l(e.handleEvent,e);else throw Error(`Invalid listener argument`);return Number(t)>2147483647?-1:o.setTimeout(e,t||0)}function Ne(e){e.g=Me(()=>{e.g=null,e.i&&(e.i=!1,Ne(e))},e.l);let t=e.h;e.h=null,e.m.apply(null,t)}class Pe extends ne{constructor(e,t){super(),this.m=e,this.l=t,this.h=null,this.i=!1,this.g=null}j(e){this.h=arguments,this.g?this.i=!0:Ne(this)}N(){super.N(),this.g&&(o.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Fe(e){ne.call(this),this.h=e,this.g={}}d(Fe,ne);var Ie=[];function Le(e){de(e.g,function(e,t){this.g.hasOwnProperty(t)&&Ce(e)},e),e.g={}}Fe.prototype.N=function(){Fe.Z.N.call(this),Le(this)},Fe.prototype.handleEvent=function(){throw Error(`EventHandler.handleEvent not implemented`)};var Re=o.JSON.stringify,ze=o.JSON.parse,Be=class{stringify(e){return o.JSON.stringify(e,void 0)}parse(e){return o.JSON.parse(e,void 0)}};function Ve(){}function He(){}var Ue={OPEN:`a`,hb:`b`,ERROR:`c`,tb:`d`};function We(){re.call(this,`d`)}d(We,re);function Ge(){re.call(this,`c`)}d(Ge,re);var Ke={},qe=null;function Je(){return qe||=new ke}Ke.Ia=`serverreachability`;function Ye(e){re.call(this,Ke.Ia,e)}d(Ye,re);function Xe(e){let t=Je();Ae(t,new Ye(t))}Ke.STAT_EVENT=`statevent`;function Ze(e,t){re.call(this,Ke.STAT_EVENT,e),this.stat=t}d(Ze,re);function Qe(e){let t=Je();Ae(t,new Ze(t,e))}Ke.Ja=`timingevent`;function $e(e,t){re.call(this,Ke.Ja,e),this.size=t}d($e,re);function et(e,t){if(typeof e!=`function`)throw Error(`Fn must not be null and must be a function`);return o.setTimeout(function(){e()},t)}function tt(){this.g=!0}tt.prototype.ua=function(){this.g=!1};function nt(e,t,n,r,i,a){e.info(function(){if(e.g)if(a){var o=``,s=a.split(`&`);for(let e=0;e<s.length;e++){var c=s[e].split(`=`);
12if(c.length>1){let e=c[0];c=c[1];let t=e.split(`_`);o=t.length>=2&&t[1]==`type`?o+(e+`=`+c+`&`):o+(e+`=redacted&`)}}}else o=null;else o=a;return`XMLHTTP REQ (`+r+`) [attempt `+i+`]: `+t+`
13`+n+`
14`+o})}function rt(e,t,n,r,i,a,o){e.info(function(){return`XMLHTTP RESP (`+r+`) [ attempt `+i+`]: `+t+`
15`+n+`
16`+a+` `+o})}function it(e,t,n,r){e.info(function(){return`XMLHTTP TEXT (`+t+`): `+ot(e,n)+(r?` `+r:``)})}function at(e,t){e.info(function(){return`TIMEOUT: `+t})}tt.prototype.info=function(){};function ot(e,t){if(!e.g)return t;if(!t)return null;try{let a=JSON.parse(t);if(a){for(e=0;e<a.length;e++)if(Array.isArray(a[e])){var n=a[e];if(!(n.length<2)){var r=n[1];if(Array.isArray(r)&&!(r.length<1)){var i=r[0];if(i!=`noop`&&i!=`stop`&&i!=`close`)for(let e=1;e<r.length;e++)r[e]=``}}}}return Re(a)}catch{return t}}var st={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},ct={ib:`complete`,Fb:`success`,ERROR:`error`,Ga:`abort`,xb:`ready`,yb:`readystatechange`,TIMEOUT:`timeout`,sb:`incrementaldata`,wb:`progress`,lb:`downloadprogress`,Nb:`uploadprogress`},lt;function ut(){}d(ut,Ve),ut.prototype.g=function(){return new XMLHttpRequest},lt=new ut;function dt(e){return encodeURIComponent(String(e))}function ft(e){var t=1;e=e.split(`:`);let n=[];for(;t>0&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(`:`)),n}function pt(e,t,n,r){this.j=e,this.i=t,this.l=n,this.S=r||1,this.V=new Fe(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new mt}function mt(){this.i=null,this.g=``,this.h=!1}var ht={},gt={};function _t(e,t,n){e.M=1,e.A=Ht(Rt(t)),e.u=n,e.R=!0,vt(e,null)}function vt(e,t){e.F=Date.now(),St(e),e.B=Rt(e.A);var n=e.B,r=e.S;Array.isArray(r)||(r=[String(r)]),nn(n.i,`t`,r),e.C=0,n=e.j.L,e.h=new mt,e.g=qn(e.j,n?t:null,!e.u),e.P>0&&(e.O=new Pe(l(e.Y,e,e.g),e.P)),t=e.V,n=e.g,r=e.ba;var i=`readystatechange`;Array.isArray(i)||(i&&(Ie[0]=i.toString()),i=Ie);for(let e=0;e<i.length;e++){let a=ve(n,i[e],r||t.handleEvent,!1,t.h||t);if(!a)break;t.g[a.key]=a}t=e.J?T(e.J):{},e.u?(e.v||=`POST`,t[`Content-Type`]=`application/x-www-form-urlencoded`,e.g.ea(e.B,e.v,e.u,t)):(e.v=`GET`,e.g.ea(e.B,e.v,null,t)),Xe(),nt(e.i,e.v,e.B,e.l,e.S,e.u)}pt.prototype.ba=function(e){e=e.target;let t=this.O;t&&Tn(e)==3?t.j():this.Y(e)},pt.prototype.Y=function(e){try{if(e==this.g)a:{let s=Tn(this.g),c=this.g.ya(),l=this.g.ca();if(!(s<3)&&(s!=3||this.g&&(this.h.h||this.g.la()||En(this.g)))){this.K||s!=4||c==7||Xe(c==8||l<=0?3:2),wt(this);var t=this.g.ca();this.X=t;var n=yt(this);if(this.o=t==200,rt(this.i,this.v,this.B,this.l,this.S,s,t),this.o){if(this.U&&!this.L){b:{if(this.g){var r,i=this.g;if((r=i.g?i.g.getResponseHeader(`X-HTTP-Initial-Response`):null)&&!ae(r)){var a=r;break b}}a=null}if(e=a)it(this.i,this.l,e,`Initial handshake response via X-HTTP-Initial-Response`),this.L=!0,Dt(this,e);else{this.o=!1,this.m=3,Qe(12),Et(this),Tt(this);break a}}if(this.R){e=!0;let t;for(;!this.K&&this.C<n.length;)if(t=xt(this,n),t==gt){s==4&&(this.m=4,Qe(14),e=!1),it(this.i,this.l,null,`[Incomplete Response]`);break}else if(t==ht){this.m=4,Qe(15),it(this.i,this.l,n,`[Invalid Chunk]`),e=!1;break}else it(this.i,this.l,t,null),Dt(this,t);if(bt(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),s!=4||n.length!=0||this.h.h||(this.m=1,Qe(16),e=!1),this.o=this.o&&e,!e)it(this.i,this.l,n,`[Invalid Chunked Response]`),Et(this),Tt(this);else if(n.length>0&&!this.W){this.W=!0;var o=this.j;o.g==this&&o.aa&&!o.P&&(o.j.info(`Great, no buffering proxy detected. Bytes received: `+n.length),zn(o),o.P=!0,Qe(11))}}else it(this.i,this.l,n,null),Dt(this,n);s==4&&Et(this),this.o&&!this.K&&(s==4?Hn(this.j,this):(this.o=!1,St(this)))}else Dn(this.g),t==400&&n.indexOf(`Unknown SID`)>0?(this.m=3,Qe(12)):(this.m=0,Qe(13)),Et(this),Tt(this)}}}catch{}};function yt(e){if(!bt(e))return e.g.la();let t=En(e.g);if(t===``)return``;let n=``,r=t.length,i=Tn(e.g)==4;if(!e.h.i){if(typeof TextDecoder>`u`)return Et(e),Tt(e),``;e.h.i=new o.TextDecoder}for(let a=0;a<r;a++)e.h.h=!0,n+=e.h.i.decode(t[a],{stream:!(i&&a==r-1)});return t.length=0,e.h.g+=n,e.C=0,e.h.g}function bt(e){return e.g?e.v==`GET`&&e.M!=2&&e.j.Aa:!1}function xt(e,t){var n=e.C,r=t.indexOf(`
17`,n);return r==-1?gt:(n=Number(t.substring(n,r)),isNaN(n)?ht:(r+=1,r+n>t.length?gt:(t=t.slice(r,r+n),e.C=r+n,t)))}pt.prototype.cancel=function(){this.K=!0,Et(this)};function St(e){e.T=Date.now()+e.H,Ct(e,e.H)}function Ct(e,t){if(e.D!=null)throw Error(`WatchDog timer not null`);e.D=et(l(e.aa,e),t)}function wt(e){e.D&&=(o.clearTimeout(e.D),null)}pt.prototype.aa=function(){this.D=null;let e=Date.now();e-this.T>=0?(at(this.i,this.B),this.M!=2&&(Xe(),Qe(17)),Et(this),this.m=2,Tt(this)):Ct(this,this.T-e)};function Tt(e){e.j.I==0||e.K||Hn(e.j,e)}function Et(e){wt(e);var t=e.O;t&&typeof t.dispose==`function`&&t.dispose(),e.O=null,Le(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.dis
17pose())}function Dt(e,t){try{var n=e.j;if(n.I!=0&&(n.g==e||Mt(n.h,e))){if(!e.L&&Mt(n.h,e)&&n.I==3){try{var r=n.Ba.g.parse(t)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){a:if(!n.v){if(n.g)if(n.g.F+3e3<e.F)Vn(n),An(n);else break a;Rn(n),Qe(18)}}else n.xa=i[1],0<n.xa-n.K&&i[2]<37500&&n.F&&n.A==0&&!n.C&&(n.C=et(l(n.Va,n),6e3));jt(n.h)<=1&&n.ta&&(n.ta=void 0)}else Wn(n,11)}else if((e.L||n.g==e)&&Vn(n),!ae(t))for(i=n.Ba.g.parse(t),t=0;t<i.length;t++){let l=i[t],u=l[0];if(!(u<=n.K))if(n.K=u,l=l[1],n.I==2)if(l[0]==`c`){n.M=l[1],n.ba=l[2];let t=l[3];t!=null&&(n.ka=t,n.j.info(`VER=`+n.ka));let i=l[4];i!=null&&(n.za=i,n.j.info(`SVER=`+n.za));let u=l[5];u!=null&&typeof u==`number`&&u>0&&(r=1.5*u,n.O=r,n.j.info(`backChannelRequestTimeoutMs_=`+r)),r=n;let d=e.g;if(d){let e=d.g?d.g.getResponseHeader(`X-Client-Wire-Protocol`):null;if(e){var a=r.h;a.g||e.indexOf(`spdy`)==-1&&e.indexOf(`quic`)==-1&&e.indexOf(`h2`)==-1||(a.j=a.l,a.g=new Set,a.h&&=(Nt(a,a.h),null))}if(r.G){let e=d.g?d.g.getResponseHeader(`X-HTTP-Session-Id`):null;e&&(r.wa=e,O(r.J,r.G,e))}}n.I=3,n.l&&n.l.ra(),n.aa&&(n.T=Date.now()-e.F,n.j.info(`Handshake RTT: `+n.T+`ms`)),r=n;var o=e;if(r.na=Kn(r,r.L?r.ba:null,r.W),o.L){Pt(r.h,o);var s=o,c=r.O;c&&(s.H=c),s.D&&(wt(s),St(s)),r.g=o}else Ln(r);n.i.length>0&&Mn(n)}else l[0]!=`stop`&&l[0]!=`close`||Wn(n,7);else n.I==3&&(l[0]==`stop`||l[0]==`close`?l[0]==`stop`?Wn(n,7):kn(n):l[0]!=`noop`&&n.l&&n.l.qa(l),n.A=0)}}Xe(4)}catch{}}var Ot=class{constructor(e,t){this.g=e,this.map=t}};function kt(e){this.l=e||10,o.PerformanceNavigationTiming?(e=o.performance.getEntriesByType(`navigation`),e=e.length>0&&(e[0].nextHopProtocol==`hq`||e[0].nextHopProtocol==`h2`)):e=!!(o.chrome&&o.chrome.loadTimes&&o.chrome.loadTimes()&&o.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function At(e){return e.h?!0:e.g?e.g.size>=e.j:!1}function jt(e){return e.h?1:e.g?e.g.size:0}function Mt(e,t){return e.h?e.h==t:e.g?e.g.has(t):!1}function Nt(e,t){e.g?e.g.add(t):e.h=t}function Pt(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}kt.prototype.cancel=function(){if(this.i=Ft(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(let e of this.g.values())e.cancel();this.g.clear()}};function Ft(e){if(e.h!=null)return e.i.concat(e.h.G);if(e.g!=null&&e.g.size!==0){let t=e.i;for(let n of e.g.values())t=t.concat(n.G);return t}return p(e.i)}var It=RegExp(`^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$`);function Lt(e,t){if(e){e=e.split(`&`);for(let n=0;n<e.length;n++){let r=e[n].indexOf(`=`),i,a=null;r>=0?(i=e[n].substring(0,r),a=e[n].substring(r+1)):i=e[n],t(i,a?decodeURIComponent(a.replace(/\+/g,` `)):``)}}}function D(e){this.g=this.o=this.j=``,this.u=null,this.m=this.h=``,this.l=!1;let t;e instanceof D?(this.l=e.l,zt(this,e.j),this.o=e.o,this.g=e.g,Bt(this,e.u),this.h=e.h,Vt(this,rn(e.i)),this.m=e.m):e&&(t=String(e).match(It))?(this.l=!1,zt(this,t[1]||``,!0),this.o=Ut(t[2]||``),this.g=Ut(t[3]||``,!0),Bt(this,t[4]),this.h=Ut(t[5]||``,!0),Vt(this,t[6]||``,!0),this.m=Ut(t[7]||``)):(this.l=!1,this.i=new Zt(null,this.l))}D.prototype.toString=function(){let e=[];var t=this.j;t&&e.push(Wt(t,Kt,!0),`:`);var n=this.g;return(n||t==`file`)&&(e.push(`//`),(t=this.o)&&e.push(Wt(t,Kt,!0),`@`),e.push(dt(n).replace(/%25([0-9a-fA-F]{2})/g,`%$1`)),n=this.u,n!=null&&e.push(`:`,String(n))),(n=this.h)&&(this.g&&n.charAt(0)!=`/`&&e.push(`/`),e.push(Wt(n,n.charAt(0)==`/`?Jt:qt,!0))),(n=this.i.toString())&&e.push(`?`,n),(n=this.m)&&e.push(`#`,Wt(n,Xt)),e.join(``)},D.prototype.resolve=function(e){let t=Rt(this),n=!!e.j;n?zt(t,e.j):n=!!e.o,n?t.o=e.o:n=!!e.g,n?t.g=e.g:n=e.u!=null;var r=e.h;if(n)Bt(t,e.u);else if(n=!!e.h){if(r.charAt(0)!=`/`)if(this.g&&!this.h)r=`/`+r;else{var i=t.h.lastIndexOf(`/`);i!=-1&&(r=t.h.slice(0,i+1)+r)}if(i=r,i==`..`||i==`.`)r=``;else if(i.indexOf(`./`)!=-1||i.indexOf(`/.`)!=-1){r=i.lastIndexOf(`/`,0)==0,i=i.split(`/`);let e=[];for(let t=0;t<i.length;){let n=i[t++];n==`.`?r&&t==i.length&&e.push(``):n==`..`?((e.length>1||e.length==1&&e[0]!=``)&&e.pop(),r&&t==i.length&&e.push(``)):(e.push(n),r=!0)}r=e.join(`/`)}else r=i}return n?t.h=r:n=e.i.toString()!==``,n?Vt(t,rn(e.i)):n=!!e.m,n&&(t.m=e.m),t};function Rt(e){return new D(e)}function zt(e,t,n){e.j=n?Ut(t,!0):t,e.j&&=e.j.replace(/:$/,``)}function Bt(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error(`Bad port number `+t);e.u=t}else e.u=null}function Vt(e,t,n){t instanceof Zt?(e.i=t,on(e.i,e.l)):(n||(t=Wt(t,Yt)),e.i=new Zt(t,e.l))}function O(e,t,n){e.i.set(t,n)}function Ht(e){return O(e,`zx`,Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),e}function Ut(e,t){return e?t?decodeURI(e.replace(/%25/g,`%2525`)):decodeURIComponent(e):``}function Wt(e,t,n){return typeof e==`string`?(e=encodeURI(e).replace(t,Gt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,`%$1`)),e):null}function Gt(e){return e=e.charCodeAt(0),`%`+(e>>4&15).toString(16)+(e&15).toString(16)}var Kt=/[#\/\?@]/g,qt=/[#\?:]/g,Jt=/[#\?]/g,Yt=/[#\?@]/g,Xt=/#/g;function Zt(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Qt(e){e.g||(e.g=new Map,e.h=0,e.i&&Lt(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g,` `)),n)}))}e=Zt.prototype,e.add=function(e,t){Qt(this),this.i=null,e=an(this,e);let n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this};function $t(e,t){Qt(e),t=an(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function en(e,t){return Qt(e),t=an(e,t),e.g.has(t)}e.forEach=function(e,t){Qt(this),this.g.forEach(function(n,r){n.forEac
17h(function(n){e.call(t,n,r,this)},this)},this)};function tn(e,t){Qt(e);let n=[];if(typeof t==`string`)en(e,t)&&(n=n.concat(e.g.get(an(e,t))));else for(e=Array.from(e.g.values()),t=0;t<e.length;t++)n=n.concat(e[t]);return n}e.set=function(e,t){return Qt(this),this.i=null,e=an(this,e),en(this,e)&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},e.get=function(e,t){return e?(e=tn(this,e),e.length>0?String(e[0]):t):t};function nn(e,t,n){$t(e,t),n.length>0&&(e.i=null,e.g.set(an(e,t),p(n)),e.h+=n.length)}e.toString=function(){if(this.i)return this.i;if(!this.g)return``;let e=[],t=Array.from(this.g.keys());for(let r=0;r<t.length;r++){var n=t[r];let i=dt(n);n=tn(this,n);for(let t=0;t<n.length;t++){let r=i;n[t]!==``&&(r+=`=`+dt(n[t])),e.push(r)}}return this.i=e.join(`&`)};function rn(e){let t=new Zt;return t.i=e.i,e.g&&(t.g=new Map(e.g),t.h=e.h),t}function an(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function on(e,t){t&&!e.j&&(Qt(e),e.i=null,e.g.forEach(function(e,t){let n=t.toLowerCase();t!=n&&($t(this,t),nn(this,n,e))},e)),e.j=t}function sn(e,t){let n=new tt;if(o.Image){let r=new Image;r.onload=u(ln,n,`TestLoadImage: loaded`,!0,t,r),r.onerror=u(ln,n,`TestLoadImage: error`,!1,t,r),r.onabort=u(ln,n,`TestLoadImage: abort`,!1,t,r),r.ontimeout=u(ln,n,`TestLoadImage: timeout`,!1,t,r),o.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}function cn(e,t){let n=new tt,r=new AbortController,i=setTimeout(()=>{r.abort(),ln(n,`TestPingServer: timeout`,!1,t)},1e4);fetch(e,{signal:r.signal}).then(e=>{clearTimeout(i),e.ok?ln(n,`TestPingServer: ok`,!0,t):ln(n,`TestPingServer: server error`,!1,t)}).catch(()=>{clearTimeout(i),ln(n,`TestPingServer: error`,!1,t)})}function ln(e,t,n,r,i){try{i&&(i.onload=null,i.onerror=null,i.onabort=null,i.ontimeout=null),r(n)}catch{}}function un(){this.g=new Be}function dn(e){this.i=e.Sb||null,this.h=e.ab||!1}d(dn,Ve),dn.prototype.g=function(){return new fn(this.i,this.h)};function fn(e,t){ke.call(this),this.H=e,this.o=t,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText=``,this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F=`GET`,this.D=``,this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}d(fn,ke),e=fn.prototype,e.open=function(e,t){if(this.readyState!=0)throw this.abort(),Error(`Error reopening a connection`);this.F=e,this.D=t,this.readyState=1,hn(this)},e.send=function(e){if(this.readyState!=1)throw this.abort(),Error(`need to call open() first. `);if(this.v.signal.aborted)throw this.abort(),Error(`Request was aborted.`);this.g=!0;let t={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};e&&(t.body=e),(this.H||o).fetch(new Request(this.D,t)).then(this.Pa.bind(this),this.ga.bind(this))},e.abort=function(){this.response=this.responseText=``,this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel(`Request was aborted.`).catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,mn(this)),this.readyState=0},e.Pa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,hn(this)),this.g&&(this.readyState=3,hn(this),this.g)))if(this.responseType===`arraybuffer`)e.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(o.ReadableStream!==void 0&&`body`in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error(`responseType must be empty for "streamBinaryChunks" mode responses.`);this.response=[]}else this.response=this.responseText=``,this.B=new TextDecoder;pn(this)}else e.text().then(this.Oa.bind(this),this.ga.bind(this))};function pn(e){e.j.read().then(e.Ma.bind(e)).catch(e.ga.bind(e))}e.Ma=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array;(t=this.B.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?mn(this):hn(this),this.readyState==3&&pn(this)}},e.Oa=function(e){this.g&&(this.response=this.responseText=e,mn(this))},e.Na=function(e){this.g&&(this.response=e,mn(this))},e.ga=function(){this.g&&mn(this)};function mn(e){e.readyState=4,e.l=null,e.j=null,e.B=null,hn(e)}e.setRequestHeader=function(e,t){this.A.append(e,t)},e.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||``},e.getAllResponseHeaders=function(){if(!this.h)return``;let e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+`: `+n[1]),n=t.next();return e.join(`\r
18`)};function hn(e){e.onreadystatechange&&e.onreadystatechange.call(e)}Object.defineProperty(fn.prototype,"withCredentials",{get:function(){return this.m===`include`},set:function(e){this.m=e?`include`:`same-origin`}});function gn(e){let t=``;return de(e,function(e,n){t+=n,t+=`:`,t+=e,t+=`\r
19`}),t}
19function _n(e,t,n){a:{for(r in n){var r=!1;break a}r=!0}r||(n=gn(n),typeof e==`string`||O(e,t,n))}function vn(e){ke.call(this),this.headers=new Map,this.L=e||null,this.h=!1,this.g=null,this.D=``,this.o=0,this.l=``,this.j=this.B=this.v=this.A=!1,this.m=null,this.F=``,this.H=!1}d(vn,ke);var yn=/^https?$/i,bn=[`POST`,`PUT`];e=vn.prototype,e.Fa=function(e){this.H=e},e.ea=function(e,t,n,r){if(this.g)throw Error(`[goog.net.XhrIo] Object is active with another request=`+this.D+`; newUri=`+e);t=t?t.toUpperCase():`GET`,this.D=e,this.l=``,this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():lt.g(),this.g.onreadystatechange=f(l(this.Ca,this));try{this.B=!0,this.g.open(t,String(e),!0),this.B=!1}catch(e){xn(this,e);return}if(e=n||``,n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if(typeof r.keys==`function`&&typeof r.get==`function`)for(let e of r.keys())n.set(e,r.get(e));else throw Error(`Unknown input type for opt_headers: `+String(r));r=Array.from(n.keys()).find(e=>e.toLowerCase()==`content-type`),i=o.FormData&&e instanceof o.FormData,!(Array.prototype.indexOf.call(bn,t,void 0)>=0)||r||i||n.set(`Content-Type`,`application/x-www-form-urlencoded;charset=utf-8`);for(let[e,t]of n)this.g.setRequestHeader(e,t);this.F&&(this.g.responseType=this.F),`withCredentials`in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&=(clearTimeout(this.m),null),this.v=!0,this.g.send(e),this.v=!1}catch(e){xn(this,e)}};function xn(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.o=5,Sn(e),wn(e)}function Sn(e){e.A||(e.A=!0,Ae(e,`complete`),Ae(e,`error`))}e.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=e||7,Ae(this,`complete`),Ae(this,`abort`),wn(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),wn(this,!0)),vn.Z.N.call(this)},e.Ca=function(){this.u||(this.B||this.v||this.j?Cn(this):this.Xa())},e.Xa=function(){Cn(this)};function Cn(e){if(e.h&&a!==void 0){if(e.v&&Tn(e)==4)setTimeout(e.Ca.bind(e),0);else if(Ae(e,`readystatechange`),Tn(e)==4){e.h=!1;try{let a=e.ca();a:switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break a;default:t=!1}var n;if(!(n=t)){var r;if(r=a===0){let t=String(e.D).match(It)[1]||null;!t&&o.self&&o.self.location&&(t=o.self.location.protocol.slice(0,-1)),r=!yn.test(t?t.toLowerCase():``)}n=r}if(n)Ae(e,`complete`),Ae(e,`success`);else{e.o=6;try{var i=Tn(e)>2?e.g.statusText:``}catch{i=``}e.l=i+` [`+e.ca()+`]`,Sn(e)}}finally{wn(e)}}}}function wn(e,t){if(e.g){e.m&&=(clearTimeout(e.m),null);let n=e.g;e.g=null,t||Ae(e,`ready`);try{n.onreadystatechange=null}catch{}}}e.isActive=function(){return!!this.g};function Tn(e){return e.g?e.g.readyState:0}e.ca=function(){try{return Tn(this)>2?this.g.status:-1}catch{return-1}},e.la=function(){try{return this.g?this.g.responseText:``}catch{return``}},e.La=function(e){if(this.g){var t=this.g.responseText;return e&&t.indexOf(e)==0&&(t=t.substring(e.length)),ze(t)}};function En(e){try{if(!e.g)return null;if(`response`in e.g)return e.g.response;switch(e.F){case``:case`text`:return e.g.responseText;case`arraybuffer`:if(`mozResponseArrayBuffer`in e.g)return e.g.mozResponseArrayBuffer}return null}catch{return null}}function Dn(e){let t={};e=(e.g&&Tn(e)>=2&&e.g.getAllResponseHeaders()||``).split(`\r
20`);for(let r=0;r<e.length;r++){if(ae(e[r]))continue;var n=ft(e[r]);let i=n[0];if(n=n[1],typeof n!=`string`)continue;n=n.trim();let a=t[i]||[];t[i]=a,a.push(n)}w(t,function(e){return e.join(`, `)})}e.ya=function(){return this.o},e.Ha=function(){return typeof this.l==`string`?this.l:String(this.l)};function On(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function k(e){this.za=0,this.i=[],this.j=new tt,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=On(`failFast`,!1,e),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=On(`baseRetryDelayMs`,5e3,e),this.Za=On(`retryDelaySeedMs`,1e4,e),this.Ta=On(`forwardChannelMaxRetries`,2,e),this.va=On(`forwardChannelRequestTimeoutMs`,2e4,e),this.ma=e&&e.xmlHttpFactory||void 0,this.Ua=e&&e.Rb||void 0,this.Aa=e&&e.useFetchStreams||!1,this.O=void 0,this.L=e&&e.supportsCrossDomainXhr||!1,this.M=``,this.h=new kt(e&&e.concurrentRequestLimit),this.Ba=new un,this.S=e&&e.fastHandshake||!1,this.R=e&&e.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=e&&e.Pb||!1,e&&e.ua&&this.j.ua(),e&&e.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&e&&e.detectBufferingProxy||!1,this.ia=void 0,e&&e.longPollingTimeout&&e.longPollingTimeout>0&&(this.ia=e.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}e=k.prototype,e.ka=8,e.I=1,e.connect=function(e,t,n,r){Qe(0),this.W=e,this.H=t||{},n&&r!==void 0&&(this.H.OSID=n,this.H.OAID=r),this.F=this.X,this.J=Kn(this,null,this.W),Mn(this)};function kn(e){if(jn(e),e.I==3){var t=e.V++,n=Rt(e.J);if(O(n,`SID`,e.M),O(n,`RID`,t),O(n,`TYPE`,`terminate`),Fn(e,n),t=new pt(e,e.j,t),t.M=2,t.A=Ht(Rt(n)),n=!1,o.navigator&&o.navigator.sendBeacon)try{n=o.navigator.sendBeacon(t.A.toString(),``)}catch{}!n&&o.Image&&(new Image().src=t.A,n=!0),n||(t.g=qn(t.j,null),t.g.ea(t.A)),t.F=Date.now(),St(t)}Gn(e)}function An(e){e.g&&=(zn(e),e.g.cancel(),null)}function jn(e){An(e),e.v&&=(o.clearTimeout(e.v),null),Vn(e),e.h.cancel(),e.m&&=(typeof e.m==`number`&&o.clearTimeout(e.m),null)}function Mn(e){if(!At(e.h)&&!e.m){e.m=!0;var t=e.Ea;x||ee(),S||=(x(),!0),C.add(t,e),e.D=0}}function Nn(e,t){return jt(e.h)>=e.h.j-+!!e.m?!1:e.m?(e.i=t.G.concat(e.i),!0):e.I==1||e.I==2||e.D>=(e.Sa?0:e.Ta)?!1:(e.m=et(l(e.Ea,e,t),Un(e,e.D)),e.D++,!0)}e.Ea=function(e){if(this.m)if(this.m=null,this.I==1){if(!e){this.V=Math.floor(Math.random()*1e5),e=this.V++;let i=new pt(this,this.j,e),a=this.o;if(this.U&&(a?(a=T(a),pe(a,this.U)):a=this.U),this.u!==null||this.R||(i.J=a,a=null),this.S)a:{for(var t=0,n=0;n<this.i.length;n++){b:{var r=this.i[n];if(`__data__`in r.map&&(r=r.map.__data__,typeof r==`string`)){r=r.length;break b}r=void 0}if(r===void 0)break;if(t+=r,t>4096){t=n;break a}if(t===4096||n===this.i.length-1){t=n+1;break a}}t=1e3}else t=1e3;t=In(this,i,t),n=Rt(this.J),O(n,`RID`,e),O(n,`CVER`,22),this.G&&O(n,`X-HTTP-Session-Id`,this.G),Fn(this,n),a&&(this.R?t=`headers=`+dt(gn(a))+`&`+t:this.u&&_n(n,this.u,a)),Nt(this.h,i),this.Ra&&O(n,`TYPE`,`init`),this.S?(O(n,`$req`,t),O(n,`SID`,`null`),i.U=!0,_t(i,n,null)):_t(i,n,t),this.I=2}}else this.I==3&&(e?Pn(this,e):this.i.length==0||At(this.h)||Pn(this))};function Pn(e,t){var n=t?t.l:e.V++;let r=Rt(e.J);O(r,`SID`,e.M),O(r,`RID`,n),O(r,`AID`,e.K),Fn(e,r),e.u&&e.o&&_n(r,e.u,e.o),n=new pt(e,e.j,n,e.D+1),e.u===null&&(n.J=e.o),t&&(e.i=t.G.concat(e.i)),t=In(e,n,1e3),n.H=Math.round(e.va*.5)+Math.round(e.va*.5*Math.random()),Nt(e.h,n),_t(n,r,t)}function Fn(e,t){e.H&&de(e.H,function(e,n){O(t,n,e)}),e.l&&de({},function(e,n){O(t,n,e)})}function In(e,t,n){n=Math.min(e.i.length,n);let r=e.l?l(e.l.Ka,e.l,e):null;a:{var i=e.i;let t=-1;for(;;){let e=[`count=`+n];t==-1?n>0?(t=i[0].g,e.push(`ofs=`+t)):t=0:e.push(`ofs=`+t);let c=!0;for(let l=0;l<n;l++){var a=i[l].g;let n=i[l].map;if(a-=t,a<0)t=Math.max(0,i[l].g-100),c=!1;else try{a=`req`+a+`_`||``;try{var o=n instanceof Map?n:Object.entries(n);for(let[t,n]of o){let r=n;s(n)&&(r=Re(n)),e.push(a+t+`=`+encodeURIComponent(r))}}catch(t){throw e.push(a+`type=_badmap`),t}}catch{r&&r(n)}}if(c){o=e.join(`&`);break a}}o=void 0}return e=e.i.splice(0,n),t.G=e,o}function Ln(e){if(!e.g&&!e.v){e.Y=1;var t=e.Da;x||ee(),S||=(x(),!0),C.add(t,e),e.A=0}}function Rn(e){return e.g||e.v||e.A>=3?!1:(e.Y++,e.v=et(l(e.Da,e),Un(e,e.A)),e.A++,!0)}
vendor: 6,456 bytes, line 20
20e.Da=function(){if(this.v=null,Bn(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var e=4*this.T;this.j.info(`BP detection timer enabled: `+e),this.B=et(l(this.Wa,this),e)}},e.Wa=function(){this.B&&(this.B=null,this.j.info(`BP detection timeout reached.`),this.j.info(`Buffering proxy detected and switch to long-polling!`),this.F=!1,this.P=!0,Qe(10),An(this),Bn(this))};function zn(e){e.B!=null&&(o.clearTimeout(e.B),e.B=null)}function Bn(e){e.g=new pt(e,e.j,`rpc`,e.Y),e.u===null&&(e.g.J=e.o),e.g.P=0;var t=Rt(e.na);O(t,`RID`,`rpc`),O(t,`SID`,e.M),O(t,`AID`,e.K),O(t,`CI`,e.F?`0`:`1`),!e.F&&e.ia&&O(t,`TO`,e.ia),O(t,`TYPE`,`xmlhttp`),Fn(e,t),e.u&&e.o&&_n(t,e.u,e.o),e.O&&(e.g.H=e.O);var n=e.g;e=e.ba,n.M=1,n.A=Ht(Rt(t)),n.u=null,n.R=!0,vt(n,e)}e.Va=function(){this.C!=null&&(this.C=null,An(this),Rn(this),Qe(19))};function Vn(e){e.C!=null&&(o.clearTimeout(e.C),e.C=null)}function Hn(e,t){var n=null;if(e.g==t){Vn(e),zn(e),e.g=null;var r=2}else if(Mt(e.h,t))n=t.G,Pt(e.h,t),r=1;else return;if(e.I!=0){if(t.o)if(r==1){n=t.u?t.u.length:0,t=Date.now()-t.F;var i=e.D;r=Je(),Ae(r,new $e(r,n)),Mn(e)}else Ln(e);else if(i=t.m,i==3||i==0&&t.X>0||!(r==1&&Nn(e,t)||r==2&&Rn(e)))switch(n&&n.length>0&&(t=e.h,t.i=t.i.concat(n)),i){case 1:Wn(e,5);break;case 4:Wn(e,10);break;case 3:Wn(e,6);break;default:Wn(e,2)}}}function Un(e,t){let n=e.Qa+Math.floor(Math.random()*e.Za);return e.isActive()||(n*=2),n*t}function Wn(e,t){if(e.j.info(`Error code `+t),t==2){var n=l(e.bb,e),r=e.Ua;let t=!r;r=new D(r||`//www.google.com/images/cleardot.gif`),o.location&&o.location.protocol==`http`||zt(r,`https`),Ht(r),t?sn(r.toString(),n):cn(r.toString(),n)}else Qe(2);e.I=0,e.l&&e.l.pa(t),Gn(e),jn(e)}e.bb=function(e){e?(this.j.info(`Successfully pinged google.com`),Qe(2)):(this.j.info(`Failed to ping google.com`),Qe(1))};function Gn(e){if(e.I=0,e.ja=[],e.l){let t=Ft(e.h);(t.length!=0||e.i.length!=0)&&(m(e.ja,t),m(e.ja,e.i),e.h.i.length=0,p(e.i),e.i.length=0),e.l.oa()}}function Kn(e,t,n){var r=n instanceof D?Rt(n):new D(n);if(r.g!=``)t&&(r.g=t+`.`+r.g),Bt(r,r.u);else{var i=o.location;r=i.protocol,t=t?t+`.`+i.hostname:i.hostname,i=+i.port;let e=new D(null);r&&zt(e,r),t&&(e.g=t),i&&Bt(e,i),n&&(e.h=n),r=e}return n=e.G,t=e.wa,n&&t&&O(r,n,t),O(r,`VER`,e.ka),Fn(e,r),r}function qn(e,t,n){if(t&&!e.L)throw Error(`Can't create secondary domain capable XhrIo object.`);return t=e.Aa&&!e.ma?new vn(new dn({ab:n})):new vn(e.ma),t.Fa(e.L),t}e.isActive=function(){return!!this.l&&this.l.isActive(this)};function Jn(){}e=Jn.prototype,e.ra=function(){},e.qa=function(){},e.pa=function(){},e.oa=function(){},e.isActive=function(){return!0},e.Ka=function(){};function Yn(){}Yn.prototype.g=function(e,t){return new Xn(e,t)};function Xn(e,t){ke.call(this),this.g=new k(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e[`X-Client-Protocol`]=`webchannel`:e={"X-Client-Protocol":`webchannel`}),this.g.o=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e[`X-WebChannel-Content-Type`]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.sa&&(e?e[`X-WebChannel-Client-Profile`]=t.sa:e={"X-WebChannel-Client-Profile":t.sa}),this.g.U=e,(e=t&&t.Qb)&&!ae(e)&&(this.g.u=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t&&=t.httpSessionIdParam)&&!ae(t)&&(this.g.G=t,e=this.h,e!==null&&t in e&&(e=this.h,t in e&&delete e[t])),this.j=new $n(this)}d(Xn,ke),Xn.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},Xn.prototype.close=function(){kn(this.g)},Xn.prototype.o=function(e){var t=this.g;if(typeof e==`string`){var n={};n.__data__=e,e=n}else this.v&&(n={},n.__data__=Re(e),e=n);t.i.push(new Ot(t.Ya++,e)),t.I==3&&Mn(t)},Xn.prototype.N=function(){this.g.l=null,delete this.j,kn(this.g),delete this.g,Xn.Z.N.call(this)};function Zn(e){We.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){a:{for(let n in t){e=n;break a}e=void 0}(this.i=e)&&(e=this.i,t=t!==null&&e in t?t[e]:void 0),this.data=t}else this.data=e}d(Zn,We);function Qn(){Ge.call(this),this.status=1}d(Qn,Ge);function $n(e){this.g=e}d($n,Jn),$n.prototype.ra=function(){Ae(this.g,`a`)},$n.prototype.qa=function(e){Ae(this.g,new Zn(e))},$n.prototype.pa=function(e){Ae(this.g,new Qn)},$n.prototype.oa=function(){Ae(this.g,`b`)},Yn.prototype.createWebChannel=Yn.prototype.g,Xn.prototype.send=Xn.prototype.o,Xn.prototype.open=Xn.prototype.m,Xn.prototype.close=Xn.prototype.close,Do=xo.createWebChannelTransport=function(){return new Yn},Eo=xo.getStatEventTarget=function(){return Je()},To=xo.Event=Ke,wo=xo.Stat={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},st.NO_ERROR=0,st.TIMEOUT=8,st.HTTP_ERROR=6,Co=xo.ErrorCode=st,ct.COMPLETE=`complete`,So=xo.EventType=ct,He.EventType=Ue,Ue.OPEN=`a`,Ue.CLOSE=`b`,Ue.ERROR=`c`,Ue.MESSAGE=`d`,ke.prototype.listen=ke.prototype.J,N=xo.WebChannel=He,xo.FetchXmlHttpFactory=dn,vn.prototype.listenOnce=vn.prototype.K,vn.prototype.getLastError=vn.prototype.Ha,vn.prototype.getLastErrorCode=vn.prototype.ya,vn.prototype.getStatus=vn.prototype.ca,vn.prototype.getResponseJson=vn.prototype.La,vn.prototype.getResponseText=vn.prototype.la,vn.prototype.send=vn.prototype.ea,vn.prototype.setWithCredentials=vn.prototype.Fa,M=xo.XhrIo=vn}).apply(bo===void 0?typeof self<`u`?self:typeof window<`u`?window:{}:bo);var Oo=class{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?`uid:`+this.uid:`anonymous-user`}isEqual(e){return e.uid===this.uid}};Oo.UNAUTHENTICATED=new Oo(null),Oo.GOOGLE_CREDENTIALS=new Oo(`google-credentials-uid`),Oo.FIRST_PARTY=new Oo(`first-party-uid`),Oo.MOCK_USER=new Oo(`mock-user`);var ko=`12.14.0`;function Ao(e){ko=e}var jo=new Fi(`@firebase/firestore`);function Mo(){return jo.logLevel}function P(e,...t){if(jo.logLevel<=A.DEBUG){let n=t.map(Fo);jo.debug(`Firestore (${ko}): ${e}`,...n)}}function No(e,...t){if(jo.logLevel<=A.ERROR){let n=t.map(Fo);jo.error(`Firestore (${ko}): ${e}`,...n)}}function Po(e,...t){if(jo.logLevel<=A.WARN){let n=t.map(Fo);jo.warn(`Firestore (${ko}): ${e}`,...n)}}function Fo(e){if(typeof e==`string`)return e;try{return function(e){return JSON.stringify(e)}(e)}catch{return e}}function F(e,t,n){let r=`Unexpected state`;typeof t==`string`?r=t:n=t,Io(e,r,n)}
20function Io(e,t,n){let r=`FIRESTORE (${ko}) INTERNAL ASSERTION FAILED: ${t} (ID: ${e.toString(16)})`;if(n!==void 0)try{r+=` CONTEXT: `+JSON.stringify(n)}catch{r+=` CONTEXT: `+n}throw No(r),Error(r)}function I(e,t,n,r){let i=`Unexpected state`;typeof n==`string`?i=n:r=n,e||Io(t,i,r)}function L(e,t){return e}var R={OK:`ok`,CANCELLED:`cancelled`,UNKNOWN:`unknown`,INVALID_ARGUMENT:`invalid-argument`,DEADLINE_EXCEEDED:`deadline-exceeded`,NOT_FOUND:`not-found`,ALREADY_EXISTS:`already-exists`,PERMISSION_DENIED:`permission-denied`,UNAUTHENTICATED:`unauthenticated`,RESOURCE_EXHAUSTED:`resource-exhausted`,FAILED_PRECONDITION:`failed-precondition`,ABORTED:`aborted`,OUT_OF_RANGE:`out-of-range`,UNIMPLEMENTED:`unimplemented`,INTERNAL:`internal`,UNAVAILABLE:`unavailable`,DATA_LOSS:`data-loss`},z=class extends si{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}},Lo=class{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}},Ro=class{constructor(e,t){this.user=t,this.type=`OAuth`,this.headers=new Map,this.headers.set(`Authorization`,`Bearer ${e}`)}},zo=class{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable((()=>t(Oo.UNAUTHENTICATED)))}shutdown(){}},Bo=class{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}shutdown(){this.changeListener=null}},Vo=class{constructor(e){this.t=e,this.currentUser=Oo.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){I(this.o===void 0,42304);let n=this.i,r=e=>this.i===n?Promise.resolve():(n=this.i,t(e)),i=new Lo;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new Lo,e.enqueueRetryable((()=>r(this.currentUser)))};let a=()=>{let t=i;e.enqueueRetryable((async()=>{await t.promise,await r(this.currentUser)}))},o=e=>{P(`FirebaseAuthCredentialsProvider`,`Auth detected`),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),a())};this.t.onInit((e=>o(e))),setTimeout((()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?o(e):(P(`FirebaseAuthCredentialsProvider`,`Auth not yet detected`),i.resolve(),i=new Lo)}}),0),a()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((t=>this.i===e?t?(I(typeof t.accessToken==`string`,31837,{l:t}),new Ro(t.accessToken,this.currentUser)):null:(P(`FirebaseAuthCredentialsProvider`,`getToken aborted due to token change.`),this.getToken()))):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){let e=this.auth&&this.auth.getUid();return I(e===null||typeof e==`string`,2055,{h:e}),new Oo(e)}},Ho=class{constructor(e,t,n){this.P=e,this.T=t,this.I=n,this.type=`FirstParty`,this.user=Oo.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set(`X-Goog-AuthUser`,this.P);let e=this.A();return e&&this.R.set(`Authorization`,e),this.T&&this.R.set(`X-Goog-
20Iam-Authorization-Token`,this.T),this.R}},Uo=class{constructor(e,t,n){this.P=e,this.T=t,this.I=n}getToken(){return Promise.resolve(new Ho(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable((()=>t(Oo.FIRST_PARTY)))}shutdown(){}invalidateToken(){}},Wo=class{constructor(e){this.value=e,this.type=`AppCheck`,this.headers=new Map,e&&e.length>0&&this.headers.set(`x-firebase-appcheck`,this.value)}},Go=class{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,Wa(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){I(this.o===void 0,3512);let n=e=>{e.error!=null&&P(`FirebaseAppCheckTokenProvider`,`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let n=e.token!==this.m;return this.m=e.token,P(`FirebaseAppCheckTokenProvider`,`Received ${n?`new`:`existing`} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable((()=>n(t)))};let r=e=>{P(`FirebaseAppCheckTokenProvider`,`AppCheck detected`),this.appCheck=e,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((e=>r(e))),setTimeout((()=>{if(!this.appCheck){let e=this.V.getImmediate({optional:!0});e?r(e):P(`FirebaseAppCheckTokenProvider`,`AppCheck not yet detected`)}}),0)}getToken(){if(this.p)return Promise.resolve(new Wo(this.p));let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((e=>e?(I(typeof e.token==`string`,44558,{tokenResult:e}),this.m=e.token,new Wo(e.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}};function Ko(e){let t=typeof self<`u`&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&typeof t.getRandomValues==`function`)t.getRandomValues(n);else for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}var qo=class{static newId(){let e=``;for(;e.length<20;){let t=Ko(40);for(let n=0;n<t.length;++n)e.length<20&&t[n]<248&&(e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(t[n]%62))}return e}};function B(e,t){return e<t?-1:+(e>t)}function Jo(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e.charAt(r),i=t.charAt(r);if(n!==i)return Zo(n)===Zo(i)?B(n,i):Zo(n)?1:-1}return B(e.length,t.length)}var Yo=55296,Xo=57343;function Zo(e){let t=e.charCodeAt(0);return t>=Yo&&t<=Xo}function Qo(e,t,n){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}var $o=`__name__`,es=class e{constructor(e,t,n){t===void 0?t=0:t>e.length&&F(637,{offset:t,range:e.length}),n===void 0?n=e.length-t:n>e.length-t&&F(1746,{length:n,range:e.length-t}),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(t){return e.comparator(this,t)===0}child(t){let n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((e=>{n.push(e)})):n.push(t),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(t,n){let r=Math.min(t.length,n.length);for(let i=0;i<r;i++){let r=e.compareSegments(t.get(i),n.get(i));if(r!==0)return r}return B(t.length,n.length)}static compareSegments(t,n){let r=e.isNumericId(t),i=e.isNumericId(n);return r&&!i?-1:!r&&i?1:r&&i?e.extractNumericId(t).compare(e.extractNumericId(n)):Jo(t,n)}static isNumericId(e){return e.startsWith(`__id`)&&e.endsWith(`__`)}static extractNumericId(e){return vo.fromString(e.substring(4,e.length-2))}},ts=class e extends es{construct(t,n,r){return new e(t,n,r)}canonicalString(){return this.toArray().join(`/`)}toString(){return this.canonicalString()}
20toUriEncodedString(){return this.toArray().map(encodeURIComponent).join(`/`)}static fromString(...t){let n=[];for(let e of t){if(e.indexOf(`//`)>=0)throw new z(R.INVALID_ARGUMENT,`Invalid segment (${e}). Paths must not contain // in them.`);n.push(...e.split(`/`).filter((e=>e.length>0)))}return new e(n)}static emptyPath(){return new e([])}},ns=/^[_a-zA-Z][_a-zA-Z0-9]*$/,rs=class e extends es{construct(t,n,r){return new e(t,n,r)}static isValidIdentifier(e){return ns.test(e)}canonicalString(){return this.toArray().map((t=>(t=t.replace(/\\/g,`\\\\`).replace(/`/g,"\\`"),e.isValidIdentifier(t)||(t="`"+t+"`"),t))).join(`.`)}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===`__name__`}static keyField(){return new e([$o])}static fromServerFormat(t){let n=[],r=``,i=0,a=()=>{if(r.length===0)throw new z(R.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=``},o=!1;for(;i<t.length;){let e=t[i];if(e===`\\`){if(i+1===t.length)throw new z(R.INVALID_ARGUMENT,`Path has trailing escape character: `+t);let e=t[i+1];if(e!==`\\`&&e!==`.`&&e!=="`")throw new z(R.INVALID_ARGUMENT,`Path has invalid escape sequence: `+t);r+=e,i+=2}else e==="`"?(o=!o,i++):e!==`.`||o?(r+=e,i++):(a(),i++)}if(a(),o)throw new z(R.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)}static emptyPath(){return new e([])}},V=class e{constructor(e){this.path=e}static fromPath(t){return new e(ts.fromString(t))}static fromName(t){return new e(ts.fromString(t).popFirst(5))}static empty(){return new e(ts.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&ts.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,t){return ts.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(t){return new e(new ts(t.slice()))}};function is(e,t,n){if(!n)throw new z(R.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function as(e,t,n,r){if(!0===t&&!0===r)throw new z(R.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}function os(e){if(!V.isDocumentKey(e))throw new z(R.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function ss(e){if(V.isDocumentKey(e))throw new z(R.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function cs(e){return typeof e==`object`&&!!e&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function ls(e){if(e===void 0)return`undefined`;if(e===null)return`null`;if(typeof e==`string`)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if(typeof e==`number`||typeof e==`boolean`)return``+e;if(typeof e==`object`){if(e instanceof Array)return`an array`;{let t=function(e){return e.constructor?e.constructor.name:null}(e);return t?`a custom ${t} object`:`an object`}}return typeof e==`function`?`a function`:F(12329,{type:typeof e})}function us(e,t){if(`_delegate`in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new z(R.INVALID_ARGUMENT,`Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?`);{let n=ls(e);throw new z(R.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}function ds(e,t){let n={typeString:e};return t&&(n.value=t),n}function fs(e,t){if(!cs(e))throw new z(R.INVALID_ARGUMENT,`JSON must be an object`);let n;for(let r in t)if(t[r]){let i=t[r].typeString,a=`value`in t[r]?{value:t[r].value}:void 0;if(!(r in e)){n=`JSON missing required field: '${r}'`;break}let o=e[r];if(i&&typeof o!==i){n=`JSON field '${r}' must be a ${i}.`;break}if(a!==void 0&&o!==a.value){n=`Expected '${r}' field to equal '${a.value}'`;break}}if(n)throw new z(R.INVALID_ARGUMENT,n);return!0}var ps=-62135596800,ms=1e6,hs=class e{static now(){return e.fromMillis(Date.now())}static fromDate(t){return e.fromMillis(t.getTime())}static fromMillis(t){let n=Math.floor(t/1e3);return new e(n,Math.floor((t-1e3*n)*ms))}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new z(R.INVALID_ARGUMENT,`Timestamp nanoseconds out of range: `+t);if(e<ps||e>=253402300800)throw new z(R.INVALID_ARGUMENT,`Timestamp seconds out of range: `+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/ms}_compareTo(e){return this.seconds===e.seconds?B(this.nanoseconds,e.nanoseconds):B(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return`Timestamp(seconds=`+this.seconds+`, nanoseconds=`+this.nanoseconds+`)`}toJSON(){return{type:e._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(t){if(fs(t,e._jsonSchema))return new e(t.seconds,t.nanoseconds)}valueOf(){let e=this.seconds-ps;return String(e).padStart(12,`0`)+`.`+String(this.nanoseconds).padStart(9,`0`)}};hs._jsonSchemaVersion=`firestore/timestamp/1.0`,hs._jsonSchema={type:ds(`string`,hs._jsonSchemaVersion),seconds:ds(`number`),nanoseconds:ds(`number`)};var H=class e{static fromTimestamp(t){return new e(t)}static min(){return new e(new hs(0,0))}static max(){return new e(new hs(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return`SnapshotVersion(`+this.timestamp.toString()+`)`}toTimestamp(){return this.timestamp}},gs=-1,_s=class{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}};_s.UNKNOWN_ID=-1;function vs(e,t){let n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1;return new bs(H.fromTimestamp(r===1e9?new hs(n+1,0):new hs(n,r)),V.empty(),t)}function ys(e){return new bs(e.readTime,e.key,gs)}var bs=class e{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new e(H.min(),V.empty(),gs)}static max(){return new e(H.max(),V.empty(),gs)}};function xs(e,t){let n=e.readTime.compareTo(t.readTime);return n===0?(n=V.comparator(e.documentKey,t.documentKey),n===0?B(e.largestBatchId,t.largestBatchId):n):n}var Ss=`The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.`,Cs=class{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}
20raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}};async function ws(e){if(e.code!==R.FAILED_PRECONDITION||e.message!==Ss)throw e;P(`LocalStore`,`Unexpectedly lost primary lease`)}var U=class e{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)}),(e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)}))}catch(e){return this.next(void 0,e)}next(t,n){return this.callbackAttached&&F(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e(((e,r)=>{this.nextCallback=n=>{this.wrapSuccess(t,n).next(e,r)},this.catchCallback=t=>{this.wrapFailure(n,t).next(e,r)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(t){try{let n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}wrapSuccess(t,n){return t?this.wrapUserFunction((()=>t(n))):e.resolve(n)}wrapFailure(t,n){return t?this.wrapUserFunction((()=>t(n))):e.reject(n)}static resolve(t){return new e(((e,n)=>{e(t)}))}static reject(t){return new e(((e,n)=>{n(t)}))}static waitFor(t){return new e(((e,n)=>{let r=0,i=0,a=!1;t.forEach((t=>{++r,t.next((()=>{++i,a&&i===r&&e()}),(e=>n(e)))})),a=!0,i===r&&e()}))}static or(t){let n=e.resolve(!1);for(let r of t)n=n.next((t=>t?e.resolve(t):r()));return n}static forEach(e,t){let n=[];return e.forEach(((e,r)=>{n.push(t.call(this,e,r))})),this.waitFor(n)}static mapArray(t,n){return new e(((e,r)=>{let i=t.length,a=Array(i),o=0;for(let s=0;s<i;s++){let c=s;n(t[c]).next((t=>{a[c]=t,++o,o===i&&e(a)}),(e=>r(e)))}}))}static doWhile(t,n){return new e(((e,r)=>{let i=()=>{!0===t()?n().next((()=>{i()}),r):e()};i()}))}};function Ts(e){let t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(`.`).slice(0,2).join(`.`):`-1`;return Number(n)}function Es(e){return e.name===`IndexedDbTransactionError`}var Ds=class{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ae(e),this.ue=e=>t.writeSequenceNumber(e))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.ue&&this.ue(e),e}};Ds.ce=-1;var Os=-1;function ks(e){return e==null}function As(e){return e===0&&1/e==-1/0}function js(e){return typeof e==`number`&&Number.isInteger(e)&&!As(e)&&e<=2**53-1&&e>=-(2**53-1)}var Ms=`�`;function Ns(e){let t=``;for(let n=0;n<e.length;n++)t.length>0&&(t=Fs(t)),t=Ps(e.get(n),t);return Fs(t)}function Ps(e,t){let n=t,r=e.length;for(let t=0;t<r;t++){let r=e.charAt(t);switch(r){case`\0`:n+=`��`;break;case Ms:n+=`��`;break;default:n+=r}}return n}function Fs(e){return e+`��`}function Is(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ls(e,t){for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Rs(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var zs=class e{constructor(e,t){this.comparator=e,this.root=t||Vs.EMPTY}insert(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Vs.BLACK,null,null))}remove(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Vs.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let n=this.comparator(e,t.key);if(n===0)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){let r=this.comparator(e,n.key);if(r===0)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,n)=>(e(t,n),!1)))}toString(){let e=[];return this.inorderTraversal(((t,n)=>(e.push(`${t}:${n}`),!1))),`{${e.join(`, `)}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Bs(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Bs(this.root,e,this.comparator,!1)}getReverseIterator(){return new Bs(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Bs(this.root,e,this.comparator,!0)}},Bs=class{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(i===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}},Vs=class e{constructor(t,n,r,i,a){this.key=t,this.value=n,this.color=r??e.RED,this.left=i??e.EMPTY,this.right=a??e.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,n,r,i,a){return new e(t??this.key,n??this.value,r??this.color,i??this.left,a??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this,i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):i===0?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return e.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,n){let r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(t,i.key)===0){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){let t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){let t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){return 2**this.check()<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw F(43730,{key:this.key,value:this.value});if(this.right.isRed())throw F(14113,{key:this.key,value:this.value});let e=this.left.check();if(e!==this.right.check())throw F(27949);return e+ +!this.isRed()}};
20Vs.EMPTY=null,Vs.RED=!0,Vs.BLACK=!1,Vs.EMPTY=new class{constructor(){this.size=0}get key(){throw F(57766)}get value(){throw F(16141)}get color(){throw F(16727)}get left(){throw F(29726)}get right(){throw F(36894)}copy(e,t,n,r,i){return this}insert(e,t,n){return new Vs(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};var Hs=class e{constructor(e){this.comparator=e,this.data=new zs(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,n)=>(e(t),!1)))}forEachInRange(e,t){let n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=t===void 0?this.data.getIterator():this.data.getIteratorFrom(t);n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new Us(this.data.getIterator())}getIteratorFrom(e){return new Us(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((e=>{t=t.add(e)})),t}isEqual(t){if(!(t instanceof e)||this.size!==t.size)return!1;let n=this.data.getIterator(),r=t.data.getIterator();for(;n.hasNext();){let e=n.getNext().key,t=r.getNext().key;if(this.comparator(e,t)!==0)return!1}return!0}toArray(){let e=[];return this.forEach((t=>{e.push(t)})),e}toString(){let e=[];return this.forEach((t=>e.push(t))),`SortedSet(`+e.toString()+`)`}copy(t){let n=new e(this.comparator);return n.data=t,n}},Us=class{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}},Ws=class e{constructor(e){this.fields=e,e.sort(rs.comparator)}static empty(){return new e([])}unionWith(t){let n=new Hs(rs.comparator);for(let e of this.fields)n=n.add(e);for(let e of t)n=n.add(e);return new e(n.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Qo(this.fields,e.fields,((e,t)=>e.isEqual(t)))}},Gs=class extends Error{constructor(){super(...arguments),this.name=`Base64DecodeError`}},Ks=class e{constructor(e){this.binaryString=e}static fromBase64String(t){return new e(function(e){try{return atob(e)}catch(e){throw typeof DOMException<`u`&&e instanceof DOMException?new Gs(`Invalid base64 string: `+e):e}}(t))}static fromUint8Array(t){return new e(function(e){let t=``;for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t))}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(e){return btoa(e)}(this.binaryString)}toUint8Array(){return function(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return B(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}};Ks.EMPTY_BYTE_STRING=new Ks(``);var qs=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Js(e){if(I(!!e,39018),typeof e==`string`){let t=0,n=qs.exec(e);if(I(!!n,46558,{timestamp:e}),n[1]){let e=n[1];e=(e+`000000000`).substr(0,9),t=Number(e)}let r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:Ys(e.seconds),nanos:Ys(e.nanos)}}function Ys(e){return typeof e==`number`?e:typeof e==`string`?Number(e):0}function Xs(e){return typeof e==`string`?Ks.fromBase64String(e):Ks.fromUint8Array(e)}var Zs=`server_timestamp`,Qs=`__type__`,$s=`__previous_value__`,ec=`__local_write_time__`;function tc(e){return(e?.mapValue?.fields||{})[Qs]?.stringValue===Zs}function nc(e){let t=e.mapValue.fields[$s];return tc(t)?nc(t):t}function rc(e){let t=Js(e.mapValue.fields[ec].timestampValue);return new hs(t.seconds,t.nanos)}var ic=class{constructor(e,t,n,r,i,a,o,s,c,l,u){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=a,this.autoDetectLongPolling=o,this.longPollingOptions=s,this.useFetchStreams=c,this.isUsingEmulator=l,this.apiKey=u}},ac=`(default)`,oc=class e{constructor(e,t){this.projectId=e,this.database=t||ac}static empty(){return new e(``,``)}get isDefaultDatabase(){return this.database===ac}isEqual(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}};function sc(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,[`projectId`]))throw new z(R.INVALID_ARGUMENT,`"projectId" not provided in firebase.initializeApp.`);return new oc(e.options.projectId,t)}
20var cc=`__type__`,lc=`__max__`,uc={mapValue:{fields:{__type__:{stringValue:lc}}}},dc=`__vector__`,fc=`value`;function pc(e){return`nullValue`in e?0:`booleanValue`in e?1:`integerValue`in e||`doubleValue`in e?2:`timestampValue`in e?3:`stringValue`in e?5:`bytesValue`in e?6:`referenceValue`in e?7:`geoPointValue`in e?8:`arrayValue`in e?9:`mapValue`in e?tc(e)?4:jc(e)?9007199254740991:kc(e)?10:11:F(28295,{value:e})}function mc(e,t){if(e===t)return!0;let n=pc(e);if(n!==pc(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return rc(e).isEqual(rc(t));case 3:return function(e,t){if(typeof e.timestampValue==`string`&&typeof t.timestampValue==`string`&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;let n=Js(e.timestampValue),r=Js(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return Xs(e.bytesValue).isEqual(Xs(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Ys(e.geoPointValue.latitude)===Ys(t.geoPointValue.latitude)&&Ys(e.geoPointValue.longitude)===Ys(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if(`integerValue`in e&&`integerValue`in t)return Ys(e.integerValue)===Ys(t.integerValue);if(`doubleValue`in e&&`doubleValue`in t){let n=Ys(e.doubleValue),r=Ys(t.doubleValue);return n===r?As(n)===As(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Qo(e.arrayValue.values||[],t.arrayValue.values||[],mc);case 10:case 11:return function(e,t){let n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Is(n)!==Is(r))return!1;for(let e in n)if(n.hasOwnProperty(e)&&(r[e]===void 0||!mc(n[e],r[e])))return!1;return!0}(e,t);default:return F(52216,{left:e})}}function hc(e,t){return(e.values||[]).find((e=>mc(e,t)))!==void 0}function gc(e,t){if(e===t)return 0;let n=pc(e),r=pc(t);if(n!==r)return B(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return B(e.booleanValue,t.booleanValue);case 2:return function(e,t){let n=Ys(e.integerValue||e.doubleValue),r=Ys(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return _c(e.timestampValue,t.timestampValue);case 4:return _c(rc(e),rc(t));case 5:return Jo(e.stringValue,t.stringValue);case 6:return function(e,t){let n=Xs(e),r=Xs(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let n=e.split(`/`),r=t.split(`/`);for(let e=0;e<n.length&&e<r.length;e++){let t=B(n[e],r[e]);if(t!==0)return t}return B(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){let n=B(Ys(e.latitude),Ys(t.latitude));return n===0?B(Ys(e.longitude),Ys(t.longitude)):n}(e.geoPointValue,t.geoPointValue);case 9:return vc(e.arrayValue,t.arrayValue);case 10:return function(e,t){let n=e.fields||{},r=t.fields||{},i=n[fc]?.arrayValue,a=r[fc]?.arrayValue,o=B(i?.values?.length||0,a?.values?.length||0);return o===0?vc(i,a):o}(e.mapValue,t.mapValue);case 11:return function(e,t){if(e===uc.mapValue&&t===uc.mapValue)return 0;if(e===uc.mapValue)return 1;if(t===uc.mapValue)return-1;let n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(let e=0;e<r.length&&e<a.length;++e){let t=Jo(r[e],a[e]);if(t!==0)return t;let o=gc(n[r[e]],i[a[e]]);if(o!==0)return o}return B(r.length,a.length)}(e.mapValue,t.mapValue);default:throw F(23264,{he:n})}}function _c(e,t){if(typeof e==`string`&&typeof t==`string`&&e.length===t.length)return B(e,t);let n=Js(e),r=Js(t),i=B(n.seconds,r.seconds);return i===0?B(n.nanos,r.nanos):i}function vc(e,t){let n=e.values||[],r=t.values||[];for(let e=0;e<n.length&&e<r.length;++e){let t=gc(n[e],r[e]);if(t)return t}return B(n.length,r.length)}function yc(e){return bc(e)}function bc(e){return`nullValue`in e?`null`:`booleanValue`in e?``+e.booleanValue:`integerValue`in e?``+e.integerValue:`doubleValue`in e?``+e.doubleValue:`timestampValue`in e?function(e){let t=Js(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):`stringValue`in e?e.stringValue:`bytesValue`in e?function(e){return Xs(e).toBase64()}(e.bytesValue):`referenceValue`in e?function(e){return V.fromName(e).toString()}(e.referenceValue):`geoPointValue`in e?function(e){return`geo(${e.latitude},${e.longitude})`}(e.geoPointValue):`arrayValue`in e?function(e){let t=`[`,n=!0;for(let r of e.values||[])n?n=!1:t+=`,`,t+=bc(r);return t+`]`}(e.arrayValue):`mapValue`in e?function(e){let t=Object.keys(e.fields||{}).sort(),n=`{`,r=!0;for(let i of t)r?r=!1:n+=`,`,n+=`${i}:${bc(e.fields[i])}`;return n+`}`}(e.mapValue):F(61005,{value:e})}function xc(e){switch(pc(e)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:let t=nc(e);return t?16+xc(t):16;case 5:return 2*e.stringValue.length;case 6:return Xs(e.bytesValue).approximateByteSize();case 7:return e.referenceValue.length;case 9:return function(e){return(e.values||[]).reduce(((e,t)=>e+xc(t)),0)}(e.arrayValue);case 10:case 11:return function(e){let t=0;return Ls(e.fields,((e,n)=>{t+=e.length+xc(n)})),t}(e.mapValue);default:throw F(13486,{value:e})}}function Sc(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function Cc(e){return!!e&&`integerValue`in e}function wc(e){return Cc(e)||function(e){return!!e&&`doubleValue`in e}(e)}function Tc(e){return!!e&&`arrayValue`in e}function Ec(e){return!!e&&`nullValue`in e}function Dc(e){return!!e&&`doubleValue`in e&&isNaN(Number(e.doubleValue))}function Oc(e){return!!e&&`mapValue`in e}function kc(e){return(e?.mapValue?.fields||{})[cc]?.stringValue===dc}function Ac(e){if(e.geoPointValue)return{geoPointValue:{...e.geoPointValue}};if(e.timestampValue&&typeof e.timestampValue==`object`)return{timestampValue:{...e.timestampValue}};if(e.mapValue){let t={mapValue:{fields:{}}};return Ls(e.mapValue.fields,((e,n)=>t.mapValue.fields[e]=Ac(n))),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=Ac(e.arrayValue.values[n]);return t}return{...e}}function jc(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue===lc}var Mc=class e{constructor(e){this.value=e}static empty(){return new e({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(t=(t.mapValue.fields||{})[e.get(n)],!Oc(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Ac(t)}setAll(e){let t=rs.emptyPath(),n={},r=[];e.forEach(((e,i)=>{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=Ac(e):r.push(i.lastSegment())}
20));let i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){let t=this.field(e.popLast());Oc(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return mc(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];Oc(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){Ls(t,((t,n)=>e[t]=n));for(let t of n)delete e[t]}clone(){return new e(Ac(this.value))}};function Nc(e){let t=[];return Ls(e.fields,((e,n)=>{let r=new rs([e]);if(Oc(n)){let e=Nc(n.mapValue).fields;if(e.length===0)t.push(r);else for(let n of e)t.push(r.child(n))}else t.push(r)})),new Ws(t)}var Pc=class e{constructor(e,t,n,r,i,a,o){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=a,this.documentState=o}static newInvalidDocument(t){return new e(t,0,H.min(),H.min(),H.min(),Mc.empty(),0)}static newFoundDocument(t,n,r,i){return new e(t,1,n,H.min(),r,i,0)}static newNoDocument(t,n){return new e(t,2,n,H.min(),H.min(),Mc.empty(),0)}static newUnknownDocument(t,n){return new e(t,3,n,H.min(),H.min(),Mc.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(H.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Mc.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Mc.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=H.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new e(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}},Fc=class{constructor(e,t){this.position=e,this.inclusive=t}};function Ic(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){let a=t[i],o=e.position[i];if(r=a.field.isKeyField()?V.comparator(V.fromName(o.referenceValue),n.key):gc(o,n.data.field(a.field)),a.dir===`desc`&&(r*=-1),r!==0)break}return r}function Lc(e,t){if(e===null)return t===null;if(t===null||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!mc(e.position[n],t.position[n]))return!1;return!0}var Rc=class{constructor(e,t=`asc`){this.field=e,this.dir=t}};function zc(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}var Bc=class{},Vc=class e extends Bc{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(t,n,r){return t.isKeyField()?n===`in`||n===`not-in`?this.createKeyFieldInFilter(t,n,r):new Yc(t,n,r):n===`array-contains`?new $c(t,r):n===`in`?new el(t,r):n===`not-in`?new tl(t,r):n===`array-contains-any`?new nl(t,r):new e(t,n,r)}static createKeyFieldInFilter(e,t,n){return t===`in`?new Xc(e,n):new Zc(e,n)}matches(e){let t=e.data.field(this.field);return this.op===`!=`?t!==null&&t.nullValue===void 0&&this.matchesComparison(gc(t,this.value)):t!==null&&pc(this.value)===pc(t)&&this.matchesComparison(gc(t,this.value))}matchesComparison(e){switch(this.op){case`<`:return e<0;case`<=`:return e<=0;case`==`:return e===0;case`!=`:return e!==0;case`>`:return e>0;case`>=`:return e>=0;default:return F(47266,{operator:this.op})}}isInequality(){return[`<`,`<=`,`>`,`>=`,`!=`,`not-in`].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}},Hc=class e extends Bc{constructor(e,t){super(),this.filters=e,this.op=t,this.Pe=null}static create(t,n){return new e(t,n)}matches(e){return Uc(this)?this.filters.find((t=>!t.matches(e)))===void 0:this.filters.find((t=>t.matches(e)))!==void 0}getFlattenedFilters(){return this.Pe!==null||(this.Pe=this.filters.reduce(((e,t)=>e.concat(t.getFlattenedFilters())),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}};function Uc(e){return e.op===`and`}function Wc(e){return Gc(e)&&Uc(e)}function Gc(e){for(let t of e.filters)if(t instanceof Hc)return!1;return!0}function Kc(e){if(e instanceof Vc)return e.field.canonicalString()+e.op.toString()+yc(e.value);if(Wc(e))return e.filters.map((e=>Kc(e))).join(`,`);{let t=e.filters.map((e=>Kc(e))).join(`,`);
20return`${e.op}(${t})`}}function qc(e,t){return e instanceof Vc?function(e,t){return t instanceof Vc&&e.op===t.op&&e.field.isEqual(t.field)&&mc(e.value,t.value)}(e,t):e instanceof Hc?function(e,t){return t instanceof Hc&&e.op===t.op&&e.filters.length===t.filters.length?e.filters.reduce(((e,n,r)=>e&&qc(n,t.filters[r])),!0):!1}(e,t):void F(19439)}function Jc(e){return e instanceof Vc?function(e){return`${e.field.canonicalString()} ${e.op} ${yc(e.value)}`}(e):e instanceof Hc?function(e){return e.op.toString()+` {`+e.getFilters().map(Jc).join(` ,`)+`}`}(e):`Filter`}var Yc=class extends Vc{constructor(e,t,n){super(e,t,n),this.key=V.fromName(n.referenceValue)}matches(e){let t=V.comparator(e.key,this.key);return this.matchesComparison(t)}},Xc=class extends Vc{constructor(e,t){super(e,`in`,t),this.keys=Qc(`in`,t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}},Zc=class extends Vc{constructor(e,t){super(e,`not-in`,t),this.keys=Qc(`not-in`,t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}};function Qc(e,t){return(t.arrayValue?.values||[]).map((e=>V.fromName(e.referenceValue)))}var $c=class extends Vc{constructor(e,t){super(e,`array-contains`,t)}matches(e){let t=e.data.field(this.field);return Tc(t)&&hc(t.arrayValue,this.value)}},el=class extends Vc{constructor(e,t){super(e,`in`,t)}matches(e){let t=e.data.field(this.field);return t!==null&&hc(this.value.arrayValue,t)}},tl=class extends Vc{constructor(e,t){super(e,`not-in`,t)}matches(e){if(hc(this.value.arrayValue,{nullValue:`NULL_VALUE`}))return!1;let t=e.data.field(this.field);return t!==null&&t.nullValue===void 0&&!hc(this.value.arrayValue,t)}},nl=class extends Vc{constructor(e,t){super(e,`array-contains-any`,t)}matches(e){let t=e.data.field(this.field);return!(!Tc(t)||!t.arrayValue.values)&&t.arrayValue.values.some((e=>hc(this.value.arrayValue,e)))}},rl=class{constructor(e,t=null,n=[],r=[],i=null,a=null,o=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=a,this.endAt=o,this.Te=null}};function il(e,t=null,n=[],r=[],i=null,a=null,o=null){return new rl(e,t,n,r,i,a,o)}function al(e){let t=L(e);if(t.Te===null){let e=t.path.canonicalString();t.collectionGroup!==null&&(e+=`|cg:`+t.collectionGroup),e+=`|f:`,e+=t.filters.map((e=>Kc(e))).join(`,`),e+=`|ob:`,e+=t.orderBy.map((e=>function(e){return e.field.canonicalString()+e.dir}(e))).join(`,`),ks(t.limit)||(e+=`|l:`,e+=t.limit),t.startAt&&(e+=`|lb:`,e+=t.startAt.inclusive?`b:`:`a:`,e+=t.startAt.position.map((e=>yc(e))).join(`,`)),t.endAt&&(e+=`|ub:`,e+=t.endAt.inclusive?`a:`:`b:`,e+=t.endAt.position.map((e=>yc(e))).join(`,`)),t.Te=e}return t.Te}function ol(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!zc(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!qc(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Lc(e.startAt,t.startAt)&&Lc(e.endAt,t.endAt)}function sl(e){return V.isDocumentKey(e.path)&&e.collectionGroup===null&&e.filters.length===0}var cl=class{constructor(e,t=null,n=[],r=[],i=null,a=`F`,o=null,s=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=a,this.startAt=o,this.endAt=s,this.Ie=null,this.Ee=null,this.Re=null,this.startAt,this.endAt}};function ll(e,t,n,r,i,a,o,s){return new cl(e,t,n,r,i,a,o,s)}function ul(e){return new cl(e)}function dl(e){return e.filters.length===0&&e.limit===null&&e.startAt==null&&e.endAt==null&&(e.explicitOrderBy.length===0||e.explicitOrderBy.length===1&&e.explicitOrderBy[0].field.isKeyField())}function fl(e){return V.isDocumentKey(e.path)&&e.collectionGroup===null&&e.filters.length===0}function pl(e){return e.collectionGroup!==null}function ml(e){let t=L(e);if(t.Ie===null){t.Ie=[];let e=new Set;for(let n of t.explicitOrderBy)t.Ie.push(n),e.add(n.field.canonicalString());let n=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:`asc`;(function(e){let t=new Hs(rs.comparator);
20return e.filters.forEach((e=>{e.getFlattenedFilters().forEach((e=>{e.isInequality()&&(t=t.add(e.field))}))})),t})(t).forEach((r=>{e.has(r.canonicalString())||r.isKeyField()||t.Ie.push(new Rc(r,n))})),e.has(rs.keyField().canonicalString())||t.Ie.push(new Rc(rs.keyField(),n))}return t.Ie}function hl(e){let t=L(e);return t.Ee||=gl(t,ml(e)),t.Ee}function gl(e,t){if(e.limitType===`F`)return il(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map((e=>{let t=e.dir===`desc`?`asc`:`desc`;return new Rc(e.field,t)}));let n=e.endAt?new Fc(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new Fc(e.startAt.position,e.startAt.inclusive):null;return il(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}function _l(e,t){let n=e.filters.concat([t]);return new cl(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function vl(e,t){let n=e.explicitOrderBy.concat([t]);return new cl(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}function yl(e,t,n){return new cl(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function bl(e,t){return ol(hl(e),hl(t))&&e.limitType===t.limitType}function xl(e){return`${al(hl(e))}|lt:${e.limitType}`}function Sl(e){return`Query(target=${function(e){let t=e.path.canonicalString();return e.collectionGroup!==null&&(t+=` collectionGroup=`+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map((e=>Jc(e))).join(`, `)}]`),ks(e.limit)||(t+=`, limit: `+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map((e=>function(e){return`${e.field.canonicalString()} (${e.dir})`}(e))).join(`, `)}]`),e.startAt&&(t+=`, startAt: `,t+=e.startAt.inclusive?`b:`:`a:`,t+=e.startAt.position.map((e=>yc(e))).join(`,`)),e.endAt&&(t+=`, endAt: `,t+=e.endAt.inclusive?`a:`:`b:`,t+=e.endAt.position.map((e=>yc(e))).join(`,`)),`Target(${t})`}(hl(e))}; limitType=${e.limitType})`}function Cl(e,t){return t.isFoundDocument()&&function(e,t){let n=t.key.path;return e.collectionGroup===null?V.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n):t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n)}(e,t)&&function(e,t){for(let n of ml(e))if(!n.field.isKeyField()&&t.data.field(n.field)===null)return!1;return!0}(e,t)&&function(e,t){for(let n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){let r=Ic(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,ml(e),t)||e.endAt&&!function(e,t,n){let r=Ic(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,ml(e),t))}(e,t)}function wl(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Tl(e){return(t,n)=>{let r=!1;for(let i of ml(e)){let e=El(i,t,n);if(e!==0)return e;r||=i.field.isKeyField()}return 0}}function El(e,t,n){let r=e.field.isKeyField()?V.comparator(t.key,n.key):function(e,t,n){let r=t.data.field(e),i=n.data.field(e);return r!==null&&i!==null?gc(r,i):F(42886)}(e.field,t,n);switch(e.dir){case`asc`:return r;case`desc`:return-1*r;default:return F(19790,{direction:e.dir})}}var Dl=class{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),n=this.inner[t];if(n!==void 0){for(let[t,r]of n)if(this.equalsFn(t,e))return r}}has(e){return this.get(e)!==void 0}set(e,t){let n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return this.inner[n]=[[e,t]],void this.innerSize++;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return void(r[n]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){let t=this.mapKeyFn(e),n=this.inner[t];if(n===void 0)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return n.length===1?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){Ls(this.inner,((t,n)=>{for(let[t,r]of n)e(t,r)}))}isEmpty(){return Rs(this.inner)}size(){return this.innerSize}},Ol=new zs(V.comparator);function kl(){return Ol}var Al=new zs(V.comparator);function jl(...e){let t=Al;for(let n of e)t=t.insert(n.key,n);return t}function Ml(e){let t=Al;return e.forEach(((e,n)=>t=t.insert(e,n.overlayedDocument))),t}function Nl(){return Fl()}function Pl(){return Fl()}function Fl(){return new Dl((e=>e.toString()),((e,t)=>e.isEqual(t)))}var Il=new zs(V.comparator),Ll=new Hs(V.comparator);function W(...e){let t=Ll;for(let n of e)t=t.add(n);return t}var Rl=new Hs(B);function zl(){return Rl}function G(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:`NaN`};if(t===1/0)return{doubleValue:`Infinity`};if(t===-1/0)return{doubleValue:`-Infinity`}}return{doubleValue:As(t)?`-0`:t}}function Bl(e){return{integerValue:``+e}}function K(e,t){return js(t)?Bl(t):G(e,t)}var q=class{constructor(){this._=void 0}};function Vl(e,t,n){return e instanceof Wl?function(e,t){let n={fields:{[Qs]:{stringValue:Zs},[ec]:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&tc(t)&&(t=nc(t)),t&&(n.fields[$s]=t),{mapValue:n}}(n,t):e instanceof Gl?Kl(e,t):e instanceof ql?Jl(e,t):e instanceof Xl?function(e,t){let n=Ul(e,t),r=eu(n)+eu(e.Ae);return Cc(n)&&Cc(e.Ae)?Bl(r):G(e.serializer,r)}
20(e,t):e instanceof Zl?function(e,t){return $l(e,t,Math.min)}(e,t):e instanceof Ql?function(e,t){return $l(e,t,Math.max)}(e,t):void 0}function Hl(e,t,n){return e instanceof Gl?Kl(e,t):e instanceof ql?Jl(e,t):n}function Ul(e,t){return e instanceof Xl?wc(t)?t:{integerValue:0}:null}var Wl=class extends q{},Gl=class extends q{constructor(e){super(),this.elements=e}};function Kl(e,t){let n=tu(t);for(let t of e.elements)n.some((e=>mc(e,t)))||n.push(t);return{arrayValue:{values:n}}}var ql=class extends q{constructor(e){super(),this.elements=e}};function Jl(e,t){let n=tu(t);for(let t of e.elements)n=n.filter((e=>!mc(e,t)));return{arrayValue:{values:n}}}var Yl=class extends q{constructor(e,t){super(),this.serializer=e,this.Ae=t}},Xl=class extends Yl{},Zl=class extends Yl{},Ql=class extends Yl{};function $l(e,t,n){if(!wc(t))return e.Ae;let r=n(eu(t),eu(e.Ae));return Cc(t)&&Cc(e.Ae)?Bl(r):G(e.serializer,r)}function eu(e){return Ys(e.integerValue||e.doubleValue)}function tu(e){return Tc(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}function nu(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Gl&&t instanceof Gl||e instanceof ql&&t instanceof ql?Qo(e.elements,t.elements,mc):e instanceof Xl&&t instanceof Xl||e instanceof Zl&&t instanceof Zl||e instanceof Ql&&t instanceof Ql?mc(e.Ae,t.Ae):e instanceof Wl&&t instanceof Wl}(e.transform,t.transform)}var ru=class{constructor(e,t){this.version=e,this.transformResults=t}},iu=class e{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new e}static exists(t){return new e(void 0,t)}static updateTime(t){return new e(t)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}};function au(e,t){return e.updateTime===void 0?e.exists===void 0||e.exists===t.isFoundDocument():t.isFoundDocument()&&t.version.isEqual(e.updateTime)}var ou=class{};function su(e,t){if(!e.hasLocalMutations||t&&t.fields.length===0)return null;if(t===null)return e.isNoDocument()?new _u(e.key,iu.none()):new fu(e.key,e.data,iu.none());{let n=e.data,r=Mc.empty(),i=new Hs(rs.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);t===null&&e.length>1&&(e=e.popLast(),t=n.field(e)),t===null?r.delete(e):r.set(e,t),i=i.add(e)}return new pu(e.key,r,new Ws(i.toArray()),iu.none())}}function cu(e,t,n){e instanceof fu?function(e,t,n){let r=e.value.clone(),i=hu(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof pu?function(e,t,n){if(!au(e.precondition,t))return void t.convertToUnknownDocument(n.version);let r=hu(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(mu(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function lu(e,t,n,r){return e instanceof fu?function(e,t,n,r){if(!au(e.precondition,t))return n;let i=e.value.clone(),a=gu(e.fieldTransforms,r,t);return i.setAll(a),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof pu?function(e,t,n,r){if(!au(e.precondition,t))return n;let i=gu(e.fieldTransforms,r,t),a=t.data;return a.setAll(mu(e)),a.setAll(i),t.convertToFoundDocument(t.version,a).setHasLocalMutations(),n===null?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((e=>e.field)))}(e,t,n,r):function(e,t,n){return au(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function uu(e,t){let n=null;for(let r of e.fieldTransforms){let e=t.data.field(r.field),i=Ul(r.transform,e||null);i!=null&&(n===null&&(n=Mc.empty()),n.set(r.field,i))}return n||null}function du(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return e===void 0&&t===void 0||!(!e||!t)&&Qo(e,t,((e,t)=>nu(e,t)))}(e.fieldTransforms,t.fieldTransforms)&&(e.type===0?e.value.isEqual(t.value):e.type!==1||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}var fu=class extends ou{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.prec
20ondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}},pu=class extends ou{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}};function mu(e){let t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){let r=e.data.field(n);t.set(n,r)}})),t}function hu(e,t,n){let r=new Map;I(e.length===n.length,32656,{Ve:n.length,de:e.length});for(let i=0;i<n.length;i++){let a=e[i],o=a.transform,s=t.data.field(a.field);r.set(a.field,Hl(o,s,n[i]))}return r}function gu(e,t,n){let r=new Map;for(let i of e){let e=i.transform,a=n.data.field(i.field);r.set(i.field,Vl(e,a,t))}return r}var _u=class extends ou{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}},vu=class extends ou{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}},yu=class{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){let n=t.mutationResults;for(let t=0;t<this.mutations.length;t++){let r=this.mutations[t];r.key.isEqual(e.key)&&cu(r,e,n[t])}}applyToLocalView(e,t){for(let n of this.baseMutations)n.key.isEqual(e.key)&&(t=lu(n,e,t,this.localWriteTime));for(let n of this.mutations)n.key.isEqual(e.key)&&(t=lu(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){let n=Pl();return this.mutations.forEach((r=>{let i=e.get(r.key),a=i.overlayedDocument,o=this.applyToLocalView(a,i.mutatedFields);o=t.has(r.key)?null:o;let s=su(a,o);s!==null&&n.set(r.key,s),a.isValidDocument()||a.convertToNoDocument(H.min())})),n}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),W())}isEqual(e){return this.batchId===e.batchId&&Qo(this.mutations,e.mutations,((e,t)=>du(e,t)))&&Qo(this.baseMutations,e.baseMutations,((e,t)=>du(e,t)))}},bu=class e{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(t,n,r){I(t.mutations.length===r.length,58842,{me:t.mutations.length,fe:r.length});let i=function(){return Il}(),a=t.mutations;for(let e=0;e<a.length;e++)i=i.insert(a[e].key,r[e].version);return new e(t,n,r,i)}},xu=class{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{\n      largestBatchId: ${this.largestBatchId},\n      mutation: ${this.mutation.toString()}\n    }`}},Su=class{constructor(e,t){this.count=e,this.unchangedNames=t}},Cu,J;function wu(e){switch(e){case R.OK:return F(64938);case R.CANCELLED:case R.UNKNOWN:case R.DEADLINE_EXCEEDED:case R.RESOURCE_EXHAUSTED:case R.INTERNAL:case R.UNAVAILABLE:case R.UNAUTHENTICATED:return!1;case R.INVALID_ARGUMENT:case R.NOT_FOUND:case R.ALREADY_EXISTS:case R.PERMISSION_DENIED:case R.FAILED_PRECONDITION:case R.ABORTED:case R.OUT_OF_RANGE:case R.UNIMPLEMENTED:case R.DATA_LOSS:return!0;default:return F(15467,{code:e})}}function Tu(e){if(e===void 0)return No(`GRPC error has no .code`),R.UNKNOWN;switch(e){case Cu.OK:return R.OK;case Cu.CANCELLED:return R.CANCELLED;case Cu.UNKNOWN:return R.UNKNOWN;case Cu.DEADLINE_EXCEEDED:return R.DEADLINE_EXCEEDED;case Cu.RESOURCE_EXHAUSTED:return R.RESOURCE_EXHAUSTED;case Cu.INTERNAL:return R.INTERNAL;case Cu.UNAVAILABLE:return R.UNAVAILABLE;case Cu.UNAUTHENTICATED:return R.UNAUTHENTICATED;case Cu.INVALID_ARGUMENT:return R.INVALID_ARGUMENT;case Cu.NOT_FOUND:return R.NOT_FOUND;case Cu.ALREADY_EXISTS:return R.ALREADY_EXISTS;case Cu.PERMISSION_DENIED:return R.PERMISSION_DENIED;case Cu.FAILED_PRECONDITION:return R.FAILED_PRECONDITION;case Cu.ABORTED:return R.ABORTED;case Cu.OUT_OF_RANGE:return R.OUT_OF_RANGE;case Cu.UNIMPLEMENTED:return R.UNIMPLEMENTED;case Cu.DATA_LOSS:return R.DATA_LOSS;default:return F(39323,{code:e})}}(J=Cu||={})[J.OK=0]=`OK`,J[J.CANCELLED=1]=`CANCELLED`,J[J.UNKNOWN=2]=`UNKNOWN`,J[J.INVALID_ARGUMENT=3]=`INVALID_ARGUMENT`,J[J.DEADLINE_EXCEEDED=4]=`DEADLINE_EXCEEDED`,J[J.NOT_FOUND=5]=`NOT_FOUND`,J[J.ALREADY_EXISTS=6]=`ALREADY_EXISTS`,J[J.PERMISSION_DENIED=7]=`PERMISSION_DENIED`,J[J.UNAUTHENTICATED=16]=`UNAUTHENTICATED`,J[J.RESOURCE_EXHAUSTED=8]=`RESOURCE_EXHAUSTED`,J[J.FAILED_PRECONDITION=9]=`FAILED_PRECONDITION`,J[J.ABORTED=10]=`ABORTED`,J[J.OUT_OF_RANGE=11]=`OUT_OF_RANGE`,J[J.UNIMPLEMENT
20ED=12]=`UNIMPLEMENTED`,J[J.INTERNAL=13]=`INTERNAL`,J[J.UNAVAILABLE=14]=`UNAVAILABLE`,J[J.DATA_LOSS=15]=`DATA_LOSS`;var Eu=null;function Du(){return new TextEncoder}var Ou=new vo([4294967295,4294967295],0);function ku(e){let t=Du().encode(e),n=new yo;return n.update(t),new Uint8Array(n.digest())}function Au(e){let t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),a=t.getUint32(12,!0);return[new vo([n,r],0),new vo([i,a],0)]}var ju=class e{constructor(e,t,n){if(this.bitmap=e,this.padding=t,this.hashCount=n,t<0||t>=8)throw new Mu(`Invalid padding: ${t}`);if(n<0||e.length>0&&this.hashCount===0)throw new Mu(`Invalid hash count: ${n}`);if(e.length===0&&t!==0)throw new Mu(`Invalid padding when bitmap length is 0: ${t}`);this.ge=8*e.length-t,this.pe=vo.fromNumber(this.ge)}ye(e,t,n){let r=e.add(t.multiply(vo.fromNumber(n)));return r.compare(Ou)===1&&(r=new vo([r.getBits(0),r.getBits(1)],0)),r.modulo(this.pe).toNumber()}we(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.ge===0)return!1;let[t,n]=Au(ku(e));for(let e=0;e<this.hashCount;e++){let r=this.ye(t,n,e);if(!this.we(r))return!1}return!0}static create(t,n,r){let i=t%8==0?0:8-t%8,a=new e(new Uint8Array(Math.ceil(t/8)),i,n);return r.forEach((e=>a.insert(e))),a}insert(e){if(this.ge===0)return;let[t,n]=Au(ku(e));for(let e=0;e<this.hashCount;e++){let r=this.ye(t,n,e);this.Se(r)}}Se(e){let t=Math.floor(e/8),n=e%8;this.bitmap[t]|=1<<n}},Mu=class extends Error{constructor(){super(...arguments),this.name=`BloomFilterError`}},Nu=class e{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(t,n,r){let i=new Map;return i.set(t,Pu.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new e(H.min(),i,new zs(B),kl(),W())}},Pu=class e{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(t,n,r){return new e(r,n,W(),W(),W())}},Fu=class{constructor(e,t,n,r){this.be=e,this.removedTargetIds=t,this.key=n,this.De=r}},Iu=class{constructor(e,t){this.targetId=e,this.Ce=t}},Lu=class{constructor(e,t,n=Ks.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}},Ru=class{constructor(e){this.targetId=e,this.ve=0,this.Fe=Hu(),this.Me=Ks.EMPTY_BYTE_STRING,this.xe=!1,this.Oe=!0}get current(){return this.xe}get resumeToken(){return this.Me}get Ne(){return this.ve!==0}get Be(){return this.Oe}Le(e){e.approximateByteSize()>0&&(this.Oe=!0,this.Me=e)}ke(){let e=W(),t=W(),n=W();return this.Fe.forEach(((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:F(38017,{changeType:i})}})),new Pu(this.Me,this.xe,e,t,n)}qe(){this.Oe=!1,this.Fe=Hu()}Ke(e,t){this.Oe=!0,this.Fe=this.Fe.insert(e,t)}Ue(e){this.Oe=!0,this.Fe=this.Fe.remove(e)}$e(){this.ve+=1}We(){--this.ve,I(this.ve>=0,3241,{ve:this.ve,targetId:this.targetId})}Qe(){this.Oe=!0,this.xe=!0}},zu=`WatchChangeAggregator`,Bu=class{constructor(e){this.Ge=e,this.ze=new Map,this.je=kl(),this.Je=Vu(),this.He=Vu(),this.Ze=new zs(B)}Xe(e){for(let t of e.be)e.De&&e.De.isFoundDocument()?this.Ye(t,e.De):this.et(t,e.key,e.De);for(let t of e.removedTargetIds)this.et(t,e.key,e.De)}tt(e){this.forEachTarget(e,(t=>{let n=this.ze.get(t);if(n)switch(e.state){case 0:this.nt(t)&&n.Le(e.resumeToken);break;case 1:n.We(),n.Ne||n.qe(),n.Le(e.resumeToken);break;case 2:n.We(),n.Ne||this.removeTarget(t);break;case 3:this.nt(t)&&(n.Qe(),n.Le(e.resumeToken));break;case 4:this.nt(t)&&(this.rt(t),n.Le(e.resumeToken));break;default:F(56790,{state:e.state})}else P(zu,`handleTargetChange received targetChange for untracked target ID (${t}) with state (${e.state})`)}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.ze.forEach(((e,n)=>{this.nt(n)&&t(n)}))}it(e){let t=e.targetId,n=e.Ce.count,r=this.st(t);if(r){let i=r.target;if(sl(i))if(n===0){let e=new V(i.path);this.et(t,e,Pc.newNoDocument(e,H.min()))}else I(n===1,20013,{expectedCount:n});else{let r=this.ot(t);if(r!==n){let n=this._t(e),i=n?this.ut(n,e,r):1;if(i!==0){this.rt(t);let e=i===2?`TargetPurposeExistenceFilterMismatchBloom`:`TargetPurposeExistenceFilterMismatch`;this.Ze=this.Ze.insert(t,e)}Eu?.o(function(e,t,n,r,i){let a={localCacheCount:e,existenceFilterCount:t.count,databaseId:n.database,projectId:n.projectId},o=t.unchangedNames;return o&&(a.bloomFilter={applied:i===0,hashCount:o?.hashCount??0,bitmapLength:o?.bits?.bitmap?.length??0,padding:o?.bits?.padding??0,mightContain:e=>r?.mightContain(e)??!1}),a}(r,e.Ce,this.Ge.lt(),n,i))}}}}_t(e){let t=e.Ce.unchangedNames;if(!t||!t.bits)return null;let{bits:{bitmap:n=``,padding:r=0},hashCount:i=0}=t,a,o;try{a=Xs(n).toUint8Array()}catch(e){if(e instanceof Gs)return Po(`Decoding the base64 bloom filter in existence filter failed (`+e.message+`); ignoring the bloom filter and falling back to full re-query.`),null;throw e}try{o=new ju(a,r,i)}catch(e){return Po(e instanceof Mu?`BloomFilter error: `:`Applying bloom filter failed: `,e),null}return o.ge===0?null:o}ut(e,t,n){return t.Ce.count===n-this.ht(e,t.targetId)?0:2}ht(e,t){let n=this.Ge.getRemoteKeysForTarget(t),r=0;
20return n.forEach((n=>{let i=this.Ge.lt(),a=`projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;e.mightContain(a)||(this.et(t,n,null),r++)})),r}Pt(e){let t=new Map;this.ze.forEach(((n,r)=>{let i=this.st(r);if(i){if(n.current&&sl(i.target)){let t=new V(i.target.path);this.Tt(t).has(r)||this.It(r,t)||this.et(r,t,Pc.newNoDocument(t,e))}n.Be&&(t.set(r,n.ke()),n.qe())}}));let n=W();this.He.forEach(((e,t)=>{let r=!0;t.forEachWhile((e=>{let t=this.st(e);return!t||t.purpose===`TargetPurposeLimboResolution`||(r=!1,!1)})),r&&(n=n.add(e))})),this.je.forEach(((t,n)=>n.setReadTime(e)));let r=new Nu(e,t,this.Ze,this.je,n);return this.je=kl(),this.Je=Vu(),this.He=Vu(),this.Ze=new zs(B),r}Ye(e,t){let n=this.ze.get(e);if(!n||!this.nt(e))return void P(zu,`addDocumentToTarget received document for unknown inactive target (${e})`);let r=this.It(e,t.key)?2:0;n.Ke(t.key,r),this.je=this.je.insert(t.key,t),this.Je=this.Je.insert(t.key,this.Tt(t.key).add(e)),this.He=this.He.insert(t.key,this.Et(t.key).add(e))}et(e,t,n){let r=this.ze.get(e);r&&this.nt(e)?(this.It(e,t)?r.Ke(t,1):r.Ue(t),this.He=this.He.insert(t,this.Et(t).delete(e)),this.He=this.He.insert(t,this.Et(t).add(e)),n&&(this.je=this.je.insert(t,n))):P(zu,`removeDocumentFromTarget received document for unknown or inactive target (${e})`)}removeTarget(e){this.ze.delete(e)}ot(e){let t=this.ze.get(e);if(!t)return 0;let n=t.ke();return this.Ge.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}$e(e){let t=this.ze.get(e);t||(P(zu,`recordPendingTargetRequest set up tracking for target ID ${e}`),t=new Ru(e),this.ze.set(e,t)),t.$e()}Et(e){let t=this.He.get(e);return t||(t=new Hs(B),this.He=this.He.insert(e,t)),t}Tt(e){let t=this.Je.get(e);return t||(t=new Hs(B),this.Je=this.Je.insert(e,t)),t}nt(e){let t=this.st(e)!==null;return t||P(zu,`Detected inactive target`,e),t}st(e){let t=this.ze.get(e);return t===void 0||t.Ne?null:this.Ge.Rt(e)}rt(e){this.ze.set(e,new Ru(e)),this.Ge.getRemoteKeysForTarget(e).forEach((t=>{this.et(e,t,null)}))}It(e,t){return this.Ge.getRemoteKeysForTarget(e).has(t)}};function Vu(){return new zs(V.comparator)}function Hu(){return new zs(V.comparator)}var Uu={asc:`ASCENDING`,desc:`DESCENDING`},Wu={"<":`LESS_THAN`,"<=":`LESS_THAN_OR_EQUAL`,">":`GREATER_THAN`,">=":`GREATER_THAN_OR_EQUAL`,"==":`EQUAL`,"!=":`NOT_EQUAL`,"array-contains":`ARRAY_CONTAINS`,in:`IN`,"not-in":`NOT_IN`,"array-contains-any":`ARRAY_CONTAINS_ANY`},Gu={and:`AND`,or:`OR`},Ku=class{constructor(e,t){this.databaseId=e,this.useProto3Json=t}};function Y(e,t){return e.useProto3Json||ks(t)?t:{value:t}}function qu(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,``).replace(`Z`,``)}.${(`000000000`+t.nanoseconds).slice(-9)}Z`:{seconds:``+t.seconds,nanos:t.nanoseconds}}function Ju(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function Yu(e,t){return qu(e,t.toTimestamp())}function Xu(e){return I(!!e,49232),H.fromTimestamp(function(e){let t=Js(e);return new hs(t.seconds,t.nanos)}(e))}function Zu(e,t){return Qu(e,t).canonicalString()}function Qu(e,t){let n=function(e){return new ts([`projects`,e.projectId,`databases`,e.database])}(e).child(`documents`);return t===void 0?n:n.child(t)}function $u(e){let t=ts.fromString(e);return I(X(t),10190,{key:t.toString()}),t}function ed(e,t){return Zu(e.databaseId,t.path)}function td(e,t){let n=$u(t);if(n.get(1)!==e.databaseId.projectId)throw new z(R.INVALID_ARGUMENT,`Tried to deserialize key from different project: `+n.get(1)+` vs `+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new z(R.INVALID_ARGUMENT,`Tried to deserialize key from different database: `+n.get(3)+` vs `+e.databaseId.database);return new V(ad(n))}function nd(e,t){return Zu(e.databaseId,t)}function rd(e){let t=$u(e);return t.length===4?ts.emptyPath():ad(t)}function id(e){return new ts([`projects`,e.databaseId.projectId,`databases`,e.databaseId.database]).canonicalString()}function ad(e){return I(e.length>4&&e.get(4)===`documents`,29091,{key:e.toString()}),e.popFirst(5)}function od(e,t,n){return{name:ed(e,t),fields:n.value.mapValue.fields}}function sd(e,t){let n;if(`targetChange`in t){t.targetChange;let r=function(e){return e===`NO_CHANGE`?0:e===`ADD`?1:e===`REMOVE`?2:e===`CURRENT`?3:e===`RESET`?4:F(39313,{state:e})}(t.targetChange.targetChangeType||`NO_CHANGE`),i=t.targetChange.targetIds||[],a=function(e,t){return e.useProto3Json?(I(t===void 0||typeof t==`string`,58123),Ks.fromBase64String(t||``)):(I(t===void 0||t instanceof Buffer||t instanceof Uint8Array,16193),Ks.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause;n=new Lu(r,i,a,o&&function(e){return new z(e.code===void 0?R.UNKNOWN:Tu(e.code),e.message||``)}(o)||null)}else if(`documentChange`in t){t.documentChange;let r=t.documentChange;r.document,r.document.name,r.document.updateTime;let i=td(e,r.document.name),a=Xu(r.document.updateTime),o=r.document.createTime?Xu(r.document.createTime):H.min(),s=new Mc({mapValue:{fields:r.document.fields}}),c=Pc.newFoundDocument(i,a,o,s);n=new Fu(r.targetIds||[],r.removedTargetIds||[],c.key,c)}else if(`documentDelete`in t){t.documentDelete;let r=t.documentDelete;r.document;let i=td(e,r.document),a=r.readTime?Xu(r.readTime):H.min(),o=Pc.newNoDocument(i,a);n=new Fu([],r.removedTargetIds||[],o.key,o)}else if(`documentRemove`in t){t.documentRemove;let r=t.documentRemove;r.document;let i=td(e,r.document);n=new Fu([],r.removedTargetIds||[],i,null)}else{if(!(`filter`in t))return F(11601,{At:t});{t.filter;let e=t.filter;e.targetId;
20let{count:r=0,unchangedNames:i}=e,a=new Su(r,i),o=e.targetId;n=new Iu(o,a)}}return n}function cd(e,t){let n;if(t instanceof fu)n={update:od(e,t.key,t.value)};else if(t instanceof _u)n={delete:ed(e,t.key)};else if(t instanceof pu)n={update:od(e,t.key,t.data),updateMask:xd(t.fieldMask)};else{if(!(t instanceof vu))return F(16599,{Vt:t.type});n={verify:ed(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((e=>function(e,t){let n=t.transform;if(n instanceof Wl)return{fieldPath:t.field.canonicalString(),setToServerValue:`REQUEST_TIME`};if(n instanceof Gl)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof ql)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof Xl)return{fieldPath:t.field.canonicalString(),increment:n.Ae};if(n instanceof Zl)return{fieldPath:t.field.canonicalString(),minimum:n.Ae};if(n instanceof Ql)return{fieldPath:t.field.canonicalString(),maximum:n.Ae};throw F(20930,{transform:t.transform})}(0,e)))),t.precondition.isNone||(n.currentDocument=function(e,t){return t.updateTime===void 0?t.exists===void 0?F(27497):{exists:t.exists}:{updateTime:Yu(e,t.updateTime)}}(e,t.precondition)),n}function ld(e,t){return e&&e.length>0?(I(t!==void 0,14353),e.map((e=>function(e,t){let n=e.updateTime?Xu(e.updateTime):Xu(t);return n.isEqual(H.min())&&(n=Xu(t)),new ru(n,e.transformResults||[])}(e,t)))):[]}function ud(e,t){return{documents:[nd(e,t.path)]}}function dd(e,t){let n={structuredQuery:{}},r=t.path,i;t.collectionGroup===null?(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]):(i=r,n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]),n.parent=nd(e,i);let a=function(e){if(e.length!==0)return bd(Hc.create(e,`and`))}(t.filters);a&&(n.structuredQuery.where=a);let o=function(e){if(e.length!==0)return e.map((e=>function(e){return{field:vd(e.field),direction:hd(e.dir)}}(e)))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);let s=Y(e,t.limit);return s!==null&&(n.structuredQuery.limit=s),t.startAt&&(n.structuredQuery.startAt=function(e){return{before:e.inclusive,values:e.position}}(t.startAt)),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),{dt:n,parent:i}}function fd(e){let t=rd(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){I(r===1,65062);let e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let a=[];n.where&&(a=function(e){let t=md(e);return t instanceof Hc&&Wc(t)?t.getFilters():[t]}(n.where));let o=[];n.orderBy&&(o=function(e){return e.map((e=>function(e){return new Rc(yd(e.field),function(e){switch(e){case`ASCENDING`:return`asc`;case`DESCENDING`:return`desc`;default:return}}(e.direction))}(e)))}(n.orderBy));let s=null;n.limit&&(s=function(e){let t;return t=typeof e==`object`?e.value:e,ks(t)?null:t}(n.limit));let c=null;n.startAt&&(c=function(e){let t=!!e.before;return new Fc(e.values||[],t)}(n.startAt));let l=null;return n.endAt&&(l=function(e){let t=!e.before;return new Fc(e.values||[],t)}(n.endAt)),ll(t,i,o,a,s,`F`,c,l)}function pd(e,t){let n=function(e){switch(e){case`TargetPurposeListen`:return null;case`TargetPurposeExistenceFilterMismatch`:return`existence-filter-mismatch`;case`TargetPurposeExistenceFilterMismatchBloom`:return`existence-filter-mismatch-bloom`;case`TargetPurposeLimboResolution`:return`limbo-document`;default:return F(28987,{purpose:e})}}(t.purpose);return n==null?null:{"goog-listen-tags":n}}function md(e){return e.unaryFilter===void 0?e.fieldFilter===void 0?e.compositeFilter===void 0?F(30097,{filter:e}):function(e){return Hc.create(e.compositeFilter.filters.map((e=>md(e))),function(e){switch(e){case`AND`:return`and`;case`OR`:return`or`;default:return F(1026)}}(e.compositeFilter.op))}(e):function(e){return Vc.create(yd(e.fieldFilter.field),function(e){switch(e){case`EQUAL`:return`==`;case`NOT_EQUAL`:return`!=`;case`GREATER_THAN`:return`>`;case`GREATER_THAN_OR_EQUAL`:return`>=`;case`LESS_THAN`:return`<`;case`LESS_THAN_OR_EQUAL`:return`<=`;case`ARRAY_CONTAINS`:return`array-contains`;case`IN`:return`in`;case`NOT_IN`:return`not-in`;case`ARRAY_CONTAINS_ANY`:return`array-contains-any`;case`OPERATOR_UNSPECIFIED`:return F(58110);default:return F(50506)}}(e.fieldFilter.op),e.fieldFilter.value)}(e):function(e){switch(e.unaryFilter.op){case`IS_NAN`:let t=yd(e.unaryFilter.field);return Vc.create(t,`==`,{doubleValue:NaN});case`IS_NULL`:let n=yd(e.unaryFilter.field);return Vc.create(n,`==`,{nullValue:`NULL_VALUE`});
20case`IS_NOT_NAN`:let r=yd(e.unaryFilter.field);return Vc.create(r,`!=`,{doubleValue:NaN});case`IS_NOT_NULL`:let i=yd(e.unaryFilter.field);return Vc.create(i,`!=`,{nullValue:`NULL_VALUE`});case`OPERATOR_UNSPECIFIED`:return F(61313);default:return F(60726)}}(e)}function hd(e){return Uu[e]}function gd(e){return Wu[e]}function _d(e){return Gu[e]}function vd(e){return{fieldPath:e.canonicalString()}}function yd(e){return rs.fromServerFormat(e.fieldPath)}function bd(e){return e instanceof Vc?function(e){if(e.op===`==`){if(Dc(e.value))return{unaryFilter:{field:vd(e.field),op:`IS_NAN`}};if(Ec(e.value))return{unaryFilter:{field:vd(e.field),op:`IS_NULL`}}}else if(e.op===`!=`){if(Dc(e.value))return{unaryFilter:{field:vd(e.field),op:`IS_NOT_NAN`}};if(Ec(e.value))return{unaryFilter:{field:vd(e.field),op:`IS_NOT_NULL`}}}return{fieldFilter:{field:vd(e.field),op:gd(e.op),value:e.value}}}(e):e instanceof Hc?function(e){let t=e.getFilters().map((e=>bd(e)));return t.length===1?t[0]:{compositeFilter:{op:_d(e.op),filters:t}}}(e):F(54877,{filter:e})}function xd(e){let t=[];return e.fields.forEach((e=>t.push(e.canonicalString()))),{fieldPaths:t}}function X(e){return e.length>=4&&e.get(0)===`projects`&&e.get(2)===`databases`}function Sd(e){return!!e&&typeof e._toProto==`function`&&e._protoValueType===`ProtoValue`}var Cd=class e{constructor(e,t,n,r,i=H.min(),a=H.min(),o=Ks.EMPTY_BYTE_STRING,s=null){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=a,this.resumeToken=o,this.expectedCount=s}withSequenceNumber(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}},wd=class{constructor(e){this.gt=e}};function Td(e){let t=fd({parent:e.parent,structuredQuery:e.structuredQuery});return e.limitType===`LAST`?yl(t,t.limit,`L`):t}var Ed=class{constructor(){}bt(e,t){this.Dt(e,t),t.Ct()}Dt(e,t){if(`nullValue`in e)this.vt(t,5);else if(`booleanValue`in e)this.vt(t,10),t.Ft(+!!e.booleanValue);else if(`integerValue`in e)this.vt(t,15),t.Ft(Ys(e.integerValue));else if(`doubleValue`in e){let n=Ys(e.doubleValue);isNaN(n)?this.vt(t,13):(this.vt(t,15),As(n)?t.Ft(0):t.Ft(n))}else if(`timestampValue`in e){let n=e.timestampValue;this.vt(t,20),typeof n==`string`&&(n=Js(n)),t.Mt(`${n.seconds||``}`),t.Ft(n.nanos||0)}else if(`stringValue`in e)this.xt(e.stringValue,t),this.Ot(t);else if(`bytesValue`in e)this.vt(t,30),t.Nt(Xs(e.bytesValue)),this.Ot(t);else if(`referenceValue`in e)this.Bt(e.referenceValue,t);else if(`geoPointValue`in e){let n=e.geoPointValue;this.vt(t,45),t.Ft(n.latitude||0),t.Ft(n.longitude||0)}else `mapValue`in e?jc(e)?this.vt(t,2**53-1):kc(e)?this.Lt(e.mapValue,t):(this.kt(e.mapValue,t),this.Ot(t)):`arrayValue`in e?(this.qt(e.arrayValue,t),this.Ot(t)):F(19022,{Kt:e})}xt(e,t){this.vt(t,25),this.Ut(e,t)}Ut(e,t){t.Mt(e)}kt(e,t){let n=e.fields||{};this.vt(t,55);for(let e of Object.keys(n))this.xt(e,t),this.Dt(n[e],t)}Lt(e,t){let n=e.fields||{};this.vt(t,53);let r=fc,i=n[r].arrayValue?.values?.length||0;this.vt(t,15),t.Ft(Ys(i)),this.xt(r,t),this.Dt(n[r],t)}qt(e,t){let n=e.values||[];this.vt(t,50);for(let e of n)this.Dt(e,t)}Bt(e,t){this.vt(t,37),V.fromName(e).path.forEach((e=>{this.vt(t,60),this.Ut(e,t)}))}vt(e,t){e.Ft(t)}Ot(e){e.Ft(2)}};Ed.$t=new Ed;var Dd=class{constructor(){this.Sn=new Od}addToCollectionParentIndex(e,t){return this.Sn.add(t),U.resolve()}getCollectionParents(e,t){return U.resolve(this.Sn.getEntries(t))}addFieldIndex(e,t){return U.resolve()}deleteFieldIndex(e,t){return U.resolve()}deleteAllFieldIndexes(e){return U.resolve()}createTargetIndexes(e,t){return U.resolve()}getDocumentsMatchingTarget(e,t){return U.resolve(null)}getIndexType(e,t){return U.resolve(0)}getFieldIndexes(e,t){return U.resolve([])}getNextCollectionGroupToUpdate(e){return U.resolve(null)}getMinOffset(e,t){return U.resolve(bs.min())}getMinOffsetFromCollectionGroup(e,t){return U.resolve(bs.min())}updateCollectionGroup(e,t,n){return U.resolve()}updateIndexEntries(e,t){return U.resolve()}},Od=class{constructor(){this.index={}}add(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Hs(ts.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new Hs(ts.comparator)).toArray()}},kd={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Ad=41943040,jd=class e{static withCacheSize(t){return new e(t,e.DEFAULT_COLLECTION_PE
20RCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}};jd.DEFAULT_COLLECTION_PERCENTILE=10,jd.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,jd.DEFAULT=new jd(Ad,jd.DEFAULT_COLLECTION_PERCENTILE,jd.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),jd.DISABLED=new jd(-1,0,0);var Md=class e{constructor(e){this.ir=e}next(){return this.ir+=2,this.ir}static sr(){return new e(0)}static _r(){return new e(-1)}},Nd=`LruGarbageCollector`,Pd=1048576;function Fd([e,t],[n,r]){let i=B(e,n);return i===0?B(t,r):i}var Id=class{constructor(e){this.hr=e,this.buffer=new Hs(Fd),this.Pr=0}Tr(){return++this.Pr}Ir(e){let t=[e,this.Tr()];if(this.buffer.size<this.hr)this.buffer=this.buffer.add(t);else{let e=this.buffer.last();Fd(t,e)<0&&(this.buffer=this.buffer.delete(e).add(t))}}get maxValue(){return this.buffer.last()[0]}},Ld=class{constructor(e,t,n){this.garbageCollector=e,this.asyncQueue=t,this.localStore=n,this.Er=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Rr(6e4)}stop(){this.Er&&=(this.Er.cancel(),null)}get started(){return this.Er!==null}Rr(e){P(Nd,`Garbage collection scheduled in ${e}ms`),this.Er=this.asyncQueue.enqueueAfterDelay(`lru_garbage_collection`,e,(async()=>{this.Er=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(e){Es(e)?P(Nd,`Ignoring IndexedDB error during garbage collection: `,e):await ws(e)}await this.Rr(3e5)}))}},Rd=class{constructor(e,t){this.Ar=e,this.params=t}calculateTargetCount(e,t){return this.Ar.Vr(e).next((e=>Math.floor(t/100*e)))}nthSequenceNumber(e,t){if(t===0)return U.resolve(Ds.ce);let n=new Id(t);return this.Ar.forEachTarget(e,(e=>n.Ir(e.sequenceNumber))).next((()=>this.Ar.dr(e,(e=>n.Ir(e))))).next((()=>n.maxValue))}removeTargets(e,t,n){return this.Ar.removeTargets(e,t,n)}removeOrphanedDocuments(e,t){return this.Ar.removeOrphanedDocuments(e,t)}collect(e,t){return this.params.cacheSizeCollectionThreshold===-1?(P(`LruGarbageCollector`,`Garbage collection skipped; disabled`),U.resolve(kd)):this.getCacheSize(e).next((n=>n<this.params.cacheSizeCollectionThreshold?(P(`LruGarbageCollector`,`Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),kd):this.mr(e,t)))}getCacheSize(e){return this.Ar.getCacheSize(e)}mr(e,t){let n,r,i,a,o,s,c,l=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((t=>(t>this.params.maximumSequenceNumbersToCollect?(P(`LruGarbageCollector`,`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${t}`),r=this.params.maximumSequenceNumbersToCollect):r=t,a=Date.now(),this.nthSequenceNumber(e,r)))).next((r=>(n=r,o=Date.now(),this.removeTargets(e,n,t)))).next((t=>(i=t,s=Date.now(),this.removeOrphanedDocuments(e,n)))).next((e=>(c=Date.now(),Mo()<=A.DEBUG&&P(`LruGarbageCollector`,`LRU Garbage Collection\n\tCounted targets in ${a-l}ms\n\tDetermined least recently used ${r} in `+(o-a)+`ms
21\tRemoved ${i} targets in `+(s-o)+`ms
22\tRemoved ${e} documents in `+(c-s)+`ms
23Total Duration: ${c-l}ms`),U.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e}))))}};function zd(e,t){return new Rd(e,t)}var Bd=class{constructor(){this.changes=new Dl((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,Pc.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let n=this.changes.get(t);return n===void 0?this.getFromCache(e,t):U.resolve(n)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}},Vd=class{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}},Hd=class{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next((r=>(n=r,this.remoteDocumentCache.getEntry(e,t)))).next((e=>(n!==null&&lu(n.mutation,e,Ws.empty(),hs.now()),e)))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.getLocalViewOfDocuments(e,t,W()).next((()=>t))))}getLocalViewOfDocuments(e,t,n=W()){let r=Nl();return this.populateOverlays(e,r,t).next((()=>this.computeViews(e,t,r,n).next((e=>{let t=jl();return e.forEach(((e,n)=>{t=t.insert(e,n.overlayedDocument)})),t}))))}getOverlayedDocuments(e,t){let n=Nl();return this.populateOverlays(e,n,t).next((()=>this.computeViews(e,t,n,W())))}populateOverlays(e,t,n){let r=[];
23return n.forEach((e=>{t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((e=>{e.forEach(((e,n)=>{t.set(e,n)}))}))}computeViews(e,t,n,r){let i=kl(),a=Fl(),o=function(){return Fl()}();return t.forEach(((e,t)=>{let o=n.get(t.key);r.has(t.key)&&(o===void 0||o.mutation instanceof pu)?i=i.insert(t.key,t):o===void 0?a.set(t.key,Ws.empty()):(a.set(t.key,o.mutation.getFieldMask()),lu(o.mutation,t,o.mutation.getFieldMask(),hs.now()))})),this.recalculateAndSaveOverlays(e,i).next((e=>(e.forEach(((e,t)=>a.set(e,t))),t.forEach(((e,t)=>o.set(e,new Vd(t,a.get(e)??null)))),o)))}recalculateAndSaveOverlays(e,t){let n=Fl(),r=new zs(((e,t)=>e-t)),i=W();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((e=>{for(let i of e)i.keys().forEach((e=>{let a=t.get(e);if(a===null)return;let o=n.get(e)||Ws.empty();o=i.applyToLocalView(a,o),n.set(e,o);let s=(r.get(i.batchId)||W()).add(e);r=r.insert(i.batchId,s)}))})).next((()=>{let a=[],o=r.getReverseIterator();for(;o.hasNext();){let r=o.getNext(),s=r.key,c=r.value,l=Pl();c.forEach((e=>{if(!i.has(e)){let r=su(t.get(e),n.get(e));r!==null&&l.set(e,r),i=i.add(e)}})),a.push(this.documentOverlayCache.saveOverlays(e,s,l))}return U.waitFor(a)})).next((()=>n))}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.recalculateAndSaveOverlays(e,t)))}getDocumentsMatchingQuery(e,t,n,r){return fl(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):pl(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n,r):this.getDocumentsMatchingCollectionQuery(e,t,n,r)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((i=>{let a=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):U.resolve(Nl()),o=gs,s=i;return a.next((t=>U.forEach(t,((t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?U.resolve():this.remoteDocumentCache.getEntry(e,t).next((e=>{s=s.insert(t,e)}))))).next((()=>this.populateOverlays(e,t,i))).next((()=>this.computeViews(e,s,t,W()))).next((e=>({batchId:o,changes:Ml(e)})))))}))}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new V(t)).next((e=>{let t=jl();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}getDocumentsMatchingCollectionGroupQuery(e,t,n,r){let i=t.collectionGroup,a=jl();return this.indexManager.getCollectionParents(e,i).next((o=>U.forEach(o,(o=>{let s=function(e,t){return new cl(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return this.getDocumentsMatchingCollectionQuery(e,s,n,r).next((e=>{e.forEach(((e,t)=>{a=a.insert(e,t)}))}))})).next((()=>a))))}getDocumentsMatchingCollectionQuery(e,t,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next((a=>(i=a,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,i,r)))).next((e=>{i.forEach(((t,n)=>{let r=n.getKey();e.get(r)===null&&(e=e.insert(r,Pc.newInvalidDocument(r)))}));let n=jl();return e.forEach(((e,r)=>{let a=i.get(e);a!==void 0&&lu(a.mutation,r,Ws.empty(),hs.now()),Cl(t,r)&&(n=n.insert(e,r))})),n}))}},Ud=class{constructor(e){this.serializer=e,this.Or=new Map,this.Nr=new Map}getBundleMetadata(e,t){return U.resolve(this.Or.get(t))}saveBundleMetadata(e,t){return this.Or.set(t.id,function(e){return{id:e.id,version:e.version,createTime:Xu(e.createTime)}}(t)),U.resolve()}getNamedQuery(e,t){return U.resolve(this.Nr.get(t))}saveNamedQuery(e,t){return this.Nr.set(t.name,function(e){return{name:e.name,query:Td(e.bundledQuery),readTime:Xu(e.readTime)}}(t)),U.resolve()}},Wd=class{constructor(){this.overlays=new zs(V.comparator),this.Br=new Map}getOverlay(e,t){return U.resolve(this.overlays.get(t))}getOverlays(e,t){let n=Nl();return U.forEach(t,(t=>this.getOverlay(e,t).next((e=>{e!==null&&n.set(t,e)})))).next((()=>n))}saveOverlays(e,t,n){return n.forEach(((n,r)=>{this.wt(e,t,r)})),U.resolve()}removeOverlaysForBatchId(e,t,n){let r=this.Br.get(n);return r!==void 0&&(r.forEach((e=>this.overlays=this.overlays.remove(e))),this.Br.delete(n)),U.resolve()}getOverlaysForCollection(e,t,n){let r=Nl(),i=t.length+1,a=new V(t.child(``)),o=this.overlays.getIteratorFrom(a);for(;o.hasNext();){let e=o.getNext().value,a=e.getKey();if(!t.isPrefixOf(a.path))break;a.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return U.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new zs(((e,t)=>e-t)),a=this.overlays.getIterator();for(;a.hasNext();){let e=a.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);t===null&&(t=Nl(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let o=Nl(),s=i.getIterator();for(;s.hasNext()&&(s.getNext().value.forEach(((e,t)=>o.set(e,t))),!(o.size()>=r)););return U.resolve(o)}wt(e,t,n){let r=this.overlays.get(n.key);if(r!==null){let e=this.Br.get(r.largestBatchId).delete(n.key);this.Br.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new xu(t,n));let i=this.Br.get(t);i===void 0&&(i=W(),this.Br.set(t,i)),this.Br.set(t,i.add(n.key))}},Gd=class{constructor(){this.sessionToken=Ks.EMPTY_BYTE_STRING}getSessionToken(e){return U.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,U.resolve()}},Kd=class{constructor(){this.Lr=new Hs(qd.kr),this.qr=new Hs(qd.Kr)}isEmpty(){return this.Lr.isEmpty()}addReference(e,t){let n=new qd(e,t);this.Lr=this.Lr.add(n),this.qr=this.qr.add(n)}Ur(e,t){e.forEach((e=>this.addReference(e,t)))}removeReference(e,t){this.$r(new qd(e,t))}Wr(e,t){e.forEach((e=>this.removeReference(e,t)))}Qr(e){let t=new V(new ts([])),n=new qd(t,e),r=new qd(t,e+1),i=[];return this.qr.forEachInRange([n,r],(e=>{this.$r(e),i.push(e.key)})),i}Gr(){this.Lr.forEach((e=>this.$r(e)))}$r(e){this.Lr=this.Lr.delete(e),this.qr=this.qr.delete(e)}zr(e){let t=new V(new ts([])),n=new qd(t,e),r=new qd(t,e+1),i=W();return this.qr.forEachInRange([n,r],(e=>{i=i.add(e.key)})),i}containsKey(e){let t=new qd(e,0),n=this.Lr.firstAfterOrEqual(t);return n!==null&&e.isEqual(n.key)}},qd=class{constructor(e,t){this.key=e,this.jr=t}static kr(e,t){return V.comparator(e.key,t.key)||B(e.jr,t.jr)}static Kr(e,t){return B(e.jr,t.jr)||V.comparator(e.key,t.key)}},Jd=class{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutation
23Queue=[],this.Xn=1,this.Jr=new Hs(qd.kr)}checkEmpty(e){return U.resolve(this.mutationQueue.length===0)}addMutationBatch(e,t,n,r){let i=this.Xn;this.Xn++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let a=new yu(i,t,n,r);this.mutationQueue.push(a);for(let t of r)this.Jr=this.Jr.add(new qd(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return U.resolve(a)}lookupMutationBatch(e,t){return U.resolve(this.Hr(t))}getNextMutationBatchAfterBatchId(e,t){let n=t+1,r=this.Zr(n),i=r<0?0:r;return U.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return U.resolve(this.mutationQueue.length===0?Os:this.Xn-1)}getAllMutationBatches(e){return U.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let n=new qd(t,0),r=new qd(t,1/0),i=[];return this.Jr.forEachInRange([n,r],(e=>{let t=this.Hr(e.jr);i.push(t)})),U.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new Hs(B);return t.forEach((e=>{let t=new qd(e,0),r=new qd(e,1/0);this.Jr.forEachInRange([t,r],(e=>{n=n.add(e.jr)}))})),U.resolve(this.Xr(n))}getAllMutationBatchesAffectingQuery(e,t){let n=t.path,r=n.length+1,i=n;V.isDocumentKey(i)||(i=i.child(``));let a=new qd(new V(i),0),o=new Hs(B);return this.Jr.forEachWhile((e=>{let t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.jr)),!0)}),a),U.resolve(this.Xr(o))}Xr(e){let t=[];return e.forEach((e=>{let n=this.Hr(e);n!==null&&t.push(n)})),t}removeMutationBatch(e,t){I(this.Yr(t.batchId,`removed`)===0,55003),this.mutationQueue.shift();let n=this.Jr;return U.forEach(t.mutations,(r=>{let i=new qd(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)})).next((()=>{this.Jr=n}))}tr(e){}containsKey(e,t){let n=new qd(t,0),r=this.Jr.firstAfterOrEqual(n);return U.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,U.resolve()}Yr(e,t){return this.Zr(e)}Zr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Hr(e){let t=this.Zr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}},Yd=class{constructor(e){this.ei=e,this.docs=function(){return new zs(V.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let n=t.key,r=this.docs.get(n),i=r?r.size:0,a=this.ei(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:a}),this.size+=a-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let n=this.docs.get(t);return U.resolve(n?n.document.mutableCopy():Pc.newInvalidDocument(t))}getEntries(e,t){let n=kl();return t.forEach((e=>{let t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():Pc.newInvalidDocument(e))})),U.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=kl(),a=t.path,o=new V(a.child(`__id-9223372036854775808__`)),s=this.docs.getIteratorFrom(o);for(;s.hasNext();){let{key:e,value:{document:o}}=s.getNext();if(!a.isPrefixOf(e.path))break;e.path.length>a.length+1||xs(ys(o),n)<=0||(r.has(o.key)||Cl(t,o))&&(i=i.insert(o.key,o.mutableCopy()))}return U.resolve(i)}getAllFromCollectionGroup(e,t,n,r){F(9500)}ti(e,t){return U.forEach(this.docs,(e=>t(e)))}newChangeBuffer(e){return new Xd(this)}getSize(e){return U.resolve(this.size)}},Xd=class extends Bd{constructor(e){super(),this.Fr=e}applyChanges(e){let t=[];
23return this.changes.forEach(((n,r)=>{r.isValidDocument()?t.push(this.Fr.addEntry(e,r)):this.Fr.removeEntry(n)})),U.waitFor(t)}getFromCache(e,t){return this.Fr.getEntry(e,t)}getAllFromCache(e,t){return this.Fr.getEntries(e,t)}},Zd=class{constructor(e){this.persistence=e,this.ni=new Dl((e=>al(e)),ol),this.lastRemoteSnapshotVersion=H.min(),this.highestTargetId=0,this.ri=0,this.ii=new Kd,this.targetCount=0,this.si=Md.sr()}forEachTarget(e,t){return this.ni.forEach(((e,n)=>t(n))),U.resolve()}getLastRemoteSnapshotVersion(e){return U.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return U.resolve(this.ri)}allocateTargetId(e){return this.highestTargetId=this.si.next(),U.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.ri&&(this.ri=t),U.resolve()}cr(e){this.ni.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.si=new Md(t),this.highestTargetId=t),e.sequenceNumber>this.ri&&(this.ri=e.sequenceNumber)}addTargetData(e,t){return this.cr(t),this.targetCount+=1,U.resolve()}updateTargetData(e,t){return this.cr(t),U.resolve()}removeTargetData(e,t){return this.ni.delete(t.target),this.ii.Qr(t.targetId),--this.targetCount,U.resolve()}removeTargets(e,t,n){let r=0,i=[];return this.ni.forEach(((a,o)=>{o.sequenceNumber<=t&&n.get(o.targetId)===null&&(this.ni.delete(a),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)})),U.waitFor(i).next((()=>r))}getTargetCount(e){return U.resolve(this.targetCount)}getTargetData(e,t){let n=this.ni.get(t)||null;return U.resolve(n)}addMatchingKeys(e,t,n){return this.ii.Ur(t,n),U.resolve()}removeMatchingKeys(e,t,n){this.ii.Wr(t,n);let r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((t=>{i.push(r.markPotentiallyOrphaned(e,t))})),U.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.ii.Qr(t),U.resolve()}getMatchingKeysForTargetId(e,t){let n=this.ii.zr(t);return U.resolve(n)}containsKey(e,t){return U.resolve(this.ii.containsKey(t))}},Qd=class{constructor(e,t){this.oi={},this.overlays={},this._i=new Ds(0),this.ai=!1,this.ai=!0,this.ui=new Gd,this.referenceDelegate=e(this),this.ci=new Zd(this),this.indexManager=new Dd,this.remoteDocumentCache=function(e){return new Yd(e)}((e=>this.referenceDelegate.li(e))),this.serializer=new wd(t),this.hi=new Ud(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ai=!1,Promise.resolve()}get started(){return this.ai}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new Wd,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.oi[e.toKey()];return n||(n=new Jd(t,this.referenceDelegate),this.oi[e.toKey()]=n),n}getGlobalsCache(){return this.ui}getTargetCache(){return this.ci}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.hi}runTransaction(e,t,n){P(`MemoryPersistence`,`Starting transaction:`,e);let r=new $d(this._i.next());return this.referenceDelegate.Pi(),n(r).next((e=>this.referenceDelegate.Ti(r).next((()=>e)))).toPromise().then((e=>(r.raiseOnCommittedEvent(),e)))}Ii(e,t){return U.or(Object.values(this.oi).map((n=>()=>n.containsKey(e,t))))}},$d=class extends Cs{constructor(e){super(),this.currentSequenceNumber=e}},ef=class e{constructor(e){this.persistence=e,this.Ei=new Kd,this.Ri=null}static Ai(t){return new e(t)}get Vi(){if(this.Ri)return this.Ri;throw F(60996)}addReference(e,t,n){return this.Ei.addReference(n,t),this.Vi.delete(n.toString()),U.resolve()}removeReference(e,t,n){return this.Ei.removeReference(n,t),this.Vi.add(n.toString()),U.resolve()}markPotentiallyOrphaned(e,t){return this.Vi.add(t.toString()),U.resolve()}removeTarget(e,t){this.Ei.Qr(t.targetId).forEach((e=>this.Vi.add(e.toString())));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next((e=>{e.forEach((e=>this.Vi.add(e.toString())))})).next((()=>n.removeTargetData(e,t)))}Pi(){this.Ri=new Set}Ti(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();
23return U.forEach(this.Vi,(n=>{let r=V.fromPath(n);return this.di(e,r).next((e=>{e||t.removeEntry(r,H.min())}))})).next((()=>(this.Ri=null,t.apply(e))))}updateLimboDocument(e,t){return this.di(e,t).next((e=>{e?this.Vi.delete(t.toString()):this.Vi.add(t.toString())}))}li(e){return 0}di(e,t){return U.or([()=>U.resolve(this.Ei.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ii(e,t)])}},tf=class e{constructor(e,t){this.persistence=e,this.mi=new Dl((e=>Ns(e.path)),((e,t)=>e.isEqual(t))),this.garbageCollector=zd(this,t)}static Ai(t,n){return new e(t,n)}Pi(){}Ti(e){return U.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEachTarget(e,t)}Vr(e){let t=this.gr(e);return this.persistence.getTargetCache().getTargetCount(e).next((e=>t.next((t=>e+t))))}gr(e){let t=0;return this.dr(e,(e=>{t++})).next((()=>t))}dr(e,t){return U.forEach(this.mi,((n,r)=>this.yr(e,n,r).next((e=>e?U.resolve():t(r)))))}removeTargets(e,t,n){return this.persistence.getTargetCache().removeTargets(e,t,n)}removeOrphanedDocuments(e,t){let n=0,r=this.persistence.getRemoteDocumentCache(),i=r.newChangeBuffer();return r.ti(e,(r=>this.yr(e,r,t).next((e=>{e||(n++,i.removeEntry(r,H.min()))})))).next((()=>i.apply(e))).next((()=>n))}markPotentiallyOrphaned(e,t){return this.mi.set(t,e.currentSequenceNumber),U.resolve()}removeTarget(e,t){let n=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,n)}addReference(e,t,n){return this.mi.set(n,e.currentSequenceNumber),U.resolve()}removeReference(e,t,n){return this.mi.set(n,e.currentSequenceNumber),U.resolve()}updateLimboDocument(e,t){return this.mi.set(t,e.currentSequenceNumber),U.resolve()}li(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=xc(e.data.value)),t}yr(e,t,n){return U.or([()=>this.persistence.Ii(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{let e=this.mi.get(t);return U.resolve(e!==void 0&&e>n)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}},nf=class e{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Ps=n,this.Ts=r}static Is(t,n){let r=W(),i=W();for(let e of n.docChanges)switch(e.type){case 0:r=r.add(e.doc.key);break;case 1:i=i.add(e.doc.key)}return new e(t,n.fromCache,r,i)}},rf=class{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}},af=class{constructor(){this.Es=!1,this.Rs=!1,this.As=100,this.Vs=function(){return ri()?8:Ts(Xr())>0?6:4}()}initialize(e,t){this.ds=e,this.indexManager=t,this.Es=!0}getDocumentsMatchingQuery(e,t,n,r){let i={result:null};return this.fs(e,t).next((e=>{i.result=e})).next((()=>{if(!i.result)return this.gs(e,t,r,n).next((e=>{i.result=e}))})).next((()=>{if(i.result)return;let n=new rf;return this.ps(e,t,n).next((r=>{if(i.result=r,this.Rs)return this.ys(e,t,n,r.size)}))})).next((()=>i.result))}ys(e,t,n,r){return n.documentReadCount<this.As?(Mo()<=A.DEBUG&&P(`QueryEngine`,`SDK will not create cache indexes for query:`,Sl(t),`since it only creates cache indexes for collection contains`,`more than or equal to`,this.As,`documents`),U.resolve()):(Mo()<=A.DEBUG&&P(`QueryEngine`,`Query:`,Sl(t),`scans`,n.documentReadCount,`local documents and returns`,r,`documents as results.`),n.documentReadCount>this.Vs*r?(Mo()<=A.DEBUG&&P(`QueryEngine`,`The SDK decides to create cache indexes for query:`,Sl(t),`as using cache indexes may help improve performance.`),this.indexManager.createTargetIndexes(e,hl(t))):U.resolve())}fs(e,t){if(dl(t))return U.resolve(null);let n=hl(t);return this.indexManager.getIndexType(e,n).next((r=>r===0?null:(t.limit!==null&&r===1&&(t=yl(t,null,`F`),n=hl(t)),this.indexManager.getDocumentsMatchingTarget(e,n).next((r=>{let i=W(...r);return this.ds.getDocuments(e,i).next((r=>this.indexManager.getMinOffset(e,n).next((n=>{let a=this.ws(t,r);return this.Ss(t,a,i,n.readTime)?this.fs(e,yl(t,null,`F`)):this.bs(e,a,t,n)}))))})))))}gs(e,t,n,r){return dl(t)||r.isEqual(H.min())?U.resolve(null):this.ds.getDocuments(e,n).next((i=>{let a=this.ws(t,i);return this.Ss(t,a,n,r)?U.resolve(null):(Mo()<=A.DEBUG&&P(`QueryEngine`,`Re-using previous result from %s to execute query: %s`,r.toString(),Sl(t)),this.bs(e,a,t,vs(r,gs)).next((e=>e)))}))}ws(e,t){let n=new Hs(Tl(e));return t.forEach(((t,r)=>{Cl(e,r)&&(n=n.add(r))})),n}Ss(e,t,n,r){if(e.limit===null)return!1;if(n.size!==t.size)return!0;let i=e.limitType===`F`?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}ps(e,t,n){return Mo()<=A.DEBUG&&P(`QueryEngine`,`Using full collection scan to execute query:`,Sl(t)),this.ds.getDocumentsMatchingQuery(e,t,bs.min(),n)}bs(e,t,n,r){return this.ds.getDocumentsMatchingQuery(e,n,r).next((e=>(t.forEach((t=>{e=e.insert(t.key,t)})),e)))}},of=`LocalStore`,sf=3e8,cf=class{constructor(e,t,n,r){this.persistence=e,this.Ds=t,this.serializer
23=r,this.Cs=new zs(B),this.vs=new Dl((e=>al(e)),ol),this.Fs=new Map,this.Ms=e.getRemoteDocumentCache(),this.ci=e.getTargetCache(),this.hi=e.getBundleCache(),this.xs(n)}xs(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new Hd(this.Ms,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Ms.setIndexManager(this.indexManager),this.Ds.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction(`Collect garbage`,`readwrite-primary`,(t=>e.collect(t,this.Cs)))}};function lf(e,t,n,r){return new cf(e,t,n,r)}async function uf(e,t){let n=L(e);return await n.persistence.runTransaction(`Handle user change`,`readonly`,(e=>{let r;return n.mutationQueue.getAllMutationBatches(e).next((i=>(r=i,n.xs(t),n.mutationQueue.getAllMutationBatches(e)))).next((t=>{let i=[],a=[],o=W();for(let e of r){i.push(e.batchId);for(let t of e.mutations)o=o.add(t.key)}for(let e of t){a.push(e.batchId);for(let t of e.mutations)o=o.add(t.key)}return n.localDocuments.getDocuments(e,o).next((e=>({Os:e,removedBatchIds:i,addedBatchIds:a})))}))}))}function df(e,t){let n=L(e);return n.persistence.runTransaction(`Acknowledge batch`,`readwrite-primary`,(e=>{let r=t.batch.keys(),i=n.Ms.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){let i=n.batch,a=i.keys(),o=U.resolve();return a.forEach((e=>{o=o.next((()=>r.getEntry(t,e))).next((t=>{let a=n.docVersions.get(e);I(a!==null,48541),t.version.compareTo(a)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((()=>e.mutationQueue.removeMutationBatch(t,i)))}(n,e,t,i).next((()=>i.apply(e))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=W();for(let n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t)))).next((()=>n.localDocuments.getDocuments(e,r)))}))}function ff(e){let t=L(e);return t.persistence.runTransaction(`Get last remote snapshot version`,`readonly`,(e=>t.ci.getLastRemoteSnapshotVersion(e)))}function pf(e,t){let n=L(e),r=t.snapshotVersion,i=n.Cs;return n.persistence.runTransaction(`Apply remote event`,`readwrite-primary`,(e=>{let a=n.Ms.newChangeBuffer({trackRemovals:!0});i=n.Cs;let o=[];
23t.targetChanges.forEach(((a,s)=>{let c=i.get(s);if(!c)return;o.push(n.ci.removeMatchingKeys(e,a.removedDocuments,s).next((()=>n.ci.addMatchingKeys(e,a.addedDocuments,s))));let l=c.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.get(s)===null?a.resumeToken.approximateByteSize()>0&&(l=l.withResumeToken(a.resumeToken,r)):l=l.withResumeToken(Ks.EMPTY_BYTE_STRING,H.min()).withLastLimboFreeSnapshotVersion(H.min()),i=i.insert(s,l),function(e,t,n){return e.resumeToken.approximateByteSize()===0||t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=sf?!0:n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(c,l,a)&&o.push(n.ci.updateTargetData(e,l))}));let s=kl(),c=W();if(t.documentUpdates.forEach((r=>{t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(mf(e,a,t.documentUpdates).next((e=>{s=e.Ns,c=e.Bs}))),!r.isEqual(H.min())){let t=n.ci.getLastRemoteSnapshotVersion(e).next((t=>n.ci.setTargetsMetadata(e,e.currentSequenceNumber,r)));o.push(t)}return U.waitFor(o).next((()=>a.apply(e))).next((()=>n.localDocuments.getLocalViewOfDocuments(e,s,c))).next((()=>s))})).then((e=>(n.Cs=i,e)))}function mf(e,t,n){let r=W(),i=W();return n.forEach((e=>r=r.add(e))),t.getEntries(e,r).next((e=>{let r=kl();return n.forEach(((n,a)=>{let o=e.get(n);a.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),a.isNoDocument()&&a.version.isEqual(H.min())?(t.removeEntry(n,a.readTime),r=r.insert(n,a)):!o.isValidDocument()||a.version.compareTo(o.version)>0||a.version.compareTo(o.version)===0&&o.hasPendingWrites?(t.addEntry(a),r=r.insert(n,a)):P(of,`Ignoring outdated watch update for `,n,`. Current version:`,o.version,` Watch version:`,a.version)})),{Ns:r,Bs:i}}))}function hf(e,t){let n=L(e);return n.persistence.runTransaction(`Get next mutation batch`,`readonly`,(e=>(t===void 0&&(t=Os),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t))))}function gf(e,t){let n=L(e);return n.persistence.runTransaction(`Allocate target`,`readwrite`,(e=>{let r;return n.ci.getTargetData(e,t).next((i=>i?(r=i,U.resolve(r)):n.ci.allocateTargetId(e).next((i=>(r=new Cd(t,i,`TargetPurposeListen`,e.currentSequenceNumber),n.ci.addTargetData(e,r).next((()=>r)))))))})).then((e=>{let r=n.Cs.get(e.targetId);return(r===null||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Cs=n.Cs.insert(e.targetId,e),n.vs.set(t,e.targetId)),e}))}async function _f(e,t,n){let r=L(e),i=r.Cs.get(t),a=n?`readwrite`:`readwrite-primary`;try{n||await r.persistence.runTransaction(`Release target`,a,(e=>r.persistence.referenceDelegate.removeTarget(e,i)))}catch(e){if(!Es(e))throw e;P(of,`Failed to update sequence numbers for target ${t}: ${e}`)}r.Cs=r.Cs.remove(t),r.vs.delete(i.target)}function vf(e,t,n){let r=L(e),i=H.min(),a=W();return r.persistence.runTransaction(`Execute query`,`readwrite`,(e=>function(e,t,n){let r=L(e),i=r.vs.get(n);return i===void 0?r.ci.getTargetData(t,n):U.resolve(r.Cs.get(i))}(r,e,hl(t)).next((t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.ci.getMatchingKeysForTargetId(e,t.targetId).next((e=>{a=e}))})).next((()=>r.Ds.getDocumentsMatchingQuery(e,t,n?i:H.min(),n?a:W()))).next((e=>(yf(r,wl(t),e),{documents:e,Ls:a})))))}function yf(e,t,n){let r=e.Fs.get(t)||H.min();n.forEach(((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Fs.set(t,r)}var bf=class{constructor(){this.activeTargetIds=zl()}Ws(e){this.activeTargetIds=this.activeTargetIds.add(e)}Qs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}$s(){let e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}},xf=class{constructor(){this.Co=new bf,this.vo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e,t=!0){return t&&this.Co.Ws(e),this.vo[e]||`not-current`}updateQueryState(e,t,n){this.vo[e]=t}removeLocalQueryTarget(e){this.Co.Qs(e)}isLocalQueryTarget(e){return this.Co.activeTargetIds.has(e)}clearQueryState(e){delete this.vo[e]}getAllActiveQueryTargets(){return this.Co.activeTargetIds}isActiveQueryTarget(e){return this.Co.activeTargetIds.has(e)}start(){return this.Co=new bf,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}},Sf=class{Fo(e){}shutdown(){}},Cf=`ConnectivityMonitor`,wf=class{constructor(){this.Mo=()=>this.xo(),this.Oo=()=>this.No(),this.Bo=[],this.Lo()}Fo(e){this.Bo.push(e)}shutdown(){window.removeEventListener(`online`,this.Mo),window.removeEventListener(`offline`,this.Oo)}Lo(){window.addEventListener(`online`,this.Mo),window.addEventListener(`offline`,this.Oo)}xo(){P(Cf,`Network connectivity changed: AVAILABLE`);for(let e of this.Bo)e(0)}No(){P(Cf,`Network connectivity changed: UNAVAILABLE`);for(let e of this.Bo)e(1)}static v(){return typeof window<`u`&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}},Tf=null;function Ef(){return Tf===null?Tf=function(){return 268435456+Math.round(2147483648*Math.random())}():Tf++,`0x`+Tf.toString(16)}var Df=`RestConnection`,Of={BatchGetDocuments:`batchGet`,Commit:`commit`,RunQuery:`runQuery`,RunAggregation
23Query:`runAggregationQuery`,ExecutePipeline:`executePipeline`},kf=class{get ko(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?`https`:`http`,n=encodeURIComponent(this.databaseId.projectId),r=encodeURIComponent(this.databaseId.database);this.qo=t+`://`+e.host,this.Ko=`projects/${n}/databases/${r}`,this.Uo=this.databaseId.database===ac?`project_id=${n}`:`project_id=${n}&database_id=${r}`}$o(e,t,n,r,i){let a=Ef(),o=this.Wo(e,t.toUriEncodedString());P(Df,`Sending RPC '${e}' ${a}:`,o,n);let s={"google-cloud-resource-prefix":this.Ko,"x-goog-request-params":this.Uo};this.Qo(s,r,i);let{host:c}=new URL(o),l=Si(c);return this.Go(e,o,s,n,l).then((t=>(P(Df,`Received RPC '${e}' ${a}: `,t),t)),(t=>{throw Po(Df,`RPC '${e}' ${a} failed with error: `,t,`url: `,o,`request:`,n),t}))}zo(e,t,n,r,i,a){return this.$o(e,t,n,r,i)}Qo(e,t,n){e[`X-Goog-Api-Client`]=function(){return`gl-js/ fire/`+ko}(),e[`Content-Type`]=`text/plain`,this.databaseInfo.appId&&(e[`X-Firebase-GMPID`]=this.databaseInfo.appId),t&&t.headers.forEach(((t,n)=>e[n]=t)),n&&n.headers.forEach(((t,n)=>e[n]=t))}Wo(e,t){let n=Of[e],r=`${this.qo}/v1/${t}:${n}`;return this.databaseInfo.apiKey&&(r=`${r}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),r}terminate(){}},Af=class{constructor(e){this.jo=e.jo,this.Jo=e.Jo}Ho(e){this.Zo=e}Xo(e){this.Yo=e}e_(e){this.t_=e}onMessage(e){this.n_=e}close(){this.Jo()}send(e){this.jo(e)}r_(){this.Zo()}i_(){this.Yo()}s_(e){this.t_(e)}o_(e){this.n_(e)}},jf=`WebChannelConnection`,Mf=(e,t,n)=>{e.listen(t,(e=>{try{n(e)}catch(e){setTimeout((()=>{throw e}),0)}}))},Nf=class e extends kf{constructor(e){super(e),this.__=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static a_(){e.u_||=(Mf(Eo(),To.STAT_EVENT,(e=>{e.stat===wo.PROXY?P(jf,`STAT_EVENT: detected buffering proxy`):e.stat===wo.NOPROXY&&P(jf,`STAT_EVENT: detected no buffering proxy`)})),!0)}Go(e,t,n,r,i){let a=Ef();return new Promise(((i,o)=>{let s=new M;s.setWithCredentials(!0),s.listenOnce(So.COMPLETE,(()=>{try{switch(s.getLastErrorCode()){case Co.NO_ERROR:let t=s.getResponseJson();P(jf,`XHR for RPC '${e}' ${a} received:`,JSON.stringify(t)),i(t);break;case Co.TIMEOUT:P(jf,`RPC '${e}' ${a} timed out`),o(new z(R.DEADLINE_EXCEEDED,`Request time out`));break;case Co.HTTP_ERROR:let n=s.getStatus();if(P(jf,`RPC '${e}' ${a} failed with status:`,n,`response text:`,s.getResponseText()),n>0){let e=s.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=e?.error;t&&t.status&&t.message?o(new z(function(e){let t=e.toLowerCase().replace(/_/g,`-`);return Object.values(R).indexOf(t)>=0?t:R.UNKNOWN}(t.status),t.message)):o(new z(R.UNKNOWN,`Server responded with status `+s.getStatus()))}else o(new z(R.UNAVAILABLE,`Connection failed.`));break;default:F(9055,{c_:e,streamId:a,l_:s.getLastErrorCode(),h_:s.getLastError()})}}finally{P(jf,`RPC '${e}' ${a} completed.`)}}));let c=JSON.stringify(r);P(jf,`RPC '${e}' ${a} sending request:`,r),s.send(t,`POST`,c,n,15)}))}P_(t,n,r){let i=Ef(),a=[this.qo,`/`,`google.firestore.v1.Firestore`,`/`,t,`/channel`],o=this.createWebChannelTransport(),s={httpSessionIdParam:`gsessionid`,initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(s.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(s.useFetchStreams=!0),this.Qo(s.initMessageHeaders,n,r),s.encodeInitMessageHeaders=!0;let l=a.join(``);P(jf,`Creating RPC '${t}' stream ${i}: ${l}`,s);let u=o.createWebChannel(l,s);this.T_(u);let d=!1,f=!1,p=new Af({jo:e=>{f?P(jf,`Not sending because RPC '${t}' stream ${i} is closed:`,e):(d||=(P(jf,`Opening RPC '${t}' stream ${i} transport.`),u.open(),!0),P(jf,`RPC '${t}' stream ${i} sending:`,e),u.send(e))},Jo:()=>u.close()});return Mf(u,N.EventType.OPEN,(()=>{f||(P(jf,`RPC '${t}' stream ${i} transport opened.`),p.r_())}
23)),Mf(u,N.EventType.CLOSE,(()=>{f||(f=!0,P(jf,`RPC '${t}' stream ${i} transport closed`),p.s_(),this.I_(u))})),Mf(u,N.EventType.ERROR,(e=>{f||(f=!0,Po(jf,`RPC '${t}' stream ${i} transport errored. Name:`,e.name,`Message:`,e.message),p.s_(new z(R.UNAVAILABLE,`The operation could not be completed`)))})),Mf(u,N.EventType.MESSAGE,(e=>{if(!f){let n=e.data[0];I(!!n,16349);let r=n,a=r?.error||r[0]?.error;if(a){P(jf,`RPC '${t}' stream ${i} received error:`,a);let e=a.status,n=function(e){let t=Cu[e];if(t!==void 0)return Tu(t)}(e),r=a.message;e===`NOT_FOUND`&&r.includes(`database`)&&r.includes(`does not exist`)&&r.includes(this.databaseId.database)&&Po(`Database '${this.databaseId.database}' not found. Please check your project configuration.`),n===void 0&&(n=R.INTERNAL,r=`Unknown error status: `+e+` with message `+a.message),f=!0,p.s_(new z(n,r)),u.close()}else P(jf,`RPC '${t}' stream ${i} received:`,n),p.o_(n)}})),e.a_(),setTimeout((()=>{p.i_()}),0),p}terminate(){this.__.forEach((e=>e.close())),this.__=[]}T_(e){this.__.push(e)}I_(e){this.__=this.__.filter((t=>t===e))}Qo(e,t,n){super.Qo(e,t,n),this.databaseInfo.apiKey&&(e[`x-goog-api-key`]=this.databaseInfo.apiKey)}createWebChannelTransport(){return Do()}};function Pf(e){return new Nf(e)}function Ff(){return typeof document<`u`?document:null}function If(e){return new Ku(e,!0)}Nf.u_=!1;var Lf=class{constructor(e,t,n=1e3,r=1.5,i=6e4){this.Di=e,this.timerId=t,this.E_=n,this.R_=r,this.A_=i,this.V_=0,this.d_=null,this.m_=Date.now(),this.reset()}reset(){this.V_=0}f_(){this.V_=this.A_}g_(e){this.cancel();let t=Math.floor(this.V_+this.p_()),n=Math.max(0,Date.now()-this.m_),r=Math.max(0,t-n);r>0&&P(`ExponentialBackoff`,`Backing off for ${r} ms (base delay: ${this.V_} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.d_=this.Di.enqueueAfterDelay(this.timerId,r,(()=>(this.m_=Date.now(),e()))),this.V_*=this.R_,this.V_<this.E_&&(this.V_=this.E_),this.V_>this.A_&&(this.V_=this.A_)}y_(){this.d_!==null&&(this.d_.skipDelay(),this.d_=null)}cancel(){this.d_!==null&&(this.d_.cancel(),this.d_=null)}p_(){return(Math.random()-.5)*this.V_}},Rf=`PersistentStream`,zf=class{constructor(e,t,n,r,i,a,o,s){this.Di=e,this.w_=n,this.S_=r,this.connection=i,this.authCredentialsProvider=a,this.appCheckCredentialsProvider=o,this.listener=s,this.state=0,this.b_=0,this.D_=null,this.C_=null,this.stream=null,this.v_=0,this.F_=new Lf(e,t)}M_(){return this.state===1||this.state===5||this.x_()}x_(){return this.state===2||this.state===3}start(){this.v_=0,this.state===4?this.O_():this.auth()}async stop(){this.M_()&&await this.close(0)}N_(){this.state=0,this.F_.reset()}B_(){this.x_()&&this.D_===null&&(this.D_=this.Di.enqueueAfterDelay(this.w_,6e4,(()=>this.L_())))}k_(e){this.q_(),this.stream.send(e)}async L_(){if(this.x_())return this.close(0)}q_(){this.D_&&=(this.D_.cancel(),null)}K_(){this.C_&&=(this.C_.cancel(),null)}async close(e,t){this.q_(),this.K_(),this.F_.cancel(),this.b_++,e===4?t&&t.code===R.RESOURCE_EXHAUSTED?(No(t.toString()),No(`Using maximum backoff delay to prevent overloading the backend.`),this.F_.f_()):t&&t.code===R.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()):this.F_.reset(),this.stream!==null&&(this.U_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.e_(t)}U_(){}auth(){this.state=1;let e=this.W_(this.b_),t=this.b_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([e,n])=>{this.b_===t&&this.Q_(e,n)}),(t=>{e((()=>{let e=new z(R.UNKNOWN,`Fetching auth token failed: `+t.message);return this.G_(e)}))}))}Q_(e,t){let n=this.W_(this.b_);this.stream=this.z_(e,t),this.stream.Ho((()=>{n((()=>this.listener.Ho()))})),this.stream.Xo((()=>{n((()=>(this.state=2,this.C_=this.Di.enqueueAfterDelay(this.S_,1e4,(()=>(this.x_()&&(this.state=3),Promise.resolve()))),this.listener.Xo())))})),this.stream.e_((e=>{n((()=>this.G_(e)))})),this.stream.onMessage((e=>{n((()=>++this.v_==1?this.j_(e):this.onNext(e)))}))}O_(){this.state=5,this.F_.g_((async()=>{this.state=0,this.start()}))}G_(e){return P(Rf,`close with error: ${e}`),this.stream=null,this.close(4,e)}W_(e){return t=>{this.Di.enqueueAndForget((()=>this.b_===e?t():(P(Rf,`stream callback skipped by getCloseGuardedDispatcher.`),Promise.resolve())))}}},Bf=class extends zf{constructor(e,t,n,r,i,a){super(e,`listen_stream_connection_backoff`,`listen_stream_idle`,`health_check_timeout`,t,n,r,a),this.serializer
23=i}z_(e,t){return this.connection.P_(`Listen`,e,t)}j_(e){return this.onNext(e)}onNext(e){this.F_.reset();let t=sd(this.serializer,e),n=function(e){if(!(`targetChange`in e))return H.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?H.min():t.readTime?Xu(t.readTime):H.min()}(e);return this.listener.J_(t,n)}H_(e){let t={};t.database=id(this.serializer),t.addTarget=function(e,t){let n,r=t.target;if(n=sl(r)?{documents:ud(e,r)}:{query:dd(e,r).dt},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=Ju(e,t.resumeToken);let r=Y(e,t.expectedCount);r!==null&&(n.expectedCount=r)}else if(t.snapshotVersion.compareTo(H.min())>0){n.readTime=qu(e,t.snapshotVersion.toTimestamp());let r=Y(e,t.expectedCount);r!==null&&(n.expectedCount=r)}return n}(this.serializer,e);let n=pd(this.serializer,e);n&&(t.labels=n),this.k_(t)}Z_(e){let t={};t.database=id(this.serializer),t.removeTarget=e,this.k_(t)}},Vf=class extends zf{constructor(e,t,n,r,i,a){super(e,`write_stream_connection_backoff`,`write_stream_idle`,`health_check_timeout`,t,n,r,a),this.serializer=i}get X_(){return this.v_>0}start(){this.lastStreamToken=void 0,super.start()}U_(){this.X_&&this.Y_([])}z_(e,t){return this.connection.P_(`Write`,e,t)}j_(e){return I(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,I(!e.writeResults||e.writeResults.length===0,55816),this.listener.ea()}onNext(e){I(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.F_.reset();let t=ld(e.writeResults,e.commitTime),n=Xu(e.commitTime);return this.listener.ta(n,t)}na(){let e={};e.database=id(this.serializer),this.k_(e)}Y_(e){let t={streamToken:this.lastStreamToken,writes:e.map((e=>cd(this.serializer,e)))};this.k_(t)}},Hf=class{},Uf=class extends Hf{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.ra=!1}ia(){if(this.ra)throw new z(R.FAILED_PRECONDITION,`The client has already been terminated.`)}$o(e,t,n,r){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([i,a])=>this.connection.$o(e,Qu(t,n),r,i,a))).catch((e=>{throw e.name===`FirebaseError`?(e.code===R.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new z(R.UNKNOWN,e.toString())}))}zo(e,t,n,r,i){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([a,o])=>this.connection.zo(e,Qu(t,n),r,a,o,i))).catch((e=>{throw e.name===`FirebaseError`?(e.code===R.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new z(R.UNKNOWN,e.toString())}))}terminate(){this.ra=!0,this.connection.terminate()}};function Wf(e,t,n,r){return new Uf(e,t,n,r)}var Gf=class{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state=`Unknown`,this.sa=0,this.oa=null,this._a=!0}aa(){this.sa===0&&(this.ua(`Unknown`),this.oa=this.asyncQueue.enqueueAfterDelay(`online_state_timeout`,1e4,(()=>(this.oa=null,this.ca(`Backend didn't respond within 10 seconds.`),this.ua(`Offline`),Promise.resolve()))))}la(e){this.state===`Online`?this.ua(`Unknown`):(this.sa++,this.sa>=1&&(this.ha(),this.ca(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ua(`Offline`)))}set(e){this.ha(),this.sa=0,e===`Online`&&(this._a=!1),this.ua(e)}ua(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ca(e){let t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this._a?(No(t),this._a=!1):P(`OnlineStateTracker`,t)}ha(){this.oa!==null&&(this.oa.cancel(),this.oa=null)}},Kf=`RemoteStore`,qf=class{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.Pa=[],this.Ta=new Map,this.Ia=new Map,this.Ea=new Map,this.Ra=new Md(1e3),this.Aa=new Md(1001),this.Va=new Set,this.da=[],this.ma=i,this.ma.Fo((e=>{n.enqueueAndForget((async()=>
23{rp(this)&&(P(Kf,`Restarting streams for network reachability change.`),await async function(e){let t=L(e);t.Va.add(4),await Yf(t),t.fa.set(`Unknown`),t.Va.delete(4),await Jf(t)}(this))}))})),this.fa=new Gf(n,r)}};async function Jf(e){if(rp(e))for(let t of e.da)await t(!0)}async function Yf(e){for(let t of e.da)await t(!1)}function Xf(e,t){return e.Ia.get(t)||void 0}function Zf(e,t){let n=L(e),r=Xf(n,t.targetId);if(r!==void 0&&n.Ta.has(r))return;let i=function(e,t){let n=Xf(e,t);n!==void 0&&e.Ea.delete(n);let r=function(e,t){return t%2==0?e.Ra.next():e.Aa.next()}(e,t);return e.Ia.set(t,r),e.Ea.set(r,t),r}(n,t.targetId);P(Kf,`remoteStoreListen mapping SDK target ID to remote`,t.targetId,i);let a=new Cd(t.target,i,t.purpose,t.sequenceNumber,t.snapshotVersion,t.lastLimboFreeSnapshotVersion,t.resumeToken);n.Ta.set(i,a),np(n)?tp(n):Sp(n).x_()&&$f(n,a)}function Qf(e,t){let n=L(e),r=Sp(n),i=Xf(n,t);P(Kf,`remoteStoreUnlisten removing mapping of SDK target ID to remote`,t,i),n.Ta.delete(i),n.Ia.delete(t),n.Ea.delete(i),r.x_()&&ep(n,i),n.Ta.size===0&&(r.x_()?r.B_():rp(n)&&n.fa.set(`Unknown`))}function $f(e,t){if(e.ga.$e(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(H.min())>0){let n=e.Ea.get(t.targetId);if(n===void 0)return void P(Kf,`SDK target ID not found for remote ID: `+t.targetId);let r=e.remoteSyncer.getRemoteKeysForTarget(n).size;t=t.withExpectedCount(r)}Sp(e).H_(t)}function ep(e,t){e.ga.$e(t),Sp(e).Z_(t)}function tp(e){e.ga=new Bu({getRemoteKeysForTarget:t=>{let n=e.Ea.get(t);return n===void 0?W():e.remoteSyncer.getRemoteKeysForTarget(n)},Rt:t=>e.Ta.get(t)||null,lt:()=>e.datastore.serializer.databaseId}),Sp(e).start(),e.fa.aa()}function np(e){return rp(e)&&!Sp(e).M_()&&e.Ta.size>0}function rp(e){return L(e).Va.size===0}function ip(e){e.ga=void 0}async function ap(e){e.fa.set(`Online`)}async function op(e){e.Ta.forEach(((t,n)=>{$f(e,t)}))}async function sp(e,t){ip(e),np(e)?(e.fa.la(t),tp(e)):e.fa.set(`Unknown`)}async function cp(e,t,n){if(e.fa.set(`Online`),t instanceof Lu&&t.state===2&&t.cause)try{await async function(e,t){let n=t.cause;for(let r of t.targetIds){if(e.Ta.has(r)){let t=e.Ea.get(r);t!==void 0&&(await e.remoteSyncer.rejectListen(t,n),e.Ia.delete(t),e.Ea.delete(r)),e.Ta.delete(r)}e.ga.removeTarget(r)}}(e,t)}catch(n){P(Kf,`Failed to remove targets %s: %s `,t.targetIds.join(`,`),n),await lp(e,n)}else if(t instanceof Fu?e.ga.Xe(t):t instanceof Iu?e.ga.it(t):e.ga.tt(t),!n.isEqual(H.min()))try{let t=await ff(e.localStore);n.compareTo(t)>=0&&await function(e,t){let n=e.ga.Pt(t);
23n.targetChanges.forEach(((n,r)=>{if(n.resumeToken.approximateByteSize()>0){let i=e.Ta.get(r);i&&e.Ta.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach(((t,n)=>{let r=e.Ta.get(t);r&&(e.Ta.set(t,r.withResumeToken(Ks.EMPTY_BYTE_STRING,r.snapshotVersion)),ep(e,t),$f(e,new Cd(r.target,t,n,r.sequenceNumber)))}));let r=function(e,t){let n=new Map;t.targetChanges.forEach(((t,r)=>{let i=e.Ea.get(r);i!==void 0&&n.set(i,t)}));let r=new zs(B);return t.targetMismatches.forEach(((t,n)=>{let i=e.Ea.get(t);i!==void 0&&(r=r.insert(i,n))})),new Nu(t.snapshotVersion,n,r,t.documentUpdates,t.resolvedLimboDocuments)}(e,n);return e.remoteSyncer.applyRemoteEvent(r)}(e,n)}catch(t){P(Kf,`Failed to raise snapshot:`,t),await lp(e,t)}}async function lp(e,t,n){if(!Es(t))throw t;e.Va.add(1),await Yf(e),e.fa.set(`Offline`),n||=()=>ff(e.localStore),e.asyncQueue.enqueueRetryable((async()=>{P(Kf,`Retrying IndexedDB access`),await n(),e.Va.delete(1),await Jf(e)}))}function up(e,t){return t().catch((n=>lp(e,n,t)))}async function dp(e){let t=L(e),n=Cp(t),r=t.Pa.length>0?t.Pa[t.Pa.length-1].batchId:Os;for(;fp(t);)try{let e=await hf(t.localStore,r);if(e===null){t.Pa.length===0&&n.B_();break}r=e.batchId,pp(t,e)}catch(e){await lp(t,e)}mp(t)&&hp(t)}function fp(e){return rp(e)&&e.Pa.length<10}function pp(e,t){e.Pa.push(t);let n=Cp(e);n.x_()&&n.X_&&n.Y_(t.mutations)}function mp(e){return rp(e)&&!Cp(e).M_()&&e.Pa.length>0}function hp(e){Cp(e).start()}async function gp(e){Cp(e).na()}async function _p(e){let t=Cp(e);for(let n of e.Pa)t.Y_(n.mutations)}async function vp(e,t,n){let r=e.Pa.shift(),i=bu.from(r,t,n);await up(e,(()=>e.remoteSyncer.applySuccessfulWrite(i))),await dp(e)}async function yp(e,t){t&&Cp(e).X_&&await async function(e,t){if(function(e){return wu(e)&&e!==R.ABORTED}(t.code)){let n=e.Pa.shift();Cp(e).N_(),await up(e,(()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t))),await dp(e)}}(e,t),mp(e)&&hp(e)}async function bp(e,t){let n=L(e);n.asyncQueue.verifyOperationInProgress(),P(Kf,`RemoteStore received new credentials`);let r=rp(n);n.Va.add(3),await Yf(n),r&&n.fa.set(`Unknown`),await n.remoteSyncer.handleCredentialChange(t),n.Va.delete(3),await Jf(n)}async function xp(e,t){let n=L(e);t?(n.Va.delete(2),await Jf(n)):t||(n.Va.add(2),await Yf(n),n.fa.set(`Unknown`))}function Sp(e){return e.pa||(e.pa=function(e,t,n){let r=L(e);return r.ia(),new Bf(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Ho:ap.bind(null,e),Xo:op.bind(null,e),e_:sp.bind(null,e),J_:cp.bind(null,e)}),e.da.push((async t=>{t?(e.pa.N_(),np(e)?tp(e):e.fa.set(`Unknown`)):(await e.pa.stop(),ip(e))}))),e.pa}function Cp(e){return e.ya||(e.ya=function(e,t,n){let r=L(e);return r.ia(),new Vf(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Ho:()=>Promise.resolve(),Xo:gp.bind(null,e),e_:yp.bind(null,e),ea:_p.bind(null,e),ta:vp.bind(null,e)}),e.da.push((async t=>{t?(e.ya.N_(),await dp(e)):(await e.ya.stop(),e.Pa.length>0&&(P(Kf,`Stopping write stream with ${e.Pa.length} pending writes`),e.Pa=[]))}))),e.ya}var wp=class e{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new Lo,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((e=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(t,n,r,i,a){let o=new e(t,n,Date.now()+r,i,a);return o.start(r),o}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new z(R.CANCELLED,`Operation cancelled`+(e?`: `+e:``))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle===null?Promise.resolve():(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e))))))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}};function Tp(e,t){if(No(`AsyncQueue`,`${t}: ${e}`),Es(e))return new z(R.UNAVAILABLE,`${t}: ${e}`);throw e}var Ep=class e{static emptySet(t){return new e(t.comparator)}constructor(e){this.comparator=e?(t,n)=>e(t,n)||V.comparator(t.key,n.key):(e,t)=>V.comparator(e.key,t.key),this.keyedMap=jl(),this.sortedSet=new zs(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,n)=>(e(t),!1)))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(t){if(!(t instanceof e)||this.size!==t.size)return!1;let n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();for(;n.hasNext();){let e=n.getNext().key,t=r.getNext().key;if(!e.isEqual(t))return!1}return!0}toString(){let e=[];return this.forEach((t=>{e.push(t.toString())})),e.length===0?`DocumentSet ()`:`DocumentSet (
24  `+e.join(`  
25`)+`
26)`}copy(t,n){let r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}},Dp=class{constructor(){this.wa=new zs(V.comparator)}track(e){let t=e.doc.key,n=this.wa.get(t);n?e.type!==0&&n.type===3?this.wa=this.wa.insert(t,e):e.type===3&&n.type!==1?this.wa=this.wa.insert(t,{type:n.type,doc:e.doc}):e.type===2&&n.type===2?this.wa=this.wa.insert(t,{type:2,doc:e.doc}):e.type===2&&n.type===0?this.wa=this.wa.insert(t,{type:0,doc:e.doc}):e.type===1&&n.type===0?this.wa=this.wa.remove(t):e.type===1&&n.type===2?this.wa=this.wa.insert(t,{type:1,doc:n.doc}):e.type===0&&n.type===1?this.wa=this.wa.insert(t,{type:2,doc:e.doc}):F(63341,{At:e,Sa:n}):this.wa=this.wa.insert(t,e)}ba(){let e=[];return this.wa.inorderTraversal(((t,n)=>{e.push(n)})),e}},Op=class e{constructor(e,t,n,r,i,a,o,s,c){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=a,this.syncStateChanged=o,this.excludesMetadataChanges=s,this.hasCachedResults=c}static fromInitialDocuments(t,n,r,i,a){let o=[];
26return n.forEach((e=>{o.push({type:0,doc:e})})),new e(t,n,Ep.emptySet(n),o,r,i,!0,!1,a)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&bl(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==n[e].type||!t[e].doc.isEqual(n[e].doc))return!1;return!0}},kp=class{constructor(){this.Da=void 0,this.Ca=[]}va(){return this.Ca.some((e=>e.Fa()))}},Ap=class{constructor(){this.queries=jp(),this.onlineState=`Unknown`,this.Ma=new Set}terminate(){(function(e,t){let n=L(e),r=n.queries;n.queries=jp(),r.forEach(((e,n)=>{for(let e of n.Ca)e.onError(t)}))})(this,new z(R.ABORTED,`Firestore shutting down`))}};function jp(){return new Dl((e=>xl(e)),bl)}async function Mp(e,t){let n=L(e),r=3,i=t.query,a=n.queries.get(i);a?!a.va()&&t.Fa()&&(r=2):(a=new kp,r=+!t.Fa());try{switch(r){case 0:a.Da=await n.onListen(i,!0);break;case 1:a.Da=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(e){let n=Tp(e,`Initialization of query '${Sl(t.query)}' failed`);t.onError(n);return}n.queries.set(i,a),a.Ca.push(t),t.xa(n.onlineState),a.Da&&t.Oa(a.Da)&&Ip(n)}async function Np(e,t){let n=L(e),r=t.query,i=3,a=n.queries.get(r);if(a){let e=a.Ca.indexOf(t);e>=0&&(a.Ca.splice(e,1),a.Ca.length===0?i=+!t.Fa():!a.va()&&t.Fa()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function Pp(e,t){let n=L(e),r=!1;for(let e of t){let t=e.query,i=n.queries.get(t);if(i){for(let t of i.Ca)t.Oa(e)&&(r=!0);i.Da=e}}r&&Ip(n)}function Fp(e,t,n){let r=L(e),i=r.queries.get(t);if(i)for(let e of i.Ca)e.onError(n);r.queries.delete(t)}function Ip(e){e.Ma.forEach((e=>{e.next()}))}var Lp,Rp;(Rp=Lp||={}).Na=`default`,Rp.Cache=`cache`;var zp=class{constructor(e,t,n){this.query=e,this.Ba=t,this.La=!1,this.ka=null,this.onlineState=`Unknown`,this.options=n||{}}Oa(e){if(!this.options.includeMetadataChanges){let t=[];for(let n of e.docChanges)n.type!==3&&t.push(n);e=new Op(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.La?this.qa(e)&&(this.Ba.next(e),t=!0):this.Ka(e,this.onlineState)&&(this.Ua(e),t=!0),this.ka=e,t}onError(e){this.Ba.error(e)}xa(e){this.onlineState=e;let t=!1;return this.ka&&!this.La&&this.Ka(this.ka,e)&&(this.Ua(this.ka),t=!0),t}Ka(e,t){if(!e.fromCache||!this.Fa())return!0;let n=t!==`Offline`;return(!this.options.$a||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||t===`Offline`)}qa(e){if(e.docChanges.length>0)return!0;let t=this.ka&&this.ka.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Ua(e){e=Op.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.La=!0,this.Ba.next(e)}Fa(){return this.options.source!==Lp.Cache}},Bp=class{constructor(e){this.key=e}},Vp=class{constructor(e){this.key=e}},Hp=class{constructor(e,t){this.query=e,this.eu=t,this.tu=null,this.hasCachedResults=!1,this.current=!1,this.nu=W(),this.mutatedKeys=W(),this.ru=Tl(e),this.iu=new Ep(this.ru)}get su(){return this.eu}ou(e,t){let n=t?t._u:new Dp,r=t?t.iu:this.iu,i=t?t.mutatedKeys:this.mutatedKeys,a=r,o=!1,s=this.query.limitType===`F`&&r.size===this.query.limit?r.last():null,c=this.query.limitType===`L`&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal(((e,t)=>{let l=r.get(e),u=Cl(this.query,t)?t:null,d=!!l&&this.mutatedKeys.has(l.key),f=!!u&&(u.hasLocalMutations||this.mutatedKeys.has(u.key)&&u.hasCommittedMutations),p=!1;l&&u?l.data.isEqual(u.data)?d!==f&&(n.track({type:3,doc:u}),p=!0):this.au(l,u)||(n.track({type:2,doc:u}),p=!0,(s&&this.ru(u,s)>0||c&&this.ru(u,c)<0)&&(o=!0)):!l&&u?(n.track({type:0,doc:u}),p=!0):l&&!u&&(n.track({type:1,doc:l}),p=!0,(s||c)&&(o=!0)),p&&(u?(a=a.add(u),i=f?i.add(e):i.delete(e)):(a=a.delete(e),i=i.delete(e)))})),this.query.limit!==null)for(;a.size>this.query.limit;){let e=this.query.limitType===`F`?a.last():a.first();a=a.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{iu:a,_u:n,Ss:o,mutatedKeys:i}}au(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}
26applyChanges(e,t,n,r){let i=this.iu;this.iu=e.iu,this.mutatedKeys=e.mutatedKeys;let a=e._u.ba();a.sort(((e,t)=>function(e,t){let n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return F(20277,{At:e})}};return n(e)-n(t)}(e.type,t.type)||this.ru(e.doc,t.doc))),this.uu(n),r??=!1;let o=t&&!r?this.cu():[],s=this.nu.size===0&&this.current&&!r?1:0,c=s!==this.tu;return this.tu=s,a.length!==0||c?{snapshot:new Op(this.query,e.iu,i,a,e.mutatedKeys,s===0,c,!1,!!n&&n.resumeToken.approximateByteSize()>0),lu:o}:{lu:o}}xa(e){return this.current&&e===`Offline`?(this.current=!1,this.applyChanges({iu:this.iu,_u:new Dp,mutatedKeys:this.mutatedKeys,Ss:!1},!1)):{lu:[]}}hu(e){return!this.eu.has(e)&&!!this.iu.has(e)&&!this.iu.get(e).hasLocalMutations}uu(e){e&&(e.addedDocuments.forEach((e=>this.eu=this.eu.add(e))),e.modifiedDocuments.forEach((e=>{})),e.removedDocuments.forEach((e=>this.eu=this.eu.delete(e))),this.current=e.current)}cu(){if(!this.current)return[];let e=this.nu;this.nu=W(),this.iu.forEach((e=>{this.hu(e.key)&&(this.nu=this.nu.add(e.key))}));let t=[];return e.forEach((e=>{this.nu.has(e)||t.push(new Vp(e))})),this.nu.forEach((n=>{e.has(n)||t.push(new Bp(n))})),t}Pu(e){this.eu=e.Ls,this.nu=W();let t=this.ou(e.documents);return this.applyChanges(t,!0)}Tu(){return Op.fromInitialDocuments(this.query,this.iu,this.mutatedKeys,this.tu===0,this.hasCachedResults)}},Up=`SyncEngine`,Wp=class{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}},Gp=class{constructor(e){this.key=e,this.Iu=!1}},Kp=class{constructor(e,t,n,r,i,a){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=a,this.Eu={},this.Ru=new Dl((e=>xl(e)),bl),this.Au=new Map,this.Vu=new Set,this.du=new zs(V.comparator),this.mu=new Map,this.fu=new Kd,this.gu={},this.pu=new Map,this.yu=Md._r(),this.onlineState=`Unknown`,this.wu=void 0}get isPrimaryClient(){return!0===this.wu}};async function qp(e,t,n=!0){let r=hm(e),i,a=r.Ru.get(t);return a?(r.sharedClientState.addLocalQueryTarget(a.targetId),i=a.view.Tu()):i=await Yp(r,t,n,!0),i}async function Jp(e,t){await Yp(hm(e),t,!0,!1)}async function Yp(e,t,n,r){let i=await gf(e.localStore,hl(t)),a=i.targetId,o=e.sharedCl
26ientState.addLocalQueryTarget(a,n),s;return r&&(s=await Xp(e,t,a,o===`current`,i.resumeToken)),e.isPrimaryClient&&n&&Zf(e.remoteStore,i),s}async function Xp(e,t,n,r,i){e.Su=(t,n,r)=>async function(e,t,n,r){let i=t.view.ou(n);i.Ss&&(i=await vf(e.localStore,t.query,!1).then((({documents:e})=>t.view.ou(e,i))));let a=r&&r.targetChanges.get(t.targetId),o=r&&r.targetMismatches.get(t.targetId)!=null,s=t.view.applyChanges(i,e.isPrimaryClient,a,o);return lm(e,t.targetId,s.lu),s.snapshot}(e,t,n,r);let a=await vf(e.localStore,t,!0),o=new Hp(t,a.Ls),s=o.ou(a.documents),c=Pu.createSynthesizedTargetChangeForCurrentChange(n,r&&e.onlineState!==`Offline`,i),l=o.applyChanges(s,e.isPrimaryClient,c);lm(e,n,l.lu);let u=new Wp(t,n,o);return e.Ru.set(t,u),e.Au.has(n)?e.Au.get(n).push(t):e.Au.set(n,[t]),l.snapshot}async function Zp(e,t,n){let r=L(e),i=r.Ru.get(t),a=r.Au.get(i.targetId);if(a.length>1)return r.Au.set(i.targetId,a.filter((e=>!bl(e,t)))),void r.Ru.delete(t);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
26ientState.isActiveQueryTarget(i.targetId)||await _f(r.localStore,i.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(i.targetId),n&&Qf(r.remoteStore,i.targetId),sm(r,i.targetId)})).catch(ws)):(sm(r,i.targetId),await _f(r.localStore,i.targetId,!0))}async function Qp(e,t){let n=L(e),r=n.Ru.get(t),i=n.Au.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),Qf(n.remoteStore,r.targetId))}async function $p(e,t,n){let r=gm(e);try{let e=await function(e,t){let n=L(e),r=hs.now(),i=t.reduce(((e,t)=>e.add(t.key)),W()),a,o;return n.persistence.runTransaction(`Locally write mutations`,`readwrite`,(e=>{let s=kl(),c=W();return n.Ms.getEntries(e,i).next((e=>{s=e,s.forEach(((e,t)=>{t.isValidDocument()||(c=c.add(e))}))})).next((()=>n.localDocuments.getOverlayedDocuments(e,s))).next((i=>{a=i;let o=[];for(let e of t){let t=uu(e,a.get(e.key).overlayedDocument);t!=null&&o.push(new pu(e.key,t,Nc(t.value.mapValue),iu.exists(!0)))}return n.mutationQueue.addMutationBatch(e,r,o,t)})).next((t=>{o=t;let r=t.applyToLocalDocumentSet(a,c);return n.documentOverlayCache.saveOverlays(e,t.batchId,r)}))})).then((()=>({batchId:o.batchId,changes:Ml(a)})))}(r.localStore,t);r.sharedClientState.addPendingMutation(e.batchId),function(e,t,n){let r=e.gu[e.currentUser.toKey()];r||=new zs(B),r=r.insert(t,n),e.gu[e.currentUser.toKey()]=r}(r,e.batchId,n),await fm(r,e.changes),await dp(r.remoteStore)}catch(e){let t=Tp(e,`Failed to persist write`);n.reject(t)}}async function em(e,t){let n=L(e);try{let e=await pf(n.localStore,t);
26t.targetChanges.forEach(((e,t)=>{let r=n.mu.get(t);r&&(I(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1,22616),e.addedDocuments.size>0?r.Iu=!0:e.modifiedDocuments.size>0?I(r.Iu,14607):e.removedDocuments.size>0&&(I(r.Iu,42227),r.Iu=!1))})),await fm(n,e,t)}catch(e){await ws(e)}}function tm(e,t,n){let r=L(e);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){let e=[];r.Ru.forEach(((n,r)=>{let i=r.view.xa(t);i.snapshot&&e.push(i.snapshot)})),function(e,t){let n=L(e);n.onlineState=t;let r=!1;n.queries.forEach(((e,n)=>{for(let e of n.Ca)e.xa(t)&&(r=!0)})),r&&Ip(n)}(r.eventManager,t),e.length&&r.Eu.J_(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function nm(e,t,n){let r=L(e);r.sharedClientState.updateQueryState(t,`rejected`,n);let i=r.mu.get(t),a=i&&i.key;if(a){let e=new zs(V.comparator);e=e.insert(a,Pc.newNoDocument(a,H.min()));let n=W().add(a);await em(r,new Nu(H.min(),new Map,new zs(B),e,n)),r.du=r.du.remove(a),r.mu.delete(t),dm(r)}else await _f(r.localStore,t,!1).then((()=>sm(r,t,n))).catch(ws)}async function rm(e,t){let n=L(e),r=t.batch.batchId;try{let e=await df(n.localStore,t);om(n,r,null),am(n,r),n.sharedClientState.updateMutationState(r,`acknowledged`),await fm(n,e)}catch(e){await ws(e)}}async function im(e,t,n){let r=L(e);try{let e=await function(e,t){let n=L(e);return n.persistence.runTransaction(`Reject batch`,`readwrite-primary`,(e=>{let r;
26return n.mutationQueue.lookupMutationBatch(e,t).next((t=>(I(t!==null,37113),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(r.localStore,t);om(r,t,n),am(r,t),r.sharedClientState.updateMutationState(t,`rejected`,n),await fm(r,e)}catch(e){await ws(e)}}function am(e,t){(e.pu.get(t)||[]).forEach((e=>{e.resolve()})),e.pu.delete(t)}function om(e,t,n){let r=L(e),i=r.gu[r.currentUser.toKey()];if(i){let e=i.get(t);e&&(n?e.reject(n):e.resolve(),i=i.remove(t)),r.gu[r.currentUser.toKey()]=i}}function sm(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(let r of e.Au.get(t))e.Ru.delete(r),n&&e.Eu.bu(r,n);e.Au.delete(t),e.isPrimaryClient&&e.fu.Qr(t).forEach((t=>{e.fu.containsKey(t)||cm(e,t)}))}function cm(e,t){e.Vu.delete(t.path.canonicalString());let n=e.du.get(t);n!==null&&(Qf(e.remoteStore,n),e.du=e.du.remove(t),e.mu.delete(n),dm(e))}function lm(e,t,n){for(let r of n)r instanceof Bp?(e.fu.addReference(r.key,t),um(e,r)):r instanceof Vp?(P(Up,`Document no longer in limbo: `+r.key),e.fu.removeReference(r.key,t),e.fu.containsKey(r.key)||cm(e,r.key)):F(19791,{Du:r})}function um(e,t){let n=t.key,r=n.path.canonicalString();e.du.get(n)||e.Vu.has(r)||(P(Up,`New document in limbo: `+n),e.Vu.add(r),dm(e))}function dm(e){for(;e.Vu.size>0&&e.du.size<e.maxConcurrentLimboResolutions;){let t=e.Vu.values().next().value;e.Vu.delete(t);let n=new V(ts.fromString(t)),r=e.yu.next();e.mu.set(r,new Gp(n)),e.du=e.du.insert(n,r),Zf(e.remoteStore,new Cd(hl(ul(n.path)),r,`TargetPurposeLimboResolution`,Ds.ce))}}async function fm(e,t,n){let r=L(e),i=[],a=[],o=[];r.Ru.isEmpty()||(r.Ru.forEach(((e,s)=>{o.push(r.Su(s,t,n).then((e=>{if((e||n)&&r.isPrimaryClient){let t=e?!e.fromCache:n?.targetChanges.get(s.targetId)?.current;
26r.sharedClientState.updateQueryState(s.targetId,t?`current`:`not-current`)}if(e){i.push(e);let t=nf.Is(s.targetId,e);a.push(t)}})))})),await Promise.all(o),r.Eu.J_(i),await async function(e,t){let n=L(e);try{await n.persistence.runTransaction(`notifyLocalViewChanges`,`readwrite`,(e=>U.forEach(t,(t=>U.forEach(t.Ps,(r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r))).next((()=>U.forEach(t.Ts,(r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))))))}catch(e){if(!Es(e))throw e;P(of,`Failed to update sequence numbers: `+e)}for(let e of t){let t=e.targetId;if(!e.fromCache){let e=n.Cs.get(t),r=e.snapshotVersion,i=e.withLastLimboFreeSnapshotVersion(r);n.Cs=n.Cs.insert(t,i)}}}(r.localStore,a))}async function pm(e,t){let n=L(e);if(!n.currentUser.isEqual(t)){P(Up,`User change. New user:`,t.toKey());let e=await uf(n.localStore,t);n.currentUser=t,function(e,t){e.pu.forEach((e=>{e.forEach((e=>{e.reject(new z(R.CANCELLED,t))}))})),e.pu.clear()}(n,`'waitForPendingWrites' promise is rejected due to a user change.`),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await fm(n,e.Os)}}function mm(e,t){let n=L(e),r=n.mu.get(t);if(r&&r.Iu)return W().add(r.key);{let e=W(),r=n.Au.get(t);if(!r)return e;for(let t of r){let r=n.Ru.get(t);e=e.unionWith(r.view.su)}return e}}function hm(e){let t=L(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=em.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=mm.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=nm.bind(null,t),t.Eu.J_=Pp.bind(null,t.eventManager),t.Eu.bu=Fp.bind(null,t.eventManager),t}function gm(e){let t=L(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=rm.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=im.bind(null,t),t}var _m=class{constructor(){this.kind=`memory`,this.synchronizeTabs=!1}async initialize(e){this.serializer=If(e.databaseInfo.databaseId),this.sharedClientState=this.Fu(e),this.persistence=this.Mu(e),await this.persistence.start(),this.localStore=this.xu(e),this.gcScheduler=this.Ou(e,this.localStore),this.indexBackfillerScheduler=this.Nu(e,this.localStore)}Ou(e,t){return null}Nu(e,t){return null}xu(e){return lf(this.persistence,new af,e.initialUser,this.serializer)}Mu(e){return new Qd(ef.Ai,this.serializer)}Fu(e){return new xf}async terminate(){this.gcScheduler?.stop(),this.indexBackfillerScheduler?.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}};_m.provider={build:()=>new _m};var vm=class extends _m{constructor(e){super(),this.cacheSizeBytes=e}Ou(e,t){I(this.persistence.referenceDelegate instanceof tf,46915);let n=this.persistence.referenceDelegate.garbageCollector;return new Ld(n,e.asyncQueue,t)}Mu(e){let t=this.cacheSizeBytes===void 0?jd.DEFAULT:jd.withCacheSize(this.cacheSizeBytes);return new Qd((e=>tf.Ai(e,t)),this.serializer)}},ym=class{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>tm(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=pm.bind(null,this.syncEngine),await xp(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new Ap}()}createDatastore(e){let t=If(e.databaseInfo.databaseId),n=Pf(e.databaseInfo);return Wf(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){return function(e,t,n,r,i){return new qf(e,t,n,r,i)}(this.localStore,this.datastore,e.asyncQueue,(e=>tm(this.syncEngine,e,0)),function(){return wf.v()?new wf:new Sf}())}createSyncEngine(e,t){return function(e,t,n,r,i,a,o){let s=new Kp(e,t,n,r,i,a);return o&&(s.wu=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){await async function(e){let t=L(e);P(Kf,`RemoteStore shutting down.`),t.Va.add(5),await Yf(t),t.ma.shutdown(),t.fa.set(`Unknown`)}(this.remoteStore),this.datastore?.terminate(),this.eventManager?.terminate()}};ym.provider={build:()=>new ym};var bm=class{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Lu(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Lu(this.observer.error,e):No(`Uncaught Error in snapshot listener:`,e.toString()))}ku(){this.muted=!0}
26Lu(e,t){setTimeout((()=>{this.muted||e(t)}),0)}},xm=`FirestoreClient`,Sm=class{constructor(e,t,n,r,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this._databaseInfo=r,this.user=Oo.UNAUTHENTICATED,this.clientId=qo.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(n,(async e=>{P(xm,`Received user=`,e.uid),await this.authCredentialListener(e),this.user=e})),this.appCheckCredentials.start(n,(e=>(P(xm,`Received new app check token=`,e),this.appCheckCredentialListener(e,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this._databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();let e=new Lo;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){let n=Tp(t,`Failed to shutdown persistence`);e.reject(n)}})),e.promise}};async function Cm(e,t){e.asyncQueue.verifyOperationInProgress(),P(xm,`Initializing OfflineComponentProvider`);let n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async e=>{r.isEqual(e)||(await uf(t.localStore,e),r=e)})),t.persistence.setDatabaseDeletedListener((()=>e.terminate())),e._offlineComponents=t}async function wm(e,t){e.asyncQueue.verifyOperationInProgress();let n=await Tm(e);P(xm,`Initializing OnlineComponentProvider`),await t.initialize(n,e.configuration),e.setCredentialChangeListener((e=>bp(t.remoteStore,e))),e.setAppCheckTokenChangeListener(((e,n)=>bp(t.remoteStore,n))),e._onlineComponents=t}async function Tm(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){P(xm,`Using user provided OfflineComponentProvider`);try{await Cm(e,e._uninitializedComponentsProvider._offline)}catch(t){let n=t;if(!function(e){return e.name===`FirebaseError`?e.code===R.FAILED_PRECONDITION||e.code===R.UNIMPLEMENTED:!(typeof DOMException<`u`&&e instanceof DOMException)||e.code===22||e.code===20||e.code===11}(n))throw n;Po(`Error using user provided cache. Falling back to memory cache: `+n),await Cm(e,new _m)}}else P(xm,`Using default OfflineComponentProvider`),await Cm(e,new vm(void 0));return e._offlineComponents}async function Em(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(P(xm,`Using user provided OnlineComponentProvider`),await wm(e,e._uninitializedComponentsProvider._online)):(P(xm,`Using default OnlineComponentProvider`),await wm(e,new ym))),e._onlineComponents}function Dm(e){return Em(e).then((e=>e.syncEngine))}async function Om(e){let t=await Em(e),n=t.eventManager;return n.onListen=qp.bind(null,t.syncEngine),n.onUnlisten=Zp.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=Jp.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=Qp.bind(null,t.syncEngine),n}function km(e,t,n,r){let i=new bm(r),a=new zp(t,i,n);return e.asyncQueue.enqueueAndForget((async()=>Mp(await Om(e),a))),()=>{i.ku(),e.asyncQueue.enqueueAndForget((async()=>Np(await Om(e),a)))}}function Am(e,t,n={}){let r=new Lo;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){let a=new bm({next:s=>{a.ku(),t.enqueueAndForget((()=>Np(e,o)));let c=s.docs.has(n);!c&&s.fromCache?i.reject(new z(R.UNAVAILABLE,`Failed to get document because the client is offline.`)):c&&s.fromCache&&r&&r.source===`server`?i.reject(new z(R.UNAVAILABLE,`Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)`)):i.resolve(s)},error:e=>i.reject(e)}),o=new zp(ul(n.path),a,{includeMetadataChanges:!0,$a:!0});return Mp(e,o)}(await Om(e),e.asyncQueue,t,n,r))),r.promise}function jm(e,t,n={}){let r=new Lo;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){let a=new bm({next:n=>{a.ku(),t.enqueueAndForget((()=>Np(e,o))),n.fromCache&&r.source===`server`?i.reject(new z(R.UNAVAILABLE,`Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)`)):i.resolve(n)},error:e=>i.reject(e)}),o=new zp(n,a,{includeMetadataChanges:!0,$a:!0});return Mp(e,o)}(await Om(e),e.asyncQueue,t,n,r))),r.promise}function Mm(e,t){let n=new Lo;return e.asyncQueue.enqueueAndForget((async()=>$p(await Dm(e),t,n))),n.promise}function Nm(e){let t={};return e.timeoutSeconds!==void 0&&(t.timeoutSeconds=e.timeoutSeconds),t}var Pm=`ComponentProvider`,Fm=new Map;function Im(e,t,n,r,i){return new ic(e,t,n,i.host,i.ssl,i.experimentalForceLongPolling,i.experimentalAutoDetectLongPolling,Nm(i.experimentalLongPollingOptions),i.useFetchStreams,i.isUsingEmulator,r)}var Lm=`firestore.googleapis.com`,Rm=!0,zm=class{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new z(R.INVALID_ARGUMENT,`Can't provide ssl option if host option is not set`);this.host=Lm,this.ssl=Rm}else this.host=e.host,this.ssl=e.ssl??Rm;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=Ad;
26else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<Pd)throw new z(R.INVALID_ARGUMENT,`cacheSizeBytes must be at least 1048576`);this.cacheSizeBytes=e.cacheSizeBytes}as(`experimentalForceLongPolling`,e.experimentalForceLongPolling,`experimentalAutoDetectLongPolling`,e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=Nm(e.experimentalLongPollingOptions??{}),function(e){if(e.timeoutSeconds!==void 0){if(isNaN(e.timeoutSeconds))throw new z(R.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new z(R.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new z(R.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(e,t){return e.timeoutSeconds===t.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}},Bm=class{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type=`firestore-lite`,this._persistenceKey=`(lite)`,this._settings=new zm({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask=`notTerminated`}get app(){if(!this._app)throw new z(R.FAILED_PRECONDITION,`Firestore was not initialized using the Firebase SDK. 'app' is not available`);return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==`notTerminated`}_setSettings(e){if(this._settingsFrozen)throw new z(R.FAILED_PRECONDITION,`Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.`);this._settings=new zm(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=function(e){if(!e)return new zo;switch(e.type){case`firstParty`:return new Uo(e.sessionIndex||`0`,e.iamToken||null,e.authTokenFactory||null);case`provider`:return e.client;default:throw new z(R.INVALID_ARGUMENT,`makeAuthCredentialsProvider failed due to invalid credential type`)}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask===`notTerminated`&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask===`notTerminated`?await this._terminate():this._terminateTask=`notTerminated`}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=Fm.get(e);t&&(P(Pm,`Removing Datastore`),Fm.delete(e),t.terminate())}(this),Promise.resolve()}};function Vm(e,t,n,r={}){e=us(e,Bm);let i=Si(t),a=e._getSettings(),o={...a,emulatorOptions:e._getEmulatorOptions()},s=`${t}:${n}`;i&&Ci(`https://${s}`),a.host!==Lm&&a.host!==s&&Po(`Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.`);let c={...a,host:s,ssl:i,emulatorOptions:r};if(!fi(c,o)&&(e._setSettings(c),r.mockUserToken)){let t,n;if(typeof r.mockUserToken==`string`)t=r.mockUserToken,n=Oo.MOCK_USER;else{t=Yr(r.mockUserToken,e._app?.options.projectId);let i=r.mockUserToken.sub||r.mockUserToken.user_id;if(!i)throw new z(R.INVALID_ARGUMENT,`mockUserToken must contain 'sub' or 'user_id' field!`);n=new Oo(i)}e._authCredentials=new Bo(new Ro(t,n))}}var Hm=class e{constructor(e,t,n){this.converter=t,this._query=n,this.type=`query`,this.firestore=e}withConverter(t){return new e(this.firestore,t,this._query)}},Um=class e{constructor(e,t,n){this.converter=t,this._key=n,this.type=`document`,this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}
26get path(){return this._key.path.canonicalString()}get parent(){return new Wm(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new e(this.firestore,t,this._key)}toJSON(){return{type:e._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(t,n,r){if(fs(n,e._jsonSchema))return new e(t,r||null,new V(ts.fromString(n.referencePath)))}};Um._jsonSchemaVersion=`firestore/documentReference/1.0`,Um._jsonSchema={type:ds(`string`,Um._jsonSchemaVersion),referencePath:ds(`string`)};var Wm=class e extends Hm{constructor(e,t,n){super(e,t,ul(n)),this._path=n,this.type=`collection`}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new Um(this.firestore,null,new V(e))}withConverter(t){return new e(this.firestore,t,this._path)}};function Gm(e,t,...n){if(e=xi(e),is(`collection`,`path`,t),e instanceof Bm){let r=ts.fromString(t,...n);return ss(r),new Wm(e,null,r)}{if(!(e instanceof Um||e instanceof Wm))throw new z(R.INVALID_ARGUMENT,`Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore`);let r=e._path.child(ts.fromString(t,...n));return ss(r),new Wm(e.firestore,null,r)}}function Km(e,t,...n){if(e=xi(e),arguments.length===1&&(t=qo.newId()),is(`doc`,`path`,t),e instanceof Bm){let r=ts.fromString(t,...n);return os(r),new Um(e,null,new V(r))}{if(!(e instanceof Um||e instanceof Wm))throw new z(R.INVALID_ARGUMENT,`Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore`);let r=e._path.child(ts.fromString(t,...n));return os(r),new Um(e.firestore,e instanceof Wm?e.converter:null,new V(r))}}var qm=`AsyncQueue`,Jm=class{constructor(e=Promise.resolve()){this.nc=[],this.rc=!1,this.sc=[],this.oc=null,this._c=!1,this.ac=!1,this.uc=[],this.F_=new Lf(this,`async_queue_retry`),this.cc=()=>{let e=Ff();e&&P(qm,`Visibility state changed to `+e.visibilityState),this.F_.y_()},this.lc=e;let t=Ff();t&&typeof t.addEventListener==`function`&&t.addEventListener(`visibilitychange`,this.cc)}get isShuttingDown(){return this.rc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.hc(),this.Pc(e)}enterRestrictedMode(e){if(!this.rc){this.rc=!0,this.ac=e||!1;let t=Ff();t&&typeof t.removeEventListener==`function`&&t.removeEventListener(`visibilitychange`,this.cc)}}enqueue(e){if(this.hc(),this.rc)return new Promise((()=>{}));let t=new Lo;return this.Pc((()=>this.rc&&this.ac?Promise.resolve():(e().then(t.resolve,t.reject),t.promise))).then((()=>t.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.nc.push(e),this.Tc())))}async Tc(){if(this.nc.length!==0){try{await this.nc[0](),this.nc.shift(),this.F_.reset()}catch(e){if(!Es(e))throw e;P(qm,`Operation failed with retryable error: `+e)}this.nc.length>0&&this.F_.g_((()=>this.Tc()))}}Pc(e){let t=this.lc.then((()=>(this._c=!0,e().catch((e=>{throw this.oc=e,this._c=!1,No(`INTERNAL UNHANDLED ERROR: `,Ym(e)),e})).then((e=>(this._c=!1,e))))));return this.lc=t,t}enqueueAfterDelay(e,t,n){this.hc(),this.uc.indexOf(e)>-1&&(t=0);let r=wp.createAndSchedule(this,e,t,n,(e=>this.Ic(e)));return this.sc.push(r),r}hc(){this.oc&&F(47125,{Ec:Ym(this.oc)})}verifyOperationInProgress(){}async Rc(){let e;do e=this.lc,await e;while(e!==this.lc)}Ac(e){for(let t of this.sc)if(t.timerId===e)return!0;return!1}Vc(e){return this.Rc().then((()=>{this.sc.sort(((e,t)=>e.targetTimeMs-t.targetTimeMs));for(let t of this.sc)if(t.skipDelay(),e!==`all`&&t.timerId===e)break;return this.Rc()}))}dc(e){this.uc.push(e)}Ic(e){let t=this.sc.indexOf(e);this.sc.splice(t,1)}};function Ym(e){let t=e.message||``;return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+`
27`+e.stack),t}var Xm=class extends Bm{constructor(e,t,n,r){super(e,t,n,r),this.type=`firestore`,this._queue=new Jm,this._persistenceKey=r?.name||`[DEFAULT]`}async _terminate(){if(this._firestoreClient){let e=this._firestoreClient.terminate();this._queue=new Jm(e),this._firestoreClient=void 0,await e}}};function Zm(e,t){let n=typeof e==`object`?e:Ya(),r=typeof e==`string`?e:t||ac,i=Ua(n,`firestore`).getImmediate({identifier:r});if(!i._initialized){let e=Gr(`firestore`);e&&Vm(i,...e)}return i}function Qm(e){if(e._terminated)throw new z(R.FAILED_PRECONDITION,`The client has already been terminated.`);return e._firestoreClient||$m(e),e._firestoreClient}function $m(e){let t=e._freezeSettings(),n=Im(e._databaseId,e._app?.options.appId||``,e._persistenceKey,e._app?.options.apiKey,t);e._componentsProvider||t.localCache?._offlineComponentProvider&&t.localCache?._onlineComponentProvider&&(e._componentsProvider={_offline:t.localCache._offlineComponentProvider,_online:t.localCache._onlineComponentProvider}),e._firestoreClient=new Sm(e._authCredentials,e._appCheckCredentials,e._queue,n,e._componentsProvider&&function(e){let t=e?._online.build();return{_offline:e?._offline.build(t),_online:t}}(e._componentsProvider))}var eh=class e{constructor(e){this._byteString=e}static fromBase64String(t){try{return new e(Ks.fromBase64String(t))}catch(e){throw new z(R.INVALID_ARGUMENT,`Failed to construct data from Base64 string: `+e)}}static fromUint8Array(t){return new e(Ks.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return`Bytes(base64: `+this.toBase64()+`)`}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:e._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(t){if(fs(t,e._jsonSchema))return e.fromBase64String(t.bytes)}};
27eh._jsonSchemaVersion=`firestore/bytes/1.0`,eh._jsonSchema={type:ds(`string`,eh._jsonSchemaVersion),bytes:ds(`string`)};var th=class{constructor(...e){for(let t=0;t<e.length;++t)if(e[t].length===0)throw new z(R.INVALID_ARGUMENT,`Invalid field name at argument $(i + 1). Field names must not be empty.`);this._internalPath=new rs(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}},nh=class{constructor(e){this._methodName=e}},rh=class e{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new z(R.INVALID_ARGUMENT,`Latitude must be a number between -90 and 90, but was: `+e);if(!isFinite(t)||t<-180||t>180)throw new z(R.INVALID_ARGUMENT,`Longitude must be a number between -180 and 180, but was: `+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return B(this._lat,e._lat)||B(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:e._jsonSchemaVersion}}static fromJSON(t){if(fs(t,e._jsonSchema))return new e(t.latitude,t.longitude)}};rh._jsonSchemaVersion=`firestore/geoPoint/1.0`,rh._jsonSchema={type:ds(`string`,rh._jsonSchemaVersion),latitude:ds(`number`),longitude:ds(`number`)};var ih=class e{constructor(e){this._values=(e||[]).map((e=>e))}toArray(){return this._values.map((e=>e))}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}(this._values,e._values)}toJSON(){return{type:e._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(t){if(fs(t,e._jsonSchema)){if(Array.isArray(t.vectorValues)&&t.vectorValues.every((e=>typeof e==`number`)))return new e(t.vectorValues);throw new z(R.INVALID_ARGUMENT,`Expected 'vectorValues' field to be a number array`)}}};ih._jsonSchemaVersion=`firestore/vectorValue/1.0`,ih._jsonSchema={type:ds(`string`,ih._jsonSchemaVersion),vectorValues:ds(`object`)};var ah=/^__.*__$/,oh=class{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return this.fieldMask===null?new fu(e,this.data,t,this.fieldTransforms):new pu(e,this.data,this.fieldMask,t,this.fieldTransforms)}},sh=class{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return new pu(e,this.data,this.fieldMask,t,this.fieldTransforms)}};function ch(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw F(40011,{dataSource:e})}}var lh=class e{constructor(e,t,n,r,i,a){this.settings=e,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,i===void 0&&this.mc(),this.fieldTransforms=i||[],this.fieldMask=a||[]}get path(){return this.settings.path}get dataSource(){return this.settings.dataSource}i(t){return new e({...this.settings,...t},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}gc(e){let t=this.path?.child(e),n=this.i({path:t,arrayElement:!1});return n.yc(e),n}wc(e){let t=this.path?.child(e),n=this.i({path:t,arrayElement:!1});return n.mc(),n}Sc(e){return this.i({path:void 0,arrayElement:!0})}bc(e){return wh(e,this.settings.methodName,this.settings.hasConverter||!1,this.path,this.settings.targetDoc)}contains(e){return this.fieldMask.find((t=>e.isPrefixOf(t)))!==void 0||this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))!==void 0}mc(){if(this.path)for(let e=0;e<this.path.length;e++)this.yc(this.path.get(e))}yc(e){if(e.length===0)throw this.bc(`Document fields must not be empty`);if(ch(this.dataSource)&&ah.test(e))throw this.bc(`Document fields cannot begin and end with "__"`)}},uh=class{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=n||If(e)}V(e,t,n,r=!1){return new lh({dataSource:e,methodName:t,targetDoc:n,path:rs.emptyPath(),arrayElement:!1,hasConverter:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}};function dh(e){let t=e._freezeSettings(),n=If(e._databaseId);return new uh(e._databaseId,!!t.ignoreUndefinedProperties,n)}function fh(e,t,n,r,i,a={}){let o=e.V(a.merge||a.mergeFields?2:0,t,n,i);bh(`Data must be an object, but it was:`,o,r);let s=vh(r,o),c,l;if(a.merge)c=new Ws(o.fieldMask),l=o.fieldTransforms;else if(a.mergeFields){let e=[];for(let r of a.mergeFields){let i=xh(t,r,n);if(!o.contains(i))throw new z(R.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);Th(e,i)||e.push(i)}c=new Ws(e),l=o.fieldTransforms.filter((e=>c.covers(e.field)))}else c=null,l=o.fieldTransforms;return new oh(new Mc(s),c,l)}var ph=class e extends nh{_toFieldTransform(e){if(e.dataSource!==2)throw e.dataSource===1?e.bc(`${this._methodName}() can only appear at the top level of your update data`):e.bc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(t){return t instanceof e}};function mh(e,t,n,r){let i=e.V(1,t,n);bh(`Data must be an object, but it was:`,i,r);let a=[],o=Mc.empty();return Ls(r,((e,r)=>{let s=Ch(t,e,n);r=xi(r);let c=i.wc(s);if(r instanceof ph)a.push(s);else{let e=_h(r,c);e!=null&&(a.push(s),o.set(s,e))}})),new sh(o,new Ws(a),i.fieldTransforms)}function hh(e,t,n,r,i,a){let o=e.V(1,t,n),s=[xh(t,r,n)],c=[i];if(a.length%2!=0)throw new z(R.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let e=0;e<a.length;e+=2)s.push(xh(t,a[e])),c.push(a[e+1]);let l=[],u=Mc.empty();for(let e=s.length-1;e>=0;--e)if(!Th(l,s[e])){let t=s[e],n=c[e];n=xi(n);let r=o.wc(t);if(n instanceof ph)l.push(t);else{let e=_h(n,r);e!=null&&(l.push(t),u.set(t,e))}}return new sh(u,new Ws(l),o.fieldTransforms)}function gh(e,t,n,r=!1){return _h(n,e.V(r?4:3,t))}function _h(e,t){if(yh(e=xi(e)))return bh(`Unsupported field value:`,t,e),vh(e,t);if(e instanceof nh)return function(e,t){if(!ch(t.dataSource))throw t.bc(`${e._methodName}
27() can only be used with update() and set()`);if(!t.path)throw t.bc(`${e._methodName}() is not currently supported inside arrays`);let n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(e===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.arrayElement&&t.dataSource!==4)throw t.bc(`Nested arrays are not supported`);return function(e,t){let n=[],r=0;for(let i of e){let e=_h(i,t.Sc(r));e??={nullValue:`NULL_VALUE`},n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if((e=xi(e))===null)return{nullValue:`NULL_VALUE`};if(typeof e==`number`)return K(t.serializer,e);if(typeof e==`boolean`)return{booleanValue:e};if(typeof e==`string`)return{stringValue:e};if(e instanceof Date){let n=hs.fromDate(e);return{timestampValue:qu(t.serializer,n)}}if(e instanceof hs){let n=new hs(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:qu(t.serializer,n)}}if(e instanceof rh)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof eh)return{bytesValue:Ju(t.serializer,e._byteString)};if(e instanceof Um){let n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.bc(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:Zu(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof ih)return function(e,t){let n=e instanceof ih?e.toArray():e;return{mapValue:{fields:{[cc]:{stringValue:dc},[fc]:{arrayValue:{values:n.map((e=>{if(typeof e!=`number`)throw t.bc(`VectorValues must only contain numeric values.`);return G(t.serializer,e)}))}}}}}}(e,t);if(Sd(e))return e._toProto(t.serializer);throw t.bc(`Unsupported field value: ${ls(e)}`)}(e,t)}function vh(e,t){let n={};return Rs(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Ls(e,((e,r)=>{let i=_h(r,t.gc(e));i!=null&&(n[e]=i)})),{mapValue:{fields:n}}}function yh(e){return!(typeof e!=`object`||!e||e instanceof Array||e instanceof Date||e instanceof hs||e instanceof rh||e instanceof eh||e instanceof Um||e instanceof nh||e instanceof ih||Sd(e))}function bh(e,t,n){if(!yh(n)||!cs(n)){let r=ls(n);throw r===`an object`?t.bc(e+` a custom object`):t.bc(e+` `+r)}}function xh(e,t,n){if((t=xi(t))instanceof th)return t._internalPath;if(typeof t==`string`)return Ch(e,t);throw wh(`Field path arguments must be of type string or `,e,!1,void 0,n)}var Sh=RegExp(`[~\\*/\\[\\]]`);function Ch(e,t,n){if(t.search(Sh)>=0)throw wh(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new th(...t.split(`.`))._internalPath}catch{throw wh(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function wh(e,t,n,r,i){let a=r&&!r.isEmpty(),o=i!==void 0,s=`Function ${t}() called with invalid data`;n&&(s+=" (via `toFirestore()`)"),s+=`. `;let c=``;return(a||o)&&(c+=` (found`,a&&(c+=` in field ${r}`),o&&(c+=` in document ${i}`),c+=`)`),new z(R.INVALID_ARGUMENT,s+e+c)}function Th(e,t){return e.some((e=>e.isEqual(t)))}var Eh=class{convertValue(e,t=`none`){switch(pc(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Ys(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(Xs(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw F(62114,{value:e})}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t=`none`){let n={};return Ls(e,((e,r)=>{n[e]=this.convertValue(r,t)})),n}convertVectorValue(e){let t=e.fields?.[fc].arrayValue?.values?.map((e=>
27Ys(e.doubleValue)));return new ih(t)}convertGeoPoint(e){return new rh(Ys(e.latitude),Ys(e.longitude))}convertArray(e,t){return(e.values||[]).map((e=>this.convertValue(e,t)))}convertServerTimestamp(e,t){switch(t){case`previous`:let n=nc(e);return n==null?null:this.convertValue(n,t);case`estimate`:return this.convertTimestamp(rc(e));default:return null}}convertTimestamp(e){let t=Js(e);return new hs(t.seconds,t.nanos)}convertDocumentKey(e,t){let n=ts.fromString(e);I(X(n),9688,{name:e});let r=new oc(n.get(1),n.get(3)),i=new V(n.popFirst(5));return r.isEqual(t)||No(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}},Dh=class extends Eh{constructor(e){super(),this.firestore=e}convertBytes(e){return new eh(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);return new Um(this.firestore,null,t)}},Oh=`@firebase/firestore`,kh=`4.15.0`;function Ah(e){return function(e,t){if(typeof e!=`object`||!e)return!1;let n=e;for(let e of t)if(e in n&&typeof n[e]==`function`)return!0;return!1}(e,[`next`,`error`,`complete`])}var jh=class{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new Um(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){let e=new Mh(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){return this._document?.data.clone().value.mapValue.fields??void 0}get(e){if(this._document){let t=this._document.data.field(xh(`DocumentSnapshot.get`,e));if(t!==null)return this._userDataWriter.convertValue(t)}}},Mh=class extends jh{data(){return super.data()}};function Nh(e){if(e.limitType===`L`&&e.explicitOrderBy.length===0)throw new z(R.UNIMPLEMENTED,`limitToLast() queries require specifying at least one orderBy() clause`)}var Ph=class{},Fh=class extends Ph{};function Ih(e,t,...n){let r=[];t instanceof Ph&&r.push(t),r=r.concat(n),function(e){let t=e.filter((e=>e instanceof zh)).length,n=e.filter((e=>e instanceof Lh)).length;if(t>1||t>0&&n>0)throw new z(R.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(let t of r)e=t._apply(e);return e}var Lh=class e extends Fh{constructor(e,t,n){super(),this._field=e,this._op=t,this._value=n,this.type=`where`}static _create(t,n,r){return new e(t,n,r)}_apply(e){let t=this._parse(e);return Wh(e._query,t),new Hm(e.firestore,e.converter,_l(e._query,t))}_parse(e){let t=dh(e.firestore);return function(e,t,n,r,i,a,o){let s;if(i.isKeyField()){if(a===`array-contains`||a===`array-contains-any`)throw new z(R.INVALID_ARGUMENT,`Invalid Query. You can't perform '${a}' queries on documentId().`);if(a===`in`||a===`not-in`){Uh(o,a);let t=[];for(let n of o)t.push(Hh(r,e,n));s={arrayValue:{values:t}}}else s=Hh(r,e,o)}else a!==`in`&&a!==`not-in`&&a!==`array-contains-any`||Uh(o,a),s=gh(n,t,o,a===`in`||a===`not-in`);return Vc.create(i,a,s)}(e._query,`where`,t,e.firestore._databaseId,this._field,this._op,this._value)}};function Rh(e,t,n){let r=t,i=xh(`where`,e);return Lh._create(i,r,n)}var zh=class e extends Ph{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(t,n){return new e(t,n)}_parse(e){let t=this._queryConstraints.map((t=>t._parse(e))).filter((e=>e.getFilters().length>0));return t.length===1?t[0]:Hc.create(t,this._getOperator())}_apply(e){let t=this._parse(e);return t.getFilters().length===0?e:(function(e,t){let n=e,r=t.getFlattenedFilters();for(let e of r)Wh(n,e),n=_l(n,e)}(e._query,t),new Hm(e.firestore,e.converter,_l(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type===`and`?`and`:`or`}},Bh=class e extends Fh{constructor(e,t){super(),this._field=e,this._direction=t,this.type=`orderBy`}static _create(t,n){return new e(t,n)}_apply(e){let t=function(e,t,n){if(e.startAt!==null)throw new z(R.INVALID_ARGUMENT,`Invalid query. You must not call startAt() or startAfter() before calling orderBy().`);if(e.endAt!==null)throw new z(R.INVALID_ARGUMENT,`Invalid query. You must not call endAt() or endBefore() before calling orderBy().`);return new Rc(t,n)}(e._query,this._field,this._direction);return new Hm(e.firestore,e.converter,vl(e._query,t))}};function Vh(e,t=`asc`){let n=t,r=xh(`orderBy`,e);return Bh._create(r,n)}function Hh(e,t,n){if(typeof(n=xi(n))==`string`){if(n===``)throw new z(R.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.`);if(!pl(t)&&n.indexOf(`/`)!==-1)throw new z(R.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);let r=t.path.child(ts.fromString(n));if(!V.isDocumentKey(r))throw new z(R.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return Sc(e,new V(r))}if(n instanceof Um)return Sc(e,n._key);throw new z(R.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${ls(n)}.`)}function Uh(e,t){if(!Array.isArray(e)||e.length===0)throw new z(R.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function Wh(e,t){let n=function(e,t){for(let n of e)for(let e of n.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case`!=`:return[`!=`,`not-in`];case`array-contains-any`:case`in`:return[`not-in`];case`not-in`:return[`array-contains-any`,`in`,`not-in`,`!=`];default:return[]}}(t.op));if(n!==null)throw n===t.op?new z(R.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new z(R.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}function Gh(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}var Kh=class{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}},qh=class e extends jh{constructor(e,t,n,r,i,a){super(e,t,n,r,a),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new Jh(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){let n=this._document.data.field(xh(`DocumentSnapshot.get`,e));if(n!==null)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new z(R.FAILED_PRECONDITION,`DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().`);let t=this._document,n={};return n.type=e._jsonSchemaVersion,n.bundle=``,n.bundleSource=`DocumentSnapshot`,n.bundleName=this._key.toString(),!t||!t.isValidDocument()||!t.isFoundDocument()?n:(this._userDataWriter.convertObjectMap(t.data.value.mapValue.fields,`previous`),n.bundle=(this._firestore,this.ref.path,`NOT SUPPORTED`),n)}};qh._jsonSchemaVersion=`firestore/documentSnapshot/1.0`,qh._jsonSchema={type:ds(`string`,qh._jsonSchemaVersion),bundleSource:ds(`string`,`DocumentSnapshot`),bundleName:ds(`string`),bundle:ds(`string`)};var Jh=class extends qh{data(e={}){return super.data(e)}},Yh=class e{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new Kh(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){let e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,t){this._snapshot.docs.forEach((n=>{e.call(t,new Jh(this._firestore,this._userDataWriter,n.key,n,new Kh(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new z(R.INVALID_ARGUMENT,`To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().`);return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map((n=>{let r=new Jh(e._firestore,e._userDataWriter,n.doc.key,n.doc,new Kh(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:`added`,doc:r,oldIndex:-1,newIndex:t++}}))}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((e=>t||e.type!==3)).map((t=>{let r=new Jh(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Kh(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return t.type!==0&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),t.type!==1&&(n=n.add(t.doc),a=n.indexOf(t.doc.key)),{type:Xh(t.type),doc:r,oldIndex:i,newIndex:a}}))}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new z(R.FAILED_PRECONDITION,`QuerySnapsh
27ot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().`);let t={};t.type=e._jsonSchemaVersion,t.bundleSource=`QuerySnapshot`,t.bundleName=qo.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;let n=[],r=[],i=[];return this.docs.forEach((e=>{e._document!==null&&(n.push(e._document),r.push(this._userDataWriter.convertObjectMap(e._document.data.value.mapValue.fields,`previous`)),i.push(e.ref.path))})),t.bundle=(this._firestore,this.query._query,t.bundleName,`NOT SUPPORTED`),t}};function Xh(e){switch(e){case 0:return`added`;case 2:case 3:return`modified`;case 1:return`removed`;default:return F(61501,{type:e})}}Yh._jsonSchemaVersion=`firestore/querySnapshot/1.0`,Yh._jsonSchema={type:ds(`string`,Yh._jsonSchemaVersion),bundleSource:ds(`string`,`QuerySnapshot`),bundleName:ds(`string`),bundle:ds(`string`)};function Zh(e){e=us(e,Um);let t=us(e.firestore,Xm);return Am(Qm(t),e._key).then((n=>ag(t,e,n)))}function Qh(e){e=us(e,Hm);let t=us(e.firestore,Xm),n=Qm(t),r=new Dh(t);return Nh(e._query),jm(n,e._query).then((n=>new Yh(t,r,e,n)))}function $h(e,t,n){e=us(e,Um);let r=us(e.firestore,Xm),i=Gh(e.converter,t,n);return ig(r,[fh(dh(r),`setDoc`,e._key,i,e.converter!==null,n).toMutation(e._key,iu.none())])}function eg(e,t,n,...r){e=us(e,Um);let i=us(e.firestore,Xm),a=dh(i),o;return o=typeof(t=xi(t))==`string`||t instanceof th?hh(a,`updateDoc`,e._key,t,n,r):mh(a,`updateDoc`,e._key,t),ig(i,[o.toMutation(e._key,iu.exists(!0))])}function tg(e){return ig(us(e.firestore,Xm),[new _u(e._key,iu.none())])}function ng(e,t){let n=us(e.firestore,Xm),r=Km(e),i=Gh(e.converter,t);return ig(n,[fh(dh(e.firestore),`addDoc`,r._key,i,e.converter!==null,{}).toMutation(r._key,iu.exists(!1))]).then((()=>r))}function rg(e,...t){e=xi(e);let n={includeMetadataChanges:!1,source:`default`},r=0;typeof t[r]!=`object`||Ah(t[r])||(n=t[r++]);let i={includeMetadataChanges:n.includeMetadataChanges,source:n.source};if(Ah(t[r])){let e=t[r];t[r]=e.next?.bind(e),t[r+1]=e.error?.bind(e),t[r+2]=e.complete?.bind(e)}let a,o,s;if(e instanceof Um)o=us(e.firestore,Xm),s=ul(e._key.path),a={next:n=>{t[r]&&t[r](ag(o,e,n))},error:t[r+1],complete:t[r+2]};else{let n=us(e,Hm);o=us(n.firestore,Xm),s=n._query;let i=new Dh(o);a={next:e=>{t[r]&&t[r](new Yh(o,i,n,e))},error:t[r+1],complete:t[r+2]},Nh(e._query)}return km(Qm(o),s,i,a)}function ig(e,t){return Mm(Qm(e),t)}function ag(e,t,n){let r=n.docs.get(t._key);return new qh(e,new Dh(e),t._key,r,new Kh(n.hasPendingWrites,n.fromCache),t.converter)}(function(e,t=!0){Ao(qa),Ha(new wi(`firestore`,((e,{instanceIdentifier:n,options:r})=>{let i=e.getProvider(`app`).getImmediate(),a=new Xm(new Vo(e.getProvider(`auth-internal`)),new Go(i,e.getProvider(`app-check-internal`)),sc(i,n),i);return r={useFetchStreams:t,...r},a._setSettings(r),a}),`PUBLIC`).setMultipleInstances(!0)),Za(Oh,kh,e),Za(Oh,kh,`esm2020`)})(),Za(`firebase`,`12.14.0`,`app`);function og(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var sg=og,cg=new ci(`auth`,`Firebase`,og()),lg=new Fi(`@firebase/auth`);function ug(e,...t){lg.logLevel<=A.WARN&&lg.warn(`Auth (${qa}): ${e}`,...t)}function dg(e,...t){lg.logLevel<=A.ERROR&&lg.error(`Auth (${qa}): ${e}`,...t)}function fg(e,...t){throw gg(e,...t)}function pg(e,...t){return gg(e,...t)}function mg(e,t,n){return new ci(`auth`,`Firebase`,{...sg(),[t]:n}).create(t,{appName:e.name})}function hg(e){return mg(e,`operation-not-supported-in-this-environment`,`Operations that alter the current user are not supported in conjunction with FirebaseServerApp`)}function gg(e,...t){if(typeof e!=`string`){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return cg.create(e,...t)}function Z(e,t,...n){if(!e)throw gg(t,...n)}function _g(e){let t=`INTERNAL ASSERTION FAILED: `+e;throw dg(t),Error(t)}function vg(e,t){e||_g(t)}function yg(){return typeof self<`u`&&self.location?.href||``}function bg(){return xg()===`http:`||xg()===`https:`}function xg(){return typeof self<`u`&&self.location?.protocol||null}function Sg(){return typeof navigator<`u`&&navigator&&`onLine`in navigator&&typeof navigator.onLine==`boolean`&&(bg()||ei()||`connection`in navigator)?navigator.onLine:!0}function Cg(){if(typeof navigator>`u`)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}var wg=class{constructor(e,t){this.shortDelay=e,this.longDelay=t,vg(t>
vendor: 3,609 bytes, line 27
27e,`Short delay should be less than long delay!`),this.isMobile=Zr()||ti()}get(){return Sg()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Tg(e,t){vg(e.emulator,`Emulator should always be set here`);let{url:n}=e.emulator;return t?`${n}${t.startsWith(`/`)?t.slice(1):t}`:n}var Eg=class{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<`u`&&`fetch`in self)return self.fetch;if(typeof globalThis<`u`&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<`u`)return fetch;_g(`Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill`)}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<`u`&&`Headers`in self)return self.Headers;if(typeof globalThis<`u`&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<`u`)return Headers;_g(`Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill`)}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<`u`&&`Response`in self)return self.Response;if(typeof globalThis<`u`&&globalThis.Response)return globalThis.Response;if(typeof Response<`u`)return Response;_g(`Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill`)}},Dg={CREDENTIAL_MISMATCH:`custom-token-mismatch`,MISSING_CUSTOM_TOKEN:`internal-error`,INVALID_IDENTIFIER:`invalid-email`,MISSING_CONTINUE_URI:`internal-error`,INVALID_PASSWORD:`wrong-password`,MISSING_PASSWORD:`missing-password`,INVALID_LOGIN_CREDENTIALS:`invalid-credential`,EMAIL_EXISTS:`email-already-in-use`,PASSWORD_LOGIN_DISABLED:`operation-not-allowed`,INVALID_IDP_RESPONSE:`invalid-credential`,INVALID_PENDING_TOKEN:`invalid-credential`,FEDERATED_USER_ID_ALREADY_LINKED:`credential-already-in-use`,MISSING_REQ_TYPE:`internal-error`,EMAIL_NOT_FOUND:`user-not-found`,RESET_PASSWORD_EXCEED_LIMIT:`too-many-requests`,EXPIRED_OOB_CODE:`expired-action-code`,INVALID_OOB_CODE:`invalid-action-code`,MISSING_OOB_CODE:`internal-error`,CREDENTIAL_TOO_OLD_LOGIN_AGAIN:`requires-recent-login`,INVALID_ID_TOKEN:`invalid-user-token`,TOKEN_EXPIRED:`user-token-expired`,USER_NOT_FOUND:`user-token-expired`,TOO_MANY_ATTEMPTS_TRY_LATER:`too-many-requests`,PASSWORD_DOES_NOT_MEET_REQUIREMENTS:`password-does-not-meet-requirements`,INVALID_CODE:`invalid-verification-code`,INVALID_SESSION_INFO:`invalid-verification-id`,INVALID_TEMPORARY_PROOF:`invalid-credential`,MISSING_SESSION_INFO:`missing-verification-id`,SESSION_EXPIRED:`code-expired`,MISSING_ANDROID_PACKAGE_NAME:`missing-android-pkg-name`,UNAUTHORIZED_DOMAIN:`unauthorized-continue-uri`,INVALID_OAUTH_CLIENT_ID:`invalid-oauth-client-id`,ADMIN_ONLY_OPERATION:`admin-restricted-operation`,INVALID_MFA_PENDING_CREDENTIAL:`invalid-multi-factor-session`,MFA_ENROLLMENT_NOT_FOUND:`multi-factor-info-not-found`,MISSING_MFA_ENROLLMENT_ID:`missing-multi-factor-info`,MISSING_MFA_PENDING_CREDENTIAL:`missing-multi-factor-session`,SECOND_FACTOR_EXISTS:`second-factor-already-in-use`,SECOND_FACTOR_LIMIT_EXCEEDED:`maximum-second-factor-count-exceeded`,BLOCKING_FUNCTION_ERROR_RESPONSE:`internal-error`,RECAPTCHA_NOT_ENABLED:`recaptcha-not-enabled`,MISSING_RECAPTCHA_TOKEN:`missing-recaptcha-token`,INVALID_RECAPTCHA_TOKEN:`invalid-recaptcha-token`,INVALID_RECAPTCHA_ACTION:`invalid-recaptcha-action`,MISSING_CLIENT_TYPE:`missing-client-type`,MISSING_RECAPTCHA_VERSION:`missing-recaptcha-version`,INVALID_RECAPTCHA_VERSION:`invali
27d-recaptcha-version`,INVALID_REQ_TYPE:`invalid-req-type`},Og=[`/v1/accounts:signInWithCustomToken`,`/v1/accounts:signInWithEmailLink`,`/v1/accounts:signInWithIdp`,`/v1/accounts:signInWithPassword`,`/v1/accounts:signInWithPhoneNumber`,`/v1/token`],kg=new wg(3e4,6e4);function Ag(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function jg(e,t,n,r,i={}){return Mg(e,i,async()=>{let i={},a={};r&&(t===`GET`?a=r:i={body:JSON.stringify(r)});let o=mi({key:e.config.apiKey,...a}).slice(1),s=await e._getAdditionalHeaders();s[`Content-Type`]=`application/json`,e.languageCode&&(s[`X-Firebase-Locale`]=e.languageCode);let c={method:t,headers:s,...i};return $r()||(c.referrerPolicy=`no-referrer`),e.emulatorConfig&&Si(e.emulatorConfig.host)&&(c.credentials=`include`),Eg.fetch()(await Pg(e,e.config.apiHost,n,o),c)})}async function Mg(e,t,n){e._canInitEmulator=!1;let r={...Dg,...t};try{let t=new Ig(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let a=await i.json();if(`needConfirmation`in a)throw Lg(e,`account-exists-with-different-credential`,a);if(i.ok&&!(`errorMessage`in a))return a;{let[t,n]=(i.ok?a.errorMessage:a.error.message).split(` : `);if(t===`FEDERATED_USER_ID_ALREADY_LINKED`)throw Lg(e,`credential-already-in-use`,a);if(t===`EMAIL_EXISTS`)throw Lg(e,`email-already-in-use`,a);if(t===`USER_DISABLED`)throw Lg(e,`user-disabled`,a);let o=r[t]||t.toLowerCase().replace(/[_\s]+/g,`-`);if(n)throw mg(e,o,n);fg(e,o)}}catch(t){if(t instanceof si)throw t;fg(e,`network-request-failed`,{message:String(t)})}}async function Ng(e,t,n,r,i={}){let a=await jg(e,t,n,r,i);return`mfaPendingCredential`in a&&fg(e,`multi-factor-auth-required`,{_serverResponse:a}),a}async function Pg(e,t,n,r){let i=`${t}${n}?${r}`,a=e,o=a.config.emulator?Tg(e.config,i):`${e.config.apiScheme}://${i}`;return Og.includes(n)&&(await a._persistenceManagerAvailable,a._getPersistenceType()===`COOKIE`)?a._getPersistence()._getFinalTarget(o).toString():o}function Fg(e){switch(e){case`ENFORCE`:return`ENFORCE`;case`AUDIT`:return`AUDIT`;case`OFF`:return`OFF`;default:return`ENFORCEMENT_STATE_UNSPECIFIED`}}var Ig=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(pg(this.auth,`network-request-failed`)),kg.get())})}};function Lg(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=pg(e,t,r);return i.customData._tokenResponse=n,i}function Rg(e){return e!==void 0&&e.enterprise!==void 0}var zg=class{constructor(e){if(this.siteKey=``,this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw Error(`recaptchaKey undefined`);this.siteKey=e.recaptchaKey.split(`/`)[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return Fg(t.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)===`ENFORCE`||this.getProviderEnforcementState(e)===`AUDIT`}isAnyProviderEnabled(){return this.isProviderEnabled(`EMAIL_PASSWORD_PROVIDER`)||this.isProviderEnabled(`PHONE_PROVIDER`)}};async function Bg(e,t){return jg(e,`GET`,`/v2/recaptchaConfig`,Ag(e,t))}async function Vg(e,t){return jg(e,`POST`,`/v1/accounts:delete`,t)}async function Hg(e,t){return jg(e,`POST`,`/v1/accounts:lookup`,t)}function Ug(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function Wg(e,t=!1){let n=xi(e),r=await n.getIdToken(t),i=Kg(r);Z(i&&i.exp&&i.auth_time&&i.iat,n.auth,`internal-error`);let a=typeof i.firebase==`object`?i.firebase:void 0,o=a?.sign_in_provider;return{claims:i,token:r,authTime:Ug(Gg(i.auth_time)),issuedAtTime:Ug(Gg(i.iat)),expirationTime:Ug(Gg(i.exp)),signInProvider:o||null,signInSecondFactor:a?.sign_in_second_factor||null}}function Gg(e){return Number(e)*1e3}function Kg(e){let[t,n,r]=e.split(`.`);if(t===void 0||n===void 0||r===void 0)return dg(`JWT malformed, contained fewer than 3 sections`),null;try{let e=Rr(n);return e?JSON.parse(e):(dg(`Failed to decode base64 JWT payload`),null)}catch(e){return dg(`Caught error parsing JWT payload as JSON`,e?.toString()),null}}function qg(e){let t=Kg(e);return Z(t,`internal-error`),Z(t.exp!==void 0,`internal-error`),Z(t.iat!==void 0,`internal-error`),Number(t.exp)-Number(t.iat)}async function Jg(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof si&&Yg(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}function Yg({code:e}){return e===`auth/user-disabled`||e===`auth/user-token-expired`}var Xg=class{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){let e=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),e}else{this.errorBackoff=3e4;let e=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code===`auth/network-request-failed`&&this.schedule(!0);return}this.schedule()}},Zg=class{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Ug(this.lastLoginAt),this.creationTime=Ug(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};async function Qg(e){let t=e.auth,n=await Jg(e,Hg(t,{idToken:await e.getIdToken()}));Z(n?.users.length,t,`internal-error`);let r=n.users[0];e._notifyReloadListener(r);let i=r.providerUserInfo?.length?t_(r.providerUserInfo):[],a=e_(e.providerData,i),o=e.isAnonymous,s=!(e.email&&r.passwordHash)&&!a?.length,c=o?s:!1,l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:a,metadata:new Zg(r.createdAt,r.lastLoginAt),isAnonymous:c};Object.assign(e,l)}async function $g(e){let t=xi(e);await Qg(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function e_(e,t){return[...e.filter(e=>!t.some(t=>t.providerId===e.providerId)),...t]}function t_(e){return e.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||``,displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function n_(e,t){let n=await Mg(e,{},async()=>{let n=mi({grant_type:`refresh_token`,refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,a=await Pg(e,r,`/v1/token`,`key=${i}`),o=await e._getAdditionalHeaders();o[`Content-Type`]=`application/x-www-form-urlencoded`;let s={method:`POST`,headers:o,body:n};return e.emulatorConfig&&Si(e.emulatorConfig.host)&&(s.credentials=`include`),Eg.fetch()(a,s)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function r_(e,t){return jg(e,`POST`,`/v2/accounts:revokeToken`,Ag(e,t))}var i_=class e{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Z(e.idToken,`internal-error`),Z(e.idToken!==void 0,`internal-error`),Z(e.refreshToken!==void 0,`internal-error`);
27let t=`expiresIn`in e&&e.expiresIn!==void 0?Number(e.expiresIn):qg(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){Z(e.length!==0,`internal-error`);let t=qg(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return!t&&this.accessToken&&!this.isExpired?this.accessToken:(Z(this.refreshToken,e,`user-token-expired`),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await n_(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,n){let{refreshToken:r,accessToken:i,expirationTime:a}=n,o=new e;return r&&(Z(typeof r==`string`,`internal-error`,{appName:t}),o.refreshToken=r),i&&(Z(typeof i==`string`,`internal-error`,{appName:t}),o.accessToken=i),a&&(Z(typeof a==`number`,`internal-error`,{appName:t}),o.expirationTime=a),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new e,this.toJSON())}_performRefresh(){return _g(`not implemented`)}};function a_(e,t){Z(typeof e==`string`||e===void 0,`internal-error`,{appName:t})}var o_=class e{constructor({uid:e,auth:t,stsTokenManager:n,...r}){this.providerId=`firebase`,this.proactiveRefresh=new Xg(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=r.displayName||null,this.email=r.email||null,this.emailVerified=r.emailVerified||!1,this.phoneNumber=r.phoneNumber||null,this.photoURL=r.photoURL||null,this.isAnonymous=r.isAnonymous||!1,this.tenantId=r.tenantId||null,this.providerData=r.providerData?[...r.providerData]:[],this.metadata=new Zg(r.createdAt||void 0,r.lastLoginAt||void 0)}async getIdToken(e){let t=await Jg(this,this.stsTokenManager.getToken(this.auth,e));return Z(t,this.auth,`internal-error`),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return Wg(this,e)}reload(){return $g(this)}_assign(e){this!==e&&(Z(this.uid===e.uid,this.auth,`internal-error`),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(t){let n=new e({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){Z(!this.reloadListener,this.auth,`internal-error`),this.reloadListener=e,this.reloadUserInfo&&=(this._notifyReloadListener(this.reloadUserInfo),null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Qg(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Wa(this.auth.app))return Promise.reject(hg(this.auth));let e=await this.getIdToken();return await Jg(this,Vg(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||``}static _fromJSON(t,n){let r=n.displayName??void 0,i=n.email??void 0,a=n.phoneNumber??void 0,o=n.photoURL??void 0,s=n.tenantId??void 0,c=n._redirectEventId??void 0,l=n.createdAt??void 0,u=n.lastLoginAt??void 0,{uid:d,emailVerified:f,isAnonymous:p,providerData:m,stsTokenManager:h}=n;Z(d&&h,t,`internal-error`);let g=i_.fromJSON(this.name,h);Z(typeof d==`string`,t,`internal-error`),a_(r,t.name),a_(i,t.name),Z(typeof f==`boolean`,t,`internal-error`),Z(typeof p==`boolean`,t,`internal-error`),a_(a,t.name),a_(o,t.name),a_(s,t.name),a_(c,t.name),a_(l,t.name),a_(u,t.name);let _=new e({uid:d,auth:t,email:i,emailVerified:f,displayName:r,isAnonymous:p,photoURL:o,phoneNumber:a,tenantId:s,stsTokenManager:g,createdAt:l,lastLoginAt:u});return m&&Array.isArray(m)&&(_.providerData=m.map(e=>({...e}))),c&&(_._redirectEventId=c),_}static async _fromIdTokenResponse(t,n,r=!1){let i=new i_;i.updateFromServerResponse(n);let a=new e({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return await Qg(a),a}static async _fromGetAccountInfoResponse(t,n,r){let i=n.users[0];Z(i.localId!==void 0,`internal-error`);let a=i.providerUserInfo===void 0?[]:t_(i.providerUserInfo),o=!(i.email&&i.passwordHash)&&!a?.length,s=new i_;s.updateFromIdToken(r);let c=new e({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:o}),l={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new Zg(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!a?.length};return Object.assign(c,l),c}},s_=new Map;function c_(e){vg(e instanceof Function,`Expected a class definition`);let t=s_.get(e);return t?(vg(t instanceof e,`Instance stored in cache mismatched with class`),t):(t=new e,s_.set(e,t),t)}var l_=class{constructor(){this.type=`NONE`,this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return t===void 0?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}};l_.type=`NONE`;var u_=l_;function d_(e,t,n){return`firebase:${e}:${t}:${n}`}var f_=class e{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=d_(this.userKey,r.apiKey,i),this.fullPersistenceKey=d_(`persistence`,r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e==`string`){let t=await Hg(this.auth,{idToken:e}).catch(()=>void 0);return t?o_._fromGetAccountInfoResponse(this.auth,t,e):null}return o_._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r=`authUser`){if(!n.length)return new e(c_(u_),t,r);let i=(await Promise.all(n.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),a=i[0]||c_(u_),o=d_(r,t.config.apiKey,t.name),s=null;for(let e of n)try{let n=await e._get(o);if(n){let r;if(typeof n==`string`){let e=await Hg(t,{idToken:n}).catch(()=>void 0);if(!e)break;r=await o_._fromGetAccountInfoResponse(t,e,n)}else r=o_._fromJSON(t,n);e!==a&&(s=r),a=e;break}}catch{}let c=i.filter(e=>e._shouldAllowMigration);return!a._shouldAllowMigration||!c.length?new e(a,t,r):(a=c[0],s&&await a._set(o,s.toJSON()),await Promise.all(n.map(async e=>{if(e!==a)try{await e._remove(o)}catch{}})),new e(a,t,r))}};function p_(e){let t=e.toLowerCase();if(t.includes(`opera/`)||t.includes(`opr/`)||t.includes(`opios/`))return`Opera`;if(__(t))return`IEMobile`;if(t.includes(`msie`)||t.includes(`trident/`))return`IE`;if(t.includes(`edge/`))return`Edge`;if(m_(t))return`Firefox`;if(t.includes(`silk/`))return`Silk`;if(y_(t))return`Blackberry`;if(b_(t))return`Webos`;if(h_(t))return`Safari`;if((t.includes(`chrome/`)||g_(t))&&!t.includes(`edge/`))return`Chrome`;if(v_(t))return`Android`;{let t=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(t?.length===2)return t[1]}return`Other`}function m_(e=Xr()){return/firefox\//i.test(e)}function h_(e=Xr()){let t=e.toLowerCase();return t.includes(`safari/`)&&!t.includes(`chrome/`)&&!t.includes(`crios/`)&&!t.includes(`android`)}function g_(e=Xr()){return/crios\//i.test(e)}function __(e=Xr()){return/iemobile/i.test(e)}function v_(e=Xr()){return/android/i.test(e)}function y_(e=Xr()){return/blackberry/i.test(e)}function b_(e=Xr()){return/webos/i.test(e)}function x_(e=Xr()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function S_(e=Xr()){return x_(e)&&!!window.navigator?.standalone}function C_(){return ni()&&document.documentMode===10}function w_(e=Xr()){return x_(e)||v_(e)||b_(e)||y_(e)||/windows phone/i.test(e)||__(e)}function T_(e,t=[]){let n;switch(e){case`Browser`:n=p_(Xr());break;case`Worker`:n=`${p_(Xr())}-${e}`;break;default:n=e}let r=t.length?t.join(`,`):`FirebaseCore-web`;return`${n}/JsCore/${qa}/${r}`}var E_=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{n(e(t))}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){t.reverse();for(let e of t)try{e()}catch{}throw this.auth._errorFactory.create(`login-blocked`,{originalMessage:e?.message})}}};async function D_(e,t={}){return jg(e,`GET`,`/v2/passwordPolicy`,Ag(e,t))}var O_=6,k_=class{constructor(e){let t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??O_,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),t.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),t.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),t.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),t.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState===`ENFORCEMENT_STATE_UNSPECIFIED`&&(this.enforcementState=`OFF`),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join(``)??``,this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&=t.meetsMinPasswordLength??!0,t.isValid&&=t.meetsMaxPasswordLength??!0,t.isValid&&=t.containsLowercaseLetter??!0,t.isValid&&=t.containsUppercaseLetter??!0,t.isValid&&=t.containsNumericCharacter??!0,t.isValid&&=t.containsNonAlphanumericCharacter??!0,t}validatePasswordLengthOptions(e,t){let n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);let n;for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,n>=`a`&&n<=`z`,n>=`A`&&n<=`Z`,n>=`0`&&n<=`9`,this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||=t),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||=n),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||=r),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||=i)}},A_=class{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new M_(this),this.idTokenSubscription=new M_(this),this.beforeStateQueue=new E_(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=cg,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=c_(t)),this._initializationPromise=this.queue(async()=>
27{if(!this._deleted&&(this.persistenceManager=await f_.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.uid||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await Hg(this,{idToken:e}),n=await o_._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(e){console.warn(`FirebaseServerApp could not login user with provided authIdToken: `,e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(Wa(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),n=t,r=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,i=n?._redirectEventId,a=await this.tryRedirectSignIn(e);(!t||t===i)&&a?.user&&(n=a.user,r=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(r)try{await this.beforeStateQueue.runMiddleware(n)}catch(e){n=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return Z(this._popupRedirectResolver,this,`argument-error`),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Qg(e)}catch(e){if(e?.code!==`auth/network-request-failed`)return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=Cg()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(Wa(this.app))return Promise.reject(hg(this));let t=e?xi(e):null;return t&&Z(t.auth.config.apiKey===this.config.apiKey,this,`invalid-user-token`),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Z(this.tenantId===e.tenantId,this,`tenant-id-mismatch`),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return Wa(this.app)?Promise.reject(hg(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return Wa(this.app)?Promise.reject(hg(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(c_(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion===this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?t.validatePassword(e):Promise.reject(this._errorFactory.create(`unsupported-password-policy-schema-version`,{}))}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new k_(await D_(this));this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new ci(`auth`,`Firebase`,e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise((e,t)=>
27{if(this.currentUser)e();else{let n=this.onAuthStateChanged(()=>{n(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:`apple.com`,tokenType:`ACCESS_TOKEN`,token:e,idToken:await this.currentUser.getIdToken()};this.tenantId!=null&&(t.tenantId=this.tenantId),await r_(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return e===null?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&c_(e)||this._popupRedirectResolver;Z(t,this,`argument-error`),this.redirectPersistenceManager=await f_.create(this,[c_(t._redirectPersistence)],`redirectUser`),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i=typeof t==`function`?t:t.next.bind(t),a=!1,o=this._isInitialized?Promise.resolve():this._initializationPromise;if(Z(o,this,`internal-error`),o.then(()=>{a||i(this.currentUser)}),typeof t==`function`){let i=e.addObserver(t,n,r);return()=>{a=!0,i()}}else{let n=e.addObserver(t);return()=>{a=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Z(this.persistenceManager,this,`internal-error`),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=T_(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e[`X-Firebase-gmpid`]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e[`X-Firebase-Client`]=t);let n=await this._getAppCheckToken();return n&&(e[`X-Firebase-AppCheck`]=n),e}async _getAppCheckToken(){if(Wa(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&ug(`Error while retrieving App Check token: ${e.error}`),e?.token}};function j_(e){return xi(e)}var M_=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=_i(e=>this.observer=e)}get next(){return Z(this.observer,this.auth,`internal-error`),this.observer.next.bind(this.observer)}},N_={async loadJS(){throw Error(`Unable to load external scripts`)},recaptchaV2Script:``,recaptchaEnterpriseScript:``,gapiScript:``};function P_(e){N_=e}function F_(e){return N_.loadJS(e)}function I_(){return N_.recaptchaEnterpriseScript}function L_(){return N_.gapiScript}function R_(e){return`__${e}${Math.floor(Math.random()*1e6)}`}var z_=class{constructor(){this.enterprise=new B_}ready(e){e()}execute(e,t){return Promise.resolve(`token`)}render(e,t){return``}},B_=class{ready(e){e()}execute(e,t){return Promise.resolve(`token`)}render(e,t){return``}},V_=`recaptcha-enterprise`,H_=`NO_RECAPTCHA`,U_=class{constructor(e){this.type=V_,this.auth=j_(e)}async verify(e=`verify`,t=!1){async function n(e){if(!t){if(e.tenantId==null&&e._agentRecaptchaConfig!=null)return e._agentRecaptchaConfig.siteKey;if(e.tenantId!=null&&e._tenantRecaptchaConfigs[e.tenantId]!==void 0)return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{Bg(e,{clientType:`CLIENT_TYPE_WEB`,version:`RECAPTCHA_ENTERPRISE`}).then(r=>{if(r.recaptchaKey===void 0)n(Error(`recaptcha Enterprise site key undefined`));else{let n=new zg(r);return e.tenantId==null?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;Rg(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n(H_)})}):r(Error(`No reCAPTCHA enterprise script loaded.`))}return this.auth.settings.appVerificationDisabledForTesting?new z_().execute(`siteKey`,{action:`verify`}):new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&Rg(window.grecaptcha))r(n,e,i);else{if(typeof window>`u`){i(Error(`RecaptchaVerifier is only supported in browser`));return}let t=I_();t.length!==0&&(t+=n),F_(t).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}};async function W_(e,t,n,r=!1,i=!1){let a=new U_(e),o;if(i)o=H_;else try{o=await a.verify(n)}
27catch{o=await a.verify(n,!0)}let s={...t};if(n===`mfaSmsEnrollment`||n===`mfaSmsSignIn`){if(`phoneEnrollmentInfo`in s){let e=s.phoneEnrollmentInfo.phoneNumber,t=s.phoneEnrollmentInfo.recaptchaToken;Object.assign(s,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:o,clientType:`CLIENT_TYPE_WEB`,recaptchaVersion:`RECAPTCHA_ENTERPRISE`}})}else if(`phoneSignInInfo`in s){let e=s.phoneSignInInfo.recaptchaToken;Object.assign(s,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:o,clientType:`CLIENT_TYPE_WEB`,recaptchaVersion:`RECAPTCHA_ENTERPRISE`}})}return s}return r?Object.assign(s,{captchaResp:o}):Object.assign(s,{captchaResponse:o}),Object.assign(s,{clientType:`CLIENT_TYPE_WEB`}),Object.assign(s,{recaptchaVersion:`RECAPTCHA_ENTERPRISE`}),s}async function G_(e,t,n,r,i){return i===`EMAIL_PASSWORD_PROVIDER`?e._getRecaptchaConfig()?.isProviderEnabled(`EMAIL_PASSWORD_PROVIDER`)?r(e,await W_(e,t,n,n===`getOobCode`)):r(e,t).catch(async i=>i.code===`auth/missing-recaptcha-token`?(console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`),r(e,await W_(e,t,n,n===`getOobCode`))):Promise.reject(i)):i===`PHONE_PROVIDER`?e._getRecaptchaConfig()?.isProviderEnabled(`PHONE_PROVIDER`)?r(e,await W_(e,t,n)).catch(async i=>e._getRecaptchaConfig()?.getProviderEnforcementState(`PHONE_PROVIDER`)===`AUDIT`&&(i.code===`auth/missing-recaptcha-token`||i.code===`auth/invalid-app-credential`)?(console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`),r(e,await W_(e,t,n,!1,!0))):Promise.reject(i)):r(e,await W_(e,t,n,!1,!0)):Promise.reject(i+` provider is not supported.`)}async function K_(e){let t=j_(e),n=new zg(await Bg(t,{clientType:`CLIENT_TYPE_WEB`,version:`RECAPTCHA_ENTERPRISE`}));t.tenantId==null?t._agentRecaptchaConfig=n:t._tenantRecaptchaConfigs[t.tenantId]=n,n.isAnyProviderEnabled()&&new U_(t).verify()}function q_(e,t){let n=Ua(e,`auth`);if(n.isInitialized()){let e=n.getImmediate();if(fi(n.getOptions(),t??{}))return e;fg(e,`already-initialized`)}return n.initialize({options:t})}function J_(e,t){let n=t?.persistence||[],r=(Array.isArray(n)?n:[n]).map(c_);t?.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t?.popupRedirectResolver)}function Y_(e,t,n){let r=j_(e);Z(/^https?:\/\//.test(t),r,`invalid-emulator-scheme`);let i=!!n?.disableWarnings,a=X_(t),{host:o,port:s}=Z_(t),c=s===null?``:`:${s}`,l={url:`${a}//${o}${c}/`},u=Object.freeze({host:o,port:s,protocol:a.replace(`:`,``),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){Z(r.config.emulator&&r.emulatorConfig,r,`emulator-config-failed`),Z(fi(l,r.config.emulator)&&fi(u,r.emulatorConfig),r,`emulator-config-failed`);return}r.config.emulator=l,r.emulatorConfig=u,r.settings.appVerificationDisabledForTesting=!0,Si(o)?Ci(`${a}//${o}${c}`):i||$_()}function X_(e){let t=e.indexOf(`:`);return t<0?``:e.substr(0,t+1)}function Z_(e){let t=X_(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:``,port:null};let r=n[2].split(`@`).pop()||``,i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:Q_(r.substr(e.length+1))}}else{let[e,t]=r.split(`:`);return{host:e,port:Q_(t)}}}function Q_(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}function $_(){function e(){let e=document.createElement(`p`),t=e.style;e.innerText=`Running in emulator mode. Do not use with production credentials.`,t.position=`fixed`,t.width=`100%`,t.backgroundColor=`#ffffff`,t.border=`.1em solid #000000`,t.color=`#b50000`,t.bottom=`0px`,t.left=`0px`,t.margin=`0px`,t.zIndex=`10000`,t.textAlign=`center`,e.classList.add(`firebase-emulator-warning`),document.body.appendChild(e)}typeof console<`u`&&typeof console.info==`function`&&console.info(`WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials.`),typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?window.addEventListener(`DOMContentLoaded`,e):e())}var ev=class{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return _g(`not implemented`)}_getIdTokenResponse(e){return _g(`not implemented`)}_linkToIdToken(e,t){return _g(`not implemented`)}_getReauthenticationResolver(e){return _g(`not implemented`)}};async function tv(e,t){return jg(e,`POST`,`/v1/accounts:signUp`,t)}async function nv(e,t){return Ng(e,`POST`,`/v1/accounts:signInWithPassword`,Ag(e,t))}async function rv(e,t){return Ng(e,`POST`,`/v1/accounts:signInWithEmailLink`,Ag(e,t))}async function iv(e,t){return Ng(e,`POST`,`/v1/accounts:signInWithEmailLink`,Ag(e,t))}var av=class e extends ev{constructor(e,t,n,r=null){super(`password`,n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(t,n){return new e(t,n,`password`)}static _fromEmailAndCode(t,n,r=null){return new e(t,n,`emailLink`,r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t=typeof e==`string`?JSON.parse(e):e;if(t?.email&&t?.password){if(t.signInMethod===`password`)return this._fromEmailAndPassword(t.email,t.password);if(t.signInMethod===`emailLink`)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case`password`:return G_(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:`CLIENT_TYPE_WEB`},`signInWithPassword`,nv,`EMAIL_PASSWORD_PROVIDER`);case`emailLink`:return rv(e,{email:this._email,oobCode:this._password});default:fg(e,`internal-error`)}}async _linkToIdToken(e,t){switch(this.signInMethod){case`password`:return G_(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:`CLIENT_TYPE_WEB`},`signUpPassword`,tv,`EMAIL_PASSWORD_PROVIDER`);case`emailLink`:return iv(e,{idToken:t,email:this._email,oobCode:this._password});default:fg(e,`internal-error`)}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}};async function ov(e,t){return Ng(e,`POST`,`/v1/accounts:signInWithIdp`,Ag(e,t))}var sv=`http://localhost`,cv=class e extends ev{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){let n=new e(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pen
27dingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):fg(`argument-error`),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){let{providerId:n,signInMethod:r,...i}=typeof t==`string`?JSON.parse(t):t;if(!n||!r)return null;let a=new e(n,r);return a.idToken=i.idToken||void 0,a.accessToken=i.accessToken||void 0,a.secret=i.secret,a.nonce=i.nonce,a.pendingToken=i.pendingToken||null,a}_getIdTokenResponse(e){return ov(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,ov(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,ov(e,t)}buildRequest(){let e={requestUri:sv,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=mi(t)}return e}};async function lv(e,t){return jg(e,`POST`,`/v1/accounts:sendVerificationCode`,Ag(e,t))}async function uv(e,t){return Ng(e,`POST`,`/v1/accounts:signInWithPhoneNumber`,Ag(e,t))}async function dv(e,t){let n=await Ng(e,`POST`,`/v1/accounts:signInWithPhoneNumber`,Ag(e,t));if(n.temporaryProof)throw Lg(e,`account-exists-with-different-credential`,n);return n}var fv={USER_NOT_FOUND:`user-not-found`};async function pv(e,t){return Ng(e,`POST`,`/v1/accounts:signInWithPhoneNumber`,Ag(e,{...t,operation:`REAUTH`}),fv)}var mv=class e extends ev{constructor(e){super(`phone`,`phone`),this.params=e}static _fromVerification(t,n){return new e({verificationId:t,verificationCode:n})}static _fromTokenResponse(t,n){return new e({phoneNumber:t,temporaryProof:n})}_getIdTokenResponse(e){return uv(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return dv(e,{idToken:t,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return pv(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(t){typeof t==`string`&&(t=JSON.parse(t));let{verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:a}=t;return!r&&!n&&!i&&!a?null:new e({verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:a})}};function hv(e){switch(e){case`recoverEmail`:return`RECOVER_EMAIL`;case`resetPassword`:return`PASSWORD_RESET`;case`signIn`:return`EMAIL_SIGNIN`;case`verifyEmail`:return`VERIFY_EMAIL`;case`verifyAndChangeEmail`:return`VERIFY_AND_CHANGE_EMAIL`;case`revertSecondFactorAddition`:return`REVERT_SECOND_FACTOR_ADDITION`;default:return null}}function gv(e){let t=hi(gi(e)).link,n=t?hi(gi(t)).deep_link_id:null,r=hi(gi(e)).deep_link_id;return(r?hi(gi(r)).link:null)||r||n||t||e}var _v=class e{constructor(e){let t=hi(gi(e)),n=t.apiKey??null,r=t.oobCode??null,i=hv(t.mode??null);Z(n&&r&&i,`argument-error`),this.apiKey=n,this.operation=i,this.code=r,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(t){let n=gv(t);try{return new e(n)}catch{return null}}},vv=class e{constructor(){this.providerId=e.PROVIDER_ID}static credential(e,t){return av._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=_v.parseLink(t);return Z(n,`argument-error`),av._fromEmailAndCode(e,n.code,n.tenantId)}};vv.PROVIDER_ID=`password`,vv.EMAIL_PASSWORD_SIGN_IN_METHOD=`password`,vv.EMAIL_LINK_SIGN_IN_METHOD=`emailLink`;var yv=class{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}},bv=class extends yv{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}},xv=class e extends bv{constructor(){super(`facebook.com`)}static credential(t){return cv._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}
27static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!(`oauthAccessToken`in t)||!t.oauthAccessToken)return null;try{return e.credential(t.oauthAccessToken)}catch{return null}}};xv.FACEBOOK_SIGN_IN_METHOD=`facebook.com`,xv.PROVIDER_ID=`facebook.com`;var Sv=class e extends bv{constructor(){super(`google.com`),this.addScope(`profile`)}static credential(t,n){return cv._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return e.credential(n,r)}catch{return null}}};Sv.GOOGLE_SIGN_IN_METHOD=`google.com`,Sv.PROVIDER_ID=`google.com`;var Cv=class e extends bv{constructor(){super(`github.com`)}static credential(t){return cv._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!(`oauthAccessToken`in t)||!t.oauthAccessToken)return null;try{return e.credential(t.oauthAccessToken)}catch{return null}}};Cv.GITHUB_SIGN_IN_METHOD=`github.com`,Cv.PROVIDER_ID=`github.com`;var wv=class e extends bv{constructor(){super(`twitter.com`)}static credential(t,n){return cv._fromParams({providerId:e.PROVIDER_ID,signInMethod:e.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return e.credentialFromTaggedObject(t)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return e.credential(n,r)}catch{return null}}};wv.TWITTER_SIGN_IN_METHOD=`twitter.com`,wv.PROVIDER_ID=`twitter.com`;async function Tv(e,t){return Ng(e,`POST`,`/v1/accounts:signUp`,Ag(e,t))}var Ev=class e{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(t,n,r,i=!1){return new e({user:await o_._fromIdTokenResponse(t,r,i),providerId:Dv(r),_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){return await t._updateTokensIfNecessary(r,!0),new e({user:t,providerId:Dv(r),_tokenResponse:r,operationType:n})}};function Dv(e){return e.providerId?e.providerId:`phoneNumber`in e?`phone`:null}async function Ov(e){if(Wa(e.app))return Promise.reject(hg(e));let t=j_(e);if(await t._initializationPromise,t.currentUser?.isAnonymous)return new Ev({user:t.currentUser,providerId:null,operationType:`signIn`});let n=await Tv(t,{returnSecureToken:!0}),r=await Ev._fromIdTokenResponse(t,`signIn`,n,!0);return await t._updateCurrentUser(r.user),r}var kv=class e extends si{constructor(t,n,r,i){super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,e.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,i){return new e(t,n,r,i)}};function Av(e,t,n,r){return(t===`reauthenticate`?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{throw n.code===`auth/multi-factor-auth-required`?kv._fromErrorAndOperation(e,n,t,r):n})}async function jv(e,t,n=!1){let r=await Jg(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Ev._forOperation(e,`link`,r)}async function Mv(e,t,n=!1){let{auth:r}=e;if(Wa(r.app))return Promise.reject(hg(r));let i=`reauthenticate`;try{let a=await Jg(e,Av(r,i,t,e),n);Z(a.idToken,r,`internal-error`);let o=Kg(a.idToken);Z(o,r,`internal-error`);let{sub:s}=o;return Z(e.uid===s,r,`user-mismatch`),Ev._forOperation(e,i,a)}catch(e){throw e?.code===`auth/user-not-found`&&fg(r,`user-mismatch`),e}}async function Nv(e,t,n=!1){if(Wa(e.app))return Promise.reject(hg(e));let r=`signIn`,i=await Av(e,r,t),a=await Ev._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(a.user),a}async function Pv(e,t){return Nv(j_(e),t)}var Fv=class{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return`phoneInfo`in t?Iv._fromServerResponse(e,t):`totpInfo`in t?Lv._fromServerResponse(e,t):fg(e,`internal-error`)}}
27,Iv=class e extends Fv{constructor(e){super(`phone`,e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(t,n){return new e(n)}},Lv=class e extends Fv{constructor(e){super(`totp`,e)}static _fromServerResponse(t,n){return new e(n)}};async function Rv(e){let t=j_(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}function zv(e,t,n){return Wa(e.app)?Promise.reject(hg(e)):Pv(xi(e),vv.credential(t,n)).catch(async t=>{throw t.code===`auth/password-does-not-meet-requirements`&&Rv(e),t})}function Bv(e,t,n,r){return xi(e).onIdTokenChanged(t,n,r)}function Vv(e,t,n){return xi(e).beforeAuthStateChanged(t,n)}function Hv(e,t,n,r){return xi(e).onAuthStateChanged(t,n,r)}function Uv(e){return xi(e).signOut()}var Wv=class e{constructor(e,t,n){this.type=e,this.credential=t,this.user=n}static _fromIdtoken(t,n){return new e(`enroll`,t,n)}static _fromMfaPendingCredential(t){return new e(`signin`,t)}toJSON(){return{multiFactorSession:{[this.type===`enroll`?`idToken`:`pendingCredential`]:this.credential}}}static fromJSON(t){if(t?.multiFactorSession){if(t.multiFactorSession?.pendingCredential)return e._fromMfaPendingCredential(t.multiFactorSession.pendingCredential);if(t.multiFactorSession?.idToken)return e._fromIdtoken(t.multiFactorSession.idToken)}return null}},Gv=class e{constructor(e,t,n){this.session=e,this.hints=t,this.signInResolver=n}static _fromError(t,n){let r=j_(t),i=n.customData._serverResponse,a=(i.mfaInfo||[]).map(e=>Fv._fromServerResponse(r,e));Z(i.mfaPendingCredential,r,`internal-error`);let o=Wv._fromMfaPendingCredential(i.mfaPendingCredential);return new e(o,a,async e=>{let t=await e._process(r,o);delete i.mfaInfo,delete i.mfaPendingCredential;let a={...i,idToken:t.idToken,refreshToken:t.refreshToken};switch(n.operationType){case`signIn`:let e=await Ev._fromIdTokenResponse(r,n.operationType,a);return await r._updateCurrentUser(e.user),e;case`reauthenticate`:return Z(n.user,r,`internal-error`),Ev._forOperation(n.user,n.operationType,a);default:fg(r,`internal-error`)}})}async resolveSignIn(e){let t=e;return this.signInResolver(t)}};function Kv(e,t){let n=xi(e),r=t;return Z(t.customData.operationType,n,`argument-error`),Z(r.customData._serverResponse?.mfaPendingCredential,n,`argument-error`),Gv._fromError(n,r)}function qv(e,t){return jg(e,`POST`,`/v2/accounts/mfaEnrollment:start`,Ag(e,t))}function Jv(e,t){return jg(e,`POST`,`/v2/accounts/mfaEnrollment:finalize`,Ag(e,t))}function Yv(e,t){return jg(e,`POST`,`/v2/accounts/mfaEnrollment:start`,Ag(e,t))}function Xv(e,t){return jg(e,`POST`,`/v2/accounts/mfaEnrollment:finalize`,Ag(e,t))}var Zv=`__sak`,Qv=class{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Zv,`1`),this.storage.removeItem(Zv),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}
vendor: 1,626 bytes, line 27
27,$v=1e3,ey=10,ty=class extends Qv{constructor(){super(()=>window.localStorage,`LOCAL`),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=w_(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;t?this.detachListener():this.stopPolling();let r=()=>{let e=this.storage.getItem(n);!t&&this.localCache[n]===e||this.notifyListeners(n,e)},i=this.storage.getItem(n);C_()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,ey):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t&&JSON.parse(t))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent(`storage`,{key:e,oldValue:t,newValue:n}),!0)})},$v)}stopPolling(){this.pollTimer&&=(clearInterval(this.pollTimer),null)}attachListener(){window.addEventListener(`storage`,this.boundEventHandler)}detachListener(){window.removeEventListener(`storage`,this.boundEventHandler)}_addListener(e,t){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Ob
27ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}};ty.type=`LOCAL`;var ny=ty,ry=1e3;function iy(e){let t=e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`),n=RegExp(`${t}=([^;]+)`);return document.cookie.match(n)?.[1]??null}function ay(e){return`${window.location.protocol===`http:`?`__dev_`:`__HOST-`}FIREBASE_${e.split(`:`)[3]}`}var oy=class{constructor(){this.type=`COOKIE`,this.listenerUnsubscribes=new Map}_getFinalTarget(e){let t=new URL(`${window.location.origin}/__cookies__`);return t.searchParams.set(`finalTarget`,e),t}async _isAvailable(){return typeof isSecureContext==`boolean`&&!isSecureContext||typeof navigator>`u`||typeof document>`u`?!1:navigator.cookieEnabled??!0}async _set(e,t){}async _get(e){if(!this._isAvailable())return null;let t=ay(e);return window.cookieStore?(await window.cookieStore.get(t))?.value:iy(t)}async _remove(e){if(!this._isAvailable()||!await this._get(e))return;let t=ay(e);document.cookie=`${t}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch(`/__cookies__`,{method:`DELETE`}).catch(()=>void 0)}_addListener(e,t){if(!this._isAvailable())return;let n=ay(e);if(window.cookieStore){let e=(e=>{let r=e.changed.find(e=>e.name===n);r&&t(r.value),e.deleted.find(e=>e.name===n)&&t(null)});return this.listenerUnsubscribes.set(t,()=>window.cookieStore.removeEventListener(`change`,e)),window.cookieStore.addEventListener(`change`,e)}let r=iy(n),i=setInterval(()=>{let e=iy(n);e!==r&&(t(e),r=e)},ry);this.listenerUnsubscribes.set(t,()=>clearInterval(i))}_removeListener(e,t){let n=this.listenerUnsubscribes.get(t);n&&(n(),this.listenerUnsubscribes.delete(t))}};oy.type=`COOKIE`;var sy=class extends Qv{constructor(){super(()=>window.sessionStorage,`SESSION`)}_addListener(e,t){}_removeListener(e,t){}};sy.type=`SESSION`;var cy=sy;function ly(e){return Promise.all(e.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}}))}var uy=class e{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){let n=this.receivers.find(e=>e.isListeningto(t));if(n)return n;let r=new e(t);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let t=e,{eventId:n,eventType:r,data:i}=t.data,a=this.handlersMap[r];if(!a?.size)return;t.ports[0].postMessage({status:`ack`,eventId:n,eventType:r});let o=await ly(Array.from(a).map(async e=>e(t.origin,i)));t.ports[0].postMessage({status:`done`,eventId:n,eventType:r,response:o})}_subscribe(e,t){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener(`message`,this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),(!t||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener(`message`,this.boundEventHandler)}};uy.receivers=[];function dy(e=``,t=10){let n=``;for(let e=0;e<t;e++)n+=Math.floor(Math.random()*10);return e+n}var fy=class{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener(`message`,e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){let r=typeof MessageChannel<`u`?new MessageChannel:null;if(!r)throw Error(`connection_unavailable`);let i,a;return new Promise((o,s)=>{let c=dy(``,20);r.port1.start();let l=setTimeout(()=>{s(Error(`unsupported_event`))},n);a={messageChannel:r,onMessage(e){let t=e;if(t.data.eventId===c)switch(t.data.status){case`ack`:clearTimeout(l),i=setTimeout(()=>{s(Error(`timeout`))},3e3);break;case`done`:clearTimeout(i),o(t.data.response);break;default:clearTimeout(l),clearTimeout(i),s(Error(`invalid_response`));break}}},this.handlers.add(a),r.port1.addEventListener(`message`,a.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[r.port2])}).finally(()=>{a&&this.removeMessageHandler(a)})}};function py(){return window}
27function my(e){py().location.href=e}function hy(){return py().WorkerGlobalScope!==void 0&&typeof py().importScripts==`function`}async function gy(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function _y(){return navigator?.serviceWorker?.controller||null}function vy(){return hy()?self:null}var yy=`firebaseLocalStorageDb`,by=1,xy=`firebaseLocalStorage`,Sy=`fbase_key`,Cy=class{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener(`success`,()=>{e(this.request.result)}),this.request.addEventListener(`error`,()=>{t(this.request.error)})})}};function wy(e,t){return e.transaction([xy],t?`readwrite`:`readonly`).objectStore(xy)}function Ty(){return new Cy(indexedDB.deleteDatabase(yy)).toPromise()}function Ey(){let e=indexedDB.open(yy,by);return new Promise((t,n)=>{e.addEventListener(`error`,()=>{n(e.error)}),e.addEventListener(`upgradeneeded`,()=>{let t=e.result;try{t.createObjectStore(xy,{keyPath:Sy})}catch(e){n(e)}}),e.addEventListener(`success`,async()=>{let n=e.result;n.objectStoreNames.contains(xy)?t(n):(n.close(),await Ty(),t(await Ey()))})})}async function Dy(e,t,n){return new Cy(wy(e,!0).put({[Sy]:t,value:n})).toPromise()}async function Oy(e,t){let n=await new Cy(wy(e,!1).get(t)).toPromise();return n===void 0?null:n.value}function ky(e,t){return new Cy(wy(e,!0).delete(t)).toPromise()}var Ay=800,jy=3,My=class{constructor(){this.type=`LOCAL`,this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.dbPromise?this.dbPromise:(this.dbPromise=Ey(),this.dbPromise.catch(()=>{this.dbPromise=null}),this.dbPromise)}async _withRetries(e){let t=0;for(;;)try{return await e(await this._openDb())}catch(e){if(t++>jy)throw e;this.dbPromise&&=((await this.dbPromise).close(),null)}}async initializeServiceWorkerMessaging(){return hy()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=uy._getInstance(vy()),this.receiver._subscribe(`keyChanged`,async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe(`ping`,async(e,t)=>[`keyChanged`])}async initializeSender(){if(this.activeServiceWorker=await gy(),!this.activeServiceWorker)return;this.sender=new fy(this.activeServiceWorker);let e=await this.sender._send(`ping`,{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes(`keyChanged`)&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||_y()!==this.activeServiceWorker))try{await this.sender._send(`keyChanged`,{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{return indexedDB?(await this._withRetries(async e=>{await Dy(e,Zv,`1`),await ky(e,Zv)}),!0):!1}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>Dy(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>Oy(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>ky(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new Cy(wy(e,!1).getAll()).toPromise());if(!e||this.pendingWrites!==0)return[];let t=[],n=new Set;if(e.length!==0)for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),Ay)}stopPolling(){this.pollTimer&&=(clearInterval(this.pollTimer),null)}_addListener(e,t){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Ob
27ject.keys(this.listeners).length===0&&this.stopPolling()}};My.type=`LOCAL`;var Ny=My;function Py(e,t){return jg(e,`POST`,`/v2/accounts/mfaSignIn:start`,Ag(e,t))}function Fy(e,t){return jg(e,`POST`,`/v2/accounts/mfaSignIn:finalize`,Ag(e,t))}function Iy(e,t){return jg(e,`POST`,`/v2/accounts/mfaSignIn:finalize`,Ag(e,t))}R_(`rcb`),new wg(3e4,6e4);var Ly=`recaptcha`;async function Ry(e,t,n){if(!e._getRecaptchaConfig())try{await K_(e)}catch{console.log(`Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.`)}try{let r;if(r=typeof t==`string`?{phoneNumber:t}:t,`session`in r){let t=r.session;if(`phoneNumber`in r)return Z(t.type===`enroll`,e,`internal-error`),(await G_(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:r.phoneNumber,clientType:`CLIENT_TYPE_WEB`}},`mfaSmsEnrollment`,async(e,t)=>t.phoneEnrollmentInfo.captchaResponse===H_?(Z(n?.type===Ly,e,`argument-error`),qv(e,await zy(e,t,n))):qv(e,t),`PHONE_PROVIDER`).catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo;{Z(t.type===`signin`,e,`internal-error`);let i=r.multiFactorHint?.uid||r.multiFactorUid;return Z(i,e,`missing-multi-factor-info`),(await G_(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:i,phoneSignInInfo:{clientType:`CLIENT_TYPE_WEB`}},`mfaSmsSignIn`,async(e,t)=>t.phoneSignInInfo.captchaResponse===H_?(Z(n?.type===Ly,e,`argument-error`),Py(e,await zy(e,t,n))):Py(e,t),`PHONE_PROVIDER`).catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}else return(await G_(e,{phoneNumber:r.phoneNumber,clientType:`CLIENT_TYPE_WEB`},`sendVerificationCode`,async(e,t)=>t.captchaResponse===H_?(Z(n?.type===Ly,e,`argument-error`),lv(e,await zy(e,t,n))):lv(e,t),`PHONE_PROVIDER`).catch(e=>Promise.reject(e))).sessionInfo}finally{n?._reset()}}async function zy(e,t,n){Z(n.type===Ly,e,`argument-error`);let r=await n.verify();Z(typeof r==`string`,e,`argument-error`);let i={...t};if(`phoneEnrollmentInfo`in i){let e=i.phoneEnrollmentInfo.phoneNumber,t=i.phoneEnrollmentInfo.captchaResponse,n=i.phoneEnrollmentInfo.clientType,a=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:r,captchaResponse:t,clientType:n,recaptchaVersion:a}}),i}else if(`phoneSignInInfo`in i){let e=i.phoneSignInInfo.captchaResponse,t=i.phoneSignInInfo.clientType,n=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:r,captchaResponse:e,clientType:t,recaptchaVersion:n}}),i}else return Object.assign(i,{recaptchaToken:r}),i}var By=class e{constructor(t){this.providerId=e.PROVIDER_ID,this.auth=j_(t)}verifyPhoneNumber(e,t){return Ry(this.auth,e,xi(t))}static credential(e,t){return mv._fromVerification(e,t)}static credentialFromResult(t){let n=t;return e.credentialFromTaggedObject(n)}static credentialFromError(t){return e.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?mv._fromTokenResponse(t,n):null}};By.PROVIDER_ID=`phone`,By.PHONE_SIGN_IN_METHOD=`phone`;function Vy(e,t){return t?c_(t):(Z(e._popupRedirectResolver,e,`argument-error`),e._popupRedirectResolver)}var Hy=class extends ev{constructor(e){super(`custom`,`custom`),this.params=e}_getIdTokenResponse(e){return ov(e,this._buildIdpRequest())}_linkToIdToken(e,t){return ov(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return ov(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}};function Uy(e){return Nv(e.auth,new Hy(e),e.bypassAuthState)}function Wy(e){let{auth:t,user:n}=e;return Z(n,t,`internal-error`),Mv(n,new Hy(e),e.bypassAuthState)}async function Gy(e){let{auth:t,user:n}=e;return Z(n,t,`internal-error`),jv(n,new Hy(e),e.bypassAuthState)}var Ky=class{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:a,type:o}=e;if(a){this.reject(a);return}let s={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(s))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case`signInViaPopup`:case`signInViaRedirect`:return Uy;case`linkViaPopup`:case`linkViaRedirect`:return Gy;case`reauthViaPopup`:case`reauthViaRedirect`:return Wy;default:fg(this.auth,`internal-error`)}}resolve(e){vg(this.pendingPromise,`Pending promise was never set`),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){vg(this.pendingPromise,`Pending promise was never set`),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}},qy=new wg(2e3,1e4),Jy=class e extends Ky{constructor(t,n,r,i,a){super(t,n,i,a),this.provider=r,this.authWindow=null,this.pollId=null,e.currentPopupAction&&e.currentPopupAction.cancel(),e.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return Z(e,this.auth,`internal-error`),e}async onExecution(){vg(this.filter.length===1,`Popup operations only handle one event`);let e=dy();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(pg(this.auth,`web-storage-unsupported`))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(pg(this.auth,`cancelled-popup-request`))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,e.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(pg(this.auth,`popup-closed-by-user`))},8e3);return}this.pollId=window.setTimeout(e,qy.get())};e()}};Jy.currentPopupAction=null;var Yy=`pendingRedirect`,Xy=new Map,Zy=class extends Ky{constructor(e,t,n=!1){super(e,[`signInViaRedirect`,`linkViaRedirect`,`reauthViaRedirect`,`unknown`],t,void 0,n),this.eventId=null}async execute(){let e=Xy.get(this.auth._key());if(!e){try{let t=await Qy(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}Xy.set(this.auth._key(),e)}return this.bypassAuthState||Xy.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type===`signInViaRedirect`)return super.onAuthEvent(e);
27if(e.type===`unknown`){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}};async function Qy(e,t){let n=tb(t),r=eb(e);if(!await r._isAvailable())return!1;let i=await r._get(n)===`true`;return await r._remove(n),i}function $y(e,t){Xy.set(e._key(),t)}function eb(e){return c_(e._redirectPersistence)}function tb(e){return d_(Yy,e.config.apiKey,e.name)}async function nb(e,t,n=!1){if(Wa(e.app))return Promise.reject(hg(e));let r=j_(e),i=await new Zy(r,Vy(r,t),n).execute();return i&&!n&&(delete i.user._redirectEventId,await r._persistUserIfCurrent(i.user),await r._setRedirectUser(null,t)),i}var rb=600*1e3,ib=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!sb(e)?t:(this.hasHandledPotentialRedirect=!0,t||=(this.queuedRedirectEvent=e,!0),t)}sendToConsumer(e,t){if(e.error&&!ob(e)){let n=e.error.code?.split(`auth/`)[1]||`internal-error`;t.onError(pg(this.auth,n))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=t.eventId===null||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=rb&&this.cachedEventUids.clear(),this.cachedEventUids.has(ab(e))}saveEventToCache(e){this.cachedEventUids.add(ab(e)),this.lastProcessedEventTime=Date.now()}};function ab(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join(`-`)}function ob({type:e,error:t}){return e===`unknown`&&t?.code===`auth/no-auth-event`}function sb(e){switch(e.type){case`signInViaRedirect`:case`linkViaRedirect`:case`reauthViaRedirect`:return!0;case`unknown`:return ob(e);default:return!1}}async function cb(e,t={}){return jg(e,`GET`,`/v1/projects`,t)}var lb=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ub=/^https?/;async function db(e){if(e.config.emulator)return;let{authorizedDomains:t}=await cb(e);for(let e of t)try{if(fb(e))return}catch{}fg(e,`unauthorized-domain`)}function fb(e){let t=yg(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith(`chrome-extension://`)){let i=new URL(e);return i.hostname===``&&r===``?n===`chrome-extension:`&&e.replace(`chrome-extension://`,``)===t.replace(`chrome-extension://`,``):n===`chrome-extension:`&&i.hostname===r}if(!ub.test(n))return!1;if(lb.test(e))return r===e;let i=e.replace(/\./g,`\\.`);return RegExp(`^(.+\\.`+i+`|`+i+`)$`,`i`).test(r)}var pb=new wg(3e4,6e4);function mb(){let e=py().___jsl;if(e?.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}function hb(e){return new Promise((t,n)=>{function r(){mb(),gapi.load(`gapi.iframes`,{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{mb(),n(pg(e,`network-request-failed`))},timeout:pb.get()})}if(py().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(py().gapi?.load)r();else{let t=R_(`iframefcb`);return py()[t]=()=>{gapi.load?r():n(pg(e,`network-request-failed`))},F_(`${L_()}?onload=${t}`).catch(e=>n(e))}}).catch(e=>{throw gb=null,e})}var gb=null;function _b(e){return gb||=hb(e),gb}var vb=new wg(5e3,15e3),yb=`__/auth/iframe`,bb=`emulator/auth/iframe`,xb={style:{position:`absolute`,top:`-100px`,width:`1px`,height:`1px`},"aria-hidden":`true`,tabindex:`-1`},Sb=new Map([[`identitytoolkit.googleapis.com`,`p`],[`staging-identitytoolkit.sandbox.googleapis.com`,`s`],[`test-identitytoolkit.sandbox.googleapis.com`,`t`]]);function Cb(e){let t=e.config;Z(t.authDomain,e,`auth-domain-config-required`);let n=t.emulator?Tg(t,bb):`https://${e.config.authDomain}/${yb}
27`,r={apiKey:t.apiKey,appName:e.name,v:qa},i=Sb.get(e.config.apiHost);i&&(r.eid=i);let a=e._getFrameworks();return a.length&&(r.fw=a.join(`,`)),`${n}?${mi(r).slice(1)}`}async function wb(e){let t=await _b(e),n=py().gapi;return Z(n,e,`internal-error`),t.open({where:document.body,url:Cb(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:xb,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=pg(e,`network-request-failed`),a=py().setTimeout(()=>{r(i)},vb.get());function o(){py().clearTimeout(a),n(t)}t.ping(o).then(o,()=>{r(i)})}))}var Tb={location:`yes`,resizable:`yes`,statusbar:`yes`,toolbar:`no`},Eb=500,Db=600,Ob=`_blank`,kb=`http://localhost`,Ab=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function jb(e,t,n,r=Eb,i=Db){let a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),s=``,c={...Tb,width:r.toString(),height:i.toString(),top:a,left:o},l=Xr().toLowerCase();n&&(s=g_(l)?Ob:n),m_(l)&&(t||=kb,c.scrollbars=`yes`);let u=Object.entries(c).reduce((e,[t,n])=>`${e}${t}=${n},`,``);if(S_(l)&&s!==`_self`)return Mb(t||``,s),new Ab(null);let d=window.open(t||``,s,u);Z(d,e,`popup-blocked`);try{d.focus()}catch{}return new Ab(d)}function Mb(e,t){let n=document.createElement(`a`);n.href=e,n.target=t;let r=document.createEvent(`MouseEvent`);r.initMouseEvent(`click`,!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var Nb=`__/auth/handler`,Pb=`emulator/auth/handler`,Fb=`fac`;async function Ib(e,t,n,r,i,a){Z(e.config.authDomain,e,`auth-domain-config-required`),Z(e.config.apiKey,e,`invalid-api-key`);let o={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:qa,eventId:i};if(t instanceof yv){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||``,di(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(let[e,t]of Object.entries(a||{}))o[e]=t}if(t instanceof bv){let e=t.getScopes().filter(e=>e!==``);e.length>0&&(o.scopes=e.join(`,`))}e.tenantId&&(o.tid=e.tenantId);let s=o;for(let e of Object.keys(s))s[e]===void 0&&delete s[e];let c=await e._getAppCheckToken(),l=c?`#${Fb}=${encodeURIComponent(c)}`:``;return`${Lb(e)}?${mi(s).slice(1)}${l}`}function Lb({config:e}){return e.emulator?Tg(e,Pb):`https://${e.authDomain}/${Nb}`}var Rb=`webStorageSupport`,zb=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=cy,this._completeRedirectFn=nb,this._overrideRedirectResult=$y}async _openPopup(e,t,n,r){return vg(this.eventManagers[e._key()]?.manager,`_initialize() not called before _openPopup()`),jb(e,await Ib(e,t,n,yg(),r),dy())}async _openRedirect(e,t,n,r){return await this._originValidation(e),my(await Ib(e,t,n,yg(),r)),new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(vg(n,`If manager is not set, promise should be`),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await wb(e),n=new ib(e);return t.register(`authEvent`,t=>(Z(t?.authEvent,e,`invalid-auth-event`),{status:n.onEvent(t.authEvent)?`ACK`:`ERROR`}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Rb,{type:Rb},n=>{let r=n?.[0]?.[Rb];r!==void 0&&t(!!r),fg(e,`internal-error`)},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=db(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return w_()||h_()||x_()}},Bb=class{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case`enroll`:return this._finalizeEnroll(e,t.credential,n);case`signin`:return this._finalizeSignIn(e,t.credential);default:return _g(`unexpected MultiFactorSessionType`)}}}
27,Vb=class e extends Bb{constructor(e){super(`phone`),this.credential=e}static _fromCredential(t){return new e(t)}_finalizeEnroll(e,t,n){return Jv(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,t){return Fy(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},Hb=class{constructor(){}static assertion(e){return Vb._fromCredential(e)}};Hb.FACTOR_ID=`phone`;var Ub=class{static assertionForEnrollment(e,t){return Wb._fromSecret(e,t)}static assertionForSignIn(e,t){return Wb._fromEnrollmentId(e,t)}static async generateSecret(e){let t=e;Z(t.user?.auth!==void 0,`internal-error`);let n=await Yv(t.user.auth,{idToken:t.credential,totpEnrollmentInfo:{}});return Gb._fromStartTotpMfaEnrollmentResponse(n,t.user.auth)}};Ub.FACTOR_ID=`totp`;var Wb=class e extends Bb{constructor(e,t,n){super(`totp`),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(t,n){return new e(n,void 0,t)}static _fromEnrollmentId(t,n){return new e(n,t)}async _finalizeEnroll(e,t,n){return Z(this.secret!==void 0,e,`argument-error`),Xv(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)})}async _finalizeSignIn(e,t){Z(this.enrollmentId!==void 0&&this.otp!==void 0,e,`argument-error`);let n={verificationCode:this.otp};return Iy(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n})}},Gb=class e{constructor(e,t,n,r,i,a,o){this.sessionInfo=a,this.auth=o,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(t,n){return new e(t.totpSessionInfo.sharedSecretKey,t.totpSessionInfo.hashingAlgorithm,t.totpSessionInfo.verificationCodeLength,t.totpSessionInfo.periodSec,new Date(t.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),t.totpSessionInfo.sessionInfo,n)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){let n=!1;return(Kb(e)||Kb(t))&&(n=!0),n&&(Kb(e)&&(e=this.auth.currentUser?.email||`unknownuser`),Kb(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}};function Kb(e){return e===void 0||e?.length===0}var qb=`@firebase/auth`,Jb=`1.13.2`,Yb=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e(t?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Z(this.auth._initializationPromise,`dependent-sdk-initialized-before-auth`)}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function Xb(e){switch(e){case`Node`:return`node`;case`ReactNative`:return`rn`;case`Worker`:return`webworker`;case`Cordova`:return`cordova`;case`WebExtension`:return`web-extension`;default:return}}function Zb(e){Ha(new wi(`auth`,(t,{options:n})=>{let r=t.getProvider(`app`).getImmediate(),i=t.getProvider(`heartbeat`),a=t.getProvider(`app-check-internal`),{apiKey:o,authDomain:s}=r.options;Z(o&&!o.includes(`:`),`invalid-api-key`,{appName:r.name});let c=new A_(r,i,a,{apiKey:o,authDomain:s,clientPlatform:e,apiHost:`identitytoolkit.googleapis.com`,tokenApiHost:`securetoken.googleapis.com`,apiScheme:`https`,sdkClientVersion:T_(e)});return J_(c,n),c},`PUBLIC`).setInstantiationMode(`EXPLICIT`).setInstanceCreatedCallback((e,t,n)=>{e.getProvider(`auth-internal`).initialize()})),Ha(new wi(`auth-internal`,e=>(e=>new Yb(e))(j_(e.getProvider(`auth`).getImmediate())),`PRIVATE`).setInstantiationMode(`EXPLICIT`)),Za(qb,Jb,Xb(e)),Za(qb,Jb,`esm2020`)}var Qb=qr(`authIdTokenMaxAge`)||300,$b=null,ex=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>Qb)return;let i=n?.token;
27$b!==i&&($b=i,await fetch(e,{method:i?`POST`:`DELETE`,headers:i?{Authorization:`Bearer ${i}`}:{}}))};function tx(e=Ya()){let t=Ua(e,`auth`);if(t.isInitialized())return t.getImmediate();let n=q_(e,{popupRedirectResolver:zb,persistence:[Ny,ny,cy]}),r=qr(`authTokenSyncURL`);if(r&&typeof isSecureContext==`boolean`&&isSecureContext){let e=new URL(r,location.origin);if(location.origin===e.origin){let t=ex(e.toString());Vv(n,t,()=>t(n.currentUser)),Bv(n,e=>t(e))}}let i=Wr(`auth`);return i&&Y_(n,`http://${i}`),n}function nx(){return document.getElementsByTagName(`head`)?.[0]??document}P_({loadJS(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.setAttribute(`src`,e),r.onload=t,r.onerror=e=>{let t=pg(`internal-error`);t.customData=e,n(t)},r.type=`text/javascript`,r.charset=`UTF-8`,nx().appendChild(r)})},gapiScript:`https://apis.google.com/js/api.js`,recaptchaV2Script:`https://www.google.com/recaptcha/api.js`,recaptchaEnterpriseScript:`https://www.google.com/recaptcha/enterprise.js?render=`}),Zb(`Browser`);var rx=`firebasestorage.googleapis.com`,ix=`storageBucket`,ax=120*1e3,ox=600*1e3,sx=class e extends si{constructor(t,n,r=0){super(lx(t),`Firebase Storage: ${n} (${lx(t)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,e.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return lx(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}\n${this.customData.serverResponse}`:this.message=this._baseMessage}},cx;(function(e){e.UNKNOWN=`unknown`,e.OBJECT_NOT_FOUND=`object-not-found`,e.BUCKET_NOT_FOUND=`bucket-not-found`,e.PROJECT_NOT_FOUND=`project-not-found`,e.QUOTA_EXCEEDED=`quota-exceeded`,e.UNAUTHENTICATED=`unauthenticated`,e.UNAUTHORIZED=`unauthorized`,e.UNAUTHORIZED_APP=`unauthorized-app`,e.RETRY_LIMIT_EXCEEDED=`retry-limit-exceeded`,e.INVALID_CHECKSUM=`invali
27d-checksum`,e.CANCELED=`canceled`,e.INVALID_EVENT_NAME=`invalid-event-name`,e.INVALID_URL=`invalid-url`,e.INVALID_DEFAULT_BUCKET=`invalid-default-bucket`,e.NO_DEFAULT_BUCKET=`no-default-bucket`,e.CANNOT_SLICE_BLOB=`cannot-slice-blob`,e.SERVER_FILE_WRONG_SIZE=`server-file-wrong-size`,e.NO_DOWNLOAD_URL=`no-download-url`,e.INVALID_ARGUMENT=`invalid-argument`,e.INVALID_ARGUMENT_COUNT=`invalid-argument-count`,e.APP_DELETED=`app-deleted`,e.INVALID_ROOT_OPERATION=`invalid-root-operation`,e.INVALID_FORMAT=`invalid-format`,e.INTERNAL_ERROR=`internal-error`,e.UNSUPPORTED_ENVIRONMENT=`unsupported-environment`})(cx||={});function lx(e){return`storage/`+e}function ux(){return new sx(cx.UNKNOWN,`An unknown error occurred, please check the error payload for server response.`)}function dx(e){return new sx(cx.OBJECT_NOT_FOUND,`Object '`+e+`' does not exist.`)}function fx(e){return new sx(cx.QUOTA_EXCEEDED,`Quota for bucket '`+e+`' exceeded, please view quota on https://firebase.google.com/pricing/.`)}function px(){return new sx(cx.UNAUTHENTICATED,`User is not authenticated, please authenticate using Firebase Authentication and try again.`)}function mx(){return new sx(cx.UNAUTHORIZED_APP,`This app does not have permission to access Firebase Storage on this project.`)}function hx(e){return new sx(cx.UNAUTHORIZED,`User does not have permission to access '`+e+`'.`)}function gx(){return new sx(cx.RETRY_LIMIT_EXCEEDED,`Max retry time for operation exceeded, please try again.`)}function _x(){return new sx(cx.CANCELED,`User canceled the upload/download.`)}function vx(e){return new sx(cx.INVALID_URL,`Invalid URL '`+e+`'.`)}function yx(e){return new sx(cx.INVALID_DEFAULT_BUCKET,`Invalid default bucket '`+e+`'.`)}function bx(){return new sx(cx.NO_DEFAULT_BUCKET,`No default bucket found. Did you set the 'storageBucket' property when initializing the app?`)}function xx(){return new sx(cx.NO_DOWNLOAD_URL,`The given file does not have any download URLs.`)}function Sx(e){return new sx(cx.INVALID_ARGUMENT,e)}function Cx(){return new sx(cx.APP_DELETED,`The Firebase app was deleted.`)}function wx(e){return new sx(cx.INVALID_ROOT_OPERATION,`The operation '`+e+`' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').`)}function Tx(e){throw new sx(cx.INTERNAL_ERROR,`Internal error: `+e)}var Ex=class e{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){let e=encodeURIComponent;return`/b/`+e(this.bucket)+`/o/`+e(this.path)}bucketOnlyServerUrl(){return`/b/`+encodeURIComponent(this.bucket)+`/o`}static makeFromBucketSpec(t,n){let r;try{r=e.makeFromUrl(t,n)}catch{return new e(t,``)}if(r.path===``)return r;throw yx(t)}static makeFromUrl(t,n){let r=null,i=`([A-Za-z0-9.\\-_]+)`;function a(e){e.path.charAt(e.path.length-1)===`/`&&(e.path_=e.path_.slice(0,-1))}let o=RegExp(`^gs://([A-Za-z0-9.\\-_]+)(/(.*))?$`,`i`),s={bucket:1,path:3};function c(e){e.path_=decodeURIComponent(e.path)}let l=n.replace(/[.]/g,`\\.`),u=RegExp(`^https?://${l}/v[A-Za-z0-9_]+/b/${i}/o(/([^?#]*).*)?\$`,`i`),d={bucket:1,path:3},f=RegExp(`^https?://${n===rx?`(?:storage.googleapis.com|storage.cloud.google.com)`:n}/${i}/([^?#]*)`,`i`),p=[{regex:o,indices:s,postModify:a},{regex:u,indices:d,postModify:c},{regex:f,indices:{bucket:1,path:2},postModify:c}];for(let n=0;n<p.length;n++){let i=p[n],a=i.regex.exec(t);if(a){let t=a[i.indices.bucket],n=a[i.indices.path];n||=``,r=new e(t,n),i.postModify(r);break}}if(r==null)throw vx(t);return r}},Dx=class{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}};function Ox(e,t,n){let r=1,i=null,a=null,o=!1,s=0;function c(){return s===2}let l=!1;function u(...e){l||(l=!0,t.apply(null,e))}function d(t){i=setTimeout(()=>{i=null,e(p,c())},t)}function f(){a&&clearTimeout(a)}function p(e,...t){if(l){f();return}if(e){f(),u.call(null,e,...t);return}if(c()||o){f(),u.call(null,e,...t);return}r<64&&(r*=2);let n;s===1?(s=2,n=0):n=(r+Math.random())*1e3,d(n)}let m=!1;function h(e){m||(m=!0,f(),!l&&(i===null?e||(s=1):(e||(s=2),clearTimeout(i),d(0))))}return d(0),a=setTimeout(()=>{o=!0,h(!0)},n),h}function kx(e){e(!1)}function Ax(e){return e!==void 0}function jx(e){return typeof e==`object`&&!Array.isArray(e)}function Mx(e){return typeof e==`string`||e instanceof String}function Nx(e,t,n,r){if(r<t)throw Sx(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw Sx(`Invalid value for '${e}'. Expected ${n} or less.`)}function Px(e,t,n){let r=t;return n??(r=`https://${t}`),`${n}://${r}/v0${e}`}function Fx(e){let t=encodeURIComponent,n=`?`;for(let r in e)if(e.hasOwnProperty(r)){let i=t(r)+`=`+t(e[r]);n=n+i+`&`}return n=n.slice(0,-1),n}var Ix;
27(function(e){e[e.NO_ERROR=0]=`NO_ERROR`,e[e.NETWORK_ERROR=1]=`NETWORK_ERROR`,e[e.ABORT=2]=`ABORT`})(Ix||={});function Lx(e,t){let n=e>=500&&e<600,r=[408,429].indexOf(e)!==-1,i=t.indexOf(e)!==-1;return n||r||i}var Rx=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d=!0,f=!1){this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=a,this.callback_=o,this.errorCallback_=s,this.timeout_=c,this.progressCallback_=l,this.connectionFactory_=u,this.retry=d,this.isUsingEmulator=f,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()})}start_(){let e=(e,t)=>{if(t){e(!1,new zx(!1,null,!0));return}let n=this.connectionFactory_();this.pendingConnection_=n;let r=e=>{let t=e.loaded,n=e.lengthComputable?e.total:-1;this.progressCallback_!==null&&this.progressCallback_(t,n)};this.progressCallback_!==null&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&n.removeUploadProgressListener(r),this.pendingConnection_=null;let t=n.getErrorCode()===Ix.NO_ERROR,i=n.getStatus();if(!t||Lx(i,this.additionalRetryCodes_)&&this.retry){e(!1,new zx(!1,null,n.getErrorCode()===Ix.ABORT));return}e(!0,new zx(this.successCodes_.indexOf(i)!==-1,n))})},t=(e,t)=>{let n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{let e=this.callback_(i,i.getResponse());Ax(e)?n(e):n()}catch(e){r(e)}else if(i!==null){let e=ux();e.serverResponse=i.getErrorText(),this.errorCallback_?r(this.errorCallback_(i,e)):r(e)}else t.canceled?r(this.appDelete_?Cx():_x()):r(gx())};this.canceled_?t(!1,new zx(!1,null,!0)):this.backoffId_=Ox(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&kx(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}},zx=class{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}};function Bx(e,t){t!==null&&t.length>0&&(e.Authorization=`Firebase `+t)}function Vx(e,t){e[`X-Firebase-Storage-Version`]=`webjs/`+(t??`AppManager`)}function Hx(e,t){t&&(e[`X-Firebase-GMPID`]=t)}function Ux(e,t){t!==null&&(e[`X-Firebase-AppCheck`]=t)}function Wx(e,t,n,r,i,a,o=!0,s=!1){let c=Fx(e.urlParams),l=e.url+c,u=Object.assign({},e.headers);return Hx(u,t),Bx(u,n),Vx(u,a),Ux(u,r),new Rx(l,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o,s)}function Gx(e){let t;try{t=JSON.parse(e)}catch{return null}return jx(t)?t:null}function Kx(e){if(e.length===0)return null;let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function qx(e,t){let n=t.split(`/`).filter(e=>e.length>0).join(`/`);return e.length===0?n:e+`/`+n}function Jx(e){let t=e.lastIndexOf(`/`,e.length-2);return t===-1?e:e.slice(t+1)}function Yx(e,t){return t}var Xx=class{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||Yx}},Zx=null;function Qx(e){return!Mx(e)||e.length<2?e:Jx(e)}function $x(){if(Zx)return Zx;let e=[];e.push(new Xx(`bucket`)),e.push(new Xx(`generation`)),e.push(new Xx(`metageneration`)),e.push(new Xx(`name`,`fullPath`,!0));function t(e,t){return Qx(t)}let n=new Xx(`name`);n.xform=t,e.push(n);function r(e,t){return t===void 0?t:Number(t)}let i=new Xx(`size`);return i.xform=r,e.push(i),e.push(new Xx(`timeCreated`)),e.push(new Xx(`updated`)),e.push(new Xx(`md5Hash`,null,!0)),e.push(new Xx(`cacheControl`,null,!0)),e.push(new Xx(`contentDisposition`,null,!0)),e.push(new Xx(`contentEncoding`,null,!0)),e.push(new Xx(`contentLanguage`,null,!0)),e.push(new Xx(`contentType`,null,!0)),e.push(new Xx(`metadata`,`customMetadata`,!0)),Zx=e,Zx}function eS(e,t){function n(){let n=e.bucket,r=e.fullPath,i=new Ex(n,r);return t._makeStorageReference(i)}Object.defineProperty(e,"ref",{get:n})}function tS(e,t,n){let r={};r.type=`file`;let i=n.length;for(let e=0;e<i;e++){let i=n[e];r[i.local]=i.xform(r,t[i.server])}return eS(r,e),r}function nS(e,t,n){let r=Gx(t);return r===null?null:tS(e,r,n)}function rS(e,t,n,r){let i=Gx(t);if(i===null||!Mx(i.downloadTokens))return null;let a=i.downloadTokens;if(a.length===0)return null;let o=encodeURIComponent;return a.split(`,`).map(t=>{let i=e.bucket,a=e.fullPath;return Px(`/b/`+o(i)+`/o/`+o(a),n,r)+Fx({alt:`media`,token:t})})[0]}var iS=class{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParam
27s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}};function aS(e){if(!e)throw ux()}function oS(e,t){function n(n,r){let i=nS(e,r,t);return aS(i!==null),rS(i,r,e.host,e._protocol)}return n}function sS(e){function t(t,n){let r;return r=t.getStatus()===401?t.getErrorText().includes(`Firebase App Check token is invalid`)?mx():px():t.getStatus()===402?fx(e.bucket):t.getStatus()===403?hx(e.path):n,r.status=t.getStatus(),r.serverResponse=n.serverResponse,r}return t}function cS(e){let t=sS(e);function n(n,r){let i=t(n,r);return n.getStatus()===404&&(i=dx(e.path)),i.serverResponse=r.serverResponse,i}return n}function lS(e,t,n){let r=Px(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,a=new iS(r,`GET`,oS(e,n),i);return a.errorHandler=cS(t),a}var uS=class{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Ix.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener(`abort`,()=>{this.errorCode_=Ix.ABORT,e()}),this.xhr_.addEventListener(`error`,()=>{this.errorCode_=Ix.NETWORK_ERROR,e()}),this.xhr_.addEventListener(`load`,()=>{e()})})}send(e,t,n,r,i){if(this.sent_)throw Tx(`cannot .send() more than once`);if(Si(e)&&n&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(t,e,!0),i!==void 0)for(let e in i)i.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,i[e].toString());return r===void 0?this.xhr_.send():this.xhr_.send(r),this.sendPromise_}getErrorCode(){if(!this.sent_)throw Tx(`cannot .getErrorCode() before sending`);return this.errorCode_}getStatus(){if(!this.sent_)throw Tx(`cannot .getStatus() before sending`);try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw Tx(`cannot .getResponse() before sending`);return this.xhr_.response}getErrorText(){if(!this.sent_)throw Tx(`cannot .getErrorText() before sending`);return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener(`progress`,e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener(`progress`,e)}},dS=class extends uS{initXhr(){this.xhr_.responseType=`text`}};function fS(){return new dS}var pS=class e{constructor(e,t){this._service=e,t instanceof Ex?this._location=t:this._location=Ex.makeFromUrl(t,e.host)}toString(){return`gs://`+this._location.bucket+`/`+this._location.path}_newRef(t,n){return new e(t,n)}get root(){let e=new Ex(this._location.bucket,``);return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Jx(this._location.path)}get storage(){return this._service}get parent(){let t=Kx(this._location.path);if(t===null)return null;let n=new Ex(this._location.bucket,t);return new e(this._service,n)}_throwIfRoot(e){if(this._location.path===``)throw wx(e)}};function mS(e){e._throwIfRoot(`getDownloadURL`);let t=lS(e.storage,e._location,$x());return e.storage.makeRequestWithTokens(t,fS).then(e=>{if(e===null)throw xx();return e})}function hS(e,t){let n=qx(e._location.path,t),r=new Ex(e._location.bucket,n);return new pS(e.storage,r)}function gS(e){return/^[A-Za-z]+:\/\//.test(e)}function _S(e,t){return new pS(e,t)}function vS(e,t){if(e instanceof SS){let n=e;if(n._bucket==null)throw bx();let r=new pS(n,n._bucket);return t==null?r:vS(r,t)}else if(t!==void 0)return hS(e,t);else return e}function yS(e,t){if(t&&gS(t)){if(e instanceof SS)return _S(e,t);throw Sx(`To use ref(service, url), the first argument must be a Storage instance.`)}else return vS(e,t)}function bS(e,t){let n=t?.[ix];return n==null?null:Ex.makeFromBucketSpec(n,e)}function xS(e,t,n,r={}){e.host=`${t}:${n}`;let i=Si(t);i&&Ci(`https://${e.host}/b`),e._isUsingEmulator=!0,e._protocol=i?`https`:`http`;let{mockUserToken:a}=r;a&&(e._overrideAuthToken=typeof a==`string`?a:Yr(a,e.app.options.projectId))}var SS=class{constructor(e,t,n,r,i,a=!1){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._isUsingEmulator=a,this._bucket=null,this._host=rx,this._protocol=`https`,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=ax,this._maxUploadRetryTime=ox,this._requests=new Set,r==null?this._bucket=bS(this._host,this.app.options):this._bucket=Ex.makeFromBucketSpec(r,this._host)}get host(){return this._host}set host(e){this._host=e,this._url==null?this._bucket=bS(e,this.app.options):this._bucket=Ex.makeFromBucketSpec(this._url,e)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Nx(`time`,0,1/0,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Nx(`time`,0,1/0,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();if(t!==null)return t.accessToken}return null}async _getAppCheckToken(){if(Wa(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=this._appCheckProvider.getImmediate({optional:!0});
27return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new pS(this,e)}_makeRequest(e,t,n,r,i=!0){if(this._deleted)return new Dx(Cx());{let a=Wx(e,this._appId,n,r,t,this._firebaseVersion,i,this._isUsingEmulator);return this._requests.add(a),a.getPromise().then(()=>this._requests.delete(a),()=>this._requests.delete(a)),a}}async makeRequestWithTokens(e,t){let[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}},CS=`@firebase/storage`,wS=`0.14.3`,TS=`storage`;function ES(e){return e=xi(e),mS(e)}function DS(e,t){return e=xi(e),yS(e,t)}function OS(e=Ya(),t){e=xi(e);let n=Ua(e,TS).getImmediate({identifier:t}),r=Gr(`storage`);return r&&kS(n,...r),n}function kS(e,t,n,r={}){xS(e,t,n,r)}function AS(e,{instanceIdentifier:t}){return new SS(e.getProvider(`app`).getImmediate(),e.getProvider(`auth-internal`),e.getProvider(`app-check-internal`),t,qa)}function jS(){Ha(new wi(TS,AS,`PUBLIC`).setMultipleInstances(!0)),Za(CS,wS,``),Za(CS,wS,`esm2020`)}jS();var MS=`type.googleapis.com/google.protobuf.Int64Value`,NS=`type.googleapis.com/google.protobuf.UInt64Value`;function PS(e,t){let n={};for(let r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}function FS(e){if(e==null)return null;if(e instanceof Number&&(e=e.valueOf()),typeof e==`number`&&isFinite(e)||e===!0||e===!1||Object.prototype.toString.call(e)===`[object String]`)return e;if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map(e=>FS(e));if(typeof e==`function`||typeof e==`object`)return PS(e,e=>FS(e));throw Error(`Data cannot be encoded in JSON: `+e)}function IS(e){if(e==null)return e;if(e[`@type`])switch(e[`@type`]){case MS:case NS:{let t=Number(e.value);if(isNaN(t))throw Error(`Data cannot be decoded from JSON: `+e);return t}default:throw Error(`Data cannot be decoded from JSON: `+e)}return Array.isArray(e)?e.map(e=>IS(e)):typeof e==`function`||typeof e==`object`?PS(e,e=>IS(e)):e}var LS=`functions`,RS={OK:`ok`,CANCELLED:`cancelled`,UNKNOWN:`unknown`,INVALID_ARGUMENT:`invalid-argument`,DEADLINE_EXCEEDED:`deadline-exceeded`,NOT_FOUND:`not-found`,ALREADY_EXISTS:`already-exists`,PERMISSION_DENIED:`permission-denied`,UNAUTHENTICATED:`unauthenticated`,RESOURCE_EXHAUSTED:`resource-exhausted`,FAILED_PRECONDITION:`failed-precondition`,ABORTED:`aborted`,OUT_OF_RANGE:`out-of-range`,UNIMPLEMENTED:`unimplemented`,INTERNAL:`internal`,UNAVAILABLE:`unavailable`,DATA_LOSS:`data-loss`},zS=class e extends si{constructor(t,n,r){super(`${LS}/${t}`,n||``),this.details=r,Object.setPrototypeOf(this,e.prototype)}};function BS(e){if(e>=200&&e<300)return`ok`;switch(e){case 0:return`internal`;case 400:return`invalid-argument`;case 401:return`unauthenticated`;case 403:return`permission-denied`;case 404:return`not-found`;case 409:return`aborted`;case 429:return`resource-exhausted`;case 499:return`cancelled`;case 500:return`internal`;case 501:return`unimplemented`;case 503:return`unavailable`;case 504:return`deadline-exceeded`}return`unknown`}function VS(e,t){let n=BS(e),r=n,i;try{let e=t&&t.error;if(e){let t=e.status;if(typeof t==`string`){if(!RS[t])return new zS(`internal`,`internal`);n=RS[t],r=t}let a=e.message;typeof a==`string`&&(r=a),i=e.details,i!==void 0&&(i=IS(i))}}catch{}return n===`ok`?null:new zS(n,r,i)}var HS=class{constructor(e,t,n,r){this.app=e,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,Wa(e)&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then(e=>this.auth=e,()=>{}),this.messaging||n.get().then(e=>this.messaging=e,()=>{}),this.appCheck||r?.get().then(e=>this.appCheck=e,()=>{})}async getAuthToken(){if(this.auth)try{return(await this.auth.getToken())?.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!(`Notification`in self)||Notification.permission!==`granted`))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(e){if(this.serverAppAppCheckToken)return this.serverAppAppCheckToken;if(this.appCheck){let t=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return t.error?null:t.token}return null}async getContext(e){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken(),appCheckToken:await this.getAppCheckToken(e)}}},US=`us-central1`,WS=/^data: (.*?)(?:\n|$)/;function GS(e){let t=null;return{promise:new Promise((n,r)=>{t=setTimeout(()=>{r(new zS(`deadline-exceeded`,`deadline-exceeded`))},e)}),cancel:()=>{t&&clearTimeout(t)}}}var KS=class{constructor(e,t,n,r,i=US,a=(...e)=>fetch(...e)){this.app=e,this.fetchImpl=a,this.emulatorOrigin=null,this.contextProvider=new HS(e,t,n,r),this.cancelAllRequests=new Promise(e=>{this.deleteService=()=>Promise.resolve(e())});try{let e=new URL(i);this.customDomain=e.origin+(e.pathname===`/`?``:e.pathname),this.region=US}catch{this.customDomain=null,this.region=i}}_delete(){return this.deleteService()}_url(e){let t=this.app.options.projectId;return this.emulatorOrigin===null?this.customDomain===null?`https://${this.region}-${t}.cloudfunctions.net/${e}`:`${this.customDomain}/${e}`:`${this.emulatorOrigin}/${t}/${this.region}/${e}`}};
27function qS(e,t,n){let r=Si(t);e.emulatorOrigin=`http${r?`s`:``}://${t}:${n}`,r&&Ci(e.emulatorOrigin+`/backends`)}function JS(e,t,n){let r=r=>QS(e,t,r,n||{});return r.stream=(n,r)=>eC(e,t,n,r),r}function YS(e){return e.emulatorOrigin&&Si(e.emulatorOrigin)?`include`:void 0}async function XS(e,t,n,r,i){n[`Content-Type`]=`application/json`;let a;try{a=await r(e,{method:`POST`,body:JSON.stringify(t),headers:n,credentials:YS(i)})}catch{return{status:0,json:null}}let o=null;try{o=await a.json()}catch{}return{status:a.status,json:o}}async function ZS(e,t){let n={},r=await e.contextProvider.getContext(t.limitedUseAppCheckTokens);return r.authToken&&(n.Authorization=`Bearer `+r.authToken),r.messagingToken&&(n[`Firebase-Instance-ID-Token`]=r.messagingToken),r.appCheckToken!==null&&(n[`X-Firebase-AppCheck`]=r.appCheckToken),n}function QS(e,t,n,r){return $S(e,e._url(t),n,r)}async function $S(e,t,n,r){n=FS(n);let i={data:n},a=await ZS(e,r),o=GS(r.timeout||7e4),s=await Promise.race([XS(t,i,a,e.fetchImpl,e),o.promise,e.cancelAllRequests]);if(o.cancel(),!s)throw new zS(`cancelled`,`Firebase Functions instance was deleted.`);let c=VS(s.status,s.json);if(c)throw c;if(!s.json)throw new zS(`internal`,`Response is not valid JSON object.`);let l=s.json.data;if(l===void 0&&(l=s.json.result),l===void 0)throw new zS(`internal`,`Response is missing data field.`);return{data:IS(l)}}function eC(e,t,n,r){return tC(e,e._url(t),n,r||{})}async function tC(e,t,n,r){n=FS(n);let i={data:n},a=await ZS(e,r);a[`Content-Type`]=`application/json`,a.Accept=`text/event-stream`;let o;try{o=await e.fetchImpl(t,{method:`POST`,body:JSON.stringify(i),headers:a,signal:r?.signal,credentials:YS(e)})}catch(e){if(e instanceof Error&&e.name===`AbortError`){let e=new zS(`cancelled`,`Request was cancelled.`);return{data:Promise.reject(e),stream:{[Symbol.asyncIterator](){return{next(){return Promise.reject(e)}}}}}}let t=VS(0,null);return{data:Promise.reject(t),stream:{[Symbol.asyncIterator](){return{next(){return Promise.reject(t)}}}}}}let s,c,l=new Promise((e,t)=>{s=e,c=t});r?.signal?.addEventListener(`abort`,()=>{let e=new zS(`cancelled`,`Request was cancelled.`);c(e)});let u=nC(o.body.getReader(),s,c,r?.signal);return{stream:{[Symbol.asyncIterator](){let e=u.getReader();return{async next(){let{value:t,done:n}=await e.read();return{value:t,done:n}},async return(){return await e.cancel(),{done:!0,value:void 0}}}}},data:l}}function nC(e,t,n,r){let i=(e,r)=>{let i=e.match(WS);if(!i)return;let a=i[1];try{let e=JSON.parse(a);if(`result`in e){t(IS(e.result));return}if(`message`in e){r.enqueue(IS(e.message));return}if(`error`in e){let t=VS(0,e);r.error(t),n(t);return}}catch(e){if(e instanceof zS){r.error(e),n(e);return}}},a=new TextDecoder;return new ReadableStream({start(t){let o=``;return s();async function s(){if(r?.aborted){let e=new zS(`cancelled`,`Request was cancelled`);return t.error(e),n(e),Promise.resolve()}try{let{value:c,done:l}=await e.read();if(l){o.trim()&&i(o.trim(),t),t.close();return}if(r?.aborted){let r=new zS(`cancelled`,`Request was cancelled`);t.error(r),n(r),await e.cancel();return}o+=a.decode(c,{stream:!0});let u=o.split(`
28`);o=u.pop()||``;for(let e of u)e.trim()&&i(e.trim(),t);return s()}catch(e){let r=e instanceof zS?e:VS(0,null);t.error(r),n(r)}}},cancel(){return e.cancel()}})}var rC=`@firebase/functions`,iC=`0.13.5`,aC=`auth-internal`,oC=`app-check-internal`,sC=`messaging-internal`;function cC(e){Ha(new wi(LS,(e,{instanceIdentifier:t})=>new KS(e.getProvider(`app`).getImmediate(),e.getProvider(aC),e.getProvider(sC),e.getProvider(oC),t),`PUBLIC`).setMultipleInstances(!0)),Za(rC,iC,e),Za(rC,iC,`esm2020`)}function lC(e=Ya(),t=US){let n=Ua(xi(e),LS).getImmediate({identifier:t}),r=Gr(`functions`);return r&&uC(n,...r),n}function uC(e,t,n){qS(xi(e),t,n)}function dC(e,t,n){return JS(xi(e),t,n)}cC();var fC=Object.freeze({staging:`project-5f2aa380-fb9e-4865-8e8`,production:`crm-antigravity-ats-001`}),pC=Object.freeze([`VITE_FIREBASE_API_KEY`,`VITE_FIREBASE_AUTH_DOMAIN`,`VITE_FIREBASE_PROJECT_ID`,`VITE_FIREBASE_STORAGE_BUCKET`,`VITE_FIREBASE_MESSAGING_SENDER_ID`,`VITE_FIREBASE_APP_ID`]),m
28C=(e,t)=>typeof e?.[t]==`string`?e[t].trim():``,hC=e=>({apiKey:mC(e,`VITE_FIREBASE_API_KEY`),authDomain:mC(e,`VITE_FIREBASE_AUTH_DOMAIN`),projectId:mC(e,`VITE_FIREBASE_PROJECT_ID`),storageBucket:mC(e,`VITE_FIREBASE_STORAGE_BUCKET`),messagingSenderId:mC(e,`VITE_FIREBASE_MESSAGING_SENDER_ID`),appId:mC(e,`VITE_FIREBASE_APP_ID`)}),gC=Object.freeze({apiKey:`demo-api-key`,authDomain:`demo-ats-website.firebaseapp.com`,projectId:`demo-ats-website`,storageBucket:`demo-ats-website.firebasestorage.app`,messagingSenderId:`100000000000`,appId:`1:100000000000:web:demo-ats-website`});function _C(e={}){let t=mC(e,`MODE`)||`development`,n=mC(e,`VITE_APP_ENVIRONMENT`)||(t===`production`?`production`:t===`staging`?`staging`:`development`),r=fC[t];if(r&&n!==t)throw Error(`Website Firebase bloqueado: el modo ${t} no coincide con el entorno ${n}.`);if(!r&&n!==`development`)throw Error(`Website Firebase bloqueado: el modo local ${t} no puede declarar el entorno ${n}.`);let i=pC.filter(t=>mC(e,t)),a=i.length===pC.length;if(i.length>0&&!a)throw Error(`Website Firebase bloqueado: la configuración está incompleta.`);let o=a?hC(e):{...gC};if(n===`production`||n===`staging`){if(!a)throw Error(`Website Firebase bloqueado: faltan variables para ${n}.`);let t=fC[n],r=mC(e,`VITE_EXPECTED_FIREBASE_PROJECT_ID`);if(o.projectId!==t||r!==t)throw Error(`Website Firebase bloqueado: el proyecto no corresponde a ${n}.`);if(o.authDomain!==`${t}.firebaseapp.com`||![`${t}.firebasestorage.app`,`${t}.appspot.com`].includes(o.storageBucket))throw Error(`Website Firebase bloqueado: dominio o Storage no corresponden a ${n}.`)}else if(o.projectId===fC.production)throw Error(`Website Firebase bloqueado: desarrollo local no puede apuntar a producción.`);let s=mC(e,`VITE_FIREBASE_FUNCTIONS_REGION`)||`us-central1`;if((n===`production`||n===`staging`)&&s!==`us-central1`)throw Error(`Website Firebase bloqueado: la región de Functions no corresponde a ${n}.`);let c=mC(e,`VITE_USE_FIREBASE_EMULATORS`);if((n===`production`||n===`staging`)&&c===`true`)throw Error(`Website Firebase bloqueado: ${n} no puede usar emuladores.`);return{environment:n,config:o,functionsRegion:s,useEmulators:n===`development`&&c!==`false`}}var vC=_C({BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_ACADEMY_URL:`http://localhost:5174`,VITE_APP_ENVIRONMENT:`production`,VITE_EXPECTED_FIREBASE_PROJECT_ID:`crm-antigravity-ats-001`,VITE_FIREBASE_API_KEY:`AIzaSyDNhz-sc_PC_UjTgZTs_PJy1RDaOY397XU`,VITE_FIREBASE_APP_ID:`1:87464760405:web:b163db0cf8de9ecb75b0dc`,VITE_FIREBASE_AUTH_DOMAIN:`crm-antigravity-ats-001.firebaseapp.com`,VITE_FIREBASE_FUNCTIONS_REGION:`us-central1`,VITE_FIREBASE_MESSAGING_SENDER_ID:`87464760405`,VITE_FIREBASE_PROJECT_ID:`crm-antigravity-ats-001`,VITE_FIREBASE_STORAGE_BUCKET:`crm-antigravity-ats-001.firebasestorage.app`,VITE_SIGNATURES_URL:`https://signatures.alltaxsolution.com`}),yC=vC.config,bC=Xa().length?Ya():Ja(yC),xC=tx(bC),SC=Zm(bC),CC=OS(bC),wC=lC(bC,vC.functionsRegion);vC.useEmulators&&!globalThis.__ATS_WEBSITE_FIREBASE_EMULATORS_CONNECTED__&&(Y_(xC,`http://127.0.0.1:9099`,{disableWarnings:!0}),Vm(SC,`127.0.0.1`,8080),uC(wC,`127.0.0.1`,5001),kS(CC,`127.0.0.1`,9199),globalThis.__ATS_WEBSITE_FIREBASE_EMULATORS_CONNECTED__=!0);var Q=e=>typeof e==`string`,TC=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},EC=e=>e==null?``:String(e),DC=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},OC=/###/g,kC=e=>e&&e.includes(`###`)?e.replace(OC,`.`):e,AC=e=>!e||Q(e),jC=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(AC(e))return{};let t=kC(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return AC(e)?{}:{obj:e,k:kC(r[i])}},MC=(e,t,n)=>{let{obj:r,k:i}=jC(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=jC(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=jC(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},NC=(e,t,n,r)=>{let{obj:i,k:a}=jC(e,t,Object);i[a]=i[a]||[],i[a].push(n)},PC=(e,t)=>{let{obj:n,k:r}=jC(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},FC=(e,t,n)=>{let r=PC(e,n);return r===void 0?PC(t,n):r},IC=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?Q(e[r])||e[r]instanceof String||Q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):IC(e[r],t[r],n):e[r]=t[r]);return e},LC=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),RC={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},zC=e=>Q(e)?e.replace(/[&<>
28"'\/]/g,e=>RC[e]):e,BC=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},VC=[` `,`,`,`?`,`!`,`;`],HC=new BC(20),UC=(e,t,n)=>{t||=``,n||=``;let r=VC.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=HC.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},WC=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},GC=e=>e?.replace(/_/g,`-`),KC={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},qC=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||KC,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>Q(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),Q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},JC=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},YC=class extends JC{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Q(n)&&i?o.push(...n.split(i)):o.push(n)));let s=PC(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Q(n)?s:WC(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];
vendor: 22,387 bytes, line 28
28n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),MC(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Q(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=PC(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?IC(s,n,i):s={...s,...n},MC(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},XC={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},ZC=Symbol(`i18next/PATH_KEY`);function QC(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===ZC?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function $C(e,t){let{[ZC]:n}=e(QC()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ew=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,tw=class e extends JC{constructor(e,t={}){super(),DC([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=qC.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ew(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!UC(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Q(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Q(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=$C(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?$C(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Q(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,ee=b&&!i.ordinal&&i.count===0,te=ee&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,ne=m;y&&!m&&x&&(ne=te);let re=ew(ne),ie=Object.prototype.toString.apply(ne);if(y&&ne&&re&&!_.includes(ie)&&!(Q(v)&&Array.isArray(ne))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,ne,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(ne),t=e?[]:{},n=e?g:h;for(let e in ne)if(Object.prototype.hasOwnProperty.call(ne,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:ew(te)?te[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=ne[e])}m=t}}else if(y&&Q(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=te),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&te!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?te:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);ee&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||te)})}):n(e,s,te))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Q(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Q(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Q(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=XC.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Q(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?$C(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Q(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Q(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Q(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},nw=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qC.create(`languageUtils`)}getScriptPartFromCode(e){if(e=GC(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=GC(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Q(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Q(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Q(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Q(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},rw={zero:0,one:1,two:2,few:3,many:4,other:5},iw={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},aw=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=qC.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=GC(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),iw;if(!e.match(/-|_/))return iw;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>rw[e]-rw[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ow=(e,t,n,r=`.`,i=!0)=>{let a=FC(e,t,n);return!a&&i&&Q(n)&&(a=WC(e,n,r),a===void 0&&(a=WC(t,n,r))),a},sw=e=>e.replace(/\$/g,`$$$$`),cw=class{constructor(e={}){this.logger=qC.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?zC:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?LC(i):a||`{{`,this.suffix=o?LC(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?LC(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?LC(l):``,this.nestingPrefix=d?LC(d):f||LC(`$t(`),this.nestingSuffix=p?LC(p):m||LC(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=ow(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ow(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>sw(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?sw(this.escape(e)):sw(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Q(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !Q(a)&&!this.useRawValueToEscape&&(a=EC(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${LC(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Q(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Q(i))return i;Q(i)||(i=EC(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},lw=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},uw=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(GC(r),i),t[o]=s),s(n)}},dw=e=>(t,n,r)=>e(GC(n),r)(t),fw=class{constructor(e={}){this.logger=qC.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?uw:dw;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=uw(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=lw(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},pw=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},mw=class extends JC{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=qC.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};
vendor: 4,575 bytes, line 28
28return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{NC(n.loaded,[i],a),pw(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Q(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},hw=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Q(e[1])&&(t.defaultValue=e[1]),Q(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gw=e=>(Q(e.ns)&&(e.ns=[e.ns]),Q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),_w=()=>{},vw=e=>
vendor: 7,628 bytes, line 28
28{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},yw=class e extends JC{constructor(e={},t){if(super(),this.options=gw(e),this.services={},this.logger=qC,this.modules={external:[]},vw(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Q(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=hw();this.options={...n,...this.options,...gw(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?qC.init(r(this.modules.logger),this.options):qC.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:fw;let t=new nw(this.options);this.store=new YC(this.options.resources,this.options);let n=this.services;n.logger=qC,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new aw(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new cw(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new mw(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new tw(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=_w,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=TC(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=_w){let n=t,r=Q(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=TC();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=_w,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&XC.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=TC();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Q(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Q(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=$C(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=$C(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=$C(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return Q(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;
28if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=TC();return this.options.ns?(Q(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=TC();Q(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new nw(hw());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=_w){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new YC(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...hw().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new cw(n)}return a.translator=new tw(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();yw.createInstance,yw.dir,yw.init,yw.loadResources,yw.reloadResources,yw.use,yw.changeLanguage,yw.getFixedT,yw.t,yw.exists,yw.setDefaultNamespace,yw.hasLoadedNamespace,yw.loadNamespaces,yw.loadLanguages;function bw(e,t={}){let{i18n:r}=n(),[i,a]=(0,p.useState)(t),o=(r.language||`es`)===`en`&&e!==`general`?`${e}_en`:e;return(0,p.useEffect)(()=>{if(!o)return;let e=rg(Km(SC,`site_content`,o),e=>{if(e.exists()){let n=e.data();a({...t,...n})}else a(t)},e=>{console.warn(`Error listening to site_content/${o}:`,e),a(t)});return()=>e()},[o]),i}function xw(e,t){if(typeof e!=`string`)return null;let n=e.trim(),r=[...n].some(e=>e.charCodeAt(0)<32||e.charCodeAt(0)===127);if(!/^https?:\/\//i.test(n)||/\s/.test(n)||r)return null;try{let e=new URL(n);if(e.username||e.password)return null;let r=e.hostname.toLowerCase().replace(/\.$/,``),i=r.startsWith(`[`)||/^(\d{1,3}\.){3}\d{1,3}$/.test(r)||!r.includes(`.`)||r.endsWith(`.localhost`)||r.endsWith(`.local`);return i&&!t||e.protocol!==`https:`&&!(t&&i)?null:e.href.replace(/\/+$/,``)}catch{return null}}function Sw(e,{envUrl:t,isDevelopment:n=!1}={}){return xw(e,n)||xw(t,n)||`https://academy.alltaxsolution.com`}function Cw(e){return Sw(e,{envUrl:`http://localhost:5174`,isDevelopment:!1})}var $=o();function ww({draftContent:e,onFocusField:t,previewDevice:r}){let[i,a]=(0,p.useState)(!1),o=(0,p.useRef)(null),s=(0,p.useRef)(null),[c,l]=(0,p.useState)(!1),[u,d]=(0,p.useState)(!1),{t:f,i18n:m}=n(),[h,g]=(0,p.useState)(!1),_=m.language||`es`,v=bw(`general`,{phone:`(800) 516-4337`,email:`[email protected]`}),y=e||v,b=bw(`academy`,{academyUrl:Cw()}),x=r===`mobile`||r===`tablet`;Cw(b.academyUrl);let S=`tel:${(y.phone||``).replace(/\D/g,``)||`8005164337`}`;(0,p.useEffect)(()=>{let e=()=>{window.scrollY>20?l(!0):l(!1)};return window.addEventListener(`scroll`,e),()=>window.removeEventListener(`scroll`,e)},[]),(0,p.useEffect)(()=>{let e=e=>{(e.key===`Escape`||e.type===`ats:escape`)&&(s.current?.contains(document.activeElement)&&o.current?.focus(),a(!1),g(!1))};
28return window.addEventListener(`keydown`,e),window.addEventListener(`ats:escape`,e),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`ats:escape`,e)}},[]),(0,p.useEffect)(()=>{let e=localStorage.getItem(`theme`),t=window.matchMedia(`(prefers-color-scheme: dark)`).matches;e===`dark`||!e&&t?(document.documentElement.classList.add(`dark`),d(!0)):(document.documentElement.classList.remove(`dark`),d(!1))},[]);let C=()=>{u?(document.documentElement.classList.remove(`dark`),localStorage.setItem(`theme`,`light`),d(!1)):(document.documentElement.classList.add(`dark`),localStorage.setItem(`theme`,`dark`),d(!0))},ee=[{name:f(`nav.home`,`Inicio`),href:`/`},{name:f(`nav.solutions`,`Soluciones`),dropdown:[{name:f(`nav.software`,`Software de Impuestos`),href:`/software`,desc:f(`nav.softwareDesc`,`Distribución y licenciamiento de software profesional.`)},{name:f(`nav.academy`,`Cursos & Academia`),href:`/academy`,desc:f(`nav.academyDesc`,`Capacitación y preparación oficial ante el IRS.`)},{name:f(`nav.bankProducts`,`Productos Bancarios`),href:`/bank-products`,desc:f(`nav.bankProductsDesc`,`Integraciones de reembolso para cobro directo de honorarios.`)},{name:f(`nav.signatures`,`Firma Digital & Contratos`),href:`/signatures`,desc:f(`nav.signaturesDesc`,`Plataforma de firmas electrónicas de documentos.`)},{name:f(`nav.atsLink`,`ATS Link`),href:`/ats-link`,desc:f(`nav.atsLinkDesc`,`Clientes, solicitudes, documentos y citas en una plataforma sencilla.`)},{name:f(`nav.refund`,`¿Dónde está mi Reembolso?`),href:_===`es`?`https://sa.www4.irs.gov/irfof/lang/es/irfofgetstatus.jsp`:`https://www.irs.gov/refunds`,isExternal:!0,desc:f(`nav.refundDesc`,`Consulta el estado oficial de tu reembolso federal (IRS).`)}]},{name:f(`nav.company`,`Compañía`),dropdown:[{name:f(`nav.about`,`Quiénes Somos`),href:`/about`,desc:f(`nav.aboutDesc`,`Nuestra historia, equipo, presencia y FAQs.`)},{name:f(`nav.blog`,`Noticias`),href:`/noticias`,desc:f(`nav.blogDesc`,`Noticias y novedades fiscales del IRS y la industria.`)},{name:f(`nav.resources`,`Recursos Fiscales`),href:`/resources`,desc:f(`nav.resourcesDesc`,`Centro de formularios, anexos y enlaces del IRS.`)},{name:f(`nav.bookings`,`Reservas / Citas`),href:`/about#equipo`,desc:f(`nav.bookingsDesc`,`Agenda tu reunión con cualquiera de nuestros asesores.`)},{name:f(`nav.contact`,`Contacto`),href:`/contact`,desc:f(`nav.contactDesc`,`Soporte, dirección del negocio y contacto directo.`)}]}];return(0,$.jsxs)(`header`,{className:`${t?`absolute`:`fixed`} site-header-shell top-4 left-1/2 -translate-x-1/2 z-50 transition-all duration-500 rounded-2xl ${c?`glass-panel shadow-lg shadow-slate-900/5 py-3`:`bg-transparent py-5`}`,children:[(0,$.jsxs)(`div`,{className:`site-header-content flex items-center justify-between`,children:[(0,$.jsx)(k,{to:`/`,className:`flex items-center gap-2 group`,children:(0,$.jsx)(`img`,{src:u?`/logo_dark.png`:`/logo_light.png`,alt:`All Tax Solution`,className:`h-10 md:h-12 lg:h-14 w-auto object-contain transition-all duration-300 group-hover:scale-105`})}),(0,$.jsx)(`nav`,{className:`${x?`hidden`:`hidden lg:flex`} items-center gap-4 xl:gap-6`,children:ee.map(e=>e.dropdown?(0,$.jsxs)(`div`,{className:`relative group py-1`,children:[(0,$.jsxs)(`button`,{className:`flex items-center gap-1 text-xs font-extrabold text-slate-700 dark:text-slate-200 hover:text-brand-600 dark:hover:text-cyan-400 transition-colors duration-300 cursor-pointer`,children:[(0,$.jsx)(`span`,{children:e.name}),(0,$.jsx)(Qn,{size:12,className:`transition-transform duration-300 group-hover:rotate-180`})]}),(0,$.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 pt-3 w-64 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 ease-out transform translate-y-2 group-hover:translate-y-0 z-50`,children:(0,$.jsx)(`div`,{className:`bg-white dark:bg-slate-900 border border-slate-200/60 dark:border-slate-800 rounded-2xl shadow-xl p-4 space-y-2`,children:e.dropdown.map(e=>e.isExternal?(0,$.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,className:`block p-2 rounded-xl text-left transition-colors duration-300 hover:bg-slate-50 dark:hover:bg-slate-800/50 text-slate-700 dark:text-slate-200 hover:text-brand-600 dark:hover:text-cyan-400 group/sub`,children:[(0,$.jsxs)(`span`,{className:`block font-bold text-xs flex items-center gap-1`,children:[e.name,(0,$.jsx)(qn,{size:10,
28className:`opacity-60 group-hover/sub:translate-x-0.5 group-hover/sub:-translate-y-0.5 transition-transform`})]}),(0,$.jsx)(`span`,{className:`block text-[10px] text-slate-400 dark:text-slate-500 font-semibold mt-0.5 leading-normal`,children:e.desc})]},e.name):(0,$.jsxs)(kn,{to:e.href,className:({isActive:e})=>`block p-2 rounded-xl text-left transition-colors duration-300 ${e?`bg-brand-50/50 dark:bg-slate-800 text-brand-600 dark:text-cyan-400`:`hover:bg-slate-50 dark:hover:bg-slate-800/50 text-slate-700 dark:text-slate-200 hover:text-brand-600 dark:hover:text-cyan-400`}`,children:[(0,$.jsx)(`span`,{className:`block font-bold text-xs`,children:e.name}),(0,$.jsx)(`span`,{className:`block text-[10px] text-slate-400 dark:text-slate-500 font-semibold mt-0.5 leading-normal`,children:e.desc})]},e.name))})})]},e.name):(0,$.jsxs)(kn,{to:e.href,className:({isActive:e})=>`inline-flex items-center justify-center text-xs font-extrabold transition-colors duration-300 relative py-1 group ${e?`text-brand-600 dark:text-cyan-400`:`text-slate-700 dark:text-slate-200 hover:text-brand-600 dark:hover:text-cyan-400`}`,children:[(0,$.jsx)(`span`,{children:e.name}),(0,$.jsx)(`span`,{className:`absolute bottom-0 left-0 w-full h-0.5 bg-brand-600 dark:bg-cyan-400 scale-x-0 transition-transform duration-300 group-hover:scale-x-100`})]},e.name))}),(0,$.jsxs)(`div`,{className:`${x?`hidden`:`hidden lg:flex`} items-center gap-2.5 xl:gap-4`,children:[(0,$.jsxs)(`a`,{href:t?void 0:S,onClick:t?e=>{e.preventDefault(),t(`phone`)}:void 0,className:`${t?`hidden`:`hidden xl:flex`} items-center gap-1.5 text-xs font-bold text-slate-700 dark:text-slate-200 hover:text-brand-600 dark:hover:text-gold-400 transition-colors ${t?`hover:ring-2 hover:ring-rose-500 p-1 rounded-lg cursor-pointer`:``}`,children:[(0,$.jsx)(vr,{size:14,className:`text-brand-500`}),(0,$.jsx)(`span`,{children:y.phone||`(800) 516-4337`})]}),(0,$.jsx)(`button`,{onClick:C,className:`p-2.5 rounded-xl hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-700 dark:text-slate-300 transition-colors duration-300`,"aria-label":`Toggle Dark Mode`,children:u?(0,$.jsx)(Tr,{size:18}):(0,$.jsx)(hr,{size:18})}),(0,$.jsxs)(`div`,{className:`relative ${t?`hidden`:``}`,children:[(0,$.jsxs)(`button`,{onClick:()=>g(!h),className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border border-slate-200 dark:border-slate-800 bg-white/50 dark:bg-slate-900/50 hover:bg-slate-100 dark:hover:bg-slate-800 text-xs font-bold text-slate-700 dark:text-slate-200 transition-colors`,children:[(0,$.jsx)(`span`,{children:_===`es`?`🇪🇸 ES`:`🇺🇸 EN`}),(0,$.jsx)(Qn,{size:12,className:`transition-transform duration-300 ${h?`rotate-180`:``}`})]}),h&&(0,$.jsxs)(`div`,{className:`absolute right-0 mt-2 w-28 bg-white dark:bg-slate-900 border border-slate-200/60 dark:border-slate-800 rounded-xl shadow-lg p-1 z-50`,children:[(0,$.jsxs)(`button`,{onClick:()=>{m.changeLanguage(`es`),localStorage.setItem(`website_lang`,`es`),g(!1)},className:`flex items-center gap-2 w-full px-3 py-2 text-left text-xs font-bold rounded-lg hover:bg-slate-50 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-200`,children:[(0,$.jsx)(`span`,{children:`🇪🇸`}),` Español`]}),(0,$.jsxs)(`button`,{onClick:()=>{m.changeLanguage(`en`),localStorage.setItem(`website_lang`,`en`),g(!1)},className:`flex items-center gap-2 w-full px-3 py-2 text-left text-xs font-bold rounded-lg hover:bg-slate-50 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-200`,children:[(0,$.jsx)(`span`,{children:`🇺🇸`}),` English`]})]})]}),(0,$.jsx)(`a`,{href:`https://www.mytaxoffice.com/main/pro/ATSPRO_Login.php`,target:`_blank`,rel:`noopener noreferrer`,className:`${t?`hidden`:`hidden xl:inline-flex`} items-center justify-center px-3.5 py-2.5 rounded-xl border border-slate-200 dark:border-slate-800 bg-white hover:bg-slate-50 dark:bg-slate-900 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-200 font-bold text-xs shadow-sm hover:shadow transition-all duration-300`,children:f(`nav.loginAtspro`,`Login ATSPRO`)})]}),(0,$.jsxs)(`div`,{className:`${x?`flex`:`flex lg:hidden`} items-center gap-2`,children:[(0,$.jsx)(`a`,{href:S,className:`p-2 rounded-xl text-slate-700 dark:text-slate-300 hover:bg-slate-100 dar
28k:hover:bg-slate-900`,"aria-label":`Call Support`,children:(0,$.jsx)(vr,{size:18})}),(0,$.jsx)(`button`,{onClick:C,"aria-label":u?`Activar tema claro`:`Activar tema oscuro`,className:`p-2 rounded-xl text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-900`,children:u?(0,$.jsx)(Tr,{size:18}):(0,$.jsx)(hr,{size:18})}),(0,$.jsx)(`button`,{ref:o,"aria-label":i?`Cerrar menú`:`Abrir menú`,"aria-expanded":i,"aria-controls":`website-mobile-menu`,onClick:()=>a(!i),className:`p-2 rounded-xl text-slate-800 dark:text-white hover:bg-slate-100 dark:hover:bg-slate-900`,children:i?(0,$.jsx)(Ar,{size:24}):(0,$.jsx)(dr,{size:24})})]})]}),(0,$.jsx)(`div`,{id:`website-mobile-menu`,ref:s,hidden:!i,inert:!i,className:`${x?``:`lg:hidden`} max-h-[calc(100dvh-7rem)] overflow-y-auto border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 rounded-2xl shadow-xl mt-3 px-4 sm:px-6 pb-6`,children:(0,$.jsxs)(`nav`,{className:`flex flex-col gap-4 pt-4`,children:[ee.map(e=>e.dropdown?(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(`span`,{className:`text-xxs font-extrabold uppercase tracking-widest text-slate-400 dark:text-slate-500`,children:e.name}),(0,$.jsx)(`div`,{className:`pl-4 flex flex-col gap-3 border-l border-slate-100 dark:border-slate-800`,children:e.dropdown.map(e=>e.isExternal?(0,$.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>a(!1),className:`text-sm font-bold text-slate-705 dark:text-slate-300 hover:text-brand-600 dark:hover:text-gold-450 flex items-center gap-1`,children:[(0,$.jsx)(`span`,{children:e.name}),(0,$.jsx)(qn,{size:12,className:`opacity-60`})]},e.name):(0,$.jsx)(kn,{to:e.href,onClick:()=>a(!1),className:({isActive:e})=>`text-sm font-bold transition-colors ${e?`text-brand-600 dark:text-amber-400`:`text-slate-700 dark:text-slate-300 hover:text-brand-600 dark:hover:text-gold-400`}`,children:e.name},e.name))})]},e.name):(0,$.jsx)(kn,{to:e.href,onClick:()=>a(!1),className:({isActive:e})=>`text-base font-bold transition-colors py-1 ${e?`text-brand-600 dark:text-amber-400`:`text-slate-700 dark:text-slate-350 hover:text-brand-600 dark:hover:text-gold-400`}`,children:e.name},e.name)),(0,$.jsx)(`div`,{className:`border-t border-slate-100 dark:border-slate-800/80 pt-4 mt-2 flex flex-col gap-2`,children:(0,$.jsxs)(`a`,{href:`https://www.mytaxoffice.com/main/pro/ATSPRO_Login.php`,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>a(!1),className:`w-full flex items-center justify-center gap-2 py-3 rounded-xl border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-950 text-slate-700 dark:text-slate-200 font-bold text-center text-sm shadow-sm hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors`,children:[(0,$.jsx)(`span`,{children:f(`nav.loginAtspro`,`Login ATSPRO`)}),(0,$.jsx)(qn,{size:16})]})}),(0,$.jsxs)(`div`,{className:`flex justify-center items-center gap-6 mt-4 pt-4 border-t border-slate-100 dark:border-slate-800/80`,children:[(0,$.jsx)(`button`,{onClick:()=>{m.changeLanguage(`es`),localStorage.setItem(`website_lang`,`es`),a(!1)},className:`px-3.5 py-2 rounded-xl text-xs font-bold transition-all ${_===`es`?`bg-brand-50/50 text-brand-600 dark:bg-slate-800 dark:text-amber-400`:`text-slate-500 dark:text-slate-400 hover:text-slate-700`}`,children:`🇪🇸 Español`}),(0,$.jsx)(`button`,{onClick:()=>{m.changeLanguage(`en`),localStorage.setItem(`website_lang`,`en`),a(!1)},className:`px-3.5 py-2 rounded-xl text-xs font-bold transition-all ${_===`en`?`bg-brand-50/50 text-brand-600 dark:bg-slate-800 dark:text-amber-400`:`text-slate-500 dark:text-slate-400 hover:text-slate-700`}`,children:`🇺🇸 English`})]})]})})]})}var Tw=e=>(0,$.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,$.jsx)(`path`,{d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`})}),Ew=e=>(0,$.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,he
28ight:`20`,rx:`5`,ry:`5`}),(0,$.jsx)(`path`,{d:`M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z`}),(0,$.jsx)(`line`,{x1:`17.5`,y1:`6.5`,x2:`17.51`,y2:`6.5`})]}),Dw=e=>(0,$.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,$.jsx)(`path`,{d:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`})}),Ow=e=>(0,$.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,$.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})}),kw=e=>(0,$.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,$.jsx)(`path`,{d:`M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z`})});function Aw({draftContent:e,onFocusField:t}){let{t:r}=n(),i=new Date().getFullYear(),a=bw(`general`,{phone:`1-800-516-4337`,email:`[email protected]`,address:`292 Helena Avenue, Yonkers, NY 10710`,youtube:`https://www.youtube.com/@alltaxsolution2207`,instagram:`https://www.instagram.com/alltaxsolution/`,facebook:`https://www.facebook.com/alltaxsolution`,twitter:`https://x.com/AllTax_Solution`}),o=e||a,s=Cw(bw(`academy`,{academyUrl:Cw()}).academyUrl),c=`tel:${(o.phone||``).replace(/\D/g,``)||`18005164337`}`,l=o.youtube||`https://www.youtube.com/@alltaxsolution2207`,u=o.instagram||`https://www.instagram.com/alltaxsolution/`,d=o.facebook||`https://www.facebook.com/alltaxsolution`,f=o.twitter||`https://x.com/AllTax_Solution`;return(0,$.jsxs)(`footer`,{className:`bg-slate-900 text-slate-300 border-t border-slate-800`,children:[(0,$.jsxs)(`div`,{className:`site-container py-12 sm:py-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-6 gap-8 lg:gap-10`,children:[(0,$.jsxs)(`div`,{className:`space-y-6 md:col-span-2`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,$.jsx)(`img`,{src:`/logo_dark.png`,alt:`All Tax Solution`,className:`h-12 md:h-14 lg:h-16 w-auto object-contain`})}),(0,$.jsx)(`p`,{className:`text-sm text-slate-300 leading-relaxed max-w-sm`,children:r(`footer.missionText`,`Brindamos soluciones tributarias e informáticas inteligentes que potencian el crecimiento y garantizan el cumplimiento de tu negocio de impuestos.`)}),(0,$.jsxs)(`ul`,{className:`space-y-3 text-xs`,children:[(0,$.jsxs)(`li`,{className:`flex items-center gap-2.5 transition-all duration-300 ${t?`hover:ring-2 hover:ring-rose-500 hover:text-white cursor-pointer p-1 rounded-lg`:``}`,onClick:t?()=>t(`phone`):void 0,children:[(0,$.jsx)(vr,{size:16,className:`text-cyan-400 shrink-0`}),t?(0,$.jsx)(`span`,{className:`hover:underline hover:text-white transition-colors`,children:o.phone}):(0,$.jsx)(`a`,{href:c,className:`hover:underline hover:text-white transition-colors`,children:o.phone})]}),(0,$.jsxs)(`li`,{className:`flex items-center gap-2.5 transition-all duration-300`,children:[(0,$.jsx)(kw,{className:`w-4 h-4 fill-[#25D366] text-[#25D366] shrink-0`}),(0,$.jsx)(`a`,{href:`https://wa.me/19172925982`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:underline text-[#25D366] font-extrabold transition-colors`,children:`WhatsApp: +1 (917) 292-5982`})]}),(0,$.jsxs)(`li`,{className:`flex items-center gap-2.5 transition-all duration-300 ${t?`hover:ring-2 hover:ring-rose-500 hover:text-white cursor-pointer p-1 rounded-lg`:``}`,onClick:t?()=>t(`email`):void 0,children:[(0,$.jsx)(ur,{size:16,className:`text-cyan-400 shrink-0`}),t?(0,$.jsx)(`span`,{className:`hover:underline hover:text-white transition-colors`,children:o.email}):(0,$.jsx)(`a`,{href:`mailto:${o.email}`,className:`hover:underline hover:text-white transition-colors`,children:o.email})]}),(0,$.jsx)(`li`,{className:`pt-2 text-[11px] text-slate-400 flex flex-wrap gap-2`,children:(0,$.jsx)(`span`,{className:`bg-slate-800 px-2.5 py-1 rounded-full border border-slate-700`,children:r(`footer.locationUSA`,`🇺🇸 EE. UU. (Negocio Principal)`)})})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3 pt-2`,children:[(0,$.jsx)(`a`,{href:t?void 0:l,onClick:t?e=>
28{e.preventDefault(),t(`youtube`)}:void 0,target:`_blank`,rel:`noopener noreferrer`,className:`w-9 h-9 rounded-xl bg-slate-800 hover:bg-red-600 hover:text-white text-slate-300 transition-all flex items-center justify-center ${t?`hover:ring-2 hover:ring-rose-500 cursor-pointer`:``}`,"aria-label":`YouTube All Tax Solution`,title:`YouTube All Tax Solution`,children:(0,$.jsx)(Dw,{className:`w-4 h-4`})}),(0,$.jsx)(`a`,{href:t?void 0:u,onClick:t?e=>{e.preventDefault(),t(`instagram`)}:void 0,target:`_blank`,rel:`noopener noreferrer`,className:`w-9 h-9 rounded-xl bg-slate-800 hover:bg-gradient-to-tr hover:from-amber-500 hover:via-rose-500 hover:to-purple-600 hover:text-white text-slate-300 transition-all flex items-center justify-center ${t?`hover:ring-2 hover:ring-rose-500 cursor-pointer`:``}`,"aria-label":`Instagram All Tax Solution`,title:`Instagram All Tax Solution`,children:(0,$.jsx)(Ew,{className:`w-4 h-4`})}),(0,$.jsx)(`a`,{href:t?void 0:d,onClick:t?e=>{e.preventDefault(),t(`facebook`)}:void 0,target:`_blank`,rel:`noopener noreferrer`,className:`w-9 h-9 rounded-xl bg-slate-800 hover:bg-blue-600 hover:text-white text-slate-300 transition-all flex items-center justify-center ${t?`hover:ring-2 hover:ring-rose-500 cursor-pointer`:``}`,"aria-label":`Facebook All Tax Solution`,title:`Facebook All Tax Solution`,children:(0,$.jsx)(Tw,{className:`w-4 h-4`})}),(0,$.jsx)(`a`,{href:t?void 0:f,onClick:t?e=>{e.preventDefault(),t(`twitter`)}:void 0,target:`_blank`,rel:`noopener noreferrer`,className:`w-9 h-9 rounded-xl bg-slate-800 hover:bg-slate-700 hover:text-white text-slate-300 transition-all flex items-center justify-center ${t?`hover:ring-2 hover:ring-rose-500 cursor-pointer`:``}`,"aria-label":`X (Twitter) All Tax Solution`,title:`X (Twitter) All Tax Solution`,children:(0,$.jsx)(Ow,{className:`w-4 h-4`})})]})]}),(0,$.jsxs)(`div`,{className:`md:col-span-1`,children:[(0,$.jsx)(`h3`,{className:`text-white font-semibold text-sm tracking-wider uppercase mb-6`,children:r(`footer.solutionsTitle`,`Soluciones`)}),(0,$.jsxs)(`ul`,{className:`space-y-4 text-xs font-bold`,children:[(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/software`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.software`,`Software de Impuestos`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/academy`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.academy`,`Cursos & Academia`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/bank-products`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.bankProducts`,`Productos Bancarios`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/signatures`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.signatures`,`Firma Digital & Contratos`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/ats-link`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.atsLink`,`ATS Link`)})})]})]}),(0,$.jsxs)(`div`,{className:`md:col-span-1`,children:[(0,$.jsx)(`h3`,{className:`text-white font-semibold text-sm tracking-wider uppercase mb-6`,children:r(`footer.resourcesTitle`,`Recursos`)}),(0,$.jsxs)(`ul`,{className:`space-y-4 text-xs font-bold`,children:[(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/resources`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.resources`,`Recursos Fiscales`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/noticias`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.blog`,`Noticias`)})})]})]}),(0,$.jsxs)(`div`,{className:`md:col-span-1`,children:[(0,$.jsx)(`h3`,{className:`text-white font-semibold text-sm tracking-wider uppercase mb-6`,children:r(`footer.companyTitle`,`Compañía`)}),(0,$.jsxs)(`ul`,{className:`space-y-4 text-xs font-bold`,children:[(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/about`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.about`,`Quiénes Somos`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/about#equipo`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.bookings`,`Reservas / Citas`)})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(k,{to:`/contact`,className:`hover:text-cyan-400 transition-colors`,children:r(`nav.contact`,`Contacto`)})})]})]}),(0,$.jsxs)(`div`,{className:`space-y-4 md:col-span-1`,children:[(0,$.jsx)(`h3`,{className:`text-white font-semibold text-sm tracking-wider up
28percase`,children:r(`footer.portalsTitle`,`Acceso Portales`)}),(0,$.jsx)(`p`,{className:`text-xs text-slate-300 leading-relaxed`,children:r(`footer.portalsDesc`,`Ingresa a nuestras plataformas operativas de forma rápida.`)}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsxs)(`a`,{href:s,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center justify-between px-3 py-2.5 rounded-xl bg-slate-800 text-cyan-400 hover:text-white hover:bg-slate-700 transition-all font-semibold text-xs border border-slate-700 hover:border-slate-600 shadow-sm`,children:[(0,$.jsx)(`span`,{children:r(`footer.studentPortal`,`Portal Estudiantes`)}),(0,$.jsx)(qn,{size:14})]}),(0,$.jsxs)(`a`,{href:`https://signatures.alltaxsolution.com`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center justify-between px-3 py-2.5 rounded-xl bg-slate-800 text-cyan-400 hover:text-white hover:bg-slate-700 transition-all font-semibold text-xs border border-slate-700 hover:border-slate-600 shadow-sm`,children:[(0,$.jsx)(`span`,{children:r(`footer.digitalSignature`,`Firma Digital`)}),(0,$.jsx)(qn,{size:14})]})]})]})]}),(0,$.jsx)(`div`,{className:`border-t border-slate-800/60 py-8 bg-slate-950`,children:(0,$.jsxs)(`div`,{className:`site-container flex flex-col md:flex-row justify-between items-center gap-4 text-xs font-semibold`,children:[(0,$.jsx)(`p`,{children:r(`footer.copyright`,`© {{year}} All Tax Solution. Todos los derechos reservados.`,{year:i})}),(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-x-5 gap-y-2`,children:[(0,$.jsx)(k,{to:`/privacy-policy`,className:`hover:text-white transition-colors`,children:r(`common.privacyPolicy`,`Política de Privacidad`)}),(0,$.jsx)(k,{to:`/terms-and-conditions`,className:`hover:text-white transition-colors`,children:r(`common.termsOfService`,`Términos de Servicio`)}),(0,$.jsx)(`a`,{href:`#`,className:`hover:text-white transition-colors`,children:r(`common.cookies`,`Cookies`)})]})]})})]})}var jw=dC(wC,`startWebsiteChat`),Mw=dC(wC,`getWebsiteChatMessages`),Nw=dC(wC,`sendWebsiteChatMessage`),Pw=e=>(0,$.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,$.jsx)(`path`,{d:`M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z`})});function Fw(){let[e,t]=(0,p.useState)(!1),[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(`form`),[o,s]=(0,p.useState)(!1),[c,l]=(0,p.useState)(!1),[u,d]=(0,p.useState)(!1),f=(0,p.useRef)(null),m=(0,p.useRef)(null),h=()=>{try{let e=window.AudioContext||window.webkitAudioContext;if(!e)return;let t=new e,n=t.createOscillator(),r=t.createGain();n.connect(r),r.connect(t.destination),n.type=`sine`;let i=t.currentTime;n.frequency.setValueAtTime(587.33,i),n.frequency.exponentialRampToValueAtTime(880,i+.1),r.gain.setValueAtTime(0,i),r.gain.linearRampToValueAtTime(.08,i+.02),r.gain.exponentialRampToValueAtTime(1e-4,i+.28),n.start(i),n.stop(i+.3)}catch(e){console.warn(`Notification sound blocked or failed:`,e)}},[g,_]=(0,p.useState)({enabled:!0,agentName:`Agente Virtual ATS`,welcomeText:`¡Hola! Ingresa tus datos para conectarte directamente con nuestro Centro de Mensajes.`,businessHoursWelcomeText:`¡Hola {name}! 👋 Bienvenido a All Tax Solution. Hemos recibido tu mensaje correctamente y en breve uno de nuestros asesores te atenderá. ¡Gracias por escribirnos!`,outOfHoursText:`¡Hola {name}! 👋 Gracias por escribirnos a All Tax Solution. En este momento nos encontramos fuera de nuestro horario laboral. Hemos recibido tu mensaje y un asesor te responderá a primera hora del siguiente día hábil. ¡Que tengas un excelente día!`,startHour:9,endHour:18}),[v,y]=(0,p.useState)(``),[b,x]=(0,p.useState)(``),[S,C]=(0,p.useState)(``),[ee,te]=(0,p.useState)(``),[ne,re]=(0,p.useState)(``),[ie,ae]=(0,p.useState)(null),[oe,se]=(0,p.useState)(null),[ce,le]=(0,p.useState)([]),[ue,de]=(0,p.useState)(!1),[w,T]=(0,p.useState)(``),[fe,pe]=(0,p.useState)(!1),me=(0,p.useRef)(null),[he,ge]=(0,p.useState)(0),[E,_e]=(0,p.useState)(!1),[ve,ye]=(0,p.useState)(!1),[be,xe]=(0,p.useState)(``),Se=(0,p.useRef)(null);(0,p.useEffect)(()=>{let e=e=>{if(!ve||E)return;let t=Se.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.touches?e.touches[0].clientX:e.clientX,i=n.width-40,a=(r-n.left-20)/i*100;a<0&&(a=0),a>100&&(a=100),ge(a),a>=96&&(_e(!0),ye(!1),ge(100),xe(``))},t=()=>{ve&&(ye(!1),E||ge(0))};return ve&&(window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!0}),window.addEventListener(`touchend`,t)),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[ve,E]);let Ce=()=>{E||ye(!0)},we=()=>{localStorage.removeItem(`ats_chat_convo_id`),localStorage.removeItem(`ats_chat_session_token`),localStorage.removeItem(`ats_chat_name`),localStorage.removeItem(`ats_chat_email`),ae(null),se(null),le([]),a(`form`),de(!1),_e(!1),ge(0),xe(``)};(0,p.useEffect)(()=>{let e=rg(Km(SC,`site_content`,`website_chat`),e=>{e.exists()&&_(t=>({...t,...e.data()}))},e=>{console.warn(`Error loading website_chat config:`,e)});return()=>e()},[]),(0,p.useEffect)(()=>{let e=e=>{(e.key===`Escape`||e.type===`ats:escape`)&&(t(!1),r(!1))};
28return window.addEventListener(`keydown`,e),window.addEventListener(`ats:escape`,e),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`ats:escape`,e)}},[]),(0,p.useEffect)(()=>{let e=localStorage.getItem(`ats_chat_convo_id`),t=localStorage.getItem(`ats_chat_session_token`),n=localStorage.getItem(`ats_chat_name`),r=localStorage.getItem(`ats_chat_email`);e&&t?(ae(e),se(t),n&&y(n),r&&x(r),a(`chat`)):(e||t)&&(localStorage.removeItem(`ats_chat_convo_id`),localStorage.removeItem(`ats_chat_session_token`))},[]),(0,p.useEffect)(()=>{let t=t=>{t.clientY<20&&!e&&i===`form`&&l(!0)};return document.addEventListener(`mouseleave`,t),()=>{document.removeEventListener(`mouseleave`,t)}},[e,i]),(0,p.useEffect)(()=>{if(sessionStorage.getItem(`ats_time_bubble_dismissed`))return;let t=setTimeout(()=>{!e&&!c&&i===`form`&&d(!0)},15e3);return()=>clearTimeout(t)},[e,c,i]),(0,p.useEffect)(()=>{e&&d(!1)},[e]),(0,p.useEffect)(()=>{(c||u)&&h()},[c,u]),(0,p.useEffect)(()=>{if(!ie||!oe){de(!1);return}let e=!1;de(!0);let t=async()=>{try{let t=await Mw({conversationId:ie,sessionToken:oe});if(e)return;le(Array.isArray(t.data?.messages)?t.data.messages:[]),de(!1),setTimeout(()=>me.current?.scrollIntoView({behavior:`smooth`}),100)}catch(t){if(e)return;console.error(`Error loading chat messages:`,t),de(!1);let n=String(t?.code||``);(n.includes(`permission-denied`)||n.includes(`unauthenticated`)||n.includes(`not-found`))&&we()}};t();let n=window.setInterval(t,8e3);return()=>{e=!0,window.clearInterval(n)}},[ie,oe]);let Te=()=>{try{let e=new Date(new Date().toLocaleString(`en-US`,{timeZone:`America/New_York`})),t=e.getDay(),n=e.getHours(),r=Number(g.startHour??9),i=Number(g.endHour??18);return t===0||t===6||n<r||n>=i}catch{return!1}},Ee=e=>{l(!1),t(!0),i===`form`?(te(e),setTimeout(()=>{f.current?.focus()},100)):(T(e),setTimeout(()=>{m.current?.focus()},100))},De=e=>{sessionStorage.setItem(`ats_time_bubble_dismissed`,`true`),d(!1),t(!0);let n=e?`Ya tengo mi EFIN y PTIN. Quisiera más información.`:`No tengo mi EFIN y PTIN. ¿Me ayudan a obtenerlos?`;i===`form`?(te(n),setTimeout(()=>{f.current?.focus()},100)):(T(n),setTimeout(()=>{m.current?.focus()},100))};return g.enabled===!1?null:(0,$.jsxs)(`div`,{className:`fixed bottom-6 right-6 z-50 flex flex-col items-end pointer-events-none`,children:[e&&(0,$.jsxs)(`div`,{className:`pointer-events-auto mb-4 w-[92vw] sm:w-[380px] max-h-[560px] h-[520px] bg-white dark:bg-slate-900 rounded-3xl shadow-2xl border border-slate-200/80 dark:border-slate-800 flex flex-col overflow-hidden animate-in slide-in-from-bottom-5 duration-300`,children:[(0,$.jsxs)(`div`,{className:`bg-gradient-to-r from-slate-900 via-brand-950 to-slate-900 text-white p-4 flex items-center justify-between shadow-md`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(`div`,{className:`w-10 h-10 rounded-2xl bg-brand-600/30 border border-brand-400/40 flex items-center justify-center text-amber-400 font-bold`,children:(0,$.jsx)(Xn,{size:22})}),(0,$.jsx)(`span`,{className:`absolute bottom-0 right-0 w-3 h-3 bg-emerald-500 border-2 border-slate-900 rounded-full`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`h3`,{className:`font-extrabold text-sm text-white flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{children:g.agentName||`Asistencia ATS`}),(0,$.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-[9px] font-bold bg-amber-400/20 text-amber-300 border border-amber-400/30`,children:`Live`})]}),(0,$.jsx)(`p`,{className:`text-[11px] text-slate-300`,children:Te()?`🌙 Operadores fuera de horario (Agente 24/7)`:`⚡ En línea (Soporte Directo)`})]})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[i===`chat`&&(0,$.jsx)(`button`,{onClick:we,className:`p-1.5 rounded-xl hover:bg-white/10 text-slate-300 hover:text-white transition-colors cursor-pointer`,title:`Nueva consulta / Reiniciar chat`,children:(0,$.jsx)(br,{size:16})}),(0,$.jsx)(`button`,{onClick:()=>t(!1),className:`p-1.5 rounded-xl hover:bg-white/10 text-slate-300 hover:text-white transition-colors cursor-pointer`,children:(0,$.jsx)(Ar,{size:18})})]})]}),i===`form`?(0,$.jsxs)(`div`,{className:`p-6 flex-1 overflow-y-auto space-y-4`,children:[(0,$.jsxs)(`div`,{className:`bg-amber-500/10 border border-amber-500/20 rounded-2xl p-3.5 text-xs text-amber-900 dark:text-amber-300 flex items-start gap-2.5`,children:[(0,$.jsx)(Cr,{size:16,className:`shrink-0 text-amber-500 mt-0.5`}),(0,$.jsx)(`p`,{className:`leading-relaxed`,children:g.welcomeText||`¡Hola! Ingresa tus datos para conectarte directamente con nuestro Centro de Mensajes.`})]}),(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(!v.trim()||!b.trim()||!ee.trim())){if(!E){xe(`Desliza el control para verificar tu identidad`);return}s(!0);try{let e=await jw({name:v.trim(),email:b.trim().toLowerCase(),phone:S.trim(),message:ee.trim(),websiteUrl:ne}),t=e.data?.conversationId,n=e.data?.sessionToken;if(!t||!n)throw Error(`La sesión del chat no fue creada correctamente.`);localStorage.setItem(`ats_chat_convo_id`,t),localStorage.setItem(`ats_chat_session_token`,n),localStorage.setItem(`ats_chat_name`,v.trim()),localStorage.setItem(`ats_chat_email`,b.trim().toLowerCase()),ae(t),se(n),le(Array.isArray(e.data?.messages)?e.data.messages:[]),a(`chat`)}catch(e){console.error(`Error starting chat:`,e),alert(`No se pudo iniciar el chat. Por favor intenta nuevamente.`)}finally{s(!1)}}},className:`space-y-3`,children:[(0,$.jsx)(`input`,{type:`text`,name:`website_url`,value:ne,onChange:e=>re(e.target.value),tabIndex:-1,autoComplete:`off`,"aria-hidden":`true`,className:`absolute -left-[9999px] h-px w-px opacity-0`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{className:`block text-[11px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 mb-1`,children:`Nombre Completo *`}),(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(Dr,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-slate-400`}),(0,$.jsx)(`input`,{ref:f,type:`text`,required:!0,placeholder:`Ej. Maria Delgado`,value:v,onCh
28ange:e=>y(e.target.value),className:`w-full pl-9 pr-3 py-2.5 bg-slate-50 dark:bg-slate-800/60 border border-slate-200 dark:border-slate-700/60 rounded-xl text-xs outline-none focus:ring-2 focus:ring-brand-500 text-slate-900 dark:text-white`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{className:`block text-[11px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 mb-1`,children:`Correo Electrónico *`}),(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(ur,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-slate-400`}),(0,$.jsx)(`input`,{type:`email`,required:!0,placeholder:`[email protected]`,value:b,onChange:e=>x(e.target.value),className:`w-full pl-9 pr-3 py-2.5 bg-slate-50 dark:bg-slate-800/60 border border-slate-200 dark:border-slate-700/60 rounded-xl text-xs outline-none focus:ring-2 focus:ring-brand-500 text-slate-900 dark:text-white`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{className:`block text-[11px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 mb-1`,children:`Teléfono / WhatsApp`}),(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(vr,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-slate-400`}),(0,$.jsx)(`input`,{type:`tel`,placeholder:`(800) 516-4337`,value:S,onChange:e=>C(e.target.value),className:`w-full pl-9 pr-3 py-2.5 bg-slate-50 dark:bg-slate-800/60 border border-slate-200 dark:border-slate-700/60 rounded-xl text-xs outline-none focus:ring-2 focus:ring-brand-500 text-slate-900 dark:text-white`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{className:`block text-[11px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 mb-1`,children:`¿En qué podemos ayudarte? *`}),(0,$.jsx)(`textarea`,{required:!0,rows:3,placeholder:`Escribe tu consulta aquí...`,value:ee,onChange:e=>te(e.target.value),className:`w-full p-3 bg-slate-50 dark:bg-slate-800/60 border border-slate-200 dark:border-slate-700/60 rounded-xl text-xs outline-none focus:ring-2 focus:ring-brand-500 text-slate-900 dark:text-white resize-none`})]}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsxs)(`label`,{className:`text-[11px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 flex items-center gap-1.5`,children:[(0,$.jsx)(Sr,{size:13,className:`text-brand-500 dark:text-gold-400`}),(0,$.jsx)(`span`,{children:`Verificación de seguridad *`})]}),(0,$.jsxs)(`div`,{ref:Se,id:`captcha-track`,className:`h-10 w-full rounded-xl relative overflow-hidden select-none border flex items-center justify-center transition-colors duration-300 ${E?`bg-emerald-500/10 border-emerald-500/30 dark:border-emerald-500/20 text-emerald-600 dark:text-emerald-400`:`bg-slate-100 dark:bg-slate-800/60 border-slate-200 dark:border-slate-700/60 text-slate-500 dark:text-slate-400`}`,children:[(0,$.jsx)(`div`,{className:`absolute left-0 top-0 bottom-0 bg-gradient-to-r from-brand-500/20 to-sky-500/20 dark:from-gold-500/10 dark:to-amber-500/10 pointer-events-none`,style:{width:`${he}%`,transition:ve?`none`:`width 0.3s ease-out`}}),(0,$.jsx)(`span`,{className:`text-[11px] font-bold tracking-wide pointer-events-none z-10`,children:E?`¡Verificación completada! ✔`:`Desliza para verificar ➡️`}),(0,$.jsx)(`div`,{onMouseDown:Ce,onTouchStart:Ce,style:{left:`calc(${he}% - ${he*.36}px)`,transition:ve?`none`:`left 0.3s ease-out`},className:`absolute top-1 bottom-1 w-8 h-8 rounded-lg flex items-center justify-center shadow-md select-none z-20 ${E?`bg-emerald-500 text-white cursor-default`:`bg-brand-600 dark:bg-gold-500 text-white dark:text-slate-950 cursor-grab active:cursor-grabbing hover:scale-102 transition-transform duration-200`}`,children:E?(0,$.jsx)(cr,{size:14}):(0,$.jsx)(lr,{size:14})})]}),be&&(0,$.jsxs)(`p`,{className:`text-rose-500 text-[10px] flex items-center gap-1 mt-1`,children:[(0,$.jsx)(tr,{size:11}),` `,be]})]}),(0,$.jsx)(`button`,{type:`submit`,disabled:o||!E,className:`w-full py-3 bg-brand-600 hover:bg-brand-700 text-white font-bold text-xs rounded-xl shadow-lg shadow-brand-600/20 transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50`,children:o?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(sr,{size:16,className:`animate-spin`}),(0,$.jsx)(`span`,{children:`Conectando...`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(xr,{size:15}),(0,$.jsx)(`span`,{children:`Iniciar Conversación`})]})})]})]}):(0,$.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between overflow-hidden`,children:[(0,$.jsxs)(`div`,{className:`p-4 flex-1 overflow-y-auto space-y-3 text-xs`,children:[ue?(0,$.jsxs)(`div`,{className:`text-center py-12 text-slate-400`,children:[(0,$.jsx)(sr,{size:24,className:`animate-spin mx-auto mb-2 text-brand-500`}),(0,$.jsx)(`span`,{children:`Cargando conversación...`})]}):ce.length===0?(0,$.jsxs)(`div`,{className:`text-center py-8 px-4 text-slate-500 dark:text-slate-400 bg-slate-50 dark:bg-slate-800/40 rounded-2xl border border-slate-200/60 dark:border-slate-800 space-y-2`,children:[(0,$.jsx)(Xn,{size:28,className:`mx-auto text-brand-500 mb-1`}),(0,$.jsx)(`p`,{className:`font-bold text-slate-700 dark:text-slate-200`,children:`Conversación iniciada`}),(0,$.jsx)(`p`,{className:`text-[11px] leading-relaxed`,children:`Hemos recibido tus datos correctamente. Escribe tus mensajes y un asesor o nuestro asistente responderá a la brevedad.`})]}):ce.map(e=>{let t=e.sender===`client`;return(0,$.jsxs)(`div`,{className:`flex flex-col ${t?`items-end`:`items-start`}`,children:[(0,$.jsx)(`span`,{className:`text-[10px] text-slate-400 dark:text-slate-500 mb-1 px-1 font-medium`,children:t?`Tú`:e.agentName||g.agentName||`Agente ATS`}),(0,$.jsx)(`div`,{className:`max-w-[82%] p-3 rounded-2xl leading-relaxed ${t?`bg-brand-600 text-white rounded-br-xs`:`bg-slate-100 dar
28k:bg-slate-800 text-slate-800 dark:text-slate-200 rounded-bl-xs border border-slate-200/60 dark:border-slate-700/60`}`,children:(0,$.jsx)(`p`,{className:`whitespace-pre-wrap`,children:e.text})})]},e.id)}),(0,$.jsx)(`div`,{ref:me})]}),(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!w.trim()||!ie||!oe)return;let t=w.trim();T(``),pe(!0);try{let e=await Nw({conversationId:ie,sessionToken:oe,message:t});e.data?.message&&(le(t=>t.some(t=>t.id===e.data.message.id)?t:[...t,e.data.message]),setTimeout(()=>me.current?.scrollIntoView({behavior:`smooth`}),100))}catch(e){console.error(`Error sending message:`,e),T(t),alert(`No se pudo enviar el mensaje. Verifica tu conexión e intenta nuevamente.`)}finally{pe(!1)}},className:`p-3 border-t border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/50 flex gap-2`,children:[(0,$.jsx)(`input`,{ref:m,type:`text`,placeholder:`Escribe un mensaje...`,value:w,onChange:e=>T(e.target.value),className:`flex-1 px-3.5 py-2.5 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl text-xs outline-none focus:ring-2 focus:ring-brand-500 text-slate-900 dark:text-white`}),(0,$.jsx)(`button`,{type:`submit`,disabled:fe||!w.trim(),className:`p-2.5 bg-brand-600 hover:bg-brand-700 text-white rounded-xl shadow-md transition-all disabled:opacity-40 cursor-pointer`,children:(0,$.jsx)(xr,{size:16})})]})]})]}),u&&!e&&!c&&(0,$.jsxs)(`div`,{className:`pointer-events-auto mb-4 w-[92vw] sm:w-[320px] bg-white dark:bg-slate-900 rounded-2xl shadow-2xl border border-slate-200/80 dark:border-slate-800 p-4 animate-in slide-in-from-bottom-5 duration-300 relative`,children:[(0,$.jsx)(`div`,{className:`absolute bottom-[-8px] right-6 w-4 h-4 bg-white dark:bg-slate-900 border-r border-b border-slate-200/80 dark:border-slate-800 rotate-45`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>{sessionStorage.setItem(`ats_time_bubble_dismissed`,`true`),d(!1)},className:`absolute top-2.5 right-2.5 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200 transition-colors cursor-pointer`,title:`Cerrar`,children:(0,$.jsx)(Ar,{size:14})}),(0,$.jsxs)(`div`,{className:`flex gap-3`,children:[(0,$.jsx)(`div`,{className:`w-8 h-8 rounded-xl bg-brand-600/10 dark:bg-brand-500/20 border border-brand-400/20 flex items-center justify-center text-brand-600 dark:text-amber-400 shrink-0`,children:(0,$.jsx)(Xn,{size:18})}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-2.5`,children:[(0,$.jsx)(`h4`,{className:`font-bold text-xs text-slate-800 dark:text-slate-200`,children:`¿Ya tienes tu EFIN y PTIN? 💼`}),(0,$.jsx)(`p`,{className:`text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed`,children:`Cuéntanos para poder asesorarte de la mejor manera:`}),(0,$.jsxs)(`div`,{className:`flex gap-2 pt-0.5`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>De(!0),className:`flex-1 py-2 px-3 bg-brand-600 hover:bg-brand-700 text-white font-bold text-[11px] rounded-xl shadow-md hover:scale-102 active:scale-98 transition-all flex items-center justify-center gap-1 cursor-pointer`,children:[(0,$.jsx)(Cr,{size:11,className:`text-amber-300 shrink-0`}),(0,$.jsx)(`span`,{children:`Sí, ya los tengo`})]}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>De(!1),className:`flex-1 py-2 px-3 bg-slate-100 hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300 font-bold text-[11px] rounded-xl border border-slate-200/60 dark:border-slate-700/60 hover:scale-102 active:scale-98 transition-all flex items-center justify-center cursor-pointer`,children:(0,$.jsx)(`span`,{children:`No los tengo`})})]})]})]})]}),c&&!e&&(0,$.jsxs)(`div`,{className:`pointer-events-auto mb-4 w-[92vw] sm:w-[320px] bg-white dark:bg-slate-900 rounded-2xl shadow-2xl border border-slate-200/80 dark:border-slate-800 p-4 animate-in slide-in-from-bottom-5 duration-300 relative`,children:[(0,$.jsx)(`div`,{className:`absolute bottom-[-8px] right-6 w-4 h-4 bg-white dark:bg-slate-900 border-r border-b border-slate-200/80 dark:border-slate-800 rotate-45`}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>l(!1),className:`absolute top-2.5 right-2.5 text-slate-400 hover:text-slate-600 dar
28k:hover:text-slate-200 transition-colors cursor-pointer`,title:`Cerrar`,children:(0,$.jsx)(Ar,{size:14})}),(0,$.jsxs)(`div`,{className:`flex gap-3`,children:[(0,$.jsx)(`div`,{className:`w-8 h-8 rounded-xl bg-brand-600/10 dark:bg-brand-500/20 border border-brand-400/20 flex items-center justify-center text-brand-600 dark:text-amber-400 shrink-0`,children:(0,$.jsx)(Xn,{size:18})}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,$.jsx)(`h4`,{className:`font-bold text-xs text-slate-800 dark:text-slate-200`,children:`¿Te vas tan pronto? 👋`}),(0,$.jsx)(`p`,{className:`text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed`,children:`Antes de irte, cuéntanos si te interesa alguna de estas opciones:`}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5 pt-1`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>Ee(`¿Quieres iniciar tu negocio de impuestos?`),className:`w-full text-left px-3 py-2 bg-slate-50 dark:bg-slate-800/80 border border-slate-100 dark:border-slate-700/50 hover:bg-brand-50 dark:hover:bg-brand-950/20 hover:border-brand-300 dark:hover:border-brand-800/50 text-slate-700 dark:text-slate-300 hover:text-brand-700 dark:hover:text-brand-400 font-medium text-[11px] rounded-xl transition-all flex items-center gap-1.5 group cursor-pointer`,children:[(0,$.jsx)(Cr,{size:12,className:`text-amber-500 shrink-0`}),(0,$.jsx)(`span`,{children:`¿Quieres iniciar tu negocio de impuestos?`})]}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>Ee(`¿Necesitas ayuda para crecer tu negocio de impuestos?`),className:`w-full text-left px-3 py-2 bg-slate-50 dark:bg-slate-800/80 border border-slate-100 dark:border-slate-700/50 hover:bg-brand-50 dark:hover:bg-brand-950/20 hover:border-brand-300 dark:hover:border-brand-800/50 text-slate-700 dark:text-slate-300 hover:text-brand-700 dark:hover:text-brand-400 font-medium text-[11px] rounded-xl transition-all flex items-center gap-1.5 group cursor-pointer`,children:[(0,$.jsx)(Cr,{size:12,className:`text-amber-500 shrink-0`}),(0,$.jsx)(`span`,{children:`¿Necesitas ayuda para crecer tu negocio?`})]}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>Ee(`¿Necesito experiencia para iniciar mi negocio de impuestos?`),className:`w-full text-left px-3 py-2 bg-slate-50 dark:bg-slate-800/80 border border-slate-100 dark:border-slate-700/50 hover:bg-brand-50 dark:hover:bg-brand-950/20 hover:border-brand-300 dark:hover:border-brand-800/50 text-slate-700 dark:text-slate-300 hover:text-brand-700 dark:hover:text-brand-400 font-medium text-[11px] rounded-xl transition-all flex items-center gap-1.5 group cursor-pointer`,children:[(0,$.jsx)(Cr,{size:12,className:`text-amber-500 shrink-0`}),(0,$.jsx)(`span`,{children:`¿Necesito experiencia para iniciar mi negocio de impuestos?`})]})]})]})]})]}),(0,$.jsxs)(`div`,{className:`help-launchers flex items-center gap-3`,children:[(0,$.jsx)(`button`,{type:`button`,className:`mobile-help-toggle pointer-events-auto min-h-11 rounded-full bg-brand-700 px-4 text-sm font-semibold text-white shadow-lg`,"aria-expanded":n||e,"aria-controls":`mobile-help-actions`,onClick:()=>{e?t(!1):r(e=>!e),d(!1),l(!1)},children:e?`Cerrar chat`:n?`Cerrar ayuda`:`Ayuda`}),(0,$.jsxs)(`div`,{id:`mobile-help-actions`,className:`help-actions flex items-center gap-3 ${n&&!e?`is-expanded`:``}`,children:[(0,$.jsxs)(`a`,{href:`https://wa.me/19172925982`,target:`_blank`,rel:`noopener noreferrer`,className:`pointer-events-auto p-3.5 bg-[#25D366] hover:bg-[#20ba5a] hover:scale-110 text-white rounded-full shadow-2xl shadow-emerald-600/40 transition-all duration-300 flex items-center justify-center cursor-pointer relative group`,title:`Contactar por WhatsApp (+1 917 292-5982)`,"aria-label":`Contactar por WhatsApp`,children:[(0,$.jsx)(Pw,{className:`w-6 h-6 fill-current`}),(0,$.jsx)(`span`,{className:`absolute right-full mr-3 px-3 py-1.5 bg-slate-900 text-white text-xs font-bold rounded-xl whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none shadow-xl border border-slate-800`,children:`WhatsApp: +1 (917) 292-5982`})]}),(0,$.jsxs)(`button`,{onClick:()=>{t(!e),r(!1)},className:`pointer-events-auto p-4 bg-gradient-to-r from-brand-700 to-brand-500 hover:from-brand-600 hover:to-brand-400 hover:scale-105 text-white rounded-full shadow-2xl shadow-brand-600/40 transition-all duration-300 flex items-center justify-center gap-2 cursor-pointer relative group`,"aria-label":e?`Cerrar chat de soporte`:`Abrir chat de soporte`,"aria-expanded":e,children:[(0,$.jsx)(`span`,{className:`absolute -top-1 -right-1 w-3.5 h-3.5 bg-emerald-500 border-2 border-white dark:border-slate-950 rounded-full`}),e?(0,$.jsx)(Ar,{size:26}):(0,$.jsx)(pr,{size:26})]})]})]})]})}function Iw(){let{pathname:e}=lt();return(0,p.useEffect)(()=>{window.scrollTo({top:0,behavior:`instant`})},[e]),null}function Lw(){let{t:e}=n(),[t,r]=(0,p.useState)({fullName:``,email:``,phone:``,message:``,websiteUrl:``}),[i,a]=(0,p.useState)(`idle`),[o,s]=(0,p.useState)(``),[c,l]=(0,p.useState)({}),[u,d]=(0,p.useState)(0),[f,m]=(0,p.useState)(!1),[h,g]=(0,p.useState)(!1),_=(0,p.useRef)(null);(0,p.useEffect)(()=>{let e=e=>{if(!h||f)return;let t=_.current;if(!t)return;let n=t.getBoundingClientRect(),r=e.touches?e.touches[0].clientX:e.clientX,i=n.width-48,a=(r-n.left-24)/i*100;a<0&&(a=0),a>100&&(a=100),d(a),a>=96&&(m(!0),g(!1),d(100))},t=()=>{h&&(g(!1),f||d(0))};return h&&(window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`touchmove`,e,{passive:!0}),window.addEventListener(`touchend`,t)),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`touchmove`,e),window.removeEventListener(`touchend`,t)}},[h,f]);let v=e=>{f||g(!0)},y=()=>{let n={};return t.fullName.trim()||(n.fullName=e(`contact.fullNameRequired`,`El nombre completo es requerido`)),t.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.email)||(n.email=e(`contact.emailInvalid`,`El correo electrónico no es válido`)):n.email=e(`contact.emailRequired`,`El correo electrónico es requerido`),t.message.trim()||(n.message=e(`contact.messageRequired`,`El mensaje es requerido`)),f||(n.captcha=e(`contact.captchaLabel`,`Desliza el control para verificar tu identidad`)),l(n),Object.keys(n).length===0},b=e=>{let{name:t,value:n}=e.target;r(e=>({...e,[t]:n})),c[t]&&l(e=>({...e,[t]:``}))};return(0,$.jsx)(`div`,{className:`w-full max-w-2xl mx-auto`,children:(0,$.jsxs)(`div`,{className:`relative bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-3xl p-5 sm:p-8 md:p-10 shadow-xl`,children:[(0,$.jsx)(`div`,{className:`absolute -top-10 -right-10 w-40 h-40 bg-gold-400/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsx)(`div`,{className:`absolute -bottom-10 -left-10 w-40 h-40 bg-brand-500/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsx)(`h3`,{className:`text-2xl font-bold text-slate-900 dark:text-white mb-2`,children:`Envíanos un mensaje`}
28),(0,$.jsx)(`p`,{className:`text-slate-600 dark:text-slate-300 text-sm mb-8`,children:`Completa el formulario y un asesor financiero se pondrá en contacto contigo a la brevedad.`}),i===`success`&&(0,$.jsxs)(`div`,{className:`mb-8 p-6 rounded-2xl bg-emerald-500/10 border border-emerald-500/20 text-emerald-600 dark:text-emerald-400 flex items-start gap-4 animate-in fade-in slide-in-from-bottom-2 duration-300`,children:[(0,$.jsx)(rr,{className:`w-6 h-6 shrink-0 mt-0.5`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h4`,{className:`font-bold text-lg mb-1`,children:`¡Mensaje enviado con éxito!`}),(0,$.jsx)(`p`,{className:`text-sm opacity-90`,children:`Hemos registrado tu solicitud. Nos comunicaremos contigo por correo electrónico o teléfono en las próximas 24 horas hábiles.`}),(0,$.jsx)(`button`,{onClick:()=>a(`idle`),className:`mt-3 text-xs font-bold underline hover:text-emerald-500 dark:hover:text-emerald-300`,children:`Enviar otro mensaje`})]})]}),i===`error`&&(0,$.jsxs)(`div`,{className:`mb-8 p-6 rounded-2xl bg-rose-500/10 border border-rose-500/20 text-rose-600 dar
28k:text-rose-400 flex items-start gap-4`,children:[(0,$.jsx)(tr,{className:`w-6 h-6 shrink-0 mt-0.5`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h4`,{className:`font-bold text-lg mb-1`,children:`Error de envío`}),(0,$.jsx)(`p`,{className:`text-sm opacity-90`,children:o})]})]}),(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),t.websiteUrl.trim()){console.log(`Bot detected via honeypot field. Suppressing submission.`),a(`success`),r({fullName:``,email:``,phone:``,message:``,websiteUrl:``}),m(!1),d(0);return}if(y()){a(`sending`),s(``);try{await dC(wC,`submitPublicLead`)(t),a(`success`),r({fullName:``,email:``,phone:``,message:``,websiteUrl:``}),m(!1),d(0)}catch(e){console.error(`Error al guardar el lead en Firestore:`,e),a(`error`),s(`Ocurrió un error al enviar tu mensaje. Por favor, inténtalo de nuevo.`),m(!1),d(0)}}},className:`space-y-6`,children:[(0,$.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`label`,{htmlFor:`fullName`,className:`text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-300`,children:`Nombre Completo *`}),(0,$.jsx)(`input`,{type:`text`,id:`fullName`,name:`fullName`,value:t.fullName,onChange:b,disabled:i===`sending`,placeholder:`Juan Pérez`,className:`w-full px-4 py-3 rounded-xl border bg-white/50 dark:bg-slate-900/50 text-slate-800 dark:text-white placeholder-slate-400 focus:outline-none focus:ring-2 transition-all duration-200 ${c.fullName?`border-rose-500 focus:ring-rose-500/20`:`border-slate-300 dark:border-slate-700 focus:ring-brand-500/20 focus:border-brand-500 dark:focus:border-gold-400 dark:focus:ring-gold-400/20`}`}),c.fullName&&(0,$.jsxs)(`p`,{className:`text-rose-500 text-xs flex items-center gap-1`,children:[(0,$.jsx)(tr,{size:12}),` `,c.fullName]})]}),(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`label`,{htmlFor:`phone`,className:`text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-300`,children:`Teléfono (Opcional)`}),(0,$.jsx)(`input`,{type:`tel`,id:`phone`,name:`phone`,value:t.phone,onChange:b,disabled:i===`sending`,placeholder:`+1 (305) 555-0199`,className:`w-full px-4 py-3 rounded-xl border border-slate-300 dark:border-slate-700 bg-white/50 dark:bg-slate-900/50 text-slate-800 dark:text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-brand-500/20 focus:border-brand-500 dark:focus:border-gold-400 dark:focus:ring-gold-400/20 transition-all duration-200`})]})]}),(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`label`,{htmlFor:`email`,className:`text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-300`,children:`Correo Electrónico *`}),(0,$.jsx)(`input`,{type:`email`,id:`email`,name:`email`,value:t.email,onChange:b,disabled:i===`sending`,placeholder:`[email protected]`,className:`w-full px-4 py-3 rounded-xl border bg-white/50 dark:bg-slate-900/50 text-slate-800 dark:text-white placeholder-slate-400 focus:outline-none focus:ring-2 transition-all duration-200 ${c.email?`border-rose-500 focus:ring-rose-500/20`:`border-slate-300 dark:border-slate-700 focus:ring-brand-500/20 focus:border-brand-500 dark:focus:border-gold-400 dark:focus:ring-gold-400/20`}`}),c.email&&(0,$.jsxs)(`p`,{className:`text-rose-500 text-xs flex items-center gap-1`,children:[(0,$.jsx)(tr,{size:12}),` `,c.email]})]}),(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`label`,{htmlFor:`message`,className:`text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-300`,children:`Mensaje *`}),(0,$.jsx)(`textarea`,{id:`message`,name:`message`,rows:`4`,value:t.message,onChange:b,disabled:i===`sending`,placeholder:`Escribe tu consulta aquí...`,className:`w-full px-4 py-3 rounded-xl border bg-white/50 dark:bg-slate-900/50 text-slate-800 dark:text-white placeholder-slate-400 focus:outline-none focus:ring-2 transition-all duration-200 resize-none ${c.message?`border-rose-500 focus:ring-rose-500/20`:`border-slate-300 dark:border-slate-700 focus:ring-brand-500/20 focus:border-brand-500 dark:focus:border-gold-400 dark:focus:ring-gold-400/20`}`}),c.message&&(0,$.jsxs)(`p`,{className:`text-rose-500 text-xs flex items-center gap-1`,children:[(0,$.jsx)(tr,{size:12}),` `,c.message]})]}),(0,$.jsxs)(`div`,{className:`absolute opacity-0 pointer-events-none w-0 h-0 overflow-hidden`,"aria-hidden":`true`,children:[(0,$.jsx)(`label`,{htmlFor:`websiteUrl`,children:`Deje este campo vacío`}),(0,$.jsx)(`input`,{type:`text`,id:`websiteUrl`,name:`websiteUrl`,value:t.websiteUrl,onChange:b,tabIndex:`-1`,autoComplete:`off`})]}),(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`label`,{className:`text-xs font-semibold uppercase tracking-wider text-slate-600 dar
28k:text-slate-300 flex items-center gap-1.5`,children:[(0,$.jsx)(Sr,{size:14,className:`text-brand-500 dark:text-gold-400`}),(0,$.jsx)(`span`,{children:`Verificación de seguridad *`})]}),(0,$.jsxs)(`div`,{ref:_,id:`captcha-track`,className:`h-12 w-full rounded-2xl relative overflow-hidden select-none border flex items-center justify-center transition-colors duration-300 ${f?`bg-emerald-500/10 border-emerald-500/30 dark:border-emerald-500/20 text-emerald-600 dark:text-emerald-400`:`bg-slate-100 dark:bg-slate-950 border-slate-200 dark:border-slate-800 text-slate-500 dark:text-slate-400`}`,children:[(0,$.jsx)(`div`,{className:`absolute left-0 top-0 bottom-0 bg-gradient-to-r from-brand-500/20 to-sky-500/20 dark:from-gold-500/10 dark:to-amber-500/10 pointer-events-none`,style:{width:`${u}%`,transition:h?`none`:`width 0.3s ease-out`}}),(0,$.jsx)(`span`,{className:`text-xs font-bold tracking-wide pointer-events-none z-10`,children:f?`¡Verificación completada! ✔`:`Desliza para verificar ➡️`}),(0,$.jsx)(`div`,{onMouseDown:v,onTouchStart:v,style:{left:`calc(${u}% - ${u*.44}px)`,transition:h?`none`:`left 0.3s ease-out`},className:`absolute top-1 bottom-1 w-10 h-10 rounded-xl flex items-center justify-center shadow-md select-none z-20 ${f?`bg-emerald-500 text-white cursor-default`:`bg-brand-600 dark:bg-gold-500 text-white dark:text-slate-950 cursor-grab active:cursor-grabbing hover:scale-102 transition-transform duration-200`}`,children:f?(0,$.jsx)(cr,{size:16}):(0,$.jsx)(lr,{size:16})})]}),c.captcha&&(0,$.jsxs)(`p`,{className:`text-rose-500 text-xs flex items-center gap-1`,children:[(0,$.jsx)(tr,{size:12}),` `,c.captcha]})]}),(0,$.jsxs)(`button`,{type:`submit`,disabled:i===`sending`||i===`success`||!f,className:`w-full relative overflow-hidden group flex items-center justify-center gap-2 py-4 px-6 rounded-xl font-bold text-white bg-gradient-to-r from-brand-600 to-brand-700 hover:from-brand-700 hover:to-brand-800 shadow-md shadow-brand-500/10 hover:shadow-lg hover:shadow-brand-500/20 active:scale-98 disabled:opacity-40 disabled:pointer-events-none transition-all duration-300 cursor-pointer`,children:[(0,$.jsx)(`span`,{className:`absolute inset-0 bg-gradient-to-r from-gold-400 to-gold-600 opacity-0 group-hover:opacity-100 transition-opacity duration-500 blur-md -z-10`}),i===`sending`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(sr,{className:`w-5 h-5 animate-spin`}),(0,$.jsx)(`span`,{children:`Enviando mensaje...`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(xr,{className:`w-4 h-4 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform`}),(0,$.jsx)(`span`,{children:`Enviar mensaje`})]})]})]})]})})}var Rw=`ats-motion-preference`,zw=`ats-motion-preference-change`;function Bw(){if(typeof window>`u`)return!0;let e=window.localStorage.getItem(Rw);return e===`reduced`?!1:e===`full`?!0:!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function Vw(){let[e,t]=(0,p.useState)(Bw);return(0,p.useEffect)(()=>{let e=e=>{t(e?.detail?.motionEnabled??Bw())},n=window.matchMedia(`(prefers-reduced-motion: reduce)`);return window.addEventListener(zw,e),window.addEventListener(`storage`,e),n.addEventListener(`change`,e),()=>{window.removeEventListener(zw,e),window.removeEventListener(`storage`,e),n.removeEventListener(`change`,e)}},[]),(0,p.useEffect)(()=>{document.documentElement.dataset.motion=e?`full`:`reduced`},[e]),{motionEnabled:e,toggleMotion:(0,p.useCallback)(()=>{let n=!e;window.localStorage.setItem(Rw,n?`full`:`reduced`),t(n),window.dispatchEvent(new CustomEvent(zw,{detail:{motionEnabled:n}}))},[e])}}function Hw({children:e,className:t=``,delay:n=0,direction:r=`up`,duration:i=450,once:a=!0}){let{motionEnabled:o}=Vw(),[s,c]=(0,p.useState)(!o),l=(0,p.useRef)(null);return(0,p.useEffect)(()=>{if(!o){c(!0);return}let e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?(c(!0),a&&l.current&&e.unobserve(l.current)):a||c(!1)})},{threshold:.15,rootMargin:`0px 0px -40px 0px`}),t=l.current;return t&&e.observe(t),()=>{e.disconnect()}},[o,a]),(0,$.jsx)(`div`,{ref:l,"data-scroll-reveal":!0,className:`transition-[opacity,transform] ${(()=>{if(s)return`opacity-100 translate-x-0 translate-y-0 scale-100`;switch(r){case`up`:return`opacity-0 translate-y-10 scale-[0.98]`;case`down`:return`opacity-0 -translate-y-10 scale-[0.98]`;case`left`:return`opacity-0 translate-x-10`;
28case`right`:return`opacity-0 -translate-x-10`;case`zoom`:return`opacity-0 scale-90`;case`none`:return`opacity-0`;default:return`opacity-0 translate-y-10`}})()} ${t}`,style:{transitionDuration:o?`${i}ms`:`0ms`,transitionDelay:o?`${n}ms`:`0ms`,transitionTimingFunction:`cubic-bezier(0.16, 1, 0.3, 1)`},children:e})}var Uw=[{id:1,name:`Carlos Mendoza`,role:`Director de Negocio de Impuestos`,role_en:`Tax Office Director`,location:`Houston, TX`,avatarBg:`bg-gradient-to-br from-brand-500 to-blue-600`,initials:`CM`,rating:5,tag:`Software & Banca`,tag_en:`Software & Banking`,comment:`La integración del software Drake junto con los productos bancarios de TPG y Republic Bank transformó la operación de nuestro negocio. La conversión gratuita de datos desde nuestro sistema anterior y el 0% de impuesto a las ventas en las licencias hicieron que este año nuestra rentabilidad fuera superior.`,comment_en:`Integrating Drake software alongside TPG and Republic Bank products transformed our office operations. The free data conversion from our legacy software and the 0% sales tax on software licenses significantly boosted our profitability this season.`,verified:!0,yearsClient:`4`},{id:2,name:`Dra. María Elena Gutiérrez`,role:`Preparadora Independiente`,role_en:`Independent Tax Preparer`,location:`Miami, FL`,avatarBg:`bg-gradient-to-br from-amber-500 to-gold-600`,initials:`MG`,rating:5,tag:`ATS Academy & PTIN/EFIN`,tag_en:`ATS Academy & PTIN/EFIN`,comment:`Comencé mi negocio tributario sin necesidad de una oficina física gracias a la formación práctica de ATS Academy. La mentoría paso a paso para tramitar el PTIN y el EFIN ante el IRS me dio la seguridad para operar de forma 100% independiente.`,comment_en:`I launched my tax business without needing a physical office thanks to ATS Academy's practical training. Step-by-step guidance to apply for my PTIN and EFIN with the IRS gave me full confidence to operate independently.`,verified:!0,yearsClient:`2`},{id:3,name:`Roberto & Sofía Almanza`,role:`Socios Fundadores - Almanza Tax Services`,role_en:`Founding Partners - Almanza Tax Services`,location:`New York, NY`,avatarBg:`bg-gradient-to-br from-emerald-500 to-teal-600`,initials:`RA`,rating:5,tag:`Firma Digital & Contratos`,tag_en:`Digital Signatures & Contracts`,comment:`El nuevo portal de Firma Digital e-Sign agilizó drásticamente el envío de acuerdos de servicio y formularios de consentimiento IRS 7216. Nuestros clientes firman en segundos desde su celular con total cumplimiento legal y cero papeleo.`,comment_en:`The new e-Sign Digital Signatures portal dramatically streamlined our engagement letters and IRS 7216 consent forms. Our clients sign in seconds from their phones with complete legal compliance and zero paperwork.`,verified:!0,yearsClient:`5`},{id:4,name:`Alejandra Rivas`,role:`Asesora Fiscal Corporativa`,role_en:`Corporate Tax Advisor`,location:`Los Angeles, CA`,avatarBg:`bg-gradient-to-br from-purple-500 to-indigo-600`,initials:`AR`,rating:5,tag:`Soporte Bilingüe 365`,tag_en:`365 Bilingual Support`,comment:`El nivel de atención del equipo de soporte a través de la línea 1-800-516-4337 y WhatsApp es extraordinario. Cualquier duda técnica o normativa sobre el Formulario 1040 la resuelven de inmediato en español con total precisión.`,comment_en:`The support team's dedication via our 1-800-516-4337 toll-free line and WhatsApp is outstanding. Any technical or regulatory question regarding Form 1040 is resolved 
28immediately in Spanish with exact accuracy.`,verified:!0,yearsClient:`3`},{id:5,name:`Ing. Fernando Villacís`,role:`Asesor de Impuestos Internacional`,role_en:`International Tax Consultant`,location:`Orlando, FL / Guayaquil, EC`,avatarBg:`bg-gradient-to-br from-sky-500 to-blue-700`,initials:`FV`,rating:5,tag:`Sucursal Ecuador & Referidos`,tag_en:`Ecuador Branch & Referrals`,comment:`La apertura de la sucursal oficial de All Tax Solution en Guayaquil, Ecuador, facilitó el apoyo a clientes y familias transnacionales. Además, el programa de referidos nos ha permitido escalar nuestra cartera de clientes de forma sostenida.`,comment_en:`Opening All Tax Solution's official branch in Guayaquil, Ecuador, greatly facilitated assistance for transnational families. Plus, the tax referral program allowed us to consistently expand our client base.`,verified:!0,yearsClient:`3`},{id:6,name:`Javier & Claudia Morales`,role:`Preparadores Independientes Remotos`,role_en:`Remote Independent Preparers`,location:`Chicago, IL`,avatarBg:`bg-gradient-to-br from-rose-500 to-pink-600`,initials:`JM`,rating:5,tag:`Emprendedores Sin Negocio`,tag_en:`No Office Entrepreneurs`,comment:`Trabajar desde casa sin pagar regalías de franquicia es la mejor decisión que hemos tomado. All Tax Solution nos respaldó con licencias de software, e-file seguro y almacenamiento en la nube conservando el 100% de nuestros honorarios.`,comment_en:`Working from home without paying franchise royalty fees is the best decision we ever made. All Tax Solution backed us with software licenses, secure e-file, and cloud storage while keeping 100% of our fees.`,verified:!0,yearsClient:`2`}];function Ww(){let{t:e,i18n:t}=n(),r=t.language&&t.language.startsWith(`en`),[i,a]=(0,p.useState)(`Todos`),[o,s]=(0,p.useState)(!1),c=r?[`All`,`Software & Banking`,`ATS Academy & PTIN/EFIN`,`Digital Signatures & Contracts`,`365 Bilingual Support`,`Ecuador Branch & Referrals`,`No Office Entrepreneurs`]:[`Todos`,`Software & Banca`,`ATS Academy & PTIN/EFIN`,`Firma Digital & Contratos`,`Soporte Bilingüe 365`,`Sucursal Ecuador & Referidos`,`Emprendedores Sin Negocio`],l=i===(r?`All`:`Todos`)||i===`Todos`?Uw:Uw.filter(e=>(r?e.tag_en:e.tag)===i||e.tag===i);return(0,$.jsxs)(`section`,{id:`reseñas`,className:`py-20 md:py-28 bg-section-cyan-tint dark:bg-section-cyan-tint text-slate-900 dark:text-white transition-colors duration-300 relative overflow-hidden`,children:[(0,$.jsx)(`div`,{className:`absolute top-1/3 left-0 w-96 h-96 bg-brand-500/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsx)(`div`,{className:`absolute bottom-10 right-0 w-96 h-96 bg-gold-500/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsxs)(`div`,{className:`site-container relative z-10`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:0,children:(0,$.jsxs)(`div`,{className:`text-center max-w-3xl mx-auto mb-14 space-y-4`,children:[(0,$.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-brand-500/10 border border-brand-500/30 text-brand-700 dark:text-brand-350 text-xs font-semibold uppercase tracking-wider`,children:[(0,$.jsx)(fr,{size:14,className:`text-brand-500`}),(0,$.jsx)(`span`,{children:e(`testimonials.badge`,`Opiniones & Reseñas`)})]}),(0,$.jsx)(`h2`,{className:`text-3xl md:text-4xl font-extrabold text-slate-900 dark:text-white leading-tight`,children:e(`testimonials.title`,`Lo que dicen los Preparadores de Impuestos`)}),(0,$.jsx)(`p`,{className:`text-sm md:text-base text-slate-600 dark:text-slate-400 leading-relaxed`,children:r?`Experiences with our software, training, and support.`:`Experiencias con nuestro software, capacitación y soporte.`}),(0,$.jsx)(`div`,{className:`w-16 h-1 bg-gradient-to-r from-brand-600 to-gold-400 mx-auto rounded-full mt-2`})]})}),(0,$.jsx)(Hw,{direction:`up`,delay:150,className:`mb-10 flex justify-center`,children:(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2 justify-center`,children:c.map(e=>(0,$.jsx)(`button`,{onClick:()=>{a(e),s(!1)},className:`px-4 py-2 rounded-xl text-xs font-bold transition-all cursor-pointer border ${i===e||i===`Todos`&&e===`All`?`bg-brand-600 text-white border-brand-600 shadow-md scale-102`:`bg-white dark:bg-slate-900 border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-100 dar
28k:hover:bg-slate-800`}`,children:e},e))})}),(0,$.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8`,children:(o?l:l.slice(0,3)).map((e,t)=>{let n=r?e.role_en:e.role,i=r?e.tag_en:e.tag,a=r?e.comment_en:e.comment,o=r?`Verified Client`:`Cliente Verificado`,s=r?`Client for ${e.yearsClient} yrs`:`Cliente por ${e.yearsClient} años`;return(0,$.jsx)(Hw,{direction:`up`,delay:100+t%3*100,className:`h-full`,children:(0,$.jsxs)(`div`,{className:`group hover-lift-card bg-white dark:bg-slate-900 border border-slate-200/80 dark:border-slate-800/80 rounded-3xl p-8 shadow-sm hover:shadow-2xl hover:border-brand-500/30 dark:hover:border-gold-400/30 transition-all duration-300 flex flex-col justify-between h-full relative overflow-hidden`,children:[(0,$.jsxs)(`div`,{className:`space-y-4 relative z-10`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-1 text-amber-400`,children:[...Array(e.rating)].map((e,t)=>(0,$.jsx)(wr,{size:15,className:`fill-amber-400 text-amber-400`},t))}),(0,$.jsx)(`span`,{className:`px-3 py-1 rounded-full text-[10px] font-extrabold uppercase tracking-wider bg-brand-500/10 text-brand-700 dark:text-brand-350 border border-brand-500/20`,children:i})]}),(0,$.jsxs)(`p`,{className:`text-sm text-slate-700 dark:text-slate-300 leading-relaxed italic relative`,children:[`"`,a,`"`]})]}),(0,$.jsxs)(`div`,{className:`pt-6 mt-6 border-t border-slate-100 dark:border-white/5 flex items-center justify-between gap-4 relative z-10`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3.5`,children:[(0,$.jsx)(`div`,{className:`w-11 h-11 rounded-2xl ${e.avatarBg} text-white font-extrabold text-sm flex items-center justify-center shadow-md shrink-0 group-hover:scale-105 transition-transform`,children:e.initials}),(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`h4`,{className:`font-extrabold text-sm text-slate-900 dark:text-white flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{children:e.name}),e.verified&&(0,$.jsx)(`span`,{title:o,children:(0,$.jsx)(rr,{size:15,className:`text-emerald-500 shrink-0`})})]}),(0,$.jsxs)(`p`,{className:`text-xs text-slate-500 dark:text-slate-400 font-medium`,children:[n,` • `,(0,$.jsx)(`span`,{className:`text-brand-600 dark:text-gold-400 font-semibold`,children:e.location})]})]})]}),(0,$.jsx)(`span`,{className:`text-[10px] text-slate-400 dark:text-slate-500 font-mono shrink-0`,children:s})]})]})},e.id)})}),l.length>3&&(0,$.jsx)(`div`,{className:`mt-8 text-center`,children:(0,$.jsx)(`button`,{type:`button`,onClick:()=>s(e=>!e),"aria-expanded":o,className:`min-h-11 px-5 py-3 rounded-xl border border-slate-300 dark:border-slate-700 font-semibold text-sm`,children:o?r?`Show fewer reviews`:`Ver menos reseñas`:r?`View all reviews`:`Ver todas las reseñas`})})]})]})}function Gw({video:e,onClose:t}){return(0,p.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),e?(0,$.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-md animate-in fade-in duration-200`,onClick:t,children:(0,$.jsxs)(`div`,{className:`relative w-full max-w-4xl bg-slate-900 border border-slate-800 rounded-3xl overflow-hidden shadow-2xl space-y-4`,onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-slate-800 bg-slate-950/50`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-rose-500`}),(0,$.jsx)(`h3`,{className:`font-extrabold text-base md:text-lg text-white truncate max-w-lg`,children:e.title})]}),(0,$.jsx)(`button`,{onClick:t,className:`p-2 text-slate-400 hover:text-white hover:bg-slate-800 rounded-xl transition-colors cursor-pointer`,"aria-label":`Cerrar reproductor (ESC)`,title:`Cerrar (ESC)`,children:(0,$.jsx)(Ar,{size:20})})]}),(0,$.jsx)(`div`,{className:`relative w-full aspect-video bg-black`,children:(0,$.jsx)(`iframe`,{src:`https://www.youtube-nocookie.com/embed/${e.youtubeId}?autoplay=1`,title:e.title,className:`w-full h-full border-0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowFullScreen:!0})}),(0,$.jsxs)(`div`,{className:`p-6 bg-slate-950/80 border-t border-slate-800 flex flex-col sm:flex-row items-center justify-between gap-4`,children:[(0,$.jsx)(`p`,{className:`text-xs text-slate-400 max-w-lg leading-relaxed`,children:e.description}),(0,$.jsxs)(`a`,{href:e.channelUrl||`https://www.youtube.com/@alltaxsolution2207`,target:`_blank`,rel:`noopener noreferrer`,className:`px-5 py-2.5 rounded-xl bg-red-600 hover:bg-red-700 text-white font-bold text-xs transition-colors shrink-0 flex items-center gap-2 shadow-md cursor-pointer`,children:[(0,$.jsx)(`span`,{children:`Ver en YouTube`}),(0,$.jsx)(ir,{size:14})]})]})]})}):null}var Kw=[{id:`yt-residencia-principal`,title:`Venta de Residencia Principal: Lo que TODO Profesional de Impuestos Debe Saber`,category:`Capacitación Fiscal`,duration:`14:20`,youtubeId:`oyVQwMDd7vE`,thumbnail:`https://img.youtube.com/vi/oyVQwMDd7vE/hqdefault.jpg`,description:`Análisis detallado sobre la exclusión de ganancias de capital en la venta de residencia principal y cómo reportarla correctamente en la declaración 1040.`},{id:`yt-impuestos-2026`,title:`Impuestos 2026: Guía Definitiva de Cambios y Nuevas Reglas del IRS`,category:`Novedades IRS`,duration:`12:45`,youtubeId:`zDDnI9uMxmg`,thumbnail:`https://img.youtube.com/vi/zDDnI9uMxmg/hqdefault.jpg`,description:`Resumen completo de las nuevas disposiciones fiscales del IRS, cambios en deducciones estándar y actualización para la temporada tributaria.`},{id:`yt-no-tax-tips`,title:`No Tax on Tips & Overtime - Novedades Tributarias con Angel Diluca`,category:`Reformas Tributarias`,duration:`10:15`,youtubeId:`lvYMBJ
28NIYOg`,thumbnail:`https://img.youtube.com/vi/lvYMBJNIYOg/hqdefault.jpg`,description:`Explicación práctica sobre las propuestas de exención de impuestos en propinas y horas extras para preparadores de impuestos y clientes.`},{id:`yt-asi-empezo-negocio`,title:`Así Empezó Mi Negocio de Impuestos: Consejos para Preparadores`,category:`Marketing & Negocios`,duration:`15:30`,youtubeId:`BFwdG6DuKjg`,thumbnail:`https://img.youtube.com/vi/BFwdG6DuKjg/hqdefault.jpg`,description:`Experiencia real y recomendaciones estratégicas para abrir, equipar con software tributario y escalar un negocio de impuestos rentable.`}];function qw(){let{t:e}=n(),[t,r]=(0,p.useState)(null),[i,a]=(0,p.useState)(!1);return(0,$.jsxs)(`section`,{className:`py-20 bg-slate-900 text-white relative overflow-hidden transition-colors duration-300`,children:[(0,$.jsx)(`div`,{className:`absolute top-0 right-0 w-96 h-96 bg-brand-600/15 rounded-full blur-3xl pointer-events-none`}),(0,$.jsx)(`div`,{className:`absolute bottom-0 left-0 w-96 h-96 bg-red-600/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsxs)(`div`,{className:`site-container relative z-10 space-y-10 sm:space-y-12`,children:[(0,$.jsxs)(`div`,{className:`flex flex-col md:flex-row items-start md:items-end justify-between gap-6`,children:[(0,$.jsxs)(Hw,{direction:`up`,delay:0,className:`space-y-3 max-w-2xl`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-red-500/10 border border-red-500/30 text-red-400 text-xs font-extrabold uppercase tracking-wider`,children:[(0,$.jsx)(kr,{size:14,className:`text-red-500`}),(0,$.jsx)(`span`,{children:e(`youtube.badge`,`Contenido en Video`)})]}),(0,$.jsx)(`h2`,{className:`text-3xl md:text-5xl font-extrabold tracking-tight`,children:e(`youtube.title`,`Mira Nuestras Guías y Tutoriales Fiscales`)}),(0,$.jsx)(`p`,{className:`text-slate-400 text-sm md:text-base leading-relaxed`,children:e(`youtube.subtitle`,`Suscríbete a nuestro canal de YouTube para demostraciones de software, actualizaciones de impuestos, avisos del IRS y consejos prácticos.`)})]}),(0,$.jsx)(Hw,{direction:`up`,delay:100,children:(0,$.jsxs)(`a`,{href:`https://www.youtube.com/@alltaxsolution2207`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2.5 px-6 py-3.5 rounded-2xl bg-red-600 hover:bg-red-700 text-white font-extrabold text-xs md:text-sm shadow-xl shadow-red-900/30 hover:shadow-red-600/40 hover:-translate-y-0.5 transition-all duration-300 cursor-pointer`,children:[(0,$.jsx)(kr,{size:18}),(0,$.jsx)(`span`,{children:e(`youtube.subscribeBtn`,`Suscribirme en YouTube`)}),(0,$.jsx)(ir,{size:16})]})})]}),(0,$.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8`,children:(i?Kw:Kw.slice(0,2)).map((e,t)=>(0,$.jsx)(Hw,{direction:`up`,delay:150+t*80,children:(0,$.jsxs)(`div`,{onClick:()=>r(e),role:`button`,tabIndex:0,"aria-label":`Reproducir: ${e.title}`,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e))},className:`group hover-lift-card bg-slate-950/60 border border-slate-800 rounded-3xl overflow-hidden shadow-md hover:shadow-2xl hover:border-brand-500/50 cursor-pointer transition-all duration-300 flex flex-col justify-between h-full`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`relative aspect-video bg-slate-800 overflow-hidden`,children:[(0,$.jsx)(`img`,{src:e.thumbnail,loading:`lazy`,decoding:`async`,alt:e.title,className:`w-full h-full object-cover group-hover:scale-105 transition-transform duration-500 opacity-90 group-hover:opacity-100`}),(0,$.jsx)(`div`,{className:`absolute inset-0 bg-slate-950/30 group-hover:bg-slate-950/10 transition-colors flex items-center justify-center`,children:(0,$.jsx)(`div`,{className:`w-12 h-12 rounded-full bg-red-600/90 text-white flex items-center justify-center shadow-lg group-hover:scale-110 group-hover:bg-red-600 transition-all duration-300`,children:(0,$.jsx)(yr,{size:20,className:`ml-1 fill-current`})})}),(0,$.jsx)(`span`,{className:`absolute bottom-3 right-3 px-2.5 py-1 rounded-lg bg-slate-950/80 backdrop-blur-md text-white text-[11px] font-bold`,children:e.duration}),(0,$.jsx)(`span`,{className:`absolute top-3 left-3 px-2.5 py-1 rounded-lg bg-brand-600/80 backdrop-blur-md text-white text-[11px] font-bold`,children:e.category})]}),(0,$.jsxs)(`div`,{className:`p-6 space-y-2`,children:[(0,$.jsx)(`h3`,{className:`font-extrabold text-base text-white group-hover:text-brand-400 transition-colors line-clamp-2`,children:e.title}),(0,$.jsx)(`p`,{className:`text-xs text-slate-400 line-clamp-2 leading-relaxed`,children:e.description})]})]}),(0,$.jsxs)(`div`,{className:`px-6 py-4 border-t border-slate-800/80 bg-slate-950/30 flex items-center justify-between text-xs font-bold text-slate-400 group-hover:text-white transition-colors`,children:[(0,$.jsx)(`span`,{children:`Reproducir Video`}),(0,$.jsx)(er,{size:16,className:`group-hover:translate-x-1 transition-transform text-brand-400`})]})]})},e.id))}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>a(e=>!e),"aria-expanded":i,className:`min-h-11 rounded-xl border border-slate-600 px-5 py-3 text-sm font-semibold text-white`,children:i?`Ver menos videos`:`Ver todos los videos`})]}),(0,$.jsx)(Gw,{video:t,onClose:()=>r(null)})]})}var Jw=`https://alltaxsolution.com`,Yw=`All Tax Solution`,Xw=`${Jw}/favicon.png`,Zw=[`https://www.facebook.com/alltaxsolution`,`https://www.instagram.com/alltaxsolution/`,`https://www.youtube.com/@alltaxsolution2207`,`https://x.com/AllTax_Solution`];function Qw({title:e,description:t,image:r=Xw,type:i=`website`,schemaJ
28son:a=null,faqSchema:o=null,breadcrumbSchema:s=null}){let c=lt(),{i18n:l}=n(),u=l?.language?.startsWith(`en`)?`en`:`es`,d=`${Jw}${c.pathname}`,f=e?`${e} | ${Yw}`:`${Yw} - Soluciones Tributarias y Financieras`,m=t||`All Tax Solution es tu socio estratégico en planificación fiscal, preparación de impuestos corporativos e individuales, y asesoría de negocios.`;return(0,p.useEffect)(()=>{document.documentElement.lang=u,document.title=f;let e=(e,t,n=`name`)=>{let r=document.querySelector(`meta[${n}="${e}"]`);r||(r=document.createElement(`meta`),r.setAttribute(n,e),document.head.appendChild(r)),r.setAttribute(`content`,t)},t=(e,t,n={})=>{let r=`link[rel="${e}"]`;n.hreflang&&(r+=`[hreflang="${n.hreflang}"]`);let i=document.querySelector(r);i||(i=document.createElement(`link`),i.setAttribute(`rel`,e),Object.keys(n).forEach(e=>i.setAttribute(e,n[e])),document.head.appendChild(i)),i.setAttribute(`href`,t)};e(`description`,m),e(`robots`,`index, follow`),e(`og:site_name`,Yw,`property`),e(`og:title`,f,`property`),e(`og:description`,m,`property`),e(`og:type`,i,`property`),e(`og:url`,d,`property`),e(`og:image`,r,`property`),e(`og:locale`,u===`es`?`es_US`:`en_US`,`property`),e(`twitter:card`,`summary_large_image`),e(`twitter:site`,`@AllTax_Solution`),e(`twitter:title`,f),e(`twitter:description`,m),e(`twitter:image`,r),t(`canonical`,d),t(`alternate`,d,{hreflang:`es`}),t(`alternate`,d,{hreflang:`en`}),t(`alternate`,d,{hreflang:`x-default`}),[`schema-org-main`,`schema-org-faq`,`schema-org-breadcrumb`].forEach(e=>{let t=document.getElementById(e);t&&t.remove()});let n=a||{"@context":`https://schema.org`,"@graph":[{"@type":`FinancialService`,"@id":`${Jw}/#organization`,name:Yw,url:Jw,logo:`${Jw}/ats_logo_light.png`,image:`${Jw}/ats_logo_light.png`,description:m,sameAs:Zw,priceRange:`$$`,address:{"@type":`PostalAddress`,addressCountry:`US`},knowsLanguage:[`es`,`en`]},{"@type":`WebSite`,"@id":`${Jw}/#website`,url:Jw,name:Yw,publisher:{"@id":`${Jw}/#organization`},inLanguage:[`es`,`en`]}]},c=(e,t)=>{if(!t)return;let n=document.createElement(`script`);n.id=e,n.type=`application/ld+json`,n.text=JSON.stringify(t),document.head.appendChild(n)};c(`schema-org-main`,n),o&&c(`schema-org-faq`,{"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:o}),s&&c(`schema-org-breadcrumb`,{"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:s})},[f,m,d,r,i,u,a,o,s]),null}var $w={es:{heroTitle:`Todo lo que necesitas para iniciar, crecer y prosperar tu negocio de impuestos.`,heroSubtitle:`En All Tax Solution proveemos software profesional, soporte técnico todo el año, capacitación académica y las herramientas clave para el éxito de tu negocio de impuestos.`},en:{heroTitle:`Everything you need to start, grow, and thrive in your tax business.`,heroSubtitle:`At All Tax Solution, we provide professional software, year-round technical support, academic training, and key tools for your tax business to succeed.`}},eT={es:{heroTitle:`Software, capacitación y soporte para tu negocio de impuestos.`,heroSubtitle:`Prepara declaraciones con software profesional y encuentra capacitación y soporte bilingüe en un solo lugar.`},en:{heroTitle:`Software, training, and support for your tax business.`,heroSubtitle:`Prepare returns with professional software and find training and bilingual support in one place.`}};function tT(e,t=`es`){let n=t.startsWith(`en`)?`en`:`es`,r={...e};for(let e of[`heroTitle`,`heroSubtitle`])(!r[e]||r[e].trim()===$w[n][e])&&(r[e]=eT[n][e]);return r}function nT({items:e,label:t,eyebrow:n,intervalMs:r=7e3,eager:i=!1,className:a=``}){let{motionEnabled:o}=Vw(),[s,c]=(0,p.useState)(0),[l,u]=(0,p.useState)(!1),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(!0),g=(0,p.useRef)(null),_=(0,p.useMemo)(()=>e.map(e=>e.src).join(`|`),[e]),v=o&&!l&&e.length>1,y=e[s]||e[0];if((0,p.useEffect)(()=>{c(0),u(!1)},[_]),(0,p.useEffect)(()=>{if(!g.current||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(([e])=>h(e.isIntersecting));return e.observe(g.current),()=>e.disconnect()},[]),(0,p.useEffect)(()=>{if(!v||d||!m)return;let t=window.setInterval(()=>{document.hidden||c(t=>(t+1)%e.length)},r);return()=>window.clearInterval(t)},[d,r,e.length,v,m]),(0,p.useEffect)(()=>
28{if(e.length<2)return;let t=new Image;t.src=e[(s+1)%e.length].src},[s,e]),!y)return null;let b=t=>{u(!0),c((t+e.length)%e.length)},x=`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-slate-200 bg-white/95 text-slate-700 shadow-sm hover:border-brand-500 hover:text-brand-600 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-500`;return(0,$.jsxs)(`section`,{ref:g,"aria-label":t,"aria-roledescription":`carousel`,className:`w-full min-w-0 overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-xl shadow-slate-900/10 dark:border-slate-700 dark:bg-slate-900 ${a}`,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&(e.preventDefault(),b(s+(e.key===`ArrowLeft`?-1:1)))},children:[(0,$.jsx)(`div`,{className:`aspect-[4/3] bg-slate-100 dark:bg-slate-950`,role:`group`,"aria-roledescription":`slide`,"aria-label":`${s+1} / ${e.length}: ${y.title}`,children:(0,$.jsx)(`img`,{src:y.src,width:y.width||1600,height:y.height||1200,alt:y.alt||y.title,loading:i&&s===0?`eager`:`lazy`,fetchPriority:i&&s===0?`high`:`auto`,decoding:`async`,className:`block h-full w-full object-contain`})}),(0,$.jsxs)(`div`,{className:`border-t border-slate-200 px-4 py-4 sm:px-5 dark:border-slate-700`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,"aria-live":v?`off`:`polite`,"aria-atomic":`true`,children:[n&&(0,$.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-[0.16em] text-brand-600 dark:text-brand-350`,children:n}),(0,$.jsx)(`p`,{className:`mt-1 text-sm font-bold leading-snug text-slate-900 dark:text-white`,children:y.title})]}),e.length>1&&(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:()=>b(s-1),className:x,"aria-label":y.previousLabel||`Anterior`,children:(0,$.jsx)($n,{size:18,"aria-hidden":`true`})}),o&&(0,$.jsx)(`button`,{type:`button`,onClick:()=>u(e=>!e),className:x,"aria-label":v?y.pauseLabel||`Pausar carrusel`:y.playLabel||`Reanudar carrusel`,children:v?(0,$.jsx)(gr,{size:16,"aria-hidden":`true`}):(0,$.jsx)(yr,{size:16,"aria-hidden":`true`})}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>b(s+1),className:x,"aria-label":y.nextLabel||`Siguiente`,children:(0,$.jsx)(er,{size:18,"aria-hidden":`true`})})]})]}),e.length>1&&(0,$.jsx)(`div`,{className:`mt-3 flex gap-2`,role:`group`,"aria-label":y.chooseLabel||`Elegir imagen`,children:e.map((e,t)=>(0,$.jsx)(`button`,{type:`button`,onClick:()=>b(t),"aria-label":`${t+1}: ${e.title}`,"aria-current":t===s?`true`:void 0,className:`group flex h-5 min-w-0 flex-1 items-center rounded focus-visible:outline-2 focus-visible:outline-brand-500`,children:(0,$.jsx)(`span`,{className:`h-1.5 w-full rounded-full transition-colors ${t===s?`bg-brand-600 dark:bg-brand-400`:`bg-slate-200 group-hover:bg-brand-300 dark:bg-slate-700 dark:group-hover:bg-brand-600`}`})},e.src))})]})]})}var rT=[[`hero_es_1.png`,`Tu socio estratégico`,`All Tax Solution como socio estratégico para impulsar, proteger y hacer crecer un negocio de impuestos.`],[`hero_es_2.png`,`All Tax Academy: aprende y emprende`,`Capacitación profesional con All Tax Academy.`],[`hero_es_3.png`,`Curso de Impuestos Personales`,`Curso de impuestos personales para preparar declaraciones con seguridad, criterio y confianza.`],[`hero_es_4.png`,`Curso de Impuestos Corporativos`,`Curso práctico de impuestos corporativos para formularios 1065, 1120 y 1120-S.`],[`hero_es_5.png`,`All Tax Solution Package: todo en uno`,`Software, capacitación, respaldo y soporte en una sola solución.`]],iT=[[`hero_en_5.png`,`All Tax Solution Package: all in one`,`Professional tax software, training, cloud backup, and bilingual support in one solution.`],[`hero_en_1.png`,`Your strategic partner`,`Professional solutions, education, and year-round support for your tax office.`],[`hero_en_2.png`,`All Tax Academy: learn and build your future`,`Professional tax education designed to strengthen your knowledge.`],[`hero_en_3.png`,`Personal Tax Course`,`Learn to prepare personal tax returns with knowledge, accuracy, and confidence.`],[`hero_en_4.png`,`Corporate Tax Course`,`Practical training for Forms 1065, 1120, and 1120-S.`]];function aT(e,t){return e.map(([e,n,r])=>({src:`/hero_slider/${e}`,title:n,alt:r,width:1600,height:1200,previousLabel:t?`Previous image`:`Imagen anterior`,nextLabel:t?`Next image`:`Siguiente imagen`,pauseLabel:t?`Pause slideshow`:`Pausar carrusel`,playLabel:t?`Resume slideshow`:`Reanudar carrusel`,chooseLabel:t?`Choose a homepage image`:`Elegir imagen de la página principal`}))}function oT({isEn:e}){return(0,$.jsx)(nT,{items:aT(e?iT:rT,e),label:e?`All Tax Solution highlights`:`Presentación de All Tax Solution`,eyebrow:e?`Solutions for your office`:`Soluciones para tu oficina`,eager:!0})}function sT({draftContent:e,onFocusField:t}){let{i18n:r}=n(),i=r.language&&r.language.startsWith(`en`),a=bw(`academy`,{academyUrl:Cw()}),o=bw(`landing`,{...eT[i?`en`:`es`],heroCtaText:i?`Request Consultation`:`Solicitar Asesoría`,heroCtaLink:`/contact`,heroImage:i?`/hero_home_en.png`:`/hero_home_es.png`}),s=e||tT(o,i?`en`:`es`),c=Cw(a.academyUrl),l=(e,n,r)=>t?(0,$.jsxs)(`div`,{onClick:n=>{n.preventDefault(),n.stopPropagation(),t(e)},className:`relative group/builder cursor-pointer hover:ring-2 hover:ring-brand-500 hover:ring-offset-1 rounded-xl transition-all duration-250 p-1`,children:[(0,$.jsx)(`span`,{className:`absolute -top-3 left-2 bg-brand-600 text-white text-[8px] font-mono font-bold px-1.5 py-0.5 rounded shadow-sm opacity-0 group-hover/builder:opacity-100 transition-opacity pointer-events-none z-30 uppercase tracking-wider`,children:n}),r]}):r,u=[{icon:(0,$.jsx)(mr,{className:`w-5 h-5 text-brand-600 dark:text-gold-400 group-hover:scale-110 transition-transform`}),text:`Drake Software Profesional e-file`},{icon:(0,$.jsx)(Er,{className:`w-5 h-5 text-brand-600 dark:text-gold-400 group-hover:scale-110 transition-transform`}),text:`Productos bancarios (TPG, Republic, EPS)`},{icon:(0,$.jsx)(Sr,{className:`w-5 h-5 text-brand-600 dark:text-gold-400 group-hover:scale-110 transition-transform`}),text:`Soporte técnico bilingüe todo el año`}],d=[{icon:(0,$.jsx)(nr,{className:`w-5 h-5 text-emerald-500 group-hover:scale-110 transition-transform`}
28),text:i?`Training & step-by-step guidance from scratch`:`Capacitación y mentoría paso a paso desde cero`},{icon:(0,$.jsx)(mr,{className:`w-5 h-5 text-brand-600 dark:text-gold-400 group-hover:scale-110 transition-transform`}),text:i?`100% remote or home-based operation`:`Operación 100% remota o desde tu hogar`},{icon:(0,$.jsx)(Jn,{className:`w-5 h-5 text-gold-500 group-hover:scale-110 transition-transform`}),text:i?`Guidance for obtaining IRS credentials (PTIN / EFIN)`:`Asesoría en obtención de credenciales del IRS (PTIN / EFIN)`}];return(0,$.jsxs)(`div`,{className:`website-experience-shell w-full overflow-hidden`,children:[(0,$.jsx)(Qw,{title:i?`Tax Software & Business Solutions`:`Soluciones Tributarias y Financieras`,description:s.heroSubtitle}),(0,$.jsxs)(`section`,{id:`inicio`,className:`website-hero relative pt-28 pb-12 md:pt-36 md:pb-20 overflow-hidden bg-section-brand-wash text-slate-900 dark:bg-section-brand-wash dark:text-white transition-colors duration-300`,children:[(0,$.jsx)(`div`,{className:`experience-grid absolute inset-0 z-0 pointer-events-none`,"aria-hidden":`true`}),(0,$.jsx)(`div`,{className:`absolute inset-0 z-0 bg-[radial-gradient(ellipse_80%_80%_at_50%_-20%,rgba(0,181,237,0.15),rgba(255,255,255,0))] dark:bg-[radial-gradient(ellipse_80%_80%_at_50%_-20%,rgba(0,181,237,0.25),rgba(0,0,0,0))]`}),(0,$.jsx)(`div`,{className:`website-ambient-orb website-ambient-orb-primary absolute top-1/4 left-10 w-96 h-96 bg-brand-500/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsx)(`div`,{className:`website-ambient-orb website-ambient-orb-secondary absolute bottom-10 right-10 w-96 h-96 bg-gold-500/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsxs)(`div`,{className:`site-container relative z-10 grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-16 items-center`,children:[(0,$.jsxs)(`div`,{className:`space-y-6 max-w-2xl`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-2.5 items-start`,children:[(0,$.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-brand-500/10 border border-brand-500/30 text-brand-700 dark:text-brand-350 text-xs font-semibold uppercase tracking-wider hover:bg-brand-500/20 transition-colors`,children:[(0,$.jsx)(ar,{size:14,className:`text-brand-500 dark:text-brand-400`}),(0,$.jsx)(`span`,{children:i?`For tax professionals`:`Para profesionales de impuestos`})]}),(0,$.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-gold-500/10 border border-gold-500/30 text-gold-700 dark:text-gold-400 text-xs font-semibold uppercase tracking-wider hover:bg-gold-500/20 transition-colors`,children:[(0,$.jsx)(Sr,{size:14,className:`text-gold-500 dark:text-gold-400 animate-pulse`}),(0,$.jsx)(`span`,{children:i?`IRS Approved Continuing Education Provider`:`Proveedor de Educación Continua Autorizado por el IRS`})]})]})}),(0,$.jsx)(Hw,{direction:`up`,delay:150,children:l(`heroTitle`,`Título Hero`,(0,$.jsx)(`h1`,{className:`text-4xl sm:text-5xl xl:text-6xl font-bold tracking-tight leading-[1.08] text-slate-900 dark:text-white`,children:s.heroTitle}))}),(0,$.jsx)(Hw,{direction:`up`,delay:300,children:l(`heroSubtitle`,`Subtítulo Hero`,(0,$.jsx)(`p`,{className:`text-lg text-slate-600 dark:text-slate-300 leading-relaxed`,children:s.heroSubtitle}))}),(0,$.jsx)(Hw,{direction:`up`,delay:450,children:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[l(`heroCtaText`,`Texto Botón CTA`,(0,$.jsxs)(k,{to:t?`#`:s.heroCtaLink||`/contact`,className:`group inline-flex items-center gap-2.5 px-7 py-4 rounded-2xl font-extrabold bg-gradient-to-r from-brand-600 to-brand-700 hover:from-brand-500 hover:to-brand-600 text-white shadow-lg shadow-brand-500/25 hover:shadow-xl hover:-translate-y-1 active:translate-y-0 transition-all duration-300 cursor-pointer`,children:[(0,$.jsx)(_r,{size:18,className:`group-hover:rotate-12 transition-transform duration-300`}),(0,$.jsx)(`span`,{children:s.heroCtaText||`Solicitar Asesoría`}),(0,$.jsx)(Kn,{size:16,className:`group-hover:translate-x-1 transition-transform duration-300`})]})),(0,$.jsxs)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,className:`ats-secondary-action group inline-flex items-center gap-2 px-4 py-3.5 rounded-xl font-semibold text-slate-700 dark:text-slate-200 hover:bg-white/60 dark:hover:bg-white/5 transition-colors`,children:[(0,$.jsx)(`span`,{className:`absolute inset-0 bg-gradient-to-r from-gold-400 to-gold-600 opacity-0 group-hover:opacity-10 transition-opacity duration-500 blur-md -z-10`}),(0,$.jsx)(or,{size:18,className:`text-gold-500 dark:text-gold-400 group-hover:scale-110 transition-transform duration-300`}),(0,$.jsx)(`span`,{children:i?`Student Portal`:`Portal de Estudiantes`})]})]})})]}),(0,$.jsx)(`div`,{className:`hero-stage relative min-w-0`,children:(0,$.jsx)(Hw,{direction:`left`,delay:250,children:l(`heroImage`,`Imagen Hero`,(0,$.jsx)(oT,{isEn:i}))})})]})]}),(0,$.jsx)(`section`,{className:`py-20 md:py-28 bg-section-silver dark:bg-section-silver text-slate-800 dark:text-slate-200 transition-colors`,children:(0,$.jsxs)(`div`,{className:`site-container`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:0,children:(0,$.jsxs)(`div`,{className:`text-center max-w-3xl mx-auto mb-16 space-y-4`,children:[(0,$.jsx)(`h2`,{className:`text-xs font-extrabold uppercase tracking-widest text-brand-600 dark:text-gold-400`,children:i?`Our Pillars`:`Nuestros Pilares`}),(0,$.jsx)(`p`,{className:`text-3xl md:text-4xl font-extrabold text-slate-900 dark:text-white leading-tight`,children:i?`How can we serve you today?`:`¿Cómo podemos servirte hoy?`}),(0,$.jsx)(`div`,{className:`w-16 h-1 bg-gradient-to-r from-brand-600 to-gold-400 mx-auto rounded-full`})]})}),(0,$.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-12`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:100,className:`h-full`,children:(0,$.jsxs)(`div`,{className:`experience-card group hover-lift-card bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800/80 rounded-3xl p-6 sm:p-8 md:p-12 space-y-8 flex flex-col justify-between hover:shadow-2xl hover:border-brand-500/30 dark:hover:border-gold-400/30 h-full`,children:[(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsx)(`div`,{className:`w-14 h-14 roun
28ded-2xl bg-brand-500/10 dark:bg-brand-500/20 flex items-center justify-center text-brand-600 dark:text-brand-400 group-hover:scale-110 group-hover:rotate-3 transition-transform duration-300`,children:(0,$.jsx)(mr,{size:32})}),(0,$.jsx)(`h3`,{className:`text-2xl font-extrabold text-slate-900 dark:text-white group-hover:text-brand-600 dark:group-hover:text-gold-400 transition-colors`,children:i?`For Tax Offices & Preparers`:`Para Preparadores y Negocios de Impuestos`}),(0,$.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-300 leading-relaxed`,children:i?`Looking to launch or expand your own independent tax practice? We deliver the market-leading suite of tools. Forget about restrictive franchise fees and keep 100% of your earnings.`:`¿Quieres iniciar o expandir tu propio negocio de impuestos de forma independiente? Te entregamos el paquete de herramientas líder en el mercado. Olvídate de franquicias restrictivas y quédate con todo el beneficio.`}),(0,$.jsx)(`ul`,{className:`space-y-3`,children:u.map((e,t)=>(0,$.jsxs)(`li`,{className:`flex items-center gap-3 text-xs font-semibold text-slate-700 dark:text-slate-300`,children:[e.icon,(0,$.jsx)(`span`,{children:e.text})]},t))})]}),(0,$.jsx)(`div`,{className:`pt-6`,children:(0,$.jsxs)(k,{to:`/software`,className:`group/link inline-flex items-center gap-2 text-sm font-bold text-brand-600 dark:text-gold-400 hover:text-brand-700 dark:hover:text-gold-300`,children:[(0,$.jsx)(`span`,{children:i?`View Software Solutions`:`Ver Soluciones de Software`}),(0,$.jsx)(Kn,{size:16,className:`group-hover/link:translate-x-1.5 transition-transform`})]})})]})}),(0,$.jsx)(Hw,{direction:`up`,delay:250,className:`h-full`,children:(0,$.jsxs)(`div`,{className:`experience-card group hover-lift-card bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800/80 rounded-3xl p-6 sm:p-8 md:p-12 space-y-8 flex flex-col justify-between hover:shadow-2xl hover:border-brand-500/30 dark:hover:border-gold-400/30 h-full`,children:[(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsx)(`div`,{className:`w-14 h-14 rounded-2xl bg-gold-500/10 dark:bg-gold-400/20 flex items-center justify-center text-gold-600 dark:text-gold-400 group-hover:scale-110 group-hover:rotate-3 transition-transform duration-300`,children:(0,$.jsx)(Zn,{size:32})}),(0,$.jsx)(`h3`,{className:`text-2xl font-extrabold text-slate-900 dark:text-white group-hover:text-brand-600 dark:group-hover:text-gold-400 transition-colors`,children:i?`For Entrepreneurs`:`Para Emprendedores`}),(0,$.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-300 leading-relaxed`,children:i?`Ideal for individuals starting out in the tax industry. We guide you step-by-step from scratch with training, technical support, and essential tools to launch your business and operate independently.`:`Ideal para personas que recién se están iniciando en el mundo de los impuestos. Te guiamos desde cero con capacitación, soporte técnico y las herramientas necesarias para lanzar tu negocio y operar de manera totalmente independiente.`}),(0,$.jsx)(`ul`,{className:`space-y-3`,children:d.map((e,t)=>(0,$.jsxs)(`li`,{className:`flex items-center gap-3 text-xs font-semibold text-slate-700 dark:text-slate-300`,children:[e.icon,(0,$.jsx)(`span`,{children:e.text})]},t))})]}),(0,$.jsx)(`div`,{className:`pt-6`,children:(0,$.jsxs)(k,{to:`/academy`,className:`group/link inline-flex items-center gap-2 text-sm font-bold text-brand-600 dark:text-gold-400 hover:text-brand-700 dark:hover:text-gold-300`,children:[(0,$.jsx)(`span`,{children:i?`Explore Entrepreneur Program`:`Conocer Programa para Emprendedores`}),(0,$.jsx)(Kn,{size:16,className:`group-hover/link:translate-x-1.5 transition-transform`})]})})]})})]}),(0,$.jsx)(Hw,{direction:`up`,delay:350,children:(0,$.jsx)(`div`,{className:`mt-12 overflow-hidden rounded-3xl border border-cyan-300/60 bg-gradient-to-r from-slate-950 via-brand-950 to-slate-900 p-8 text-white shadow-2xl md:p-10`,children:(0,$.jsxs)(`div`,{className:`grid items-center gap-8 lg:grid-cols-[1fr_auto]`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`mb-4 inline-flex items-center gap-2 rounded-full border border-cyan-300/30 bg-cyan-300/10 px-3 py-1 text-xs font-extrabold uppercase tracking-wider text-cyan-200`,children:[(0,$.jsx)(Or,{size:14,"aria-hidden":`true`}),` `,i?`New service`:`Nuevo servicio`]}),(0,$.jsx)(`h3`,{className:`text-3xl font-black`,children:`ATS Link`}),(0,$.jsx)(`p`,{className:`mt-3 max-w-3xl text-sm leading-relaxed text-slate-200 md:text-base`,children:i?`Organize clients, secure documents, guided requests, and appointments in one simple bilingual platform—without the complexity of a traditional CRM.`:`Organiza clientes, documentos protegidos, solicitudes guiadas y citas en una plataforma sencilla y bilingüe, sin la complejidad de un CRM tradicional.`}),(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-x-6 gap-y-2 text-xs font-semibold text-cyan-100`,children:[(0,$.jsxs)(`span`,{children:[`✓ `,i?`Plans from $29/month`:`Planes desde $29/mes`]}),(0,$.jsxs)(`span`,{children:[`✓ `,i?`7-day free trial`:`7 días de prueba gratis`]}),(0,$.jsxs)(`span`,{children:[`✓ `,i?`Antivirus file scanning`:`Revisión antivirus de archivos`]})]})]}),(0,$.jsxs)(k,{to:`/ats-link`,className:`group inline-flex items-center justify-center gap-2 rounded-2xl bg-cyan-400 px-6 py-4 text-sm font-black text-slate-950 shadow-lg transition hover:-translate-y-1 hover:bg-cyan-300`,children:[i?`Explore ATS Link`:`Conocer ATS Link`,` `,(0,$.jsx)(Kn,{size:17,className:`transition-transform group-hover:translate-x-1`})]})]})})})]})}),(0,$.jsxs)(`section`,{className:`website-signal-banner py-14 bg-gradient-to-r from-brand-800 via-brand-600 to-sky-700 text-white relative overflow-hidden shadow-2xl`,children:[(0,$.jsx)(`div`,{className:`website-signal-beam`,"aria-hidden":`true`}),(0,$.jsx)(`div`,{className:`absolute top-0 right-0 -mt-12 -mr-12 w-80 h-80 bg-white/10 rounded-full blur-3xl pointer-events-none`}),(0,$.jsxs)(`div`,{className:`site-container flex flex-col md:flex-row items-center justify-between gap-8 relative z-10`,children:[(0,$.jsxs)(`div`,{className:`space-y-2 text-center md:text-left`,children:[(0,$.jsx)(`span`,{className:`inline-block px-3.5 py-1 rounded-full bg-white/15 text-white text-xs font-extrabold uppercase tracking-wider`,children:i?`Free Business Consultation`:`Asesoría Gratuita de Negocios`}),(0,$.jsx)(`h3`,{className:`text-2xl md:text-3xl font-black text-white tracking-tight`,children:i?`Start Your Own Tax Business Today`:`Inicia tu propio negocio de impuestos hoy mismo`}),(0,$.jsx)(`p`,{className:`text-sm text-sky-100 max-w-2xl font-medium`,children:i?`We guide you step-by-step and free of charge through obtaining your credentials (PTIN / EFIN) and setting up your business in the U.S.`:`Te guiamos paso a paso y sin costo en la obtención de tus credenciales (PTIN / EFIN) y la configuración completa de tu negocio en EE.UU.`})]}),(0,$.jsx)(k,{to:`/contact`,className:`group inline-flex items-center gap-3 px-8 py-4 rounded-2xl font-black bg-gold-400 text-slate-950 hover:bg-gold-300 shadow-xl hover:shadow-2xl hover:scale-105 active:scale-100 transition-all duration-300 shrink-0`,children:(0,$.jsx)(_r,{size:20,className:`group-hover:rotate-12 transition-transform duration-300`})})]})]}),(0,$.jsx)(`section`,{className:`py-20 md:py-28 bg-section-cyan-tint dark:bg-section-cyan-tint text-slate-800 dark:text-slate-200 transition-colors`,children:(0,$.jsxs)(`div`,{className:`site-container`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:0,children:(0,$.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-end justify-between mb-16 gap-8`,children:[(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(`h2`,{className:`text-xs font-extrabold uppercase tracking-widest text-brand-600 dark:text-gold-400`,children:`ATS Academy`}),(0,$.jsx)(`h3`,{className:`text-3xl md:text-4xl font-extrabold text-slate-900 dark:text-white leading-tight`,children:i?`Courses with IRS Credits`:`Cursos con créditos por el IRS`}),(0,$.jsx)(`div`,{className:`w-16 h-1 bg-gradient-to-r from-brand-600 to-gold-400 rounded-full`})]}),(0,$.jsxs)(k,{to:`/academy`,className:`group inline-flex items-center gap-2 px-5 py-3 rounded-xl font-bold bg-brand-600 hover:bg-brand-700 text-white dark:bg-gold-500 dark:text-slate-950 dar
28k:hover:bg-gold-450 text-sm shadow-md hover:shadow-lg hover:-translate-y-0.5 transition-all duration-300`,children:[(0,$.jsx)(`span`,{children:`Ver Cursos Disponibles`}),(0,$.jsx)(Kn,{size:16,className:`group-hover:translate-x-1 transition-transform`})]})]})}),(0,$.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:0,className:`h-full`,children:(0,$.jsxs)(`div`,{className:`experience-card group hover-lift-card bg-slate-50 dark:bg-slate-950 rounded-3xl border border-slate-200/60 dark:border-slate-800/60 p-8 flex flex-col justify-between hover:shadow-xl hover:border-brand-500/30 dark:hover:border-gold-400/30 h-full`,children:[(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(`span`,{className:`inline-block px-2.5 py-1 rounded-md bg-brand-500/10 text-brand-700 dark:text-brand-400 text-xs font-bold uppercase tracking-wider group-hover:scale-105 transition-transform`,children:`Principiante`}),(0,$.jsx)(`h4`,{className:`text-xl font-extrabold text-slate-900 dark:text-white group-hover:text-brand-600 dark:group-hover:text-gold-400 transition-colors`,children:`Impuestos Personales (Formulario 1040)`}),(0,$.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-300 leading-relaxed`,children:`Domina la preparación de impuestos individuales en EE.UU. desde cero. Aprende deducciones, créditos de impuestos y estados de presentación.`})]}),(0,$.jsxs)(`div`,{className:`pt-6 border-t border-slate-200 dark:border-white/5 mt-6 flex justify-between items-center text-xs font-semibold text-slate-400`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(Yn,{size:14}),` 40 horas`]}),(0,$.jsx)(`span`,{children:`Bilingüe`})]})]})}),(0,$.jsx)(Hw,{direction:`up`,delay:150,className:`h-full`,children:(0,$.jsxs)(`div`,{className:`experience-card group hover-lift-card bg-slate-50 dark:bg-slate-950 rounded-3xl border border-slate-200/60 dark:border-slate-800/60 p-8 flex flex-col justify-between hover:shadow-xl hover:border-brand-500/30 dark:hover:border-gold-400/30 h-full`,children:[(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(`span`,{className:`inline-block px-2.5 py-1 rounded-md bg-purple-500/10 text-purple-700 dark:text-purple-400 text-xs font-bold uppercase tracking-wider group-hover:scale-105 transition-transform`,children:`Avanzado`}),(0,$.jsx)(`h4`,{className:`text-xl font-extrabold text-slate-900 dark:text-white group-hover:text-purple-600 dark:group-hover:text-purple-400 transition-colors`,children:`Impuestos de LLCs y Corporaciones`}),(0,$.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-300 leading-relaxed`,children:`Especialización corporativa. Preparación de Formularios 1065, 1120 y 1120-S para sociedades y estructuras comerciales complejas.`})]}),(0,$.jsxs)(`div`,{className:`pt-6 border-t border-slate-200 dark:border-white/5 mt-6 flex justify-between items-center text-xs font-semibold text-slate-400`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(Yn,{size:14}),` 30 horas`]}),(0,$.jsx)(`span`,{children:`Bilingüe`})]})]})}),(0,$.jsx)(Hw,{direction:`up`,delay:300,className:`h-full`,children:(0,$.jsxs)(`div`,{className:`experience-card group hover-lift-card bg-slate-50 dark:bg-slate-950 rounded-3xl border border-slate-200/60 dark:border-slate-800/60 p-8 flex flex-col justify-between hover:shadow-xl hover:border-brand-500/30 dark:hover:border-gold-400/30 h-full`,children:[(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsx)(`span`,{className:`inline-block px-2.5 py-1 rounded-md bg-gold-500/10 text-gold-700 dark:text-gold-400 text-xs font-bold uppercase tracking-wider group-hover:scale-105 transition-transform`,children:`IRS CE`}),(0,$.jsx)(`h4`,{className:`text-xl font-extrabold text-slate-900 dark:text-white group-hover:text-gold-600 dark:group-hover:text-gold-400 transition-colors`,children:`Programa de Temporada Anual (AFSP)`}),(0,$.jsx)(`p`,{className:`text-sm text-slate-600 dark:text-slate-300 leading-relaxed`,children:`Obtén tu credencial oficial del IRS. Actualizaciones tributarias, ética en Circular 230 y dere
28chos de representación calificados.`})]}),(0,$.jsxs)(`div`,{className:`pt-6 border-t border-slate-200 dark:border-white/5 mt-6 flex justify-between items-center text-xs font-semibold text-slate-400`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(Yn,{size:14}),` 18 horas CE`]}),(0,$.jsx)(`span`,{children:`Certificado IRS`})]})]})})]})]})}),(0,$.jsx)(qw,{}),(0,$.jsx)(Ww,{}),(0,$.jsx)(`section`,{id:`contacto`,className:`py-20 md:py-28 bg-section-brand-wash dark:bg-section-brand-wash text-slate-800 dark:text-slate-200 border-t border-slate-200 dark:border-slate-900 transition-colors`,children:(0,$.jsxs)(`div`,{className:`site-container`,children:[(0,$.jsx)(Hw,{direction:`up`,delay:0,children:(0,$.jsxs)(`div`,{className:`text-center max-w-3xl mx-auto mb-16 space-y-4`,children:[(0,$.jsx)(`h2`,{className:`text-xs font-extrabold uppercase tracking-widest text-brand-600 dark:text-gold-400`,children:`Contacto`}),(0,$.jsx)(`h3`,{className:`text-3xl md:text-4xl font-extrabold text-slate-900 dark:text-white leading-tight`,children:`¿Listo para dar el siguiente paso?`}),(0,$.jsx)(`p`,{className:`text-sm text-slate-650 dark:text-slate-300 max-w-xl mx-auto`,children:`Envíanos tus datos de contacto y un asesor de negocios te llamará para resolver tus dudas de inmediato de manera gratuita.`}),(0,$.jsx)(`div`,{className:`w-16 h-1 bg-gradient-to-r from-brand-600 to-gold-400 mx-auto rounded-full`})]})}),(0,$.jsx)(Hw,{direction:`up`,delay:150,children:(0,$.jsx)(Lw,{})})]})})]})}var cT=(0,p.lazy)(()=>v(()=>import(`./SoftwarePage-BsvGZ63Y.js`),__vite__mapDeps([0,1,2,3,4,5]))),lT=(0,p.lazy)(()=>v(()=>import(`./AcademyPage-DiUdIg4w.js`),__vite__mapDeps([6,1,2,7]))),uT=(0,p.lazy)(()=>v(()=>import(`./SignaturesPage-CE4Y0rUk.js`),__vite__mapDeps([8,1,2,9,10]))),dT=(0,p.lazy)(()=>v(()=>import(`./AtsLinkPage-Dq9ZpICX.js`),__vite__mapDeps([11,1,10]))),fT=(0,p.lazy)(()=>v(()=>import(`./BankProductsPage-D6eclEbF.js`),__vite__mapDeps([12,1,2,7,13]))),pT=(0,p.lazy)(()=>v(()=>import(`./ContactPage-CCbZoJjH.js`),__vite__mapDeps([14,1]))),mT=(0,p.lazy)(()=>v(()=>import(`./AboutPage-CrlUEn90.js`),__vite__mapDeps([15,1,16,2,5]))),hT=(0,p.lazy)(()=>v(()=>import(`./ResourcesPage-CSp8_MGM.js`),__vite__mapDeps([17,1,9,4,13]))),gT=(0,p.lazy)(()=>v(()=>import(`./BlogPage-Rd6q00aB.js`),__vite__mapDeps([18,1,19,16,9,20]))),_T=(0,p.lazy)(()=>v(()=>import(`./AdminPage-IwPvXlTj.js`),__vite__mapDeps([21,1,19,17,9,4,13,0,2,3,5,12,7,15,16,22,20,6,18]))),vT=(0,p.lazy)(()=>v(()=>import(`./ChangelogAdmin-Bb-zQMpT.js`),__vite__mapDeps([23,1,19,16,3,24]))),yT=(0,p.lazy)(()=>v(()=>import(`./TranslationManager-B8UEF5k7.js`),__vite__mapDeps([25,1,19,20,24]))),bT=(0,p.lazy)(()=>v(()=>import(`./BlueprintViewer-BSv4XDEB.js`),__vite__mapDeps([26,1,19,24]))),xT=(0,p.lazy)(()=>v(()=>import(`./PrivacyPage-Cxu248nh.js`),__vite__mapDeps([27,1,19,22]))),ST=(0,p.lazy)(()=>v(()=>import(`./TermsPage-bLb4VU9P.js`),__vite__mapDeps([28,1,19,9,24])));function CT(){let e=lt().pathname.startsWith(`/admin`);return(0,p.useEffect)(()=>{let e=localStorage.getItem(`theme`),t=window.matchMedia(`(prefers-color-scheme: dark)`).matches;e===`dark`||!e&&t?document.documentElement.classList.add(`dark`):document.documentElement.classList.remove(`dark`)},[]),(0,p.useEffect)(()=>{let e=e=>{e.key===`Escape`&&window.dispatchEvent(new CustomEvent(`ats:escape`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,$.jsxs)(`div`,{className:`min-h-screen flex flex-col bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-50 transition-colors duration-300`,children:[(0,$.jsx)(Iw,{}),!e&&(0,$.jsx)(ww,{}),(0,$.jsx)(`main`,{className:`flex-grow`,children:(0,$.jsx)(p.Suspense,{fallback:(0,$.jsx)(`div`,{role:`status`,className:`site-container py-40 text-center`,children:`Cargando página…`}),children:(0,$.jsxs)(zt,{children:[(0,$.jsx)(D,{path:`/`,element:(0,$.jsx)(sT,{})}),(0,$.jsx)(D,{path:`/software`,element:(0,$.jsx)(cT,{})}),(0,$.jsx)(D,{path:`/academy`,element:(0,$.jsx)(lT,{})}),(0,$.jsx)(D,{path:`/signatures`,element:(0,$.jsx)(uT,{})}),(0,$.jsx)(D,{path:`/ats-link`,element:(0,$.jsx)(dT,{})}),(0,$.jsx)(D,{path:`/firmas`,element:(0,$.jsx)(Lt,{to:`/signatures`,replace:!0})}),(0,$.jsx)(D,{path:`/firmas-contratos`,element:(0,$.jsx)(Lt,{to:`/signatures`,replace:!0})}),(0,$.jsx)(D,{path:`/firma-digital`,element:(0,$.jsx)(Lt,{to:`/signatures`,replace:!0})}),(0,$.jsx)(D,{path:`/bank-products`,element:(0,$.jsx)(fT,{})}),(0,$.jsx)(D,{path:`/individual`,element:(0,$.jsx)(Lt,{to:`/bank-products`,replace:!0})}),(0,$.jsx)(D,{path:`/about`,element:(0,$.jsx)(mT,{})}),(0,$.jsx)(D,{path:`/resources`,element:(0,$.jsx)(hT,{})}),(0,$.jsx)(D,{path:`/bookings`,element:(0,$.jsx)(Lt,{to:`/about#equipo`,replace:!0})}),(0,$.jsx)(D,{path:`/noticias`,element:(0,$.jsx)(gT,{})}),(0,$.jsx)(D,{path:`/blog`,element:(0,$.jsx)(Lt,{to:`/noticias`,replace:!0})}),(0,$.jsx)(D,{path:`/admin`,element:(0,$.jsx)(_T,{})}),(0,$.jsx)(D,{path:`/admin/changelog`,element:(0,$.jsx)(vT,{})}),(0,$.jsx)(D,{path:`/changelog`,element:(0,$.jsx)(vT,{isPublic:!0})}),(0,$.jsx)(D,{path:`/admin/translations`,element:(0,$.jsx)(yT,{})}),(0,$.jsx)(D,{path:`/admin/blueprint`,element:(0,$.jsx)(bT,{})}),(0,$.jsx)(D,{path:`/contact`,element:(0,$.jsx)(pT,{})}),(0,$.jsx)(D,{path:`/privacy-policy`,element:(0,$.jsx)(xT,{})}),(0,$.jsx)(D,{path:`/terms-and-conditions`,element:(0,$.jsx)(ST,{})}),(0,$.jsx)(D,{path:`*`,element:(0,$.jsx)(Lt,{to:`/`,replace:!0})})]})})}),!e&&(0,$.jsx)(Aw,{}),!e&&(0,$.jsx)(Fw,{})]})}yw.use(i).init({resources:{en:{translation:{common:{dateLocale:`en-US`,previous:`Previous`,next:`Next`,back:`Back`,error:`Error`,accessRestricted:`Restricted Access`,noPermissions:`You do not have the required permissions to view this page.`,loading:`Loading...`,submit:`Submit`,submitting:`Submitting...`,success:`Success`,viewMore:`View More`,contactUs:`Contact Us`,learnMore:`Learn More`,requestConsultation:`Request Free Consultation`,phone:`Phone`,email:`Email`,address:`Address`,allRightsReserved:`All rights reserved.`,privacyPolicy:`Privacy Policy`,termsOfService:`Terms of Service`,cookies:`Cookies`},changelog:{title:`Website Changelog`,subtitle:`Technical log of public website updates and CMS changes`,historyTitle:`Release History`,types:{feature:`Feature`,bugfix:`Bug Fix`,maintenance:`Maintenance`,database:`Database`}},nav:{home:`Home`,solutions:`Solutions`,software:`Tax Software`,softwareDesc:`Distribution and licensing of professional software.`,academy:`Courses & Academy`,academyDesc:`Official training and IRS preparation.`,individual:`Bank Products`,individualDesc:`Refund transfer integrations for direct fee deduction.`,bankProducts:`Bank Products`,bankProductsDesc:`Refund transfer integrations for direct fee deduction.`,portals:`Portals`,signatures:`Digital Signatures & Contracts`,signaturesDesc:`Electronic document signing platform.`,atsLink:`ATS Link`,atsLinkDesc:`Clients, requests, documents, and appointments in one simple platform.`,studentPortalDesc:`Access to courses and certifications portal.`,info:`Info & Media`,resources:`Tax Resources`,resourcesDesc:`Center for IRS forms, schedules, and links.`,refund:`Where Is My Refund?`,refundDesc:`Check your official federal tax refund status (IRS).`,blog:`News`,blogDesc:`IRS news and tax industry updates.`,gallery:`Gallery`,galleryDesc:`Photos and event coverage of our network.`,company:`Company`,about:`About Us`,aboutDesc:`Our story, team, locations, and FAQs.`,bookings:`Bookings / Appointments`,bookingsDesc:`Schedule a meeting with any of our advisors.`,contact:`Contact`,contactDesc:`Support, office address, and direct contact.`,studentPortal:`Student Portal`,loginAtspro:`ATSPRO Login`},hero:{tagPartner:`Your Strategic Partner Across the United States`,tagIrs:`IRS Approved Continuing Education Provider`,title:`Comprehensive Tax Solutions for Your Professional Growth.`,subtitle:`At All Tax Solution we assist you in tax preparation. We provide professional software, specialized technical support for independent office
28s, academic training, and key tools for compliance with all federal and state regulations.`,ctaButton:`Request Free Advice`,studentPortalBtn:`Access Student Portal`,softwareHighlightsTitle:`For Tax Offices & Preparers`,softwareBadge:`Professional Package`,entrepreneurHighlightsTitle:`For New Tax Entrepreneurs`,entrepreneurBadge:`Start Your Office`,metrics:{experienceYears:`Years of Experience`,experienceDesc:`Serving tax offices and preparers nationwide`,supportCoverage:`Support & Guidance`,supportDesc:`Specialized bilingual technical assistance 365 days a year`,irsApproved:`IRS Provider`,irsDesc:`Authorized for official continuing education (CE)`}},about:{badge:`About All Tax Solution`,heroTitle:`Strategic Partner for Tax Offices Across the Nation`,heroSubtitle:`All Tax Solution has earned a solid reputation serving tax professionals for over 23 years. Our highly qualified team of advisors works with the right tools to design innovative solutions that comply with all federal, state, and local regulations.`,missionTitle:`Our Mission`,missionDesc:`To provide complete and transparent support to grow your tax business in a solid, profitable, and independent manner.`,visionTitle:`Our Vision`,visionDesc:`To be the premier strategic partner for tax businesses and preparers across the United States.`,storyTitle:`Business Philosophy`,storyQuote:`"Our mission is to provide complete, transparent support to propel your own tax practice. We don't sell expensive franchises; we equip independent preparers with the necessary tools to thrive freely."`,teamTitle:`Our Leadership & Advisory Team`,teamSubtitle:`Certified specialists committed to your daily success and growth.`,faqsTitle:`Frequently Asked Questions`,faqsSubtitle:`Clear answers to the most common questions about our company and services.`},software:{badge:`Tax Software Package`,heroTitle:`Everything Your Tax Business Needs to Grow, Thrive, and Maximize Your Profits`,heroSubtitle:`We equip professional preparers with the best tools in the market: leading tax software, bank product integrations for direct fee deduction, and 365-day specialized technical support.`,ctaButton:`Get Software Demo`,featuresTitle:`Key Features & Capabilities`,featuresSubtitle:`Everything designed to speed up filing and maximize efficiency in your tax practice.`,drakeTitle:`Professional Drake Software`,drakeDesc:`Fast, reliable e-file software for individual (1040) and business returns (1120, 1120-S, 1065) across all 50 states.`,bankTitle:`Manage your fees without leaving the software`,bankDesc:`Deduct your preparation fees directly from your clients' refunds automatically once processed by the IRS, facilitating your billing.`,supportTitle:`Bilingual Technical Support`,supportDesc:`365 days a year support in Spanish and English to resolve software, installation, and e-file issues immediately.`,securityTitle:`Bank-Grade Data Protection`,securityDesc:`Full encryption and security protocols to safeguard taxpayer information and strictly follow IRS security guidelines.`},academy:{badge:`ATS Academy`,heroTitle:`Train as a Professional Tax Preparer`,heroSubtitle:`ATS Academy provides theoretical and practical knowledge to master the U.S. tax system. Courses designed for beginners as well as experienced preparers requiring Continuing Education (CE) credits.`,portalBtn:`Go to Student Portal`,coursesTitle:`Available Courses & Training Programs`,coursesSubtitle:`Learn with active tax experts and gain official certifications recognized by the IRS.`,ceBadge:`IRS CE Credits`,duration:`Duration`,modality:`Modality`,syllabus:`Course Syllabus`,enrollBtn:`Enroll Now`}
28,individual:{badge:`Individual Tax Service`,heroTitle:`File Your Tax Return Easily and Securely`,heroSubtitle:`No need to leave home or wait in long lines. Our team of certified professionals helps prepare your federal and state returns with maximum accuracy, ensuring you receive the highest legal refund possible.`,ctaButton:`Schedule Tax Appointment`,stepsTitle:`How It Works`,stepsSubtitle:`Simple 4-step process to complete your tax return with total peace of mind.`,step1Title:`1. Document Upload`,step1Desc:`Send us your W-2, 1099, IDs, and tax documents securely.`,step2Title:`2. Review & Optimization`,step2Desc:`Our certified preparers calculate all credits and deductions.`,step3Title:`3. Digital Signature`,step3Desc:`Review your final return and sign electronically from your phone or PC.`,step4Title:`4. E-file & Tracking`,step4Desc:`Direct transmission to the IRS and state with real-time status updates.`},signatures:{badge:`Integrated Digital Signature Portal`,heroTitle:`Instant PDF Document Signing with Full Legal Validity`,heroSubtitle:`Streamline the approval and digital signature workflow for All Tax Solution. Specially designed to coordinate signatures with operators and clients from a single tool in a smooth and eco-friendly way.`,ctaButton:`Open Signatures App`,featuresTitle:`Powerful & Modern Signature Tools`,featuresSubtitle:`Built with state-of-the-art technology to ensure the best visual experience and maximum security for all your signatures.`,pdfToolsBadge:`New: All-In-One PDF Utilities`,pdfToolsTitle:`Convert and process your documents without leaving the platform.`,pdfToolsDesc:`Forget third-party services. With our new integrated suite, you can perform multiple in-browser conversion operations with complete privacy: merge or split files, compress size, password-protect in secure vaults, and convert to and from Microsoft Office (Word, Excel) formats and images.`,pricingTitle:`Per-Office Plans With No Hidden Costs`,pricingSubtitle:`Pay a single flat rate per office. No individual per-user fees or penalties for additional preparers during peak season.`,securityTitle:`Bank-Grade Security & IRS Protection`,securitySubtitle:`Your tax files and data protected under federal privacy standards and unalterable traceability.`},resources:{badge:`Tax Resource Center`,heroTitle:`IRS Resources, Forms, and Official Links`,heroSubtitle:`Fast, centralized access to official IRS portals, refund tracking tools, tax guides, downloadable forms, and key reference materials.`,searchPlaceholder:`Search form or tax resource...`,categories:{all:`All`,irsLinks:`IRS Official Links`,forms:`Common Forms`,guides:`Tax Guides`},whereIsMyRefund:`Where's My Refund? (IRS)`,whereIsMyRefundDesc:`Check the status of your federal tax refund directly on the official IRS portal.`,itinApplication:`ITIN Application (W-7)`,itinApplicationDesc:`Official form and guidelines for requesting or renewing an Individual Taxpayer Identification Number.`,stateRefunds:`State Tax Refunds`,stateRefundsDesc:`Direct access to state department of revenue refund lookup portals across all 50 states.`},blog:{badge:`Tax News & Updates`,heroTitle:`News and IRS Regulatory Updates`,heroSubtitle:`Stay informed with the latest tax news, tax season announcements, IRS regulatory shifts, and practical guides for preparers.`,searchPlaceholder:`Search articles...`,readMore:`Read Article`,share:`Share`,recentArticles:`Recent News`},bookings:{badge:`Appointments & Bookings`,heroTitle:`Schedule a Consultation with Our Tax Experts`,heroSubtitle:`Choose your preferred advisor, select a date and time, and book your personalized virtual or phone consultation.`,selectAdvisor:`1. Select Your Advisor`,selectDate:`2. Select Date & Time`,yourDetails:`3. Complete Your Information`,fullName:`Full Name`,email:`Email Address`,phone:`Phone Number`,notes:`Additional Notes / Reason for Meeting`,confirmBtn:`Confirm Appointment`,successMsg:`Your appointment has been scheduled successfully! We sent a confirmation email.`},contact:{title:`Contact Us`,badge:`Get in Touch`,heroTitle:`We Are Here to Assist Your Growth`,heroSubtitle:`Have questions about tax software, training, or filing your return? Contact our bilingual team directly.`,formTitle:`Send Us a Message`,fullName:`Full Name`,fullNameRequired:`Full name is required`,email:`Email Address`,emailRequired:`Email address is required`,emailInvalid:`Please enter a valid email address`,phone:`Phone Number`,message:`Me
28ssage`,messageRequired:`Message cannot be empty`,captchaLabel:`Slide control to verify identity`,sendBtn:`Send Message`,officeTitle:`Main Office`,officeUSA:`United States (Main Office)`,hoursTitle:`Business Hours`,hoursWeekdays:`Monday - Friday: 9:00 AM - 6:00 PM EST`,hoursSaturday:`Saturday: 10:00 AM - 3:00 PM EST`,hoursSunday:`Sunday: Closed (Available via email/ticket)`},footer:{missionText:`We provide smart tax and IT solutions that boost growth and ensure full compliance for your tax business.`,solutionsTitle:`Solutions`,resourcesTitle:`Resources`,companyTitle:`Company`,portalsTitle:`Portal Access`,portalsDesc:`Quickly access our operating platforms.`,studentPortal:`Student Portal`,digitalSignature:`Digital Signatures`,copyright:`© {{year}} All Tax Solution. All rights reserved.`,locationUSA:`🇺🇸 U.S. (Main Office)`},testimonials:{badge:`Reviews & Opinions`,title:`What Tax Preparers Say About Us`,subtitle:`Hundreds of independent offices and preparers trust All Tax Solution to power their tax practice year after year.`,all:`All`,verifiedClient:`Verified Client`,clientYears:`Client for {{years}} years`},youtube:{badge:`Video Content`,title:`Watch Our Guides & Tax Tutorials`,subtitle:`Subscribe to our YouTube channel for software demos, tax updates, IRS news, and practical advice.`,subscribeBtn:`Subscribe on YouTube`},chat:{title:`ATS Live Support`,subtitle:`Bilingual Tax & Technical Advisor`,greeting:`Hello! How can we assist your tax office or personal return today?`,placeholder:`Type your message...`,send:`Send`}}},es:{translation:{common:{dateLocale:`es-ES`,previous:`Anterior`,next:`Siguiente`,back:`Volver`,error:`Error`,accessRestricted:`Acceso Restringido`,noPermissions:`No tienes los permisos requeridos para acceder a esta página.`,loading:`Cargando...`,submit:`Enviar`,submitting:`Enviando...`,success:`Éxito`,viewMore:`Ver Más`,contactUs:`Contáctanos`,learnMore:`Conoce Más`,requestConsultation:`Solicitar Asesoría Gratis`,phone:`Teléfono`,email:`Correo`,address:`Dirección`,allRightsReserved:`Todos los derechos reservados.`,privacyPolicy:`Política de Privacidad`,termsOfService:`Términos de Servicio`,cookies:`Cookies`},changelog:{title:`Historial de Cambios del Sitio Web`,subtitle:`Bitácora técnica de novedades del portal corporativo y CMS`,historyTitle:`Historial de Lanzamientos`,types:{feature:`Característica`,bugfix:`Corrección`,maintenance:`Mantenimiento`,database:`Base de Datos`}},nav:{home:`Inicio`,solutions:`Soluciones`,software:`Software de Impuestos`,softwareDesc:`Distribución y licenciamiento de software profesional.`,academy:`Cursos & Academia`,academyDesc:`Capacitación y preparación oficial ante el IRS.`,individual:`Productos Bancarios`,individualDesc:`Integraciones de reembolso para cobro directo de honorarios.`,bankProducts:`Productos Bancarios`,bankProductsDesc:`Integraciones de reembolso para cobro directo de honorarios.`,portals:`Portals`,signatures:`Firma Digital & Contratos`,signaturesDesc:`Plataforma de firmas electrónicas de documentos.`,atsLink:`ATS Link`,atsLinkDesc:`Clientes, solicitudes, documentos y citas en una plataforma sencilla.`,studentPortalDesc:`Acceso al portal de cursos y certificaciones.`,info:`Información & Media`,resources:`Recursos de Impuestos`,resourcesDesc:`Centro de formularios, anexos y enlaces del IRS.`,refund:`¿Dónde está mi Reembolso?`,refundDesc:`Consulta el estado oficial de tu reembolso federal (IRS).`,blog:`Noticias`,blogDesc:`Noticias y novedades de impuestos del IRS y de la industria.`,gallery:`Galería`,galleryDesc:`Fotos y cobertura de eventos de nuestra red.`,company:`Compañía`,about:`Quiénes Somos`,aboutDesc:`Nuestra historia, equipo, presencia y FAQs.`,bookings:`Reservas / Citas`,bookingsDesc:`Agenda tu reunión con cualquiera de nuestros asesores.`,contact:`Contacto`,contactDesc:`Soporte, dirección del negocio y contacto directo.`,studentPortal:`Portal Estudiantes`,loginAtspro:`Login ATSPRO`},hero:{tagPartner:`Su socio estratégico en todo Estados Unidos`,tagIrs:`Proveedor de Educación Continua Autorizado por el IRS`,title:`Soluciones Tributarias Integrales para tu Crecimiento Profesional.`,subtitle:`En All Tax Solution te asesoramos en la preparación de impuestos. Proveemos software profesional, soporte técnico especializado para negocios independientes, capacitación académica y herramientas clave para el cumplimiento de todas las regulaciones legales, federales y estatales.`,ctaButton:`Solicitar Asesoría Gratis`,studentPortalBtn:`Acceder al Portal de Estudiantes`,softwareHighlightsTitle:`Para Negocios y Preparadores`,softwareBadge:`Paquete Profesional`,entrepreneurHighlightsTitle:`Para Nuevos Emprendedores de Impuestos`,entrepreneurBadge:`Abre tu Negocio`,metrics:{experienceYears:`Años de Experiencia`,experienceDesc:`Sirviendo a negocios de impuestos y preparadores a nivel nacional`,supportCoverage:`Soporte & Asesoría`,supportDesc:`Soporte técnico bilingüe especializado los 365 días del año`,irsApproved:`Proveedor IRS`,irsDesc:`Autorizado para créditos oficiales de educación continua (CE)`}},about:{badge:`Sobre All Tax Solution`,heroTitle:`Socio Estratégico para Negocios de Impuestos en todo el País`,heroSubtitle:`All Tax Solution se ha ganado una sólida reputación al servicio de los profesionales de impuestos durante más de 23 años. Nuestro equipo altamente calificado de asesores trabaja con las herramientas idóneas para diseñar soluciones innovadoras y actualizadas que cumplen con todas las normativas federales, estatales y locales.`,missionTitle:`Nuestra Misión`,missionDesc:`Brindar un soporte completo y claro para hacer crecer su negocio tributario de forma sólida, rentable e independiente.`,visionTitle:`Nuestra Visión`,visionDesc:`Ser el socio estratég
28ico por excelencia para los negocios y preparadores de impuestos en los Estados Unidos.`,storyTitle:`Filosofía Empresarial`,storyQuote:`"Nuestra misión es brindar un soporte completo y transparente para impulsar tu propio negocio. No vendemos franquicias costosas; dotamos a preparadores independientes de las herramientas necesarias para que prosperen libremente."`,teamTitle:`Nuestro Equipo Directivo y de Asesoría`,teamSubtitle:`Especialistas certificados comprometidos con tu éxito y crecimiento diario.`,faqsTitle:`Preguntas Frecuentes`,faqsSubtitle:`Respuestas claras a las dudas más comunes sobre nuestra empresa y servicios.`},software:{badge:`Paquete de Software de Impuestos`,heroTitle:`Todo lo que tu Negocio de Impuestos necesita para Crecer, Prosperar y Maximizar tus Ganancias`,heroSubtitle:`Equipamos a los preparadores profesionales con las mejores herramientas del mercado: software de impuestos líder, integraciones bancarias para cobro directo y soporte técnico especializado disponible los 365 días del año.`,ctaButton:`Solicitar Demostración de Software`,featuresTitle:`Características y Capacidades Clave`,featuresSubtitle:`Todo diseñado para agilizar la radicación y maximizar la eficiencia en tu negocio tributario.`,drakeTitle:`Drake Software Profesional`,drakeDesc:`Software de e-file rápido y confiable para declaraciones individuales (1040) y corporativas (1120, 1120-S, 1065) en los 50 estados.`,bankTitle:`Gestiona tus honorarios sin salir del software`,bankDesc:`Deduce tus honorarios de preparación directamente del reembolso de tus clientes de forma automática una vez procesado por el IRS, facilitando tus cobros.`,supportTitle:`Soporte Técnico Bilingüe 365`,supportDesc:`Atención especializada en español e inglés todos los días del año para resolver inconvenientes de software, instalación y e-file de inmediato.`,securityTitle:`Protección de Datos de Grado Bancario`,securityDesc:`Cifrado completo y protocolos de seguridad para resguardar la información de los contribuyentes y cumplir estrictamente los requerimientos del IRS.`},academy:{badge:`ATS Academy`,heroTitle:`Fórmate como un Preparador de Impuestos Profesional`,heroSubtitle:`ATS Academy te proporciona el conocimiento teórico y práctico necesario para empezar a dominar el sistema de impuestos estadounidense. Cursos diseñados tanto para principiantes como para preparadores experimentados que requieren créditos de educación continua (CE).`,portalBtn:`Ir al Portal de Estudiantes`,coursesTitle:`Cursos y Programas de Capacitación Disponibles`,coursesSubtitle:`Aprende junto a expertos tributarios activos y obtén certificaciones oficiales reconocidas por el IRS.`,ceBadge:`Créditos CE IRS`,duration:`Duración`,modality:`Modalidad`,syllabus:`Temario del Curso`,enrollBtn:`Inscribirme Ahora`},individual:{badge:`Servicio de Declaración Personal`,heroTitle:`Haz tu Declaración de Impuestos de manera Sencilla y Segura`,heroSubtitle:`No tienes que salir de casa ni hacer largas filas. Nuestro equipo de profesionales certificados te ayuda a preparar tu declaración federal y estatal con la máxima precisión, garantizando que recibas el mayor reembolso legalmente posible.`,ctaButton:`Agendar Cita de Impuestos`,stepsTitle:`Cómo Funciona el Proceso`,stepsSubtitle:`Proceso simple en 4 pasos para completar tu declaración con total tranquilidad.`,step1Title:`1. Envo de Documentos`,step1Desc:`Envíanos tus W-2, 1099, identificaciones y comprobantes de forma 100% segura.`,step2Title:`2. Revisión y Optimización`,step2Desc:`Nuestros preparadores certificados calculan todos los créditos y deducciones a tu favor.`,step3Title:`3. Firma Digital`,step3Desc:`Revisa tu declaración final y firma electrónicamente desde tu celular o computadora.`,step4Title:`4. E-file y Seguimiento`,step4Desc:`Transmisión directa al IRS y al estado con actualizaciones en tiempo real sobre tu reembolso.`},signatures:{badge:`Portal de Firma Digital Integrada`,heroTitle:`Firma documentos PDF al instante con plena validez.`,heroSubtitle:`Agilice el flujo de aprobación y firma digital de All Tax Solution. Diseñado especialmente para coordinar firmas con operadores y clientes desde una sola herramienta de manera fluida y ecológica.`,ctaButton:`Abrir App de Signatures`,featuresTitle:`Herramientas de firma potentes y modernas`,featuresSubtitle:`Diseña
28do con tecnologías de última generación para garantizar la mejor experiencia visual y la máxima seguridad en cada una de sus firmas.`,pdfToolsBadge:`Novedad: Utilidades PDF Todo-en-Uno`,pdfToolsTitle:`Convierte y procesa tus documentos sin salir de la plataforma.`,pdfToolsDesc:`Olvídate de usar servicios de terceros. Con nuestro nuevo suite integrado, puedes realizar múltiples operaciones de conversión in-browser con total privacidad: unir o dividir archivos, comprimir peso, proteger con contraseñas en bóvedas seguras, y convertir desde y hacia formatos de Microsoft Office (Word, Excel) e imágenes.`,pricingTitle:`Planes por Negocio Sin Costos Ocultos`,pricingSubtitle:`Paga una única tarifa fija por negocio. Sin cargos individuales por usuario ni penalizaciones por preparadores adicionales en temporada alta.`,securityTitle:`Seguridad de Grado Bancario y Protección IRS`,securitySubtitle:`Tus archivos y datos tributarios protegidos bajo las exigencias de privacidad federales y trazabilidad inalterable.`},resources:{badge:`Centro de Recursos de Impuestos`,heroTitle:`Recursos, Formularios y Enlaces Oficiales del IRS`,heroSubtitle:`Acceso rápido y centralizado a portales oficiales del IRS, consulta de reembolsos, guías tributarias, formularios descargables y materiales de consulta clave.`,searchPlaceholder:`Buscar formulario o recurso de impuestos...`,categories:{all:`Todos`,irsLinks:`Enlaces Oficiales IRS`,forms:`Formularios Comunes`,guides:`Guías Tributarias`},whereIsMyRefund:`¿Dónde está mi Reembolso? (IRS)`,whereIsMyRefundDesc:`Consulta el estado de tu reembolso federal directamente en el portal oficial del IRS.`,itinApplication:`Solicitud de ITIN (Formulario W-7)`,itinApplicationDesc:`Formulario oficial y guía para tramitar o renovar un Número de Identificación Personal del Contribuyente.`,stateRefunds:`Reembolsos Estatales`,stateRefundsDesc:`Acceso directo a las herramientas de consulta de reembolso de los departamentos de renta en los 50 estados.`},blog:{badge:`Noticias & Novedades de Impuestos`,heroTitle:`Noticias y Novedades Normativas del IRS`,heroSubtitle:`Mantente al día con las últimas publicaciones tributarias, avisos de temporada de impuestos, cambios reglamentarios del IRS y consejos prácticos para preparadores.`,searchPlaceholder:`Buscar noticias...`,readMore:`Leer Artículo`,share:`Compartir`,recentArticles:`Noticias Recientes`},bookings:{badge:`Citas & Reservas`,heroTitle:`Agende su Consulta con Nuestros Asesores de Impuestos`,heroSubtitle:`Elija a su asesor de preferencia, seleccione la fecha y hora disponible y reserve su reunión virtual o telefónica personalizada.`,selectAdvisor:`1. Seleccione su Asesor`,selectDate:`2. Seleccione Fecha y Hora`,yourDetails:`3. Complete sus Datos`,fullName:`Nombre Completo`,email:`Correo Electrónico`,phone:`Número de Teléfono`,notes:`Notas Adicionales / Motivo de la Consulta`,confirmBtn:`Confirmar Reserva de Cita`,successMsg:`¡Su cita ha sido reservada con éxito! Le hemos enviado un correo de confirmación.`},contact:{title:`Contáctenos`,badge:`Contacto Directo`,heroTitle:`Estamos Aquí para Impulsar tu Crecimiento`,heroSubtitle:`¿Tienes preguntas sobre el software de impuestos, cursos o la preparación de tu declaración? Contacta directamente a nuestro equipo bilingüe.`,formTitle:`Envíanos un Mensaje`,fullName:`Nombre Completo`,fullNameRequired:`El nombre completo es requerido`,email:`Correo Electrónico`,emailRequired:`El correo electrónico es requerido`,emailInvalid:`Por favor ingrese un correo electrónico válido`,phone:`Número de Teléfono`,message:`Mensaje`,messageRequired:`El mensaje no puede estar vacío`,captchaLabel:`Desliza el control para verificar tu identidad`,sendBtn:`Enviar Mensaje`,officeTitle:`Negocio Principal`,officeUSA:`Estados Unidos (Negocio Principal)`,hoursTitle:`Horario de Atención`,hoursWeekdays:`Lunes a Viernes: 9:00 AM - 6:00 PM EST`,hoursSaturday:`Sábados: 10:00 AM - 3:00 PM EST`,hoursSunday:`Domingos: Cerrado (Atención vía ticket/email)`},footer:{missionText:`Brindamos soluciones tributarias e informáticas inteligentes que potencian el crecimiento y garantizan el cumplimiento de tu negocio de impuestos.`,solutionsT
28itle:`Soluciones`,resourcesTitle:`Recursos`,companyTitle:`Compañía`,portalsTitle:`Acceso Portales`,portalsDesc:`Ingresa a nuestras plataformas operativas de forma rápida.`,studentPortal:`Portal Estudiantes`,digitalSignature:`Firma Digital`,copyright:`© {{year}} All Tax Solution. Todos los derechos reservados.`,locationUSA:`🇺🇸 EE. UU. (Negocio Principal)`},testimonials:{badge:`Opiniones & Reseñas`,title:`Lo que dicen los Preparadores de Impuestos`,subtitle:`Cientos de negocios e independientes confían en All Tax Solution para impulsar su negocio tributario año tras año.`,all:`Todos`,verifiedClient:`Cliente Verificado`,clientYears:`Cliente desde hace {{years}} años`},youtube:{badge:`Contenido en Video`,title:`Mira Nuestras Guías y Tutoriales de Impuestos`,subtitle:`Suscríbete a nuestro canal de YouTube para demostraciones de software, actualizaciones de impuestos, avisos del IRS y consejos prácticos.`,subscribeBtn:`Suscribirme en YouTube`},chat:{title:`Soporte en Vivo ATS`,subtitle:`Asesor Técnico y de Impuestos Bilingüe`,greeting:`¡Hola! ¿En qué podemos ayudarte con tu negocio de impuestos o declaración personal hoy?`,placeholder:`Escribe tu mensaje...`,send:`Enviar`}}}},lng:localStorage.getItem(`website_lang`)||`es`,fallbackLng:`en`,interpolation:{escapeValue:!1}});var wT=yw;(0,m.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(p.StrictMode,{children:(0,$.jsx)(En,{children:(0,$.jsx)(CT,{})})}));export{nr as $,Vh as A,Dr as B,zv as C,Zh as D,tg as E,Gm as F,mr as G,Cr as H,Km as I,sr as J,ur as K,Ar as L,$h as M,eg as N,Qh as O,Rh as P,rr as Q,kr as R,Ov as S,ng as T,Sr as U,Er as V,vr as W,ar as X,or as Y,ir as Z,ES as _,Hw as a,Jn as at,Kv as b,Aw as c,lt as ct,bw as d,tr as et,xC as f,dC as g,CC as h,Qw as i,Yn as it,Ih as j,rg as k,ww as l,ft as lt,wC as m,sT as n,$n as nt,Vw as o,Kn as ot,SC as p,lr as q,nT as r,Qn as rt,Lw as s,k as st,wT as t,er as tt,Cw as u,DS as v,Uv as w,Hv as x,Ub as y,Or as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.